diff --git a/CO2.org b/CO2.org new file mode 100644 index 0000000000000000000000000000000000000000..2db81d6525b049ffe3f8f20b40d0ba292e91b516 --- /dev/null +++ b/CO2.org @@ -0,0 +1,80 @@ +///////////////////////////////////////////////////////////////////////////// +/////////// BASH ET MIGRATION A PREVOIR POUR LA MISE EN PRODUCTION ///////// +/////////////////////////////////////////////////////////////////////////// +[] Chart +**** Bash de reprise des data dans les chart des projets +/communecter/datamigration/RefactorChartProjectData +[] Notifications +**** Bash de reprise des data dans notifications +****** Create notify.id as object with isUnread and isUnseen +/communecter/datamigration/UpOldNotifications +[] News +**** Bash of object.type inbstead of object.objectType on news(!!!important with notification reactor!!!!) +ph/communecter/datamigration/ObjectObjectTypeNewsToObjectType +[] Params config => Mettre les deux variables à jour (celle ci sont bonnes pour la prod) => utliser dans l'accueil + "openatlasId" => "555eba56c655675cdd65bf19", + "communecterId" => "55dafac4e41d75571d848360", +///////////////////////////////////////////////////////////////////////////// +////////////////////// END BASH ET MIGRATION /////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +* ************************************************************ +* Evolutions / New Features +* ************************************************************ + +AGENDA + [ ] Recherche Agenda + [ ] afficher seulement les jours du mois en cours == hide before and after + [ ] ajouter un bouton "+" sur chaque jour, pour préselectionner la date d'un event que l'on veut créer + [X] dans le formulaire event, il manque le type de l'événement + [X] rajouter la recherche par type d'event + [ ] dans le calendrier : afficher de couleurs différentes les événements selon si l'on est invité, intéressé, ou créateur/admin + [X] tpl event : il manque l'identité de l'organisateur, s'il y en a un + [X] et peut être le nombre de personne "intéressé", "participants", "invités" + + +ANNONCES :::Tib :::Tango + [X] Système de Mot Clé Contextuel + [X] Finir DynForm Annonce + [X] Gérer les devises du prix / pays (Euro, CFP) + [X] template Annonce + [X] Mise en avant du prix + [X] Photos + [X] Finir tpl preview + [X] gallerie + [X] Système de recherche par prix (à ajouter au globalautocomplete) + [X] Redirection vers la page annonce apres SAVE + [X] pouvoir faire une RAZ de tous les filtres + [X] wording (donner / à donner etc) + [ ] Gestion des annonces favorites ? + +CITIES :::Rapha :::Tib +[ ] Réintégrer les City :::Rapha + [ ] Filiaires thématiques :::Tib + [ ] Espace info commune + +PAGE PROFIL PERSO :::ALL + [X] Paramètres de confidentialité / autres paramètres :::Rapha + [X] Nouveau système de notifications :::Clem + [X] Edition des données perso :::Rapha + [X] Option Follow / Favoris / Devenir membre / etc :::Clem + [X] Refactor Directory - Communauté / Collection :::Tango :::Tib + [ ] Messagerie privée / RocketChat :::Tib + [X] Besoins / Need pour orga&projets + [X] Pouvoir partager les news (in / out) ::: + [X] Système de partage d'element dans les news (annonces, events, etc) :::CLem + [ ] Ajouter un onglet "mon agenda" + [ ] Finir les OnePages :::Tango (5J) + + [ ] Details + [ ] + +DDA +[ ] Refonte DDA :::Tango :::Tib + [ ] Unifier Discusion/Vote/Action ? + [ ] Constituante ? + +ADMIN +[ ] rétablir le module Admin + +[ ] Rédiger les filtre dans classified.json +[ ] Faire le menu de gauche des pages elements \ No newline at end of file diff --git a/Co2Module.php b/Co2Module.php new file mode 100644 index 0000000000000000000000000000000000000000..94d03cc68b984c98e404b3625c104850ff1f0686 --- /dev/null +++ b/Co2Module.php @@ -0,0 +1,101 @@ +<?php +/** + * Communect Module + * + * @author Tibor Katelbach <oceatoon@mail.com> + * @version 0.0.3 + * +*/ + +class Co2Module extends CWebModule { + + public function init() + { + // this method is called when the module is being created + // you may place code here to customize the module or the application + + Yii::app()->setComponents(array( + 'errorHandler'=>array( + 'errorAction'=>'/'.$this->id.'/error' + ) + )); + + Yii::app()->homeUrl = Yii::app()->createUrl($this->id); + + //Apply theme + $themeName = $this->getTheme(); + Yii::app()->theme = $themeName; + + //Retrieve network params in the url + if(@$_GET["network"]) { + Yii::app()->params['networkParams'] = $_GET["network"]; + } + if(@Yii::app()->request->cookies['lang'] && !empty(Yii::app()->request->cookies['lang']->value)) + Yii::app()->language = (string)Yii::app()->request->cookies['lang']; + else + Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr'; + + // import the module-level models and components + $this->setImport(array( + 'citizenToolKit.models.*', + $this->id.'.models.*', + $this->id.'.components.*', + $this->id.'.messages.*', + )); + /*$this->components = array( + 'class'=>'CPhpMessageSource', + 'basePath'=>'/messages' + );*/ + } + + public function beforeControllerAction($controller, $action) + { + if (parent::beforeControllerAction($controller, $action)) + { + // this method is called before any module controller action is performed + // you may place customized code here + return true; + } + else + return false; + } + private $_assetsUrl; + + public function getAssetsUrl() + { + if ($this->_assetsUrl === null) + $this->_assetsUrl = Yii::app()->getAssetManager()->publish( + Yii::getPathOfAlias($this->id.'.assets') ); + return $this->_assetsUrl; + } + + /** + * Retourne le theme d'affichage de communecter. + * Si option "theme" dans paramsConfig.php : + * Si aucune option n'est précisée, le thème par défaut est "ph-dori" + * Si option 'tpl' fixée dans l'URL avec la valeur "iframesig" => le theme devient iframesig + * Si option "network" fixée dans l'URL : theme est à network et la valeur du parametres fixe les filtres d'affichage + * @return type + */ + public function getTheme() { + //$theme = "CO2"; + $theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "CO2"; + //$theme = "notragora"; + if (!empty(Yii::app()->params['theme'])) { + $theme = Yii::app()->params['theme']; + } else if (empty(Yii::app()->theme)) { + $theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "CO2"; + //$theme = "CO2"; + //$theme = "notragora"; + } + + if(@$_GET["tpl"] == "iframesig"){ $theme = $_GET["tpl"]; } + + if(@$_GET["network"]) { + $theme = "network"; + //Yii::app()->params['networkParams'] = $_GET["network"]; + } + Yii::app()->session["theme"] = $theme; + return $theme; + } +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ad410e11302107da9aa47ce3d46bd5ad011c4c43 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/NetworkModule.php b/NetworkModule.php new file mode 100644 index 0000000000000000000000000000000000000000..f9bdba8ea5939f70c8d6957eef0f177fc367ea91 --- /dev/null +++ b/NetworkModule.php @@ -0,0 +1,108 @@ +<?php +/** + * Communect Module + * + * @author Tibor Katelbach <oceatoon@mail.com> + * @version 0.0.3 + * +*/ + +class NetworkModule extends CWebModule { + + public function init() + { + // this method is called when the module is being created + // you may place code here to customize the module or the application + + Yii::app()->setComponents(array( + 'errorHandler'=>array( + 'errorAction'=>'/'.$this->id.'/error' + ) + )); + + Yii::app()->homeUrl = Yii::app()->createUrl($this->id); + + //sudo ln -s co2 network + Yii::app()->theme = "network"; + Yii::app()->session["theme"] == "network"; + Yii::app()->params['networkParams'] = ( @Yii::app()->session["networkParams"] ) ? Yii::app()->session["networkParams"] : @$_GET["network"]; + + /*if(@$_GET["network"] ){ + Yii::app()->theme = "network"; + Yii::app()->params['networkParams'] = $_GET["network"]; + + Yii::app()->session["theme"] = "network"; + Yii::app()->session["networkParams"] = $_GET["network"]; + } */ + + if(@Yii::app()->request->cookies['lang'] && !empty(Yii::app()->request->cookies['lang']->value)) + Yii::app()->language = (string)Yii::app()->request->cookies['lang']; + else + Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr'; + + //Yii::app()->language = (isset(Yii::app()->session["lang"])) ? Yii::app()->session["lang"] : 'fr'; + + // import the module-level models and components + $this->setImport(array( + 'citizenToolKit.models.*', + $this->id.'.models.*', + $this->id.'.components.*', + $this->id.'.messages.*', + )); + /*$this->components = array( + 'class'=>'CPhpMessageSource', + 'basePath'=>'/messages' + );*/ + } + + public function beforeControllerAction($controller, $action) + { + if (parent::beforeControllerAction($controller, $action)) + { + // this method is called before any module controller action is performed + // you may place customized code here + return true; + } + else + return false; + } + private $_assetsUrl; + + public function getAssetsUrl() + { + if ($this->_assetsUrl === null) + $this->_assetsUrl = Yii::app()->getAssetManager()->publish( + Yii::getPathOfAlias($this->id.'.assets') ); + return $this->_assetsUrl; + } + + /** + * Retourne le theme d'affichage de communecter. + * Si option "theme" dans paramsConfig.php : + * Si aucune option n'est précisée, le thème par défaut est "ph-dori" + * Si option 'tpl' fixée dans l'URL avec la valeur "iframesig" => le theme devient iframesig + * Si option "network" fixée dans l'URL : theme est à network et la valeur du parametres fixe les filtres d'affichage + * @return type + */ + public function getTheme() { + //$theme = "network"; + $theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "network"; + //$theme = "notragora"; + if (!empty(Yii::app()->params['theme'])) { + $theme = Yii::app()->params['theme']; + } else if (empty(Yii::app()->theme)) { + $theme = (@Yii::app()->session["theme"]) ? Yii::app()->session["theme"] : "network"; + //$theme = "network"; + //$theme = "notragora"; + } + + if(@$_GET["tpl"] == "iframesig"){ $theme = $_GET["tpl"]; } + + if(@$_GET["network"]) { + $theme = "network"; + //Yii::app()->params['networkParams'] = $_GET["network"]; + } + Yii::app()->session["theme"] = $theme; + return $theme; + } +} diff --git a/PITCHME.md b/PITCHME.md new file mode 100644 index 0000000000000000000000000000000000000000..385669dc70d7fdae557641cad27786beeb2eca78 --- /dev/null +++ b/PITCHME.md @@ -0,0 +1,16 @@ +# COmmunecter + + +## Connecté à sa Commune +## Connecter les communs + + +---?image=assets/COmmunecter-Banniere.jpg + +# and Again +## TRopical TEsting of wonder world + ++++ + +# Testing Verticality +## and everything that goes with it diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..41eb9746143bbe4ad27cdd08317dbcfd9f07ba1a --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Communecter + +* Réseau sociétal citoyen disponible ici : http://communecter.org/ +* Documentation : https://wiki.communecter.org/ +* Chat : https://chat.lescommuns.org/ diff --git a/TerlaModule.php b/TerlaModule.php deleted file mode 100644 index a6978b29042d5e9e0959cb005814b42640c2c483..0000000000000000000000000000000000000000 --- a/TerlaModule.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php -/** - * Communect Module - * - * @author Tibor Katelbach <oceatoon@mail.com> - * @version 0.0.3 - * -*/ - -class TerlaModule extends CWebModule { - - public function init(){} - - public function beforeControllerAction($controller, $action) - { - if (parent::beforeControllerAction($controller, $action)) - { - // this method is called before any module controller action is performed - // you may place customized code here - return true; - } - else - return false; - } - private $_assetsUrl; - - public function getAssetsUrl() - { - if ($this->_assetsUrl === null) - $this->_assetsUrl = Yii::app()->getAssetManager()->publish( - Yii::getPathOfAlias($this->id.'.assets') ); - return $this->_assetsUrl; - } -} diff --git a/assets/images/1+1=3.jpg b/assets/images/1+1=3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b811b850e1dda895507b28bff68ef8f7c5f526a8 Binary files /dev/null and b/assets/images/1+1=3.jpg differ diff --git a/assets/images/1+1=3empty.jpg b/assets/images/1+1=3empty.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e9ca26c4ca1e0eaab41e313732b356972fbefb43 Binary files /dev/null and b/assets/images/1+1=3empty.jpg differ diff --git a/assets/images/CO.png b/assets/images/CO.png new file mode 100644 index 0000000000000000000000000000000000000000..76b59c4f9c95cd120649b5142e8e6ce98dc4d7a7 Binary files /dev/null and b/assets/images/CO.png differ diff --git a/assets/images/COMMUNECTION.jpg b/assets/images/COMMUNECTION.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b95ae470067c7cb67487c2142499aab302ea7088 Binary files /dev/null and b/assets/images/COMMUNECTION.jpg differ diff --git a/assets/images/COMMUNECTION.png b/assets/images/COMMUNECTION.png new file mode 100644 index 0000000000000000000000000000000000000000..636aeca051cf495aa916b651d88cdece34bc8c60 Binary files /dev/null and b/assets/images/COMMUNECTION.png differ diff --git a/assets/images/COmmunecter-Banniere.jpg b/assets/images/COmmunecter-Banniere.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cd709b8b508d769119e938d8ac19bf2b5d3f3929 Binary files /dev/null and b/assets/images/COmmunecter-Banniere.jpg differ diff --git a/assets/images/COmmunecter-BanniereCrowdfunding.jpg b/assets/images/COmmunecter-BanniereCrowdfunding.jpg new file mode 100644 index 0000000000000000000000000000000000000000..faf45739b5da5b1cebb58f488c60d79474244a75 Binary files /dev/null and b/assets/images/COmmunecter-BanniereCrowdfunding.jpg differ diff --git a/assets/images/CTK.png b/assets/images/CTK.png new file mode 100644 index 0000000000000000000000000000000000000000..1f856ab5797a2316e0dddd1d4c0c466662e142d2 Binary files /dev/null and b/assets/images/CTK.png differ diff --git a/assets/images/Communecter-24x24.svg b/assets/images/Communecter-24x24.svg new file mode 100644 index 0000000000000000000000000000000000000000..25ea4b5f30040c8cdc374b1e40d5b90ba269cd95 --- /dev/null +++ b/assets/images/Communecter-24x24.svg @@ -0,0 +1,171 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="24px" height="24px" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"> +<g> + <g> + <rect fill="#FFFFFF" width="24" height="24"/> + </g> + <g> + <g> + <path fill="#E6354E" d="M5.043,15.764c0,0.093,0.005,0.159,0.016,0.2l-1.611,1.611l-0.138-0.23l1.58-1.581H4.751l-1.488,1.489 + c-0.051-0.093-0.092-0.179-0.123-0.262l1.228-1.228H4.229l-1.137,1.136c-0.021-0.051-0.035-0.1-0.046-0.146 + C3.036,16.708,3.021,16.659,3,16.608l0.844-0.845H3.707l-0.736,0.737l-0.046-0.323l0.398-0.414H3.186l-0.276,0.292 + c-0.01-0.052-0.016-0.101-0.016-0.146c0-0.045,0-0.094,0-0.146v-4.297c0-0.438,0.084-0.855,0.253-1.249s0.399-0.737,0.69-1.029 + c0.292-0.291,0.632-0.521,1.021-0.69s0.809-0.253,1.258-0.253v0.062l0.062-0.062h0.384L6.115,8.69v0.137l0.568-0.582h0.383 + L6.114,9.212v0.123l1.091-1.09h0.384L6.115,9.718v0.14l1.611-1.611H8.11L6.115,10.24v0.139l2.134-2.133h0.016 + c0.062,0,0.12,0,0.176,0c0.057,0,0.116,0.005,0.177,0.016l-2.133,2.133H6.116c-0.297,0-0.55,0.105-0.76,0.314 + c-0.21,0.21-0.313,0.462-0.313,0.76V15.764L5.043,15.764z M5.089,16.087c0.02,0.051,0.039,0.093,0.061,0.13 + c0.021,0.036,0.041,0.079,0.062,0.131l-1.534,1.519c-0.031-0.031-0.06-0.064-0.084-0.1c-0.026-0.036-0.054-0.075-0.084-0.116 + L5.089,16.087z M5.272,16.423c0.021,0.031,0.046,0.065,0.076,0.101c0.031,0.036,0.067,0.064,0.108,0.085l-1.52,1.534l-0.199-0.2 + L5.272,16.423z M5.532,16.67c0.052,0.02,0.096,0.041,0.131,0.062c0.036,0.02,0.079,0.041,0.131,0.062l-1.58,1.579 + c-0.03-0.03-0.063-0.059-0.1-0.084c-0.036-0.024-0.069-0.054-0.101-0.084L5.532,16.67z M8.265,16.838 + c0.052,0,0.128-0.01,0.231-0.03l1.61,1.611c-0.082,0.041-0.138,0.075-0.169,0.106l-1.673-1.671v0.06l-0.092,0.093l0.077,0.077 + l0.016-0.031V17.1l1.519,1.504L9.6,18.695l-1.335-1.319v0.062l-0.092,0.091L8.25,17.59l0.016-0.015v0.046l1.151,1.151 + c-0.031,0.02-0.062,0.033-0.093,0.038c-0.03,0.006-0.067,0.017-0.107,0.038l-0.952-0.952v0.062l-0.092,0.093l0.077,0.062 + l0.016-0.017v0.03l0.768,0.769l-0.23,0.045l-0.537-0.537v0.077l-0.092,0.092l0.077,0.062l0.016-0.017v0.031l0.322,0.322 + c-0.052,0.011-0.098,0.017-0.139,0.017s-0.081,0-0.123,0l-0.062-0.062v0.062h-0.46l-0.03-0.017l-0.017,0.017H7.282l-0.016-0.017 + l-0.03,0.017H6.761l-0.016-0.017l-0.031,0.017H6.239l-0.016-0.017l-0.031,0.017H6.116c-0.051,0-0.1,0-0.146,0 + c-0.045,0-0.095-0.006-0.146-0.017l0.292-0.275v-0.108l0.046,0.047l0.124-0.123l-0.063-0.062l-0.521,0.507 + c-0.052-0.011-0.105-0.018-0.161-0.022c-0.057-0.005-0.109-0.018-0.162-0.038l0.736-0.723v-0.107l0.047,0.048l0.123-0.123 + l-0.062-0.062l-0.951,0.951c-0.051-0.021-0.1-0.035-0.146-0.045c-0.047-0.012-0.095-0.026-0.146-0.048l1.136-1.136v-0.105 + l0.046,0.044l0.122-0.122l-0.062-0.062l-1.335,1.336c-0.082-0.03-0.169-0.072-0.261-0.124l1.487-1.487v-0.107l0.047,0.06 + l0.123-0.121l-0.062-0.077l-1.688,1.688c-0.04-0.021-0.078-0.045-0.114-0.069c-0.036-0.025-0.075-0.054-0.114-0.084l1.596-1.595 + c0.051,0.01,0.123,0.015,0.214,0.015L8.265,16.838L8.265,16.838z M6.362,17.267l0.061,0.062l0.123-0.107l-0.062-0.078 + L6.362,17.267z M6.546,17.729l-0.062-0.062L6.362,17.79l0.061,0.061L6.546,17.729z M6.546,18.25l-0.062-0.062l-0.122,0.122 + l0.061,0.062L6.546,18.25z M6.546,18.772l-0.062-0.062l-0.122,0.123l0.061,0.062L6.546,18.772z M6.623,10.393L8.74,8.276 + c0.051,0.01,0.102,0.021,0.153,0.03c0.051,0.01,0.103,0.021,0.153,0.031l-2.041,2.057H6.623V10.393z M6.623,17.007l0.062,0.077 + l0.123-0.122l-0.062-0.078L6.623,17.007z M6.808,17.467l-0.062-0.062l-0.123,0.123l0.062,0.061L6.808,17.467z M6.808,17.987 + l-0.062-0.06L6.623,18.05l0.062,0.062L6.808,17.987z M6.808,18.511l-0.062-0.062l-0.123,0.123l0.062,0.062L6.808,18.511z + M7.067,17.222l-0.062-0.078l-0.122,0.123l0.061,0.062L7.067,17.222z M7.067,17.729l-0.062-0.062L6.884,17.79l0.061,0.061 + L7.067,17.729z M7.067,18.25l-0.062-0.062l-0.123,0.122l0.062,0.062L7.067,18.25z M7.067,18.772l-0.062-0.062l-0.123,0.123 + l0.062,0.062L7.067,18.772z M7.145,10.393l2.011-2.025c0.123,0.03,0.219,0.066,0.291,0.107l-1.918,1.918H7.145z M7.328,16.961 + l-0.062-0.077l-0.123,0.122l0.062,0.076L7.328,16.961z M7.328,17.467l-0.062-0.062l-0.123,0.123l0.062,0.061L7.328,17.467z + M7.328,17.987l-0.062-0.06L7.144,18.05l0.062,0.062L7.328,17.987z M7.328,18.511l-0.062-0.062l-0.123,0.123l0.062,0.062 + L7.328,18.511z M7.589,17.222l-0.077-0.078l-0.106,0.123l0.062,0.062L7.589,17.222z M7.589,17.729l-0.077-0.062L7.405,17.79 + l0.062,0.061L7.589,17.729z M7.589,18.25l-0.077-0.062l-0.106,0.122l0.062,0.062L7.589,18.25z M7.589,18.772l-0.077-0.062 + l-0.106,0.123l0.062,0.062L7.589,18.772z M7.851,16.961l-0.076-0.077L7.65,17.006l0.078,0.076L7.851,16.961z M7.851,17.467 + l-0.076-0.062L7.65,17.528l0.078,0.061L7.851,17.467z M7.851,17.987l-0.076-0.06L7.65,18.05l0.078,0.062L7.851,17.987z + M7.851,18.511l-0.076-0.062L7.65,18.572l0.078,0.062L7.851,18.511z M7.666,10.393l1.872-1.887 + c0.051,0.021,0.098,0.041,0.138,0.062c0.041,0.02,0.082,0.041,0.123,0.062l-1.765,1.764H7.666z M8.111,17.222l-0.077-0.078 + l-0.123,0.123l0.076,0.062L8.111,17.222z M8.111,17.729l-0.077-0.062L7.911,17.79l0.076,0.061L8.111,17.729z M8.111,18.25 + l-0.077-0.062l-0.123,0.122l0.076,0.062L8.111,18.25z M8.111,18.772l-0.077-0.062l-0.123,0.123l0.076,0.062L8.111,18.772z + M8.172,10.393l1.72-1.702c0.04,0.02,0.078,0.043,0.114,0.068s0.074,0.054,0.115,0.084l-1.596,1.58 + c-0.103-0.02-0.188-0.031-0.261-0.031L8.172,10.393L8.172,10.393z M8.879,10.593c-0.042-0.031-0.08-0.057-0.116-0.077 + c-0.035-0.021-0.078-0.041-0.13-0.062l1.565-1.564c0.04,0.03,0.077,0.062,0.107,0.092c0.03,0.031,0.066,0.062,0.107,0.092 + L8.879,10.593z M8.679,16.746c0.062-0.011,0.123-0.041,0.185-0.093l1.534,1.535c-0.04,0.021-0.092,0.062-0.153,0.122 + L8.679,16.746z M9.14,10.854c-0.041-0.071-0.103-0.138-0.185-0.199l1.519-1.519c0.041,0.031,0.077,0.062,0.108,0.093 + c0.03,0.03,0.062,0.062,0.092,0.092L9.14,10.854z M9.001,16.546c0.062-0.062,0.102-0.107,0.123-0.138l1.534,1.518l-0.138,0.139 + L9.001,16.546z M9.309,11.206c-0.021-0.051-0.039-0.097-0.055-0.138c-0.016-0.04-0.032-0.087-0.053-0.139l1.534-1.534 + c0.031,0.041,0.059,0.077,0.084,0.107c0.025,0.031,0.055,0.066,0.085,0.106L9.309,11.206z M9.217,16.255 + c0.03-0.072,0.056-0.139,0.077-0.199l1.596,1.581c-0.021,0.029-0.042,0.059-0.062,0.083c-0.021,0.025-0.042,0.049-0.062,0.069 + L9.217,16.255z M11.472,11.253c0.009,0.042,0.016,0.112,0.016,0.214v0.537H9.339v-0.537c0-0.062-0.005-0.106-0.016-0.138 + l1.626-1.625c0.031,0.041,0.06,0.078,0.085,0.113c0.025,0.037,0.048,0.075,0.069,0.115l-1.535,1.534h0.138l1.442-1.442 + c0.021,0.053,0.039,0.095,0.055,0.132c0.016,0.035,0.032,0.078,0.053,0.13l-1.166,1.181h0.123l1.09-1.074 + c0.021,0.052,0.036,0.101,0.047,0.146c0.009,0.047,0.024,0.095,0.045,0.146l-0.797,0.782h0.138l0.675-0.674 + c0.021,0.081,0.041,0.193,0.062,0.337l-0.353,0.337h0.138L11.472,11.253z M9.508,15.228l1.749,1.733 + c-0.021,0.052-0.051,0.117-0.092,0.199l-1.826-1.826v-0.106H9.508L9.508,15.228z M9.339,15.579l1.749,1.734 + c-0.021,0.03-0.038,0.061-0.053,0.092c-0.016,0.03-0.033,0.062-0.055,0.092L9.339,15.84v-0.076V15.579z M10.029,15.228 + l1.351,1.351c-0.021,0.081-0.041,0.153-0.062,0.215l-1.565-1.565H10.029z M10.551,15.228l0.905,0.92 + c0,0.052-0.01,0.128-0.03,0.231l-1.15-1.151H10.551z M11.073,15.228l0.414,0.413v0.123v0.155l-0.69-0.691H11.073z M11.318,15.228 + h0.169v0.168L11.318,15.228z"/> + </g> + <g> + <path fill="#364D58" d="M14.646,13.554l-2.147-2.148c0-0.05,0-0.094,0-0.13c0-0.035,0.006-0.079,0.017-0.13l2.133,2.134v0.274 + H14.646z M14.646,14.076l-2.147-2.148v-0.276l2.147,2.148V14.076z M14.646,14.598l-2.147-2.148v-0.275l2.147,2.147V14.598z + M14.646,15.104l-2.147-2.147V12.68l2.147,2.148V15.104z M14.646,15.626l-2.147-2.148v-0.276l2.147,2.149V15.626z M17.886,16.838 + l1.674,1.673l-0.186,0.091l-1.504-1.503v0.245l1.35,1.351c-0.03,0.021-0.062,0.033-0.092,0.039 + c-0.03,0.004-0.065,0.018-0.106,0.039L17.87,17.62v0.246l0.982,0.968c-0.052,0.02-0.128,0.04-0.23,0.062l-0.752-0.753v0.229 + l0.552,0.568c-0.041,0.011-0.079,0.016-0.114,0.016c-0.036,0-0.075,0.005-0.115,0.016l-0.322-0.323v0.247l0.092,0.092H17.87 + h-2.147c-0.451,0-0.87-0.084-1.258-0.254c-0.391-0.169-0.73-0.399-1.021-0.691c-0.291-0.291-0.521-0.632-0.69-1.02 + c-0.17-0.39-0.254-0.808-0.254-1.259h0.2l-0.2-0.199v-0.275l0.478,0.475h0.244l-0.722-0.722v-0.275l0.999,0.997h0.244 + l-1.243-1.243v-0.275l1.52,1.519h0.247L12.499,14v-0.277l2.041,2.041h0.106c0,0.297,0.105,0.55,0.315,0.76 + c0.21,0.211,0.464,0.315,0.761,0.315h2.147L17.886,16.838L17.886,16.838z M14.646,13.032l-2.102-2.103l0.046-0.229l2.056,2.056 + V13.032z M14.646,12.511l-2.01-1.994c0.021-0.041,0.034-0.077,0.039-0.107c0.005-0.031,0.018-0.066,0.039-0.108l1.932,1.935 + V12.511z M14.646,11.989l-1.855-1.856l0.093-0.185l1.763,1.764V11.989z M14.646,11.483l-1.67-1.688 + c0.02-0.051,0.055-0.107,0.106-0.169l1.597,1.596c-0.021,0.103-0.031,0.185-0.031,0.245v0.016H14.646z M14.832,10.868 + c-0.021,0.021-0.038,0.047-0.054,0.078c-0.015,0.03-0.028,0.062-0.039,0.092l-1.564-1.55c0.021-0.02,0.044-0.046,0.069-0.077 + c0.024-0.03,0.049-0.056,0.068-0.076L14.832,10.868z M15.093,10.608c-0.042,0.02-0.092,0.062-0.153,0.123l-1.518-1.519 + l0.138-0.138L15.093,10.608z M15.445,10.438c-0.091,0.021-0.158,0.047-0.199,0.077l-1.549-1.55 + c0.02-0.021,0.047-0.04,0.077-0.062c0.03-0.021,0.056-0.041,0.077-0.062L15.445,10.438z M15.645,10.393l-1.641-1.641 + c0.03-0.031,0.086-0.066,0.169-0.108l1.564,1.564l0.123-0.123l-0.076-0.061l-0.062,0.061V9.948l-1.396-1.381 + c0.031-0.021,0.063-0.037,0.1-0.047s0.07-0.025,0.101-0.046l1.211,1.212l0.123-0.123l-0.076-0.062l-0.062,0.062V9.44 + l-1.029-1.027c0.042-0.021,0.08-0.034,0.115-0.039c0.036-0.005,0.07-0.013,0.102-0.023l0.827,0.829l0.123-0.123l-0.076-0.077 + l-0.062,0.077V8.918l-0.613-0.613c0.041-0.01,0.078-0.018,0.114-0.023c0.036-0.005,0.079-0.012,0.131-0.022l0.383,0.399 + l0.123-0.123l-0.076-0.077l-0.062,0.077V8.396l-0.154-0.153h0.154h0.291l-0.092,0.076l0.077,0.077l0.122-0.123l-0.03-0.03h0.445 + l-0.093,0.076l0.078,0.077l0.122-0.123l-0.03-0.03h0.431l-0.079,0.076l0.079,0.077l0.106-0.123l-0.016-0.03h0.43l-0.076,0.076 + l0.062,0.077l0.121-0.123l-0.016-0.03h0.215h0.216L17.87,8.458l-0.123,0.123l0.062,0.077l0.4-0.399 + c0.05,0.011,0.104,0.018,0.16,0.022c0.056,0.006,0.11,0.019,0.161,0.039l-0.66,0.659l-0.123,0.124l0.062,0.077l0.846-0.844 + c0.049,0.021,0.099,0.035,0.144,0.047c0.047,0.01,0.096,0.024,0.146,0.046l-1.075,1.074l-0.123,0.123l0.062,0.062l1.229-1.229 + c0.051,0.021,0.098,0.04,0.139,0.062c0.04,0.021,0.087,0.042,0.138,0.062l-1.442,1.442l-0.123,0.123l0.062,0.062l1.58-1.58 + c0.051,0.021,0.096,0.044,0.13,0.069c0.038,0.025,0.075,0.049,0.116,0.068l-1.626,1.642c-0.03-0.009-0.078-0.015-0.14-0.015 + h-0.244l0.046-0.047l-0.062-0.062l-0.107,0.106h-0.384l0.03-0.046l-0.062-0.062l-0.106,0.106h-0.385l0.047-0.046l-0.077-0.062 + l-0.107,0.107h-0.384l0.046-0.046l-0.077-0.062l-0.107,0.106h-0.215h-0.076V10.393z M15.922,8.844l0.077,0.077l0.122-0.123 + l-0.076-0.076L15.922,8.844z M15.922,9.364l0.077,0.062l0.122-0.123l-0.076-0.062L15.922,9.364z M15.922,9.888l0.077,0.062 + l0.122-0.123l-0.076-0.062L15.922,9.888z M16.182,8.582l0.078,0.077l0.122-0.123l-0.076-0.077L16.182,8.582z M16.182,9.104 + l0.078,0.077l0.122-0.123L16.306,8.98L16.182,9.104z M16.182,9.626l0.078,0.062l0.122-0.123l-0.076-0.062L16.182,9.626z + M16.182,10.147l0.078,0.062l0.122-0.123l-0.076-0.062L16.182,10.147z M16.443,8.844l0.078,0.077l0.121-0.123l-0.076-0.076 + L16.443,8.844z M16.443,9.364l0.078,0.062l0.121-0.123l-0.076-0.062L16.443,9.364z M16.443,9.888l0.078,0.062l0.121-0.123 + l-0.076-0.062L16.443,9.888z M16.703,8.582l0.078,0.077l0.123-0.123l-0.078-0.077L16.703,8.582z M16.703,9.104l0.078,0.077 + l0.123-0.123L16.826,8.98L16.703,9.104z M16.703,9.626l0.078,0.062l0.123-0.123l-0.078-0.062L16.703,9.626z M16.703,10.147 + l0.078,0.062l0.123-0.123l-0.078-0.062L16.703,10.147z M16.965,8.844l0.077,0.077l0.107-0.123l-0.062-0.076L16.965,8.844z + M16.965,9.364l0.077,0.062l0.107-0.123l-0.062-0.062L16.965,9.364z M16.965,9.888l0.077,0.062l0.107-0.123l-0.062-0.062 + L16.965,9.888z M17.227,8.582l0.061,0.077l0.123-0.123l-0.062-0.077L17.227,8.582z M17.227,9.104l0.061,0.077l0.123-0.123 + L17.349,8.98L17.227,9.104z M17.227,9.626l0.061,0.062l0.123-0.123l-0.062-0.062L17.227,9.626z M17.227,10.147l0.061,0.062 + l0.123-0.123l-0.062-0.062L17.227,10.147z M17.486,8.844l0.062,0.077l0.123-0.123l-0.062-0.076L17.486,8.844z M17.486,9.364 + l0.062,0.062l0.123-0.123l-0.062-0.062L17.486,9.364z M17.486,9.888l0.062,0.062l0.123-0.123l-0.062-0.062L17.486,9.888z + M18.101,16.808c0.081-0.021,0.153-0.041,0.215-0.062l1.55,1.55c-0.031,0.02-0.059,0.041-0.085,0.062 + c-0.025,0.02-0.054,0.041-0.084,0.062L18.101,16.808z M18.392,10.531c-0.061-0.04-0.152-0.076-0.275-0.106l1.596-1.598 + c0.071,0.052,0.143,0.108,0.215,0.17L18.392,10.531z M18.469,16.653c0.062-0.04,0.113-0.081,0.153-0.122l1.52,1.519 + c-0.062,0.062-0.113,0.108-0.153,0.139L18.469,16.653z M18.685,10.762c-0.03-0.03-0.062-0.062-0.093-0.092 + c-0.031-0.031-0.067-0.062-0.108-0.093l1.519-1.519c0.042,0.03,0.078,0.062,0.109,0.092c0.03,0.031,0.062,0.062,0.092,0.092 + L18.685,10.762z M18.729,16.409c0.031-0.041,0.066-0.104,0.108-0.185l1.549,1.549c-0.021,0.031-0.041,0.059-0.061,0.084 + c-0.022,0.026-0.041,0.05-0.062,0.07L18.729,16.409z M18.868,11.099c-0.031-0.082-0.072-0.169-0.123-0.261l1.519-1.519 + c0.062,0.071,0.117,0.143,0.17,0.215L18.868,11.099z M18.898,16.056c0.031-0.071,0.046-0.153,0.046-0.246l1.656,1.657 + c-0.019,0.031-0.038,0.062-0.053,0.092c-0.016,0.03-0.034,0.058-0.053,0.078L18.898,16.056z M21.093,15.764h-0.122l0.122,0.123 + c0,0.051-0.002,0.095-0.008,0.131c-0.006,0.035-0.013,0.079-0.022,0.13l-0.369-0.384h-0.246l0.584,0.584l-0.046,0.23 + l-0.812-0.814h-0.246l1.013,0.999c-0.02,0.04-0.036,0.076-0.046,0.106c-0.011,0.031-0.021,0.066-0.031,0.108l-1.212-1.214h-0.245 + l1.382,1.382c-0.042,0.082-0.072,0.139-0.094,0.169l-1.565-1.549h-0.183v-4.299c0-0.05-0.003-0.097-0.008-0.138 + c-0.006-0.041-0.015-0.087-0.023-0.138l1.581-1.581c0.03,0.042,0.059,0.08,0.084,0.115c0.025,0.036,0.047,0.074,0.068,0.115 + l-1.626,1.626h0.137l1.535-1.549c0.021,0.051,0.042,0.095,0.062,0.13c0.021,0.036,0.042,0.08,0.062,0.13l-1.274,1.289h0.14 + l1.18-1.197c0.021,0.052,0.039,0.101,0.055,0.146c0.015,0.047,0.032,0.094,0.054,0.146l-0.921,0.904h0.138l0.798-0.797 + c0.021,0.05,0.035,0.104,0.046,0.161c0.01,0.056,0.02,0.11,0.031,0.16l-0.492,0.476h0.139l0.369-0.353 + c0.011,0.052,0.016,0.107,0.016,0.169s0,0.123,0,0.185L21.093,15.764L21.093,15.764z"/> + </g> + </g> + <g> + <g> + <path fill="#E6354E" d="M7.455,5.042C7.538,5.318,7.387,5.606,7.11,5.69C6.835,5.772,6.546,5.618,6.462,5.344 + C6.379,5.068,6.534,4.78,6.809,4.695C7.084,4.613,7.373,4.768,7.455,5.042"/> + </g> + <g> + <path fill="#E6354E" d="M6.959,6.458c-0.562,0-1.047-0.361-1.211-0.898C5.546,4.895,5.924,4.188,6.589,3.982 + c0.692-0.208,1.383,0.187,1.58,0.843c0.202,0.669-0.176,1.376-0.841,1.579C7.205,6.441,7.083,6.458,6.959,6.458z M6.959,4.966 + c-0.021,0-0.043,0.003-0.063,0.009c-0.12,0.037-0.19,0.166-0.155,0.282C6.77,5.354,6.857,5.419,6.958,5.419 + c0.188-0.048,0.254-0.173,0.218-0.293C7.147,5.032,7.059,4.966,6.959,4.966z"/> + </g> + </g> + <g> + <path fill="#E6354E" d="M16.775,5.423H7.212c-0.147,0-0.268-0.12-0.268-0.267s0.12-0.267,0.268-0.267h9.563 + c0.146,0,0.267,0.12,0.267,0.267S16.922,5.423,16.775,5.423z"/> + </g> + <g> + <g> + <path fill="#364D58" d="M17.392,5.042c0.083,0.276-0.068,0.564-0.345,0.648c-0.273,0.082-0.564-0.072-0.646-0.346 + c-0.084-0.275,0.071-0.563,0.346-0.648C17.021,4.613,17.31,4.768,17.392,5.042"/> + <path fill="#364D58" d="M16.897,6.087c-0.397,0-0.741-0.255-0.856-0.635c-0.143-0.47,0.123-0.97,0.594-1.115 + c0.483-0.144,0.976,0.132,1.116,0.596c0.143,0.473-0.125,0.973-0.595,1.117C17.071,6.075,16.985,6.087,16.897,6.087z + M16.896,5.049c-0.117,0.03-0.161,0.108-0.138,0.186c0.027,0.09,0.114,0.118,0.181,0.097c0.076-0.023,0.118-0.103,0.095-0.181 + C17.013,5.08,16.95,5.049,16.896,5.049z"/> + </g> + <g> + <circle fill="#364D58" cx="16.896" cy="5.193" r="0.519"/> + <path fill="#364D58" d="M16.897,6.458c-0.562,0-1.048-0.361-1.212-0.898c-0.201-0.665,0.175-1.372,0.841-1.578 + c0.692-0.208,1.381,0.187,1.58,0.841c0.201,0.671-0.177,1.378-0.843,1.58C17.144,6.441,17.021,6.458,16.897,6.458z M16.897,4.966 + c-0.022,0-0.044,0.003-0.064,0.009c-0.12,0.037-0.19,0.165-0.155,0.281c0.03,0.099,0.117,0.163,0.218,0.163 + c0.188-0.048,0.254-0.174,0.219-0.293C17.085,5.032,16.996,4.966,16.897,4.966z"/> + </g> + </g> +</g> +</svg> diff --git a/assets/images/Communecter-32x32.svg b/assets/images/Communecter-32x32.svg new file mode 100644 index 0000000000000000000000000000000000000000..f3b0f23f63bd1d96683460fd01a4b8f82cc0c2d8 --- /dev/null +++ b/assets/images/Communecter-32x32.svg @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="32px" height="32px" viewBox="0 0 32 32" enable-background="new 0 0 32 32" xml:space="preserve"> +<g> + <g> + <rect fill="#FFFFFF" width="32" height="32"/> + </g> + <g> + <g> + <path fill="#E6344D" d="M6.723,21.02c0,0.122,0.007,0.211,0.021,0.266l-2.148,2.148l-0.184-0.307l2.107-2.107H6.334L4.35,23.004 + c-0.068-0.123-0.123-0.238-0.164-0.348l1.637-1.637H5.638l-1.514,1.514c-0.028-0.068-0.048-0.133-0.062-0.195 + c-0.014-0.061-0.034-0.125-0.062-0.193l1.125-1.125H4.943l-0.982,0.981l-0.062-0.43l0.532-0.552H4.247l-0.368,0.389 + c-0.014-0.068-0.021-0.134-0.021-0.195c0-0.061,0-0.125,0-0.193V15.29c0-0.586,0.112-1.142,0.337-1.667 + c0.225-0.525,0.532-0.982,0.921-1.371s0.842-0.696,1.36-0.921s1.078-0.337,1.678-0.337v0.082l0.082-0.082h0.511l-0.593,0.593 + v0.184l0.757-0.777h0.511l-1.269,1.289v0.164l1.453-1.453h0.512l-1.964,1.964v0.185l2.148-2.148h0.512l-2.66,2.66v0.184 + l2.844-2.844h0.021c0.082,0,0.16,0,0.235,0c0.075,0,0.154,0.007,0.235,0.021l-2.844,2.844H8.155c-0.396,0-0.733,0.14-1.013,0.419 + c-0.28,0.28-0.419,0.617-0.419,1.013V21.02z M6.784,21.449c0.027,0.068,0.054,0.125,0.082,0.174 + c0.027,0.047,0.054,0.105,0.082,0.174l-2.046,2.025c-0.041-0.041-0.079-0.086-0.112-0.133c-0.035-0.049-0.072-0.1-0.113-0.154 + L6.784,21.449z M7.03,21.898c0.027,0.041,0.061,0.086,0.102,0.133c0.041,0.049,0.089,0.086,0.144,0.113L5.25,24.189l-0.266-0.266 + L7.03,21.898z M7.377,22.227c0.068,0.027,0.126,0.055,0.174,0.081c0.048,0.028,0.105,0.055,0.174,0.082l-2.107,2.107 + c-0.041-0.041-0.085-0.078-0.133-0.112s-0.092-0.072-0.133-0.113L7.377,22.227z M11.02,22.451c0.068,0,0.17-0.014,0.307-0.041 + l2.148,2.148c-0.109,0.055-0.184,0.102-0.225,0.143l-2.23-2.229v0.081l-0.123,0.123l0.103,0.103l0.021-0.041v0.062l2.025,2.005 + l-0.246,0.123l-1.78-1.76v0.082l-0.123,0.122l0.103,0.082l0.021-0.02v0.061l1.534,1.535c-0.041,0.027-0.082,0.044-0.123,0.051 + c-0.041,0.008-0.089,0.023-0.144,0.051l-1.268-1.268v0.082l-0.123,0.122l0.103,0.082l0.021-0.021v0.041l1.023,1.023l-0.307,0.061 + l-0.716-0.716v0.103l-0.123,0.123l0.103,0.081l0.021-0.021v0.041l0.429,0.43c-0.068,0.014-0.129,0.021-0.184,0.021 + s-0.109,0-0.164,0l-0.082-0.082v0.082h-0.614l-0.041-0.021l-0.021,0.021H9.71l-0.021-0.021l-0.041,0.021H9.014l-0.021-0.021 + l-0.041,0.021H8.319l-0.021-0.021l-0.041,0.021H8.155c-0.068,0-0.133,0-0.194,0c-0.061,0-0.126-0.007-0.194-0.021l0.389-0.368 + v-0.144l0.062,0.062l0.164-0.163L8.298,24.6l-0.696,0.675c-0.068-0.013-0.14-0.023-0.215-0.03 + c-0.075-0.007-0.146-0.023-0.215-0.051l0.982-0.963v-0.143l0.062,0.062l0.164-0.164l-0.082-0.081L7.03,25.172 + c-0.068-0.027-0.133-0.047-0.194-0.061c-0.062-0.014-0.126-0.034-0.194-0.062l1.514-1.514v-0.143l0.062,0.061L8.38,23.29 + l-0.082-0.082l-1.78,1.78c-0.109-0.041-0.225-0.096-0.348-0.164l1.984-1.984v-0.143l0.062,0.081l0.164-0.163l-0.082-0.104 + l-2.251,2.252c-0.054-0.027-0.105-0.059-0.153-0.093S5.795,24.6,5.741,24.559l2.128-2.128c0.068,0.014,0.164,0.021,0.286,0.021 + H11.02z M8.482,23.023l0.082,0.082l0.164-0.143L8.646,22.86L8.482,23.023z M8.728,23.638l-0.082-0.082L8.482,23.72l0.082,0.081 + L8.728,23.638z M8.728,24.334l-0.082-0.082l-0.164,0.163l0.082,0.082L8.728,24.334z M8.728,25.029l-0.082-0.082l-0.164,0.164 + l0.082,0.082L8.728,25.029z M8.83,13.858l2.823-2.823c0.068,0.014,0.136,0.027,0.205,0.041c0.068,0.014,0.136,0.027,0.205,0.041 + l-2.721,2.742H8.83z M8.83,22.676l0.082,0.103l0.164-0.163l-0.082-0.104L8.83,22.676z M9.076,23.29l-0.082-0.082L8.83,23.371 + l0.082,0.082L9.076,23.29z M9.076,23.985l-0.082-0.081L8.83,24.067l0.082,0.082L9.076,23.985z M9.076,24.682L8.994,24.6 + L8.83,24.764l0.082,0.081L9.076,24.682z M9.423,22.963L9.342,22.86l-0.164,0.163l0.082,0.082L9.423,22.963z M9.423,23.638 + l-0.082-0.082L9.178,23.72l0.082,0.081L9.423,23.638z M9.423,24.334l-0.082-0.082l-0.164,0.163l0.082,0.082L9.423,24.334z + M9.423,25.029l-0.082-0.082l-0.164,0.164l0.082,0.082L9.423,25.029z M9.526,13.858l2.68-2.701 + c0.164,0.041,0.293,0.089,0.389,0.143l-2.558,2.558H9.526z M9.771,22.615l-0.082-0.104l-0.164,0.164l0.082,0.103L9.771,22.615z + M9.771,23.29l-0.082-0.082l-0.164,0.163l0.082,0.082L9.771,23.29z M9.771,23.985l-0.082-0.081l-0.164,0.163l0.082,0.082 + L9.771,23.985z M9.771,24.682L9.689,24.6l-0.164,0.164l0.082,0.081L9.771,24.682z M10.119,22.963l-0.103-0.103l-0.143,0.163 + l0.082,0.082L10.119,22.963z M10.119,23.638l-0.103-0.082L9.874,23.72l0.082,0.081L10.119,23.638z M10.119,24.334l-0.103-0.082 + l-0.143,0.163l0.082,0.082L10.119,24.334z M10.119,25.029l-0.103-0.082l-0.143,0.164l0.082,0.082L10.119,25.029z M10.467,22.615 + l-0.102-0.104l-0.164,0.164l0.103,0.103L10.467,22.615z M10.467,23.29l-0.102-0.082l-0.164,0.163l0.103,0.082L10.467,23.29z + M10.467,23.985l-0.102-0.081l-0.164,0.163l0.103,0.082L10.467,23.985z M10.467,24.682L10.365,24.6l-0.164,0.164l0.103,0.081 + L10.467,24.682z M10.221,13.858l2.496-2.517c0.068,0.028,0.13,0.055,0.184,0.082c0.055,0.027,0.109,0.055,0.164,0.082 + l-2.353,2.353H10.221z M10.815,22.963l-0.103-0.103l-0.164,0.163l0.102,0.082L10.815,22.963z M10.815,23.638l-0.103-0.082 + l-0.164,0.164l0.102,0.081L10.815,23.638z M10.815,24.334l-0.103-0.082l-0.164,0.163l0.102,0.082L10.815,24.334z M10.815,25.029 + l-0.103-0.082l-0.164,0.164l0.102,0.082L10.815,25.029z M10.896,13.858l2.292-2.271c0.054,0.027,0.105,0.058,0.153,0.092 + s0.099,0.071,0.154,0.112l-2.128,2.107c-0.137-0.027-0.252-0.041-0.348-0.041H10.896z M11.838,14.124 + c-0.055-0.041-0.106-0.075-0.154-0.103c-0.048-0.027-0.105-0.054-0.174-0.082l2.087-2.087c0.054,0.041,0.103,0.082,0.143,0.123 + c0.041,0.041,0.089,0.082,0.144,0.123L11.838,14.124z M11.572,22.328c0.082-0.014,0.164-0.055,0.246-0.123l2.046,2.047 + c-0.055,0.027-0.123,0.082-0.205,0.163L11.572,22.328z M12.186,14.472c-0.055-0.095-0.137-0.184-0.246-0.266l2.025-2.025 + c0.055,0.041,0.103,0.082,0.144,0.123c0.041,0.041,0.082,0.082,0.123,0.123L12.186,14.472z M12.001,22.062 + c0.082-0.082,0.136-0.144,0.164-0.184l2.046,2.025l-0.184,0.184L12.001,22.062z M12.411,14.942 + c-0.027-0.068-0.051-0.129-0.072-0.184c-0.021-0.054-0.044-0.116-0.071-0.184l2.046-2.046c0.041,0.054,0.078,0.102,0.112,0.143 + s0.072,0.089,0.113,0.143L12.411,14.942z M12.288,21.674c0.041-0.096,0.075-0.185,0.103-0.266l2.128,2.107 + c-0.028,0.04-0.055,0.078-0.082,0.111c-0.027,0.035-0.055,0.065-0.082,0.093L12.288,21.674z M15.295,15.004 + c0.013,0.055,0.021,0.15,0.021,0.286v0.716h-2.864V15.29c0-0.082-0.007-0.143-0.021-0.184l2.168-2.168 + c0.041,0.055,0.079,0.105,0.113,0.153c0.034,0.048,0.064,0.099,0.092,0.153l-2.046,2.046h0.184l1.923-1.923 + c0.027,0.069,0.051,0.126,0.072,0.174s0.044,0.105,0.071,0.174l-1.555,1.575h0.164l1.453-1.432 + c0.027,0.068,0.048,0.133,0.062,0.194c0.013,0.062,0.034,0.126,0.061,0.194l-1.063,1.043h0.184l0.9-0.9 + c0.027,0.109,0.055,0.259,0.082,0.45l-0.471,0.45h0.184L15.295,15.004z M12.677,20.303l2.332,2.312 + c-0.027,0.068-0.068,0.156-0.123,0.266l-2.435-2.436v-0.143H12.677z M12.452,20.773l2.332,2.312 + c-0.027,0.041-0.051,0.081-0.071,0.122s-0.044,0.082-0.072,0.123l-2.189-2.21V21.02V20.773z M13.372,20.303l1.801,1.801 + c-0.028,0.109-0.055,0.204-0.082,0.286l-2.087-2.087H13.372z M14.068,20.303l1.207,1.228c0,0.068-0.014,0.171-0.041,0.308 + L13.7,20.303H14.068z M14.764,20.303l0.552,0.553v0.164v0.204l-0.921-0.921H14.764z M15.091,20.303h0.225v0.225L15.091,20.303z" + /> + </g> + <g> + <path fill="#354C57" d="M19.53,18.072l-2.864-2.864c0-0.068,0-0.126,0-0.174c0-0.047,0.007-0.105,0.021-0.174l2.844,2.845V18.072 + z M19.53,18.769l-2.864-2.865v-0.368L19.53,18.4V18.769z M19.53,19.464L16.666,16.6v-0.368l2.864,2.864V19.464z M19.53,20.139 + l-2.864-2.863v-0.369l2.864,2.865V20.139z M19.53,20.835l-2.864-2.864v-0.369l2.864,2.865V20.835z M23.848,22.451l2.23,2.23 + l-0.246,0.122l-2.005-2.005v0.328l1.8,1.8c-0.041,0.027-0.082,0.044-0.123,0.052c-0.04,0.006-0.088,0.023-0.143,0.051 + l-1.534-1.535v0.328l1.31,1.289c-0.068,0.027-0.171,0.055-0.307,0.082l-1.003-1.004v0.308l0.736,0.757 + c-0.055,0.014-0.106,0.021-0.153,0.021c-0.048,0-0.1,0.007-0.154,0.021l-0.429-0.43v0.328l0.122,0.122h-0.122h-2.864 + c-0.601,0-1.16-0.112-1.678-0.337c-0.52-0.226-0.973-0.533-1.361-0.922s-0.695-0.842-0.92-1.359 + c-0.226-0.52-0.338-1.078-0.338-1.678h0.266l-0.266-0.267v-0.368l0.635,0.635h0.326l-0.961-0.963v-0.367l1.33,1.33h0.327 + l-1.657-1.658v-0.368l2.025,2.026h0.328l-2.354-2.354v-0.368l2.721,2.722h0.144c0,0.395,0.14,0.732,0.419,1.012 + c0.279,0.28,0.617,0.42,1.014,0.42h2.864H23.848z M19.53,17.377l-2.803-2.803l0.061-0.307l2.742,2.742V17.377z M19.53,16.682 + l-2.68-2.66c0.027-0.054,0.044-0.102,0.051-0.143c0.007-0.041,0.023-0.088,0.051-0.143l2.578,2.578V16.682z M19.53,15.986 + l-2.476-2.476l0.123-0.246l2.353,2.353V15.986z M19.53,15.311l-2.229-2.25c0.027-0.068,0.074-0.143,0.143-0.225l2.128,2.128 + c-0.027,0.136-0.041,0.246-0.041,0.327V15.311z M19.775,14.492c-0.027,0.027-0.051,0.062-0.071,0.103 + c-0.021,0.041-0.038,0.082-0.051,0.123l-2.087-2.066c0.027-0.027,0.058-0.062,0.092-0.103c0.034-0.041,0.064-0.075,0.092-0.102 + L19.775,14.492z M20.123,14.145c-0.055,0.027-0.122,0.082-0.204,0.164l-2.025-2.025l0.185-0.184L20.123,14.145z M20.594,13.919 + c-0.122,0.027-0.211,0.062-0.266,0.102l-2.066-2.066c0.027-0.027,0.062-0.054,0.103-0.082s0.075-0.055,0.103-0.082L20.594,13.919 + z M20.86,13.858l-2.189-2.189c0.041-0.041,0.116-0.089,0.226-0.144l2.086,2.087l0.164-0.164l-0.102-0.082l-0.082,0.082v-0.184 + l-1.862-1.841c0.041-0.027,0.085-0.048,0.134-0.062c0.047-0.013,0.092-0.034,0.133-0.062l1.615,1.617l0.164-0.164l-0.102-0.082 + l-0.082,0.082v-0.164l-1.371-1.371c0.055-0.027,0.105-0.044,0.153-0.051s0.093-0.017,0.134-0.031l1.104,1.105l0.164-0.164 + l-0.102-0.103l-0.082,0.103v-0.184l-0.818-0.818c0.055-0.014,0.105-0.024,0.153-0.031s0.105-0.017,0.174-0.031l0.511,0.532 + l0.164-0.164l-0.102-0.102l-0.082,0.102v-0.184l-0.205-0.205h0.205h0.389l-0.123,0.102l0.103,0.103l0.163-0.164l-0.041-0.041 + h0.594l-0.123,0.102l0.103,0.103l0.163-0.164l-0.04-0.041h0.573l-0.104,0.102l0.104,0.103l0.143-0.164l-0.021-0.041h0.573 + l-0.103,0.102l0.082,0.103l0.163-0.164l-0.02-0.041h0.286h0.286l-0.286,0.287l-0.164,0.164l0.082,0.102l0.532-0.532 + c0.068,0.014,0.139,0.024,0.215,0.031c0.074,0.007,0.146,0.024,0.215,0.051l-0.88,0.88l-0.164,0.164l0.082,0.103l1.126-1.125 + c0.067,0.028,0.133,0.048,0.193,0.062c0.062,0.014,0.127,0.034,0.195,0.062l-1.433,1.432l-0.164,0.164l0.082,0.082l1.637-1.637 + c0.068,0.027,0.13,0.054,0.185,0.082c0.054,0.027,0.115,0.055,0.184,0.082l-1.923,1.923l-0.164,0.164l0.082,0.082l2.107-2.107 + c0.067,0.028,0.126,0.059,0.174,0.092c0.048,0.034,0.099,0.065,0.153,0.092l-2.168,2.189c-0.041-0.013-0.104-0.021-0.185-0.021 + H23.5l0.061-0.062l-0.082-0.082l-0.143,0.143h-0.512l0.041-0.062l-0.082-0.082l-0.143,0.143h-0.512l0.061-0.062l-0.102-0.082 + l-0.143,0.143h-0.512l0.061-0.062l-0.102-0.082l-0.144,0.143h-0.286H20.86z M21.229,11.792l0.103,0.103l0.163-0.164l-0.102-0.102 + L21.229,11.792z M21.229,12.487l0.103,0.082l0.163-0.164l-0.102-0.082L21.229,12.487z M21.229,13.183l0.103,0.082l0.163-0.164 + l-0.102-0.082L21.229,13.183z M21.576,11.444l0.103,0.102l0.163-0.164L21.74,11.28L21.576,11.444z M21.576,12.139l0.103,0.103 + l0.163-0.164l-0.102-0.103L21.576,12.139z M21.576,12.835l0.103,0.082l0.163-0.164l-0.102-0.082L21.576,12.835z M21.576,13.531 + l0.103,0.082l0.163-0.164l-0.102-0.082L21.576,13.531z M21.924,11.792l0.103,0.103l0.163-0.164l-0.102-0.102L21.924,11.792z + M21.924,12.487l0.103,0.082l0.163-0.164l-0.102-0.082L21.924,12.487z M21.924,13.183l0.103,0.082l0.163-0.164l-0.102-0.082 + L21.924,13.183z M22.271,11.444l0.104,0.102l0.163-0.164l-0.103-0.102L22.271,11.444z M22.271,12.139l0.104,0.103l0.163-0.164 + l-0.103-0.103L22.271,12.139z M22.271,12.835l0.104,0.082l0.163-0.164l-0.103-0.082L22.271,12.835z M22.271,13.531l0.104,0.082 + l0.163-0.164l-0.103-0.082L22.271,13.531z M22.619,11.792l0.104,0.103l0.143-0.164l-0.082-0.102L22.619,11.792z M22.619,12.487 + l0.104,0.082l0.143-0.164l-0.082-0.082L22.619,12.487z M22.619,13.183l0.104,0.082l0.143-0.164l-0.082-0.082L22.619,13.183z + M22.968,11.444l0.081,0.102l0.164-0.164l-0.082-0.102L22.968,11.444z M22.968,12.139l0.081,0.103l0.164-0.164l-0.082-0.103 + L22.968,12.139z M22.968,12.835l0.081,0.082l0.164-0.164l-0.082-0.082L22.968,12.835z M22.968,13.531l0.081,0.082l0.164-0.164 + l-0.082-0.082L22.968,13.531z M23.315,11.792l0.082,0.103l0.163-0.164l-0.082-0.102L23.315,11.792z M23.315,12.487l0.082,0.082 + l0.163-0.164l-0.082-0.082L23.315,12.487z M23.315,13.183l0.082,0.082l0.163-0.164l-0.082-0.082L23.315,13.183z M24.134,22.41 + c0.108-0.027,0.204-0.055,0.286-0.082l2.066,2.066c-0.041,0.027-0.078,0.055-0.112,0.082s-0.071,0.055-0.112,0.082L24.134,22.41z + M24.522,14.042c-0.081-0.054-0.204-0.102-0.368-0.143l2.128-2.128c0.095,0.068,0.19,0.143,0.286,0.225L24.522,14.042z + M24.625,22.205c0.082-0.054,0.15-0.108,0.205-0.163l2.025,2.025c-0.082,0.082-0.15,0.144-0.205,0.185L24.625,22.205z + M24.911,14.349c-0.04-0.041-0.081-0.082-0.122-0.123c-0.041-0.041-0.09-0.082-0.144-0.123l2.025-2.025 + c0.054,0.041,0.103,0.082,0.144,0.123s0.082,0.082,0.123,0.123L24.911,14.349z M24.973,21.879 + c0.041-0.055,0.088-0.137,0.143-0.246l2.066,2.066c-0.027,0.041-0.055,0.078-0.081,0.112c-0.028,0.034-0.055,0.065-0.082,0.093 + L24.973,21.879z M25.156,14.799c-0.041-0.109-0.096-0.225-0.163-0.348l2.025-2.025c0.082,0.096,0.157,0.191,0.226,0.287 + L25.156,14.799z M25.197,21.408c0.041-0.096,0.062-0.205,0.062-0.328l2.209,2.21c-0.027,0.041-0.051,0.081-0.072,0.122 + c-0.02,0.041-0.044,0.076-0.07,0.104L25.197,21.408z M28.123,21.02H27.96l0.163,0.163c0,0.068-0.003,0.126-0.01,0.174 + s-0.018,0.106-0.031,0.174l-0.49-0.511h-0.328l0.777,0.777l-0.061,0.307l-1.084-1.084h-0.328l1.351,1.329 + c-0.027,0.055-0.048,0.103-0.062,0.144s-0.027,0.089-0.041,0.143L26.2,21.02h-0.327l1.842,1.841 + c-0.055,0.109-0.096,0.185-0.123,0.226l-2.088-2.066H25.26V15.29c0-0.068-0.004-0.129-0.011-0.184 + c-0.007-0.054-0.018-0.116-0.03-0.184l2.107-2.107c0.041,0.055,0.078,0.106,0.111,0.153c0.035,0.048,0.064,0.099,0.093,0.154 + l-2.169,2.168h0.184l2.047-2.066c0.027,0.068,0.055,0.126,0.082,0.174c0.027,0.048,0.054,0.106,0.082,0.174l-1.699,1.718h0.185 + l1.575-1.596c0.027,0.068,0.051,0.133,0.072,0.194c0.02,0.062,0.043,0.126,0.071,0.194l-1.228,1.207h0.184l1.064-1.064 + c0.027,0.068,0.047,0.14,0.061,0.215c0.014,0.075,0.027,0.147,0.041,0.215l-0.654,0.634h0.184l0.492-0.47 + c0.013,0.068,0.02,0.143,0.02,0.225c0,0.082,0,0.164,0,0.246V21.02z"/> + </g> + </g> + <g> + <g> + <path fill="#E6344D" d="M9.94,6.723c0.111,0.368-0.092,0.752-0.46,0.864c-0.367,0.11-0.752-0.096-0.864-0.462 + C8.505,6.759,8.712,6.374,9.078,6.261C9.445,6.151,9.83,6.358,9.94,6.723"/> + </g> + <g> + <path fill="#E6344D" d="M9.279,8.612c-0.749,0-1.397-0.481-1.615-1.198c-0.269-0.887,0.234-1.83,1.121-2.104 + c0.923-0.277,1.843,0.25,2.107,1.125C11.161,7.326,10.657,8.27,9.77,8.54C9.607,8.588,9.444,8.612,9.279,8.612z M9.279,6.622 + c-0.029,0-0.058,0.004-0.085,0.012C9.034,6.683,8.94,6.855,8.987,7.01c0.039,0.13,0.156,0.216,0.291,0.216 + c0.25-0.063,0.338-0.231,0.29-0.39C9.53,6.71,9.411,6.622,9.279,6.622z"/> + </g> + </g> + <g> + <path fill="#E6344D" d="M22.366,7.231H9.616c-0.197,0-0.356-0.16-0.356-0.356s0.16-0.356,0.356-0.356h12.75 + c0.197,0,0.356,0.16,0.356,0.356S22.563,7.231,22.366,7.231z"/> + </g> + <g> + <g> + <path fill="#354C57" d="M23.19,6.723c0.11,0.368-0.093,0.752-0.461,0.864c-0.366,0.11-0.752-0.096-0.863-0.462 + c-0.111-0.366,0.096-0.751,0.462-0.864C22.695,6.151,23.079,6.358,23.19,6.723"/> + <path fill="#354C57" d="M22.529,8.117c-0.529,0-0.987-0.34-1.142-0.847c-0.19-0.626,0.165-1.293,0.793-1.487 + c0.644-0.192,1.3,0.176,1.488,0.794c0.189,0.631-0.167,1.298-0.794,1.489C22.761,8.1,22.646,8.117,22.529,8.117z M22.528,6.732 + c-0.157,0.04-0.215,0.145-0.184,0.248c0.036,0.12,0.152,0.157,0.241,0.129c0.101-0.031,0.157-0.137,0.126-0.242 + C22.684,6.774,22.599,6.732,22.528,6.732z"/> + </g> + <g> + <circle fill="#354C57" cx="22.528" cy="6.924" r="0.692"/> + <path fill="#354C57" d="M22.529,8.612c-0.749,0-1.397-0.481-1.615-1.198c-0.27-0.886,0.233-1.83,1.121-2.104 + c0.923-0.277,1.841,0.25,2.107,1.122c0.268,0.894-0.236,1.837-1.124,2.107C22.857,8.588,22.693,8.612,22.529,8.612z + M22.529,6.622c-0.029,0-0.059,0.004-0.086,0.012c-0.159,0.049-0.253,0.22-0.206,0.375c0.04,0.132,0.156,0.217,0.291,0.217 + c0.25-0.063,0.338-0.232,0.29-0.391C22.78,6.71,22.661,6.622,22.529,6.622z"/> + </g> + </g> +</g> +</svg> diff --git a/assets/images/DRAPEAU_COMMUNECTER.png b/assets/images/DRAPEAU_COMMUNECTER.png new file mode 100644 index 0000000000000000000000000000000000000000..1eaea324a6daf6a2f42af7dea5f203c5b4dbd30a Binary files /dev/null and b/assets/images/DRAPEAU_COMMUNECTER.png differ diff --git a/assets/images/Delaunay_Pattern_Min.jpg b/assets/images/Delaunay_Pattern_Min.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3045dbfa6174e4e6ebcdcbacccb4e7326b66da15 Binary files /dev/null and b/assets/images/Delaunay_Pattern_Min.jpg differ diff --git a/assets/images/Discussion.jpg b/assets/images/Discussion.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e125ba0a3b70a4ea4fd8395c01de330f7dc3a5c0 Binary files /dev/null and b/assets/images/Discussion.jpg differ diff --git a/assets/images/LOGO_COMMUNECTER_ALONE.jpg b/assets/images/LOGO_COMMUNECTER_ALONE.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a8c4519b2c9ab45aa3cb0508595d5914442de953 Binary files /dev/null and b/assets/images/LOGO_COMMUNECTER_ALONE.jpg differ diff --git a/assets/images/LOGO_COMMUNECTER_SMALL.jpg b/assets/images/LOGO_COMMUNECTER_SMALL.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bb4a062b2305ac4124135363e4bea4a53d2d9323 Binary files /dev/null and b/assets/images/LOGO_COMMUNECTER_SMALL.jpg differ diff --git a/assets/images/Logo_Licence_Ouverte_noir_avec_texte.gif b/assets/images/Logo_Licence_Ouverte_noir_avec_texte.gif new file mode 100644 index 0000000000000000000000000000000000000000..9d369ca5a4106590e51235e2bbb10abd49bcba67 Binary files /dev/null and b/assets/images/Logo_Licence_Ouverte_noir_avec_texte.gif differ diff --git a/assets/images/NA.png b/assets/images/NA.png new file mode 100644 index 0000000000000000000000000000000000000000..b8b9bf550ac726efdf2c86aabe7acdb466df417a Binary files /dev/null and b/assets/images/NA.png differ diff --git a/assets/images/about.jpg b/assets/images/about.jpg new file mode 100644 index 0000000000000000000000000000000000000000..97985178ed1db1f1d8b8d6cb312932d3e3ed056d Binary files /dev/null and b/assets/images/about.jpg differ diff --git a/assets/images/affiches/0111AFF1.png b/assets/images/affiches/0111AFF1.png new file mode 100644 index 0000000000000000000000000000000000000000..7b7eb3dc2fb80fda804dd09d25b23d91c5c48159 Binary files /dev/null and b/assets/images/affiches/0111AFF1.png differ diff --git a/assets/images/affiches/0111AFF2.png b/assets/images/affiches/0111AFF2.png new file mode 100644 index 0000000000000000000000000000000000000000..b73a4279d97694df71f1a71d7d67ed986ee4f379 Binary files /dev/null and b/assets/images/affiches/0111AFF2.png differ diff --git a/assets/images/affiches/0111AFF3.png b/assets/images/affiches/0111AFF3.png new file mode 100644 index 0000000000000000000000000000000000000000..4a9e0d06255f8dc07d5f4d27f77c5709c2abeb49 Binary files /dev/null and b/assets/images/affiches/0111AFF3.png differ diff --git a/assets/images/affiches/1AFF_BDB.jpg b/assets/images/affiches/1AFF_BDB.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8145101b71872fd40d2ab545ab0ebcc7b388218b Binary files /dev/null and b/assets/images/affiches/1AFF_BDB.jpg differ diff --git a/assets/images/affiches/2AFF_OPENSOURCE.jpg b/assets/images/affiches/2AFF_OPENSOURCE.jpg new file mode 100755 index 0000000000000000000000000000000000000000..4f4a4a2018e251b3816bd7e8bc8eaf5a26ad2616 Binary files /dev/null and b/assets/images/affiches/2AFF_OPENSOURCE.jpg differ diff --git a/assets/images/affiches/3AFF_RECRUTEMENT.jpg b/assets/images/affiches/3AFF_RECRUTEMENT.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2aedfada6e3f8810674b21290f21ca1e0188b20c Binary files /dev/null and b/assets/images/affiches/3AFF_RECRUTEMENT.jpg differ diff --git a/assets/images/affiches/AFF-AtelierCitoyen.jpg b/assets/images/affiches/AFF-AtelierCitoyen.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f40768273e833de2ff63b09e4e1b55fd43a324ec Binary files /dev/null and b/assets/images/affiches/AFF-AtelierCitoyen.jpg differ diff --git a/assets/images/affiches/AFF-communecter-candidat.jpg b/assets/images/affiches/AFF-communecter-candidat.jpg new file mode 100755 index 0000000000000000000000000000000000000000..8cb18dd130e63719c237ca858f42b41f5d7bb3d1 Binary files /dev/null and b/assets/images/affiches/AFF-communecter-candidat.jpg differ diff --git a/assets/images/affiches/AFF-infographicPH.jpg b/assets/images/affiches/AFF-infographicPH.jpg new file mode 100755 index 0000000000000000000000000000000000000000..b99d376e034a075cdb342725fcb932b218125a1e Binary files /dev/null and b/assets/images/affiches/AFF-infographicPH.jpg differ diff --git a/assets/images/affiches/AFF-infographicPH_New1.jpg b/assets/images/affiches/AFF-infographicPH_New1.jpg new file mode 100755 index 0000000000000000000000000000000000000000..6a15447a1d1bcf38d087e3a808ee4af41daf488f Binary files /dev/null and b/assets/images/affiches/AFF-infographicPH_New1.jpg differ diff --git a/assets/images/affiches/AFF_EVENEMENTS.jpg b/assets/images/affiches/AFF_EVENEMENTS.jpg new file mode 100755 index 0000000000000000000000000000000000000000..ab68a46251658a5118d6cd0a500c191f3493da23 Binary files /dev/null and b/assets/images/affiches/AFF_EVENEMENTS.jpg differ diff --git a/assets/images/affiches/AFF_EVENEMENTS_19082013_BD.jpg b/assets/images/affiches/AFF_EVENEMENTS_19082013_BD.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c3f5f0ba28b2b4c4576a0bd8b22b680d400ee907 Binary files /dev/null and b/assets/images/affiches/AFF_EVENEMENTS_19082013_BD.jpg differ diff --git a/assets/images/affiches/AFF_EVENEMENTS_CDC_28092014.jpg b/assets/images/affiches/AFF_EVENEMENTS_CDC_28092014.jpg new file mode 100755 index 0000000000000000000000000000000000000000..0cfde29dc0a17f69009ede947844d6a7b6b2bd02 Binary files /dev/null and b/assets/images/affiches/AFF_EVENEMENTS_CDC_28092014.jpg differ diff --git a/assets/images/affiches/AFF_TYPO.jpg b/assets/images/affiches/AFF_TYPO.jpg new file mode 100755 index 0000000000000000000000000000000000000000..787a4b9506bd3652650cc7255897a8e1fedeb8af Binary files /dev/null and b/assets/images/affiches/AFF_TYPO.jpg differ diff --git a/assets/images/affiches/AFF_TYPO11.jpg b/assets/images/affiches/AFF_TYPO11.jpg new file mode 100755 index 0000000000000000000000000000000000000000..e6fba52f39db42349f6ec24e4ece1f41c76aad3e Binary files /dev/null and b/assets/images/affiches/AFF_TYPO11.jpg differ diff --git a/assets/images/affiches/AFF_TYPO12.jpg b/assets/images/affiches/AFF_TYPO12.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5a5cfaa227711aafb8bbb73ca85a34c09bc58bdb Binary files /dev/null and b/assets/images/affiches/AFF_TYPO12.jpg differ diff --git a/assets/images/affiches/AFF_TYPO2.jpg b/assets/images/affiches/AFF_TYPO2.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1cc89da62dac1d61361dfd494e1cf5c42cf1e635 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO2.jpg differ diff --git a/assets/images/affiches/AFF_TYPO3.jpg b/assets/images/affiches/AFF_TYPO3.jpg new file mode 100755 index 0000000000000000000000000000000000000000..88a65b8a7b55d88ea61d14092b6904314e0f6c94 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO3.jpg differ diff --git a/assets/images/affiches/AFF_TYPO4.jpg b/assets/images/affiches/AFF_TYPO4.jpg new file mode 100755 index 0000000000000000000000000000000000000000..64293f8e6242a5bb14d0d67b57d883eae3c7678b Binary files /dev/null and b/assets/images/affiches/AFF_TYPO4.jpg differ diff --git a/assets/images/affiches/AFF_TYPO5.jpg b/assets/images/affiches/AFF_TYPO5.jpg new file mode 100755 index 0000000000000000000000000000000000000000..ff2b547777d729207cfbf18876b6637575071590 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO5.jpg differ diff --git a/assets/images/affiches/AFF_TYPO6.jpg b/assets/images/affiches/AFF_TYPO6.jpg new file mode 100755 index 0000000000000000000000000000000000000000..7447ca6c59a0b5fa930511d63cdfc4fbc0e882c3 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO6.jpg differ diff --git a/assets/images/affiches/AFF_TYPO7.jpg b/assets/images/affiches/AFF_TYPO7.jpg new file mode 100755 index 0000000000000000000000000000000000000000..d73e5fa91b24f7e28ba943c07b9d1fc4f60475b7 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO7.jpg differ diff --git a/assets/images/affiches/AFF_TYPO8.jpg b/assets/images/affiches/AFF_TYPO8.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1dd489135444315a04693c40a4747f1fd0ddda4b Binary files /dev/null and b/assets/images/affiches/AFF_TYPO8.jpg differ diff --git a/assets/images/affiches/AFF_TYPO9.jpg b/assets/images/affiches/AFF_TYPO9.jpg new file mode 100755 index 0000000000000000000000000000000000000000..35d2049ef27a7da38d6d2b662db37224ef785116 Binary files /dev/null and b/assets/images/affiches/AFF_TYPO9.jpg differ diff --git a/assets/images/affiches/DSI chicken.jpg b/assets/images/affiches/DSI chicken.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1553d90f04c13c8ae63e66610511a2ed3fc2fb29 Binary files /dev/null and b/assets/images/affiches/DSI chicken.jpg differ diff --git a/assets/images/affiches/IcebergFlip.png b/assets/images/affiches/IcebergFlip.png new file mode 100755 index 0000000000000000000000000000000000000000..425411986821706da3530be3c65451b344527ff2 Binary files /dev/null and b/assets/images/affiches/IcebergFlip.png differ diff --git a/assets/images/affiches/PH.jpg b/assets/images/affiches/PH.jpg new file mode 100755 index 0000000000000000000000000000000000000000..71de01c0f26189a1dd8eeb772a85fd538c16503e Binary files /dev/null and b/assets/images/affiches/PH.jpg differ diff --git a/assets/images/affiches/al1+1.jpg b/assets/images/affiches/al1+1.jpg new file mode 100755 index 0000000000000000000000000000000000000000..db3b9637f74992647ddfa325313db200d94acc94 Binary files /dev/null and b/assets/images/affiches/al1+1.jpg differ diff --git "a/assets/images/affiches/communecte\314\201.jpg" "b/assets/images/affiches/communecte\314\201.jpg" new file mode 100755 index 0000000000000000000000000000000000000000..d1695d70063b9b0586303a4a100e9167ade688bb Binary files /dev/null and "b/assets/images/affiches/communecte\314\201.jpg" differ diff --git "a/assets/images/affiches/communect\303\251.jpg" "b/assets/images/affiches/communect\303\251.jpg" new file mode 100755 index 0000000000000000000000000000000000000000..d1695d70063b9b0586303a4a100e9167ade688bb Binary files /dev/null and "b/assets/images/affiches/communect\303\251.jpg" differ diff --git a/assets/images/affiches/etreHumain.jpg b/assets/images/affiches/etreHumain.jpg new file mode 100755 index 0000000000000000000000000000000000000000..43fe15c707e1227457d170a035b5de2ef90e6147 Binary files /dev/null and b/assets/images/affiches/etreHumain.jpg differ diff --git a/assets/images/affiches/human-evolution.png b/assets/images/affiches/human-evolution.png new file mode 100755 index 0000000000000000000000000000000000000000..a8e7430dfc19d14e3c1c80750c374fee3dbd0724 Binary files /dev/null and b/assets/images/affiches/human-evolution.png differ diff --git a/assets/images/affiches/meiose.jpg b/assets/images/affiches/meiose.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5847eb46d61ecfa326b13353a7c15557e2c7dafe Binary files /dev/null and b/assets/images/affiches/meiose.jpg differ diff --git a/assets/images/affiches/monkeysSon.jpg b/assets/images/affiches/monkeysSon.jpg new file mode 100755 index 0000000000000000000000000000000000000000..1199eac6aff887b01a9ce0a259800031058ad1e4 Binary files /dev/null and b/assets/images/affiches/monkeysSon.jpg differ diff --git a/assets/images/affiches/or.jpg b/assets/images/affiches/or.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f658175154a04c615d8832eb046b9180928ac452 Binary files /dev/null and b/assets/images/affiches/or.jpg differ diff --git a/assets/images/affiches/pancarte_S.jpg b/assets/images/affiches/pancarte_S.jpg new file mode 100755 index 0000000000000000000000000000000000000000..c9da168d27152a9cab155c81355d671bdaf1142e Binary files /dev/null and b/assets/images/affiches/pancarte_S.jpg differ diff --git a/assets/images/affiches/power2People.jpg b/assets/images/affiches/power2People.jpg new file mode 100755 index 0000000000000000000000000000000000000000..2fd038d9500e6f1c029b3c1bcc94a70bfd68ec62 Binary files /dev/null and b/assets/images/affiches/power2People.jpg differ diff --git a/assets/images/affiches/societeFossil.jpg b/assets/images/affiches/societeFossil.jpg new file mode 100755 index 0000000000000000000000000000000000000000..9ef05908f3d2b55b932de9478c8de894170cb7b2 Binary files /dev/null and b/assets/images/affiches/societeFossil.jpg differ diff --git a/assets/images/affiches/trash/AFF_TYPO10.jpg b/assets/images/affiches/trash/AFF_TYPO10.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5a4ebadf13310642e52cd1988a3886efa4e63cba Binary files /dev/null and b/assets/images/affiches/trash/AFF_TYPO10.jpg differ diff --git a/assets/images/affiches/trash/HackerMindeset.jpg b/assets/images/affiches/trash/HackerMindeset.jpg new file mode 100755 index 0000000000000000000000000000000000000000..5b2d427bf7dc5a83ea89a514270e3ef03bc6d47c Binary files /dev/null and b/assets/images/affiches/trash/HackerMindeset.jpg differ diff --git a/assets/images/affiches/trash/PH_represent.jpg b/assets/images/affiches/trash/PH_represent.jpg new file mode 100755 index 0000000000000000000000000000000000000000..f3275ab3e9a8766547941ca3312b70275fee66b7 Binary files /dev/null and b/assets/images/affiches/trash/PH_represent.jpg differ diff --git a/assets/images/affiches/trash/anonymous.jpg b/assets/images/affiches/trash/anonymous.jpg new file mode 100755 index 0000000000000000000000000000000000000000..9f353e26e637f10b4dd9cde978e7a956e97be861 Binary files /dev/null and b/assets/images/affiches/trash/anonymous.jpg differ diff --git a/assets/images/affiches/trash/antsCarryElephant.jpg b/assets/images/affiches/trash/antsCarryElephant.jpg new file mode 100755 index 0000000000000000000000000000000000000000..621c87bfbeaa9fc6995c63a5133bf5b935d63e34 Binary files /dev/null and b/assets/images/affiches/trash/antsCarryElephant.jpg differ diff --git a/assets/images/affiches/trash/laLigne.jpg b/assets/images/affiches/trash/laLigne.jpg new file mode 100755 index 0000000000000000000000000000000000000000..908b00a8b9d0028c9b020dd2c470f98bd05620cb Binary files /dev/null and b/assets/images/affiches/trash/laLigne.jpg differ diff --git a/assets/images/affiches/trash/meiose2.jpg b/assets/images/affiches/trash/meiose2.jpg new file mode 100755 index 0000000000000000000000000000000000000000..95481747e78b58703c0b96317b713abfc20edca7 Binary files /dev/null and b/assets/images/affiches/trash/meiose2.jpg differ diff --git a/assets/images/affiches/trash/mophito.jpg b/assets/images/affiches/trash/mophito.jpg new file mode 100755 index 0000000000000000000000000000000000000000..095f991241466c717c62e4a562122d4dc215ca3b Binary files /dev/null and b/assets/images/affiches/trash/mophito.jpg differ diff --git a/assets/images/affiches/trash/testicule.jpg b/assets/images/affiches/trash/testicule.jpg new file mode 100755 index 0000000000000000000000000000000000000000..3a3938733635d68bb4ff2164f353006a826278c0 Binary files /dev/null and b/assets/images/affiches/trash/testicule.jpg differ diff --git a/assets/images/affiches/uhu.jpg b/assets/images/affiches/uhu.jpg new file mode 100755 index 0000000000000000000000000000000000000000..ea7ef5bc4b0c2901a0874368a91a7cca99d809fe Binary files /dev/null and b/assets/images/affiches/uhu.jpg differ diff --git a/assets/images/announce-kkbb1.png b/assets/images/announce-kkbb1.png new file mode 100644 index 0000000000000000000000000000000000000000..4dfa719c8ce962e136157d5f180839802fec268d Binary files /dev/null and b/assets/images/announce-kkbb1.png differ diff --git a/assets/images/announce-kkbb2.png b/assets/images/announce-kkbb2.png new file mode 100644 index 0000000000000000000000000000000000000000..3e0d29dd57c5e10c17193050f7fce2844f32b064 Binary files /dev/null and b/assets/images/announce-kkbb2.png differ diff --git a/assets/images/bandeauKiss.jpg b/assets/images/bandeauKiss.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6a940263c6483358f47162c4c38e1a23c513d83a Binary files /dev/null and b/assets/images/bandeauKiss.jpg differ diff --git a/assets/images/bandeauKiss2.jpg b/assets/images/bandeauKiss2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7bc346477eb466dbc1e42438770eab0dd86da61c Binary files /dev/null and b/assets/images/bandeauKiss2.jpg differ diff --git a/assets/images/beach.jpg b/assets/images/beach.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ed800ab92352ba26424377156c59a0cd0c4ee9cb Binary files /dev/null and b/assets/images/beach.jpg differ diff --git a/assets/images/bg - copie.jpg b/assets/images/bg - copie.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8b07e9ee8381d6c2304cff6125bbf5bef40aa9d5 Binary files /dev/null and b/assets/images/bg - copie.jpg differ diff --git a/assets/images/bg.jpg b/assets/images/bg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fa4a8313b17b647f3a8eb8649bb8cfc4a0b998ca Binary files /dev/null and b/assets/images/bg.jpg differ diff --git a/assets/images/bg.png b/assets/images/bg.png new file mode 100644 index 0000000000000000000000000000000000000000..a5a2225afeba1f71a07dc03c0d273f6695a31fdf Binary files /dev/null and b/assets/images/bg.png differ diff --git a/assets/images/bg/back_pattern.png b/assets/images/bg/back_pattern.png new file mode 100644 index 0000000000000000000000000000000000000000..e4812208d69c0bc493b9049aed9d6a40626b8428 Binary files /dev/null and b/assets/images/bg/back_pattern.png differ diff --git a/assets/images/bg/dda-connexion-lines.jpg b/assets/images/bg/dda-connexion-lines.jpg new file mode 100644 index 0000000000000000000000000000000000000000..99cd696c173f89802a2ef32558d124d8eaf132a7 Binary files /dev/null and b/assets/images/bg/dda-connexion-lines.jpg differ diff --git a/assets/images/bg/footer_menu_left.png b/assets/images/bg/footer_menu_left.png new file mode 100644 index 0000000000000000000000000000000000000000..9e27a26593ffaf8b422a20dd1e5f450cc1f0a649 Binary files /dev/null and b/assets/images/bg/footer_menu_left.png differ diff --git a/assets/images/bg/noise_lines.png b/assets/images/bg/noise_lines.png new file mode 100644 index 0000000000000000000000000000000000000000..0661926104cd629882f70f8739050beea9e32ecd Binary files /dev/null and b/assets/images/bg/noise_lines.png differ diff --git a/assets/images/bg/subtle_dots.png b/assets/images/bg/subtle_dots.png new file mode 100644 index 0000000000000000000000000000000000000000..1f6b0a22e97b3f54a4cfe09ca2b6986ede3fc5c9 Binary files /dev/null and b/assets/images/bg/subtle_dots.png differ diff --git a/assets/images/bg/tango-circle-bg-blue.png b/assets/images/bg/tango-circle-bg-blue.png new file mode 100644 index 0000000000000000000000000000000000000000..62dba9d79d9396eebe9997c1a4fa445323544d4f Binary files /dev/null and b/assets/images/bg/tango-circle-bg-blue.png differ diff --git a/assets/images/bg/tango-circle-bg-green.png b/assets/images/bg/tango-circle-bg-green.png new file mode 100644 index 0000000000000000000000000000000000000000..a09b24cd0fa202fb2d6a29091ca7a4643a89dff8 Binary files /dev/null and b/assets/images/bg/tango-circle-bg-green.png differ diff --git a/assets/images/bg/tango-circle-bg-orange.png b/assets/images/bg/tango-circle-bg-orange.png new file mode 100644 index 0000000000000000000000000000000000000000..948b5721d4a328d0e6b64015e032f4bcfea2baee Binary files /dev/null and b/assets/images/bg/tango-circle-bg-orange.png differ diff --git a/assets/images/bg/tango-circle-bg-purple.png b/assets/images/bg/tango-circle-bg-purple.png new file mode 100644 index 0000000000000000000000000000000000000000..1eb76a787eeb0ed61766ecebfef7019e651d84c8 Binary files /dev/null and b/assets/images/bg/tango-circle-bg-purple.png differ diff --git a/assets/images/bg/tango-circle-bg-yellow.png b/assets/images/bg/tango-circle-bg-yellow.png new file mode 100644 index 0000000000000000000000000000000000000000..27724846c395b84c97fcb2f4fc873cc7ca34b2ef Binary files /dev/null and b/assets/images/bg/tango-circle-bg-yellow.png differ diff --git a/assets/images/bg/wavegrid.png b/assets/images/bg/wavegrid.png new file mode 100644 index 0000000000000000000000000000000000000000..8b3304f109a6f6e82893df08e4882c11d49fba1b Binary files /dev/null and b/assets/images/bg/wavegrid.png differ diff --git a/assets/images/bgnoise_lg.png b/assets/images/bgnoise_lg.png new file mode 100644 index 0000000000000000000000000000000000000000..caacc6feadce5ffcd6b75ff95335effc1412943c Binary files /dev/null and b/assets/images/bgnoise_lg.png differ diff --git a/assets/images/blog-github.png b/assets/images/blog-github.png new file mode 100644 index 0000000000000000000000000000000000000000..a30aa43daa0f56bf3d5c49c6f5ce3d98575cb19e Binary files /dev/null and b/assets/images/blog-github.png differ diff --git a/assets/images/bookmarks.jpg b/assets/images/bookmarks.jpg new file mode 100644 index 0000000000000000000000000000000000000000..42142f7c733b8662cf32c577cedc97a94f0bfc72 Binary files /dev/null and b/assets/images/bookmarks.jpg differ diff --git a/assets/images/byPH.png b/assets/images/byPH.png new file mode 100644 index 0000000000000000000000000000000000000000..a9036be74ad13126fb35a67b913cde3ca02a9dcc Binary files /dev/null and b/assets/images/byPH.png differ diff --git a/assets/images/cats/giphy.gif b/assets/images/cats/giphy.gif new file mode 100644 index 0000000000000000000000000000000000000000..fc18906b5726a4b92260fb6e7bbbe4ccd16fd420 Binary files /dev/null and b/assets/images/cats/giphy.gif differ diff --git a/assets/images/cats/skydiving-cat.gif b/assets/images/cats/skydiving-cat.gif new file mode 100644 index 0000000000000000000000000000000000000000..0bd16680fbbc4adf9de3055a6b5cc4fc710cd7f4 Binary files /dev/null and b/assets/images/cats/skydiving-cat.gif differ diff --git a/assets/images/city/assemblyHead.jpg b/assets/images/city/assemblyHead.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ee6adc7539989810d00d3d96e135a625d47a8a93 Binary files /dev/null and b/assets/images/city/assemblyHead.jpg differ diff --git a/assets/images/city/assemblyHead.png b/assets/images/city/assemblyHead.png new file mode 100644 index 0000000000000000000000000000000000000000..7787bef1f6b9545109d72fa25c44415c4aebce30 Binary files /dev/null and b/assets/images/city/assemblyHead.png differ diff --git a/assets/images/city/assemblyParisDay.jpg b/assets/images/city/assemblyParisDay.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5875c82237e7c3b5de7d3819c8bee3cc488d034f Binary files /dev/null and b/assets/images/city/assemblyParisDay.jpg differ diff --git a/assets/images/city/assemblyParisDayArchived.jpg b/assets/images/city/assemblyParisDayArchived.jpg new file mode 100644 index 0000000000000000000000000000000000000000..40271ec030b0314debe9fe764c7727560b2cc318 Binary files /dev/null and b/assets/images/city/assemblyParisDayArchived.jpg differ diff --git a/assets/images/city/cityDefaultHead.jpg b/assets/images/city/cityDefaultHead.jpg new file mode 100644 index 0000000000000000000000000000000000000000..47fd4278aaee604a6dbbd2a04dffea855059706f Binary files /dev/null and b/assets/images/city/cityDefaultHead.jpg differ diff --git a/assets/images/city/cityDefaultHead_BW.jpg b/assets/images/city/cityDefaultHead_BW.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c705702c82b44b5ab44456a2c3a0dfb178ed787d Binary files /dev/null and b/assets/images/city/cityDefaultHead_BW.jpg differ diff --git a/assets/images/city/city_default_l.png b/assets/images/city/city_default_l.png new file mode 100644 index 0000000000000000000000000000000000000000..9937ae1f2977fff75fbf48720f37af8b8de05834 Binary files /dev/null and b/assets/images/city/city_default_l.png differ diff --git a/assets/images/city/dda-connexion-lines.jpg b/assets/images/city/dda-connexion-lines.jpg new file mode 100644 index 0000000000000000000000000000000000000000..99cd696c173f89802a2ef32558d124d8eaf132a7 Binary files /dev/null and b/assets/images/city/dda-connexion-lines.jpg differ diff --git a/assets/images/contact-map.jpg b/assets/images/contact-map.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6227e2b99d9466ea0960a4e7a233ec5c303f0f92 Binary files /dev/null and b/assets/images/contact-map.jpg differ diff --git a/assets/images/contact.PNG b/assets/images/contact.PNG new file mode 100644 index 0000000000000000000000000000000000000000..548175535dc4f05ab6accc5d8cd36c939d48b925 Binary files /dev/null and b/assets/images/contact.PNG differ diff --git a/assets/images/crowdfoundez.png b/assets/images/crowdfoundez.png new file mode 100644 index 0000000000000000000000000000000000000000..90e9e94cae3f0580a73fa718043c824e3d460396 Binary files /dev/null and b/assets/images/crowdfoundez.png differ diff --git a/assets/images/crowdfunding.jpg b/assets/images/crowdfunding.jpg new file mode 100644 index 0000000000000000000000000000000000000000..74f36a820477ed3f4476f7984088bb54c35d48c9 Binary files /dev/null and b/assets/images/crowdfunding.jpg differ diff --git a/assets/images/curve.png b/assets/images/curve.png new file mode 100644 index 0000000000000000000000000000000000000000..46ada67ea90fd1c7ae30bfcf2c18e9013d794f6a Binary files /dev/null and b/assets/images/curve.png differ diff --git a/assets/images/de/1+1=3empty.jpg b/assets/images/de/1+1=3empty.jpg new file mode 100644 index 0000000000000000000000000000000000000000..18388498a59705a7b3daba7d703b81434f2ad3e5 Binary files /dev/null and b/assets/images/de/1+1=3empty.jpg differ diff --git a/assets/images/default_shared.jpg b/assets/images/default_shared.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b0fd669194bbc5d05d17627bb49deef438ddb3b0 Binary files /dev/null and b/assets/images/default_shared.jpg differ diff --git a/assets/images/docs/MVC.png b/assets/images/docs/MVC.png new file mode 100644 index 0000000000000000000000000000000000000000..1125500beab10d802ac289f642a7e7e7095fed05 Binary files /dev/null and b/assets/images/docs/MVC.png differ diff --git a/assets/images/docs/agenda.png b/assets/images/docs/agenda.png new file mode 100644 index 0000000000000000000000000000000000000000..1ce4d6b21defe57052b147eddfd3ff77b1f65c01 Binary files /dev/null and b/assets/images/docs/agenda.png differ diff --git a/assets/images/docs/agenda2.png b/assets/images/docs/agenda2.png new file mode 100644 index 0000000000000000000000000000000000000000..09e9a501aa161d015e78c0e17440a4a5ea05e92b Binary files /dev/null and b/assets/images/docs/agenda2.png differ diff --git a/assets/images/docs/agendaGlobal.png b/assets/images/docs/agendaGlobal.png new file mode 100644 index 0000000000000000000000000000000000000000..da563b9fbb9ad8e6f1a6f2b2752d1b71e6345cf8 Binary files /dev/null and b/assets/images/docs/agendaGlobal.png differ diff --git a/assets/images/docs/annuaire.png b/assets/images/docs/annuaire.png new file mode 100644 index 0000000000000000000000000000000000000000..56da3f78c892efb5739e02f9694495f9809d224a Binary files /dev/null and b/assets/images/docs/annuaire.png differ diff --git a/assets/images/docs/archi.png b/assets/images/docs/archi.png new file mode 100644 index 0000000000000000000000000000000000000000..69348fac52520fb16f8f3dc335cf624a07e14e9d Binary files /dev/null and b/assets/images/docs/archi.png differ diff --git a/assets/images/docs/communication/index.png b/assets/images/docs/communication/index.png new file mode 100644 index 0000000000000000000000000000000000000000..83d3aeece51a251dab7ae27b136eab721bed93a4 Binary files /dev/null and b/assets/images/docs/communication/index.png differ diff --git a/assets/images/docs/comprendre/dda.png b/assets/images/docs/comprendre/dda.png new file mode 100644 index 0000000000000000000000000000000000000000..7c847df266f7c8aca25656c0aa9adb95e6a09415 Binary files /dev/null and b/assets/images/docs/comprendre/dda.png differ diff --git a/assets/images/docs/comprendre/dda2.png b/assets/images/docs/comprendre/dda2.png new file mode 100644 index 0000000000000000000000000000000000000000..334d7610635b59d9462028c40f02a41a9b4a7166 Binary files /dev/null and b/assets/images/docs/comprendre/dda2.png differ diff --git a/assets/images/docs/comprendre/smarterre.png b/assets/images/docs/comprendre/smarterre.png new file mode 100644 index 0000000000000000000000000000000000000000..48aa70d12e6f834ffb8f0f69c08d0273dc919475 Binary files /dev/null and b/assets/images/docs/comprendre/smarterre.png differ diff --git a/assets/images/docs/elements/events.png b/assets/images/docs/elements/events.png new file mode 100644 index 0000000000000000000000000000000000000000..01e03e7e37d830b262736dc34fb1f9c3bd310daf Binary files /dev/null and b/assets/images/docs/elements/events.png differ diff --git a/assets/images/docs/elements/index.png b/assets/images/docs/elements/index.png new file mode 100644 index 0000000000000000000000000000000000000000..83d3aeece51a251dab7ae27b136eab721bed93a4 Binary files /dev/null and b/assets/images/docs/elements/index.png differ diff --git a/assets/images/docs/elements/orga.png b/assets/images/docs/elements/orga.png new file mode 100644 index 0000000000000000000000000000000000000000..6901e909cb6421c7fe656ac5896e92ab7ba16f23 Binary files /dev/null and b/assets/images/docs/elements/orga.png differ diff --git a/assets/images/docs/elements/person.png b/assets/images/docs/elements/person.png new file mode 100644 index 0000000000000000000000000000000000000000..d21a4844faff05bd5389bc0dd79ce29b4fe83bf0 Binary files /dev/null and b/assets/images/docs/elements/person.png differ diff --git a/assets/images/docs/elements/project.png b/assets/images/docs/elements/project.png new file mode 100644 index 0000000000000000000000000000000000000000..30ca956cd6bbc70c7c48c6609114998730a50201 Binary files /dev/null and b/assets/images/docs/elements/project.png differ diff --git a/assets/images/docs/financement.png b/assets/images/docs/financement.png new file mode 100644 index 0000000000000000000000000000000000000000..37e091d662f16eefe47a1da5d30bfccb3fb0ed34 Binary files /dev/null and b/assets/images/docs/financement.png differ diff --git a/assets/images/docs/histoire.png b/assets/images/docs/histoire.png new file mode 100644 index 0000000000000000000000000000000000000000..eb1a76feb042caba9d2210b4f1e6b639ef0f2e83 Binary files /dev/null and b/assets/images/docs/histoire.png differ diff --git a/assets/images/docs/histoire/index.png b/assets/images/docs/histoire/index.png new file mode 100644 index 0000000000000000000000000000000000000000..83d3aeece51a251dab7ae27b136eab721bed93a4 Binary files /dev/null and b/assets/images/docs/histoire/index.png differ diff --git a/assets/images/docs/histoire/une_histoire_naturelle.png b/assets/images/docs/histoire/une_histoire_naturelle.png new file mode 100644 index 0000000000000000000000000000000000000000..2c84578b5093543a4272cf1e051bc3541ed9e697 Binary files /dev/null and b/assets/images/docs/histoire/une_histoire_naturelle.png differ diff --git a/assets/images/docs/import.png b/assets/images/docs/import.png new file mode 100644 index 0000000000000000000000000000000000000000..c59f7c2be76aab1d37559a00832c8cdb6d922fad Binary files /dev/null and b/assets/images/docs/import.png differ diff --git a/assets/images/docs/interface.png b/assets/images/docs/interface.png new file mode 100644 index 0000000000000000000000000000000000000000..d9e6c4cb20e7709326ba088aa3fddba9fdb41bf4 Binary files /dev/null and b/assets/images/docs/interface.png differ diff --git a/assets/images/docs/modules/index.png b/assets/images/docs/modules/index.png new file mode 100644 index 0000000000000000000000000000000000000000..7083201d3c787c8734acef5b119775338d7e3322 Binary files /dev/null and b/assets/images/docs/modules/index.png differ diff --git a/assets/images/docs/mvt.png b/assets/images/docs/mvt.png new file mode 100644 index 0000000000000000000000000000000000000000..cc99f994501fc32c15985c7ab8b4eed2fc5275fe Binary files /dev/null and b/assets/images/docs/mvt.png differ diff --git a/assets/images/docs/name.png b/assets/images/docs/name.png new file mode 100644 index 0000000000000000000000000000000000000000..48b237b9cdf38a0bd8af73770a81a07b6fe766a6 Binary files /dev/null and b/assets/images/docs/name.png differ diff --git a/assets/images/docs/news.png b/assets/images/docs/news.png new file mode 100644 index 0000000000000000000000000000000000000000..e774f3633487c9b74edfc6a3e4018b616fb6189f Binary files /dev/null and b/assets/images/docs/news.png differ diff --git a/assets/images/docs/ocdb.png b/assets/images/docs/ocdb.png new file mode 100644 index 0000000000000000000000000000000000000000..a57955f00eace9b77c5ca8b53675a6e7cf44dde1 Binary files /dev/null and b/assets/images/docs/ocdb.png differ diff --git a/assets/images/docs/openSystem.png b/assets/images/docs/openSystem.png new file mode 100644 index 0000000000000000000000000000000000000000..df8022a615439a7fa31d9cdfdc2e743ca2f20876 Binary files /dev/null and b/assets/images/docs/openSystem.png differ diff --git a/assets/images/docs/pourquoi/index.png b/assets/images/docs/pourquoi/index.png new file mode 100644 index 0000000000000000000000000000000000000000..83d3aeece51a251dab7ae27b136eab721bed93a4 Binary files /dev/null and b/assets/images/docs/pourquoi/index.png differ diff --git a/assets/images/docs/presentation/index.png b/assets/images/docs/presentation/index.png new file mode 100644 index 0000000000000000000000000000000000000000..83d3aeece51a251dab7ae27b136eab721bed93a4 Binary files /dev/null and b/assets/images/docs/presentation/index.png differ diff --git a/assets/images/docs/project.png b/assets/images/docs/project.png new file mode 100644 index 0000000000000000000000000000000000000000..478cef49e3af572dffc56a9e4f6f35fa8324b1e9 Binary files /dev/null and b/assets/images/docs/project.png differ diff --git a/assets/images/docs/schemas/schema-global-12.png b/assets/images/docs/schemas/schema-global-12.png new file mode 100644 index 0000000000000000000000000000000000000000..0c39aea67d3983f3aecac7396cf5744e3db71f4f Binary files /dev/null and b/assets/images/docs/schemas/schema-global-12.png differ diff --git a/assets/images/docs/schemas/schema-global-22.png b/assets/images/docs/schemas/schema-global-22.png new file mode 100644 index 0000000000000000000000000000000000000000..a084c9be4953b8b6adca8e94df507cf486992e4a Binary files /dev/null and b/assets/images/docs/schemas/schema-global-22.png differ diff --git a/assets/images/docs/schemas/schema-global-32.png b/assets/images/docs/schemas/schema-global-32.png new file mode 100644 index 0000000000000000000000000000000000000000..0f34575843a1fbe2c62ede4d6d9fd2d62692946e Binary files /dev/null and b/assets/images/docs/schemas/schema-global-32.png differ diff --git a/assets/images/docs/schemas/schema-global-42.png b/assets/images/docs/schemas/schema-global-42.png new file mode 100644 index 0000000000000000000000000000000000000000..4c298408e9242155aec835cddaf28cc2b1763b5d Binary files /dev/null and b/assets/images/docs/schemas/schema-global-42.png differ diff --git a/assets/images/docs/schemas/schema-global-52.png b/assets/images/docs/schemas/schema-global-52.png new file mode 100644 index 0000000000000000000000000000000000000000..65621fe3bd10043212db578247e84ce860f66b04 Binary files /dev/null and b/assets/images/docs/schemas/schema-global-52.png differ diff --git a/assets/images/docs/schemas/schema-global-62.png b/assets/images/docs/schemas/schema-global-62.png new file mode 100644 index 0000000000000000000000000000000000000000..d9466de1d964f585929bbb0b3f0d7a42f26f4d37 Binary files /dev/null and b/assets/images/docs/schemas/schema-global-62.png differ diff --git a/assets/images/docs/schemas/schema-global-72.png b/assets/images/docs/schemas/schema-global-72.png new file mode 100644 index 0000000000000000000000000000000000000000..0a20f1b5ea2b072e6cc3669f84e3036685c66102 Binary files /dev/null and b/assets/images/docs/schemas/schema-global-72.png differ diff --git a/assets/images/docs/sig.png b/assets/images/docs/sig.png new file mode 100644 index 0000000000000000000000000000000000000000..cebe91351588b6cdf8c7f8ca528036cfad42b012 Binary files /dev/null and b/assets/images/docs/sig.png differ diff --git a/assets/images/en/1+1=3empty.jpg b/assets/images/en/1+1=3empty.jpg new file mode 100644 index 0000000000000000000000000000000000000000..456d40cf5b354bf383b3bb1dca87ebda88eb2aff Binary files /dev/null and b/assets/images/en/1+1=3empty.jpg differ diff --git a/assets/images/fabric_plaid.png b/assets/images/fabric_plaid.png new file mode 100644 index 0000000000000000000000000000000000000000..505151e5a3cdb658beea82da8ec1642adb05312c Binary files /dev/null and b/assets/images/fabric_plaid.png differ diff --git a/assets/images/favicon.ico b/assets/images/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..515d2a5a57aac066a8c8c1f6d6bec2b785c13cdb Binary files /dev/null and b/assets/images/favicon.ico differ diff --git a/assets/images/files.jpg b/assets/images/files.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e15d0c74381b34144acaa6c9fc7617a738e8425c Binary files /dev/null and b/assets/images/files.jpg differ diff --git a/assets/images/fr/1+1=3empty.jpg b/assets/images/fr/1+1=3empty.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e9ca26c4ca1e0eaab41e313732b356972fbefb43 Binary files /dev/null and b/assets/images/fr/1+1=3empty.jpg differ diff --git a/assets/images/greendrops.jpg b/assets/images/greendrops.jpg new file mode 100644 index 0000000000000000000000000000000000000000..01cbc28432addb1cfb3f4c9b717bfdc5fd7ff73a Binary files /dev/null and b/assets/images/greendrops.jpg differ diff --git a/assets/images/headmug.png b/assets/images/headmug.png new file mode 100644 index 0000000000000000000000000000000000000000..647f4c07fc19d89c0e062959ace0d4645d028ff3 Binary files /dev/null and b/assets/images/headmug.png differ diff --git a/assets/images/headmug.xcf b/assets/images/headmug.xcf new file mode 100644 index 0000000000000000000000000000000000000000..d25400ad15c2c0d228eb0556218cc02abac284d8 Binary files /dev/null and b/assets/images/headmug.xcf differ diff --git a/assets/images/headmug_old.png b/assets/images/headmug_old.png new file mode 100644 index 0000000000000000000000000000000000000000..1e47e1ac0c5f47a21316fd22ef0c8b8cfddf6eb4 Binary files /dev/null and b/assets/images/headmug_old.png differ diff --git a/assets/images/helloasso-logo.png b/assets/images/helloasso-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..3a995ef6b3d26a5323b0ffe1baf9c6814de8285c Binary files /dev/null and b/assets/images/helloasso-logo.png differ diff --git a/assets/images/home/valeurs/valeur01.png b/assets/images/home/valeurs/valeur01.png new file mode 100644 index 0000000000000000000000000000000000000000..69e5bb573ee09aa6d4197743c0ff8218dc4df746 Binary files /dev/null and b/assets/images/home/valeurs/valeur01.png differ diff --git a/assets/images/home/valeurs/valeur02.png b/assets/images/home/valeurs/valeur02.png new file mode 100644 index 0000000000000000000000000000000000000000..03dcd20a4d7f108588fbfd0ccc3f5f09bdb8f4cd Binary files /dev/null and b/assets/images/home/valeurs/valeur02.png differ diff --git a/assets/images/home/valeurs/valeur03.png b/assets/images/home/valeurs/valeur03.png new file mode 100644 index 0000000000000000000000000000000000000000..c22e99da1e48f380d26c3fc5ea550a0c50b61320 Binary files /dev/null and b/assets/images/home/valeurs/valeur03.png differ diff --git a/assets/images/home/valeurs/valeur04.png b/assets/images/home/valeurs/valeur04.png new file mode 100644 index 0000000000000000000000000000000000000000..5be3e302d325461de6d58d6ba83c071239ed89ee Binary files /dev/null and b/assets/images/home/valeurs/valeur04.png differ diff --git a/assets/images/home/valeurs/valeur05.png b/assets/images/home/valeurs/valeur05.png new file mode 100644 index 0000000000000000000000000000000000000000..f4544d336e08f7c996630f7fb37aa0d0e3d72271 Binary files /dev/null and b/assets/images/home/valeurs/valeur05.png differ diff --git a/assets/images/home/valeurs/valeur06.png b/assets/images/home/valeurs/valeur06.png new file mode 100644 index 0000000000000000000000000000000000000000..dc9902e33cbcd8da912324fda68ab08f9b73a33e Binary files /dev/null and b/assets/images/home/valeurs/valeur06.png differ diff --git a/assets/images/home/valeurs/valeur07.png b/assets/images/home/valeurs/valeur07.png new file mode 100644 index 0000000000000000000000000000000000000000..cee3e5dd612532c4f989ddf7ef82a2cb3ee52881 Binary files /dev/null and b/assets/images/home/valeurs/valeur07.png differ diff --git a/assets/images/home/valeurs/valeur08.png b/assets/images/home/valeurs/valeur08.png new file mode 100644 index 0000000000000000000000000000000000000000..18be25f68f0a389eab1769b77f0f35b5e0c9256a Binary files /dev/null and b/assets/images/home/valeurs/valeur08.png differ diff --git a/assets/images/home/valeurs/valeur09.png b/assets/images/home/valeurs/valeur09.png new file mode 100644 index 0000000000000000000000000000000000000000..3d8ec0cdfccfd2fce8ebec9282346bd728fe51c8 Binary files /dev/null and b/assets/images/home/valeurs/valeur09.png differ diff --git a/assets/images/home/valeurs/valeur10.png b/assets/images/home/valeurs/valeur10.png new file mode 100644 index 0000000000000000000000000000000000000000..591f2df8ada7231ca7b3e218f148f9584ae968e5 Binary files /dev/null and b/assets/images/home/valeurs/valeur10.png differ diff --git a/assets/images/iviatic.png b/assets/images/iviatic.png new file mode 100644 index 0000000000000000000000000000000000000000..344a34a3dd2c80d64c3be5a17376ca133ac9a0b9 Binary files /dev/null and b/assets/images/iviatic.png differ diff --git a/assets/images/logo.jpg b/assets/images/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c20f953a6cdb0211d289ad1d5b4db476a786cf2b Binary files /dev/null and b/assets/images/logo.jpg differ diff --git a/assets/images/logo.png b/assets/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e4d7d36eb2d160aacca80cb55c27e445b5bd64d2 Binary files /dev/null and b/assets/images/logo.png differ diff --git a/assets/images/logoL.jpg b/assets/images/logoL.jpg new file mode 100644 index 0000000000000000000000000000000000000000..406662c66abf7d9d5a9d8bf9d612013ca5c760e6 Binary files /dev/null and b/assets/images/logoL.jpg differ diff --git a/assets/images/logoLTxt.jpg b/assets/images/logoLTxt.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ffd8b170f67b5d79d48f880f6d9f04bff7f0341a Binary files /dev/null and b/assets/images/logoLTxt.jpg differ diff --git a/assets/images/logoNotragora.png b/assets/images/logoNotragora.png new file mode 100644 index 0000000000000000000000000000000000000000..a11888bdd90405e8594b179ce4ee46024ff14a26 Binary files /dev/null and b/assets/images/logoNotragora.png differ diff --git a/assets/images/logoORD.PNG b/assets/images/logoORD.PNG new file mode 100644 index 0000000000000000000000000000000000000000..fdd630365ba9bca7a5b1087462d1ad7f0af85ddd Binary files /dev/null and b/assets/images/logoORD.PNG differ diff --git a/assets/images/logoSM.png b/assets/images/logoSM.png new file mode 100644 index 0000000000000000000000000000000000000000..fc140e6585e8f38ae3c9b07547c32367adc78cd6 Binary files /dev/null and b/assets/images/logoSM.png differ diff --git a/assets/images/logoSMclean.png b/assets/images/logoSMclean.png new file mode 100644 index 0000000000000000000000000000000000000000..2e07d1f50b9d0f6a85a27e65cf01c69287f0fe61 Binary files /dev/null and b/assets/images/logoSMclean.png differ diff --git a/assets/images/logoW.jpg b/assets/images/logoW.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8b4191b10f66e9084e4c901d91ebeef8e42dbbbb Binary files /dev/null and b/assets/images/logoW.jpg differ diff --git a/assets/images/logo_region_reunion.png b/assets/images/logo_region_reunion.png new file mode 100644 index 0000000000000000000000000000000000000000..bc5152d1119bfc6473d5d12a3089b0ba94919933 Binary files /dev/null and b/assets/images/logo_region_reunion.png differ diff --git a/assets/images/logos/OSM-logo.png b/assets/images/logos/OSM-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..68f0ba155d79ce33c57aaf48d7a36853d8986721 Binary files /dev/null and b/assets/images/logos/OSM-logo.png differ diff --git a/assets/images/logos/Wikipedia-logo-en-big.png b/assets/images/logos/Wikipedia-logo-en-big.png new file mode 100644 index 0000000000000000000000000000000000000000..097829c5f4d893d685adafa6cae20e5e478d9d06 Binary files /dev/null and b/assets/images/logos/Wikipedia-logo-en-big.png differ diff --git a/assets/images/logos/base-siren-logo.png b/assets/images/logos/base-siren-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..592aa9e2ccff19418ab1af9fb63ac1b32ee796b1 Binary files /dev/null and b/assets/images/logos/base-siren-logo.png differ diff --git a/assets/images/logos/data-gouv-logo-long.png b/assets/images/logos/data-gouv-logo-long.png new file mode 100644 index 0000000000000000000000000000000000000000..f5f2898e2ce41438608aba66bc98db65ae79afcf Binary files /dev/null and b/assets/images/logos/data-gouv-logo-long.png differ diff --git a/assets/images/logos/data-gouv-logo.png b/assets/images/logos/data-gouv-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1b3279ea452be7ced0f46ccab1bde1a990bc6051 Binary files /dev/null and b/assets/images/logos/data-gouv-logo.png differ diff --git a/assets/images/logos/logo-copedia.png b/assets/images/logos/logo-copedia.png new file mode 100644 index 0000000000000000000000000000000000000000..e503fa01cfb6693616a387de3d84d313e91998d1 Binary files /dev/null and b/assets/images/logos/logo-copedia.png differ diff --git a/assets/images/logos/logo-dbpedia.png b/assets/images/logos/logo-dbpedia.png new file mode 100644 index 0000000000000000000000000000000000000000..6a577dbb89900b45878f371b8032e3889f67212a Binary files /dev/null and b/assets/images/logos/logo-dbpedia.png differ diff --git a/assets/images/logos/logo-wikidata.png b/assets/images/logos/logo-wikidata.png new file mode 100644 index 0000000000000000000000000000000000000000..00e7a1fcb13d12b994fd4d0766c6a4a7191fda34 Binary files /dev/null and b/assets/images/logos/logo-wikidata.png differ diff --git a/assets/images/logos/logo_open_data_educ.jpg b/assets/images/logos/logo_open_data_educ.jpg new file mode 100644 index 0000000000000000000000000000000000000000..185c935624b1df9a7731f1efc1bd274995257a06 Binary files /dev/null and b/assets/images/logos/logo_open_data_educ.jpg differ diff --git a/assets/images/logos/logo_pole_emploi.png b/assets/images/logos/logo_pole_emploi.png new file mode 100644 index 0000000000000000000000000000000000000000..e518bb3e81ad31e8e1be683f5bfcfe57130d02dd Binary files /dev/null and b/assets/images/logos/logo_pole_emploi.png differ diff --git a/assets/images/logos/opendata-soft-logo.png b/assets/images/logos/opendata-soft-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..9e6acabf6f9cc5db8b822c89ea37195e03e52826 Binary files /dev/null and b/assets/images/logos/opendata-soft-logo.png differ diff --git a/assets/images/loomio-btn.png b/assets/images/loomio-btn.png new file mode 100644 index 0000000000000000000000000000000000000000..0f7987306faabf8814f0653a482bc3375c9c2d2e Binary files /dev/null and b/assets/images/loomio-btn.png differ diff --git a/assets/images/main-logo-city.png b/assets/images/main-logo-city.png new file mode 100644 index 0000000000000000000000000000000000000000..f70e60e74af5142b00eca7176e7dc8126041b813 Binary files /dev/null and b/assets/images/main-logo-city.png differ diff --git a/assets/images/main-logo-home.png b/assets/images/main-logo-home.png new file mode 100644 index 0000000000000000000000000000000000000000..d903387d517c5e59ac2656625ed40761fad80268 Binary files /dev/null and b/assets/images/main-logo-home.png differ diff --git a/assets/images/mel.png b/assets/images/mel.png new file mode 100644 index 0000000000000000000000000000000000000000..d039b279a820d5a8b93b387b1cab051ad3106cd3 Binary files /dev/null and b/assets/images/mel.png differ diff --git a/assets/images/mug.png b/assets/images/mug.png new file mode 100644 index 0000000000000000000000000000000000000000..664a36eb2d6ae127ed33d4c3115e0fce4ead83cb Binary files /dev/null and b/assets/images/mug.png differ diff --git a/assets/images/net.png b/assets/images/net.png new file mode 100644 index 0000000000000000000000000000000000000000..25a9492fd6d53aa038985bf3541d755cb30a0a3e Binary files /dev/null and b/assets/images/net.png differ diff --git a/assets/images/network-for-all.png b/assets/images/network-for-all.png new file mode 100644 index 0000000000000000000000000000000000000000..3fd815119e0b517f6dd776db03138072614b59df Binary files /dev/null and b/assets/images/network-for-all.png differ diff --git a/assets/images/network/Alimentation.png b/assets/images/network/Alimentation.png new file mode 100755 index 0000000000000000000000000000000000000000..944fa3b8ed1eb3dd48b4ba9f25303e471cc4851e Binary files /dev/null and b/assets/images/network/Alimentation.png differ diff --git a/assets/images/network/All.png b/assets/images/network/All.png new file mode 100755 index 0000000000000000000000000000000000000000..cb1b7683d5f68423c00239177e93fc3ced3f42ff Binary files /dev/null and b/assets/images/network/All.png differ diff --git a/assets/images/network/Creation.png b/assets/images/network/Creation.png new file mode 100755 index 0000000000000000000000000000000000000000..274cecece1072c7a59f7d3e1681ee4c89879902b Binary files /dev/null and b/assets/images/network/Creation.png differ diff --git a/assets/images/network/Equipement.png b/assets/images/network/Equipement.png new file mode 100755 index 0000000000000000000000000000000000000000..21aed41ddcbbed029d963465a031b508d120e955 Binary files /dev/null and b/assets/images/network/Equipement.png differ diff --git a/assets/images/network/Financement.png b/assets/images/network/Financement.png new file mode 100755 index 0000000000000000000000000000000000000000..6584f442c75d45bc87cf7080f62996568a8049df Binary files /dev/null and b/assets/images/network/Financement.png differ diff --git a/assets/images/network/Information.png b/assets/images/network/Information.png new file mode 100755 index 0000000000000000000000000000000000000000..b3300f85098e3cb2a03b3e8af717dfe2c2ac9c61 Binary files /dev/null and b/assets/images/network/Information.png differ diff --git a/assets/images/network/Logement.png b/assets/images/network/Logement.png new file mode 100755 index 0000000000000000000000000000000000000000..4fc918ed3a482986b1b8db04c0449065fa78e3bb Binary files /dev/null and b/assets/images/network/Logement.png differ diff --git a/assets/images/network/Loisir.png b/assets/images/network/Loisir.png new file mode 100755 index 0000000000000000000000000000000000000000..7cd7a551568b3ec792e7906932412a0c195ad52a Binary files /dev/null and b/assets/images/network/Loisir.png differ diff --git a/assets/images/network/Marker.png b/assets/images/network/Marker.png new file mode 100644 index 0000000000000000000000000000000000000000..60582d445719e264018631ff1a4be6dce1cd72b2 Binary files /dev/null and b/assets/images/network/Marker.png differ diff --git a/assets/images/network/Mobilite.png b/assets/images/network/Mobilite.png new file mode 100755 index 0000000000000000000000000000000000000000..e25bfdfb2adad499da75feccd96f995c6b3c8bda Binary files /dev/null and b/assets/images/network/Mobilite.png differ diff --git a/assets/images/network/Reparation.png b/assets/images/network/Reparation.png new file mode 100755 index 0000000000000000000000000000000000000000..e7d196a6043b57bcf3cff9902832bac5818f5f46 Binary files /dev/null and b/assets/images/network/Reparation.png differ diff --git a/assets/images/network/Service.png b/assets/images/network/Service.png new file mode 100755 index 0000000000000000000000000000000000000000..634959a25dc25dd0fafa7c84fd1d0d03725742d0 Binary files /dev/null and b/assets/images/network/Service.png differ diff --git a/assets/images/network/Travail.png b/assets/images/network/Travail.png new file mode 100755 index 0000000000000000000000000000000000000000..ee5565bf4c460670d5beccf6f87928cdb4ca6ddd Binary files /dev/null and b/assets/images/network/Travail.png differ diff --git a/assets/images/news/ajax-loader.gif b/assets/images/news/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..6bdc3b5e698ef1f0882270721fd706990336d3b2 Binary files /dev/null and b/assets/images/news/ajax-loader.gif differ diff --git a/assets/images/news/clock.png b/assets/images/news/clock.png new file mode 100644 index 0000000000000000000000000000000000000000..9534b08f3cfe9ee2d6c79358d368d087379b196f Binary files /dev/null and b/assets/images/news/clock.png differ diff --git a/assets/images/news/natures/4.png b/assets/images/news/natures/4.png new file mode 100644 index 0000000000000000000000000000000000000000..127d103605736415849b86e363d725cc4b765b19 Binary files /dev/null and b/assets/images/news/natures/4.png differ diff --git a/assets/images/news/natures/6.png b/assets/images/news/natures/6.png new file mode 100644 index 0000000000000000000000000000000000000000..117affcbdcdd3a5e767433cb9374a0aff870f44a Binary files /dev/null and b/assets/images/news/natures/6.png differ diff --git a/assets/images/news/natures/free_msg.png b/assets/images/news/natures/free_msg.png new file mode 100644 index 0000000000000000000000000000000000000000..8b80bf7fde427931cd069301c8724d06dcb12cb4 Binary files /dev/null and b/assets/images/news/natures/free_msg.png differ diff --git a/assets/images/news/natures/help.png b/assets/images/news/natures/help.png new file mode 100644 index 0000000000000000000000000000000000000000..b988c056ea84e4efb7145e2a8aefdd273490e619 Binary files /dev/null and b/assets/images/news/natures/help.png differ diff --git a/assets/images/news/natures/idea.png b/assets/images/news/natures/idea.png new file mode 100644 index 0000000000000000000000000000000000000000..232d332d94944c5637b53d2bbbe6e0e5e2474900 Binary files /dev/null and b/assets/images/news/natures/idea.png differ diff --git a/assets/images/news/natures/question.png b/assets/images/news/natures/question.png new file mode 100644 index 0000000000000000000000000000000000000000..e9414d1d311ad9d43095694f5315cf78902ed551 Binary files /dev/null and b/assets/images/news/natures/question.png differ diff --git a/assets/images/news/natures/question_black.png b/assets/images/news/natures/question_black.png new file mode 100644 index 0000000000000000000000000000000000000000..e9414d1d311ad9d43095694f5315cf78902ed551 Binary files /dev/null and b/assets/images/news/natures/question_black.png differ diff --git a/assets/images/news/natures/question_white.png b/assets/images/news/natures/question_white.png new file mode 100644 index 0000000000000000000000000000000000000000..0d8f70a1e479ca5e62a5def0d12413dea3c1d680 Binary files /dev/null and b/assets/images/news/natures/question_white.png differ diff --git a/assets/images/news/natures/rumor.png b/assets/images/news/natures/rumor.png new file mode 100644 index 0000000000000000000000000000000000000000..7715582189c56d2aaf5a0cb5a06a67ff0e8c8ec6 Binary files /dev/null and b/assets/images/news/natures/rumor.png differ diff --git a/assets/images/news/natures/true_information.png b/assets/images/news/natures/true_information.png new file mode 100644 index 0000000000000000000000000000000000000000..a9970cb5af9620bb7ebe9e02bcd2f3e65c1e7df9 Binary files /dev/null and b/assets/images/news/natures/true_information.png differ diff --git a/assets/images/news/profile_default_l.png b/assets/images/news/profile_default_l.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad4be7049f1a0f5875e121753850ea407943fd4 Binary files /dev/null and b/assets/images/news/profile_default_l.png differ diff --git a/assets/images/news/test_illu/illu_test.jpg b/assets/images/news/test_illu/illu_test.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a35a82ea3f7650a5f8c2406aec06ed8708ed868a Binary files /dev/null and b/assets/images/news/test_illu/illu_test.jpg differ diff --git a/assets/images/news/themes/1.png b/assets/images/news/themes/1.png new file mode 100644 index 0000000000000000000000000000000000000000..96fc2cc7899a8ff20c5d4a46e6abd127b9474ef1 Binary files /dev/null and b/assets/images/news/themes/1.png differ diff --git a/assets/images/news/themes/10.png b/assets/images/news/themes/10.png new file mode 100644 index 0000000000000000000000000000000000000000..8fcf64b24619141664c6b9e64bbb008822f90cc0 Binary files /dev/null and b/assets/images/news/themes/10.png differ diff --git a/assets/images/news/themes/11.png b/assets/images/news/themes/11.png new file mode 100644 index 0000000000000000000000000000000000000000..a3fe721db54b7434e8bfddde99468803887424eb Binary files /dev/null and b/assets/images/news/themes/11.png differ diff --git a/assets/images/news/themes/12.png b/assets/images/news/themes/12.png new file mode 100644 index 0000000000000000000000000000000000000000..6901a54a9c95c7de3073d5b869e347347b10c06b Binary files /dev/null and b/assets/images/news/themes/12.png differ diff --git a/assets/images/news/themes/13.png b/assets/images/news/themes/13.png new file mode 100644 index 0000000000000000000000000000000000000000..ca93aba2f61f630b5687553e4ef44e9e2c3c8417 Binary files /dev/null and b/assets/images/news/themes/13.png differ diff --git a/assets/images/news/themes/14.png b/assets/images/news/themes/14.png new file mode 100644 index 0000000000000000000000000000000000000000..14d093403df57e655765dbbe153d4b1355d67098 Binary files /dev/null and b/assets/images/news/themes/14.png differ diff --git a/assets/images/news/themes/15.png b/assets/images/news/themes/15.png new file mode 100644 index 0000000000000000000000000000000000000000..8ec760cc0ee2e93a4b03c87f1e36b528be0b51a8 Binary files /dev/null and b/assets/images/news/themes/15.png differ diff --git a/assets/images/news/themes/16.png b/assets/images/news/themes/16.png new file mode 100644 index 0000000000000000000000000000000000000000..cf7b3c438a27a3beff587da72fa4091690cbc5dd Binary files /dev/null and b/assets/images/news/themes/16.png differ diff --git a/assets/images/news/themes/17.png b/assets/images/news/themes/17.png new file mode 100644 index 0000000000000000000000000000000000000000..ec5e0d6f3110008e286a0a3de86445842ff254f5 Binary files /dev/null and b/assets/images/news/themes/17.png differ diff --git a/assets/images/news/themes/18.png b/assets/images/news/themes/18.png new file mode 100644 index 0000000000000000000000000000000000000000..31919da662879ed5b9bc34ce59e6a554a02540fb Binary files /dev/null and b/assets/images/news/themes/18.png differ diff --git a/assets/images/news/themes/19.png b/assets/images/news/themes/19.png new file mode 100644 index 0000000000000000000000000000000000000000..d341ea5fe1848abf101920b4f2cf11633d552f05 Binary files /dev/null and b/assets/images/news/themes/19.png differ diff --git a/assets/images/news/themes/2.png b/assets/images/news/themes/2.png new file mode 100644 index 0000000000000000000000000000000000000000..9068915d4505d14ce78c42f48d0f0d88548526e9 Binary files /dev/null and b/assets/images/news/themes/2.png differ diff --git a/assets/images/news/themes/20.png b/assets/images/news/themes/20.png new file mode 100644 index 0000000000000000000000000000000000000000..8557a8fe0a1dd6fbf8f10b4b76ee2a03af307a37 Binary files /dev/null and b/assets/images/news/themes/20.png differ diff --git a/assets/images/news/themes/21.png b/assets/images/news/themes/21.png new file mode 100644 index 0000000000000000000000000000000000000000..6cc27539a0652a02232046cdedd48cfa86e9a993 Binary files /dev/null and b/assets/images/news/themes/21.png differ diff --git a/assets/images/news/themes/3.png b/assets/images/news/themes/3.png new file mode 100644 index 0000000000000000000000000000000000000000..ac2795b4b47b66d5dc934465a64a8e279a0b5782 Binary files /dev/null and b/assets/images/news/themes/3.png differ diff --git a/assets/images/news/themes/4.png b/assets/images/news/themes/4.png new file mode 100644 index 0000000000000000000000000000000000000000..2f45ffe3b9b0f2e408e5bb48a390cb108c699d0b Binary files /dev/null and b/assets/images/news/themes/4.png differ diff --git a/assets/images/news/themes/5.png b/assets/images/news/themes/5.png new file mode 100644 index 0000000000000000000000000000000000000000..09cc987eb4586c2e7e4adf520ca8e94d735da4cf Binary files /dev/null and b/assets/images/news/themes/5.png differ diff --git a/assets/images/news/themes/6.png b/assets/images/news/themes/6.png new file mode 100644 index 0000000000000000000000000000000000000000..a5dec4276429ce5796b76032d263c78e94dce909 Binary files /dev/null and b/assets/images/news/themes/6.png differ diff --git a/assets/images/news/themes/7.png b/assets/images/news/themes/7.png new file mode 100644 index 0000000000000000000000000000000000000000..fac06e4cd3d3067ea30a5b8c76ecadfb8918c26e Binary files /dev/null and b/assets/images/news/themes/7.png differ diff --git a/assets/images/news/themes/8.png b/assets/images/news/themes/8.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1262a5ae44a788fce82f9206136ab7c2c9ce8f Binary files /dev/null and b/assets/images/news/themes/8.png differ diff --git a/assets/images/news/themes/9.png b/assets/images/news/themes/9.png new file mode 100644 index 0000000000000000000000000000000000000000..c0caa9b0112215cb42c7d2b19b440bbe91234f06 Binary files /dev/null and b/assets/images/news/themes/9.png differ diff --git a/assets/images/news/thumb_selection.gif b/assets/images/news/thumb_selection.gif new file mode 100644 index 0000000000000000000000000000000000000000..aa436a891396540543e0d551c2f8073c9e7c4ab5 Binary files /dev/null and b/assets/images/news/thumb_selection.gif differ diff --git a/assets/images/nosValeurs.png b/assets/images/nosValeurs.png new file mode 100644 index 0000000000000000000000000000000000000000..350b1cada436bfff93899afab7193de2f8b7e5a1 Binary files /dev/null and b/assets/images/nosValeurs.png differ diff --git a/assets/images/opensource.gif b/assets/images/opensource.gif new file mode 100644 index 0000000000000000000000000000000000000000..7aff830eed8bc23ea4df5be38455f4554277c2f5 Binary files /dev/null and b/assets/images/opensource.gif differ diff --git a/assets/images/partners/DO.png b/assets/images/partners/DO.png new file mode 100644 index 0000000000000000000000000000000000000000..affe0e3d04b53578c04afb914e7e51b63b34aed3 Binary files /dev/null and b/assets/images/partners/DO.png differ diff --git a/assets/images/partners/Logo_Bis-01.png b/assets/images/partners/Logo_Bis-01.png new file mode 100644 index 0000000000000000000000000000000000000000..0e9f55fa49f03cf312bfa45ebe8dad306d7c88a2 Binary files /dev/null and b/assets/images/partners/Logo_Bis-01.png differ diff --git a/assets/images/partners/SENSORICA.jpg b/assets/images/partners/SENSORICA.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2c46d1ef26d4de1e6a6141f42dd2ef104b29abe5 Binary files /dev/null and b/assets/images/partners/SENSORICA.jpg differ diff --git a/assets/images/partners/demosalithia.png b/assets/images/partners/demosalithia.png new file mode 100644 index 0000000000000000000000000000000000000000..bf0af4d1fbfa2f3d8dee3513a17d07f11b3c5874 Binary files /dev/null and b/assets/images/partners/demosalithia.png differ diff --git a/assets/images/partners/fab-lab1.png b/assets/images/partners/fab-lab1.png new file mode 100644 index 0000000000000000000000000000000000000000..5dfe26328cf2deb3eb3a121fad5814a4e3ea4279 Binary files /dev/null and b/assets/images/partners/fab-lab1.png differ diff --git a/assets/images/partners/ggouv.png b/assets/images/partners/ggouv.png new file mode 100644 index 0000000000000000000000000000000000000000..3548d42deadd4676feca8dd43873c52a553c3e63 Binary files /dev/null and b/assets/images/partners/ggouv.png differ diff --git a/assets/images/partners/imaginSocial.jpg b/assets/images/partners/imaginSocial.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fc00a9d8d5f4910495b562eec6713b9857454455 Binary files /dev/null and b/assets/images/partners/imaginSocial.jpg differ diff --git a/assets/images/partners/logo-cn.png b/assets/images/partners/logo-cn.png new file mode 100644 index 0000000000000000000000000000000000000000..91f0d56143798dc8bc85f45ec1bbead3db6c4dde Binary files /dev/null and b/assets/images/partners/logo-cn.png differ diff --git a/assets/images/partners/logo_lc.png b/assets/images/partners/logo_lc.png new file mode 100644 index 0000000000000000000000000000000000000000..d902453401923de83eff05d8615bea03c7e25e4c Binary files /dev/null and b/assets/images/partners/logo_lc.png differ diff --git a/assets/images/partners/smartCitizen.png b/assets/images/partners/smartCitizen.png new file mode 100644 index 0000000000000000000000000000000000000000..07caab4bba116ad53a9594e8da2063ed501f0aa0 Binary files /dev/null and b/assets/images/partners/smartCitizen.png differ diff --git a/assets/images/people.jpg b/assets/images/people.jpg new file mode 100644 index 0000000000000000000000000000000000000000..584e9ff3ca2a03901c499f4fa36ce7ba9517dac3 Binary files /dev/null and b/assets/images/people.jpg differ diff --git a/assets/images/piggybank.png b/assets/images/piggybank.png new file mode 100644 index 0000000000000000000000000000000000000000..d2e642ae950e10b750d0c1bfd5a9827015071eef Binary files /dev/null and b/assets/images/piggybank.png differ diff --git a/assets/images/proverb/0.png b/assets/images/proverb/0.png new file mode 100644 index 0000000000000000000000000000000000000000..36c27b6ec253e5e091d232820b496bafa41544a9 Binary files /dev/null and b/assets/images/proverb/0.png differ diff --git a/assets/images/proverb/1-1.jpg b/assets/images/proverb/1-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..89db9514ec4720e1b6cae6b33a4b2fed1183823d Binary files /dev/null and b/assets/images/proverb/1-1.jpg differ diff --git a/assets/images/proverb/10-3.jpg b/assets/images/proverb/10-3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3f3450a198182e4cb5e6d7dd1b1ce898469e3ea3 Binary files /dev/null and b/assets/images/proverb/10-3.jpg differ diff --git a/assets/images/proverb/10246334_606910706105194_2212447457462452927_n.png b/assets/images/proverb/10246334_606910706105194_2212447457462452927_n.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1a4272dd9b86cde34ab5391767e3516dc68c64 Binary files /dev/null and b/assets/images/proverb/10246334_606910706105194_2212447457462452927_n.png differ diff --git a/assets/images/proverb/10364120_779552675451175_2579509307230856424_n.jpg b/assets/images/proverb/10364120_779552675451175_2579509307230856424_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1d3bc46c2be39bc33924a16bff17ee0eff86abca Binary files /dev/null and b/assets/images/proverb/10364120_779552675451175_2579509307230856424_n.jpg differ diff --git a/assets/images/proverb/10383884_769253623115532_4879086985241927732_n.jpg b/assets/images/proverb/10383884_769253623115532_4879086985241927732_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..49c64c0e11437d09ee58a55f7fea2a7a0c5356ed Binary files /dev/null and b/assets/images/proverb/10383884_769253623115532_4879086985241927732_n.jpg differ diff --git a/assets/images/proverb/10423632_945802112107948_2855348279414175001_n.jpg b/assets/images/proverb/10423632_945802112107948_2855348279414175001_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7cac6eced97c5e6185d4b28985479bdb1200aa42 Binary files /dev/null and b/assets/images/proverb/10423632_945802112107948_2855348279414175001_n.jpg differ diff --git a/assets/images/proverb/10463933_945803085441184_5255658514836819854_n.jpg b/assets/images/proverb/10463933_945803085441184_5255658514836819854_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b2d7b3801f47bccb274530b34fb497e3e808df6b Binary files /dev/null and b/assets/images/proverb/10463933_945803085441184_5255658514836819854_n.jpg differ diff --git a/assets/images/proverb/10527403_822956971049517_445295542496977147_n (1).jpg b/assets/images/proverb/10527403_822956971049517_445295542496977147_n (1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..2a5d69c22cf76f54837016a8c789c7da8857e2d4 Binary files /dev/null and b/assets/images/proverb/10527403_822956971049517_445295542496977147_n (1).jpg differ diff --git a/assets/images/proverb/10557291_779886845401796_1574539268603051547_n.jpg b/assets/images/proverb/10557291_779886845401796_1574539268603051547_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1a1f5f364fbe18a7865fef4d181775e5f0ffdc99 Binary files /dev/null and b/assets/images/proverb/10557291_779886845401796_1574539268603051547_n.jpg differ diff --git a/assets/images/proverb/10592772_10153429084255132_7292022032167755259_n.jpg b/assets/images/proverb/10592772_10153429084255132_7292022032167755259_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..108ac77cbce0416e77a95e324b9f4e6eb1162b07 Binary files /dev/null and b/assets/images/proverb/10592772_10153429084255132_7292022032167755259_n.jpg differ diff --git a/assets/images/proverb/10629744_1052316341447980_5960766352133403765_n.jpg b/assets/images/proverb/10629744_1052316341447980_5960766352133403765_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2f22bb94fc0ae28abd31b00b1be225c0c88d27f6 Binary files /dev/null and b/assets/images/proverb/10629744_1052316341447980_5960766352133403765_n.jpg differ diff --git a/assets/images/proverb/10644855_10152850109822112_734407566556307538_n.png b/assets/images/proverb/10644855_10152850109822112_734407566556307538_n.png new file mode 100644 index 0000000000000000000000000000000000000000..2652312eed71371463070991400ef8430c8c92bf Binary files /dev/null and b/assets/images/proverb/10644855_10152850109822112_734407566556307538_n.png differ diff --git a/assets/images/proverb/10730803_749265375127487_3435464846246796190_n.jpg b/assets/images/proverb/10730803_749265375127487_3435464846246796190_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bcbab36de4bd0dce3b1f8a0d7705d75b57e87cad Binary files /dev/null and b/assets/images/proverb/10730803_749265375127487_3435464846246796190_n.jpg differ diff --git a/assets/images/proverb/1075689_594955087193715_1164257732_n.jpg b/assets/images/proverb/1075689_594955087193715_1164257732_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..543e454a6e9e0ad82c02110bddbd83dd76044081 Binary files /dev/null and b/assets/images/proverb/1075689_594955087193715_1164257732_n.jpg differ diff --git a/assets/images/proverb/10888667_759790034099358_4859393104990711865_n.jpg b/assets/images/proverb/10888667_759790034099358_4859393104990711865_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0567d27c6f6aa0d46cee2ca75a13b593e1a30896 Binary files /dev/null and b/assets/images/proverb/10888667_759790034099358_4859393104990711865_n.jpg differ diff --git a/assets/images/proverb/10917132_606911106105154_8555208770069563022_n.jpg b/assets/images/proverb/10917132_606911106105154_8555208770069563022_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c886fc02bdfb1d7a3764e3df03a311b17627b43b Binary files /dev/null and b/assets/images/proverb/10917132_606911106105154_8555208770069563022_n.jpg differ diff --git a/assets/images/proverb/10986621_945803435441149_1127002805849309900_n.jpg b/assets/images/proverb/10986621_945803435441149_1127002805849309900_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1e050766017e1c5041e81f1245b3f8a5cd5f411c Binary files /dev/null and b/assets/images/proverb/10986621_945803435441149_1127002805849309900_n.jpg differ diff --git a/assets/images/proverb/11-1.jpg b/assets/images/proverb/11-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..26c60b5796f1a93b6d89b69fee382dd6bec25f43 Binary files /dev/null and b/assets/images/proverb/11-1.jpg differ diff --git a/assets/images/proverb/11-2.jpg b/assets/images/proverb/11-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ec25eee7364a65f8db9f4d7e70774b72dfbc048c Binary files /dev/null and b/assets/images/proverb/11-2.jpg differ diff --git a/assets/images/proverb/11015211_10205320819319156_8890331214114541903_n.jpg b/assets/images/proverb/11015211_10205320819319156_8890331214114541903_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3805514505f1552f13eeb567c43834e3ffabead3 Binary files /dev/null and b/assets/images/proverb/11015211_10205320819319156_8890331214114541903_n.jpg differ diff --git a/assets/images/proverb/11025666_10153072253617435_3062999636458519668_n.jpg b/assets/images/proverb/11025666_10153072253617435_3062999636458519668_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..58c93cc422e153c22fbfeb943669c0c393b1490e Binary files /dev/null and b/assets/images/proverb/11025666_10153072253617435_3062999636458519668_n.jpg differ diff --git a/assets/images/proverb/11049621_10208146239680411_4348088083848829908_n.jpg b/assets/images/proverb/11049621_10208146239680411_4348088083848829908_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aa885307978a877fad0b24b18361c83a3b93b904 Binary files /dev/null and b/assets/images/proverb/11049621_10208146239680411_4348088083848829908_n.jpg differ diff --git a/assets/images/proverb/11057645_945802118774614_8840250549074219276_n.jpg b/assets/images/proverb/11057645_945802118774614_8840250549074219276_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0c83dff21751e1de1299c842a4acf2fe839d9e0d Binary files /dev/null and b/assets/images/proverb/11057645_945802118774614_8840250549074219276_n.jpg differ diff --git a/assets/images/proverb/11071657_945803382107821_8732127995660634670_n.jpg b/assets/images/proverb/11071657_945803382107821_8732127995660634670_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c316f237300219d4983b6b16f7944a48a6e78789 Binary files /dev/null and b/assets/images/proverb/11071657_945803382107821_8732127995660634670_n.jpg differ diff --git a/assets/images/proverb/11081357_792220560827710_8125895384681684072_n.jpg b/assets/images/proverb/11081357_792220560827710_8125895384681684072_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6bd0c1fe466102106be2483df57a3c953f8cad89 Binary files /dev/null and b/assets/images/proverb/11081357_792220560827710_8125895384681684072_n.jpg differ diff --git a/assets/images/proverb/11102742_945803288774497_3599020656993540688_n.jpg b/assets/images/proverb/11102742_945803288774497_3599020656993540688_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9badcc2e619dc8a920f02723d186c3223429e4ea Binary files /dev/null and b/assets/images/proverb/11102742_945803288774497_3599020656993540688_n.jpg differ diff --git a/assets/images/proverb/11179949_940472429324948_4594584583437237194_n.png b/assets/images/proverb/11179949_940472429324948_4594584583437237194_n.png new file mode 100644 index 0000000000000000000000000000000000000000..60fca024adc848c2fb466173a8a2fc9b35cae64a Binary files /dev/null and b/assets/images/proverb/11179949_940472429324948_4594584583437237194_n.png differ diff --git a/assets/images/proverb/11224569_711177845693418_7318593250713991990_n.jpg b/assets/images/proverb/11224569_711177845693418_7318593250713991990_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9eb774360a18473051380394782edaa8afd0bcae Binary files /dev/null and b/assets/images/proverb/11224569_711177845693418_7318593250713991990_n.jpg differ diff --git a/assets/images/proverb/11232893_945803348774491_1387246591134615119_n.jpg b/assets/images/proverb/11232893_945803348774491_1387246591134615119_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e05f248fb11a8cb22b114218f029ca59ddee9ae1 Binary files /dev/null and b/assets/images/proverb/11232893_945803348774491_1387246591134615119_n.jpg differ diff --git a/assets/images/proverb/11350596_945803258774500_567058775015964345_n.jpg b/assets/images/proverb/11350596_945803258774500_567058775015964345_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ee438b144c9ba00dff443c66732cafcb4056cf2b Binary files /dev/null and b/assets/images/proverb/11350596_945803258774500_567058775015964345_n.jpg differ diff --git a/assets/images/proverb/11401488_887651401270062_631034409305581921_n.jpg b/assets/images/proverb/11401488_887651401270062_631034409305581921_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f7d285c794dafbb7d91b5765612c9756901b8a12 Binary files /dev/null and b/assets/images/proverb/11401488_887651401270062_631034409305581921_n.jpg differ diff --git a/assets/images/proverb/11796233_516137578537644_7784489395141761190_n.jpg b/assets/images/proverb/11796233_516137578537644_7784489395141761190_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a9ca03d4382e3bdc3931040bfafc2f7cd54f4643 Binary files /dev/null and b/assets/images/proverb/11796233_516137578537644_7784489395141761190_n.jpg differ diff --git a/assets/images/proverb/11800058_868166486595045_1174175828416485403_n.jpg b/assets/images/proverb/11800058_868166486595045_1174175828416485403_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..65fa1c3725a1d469faa32a961fb2e42a7b9a80de Binary files /dev/null and b/assets/images/proverb/11800058_868166486595045_1174175828416485403_n.jpg differ diff --git a/assets/images/proverb/11800629_742372002551836_7530240122741981257_n.jpg b/assets/images/proverb/11800629_742372002551836_7530240122741981257_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..82a963df0ce8e594482956ffd7ed12a35e719801 Binary files /dev/null and b/assets/images/proverb/11800629_742372002551836_7530240122741981257_n.jpg differ diff --git a/assets/images/proverb/11836654_10155926957795486_6009295334260081393_n.jpg b/assets/images/proverb/11836654_10155926957795486_6009295334260081393_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e47e235df0105980af72c26da6a0b7645734ced Binary files /dev/null and b/assets/images/proverb/11836654_10155926957795486_6009295334260081393_n.jpg differ diff --git a/assets/images/proverb/11855791_721409247986037_8107206604924538253_n.jpg b/assets/images/proverb/11855791_721409247986037_8107206604924538253_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..958f8b8c0c87186a47e81471c4d2ca0b053f4af1 Binary files /dev/null and b/assets/images/proverb/11855791_721409247986037_8107206604924538253_n.jpg differ diff --git a/assets/images/proverb/11870768_957805030942594_5091842491870856006_n.jpg b/assets/images/proverb/11870768_957805030942594_5091842491870856006_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..de685c78eef98ff4c6335b186bf3342391c33579 Binary files /dev/null and b/assets/images/proverb/11870768_957805030942594_5091842491870856006_n.jpg differ diff --git a/assets/images/proverb/11885086_1017719048252270_1782489681607300808_n.jpg b/assets/images/proverb/11885086_1017719048252270_1782489681607300808_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..53059cf1a249242d3ea8e1f5fae15716f496111a Binary files /dev/null and b/assets/images/proverb/11885086_1017719048252270_1782489681607300808_n.jpg differ diff --git a/assets/images/proverb/11885349_1092081327486274_6145670862978466783_n.jpg b/assets/images/proverb/11885349_1092081327486274_6145670862978466783_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b4dd7755f7fa20875931329a093f459a41150f7f Binary files /dev/null and b/assets/images/proverb/11885349_1092081327486274_6145670862978466783_n.jpg differ diff --git a/assets/images/proverb/11947459_1207714982588533_2079796625362538597_n.jpg b/assets/images/proverb/11947459_1207714982588533_2079796625362538597_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0385ba014e4e3042bf340393761dbe2e00a6980d Binary files /dev/null and b/assets/images/proverb/11947459_1207714982588533_2079796625362538597_n.jpg differ diff --git a/assets/images/proverb/12-1.jpg b/assets/images/proverb/12-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9125c909017595d3f9c552985871e83ff9e67e69 Binary files /dev/null and b/assets/images/proverb/12-1.jpg differ diff --git a/assets/images/proverb/12002836_10207993844112761_1872390480826407027_n.jpg b/assets/images/proverb/12002836_10207993844112761_1872390480826407027_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..527e008b9b00a13d51980e3feffa64d693c9d587 Binary files /dev/null and b/assets/images/proverb/12002836_10207993844112761_1872390480826407027_n.jpg differ diff --git a/assets/images/proverb/12003034_938023369576909_5791516514787940299_n.jpg b/assets/images/proverb/12003034_938023369576909_5791516514787940299_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..20431d268a1491108a36cb29105e038d468a8db2 Binary files /dev/null and b/assets/images/proverb/12003034_938023369576909_5791516514787940299_n.jpg differ diff --git a/assets/images/proverb/12003288_10154387735949988_1667483586907887738_n.jpg b/assets/images/proverb/12003288_10154387735949988_1667483586907887738_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aa417d5ecbe60b29ae8c2fc0c256ce206088280b Binary files /dev/null and b/assets/images/proverb/12003288_10154387735949988_1667483586907887738_n.jpg differ diff --git a/assets/images/proverb/12046660_693833740716866_4195056259120336747_n.jpg b/assets/images/proverb/12046660_693833740716866_4195056259120336747_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2964774fc209b0a7d34fbe0b24d52afbd00e6b26 Binary files /dev/null and b/assets/images/proverb/12046660_693833740716866_4195056259120336747_n.jpg differ diff --git a/assets/images/proverb/12108886_10154144196447518_6207670108000840368_n.png b/assets/images/proverb/12108886_10154144196447518_6207670108000840368_n.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb7fa692c0e785798183fbd45bc73397ed0ec95 Binary files /dev/null and b/assets/images/proverb/12108886_10154144196447518_6207670108000840368_n.png differ diff --git a/assets/images/proverb/12109255_1044260162275287_862272795962764800_n.png b/assets/images/proverb/12109255_1044260162275287_862272795962764800_n.png new file mode 100644 index 0000000000000000000000000000000000000000..0bf38597347ee9ea43f8468ad913cc0e33af70f0 Binary files /dev/null and b/assets/images/proverb/12109255_1044260162275287_862272795962764800_n.png differ diff --git a/assets/images/proverb/12240114_10154462096719896_3317821565827428855_n.jpg b/assets/images/proverb/12240114_10154462096719896_3317821565827428855_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a9246cc20528bb6292214513f211f08988cd496b Binary files /dev/null and b/assets/images/proverb/12240114_10154462096719896_3317821565827428855_n.jpg differ diff --git a/assets/images/proverb/12241259_765096526950642_5603151521518586648_n.jpg b/assets/images/proverb/12241259_765096526950642_5603151521518586648_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..175764e9084bc5d310bed04f87e3fd00458880e6 Binary files /dev/null and b/assets/images/proverb/12241259_765096526950642_5603151521518586648_n.jpg differ diff --git a/assets/images/proverb/12243216_1148519705182219_1288975408283038720_n.jpg b/assets/images/proverb/12243216_1148519705182219_1288975408283038720_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7213da37e293fddf69911550b4ed2809c8a91cfb Binary files /dev/null and b/assets/images/proverb/12243216_1148519705182219_1288975408283038720_n.jpg differ diff --git a/assets/images/proverb/12289467_889843094469361_4582690237973367361_n.jpg b/assets/images/proverb/12289467_889843094469361_4582690237973367361_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..45233e36fdd19543d6c4a7d763a13485065a6dc9 Binary files /dev/null and b/assets/images/proverb/12289467_889843094469361_4582690237973367361_n.jpg differ diff --git a/assets/images/proverb/1240257_563509543740985_463052133_n.jpg b/assets/images/proverb/1240257_563509543740985_463052133_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..deebdd978372fae108b1cb12f10586a50a35da36 Binary files /dev/null and b/assets/images/proverb/1240257_563509543740985_463052133_n.jpg differ diff --git a/assets/images/proverb/1240464_497403037014508_1372658762_n.jpg b/assets/images/proverb/1240464_497403037014508_1372658762_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a0965ccf7510e04891da6d29358c6771d4859869 Binary files /dev/null and b/assets/images/proverb/1240464_497403037014508_1372658762_n.jpg differ diff --git a/assets/images/proverb/12495187_10153483693959613_6908444687803676838_n.jpg b/assets/images/proverb/12495187_10153483693959613_6908444687803676838_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..653e7e929667db11565926f331f06b8959121300 Binary files /dev/null and b/assets/images/proverb/12495187_10153483693959613_6908444687803676838_n.jpg differ diff --git a/assets/images/proverb/12931054_10209109273760067_1319541912517074606_n.jpg b/assets/images/proverb/12931054_10209109273760067_1319541912517074606_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2818c4dc329cd837da2b4d1d7d43e5e30e2dd20c Binary files /dev/null and b/assets/images/proverb/12931054_10209109273760067_1319541912517074606_n.jpg differ diff --git a/assets/images/proverb/130262190_09c9a16e91.jpg b/assets/images/proverb/130262190_09c9a16e91.jpg new file mode 100644 index 0000000000000000000000000000000000000000..832b4d5a2b124095e9e7b0858fffc3b2b790a874 Binary files /dev/null and b/assets/images/proverb/130262190_09c9a16e91.jpg differ diff --git a/assets/images/proverb/13321940_10154341951458469_7240776716465214084_n (1).jpg b/assets/images/proverb/13321940_10154341951458469_7240776716465214084_n (1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..32213dd8098e2a00a9b7c210902e0c82f25b92a3 Binary files /dev/null and b/assets/images/proverb/13321940_10154341951458469_7240776716465214084_n (1).jpg differ diff --git a/assets/images/proverb/1374202_584639371598859_1593401651_n.jpg b/assets/images/proverb/1374202_584639371598859_1593401651_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..22c51d838228def8a03ba1236956ea9db039881b Binary files /dev/null and b/assets/images/proverb/1374202_584639371598859_1593401651_n.jpg differ diff --git a/assets/images/proverb/1375718_534444829967214_2095032383_n.jpg b/assets/images/proverb/1375718_534444829967214_2095032383_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..257a5090cdb8fc2e08152f34a130b0e716d1b40e Binary files /dev/null and b/assets/images/proverb/1375718_534444829967214_2095032383_n.jpg differ diff --git a/assets/images/proverb/1377490_723267294368168_2087159582_n.jpg b/assets/images/proverb/1377490_723267294368168_2087159582_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e934b8df86b773fb0c6dea22eebdb1bbff0f89c1 Binary files /dev/null and b/assets/images/proverb/1377490_723267294368168_2087159582_n.jpg differ diff --git a/assets/images/proverb/1379282_584565321602994_1619642812_n.jpg b/assets/images/proverb/1379282_584565321602994_1619642812_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3cdd824b417332cf985e76064a3e6ddefe4326fc Binary files /dev/null and b/assets/images/proverb/1379282_584565321602994_1619642812_n.jpg differ diff --git a/assets/images/proverb/1382277_611027745602685_9193932_n.jpg b/assets/images/proverb/1382277_611027745602685_9193932_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..126aeb5d196b069957fd9c72ee0738192bcd14fd Binary files /dev/null and b/assets/images/proverb/1382277_611027745602685_9193932_n.jpg differ diff --git a/assets/images/proverb/1384224_728867113794439_1657254554_n.jpg b/assets/images/proverb/1384224_728867113794439_1657254554_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..335acd6bd3d779b3f66e90e01e97875a905efcc2 Binary files /dev/null and b/assets/images/proverb/1384224_728867113794439_1657254554_n.jpg differ diff --git a/assets/images/proverb/1392066_214609098721974_1247703258_n.jpg b/assets/images/proverb/1392066_214609098721974_1247703258_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d3f2c2a16df99ea89cf4eccfd5df2cfcaea6c719 Binary files /dev/null and b/assets/images/proverb/1392066_214609098721974_1247703258_n.jpg differ diff --git a/assets/images/proverb/1441189_544255388986158_97017002_n.jpg b/assets/images/proverb/1441189_544255388986158_97017002_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..75219414ef312accc6a6d761426b83dc9d58ff0d Binary files /dev/null and b/assets/images/proverb/1441189_544255388986158_97017002_n.jpg differ diff --git a/assets/images/proverb/17694_945803038774522_1978681584059622832_n.jpg b/assets/images/proverb/17694_945803038774522_1978681584059622832_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1a4e665caf9582cf89f9ab5f0fee0ec467f44225 Binary files /dev/null and b/assets/images/proverb/17694_945803038774522_1978681584059622832_n.jpg differ diff --git a/assets/images/proverb/1779925_448724568613645_5266806815961588757_n.jpg b/assets/images/proverb/1779925_448724568613645_5266806815961588757_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b1a13822727ea2e387e09a2e130c327bdd779b95 Binary files /dev/null and b/assets/images/proverb/1779925_448724568613645_5266806815961588757_n.jpg differ diff --git a/assets/images/proverb/1796578_742219915790817_467451055_n.jpg b/assets/images/proverb/1796578_742219915790817_467451055_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d01c221c476e34b9f1403c6281ee5da6b48bc6b3 Binary files /dev/null and b/assets/images/proverb/1796578_742219915790817_467451055_n.jpg differ diff --git a/assets/images/proverb/1896984_877654185608808_4833142602339596450_n.jpg b/assets/images/proverb/1896984_877654185608808_4833142602339596450_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2a801db35d835f908b49b39c726cdc42b6021d78 Binary files /dev/null and b/assets/images/proverb/1896984_877654185608808_4833142602339596450_n.jpg differ diff --git a/assets/images/proverb/1911807_10152803248137731_8226952574363629301_n.jpg b/assets/images/proverb/1911807_10152803248137731_8226952574363629301_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c9178c35862400a4253728b4454813efb3542008 Binary files /dev/null and b/assets/images/proverb/1911807_10152803248137731_8226952574363629301_n.jpg differ diff --git a/assets/images/proverb/2-1.jpg b/assets/images/proverb/2-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..861c657feea365515cb10da57f88c4cccd29b7b1 Binary files /dev/null and b/assets/images/proverb/2-1.jpg differ diff --git a/assets/images/proverb/2-2.jpg b/assets/images/proverb/2-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..402fcfaab5712aef423dc59f6beabd796bf3e89d Binary files /dev/null and b/assets/images/proverb/2-2.jpg differ diff --git a/assets/images/proverb/2.jpg b/assets/images/proverb/2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c4eba462b238a7c57193ac119078a2c13db4ea7 Binary files /dev/null and b/assets/images/proverb/2.jpg differ diff --git a/assets/images/proverb/201efc74-40c6-11e3-b77e-22000a88033d-large.jpg b/assets/images/proverb/201efc74-40c6-11e3-b77e-22000a88033d-large.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fa897ca282772a3bdd08f7364379ba674c9fd52e Binary files /dev/null and b/assets/images/proverb/201efc74-40c6-11e3-b77e-22000a88033d-large.jpg differ diff --git a/assets/images/proverb/20421_815020641881035_2020354823983162403_n.jpg b/assets/images/proverb/20421_815020641881035_2020354823983162403_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..49b85e857b2cddfe33d3f2047e7e94d3ac2e5c47 Binary files /dev/null and b/assets/images/proverb/20421_815020641881035_2020354823983162403_n.jpg differ diff --git a/assets/images/proverb/252297_196204637171161_1432714009_n.jpg b/assets/images/proverb/252297_196204637171161_1432714009_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..45b651843075d7cb5ef2751621957267a8823202 Binary files /dev/null and b/assets/images/proverb/252297_196204637171161_1432714009_n.jpg differ diff --git a/assets/images/proverb/252323_430911580263673_870503895_n.jpg b/assets/images/proverb/252323_430911580263673_870503895_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e5363a2c1ba219bec7bd827d6c3e387ae1718e97 Binary files /dev/null and b/assets/images/proverb/252323_430911580263673_870503895_n.jpg differ diff --git a/assets/images/proverb/267922_466326830088973_159945815_n.jpg b/assets/images/proverb/267922_466326830088973_159945815_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6304d04ea8ed0693226a451c0978722ba73cea31 Binary files /dev/null and b/assets/images/proverb/267922_466326830088973_159945815_n.jpg differ diff --git a/assets/images/proverb/282652_10151033714741757_1142108827_n.jpg b/assets/images/proverb/282652_10151033714741757_1142108827_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..1aecb621b8f32e2b152b74d6350919aeabee1176 Binary files /dev/null and b/assets/images/proverb/282652_10151033714741757_1142108827_n.jpg differ diff --git a/assets/images/proverb/3-1.jpg b/assets/images/proverb/3-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..be275b5121db2c73ea187d5fcc24ad2fd5cd2adb Binary files /dev/null and b/assets/images/proverb/3-1.jpg differ diff --git a/assets/images/proverb/4-1.jpg b/assets/images/proverb/4-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c5f8ecfd056493c402440f509be6f26faebff546 Binary files /dev/null and b/assets/images/proverb/4-1.jpg differ diff --git a/assets/images/proverb/4-2.jpg b/assets/images/proverb/4-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..172a76ea328ee0a64fbced75a8693b5a93b55bcd Binary files /dev/null and b/assets/images/proverb/4-2.jpg differ diff --git a/assets/images/proverb/4-3.jpg b/assets/images/proverb/4-3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c4832074683522d3c38307d8b60f2b117304a51 Binary files /dev/null and b/assets/images/proverb/4-3.jpg differ diff --git a/assets/images/proverb/48117_10151424853568908_1598592539_n.jpg b/assets/images/proverb/48117_10151424853568908_1598592539_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0fb47caba46ed9cbafd01914c12e14968921485a Binary files /dev/null and b/assets/images/proverb/48117_10151424853568908_1598592539_n.jpg differ diff --git a/assets/images/proverb/5-1.jpg b/assets/images/proverb/5-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..167f7eb66a520eb09de61194da47ff779d2f3857 Binary files /dev/null and b/assets/images/proverb/5-1.jpg differ diff --git a/assets/images/proverb/5-3.jpg b/assets/images/proverb/5-3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c23797e8dc1557d20f1ed94877ac9d9adc9c24c7 Binary files /dev/null and b/assets/images/proverb/5-3.jpg differ diff --git a/assets/images/proverb/540930_502064733188010_244750439_n.jpg b/assets/images/proverb/540930_502064733188010_244750439_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c49137ea5c7be15890d80285210e5016baf65088 Binary files /dev/null and b/assets/images/proverb/540930_502064733188010_244750439_n.jpg differ diff --git a/assets/images/proverb/555800_543200002425030_1348269033_n.jpg b/assets/images/proverb/555800_543200002425030_1348269033_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37f99aeb37a083e940a9e84592b458a094c4326b Binary files /dev/null and b/assets/images/proverb/555800_543200002425030_1348269033_n.jpg differ diff --git a/assets/images/proverb/601287_491779910871429_688813851_n.jpg b/assets/images/proverb/601287_491779910871429_688813851_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e3b4070a24b8b875fcc0eba355fa869d092025e9 Binary files /dev/null and b/assets/images/proverb/601287_491779910871429_688813851_n.jpg differ diff --git a/assets/images/proverb/61876_677932762258876_579725015_n.jpg b/assets/images/proverb/61876_677932762258876_579725015_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9f873a5c49a1bdaabeff4f0c1dd5171d998be48b Binary files /dev/null and b/assets/images/proverb/61876_677932762258876_579725015_n.jpg differ diff --git a/assets/images/proverb/69631_156767324472341_177975296_n.jpg b/assets/images/proverb/69631_156767324472341_177975296_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bdb60847e4cdf2ccc34949c470b83cd6b99ec009 Binary files /dev/null and b/assets/images/proverb/69631_156767324472341_177975296_n.jpg differ diff --git a/assets/images/proverb/7-1.jpg b/assets/images/proverb/7-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fd0f9190238b4207375a83ed3f2b3ccd8d55413e Binary files /dev/null and b/assets/images/proverb/7-1.jpg differ diff --git a/assets/images/proverb/7-2.jpg b/assets/images/proverb/7-2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2524f99b1c0a54e43b9f553df22873c2f48c2816 Binary files /dev/null and b/assets/images/proverb/7-2.jpg differ diff --git a/assets/images/proverb/8-3.jpg b/assets/images/proverb/8-3.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93be80a63a217e206ecaba2f981ef1f8e734cfe0 Binary files /dev/null and b/assets/images/proverb/8-3.jpg differ diff --git a/assets/images/proverb/9-1.jpg b/assets/images/proverb/9-1.jpg new file mode 100644 index 0000000000000000000000000000000000000000..eeb7b1dde9d858621a2f040e8f0ab74a4ffcef4e Binary files /dev/null and b/assets/images/proverb/9-1.jpg differ diff --git a/assets/images/proverb/MASAI-12.jpg b/assets/images/proverb/MASAI-12.jpg new file mode 100644 index 0000000000000000000000000000000000000000..33d704222dd38bd0d376b7e274cc30a8b1ef78cb Binary files /dev/null and b/assets/images/proverb/MASAI-12.jpg differ diff --git a/assets/images/proverb/The_Smiling_Sage.jpg b/assets/images/proverb/The_Smiling_Sage.jpg new file mode 100644 index 0000000000000000000000000000000000000000..26c3c6b486bf9e838c01d6d71ca714063dc033c6 Binary files /dev/null and b/assets/images/proverb/The_Smiling_Sage.jpg differ diff --git a/assets/images/proverb/from-human-to-number.jpg b/assets/images/proverb/from-human-to-number.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8bac85883958f3ec60398b421b1910c756149232 Binary files /dev/null and b/assets/images/proverb/from-human-to-number.jpg differ diff --git a/assets/images/proverb/illu_la_bas-19e0f.jpg b/assets/images/proverb/illu_la_bas-19e0f.jpg new file mode 100644 index 0000000000000000000000000000000000000000..84ceb1e77bd727283a9981c42ced2e4ee8ce9b06 Binary files /dev/null and b/assets/images/proverb/illu_la_bas-19e0f.jpg differ diff --git a/assets/images/proverb/images.jpg b/assets/images/proverb/images.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ac807b47720f84bc4fc068768a5c126de80e504a Binary files /dev/null and b/assets/images/proverb/images.jpg differ diff --git a/assets/images/proverb/john-lennon-quote-1868058004-12.jpg b/assets/images/proverb/john-lennon-quote-1868058004-12.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ef442e0fdc146ebcc3e130ec6742b56443e3bc3d Binary files /dev/null and b/assets/images/proverb/john-lennon-quote-1868058004-12.jpg differ diff --git a/assets/images/proverb/lad-26.jpg b/assets/images/proverb/lad-26.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f8a7d38c19ae53270394156309c06f5ac18e19e8 Binary files /dev/null and b/assets/images/proverb/lad-26.jpg differ diff --git a/assets/images/proverb/lad-28ktif.jpg b/assets/images/proverb/lad-28ktif.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d85a712b79c964a50fa84f409f9c9d6a1cffe7e5 Binary files /dev/null and b/assets/images/proverb/lad-28ktif.jpg differ diff --git a/assets/images/proverb/let's be smart.png b/assets/images/proverb/let's be smart.png new file mode 100644 index 0000000000000000000000000000000000000000..b52abb318a49b491923558d78ad4dc1a6b63c538 Binary files /dev/null and b/assets/images/proverb/let's be smart.png differ diff --git a/assets/images/screens.png b/assets/images/screens.png new file mode 100644 index 0000000000000000000000000000000000000000..eb2d5854c2aab5f4b711f29e3ae99e9c4b075952 Binary files /dev/null and b/assets/images/screens.png differ diff --git a/assets/images/screenshots/discuss.png b/assets/images/screenshots/discuss.png new file mode 100644 index 0000000000000000000000000000000000000000..48d4c0a5edb00d02696ac1925fa00fc1885840ce Binary files /dev/null and b/assets/images/screenshots/discuss.png differ diff --git a/assets/images/screenshots/survey.png b/assets/images/screenshots/survey.png new file mode 100644 index 0000000000000000000000000000000000000000..3670c3fd3ff9a83821dbb9c43d0a535f7f149384 Binary files /dev/null and b/assets/images/screenshots/survey.png differ diff --git a/assets/images/sig/ajax-loader.gif b/assets/images/sig/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..4e651edc478b3db7ad5758bdb912e890e884aaf7 Binary files /dev/null and b/assets/images/sig/ajax-loader.gif differ diff --git a/assets/images/sig/btn_go_home.png b/assets/images/sig/btn_go_home.png new file mode 100644 index 0000000000000000000000000000000000000000..48843a6af5e57c01a421d911066a4595629a1a65 Binary files /dev/null and b/assets/images/sig/btn_go_home.png differ diff --git a/assets/images/sig/flag.png b/assets/images/sig/flag.png new file mode 100644 index 0000000000000000000000000000000000000000..2b0f9fc8d0aae73e8427548f0577fe9f9f5b4e4c Binary files /dev/null and b/assets/images/sig/flag.png differ diff --git a/assets/images/sig/ico_filter_pseudo.png b/assets/images/sig/ico_filter_pseudo.png new file mode 100644 index 0000000000000000000000000000000000000000..1637baafb4774205c483763c9b47c3c48ef399ad Binary files /dev/null and b/assets/images/sig/ico_filter_pseudo.png differ diff --git a/assets/images/sig/markers/ASSO_A.png b/assets/images/sig/markers/ASSO_A.png new file mode 100644 index 0000000000000000000000000000000000000000..082d09024e3b7fe72b89df043949159734533b57 Binary files /dev/null and b/assets/images/sig/markers/ASSO_A.png differ diff --git a/assets/images/sig/markers/ASSO_B.png b/assets/images/sig/markers/ASSO_B.png new file mode 100644 index 0000000000000000000000000000000000000000..4db34ecc7c666d54cf27d1409799641bc6e01ae0 Binary files /dev/null and b/assets/images/sig/markers/ASSO_B.png differ diff --git a/assets/images/sig/markers/ASSO_B2.png b/assets/images/sig/markers/ASSO_B2.png new file mode 100644 index 0000000000000000000000000000000000000000..b3e0c68d054a93c912b2ea747320585e8f8a8d1b Binary files /dev/null and b/assets/images/sig/markers/ASSO_B2.png differ diff --git a/assets/images/sig/markers/CITOYEN_A.png b/assets/images/sig/markers/CITOYEN_A.png new file mode 100644 index 0000000000000000000000000000000000000000..9af38f07959e8044b2a3f5d066be88044fd4129e Binary files /dev/null and b/assets/images/sig/markers/CITOYEN_A.png differ diff --git a/assets/images/sig/markers/CLASSIFIED_A.png b/assets/images/sig/markers/CLASSIFIED_A.png new file mode 100644 index 0000000000000000000000000000000000000000..2629d604034f235ca2fb1a36cd76d543bc9bb826 Binary files /dev/null and b/assets/images/sig/markers/CLASSIFIED_A.png differ diff --git a/assets/images/sig/markers/CLASSIFIED_B.png b/assets/images/sig/markers/CLASSIFIED_B.png new file mode 100644 index 0000000000000000000000000000000000000000..701bb4fe4fedabf7f6c756e7f82e0644ff1fddd6 Binary files /dev/null and b/assets/images/sig/markers/CLASSIFIED_B.png differ diff --git a/assets/images/sig/markers/COLLECTIVITE_A.png b/assets/images/sig/markers/COLLECTIVITE_A.png new file mode 100644 index 0000000000000000000000000000000000000000..82e859db879ce8c38149c3e626ada88022d70ffa Binary files /dev/null and b/assets/images/sig/markers/COLLECTIVITE_A.png differ diff --git a/assets/images/sig/markers/COLLECTIVITE_B.png b/assets/images/sig/markers/COLLECTIVITE_B.png new file mode 100644 index 0000000000000000000000000000000000000000..b5373b9363c83e6022980b8f16bd012c9197f755 Binary files /dev/null and b/assets/images/sig/markers/COLLECTIVITE_B.png differ diff --git a/assets/images/sig/markers/COLLECTIVITE_B2.png b/assets/images/sig/markers/COLLECTIVITE_B2.png new file mode 100644 index 0000000000000000000000000000000000000000..f48268c5a1c5b358e14791eac083214cd6b5107a Binary files /dev/null and b/assets/images/sig/markers/COLLECTIVITE_B2.png differ diff --git a/assets/images/sig/markers/ENTREPRISES_A.png b/assets/images/sig/markers/ENTREPRISES_A.png new file mode 100644 index 0000000000000000000000000000000000000000..24446e328d6e3a3479f2b56681671f843b5e6d8f Binary files /dev/null and b/assets/images/sig/markers/ENTREPRISES_A.png differ diff --git a/assets/images/sig/markers/ENTREPRISES_B.png b/assets/images/sig/markers/ENTREPRISES_B.png new file mode 100644 index 0000000000000000000000000000000000000000..701bb4fe4fedabf7f6c756e7f82e0644ff1fddd6 Binary files /dev/null and b/assets/images/sig/markers/ENTREPRISES_B.png differ diff --git a/assets/images/sig/markers/ENTREPRISES_B2.png b/assets/images/sig/markers/ENTREPRISES_B2.png new file mode 100644 index 0000000000000000000000000000000000000000..dfa4f574ede8bcb065d719239187c15681cef66b Binary files /dev/null and b/assets/images/sig/markers/ENTREPRISES_B2.png differ diff --git a/assets/images/sig/markers/EVENEMENTS_A.png b/assets/images/sig/markers/EVENEMENTS_A.png new file mode 100644 index 0000000000000000000000000000000000000000..41071e7be907a79eb24b06e37de2b5f0c731104d Binary files /dev/null and b/assets/images/sig/markers/EVENEMENTS_A.png differ diff --git a/assets/images/sig/markers/EVENEMENTS_B.png b/assets/images/sig/markers/EVENEMENTS_B.png new file mode 100644 index 0000000000000000000000000000000000000000..16b7010ea6bded18e89c0c80a2288599473b8f1d Binary files /dev/null and b/assets/images/sig/markers/EVENEMENTS_B.png differ diff --git a/assets/images/sig/markers/EVENEMENTS_B2.png b/assets/images/sig/markers/EVENEMENTS_B2.png new file mode 100644 index 0000000000000000000000000000000000000000..3638b5bb57d01185c7abcb39293e4a55f84946c2 Binary files /dev/null and b/assets/images/sig/markers/EVENEMENTS_B2.png differ diff --git a/assets/images/sig/markers/MARKER.png b/assets/images/sig/markers/MARKER.png new file mode 100644 index 0000000000000000000000000000000000000000..9744e6ab01cbba06921f8a50d1de908e865fb545 Binary files /dev/null and b/assets/images/sig/markers/MARKER.png differ diff --git a/assets/images/sig/markers/NEWS_A.png b/assets/images/sig/markers/NEWS_A.png new file mode 100644 index 0000000000000000000000000000000000000000..d18dfebf2aee1cc4c05a9b0b092930655ee5ce2f Binary files /dev/null and b/assets/images/sig/markers/NEWS_A.png differ diff --git a/assets/images/sig/markers/PROJET_A.png b/assets/images/sig/markers/PROJET_A.png new file mode 100644 index 0000000000000000000000000000000000000000..95714f1004f26297216f31f36ffb4b28d5d4859d Binary files /dev/null and b/assets/images/sig/markers/PROJET_A.png differ diff --git a/assets/images/sig/markers/PROJET_B.png b/assets/images/sig/markers/PROJET_B.png new file mode 100644 index 0000000000000000000000000000000000000000..ab4b24865c3dc6345e40e619f040870f5c2a4283 Binary files /dev/null and b/assets/images/sig/markers/PROJET_B.png differ diff --git a/assets/images/sig/markers/PROJET_B2.png b/assets/images/sig/markers/PROJET_B2.png new file mode 100644 index 0000000000000000000000000000000000000000..e03868116e44a7d5f8ac299f8c1c18d76a3baafe Binary files /dev/null and b/assets/images/sig/markers/PROJET_B2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-01.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-01.svg new file mode 100644 index 0000000000000000000000000000000000000000..657e41d19e1e205998dc880cfa4647b2483145fe --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-01.svg @@ -0,0 +1,894 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="196px" height="226px" viewBox="0 0 196 226" enable-background="new 0 0 196 226" xml:space="preserve"> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzEAAAOuCAYAAAA3ppkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAu7NJREFUeNrsnYmO4zqQLVPq/v8/ +7tLDA+YCNR6TPLmQouwIoNFV3soLbWcoF5oBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAMBMDp4CAAC46Tvk4ikEAAAkBgAA+KxHjgAA+GIDAAA+vxEeAADg +SxAAAPhsRnQAAIAvSgAAPn8BwQEA4EsUAAD4jAUEBwCAL1gAAD5LeYxfHfgjNwAAfPECAPCZyef8 +R4gCcgMAwJcbAMBHfz7y+f0d4oDYAADwJQgA8IjPQj6bEQnEBgCAL0oAgO0+944vf/yfEthfX/74 +AQD4MgMA+LDPuePDHx/Ss69YIDUAwJc7AACfa7f8zePDn7fdg/PrAx4DUgMAfNkDAPA5Vv73joc/ +H0/h+rLbQ2oAgC9/AIAv/dw6NrqdT8j2PCEIvza6b5+QdQIA4MsLAPic2vzvHA+//p1/4wk9KtcG +j3GVbCA1AEBwAACw2WfTncJy3HB/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2VFE3XswAAAABJRU5ErkJg +gg==" transform="matrix(0.24 0 0 0.24 0.1147 0.5742)"> + </image> + <g> + <path fill="#F6E203" d="M156.195,156.655c32.199-32.216,32.199-84.431,0-116.625C123.999,7.832,71.789,7.832,39.582,40.029 + c-32.214,32.195-32.214,84.41,0,116.626c1.028,1.027,2.077,2.01,3.146,2.98c0.242,0.283,0.423,0.592,0.719,0.863l46.264,46.281 + c4.514,4.502,11.863,4.502,16.34,0l45.438-45.42c0.398-0.393,0.716-0.846,1.034-1.268 + C153.771,158.978,155.012,157.843,156.195,156.655"/> + </g> + </g> + <g> + <defs> + <path id="SVGID_5_" d="M97.896,23.857c-19.432,0-38.824,7.383-53.621,22.17c-27.771,27.758-29.428,71.898-5.033,101.658 + c1.565,1.91,3.268,3.763,5.033,5.55c29.57,29.572,77.66,29.572,107.229,0c1.412-1.412,2.744-2.896,4.051-4.412 + c25.41-29.746,24.077-74.658-4.051-102.793c-14.771-14.791-34.201-22.174-53.601-22.174 + C97.903,23.857,97.898,23.857,97.896,23.857"/> + </defs> + <use xlink:href="#SVGID_5_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_5_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_7_" x="1.463" y="18.058" width="181.092" height="181.089"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_7_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> + <path fill="#F6E203" d="M119.09,108.304c-3.414-1.494-8.452-5.447-15.966-6.805c1.869-2.051,3.34-5.248,4.828-9.093 + c0.892-2.182,0.705-4.09,0.705-6.736c0-1.963,0.415-5.144-0.057-6.918c-1.698-5.906-5.884-7.509-10.791-7.509 + c-4.887,0-9.145,1.607-10.769,7.52c-0.474,1.778-0.113,4.944-0.113,6.907c0,2.658-0.125,4.566,0.75,6.747 + c1.494,3.852,2.919,7.06,4.819,9.11c-7.483,1.363-12.499,5.288-15.903,6.781c-7.043,3.164-7.054,6.583-7.054,6.583v5.884h56.691 + v-5.884C126.229,114.892,126.161,111.473,119.09,108.304"/> +</g> +<rect id="_x3C_Tranche_x3E__7_" fill="none" width="196" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-02.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-02.svg new file mode 100644 index 0000000000000000000000000000000000000000..d908df8627e15b618fe609c4e46c7861949bf3b0 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-02.svg @@ -0,0 +1,954 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="227px" viewBox="0 0 197 227" enable-background="new 0 0 197 227" xml:space="preserve"> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M315.642,22.891c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C315.643,22.891,315.642,22.891,315.642,22.891"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="104.282" y="-17.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M732.258,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C732.262,22.547,732.262,22.547,732.258,22.547"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="151.16" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAvBtJREFUeNrsnety6jrTbtvOvP87 +Dt5/vlWVzWtLTx8kyzBG1ayZACHECOjhPsgMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAA+mY1DAAAAC3yeHBxCAABAagAAgPd9ZAkAgA83AADgvfyLQYAA +APggBAAA3qcRHwAA4MMSAID3YkB4AACAD1IAAN5vAeEBAOBDFgAAeF+9+2/8BhFAdgAA+PAFAOD9 +k/f8jxQHZAcAgA84AICvea/kffx7RALRAQDgwxAA4JHvi7xPIxaID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90kMAMAfNwCA +vwMkBgD8MQMA4Gx/GwgMAIDUAADe/u8GcQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAECV/yfAAJOhOjKulyeBAAAAAElFTkSuQmCC" transform="matrix(0.24 0 0 0.24 0.7539 0.5762)"> + </image> + <g> + <path fill="#0CB9ED" d="M156.832,156.636c32.217-32.217,32.217-84.412,0-116.606c-32.213-32.195-84.41-32.195-116.609,0 + c-32.215,32.194-32.215,84.389,0,116.606c1.027,1.049,2.053,2.006,3.139,2.986c0.236,0.271,0.441,0.582,0.705,0.881 + l46.285,46.262c4.496,4.52,11.842,4.52,16.355,0l45.406-45.4c0.393-0.395,0.709-0.854,1.047-1.291 + C154.388,158.954,155.632,157.845,156.832,156.636"/> + </g> + </g> + <path fill="#FFFFFF" d="M44.919,151.923c-1.791-1.753-3.459-3.612-5.027-5.543c-24.422-29.768-22.768-73.87,5.027-101.656 + c29.541-29.551,77.658-29.545,107.209,0c28.139,28.129,29.473,73.049,4.051,102.811c-1.281,1.49-2.619,2.977-4.051,4.389 + C122.578,181.505,74.46,181.511,44.919,151.923"/> + </g> + </g> + <g> + <path fill="#00B6EB" d="M85.385,77.871c0.473,0,0.881,0.173,1.227,0.519c0.345,0.345,0.518,0.753,0.518,1.226v24.283 + l14.608-11.692c0.309-0.254,0.672-0.381,1.09-0.381c0.472,0,0.881,0.173,1.226,0.518c0.345,0.346,0.518,0.755,0.518,1.227v10.329 + l14.608-11.692c0.309-0.254,0.672-0.381,1.09-0.381c0.473,0,0.881,0.173,1.227,0.518c0.345,0.346,0.518,0.755,0.518,1.227v31.396 + c0,0.473-0.173,0.881-0.518,1.227c-0.345,0.345-0.754,0.518-1.227,0.518H74.92c-0.473,0-0.882-0.173-1.227-0.518 + c-0.346-0.346-0.518-0.754-0.518-1.227V79.615c0-0.473,0.172-0.881,0.518-1.226c0.345-0.346,0.753-0.519,1.227-0.519H85.385z"/> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M732.258,300.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C732.262,300.547,732.262,300.547,732.258,300.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_23_" x="151.16" y="-146.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__6_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-03.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-03.svg new file mode 100644 index 0000000000000000000000000000000000000000..4da782daa30f129ad9f5c829a5067975c007d9fc --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-03.svg @@ -0,0 +1,974 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="200px" height="226.667px" viewBox="0 0 200 226.667" enable-background="new 0 0 200 226.667" xml:space="preserve"> +<g> + <g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAwDNJREFUeNrs/Ylu4zzTdo2WlD7/ +M76jHxv4HiDbr0ReNZCi5LWARieeksi0XUs10AwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAN7MxiEAAIAFPk8ODiEAACA1AADA+z6yBADAhxsAAPBe/sUg +QAAAfBACAADv04gPAADwYQkAwHsxIDwAAMAHKQAA77eA8AAA8CELAAC8r979N36DCCA7AAB8+AIA +8P7Je/4rxQHZAQDgAw4A4GveK3kf/x6RQHQAAPgwBAB45Psi79OIBaIDAMCHJQDA0u+B25f//W8K +9I8v/tsBAJAaAAAEgvf0l4vA8fK/DwAAqQEAeNF73PaCv+Upnw3HC37W8fLjBgDABxcAwOLvaduX +Pd5bOL7s8ZAcACAAAADgPaz052yL/t1P/zw4Fn3MY+G/D8EBAAICAAAkZuhjbA84VqN+xhN6XI4F +/sa39wIBACA1AMD71APkYXvY7/tE7pCP46bfdYaEIDkAgNQAADxcYraX3edtnwXH5PuufJ8ZEoLg +AABSAwAw6b1om3i/bYHbfpPgzM7CHAvcFskBAEBqAOAL3n9mSMyI2243/55P+3yYFdgfi98uezze +NKoaAAgqAAAe+56zisTMvM0oCfoGqblDPmbeJnN8EBwAIMAAAFhYYmYLzIzHQGrG3a/iNsciv8dq +koPgAABSAwBf+94ySmTulo+R940eu6d9Lowo0xopLMeNP3s1yUFwAACpAQBE5gaJecp1kWM4o8dp +lSb1u6Rl9nUjJQfBAQCkBgB4D1lEYqqFYtZ9sn9b9vmb9dlxZ4lZtWRU3me05CA4AIDUAADvGwuL +TKV03HX5DNl5wudDVQZilrzcdXlWgryScdz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1shMase+yypOUtMVjUAEJ0BAFIDAF8vNhmhWSUxGZGp1NGskJqMaKyQ +mtF1EYEhNABAagDgq8RmJAxVucneNiM0lb8pVbFZITlnyQyhAQBSAwAf+Tv0rKhNRXhmZCZyuUom +8lGRkKq4XBmdITQAQGoA4CPEZqXczAhMNTITOSb7iXJzhsBcEZ0hNABAagDgrcVmJDIr5SYjLysb +A1QW9GcJzhUyk5EUMgMAE/zjEADAS8nNynbQq8Qisqjfiwvz3mP3ictnpJKJzgDAB/wBBgBcIzYr +5GYkO1dEZ7aJBfzKqM2VMkNoAIDUAMBX/m69Um5WXD77b0g0+rEqkpMRl1UyQ2gAYCHSzwDgNeRm +K9x2hfBczUwDgRXiU5GZrKCQGQAgNQDwsWJzpty8osDMSk1VbLLiIjoDAKQGAIjN4sdsC66fue4d +xaYiLStlhtAAwIv9oQUAXPM7d5u4fcVcmW3hazlbbFaJDJkBAFIDADjh9+5quZkRliv/blTrWPbF +jyE0AEBqAAAXyc2ZsrJyf8+QgzMjL2QGAEgNAGDx7+BtwX1WSsyqvyX7ovvtFz0PmQEAUgMAWPC7 +eLvwPs/4u7FSQM6KyhAaACA1AICL5OZqeVmZfnaW6JAZACA1AIA3lZur7j/LmXNg9ov3DQBAagDA +7+gLHv9ufxeeUfdCZgCA1AAAnvC7envy8z9LYFaKCJkBAFIDAHih39mvuK2V0vCq2wIAkBoAwEm/ +u9/978H+JtsEAPgjBgC46Hf4K/992N902wAAUgMAeJHf51c915WCQWYAwB9BAIDf7W8HkQEAf/gA +AH7PExkAgD92AAC/90kMAMAfNwCAvwMkBgD8MQMA4N3+NhAYAACpAQC8/N8M4gIAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAs/0uAAQAbmtKiLxkA +kwAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 1.8643 0.2373)"> + </image> + <g> + <path fill="#E6344C" d="M157.925,156.308c32.219-32.215,32.219-84.411,0-116.604C125.731,7.491,73.51,7.491,41.317,39.704 + c-32.193,32.193-32.193,84.39,0,116.608c1.02,1.031,2.072,2.002,3.13,2.984c0.235,0.279,0.46,0.583,0.708,0.878l46.286,46.262 + c4.518,4.52,11.865,4.52,16.357,0l45.426-45.401c0.395-0.392,0.71-0.854,1.027-1.29 + C155.501,158.626,156.746,157.517,157.925,156.308"/> + </g> + </g> + </g> + <g> + <defs> + <path id="SVGID_1_" d="M99.642,22.558c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C99.643,22.558,99.642,22.558,99.642,22.558"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="-111.718" y="-17.552" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + <g> + <path fill="#E6344C" d="M80.627,95.503v20.59c-3.325,0.287-3.597,0.554-3.365,3.438h44.925c-0.158-0.931-0.117-1.865-0.503-2.568 + c-0.629-1.173-1.963-0.71-3.127-0.873V95.501h-6.88v20.596h-3.438V95.524h-6.916v20.566h-3.438V95.518H90.97v20.575H87.53v-20.59 + H80.627z"/> + <path fill="#E6344C" d="M79.527,93.723c13.367,0,26.763,0,40.156,0c1.415,0,1.951-0.362,2.463-1.731h3.354 + c0-0.974-0.066-1.835,0.005-2.692c0.042-0.62-0.199-0.854-0.739-1.043c-8.123-3.25-16.217-6.486-24.34-9.715v-9.79 + c0-0.334-0.273-0.62-0.62-0.62c-0.32,0-0.595,0.286-0.595,0.62v9.691c-0.077,0.018-0.16,0.012-0.232,0.05 + c-2.969,1.143-5.931,2.344-8.868,3.534c-5.193,2.054-10.389,4.143-15.579,6.226c-0.278,0.109-0.709,0.348-0.74,0.574 + c-0.078,1.024-0.038,2.1-0.038,3.187h3.389C77.581,93.334,78.127,93.723,79.527,93.723"/> + <path fill="#E6344C" d="M125.462,123.001c-0.068-0.469-0.424-1.039-0.815-1.29c-0.396-0.301-1.018-0.38-1.556-0.38 + c-15.636-0.006-31.299-0.005-46.961-0.005c-0.233,0-0.467-0.005-0.7,0.006c-0.822,0.087-1.569,0.694-1.611,1.415 + c-0.076,1.236-0.032,2.463-0.032,3.707h51.688C125.476,125.236,125.577,124.115,125.462,123.001"/> + <path fill="#E6344C" d="M102.031,75.083c1.362-0.5,3.679-1.248,3.317-0.028c-0.314,1.034,3.641,0.186,3.641,0.186 + s-0.278-2.115,0.074-3.361c0.353-1.243,0.039-1.903,0.039-1.903s-1.803,0.076-2.775,0.185c-0.548,0.074-0.199-1.01-0.199-1.205 + c0-0.984-4.999,0.427-4.999,0.427v5.747C101.129,75.131,101.489,75.306,102.031,75.083"/> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M516.258,22.213c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C516.262,22.213,516.262,22.213,516.258,22.213"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="-64.84" y="-424.946" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M516.258,300.213c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C516.262,300.213,516.262,300.213,516.258,300.213"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_23_" x="-64.84" y="-146.946" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-04.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-04.svg new file mode 100644 index 0000000000000000000000000000000000000000..aa104e3bcbf1aabe773622a719967f572e9768fd --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-04.svg @@ -0,0 +1,913 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="227px" viewBox="0 0 197 227" enable-background="new 0 0 197 227" xml:space="preserve"> +<g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAsuBJREFUeNrsvelu4zzTdltW+vyP +eD/R9+sFbmRb5FUTRdlrAY1OPMWWabuWa6AZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAB8Mi8OAQAA3PxZcnIIAQAAqQEAAN7zkSUAAD7gAACA9/EvBgEC +AODDEAAAeI9GfAAAgA9MAADehwHhAQAAPkwBAHivBYQHAIAPWgAA4D317sf4DSKA7AAA8AEMAMB7 +J+/3HykOyA4AAB9yAABf8z7Je/j3iASiAwDAByIAwCPfE3mPRiwQHQAAPjABALZ+/3t9+eP/pED/ +/OLHDgDAhzoAAALB+/mHi8D54Y8PAACpAQD4oPe31wc8lqd8Lpwf8LfODz9uAAB8eAEAbP5+9vqy +2/sUzi+7PSQHAAgCAAB4/yr9O69NH/fTPwvOTW/z3PjxITkAQFAAAIDEtN7G6wHHqutvPKHH5dzg +MX56LxAAAFIDALxHPUAeXg+7v0/kDvk4b7qvKyQEyQEApAYA4OES8/qw63za58C5+Lo7X2eFhCA4 +AIDUAAAseh96Lbzea4PLfpPgrM7CnBtcFskBAEBqAOAL3ntWSEzHZV8338+nfTasCuzPzS+XPR6f +NKoaAAgsAAAe+36zi8SsvEyXBH2D1NwhHysvkzk+CA4AEGQAAGwsMasFZsVtIDV916u4zLnJ/dhN +chAcAEBqAOBr31e6ROZu+ei8bvTYPe0zoaNMq1NYzhv/9m6Sg+AAAFIDAIjMDRLzlPMix3BFj9Mu +Tep3Scvq8zolB8EBAKQGAHj/2ERiqoVi1XWyjy37/K363LizxKxaMiqv0y05CA4AIDUAwHvGxiJT +KR13nb5Cdp7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d0JwBFqszkgQ1kuRn +6sLbruJmBS67VmcuCxfwO1dtnokZoJEkqJGkn/y5+kzc7Pj92f9+ZFc/dq3kVOCyCzNAI0lQI0lf +9/O1s6XrGeB5NmpWtqPtgE8HM1WgwIwkQY0kffXP2LNwswKYd0VNFzZVuFidkSSokSQ/Zze/z2XD +n6+C5sx/P86ATQctOzEDNJIENZL0kz9vLwt/v2PF5RWgWQHFM1ZfYEaSoEaS/Mw94X12ruq8GjMV +DOwEy33D5wM0kgQ1kuRn74b3OQsrOz/fM3Bw5soLzEgS1EiSNv/8vWx4m52I2fXvyH3T292f9HFg +RpKgRpK04efw5Ylv84p/M3YC5KxVGaCRJKiRJD0JN8/Gy87tZ2dBB2YkyT+ikqQPxc2z3n61M8+B +uT/5c5MkQY0k+fn8hPf/tH8TXnHfC8xIEtRIkl7wc/ry4o//KsDshAjMSBLUSJLe6Of1Oz7WTjS8 +62NJkqBGknTSz+1P/7fg/iGPKUmCGknSk35+v/O/DfcPfWxJEtRIkt7kZ/mzPtYzgQEzkuQfQkmS +n+sfF8hIkn/8JEl+xoOMJMk/eJIkP/MhRpLkHzhJkn8DIEaS/IMmSdKn/bsAMJIkqJEkvf2/F+Ai +SZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZKkTv8j +wABgYeteuwAxNgAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 0.54 0.5728)"> + </image> + <g> + <path fill="#FAB216" d="M156.619,156.655c32.21-32.205,32.21-84.414,0-116.629c-32.223-32.195-84.422-32.195-116.615,0 + c-32.208,32.215-32.208,84.424,0,116.633c1.021,1.02,2.064,2.012,3.133,2.98c0.236,0.291,0.455,0.604,0.707,0.857l46.305,46.297 + c4.477,4.484,11.824,4.484,16.338,0l45.402-45.412c0.395-0.418,0.725-0.854,1.062-1.289 + C154.197,158.983,155.41,157.839,156.619,156.655"/> + </g> + </g> + <path fill="#FFFFFF" d="M175.286,98.604c0,42.435-34.408,76.813-76.841,76.813c-42.435,0-76.857-34.379-76.857-76.813 + c0-42.437,34.423-76.854,76.857-76.854C140.877,21.75,175.286,56.167,175.286,98.604"/> + <path fill="#FAB216" d="M116.421,76.325v-2.967c0-2.902-1.824-4.654-4.92-4.654c-3.064,0-4.922,1.752-4.922,4.654v2.967h-3.32 + v-2.967c0-2.902-1.844-4.654-4.912-4.654c-3.098,0-4.916,1.752-4.916,4.654v2.967h-3.346v-2.967c0-2.902-1.84-4.654-4.92-4.654 + c-3.088,0-4.922,1.752-4.922,4.654v2.967h-9.92v47.425h55.945V76.325H116.421z M82.89,81.274v-7.916 + c0-1.438,0.641-2.016,2.275-2.016s2.273,0.578,2.273,2.016v7.916c0,1.441-0.639,2.029-2.273,2.029S82.89,82.716,82.89,81.274 + M90.402,113.151c-1.639,0-3.359-0.318-4.66-0.828l0.447-3.33c1.625,0.605,2.953,0.859,4.635,0.859 + c2.068,0,3.398-1.078,3.398-2.477c0-1.891-1.232-2.674-4.928-2.891v-3.332c2.572-0.189,4.072-0.863,4.072-2.449 + c0-1.092-0.561-1.811-2.695-1.811c-1.361,0-2.691,0.387-3.938,0.994l-0.459-3.332c1.635-0.75,3.582-0.982,5.443-0.982 + c3.896,0,6.168,1.807,6.168,4.105c0,2.271-1.467,3.736-4.127,4.623v0.064c2.967,0.85,4.67,2.24,4.67,4.752 + C98.429,111.088,94.921,113.151,90.402,113.151 M100.628,81.274c0,1.441-0.676,2.029-2.281,2.029c-1.627,0-2.309-0.588-2.309-2.029 + v-7.916c0-1.438,0.682-2.016,2.309-2.016c1.605,0,2.281,0.578,2.281,2.016V81.274z M109.388,112.858h-4.059V98.796l-3.307,1.271 + l-0.457-3.328l5.793-2.877h2.029V112.858z M113.792,81.274c0,1.441-0.658,2.029-2.291,2.029s-2.275-0.588-2.275-2.029v-7.916 + c0-1.438,0.643-2.016,2.275-2.016s2.291,0.578,2.291,2.016V81.274z"/> +</g> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M-112.358,22.891c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C-112.357,22.891-112.358,22.891-112.358,22.891"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="-323.718" y="-17.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M304.258,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C304.262,22.547,304.262,22.547,304.258,22.547"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="-276.84" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M304.258,300.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C304.262,300.547,304.262,300.547,304.258,300.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_23_" x="-276.84" y="-146.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__5_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-05.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-05.svg new file mode 100644 index 0000000000000000000000000000000000000000..b566d8ffd0be5510f20abceffd0c2fada081a3ba --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-05.svg @@ -0,0 +1,923 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="201px" height="228px" viewBox="0 0 201 228" enable-background="new 0 0 201 228" xml:space="preserve"> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAA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SuQmCC" transform="matrix(0.24 0 0 0.24 2.4888 1.5708)"> + </image> + <g> + <path fill="#93BF20" d="M158.574,157.644c32.191-32.216,32.191-84.413,0-116.606c-32.209-32.212-84.419-32.212-116.626,0 + c-32.203,32.193-32.203,84.391,0,116.614c1.025,1.026,2.078,2.006,3.145,2.991c0.238,0.274,0.436,0.581,0.715,0.864 + l46.279,46.264c4.498,4.519,11.854,4.519,16.345,0l45.424-45.402c0.397-0.393,0.716-0.854,1.044-1.279 + C156.146,159.965,157.378,158.85,158.574,157.644"/> + </g> + </g> + </g> + <g> + <defs> + <path id="SVGID_9_" d="M100.258,23.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C100.262,23.547,100.262,23.547,100.258,23.547"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_11_" x="-480.84" y="-423.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + <path fill="#93BF20" d="M144.146,117.946c0,0-0.015-2.146-4.418-4.095c-2.131-0.939-5.282-3.331-9.963-4.193 + c1.204-1.266,2.091-3.272,3.022-5.679c0.557-1.387,0.454-2.557,0.454-4.191c0-1.271,0.236-3.228-0.07-4.284 + c-1.022-3.683-3.646-4.719-6.685-4.719c-3.071,0-5.688,1.04-6.722,4.725c-0.297,1.052-0.049,3.009-0.049,4.277 + c0,1.634-0.114,2.81,0.438,4.213c0.766,1.968,1.514,3.629,2.408,4.909c5.177,3.118,5.669,6.577,5.689,7.655v0.005v0.017v5.018l0,0 + h15.895V117.946z"/> + <path fill="#93BF20" d="M72.227,116.567v-0.004c0.016-1.056,0.503-4.479,5.577-7.586c0.929-1.261,1.696-2.978,2.474-4.998 + c0.517-1.387,0.429-2.557,0.429-4.186c0-1.274,0.244-3.234-0.051-4.293c-1.049-3.68-3.639-4.715-6.717-4.715 + c-3.034,0-5.651,1.038-6.686,4.725c-0.306,1.052-0.08,3.009-0.08,4.283c0,1.631-0.074,2.804,0.458,4.197 + c0.953,2.442,1.834,4.408,3.014,5.69c-4.638,0.849-7.769,3.253-9.883,4.175c-4.365,1.954-4.394,4.09-4.394,4.09v3.658h15.858 + v-5.018V116.567z"/> + <path fill="#93BF20" d="M118.391,110.955c-2.913-1.263-7.258-4.634-13.686-5.764c1.631-1.783,2.866-4.548,4.17-7.794 + c0.748-1.876,0.604-3.499,0.604-5.771c0-1.688,0.325-4.407-0.092-5.941c-1.442-5.047-5.003-6.418-9.225-6.418 + c-4.188,0-7.777,1.375-9.183,6.423c-0.423,1.532-0.12,4.25-0.12,5.937c0,2.293-0.111,3.938,0.643,5.797 + c1.281,3.266,2.516,6.04,4.147,7.792c-6.377,1.165-10.687,4.527-13.595,5.767c-6.016,2.673-6.042,5.598-6.042,5.598v5.025h48.446 + v-5.025C124.46,116.58,124.431,113.652,118.391,110.955"/> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M100.258,301.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C100.262,301.547,100.262,301.547,100.258,301.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_23_" x="-480.84" y="-145.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__9_" fill="none" width="207" height="228"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-06.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-06.svg new file mode 100644 index 0000000000000000000000000000000000000000..bfa706de81a4c70a253e5daeaf20dcaef09baf18 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-06.svg @@ -0,0 +1,973 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="227px" viewBox="0 0 197 227" enable-background="new 0 0 197 227" xml:space="preserve"> +<g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAwuJJREFUeNrsnely47qyLovsfv83 +bvP+OSvCV5sAvhoADsqM6Ghbk20KkipZA8wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAODNbBwCAAC4wWfJwWEEAACkBgAAeM9HlgAA+IADAADex78YB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Rk2pbRbzaItaHu5 +KY3vv/b10XN6LcczbPZi8+/r2mDOUuJVNmIDAPgmoeklnI3uo4nsrbmX2MyZkbazVtpZT2yye456 +aWfRGOezzitS480nNYhxdRtabW9NNDiglPHggCPhqYlMpAWtl4TW219TOsfiMRXuGvgrx6XUqzbE +BgDwS0LTizAe3Udz68hFJv0sEwiQiW7OBgNkh2xqOyM1HyM2mcdY1YZWSrticylzwQElICojLWhl +99gtmet9XhObWipaOfj60pAdYgMA+BahOVpkr9xH06uInNF+lmlNWxEMMNp6VirH5ujfEYEhPKTm +NOl5ZhtarWJzFPN8L/9bDSkHMlLKuna02r+9ik3tOblUxG8vd639NVvl5yc2AIBPF5pSEZrRxLOs +zNwTctNrPXtFytlo+lkp57WdbYSG1JwpLiNiM9OGFvmrzP1goV5rRdvLRCs8oJR+JSYrNaUiODWB +uQQk51piwQG1yGdiAwD4dKHpLbZbYQDR6syt5IZpZjb2Z6sw0VCAI9FptduNVGiOjqG2M1LzkWKT +eYzWorh0Ftz7jfC1is29Ize9/TWRak1UakYinktFZHrX1YIDHp9bYgMA+GahKRXJieyjiQYDRCsj +o61nPQm6l1jkc0TItjI+nyYzu0bbGan5SOkZaUO7JC0+OremdKSmlHZ4QCljVZvaZUefnx0cEGlD +IzYAgG8QmkiqWTQYILuX5tP20NQk5l7a1ZpSYrNpSkNkSAupeRtxydx+dRva/gXyuICPDuZ85Haw +uM/ssclITbZic0leXnbPRaYNrRwcD2IDAPg2oWlFOGdm0fTim8+YTdOrFN1KPPVsZi5N7dhuAYkx +k4bUfIX0jLahRd7ojtrPVkQ91+47KjU1MalVakrncXpykxWbx+eO2AAAvkFojtrKMpWZ0fjms6s0 +LZG5lfyAzdn2s+jxGxEUQkNqniYuq9vQWrNVaolo/xbytQCBltSUsq4VLSs1tapNdoF/KfFENGID +APhWoemlm420mr1CWiKJadmEszP20USOI2khNR8lNq3bZ9vQWrNs9qEBvf01tYrNSCtaVFx61422 +obWqNZeK2BEbAMAvCU1rH81M0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XIzKy+rQwFeKTYj0rJSZggNAJAaAPi599vLxPUrKi6vEpoZoXhG9YXMAACpAQDvuS+Wmxlh +efbvjNF9LNvi+xAaACA1AIAnyM2ZsrL6+z1DDs6svJAZACA1AICF77+XBbdZKTErf49si263Pen/ +ITMAQGoAAJPvw5cn3uZVvzNWCshZVRlCAwCkBgDwBLl5trysbj87S3TIDACQGgDAB8rNs26/gjPn +wGxP/t4AAKQGALw/n3z/T/yd8Ip9L2QGAEgNAODJ79OXF///rxSYlSJCZgCA1AAA3uT9+l0fa/uB +xwIAkBoA8L7td8HTxIPMAACpAQB86Pv3u/9u2D70sQEApAYA8Abv5c/8v7Yv/b8AAKQGAOB9ncgA +APzyAwDv8UQGAOAXHgDAez6JAQD4BQcA8DuAxAAA/EIDAPzk7wUCAwAgNQCAt/99QVwAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQ5f8IMAD8D/4M +1YOLiwAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 0.7422 0.5747)"> + </image> + <g> + <path fill="#8C5AA1" d="M156.822,156.652c32.205-32.201,32.205-84.434,0-116.624c-32.215-32.195-84.417-32.195-116.618,0 + c-32.207,32.19-32.207,84.423,0,116.626c1.019,1.023,2.076,2.016,3.141,2.977c0.235,0.301,0.44,0.602,0.704,0.865l46.288,46.297 + c4.495,4.482,11.853,4.482,16.347,0l45.417-45.43c0.394-0.398,0.718-0.838,1.047-1.271 + C154.39,158.982,155.619,157.84,156.822,156.652"/> + </g> + </g> + <path fill="#FFFFFF" d="M173.159,97.682c0,41.291-33.455,74.727-74.726,74.727c-41.272,0-74.722-33.436-74.722-74.727 + c0-41.256,33.449-74.705,74.722-74.705C139.704,22.977,173.159,56.426,173.159,97.682"/> + <g> + <g> + <path fill="#8C5AA1" d="M117.141,90.305c0,3.729-1.238,6.951-3.715,9.668c-1.083,1.18-1.977,2.225-2.688,3.139 + c-0.706,0.914-1.423,2.063-2.145,3.446c-0.722,1.38-1.133,2.674-1.227,3.877c1.131,0.671,1.696,1.659,1.696,2.958 + c0,0.891-0.303,1.659-0.901,2.308c0.599,0.649,0.901,1.419,0.901,2.31c0,1.25-0.54,2.225-1.624,2.922 + c0.312,0.552,0.469,1.117,0.469,1.695c0,1.105-0.378,1.96-1.135,2.562c-0.758,0.6-1.689,0.901-2.797,0.901 + c-0.48,1.058-1.203,1.898-2.164,2.524c-0.963,0.625-2.008,0.938-3.139,0.938c-1.13,0-2.177-0.312-3.139-0.938 + c-0.962-0.626-1.685-1.467-2.166-2.524c-1.104,0-2.035-0.302-2.791-0.901c-0.76-0.602-1.139-1.456-1.139-2.562 + c0-0.578,0.155-1.144,0.471-1.695c-1.083-0.697-1.625-1.672-1.625-2.922c0-0.891,0.301-1.66,0.902-2.31 + c-0.602-0.648-0.902-1.417-0.902-2.308c0-1.299,0.563-2.287,1.695-2.958c-0.096-1.203-0.506-2.497-1.229-3.877 + c-0.721-1.383-1.434-2.532-2.144-3.446c-0.709-0.914-1.605-1.959-2.688-3.139c-2.477-2.717-3.715-5.939-3.715-9.668 + c0-2.381,0.537-4.599,1.605-6.654c1.07-2.057,2.475-3.762,4.22-5.123c1.745-1.356,3.715-2.429,5.916-3.209 + c2.199-0.782,4.441-1.173,6.728-1.173c2.285,0,4.527,0.391,6.728,1.173c2.201,0.78,4.171,1.853,5.915,3.209 + c1.744,1.361,3.152,3.066,4.221,5.123C116.607,85.706,117.141,87.924,117.141,90.305z M112.523,90.305 + c0-1.73-0.411-3.342-1.244-4.832c-0.828-1.491-1.91-2.711-3.244-3.663c-1.337-0.948-2.816-1.693-4.439-2.234 + c-1.621-0.542-3.264-0.812-4.923-0.812s-3.3,0.271-4.923,0.812c-1.624,0.541-3.104,1.286-4.438,2.234 + c-1.334,0.952-2.417,2.172-3.248,3.663c-0.828,1.49-1.243,3.102-1.243,4.832c0,2.429,0.817,4.595,2.451,6.495 + c0.242,0.263,0.607,0.661,1.104,1.19c0.491,0.529,0.857,0.925,1.098,1.189c3.078,3.678,4.773,7.262,5.088,10.75h8.225 + c0.312-3.488,2.007-7.072,5.085-10.75c0.241-0.265,0.606-0.66,1.103-1.189c0.491-0.529,0.856-0.928,1.098-1.19 + C111.706,94.899,112.523,92.733,112.523,90.305z M106.753,90.305c0,0.313-0.115,0.584-0.343,0.812 + c-0.229,0.228-0.499,0.343-0.811,0.343c-0.314,0-0.585-0.115-0.812-0.343c-0.229-0.229-0.343-0.499-0.343-0.812 + c0-1.104-0.649-1.959-1.949-2.561c-1.298-0.601-2.571-0.901-3.823-0.901c-0.312,0-0.582-0.115-0.812-0.343 + c-0.226-0.229-0.342-0.498-0.342-0.812c0-0.312,0.116-0.581,0.342-0.811c0.23-0.229,0.501-0.343,0.812-0.343 + c1.203,0,2.399,0.193,3.59,0.577c1.191,0.384,2.235,1.033,3.138,1.947C106.302,87.973,106.753,89.057,106.753,90.305z"/> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M-112.742,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C-112.738,22.547-112.738,22.547-112.742,22.547"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_11_" x="-693.84" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M-112.742,300.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C-112.738,300.547-112.738,300.547-112.742,300.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_23_" x="-693.84" y="-146.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__4_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-07.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-07.svg new file mode 100644 index 0000000000000000000000000000000000000000..8b075e6a94058dcaa510a9aafeef83fb2339a94a --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-07.svg @@ -0,0 +1,914 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="227px" viewBox="0 0 197 227" enable-background="new 0 0 197 227" xml:space="preserve"> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M-112.742-255.453c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C-112.738-255.453-112.738-255.453-112.742-255.453"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_11_" x="-693.84" y="-702.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAu5tJREFUeNrsnely2zyzBodM7v+O +Y55fb5WPPgF4ZgEISt1VqdjabFOQNM1ZYAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAJ/MwSEAAIANPksuDiMAACA1AADAez6yBADABxwAAPA+/sUgQAAA +fBgCAADv0YgPAADwgQkAwPswIDwAAMCHKQAA77WA8AAA8EELAAC8p979N36DCCA7AAB8AAMA8N7J ++/1HigOyAwDAhxwAwFe8T/Ie/l0igegAAPCBCADwuPdE3qMRC0QHAIAPTACArd//ji//+z8t0L++ ++G8HAEBqAAAQCN7PP1wErg//+wAAkBoAgA95fzs+4G950ufC9QE/6/rw4wYAwIcXAMDG72fHlz3e +J3F92eMhOQBAEAAA8OXvX8dmj3U8+Fg+LTC/Nvq9PiErBQCA1AAA71cP+jnHw+9/9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HQJJeBjcrx0GvQkXm +gn6fuChvvf4+8fMztpJZnZGkN/hHWJJ0PmxW4KaHnUeszmyTF/ArV20eiRmgkSSokaSP+3v1kbhZ +8fNH/PuRXf1YtZJTgcsqzACNJC3M9jNJej5utoHfewR4ntHMAIEV8BnBTBUoMCNJUCNJbwmbM3Hz +qoCZRc0obKpwsTojSVAjSWDzJNzMoOeZ8DkDNiNoWYkZoJGkF/vHVpJ0/t+328TvrzhXZlv4sTwC +NqsgAzOSBDWSpMV/567GzQxYHv1vxuh9LPvi1wEaSYIaSdIDcHMmVla/v2fg4MyVF5iRJKiRJC38 ++3db8DIrEbPy35F90cvtD/pzYEaSoEaSNPn38PbAl3nWvxkrAXLWqgzQSBLUSJIegJtH42X19rOz +oAMzkgQ1kqQL4uZRL7+iM8+B2R/8vkmSoEaS/P188utf8d+EZ9z3AjOSBDWSpAf/Pb09+c9/JmBW +QgRmJAlqJEkv8vf1q76t/QPeliQJaiTJ39v+LXgYPGBGkqBGknTRv79f/d+G/aJvW5IENZKkF/i7 +/JF/1v6mf5YkCWokSf5eBxlJkn/8JMnf8SAjSfIPniTJ3/kQI0nyD5wkyb8BECNJ8g+aJOkj/10A +GEkS1EiSXv7fC3CRJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmS +JEmSJEmSJElStf8nwABB6RG64VDV6wAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 0.7422 0.5742)"> + </image> + <g> + <path fill="#8C5AA1" d="M156.822,156.652c32.205-32.201,32.205-84.434,0-116.624c-32.215-32.195-84.417-32.195-116.618,0 + c-32.207,32.19-32.207,84.423,0,116.626c1.019,1.023,2.076,2.016,3.141,2.977c0.235,0.301,0.44,0.602,0.704,0.865l46.288,46.297 + c4.495,4.482,11.853,4.482,16.347,0l45.417-45.43c0.394-0.398,0.718-0.838,1.047-1.271 + C154.39,158.982,155.619,157.84,156.822,156.652"/> + </g> + </g> + <path fill="#FFFFFF" d="M173.159,97.682c0,41.291-33.455,74.727-74.726,74.727c-41.272,0-74.722-33.436-74.722-74.727 + c0-41.256,33.449-74.705,74.722-74.705C139.704,22.977,173.159,56.426,173.159,97.682"/> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M-112.742,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C-112.738,22.547-112.738,22.547-112.742,22.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_23_" x="-693.84" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__3_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-08.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-08.svg new file mode 100644 index 0000000000000000000000000000000000000000..39f69e028fffe28acc2a3a2324c23ba7c6f540d0 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-08.svg @@ -0,0 +1,908 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="196px" height="226px" viewBox="0 0 196 226" enable-background="new 0 0 196 226" xml:space="preserve"> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M95.258-256.453c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C95.262-256.453,95.262-256.453,95.258-256.453"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_11_" x="-485.84" y="-703.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAurxJREFUeNrsvemO47yyNptS9/3f +8Wt9OD8W0MfbJJ8cSFF2BNDoKk/lgbYzlAPNAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAADgmzl4CgAA4ObvkYunEQAAkBoAAODzHlkCAOBLDgAA+Az/YRAg +AAC+EAEAgM9nxAcAAPjSBADgMxgQHgAA4AsVAIDPWUB4AAD4sgUAAD5P736MvyACyA4AAF/CAAB8 +bvJZ/5XigOwAAPBFBwDwE5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FmBmx52zliduU0ewK9ctTkTM0AjSVAjSV/3 +d+qZuFnx+zP+7ciufqxayanAZRVmgEaSFmf7mSS9Fje3gT87AzyvaGaAwAr4jGCmChSYkSSokaSP +hM2RuHlXwMyiZhQ2VbhYnZEkqJEksHkRbmbQ80r4HAGbEbSsxAzQSNIb/oMrSTr279rbxJ+vuK7M +beHncgZsVkEGZiQJaiRJi/++XY2bGbCc/e/F6Hksj8W3ARpJghpJ0gm4ORIrqx/vETg4cuUFZiQJ +aiRJC//uvS14n5WIWflvyGPR+z1O+jgwI0lQI0ma/Dv4duL7vOrfi5UAOWpVBmgkCWokSSfg5my8 +rN5+dhR0YEaS/EMqSbogbs56/xUdeR2Yx8mPTZIENZLk7+aDb3/Ffw9ecd4LzEgS1EiSTv47+vbi +j/9KwKyECMxIEtRIkt7k7+p3va/HF9yXJAlqJMnf2f4dOA0eMCNJUCNJuujf3e/+78LjovctSYIa +SdIb/D1+5sd6fOjHkiRBjSTJ3+kgI0nyD6Ak+fsdZCRJ/tGTJPn7HmIkSf6RkyT5+x9iJEn+UZMk +feW/CQAjSYIaSdLb/1sBLpIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIk +SZIkSZIkSZIkSZIkSRrp/wgwAM9SzkGdO9f2AAAAAElFTkSuQmCC" transform="matrix(0.24 0 0 0.24 -2.5112 -0.4297)"> + </image> + <g> + <path fill="#93BF20" d="M153.574,155.644c32.191-32.216,32.191-84.413,0-116.606c-32.209-32.213-84.419-32.213-116.626,0 + c-32.203,32.193-32.203,84.391,0,116.614c1.025,1.026,2.078,2.006,3.145,2.991c0.238,0.274,0.436,0.581,0.715,0.864 + l46.279,46.264c4.498,4.519,11.854,4.519,16.345,0l45.424-45.402c0.397-0.393,0.716-0.854,1.044-1.279 + C151.146,157.965,152.378,156.85,153.574,155.644"/> + </g> + </g> + </g> + <g> + <defs> + <path id="SVGID_21_" d="M95.258,21.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C95.262,21.547,95.262,21.547,95.258,21.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_23_" x="-485.84" y="-425.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__10_" x="-5" y="-2" fill="none" width="201" height="228"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-09.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-09.svg new file mode 100644 index 0000000000000000000000000000000000000000..95410185fde1c60b7c46386c65db1e04157c51e8 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-09.svg @@ -0,0 +1,962 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="227px" viewBox="0 0 197 227" enable-background="new 0 0 197 227" xml:space="preserve"> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M-112.358-255.109c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C-112.357-255.109-112.358-255.109-112.358-255.109"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="-323.718" y="-295.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M304.258-255.453c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C304.262-255.453,304.262-255.453,304.258-255.453"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="-276.84" y="-702.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0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SJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmS +JEmSJEmd/o8AAwC629NWorhdawAAAABJRU5ErkJggg==" transform="matrix(0.24 0 0 0.24 0.54 0.5723)"> + </image> + <g> + <path fill="#FAB216" d="M156.619,156.655c32.21-32.205,32.21-84.414,0-116.629c-32.223-32.195-84.422-32.195-116.615,0 + c-32.208,32.215-32.208,84.424,0,116.633c1.021,1.02,2.064,2.012,3.133,2.98c0.236,0.291,0.455,0.604,0.707,0.857l46.305,46.297 + c4.477,4.484,11.824,4.484,16.338,0l45.402-45.412c0.395-0.418,0.725-0.854,1.062-1.289 + C154.197,158.983,155.41,157.839,156.619,156.655"/> + </g> + </g> + <path fill="#FFFFFF" d="M175.286,98.604c0,42.435-34.408,76.813-76.841,76.813c-42.435,0-76.857-34.379-76.857-76.813 + c0-42.437,34.423-76.854,76.857-76.854C140.877,21.75,175.286,56.167,175.286,98.604"/> +</g> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_13_" d="M-112.358,22.891c-19.413,0.002-38.83,7.378-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.911,4.059-4.434 + c25.427-29.747,24.088-74.653-4.059-102.797c-14.771-14.792-34.183-22.169-53.598-22.169 + C-112.357,22.891-112.358,22.891-112.358,22.891"/> + </defs> + <use xlink:href="#SVGID_13_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_13_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_15_" x="-323.718" y="-17.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_15_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M304.258,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C304.262,22.547,304.262,22.547,304.258,22.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_14_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_14_)"> + <defs> + <rect id="SVGID_23_" x="-276.84" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_16_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__2_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-10.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-10.svg new file mode 100644 index 0000000000000000000000000000000000000000..d741cfccda2bef3d13f46949905d997bbfae2de6 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-10.svg @@ -0,0 +1,985 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="200px" height="229px" viewBox="0 0 200 229" enable-background="new 0 0 200 229" xml:space="preserve"> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M99.642-253.109c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C99.643-253.109,99.642-253.109,99.642-253.109"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="-111.718" y="-293.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M516.258-253.453c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C516.262-253.453,516.262-253.453,516.258-253.453"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="-64.84" y="-700.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4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NjMBUKzORc7KfKDdnCMwV1RlCAwCkBgDeWmxGIrNSbjLysjIYoLKgP0tw +rpCZjKSQGQCY4B+nAABeSm5WxkGvEovIon4vLsx7190nPj+jlUx1BgA+4A8wAOAasVkhNyPZuaI6 +s00s4FdWba6UGUIDAKQGAL7yd+uVcrPi87P/hkSrH6sqORlxWSUzhAYAFqL9DABeQ262wveuEJ6r +mQkQWCE+FZnJCgqZAQBSAwAfKzZnys0rCsys1FTFJisuqjMAQGoAgNgsvs624OszX3tHsalIy0qZ +ITQA8GJ/aAEA1/zO3Sa+v2KuzLbwsZwtNqtEhswAAKkBAJzwe3e13MwIy5V/N6r7WPbF1yE0AEBq +AAAXyc2ZsrLyeM+QgzMrL2QGAEgNAGDx7+BtwWVWSsyqvyX7osvtF90PmQEAUgMAWPC7eLvwMs/4 +u7FSQM6qyhAaACA1AICL5OZqeVnZfnaW6JAZACA1AIA3lZurLj/LmXNg9ouPDQBAagDA7+gLrv9u +fxeese+FzAAAqQEAPOF39fbk+3+WwKwUETIDAKQGAPBCv7Nf8bZWSsOr3hYAgNQAAE763f3ufw/2 +N7lNAIA/YgCAi36Hv/Lfh/1NbxsAQGoAAC/y+/yq+7pSMMgMAPgjCADwu/3tIDIA4A8fAMDveSID +APDHDgDg9z6JAQD44wYA8HeAxACAP2YAALzb3wYCAwAgNQCAl/+bQVwAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACQ5X8JMADpq9OkLsRh8QAAAABJ +RU5ErkJggg==" transform="matrix(0.24 0 0 0.24 1.8647 2.5713)"> + </image> + <g> + <path fill="#E6344C" d="M157.925,158.642c32.219-32.215,32.219-84.411,0-116.604C125.731,9.824,73.51,9.824,41.317,42.037 + c-32.193,32.193-32.193,84.39,0,116.608c1.02,1.031,2.072,2.002,3.13,2.984c0.235,0.279,0.46,0.583,0.708,0.878l46.286,46.262 + c4.518,4.52,11.865,4.52,16.357,0l45.426-45.401c0.395-0.392,0.71-0.854,1.027-1.29 + C155.501,160.96,156.746,159.851,157.925,158.642"/> + </g> + </g> + </g> + <g> + <defs> + <path id="SVGID_13_" d="M99.642,24.891c-19.413,0.002-38.83,7.378-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.911,4.059-4.434 + c25.427-29.747,24.088-74.653-4.059-102.797c-14.771-14.792-34.183-22.169-53.598-22.169 + C99.643,24.891,99.642,24.891,99.642,24.891"/> + </defs> + <use xlink:href="#SVGID_13_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_13_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_15_" x="-111.718" y="-15.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_15_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M516.258,24.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C516.262,24.547,516.262,24.547,516.258,24.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_14_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_14_)"> + <defs> + <rect id="SVGID_23_" x="-64.84" y="-422.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_16_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__8_" fill="none" width="200" height="229"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-11.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-11.svg new file mode 100644 index 0000000000000000000000000000000000000000..2c43ce7f62c4c8b16d37f2edef732f39ef3dad7c --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-11.svg @@ -0,0 +1,1009 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="197px" height="226px" viewBox="0 0 197 226" enable-background="new 0 0 197 226" xml:space="preserve"> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M315.642-255.109c-19.413,0.002-38.83,7.377-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.912,4.059-4.434 + c25.427-29.747,24.088-74.654-4.059-102.797c-14.771-14.792-34.183-22.168-53.598-22.168 + C315.643-255.109,315.642-255.109,315.642-255.109"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_3_" x="104.282" y="-295.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_3_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_9_" d="M732.258-255.453c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.774-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C732.262-255.453,732.262-255.453,732.258-255.453"/> + </defs> + <use xlink:href="#SVGID_9_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_6_"> + <use xlink:href="#SVGID_9_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_6_)"> + <defs> + <rect id="SVGID_11_" x="151.16" y="-702.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_8_"> + <use xlink:href="#SVGID_11_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <g> + <defs> + <path id="SVGID_13_" d="M315.642,22.891c-19.413,0.002-38.83,7.378-53.626,22.164c-27.773,27.784-29.45,71.924-5.01,101.684 + c1.565,1.889,3.243,3.759,5.01,5.552c29.568,29.542,77.657,29.54,107.226,0c1.439-1.43,2.77-2.911,4.059-4.434 + c25.427-29.747,24.088-74.653-4.059-102.797c-14.771-14.792-34.183-22.169-53.598-22.169 + C315.643,22.891,315.642,22.891,315.642,22.891"/> + </defs> + <use xlink:href="#SVGID_13_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_10_"> + <use xlink:href="#SVGID_13_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_10_)"> + <defs> + <rect id="SVGID_15_" x="104.282" y="-17.219" width="431.324" height="431.312"/> + </defs> + <clipPath id="SVGID_12_"> + <use xlink:href="#SVGID_15_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <defs> + <path id="SVGID_21_" d="M732.258,22.547c-19.417,0-38.825,7.411-53.603,22.182c-27.781,27.773-29.449,71.903-5.035,101.649 + c1.564,1.938,3.246,3.79,5.035,5.564c29.559,29.578,77.656,29.577,107.219,0c1.421-1.429,2.76-2.911,4.048-4.404 + c25.419-29.762,24.088-74.681-4.048-102.81c-14.777-14.771-34.192-22.182-53.604-22.182 + C732.262,22.547,732.262,22.547,732.258,22.547"/> + </defs> + <use xlink:href="#SVGID_21_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_14_"> + <use xlink:href="#SVGID_21_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_14_)"> + <defs> + <rect id="SVGID_23_" x="151.16" y="-424.612" width="1391.476" height="1148.911"/> + </defs> + <clipPath id="SVGID_16_"> + <use xlink:href="#SVGID_23_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> +</g> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzUAAAOuCAYAAAA+TTlsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAxA9JREFUeNrsnely47qyLot0v/8b +W7x/zorw1SaArwaQoJQZ0dG2JtsUJFWyBpgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAMAns3EIAABggc+Tg0MIAABIDQAA8L6PLAEA8OEGAAC8l38xCBAA +AB+EAADA+zTiAwAAfFgCAPBeDAgPAADwQQoAwPstIDwAAHzIAgAA76t3/43fIALIDgAAH74AALx/ +8p7/keKA7AAA8AEHAPA175W8j3+PSCA6AAB8GAIAPPJ9kfdpxALRAQDgwxIAYPn3wO3L//5PCfSP +L/7bAQD4QAcA+IL3vO3D/z4kaF3ZQHQAgA94AADe45b4mduHH7fVg/XjA/4GJAcA+MAHAOA9bfrP +2x5+PJ7C8WWPh+QAAAEAAADvYaU/Z1v4737qZ8LKWZRj8b8RyQEAAgIAACRm2mNsD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YqPrMyUxUUMgMApAYA3vp59iy5mRWaZ5aaWbGpiovqDACQGgDw +XLv5ey4bbl8VmjP/DzlDbGakZafMEBoAIDUA8JHPuZeF+3dUXH5DaFaE4hHVFzIDAKQGADzvnvQ9 +O8XkN2WmIgM7heW24fchNABAagDA8++JcrMqK5dNf+fsIn9lo/5q5YXMAACpAQCcLApnSMrlAX/H +rAjcTr6fzAAAqQEAPPC5+PLAr/mN/zd2CshZVRlCAwCkBgDwILn5DXnZ1X52luiQGQAgNQCAF5Wb +R339I+TlN0SGzAAAqQEAPOA5+vIL/+aj+Y19L2QGAEgNAOAXnqsvv/zv/5bA7BQRMgMApAYA8ETP +2c/4s3ZKw7P+LAAAqQEAnPTc/er/H9xe5GcCAPwnBgB40HP4M///cHvRnw0AIDUAgCd5Pn/Uv/VI +wSAzAOA/QQCA5/aXg8gAgP/4AACe54kMAMB/dgAAz/skBgDgPzcAgP8HSAwA+M8MAIBX+7+BwAAA +SA0A4On/3yAuAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAqPJ/BBgAIr4etzc+QZwAAAAASUVORK5CYII=" transform="matrix(0.24 0 0 0.24 0.7539 0.5762)"> + </image> + <g> + <path fill="#0CB9ED" d="M156.832,156.636c32.217-32.218,32.217-84.411,0-116.606c-32.213-32.195-84.41-32.195-116.609,0 + c-32.215,32.195-32.215,84.389,0,116.606c1.027,1.049,2.053,2.006,3.139,2.986c0.236,0.271,0.441,0.582,0.705,0.881 + l46.285,46.262c4.496,4.52,11.842,4.52,16.355,0l45.406-45.4c0.393-0.395,0.709-0.854,1.047-1.291 + C154.388,158.954,155.632,157.845,156.832,156.636"/> + </g> + </g> + <path fill="#FFFFFF" d="M44.919,151.923c-1.791-1.753-3.459-3.612-5.027-5.544C15.47,116.611,17.125,72.51,44.919,44.723 + c29.541-29.551,77.658-29.545,107.209,0c28.139,28.129,29.473,73.049,4.051,102.811c-1.281,1.49-2.619,2.977-4.051,4.39 + C122.578,181.505,74.46,181.511,44.919,151.923"/> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E__1_" fill="none" width="197" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-12.svg b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-12.svg new file mode 100644 index 0000000000000000000000000000000000000000..71bcffa249d7e6733efae2cf07d2c3a304f4d709 --- /dev/null +++ b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_19082015-12.svg @@ -0,0 +1,889 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + width="196px" height="226px" viewBox="0 0 196 226" enable-background="new 0 0 196 226" xml:space="preserve"> +<g> + <g> + <g> + <g> + + <image overflow="visible" opacity="0.5" width="815" height="938" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAzEAAAOuCAYAAAA3ppkWAAAACXBIWXMAAC4jAAAuIwF4pT92AAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAu7NJREFUeNrsnYmO4zqQLVPq/v8/ +7tLDA+YCNR6TPLmQouwIoNFV3soLbWcoF5oBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA +AAAAAAAAAAAAAAAAAAAAAAAAAMBMDp4CAAC46Tvk4ikEAAAkBgAA+KxHjgAA+GIDAAA+vxEeAADg +SxAAAPhsRnQAAIAvSgAAPn8BwQEA4EsUAAD4jAUEBwCAL1gAAD5LeYxfHfgjNwAAfPECAPCZyef8 +R4g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dIT/55+xftaiYRXvS9JEsRIkr+v/RtwGDTgRZIg +RpL0Rn9vv/K/Cbc3vW9JEsRIkp70d/hZH+tMUMCLJPkHUJLk7/OXD1wkyT96kiR/t4OLJMk/dJIk +f9dDiyTJP2ySpI/9ux9aJMk/ZJIk/x4AiyTJP1qSJP9OgIokSZIkSZIkSZIkSZIkSZIkSZIkSZIk +SZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSdJ79P8EGACF+w2VFE3XswAAAABJRU5ErkJg +gg==" transform="matrix(0.24 0 0 0.24 0.1147 0.5742)"> + </image> + <g> + <path fill="#F6E203" d="M156.195,156.655c32.199-32.216,32.199-84.431,0-116.624C123.999,7.832,71.789,7.832,39.582,40.029 + c-32.214,32.195-32.214,84.41,0,116.626c1.028,1.027,2.077,2.01,3.146,2.98c0.242,0.283,0.423,0.592,0.719,0.863l46.264,46.281 + c4.514,4.502,11.863,4.502,16.34,0l45.438-45.42c0.398-0.393,0.716-0.846,1.034-1.268 + C153.771,158.978,155.012,157.843,156.195,156.655"/> + </g> + </g> + <g> + <defs> + <path id="SVGID_17_" d="M97.896,23.857c-19.432,0-38.824,7.383-53.621,22.17c-27.771,27.758-29.428,71.898-5.033,101.658 + c1.565,1.91,3.268,3.763,5.033,5.55c29.57,29.572,77.66,29.572,107.229,0c1.412-1.412,2.744-2.896,4.051-4.411 + c25.41-29.746,24.077-74.658-4.051-102.793c-14.771-14.791-34.201-22.174-53.601-22.174 + C97.903,23.857,97.898,23.857,97.896,23.857"/> + </defs> + <use xlink:href="#SVGID_17_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_17_" overflow="visible"/> + </clipPath> + <g clip-path="url(#SVGID_2_)"> + <defs> + <rect id="SVGID_19_" x="1.463" y="18.059" width="181.092" height="181.089"/> + </defs> + <clipPath id="SVGID_4_"> + <use xlink:href="#SVGID_19_" overflow="visible"/> + </clipPath> + </g> + </g> + </g> + </g> +</g> +<rect id="_x3C_Tranche_x3E_" fill="none" width="196" height="226"/> +</svg> diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_A.png new file mode 100644 index 0000000000000000000000000000000000000000..082d09024e3b7fe72b89df043949159734533b57 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..b3e0c68d054a93c912b2ea747320585e8f8a8d1b Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B.png new file mode 100644 index 0000000000000000000000000000000000000000..4db34ecc7c666d54cf27d1409799641bc6e01ae0 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ASSO_B.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_CITOYEN_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_CITOYEN_A.png new file mode 100644 index 0000000000000000000000000000000000000000..9af38f07959e8044b2a3f5d066be88044fd4129e Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_CITOYEN_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_A.png new file mode 100644 index 0000000000000000000000000000000000000000..82e859db879ce8c38149c3e626ada88022d70ffa Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..f48268c5a1c5b358e14791eac083214cd6b5107a Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B.png new file mode 100644 index 0000000000000000000000000000000000000000..b5373b9363c83e6022980b8f16bd012c9197f755 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_COLLECTIVITE_B.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_A.png new file mode 100644 index 0000000000000000000000000000000000000000..24446e328d6e3a3479f2b56681671f843b5e6d8f Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..dfa4f574ede8bcb065d719239187c15681cef66b Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B.png new file mode 100644 index 0000000000000000000000000000000000000000..701bb4fe4fedabf7f6c756e7f82e0644ff1fddd6 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_ENTREPRISES_B.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_A.png new file mode 100644 index 0000000000000000000000000000000000000000..41071e7be907a79eb24b06e37de2b5f0c731104d Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..3638b5bb57d01185c7abcb39293e4a55f84946c2 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B.png new file mode 100644 index 0000000000000000000000000000000000000000..16b7010ea6bded18e89c0c80a2288599473b8f1d Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_EVENEMENTS_B.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_A.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_A.png new file mode 100644 index 0000000000000000000000000000000000000000..95714f1004f26297216f31f36ffb4b28d5d4859d Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_A.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..e03868116e44a7d5f8ac299f8c1c18d76a3baafe Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B.png new file mode 100644 index 0000000000000000000000000000000000000000..ab4b24865c3dc6345e40e619f040870f5c2a4283 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER_PROJET_B.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B 2.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B 2.png new file mode 100644 index 0000000000000000000000000000000000000000..af750094dbad7be55732eeede70d60995fd50e3a Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B 2.png differ diff --git a/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B.png b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B.png new file mode 100644 index 0000000000000000000000000000000000000000..a4f57de0c91dfbc371d7be1e74ab9f273739f9c5 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICONS_CARTO_COMMUNECTER__CITOYEN_B.png differ diff --git a/assets/images/sig/markers/all/02_ICON_ARTISTES.png b/assets/images/sig/markers/all/02_ICON_ARTISTES.png new file mode 100644 index 0000000000000000000000000000000000000000..908d023f4c5145c4e9e8b7f57788d0cc3bee74a6 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_ARTISTES.png differ diff --git a/assets/images/sig/markers/all/02_ICON_ASSOCIATIONS.png b/assets/images/sig/markers/all/02_ICON_ASSOCIATIONS.png new file mode 100644 index 0000000000000000000000000000000000000000..eeabbaa6f8438dae143ed26664c3e697f1a90493 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_ASSOCIATIONS.png differ diff --git a/assets/images/sig/markers/all/02_ICON_CITOYENS.png b/assets/images/sig/markers/all/02_ICON_CITOYENS.png new file mode 100644 index 0000000000000000000000000000000000000000..aa63bc1c8c34018ead9e309d42fbb33665ffeedf Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_CITOYENS.png differ diff --git a/assets/images/sig/markers/all/02_ICON_COMMUNES.png b/assets/images/sig/markers/all/02_ICON_COMMUNES.png new file mode 100644 index 0000000000000000000000000000000000000000..1815a8ce4e858d7284842ecf2c1157da15e2775b Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_COMMUNES.png differ diff --git a/assets/images/sig/markers/all/02_ICON_ENTREPRISES.png b/assets/images/sig/markers/all/02_ICON_ENTREPRISES.png new file mode 100644 index 0000000000000000000000000000000000000000..86b3a287457ede1e7ba48c7a1c51ddc747d92836 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_ENTREPRISES.png differ diff --git a/assets/images/sig/markers/all/02_ICON_PARTENAIRES.png b/assets/images/sig/markers/all/02_ICON_PARTENAIRES.png new file mode 100644 index 0000000000000000000000000000000000000000..d4dd4fac36b7ed83ddc0f5bfb1a1c76b2c00c644 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_PARTENAIRES.png differ diff --git a/assets/images/sig/markers/all/02_ICON_PIXEL_ACTIF.png b/assets/images/sig/markers/all/02_ICON_PIXEL_ACTIF.png new file mode 100644 index 0000000000000000000000000000000000000000..a1d3a90ac195d8f64b42ddd2fed010aec7737555 Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_PIXEL_ACTIF.png differ diff --git a/assets/images/sig/markers/all/02_ICON_PORTEUR_PROJET.png b/assets/images/sig/markers/all/02_ICON_PORTEUR_PROJET.png new file mode 100644 index 0000000000000000000000000000000000000000..fcc6d80480895f3685d188b40b3a42850b9cbf6e Binary files /dev/null and b/assets/images/sig/markers/all/02_ICON_PORTEUR_PROJET.png differ diff --git a/assets/images/sig/markers/all/HOME.png b/assets/images/sig/markers/all/HOME.png new file mode 100644 index 0000000000000000000000000000000000000000..d8c9968a0ec2535ab2e3e9869f28435886e0c5f6 Binary files /dev/null and b/assets/images/sig/markers/all/HOME.png differ diff --git a/assets/images/sig/markers/all/asso.png b/assets/images/sig/markers/all/asso.png new file mode 100644 index 0000000000000000000000000000000000000000..5a39600386f3677ad51edcffbb4240f464bd005d Binary files /dev/null and b/assets/images/sig/markers/all/asso.png differ diff --git a/assets/images/sig/markers/all/entreprise.png b/assets/images/sig/markers/all/entreprise.png new file mode 100644 index 0000000000000000000000000000000000000000..fd680443a8a134b9aa89dc33a70ebacd57134930 Binary files /dev/null and b/assets/images/sig/markers/all/entreprise.png differ diff --git a/assets/images/sig/markers/all/entreprise.svg b/assets/images/sig/markers/all/entreprise.svg new file mode 100644 index 0000000000000000000000000000000000000000..b81e7999081a0b193a31e9ec87ee8f215c9d44ea --- /dev/null +++ b/assets/images/sig/markers/all/entreprise.svg @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="358 0 84 100" enable-background="new 358 0 84 100" xml:space="preserve"> +<g> + <g> + <g> + + <image overflow="visible" opacity="0.75" enable-background="new " width="120" height="136" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAACKCAYAAACO/OX+AAAACXBIWXMAAA85AAAPOQE6gPqvAAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADqRJREFUeNrsnYly4zgOhkGJtpPu +Tu/7P+akc9mxxJ1UmbsIGhd12KIlVbHseHoSmZ9+EARBEGC7tmu76r/C9h3/d6UN8nq/S9o6Znn3 +HQo+TwPhpg3yde517M8crOSAmWoDHioFG4zPtM81ZSbH56k24KFCs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VqAd8S8jXGaJoqmzfgZch4LC7N6qgG8K0hTwlaKyyXk933aFzO +/wbvNLR2N1QJeAmQh4LW1lo5r/lrQ3wuaYGVjE21NF2iOdJvNQFeCuSxiraKymWQB0HJUhK8lhtd +DeAlQZ7CdGsbvx/g/+UsMmSq5Ff4e1P4S+2AlwZ5DGhtevShQD4zU6dXBBZnVVYJeImQh4DmTDUN +cDwojhedPr0h4DRttjrAS4VcAjoZkL+gPF7G453hXb/D9+o7tCjLqUbAS4ZcqmhqrrnyU5GBjOfJ +R/hePyu3U82Alw7ZA1qql4WVvIfvNcS4iJdWvFTKi64CcA2QvYrWxuQdMtUtmSdzoE/wvR4orcKf +agJcC2QJdDKUnOFFYqrxUiNXhok7A2LWvOgNsgwaq1rKtvyE72Wm6ApVB/6zmKo9LKUmyBpoTs3t +BRQt80jDn1jR3DF61R8yWhtk2rk50wNnYDYIFlcvDBjQUsMPAkClRdhrritt7XbkirQGxTNPwNeR +Lq6btUGe5ztowAH07bWe09yrhHtPkKmqOfDggAygHzMPG+RlwrYgW0DTPXUK3Cls67NU4MVvkCv/ +ntvh3du1Xdu1Xdu1Xdu1Xds1/vqvAAMAzrHEjGDcAXMAAAAASUVORK5CYII=" transform="matrix(0.7273 0 0 0.7273 355.6364 4.1818)"> + </image> + <g> + <g> + <path fill="#04A9DD" d="M422,67c12.5-12.5,12.5-32.9,0-45.5c-12.6-12.6-32.9-12.6-45.5,0s-12.6,32.9,0,45.5 + c0.4,0.4,0.8,0.8,1.2,1.2c0.1,0.1,0.1,0.2,0.3,0.4l18,18c1.7,1.7,4.6,1.7,6.4,0l17.7-17.7c0.1-0.1,0.3-0.4,0.4-0.5 + C421,67.9,421.5,67.5,422,67z"/> + </g> + </g> + </g> + <g> + <path fill="#DEDEDE" d="M422.3,34.2c-6.3,0-11.3-5.1-11.3-11.3c0-6.3,5.1-11.3,11.3-11.3s11.3,5.1,11.3,11.3 + S428.6,34.2,422.3,34.2z"/> + <path fill="#FFFFFF" d="M422.3,12.3c5.8,0,10.5,4.7,10.5,10.5s-4.7,10.6-10.5,10.6s-10.5-4.7-10.5-10.5S416.5,12.3,422.3,12.3 + M422.3,10.8c-6.6,0-12,5.4-12,12s5.4,12.1,12,12.1c6.6,0,12-5.4,12-12S428.9,10.8,422.3,10.8L422.3,10.8z"/> + </g> + <g opacity="0.34"> + <g> + <path d="M427.6,26.4c0,0,0-0.7-1.3-1.2c-0.7-0.3-1.6-1-3-1.2c0.4-0.4,0.7-0.9,0.9-1.7c0.1-0.4,0.1-0.7,0.1-1.2 + c0-0.4,0.1-0.9,0-1.3c-0.3-1.1-1.1-1.4-2-1.4c-0.9,0-1.7,0.3-2,1.4c-0.1,0.3,0,0.9,0,1.3c0,0.5,0,0.9,0.1,1.2 + c0.3,0.7,0.5,1.3,0.9,1.7c-1.4,0.2-2.3,0.9-2.9,1.2c-1.3,0.6-1.3,1.2-1.3,1.2v1.1h4.7l0.2-1.2l-0.5-0.7c0,0,0.5-0.6,0.9-0.6 + c0.4,0,0.9,0.6,0.9,0.6l-0.5,0.7l0.2,1.2h4.7L427.6,26.4L427.6,26.4z"/> + </g> + </g> + </g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M378.3,65.2c-0.7-0.7-1.4-1.5-2-2.2c-9.5-11.6-8.9-28.8,2-39.6c11.5-11.5,30.3-11.5,41.7,0 + c11,11,11.5,28.4,1.6,40.1c-0.5,0.6-1,1.2-1.6,1.7C408.6,76.7,389.9,76.7,378.3,65.2z"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + </g> + </g> + <g> + <circle fill="#04A9DD" cx="422.3" cy="22.9" r="10.5"/> + <g> + <path fill="#FFFFFF" d="M418.6,19.9c0,2.5,0,5,0,7.6c-0.9,0.2-1.7-0.4-1.7-1.4c0-1.6,0-3.2,0-4.8c0-0.9,0.6-1.5,1.5-1.5 + C418.5,19.9,418.5,19.9,418.6,19.9z"/> + <path fill="#FFFFFF" d="M425.9,27.4c0-2.5,0-5,0-7.5c0.7-0.2,1.5,0.3,1.7,1.1c0,0.1,0,0.2,0,0.3c0,1.5,0,3.1,0,4.7 + C427.6,26.8,426.9,27.6,425.9,27.4z"/> + <path fill="#FFFFFF" d="M424.6,19.9C424.5,19.9,424.5,19.9,424.6,19.9c0-0.3,0-0.6,0-0.9c0-0.4-0.2-0.7-0.7-0.7 + c-1.1,0-2.1,0-3.2,0c-0.5,0-0.7,0.2-0.7,0.7c0,0.3,0,0.5,0,0.8c-0.3,0-0.5,0-0.7,0c0,2.5,0,5,0,7.6c2,0,4,0,6,0c0-2.5,0-5,0-7.6 + C425,19.9,424.8,19.9,424.6,19.9z M423.8,19.9c-1,0-2,0-3,0c0-0.2,0-0.5,0-0.7c1,0,2,0,3,0C423.8,19.3,423.8,19.6,423.8,19.9z"/> + </g> + </g> +</g> +</svg> diff --git a/assets/images/sig/markers/all/event.png b/assets/images/sig/markers/all/event.png new file mode 100644 index 0000000000000000000000000000000000000000..b20c8eb564ac4022c1d3c725d930bd8b4aa332dc Binary files /dev/null and b/assets/images/sig/markers/all/event.png differ diff --git a/assets/images/sig/markers/all/icon.svg b/assets/images/sig/markers/all/icon.svg new file mode 100644 index 0000000000000000000000000000000000000000..3edfd54bab230737d3761793e4a0c0960914df71 --- /dev/null +++ b/assets/images/sig/markers/all/icon.svg @@ -0,0 +1,116 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="358 0 84 100" enable-background="new 358 0 84 100" xml:space="preserve"> +<g> + <g> + <g> + + <image overflow="visible" opacity="0.75" enable-background="new " width="120" height="136" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAACK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VHxbAFPFfKY +oLVwK5ppzNKcDeApQy4FbYGX+mdryQ6u6MDJhqoATx1yCWhvmlLqh3HxOy66mwXgGiBHQFvOFfa/ +Wh+sLbqLzCZNGnAtkKOgSfGgPcBSH4zpK9UCrglyiaItwGcB8F4B/DkHwLVBtkBnx0SfnEDHlvw1 +WVUCrhEykT/PitmFfJjEsxukRHBMIUXA1nThJAHXCllSq+Q9S4AP4EVjvY7o2uhqANcOWTLLGOSw +8pOsflhKJa0S8BwgE+k722AKqZTpr6lYWjZbJeA5QkZHCyHvFWdLqp0lLZutDrAUOJjatWmFaHgp +qc2lvVzaKzvv2ob+rSnWMKVL6t7CubRsthrAU4dcAvrpAvKZtZfLa/cQrATIncJ3DPQO2qFmwDVA +9kC3APqJQe1a93kHObEhllSdVqptKa2qrAJwLZAjoKWSj1jrswXIJwX0gb2XqvDnmgDXBFkCnUgu +5sqBr+m/9cS6ZHhtJopX3o9umpJruHE0A9ASbCwS1wr/r+SFa3sxVbtZSo1FSpOjaqmOGFYYIjC7 +0rZ5xcXDF8jXAU3kF46TSjySEh3TNhitusp+zXWlU0DZWklHLYgibcVTXDdrgXwbVVvLgiIRs1nt +kTGXrQC0BXzS1zTIRPY287RAniZsD7IHNM/pptBMYXufWTuTz/pmPAr02UJdjuVYjuVYjuVYjuVY +jjsd/xNgAOyuhIQRRaCmAAAAAElFTkSuQmCC" transform="matrix(0.7273 0 0 0.7273 355.6364 4.1818)"> + </image> + <g> + <g> + <path fill="#91BE20" d="M422,67c12.5-12.5,12.5-32.9,0-45.5c-12.6-12.6-32.9-12.6-45.5,0s-12.6,32.9,0,45.5 + c0.4,0.4,0.8,0.8,1.2,1.2c0.1,0.1,0.1,0.2,0.3,0.4l18,18c1.7,1.7,4.6,1.7,6.4,0l17.7-17.7c0.1-0.1,0.3-0.4,0.4-0.5 + C421,67.9,421.5,67.5,422,67z"/> + </g> + </g> + </g> + </g> + <g> + <g> + <circle id="SVGID_1_" fill="#FFFFFF" cx="399.3" cy="44.1" r="29.6"/> + </g> + <g> + <defs> + <circle id="SVGID_2_" cx="399.3" cy="44.1" r="29.6"/> + </defs> + <clipPath id="SVGID_3_"> + <use xlink:href="#SVGID_2_" overflow="visible"/> + </clipPath> + </g> + </g> + <g> + <path fill="#92BD1F" d="M422.3,34.2c-6.3,0-11.3-5.1-11.3-11.3c0-6.3,5.1-11.3,11.3-11.3s11.3,5.1,11.3,11.3 + S428.6,34.2,422.3,34.2z"/> + <path fill="#FFFFFF" d="M422.3,12.3c5.8,0,10.5,4.7,10.5,10.5s-4.7,10.6-10.5,10.6s-10.5-4.7-10.5-10.5S416.5,12.3,422.3,12.3 + M422.3,10.8c-6.6,0-12,5.4-12,12s5.4,12.1,12,12.1c6.6,0,12-5.4,12-12S428.9,10.8,422.3,10.8L422.3,10.8z"/> + </g> + <g> + <path fill="#FFFFFF" d="M429.2,25.6c0,0,0-0.4-0.7-0.7c-0.4-0.1-0.8-0.5-1.5-0.7c0.2-0.2,0.4-0.5,0.5-0.9c0.1-0.2,0.1-0.4,0.1-0.7 + c0-0.2,0-0.5,0-0.7c-0.1-0.6-0.6-0.7-1-0.7c-0.5,0-0.9,0.1-1,0.7c-0.1,0.1,0,0.5,0,0.7c0,0.3,0,0.4,0.1,0.7 + c0.1,0.3,0.2,0.6,0.4,0.8c0.8,0.5,0.9,1,0.9,1.2l0,0l0,0v0.7l0,0h2.5L429.2,25.6L429.2,25.6z"/> + <path fill="#FFFFFF" d="M418,25.4L418,25.4c0-0.1,0.1-0.7,0.9-1.2c0.1-0.2,0.3-0.4,0.4-0.8c0.1-0.2,0.1-0.4,0.1-0.7 + c0-0.2,0.1-0.5,0-0.7c-0.1-0.6-0.6-0.7-1-0.7c-0.5,0-0.9,0.1-1,0.7c-0.1,0.1,0,0.5,0,0.7c0,0.3,0,0.4,0.1,0.7 + c0.1,0.4,0.3,0.7,0.5,0.9c-0.7,0.1-1.2,0.5-1.5,0.7c-0.7,0.3-0.7,0.7-0.7,0.7v0.6h2.5v-0.8H418z"/> + <path fill="#FFFFFF" d="M425.2,24.5c-0.4-0.2-1.2-0.7-2.2-0.9c0.3-0.3,0.4-0.7,0.7-1.2c0.1-0.3,0.1-0.6,0.1-0.9 + c0-0.3,0.1-0.7,0-0.9c-0.2-0.8-0.8-1-1.5-1s-1.2,0.2-1.5,1c-0.1,0.2,0,0.7,0,0.9c0,0.4,0,0.6,0.1,0.9c0.2,0.5,0.4,0.9,0.7,1.2 + c-1,0.2-1.7,0.7-2.1,0.9c-0.9,0.4-0.9,0.9-0.9,0.9v0.8h7.6v-0.8C426.1,25.4,426.1,24.9,425.2,24.5z"/> + </g> +</g> +</svg> diff --git a/assets/images/sig/markers/all/mairie.png b/assets/images/sig/markers/all/mairie.png new file mode 100644 index 0000000000000000000000000000000000000000..4207dd3efaeac19cfa7e69091c62d57077d80886 Binary files /dev/null and b/assets/images/sig/markers/all/mairie.png differ diff --git a/assets/images/sig/markers/all/marker-place.png b/assets/images/sig/markers/all/marker-place.png new file mode 100644 index 0000000000000000000000000000000000000000..b25db8a919e585fb9048411ce2be67119684b588 Binary files /dev/null and b/assets/images/sig/markers/all/marker-place.png differ diff --git a/assets/images/sig/markers/all/marker_cluster.png b/assets/images/sig/markers/all/marker_cluster.png new file mode 100644 index 0000000000000000000000000000000000000000..85b114e83f686864d1e655a04bebaa143a6ce485 Binary files /dev/null and b/assets/images/sig/markers/all/marker_cluster.png differ diff --git a/assets/images/sig/markers/all/project.png b/assets/images/sig/markers/all/project.png new file mode 100644 index 0000000000000000000000000000000000000000..1b818fd6444a6185ab0d765967b7d42cfefc2623 Binary files /dev/null and b/assets/images/sig/markers/all/project.png differ diff --git a/assets/images/sig/markers/all/user.png b/assets/images/sig/markers/all/user.png new file mode 100644 index 0000000000000000000000000000000000000000..85ad17e3239a6e35f2660a7692e7a72ea31f4d41 Binary files /dev/null and b/assets/images/sig/markers/all/user.png differ diff --git a/assets/images/sig/markers/all/user.svg b/assets/images/sig/markers/all/user.svg new file mode 100644 index 0000000000000000000000000000000000000000..3f13e356cef3057916bb7007b637f7aaf5ca1252 --- /dev/null +++ b/assets/images/sig/markers/all/user.svg @@ -0,0 +1,99 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Generator: Adobe Illustrator 18.1.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> +<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" + viewBox="360 0 80 100" enable-background="new 360 0 80 100" xml:space="preserve"> +<g> + <g> + + <image overflow="visible" opacity="0.75" enable-background="new " width="120" height="136" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHkAAACKCAYAAACO/OX+AAAACXBIWXMAAA85AAAPOQE6gPqvAAAA +GXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADnBJREFUeNrsnQuT4rgOhW3H0NDT +u/f//81+Qzdkd+7iWvXZI9nOA5KQVLkCDDMT/OVIsmLLzq3HeqzH/A+//sb/H+0K+X5/S7t2zDSv +21d83naA266Qr3etfd8zYH3fr5AHBOszn1mfW+psCz5v5wbczxCsPGuvczdEDpw8a69nA9xP9FpK +gAbymVc+K4HMgOJn5wrwk4EdJwZYgyuh4vuQ+R67gTQVtwSmfH82vsdcgJ8CaD8x9WotiIbv8TMG +OgdZA4qvtc9ao91c1X7CcANpjXLWmmbGWwOw1k7K+VwI/Gaw/URMc1DgNpkWM+Dx32YmlamXAf2+ +nK3GYJ8LArXF+GRLvUGBG8VZawy4hK2ZbabiE4CWYL+Nht+VsFmA5q8J299IvajchsBNbXNp8vUG +/rwB4A1ADoaSzwD5BGB/n78E0C/RvuH1N4F9Isq+qqrjlQFjBCzhJkgJ4FYA3Yr3W4C9AVVHxVdr +Sma+9xvU+wXtKM5H+Dx9P/19L/5dZrZHj8DjFc2z7OgSuA8C7gN5nwPNIGtKli0H+CDgHuB9vHyn +ufzdQGCzWGBU8x1vpF40yxsCdyfgytcPAvKWQ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6nXNnuYWo2ipIU5JM0cxy6xagCLcQVTtXXoSVgWRQ26V00BJh10JeFNwlQs79ptyqRrc0 +uEuG3OU3rns7r8d6rMd6rMd6rMd6rEf/4y8BBgCWQbsYxM3EUwAAAABJRU5ErkJggg==" transform="matrix(0.7273 0 0 0.7273 356.3636 4.1818)"> + </image> + <g> + <g> + <g> + <path fill="#D6334D" d="M422.7,67c12.5-12.5,12.5-32.9,0-45.5C410.2,9,389.8,9,377.3,21.6c-12.6,12.6-12.6,32.9,0,45.5 + c0.4,0.4,0.8,0.8,1.2,1.2c0.1,0.1,0.1,0.2,0.3,0.4l18,18c1.7,1.7,4.6,1.7,6.4,0l17.7-17.7c0.1-0.1,0.3-0.4,0.4-0.5 + C421.7,67.9,422.3,67.5,422.7,67z"/> + </g> + </g> + </g> + </g> + <g> + <g> + <defs> + <path id="SVGID_1_" d="M379.1,65.7c-0.7-0.7-1.4-1.5-2-2.2c-9.5-11.6-8.9-28.8,2-39.6c11.5-11.5,30.3-11.5,41.7,0.1 + c11,10.9,11.5,28.4,1.6,40c-0.5,0.6-1,1.2-1.6,1.7C409.4,77.2,390.6,77.2,379.1,65.7z"/> + </defs> + <use xlink:href="#SVGID_1_" overflow="visible" fill="#FFFFFF"/> + <clipPath id="SVGID_2_"> + <use xlink:href="#SVGID_1_" overflow="visible"/> + </clipPath> + </g> + </g> +</g> +</svg> diff --git a/assets/images/sig/markers/icons_carto/MARKER.png b/assets/images/sig/markers/icons_carto/MARKER.png new file mode 100644 index 0000000000000000000000000000000000000000..9744e6ab01cbba06921f8a50d1de908e865fb545 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/MARKER.png differ diff --git a/assets/images/sig/markers/icons_carto/action-marker-default.png b/assets/images/sig/markers/icons_carto/action-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..f7820ab46c9acb6b2c0feb9cf1cf5f4ad8947edf Binary files /dev/null and b/assets/images/sig/markers/icons_carto/action-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/action-marker-empty.png b/assets/images/sig/markers/icons_carto/action-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..701948f4928edeacaa85f45512b7e7082461fd29 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/action-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/business-marker-default.png b/assets/images/sig/markers/icons_carto/business-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..eafddcf0ebc051eaaabc63e018b2ae783f42d4e3 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/business-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/business-marker-empty.png b/assets/images/sig/markers/icons_carto/business-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..979bcabd3db67e2c862c405f136573eee8e42cc2 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/business-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/citizen-marker-default.png b/assets/images/sig/markers/icons_carto/citizen-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..7943105bb2965f7f1edcc3d0bcadf56a45aebb17 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/citizen-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/citizen-marker-empty.png b/assets/images/sig/markers/icons_carto/citizen-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..3503eaa862285a33b10981fd70a6a39f3866d10a Binary files /dev/null and b/assets/images/sig/markers/icons_carto/citizen-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/city-marker-default.png b/assets/images/sig/markers/icons_carto/city-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..458059daa9430a5763ded3f31bfa9c342d5096c9 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/city-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/city-marker-empty.png b/assets/images/sig/markers/icons_carto/city-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..3e4ef4cbd8859a75e7de766012021f1b74c2f2bc Binary files /dev/null and b/assets/images/sig/markers/icons_carto/city-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/classified-marker-default.png b/assets/images/sig/markers/icons_carto/classified-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..2629d604034f235ca2fb1a36cd76d543bc9bb826 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/classified-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/classified-marker-default_old.png b/assets/images/sig/markers/icons_carto/classified-marker-default_old.png new file mode 100644 index 0000000000000000000000000000000000000000..701bb4fe4fedabf7f6c756e7f82e0644ff1fddd6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/classified-marker-default_old.png differ diff --git a/assets/images/sig/markers/icons_carto/classified-marker-empty.png b/assets/images/sig/markers/icons_carto/classified-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..fb6eca25de8d8068a67e610352d850e28dc7d3c6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/classified-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/entry-marker-default.png b/assets/images/sig/markers/icons_carto/entry-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..60baf2368f6e34079cfb9703e583f61f4551d7dc Binary files /dev/null and b/assets/images/sig/markers/icons_carto/entry-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/entry-marker-empty.png b/assets/images/sig/markers/icons_carto/entry-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..979bcabd3db67e2c862c405f136573eee8e42cc2 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/entry-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/event-marker-default.png b/assets/images/sig/markers/icons_carto/event-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..2f362cd12a36bf9b49dae4a3060642557dc98fb2 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/event-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/event-marker-empty.png b/assets/images/sig/markers/icons_carto/event-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..ebee3d218fdf8da38b098f58da7c851ca171339f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/event-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/marker-place.png b/assets/images/sig/markers/icons_carto/marker-place.png new file mode 100644 index 0000000000000000000000000000000000000000..b25db8a919e585fb9048411ce2be67119684b588 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/marker-place.png differ diff --git a/assets/images/sig/markers/icons_carto/ngo-marker-default.png b/assets/images/sig/markers/icons_carto/ngo-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..c7a03f1799d693884acdeec265ccd586cf81d2c9 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/ngo-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/ngo-marker-empty.png b/assets/images/sig/markers/icons_carto/ngo-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..7ac3c09435e98a842e0f18b7ea4f22e19abcacb4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/ngo-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/poi-marker-default (copie).png b/assets/images/sig/markers/icons_carto/poi-marker-default (copie).png new file mode 100644 index 0000000000000000000000000000000000000000..43c1a783241ba6144237e7cedc2c214efa161caf Binary files /dev/null and b/assets/images/sig/markers/icons_carto/poi-marker-default (copie).png differ diff --git a/assets/images/sig/markers/icons_carto/poi-marker-default.png b/assets/images/sig/markers/icons_carto/poi-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..db3ddeaf4c860b66bf9fd952ab9393abc18dc227 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/poi-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/poi-marker-empty (copie).png b/assets/images/sig/markers/icons_carto/poi-marker-empty (copie).png new file mode 100644 index 0000000000000000000000000000000000000000..52cb0109766561f51d6aba9a5446d9d356531862 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/poi-marker-empty (copie).png differ diff --git a/assets/images/sig/markers/icons_carto/poi-marker-empty.png b/assets/images/sig/markers/icons_carto/poi-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..1a5091219cc768d2b1cfcc222f9072af061f99bd Binary files /dev/null and b/assets/images/sig/markers/icons_carto/poi-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/poi-video-marker-default.png b/assets/images/sig/markers/icons_carto/poi-video-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..7f7820a3a12427e3711d57f883cda26bfa1f7332 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/poi-video-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/project-marker-default.png b/assets/images/sig/markers/icons_carto/project-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..b7ceac12c8dd51398b1c9adf3d5f7112d8a3c09d Binary files /dev/null and b/assets/images/sig/markers/icons_carto/project-marker-default.png differ diff --git a/assets/images/sig/markers/icons_carto/project-marker-empty.png b/assets/images/sig/markers/icons_carto/project-marker-empty.png new file mode 100644 index 0000000000000000000000000000000000000000..ab85a8b84461be62888e37f6a497ff7c11f06c10 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/project-marker-empty.png differ diff --git a/assets/images/sig/markers/icons_carto/services/Thumbs.db b/assets/images/sig/markers/icons_carto/services/Thumbs.db new file mode 100755 index 0000000000000000000000000000000000000000..4c799250a3fd02bf2cfec011299c71cfdcb395ef Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/Thumbs.db differ diff --git a/assets/images/sig/markers/icons_carto/services/accountancy.png b/assets/images/sig/markers/icons_carto/services/accountancy.png new file mode 100755 index 0000000000000000000000000000000000000000..af09a9a5f6b2e9bca3b02f829d78a2c849d86e7f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/accountancy.png differ diff --git a/assets/images/sig/markers/icons_carto/services/arts-crafts.png b/assets/images/sig/markers/icons_carto/services/arts-crafts.png new file mode 100755 index 0000000000000000000000000000000000000000..732357d2688900aaf39c3f001ff8ff89dfbc2a65 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/arts-crafts.png differ diff --git a/assets/images/sig/markers/icons_carto/services/astrology.png b/assets/images/sig/markers/icons_carto/services/astrology.png new file mode 100755 index 0000000000000000000000000000000000000000..48137c1e9c59d13277a82b453265433444e2c2e5 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/astrology.png differ diff --git a/assets/images/sig/markers/icons_carto/services/automotive.png b/assets/images/sig/markers/icons_carto/services/automotive.png new file mode 100755 index 0000000000000000000000000000000000000000..160e13f42a6c21f93a59600a3e8829327886cca8 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/automotive.png differ diff --git a/assets/images/sig/markers/icons_carto/services/bars.png b/assets/images/sig/markers/icons_carto/services/bars.png new file mode 100755 index 0000000000000000000000000000000000000000..52d83b6f9f6b2c863d73b715feb8710dc0fab225 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/bars.png differ diff --git a/assets/images/sig/markers/icons_carto/services/birds.png b/assets/images/sig/markers/icons_carto/services/birds.png new file mode 100755 index 0000000000000000000000000000000000000000..f212c62ff2f2d8d4ea924d527831da8f8aa38f8c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/birds.png differ diff --git a/assets/images/sig/markers/icons_carto/services/books-media.png b/assets/images/sig/markers/icons_carto/services/books-media.png new file mode 100755 index 0000000000000000000000000000000000000000..7a7180fb0f5d72b76b0d3afd6004ec27c1ed7d3a Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/books-media.png differ diff --git a/assets/images/sig/markers/icons_carto/services/breakfast-n-brunch.png b/assets/images/sig/markers/icons_carto/services/breakfast-n-brunch.png new file mode 100755 index 0000000000000000000000000000000000000000..936456d3fa98bdf48f5df7fea083202a20edf86f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/breakfast-n-brunch.png differ diff --git a/assets/images/sig/markers/icons_carto/services/business.png b/assets/images/sig/markers/icons_carto/services/business.png new file mode 100755 index 0000000000000000000000000000000000000000..d71fbc0e60a93d23568dfed851fb9d49994b76a4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/business.png differ diff --git a/assets/images/sig/markers/icons_carto/services/cake-shop.png b/assets/images/sig/markers/icons_carto/services/cake-shop.png new file mode 100755 index 0000000000000000000000000000000000000000..2fe95907735986c33154719c154cc86e3abe40b8 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/cake-shop.png differ diff --git a/assets/images/sig/markers/icons_carto/services/clothings.png b/assets/images/sig/markers/icons_carto/services/clothings.png new file mode 100755 index 0000000000000000000000000000000000000000..5a3519b06118500006583144055381250ae74c75 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/clothings.png differ diff --git a/assets/images/sig/markers/icons_carto/services/clubs.png b/assets/images/sig/markers/icons_carto/services/clubs.png new file mode 100755 index 0000000000000000000000000000000000000000..a22ef570439ec1cfd665e9489f24d46e117854f6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/clubs.png differ diff --git a/assets/images/sig/markers/icons_carto/services/coffee-n-tea.png b/assets/images/sig/markers/icons_carto/services/coffee-n-tea.png new file mode 100755 index 0000000000000000000000000000000000000000..6ca4d54f0e65bdd00f4c38816cc032113e57623a Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/coffee-n-tea.png differ diff --git a/assets/images/sig/markers/icons_carto/services/commercial-places.png b/assets/images/sig/markers/icons_carto/services/commercial-places.png new file mode 100755 index 0000000000000000000000000000000000000000..562e586f9302101f82faf4b6332e9dbf54767351 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/commercial-places.png differ diff --git a/assets/images/sig/markers/icons_carto/services/community.png b/assets/images/sig/markers/icons_carto/services/community.png new file mode 100755 index 0000000000000000000000000000000000000000..d24c248b6bb05bc2fa6f13b4e872b9555bb7aeb0 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/community.png differ diff --git a/assets/images/sig/markers/icons_carto/services/computers.png b/assets/images/sig/markers/icons_carto/services/computers.png new file mode 100755 index 0000000000000000000000000000000000000000..c02f5c986e8a5245aa4557b00a4f8f2eeb06ced9 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/computers.png differ diff --git a/assets/images/sig/markers/icons_carto/services/concerts.png b/assets/images/sig/markers/icons_carto/services/concerts.png new file mode 100755 index 0000000000000000000000000000000000000000..df0ad148a798c6a6adb1190f89d7bfbf53c6f089 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/concerts.png differ diff --git a/assets/images/sig/markers/icons_carto/services/cookbooks.png b/assets/images/sig/markers/icons_carto/services/cookbooks.png new file mode 100755 index 0000000000000000000000000000000000000000..151d21aee842cb9b4a148fc645495aae8311b1a3 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/cookbooks.png differ diff --git a/assets/images/sig/markers/icons_carto/services/dance-clubs.png b/assets/images/sig/markers/icons_carto/services/dance-clubs.png new file mode 100755 index 0000000000000000000000000000000000000000..7a15178f8d0f2b3f24c026c8f87a0461763a2e2e Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/dance-clubs.png differ diff --git a/assets/images/sig/markers/icons_carto/services/default.png b/assets/images/sig/markers/icons_carto/services/default.png new file mode 100755 index 0000000000000000000000000000000000000000..9ef3f2e26120d9595c16e59291cc79787619a0f3 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/default.png differ diff --git a/assets/images/sig/markers/icons_carto/services/dental.png b/assets/images/sig/markers/icons_carto/services/dental.png new file mode 100755 index 0000000000000000000000000000000000000000..30b1b93ce12fbe4cc4c24037c52cfd4f0d32b191 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/dental.png differ diff --git a/assets/images/sig/markers/icons_carto/services/doctors.png b/assets/images/sig/markers/icons_carto/services/doctors.png new file mode 100755 index 0000000000000000000000000000000000000000..42490c9a11cd3a556ecc4b7c5b9a444b918cc90c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/doctors.png differ diff --git a/assets/images/sig/markers/icons_carto/services/education.png b/assets/images/sig/markers/icons_carto/services/education.png new file mode 100755 index 0000000000000000000000000000000000000000..e1c7ae864a1cd02341b6254bf74d89d978f3175e Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/education.png differ diff --git a/assets/images/sig/markers/icons_carto/services/electronics.png b/assets/images/sig/markers/icons_carto/services/electronics.png new file mode 100755 index 0000000000000000000000000000000000000000..db31cdeb1176d5888e6ec61045e6ba927293c4e6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/electronics.png differ diff --git a/assets/images/sig/markers/icons_carto/services/employment.png b/assets/images/sig/markers/icons_carto/services/employment.png new file mode 100755 index 0000000000000000000000000000000000000000..a6cc6592783afd8b4bf686c44abb7961d21fb329 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/employment.png differ diff --git a/assets/images/sig/markers/icons_carto/services/engineering.png b/assets/images/sig/markers/icons_carto/services/engineering.png new file mode 100755 index 0000000000000000000000000000000000000000..1f9fe41baaebb90c534a56de1d0a7b956d3e72f0 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/engineering.png differ diff --git a/assets/images/sig/markers/icons_carto/services/entertainment.png b/assets/images/sig/markers/icons_carto/services/entertainment.png new file mode 100755 index 0000000000000000000000000000000000000000..593ce4b51697b3093d7906e719817b9fca4fb7de Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/entertainment.png differ diff --git a/assets/images/sig/markers/icons_carto/services/event.png b/assets/images/sig/markers/icons_carto/services/event.png new file mode 100755 index 0000000000000000000000000000000000000000..2820062c722d7750f362f08c63aa290f5147f51d Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/event.png differ diff --git a/assets/images/sig/markers/icons_carto/services/exhibitions.png b/assets/images/sig/markers/icons_carto/services/exhibitions.png new file mode 100755 index 0000000000000000000000000000000000000000..fe6341d50b007e7a7f4068639e8783e3cfedd7a4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/exhibitions.png differ diff --git a/assets/images/sig/markers/icons_carto/services/fashion.png b/assets/images/sig/markers/icons_carto/services/fashion.png new file mode 100755 index 0000000000000000000000000000000000000000..36b13e19d1e26a6062bcc45382e23cba80a7310c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/fashion.png differ diff --git a/assets/images/sig/markers/icons_carto/services/festivals.png b/assets/images/sig/markers/icons_carto/services/festivals.png new file mode 100755 index 0000000000000000000000000000000000000000..8b32417f274ed49249f21e8c76ded103cfb81160 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/festivals.png differ diff --git a/assets/images/sig/markers/icons_carto/services/financial-services.png b/assets/images/sig/markers/icons_carto/services/financial-services.png new file mode 100755 index 0000000000000000000000000000000000000000..9a80ff75f651c347a5c9c282033badb7b63bb910 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/financial-services.png differ diff --git a/assets/images/sig/markers/icons_carto/services/food.png b/assets/images/sig/markers/icons_carto/services/food.png new file mode 100755 index 0000000000000000000000000000000000000000..c0c9e1d3f2feaabe286c5e25eb93a5ff06e974f1 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/food.png differ diff --git a/assets/images/sig/markers/icons_carto/services/furniture-stores.png b/assets/images/sig/markers/icons_carto/services/furniture-stores.png new file mode 100755 index 0000000000000000000000000000000000000000..f196668a669a25ae84ebf1df551b454008b9cb01 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/furniture-stores.png differ diff --git a/assets/images/sig/markers/icons_carto/services/games.png b/assets/images/sig/markers/icons_carto/services/games.png new file mode 100755 index 0000000000000000000000000000000000000000..3763dc287e40697547d6146cc0a52419ece29b10 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/games.png differ diff --git a/assets/images/sig/markers/icons_carto/services/gifts-flowers.png b/assets/images/sig/markers/icons_carto/services/gifts-flowers.png new file mode 100755 index 0000000000000000000000000000000000000000..d72452c81594ddc3a2ad64c679f76fae6041a084 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/gifts-flowers.png differ diff --git a/assets/images/sig/markers/icons_carto/services/government.png b/assets/images/sig/markers/icons_carto/services/government.png new file mode 100755 index 0000000000000000000000000000000000000000..740dd5c09ad0c2a61e2292580fd85ea27099172f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/government.png differ diff --git a/assets/images/sig/markers/icons_carto/services/halloween.png b/assets/images/sig/markers/icons_carto/services/halloween.png new file mode 100755 index 0000000000000000000000000000000000000000..4dd4e82a22191fcfe198eab2b9eef1280fdacd2a Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/halloween.png differ diff --git a/assets/images/sig/markers/icons_carto/services/health-medical.png b/assets/images/sig/markers/icons_carto/services/health-medical.png new file mode 100755 index 0000000000000000000000000000000000000000..413bdde26947e570876d3868b2d1b8e0d1cbdbc0 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/health-medical.png differ diff --git a/assets/images/sig/markers/icons_carto/services/home-services.png b/assets/images/sig/markers/icons_carto/services/home-services.png new file mode 100755 index 0000000000000000000000000000000000000000..c8fc816f396c2d226b7d5f372ccab8328210b99e Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/home-services.png differ diff --git a/assets/images/sig/markers/icons_carto/services/hotels.png b/assets/images/sig/markers/icons_carto/services/hotels.png new file mode 100755 index 0000000000000000000000000000000000000000..5f55a9113ea7e5e00e78c822cb8a2fc8aafc08c2 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/hotels.png differ diff --git a/assets/images/sig/markers/icons_carto/services/industries.png b/assets/images/sig/markers/icons_carto/services/industries.png new file mode 100755 index 0000000000000000000000000000000000000000..cd82d745b24fb3c3738b65c00fd7a82959ede5a5 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/industries.png differ diff --git a/assets/images/sig/markers/icons_carto/services/internet.png b/assets/images/sig/markers/icons_carto/services/internet.png new file mode 100755 index 0000000000000000000000000000000000000000..8e3c093b09c7bcfca5deaf331d59dca3c4fc4ac8 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/internet.png differ diff --git a/assets/images/sig/markers/icons_carto/services/jewelry.png b/assets/images/sig/markers/icons_carto/services/jewelry.png new file mode 100755 index 0000000000000000000000000000000000000000..3499d9daec89fa40706a241933a93714b48d3ead Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/jewelry.png differ diff --git a/assets/images/sig/markers/icons_carto/services/jobs.png b/assets/images/sig/markers/icons_carto/services/jobs.png new file mode 100755 index 0000000000000000000000000000000000000000..c00e82abb783b3861ccccd35be316e2d2c00b013 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/jobs.png differ diff --git a/assets/images/sig/markers/icons_carto/services/karaoke.png b/assets/images/sig/markers/icons_carto/services/karaoke.png new file mode 100755 index 0000000000000000000000000000000000000000..97193195e7e3b61e3879903aea23a8be0c47653f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/karaoke.png differ diff --git a/assets/images/sig/markers/icons_carto/services/law.png b/assets/images/sig/markers/icons_carto/services/law.png new file mode 100755 index 0000000000000000000000000000000000000000..b68a16b5914ce672b2be0df6447e66a54839d582 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/law.png differ diff --git a/assets/images/sig/markers/icons_carto/services/lawn-garden.png b/assets/images/sig/markers/icons_carto/services/lawn-garden.png new file mode 100755 index 0000000000000000000000000000000000000000..38f5626526318cb38c60e28c8b2b8050aeb07470 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/lawn-garden.png differ diff --git a/assets/images/sig/markers/icons_carto/services/libraries.png b/assets/images/sig/markers/icons_carto/services/libraries.png new file mode 100755 index 0000000000000000000000000000000000000000..5d79a7673c8334ea07552d29b547d0f9af4eb253 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/libraries.png differ diff --git a/assets/images/sig/markers/icons_carto/services/local-services.png b/assets/images/sig/markers/icons_carto/services/local-services.png new file mode 100755 index 0000000000000000000000000000000000000000..bc1c34a103d4552c2c266df6269415c9753e3180 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/local-services.png differ diff --git a/assets/images/sig/markers/icons_carto/services/lounges.png b/assets/images/sig/markers/icons_carto/services/lounges.png new file mode 100755 index 0000000000000000000000000000000000000000..2e8cf130fc4aaaa9393f5ed9c26b32f90db9dc86 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/lounges.png differ diff --git a/assets/images/sig/markers/icons_carto/services/magazines.png b/assets/images/sig/markers/icons_carto/services/magazines.png new file mode 100755 index 0000000000000000000000000000000000000000..d753fa72656ff07823f7fb79374eacf442e6ebc6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/magazines.png differ diff --git a/assets/images/sig/markers/icons_carto/services/manufacturing.png b/assets/images/sig/markers/icons_carto/services/manufacturing.png new file mode 100755 index 0000000000000000000000000000000000000000..1c3a9a441073147bec242ec72e2754ccc014c2a4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/manufacturing.png differ diff --git a/assets/images/sig/markers/icons_carto/services/marker-new1_12.png b/assets/images/sig/markers/icons_carto/services/marker-new1_12.png new file mode 100755 index 0000000000000000000000000000000000000000..7e3ea9de242e6875b779c04d72111a28b695aa52 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/marker-new1_12.png differ diff --git a/assets/images/sig/markers/icons_carto/services/mass-media.png b/assets/images/sig/markers/icons_carto/services/mass-media.png new file mode 100755 index 0000000000000000000000000000000000000000..fa45a9ba194d2762193ef3bd5be3aaa8e2a0e140 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/mass-media.png differ diff --git a/assets/images/sig/markers/icons_carto/services/massage-therapy.png b/assets/images/sig/markers/icons_carto/services/massage-therapy.png new file mode 100755 index 0000000000000000000000000000000000000000..5688a9a0bc7a2c1453b9ba073fa8a929b2c95bba Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/massage-therapy.png differ diff --git a/assets/images/sig/markers/icons_carto/services/matrimonial.png b/assets/images/sig/markers/icons_carto/services/matrimonial.png new file mode 100755 index 0000000000000000000000000000000000000000..cf06d1e4596b87064a8f021494a0faa7eb18c5a0 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/matrimonial.png differ diff --git a/assets/images/sig/markers/icons_carto/services/medical.png b/assets/images/sig/markers/icons_carto/services/medical.png new file mode 100755 index 0000000000000000000000000000000000000000..ac433c527b9d75bd72751ddab154f763904e68a4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/medical.png differ diff --git a/assets/images/sig/markers/icons_carto/services/meetups.png b/assets/images/sig/markers/icons_carto/services/meetups.png new file mode 100755 index 0000000000000000000000000000000000000000..f01a1486bee9fad4068df4c2c393495ce99e5648 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/meetups.png differ diff --git a/assets/images/sig/markers/icons_carto/services/miscellaneous-for-sale.png b/assets/images/sig/markers/icons_carto/services/miscellaneous-for-sale.png new file mode 100755 index 0000000000000000000000000000000000000000..b7d3d29314c4e35b661ace0cceb0dd5c46e23ec8 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/miscellaneous-for-sale.png differ diff --git a/assets/images/sig/markers/icons_carto/services/mobile-phones.png b/assets/images/sig/markers/icons_carto/services/mobile-phones.png new file mode 100755 index 0000000000000000000000000000000000000000..ed7ce0b0ebbc4d3fe015a785d03c7e350a1bddfc Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/mobile-phones.png differ diff --git a/assets/images/sig/markers/icons_carto/services/movies.png b/assets/images/sig/markers/icons_carto/services/movies.png new file mode 100755 index 0000000000000000000000000000000000000000..2683e7be444742d29c03713fe45a36c120e85461 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/movies.png differ diff --git a/assets/images/sig/markers/icons_carto/services/museums.png b/assets/images/sig/markers/icons_carto/services/museums.png new file mode 100755 index 0000000000000000000000000000000000000000..2b78dfc164bd3943a635bc8f1acf485041ac91e6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/museums.png differ diff --git a/assets/images/sig/markers/icons_carto/services/musical-instruments.png b/assets/images/sig/markers/icons_carto/services/musical-instruments.png new file mode 100755 index 0000000000000000000000000000000000000000..1b69c10ce82c6e51cc79a9ab63ca5caf67cb955c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/musical-instruments.png differ diff --git a/assets/images/sig/markers/icons_carto/services/musical.png b/assets/images/sig/markers/icons_carto/services/musical.png new file mode 100755 index 0000000000000000000000000000000000000000..4b356117fe49f32923477dd5faad1df02ce5f8df Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/musical.png differ diff --git a/assets/images/sig/markers/icons_carto/services/nightlife.png b/assets/images/sig/markers/icons_carto/services/nightlife.png new file mode 100755 index 0000000000000000000000000000000000000000..c9137169b560f0e46cb01cc14819477334b11d75 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/nightlife.png differ diff --git a/assets/images/sig/markers/icons_carto/services/parks.png b/assets/images/sig/markers/icons_carto/services/parks.png new file mode 100755 index 0000000000000000000000000000000000000000..18ac903c18d2267fd3d15907d2e743d37016719e Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/parks.png differ diff --git a/assets/images/sig/markers/icons_carto/services/parties.png b/assets/images/sig/markers/icons_carto/services/parties.png new file mode 100755 index 0000000000000000000000000000000000000000..e2ff47ea776217c1492462450f9be6045922d16f Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/parties.png differ diff --git a/assets/images/sig/markers/icons_carto/services/pets.png b/assets/images/sig/markers/icons_carto/services/pets.png new file mode 100755 index 0000000000000000000000000000000000000000..0d8dc4fd274310c194153bfe8afa6824a5d5c4ae Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/pets.png differ diff --git a/assets/images/sig/markers/icons_carto/services/photography.png b/assets/images/sig/markers/icons_carto/services/photography.png new file mode 100755 index 0000000000000000000000000000000000000000..25eb5052b85b8430fa8d0ae0224ee3efeec726a1 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/photography.png differ diff --git a/assets/images/sig/markers/icons_carto/services/pizza.png b/assets/images/sig/markers/icons_carto/services/pizza.png new file mode 100755 index 0000000000000000000000000000000000000000..a7a59365410a6726f547f5a031f2904ab1d8e203 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/pizza.png differ diff --git a/assets/images/sig/markers/icons_carto/services/places.png b/assets/images/sig/markers/icons_carto/services/places.png new file mode 100755 index 0000000000000000000000000000000000000000..029f39effe8cd88e1d8c1e2c9b81380888a05b50 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/places.png differ diff --git a/assets/images/sig/markers/icons_carto/services/play-schools.png b/assets/images/sig/markers/icons_carto/services/play-schools.png new file mode 100755 index 0000000000000000000000000000000000000000..738417b5e815d9986d6003f4bc17422541c243cd Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/play-schools.png differ diff --git a/assets/images/sig/markers/icons_carto/services/playgrounds.png b/assets/images/sig/markers/icons_carto/services/playgrounds.png new file mode 100755 index 0000000000000000000000000000000000000000..e76ccadf37898e8fe803990e9dfec5f108d4d53b Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/playgrounds.png differ diff --git a/assets/images/sig/markers/icons_carto/services/pool-halls.png b/assets/images/sig/markers/icons_carto/services/pool-halls.png new file mode 100755 index 0000000000000000000000000000000000000000..7577887b5aebd335665cf75e6dfeac4bc593e88c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/pool-halls.png differ diff --git a/assets/images/sig/markers/icons_carto/services/printing-graphic-arts.png b/assets/images/sig/markers/icons_carto/services/printing-graphic-arts.png new file mode 100755 index 0000000000000000000000000000000000000000..688f1a6d89cc1647f78cb7169da46dcaa8d61799 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/printing-graphic-arts.png differ diff --git a/assets/images/sig/markers/icons_carto/services/professional.png b/assets/images/sig/markers/icons_carto/services/professional.png new file mode 100755 index 0000000000000000000000000000000000000000..dd0835308c90165c7c8f693a222f109f7fe44f40 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/professional.png differ diff --git a/assets/images/sig/markers/icons_carto/services/real-estate.png b/assets/images/sig/markers/icons_carto/services/real-estate.png new file mode 100755 index 0000000000000000000000000000000000000000..5dce2240bcdb09c8c29d302a01eaba1930aada0b Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/real-estate.png differ diff --git a/assets/images/sig/markers/icons_carto/services/religious-organizations.png b/assets/images/sig/markers/icons_carto/services/religious-organizations.png new file mode 100755 index 0000000000000000000000000000000000000000..a64d779c91bd89641204f4a67167adc258ed7fa9 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/religious-organizations.png differ diff --git a/assets/images/sig/markers/icons_carto/services/residential-places.png b/assets/images/sig/markers/icons_carto/services/residential-places.png new file mode 100755 index 0000000000000000000000000000000000000000..b296b7bb181c70308cab010c19ede24077bde213 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/residential-places.png differ diff --git a/assets/images/sig/markers/icons_carto/services/restaurants.png b/assets/images/sig/markers/icons_carto/services/restaurants.png new file mode 100755 index 0000000000000000000000000000000000000000..d5226b6e21ff4bd718e908e7d8282327f887447c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/restaurants.png differ diff --git a/assets/images/sig/markers/icons_carto/services/retail-stores.png b/assets/images/sig/markers/icons_carto/services/retail-stores.png new file mode 100755 index 0000000000000000000000000000000000000000..50cd12310b4d3445fd19aa19fe0bd39e2ec88206 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/retail-stores.png differ diff --git a/assets/images/sig/markers/icons_carto/services/saloon.png b/assets/images/sig/markers/icons_carto/services/saloon.png new file mode 100755 index 0000000000000000000000000000000000000000..ba56498815c0610ab9a72f1a81d94a8b135f3224 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/saloon.png differ diff --git a/assets/images/sig/markers/icons_carto/services/schools.png b/assets/images/sig/markers/icons_carto/services/schools.png new file mode 100755 index 0000000000000000000000000000000000000000..5e0a59800fcbc80bf10fc2fd8a83255ccb0e92f4 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/schools.png differ diff --git a/assets/images/sig/markers/icons_carto/services/science.png b/assets/images/sig/markers/icons_carto/services/science.png new file mode 100755 index 0000000000000000000000000000000000000000..bb47b47328bc81cd1e4d0e76b7b1f7ac1c36ebc0 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/science.png differ diff --git a/assets/images/sig/markers/icons_carto/services/shopping.png b/assets/images/sig/markers/icons_carto/services/shopping.png new file mode 100755 index 0000000000000000000000000000000000000000..68f5125bb82c4c841d5b6eb315665c48c72550a6 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/shopping.png differ diff --git a/assets/images/sig/markers/icons_carto/services/sporting-goods.png b/assets/images/sig/markers/icons_carto/services/sporting-goods.png new file mode 100755 index 0000000000000000000000000000000000000000..018c44f06e4228c9adfa29f5e91a993817bf1117 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/sporting-goods.png differ diff --git a/assets/images/sig/markers/icons_carto/services/sports.png b/assets/images/sig/markers/icons_carto/services/sports.png new file mode 100755 index 0000000000000000000000000000000000000000..71801dd4e76fa85b8dc1369aeae42d3a25b0753b Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/sports.png differ diff --git a/assets/images/sig/markers/icons_carto/services/swimming-pools.png b/assets/images/sig/markers/icons_carto/services/swimming-pools.png new file mode 100755 index 0000000000000000000000000000000000000000..fa5a90dd8c86d9099f78f5f7b5d697ef1d57f997 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/swimming-pools.png differ diff --git a/assets/images/sig/markers/icons_carto/services/telemarketing.png b/assets/images/sig/markers/icons_carto/services/telemarketing.png new file mode 100755 index 0000000000000000000000000000000000000000..fdfb54881a8e92e506eb2b751aed8bd5b1c35f45 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/telemarketing.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tickets.png b/assets/images/sig/markers/icons_carto/services/tickets.png new file mode 100755 index 0000000000000000000000000000000000000000..d8d238453d9cfc575097e4c036faa0ce0330b35b Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tickets.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tiffin-services.png b/assets/images/sig/markers/icons_carto/services/tiffin-services.png new file mode 100755 index 0000000000000000000000000000000000000000..b64aebd606f48a800d7f62f813dc82d22e4fc23c Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tiffin-services.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tires-accessories.png b/assets/images/sig/markers/icons_carto/services/tires-accessories.png new file mode 100755 index 0000000000000000000000000000000000000000..883c3bc981cb749aeff18d92cb83b65645308171 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tires-accessories.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tools-hardware.png b/assets/images/sig/markers/icons_carto/services/tools-hardware.png new file mode 100755 index 0000000000000000000000000000000000000000..62d74429eaccfea7247be9abe9b99c0ecb4e74e3 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tools-hardware.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tours.png b/assets/images/sig/markers/icons_carto/services/tours.png new file mode 100755 index 0000000000000000000000000000000000000000..c4b9fa5ed6f6855e61aa544d0919713996045d75 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tours.png differ diff --git a/assets/images/sig/markers/icons_carto/services/toys-store.png b/assets/images/sig/markers/icons_carto/services/toys-store.png new file mode 100755 index 0000000000000000000000000000000000000000..c227ec4d6e58007fd1032d4710d9a8a71d2460fb Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/toys-store.png differ diff --git a/assets/images/sig/markers/icons_carto/services/transport.png b/assets/images/sig/markers/icons_carto/services/transport.png new file mode 100755 index 0000000000000000000000000000000000000000..41ff273dc5431c21ff8345b9c7d4917f96312fc7 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/transport.png differ diff --git a/assets/images/sig/markers/icons_carto/services/travel.png b/assets/images/sig/markers/icons_carto/services/travel.png new file mode 100755 index 0000000000000000000000000000000000000000..51f59a28531343cddeeb219cb38e03bb8a58401d Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/travel.png differ diff --git a/assets/images/sig/markers/icons_carto/services/tutors.png b/assets/images/sig/markers/icons_carto/services/tutors.png new file mode 100755 index 0000000000000000000000000000000000000000..2c7086bacae888b8592b6b6e436bdd6833ccddd8 Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/tutors.png differ diff --git a/assets/images/sig/markers/icons_carto/services/vacant-land.png b/assets/images/sig/markers/icons_carto/services/vacant-land.png new file mode 100755 index 0000000000000000000000000000000000000000..d740193acd035b179818088ee09de53ff2864cdb Binary files /dev/null and b/assets/images/sig/markers/icons_carto/services/vacant-land.png differ diff --git a/assets/images/sig/markers/icons_carto/url-marker-default.png b/assets/images/sig/markers/icons_carto/url-marker-default.png new file mode 100644 index 0000000000000000000000000000000000000000..edda3679f6bfb3be385465c2f93f28a11c7ffcfc Binary files /dev/null and b/assets/images/sig/markers/icons_carto/url-marker-default.png differ diff --git a/assets/images/sig/reload.png b/assets/images/sig/reload.png new file mode 100644 index 0000000000000000000000000000000000000000..87eef3d6f31e6977cf4b407dc4ee161574e553ee Binary files /dev/null and b/assets/images/sig/reload.png differ diff --git a/assets/images/small-crackle-bright.png b/assets/images/small-crackle-bright.png new file mode 100644 index 0000000000000000000000000000000000000000..53e6676987b6aa10705c42a2032e0b0111b85b91 Binary files /dev/null and b/assets/images/small-crackle-bright.png differ diff --git a/assets/images/stock_proverb/1-ZV3-Z-kyhbWTyYqU3HxZLQ.png b/assets/images/stock_proverb/1-ZV3-Z-kyhbWTyYqU3HxZLQ.png new file mode 100644 index 0000000000000000000000000000000000000000..362c4ee2ae150b9d22c1d0ef8354106c50d63752 Binary files /dev/null and b/assets/images/stock_proverb/1-ZV3-Z-kyhbWTyYqU3HxZLQ.png differ diff --git a/assets/images/stock_proverb/1.png b/assets/images/stock_proverb/1.png new file mode 100644 index 0000000000000000000000000000000000000000..c20f1c467a2000bea80a03958e8e62b77219bfb5 Binary files /dev/null and b/assets/images/stock_proverb/1.png differ diff --git a/assets/images/stock_proverb/10001371_10152157353969123_617216018_n.jpg b/assets/images/stock_proverb/10001371_10152157353969123_617216018_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4524b166290a49f3dc04084435da767c64e54b9d Binary files /dev/null and b/assets/images/stock_proverb/10001371_10152157353969123_617216018_n.jpg differ diff --git a/assets/images/stock_proverb/10071_586659161424001_1162345299_n.jpg b/assets/images/stock_proverb/10071_586659161424001_1162345299_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e4139c9433841bb281885de13015f51e1a338887 Binary files /dev/null and b/assets/images/stock_proverb/10071_586659161424001_1162345299_n.jpg differ diff --git a/assets/images/stock_proverb/10177455_306660249524198_8942090343480811155_n.png b/assets/images/stock_proverb/10177455_306660249524198_8942090343480811155_n.png new file mode 100644 index 0000000000000000000000000000000000000000..8fc722c0be5f2b9778116034e763afb072ff1f2e Binary files /dev/null and b/assets/images/stock_proverb/10177455_306660249524198_8942090343480811155_n.png differ diff --git a/assets/images/stock_proverb/10393797_10152620629834858_3561883039441841307_n.jpg b/assets/images/stock_proverb/10393797_10152620629834858_3561883039441841307_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b84970f30311009cad700e8f9624ef30e60a09dc Binary files /dev/null and b/assets/images/stock_proverb/10393797_10152620629834858_3561883039441841307_n.jpg differ diff --git a/assets/images/stock_proverb/10407792_975041512519335_7394332121573819717_n.jpg b/assets/images/stock_proverb/10407792_975041512519335_7394332121573819717_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d27ead03dec5ada96a54e8b2e1c13c6e1f7627af Binary files /dev/null and b/assets/images/stock_proverb/10407792_975041512519335_7394332121573819717_n.jpg differ diff --git a/assets/images/stock_proverb/10447128_900078566697668_1531000008074558059_n.png b/assets/images/stock_proverb/10447128_900078566697668_1531000008074558059_n.png new file mode 100644 index 0000000000000000000000000000000000000000..2e4ff8b8b936e0345ee6638f2f29f2cf08fa65ac Binary files /dev/null and b/assets/images/stock_proverb/10447128_900078566697668_1531000008074558059_n.png differ diff --git a/assets/images/stock_proverb/10518976_667439353331051_2828337879176855913_n.jpg b/assets/images/stock_proverb/10518976_667439353331051_2828337879176855913_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cdced06baa49a9df1e29403ad85b709c160fa4f4 Binary files /dev/null and b/assets/images/stock_proverb/10518976_667439353331051_2828337879176855913_n.jpg differ diff --git a/assets/images/stock_proverb/10603761_1021026954593424_5615690927481990996_n.jpg b/assets/images/stock_proverb/10603761_1021026954593424_5615690927481990996_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..23d6a5056bd16a46a5d2129140ddae8e05eb2257 Binary files /dev/null and b/assets/images/stock_proverb/10603761_1021026954593424_5615690927481990996_n.jpg differ diff --git a/assets/images/stock_proverb/10609478_10152643441887349_8303762421810760100_n.jpg b/assets/images/stock_proverb/10609478_10152643441887349_8303762421810760100_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f43840e3a20acaa7a50072fd3418441df67530a9 Binary files /dev/null and b/assets/images/stock_proverb/10609478_10152643441887349_8303762421810760100_n.jpg differ diff --git a/assets/images/stock_proverb/10614132_307329616115587_8387231011884166257_n.jpg b/assets/images/stock_proverb/10614132_307329616115587_8387231011884166257_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e363b12efd8e4628d0e1d3093798ba918b971bf Binary files /dev/null and b/assets/images/stock_proverb/10614132_307329616115587_8387231011884166257_n.jpg differ diff --git a/assets/images/stock_proverb/10622876_889814704373906_2779064337366667309_n.jpg b/assets/images/stock_proverb/10622876_889814704373906_2779064337366667309_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..86d58a9b869598745fd6145b81f1c704d5e9ca29 Binary files /dev/null and b/assets/images/stock_proverb/10622876_889814704373906_2779064337366667309_n.jpg differ diff --git a/assets/images/stock_proverb/10689916_783170225079105_9033783232032945676_n.jpg b/assets/images/stock_proverb/10689916_783170225079105_9033783232032945676_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e343cfb4b468d7bb4f8b1894b3a140a53879aea1 Binary files /dev/null and b/assets/images/stock_proverb/10689916_783170225079105_9033783232032945676_n.jpg differ diff --git a/assets/images/stock_proverb/10801999_716936728398141_5028220972312764651_n.jpg b/assets/images/stock_proverb/10801999_716936728398141_5028220972312764651_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0417db5cc4ff2c051f8ee0526f3f90544a0b2061 Binary files /dev/null and b/assets/images/stock_proverb/10801999_716936728398141_5028220972312764651_n.jpg differ diff --git a/assets/images/stock_proverb/10891501_596621637104458_4757497266005599852_n (1).jpg b/assets/images/stock_proverb/10891501_596621637104458_4757497266005599852_n (1).jpg new file mode 100644 index 0000000000000000000000000000000000000000..8acce540e4df2ccaceff234ca7f4ce2877e102b9 Binary files /dev/null and b/assets/images/stock_proverb/10891501_596621637104458_4757497266005599852_n (1).jpg differ diff --git a/assets/images/stock_proverb/10891803_606910639438534_3377274207630809375_n.jpg b/assets/images/stock_proverb/10891803_606910639438534_3377274207630809375_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8f8a3318186b909cea97d38b667c08cb520bab92 Binary files /dev/null and b/assets/images/stock_proverb/10891803_606910639438534_3377274207630809375_n.jpg differ diff --git a/assets/images/stock_proverb/10934026_1057574657601640_2032664676548207554_n.jpg b/assets/images/stock_proverb/10934026_1057574657601640_2032664676548207554_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e01abd0cc1af22bd78c5572a8046aaa961277e77 Binary files /dev/null and b/assets/images/stock_proverb/10934026_1057574657601640_2032664676548207554_n.jpg differ diff --git a/assets/images/stock_proverb/10957000_484314521707173_2501888124261715188_n.jpg b/assets/images/stock_proverb/10957000_484314521707173_2501888124261715188_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0221c86a9dbf65d4794bfff21ff6f470eb9229f5 Binary files /dev/null and b/assets/images/stock_proverb/10957000_484314521707173_2501888124261715188_n.jpg differ diff --git a/assets/images/stock_proverb/10989151_366267170232762_8586567018721142489_n.jpg b/assets/images/stock_proverb/10989151_366267170232762_8586567018721142489_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6d001935ba8b021be2d4469e11d953b1e1ab5a07 Binary files /dev/null and b/assets/images/stock_proverb/10989151_366267170232762_8586567018721142489_n.jpg differ diff --git a/assets/images/stock_proverb/11009202_973936266007681_6740301452276092566_n.jpg b/assets/images/stock_proverb/11009202_973936266007681_6740301452276092566_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0ce4743c54bc0d8f15761a0586fe51d8ac674ae9 Binary files /dev/null and b/assets/images/stock_proverb/11009202_973936266007681_6740301452276092566_n.jpg differ diff --git a/assets/images/stock_proverb/11017703_902673246423493_4101892299011367386_n.jpg b/assets/images/stock_proverb/11017703_902673246423493_4101892299011367386_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4943dd4bfa422459b71c445e7bc373a48f967bfd Binary files /dev/null and b/assets/images/stock_proverb/11017703_902673246423493_4101892299011367386_n.jpg differ diff --git a/assets/images/stock_proverb/11084238_921049661252518_697920166759330379_n.jpg b/assets/images/stock_proverb/11084238_921049661252518_697920166759330379_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..85859d376ec35d78e462dca69e8de38fa48dd0b3 Binary files /dev/null and b/assets/images/stock_proverb/11084238_921049661252518_697920166759330379_n.jpg differ diff --git a/assets/images/stock_proverb/11088229_986505324723290_36243380420699860_n.png b/assets/images/stock_proverb/11088229_986505324723290_36243380420699860_n.png new file mode 100644 index 0000000000000000000000000000000000000000..9345f21628282c7cb45a478fb44465eb495bc311 Binary files /dev/null and b/assets/images/stock_proverb/11088229_986505324723290_36243380420699860_n.png differ diff --git a/assets/images/stock_proverb/11141122_885611744842034_7178761199359386949_n.jpg b/assets/images/stock_proverb/11141122_885611744842034_7178761199359386949_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..68fbd9e0979b84e7bb5a7055888c8d12c5287960 Binary files /dev/null and b/assets/images/stock_proverb/11141122_885611744842034_7178761199359386949_n.jpg differ diff --git a/assets/images/stock_proverb/11141352_891497234221136_4968222219641456838_n.jpg b/assets/images/stock_proverb/11141352_891497234221136_4968222219641456838_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3fd2523ee77f5c0d3c6fce8bcd37e3eec4232ea7 Binary files /dev/null and b/assets/images/stock_proverb/11141352_891497234221136_4968222219641456838_n.jpg differ diff --git a/assets/images/stock_proverb/11151026_943977465626404_1797665688604468397_n.jpg b/assets/images/stock_proverb/11151026_943977465626404_1797665688604468397_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7a8cc4f9435dc4eadf1a6af99a0f13d309460dd2 Binary files /dev/null and b/assets/images/stock_proverb/11151026_943977465626404_1797665688604468397_n.jpg differ diff --git a/assets/images/stock_proverb/11179971_1580646728857998_4767164622687052750_n.png b/assets/images/stock_proverb/11179971_1580646728857998_4767164622687052750_n.png new file mode 100644 index 0000000000000000000000000000000000000000..352e1b921acbdcd5e62b50f6457fd5f0435b7b0c Binary files /dev/null and b/assets/images/stock_proverb/11179971_1580646728857998_4767164622687052750_n.png differ diff --git a/assets/images/stock_proverb/11181844_1044973705516964_6479680469413103542_n.jpg b/assets/images/stock_proverb/11181844_1044973705516964_6479680469413103542_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b4d854d8776b1f5361c901d28a4dfdaf1566d57f Binary files /dev/null and b/assets/images/stock_proverb/11181844_1044973705516964_6479680469413103542_n.jpg differ diff --git a/assets/images/stock_proverb/11203722_929001210494358_4811843456871866176_n.jpg b/assets/images/stock_proverb/11203722_929001210494358_4811843456871866176_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7317ebe5fe3a59aacdc04eeb0712908db3231d1f Binary files /dev/null and b/assets/images/stock_proverb/11203722_929001210494358_4811843456871866176_n.jpg differ diff --git a/assets/images/stock_proverb/11219058_1623168377959048_9102028163469918302_n.jpg b/assets/images/stock_proverb/11219058_1623168377959048_9102028163469918302_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ac261f9f36514d491994591fbe948dc3ab6b9d1e Binary files /dev/null and b/assets/images/stock_proverb/11219058_1623168377959048_9102028163469918302_n.jpg differ diff --git a/assets/images/stock_proverb/11219090_902904333109530_740107921510982665_n.jpg b/assets/images/stock_proverb/11219090_902904333109530_740107921510982665_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8f7eb10f2fce74b4b7fdea19b9523d73535e35a6 Binary files /dev/null and b/assets/images/stock_proverb/11219090_902904333109530_740107921510982665_n.jpg differ diff --git a/assets/images/stock_proverb/11351338_891277174248415_4675017321731457663_n.jpg b/assets/images/stock_proverb/11351338_891277174248415_4675017321731457663_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0e359950057b76555979b0efbd82b6f13cc40a27 Binary files /dev/null and b/assets/images/stock_proverb/11351338_891277174248415_4675017321731457663_n.jpg differ diff --git a/assets/images/stock_proverb/11391440_944642558933328_2963232493677159543_n.jpg b/assets/images/stock_proverb/11391440_944642558933328_2963232493677159543_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..525064479770ca090120615e4543ea145e9668a3 Binary files /dev/null and b/assets/images/stock_proverb/11391440_944642558933328_2963232493677159543_n.jpg differ diff --git a/assets/images/stock_proverb/11535723_10205543884449711_8588880316465563744_n.jpg b/assets/images/stock_proverb/11535723_10205543884449711_8588880316465563744_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..bba63e1dcd08d6a50b4cc4a4beadf9b5fd3fee3b Binary files /dev/null and b/assets/images/stock_proverb/11535723_10205543884449711_8588880316465563744_n.jpg differ diff --git a/assets/images/stock_proverb/11665502_10155910377370294_2695259904809682136_n.jpg b/assets/images/stock_proverb/11665502_10155910377370294_2695259904809682136_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..903aeca278c8470c175301d25da094918d68fb33 Binary files /dev/null and b/assets/images/stock_proverb/11665502_10155910377370294_2695259904809682136_n.jpg differ diff --git a/assets/images/stock_proverb/11781874_1075287325834471_5466495447026858067_n.jpg b/assets/images/stock_proverb/11781874_1075287325834471_5466495447026858067_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4f7b740c12906a4824eca4510ed8c258a5e53579 Binary files /dev/null and b/assets/images/stock_proverb/11781874_1075287325834471_5466495447026858067_n.jpg differ diff --git a/assets/images/stock_proverb/11824976_952113794845051_821458467809166432_n.jpg b/assets/images/stock_proverb/11824976_952113794845051_821458467809166432_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..90c62c73da275b180578ba575fe4e4ff7005f7d9 Binary files /dev/null and b/assets/images/stock_proverb/11824976_952113794845051_821458467809166432_n.jpg differ diff --git a/assets/images/stock_proverb/11828742_10153584009062566_5654319787904011311_n.png b/assets/images/stock_proverb/11828742_10153584009062566_5654319787904011311_n.png new file mode 100644 index 0000000000000000000000000000000000000000..f1c2b5fe00187589d100d0fdd0e78189c2cb49db Binary files /dev/null and b/assets/images/stock_proverb/11828742_10153584009062566_5654319787904011311_n.png differ diff --git a/assets/images/stock_proverb/11836630_970050289724430_951349261959972937_n.jpg b/assets/images/stock_proverb/11836630_970050289724430_951349261959972937_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f9af1d418f92ea0b6130ba4195839c32e2bf7410 Binary files /dev/null and b/assets/images/stock_proverb/11836630_970050289724430_951349261959972937_n.jpg differ diff --git a/assets/images/stock_proverb/11846681_974036045992521_1820819821472018065_n.jpg b/assets/images/stock_proverb/11846681_974036045992521_1820819821472018065_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14f904cfa751425677707bf69db3ee5a7ca5d249 Binary files /dev/null and b/assets/images/stock_proverb/11846681_974036045992521_1820819821472018065_n.jpg differ diff --git a/assets/images/stock_proverb/1184836_577479942312198_702462533_n.jpg b/assets/images/stock_proverb/1184836_577479942312198_702462533_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..83e5ef3c17854db2df22c683a39342da8fa7a1fc Binary files /dev/null and b/assets/images/stock_proverb/1184836_577479942312198_702462533_n.jpg differ diff --git a/assets/images/stock_proverb/11855769_1018142904863007_7034126995898320876_n.jpg b/assets/images/stock_proverb/11855769_1018142904863007_7034126995898320876_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7465e387ad54ed77169c6ac4be6728dc59cc9b45 Binary files /dev/null and b/assets/images/stock_proverb/11855769_1018142904863007_7034126995898320876_n.jpg differ diff --git a/assets/images/stock_proverb/11889686_761758657264043_541617248601976866_n.jpg b/assets/images/stock_proverb/11889686_761758657264043_541617248601976866_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2157ec0bc07fe074a57668d988eb4e4624185af3 Binary files /dev/null and b/assets/images/stock_proverb/11889686_761758657264043_541617248601976866_n.jpg differ diff --git a/assets/images/stock_proverb/11903705_1006193146080124_2591262852975894735_n.jpg b/assets/images/stock_proverb/11903705_1006193146080124_2591262852975894735_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93c45b6cbc9a65fffbd98957ddf8c092e7b9061d Binary files /dev/null and b/assets/images/stock_proverb/11903705_1006193146080124_2591262852975894735_n.jpg differ diff --git a/assets/images/stock_proverb/11914968_10207551487324196_3543781109845514274_n.jpg b/assets/images/stock_proverb/11914968_10207551487324196_3543781109845514274_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..87c2fc62192c1c9be9998f827a2d6c5c48d28a31 Binary files /dev/null and b/assets/images/stock_proverb/11914968_10207551487324196_3543781109845514274_n.jpg differ diff --git a/assets/images/stock_proverb/11923213_829428167176710_8906036502379136538_n.jpg b/assets/images/stock_proverb/11923213_829428167176710_8906036502379136538_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..dacf9329246316bb1d491070d0b987d6b1db44d6 Binary files /dev/null and b/assets/images/stock_proverb/11923213_829428167176710_8906036502379136538_n.jpg differ diff --git a/assets/images/stock_proverb/11988491_10203436768120223_4420711831144995847_n.jpg b/assets/images/stock_proverb/11988491_10203436768120223_4420711831144995847_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0546379461377d54b2d0e8d53b6c771b5e1fe5ca Binary files /dev/null and b/assets/images/stock_proverb/11988491_10203436768120223_4420711831144995847_n.jpg differ diff --git a/assets/images/stock_proverb/12003297_10153624408727838_4097747856826717172_n.jpg b/assets/images/stock_proverb/12003297_10153624408727838_4097747856826717172_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c876e6d1954361d3837c34bfb11c847851736282 Binary files /dev/null and b/assets/images/stock_proverb/12003297_10153624408727838_4097747856826717172_n.jpg differ diff --git a/assets/images/stock_proverb/12027529_896646233763436_2568255712678015305_n.jpg b/assets/images/stock_proverb/12027529_896646233763436_2568255712678015305_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..105e8a5e38ad8486aea1aa2750c88955ddc15d70 Binary files /dev/null and b/assets/images/stock_proverb/12027529_896646233763436_2568255712678015305_n.jpg differ diff --git a/assets/images/stock_proverb/12036675_747676425359319_6478475230055742343_n.jpg b/assets/images/stock_proverb/12036675_747676425359319_6478475230055742343_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..13d54c799890759f3e4622302f5ff710eac917b2 Binary files /dev/null and b/assets/images/stock_proverb/12036675_747676425359319_6478475230055742343_n.jpg differ diff --git a/assets/images/stock_proverb/12038183_10153259492597861_2421909604971350259_n.png b/assets/images/stock_proverb/12038183_10153259492597861_2421909604971350259_n.png new file mode 100644 index 0000000000000000000000000000000000000000..71dbf1da2c8d155fe272359ecacff68fdeaa35c3 Binary files /dev/null and b/assets/images/stock_proverb/12038183_10153259492597861_2421909604971350259_n.png differ diff --git a/assets/images/stock_proverb/12038202_1661769800737152_2044556086590795632_n.jpg b/assets/images/stock_proverb/12038202_1661769800737152_2044556086590795632_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5c9745c62bfd52171ee9280deffa92db55bf2f8b Binary files /dev/null and b/assets/images/stock_proverb/12038202_1661769800737152_2044556086590795632_n.jpg differ diff --git a/assets/images/stock_proverb/12039335_10153630491419323_8928856928135175673_n.jpg b/assets/images/stock_proverb/12039335_10153630491419323_8928856928135175673_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..19e2db6b8c0d5be85570eda6232f86617cbd6e47 Binary files /dev/null and b/assets/images/stock_proverb/12039335_10153630491419323_8928856928135175673_n.jpg differ diff --git a/assets/images/stock_proverb/12039513_10153587692795132_4284717016312682513_n.jpg b/assets/images/stock_proverb/12039513_10153587692795132_4284717016312682513_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6cec75e5a61d8ab900862c60202120204b3deacc Binary files /dev/null and b/assets/images/stock_proverb/12039513_10153587692795132_4284717016312682513_n.jpg differ diff --git a/assets/images/stock_proverb/12144703_10207760288229505_8193836613150272204_n.jpg b/assets/images/stock_proverb/12144703_10207760288229505_8193836613150272204_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7e66ba2b91271fb142c13a55da11d856d317b788 Binary files /dev/null and b/assets/images/stock_proverb/12144703_10207760288229505_8193836613150272204_n.jpg differ diff --git a/assets/images/stock_proverb/12246872_10207686031925938_6835575318115690746_n.jpg b/assets/images/stock_proverb/12246872_10207686031925938_6835575318115690746_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..444cb67e84857d58f2f748101cd59cfbbfb163c6 Binary files /dev/null and b/assets/images/stock_proverb/12246872_10207686031925938_6835575318115690746_n.jpg differ diff --git a/assets/images/stock_proverb/1374723_610942732276005_221865572_n.jpg b/assets/images/stock_proverb/1374723_610942732276005_221865572_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a3777e78db609573650022f4d5c61137e629439c Binary files /dev/null and b/assets/images/stock_proverb/1374723_610942732276005_221865572_n.jpg differ diff --git a/assets/images/stock_proverb/1378311_532924816785882_2059738114_n.jpg b/assets/images/stock_proverb/1378311_532924816785882_2059738114_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..25f57dbd0bcfe3837a6ec613aca0bd7cb439ffa3 Binary files /dev/null and b/assets/images/stock_proverb/1378311_532924816785882_2059738114_n.jpg differ diff --git a/assets/images/stock_proverb/1379710_514897598602180_1054506815_n.jpg b/assets/images/stock_proverb/1379710_514897598602180_1054506815_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f9dbd15e7bb67b4fe6d5382681699e1928edf438 Binary files /dev/null and b/assets/images/stock_proverb/1379710_514897598602180_1054506815_n.jpg differ diff --git a/assets/images/stock_proverb/1382293_534546943290336_1983830624_n.jpg b/assets/images/stock_proverb/1382293_534546943290336_1983830624_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7957406e71048f8e9bf8a082af37bed63780a9d7 Binary files /dev/null and b/assets/images/stock_proverb/1382293_534546943290336_1983830624_n.jpg differ diff --git a/assets/images/stock_proverb/1385783_533064373438593_82713880_n.jpg b/assets/images/stock_proverb/1385783_533064373438593_82713880_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9d716162e89bb457308667670b24293451cd2207 Binary files /dev/null and b/assets/images/stock_proverb/1385783_533064373438593_82713880_n.jpg differ diff --git a/assets/images/stock_proverb/1394064_532367973508233_136723090_n.jpg b/assets/images/stock_proverb/1394064_532367973508233_136723090_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f201b2f1ad5d3ec2d2732cb488aecdd521155c46 Binary files /dev/null and b/assets/images/stock_proverb/1394064_532367973508233_136723090_n.jpg differ diff --git a/assets/images/stock_proverb/1394435_543300262415004_1542017313_n.jpg b/assets/images/stock_proverb/1394435_543300262415004_1542017313_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..32c8a9d552b07f95bf4cdab9fccfa16c1319c01e Binary files /dev/null and b/assets/images/stock_proverb/1394435_543300262415004_1542017313_n.jpg differ diff --git a/assets/images/stock_proverb/1441259_556605081084522_584753461_n.jpg b/assets/images/stock_proverb/1441259_556605081084522_584753461_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..063e2e635621e070c533000330b03aff1238137a Binary files /dev/null and b/assets/images/stock_proverb/1441259_556605081084522_584753461_n.jpg differ diff --git a/assets/images/stock_proverb/1459232_302123886592905_1474351407_n.jpg b/assets/images/stock_proverb/1459232_302123886592905_1474351407_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2fa26524a4f6a3b7ae00c516d67c0ea1130af02d Binary files /dev/null and b/assets/images/stock_proverb/1459232_302123886592905_1474351407_n.jpg differ diff --git a/assets/images/stock_proverb/1476096_631673410212804_395964619_n.jpg b/assets/images/stock_proverb/1476096_631673410212804_395964619_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..281debe6fc4f3de6988456d75472faa1e9e69d76 Binary files /dev/null and b/assets/images/stock_proverb/1476096_631673410212804_395964619_n.jpg differ diff --git a/assets/images/stock_proverb/1490909_573259372748158_1409912039_o.jpg b/assets/images/stock_proverb/1490909_573259372748158_1409912039_o.jpg new file mode 100644 index 0000000000000000000000000000000000000000..001e3d90756bbc6ea9946d9299496ff5845357e7 Binary files /dev/null and b/assets/images/stock_proverb/1490909_573259372748158_1409912039_o.jpg differ diff --git a/assets/images/stock_proverb/1499686_551649154927024_706801981_n.jpg b/assets/images/stock_proverb/1499686_551649154927024_706801981_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3c36d60b6b29d5843d626de962f2fffa7484fa07 Binary files /dev/null and b/assets/images/stock_proverb/1499686_551649154927024_706801981_n.jpg differ diff --git a/assets/images/stock_proverb/1504552_10152408953465800_3027579168584719013_n.jpg b/assets/images/stock_proverb/1504552_10152408953465800_3027579168584719013_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..92a93280a803ea4a8fe3d7db02ed5b61b2005a01 Binary files /dev/null and b/assets/images/stock_proverb/1504552_10152408953465800_3027579168584719013_n.jpg differ diff --git a/assets/images/stock_proverb/151016170033-famous-refugeesalberteinstein-exlarge-169.jpg b/assets/images/stock_proverb/151016170033-famous-refugeesalberteinstein-exlarge-169.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e02511e8cb4332ba45b6797303cc0828c71c9762 Binary files /dev/null and b/assets/images/stock_proverb/151016170033-famous-refugeesalberteinstein-exlarge-169.jpg differ diff --git a/assets/images/stock_proverb/1510454_945802032107956_6547524217784969457_n.jpg b/assets/images/stock_proverb/1510454_945802032107956_6547524217784969457_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..79dc583d199a476d8ff2abdd013809f82a8e3eee Binary files /dev/null and b/assets/images/stock_proverb/1510454_945802032107956_6547524217784969457_n.jpg differ diff --git a/assets/images/stock_proverb/1536577_565527680190701_2073015291_n.jpg b/assets/images/stock_proverb/1536577_565527680190701_2073015291_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6204ac8bc4c49145bafd1f81a1cb6187fd0fc39c Binary files /dev/null and b/assets/images/stock_proverb/1536577_565527680190701_2073015291_n.jpg differ diff --git a/assets/images/stock_proverb/1536696_457475941020535_1897658061_n.jpg b/assets/images/stock_proverb/1536696_457475941020535_1897658061_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..43b449b0cbd1e4620feb9afb489ea4644b062319 Binary files /dev/null and b/assets/images/stock_proverb/1536696_457475941020535_1897658061_n.jpg differ diff --git a/assets/images/stock_proverb/1545200_790557670987071_4658848602099164802_n.jpg b/assets/images/stock_proverb/1545200_790557670987071_4658848602099164802_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cbdbd9fdfa8dd740457c98e8a0ea06a90ae5363c Binary files /dev/null and b/assets/images/stock_proverb/1545200_790557670987071_4658848602099164802_n.jpg differ diff --git a/assets/images/stock_proverb/1557638_571214422970497_246424584_n.jpg b/assets/images/stock_proverb/1557638_571214422970497_246424584_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14039982d4df425fa18e69fb368bcece4be819cc Binary files /dev/null and b/assets/images/stock_proverb/1557638_571214422970497_246424584_n.jpg differ diff --git a/assets/images/stock_proverb/1601028_509800642473092_1183020169_n.jpg b/assets/images/stock_proverb/1601028_509800642473092_1183020169_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c89b961477b713ae6e61ce157d4d3789e022637c Binary files /dev/null and b/assets/images/stock_proverb/1601028_509800642473092_1183020169_n.jpg differ diff --git a/assets/images/stock_proverb/1618471_794146560648138_4261067971285353974_n.jpg b/assets/images/stock_proverb/1618471_794146560648138_4261067971285353974_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0d62a4fe3bce34d483afed667ac8c4b0b446597b Binary files /dev/null and b/assets/images/stock_proverb/1618471_794146560648138_4261067971285353974_n.jpg differ diff --git a/assets/images/stock_proverb/1780638_736024406432763_7896007594323125151_n.jpg b/assets/images/stock_proverb/1780638_736024406432763_7896007594323125151_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f87dd81457b961aee83dd629250f82dea5216150 Binary files /dev/null and b/assets/images/stock_proverb/1780638_736024406432763_7896007594323125151_n.jpg differ diff --git a/assets/images/stock_proverb/182176_436857463002418_1065698215_n.jpg b/assets/images/stock_proverb/182176_436857463002418_1065698215_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..8d550a2a71f25a2bd18bb8b833b130fdb92ef1e4 Binary files /dev/null and b/assets/images/stock_proverb/182176_436857463002418_1065698215_n.jpg differ diff --git a/assets/images/stock_proverb/247109_679794335459787_7767874808606399023_n.jpg b/assets/images/stock_proverb/247109_679794335459787_7767874808606399023_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c57b958e601685594d1e44a3fa244d6fa5e9bc04 Binary files /dev/null and b/assets/images/stock_proverb/247109_679794335459787_7767874808606399023_n.jpg differ diff --git a/assets/images/stock_proverb/30a497b708ef0a930a7488afcfe9dfc2.jpg b/assets/images/stock_proverb/30a497b708ef0a930a7488afcfe9dfc2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9e7db2a7b91749b3316a1781ef412eb9bbeb6b49 Binary files /dev/null and b/assets/images/stock_proverb/30a497b708ef0a930a7488afcfe9dfc2.jpg differ diff --git a/assets/images/stock_proverb/428942_403474846380886_833603676_n.jpg b/assets/images/stock_proverb/428942_403474846380886_833603676_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..21bbc192a41c38354c4fa9c788bcce8ca8981da3 Binary files /dev/null and b/assets/images/stock_proverb/428942_403474846380886_833603676_n.jpg differ diff --git a/assets/images/stock_proverb/481165_472794686119272_623174142_n.jpg b/assets/images/stock_proverb/481165_472794686119272_623174142_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..814173cd46fd63039ef462db3aaa8d38838f9b91 Binary files /dev/null and b/assets/images/stock_proverb/481165_472794686119272_623174142_n.jpg differ diff --git a/assets/images/stock_proverb/486071_10151451628506000_2113529966_n.jpg b/assets/images/stock_proverb/486071_10151451628506000_2113529966_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..99ee8a27f0493455c7bf46086321d1c05117aff3 Binary files /dev/null and b/assets/images/stock_proverb/486071_10151451628506000_2113529966_n.jpg differ diff --git a/assets/images/stock_proverb/521379_10151430198273908_662870414_n.jpg b/assets/images/stock_proverb/521379_10151430198273908_662870414_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5ead4fe448cee17e0de7fb254a45a6a31cbaa289 Binary files /dev/null and b/assets/images/stock_proverb/521379_10151430198273908_662870414_n.jpg differ diff --git a/assets/images/stock_proverb/536879_297853103681524_1447461723_n.jpg b/assets/images/stock_proverb/536879_297853103681524_1447461723_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..088aad5f52713a503636000196a931d9e4df6821 Binary files /dev/null and b/assets/images/stock_proverb/536879_297853103681524_1447461723_n.jpg differ diff --git a/assets/images/stock_proverb/555305_481173581943648_1630941502_n.jpg b/assets/images/stock_proverb/555305_481173581943648_1630941502_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..82126fc99059703789ba055406a84986604487b7 Binary files /dev/null and b/assets/images/stock_proverb/555305_481173581943648_1630941502_n.jpg differ diff --git a/assets/images/stock_proverb/575534_189996011152521_961702817_n.png b/assets/images/stock_proverb/575534_189996011152521_961702817_n.png new file mode 100644 index 0000000000000000000000000000000000000000..52f388b8297dd589fd63f3c3dfdcd1cff667835c Binary files /dev/null and b/assets/images/stock_proverb/575534_189996011152521_961702817_n.png differ diff --git a/assets/images/stock_proverb/64317_582879345123762_419678914_n.jpg b/assets/images/stock_proverb/64317_582879345123762_419678914_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..495ed3820fc5cff853a734f478ab767916cb981b Binary files /dev/null and b/assets/images/stock_proverb/64317_582879345123762_419678914_n.jpg differ diff --git a/assets/images/stock_proverb/733781_571590889585941_1550626054_n.jpg b/assets/images/stock_proverb/733781_571590889585941_1550626054_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..42a24e6c34393ed93d5d47d030302decd3e2ec08 Binary files /dev/null and b/assets/images/stock_proverb/733781_571590889585941_1550626054_n.jpg differ diff --git a/assets/images/stock_proverb/994005_532956646782699_966920402_n.jpg b/assets/images/stock_proverb/994005_532956646782699_966920402_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a146d2156eb5d8e57375bb0e08931abaabba2237 Binary files /dev/null and b/assets/images/stock_proverb/994005_532956646782699_966920402_n.jpg differ diff --git a/assets/images/stock_proverb/995028_747258055303812_1704087291_n.jpg b/assets/images/stock_proverb/995028_747258055303812_1704087291_n.jpg new file mode 100644 index 0000000000000000000000000000000000000000..2dc3a0aa5ff17a59f052f12b1d82d98a84a5db92 Binary files /dev/null and b/assets/images/stock_proverb/995028_747258055303812_1704087291_n.jpg differ diff --git a/assets/images/stock_proverb/ATT1185751111.jpg b/assets/images/stock_proverb/ATT1185751111.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f028e129fd63212bf035f39b591585672c1c4106 Binary files /dev/null and b/assets/images/stock_proverb/ATT1185751111.jpg differ diff --git a/assets/images/stock_proverb/SMASHIT.jpg b/assets/images/stock_proverb/SMASHIT.jpg new file mode 100644 index 0000000000000000000000000000000000000000..61f9e07545c957cefe0aadefbf971fd16e7725d8 Binary files /dev/null and b/assets/images/stock_proverb/SMASHIT.jpg differ diff --git a/assets/images/stock_proverb/amnestyinternetionalagainst.jpg b/assets/images/stock_proverb/amnestyinternetionalagainst.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7313043ec7a4151c8bee6d988690067f03efa83b Binary files /dev/null and b/assets/images/stock_proverb/amnestyinternetionalagainst.jpg differ diff --git a/assets/images/stock_proverb/anonymous-boat_lg.jpg b/assets/images/stock_proverb/anonymous-boat_lg.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e16ab8c9ee19ebf8415c1cacdac027d74c5604c0 Binary files /dev/null and b/assets/images/stock_proverb/anonymous-boat_lg.jpg differ diff --git a/assets/images/stock_proverb/ape_skeletons.png b/assets/images/stock_proverb/ape_skeletons.png new file mode 100644 index 0000000000000000000000000000000000000000..09f5a3f80458a8d44b8d88bc503cd2e6e4e0fead Binary files /dev/null and b/assets/images/stock_proverb/ape_skeletons.png differ diff --git a/assets/images/stock_proverb/arton2721.jpg b/assets/images/stock_proverb/arton2721.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4d4afe538fb802b84a3f656d50fe46e6075d5ceb Binary files /dev/null and b/assets/images/stock_proverb/arton2721.jpg differ diff --git a/assets/images/stock_proverb/c0e834a6d9c711e28efa22000a1fbd9c_7.jpg b/assets/images/stock_proverb/c0e834a6d9c711e28efa22000a1fbd9c_7.jpg new file mode 100644 index 0000000000000000000000000000000000000000..626c3367263068e85a75f9fc38ae7a7ad7accca2 Binary files /dev/null and b/assets/images/stock_proverb/c0e834a6d9c711e28efa22000a1fbd9c_7.jpg differ diff --git a/assets/images/stock_proverb/einstein-prc3a9jugc3a9.jpg b/assets/images/stock_proverb/einstein-prc3a9jugc3a9.jpg new file mode 100644 index 0000000000000000000000000000000000000000..93d6565c9f22869c2ddfc128cedac835310d648d Binary files /dev/null and b/assets/images/stock_proverb/einstein-prc3a9jugc3a9.jpg differ diff --git a/assets/images/stock_proverb/einstein.jpg b/assets/images/stock_proverb/einstein.jpg new file mode 100644 index 0000000000000000000000000000000000000000..48a01990a316cf994bd576af78b9bf7c0afd47eb Binary files /dev/null and b/assets/images/stock_proverb/einstein.jpg differ diff --git a/assets/images/stock_proverb/evolution.jpg b/assets/images/stock_proverb/evolution.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a1cdd303620338471bbd097bbe9d5c4de08b036c Binary files /dev/null and b/assets/images/stock_proverb/evolution.jpg differ diff --git a/assets/images/stock_proverb/fight with engineers.jpg b/assets/images/stock_proverb/fight with engineers.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6a6bf2f40927a27278f70fc289e61df0aea96a99 Binary files /dev/null and b/assets/images/stock_proverb/fight with engineers.jpg differ diff --git a/assets/images/stock_proverb/john-lennon-musician-a-dream-you-dream-alone-is-only-a-dream-a-dream-you-dream.jpg b/assets/images/stock_proverb/john-lennon-musician-a-dream-you-dream-alone-is-only-a-dream-a-dream-you-dream.jpg new file mode 100644 index 0000000000000000000000000000000000000000..3d4be547f92da070a9c828ffb015ceb20a060e21 Binary files /dev/null and b/assets/images/stock_proverb/john-lennon-musician-a-dream-you-dream-alone-is-only-a-dream-a-dream-you-dream.jpg differ diff --git a/assets/images/stock_proverb/large.jpg b/assets/images/stock_proverb/large.jpg new file mode 100644 index 0000000000000000000000000000000000000000..c54687b75cd0ac2f09bd854c0c008ba83b02bb9e Binary files /dev/null and b/assets/images/stock_proverb/large.jpg differ diff --git a/assets/images/stock_proverb/picasso-great-artists-steal.jpg b/assets/images/stock_proverb/picasso-great-artists-steal.jpg new file mode 100644 index 0000000000000000000000000000000000000000..fd7033750a2415f53acfe922ecff80858e6f9ed0 Binary files /dev/null and b/assets/images/stock_proverb/picasso-great-artists-steal.jpg differ diff --git a/assets/images/stock_proverb/reality.jpg b/assets/images/stock_proverb/reality.jpg new file mode 100644 index 0000000000000000000000000000000000000000..14f2ac00f8d58c79183686a32d17f15c6db5229f Binary files /dev/null and b/assets/images/stock_proverb/reality.jpg differ diff --git a/assets/images/stock_proverb/ruissellement-30f06.jpg b/assets/images/stock_proverb/ruissellement-30f06.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a7d0bfd2158e568ed2f1c77ef85ad0629fed80b2 Binary files /dev/null and b/assets/images/stock_proverb/ruissellement-30f06.jpg differ diff --git a/assets/images/stock_proverb/sufi-story.jpg b/assets/images/stock_proverb/sufi-story.jpg new file mode 100644 index 0000000000000000000000000000000000000000..e118d7455a826c086fb5f14f39dd7e70277f8745 Binary files /dev/null and b/assets/images/stock_proverb/sufi-story.jpg differ diff --git a/assets/images/stock_proverb/tumblr_mx75g13ahU1qz51ako1_500.jpg b/assets/images/stock_proverb/tumblr_mx75g13ahU1qz51ako1_500.jpg new file mode 100644 index 0000000000000000000000000000000000000000..37324a7810e16a104fc8a6b68e88c0ddf882bb5c Binary files /dev/null and b/assets/images/stock_proverb/tumblr_mx75g13ahU1qz51ako1_500.jpg differ diff --git a/assets/images/stock_proverb/weak-strong-intelligent.jpg b/assets/images/stock_proverb/weak-strong-intelligent.jpg new file mode 100644 index 0000000000000000000000000000000000000000..b82b0d0387376c29e55cb074ccc8e80a15f88733 Binary files /dev/null and b/assets/images/stock_proverb/weak-strong-intelligent.jpg differ diff --git a/assets/images/technopole.jpg b/assets/images/technopole.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ea6e7af6c007582cef09a126fd09014ae19b40fe Binary files /dev/null and b/assets/images/technopole.jpg differ diff --git a/assets/images/testamonials/armel.png b/assets/images/testamonials/armel.png new file mode 100644 index 0000000000000000000000000000000000000000..326202c05e58fc746178fd8d371861d5cc47d02d Binary files /dev/null and b/assets/images/testamonials/armel.png differ diff --git a/assets/images/testamonials/bernard.png b/assets/images/testamonials/bernard.png new file mode 100644 index 0000000000000000000000000000000000000000..59f0a8df634a10aaa75fb0470dd331b39b5b13e0 Binary files /dev/null and b/assets/images/testamonials/bernard.png differ diff --git a/assets/images/testamonials/christian.png b/assets/images/testamonials/christian.png new file mode 100644 index 0000000000000000000000000000000000000000..1c86680568951c27da2aa96149cba22b2c595b0f Binary files /dev/null and b/assets/images/testamonials/christian.png differ diff --git a/assets/images/testamonials/clemence.png b/assets/images/testamonials/clemence.png new file mode 100644 index 0000000000000000000000000000000000000000..57089ba49eed968a2b4941131ca34f0251ea5603 Binary files /dev/null and b/assets/images/testamonials/clemence.png differ diff --git a/assets/images/testamonials/clement.PNG b/assets/images/testamonials/clement.PNG new file mode 100644 index 0000000000000000000000000000000000000000..6f0d3db9234bed70416eb221f0bba656b7b08431 Binary files /dev/null and b/assets/images/testamonials/clement.PNG differ diff --git a/assets/images/testamonials/clement.png b/assets/images/testamonials/clement.png new file mode 100644 index 0000000000000000000000000000000000000000..05f6ded1f41fa341d59672c262c27825401d3b27 Binary files /dev/null and b/assets/images/testamonials/clement.png differ diff --git a/assets/images/testamonials/default.png b/assets/images/testamonials/default.png new file mode 100644 index 0000000000000000000000000000000000000000..0b6c3b7554ac46377961ad16125f4cc234f15cea Binary files /dev/null and b/assets/images/testamonials/default.png differ diff --git a/assets/images/testamonials/florent.png b/assets/images/testamonials/florent.png new file mode 100644 index 0000000000000000000000000000000000000000..0ce9a8dd34bcd58f350fe8a3aacbc884ac9a938b Binary files /dev/null and b/assets/images/testamonials/florent.png differ diff --git a/assets/images/testamonials/francis.png b/assets/images/testamonials/francis.png new file mode 100644 index 0000000000000000000000000000000000000000..966643eb3f991939075b3388047fe32faa793aed Binary files /dev/null and b/assets/images/testamonials/francis.png differ diff --git a/assets/images/testamonials/guillaume.png b/assets/images/testamonials/guillaume.png new file mode 100644 index 0000000000000000000000000000000000000000..5fa8e334e9250808ae84f9158a2598dd1ea76414 Binary files /dev/null and b/assets/images/testamonials/guillaume.png differ diff --git a/assets/images/testamonials/guillaumeL.png b/assets/images/testamonials/guillaumeL.png new file mode 100644 index 0000000000000000000000000000000000000000..d71fc96a4e29622efee0d45ebcdc48799fd5b040 Binary files /dev/null and b/assets/images/testamonials/guillaumeL.png differ diff --git a/assets/images/testamonials/guillaumeR.png b/assets/images/testamonials/guillaumeR.png new file mode 100644 index 0000000000000000000000000000000000000000..86a00ff617194a7d7106f70d4fa673d47986c5f6 Binary files /dev/null and b/assets/images/testamonials/guillaumeR.png differ diff --git a/assets/images/testamonials/hafid.png b/assets/images/testamonials/hafid.png new file mode 100644 index 0000000000000000000000000000000000000000..3ed4fa887311ee26d084aa2b7957a5f16c4f9c4b Binary files /dev/null and b/assets/images/testamonials/hafid.png differ diff --git a/assets/images/testamonials/jean.PNG b/assets/images/testamonials/jean.PNG new file mode 100644 index 0000000000000000000000000000000000000000..9a7275145dec663d7456375ceb077ca626d26e89 Binary files /dev/null and b/assets/images/testamonials/jean.PNG differ diff --git a/assets/images/testamonials/jerome.png b/assets/images/testamonials/jerome.png new file mode 100644 index 0000000000000000000000000000000000000000..c2891882571e61c4e560c8f933f463ea73799dd4 Binary files /dev/null and b/assets/images/testamonials/jerome.png differ diff --git a/assets/images/testamonials/julien.png b/assets/images/testamonials/julien.png new file mode 100644 index 0000000000000000000000000000000000000000..7bda1365391c755bc4683d276ca2c218d2ad9916 Binary files /dev/null and b/assets/images/testamonials/julien.png differ diff --git a/assets/images/testamonials/lilian.png b/assets/images/testamonials/lilian.png new file mode 100644 index 0000000000000000000000000000000000000000..cdb517bd00da55230d72b5d90562893b50cb522e Binary files /dev/null and b/assets/images/testamonials/lilian.png differ diff --git a/assets/images/testamonials/luc.png b/assets/images/testamonials/luc.png new file mode 100644 index 0000000000000000000000000000000000000000..f8d1e46431c56ef8cfa89ffb8e97236be6fa7dea Binary files /dev/null and b/assets/images/testamonials/luc.png differ diff --git a/assets/images/testamonials/ludo.PNG b/assets/images/testamonials/ludo.PNG new file mode 100644 index 0000000000000000000000000000000000000000..ca9105b582f7916336e758e63c70b01e19bb1219 Binary files /dev/null and b/assets/images/testamonials/ludo.PNG differ diff --git a/assets/images/testamonials/maia.png b/assets/images/testamonials/maia.png new file mode 100644 index 0000000000000000000000000000000000000000..25d1a85080cd69ed33cbe5b2b9a89ebe765413b6 Binary files /dev/null and b/assets/images/testamonials/maia.png differ diff --git a/assets/images/testamonials/mathieu.PNG b/assets/images/testamonials/mathieu.PNG new file mode 100644 index 0000000000000000000000000000000000000000..a3f9a416aa9ba44c1f246af4e736740d26c250e0 Binary files /dev/null and b/assets/images/testamonials/mathieu.PNG differ diff --git a/assets/images/testamonials/pierre.png b/assets/images/testamonials/pierre.png new file mode 100644 index 0000000000000000000000000000000000000000..233a97e6baaca387ca0c717dc963e47acc61ea28 Binary files /dev/null and b/assets/images/testamonials/pierre.png differ diff --git a/assets/images/testamonials/rieul.png b/assets/images/testamonials/rieul.png new file mode 100644 index 0000000000000000000000000000000000000000..86abdc8adc791b43791aa74836d642a0756bdeb0 Binary files /dev/null and b/assets/images/testamonials/rieul.png differ diff --git a/assets/images/testamonials/romain.png b/assets/images/testamonials/romain.png new file mode 100644 index 0000000000000000000000000000000000000000..c42dc6e9100c5654fa4db8b7cffe523988d6bf65 Binary files /dev/null and b/assets/images/testamonials/romain.png differ diff --git a/assets/images/testamonials/simon.PNG b/assets/images/testamonials/simon.PNG new file mode 100644 index 0000000000000000000000000000000000000000..f782fdef9a2a3d9b14056afe9e29b1ffd8c12972 Binary files /dev/null and b/assets/images/testamonials/simon.PNG differ diff --git a/assets/images/testamonials/steph.JPG b/assets/images/testamonials/steph.JPG new file mode 100644 index 0000000000000000000000000000000000000000..38100e68a39d74c053dea265c919ed7a6f74c5ab Binary files /dev/null and b/assets/images/testamonials/steph.JPG differ diff --git a/assets/images/testamonials/sylvain.PNG b/assets/images/testamonials/sylvain.PNG new file mode 100644 index 0000000000000000000000000000000000000000..238e6f1b5397eaaabff29052b6ba883348bf52bc Binary files /dev/null and b/assets/images/testamonials/sylvain.PNG differ diff --git a/assets/images/testamonials/tibor.PNG b/assets/images/testamonials/tibor.PNG new file mode 100644 index 0000000000000000000000000000000000000000..8f12fb79b3bac2ba915a92ebeb3a71d7a8801067 Binary files /dev/null and b/assets/images/testamonials/tibor.PNG differ diff --git a/assets/images/testamonials/tristan.PNG b/assets/images/testamonials/tristan.PNG new file mode 100644 index 0000000000000000000000000000000000000000..7a409666a28f8cbfe46023082cac8ced5e97c940 Binary files /dev/null and b/assets/images/testamonials/tristan.PNG differ diff --git a/assets/images/thumb/default.png b/assets/images/thumb/default.png new file mode 100644 index 0000000000000000000000000000000000000000..0b6c3b7554ac46377961ad16125f4cc234f15cea Binary files /dev/null and b/assets/images/thumb/default.png differ diff --git a/assets/images/thumb/default_action.png b/assets/images/thumb/default_action.png new file mode 100644 index 0000000000000000000000000000000000000000..ea5b46a855f620a53bfb3bbb95cf45b374d079e1 Binary files /dev/null and b/assets/images/thumb/default_action.png differ diff --git a/assets/images/thumb/default_artPiece.png b/assets/images/thumb/default_artPiece.png new file mode 100644 index 0000000000000000000000000000000000000000..115f3a159f9e994b715407afe02d0e86a5635584 Binary files /dev/null and b/assets/images/thumb/default_artPiece.png differ diff --git a/assets/images/thumb/default_citoyens.png b/assets/images/thumb/default_citoyens.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad4be7049f1a0f5875e121753850ea407943fd4 Binary files /dev/null and b/assets/images/thumb/default_citoyens.png differ diff --git a/assets/images/thumb/default_classified.png b/assets/images/thumb/default_classified.png new file mode 100644 index 0000000000000000000000000000000000000000..ea5b46a855f620a53bfb3bbb95cf45b374d079e1 Binary files /dev/null and b/assets/images/thumb/default_classified.png differ diff --git a/assets/images/thumb/default_compostPickup.png b/assets/images/thumb/default_compostPickup.png new file mode 100644 index 0000000000000000000000000000000000000000..75e96284aa76ef079c1a40664423307d1f5b477a Binary files /dev/null and b/assets/images/thumb/default_compostPickup.png differ diff --git a/assets/images/thumb/default_entry.png b/assets/images/thumb/default_entry.png new file mode 100644 index 0000000000000000000000000000000000000000..ea5b46a855f620a53bfb3bbb95cf45b374d079e1 Binary files /dev/null and b/assets/images/thumb/default_entry.png differ diff --git a/assets/images/thumb/default_events.png b/assets/images/thumb/default_events.png new file mode 100644 index 0000000000000000000000000000000000000000..d78591f8e89779e324506c5f574ac94454b71ee3 Binary files /dev/null and b/assets/images/thumb/default_events.png differ diff --git a/assets/images/thumb/default_funPlace.png b/assets/images/thumb/default_funPlace.png new file mode 100644 index 0000000000000000000000000000000000000000..fad09a6d78540a811b0b7863f3e5330c66b98afb Binary files /dev/null and b/assets/images/thumb/default_funPlace.png differ diff --git a/assets/images/thumb/default_geoJson.png b/assets/images/thumb/default_geoJson.png new file mode 100644 index 0000000000000000000000000000000000000000..85b4114f25ea9fbfbc7d3f9ef134ee6c47938318 Binary files /dev/null and b/assets/images/thumb/default_geoJson.png differ diff --git a/assets/images/thumb/default_history.png b/assets/images/thumb/default_history.png new file mode 100644 index 0000000000000000000000000000000000000000..6c310184ff6f128b633e08a3e12575f074858140 Binary files /dev/null and b/assets/images/thumb/default_history.png differ diff --git a/assets/images/thumb/default_nature.png b/assets/images/thumb/default_nature.png new file mode 100644 index 0000000000000000000000000000000000000000..60cd321651df4259b16333df4851a9937876a767 Binary files /dev/null and b/assets/images/thumb/default_nature.png differ diff --git a/assets/images/thumb/default_openScene.png b/assets/images/thumb/default_openScene.png new file mode 100644 index 0000000000000000000000000000000000000000..c5b0081f72f5afbc77e952698a9b3fd207072ce2 Binary files /dev/null and b/assets/images/thumb/default_openScene.png differ diff --git a/assets/images/thumb/default_organizations.png b/assets/images/thumb/default_organizations.png new file mode 100644 index 0000000000000000000000000000000000000000..5f351e8e0656a2f123bd0fe5f1fa172b80a99232 Binary files /dev/null and b/assets/images/thumb/default_organizations.png differ diff --git a/assets/images/thumb/default_parking.png b/assets/images/thumb/default_parking.png new file mode 100644 index 0000000000000000000000000000000000000000..c0fad704637084e328ef5e898dc9b616804e820c Binary files /dev/null and b/assets/images/thumb/default_parking.png differ diff --git a/assets/images/thumb/default_place.png b/assets/images/thumb/default_place.png new file mode 100644 index 0000000000000000000000000000000000000000..43997fb22d1749cfb1bdeb4428168154b06d4c21 Binary files /dev/null and b/assets/images/thumb/default_place.png differ diff --git a/assets/images/thumb/default_poi.png b/assets/images/thumb/default_poi.png new file mode 100644 index 0000000000000000000000000000000000000000..85b4114f25ea9fbfbc7d3f9ef134ee6c47938318 Binary files /dev/null and b/assets/images/thumb/default_poi.png differ diff --git a/assets/images/thumb/default_projects.png b/assets/images/thumb/default_projects.png new file mode 100644 index 0000000000000000000000000000000000000000..7de0abc1d5d8fe990c3f5b0cb97710c657b4fb76 Binary files /dev/null and b/assets/images/thumb/default_projects.png differ diff --git a/assets/images/thumb/default_recoveryCenter.png b/assets/images/thumb/default_recoveryCenter.png new file mode 100644 index 0000000000000000000000000000000000000000..1686d742544d9cd58f6ba25ee55eb34a22f4871a Binary files /dev/null and b/assets/images/thumb/default_recoveryCenter.png differ diff --git a/assets/images/thumb/default_sharedLibrary.png b/assets/images/thumb/default_sharedLibrary.png new file mode 100644 index 0000000000000000000000000000000000000000..41a4ebf0427cb6d5f0b5ddf24dc98b1ebfd7891f Binary files /dev/null and b/assets/images/thumb/default_sharedLibrary.png differ diff --git a/assets/images/thumb/default_something2See.png b/assets/images/thumb/default_something2See.png new file mode 100644 index 0000000000000000000000000000000000000000..23a81d1f22b657643b3457c4553c0ac2fa1f657a Binary files /dev/null and b/assets/images/thumb/default_something2See.png differ diff --git a/assets/images/thumb/default_streetArts.png b/assets/images/thumb/default_streetArts.png new file mode 100644 index 0000000000000000000000000000000000000000..ba00fda7f7f60660d602641550eb417ffdb2bcd0 Binary files /dev/null and b/assets/images/thumb/default_streetArts.png differ diff --git a/assets/images/thumb/default_trash.png b/assets/images/thumb/default_trash.png new file mode 100644 index 0000000000000000000000000000000000000000..221da4113398c8795ff7d273f40ce7e7681b2beb Binary files /dev/null and b/assets/images/thumb/default_trash.png differ diff --git a/assets/images/thumb/default_video.png b/assets/images/thumb/default_video.png new file mode 100644 index 0000000000000000000000000000000000000000..fd36562ca53386d7f0886f80a2e947f0172a24f3 Binary files /dev/null and b/assets/images/thumb/default_video.png differ diff --git a/assets/images/thumbnail-default.jpg b/assets/images/thumbnail-default.jpg new file mode 100644 index 0000000000000000000000000000000000000000..71b331f8fa3b55f00efaa77d9a24bc3150992378 Binary files /dev/null and b/assets/images/thumbnail-default.jpg differ diff --git a/assets/images/velo.png b/assets/images/velo.png new file mode 100644 index 0000000000000000000000000000000000000000..86c5cd29245a60ca36fe3b7688b1ac382e726211 Binary files /dev/null and b/assets/images/velo.png differ diff --git a/assets/images/video2.jpg b/assets/images/video2.jpg new file mode 100644 index 0000000000000000000000000000000000000000..f113534add16d7619f591e2fbfec6ac8508b1fb6 Binary files /dev/null and b/assets/images/video2.jpg differ diff --git a/assets/images/wave.jpg b/assets/images/wave.jpg new file mode 100644 index 0000000000000000000000000000000000000000..de45958e0bdd566a7dbf34820ffbf9dd00a2256b Binary files /dev/null and b/assets/images/wave.jpg differ diff --git a/assets/images/world_pixelized.png b/assets/images/world_pixelized.png new file mode 100644 index 0000000000000000000000000000000000000000..0a284febf0e78d146cf5ef860d67e51189b639e5 Binary files /dev/null and b/assets/images/world_pixelized.png differ diff --git a/assets/js/actionRooms/actionRooms.js b/assets/js/actionRooms/actionRooms.js new file mode 100644 index 0000000000000000000000000000000000000000..587d86cb7934baf57e5512dc846e8fb0ee32f914 --- /dev/null +++ b/assets/js/actionRooms/actionRooms.js @@ -0,0 +1,63 @@ +function actionRoomDelete(id, $this, parentId){ + bootbox.confirm(trad["suretodeletediscuss"], + function(result) { + if (result) { + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/rooms/deleteroom/id/"+id, + dataType: "json", + success: function(data){ + if (data.result) { + toastr.success(data.msg); + showRoom('all', parentId); + } else { + toastr.error(data.msg); + } + } + }); + } + } + ) +} + +//TODO SBAR : mutualize with newsReportAbuse +function actionRoomReportAbuse(id, $this) { + var message = "<div id='reason' class='radio'>"+ + "<label><input type='radio' name='reason' value='Propos malveillants' checked>Propos malveillants</label><br>"+ + "<label><input type='radio' name='reason' value='Incitation et glorification des conduites agressives'>Incitation et glorification des conduites agressives</label><br>"+ + "<label><input type='radio' name='reason' value='Affichage de contenu gore et trash'>Affichage de contenu gore et trash</label><br>"+ + "<label><input type='radio' name='reason' value='Contenu pornographique'>Contenu pornographique</label><br>"+ + "<label><input type='radio' name='reason' value='Liens fallacieux ou frauduleux'>Liens fallacieux ou frauduleux</label><br>"+ + "<label><input type='radio' name='reason' value='Mention de source erronée'>Mention de source erronée</label><br>"+ + "<label><input type='radio' name='reason' value='Violations des droits auteur'>Violations des droits d\'auteur</label><br>"+ + "<input type='text' class='form-control' id='reasonComment' placeholder='Laisser un commentaire...'/><br>"+ + "</div>"; + var boxNews = bootbox.dialog({ + message: message, + title: trad["askreasonreportabuse"], + buttons: { + annuler: { + label: "Annuler", + className: "btn-default", + callback: function() { + mylog.log("Annuler"); + } + }, + danger: { + label: "Déclarer cet abus", + className: "btn-primary", + callback: function() { + // var reason = $('#reason').val(); + var reason = $("#reason input[type='radio']:checked").val(); + var reasonComment = $("#reasonComment").val(); + //actionOnNews($($this),action,method, reason, reasonComment); + toastr.info("This feature is comming soon !"); + //$($this).children(".label").removeClass("text-dark").addClass("text-red"); + } + }, + } + }); + boxNews.on("shown.bs.modal", function() { + $.unblockUI(); + }); +} \ No newline at end of file diff --git a/assets/js/activityHistory.js b/assets/js/activityHistory.js new file mode 100644 index 0000000000000000000000000000000000000000..43160f3ed03216c6cc1e241b8e779048c7eb7ed1 --- /dev/null +++ b/assets/js/activityHistory.js @@ -0,0 +1,18 @@ +var loadActivity = true; +function getHistoryOfActivities(id,type){ + $("#contentGeneralInfos").hide(); + $("#activityContent").removeClass("hide"); + $("#getHistoryOfActivities").html("<i class='fa fa-arrow-left'></i> <span class='hidden-xs'>Revenir aux détails</span>").attr("onclick","getBackDetails('"+id+"','"+type+"')"); + //if($("#activityContent").html()=='<h2 class="homestead text-dark" style="padding:40px;"><i class="fa fa-spin fa-refresh"></i> Chargement des activités ...</h2>') + if(loadActivity==true){ + getAjax('#activityContent',baseUrl+'/'+moduleId+"/pod/activitylist/type/"+type+"/id/"+id,function(){ + },"html"); + } + +} +function getBackDetails(id,type){ + $("#contentGeneralInfos").show(); + $("#activityContent").addClass("hide"); + $("#getHistoryOfActivities").html("<i class='fa fa-history'></i> <span class='hidden-xs'>Historique</span>").attr("onclick","getHistoryOfActivities('"+id+"','"+type+"')"); + loadActivity=false; +} diff --git a/assets/js/breadcrum_co.js b/assets/js/breadcrum_co.js new file mode 100644 index 0000000000000000000000000000000000000000..bc7eb25c7cdf6edcf767a69ec0747bdc945fe5d7 --- /dev/null +++ b/assets/js/breadcrum_co.js @@ -0,0 +1,247 @@ +function scopeActive(scopeValue){ + mylog.log("scopeActive", scopeValue); + if(myMultiScopes[scopeValue].active){ + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-circle-o"); + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-check-circle"); + $("[data-scope-value='"+scopeValue+"'].item-scope-input").removeClass("disabled"); + }else{ + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-circle-o"); + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-check-circle"); + $("[data-scope-value='"+scopeValue+"'].item-scope-input").addClass("disabled"); + } +} + +function bindCommunexionScopeEvents(){ + $(".btn-decommunecter").off().on('click',function(){ + activateGlobalCommunexion(false); + }); + + $(".item-globalscope-checker").click(function(){ + $(".item-globalscope-checker").addClass("inactive"); + $(this).removeClass("inactive"); + var notSearch = $(this).data("scope-notsearch"); + var testCo = false; + if($(this).hasClass("communecterSearch")){ + testCo = true; + communexion.cities = trad.allcitieswiththispostalcode + $("#main-search-bar").val(""); + if(location.hash.indexOf("#search")){ + notSearch = false; + } + } + mylog.log("globalscope-checker", $(this).data("scope-name"), $(this).data("scope-type")); + setGlobalScope( $(this).data("scope-value"), $(this).data("scope-name"), $(this).data("scope-type"), $(this).data("scope-level"), + $(this).data("scope-values"), notSearch, testCo) ; + }); + + $(".item-scope-input").off().on("click", function(){ + scopeValue=$(this).data("scope-value"); + + // if($(this).hasClass("disabled")){ + // $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-circle-o"); + // $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-check-circle"); + // $("[data-scope-value='"+scopeValue+"'].item-scope-input").removeClass("disabled"); + // }else{ + // $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-circle-o"); + // $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-check-circle"); + // $("[data-scope-value='"+scopeValue+"'].item-scope-input").addClass("disabled"); + // } + toogleScopeMultiscope( $(this).data("scope-value") ); + scopeActive(scopeValue); + if(actionOnSetGlobalScope=="filter") + $("#newsstream").html("<div class='col-md-12 text-center'><i class='fa fa-circle'></i> <i class='fa fa-circle'></i> <i class='fa fa-circle'></i><hr style='margin-top: 34px;'></div>"); + $("#footerDropdown").html("<i class='fa fa-circle'></i> <i class='fa fa-circle'></i> <i class='fa fa-circle'></i><hr style='margin-top: 34px;'>"); + var sec = 3; + if(typeof interval != "undefined") clearInterval(interval); + interval = setInterval(function(){ + if(sec == 1){ + if(actionOnSetGlobalScope=="filter"){ + if(location.hash.indexOf("#live") >= 0){ + startNewsSearch(true) + } + else if (location.hash.indexOf("#interoperability") >= 0) { + initTypeSearchInterop(); + startSearchInterop(0,30); + } + else{ + startSearch(0, indexStepInit); + } + } + clearInterval(interval); + } + else{ + sec--; + var str = ""; + for(n=0;n<sec;n++) str += "<i class='fa fa-circle'></i> "; + str += "<hr style='margin-top: 34px;'>"; + $("#footerDropdown").html(str); + if(actionOnSetGlobalScope=="filter") + $("#newsstream").html("<div class='col-md-12 text-center'>"+str+"</div>"); + } + }, 800); + checkScopeMax(); + }); + + $(".start-new-communexion").off().on("click",function(){ + mylog.log("start-new-communexion", typeof communexion.currentName); + if (typeof communexion.currentName !== 'undefined'){ + activateGlobalCommunexion(true, true); + if(actionOnSetGlobalScope=="save") + $(".item-globalscope-checker").attr('disabled', true); + }else{ + communecterUser(); + } + }); +} + +function activateGlobalCommunexion(active, firstLoad){ + mylog.log("activateGlobalCommunexion", active, firstLoad); + mylog.log("activateGlobalCommunexion actionOnSetGlobalScope", actionOnSetGlobalScope); + $.cookie('communexionActivated', active, { expires: 365, path: "/" }); + communexion.state=active; + if(active){ + headerHtml='<i class="fa fa-university"></i> ' + communexion.currentName + "<small class='text-dark'>.CO</small>"; + //if(firstLoad) + $("#container-scope-filter").html(getBreadcrumCommunexion()); + if(actionOnSetGlobalScope=="save") + $("#scopeListContainerForm").html(getBreadcrumCommunexion()); + + if(actionOnSetGlobalScope=="filter"){ + if(location.hash.indexOf("#live") >=0) + startNewsSearch(true); + else + startSearch(0, indexStepInit,searchCallback); + } + bindCommunexionScopeEvents(); + }else{ + headerHtml='<a href="#" class="menu-btn-back-category" data-target="#modalMainMenu" data-toggle="modal">'+ + '<img src="'+themeUrl+'/assets/img/LOGOS/'+domainName+'/logo-head-search.png" height="60" class="inline">'+ + '</a>'; + saveCookieMultiscope(); + showTagsScopesMin(); + bindCommunexionScopeEvents(); + + if(actionOnSetGlobalScope=="filter"){ + if(location.hash.indexOf("#live") >=0) + startNewsSearch(true); + else + startSearch(0, indexStepInit,searchCallback); + } + } + $("#main-scope-name").html(headerHtml); + $('.tooltips').tooltip(); +} +function getBreadcrumCommunexion(){ + var tips=""; + + if(typeof communexion.cities == "string") { + tips = communexion.cities ; + }else if(typeof communexion.cities != "undefined") { + $.each(communexion.cities,function(e,v){ + tips+=v+" / "; + }); + } + + + htmlCommunexion='<div class="breadcrum-communexion col-md-12">'; + if(actionOnSetGlobalScope=="filter"){ + htmlCommunexion+='<button class="btn btn-link text-red btn-decommunecter tooltips" data-toggle="tooltip" data-placement="top" title="Quitter la communexion">'+ + '<i class="fa fa-times"></i>'+ + '</button>'; + }else{ + htmlCommunexion+='<a class="btn btn-link text-red btn-decommunecter tooltips" data-toggle="tooltip" data-placement="top" title="Quitter la communexion">'+ + '<i class="fa fa-times"></i>'+ + '</a>'; + } + + htmlCommunexion+= '<i class="fa fa-university fa-2x text-red"></i>'+ + '<div class="getFormLive" style="display:inline-block;">'; + + if(communexion.values && communexion.values.level2){ + htmlCommunexion+= '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead '; + if( communexion.currentLevel != "level2" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.level2+'" '+ + 'data-scope-name="'+communexion.values.level2Name+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'data-scope-level="level2">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.level2Name+ + '</button>'; + } + + if(communexion.values && communexion.values.level3){ + htmlCommunexion+= '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead '; + if( communexion.currentLevel != "level3" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.level3+'" '+ + 'data-scope-name="'+communexion.values.level3Name+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'data-scope-level="level3">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.level3Name+ + '</button>'; + } + + if(communexion.values && communexion.values.level4){ + htmlCommunexion+= '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead '; + if( communexion.currentLevel != "level4" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.level4+'" '+ + 'data-scope-name="'+communexion.values.level4Name+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'data-scope-level="level4">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.level4Name+ + '</button>'; + } + + if(notNull(communexion.cities) && communexion.cities.length != 1){ + htmlCommunexion+= '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead tooltips '; + if( communexion.currentLevel != "cp" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.city+'" '+ + 'data-scope-name="'+communexion.values.cp+'" '+ + 'data-scope-type="cp" '+ + 'data-scope-level="cp" '+ + 'data-toggle="tooltip" data-placement="bottom" data-original-title="'+tips+'">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.cp+ + '</button>'+ + '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead '; + if( communexion.currentLevel != "city" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.city+'" '+ + 'data-scope-name="'+communexion.values.cityName+'" '+ + 'data-scope-type="city" '+ + 'data-scope-level="city">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.cityName+ + '</button>'; + }else{ + htmlCommunexion+= '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead tooltips '; + if( communexion.currentLevel != "cp" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '" data-scope-value="'+communexion.values.city+'" '+ + 'data-scope-name="'+communexion.values.cityName+'" '+ + 'data-scope-type="city" '+ + 'data-scope-level="city" '+ + 'data-toggle="tooltip" data-placement="bottom" data-original-title="'+tips+'"'+'>'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.cityName+' (toute la ville)'+ + '</button>'+ + '<button data-toggle="dropdown" data-target="dropdown-multi-scope" '+ + 'class="btn btn-link text-red item-globalscope-checker homestead '; + if( communexion.currentLevel != "city" ) + htmlCommunexion+="inactive"; + htmlCommunexion+= '"data-scope-value="'+communexion.values.city+'" '+ + 'data-scope-name="'+communexion.values.cityName+'" '+ + 'data-scope-type="cp" '+ + 'data-scope-level="city">'+ + '<i class="fa fa-angle-right"></i> '+communexion.values.cityName+ + '</button>'; + } + htmlCommunexion+= '</div>'+ + '</div>'; + return htmlCommunexion; +} \ No newline at end of file diff --git a/assets/js/co.js b/assets/js/co.js new file mode 100644 index 0000000000000000000000000000000000000000..fb90d80581e04c84c178260d5c4646001515b30a --- /dev/null +++ b/assets/js/co.js @@ -0,0 +1,5349 @@ +var countPoll = 0; +var prevStep = 0; +var steps = ["explain1","live","explain2","event","explain3","orga","explain4","project","explain5","person"]; +var slides = { + explain1 : function() { showDefinition("explainCommunectMe")}, + live : function() { urlCtrl.loadByHash("#default.live")}, + explain2 : function() { showDefinition("explainCartographiedeReseau")}, + event : function() { urlCtrl.loadByHash("#event.detail.id.57bb4078f6ca47cb6c8b457d")}, + explain3 : function() { showDefinition("explainDemoPart")}, + orga : function() { urlCtrl.loadByHash("#organization.detail.id.57553776f6ca47b37da93c2d")}, + explain4 : function() { showDefinition("explainCommunecter")}, + project : function() { urlCtrl.loadByHash("#project.detail.id.56c1a474f6ca47a8378b45ef")}, + explain5 : function() { showDefinition("explainProxicity")}, + person : function() { urlCtrl.loadByHash("#person.detail.id.54eda798f6b95cb404000903")} +}; + +function runslide(cmd) +{ + if(cmd == 0){ + prevStep = null; + urlCtrl.loadByHash("#default.live"); + } + + if( prevStep != null ){ + slides[ steps[prevStep] ](); + prevStep = ( prevStep < steps.length - 1 ) ? prevStep+1 : 0; + setTimeout( function () { + runslide(); + }, 8000); + } +} + +function checkPoll(){ + countPoll++; + mylog.log("countPoll",countPoll,"currentUrl",currentUrl); + //refactor check Log to use only one call with pollParams + //returning multple server checks in a unique ajax call + if(userId){ + _checkLoggued(); + if(typeof refreshNotifications != "undefined") + refreshNotifications(userId,"citoyens",""); + } + + //according to the loaded page + //certain checks can be made + if(currentUrl.indexOf( "#comment.index.type.actionRooms.id" ) >= 0 ) + checkCommentCount(); + + if(countPoll < 100){ + setTimeout( function () { checkPoll() }, 300000); //every5min + countPoll++; + } +} +function setLanguage(lang){ + $.cookie('lang', lang, { expires: 365, path: "/" }); + toastr.success(trad.changelanguageprocessing); + //window.reloadurlCtrl.loadByHash(location.hash); + location.reload(); +} +var watchThis = null; +function bindRightClicks() { + $.contextMenu({ + selector: ".add2fav", + build: function($trigger, e) { + if(userId){ + var validElems = ["#element", "#page","#organization","#project","#event","#person","#element","#survey","#rooms"]; + href = $trigger[0].hash.split("."); + if($.inArray(href[0],validElems) >=0 ){ + if(href[0] == "#element"){ + var what = href[3]; + var id = href[5]; + }else if (href[0] == "#page"){ + var what = href[2]; + var id = href[4]; + }else{ + var what = typeObj[ href[0].substring(1) ].col; + var id = href[3]; + } + } + /*console.log( $(this)[0].class ); + watchThis = { + t : $(this), + tr : $trigger + };*/ + var btns = { + /* + todo : how remove if can't edit + would like to use a class but can't find how to get the content of the class attribute + ask TKA + editThis : { + name: trad.edit, + icon: "fa-pencil", + callback: function(key, opt){ + dyFObj.editElement( what , id ); + } + },*/ + openInNewTab : { + name: "Ouvrir dans un nouvel onglet", + icon: "fa-arrow-circle-right", + callback: function(key, opt){ + window.open($trigger[0].hash, '_blank'); + } + } + }; + $.each( userConnected.collections, function (col,list) { + btns[col] = { + name: function($element, key, item){ + nameCol=col; + if(col=="favorites") + nameCol="mes favoris"; + var str = "Ajouter à "+nameCol; + //console.log(col,what,id); + if( notNull( userConnected.collections[col]) && notNull( userConnected.collections[col][what] ) && notNull( userConnected.collections[col][what][id]) ) + str = "Retirer de "+nameCol; + return str; + }, + icon: "fa-folder-open", + callback: function(key, opt){ + if( notNull( what )&& notNull( id ) ){ + collection.add2fav( what,id,col ); + } + } + } + }); + btns.newCollection = { + name: "Créer une nouvelle Collection", + icon: "fa-folder-open-o", + callback: function(key, opt){ + if(userId ){ + collection.crud(); + } + } + }; + return { items: btns } + } + } + }); + $.contextMenu({ + selector: ".tag", + build: function($trigger, e) { + var tag = $trigger[0].dataset.tagValue; + var btns = {}; + btns.filterTag = { + name: "Filtrer", + icon: "fa-filter", + callback: function(key, opt){ + directory.toggleEmptyParentSection(".favSection","."+slugify(tag),directory.elemClass,1); + } + }; + btns.addToMultiTags = { + name: "Ajouter au tags préférés", + icon: "fa-tag", + callback: function(key, opt){ + addTagToMultitag( tag ); + } + }; + return { items: btns } + } + }); +} +function linkify(inputText) { + var replacedText, replacePattern1, replacePattern2, replacePattern3; + + //URLs starting with http://, https://, or ftp:// + replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; + replacedText = inputText.replace(replacePattern1, '<a href="$1" target="_blank">$1</a>'); + + //URLs starting with "www." (without // before it, or it'd re-link the ones done above). + replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim; + replacedText = replacedText.replace(replacePattern2, '$1<a href="http://$2" target="_blank">$2</a>'); + + //Change email addresses to mailto:: links. + replacePattern3 = /(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim; + replacedText = replacedText.replace(replacePattern3, '<a href="mailto:$1">$1</a>'); + + return replacedText; +} +function addslashes(str) { + // discuss at: http://phpjs.org/functions/addslashes/ + // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // improved by: Ates Goral (http://magnetiq.com) + // improved by: marrtins + // improved by: Nate + // improved by: Onno Marsman + // improved by: Brett Zamir (http://brett-zamir.me) + // improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/) + // input by: Denny Wardhana + // example 1: addslashes("kevin's birthday"); + // returns 1: "kevin\\'s birthday" + + return (str + '') + .replace(/[\\"']/g, '\\$&') + .replace(/\u0000/g, '\\0'); + } +/* *************************** */ +/* instance du menu questionnaire*/ +/* *************************** */ +function DropDown(el) { + this.dd = el; + this.placeholder = this.dd.children('span'); + this.opts = this.dd.find('ul.dropdown > li'); + this.val = ''; + this.index = -1; + this.initEvents(); +} +DropDown.prototype = { + initEvents : function() { + var obj = this; + + obj.dd.on('click', function(event){ + $(this).toggleClass('active'); + return false; + }); + + obj.opts.on('click',function(){ + var opt = $(this); + obj.val = opt.text(); + obj.index = opt.index(); + obj.placeholder.text(obj.val); + window.open($(this).find('a').slice(0,1).attr('href')); + }); + }, + getValue : function() { + return this.val; + }, + getIndex : function() { + return this.index; + } +} + +function openModal(key,collection,id,tpl,savePath,isSub){ + $.ajax({ + type: "POST", + url: baseUrl+"/common/GetMicroformat/key/"+key, + data: { "key" : key, + "template" : tpl, + "collection" : collection, + "id" : id, + "savePath" : savePath, + "isSub" : isSub }, + success: function(data){ + $("#flashInfoLabel").html(data.title); + $("#flashInfoContent").html(data.content); + $("#flashInfoSaveBtn").html('<a class="btn btn-warning " href="javascript:;" onclick="$(\'#flashForm\').submit(); return false;" >Enregistrer</a>'); + + }, + dataType: "json" + }); +} + +function updateField(type,id,name,value,reload, toastr){ + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/"+type+"/updatefield", + data: { "pk" : id ,"name" : name, value : value }, + success: function(data){ + if(data.result) { + if(toastr==null) + toastr.success(data.msg); + if(reload) + urlCtrl.loadByHash(location.hash); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); +} +function addslashes(str) { + // discuss at: http://phpjs.org/functions/addslashes/ + // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // improved by: Ates Goral (http://magnetiq.com) + // improved by: marrtins + // improved by: Nate + // improved by: Onno Marsman + // improved by: Brett Zamir (http://brett-zamir.me) + // improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/) + // input by: Denny Wardhana + // example 1: addslashes("kevin's birthday"); + // returns 1: "kevin\\'s birthday" + + return (str + '') + .replace(/[\\"']/g, '\\$&') + .replace(/\u0000/g, '\\0'); + } +/* *************************** */ +/* global JS tools */ +/* *************************** */ +var mylog = (function () { + + return { + log: function() { + if(debug){ + var args = Array.prototype.slice.call(arguments); + console.log.apply(console, args); + } + }, + warn: function() { + if( debug){ + var args = Array.prototype.slice.call(arguments); + console.warn.apply(console, args); + } + }, + debug: function() { + if(debug){ + var args = Array.prototype.slice.call(arguments); + console.debug.apply(console, args); + } + }, + info: function() { + if(debug){ + var args = Array.prototype.slice.call(arguments); + console.info.apply(console, args); + } + }, + dir: function() { + if(debug){ + var args = Array.prototype.slice.call(arguments); + console.warn.apply(console, args); + } + }, + error: function() { + if(debug){ + var args = Array.prototype.slice.call(arguments); + console.error.apply(console, args); + } + } + } +}()); +/* ------------------------------- */ + +function initSequence(){ + $.each(initT, function(k,v){ + log(k,'info'); + v(); + }); + initT = null; +} + +function showEvent(id){ + $("#"+id).click(function(){ + if($("#"+id).prop("checked")) + $("#"+id+"What").removeClass("hidden"); + else + $("#"+id+"What").addClass("hidden"); + }); +} + +//In this javascript file you can find a bunk of functional functions +//Calling Actions in ajax. Can be used easily on views +function connectPerson(connectUserId, callback) +{ + mylog.log("connect Person"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data : { + connectUserId : connectUserId, + } + }) + .done(function (data) { + $.unblockUI(); + if (data && data.result) { + var name = $("#newInvite #ficheName").text(); + toastr.success('You are now following '+name); + if (typeof callback == "function") callback(data.invitedUser); + } else { + $.unblockUI(); + toastr.error('Something Went Wrong !'); + } + + }); + +} + + + +function disconnectTo(parentType,parentId,childId,childType,connectType, callback, linkOption) { + var messageBox = trad["removeconnection"+connectType]; + $(".disconnectBtnIcon").removeClass("fa-unlink").addClass("fa-spinner fa-spin"); + var formData = { + "childId" : childId, + "childType" : childType, + "parentType" : parentType, + "parentId" : parentId, + "connectType" : connectType, + }; + if(typeof linkOption != "undefined" && linkOption) + formData.linkOption=linkOption; + bootbox.dialog({ + onEscape: function() { + $(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + }, + message: '<div class="row"> ' + + '<div class="col-md-12"> ' + + '<span>'+messageBox+' ?</span> ' + + '</div></div>', + buttons: { + success: { + label: "Ok", + className: "btn-primary", + callback: function () { + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/disconnect", + data : formData, + dataType: "json", + success: function(data){ + if ( data && data.result ) { + type=formData.parentType; + if(formData.parentType== "citoyens") + type="people"; + removeFloopEntity(data.parentId, type); + toastr.success("Le lien a été supprimé avec succès"); + if (typeof callback == "function") + callback(); + else + urlCtrl.loadByHash(location.hash); + } else { + toastr.error("You leave succesfully"); + } + } + }); + } + }, + cancel: { + label: trad["cancel"], + className: "btn-secondary", + callback: function() { + $(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + } + } + } + }); +}; + +// Javascript function used to validate a link between parent and child (ex : member, admin...) +function validateConnection(parentType, parentId, childId, childType, linkOption, callback) { + var formData = { + "childId" : childId, + "childType" : childType, + "parentType" : parentType, + "parentId" : parentId, + "linkOption" : linkOption, + }; + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/validate", + data: formData, + dataType: "json", + success: function(data) { + if (data.result) { + if (typeof callback == "function") + callback(parentType, parentId, childId, childType, linkOption); + else{ + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + } + + } else { + toastr.error(data.msg); + } + }, + }); +} + +function follow(parentType, parentId, childId, childType, callback){ + mylog.log("follow",parentType, parentId, childId, childType, callback); + $(".followBtn").removeClass("fa-link").addClass("fa-spinner fa-spin"); + var formData = { + "childId" : childId, + "childType" : childType, + "parentType" : parentType, + "parentId" : parentId, + }; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/follow", + data: formData, + dataType: "json", + success: function(data) { + if(data.result){ + if (formData.parentType) + addFloopEntity(formData.parentId, formData.parentType, data.parentEntity); + toastr.success(data.msg); + if (typeof callback == "function") + callback(); + else + urlCtrl.loadByHash(location.hash); + } + else + toastr.error(data.msg); + }, + }); +} + +function connectTo(parentType, parentId, childId, childType, connectType, parentName, actionAdmin) { + if(parentType=="events" && connectType=="attendee") + $(".connectBtn").removeClass("fa-link").addClass("fa-spinner fa-spin"); + else + $(".becomeAdminBtn").removeClass("fa-user-plus").addClass("fa-spinner fa-spin"); + var formData = { + "childId" : childId, + "childType" : childType, + "parentType" : parentType, + "parentId" : parentId, + "connectType" : connectType, + }; + mylog.log(formData); + + if(connectType!="admin" && connectType !="attendee"){ + bootbox.dialog({ + title: trad["suretojoin"+parentType]+" "+trad["as"+connectType]+" ?", + onEscape: function() { + $(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus"); + }, + message: '<div class="row"> ' + + '<div class="col-md-12"> ' + + '<form class="form-horizontal"> ' + + '<label class="col-md-4 control-label" for="awesomeness">'+tradDynForm.wouldbecomeadmin+'?</label> ' + + '<div class="col-md-4"> <div class="radio"> <label for="awesomeness-0"> ' + + '<input type="radio" name="awesomeness" id="awesomeness-0" value="admin"> ' + + tradDynForm.yes+' </label> ' + + '</div><div class="radio"> <label for="awesomeness-1"> ' + + '<input type="radio" name="awesomeness" id="awesomeness-1" value="'+connectType+'" checked="checked"> '+tradDynForm.no+' </label> ' + + '</div> ' + + '</div> </div>' + + '</form></div></div>', + buttons: { + success: { + label: "Ok", + className: "btn-primary", + callback: function () { + var role = $('#role').val(); + var answer = $("input[name='awesomeness']:checked").val(); + if(role!=""){ + formData.roles=role; + } + formData.connectType=answer; + mylog.log(formData); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/connect", + data: formData, + dataType: "json", + success: function(data) { + if(data.result){ + addFloopEntity(data.parent["_id"]["$id"], data.parentType, data.parent); + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + } + else{ + if(typeof(data.type)!="undefined" && data.type=="info") + toastr.info(data.msg); + else + toastr.error(data.msg); + } + }, + }); + } + }, + cancel: { + label: trad["cancel"], + className: "btn-secondary", + callback: function() { + $(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus"); + } + } + } + } + ); + } + else{ + messageBox=trad["suretojoin"+parentType];; + if (connectType=="admin") + messageBox += " " + trad["as"+connectType]; + bootbox.dialog({ + onEscape: function() { + $(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus"); + }, + message: '<div class="row"> ' + + '<div class="col-md-12"> ' + + '<span>'+messageBox+' ?</span> ' + + '</div></div>', + buttons: { + success: { + label: "Ok", + className: "btn-primary", + callback: function () { + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/connect", + data: formData, + dataType: "json", + success: function(data) { + if(data.result){ + addFloopEntity(data.parent["_id"]["$id"], data.parentType, data.parent); + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + } + else{ + if(typeof(data.type)!="undefined" && data.type=="info") + toastr.info(data.msg); + else + toastr.error(data.msg); + } + }, + }); + } + }, + cancel: { + label: trad["cancel"], + className: "btn-secondary", + callback: function() { + $(".becomeAdminBtn").removeClass("fa-spinner fa-spin").addClass("fa-user-plus"); + } + } + } + } + ); + } +} + +var CoAllReadyLoad = false; +var urlCtrl = { + afterLoad : null, + loadableUrls : { + "#modal." : {title:'OPEN in Modal'}, + "#event.calendarview" : {title:"EVENT CALENDAR ", icon : "calendar"}, + "#city.opendata" : {title:'STATISTICS ', icon : 'line-chart' }, + "#person.telegram" : {title:'CONTACT PERSON VIA TELEGRAM ', icon : 'send' }, + "#event.detail" : {aliasParam: "#page.type.events.id.$id", params: ["id"],title:'EVENT DETAIL ', icon : 'calendar' }, + "#poi.detail" : {aliasParam: "#page.type.poi.id.$id", params: ["id"],title:'POI DETAIL ', icon : 'calendar' }, + "#organization.detail" : {aliasParam: "#page.type.organizations.id.$id", params: ["id"],title:'ORGANIZATION DETAIL ', icon : 'users' }, + "#project.detail" : {aliasParam: "#page.type.projects.id.$id", params: ["id"], title:'PROJECT DETAIL ', icon : 'lightbulb-o' }, + "#project.addchartsv" : {title:'EDIT CHART ', icon : 'puzzle-piece' }, + "#event.directory" : {aliasParam: "#page.type.events.id.$id.view.directory.dir.attendees", params: ["id"],title:'EVENT DETAIL ', icon : 'calendar' }, + "#organization.directory" : {aliasParam: "#page.type.organizations.id.$id.view.directory.dir.members", params: ["id"],title:'ORGANIZATION DETAIL ', icon : 'users' }, + "#project.directory" : {aliasParam: "#page.type.projects.id.$id.view.directory.dir.contributors", params: ["id"], title:'PROJECT DETAIL ', icon : 'lightbulb-o' }, + "#news.detail" : {aliasParam: "#page.type.news.id.$id", params: ["id"], title:'NEWS', icon : 'rss' }, + "#news.index" : {aliasParam: "#page.type.$type.id.$id", params: ["type","id"], title:'NEWS', icon : 'rss' }, + "#project.addchartsv" : {title:'EDIT CHART ', icon : 'puzzle-piece' }, + "#chart.addchartsv" : {title:'EDIT CHART ', icon : 'puzzle-piece' }, + "#gantt.addtimesheetsv" : {title:'EDIT TIMELINE ', icon : 'tasks' }, + //"#news.detail" : {title:'NEWS DETAIL ', icon : 'rss' }, + //"#news.index.type" : {title:'NEWS INDEX ', icon : 'rss', menuId:"menu-btn-news-network","urlExtraParam":"isFirst=1" }, + "#need.detail" : {title:'NEED DETAIL ', icon : 'cubes' }, + "#need.addneedsv" : {title:'NEED DETAIL ', icon : 'cubes' }, + "#city.creategraph" : {title:'CITY ', icon : 'university', menuId:"btn-geoloc-auto-menu" }, + "#city.graphcity" : {title:'CITY ', icon : 'university', menuId:"btn-geoloc-auto-menu" }, + "#city.statisticPopulation" : {title:'CITY ', icon : 'university' }, + "#rooms.index.type.cities" : {title:'ACTION ROOMS ', icon : 'cubes', menuId:"btn-citizen-council-commun"}, + "#rooms.editroom" : {title:'ADD A ROOM ', icon : 'plus', action:function(){ editRoomSV (); }}, + "#element.aroundme" : {title:"Around me" , icon : 'crosshairs', menuId:"menu-btn-around-me"}, + "#element.notifications" : {title:'DETAIL ENTITY', icon : 'legal'}, + "#person.settings" : {title:'DETAIL ENTITY', icon : 'legal'}, + "#person.invite" : {title:'DETAIL ENTITY', icon : 'legal'}, + "#element" : {title:'DETAIL ENTITY', icon : 'legal'}, + "#gallery" : {title:'ACTION ROOMS ', icon : 'photo'}, + "#comment" : {title:'DISCUSSION ROOMS ', icon : 'comments'}, + "#admin" : {title:'CHECKGEOCODAGE ', icon : 'download', useHeader: true}, + "#admin.checkgeocodage" : {title:'CHECKGEOCODAGE ', icon : 'download', useHeader: true}, + "#admin.openagenda" : {title:'OPENAGENDA ', icon : 'download', useHeader: true}, + "#admin.adddata" : {title:'ADDDATA ', icon : 'download', useHeader: true}, + "#admin.importdata" : {title:'IMPORT DATA ', icon : 'download', useHeader: true}, + //"#admin.index" : {title:'IMPORT DATA ', icon : 'download', useHeader: true}, + "#admin.cities" : {title:'CITIES ', icon : 'university', useHeader: true}, + "#admin.sourceadmin" : {title:'SOURCE ADMIN', icon : 'download', useHeader: true}, + "#admin.checkcities" : {title:'SOURCE ADMIN', icon : 'download', useHeader: true}, + //"#admin.directory" : {title:'IMPORT DATA ', icon : 'download', useHeader: true}, + "#admin.mailerrordashboard" : {title:'MAIL ERROR ', icon : 'download', useHeader: true}, + "#admin.moderate" : {title:'MODERATE ', icon : 'download', useHeader: true}, + "#admin.createfile" : {title:'IMPORT DATA', icon : 'download', useHeader: true}, + "#log.monitoring" : {title:'LOG MONITORING ', icon : 'plus', useHeader: true}, + "#adminpublic.index" : {title:'SOURCE ADMIN', icon : 'download', useHeader: true}, + "#adminpublic.createfile" : {title:'IMPORT DATA', icon : 'download', useHeader : true}, + "#adminpublic.adddata" : {title:'ADDDATA ', icon : 'download', useHeader : true}, + "#adminpublic.interopproposed" : {title : 'INTEROP PROPOSED', icon : 'download', useHeader : true}, + "#admin.cleantags" : {title : 'CLEAN TAGS', icon : 'download'}, + "#default.directory" : {title:'COMMUNECTED DIRECTORY', icon : 'connectdevelop', menuId:"menu-btn-directory"}, + "#default.news" : {title:'COMMUNECTED NEWS ', icon : 'rss', menuId:"menu-btn-news" }, + "#default.agenda" : {title:'COMMUNECTED AGENDA ', icon : 'calendar', menuId:"menu-btn-agenda"}, + "#default.home" : {title:'COMMUNECTED HOME ', icon : 'home',"menu":"homeShortcuts"}, + "#default.apropos" : {title:'COMMUNECTED HOME ', icon : 'star',"menu":"homeShortcuts"}, + "#default.twostepregister" : {title:'TWO STEP REGISTER', icon : 'home', "menu":"homeShortcuts"}, + "#default.view.page" : {title:'Découvrir', icon : 'file-o'}, + "#home" : {"alias":"#default.home"}, + "#stat.chartglobal" : {title:'STATISTICS ', icon : 'bar-chart'}, + "#stat.chartlogs" : {title:'STATISTICS ', icon : 'bar-chart'}, + "#default.live" : {title:"FLUX'Direct" , icon : 'heartbeat', menuId:"menu-btn-live"}, + "#default.login" : {title:'COMMUNECTED AGENDA ', icon : 'calendar'}, + "#showTagOnMap.tag" : {title:'TAG MAP ', icon : 'map-marker', action:function( hash ){ showTagOnMap(hash.split('.')[2]) } }, + "#define." : {title:'TAG MAP ', icon : 'map-marker', action:function( hash ){ showDefinition("explain"+hash.split('.')[1]) } }, + "#data.index" : {title:'OPEN DATA FOR ALL', icon : 'fa-folder-open-o'}, + "#opendata" : {"alias":"#data.index"}, + "#interoperability.copedia" : {title:'COPEDIA', icon : 'fa-folder-open-o','useHeader' : true}, + "#interoperability.co-osm" : {title:'COSM', icon : 'fa-folder-open-o','useHeader' : true}, + "#graph" : { title:'Graph', icon : 'connectdevelop' }, + + "#chatAction" : {title:'CHAT', icon : 'comments', action:function(){ rcObj.loadChat("","citoyens", true, true) }, removeAfterLoad : true }, + }, + shortVal : ["p","poi","s","o","e","pr","c","cl"/* "s","v","a", "r",*/], + shortKey : [ "citoyens","poi" ,"siteurl","organizations","events","projects" ,"cities" ,"classified"/*"entry","vote" ,"action" ,"rooms" */], + map : function (hash) { + if(typeof hash == "undefined") return { hash : "#", + type : "", + id : "" + }; + hashT = hash.split('.'); + return { + hash : hash, + type : hashT[2], + id : hashT[4] + }; + }, + convertToPath : function(hash) { + return hash.substring(1).replace( "#","" ).replace( /\./g,"/" ); + }, + //manages url short cuts like eve_xxxxx + //warning : works with only 1 underscore + //can contain more variables eve_xxxxx.viewer.dsdsd + checkAndConvert : function (hash) { + hashT = hash.split('_'); + mylog.log("-------checkAndConvert : ",hash,hashT); + pos = $.inArray( hashT[0].substring(1) , urlCtrl.shortVal ); + if( pos >= 0 ){ + type = urlCtrl.shortKey[pos]; + hash = "#page.type."+type+".id."+hashT[1]; + mylog.log("converted hash : ",hash); + } + return hash; + }, + jsController : function (hash){ + mylog.log("jsController", hash); + hash = urlCtrl.checkAndConvert(hash); + //alert("jsController"+hash); + mylog.log("jsController",hash); + res = false; + $(".menuShortcuts").addClass("hide"); + //mylog.log("urlCtrl.loadableUrls", urlCtrl.loadableUrls); + $.each( urlCtrl.loadableUrls, function(urlIndex,urlObj) + { + //mylog.log("replaceAndShow2",urlIndex); + if( hash.indexOf(urlIndex) >= 0 ) + { + if(urlObj.goto){ + window.location.href = urlObj.goto; + return false; + } + checkMenu(urlObj, hash); + + endPoint = urlCtrl.loadableUrls[urlIndex]; + mylog.log("jsController 2",endPoint,"login",endPoint.login,endPoint.hash ); + if( typeof endPoint.login == undefined || !endPoint.login || ( endPoint.login && userId ) ) + { + //alises are renaming of urls example default.home could be #home + if( endPoint.alias ){ + endPoint = urlCtrl.jsController(endPoint.alias); + return false; + } + if( endPoint.aliasParam ){ + hashT=hash.split("."); + alias=endPoint.aliasParam; + $.each(endPoint.params, function(i, v){ + $.each(hashT, function(ui, e){ + if (v == e){ + paramId=hashT[ui+1]; + alias = alias.replace("$"+v, paramId); + } + }); + }); + endPoint = urlCtrl.jsController(alias); + return false; + } + // an action can be connected to a url, and executed + if( endPoint.action && typeof endPoint.action == "function"){ + endPoint.action(hash); + } else { + //classic url management : converts urls by replacing dots to slashes and ajax retreiving and showing the content + extraParams = (endPoint.urlExtraParam) ? "?"+endPoint.urlExtraParam : ""; + urlExtra = (endPoint.urlExtra) ? endPoint.urlExtra : ""; + //execute actions before teh ajax request + res = false; + if( endPoint.preaction && typeof endPoint.preaction == "function") + res = endPoint.preaction(hash); + //hash can be iliased + if (endPoint.hash) + hash = hash.replace(urlIndex, endPoint.hash); + if(hash.indexOf("?") >= 0){ + hashT=hash.split("?"); + mylog.log(hashT); + hash=hashT[0]; + extraParams = "?"+hashT[1]; + } + if(extraParams.indexOf("#") >= 0){ + extraParams=extraParams.replace( "#","%hash%" ); + } + path = urlCtrl.convertToPath(hash); + pathT = path.split('/'); + //open path in a modal (#openModal) + if(pathT[0] == "modal"){ + path = path.substring(5); + alert(baseUrl+'/'+moduleId+path); + smallMenu.openAjaxHTML(baseUrl+'/'+moduleId+path); + } else + showAjaxPanel( '/'+path+urlExtra+extraParams, endPoint.title,endPoint.icon, res,endPoint ); + + if(endPoint.menu) + $("."+endPoint.menu).removeClass("hide"); + + if(endPoint.removeAfterLoad){ + //alert("removeAfterLoad 1"); + history.pushState('', document.title, window.location.pathname); + } + } + res = true; + return false; + } else { + mylog.warn("PRIVATE SECTION LOGIN FIRST",hash); + showPanel( "box-login" ); + resetUnlogguedTopBar(); + res = true; + } + } /*else + alert("hash not found");*/ + }); + return res; + }, + + //back sert juste a differencier un load avec le back btn + //ne sert plus, juste a savoir d'ou vient drait l'appel + loadByHash : function ( hash , back ) { + // mylog.log("IS DIRECTORY ? ", + // hash.indexOf("#default.directory"), + // location.hash.indexOf("#default.directory"), CoAllReadyLoad); + onchangeClick=false; + navInSlug=false; + mylog.log("loadByHash", hash, back ); + if(typeof globalTheme != "undefined" && globalTheme=="network"){ + mylog.log("globalTheme", globalTheme); + if( /*hash.indexOf("#network") < 0 && + location.hash.indexOf("#network") >= 0 &&*/ hash!="#" && hash!=""){ + mylog.log("network"); + //} + //else{ + mylog.log("network2"); + count=$(".breadcrumAnchor").length; + //case on reload view + if(count==0) + count=1; + breadcrumGuide(count, hash); + } + + return ; + } + + if( hash.indexOf("#default.directory") >= 0 && + location.hash.indexOf("#default.directory") >= 0 && CoAllReadyLoad==true){ + var n = hash.indexOf("type=")+5; + var type = hash.substr(n); + mylog.log("CHANGE directory", type); + searchType = [type]; + setHeaderDirectory(type); + loadingData = false; + startSearch(0, indexStepInit, ( notNull(searchCallback) ) ? searchCallback : null ); + mylog.log("testnetwork hash 2", hash); + location.hash = hash; + return; + } + currentUrl = hash; + allReadyLoad = true; + CoAllReadyLoad = true; + if( typeof urlCtrl.loadableUrls[hash] == "undefined" || + typeof urlCtrl.loadableUrls[hash].emptyContextData == "undefined" || + urlCtrl.loadableUrls[hash].emptyContextData == true ) + contextData = null; + + $(".my-main-container").off() + .bind("scroll", function () {shadowOnHeader()}) + .scrollTop(0); + + $(".searchIcon").removeClass("fa-file-text-o").addClass("fa-search"); + searchPage = false; + + //alert("urlCtrl.loadByHash"+hash); + + mylog.warn("urlCtrl.loadByHash",hash,back); + if( urlCtrl.jsController(hash) ){ + mylog.log("urlCtrl.loadByHash >>> hash found",hash); + } + else if( hash.indexOf("#panel") >= 0 ){ + + panelName = hash.substr(7); + mylog.log("panelName",panelName); + if( (panelName == "box-login" || panelName == "box-register") && userId != "" && userId != null ){ + urlCtrl.loadByHash("#default.home"); + return false; + } else if(panelName == "box-add") + title = 'ADD SOMETHING TO MY NETWORK'; + else + title = "WELCOM MUNECT HEY !!!"; + if(panelName == "box-login"){ + $('#modalLogin').modal("show"); + $.unblockUI(); + } + else if(panelName == "box-register"){ + $('#modalRegister').modal("show"); + $.unblockUI(); + } + else + showPanel(panelName,null,title); + } else if( hash.indexOf("#gallery.index.id") >= 0 ){ + hashT = hash.split("."); + showAjaxPanel( '/'+hash.replace( "#","" ).replace( /\./g,"/" ), 'ACTIONS in this '+typesLabels[hashT[3]],'rss' ); + } + + /*else if( hash.indexOf("#news.index.type") >= 0 ){ + hashT = hash.split("."); + showAjaxPanel( '/'+hash.replace( "#","" ).replace( /\./g,"/" )+'?isFirst=1', 'KESS KISS PASS in this '+typesLabels[hashT[3]],'rss' ); + + } */ + else if( hash.indexOf("#city.directory") >= 0 ){ + hashT = hash.split("."); + showAjaxPanel( '/'+hash.replace( "#","" ).replace( /\./g,"/" ), 'KESS KISS PASS in this '+typesLabels[hashT[3]],'rss' ); + } + /*else if( hash.indexOf("#need.addneedsv") >= 0 ){ + hashT = hash.split("."); + showAjaxPanel( '/'+hash.replace( "#","" ).replace( /\./g,"/" ), 'ADD NEED '+typesLabels[hashT[3]],'cubes' ); + } + else if( hash.indexOf("#need.addneedsv") >= 0 ){ + hashT = hash.split("."); + showAjaxPanel( '/'+hash.replace( "#","" ).replace( /\./g,"/" ), 'ADD NEED '+typesLabels[hashT[3]],'cubes' ); + } */ + else if(hash.length>2){ + hash = hash.replace( "#","" ); + hashT=hash.split("."); + if(typeof hashT == "string") + slug=hashT; + else + slug=hashT[0]; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/slug/getinfo/key/"+slug, + dataType: "json", + success: function(data){ + if(data.result){ + viewPage=""; + if(hashT.length > 1){ + hashT.shift(); + viewPage="/"+hashT.join("/"); + } + showAjaxPanel('/app/page/type/'+data.contextType+'/id/'+data.contextId+viewPage); + }else + showAjaxPanel( '/app/index', 'Home','home' ); + }, + }); + } + else + showAjaxPanel( '/app/index', 'Home','home' ); + mylog.log("testnetwork hash", hash); + location.hash = hash; + /*if(typeof back == "function"){ + alert("back"); + back(); + }*/ + } +} + +/* **************** +Generic non-ajax panel loading process +**************/ +function showPanel(box,callback){ + $(".my-main-container").scrollTop(0); + + $(".box").hide(200); + showNotif(false); + + if(isMapEnd) showMap(false); + + mylog.log("showPanel",box); + //showTopMenu(false); + $(themeObj.mainContainer).animate({ top: -1500, opacity:0 }, 500 ); + + $("."+box).show(500); + if (typeof callback == "function") { + callback(); + } +} + +/* **************** +Generic ajax panel loading process +loads any REST Url endpoint returning HTML into the content section +also switches the global Title and Icon +**************/ + +function processingBlockUi() { + msg = '<h4 style="font-weight:300" class=" text-dark padding-10">'+ + '<i class="fa fa-spin fa-circle-o-notch"></i><br>'+trad.currentlyloading+'...'+ + '</h4>'; + + if( jsonHelper.notNull( "themeObj.blockUi.processingMsg" ) ) + msg = themeObj.blockUi.processingMsg; + $.blockUI({ message : msg }); + bindLBHLinks(); +} +function showAjaxPanel (url,title,icon, mapEnd , urlObj) { + //alert("showAjaxPanel"+url); + $(".progressTop").show().val(20); + var dest = ( typeof urlObj == "undefined" || typeof urlObj.useHeader != "undefined" ) ? themeObj.mainContainer : ".pageContent" ; + mylog.log("showAjaxPanel", url, urlObj,dest,urlCtrl.afterLoad ); + //var dest = themeObj.mainContainer; + hideScrollTop = false; + //alert("showAjaxPanel"+dest); + showNotif(false); + + //setTimeout(function(){ + //$(".main-container > header").html(""); + //$(".pageContent").html(""); + $(".hover-info,.hover-info2").hide(); + //processingBlockUi(); + showMap(false); + //}, 200); + + $(".box").hide(200); + //showPanel('box-ajax'); + icon = (icon) ? " <i class='fa fa-"+icon+"'></i> " : ""; + $(".panelTitle").html(icon+title).fadeIn(); + mylog.log("GETAJAX",icon+title); + //showTopMenu(true); + userIdBefore = userId; + setTimeout(function(){ + if( $(dest).length ) + { + setTimeout(function(){ $('.progressTop').val(40)}, 1000); + setTimeout(function(){ $('.progressTop').val(60)}, 3000); + getAjax(dest, baseUrl+'/'+moduleId+url, function(data){ + + if( dest != themeObj.mainContainer ) + $(".subModuleTitle").html(""); + + //initNotifications(); + + $(".modal-backdrop").hide(); + bindExplainLinks(); + bindTags(); + bindLBHLinks(); + $(".progressTop").val(90); + setTimeout(function(){ $(".progressTop").val(100)}, 10); + $(".progressTop").fadeOut(200); + $.unblockUI(); + + if(mapEnd) + showMap(true); + + if(typeof contextData != "undefined" && contextData != null && contextData.type && contextData.id ){ + uploadObj.set(contextData.type,contextData.id); + } + + if( typeof urlCtrl.afterLoad == "function") { + urlCtrl.afterLoad(); + urlCtrl.afterLoad = null; + } + /*if(debug){ + getAjax(null, baseUrl+'/'+moduleId+"/log/dbaccess", function(data){ + if(prevDbAccessCount == 0){ + dbAccessCount = parseInt(data); + prevDbAccessCount = dbAccessCount; + } else { + dbAccessCount = parseInt(data)-prevDbAccessCount; + prevDbAccessCount = parseInt(data); + } + //console.error('dbaccess:'+prevDbAccessCount); + + //$(".dbAccessBtn").remove(); + //$(".menu-info-profil").prepend('<span class="text-red dbAccessBtn" ><i class="fa fa-database text-red text-bold fa-2x"></i> '+dbAccessCount+' <a href="javascript:clearDbAccess();"><i class="fa fa-times text-red text-bold"></i></a></span>'); + },null); + }*/ + },"html"); + } else + console.error( 'showAjaxPanel', dest, "doesn't exist" ); + }, 400); +} +/*prevDbAccessCount = 0; +function clearDbAccess() { + getAjax(null, baseUrl+'/'+moduleId+"/log/clear", function(data){ + $(".dbAccessBtn").remove(); + prevDbAccessCount = 0; + }); +}*/ + +function decodeHtml(str) { + mylog.log("decodeHtml", str); + var txt = document.createElement("textarea"); + txt.innerHTML = str; + mylog.log("decodeHtml", txt.value); + return txt.value; +} + +function setTitle(str, icon, topTitle,keywords,shortDesc) { mylog.log("setTitle", str); + if(typeof icon != "undefined" && icon != "") + icon = ( icon.indexOf("<i") >= 0 ) ? icon : "<i class='fa fa-"+icon+"'></i> "; + + //$(".moduleLabel").html( icon +" "+ str); + + if(topTitle) + str = topTitle; + + $(document).prop('title', ( str != "" ) ? str : "Communecter, se connecter à sa commune" ); + + if(notNull(keywords)) + $('meta[name="keywords"]').attr("content",keywords); + else + $('meta[name="keywords"]').attr("content","communecter,connecter, commun,commune, réseau, sociétal, citoyen, société, territoire, participatif, social, smarterre"); + + if(notNull(shortDesc)) + $('meta[name="description"]').attr("content",shortDesc); + else + $('meta[name="description"]').attr("content","Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société."); +} + + +function checkMenu(urlObj, hash){ + mylog.log("checkMenu *******************", hash); + //mylog.dir(urlObj); + $(".menu-button-left").removeClass("selected"); + if(typeof urlObj.menuId != "undefined"){ mylog.log($("#"+urlObj.menuId).data("hash")); + if($("#"+urlObj.menuId).attr("href") == hash) + $("#"+urlObj.menuId).addClass("selected"); + } +} + +var backUrl = null; +function checkIsLoggued(uId){ + if( uId == "" || typeof uId == "undefined" ){ + mylog.warn(""); + toastr.error("<h1>Section Sécuriser, Merci de vous connecter!</h1>"); + + setTitle("Section Sécuriser", "user-secret"); + + backUrl = location.hash; + showPanel( "box-login" ); + + resetUnlogguedTopBar(); + }else + return true; +} +function resetUnlogguedTopBar() { + //put anything that needs to be reset + //replace the loggued toolBar nav by log buttons + $('.topMenuButtons').html('<button class="btn-top btn btn-success hidden-xs" onclick="showPanel(\'box-register\');"><i class="fa fa-plus-circle"></i> <span class="hidden-sm hidden-md hidden-xs">Sinscrire</span></button>'+ + ' <button class="btn-top btn bg-red hidden-xs" style="margin-right:10px;" onclick="showPanel(\'box-login\');"><i class="fa fa-sign-in"></i> <span class="hidden-sm hidden-md hidden-xs">Se connecter</span></button>'); +} + +function _checkLoggued() { + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/logged", + success: function(data){ + if( !data.userId || data.userId == "" || typeof data.userId == "undefined" ){ + /*userId = data.userId; + resetUnlogguedTopBar();*/ + window.location.reload(); + } + }, + dataType: "json" + }); +} + + +/* **************** +visualize all tagged elements on a map +**************/ +function showTagOnMap (tag) { + + mylog.log("showTagOnMap",tag); + + var data = { "name" : tag, + "locality" : "", + "searchType" : [ "persons" ], + //"searchBy" : "INSEE", + "indexMin" : 0, + "indexMax" : 500 + }; + + //setTitle("", "");$(".moduleLabel").html("<i class='fa fa-spin fa-circle-o-notch'></i> Les acteurs locaux : <span class='text-red'>" + cityNameCommunexion + ", " + cpCommunexion + "</span>"); + + $.blockUI({ + message : "<h1 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> Recherches des collaborateurs ...</h1>" + }); + + showMap(true); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + if(!data){ toastr.error(data.content); } + else{ + mylog.dir(data); + Sig.showMapElements(Sig.map, data); + //setTitle("", "");$(".moduleLabel").html("<i class='fa fa-connect-develop'></i> Les acteurs locaux : <span class='text-red'>" + cityNameCommunexion + ", " + cpCommunexion + "</span>"); + //$(".search-loader").html("<i class='fa fa-check'></i> Vous êtes communecté : " + cityNameCommunexion + ', ' + cpCommunexion); + //toastr.success('Vous êtes communecté !<br/>' + cityNameCommunexion + ', ' + cpCommunexion); + $.unblockUI(); + } + } + }); + + //urlCtrl.loadByHash('#project.detail.id.56c1a474f6ca47a8378b45ef',null,true); + //Sig.showFilterOnMap(tag); +} + +/* **************** +show a definition in the focus menu panel +**************/ +function showDefinition( id,copySection ){ + + setTimeout(function(){ + mylog.log("showDefinition",id,copySection); + + //$( themeObj.mainContainer ).animate({ opacity:0.3 }, 400 ); + + if(copySection){ + contentHTML = $("."+id).html(); + if(copySection != true) + contentHTML = copySection; + smallMenu.open(contentHTML); + bindExplainLinks() + } + else { + $(".hover-info").css("display" , "inline"); + toggle( "."+id , ".explain" ); + $("."+id+" .explainDesc").removeClass("hide"); + } + return false; + }, 500); +} + +var timeoutHover = setTimeout(function(){}, 0); +var hoverPersist = false; +var positionMouseMenu = "out"; + +function activateHoverMenu () { + //mylog.log("enter all"); + positionMouseMenu = "in"; + $(themeObj.mainContainer).animate({ opacity:0.3 }, 400 ); + $(".lbl-btn-menu-name").show(200); + $(".lbl-btn-menu-name").css("display", "inline"); + $(".menu-button-title").addClass("large"); + + showInputCommunexion(); + + hoverPersist = false; + clearTimeout(timeoutHover); + timeoutHover = setTimeout(function(){ + hoverPersist = true; + }, 1000); +} + +var favTypes = []; +var smallMenu = { + destination : ".menuSmallBlockUI", + inBlockUI : true, + //smallMenu.openAjax(\''+baseUrl+'/'+moduleId+'/collections/list/col/'+obj.label+'\',\''+obj.label+'\',\'fa-folder-open\',\'yellow\') + //the url must return a list like userConnected.list + openAjax : function (url,title,icon,color,title1,params,callback) + { + /*if( typeof directory == "undefined" ) + lazyLoad( moduleUrl+'/js/default/directory.js', null, null ); + */ + //processingBlockUi(); + //$(smallMenu.destination).html("<i class='fa fa-spin fa-refresh fa-4x'></i>"); + + ajaxPost( null , url, params , function(data) + { + if(!title1 && notNull(title1) && data.context && data.context.name) + title1 = data.context.name; + var content = smallMenu.buildHeader( title,icon,color,title1 ); + smallMenu.open( content ); + if( data.count == 0 ) + $(".titleSmallMenu").html("<a class='text-white' href='javascript:smallMenu.open();'> <i class='fa fa-th'></i></a> "+ + ' <i class="fa fa-angle-right"></i> '+ + title+" vide <i class='fa "+icon+" text-"+color+"'></i>"); + else + directory.buildList(data.list); + + $('.searchSmallMenu').off().on("keyup",function() { + directory.search ( ".favSection", $(this).val() ); + }); + //else collection.buildCollectionList( "linkList" ,"#listCollections",function(){ $("#listCollections").html("<h4 class=''>Collections</h4>"); }); + + if (typeof callback == "function") + callback(); + } ); + }, + build : function (params,build_func,callback) { + //processingBlockUi(); + if (typeof build_func == "function") + content = build_func(params); + smallMenu.open( content ); + if (typeof callback == "function") + callback(); + }, + //ex : smallMenu.openSmall("Recherche","fa-search","green",function(){ + openSmall : function (title,icon,color,callback,title1) { + if( typeof directory == "undefined" ) + lazyLoad( moduleUrl+'/js/default/directory.js', null, null ); + + var content = smallMenu.buildHeader(title,icon,color,title1); + smallMenu.open( content ); + + if (typeof callback == "function") + callback(); + }, + buildHeader : function (title,icon,color,title1) { + title1 = (typeof title1 != "undefined" && notNull(title1)) ? title1 : "<a class='text-white' href='javascript:smallMenu.open();'> <i class='fa fa-th'></i></a> "; + content = + "<div class='col-xs-12 padding-5'>"+ + + "<h3 class='titleSmallMenu'> "+ + title1+"<i class='fa "+icon+" text-"+color+"'></i> "+title+ + "</h3><hr>"+ + "<div class='col-md-12 bold sectionFilters'>"+ + "<a class='text-black bg-white btn btn-link favSectionBtn btn-default' "+ + "href='javascript:directory.toggleEmptyParentSection(\".favSection\",null,\".searchEntityContainer\",1)'>"+ + "<i class='fa fa-asterisk fa-2x'></i><br>Tout voir</a></span> </span>"+ + "</div>"+ + + "<div class='col-md-12'><hr></div>"+ + + "</div>"+ + + "<div id='listDirectory' class='col-md-10 no-padding'></div>"+ + "<div class='hidden-xs col-sm-2 text-left'>"+ + "<input name='searchSmallMenu' style='border:1px solid red' class='form-control searchSmallMenu text-black' placeholder='rechercher' style=''><br/>"+ + "<h4 class=''><i class='fa fa-angle-down'></i> Filtres</h4>"+ + "<a class='btn btn-dark-blue btn-anc-color-blue btn-xs favElBtn favAllBtn text-left' href='javascript:directory.toggleEmptyParentSection(\".favSection\",null,\".searchEntityContainer\",1)'> <i class='fa fa-tags'></i> Tout voir </a><br/>"+ + + "<div id='listTags'></div>"+ + "<div id='listScopes'><h4><i class='fa fa-angle-down'></i> Où</h4></div>"+ + "<div id='listCollections'></div>"+ + "</div> "+ + "<div class='col-xs-12 col-sm-10 center no-padding'>"+ + //"<a class='pull-right btn btn-xs btn-default' href='javascript:collection.newChild(\""+title+"\");'> <i class='fa fa-sitemap'></i></a> "+ + "<a class='pull-right btn btn-xs menuSmallTools hide text-red' href='javascript:collection.crud(\"del\",\""+title+"\");'> <i class='fa fa-times'></i></a> "+ + "<a class='pull-right btn btn-xs menuSmallTools hide' href='javascript:collection.crud(\"update\",\""+title+"\");'> <i class='fa fa-pencil'></i></a> "+ + + // "<h3 class='titleSmallMenu'> "+ + // title1+' <i class="fa fa-angle-right"></i> '+title+" <i class='fa "+icon+" text-"+color+"'></i>"+ + // "</h3>"+ + // "<input name='searchSmallMenu' class='searchSmallMenu text-black' placeholder='rechercher' style='margin-bottom:8px;width: 300px;font-size: x-large;'><br/>"+ + + "</div>"; + return content; + }, + //openSmallMenuAjaxBuild("",baseUrl+"/"+moduleId+"/favorites/list/tpl/directory2","FAvoris") + //opens any html without post processing + openAjaxHTML : function (url,title,type,nextPrev) { + smallMenu.open("",type ); + var dest = (type == "blockUI") ? ".blockContent" : "#openModal .modal-content .container" ; + getAjax( dest , url , function () { + + //next and previous btn to nav from preview to preview + if(nextPrev){ + var p = 0; + var n = 0; + var found = false; + var l = $( '.searchEntityContainer .container-img-profil' ).length; + $.each( $( '.searchEntityContainer .container-img-profil' ), function(i,val){ + if(found){ + n = (i == l-1 ) ? $( $('.searchEntityContainer .container-img-profil' )[0] ).attr('href') : $(this).attr('href'); + return false; + } + if( $(this).attr('href') == nextPrev ) + found = true; + else + p = (i == 0 ) ? $( $('.searchEntityContainer .container-img-profil' )[ $('.searchEntityContainer .container-img-profil' ).length ] ).attr('href') : $(this).attr('href'); + }); + html = "<div style='margin-bottom:50px'><a href='"+p+"' class='lbhp text-dark'><i class='fa fa-2x fa-arrow-circle-left'></i> PREV </a> "+ + " <a href='"+n+"' class='lbhp text-dark'> NEXT <i class='fa fa-2x fa-arrow-circle-right'></i></a></div>"; + $(dest).prepend(html); + + } + bindLBHLinks(); + },"html" ); + }, + //content Loader can go into a block + //smallMenu.open("Recherche","blockUI") + //smallMenu.open("Recherche","bootbox") + open : function (content,type,color) { + //alert("small menu open"); + //add somewhere in page + if(!smallMenu.inBlockUI){ + $(smallMenu.destination).html( content ); + $.unblockUI(); + } + else { + //this uses blockUI + if(type == "blockUI"){ + colorCSS = (color == "black") ? 'rgba(0,0,0,0.70)' : 'rgba(256,256,256,0.85)'; + colorCSS = (color == "black") ? '#fff' : '#000'; + $.blockUI({ + //title : 'Welcome to your page', + message : (content) ? content : "<div class='blockContent'></div>", + onOverlayClick: $.unblockUI(), + css: { + //border: '10px solid black', + //margin : "50px", + //width:"80%", + // padding: '15px', + backgroundColor: colorCSS, + // '-webkit-border-radius': '10px', + // '-moz-border-radius': '10px', + color: colorText , + // "cursor": "pointer" + }//,overlayCSS: { backgroundColor: '#fff'} + }); + }else if(type == "bootbox"){ + bootbox.dialog({ + message: content + }); + } else{//open inside a boostrap modal + if(!$("#openModal").hasClass('in')) + $("#openModal").modal("show"); + if(content) + $("#openModal div.modal-content div.container").html(content); + else + $("#openModal div.modal-content div.container").html("<i class='fa fa-spin fa-refresh fa-4x'></i>"); + } + + $(".blockPage").addClass(smallMenu.destination.slice(1)); + // If network, check width of menu small + if( typeof globalTheme != "undefined" && globalTheme == "network" ) { + if($("#ficheInfoDetail").is(":visible")) + $(smallMenu.destination).css("cssText", "width: 100% !important;left: 0% !important;"); + else + $(smallMenu.destination).css("cssText", "width: 83.5% !important;left: 16.5% !important;"); + } + bindLBHLinks(); + } + } +} + +function searchFinder(name) +{ + mylog.log("Finder",name); + $(".titleSmallMenu .fa-search").addClass("fa-spin"); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: {"name" : name}, + dataType: "json", + success: function(data){ + $(".titleSmallMenu .fa-search").removeClass("fa-spin"); + if(!data){ + toastr.error(data.content); + }else{ + var list = {}; + $.each(data, function(i, v) { + mylog.log(v, v.length, v.size); + if(inArray(v.type,["organization","citoyen","event","project","city"]) || v.insee){ + type = (v.insee) ? "cities" : v.type+"s"; + if( typeof list[type] == "undefined") + list[type] = []; + list[type].push(v); + + } + }); + mylog.dir(list); + directory.buildList(list); + } + } + }) +} + +var selection; +function bindHighlighter() { + //mylog.clear(); + mylog.log("bindHighlighter"); + mylog.dir(window.getSelection()); + $(".my-main-container").bind('mouseup', function(e){ + if (window.getSelection) { + selection = window.getSelection(); + } else if (document.selection) { + selection = document.selection.createRange(); + } + selTxt = selection.toString(); + if( selTxt){ + //alert(selTxt); + /* + if($(".selBtn").length) + $(".selBtn").remove(); + links = "<a href='javascript:;' onclick='fastAdd(\"/rooms/fastaddaction\")' class='selBtn text-bold btn btn-purple btn-xs'><i class='fa fa-cogs'></i> créer en action <i class='fa fa-plus'></i></a>"+ + " <a href='javascript:;' onclick='fastAdd(\"/survey/fastaddentry\")' class='selBtn text-bold btn btn-purple btn-xs'><i class='fa fa-archive'></i> créer en proposition <i class='fa fa-plus'></i></a>"; + + $(this).parent().find("div.bar_tools_post").append(links); + */ + } + }); +} + +function bindTags() { + mylog.log("bindTags"); + //var tagClasses = ".tag,.label tag_item_map_list" + $(".tag,.label tag_item_map_list").off().on('click', function(e){ + //if(userId){ + var tag = ($(this).data("val")) ? $(this).data("val") : $(this).html(); + //alert(tag); + //showTagInMultitag(tag); + //$('#btn-modal-multi-tag').trigger("click"); + //$('.tags-count').html( $(".item-tag-name").length ); + if(addTagToMultitag(tag)) + toastr.success("Le tag \""+tag+"\" ajouté à vos tags préférés"); + else + toastr.info("Le tag \""+tag+"\" est déjà dans vos tags"); + + //} else { + // toastr.error("must be loggued"); + //} + }); +} + +function bindExplainLinks() { + mylog.log("bindExplainLinks"); + $(".explainLink").click(function() { + mylog.log("explainLink"); + showDefinition( $(this).data("id") ); + return false; + }); +} + +function bindLBHLinks() { + $(".lbh").off().on("click",function(e) { + e.preventDefault(); + mylog.warn("***************************************"); + mylog.warn("bindLBHLinks",$(this).attr("href")); + mylog.warn("***************************************"); + var h = ($(this).data("hash")) ? $(this).data("hash") : $(this).attr("href"); + urlCtrl.loadByHash( h ); + }); + //open any url in a modal window + $(".lbhp").unbind("click").on("click",function(e) { + e.preventDefault(); + mylog.warn("***************************************"); + mylog.warn("bindLBHLinks Preview", $(this).attr("href"),$(this).data("modalshow")); + //alert("bindLBHLinks Preview"+$(this).data("modalshow")); + mylog.warn("***************************************"); + var h = ($(this).data("hash")) ? $(this).data("hash") : $(this).attr("href"); + if( $(this).data("modalshow") ){ + url = (h.indexOf("#") == 0 ) ? urlCtrl.convertToPath(h) : h; + if(h.indexOf("#page") >= 0) + url="app/"+url + smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/"+url); + //smallMenu.open ( getAjax(directory.preview( mapElements[ $(this).data("modalshow") ],h ) ); + + } + else { + url = (h.indexOf("#") == 0 ) ? urlCtrl.convertToPath(h) : h; + smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/"+url); + //smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/"+url ,"","blockUI",h); + } + }) +} + + +function mouseX(evt) { + if (evt.pageX) { + return evt.pageX; + } else if (evt.clientX) { + return evt.clientX + (document.documentElement.scrollLeft ? + document.documentElement.scrollLeft : + document.body.scrollLeft); + } else { + return null; + } +} + +function mouseY(evt) { + if (evt.pageY) { + return evt.pageY; + } else if (evt.clientY) { + return evt.clientY + (document.documentElement.scrollTop ? + document.documentElement.scrollTop : + document.body.scrollTop); + } else { + return null; + } +} + +function bindRefreshBtns() { mylog.log("bindRefreshBtns"); + if( $("#dropdown_search").length || $(".newsTL").length) + { + var searchFeed = "#dropdown_search"; + var method = "startSearch(0, indexStepInit);" + if( $(".newsTL").length){ + searchFeed = ".newsTL"; + method = "reloadNewsSearch();" + } + $('#scopeListContainer .item-scope-checker, #scopeListContainer .item-tag-checker, .btn-filter-type').click(function(e){ + //mylog.warn( ">>>>>>>",$(this).data("scope-value"), $(this).data("tag-value"), $(this).attr("type")); + var str = getFooterScopeChanged(method); + if(location.hash.indexOf("#news.index")==0 || location.hash.indexOf("#city.detail")==0){ mylog.log("vide news stream perso"); + $(".newsFeedNews, #backToTop, #footerDropdown").remove(); + $(searchFeed).append( str ); + }else { mylog.log("vide autre news stream perso", searchFeed); + $(searchFeed).html( str ); + } + $(".search-loader").html("<i class='fa fa-ban'></i>"); + }); + } +} + +function hideSearchResults(){ + var searchFeed = "#dropdown_search"; + var method = "startSearch(0, indexStepInit);" + if( $(".newsTL").length){ + searchFeed = ".newsTL"; + method = "reloadNewsSearch();" + } + //mylog.warn( ">>>>>>>",$(this).data("scope-value"), $(this).data("tag-value"), $(this).attr("type")); + str = getFooterScopeChanged(method); + if(location.hash.indexOf("#news.index")==0 || location.hash.indexOf("#city.detail")==0){ mylog.log("vide news stream perso"); + $(".newsFeedNews, #backToTop, #footerDropdown").remove(); + $(searchFeed).append( str ); + }else { mylog.log("vide autre news stream perso", searchFeed); + $(searchFeed).html( str ); + } + $(".search-loader").html("<i class='fa fa-ban'></i>"); + +} +function getFooterScopeChanged(method){ + var str = '<div class="padding-5 text-center" id="footerDropdown">'; + //str += "<hr style='float:left; width:100%;'/>" + str += '<button class="btn btn-default" onclick="'+method+'"><i class="fa fa-refresh"></i> Relancer la recherche</button>'+ + "<span style='' class='text-dark padding-10'><i class='fa fa-angle-right'></i> Les critères ont changés</span><br/>"; + str += "</div>"; + return str; +} + +function reloadNewsSearch(){ + if(location.hash.indexOf("#default.live")==0) + startSearch(false); + else{ + dateLimit = 0; + loadStream(0, 5); + } +} +/* ************************************** +maybe movebale into Element.js +***************************************** */ + +function buildQRCode(type,id) { + + $(".qrCode").qrcode({ + text: baseUrl+"/#"+dyFInputs.get(type).ctrl+".detail.id."+id,//'{type:"'+type+'",_id:"'+id+'"}', + render: 'image', + minVersion: 8, + maxVersion: 40, + ecLevel: 'L', + size: 150, + radius: 0, + quiet: 2, + /*mode: 2, + mSize: 0.1, + mPosX: 0.5, + mPosY: 0.5, + + label: name, + fontname: 'Ubuntu', + fontcolor: '#E33551',*/ + }); +} + +function activateSummernote(elem) { + + if( !$('script[src="'+baseUrl+'/plugins/summernote/dist/summernote.min.js"]').length ) + { + $("<link/>", { + rel: "stylesheet", + type: "text/css", + href: baseUrl+"/plugins/summernote/dist/summernote.css" + }).appendTo("head"); + $.getScript( baseUrl+"/plugins/summernote/dist/summernote.min.js", function( data, textStatus, jqxhr ) { + //mylog.log( data ); // Data returned + //mylog.log( textStatus ); // Success + //mylog.log( jqxhr.status ); // 200 + //mylog.log( "Load was performed." ); + + $(".btnEditAdv").hide(); + $(elem).summernote({ + toolbar: [ + ['style', ['bold', 'italic', 'underline', 'clear']], + ['color', ['color']], + ['para', ['ul', 'ol', 'paragraph']], + ] + }); + }); + } else { + $(".btnEditAdv").hide(); + $(elem).summernote({ + toolbar: [ + ['style', ['bold', 'italic', 'underline', 'clear']], + ['color', ['color']], + ['para', ['ul', 'ol', 'paragraph']], + ] + }); + } +} + + +function firstOptions() { + var res = { + "dontKnow":tradDynForm["dontknow"], + }; + res[userId] = tradDynForm["me"]; + return res; + } + +function myAdminList (ctypes) { + mylog.log("myAdminList", ctypes); + var myList = {}; + if(userId){ + //types in MyContacts + var connectionTypes = { + organizations : "members", + projects : "contributors", + events : "attendees" + }; + $.each( ctypes, function(i,ctype) { + var connectionType = connectionTypes[ctype]; + myList[ ctype ] = { label: trad[ctype], options:{} }; + if( notNull(myContacts) ){ + mylog.log("myAdminList",ctype, connectionType, myContacts, myContacts[ ctype ]); + $.each( myContacts[ ctype ],function(id,elemObj){ + mylog.log("myAdminList",ctype,id,elemObj.name); + if( elemObj.links && elemObj.links[connectionType] && elemObj.links[connectionType][userId] && elemObj.links[connectionType][userId].isAdmin) { + mylog.warn("myAdminList2",ctype+"-"+id+"-"+elemObj.name, elemObj["_id"]["$id"]); + myList[ ctype ]["options"][ elemObj["_id"]["$id"] ] = elemObj.name; + mylog.log(myList); + } + }); + } + }); + mylog.log("myAdminList return", myList); + } + return myList; +} + +function parentList (ctypes, parentId, parentType) { + mylog.log("parentList", ctypes, parentId, parentType); + var myList = myAdminList( ctypes ) ; + + mylog.log("parentList myList", myList); + if( notEmpty(parentId) && notEmpty(parentType) && + notEmpty(myList) && + ( !notEmpty(myList[parentType]) || + ( notEmpty(myList[parentType]) && !notEmpty(myList[parentType]["options"][parentId]) ) ) ) { + + if(!notEmpty(myList[parentType])) + myList[ parentType ] = { label: parentType, options:{} }; + myList[ parentType ]["options"][ parentId ] = contextData.parent.name; + } + return myList; +} + + +function escapeHtml(string) { + var entityMap = { + '"': '"', + "'": ''', + }; + return String(string).replace(/["']/g, function (s) { + return entityMap[s]; + }); +} + +function fillContactFields(id){ + name = cotmp[id].name; + mylog.log("fillContactFields", id, name ); + $("#idContact").val(id); + $("#listSameName").html("<i class='fa fa-check text-success'></i> Vous avez sélectionner : "+ escapeHtml(name)); + $("#name").val(name); +} +var cotmp = {}; +function globalSearch(searchValue,types,contact){ + + searchType = (types) ? types : ["organizations", "projects", "events", "needs", "citoyens"]; + + var data = { + "name" : searchValue, + // "locality" : "", a otpimiser en utilisant la localité + "searchType" : searchType, + "indexMin" : 0, + "indexMax" : 50 + }; + $("#listSameName").html("<i class='fa fa-spin fa-circle-o-notch'></i> Vérification d'existence"); + $("#similarLink").show(); + $("#btn-submit-form").html('<i class="fa fa-spinner fa-spin"></i>').prop("disabled",true); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + }, + success: function(data){ + var str = ""; + var compt = 0; + var msg = "Verifiez si cet élément n'existe pas déjà "; + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + cotmp = {}; + $.each(data, function(id, elem) { + mylog.log("similarlink globalautocomplete", elem); + city = ""; + postalCode = ""; + var htmlIco ="<i class='fa fa-users'></i>"; + if(elem.type){ + typeIco = elem.type; + htmlIco ="<i class='fa fa-"+dyFInputs.get(elem.type).icon +"'></i>"; + } + where = ""; + if (elem.address != null) { + city = (elem.address.addressLocality) ? elem.address.addressLocality : ""; + postalCode = (elem.address.postalCode) ? elem.address.postalCode : ""; + if( notEmpty( city ) && notEmpty( postalCode ) ) + where = ' ('+postalCode+" "+city+")"; + } + //var htmlIco="<i class='fa fa-calendar fa-2x'></i>"; + if("undefined" != typeof elem.profilImageUrl && elem.profilImageUrl != ""){ + htmlIco= "<img width='30' height='30' alt='image' class='img-circle' src='"+baseUrl+elem.profilThumbImageUrl+"'/>"; + } + + if(contact == true){ + cotmp[id] = {id:id, name : elem.name}; + str += "<a href='javascript:;' onclick='fillContactFields( \""+id+"\" );' class='col-sm-12 col-sm-3 btn btn-xs btn-default w50p text-left padding-5' >"+ + "<span>"+ htmlIco +"</span> <span> " + elem.name+"</br>"+where+ "</span>" + "</a>"; + msg = "Verifiez si le contact est dans Communecter"; + }else{ + str += "<a target='_blank' href='#page.type."+ elem.type +".id."+ id +"' class='btn btn-xs btn-danger w50p text-left padding-5 margin-5' style='height:42px' >"+ + "<span>"+ htmlIco +"</span> <span> " + elem.name+"</br>"+where+ "</span>" + "</a>"; + } + + compt++; + + }); + + if (compt > 0) { + $("#listSameName").html("<div class='col-sm-12 light-border text-red'> <i class='fa fa-eye'></i> "+msg+" : </div>"+str); + //bindLBHLinks(); + } else { + $("#listSameName").html("<span class='txt-green'><i class='fa fa-thumbs-up text-green'></i> Aucun élément avec ce nom.</span>"); + + } + + + } + }); +} + +/*function checkUsername(username){ + + $("#listSameName").html("<i class='fa fa-spin fa-circle-o-notch'></i> Vérification d'existence"); + $("#similarLink").show(); + $("#btn-submit-form").html('<i class="fa fa-spinner fa-spin"></i>').prop("disabled",true); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/person/checkusername", + data: { "username" : username }, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + }, + success: function(data){ + var str = ""; + var compt = 0; + var msg = "Verifiez si cet élément n'existe pas déjà "; + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + $("#listSameName").html("<div class='col-sm-12 light-border text-red'> <i class='fa fa-eye'></i> "+msg+" : </div>"+str); + } + }); +}*/ + + +function notEmpty(val){ + return typeof val != "undefined" + && val != null + && val != ""; +} + +function activeMenuElement(page) { + mylog.log("-----------------activeMenuElement----------------------"); + listBtnMenu = [ 'detail', 'news', 'directory', 'gallery', 'addmembers', 'calendar']; + $.each(listBtnMenu, function(i,value) { + $(".btn-menu-element-"+value).removeClass("active"); + }); + $(".btn-menu-element-"+page).addClass("active"); +} + +function shadowOnHeader() { + var y = $(".my-main-container").scrollTop(); + if (y > 0) { $('.main-top-menu').addClass('shadow'); }////NOTIFICATIONS} + else { $('.main-top-menu').removeClass('shadow'); } +} +function getMediaFromUrlContent(className, appendClassName,nbParent, typeExtract){ + //user clicks previous thumbail + lastUrl = ""; + if(typeof typeExtract != "undefined") + var typeExtract=typeExtract; + $("body").on("click","#thumb_prev", function(e){ + if(img_arr_pos>0) + { + img_arr_pos--; //thmubnail array position decrement + + //replace with new thumbnail + $("#extracted_thumb").html('<img src="'+extracted_images[img_arr_pos]+'" width="100" height="100">'+selectThumb); + + //replace thmubnail position text + $("#total_imgs").html((img_arr_pos) +' of '+ total_images); + } + }); + + //user clicks next thumbail + $("body").on("click","#thumb_next", function(e){ + if(img_arr_pos<total_images) + { + img_arr_pos++; //thmubnail array position increment + + //replace with new thumbnail + $("#extracted_thumb").html('<img src="'+extracted_images[img_arr_pos]+'" width="100" height="100">'+selectThumb); + + //replace thmubnail position text + $("#total_imgs").html((img_arr_pos) +' of '+ total_images); + } + }); + var getUrl = $(className); //url to extract from text field + var appendClassName = appendClassName; + getUrl.bind("input keyup",function(e) { //user types url in text field + //url to match in the text field + var $this = $(this); + if($(appendClassName).html()==""){ + if($this.parents().eq(nbParent).find(appendClassName).html()=="" || (e.which==32 || e.which==13)){ + //var match_url=new RegExp("(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?") + //var match_url=new RegExp("(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s]{2,}|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]\.[^\s]{2,}|www\.[a-zA-Z0-9]\.[^\s]{2,})"); + //var match_url=/\b(https?):\/\/([\-A-Z0-9. \-]+)(\/[\-A-Z0-9+&@#\/%=~_|!:,.;\-]*)?(\?[A-Z0-9+&@#\/%=~_|!:,.;\-]*)?/i + // var match_url = /\b(https?|ftp):\/\/([\-A-Z0-9. \-]+?|www\\.)(\/[\-A-Z0-9+&@#\/%=~_|!:,.;\-]*)?(\?[A-Z0-9+&@#\/%=~_|!:,.;\-]*)?/i; + // var match_url=new RegExp("(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"); + //var match_url=/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi; + var match_url=/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/g; + + if (match_url.test(getUrl.val())) + { + extract_url=getUrl.val().match(match_url)[0]; + extract_url=extract_url.replace(/[\n]/gi," "); + extract_url=extract_url.split(" "); + extract_url=extract_url[0]; + if(lastUrl != extract_url && processUrl.isLoading==false){ + processUrl.isLoading=true; + var extracted_url = extract_url; + $this.parents().eq(nbParent).find(".loading_indicator").show(); //show loading indicator image + //ajax request to be sent to extract-process.php + lastUrl=extracted_url; + extracted_url_send=extracted_url; + if(extracted_url_send.indexOf("http")<0) + extracted_url_send = "http://"+extracted_url; + $.ajax({ + url: baseUrl+'/'+moduleId+"/news/extractprocess", + data: {'url': extracted_url_send}, + type: 'post', + dataType: 'json', + success: function(data){ + mylog.log(data); + processUrl.isLoading=false; + if(data.type=="activityStream"){ + content = '<a href="javascript:;" class="removeMediaUrl"><i class="fa fa-times"></i></a>'+ + directory.showResultsDirectoryHtml(new Array(data.object), data.object.type)+ + "<input type='hidden' class='type' value='activityStream'>"+ + "<input type='hidden' class='objectId' value='"+data.object.id+"'>"+ + "<input type='hidden' class='objectType' value='"+data.object.type+"'>"; + }else{ + if(typeof typeExtract != "undefined" && typeExtract=="video"){ + if(typeof data.content !="undefined" && typeof data.content.videoLink != "undefined") + content= processUrl.getMediaVideo(data,"save"); + else + content="<span class='text-red'><i>This url is not associate to a video</i></span>"; + }else + content = processUrl.getMediaCommonHtml(data,"save"); + } + //load results in the element + //return content; + //$("#results").html(content); + $this.parents().eq(nbParent).find(appendClassName).html(content).slideDown(); + //$this.parents().eq(nbParent).slideDown(); + if($this.parent().find(".dynFormUrlsWarning").length > 0) + $this.parent().find(".dynFormUrlsWarning").remove(); + + $(".removeMediaUrl").click(function(){ + $trigger=$(this).parents().eq(1).find(className); + $this.parents().eq(nbParent).find(appendClassName).empty().hide(); + $trigger.trigger("input"); + }); + //append received data into the element + //$("#results").slideDown(); //show results with slide down effect + $this.parents().eq(nbParent).find(".loading_indicator").hide(); //hide loading indicator image + }, + error : function(){ + $.unblockUI(); + //toastr.error(trad["wrongwithurl"] + " !"); + processUrl.isLoading=false; + //content to be loaded in #results element + var content = '<a href="javascript:;" class="removeMediaUrl"><i class="fa fa-refresh"></i></a><h4><a href="'+extracted_url+'" target="_blank" class="lastUrl wrongUrl">'+extracted_url+'</a></h4>'; + //load results in the element + $this.parents().eq(nbParent).find(appendClassName).hide(); + $this.parents().eq(nbParent).find(appendClassName).html(content); + $this.parents().eq(nbParent).find(appendClassName).slideDown(); + toastr.warning("L'url "+extracted_url+" ne pointe vers aucun site ou un problème est survenu à son extraction"); + if ($("#ajaxFormModal").is(":visible") && $this.parent().find(".dynFormUrlsWarning").length <= 0) + $this.parent().append( "<span class='text-red dynFormUrlsWarning'>* Ceci n'est pas un url valide.</span>" ); + $(".removeMediaUrl").click(function(){ + $trigger=$(this).parents().eq(1).find(className); + $this.parents().eq(nbParent).find(appendClassName).empty().hide(); + $trigger.trigger("input"); + }); + + //$("#results").html(content); //append received data into the element + //$("#results").slideDown(); //show results with slide down effect + $this.parents().eq(nbParent).find(".loading_indicator").hide(); //hide loading indicator image + } + }); + } + } else if ($("#ajaxFormModal").is(":visible") && $this.parent().find(".dynFormUrlsWarning").length <= 0){ + //$this.parent().append( "<span class='text-red dynFormUrlsWarning'>* Ceci n'est pas un url valide.</span>" ); + } + } + } + }); +} + +function myContactLabel (type,id) { + if(typeof myContacts != "undefined" && myContacts[type]){ + $.each( myContacts[type], function( key,val ){ + if( id == val["_id"]["$id"] ){ + return val; + } + }); + } + return null; +} + +function inMyContacts (type,id) { + var res = false ; + if(typeof myContacts != "undefined" && myContacts != null && myContacts[type]){ + $.each( myContacts[type], function( key,val ){ + //mylog.log("val", val); + if( ( typeof val["_id"] != "undefined" && id == val["_id"]["$id"] ) || + (typeof val["id"] != "undefined" && id == val["id"] ) ) { + res = true; + return ; + } + }); + } + return res; +} + +function autoCompleteInviteSearch(search){ + mylog.log("autoCompleteInviteSearch2", search); + if (search.length < 3) { return } + tabObject = []; + + var data = { + "search" : search, + "searchMode" : "personOnly" + }; + + ajaxPost("", moduleId+'/search/searchmemberautocomplete', data, + function (data){ + mylog.log(data); + var str = "<li class='li-dropdown-scope'><a href='javascript:newInvitation()'>Pas trouvé ? Lancer une invitation à rejoindre votre réseau !</li>"; + var compt = 0; + var city, postalCode = ""; + if(data["citoyens"].length > 0){ + $.each(data["citoyens"], function(k, v) { + city = ""; + mylog.log(v); + postalCode = ""; + var htmlIco ="<i class='fa fa-user fa-2x'></i>" + if(v.id != userId) { + tabObject.push(v); + if(v.profilImageUrl != ""){ + var htmlIco= "<img width='50' height='50' alt='image' class='img-circle' src='"+baseUrl+v.profilImageUrl+"'/>" + } + if (v.address != null) { + city = v.address.addressLocality; + postalCode = v.address.postalCode; + } + str += "<li class='li-dropdown-scope'>" + + "<a href='javascript:setInviteInput("+compt+")'>"+htmlIco+" "+v.name ; + + if(typeof postalCode != "undefined") + str += "<br/>"+postalCode+" "+city; + //str += "<span class='city-search'> "+postalCode+" "+city+"</span>" ; + str += "</a></li>"; + + compt++; + } + }); + } + + $("#ajaxFormModal #dropdown_searchInvite").html(str); + $("#ajaxFormModal #dropdown_searchInvite").css({"display" : "inline" }); + } + ); +} + +function newInvitation(){ + $("#ajaxFormModal #step1").css({"display" : "none"}); + $("#ajaxFormModal #step3").css({"display" : "block"}); + + $('#ajaxFormModal #inviteId').val(""); + var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; + if(emailReg.test( $("#ajaxFormModal #inviteSearch").val() )){ + $('#ajaxFormModal #inviteEmail').val( $("#ajaxFormModal #inviteSearch").val()); + $("#ajaxFormModal #inviteName").val(""); + }else{ + $("#ajaxFormModal #inviteName").val($("#ajaxFormModal #inviteSearch").val()); + $("#ajaxFormModal #inviteEmail").val(""); + } + $("#inviteText").val(''); +} + +function communecterUser(){ + mylog.warn("communecterUser"); + if(typeof contextData == "undefined" || contextData == null || contextData.id != userId){ + contextData = { + id : userId, + type : "citoyens" + }; + } + $.unblockUI(); + updateLocalityEntities(); +} + +function updateLocalityEntities(addressesIndex, addressesLocality){ + mylog.log("updateLocalityEntities", addressesIndex, addressesLocality); + $("#ajax-modal").modal("hide"); + mylog.log("typeof formInMap.initUpdateLocality", typeof formInMap.initUpdateLocality); + if(typeof formInMap.initUpdateLocality != "undefined"){ + var address = contextData.address ; + var geo = contextData.geo ; + if(addressesLocality && addressesIndex){ + address = addressesLocality.address ; + geo = addressesLocality.geo ; + }else if(addressesIndex) { + address = null ; + geo = null ; + } + mylog.log(address, geo, contextData.type, addressesIndex); + formInMap.initUpdateLocality(address, geo, contextData.type, addressesIndex); + } + +} + +function cityKeyPart(unikey, part){ + var s = unikey.indexOf("_"); + var e = unikey.indexOf("-"); + var len = unikey.length; + if(e < 0) e = len; + if(part == "insee") return unikey.substr(s+1, e - s-1); + if(part == "cp" && unikey.indexOf("-") < 0) return ""; + if(part == "cp") return unikey.substr(e+1, len); + if(part == "country") return unikey.substr(e+1, len); +} +/* *********************************** + EXTRACTPROCCESS +********************************** */ +var processUrl = { + isLoading:false, + checkUrlExists: function(url){ + url = url.trim(); + if(url.lastIndexOf("/") == url.lenght){ + url = url.substr(0, url.lenght-1); + $("#form-url").val(url); + } + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/checkurlexists", + data: { url: url }, + dataType: "json", + success: function(data){ console.log("checkUrlExists", data); + if(data.status == "URL_EXISTS") + urlExists = true; + else + urlExists = false; + console.log("checkUrlExists", data); + refUrl(url); + }, + error: function(data){ + console.log("check url exists error"); + } + }); + }, + refUrl: function(url){ + if(!processUrl.isValidURL(url)){ + $("#status-ref").html("<span class='letter-red'><i class='fa fa-times'></i> cette url n'est pas valide.</span>"); + return; + } + $("#status-ref").html("<span class='letter-blue'><i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+"</span>"); + $("#refResult").addClass("hidden"); + $("#send-ref").addClass("hidden"); + + urlValidated = ""; + + $.ajax({ + url: "//cors-anywhere.herokuapp.com/" + url, // 'http://google.fr', + //crossOrigin: true, + timeout:10000, + success: + function(data) { + + var jq = $.parseHTML(data); + + var tempDom = $('<output>').append($.parseHTML(data)); + var title = $('title', tempDom).html(); + var stitle = ""; + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + //console.log("STITLE", stitle); + + if(stitle=="" || stitle=="undefined") + stitle = $('h2', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('h3', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + if(title=="" || title=="undefined") + title = stitle; + + var favicon = $("link[rel*='icon']", tempDom).attr("href"); + var hostname = (new URL(url)).origin; + var faviconSrc = ""; + if(typeof favicon != "undefined"){ + var faviconSrc = hostname+favicon; + if(favicon.indexOf("http")>=0) faviconSrc = favicon; + } + + var description = $(tempDom).find('meta[name=description]').attr("content"); + + var keywords = $(tempDom).find('meta[name=keywords]').attr("content"); + //console.log("keywords", keywords); + + var arrayKeywords = new Array(); + if(typeof keywords != "undefined") + arrayKeywords = keywords.split(","); + + //console.log("arrayKeywords", arrayKeywords); + + //if(typeof arrayKeywords[0] != "undefined") $("#form-keywords1").val(arrayKeywords[0]); else $("#form-keywords1").val(""); + //if(typeof arrayKeywords[1] != "undefined") $("#form-keywords2").val(arrayKeywords[1]); else $("#form-keywords2").val(""); + //if(typeof arrayKeywords[2] != "undefined") $("#form-keywords3").val(arrayKeywords[2]); else $("#form-keywords3").val(""); + //if(typeof arrayKeywords[3] != "undefined") $("#form-keywords4").val(arrayKeywords[3]); else $("#form-keywords4").val(""); + + if(description=="" || description=="undefined") + if(stitle=="" || stitle=="undefined") + description = stitle; + params = new Object; + params.title=title, + params.favicon=faviconSrc, + params.hostname=hostname, + params.description=description, + params.tags=arrayKeywords; + console.log(params); + /*$("#form-title").val(title); + $("#form-favicon").val(faviconSrc); + $("#form-description").val(description);*/ + + + //color + $("#ajaxFormModal #name").val(title); + //color + $("#ajaxFormModal #description").val(description); + //color + if(notEmpty(arrayKeywords)) + $("#ajaxFormModal #tags").select2("val",arrayKeywords); + /*if($("#form-keywords1").val() != "") $("#lbl-keywords").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("text-orange"); + + $("#form-title").off().keyup(function(){ + if($(this).val()!="")$("#lbl-title").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-title").removeClass("letter-green").addClass("letter-red"); + checkAllInfo(); + }); + $("#form-description").off().keyup(function(){ + if($(this).val()!="")$("#lbl-description").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-description").removeClass("letter-green").addClass("text-orange"); + checkAllInfo(); + }); + $("#form-keywords1").off().keyup(function(){ + if($(this).val()!="")$("#lbl-keywords").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("text-orange"); + checkAllInfo(); + }); + + $("#status-ref").html("<span class='letter-green'><img src='"+faviconSrc+"' height=30 alt='x'> <i class='fa fa-check'></i> Nous avons trouvé votre page</span>"); + $("#refResult").removeClass("hidden"); + + $("#lbl-url").removeClass("letter-red").addClass("letter-green"); + urlValidated = url; + + $('<output>').remove(); + tempDom = ""; + + checkAllInfo();*/ + return params; + }, + error:function(xhr, status, error){ + $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> URL INNACCESSIBLE</span>"); + }, + statusCode:{ + 404: function(){ + $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> 404 : URL INTROUVABLE OU INACCESSIBLE</span>"); + } + } + }); + }, + isValidURL:function(url) { + var match_url = new RegExp("(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"); + return match_url.test(url); + }, + getMediaCommonHtml: function(data,action,id){ + if(typeof(data.images)!="undefined"){ + extracted_images = data.images; + total_images = parseInt(data.images.length); + img_arr_pos=1; + } + inputToSave=""; + if(typeof(data.content) !="undefined" && typeof(data.content.imageSize) != "undefined"){ + if (data.content.videoLink){ + extractClass="extracted_thumb"; + width="100%"; + height="100%"; + + aVideo='<a href="#" class="videoSignal text-white center"><i class="fa fa-3x fa-play-circle-o"></i><input type="hidden" class="videoLink" value="'+data.content.videoLink+'"/></a>'; + inputToSave+="<input type='hidden' class='video_link_value' value='"+data.content.videoLink+"'/>"+ + "<input type='hidden' class='media_type' value='video_link' />"; + } + else{ + aVideo=""; + endAVideo=""; + if(data.content.imageSize =="large"){ + extractClass="extracted_thumb_large"; + width="100%"; + height=""; + } + else{ + extractClass="extracted_thumb"; + width="100"; + height="100"; + } + inputToSave+="<input type='hidden' class='media_type' value='img_link' />"; + } + inputToSave+="<input type='hidden' class='size_img' value='"+data.content.imageSize+"'/>" + } + if (typeof(data.content) !="undefined" && typeof(data.content.image)!="undefined"){ + inc_image = '<div class="'+extractClass+' col-xs-4 no-padding" id="extracted_thumb">'+aVideo; + if(data.content.type=="img_link"){ + if(typeof(data.content.imageId) != "undefined"){ + inc_image += "<input type='hidden' id='deleteImageCommunevent"+id+"' value='"+data.content.imageId+"'/>"; + titleImg = "De l'application communevent"; + }else + titleImg = "Image partagée"; + inc_image += "<a class='thumb-info' href='"+data.content.image+"' data-title='"+titleImg+"' data-lightbox='allimgcontent'>"; + } + inc_image +='<img src="'+data.content.image+'" width="'+width+'" height="'+height+'">'; + if(data.content.type=="img_link") + inc_image += '</a>'; + inc_image += '</div>'; + countThumbail=""; + inputToSave+="<input type='hidden' class='img_link' value='"+data.content.image+"'/>"; + } + else { + if(typeof(total_images)!="undefined" && total_images > 0){ + if(total_images > 1){ + selectThumb='<div class="thumb_sel"><span class="prev_thumb" id="thumb_prev"> </span><span class="next_thumb" id="thumb_next"> </span> </div>'; + countThumbail='<span class="small_text" id="total_imgs">'+img_arr_pos+' of '+total_images+'</span><span class="small_text"> Choose a Thumbnail</span>'; + } + else{ + selectThumb=""; + countThumbail=""; + } + inc_image = '<div class="'+extractClass+' col-xs-4" id="extracted_thumb">'+aVideo+'<img src="'+data.images[0]+'" width="'+width+'" height="'+height+'">'+selectThumb+'</div>'; + inputToSave+="<input type='hidden' class='img_link' value='"+data.images[0]+"'/>"; + }else{ + inc_image =''; + countThumbail=''; + } + } + + //content to be loaded in #results element + if(data.content==null) + data.content=""; + if(typeof(data.url)!="undefined") + mediaUrl=data.url; + else if (typeof(data.content.url) !="undefined") + mediaUrl=data.content.url; + else + mediaUrl=""; + if((typeof(data.description) !="undefined" || typeof(data.name) != "undefined") && (data.description !="" || data.name != "")){ + contentMedia='<div class="extracted_content col-xs-8 padding-20">'+ + '<a href="'+mediaUrl+'" target="_blank" class="lastUrl text-dark">'; + if(typeof(data.name) != "undefined" && data.name!=""){ + contentMedia+='<h4>'+data.name+'</h4></a>'; + inputToSave+="<input type='hidden' class='name' value='"+data.name+"'/>"; + } + if(typeof(data.description) != "undefined" && data.description!=""){ + contentMedia+='<p>'+data.description+'</p>'+countThumbail+'>'; + if(typeof(data.name) == "undefined" || data.name=="") + contentMedia+='</a>'; + inputToSave+="<input type='hidden' class='description' value='"+data.description+"'/>"; + } + contentMedia+='</div>'; + } + else{ + contentMedia=""; + } + inputToSave+="<input type='hidden' class='url' value='"+mediaUrl+"'/>"; + inputToSave+="<input type='hidden' class='type' value='url_content'/>"; + content=""; + if(action == "save") + content += '<a href="javascript:;" class="removeMediaUrl"><i class="fa fa-times"></i></a>'; + content += '<div class="extracted_url padding-10">'+ inc_image +contentMedia+'</div>'+inputToSave; + return content; + }, + getMediaVideo:function(data,action){ + if(typeof(data.images)!="undefined"){ + extracted_images = data.images; + total_images = parseInt(data.images.length); + img_arr_pos=1; + } + inputToSave=""; + if(typeof(data.content) !="undefined" && typeof(data.content.imageSize) != "undefined"){ + if (data.content.videoLink){ + extractClass="extracted_thumb"; + width="100%"; + height="100%"; + + aVideo='<a href="#" class="videoSignal text-white center" style="position:absolute;top:20%;left:40%;"><i class="fa fa-4x fa-play-circle-o"></i><input type="hidden" class="videoLink" value="'+data.content.videoLink+'"/></a>'; + inputToSave+="<input type='hidden' class='video_link_value' value='"+data.content.videoLink+"'/>"+ + "<input type='hidden' class='media_type' value='video_link' />"; + } + inputToSave+="<input type='hidden' class='size_img' value='"+data.content.imageSize+"'/>"; + } + if (typeof(data.content) !="undefined" && typeof(data.content.image)!="undefined"){ + inc_image = '<div class="'+extractClass+' col-xs-12 col-md-12 col-sm-12 no-padding" id="extracted_thumb">'+aVideo; + /*if(data.content.type=="img_link"){ + if(typeof(data.content.imageId) != "undefined"){ + inc_image += "<input type='hidden' id='deleteImageCommunevent"+id+"' value='"+data.content.imageId+"'/>"; + titleImg = "De l'application communevent"; + }else + titleImg = "Image partagée"; + inc_image += "<a class='thumb-info' href='"+data.content.image+"' data-title='"+titleImg+"' data-lightbox='allimgcontent'>"; + }*/ + inc_image +='<img src="'+data.content.image+'" width="'+width+'" height="'+height+'">'; + if(data.content.type=="img_link") + inc_image += '</a>'; + inc_image += '</div>'; + countThumbail=""; + inputToSave+="<input type='hidden' class='img_link' value='"+data.content.image+"'/>"; + } + else { + if(typeof(total_images)!="undefined" && total_images > 0){ + if(total_images > 1){ + selectThumb='<div class="thumb_sel"><span class="prev_thumb" id="thumb_prev"> </span><span class="next_thumb" id="thumb_next"> </span> </div>'; + countThumbail='<span class="small_text" id="total_imgs">'+img_arr_pos+' of '+total_images+'</span><span class="small_text"> Choose a Thumbnail</span>'; + } + else{ + selectThumb=""; + countThumbail=""; + } + inc_image = '<div class="'+extractClass+' col-xs-12 col-sm-12 col-md-12" id="extracted_thumb">'+aVideo+'<img src="'+data.images[0]+'" width="'+width+'" height="'+height+'">'+selectThumb+'</div>'; + inputToSave+="<input type='hidden' class='img_link' value='"+data.images[0]+"'/>"; + }else{ + inc_image =''; + countThumbail=''; + } + } + + //content to be loaded in #results element + if(data.content==null) + data.content=""; + if(typeof(data.url)!="undefined") + mediaUrl=data.url; + else if (typeof(data.content.url) !="undefined") + mediaUrl=data.content.url; + else + mediaUrl=""; + /*if((typeof(data.description) !="undefined" || typeof(data.name) != "undefined") && (data.description !="" || data.name != "")){ + contentMedia='<div class="extracted_content col-xs-8 padding-20">'+ + '<a href="'+mediaUrl+'" target="_blank" class="lastUrl text-dark">'; + if(typeof(data.name) != "undefined" && data.name!=""){ + contentMedia+='<h4>'+data.name+'</h4></a>'; + inputToSave+="<input type='hidden' class='name' value='"+data.name+"'/>"; + } + if(typeof(data.description) != "undefined" && data.description!=""){ + contentMedia+='<p>'+data.description+'</p>'+countThumbail+'>'; + if(typeof(data.name) == "undefined" || data.name=="") + contentMedia+='</a>'; + inputToSave+="<input type='hidden' class='description' value='"+data.description+"'/>"; + } + contentMedia+='</div>'; + } + else{ + contentMedia=""; + }*/ + inputToSave+="<input type='hidden' class='url' value='"+mediaUrl+"'/>"; + inputToSave+="<input type='hidden' class='type' value='url_content'/>"; + content=""; + content += '<div class="extracted_url padding-10">'+ inc_image +'</div>'+inputToSave; + return content; + } +} +var list = { + initList : function(dataList, action, subType){ + var viewList=""; + $.each(dataList, function(e,v){ + if(action == "backup"){ + if(e=="services"){ + $.each(v, function(i, data){ + $.each(data,function(key, service){ + viewList+=list.getListOf(key,service,action); + }); + console.log(data); + }); + }else if(e=="products"){ + $.each(v, function(i, data){ + console.log(data); + viewList+=list.getListOf(e,data,action); + }); + } + } + else{ + if(action != "history") + viewList+="<h4 class='listSubtitle col-md-12 col-sm-12 col-xs-12 letter-orange'>"+Object.keys(v).length+" "+e+"</h4>"; + $.each(v, function(i, data){ + console.log(data); + viewList+=list.getListOf(e,data,action); + }); + } + $("#listList").html(viewList); + }); + if(action=="history"){ + $(".orderItemComment").click(function(){ + orderItem=listComponents["orderItems"][$(this).data("id")]; + commentRating(orderItem, $(this).data("action")); + }); + } + }, + getListOf : function(type,data, action){ + data.imgProfil = ""; + btnAction=""; + if(action=="manage") + btnAction="<a href='#page.type."+type+".id."+data._id.$id+"' class='lbh btn bg-orange linkBtnList'>Manage it</a>"; + else if(action=="history"){ + btnAction="save"; + labelAction=trad["Leave your comment"]; + if(typeof data.comment != "undefined"){ + btnAction="show"; + labelAction="Show your comment"; + } + btnAction="<button class='btn btn-link bg-green-k orderItemComment linkBtnList' data-id='"+data._id.$id+"' data-action='"+btnAction+"'>"+ + labelAction+ + "</button>"; + } + if(!data.useMinSize) + data.imgProfil = "<i class='fa fa-image fa-3x'></i>"; + if("undefined" != typeof data.profilMediumImageUrl && data.profilMediumImageUrl != "") + data.imgProfil= "<img class='img-responsive' src='"+baseUrl+data.profilMediumImageUrl+"'/>"; + str="<div class='col-md-12 col-sm-12 contentListItem padding-5'>"+ + "<div class='col-md-2 col-sm-2 contentImg text-center no-padding'>"+ + data.imgProfil+ + "</div>"+ + "<div class='col-md-10 col-sm-10 listItemInfo'>"+ + "<div class='col-md-10 col-sm-10'>"+ + "<h4>"+data.name+"</h4>"+ + "<span>Price: "+data.price+"</span><br/>"; + if(action=="backup"){ + str+="<span>Quantity: "+data.countQuantity+"</span>"; + } + if(action=="manage" && typeof data.toBeValidated != "undefined") + str+="<i class='text-azul'>Waiting for validation</i>"; + str+= "</div>"+ + "<div class='col-md-2 col-sm-2'>"+ + + "</div>"+ + "</div>"+ + btnAction+ + "</div>"; + if(action=="history"){ + str+= "<div id='content-comment-"+data._id.$id+"' class='col-xs-12 no-padding contentRatingComment'></div>"; + } + if(action=="backup"){ + if(typeof data.reservations != "undefined"){ + str += "<div class='col-md-12 col-sm-12 col-xs-12'>"; + $.each(data.reservations, function(date, value){ + s=(value.countQuantity > 1) ? "s" : ""; + dateStr=directory.getDateFormated({startDate:date}, true); + str += "<div class='col-md-12 col-sm-12 col-xs-12 bookDate margin-bottom-10'>"+ + "<div class='col-md-12 col-sm-12 col-xs-12 dateHeader'>"+ + "<h4 class='pull-left margin-bottom-5 no-margin col-md-5 col-sm-5 col-xs-5 no-padding'><i class='fa fa-calendar'></i> "+dateStr+"</h4>"; + incQtt=""; + if(typeof value.hours =="undefined") + incQtt=value.countQuantity+" reservation"+s; + str += "<span class='pull-left text-center col-md-3 col-sm-3 col-xs-3'>"+incQtt+"</span>"+ + "</div>"; + + if(typeof value.hours != "undefined"){ + $.each(value.hours, function(key, hours){ + s=(hours.countQuantity > 1) ? "s" : ""; + incQtt=hours.countQuantity+" reservation"+s; + str += "<div class='col-md-12 col-sm-12 col-xs-12 margin-bottom-5 padding-5 contentHoursSession'>"+ + "<h4 class='col-md-4 col-sm-4 col-xs-3 no-padding no-margin'><i class='fa fa-clock-o'></i> "+hours.start+" - "+hours.end+"</h4>"+ + "<span class='col-md-5 col-sm-5 col-xs-6 text-center'>"+incQtt+"</span>"+ + "</div>"; + }); + } + str += "</div>"; + }); + str += "</div>"; + } + } + return str; + } +} +/* ********************************* + COLLECTIONS +********************************** */ + +var collection = { + crud : function (action, name,type,id) { + if(userId){ + var params = {}; + var sure = true; + if(typeof type != "undefined") + params.type = type; + if(typeof id != "undefined") + params.id = id; + if(typeof action == "undefined") + action = "new"; + if(action == "del"){ + params.name = name; + sure = confirm("Vous êtes sûr ?"); + } + else if(action == "new" || action == "update") + params.name = prompt(tradDynForm.collectionname+' ?',name); + if(action == "update") + params.oldname = name; + + if(sure) + { + ajaxPost(null,baseUrl+"/"+moduleId+"/collections/crud/action/"+action ,params,function(data) { + console.warn(params.action); + if(data.result){ + toastr.success(data.msg); + if(location.hash.indexOf("#page") >=0){ + loadDataDirectory("collections", "star"); + } + //if no type defined we are on user + //TODO : else add on the contextMap + if( typeof type == "undefined" && action == "new"){ + if(!userConnected.collections) + userConnected.collections = {}; + if(!userConnected.collections[params.name]) + userConnected.collections[params.name] = {}; + }else if(action == "update"){ + smallMenu.openAjax(baseUrl+'/'+moduleId+'/collections/list/col/'+params.name,params.name,'fa-folder-open','yellow'); + if(!userConnected.collections[params.name]) + userConnected.collections[params.name] = userConnected.collections[ params.oldname ]; + delete userConnected.collections[ params.oldname ]; + }else if(action == "del"){ + delete userConnected.collections[params.name]; + smallMenu.open(); + } + collection.buildCollectionList("col_Link_Label_Count",".menuSmallBtns", function() { $(".collection").remove() }) + } + else + toastr.error(data.msg); + }, "none"); + } + } else + toastr.error(trad.LoginFirst); + }, + applyColor : function (what,id,col) { + var collection = (typeof col == "undefined") ? "favorites" : col; + console.log("applyColor",what,id) + if(userConnected && userConnected.collections && userConnected.collections[collection] && userConnected.collections[collection][what] && userConnected.collections[collection][what][id] ){ + $(".star_"+what+"_"+id).children("i").removeClass("fa-star-o").addClass('fa-star text-red'); + console.warn("applying Color",what,id) + } + }, + add2fav : function (what,id,col){ + var collection = (typeof col == "undefined") ? "favorites" : col; + if(userId){ + var params = { id : id, type : what, collection : collection }; + var el = ".star_"+what+"_"+id; + + ajaxPost(null,baseUrl+"/"+moduleId+"/collections/add",params,function(data) { + console.warn(params.action,collection,what,id); + if(data.result){ + if(data.list == '$unset'){ + /*if(location.hash.indexOf("#page") >=0){ + if(location.hash.indexOf("view.directory.dir.collections") >=0 && contextData.id==userId){ + loadDataDirectory("collections", "star"); + }else{ + $(".favorisMenu").removeClass("text-yellow"); + $(".favorisMenu").children("i").removeClass("fa-star").addClass('fa-star-o'); + } + }else{*/ + $(el).removeClass("text-yellow"); + $(el).children("i").removeClass("fa-star text-yellow").addClass('fa-star-o'); + delete userConnected.collections[collection][what][id]; + //} + } + else{ + /*if(location.hash.indexOf("#page") >=0){ + if(location.hash.indexOf("view.directory.dir.collections") >=0 && contextData.id==userId){ + loadDataDirectory("collections", "star"); + }else{ + $(".favorisMenu").addClass("text-yellow"); + $(".favorisMenu").children("i").removeClass("fa-star-o").addClass('fa-star'); + } + } + else*/ + $(el).addClass("text-yellow"); + $(el).children("i").removeClass("fa-star-o").addClass('fa-star text-yellow'); + + if(!userConnected.collections) + userConnected.collections = {}; + if(!userConnected.collections[collection]) + userConnected.collections[collection] = {}; + if(!userConnected.collections[collection][what]) + userConnected.collections[collection][what] = {}; + userConnected.collections[collection][what][id] = new Date(); + } + toastr.success(data.msg); + } + else + toastr.error(data.msg); + },"none"); + } else + toastr.error(trad.LoginFirst); + }, + buildCollectionList : function ( tpl, appendTo, reset ) { + if(typeof reset == "function") + reset(); + str = ""; + $.each(userConnected.collections, function(col,list){ + var colcount = 0; + $.each(list, function(type,entries){ + colcount += Object.keys(entries).length; + }); + str += js_templates[ tpl ]({ + label : col, + labelCount : colcount + }) ; + }); + $(appendTo).append(str); + } +}; + +/* ********************************* + DYNFORM SPEC TYPE OBJ +********************************** */ +var contextData = null; +var dynForm = null; +var mentionsInput=[]; +var mentionsInit = { + stopMention : false, + isSearching : false, + get : function(domElement){ + mentionsInput=[]; + $(domElement).mentionsInput({ + onDataRequest:function (mode, query, callback) { + if(mentionsInit.stopMention) + return false; + var data = mentionsContact; + data = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 }); + callback.call(this, data); + mentionsInit.isSearching=true; + var search = {"searchType" : ["citoyens","organizations","projects"]}; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/search/globalautocomplete", + data: search, + dataType: "json", + success: function(retdata){ + if(!retdata){ + toastr.error(retdata.content); + }else{ + mylog.log(retdata); + data = []; + //for(var key in retdata){ + // for (var id in retdata[key]){ + $.each(retdata, function (e, value){ + avatar=""; + //console.log(retdata[key]); + //aert(retdata[key][id].type); + if(typeof value.profilThumbImageUrl != "undefined" && value.profilThumbImageUrl!="") + avatar = baseUrl+value.profilThumbImageUrl; + object = new Object; + object.id = e; + object.name = value.name; + object.slug = value.slug; + object.avatar = avatar; + object.type = value.type; + var findInLocal = _.findWhere(mentionsContact, { + name: value.name, + type: value.type + }); + if(typeof(findInLocal) == "undefined") + mentionsContact.push(object); + // } + //} + }); + data=mentionsContact; + mylog.log(data); + data = _.filter(data, function(item) { return item.name.toLowerCase().indexOf(query.toLowerCase()) > -1 }); + callback.call(this, data); + mylog.log(callback); + } + } + }) + } + }); + }, + beforeSave : function(object, domElement){ + $(domElement).mentionsInput('getMentions', function(data) { + mentionsInput=data; + }); + if (typeof mentionsInput != "undefined" && mentionsInput.length != 0){ + var textMention=""; + $(domElement).mentionsInput('val', function(text) { + textMention=text; + $.each(mentionsInput, function(e,v){ + strRep=v.name; + if(typeof v.slug != "undefined") + strRep="@"+v.slug; + textMention = textMention.replace("@["+v.name+"]("+v.type+":"+v.id+")", strRep); + }); + }); + object.mentions=mentionsInput; + object.text=textMention; + } + return object; + }, + addMentionInText: function(text,mentions){ + $.each(mentions, function( index, value ){ + if(typeof value.slug != "undefined"){ + str="<span class='lbh' onclick='urlCtrl.loadByHash(\"#page.type."+value.type+".id."+value.id+"\")' onmouseover='$(this).addClass(\"text-blue\");this.style.cursor=\"pointer\";' onmouseout='$(this).removeClass(\"text-blue\");' style='color: #719FAB;'>"+ + value.name+ + "</span>"; + text = text.replace("@"+value.slug, str); + }else{ + //Working on old news + array = text.split(value.value); + text=array[0]+ + "<span class='lbh' onclick='urlCtrl.loadByHash(\"#page.type."+value.type+".id."+value.id+"\")' onmouseover='$(this).addClass(\"text-blue\");this.style.cursor=\"pointer\";' onmouseout='$(this).removeClass(\"text-blue\");' style='color: #719FAB;'>"+ + value.name+ + "</span>"+ + array[1]; + } + }); + return text; + }, + reset: function(domElement){ + $(domElement).mentionsInput('reset'); + } +} +var uploadObj = { + type : null, + id : null, + gotoUrl : null, + isSub : false, + update : false, + folder : "communecter", //on force pour pas casser toutes les vielles images + contentKey : "profil", + path : null, + extra : null, + set : function(type,id, file){ + if(notNull(file) && file){ + mylog.log("set uploadObj", id,type,uploadObj.folder,uploadObj.contentKey); + uploadObj.type = type; + uploadObj.id = id; + uploadObj.path = baseUrl+"/"+moduleId+"/document/uploadSave/dir/"+uploadObj.folder+"/folder/"+type+"/ownerId/"+id+"/input/qqfile/docType/file"; + } + else if(typeof type != "undefined"){ + mylog.log("set uploadObj", id,type,uploadObj.folder,uploadObj.contentKey); + uploadObj.type = type; + uploadObj.id = id; + uploadObj.path = baseUrl+"/"+moduleId+"/document/uploadSave/dir/"+uploadObj.folder+"/folder/"+type+"/ownerId/"+id+"/input/qqfile/contentKey/"+uploadObj.contentKey; + } else { + uploadObj.type = null; + uploadObj.id = null; + uploadObj.path = null; + } + } +}; +var openingHoursResult=[ + {"dayOfWeek":"Su","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Mo","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Tu","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"We","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Th","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Fr","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Sa","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, +]; + +var dyFObj = { + elementObj : null, + elementData : null, + subElementObj : null, + subElementData : null, + activeElem : null, + activeModal : null, + //rules to show hide submit btn, used anwhere on blur and can be + //completed by specific rules on dynForm Obj + //ex : dyFObj.elementObj.dynForm.jsonSchema.canSubmitIf + canSubmitIf : function () { + var valid = true; + //on peut ajouter des regles dans la map definition + if( jsonHelper.notNull("dyFObj.elementObj.dynForm.jsonSchema.canSubmitIf", "function") ) + valid = dyFObj.elementObj.dynForm.jsonSchema.canSubmitIf(); + if( $('#ajaxFormModal #name').length == 0 || $('#ajaxFormModal #name').val() != "" && valid ) + $('#btn-submit-form').show(); + else + $('#btn-submit-form').hide(); + //tmp + $('#btn-submit-form').show(); + }, + formatData : function (formData, collection,ctrl) { + mylog.warn("----------- formatData",formData, collection,ctrl); + formData.collection = collection; + formData.key = ctrl; + if( $.isArray(formData.id) ) + formData.id = formData.id[0]; //this shouldn't happen, occurs in survey + + if(dyFInputs.locationObj.centerLocation){ + //formData.multiscopes = elementLocation; + formData.address = dyFInputs.locationObj.centerLocation.address; + formData.geo = dyFInputs.locationObj.centerLocation.geo; + formData.geoPosition = dyFInputs.locationObj.centerLocation.geoPosition; + if( dyFInputs.locationObj.elementLocations.length ){ + $.each( dyFInputs.locationObj.elementLocations,function (i,v) { + mylog.log("elementLocations v", v); + if(typeof v != "undefined" && typeof v.center != "undefined" ){ + dyFInputs.locationObj.elementLocations.splice(i, 1); + } + }); + formData.addresses = dyFInputs.locationObj.elementLocations; + } + } + + formData.medias = []; + $(".resultGetUrl").each(function(){ + if($(this).html() != ""){ + mediaObject=new Object; + if($(this).find(".type").val()=="url_content"){ + mediaObject.type=$(this).find(".type").val(); + if($(this).find(".name").length) + mediaObject.name=$(this).find(".name").val(); + if($(this).find(".description").length) + mediaObject.description=$(this).find(".description").val(); + mediaObject.content=new Object; + mediaObject.content.type=$(this).find(".media_type").val(), + mediaObject.content.url=$(this).find(".url").val(), + mediaObject.content.image=$(this).find(".img_link").val(); + if($(this).find(".size_img").length) + mediaObject.content.imageSize=$(this).find(".size_img").val(); + if($("#form-news #results .video_link_value").length) + mediaObject.content.videoLink=$(this).find(".video_link_value").val(); + } + else{ + mediaObject.type=$(this).find(".type").val(), + mediaObject.countImages=$(this).find(".count_images").val(), + mediaObject.images=[]; + $(".imagesNews").each(function(){ + mediaObject.images.push($(this).val()); + }); + } + formData.medias.push(mediaObject); + } + }); + + if( typeof formData.source != "undefined" && formData.source != "" ){ + formData.source = { insertOrign : "network", + keys : [ + formData.source + ], + key : formData.source + } + } + + if( typeof formData.tags != "undefined" && formData.tags != "" ) + formData.tags = formData.tags.split(","); + + if( typeof formData.openingHours != "undefined"){ + if(typeof formData.hour != "undefined") + delete formData.hour; + if(typeof formData.minute != "undefined") + delete formData.minute; + $.each(openingHoursResult, function(e,v){ + if(v.allDay && typeof v.hours != "undefined") + delete openingHoursResult[e]["hours"]; + if(typeof v.disabled != "undefined") + delete openingHoursResult[e]; + }); + formData.openingHours=openingHoursResult; + } + // Add collections and genres of notragora in tags + if( typeof formData.collections != "undefined" && formData.collections != "" ){ + collectionsTagsSave=formData.collections.split(","); + if(!formData.tags)formData.tags = []; + $.each(collectionsTagsSave, function(i, e) { + formData.tags.push(e); + }); + delete formData['collections']; + } + + if( typeof formData.genres != "undefined" && formData.genres != "" ){ + genresTagsSave=formData.genres.split(","); + if(!formData.tags)formData.tags = []; + $.each(genresTagsSave, function(i, e) { + formData.tags.push(e); + }); + delete formData['genres']; + } + + if(typeof formData.isUpdate == "undefined" || !formData.isUpdate) + removeEmptyAttr(formData); + else + delete formData["isUpdate"]; + + mylog.dir(formData); + return formData; + }, + + saveElement : function ( formId,collection,ctrl,saveUrl,afterSave ) { + //alert("saveElement"); + mylog.warn("---------------- saveElement",formId,collection,ctrl,saveUrl,afterSave ); + formData = $(formId).serializeFormJSON(); + mylog.log("before",formData); + + if( jsonHelper.notNull( "dyFObj.elementObj.dynForm.jsonSchema.formatData","function") ) + formData = dyFObj.elementObj.dynForm.jsonSchema.formatData(formData); + + formData = dyFObj.formatData(formData,collection,ctrl); + mylog.log("saveElement", formData); + formData.medias = []; + $(".resultGetUrl").each(function(){ + if($(this).html() != ""){ + mediaObject=new Object; + if($(this).find(".type").val()=="url_content"){ + mediaObject.type=$(this).find(".type").val(); + if($(this).find(".name").length) + mediaObject.name=$(this).find(".name").val(); + if($(this).find(".description").length) + mediaObject.description=$(this).find(".description").val(); + mediaObject.content=new Object; + mediaObject.content.type=$(this).find(".media_type").val(), + mediaObject.content.url=$(this).find(".url").val(), + mediaObject.content.image=$(this).find(".img_link").val(); + if($(this).find(".size_img").length) + mediaObject.content.imageSize=$(this).find(".size_img").val(); + if($(this).find(".video_link_value").length) + mediaObject.content.videoLink=$(this).find(".video_link_value").val(); + } + else{ + mediaObject.type=$(this).find(".type").val(), + mediaObject.countImages=$(this).find(".count_images").val(), + mediaObject.images=[]; + $(".imagesNews").each(function(){ + mediaObject.images.push($(this).val()); + }); + } + formData.medias.push(mediaObject); + } + }); + if(formData.medias.length == 0) + delete formData.medias; + mylog.log("beforeAjax",formData); + + if( dyFObj.elementObj.dynForm.jsonSchema.debug ){ + mylog.log("debug dyn Form xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); + mylog.dir(formData); + dyFObj.closeForm(); + mylog.log("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); + } else { + $.ajax( { + type: "POST", + url: (saveUrl) ? saveUrl : baseUrl+"/"+moduleId+"/element/save", + data: formData, + dataType: "json", + success: function(data){ + mylog.warn("saveElement ajax result"); + mylog.dir(data); + if(data.result == false){ + toastr.error(data.msg); + //reset save btn + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false).one(function() { + $( settings.formId ).submit(); + }); + } + else { + if(typeof data.msg != "undefined") + toastr.success(data.msg); + else{ + if(typeof data.resultGoods != "undefined" && typeof data.resultGoods.msg != "undefined") + toastr.success(data.resultGoods.msg); + if(typeof data.resultErrors != "undefined" && typeof data.resultErrors.msg != "undefined") + toastr.error(data.resultErrors.msg); + } + // mylog.log("data.id", data.id, data.url); + /*if(data.map && $.inArray(collection, ["events","organizations","projects","citoyens"] ) !== -1) + addLocationToFormloopEntity(data.id, collection, data.map);*/ + if (typeof afterSave == "function"){ + afterSave(data); + //urlCtrl.loadByHash( '#'+ctrl+'.detail.id.'+data.id ); + } else { + dyFObj.closeForm(); + if(data.url){ + mylog.log("urlReload data.url", data.url); + urlCtrl.loadByHash( data.url ); + } + else if(data.id){ + mylog.log("urlReload", '#'+ctrl+'.detail.id.'+data.id); + urlCtrl.loadByHash( '#'+ctrl+'.detail.id.'+data.id ); + } + } + } + uploadObj.set() + } + }); + } + }, + closeForm : function() { + $('#ajax-modal').modal("hide"); + //clear the unecessary DOM + $("#ajaxFormModal").html(''); + uploadObj.set(); + uploadObj.update = false; + }, + editElement : function (type,id){ + mylog.warn("--------------- editElement ",type,id); + //get ajax of the elemetn content + uploadObj.set(type,id); + uploadObj.update = true; + + $.ajax({ + type: "GET", + url: baseUrl+"/"+moduleId+"/element/get/type/"+type+"/id/"+id, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + //toastr.info(type+" found"); + + //onLoad fill inputs + //will be sued in the dynform as update + data.map.id = data.map["_id"]["$id"]; + if(typeof typeObj[type].formatData == "function") + data = typeObj[type].formatData(); + + delete data.map["_id"]; + mylog.dir(data); + console.log("editElement", data); + dyFObj.elementData = data; + dyFObj.openForm( dyFInputs.get(type).ctrl ,null, data.map); + } else { + toastr.error("something went wrong!! please try again."); + } + }); + }, + + //entry point function for opening dynForms + openForm : function (type, afterLoad,data,isSub) { + //mylog.clear(); + $.unblockUI(); + $("#openModal").modal("hide"); + mylog.warn("--------------- Open Form ",type, afterLoad,data); + mylog.dir(data); + uploadObj.contentKey="profil"; + dyFObj.activeElem = (isSub) ? "subElementObj" : "elementObj"; + dyFObj.activeModal = (isSub) ? "#openModal" : "#ajax-modal"; + /*if(type=="addPhoto") + uploadObj.contentKey="slider";*/ + //BOUBOULE ICI ACTIVER LEVENEMENT + //initKSpec(); + if(userId) + { + formInMap.formType = type; + dyFObj.getDynFormObj(type, function() { + dyFObj.starBuild(afterLoad,data); + },afterLoad, data); + } else { + dyFObj.openFormAfterLogin = { + type : type, + afterLoad : afterLoad, + data : data + }; + toastr.error(tradDynForm["mustbeconnectforcreateform"]); + $('#modalLogin').modal("show"); + } + }, + //get the specification of a given dynform + //can be of 3 types + //(string) :: will get the definition if exist in typeObj[key].dybnForm + //if doesn't exist tries to lazyload it from assets/js/dynForm + //(object) :: is dynformp definition + getDynFormObj : function(type, callback,afterLoad, data ){ + //alert(type+'.js'); + mylog.warn("------------ getDynFormObj",type, callback,afterLoad, data ); + if(typeof type == "object"){ + mylog.log(" object directly Loaded : ", type); + dyFObj[dyFObj.activeElem] = type; + if( notNull(type.col) ) uploadObj.type = type.col; + callback(type, afterLoad, data); + }else if( jsonHelper.notNull( "typeObj."+type+".dynForm" , "object") ){ + mylog.log(" typeObj Loaded : ", type); + dyFObj[dyFObj.activeElem] = dyFInputs.get(type); + if( notNull(dyFInputs.get(type).col) ) uploadObj.type = dyFInputs.get(type).col; + callback( dyFObj[dyFObj.activeElem], afterLoad, data ); + }else { + //TODO : pouvoir surchargé le dossier dynform dans le theme + //via themeObj.dynForm.folder overload + var dfPath = (jsonHelper.notNull( "themeObj.dynForm.folder") ) ? themeObj.dynForm.folder : moduleUrl+'/js/dynForm/'; + lazyLoad( dfPath+type+'.js', + null, + function() { + //alert(dfPath+type+'.js'); + mylog.log("lazyLoaded",moduleUrl+'/js/dynForm/'+type+'.js'); + mylog.dir(dynForm); + //typeObj[type].dynForm = dynForm; + dyFInputs.get(type).dynForm = dynForm; + dyFObj[dyFObj.activeElem] = dyFInputs.get(type); + if( notNull(dyFInputs.get(type).col) ) uploadObj.type = dyFInputs.get(type).col; + callback( afterLoad, data ); + }); + } + }, + //prepare information for the modal panel + //and launches the build process + starBuild : function (afterLoad, data) { + mylog.warn("------------ starBuild",dyFObj[dyFObj.activeElem], afterLoad, data,dyFObj.activeModal ); + mylog.dir(dyFObj[dyFObj.activeElem]); + $(dyFObj.activeModal+" .modal-header").removeClass("bgEvent bgOrga bgProject bgPerson bgDDA");//.addClass(dyFObj[elem].bgClass); + $(dyFObj.activeModal+" #ajax-modal-modal-title").html("<i class='fa fa-refresh fa-spin'></i> Chargement en cours. Merci de patienter."); + $(dyFObj.activeModal+" #ajax-modal-modal-title").removeClass("text-dark text-green text-azure text-purple text-orange text-blue text-turq"); + + $(dyFObj.activeModal+" #ajax-modal-modal-body").html( "<div class='row bg-white'>"+ + "<div class='col-sm-10 col-sm-offset-1'>"+ + "<div class='space20'></div>"+ + //"<h1 id='proposerloiFormLabel' >Faire une proposition</h1>"+ + "<form id='ajaxFormModal' enctype='multipart/form-data'></form>"+ + "</div>"+ + "</div>"); + $(dyFObj.activeModal+' .modal-footer').hide(); + $(dyFObj.activeModal).modal("show"); + + dyFInputs.init(); + afterLoad = ( notNull(afterLoad) ) ? afterLoad : null; + data = ( notNull(data) ) ? data : {}; + dyFObj.buildDynForm(afterLoad, data,dyFObj[dyFObj.activeElem],dyFObj.activeModal+" #ajaxFormModal"); + //if(typeof dyFObj[dyFObj.currentKFormType].color != "undefined") + //$("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + //.addClass(dyFObj[dyFObj.currentKFormType].color); + //alert("CO "+typeObj[currentKFormType].color); + + //$(dyFObj.activeModal+" #ajax-modal-modal-title").html((typeof dyFObj[dyFObj.activeElem].title != "undefined") ? dyFObj[dyFObj.activeElem].title : ""); + }, + /*subDynForm : function(type, afterLoad,data) { + smallMenu.open(); + $("#openModal div.modal-content div.container")..html( "<div class='row bg-white'>"+ + "<div class='col-sm-10 col-sm-offset-1'>"+ + "<div class='space20'></div>"+ + //"<h1 id='proposerloiFormLabel' >Faire une proposition</h1>"+ + "<form id='subFormModal' enctype='multipart/form-data'></form>"+ + "</div>"+ + "</div>"); + dyFObj.buildDynForm(afterLoad, data,dyFObj.subElementObj,"#openModal #subFormModal"); + + },*/ + buildDynForm : function (afterLoad,data,obj,formId) { + mylog.warn("--------------- buildDynForm", dyFObj[dyFObj.activeElem], afterLoad,data); + if(userId) + { + var form = $.dynForm({ + formId : formId, + formObj : dyFObj[dyFObj.activeElem].dynForm, + formValues : data, + beforeBuild : function () { + + if( jsonHelper.notNull( "dyFObj."+dyFObj.activeElem+".dynForm.jsonSchema.beforeBuild","function") ) + dyFObj[dyFObj.activeElem].dynForm.jsonSchema.beforeBuild(); + }, + onLoad : function () { + + if( jsonHelper.notNull("themeObj.dynForm.onLoadPanel","function") ){ + themeObj.dynForm.onLoadPanel(dyFObj[dyFObj.activeElem]); + } else { + $("#ajax-modal-modal-title").html("<i class='fa fa-"+dyFObj[dyFObj.activeElem].dynForm.jsonSchema.icon+"'></i> "+dyFObj[dyFObj.activeElem].dynForm.jsonSchema.title); + //alert(afterLoad+"|"+typeof dyFObj[dyFObj.activeElem].dynForm.jsonSchema.onLoads[afterLoad]); + } + + if( jsonHelper.notNull( "dyFObj."+dyFObj.activeElem+".dynForm.jsonSchema.onLoads."+afterLoad, "function") ) + dyFObj[dyFObj.activeElem].dynForm.jsonSchema.onLoads[afterLoad](data); + //incase we need a second global post process + if( jsonHelper.notNull( "dyFObj."+dyFObj.activeElem+".dynForm.jsonSchema.onLoads.onload", "function") ) + dyFObj[dyFObj.activeElem].dynForm.jsonSchema.onLoads.onload(data); + + bindLBHLinks(); + }, + onSave : function(){ + + if( typeof dyFObj[dyFObj.activeElem].dynForm.jsonSchema.beforeSave == "function") + dyFObj[dyFObj.activeElem].dynForm.jsonSchema.beforeSave(); + + var afterSave = ( typeof dyFObj[dyFObj.activeElem].dynForm.jsonSchema.afterSave == "function") ? dyFObj[dyFObj.activeElem].dynForm.jsonSchema.afterSave : null; + mylog.log("onSave ", dyFObj.activeElem, dyFObj[dyFObj.activeElem].saveUrl, dyFObj[dyFObj.activeElem].save); + if( dyFObj[dyFObj.activeElem].save ) + dyFObj[dyFObj.activeElem].save(dyFObj.activeModal+" #ajaxFormModal"); + if( dyFObj[dyFObj.activeElem].dynForm.jsonSchema.save ) + dyFObj[dyFObj.activeElem].dynForm.jsonSchema.save(); //use this for subDynForms + else if(dyFObj[dyFObj.activeElem].saveUrl) + dyFObj.saveElement( "#ajaxFormModal", dyFObj[dyFObj.activeElem].col, dyFObj[dyFObj.activeElem].ctrl, dyFObj[dyFObj.activeElem].saveUrl, afterSave ); + else + dyFObj.saveElement( "#ajaxFormModal", dyFObj[dyFObj.activeElem].col, dyFObj[dyFObj.activeElem].ctrl, null, afterSave ); + return false; + } + }); + mylog.dir(form); + } else { + toastr.error("Vous devez être connecté pour afficher les formulaires de création"); + $('#modalLogin').modal("show"); + } + }, + + //generate Id for upload feature of this element + setMongoId : function(type,callback) { + uploadObj.type = type; + mylog.warn("uploadObj ",uploadObj); + if( !$("#ajaxFormModal #id").val() && !uploadObj.update ) + { + getAjax( null , baseUrl+"/api/tool/get/what/mongoId" , function(data){ + mylog.log("setMongoId uploadObj.id", data.id); + uploadObj.set(type,data.id); + $("#ajaxFormModal #id").val(data.id); + if( typeof callback === "function" ) + callback(); + }); + } + }, + editDynForm : function(title, icon, properties, fct, data, saveUrl, onLoads, beforeSave, afterSave) { + mylog.warn("---------------------- editDynForm ------------------"); + var form = { + dynForm:{ + jsonSchema : { + title : title, + icon : icon, + properties : properties + } + } + }; + + if(typeof saveUrl != "undefined" ) + form.saveUrl = saveUrl; + + if(typeof onLoads != "undefined" ) + form.dynForm.jsonSchema.onLoads = onLoads; + + if(typeof beforeSave != "undefined" ) + form.dynForm.jsonSchema.beforeSave = beforeSave; + + if(typeof afterSave != "undefined" ) + form.dynForm.jsonSchema.afterSave = afterSave; + + mylog.dir(form); + + dyFObj.openForm(form, fct, data); + }, + canUserEdit : function ( ) { + var res = false; + if( userId && userConnected && userConnected.links && contextData ){ + if(contextData.type == "organizations" && userConnected.links.memberOf[contextData.id].isAdmin ) + res = true; + if(contextData.type == "events" && userConnected.links.events[contextData.id].isAdmin ) + res = true; + if(contextData.type == "projects" && userConnected.links.projects[contextData.id].isAdmin ) + res = true; + } + return res; + } +} +//TODO : refactor into dyfObj.inputs +var dyFInputs = { + + init : function() { + //global variables clean up + dyFInputs.locationObj.elementLocation = null; + dyFInputs.locationObj.elementLocations = []; + dyFInputs.locationObj.centerLocation = null; + dyFInputs.locationObj.countLocation = 0 ; + dyFInputs.locationObj.addresses = (typeof dyFObj.elementData != "undefined" && dyFObj.elementData != null && typeof dyFObj.elementData.map.addresses != "undefined") ? dyFObj.elementData.map.addresses : [] ; + updateLocality = false; + // Initialize tags list for network in form of element + if( typeof networkJson != 'undefined' && + typeof networkJson.add != "undefined" && + typeof typeObj != "undefined" ){ + $.each(networkJson.add, function(key, v) { + mylog.log("key", key); + if( typeof typeObj[key].dynForm != "undefined" ){ + if(typeof networkJson.request.sourceKey != "undefined"){ + sourceObject = {inputType:"hidden", value : networkJson.request.sourceKey[0]}; + typeObj[key].dynForm.jsonSchema.properties.source = sourceObject; + } + + if(v){ + + if(typeof networkJson.request.searchTag != "undefined"){ + typeObj[key].dynForm.jsonSchema.properties.tags.data = networkJson.request.searchTag; + } + + if( typeof typeObj[key] != "undefined" && + typeof typeObj[key].dynForm != "undefined" && + typeof typeObj[key].dynForm.jsonSchema.properties.tags != "undefined"){ + mylog.log("tags", typeof typeObj[key].dynForm.jsonSchema.properties.tags, typeObj[key].dynForm.jsonSchema.properties.tags); + mylog.log("networkTags", networkTags); + typeObj[key].dynForm.jsonSchema.properties.tags.values=networkTags; + if(typeof networkJson.request.mainTag != "undefined") + typeObj[key].dynForm.jsonSchema.properties.tags.mainTag = networkJson.request.mainTag[0]; + } + + if(notNull(networkJson.dynForm)){ + mylog.log("networkJson.dynForm"); + mylog.log("networkJson.dynForm", "networkJson.dynForm"); + if(notNull(networkJson.dynForm.extra)){ + var nbListTags = 1 ; + mylog.log("networkJson.dynForm.extra.tags", "networkJson.dynForm.extra.tags"+nbListTags); + mylog.log(jsonHelper.notNull("networkJson.dynForm.extra.tags"+nbListTags)); + while(jsonHelper.notNull("networkJson.dynForm.extra.tags"+nbListTags)){ + typeObj[key].dynForm.jsonSchema.properties["tags"+nbListTags] = { + "inputType" : "tags", + "placeholder" : networkJson.dynForm.extra["tags"+nbListTags].placeholder, + "values" : networkTagsCategory[ networkJson.dynForm.extra["tags"+nbListTags].list ], + "data" : networkTagsCategory[ networkJson.dynForm.extra["tags"+nbListTags].list ], + "label" : networkJson.dynForm.extra["tags"+nbListTags].list + }; + nbListTags++; + mylog.log("networkJson.dynForm.extra.tags", "networkJson.dynForm.extra.tags"+nbListTags); + mylog.log(jsonHelper.notNull("networkJson.dynForm.extra.tags"+nbListTags)); + } + delete typeObj[key].dynForm.jsonSchema.properties.tags; + } + } + } + } + + }); + } + + }, + + inputText :function(label, placeholder, rules, custom) { + var inputObj = { + label : label, + placeholder : ( notEmpty(placeholder) ? placeholder : "... " ), + inputType : "text", + rules : ( notEmpty(rules) ? rules : {} ), + custom : ( notEmpty(custom) ? custom : "" ) + }; + mylog.log("inputText ", inputObj); + return inputObj; + }, + slug :function(label, placeholder, rules) { + console.log("rooooles",rules); + var inputObj = { + label : label, + placeholder : ( notEmpty(placeholder) ? placeholder : "... " ), + inputType : "text", + rules : ( notEmpty(rules) ? rules : "") + }; + inputObj.init = function(){ + $("#ajaxFormModal #slug").bind("input keyup",function(e) { + $(this).val(slugify($(this).val(), true)); + if($("#ajaxFormModal #slug").val().length >= 3 ) + slugUnique($(this).val()); + else + $("#ajaxFormModal #slug").parent().removeClass("has-success").addClass("has-error").find("span").text("Please enter at least 3 characters."); + //dyFObj.canSubmitIf(); + }); + } + mylog.log("dyFInputs ", inputObj); + return inputObj; + }, + name :function(type, rules, addElement, extraOnBlur) { + var inputObj = { + placeholder : "... ", + inputType : "text", + rules : ( notEmpty(rules) ? rules : { required : true } ) + }; + if(type){ + console.log("NAMEOFYOUR", dyFInputs.get(type).ctrl, trad[dyFInputs.get(type).ctrl]); + inputObj.label = tradDynForm["nameofyour"]+" " + trad[dyFInputs.get(type).ctrl]+" "; + if(type=="classified") + inputObj.label = tradDynForm["titleofyour"]+" "+ trad[type]+" "; + + inputObj.placeholder = inputObj.label + " ..."; + + inputObj.init = function(){ + $("#ajaxFormModal #name ").off().on("blur",function(){ + if($("#ajaxFormModal #name ").val().length > 3 ) + globalSearch($(this).val(),[ dyFInputs.get(type).col, "organizations" ], addElement ); + + dyFObj.canSubmitIf(); + }); + } + }else{ + inputObj.label = "Nom "; + } + mylog.log("dyFInputs ", inputObj); + return inputObj; + }, + username : { + placeholder : "username", + inputType : "text", + label : "Username", + rules : { required : true }, + init : function(){ + $("#ajaxFormModal #username ").off().on("blur",function(){ + if($("#ajaxFormModal #username ").val().length > 2 ){ + var res = isUniqueUsername($(this).val()); + $("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + var msg = "Username existe déjà "; + var color = " text-red" + if(res){ + msg = "Username est bon"; + color = " text-green" + } + + $("#listSameName").html("<div class='col-sm-12 light-border"+color+"'> <i class='fa fa-eye'></i> "+msg+" : </div>"); + } + }); + } + }, + similarLink : { + inputType : "custom", + html:"<div id='similarLink'><div id='listSameName'></div></div>", + }, + inputSelect :function(label, placeholder, list, rules) { + mylog.log("inputSelect", label, placeholder, list, rules); + var inputObj = { + inputType : "select", + label : ( notEmpty(label) ? label : "" ), + placeholder : ( notEmpty(placeholder) ? placeholder : trad.choose ), + options : ( notEmpty(list) ? list : [] ), + rules : ( notEmpty(rules) ? rules : {} ) + }; + return inputObj; + }, + inputSelectGroup :function(label, placeholder, list, group, rules, init) { + mylog.log("inputSelectGroup", label, placeholder, list, rules); + var inputObj = { + inputType : "select", + label : ( notEmpty(label) ? label : "" ), + placeholder : ( notEmpty(placeholder) ? placeholder : trad.choose ), + options : ( notEmpty(list) ? list : [] ), + groupOptions : ( notEmpty(group) ? group : [] ), + rules : ( notEmpty(rules) ? rules : {} ), + init : ( notEmpty(init) ? init : function(){} ) + }; + return inputObj; + }, + organizerId : function( organizerId, organizerType ){ + return dyFInputs.inputSelectGroup( tradDynForm["whoorganizedevent"]+" ?", + tradDynForm["whoorganize"]+" ?", + firstOptions(), + parentList( ["organizations","projects"], organizerId, organizerType ), + { required : true }, + function(){ + $("#ajaxFormModal #organizerId").off().on("change",function(){ + + var organizerId = $(this).val(); + var organizerType = "notfound"; + if(organizerId == "dontKnow" ) + organizerType = "dontKnow"; + else if( $('#organizerId').find(':selected').data('type') && typeObj[$('#organizerId').find(':selected').data('type')] ) + organizerType = $('#organizerId').find(':selected').data('type'); + else + organizerType = typeObj["person"].col; + + mylog.warn( "organizer",organizerId,organizerType, $('#organizerId').find(':selected').data('type') ); + $("#ajaxFormModal #organizerType").val( organizerType ); + }); + }); + }, + tags : function(list, placeholder, label) { + tagsL = (list) ? list : tagsList; + return { + inputType : "tags", + placeholder : placeholder != null ? placeholder : tradDynForm["tags"], + values : tagsL, + label : (label != null) ? label : tradDynForm["addtags"] + } + }, + radio : function(label,keyValues) { + return { + label : (label != null) ? label : "", + inputType : "radio", + options : keyValues + } + }, + imageAddPhoto : { + inputType : "uploader", + showUploadBtn : true, + init : function() { + setTimeout( function() + { + + $('#trigger-upload').click(function(e) { + alert("initImageTrigger"); + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + urlCtrl.loadByHash(location.hash); + $('#ajax-modal').modal("hide"); + }); + //$("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + // .addClass("bg-dark"); + + //$("#ajax-modal-modal-title").html("<i class='fa fa-camera'></i> Publier une photo"); + + },1500); + } + }, + image :function() { + + if( !jsonHelper.notNull("uploadObj.gotoUrl") ) + uploadObj.gotoUrl = location.hash ; + mylog.log("image upload then gotoUrl", uploadObj.gotoUrl) ; + + return { + inputType : "uploader", + docType : "image", + label : tradDynForm["imageshere"]+" :", + showUploadBtn : false, + template:'qq-template-gallery', + filetypes:['jpeg', 'jpg', 'gif', 'png'], + afterUploadComplete : function(){ + //alert("afterUploadComplete :: "+uploadObj.gotoUrl); + dyFObj.closeForm(); + //alert( "image upload then goto : "+uploadObj.gotoUrl ); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + } + }, + file :function() { + + if( !jsonHelper.notNull("uploadObj.gotoUrl") ) + uploadObj.gotoUrl = location.hash ; + mylog.log("image upload then gotoUrl", uploadObj.gotoUrl) ; + + return { + inputType : "uploader", + label : tradDynForm.fileshere+" :", + showUploadBtn : false, + docType : "file", + template:'qq-template-manual-trigger', + filetypes:["pdf","xls","xlsx","doc","docx","ppt","pptx","odt","ods","odp"], + afterUploadComplete : function(){ + //alert("afterUploadComplete :: "+uploadObj.gotoUrl); + dyFObj.closeForm(); + //alert( "image upload then goto : "+uploadObj.gotoUrl ); + if(location.hash.indexOf("view.library")>0){ + navCollections=[]; + buildNewBreadcrum("files"); + getViewGallery(1,"","files"); + } + else + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + } + }, + textarea :function (label,placeholder,rules) { + var inputObj = { + inputType : "textarea", + label : ( notEmpty(label) ? label : "Votre message ..." ), + placeholder : ( notEmpty(placeholder) ? placeholder : "Votre message ..." ), + rules : ( notEmpty(rules) ? rules : { } ), + init : function(){ + mylog.log("textarea init"); + if($(".maxlengthTextarea").length){ + mylog.log("textarea init2"); + $(".maxlengthTextarea").off().keyup(function(){ + var name = "#" + $(this).attr("id") ; + mylog.log(".maxlengthTextarea", "#ajaxFormModal "+name, $(this).attr("id"), $("#ajaxFormModal "+name).val().length, $(this).val().length); + $("#ajaxFormModal #maxlength"+$(this).attr("id")).html($("#ajaxFormModal "+name).val().length); + }); + } + dataHelper.activateMarkdown("#ajaxFormModal #message"); + } + }; + return inputObj; + }, + + password : function (title, rules) { + var title = (title) ? title : trad["New password"]; + var ph = ""; + var rules = (rules) ? rules : { required : true } ; + var res = { + label : title, + inputType : "password", + placeholder : ph, + rules : rules + } + return res; + }, + price :function(label, placeholder, rules, custom) { + var inputObj = dyFInputs.inputText(tradDynForm["pricesymbole"], tradDynForm["pricesymbole"]+" ...") ; + inputObj.init = function(){ + $('input#price').filter_input({regex:'[0-9]'}); + }; + return inputObj; + }, + quantity :function(label, placeholder, rules, custom) { + var inputObj = dyFInputs.inputText(tradDynForm.quantity, tradDynForm.quantity+" ...") ; + inputObj.init = function(){ + $('input#quantity').filter_input({regex:'[0-9]'}); + }; + return inputObj; + }, + + text :function (label,placeholder,rules) { + var inputObj = { + inputType : "text", + label : ( notEmpty(label) ? label : tradDynForm["mainemail"] ), + placeholder : ( notEmpty(placeholder) ? placeholder : "exemple@mail.com" ), + rules : ( notEmpty(rules) ? rules : { email: true } ) + } + console.log("create form input email", inputObj); + return inputObj; + }, + + emailOptionnel :function (label,placeholder,rules) { + var inputObj = dyFInputs.text(label, placeholder, rules); + inputObj.init = function(){ + $(".emailtext").css("display","none"); + }; + return inputObj; + }, + createNews: function (){ + var inputObj = { + inputType : "createNews", + label : "ta mere", + placeholder:"", + rules: "", + params : {"targetId":contextData.id, "targetType":contextData.type, + "targetImg":contextData.profilThumbImageUrl, "targetName":contextData.name, + "authorId":userId,"authorImg":userConnected.profilThumbImageUrl, "authorName":userConnected.name} + } + inputObj.init = function(){ + $("#createNews").css("display","none"); + $("#createNews #tags").select2({tags:tagsList}); + $("#createNews > textarea").elastic(); + mentionsInit.get("#createNews > #mentionsText > textarea"); + $("#createNews .scopeShare").click(function() { + mylog.log(this); + replaceText=$(this).find("h4").html(); + $("#createNews #btn-toogle-dropdown-scope").html(replaceText+' <i class="fa fa-caret-down" style="font-size:inherit;"></i>'); + scopeChange=$(this).data("value"); + $("#createNews > input[name='scope']").val(scopeChange); + + }); + $("#createNews .targetIsAuthor").click(function() { + mylog.log(this); + srcImg=$(this).find("img").attr("src"); + name=$(this).data("name"); + $("#createNews #btn-toogle-dropdown-targetIsAuthor").html('<img height=20 width=20 src="'+srcImg+'"/> '+name+' <i class="fa fa-caret-down" style="font-size:inherit;"></i>'); + authorTargetChange=$(this).data("value"); + $("#createNews #authorIsTarget").val(authorTargetChange); + }); + }; + return inputObj; + }, + location : { + label : tradDynForm["localization"], + inputType : "location" + }, + locationObj : { + /* ********************************* + LOCATION + ********************************** */ + //TODO move to elementForm + elementLocation : null, + centerLocation : null, + elementLocations : [], + addresses : [], + elementPostalCode : null, + elementPostalCodes : [], + countLocation : 0, + countPostalCode : 0, + initVar :function(){ + dyFInputs.locationObj.elementLocation = null; + dyFInputs.locationObj.elementLocations = []; + dyFInputs.locationObj.centerLocation = null; + dyFInputs.locationObj.addresses = []; + dyFInputs.locationObj.countLocation = 0 ; + }, + init : function () { + mylog.log("init loc"); + $(".deleteLocDynForm").click(function(){ + mylog.log("deleteLocDynForm", $(this).data("index")); + var index = $(this).data("index"); + var indexLoc = $(this).data("indexLoc"); + if(index == -1 && dyFInputs.locationObj.elementLocations.length > 1){ + toastr.error("Vous ne pouvez pas supprimer l'adresse principal si vous avez des adresses secondaires"); + }else{ + bootbox.confirm({ + message: trad["suredeletelocality"]+"<span class='text-red'></span>", + buttons: { + confirm: { + label: trad["yes"], + className: 'btn-success' + }, + cancel: { + label: trad["no"], + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + mylog.log("Index Delete", $(this).data("index")); + var param = new Object; + param.name = (index == -1 ) ? "locality" : "addresses"; + param.value = (index == -1 ) ? "" : { addressesIndex : index }; + param.pk = uploadObj.id; + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+uploadObj.type, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + + var formValues = dyFObj.elementData.map; + mylog.log("FormValues", formValues); + + dyFInputs.locationObj.elementLocation = null; + dyFInputs.locationObj.elementLocations.splice(indexLoc,1); + if(index != -1 ){ + dyFInputs.locationObj.initVar(); + $(".locationlocation").html(""); + + if( dyFInputs.locationObj.addresses ){ + dyFInputs.locationObj.addresses.splice(index,1); + var test = []; + $.each(dyFInputs.locationObj.elementLocations, function(i,locelt){ + $.each(dyFInputs.locationObj.addresses, function(i,addLoc){ + + if(addLoc.postalCode == locelt.locelt && + addLoc.streetAddress == locelt.streetAddress && + addLoc.insee == locelt.insee && + addLoc.addressCountry == locelt.addressCountry && + addLoc.addressLocality == locelt.addressLocality){ + test.push(locelt); + } + }); + }); + + } + + if( formValues.address && formValues.geo && formValues.geoPosition ){ + mylog.warn("init Adress location",formValues.address.addressLocality,formValues.address.postalCode); + dyFInputs.locationObj.copyMapForm2Dynform({address:formValues.address,geo:formValues.geo,geo:formValues.geoPosition}); + dyFInputs.locationObj.addLocationToForm({address:formValues.address,geo:formValues.geo,geo:formValues.geoPosition}, -1); + } + if( dyFInputs.locationObj.addresses ){ + $.each(dyFInputs.locationObj.addresses, function(i,addLoc){ + mylog.warn("init extra addresses location ",locationObj.address.addressLocality,locationObj.address.postalCode); + dyFInputs.locationObj.copyMapForm2Dynform(locationObj); + dyFInputs.locationObj.addLocationToForm(locationObj, i); + }); + } + + }else{ + $(".locationEl"+ indexLoc).remove(); + } + } + } + }); + } + } + }); + } + }); + }, + copyMapForm2Dynform : function (locObj) { + mylog.warn("---------------copyMapForm2Dynform----------------"); + //if(!elementLocation) + // elementLocation = []; + mylog.log("locationObj", locObj); + dyFInputs.locationObj.elementLocation = locObj; + mylog.log("elementLocation", dyFInputs.locationObj.elementLocation); + dyFInputs.locationObj.elementLocations.push(dyFInputs.locationObj.elementLocation); + mylog.log("dyFInputs.locationObj.elementLocations", dyFInputs.locationObj.elementLocations); + mylog.log("dyFInputs.locationObj.centerLocation", dyFInputs.locationObj.centerLocation); + if(!dyFInputs.locationObj.centerLocation /*|| dyFInputs.locationObj.elementLocation.center == true*/){ + dyFInputs.locationObj.centerLocation = dyFInputs.locationObj.elementLocation; + dyFInputs.locationObj.elementLocation.center = true; + } + mylog.dir(dyFInputs.locationObj.elementLocations); + //elementLocation.push(positionObj); + }, + addLocationToForm : function (locObj, index){ + mylog.warn("---------------addLocationToForm----------------"); + mylog.dir(locObj); + var strHTML = ""; + if( locObj.address.addressCountry) + strHTML += locObj.address.addressCountry; + if( locObj.address.postalCode) + strHTML += ", "+locObj.address.postalCode; + if( locObj.address.addressLocality) + strHTML += ", "+locObj.address.addressLocality; + if( locObj.address.streetAddress) + strHTML += ", "+locObj.address.streetAddress; + var btnSuccess = ""; + var locCenter = ""; + var boolCenter=false; + if( dyFInputs.locationObj.countLocation == 0){ + btnSuccess = "btn-success"; + //locCenter = "<span class='lblcentre'>(localité centrale)</span>"; + locCenter = "<span class='lblcentre'> "+tradDynForm["mainLocality"]+"</span>"; + boolCenter=true; + } + + /*if(typeof index != "undefined"){ + strHTML = "<a href='javascript:;' class='deleteLocDynForm locationEl"+dyFInputs.locationObj.countLocation+" btn' data-index='"+index+"' data-indexLoc='"+dyFInputs.locationObj.countLocation+"'>"+ + "<i class='text-red fa fa-times'></i></a>"+ + "<span class='locationEl"+dyFInputs.locationObj.countLocation+" locel text-azure'>"+strHTML+"</span> "+ + "<a href='javascript:dyFInputs.locationObj.setAsCenter("+dyFInputs.locationObj.countLocation+")' data-index='"+index+"' class='centers center"+dyFInputs.locationObj.countLocation+" locationEl"+dyFInputs.locationObj.countLocation+" btn btn-xs "+btnSuccess+"'>"+ + "<i class='fa fa-map-marker'></i>"+locCenter+"</a> <br/>"; + } + else{ + strHTML = "<a href='javascript:dyFInputs.locationObj.removeLocation("+dyFInputs.locationObj.countLocation+")' class=' locationEl"+dyFInputs.locationObj.countLocation+" btn'> <i class='text-red fa fa-times'></i></a>"+ + "<span class='locationEl"+dyFInputs.locationObj.countLocation+" locel text-azure'>"+strHTML+"</span> "+ + "<a href='javascript:dyFInputs.locationObj.setAsCenter("+dyFInputs.locationObj.countLocation+")' class='centers center"+dyFInputs.locationObj.countLocation+" locationEl"+dyFInputs.locationObj.countLocation+" btn btn-xs "+btnSuccess+"'> <i class='fa fa-map-marker'></i>"+locCenter+"</a> <br/>"; + }*/ + if(typeof index != "undefined"){ + strHTML = + "<div class='col-md-12 col-sm-12 col-xs-12 text-left shadow2 padding-15 margin-top-15 margin-bottom-15'>" + + "<span class='pull-left locationEl"+dyFInputs.locationObj.countLocation+" locel text-red bold'>"+ + "<i class='fa fa-home fa-2x'></i> "+ + strHTML+ + "</span> "+ + + "<a href='javascript:;' data-index='"+index+"' data-indexLoc='"+dyFInputs.locationObj.countLocation+"' "+ + "class='deleteLocDynForm locationEl"+dyFInputs.locationObj.countLocation+" btn btn-sm btn-danger pull-right'> "+ + "<i class='fa fa-times'></i> "+tradDynForm.clear+ + "</a>"+ + + "<a href='javascript:dyFInputs.locationObj.setAsCenter("+dyFInputs.locationObj.countLocation+")' data-index='"+index+"'"+ + "class='margin-right-5 centers pull-right center"+dyFInputs.locationObj.countLocation+" locationEl"+dyFInputs.locationObj.countLocation+" btn btn-sm "+btnSuccess+"'> "+ + "<i class='fa fa-map-marker'></i> "+locCenter+ + "</a>" + + + "</div>"; + } else { + strHTML = + "<div class='col-md-12 col-sm-12 col-xs-12 text-left shadow2 padding-15 margin-top-15 margin-bottom-15'>" + + "<span class='pull-left locationEl"+dyFInputs.locationObj.countLocation+" locel text-red bold'>"+ + "<i class='fa fa-home fa-2x'></i> "+ + strHTML+ + "</span> "+ + + "<a href='javascript:dyFInputs.locationObj.removeLocation("+dyFInputs.locationObj.countLocation+", "+boolCenter+")' "+ + "class='removeLocalityBtn locationEl"+dyFInputs.locationObj.countLocation+" btn btn-sm btn-danger pull-right'> "+ + "<i class='fa fa-times'></i> "+tradDynForm.clear+ + "</a>"+ + + "<a href='javascript:dyFInputs.locationObj.setAsCenter("+dyFInputs.locationObj.countLocation+")' "+ + "class='setAsCenterLocalityBtn margin-right-5 centers pull-right center"+dyFInputs.locationObj.countLocation+" locationEl"+dyFInputs.locationObj.countLocation+" btn btn-sm "+btnSuccess+"'> "+ + "<i class='fa fa-map-marker'></i> "+locCenter+ + "</a>" + + + "</div>"; + } + $(".locationlocation").append(strHTML); + + + // strHTML = "<a href='javascript:removeLocation("+dyFInputs.locationObj.countLocation+", "+true+")'' class=' locationEl"+dyFInputs.locationObj.countLocation+" btn'> <i class='text-red fa fa-times'></i></a>"+ + // "<span class='locationEl"+dyFInputs.locationObj.countLocation+" locel text-azure'>"+strHTML+"</span> "+ + // "<a href='javascript:dyFInputs.locationObj.setAsCenter("+dyFInputs.locationObj.countLocation+")' class='centers center"+dyFInputs.locationObj.countLocation+" locationEl"+dyFInputs.locationObj.countLocation+" btn btn-xs "+btnSuccess+"'> <i class='fa fa-map-marker'></i>"+locCenter+"</a> <br/>"; + + $(".postalcodepostalcode").prepend(strHTML); + + mylog.log("strAddres", strHTML); + //$(".locationlocation").prepend(strHTML); + dyFInputs.locationObj.countLocation++; + }, + copyPCForm2Dynform : function (postalCodeObj) { + mylog.warn("---------------copyPCForm2Dynform----------------"); + mylog.log("postalCodeObj", postalCodeObj); + dyFInputs.locationObj.elementPostalCode = postalCodeObj; + mylog.log("elementPostalCode", dyFInputs.locationObj.elementPostalCode); + dyFInputs.locationObj.elementPostalCodes.push(dyFInputs.locationObj.elementPostalCode); + mylog.log("elementPostalCodes", dyFInputs.locationObj.elementPostalCodes); + mylog.dir(dyFInputs.locationObj.elementPostalCodes); + //elementPostalCode.push(positionObj); + }, + addPostalCodeToForm : function (postalCodeObj){ + mylog.warn("---------------addPostalCodeToForm----------------"); + mylog.dir(postalCodeObj); + var strHTML = ""; + if( postalCodeObj.postalCode) + strHTML += postalCodeObj.postalCode; + if( postalCodeObj.name) + strHTML += " ,"+postalCodeObj.name; + if( postalCodeObj.latitude) + strHTML += " ,("+postalCodeObj.latitude; + if( postalCodeObj.longitude) + strHTML += " / "+postalCodeObj.longitude+")"; + + strHTML = "<a href='javascript:dyFInputs.locationObj.removeLocation("+dyFInputs.locationObj.countPostalCode+")' class=' locationEl"+dyFInputs.locationObj.countPostalCode+" btn'> <i class='text-red fa fa-times'></i></a>"+ + "<span class='locationEl"+dyFInputs.locationObj.countPostalCode+" locel text-azure'>"+strHTML+"</span> <br/>"; + $(".postalcodepostalcode").prepend(strHTML); + dyFInputs.locationObj.countPostalCode++; + }, + removeLocation : function (ix,center){ + mylog.log("dyFInputs.locationObj.removeLocation", ix, dyFInputs.locationObj.elementLocations); + dyFInputs.locationObj.elementLocation = null; + dyFInputs.locationObj.elementLocations.splice(ix,1); + $(".locationEl"+ix).parent().remove(); + //delete dyFInputs.locationObj.elementLocations[ix]; + dyFInputs.locationObj.countLocation--; + if(dyFInputs.locationObj.countLocation > 0){ + for(var prop in dyFInputs.locationObj.elementLocations){ + if(prop >= ix){ + domNumber=parseInt(prop)+1; + domParent=$(".locationEl"+domNumber).parent(); + var btnSuccess = ""; + var locCenter = ""; + var boolCenter=false; + if( typeof center != "undefined" && center && prop==0){ + btnSuccess = "btn-success"; + //locCenter = "<span class='lblcentre'>(localité centrale)</span>"; + locCenter = "<span class='lblcentre'> "+tradDynForm["mainLocality"]+"</span>"; + boolCenter=true; + } + domParent.find(".removeLocalityBtn").attr("href","javascript:dyFInputs.locationObj.removeLocation("+prop+","+boolCenter+")"); + domParent.find(".setAsCenterLocalityBtn").attr("href","javascript:dyFInputs.locationObj.setAsCenter("+prop+")"); + $(".locationEl"+domNumber).each(function(){ + $(this).removeClass("locationEl"+domNumber).addClass("locationEl"+prop); + }); + $(".center"+domNumber).removeClass("center"+domNumber).addClass("center"+prop)/*.append(locCenter)*/; + } + } + if(typeof center != "undefined" && center) + dyFInputs.locationObj.setAsCenter(0); + } else{ + $(".locationBtn").html("<i class='fa fa-home'></i> "+tradDynForm["mainLocality"]); + //dyFInputs.locationObj.centerLocation = null; + } + + //$.each(function()) + //TODO check if this center then apply on first + //$(".locationEl"+dyFInputs.locationObj.countLocation).remove(); + + /*if(ix != 0){ + removeAddresses(ix-1, true); + } + else + removeAddress(true);*/ + + }, + setAsCenter : function (ix){ + + $(".centers").removeClass('btn-success'); + $(".lblcentre").remove(); + $.each(dyFInputs.locationObj.elementLocations,function(i, v) { + console.log(v); + if(typeof v.center != "undefined" && v.center) + delete v.center; + }) + $(".centers").removeClass('btn-success'); + $(".center"+ix).addClass('btn-success').append(" <span class='lblcentre'>addresse principale</span>"); + $(".center"+ix).parent().find(".removeLocalityBtn").attr("href","javascript:dyFInputs.locationObj.removeLocation("+ix+",true)"); + dyFInputs.locationObj.centerLocation = dyFInputs.locationObj.elementLocations[ix]; + dyFInputs.locationObj.elementLocations[ix].center = true; + } + }, + //produces + subDynForm : function(form, multi){ + + }, + inputUrl :function (label,placeholder,rules, custom) { + label = ( notEmpty(label) ? label : tradDynForm["mainurl"] ); + placeholder = ( notEmpty(placeholder) ? placeholder : "http://www.exemple.org" ); + rules = ( notEmpty(rules) ? rules : { url: true } ); + custom = ( notEmpty(custom) ? custom : "<div class='resultGetUrl resultGetUrl0 col-sm-12'></div>" ); + var inputObj = dyFInputs.inputText(label, placeholder, rules, custom); + return inputObj; + }, + inputUrlOptionnel :function (label, placeholder,rules, custom) { + var inputObj = dyFInputs.inputUrl(label, placeholder, rules, custom); + inputObj.init = function(){ + getMediaFromUrlContent("#url", ".resultGetUrl0",0); + $(".urltext").css("display","none"); + }; + return inputObj; + }, + urls : { + label : tradDynForm["freeinfourl"], + placeholder : tradDynForm["freeinfourl"]+" ...", + inputType : "array", + value : [], + init:function(){ + getMediaFromUrlContent(".addmultifield0", ".resultGetUrl0",1); + } + }, + videos : { + label : "Your media videos here", + placeholder : tradDynForm["sharevideourl"]+" ...", + inputType : "array", + value : [], + initOptions : {type:"video",labelAdd:"Add video link"}, + init:function(){ + getMediaFromUrlContent(".addmultifield0", ".resultGetUrl0",1, "video"); + } + }, + urlsOptionnel : { + inputType : "array", + placeholder : tradDynForm["urlandaddinfoandaction"], + value : [], + init:function(){ + getMediaFromUrlContent(".addmultifield0", ".resultGetUrl0",1); + $(".urlsarray").css("display","none"); + } + }, + keyVal : { + label : "Key Value Pairs", + inputType : "properties", + }, + bookmarkUrl: function(label, placeholder,rules, custom){ + var inputObj = dyFInputs.inputUrl(label, placeholder, rules, custom); + inputObj.init = function(){ + $("#ajaxFormModal #url").bind("input keyup",function(e) { + processUrl.refUrl($(this).val()); + /*if(result){ + console.log(result); + }*/ + }); + //$(".urltext").css("display","none"); + }; + return inputObj; + }, + checkboxSimple : function(checked, id, params){ + + var inputObj = { + label: params["labelText"], + params : params, + inputType : "checkboxSimple", + checked : checked, //$("#ajaxFormModal #"+id).val(), + init : function(){ + //var checked = $("#ajaxFormModal #"+id).val(); + console.log("checkcheck2", checked, "#ajaxFormModal #"+id); + var idTrue = "#ajaxFormModal ."+id+"checkboxSimple .btn-dyn-checkbox[data-checkval='true']"; + var idFalse = "#ajaxFormModal ."+id+"checkboxSimple .btn-dyn-checkbox[data-checkval='false']"; + console.log("checkcheck2", checked, "#ajaxFormModal #"+id); + $("#ajaxFormModal #"+id).val(checked); + + if(typeof params["labelInformation"] != "undefined") + $("#ajaxFormModal ."+id+"checkboxSimple label").append( + "<small class='col-md-12 col-xs-12 text-left no-padding' "+ + "style='font-weight: 200;'>"+ + params["labelInformation"]+ + "</small>"); + + if(checked == "true"){ + $(idTrue).addClass("bg-green-k").removeClass("letter-green"); + $("#ajaxFormModal ."+id+"checkboxSimple label").append( + "<span class='lbl-status-check margin-left-10'>"+ + '<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>'+ + "</span>"); + } + + if(checked == "false"){ + $(idFalse).addClass("bg-red").removeClass("letter-red"); + $("#ajaxFormModal ."+id+"checkboxSimple label").append( + "<span class='lbl-status-check margin-left-10'>"+ + '<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>'+ + "</span>"); + + setTimeout(function(){ + if(typeof params["inputId"] != "undefined") $(params["inputId"]).hide(400); + }, 1000); + } + + + $("#ajaxFormModal ."+id+"checkboxSimple .btn-dyn-checkbox").click(function(){ + var checkval = $(this).data('checkval'); + $("#ajaxFormModal #"+id).val(checkval); + console.log("EVENT CLICK ON CHECKSIMPLE", checkval); + + if(checkval) { + $(idTrue).addClass("bg-green-k").removeClass("letter-green"); + $(idFalse).removeClass("bg-red").addClass("letter-red"); + $("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html( + '<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>'); + + if(typeof params["inputId"] != "undefined") $(params["inputId"]).show(400); + } + else{ + $(idFalse).addClass("bg-red").removeClass("letter-red"); + $(idTrue).removeClass("bg-green-k").addClass("letter-green"); + $("#ajaxFormModal ."+id+"checkboxSimple .lbl-status-check").html( + '<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>'); + + if(typeof params["inputId"] != "undefined") $(params["inputId"]).hide(400); + } + }); + + } + }; + + return inputObj; + }, + + checkbox : function(checked, id, params){ + + var inputObj = { + label: params["labelText"], + inputType : "checkbox", + checked : ( notEmpty(checked) ? checked : "" ), + init : function(){ + + $("#ajaxFormModal #"+id).val(checked); + $("#ajaxFormModal ."+id+"checkbox label").append("<span class='lbl-status-check margin-left-10'></span>"); + if(typeof params["labelInformation"] != "undefined") + $("#ajaxFormModal ."+id+"checkbox").append("<small class='col-md-12 col-xs-12 text-left no-padding' style='margin-top:-10px;'>"+params["labelInformation"]+"</small>"); + + setTimeout(function(){ + $(".bootstrap-switch-label").off().click(function(){ + $(".bootstrap-switch-off").click(); + }); + + if (checked) { + $("#ajaxFormModal ."+id+"checkbox .lbl-status-check").html( + '<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>'); + $(params["inputId"]).show(400); + } else { + + $("#ajaxFormModal ."+id+"checkbox .lbl-status-check").html( + '<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>'); + $(params["inputId"]).hide(400); + } + }, 1000); + }, + "switch" : { + "onText" : params["onText"], + "offText" : params["offText"], + "labelText":params["labelInInput"], + "onChange" : function(){ + var checkbox = $("#ajaxFormModal #"+id).is(':checked'); + $("#ajaxFormModal #"+id).val($("#ajaxFormModal #"+id).is(':checked')); + console.log("on change checkbox",$("#ajaxFormModal #"+id).val()); + //$("#ajaxFormModal #"+id+"checkbox").append("<span class='lbl-status-check'></span>"); + if (checkbox) { + $("#ajaxFormModal ."+id+"checkbox .lbl-status-check").html( + '<span class="letter-green"><i class="fa fa-check-circle"></i> '+params["onLabel"]+'</span>'); + $(params["inputId"]).show(400); + /*if(id=="amendementActivated"){ + var am = $("#ajaxFormModal #voteActivated").val(); + console.log("am", am); + if(am == "true") + $("#ajaxFormModal .voteActivatedcheckbox .bootstrap-switch-handle-on").click(); + } + if(id=="voteActivated"){ + var am = $("#ajaxFormModal #amendementActivated").val(); + console.log("vote", am); + if(am == "true") + $("#ajaxFormModal .amendementActivatedcheckbox .bootstrap-switch-handle-on").click(); + }*/ + } else { + + $("#ajaxFormModal ."+id+"checkbox .lbl-status-check").html( + '<span class="letter-red"><i class="fa fa-minus-circle"></i> '+params["offLabel"]+'</span>'); + $(params["inputId"]).hide(400); + } + } + } + }; + return inputObj; + }, + allDay : function(checked, timepicker, domSpec){ + + var inputObj = { + inputType : "checkbox", + checked : ( notEmpty(checked) ? checked : "" ), + init : function(){ + $("#ajaxFormModal #allDay").off().on("switchChange.bootstrapSwitch",function (e, data) { + mylog.log("allDay dateLimit",$("#ajaxFormModal #allDay").val()); + }) + }, + "switch" : { + "onText" : tradDynForm["yes"], + "offText" : tradDynForm["no"], + "labelText":tradDynForm["allday"], + "onChange" : function(){ + domAdd=""; + if(typeof domSpec != "undefined" && notNull(domSpec)) + domAdd=domSpec; + var allDay = $("#ajaxFormModal #allDay"+domAdd).is(':checked'); + var startDate = ""; + var endDate = ""; + $("#ajaxFormModal #allDay"+domAdd).val($("#ajaxFormModal #allDay"+domAdd).is(':checked')); + + if (allDay) { + $(".dateTimeInput").addClass("dateInput"); + $(".dateTimeInput").removeClass("dateTimeInput"); + $('.dateInput').datetimepicker('destroy'); + $(".dateInput").datetimepicker({ + autoclose: true, + lang: "fr", + format: "d/m/Y", + timepicker:false + }); + startDate = moment($('#ajaxFormModal #startDate').val(), "DD/MM/YYYY HH:mm").format("DD/MM/YYYY"); + endDate = moment($('#ajaxFormModal #endDate').val(), "DD/MM/YYYY HH:mm").format("DD/MM/YYYY"); + } else { + $(".dateInput").addClass("dateTimeInput"); + $(".dateInput").removeClass("dateInput"); + $('.dateTimeInput').datetimepicker('destroy'); + $(".dateTimeInput").datetimepicker({ + weekStart: 1, + step: 15, + lang: 'fr', + format: 'd/m/Y H:i' + }); + + startDate = moment($('#ajaxFormModal #startDate').val(), "DD/MM/YYYY").format("DD/MM/YYYY HH:mm"); + endDate = moment($('#ajaxFormModal #endDate').val(), "DD/MM/YYYY").format("DD/MM/YYYY HH:mm"); + } + if (startDate != "Invalid date") $('#ajaxFormModal #startDate').val(startDate); + if (endDate != "Invalid date") $('#ajaxFormModal #endDate').val(endDate); + } + } + }; + return inputObj; + }, + openingHours : function(checked){ + var inputObj = { + inputType : "checkbox", + label : "Availabity of your service", + checked : ( notEmpty(checked) ? checked : "" ), + init : function(){ + //openingHoursResult=openingHours.init; + openingHoursResult=[ + {"dayOfWeek":"Su","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Mo","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Tu","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"We","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Th","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Fr","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + {"dayOfWeek":"Sa","allDay":true, "hours":[{"opens":"06:00","closes":"19:00"}]}, + ]; + //jQuery.datetimepicker.setLocale('fr'); + //$('.changeTime').datetimepicker({format:"HH:MM"}); + $(".btn-select-day").click(function(){ + key=$(this).data("key"); + if($(this).hasClass("active")){ + $(this).removeClass("active"); + $.each(openingHoursResult, function(e,v){ + if(v.dayOfWeek==key) + openingHoursResult[e].disabled=true; + }); + $("#contentDays"+key).fadeOut(); + }else{ + $(this).addClass("active"); + $.each(openingHoursResult, function(e,v){ + if(v.dayOfWeek==key) + delete openingHoursResult[e].disabled; + }); + $("#contentDays"+key).fadeIn(); + } + }); + $(".allDaysWeek").click(function(){ + keyRange=$(this).data("key"); + //alert(keyRange); + if($(this).is(':checked')){ + $("#hoursRange"+keyRange).fadeOut("slow"); + $.each(openingHoursResult, function(e,v){ + if(v.dayOfWeek==keyRange) + openingHoursResult[e].allDay=true; + }); + }else{ + $("#hoursRange"+keyRange).fadeIn("slow"); + $.each(openingHoursResult, function(e,v){ + if(v.dayOfWeek==keyRange) + openingHoursResult[e].allDay=false; + }); + } + }); + }, + options: {"allWeek" : true}, + "switch" : { + "onText" : tradDynForm["yes"], + "offText" : tradDynForm["no"], + "labelText":tradDynForm["allweek"], + "css":{"min-width": "300px","margin": "10px"}, + "onChange" : function(){ + var allWeek = $("#ajaxFormModal #openingHours").is(':checked'); + $("#ajaxFormModal #openingHours").val($("#ajaxFormModal #openingHours").is(':checked')); + if (allWeek) { + $("#ajaxFormModal #selectedDays").fadeOut("slow"); + } else { + $("#ajaxFormModal #selectedDays").fadeIn("slow"); + } + //if (startDate != "Invalid date") $('#ajaxFormModal #startDate').val(startDate); + //if (endDate != "Invalid date") $('#ajaxFormModal #endDate').val(endDate); + } + }, + }; + return inputObj; + }, + + startDateInput : function(typeDate){ + mylog.log('startDateInput', typeDate); + var inputObj = { + inputType : ( notEmpty(typeDate) ? typeDate : "datetime" ), + placeholder: tradDynForm.startDate, + label : tradDynForm.startDate, + rules : { + required : true, + duringDates: ["#startDateParent","#endDateParent",tradDynForm.thestartDate] + } + } + return inputObj; + }, + endDateInput : function(typeDate){ + var inputObj = { + inputType : ( notEmpty(typeDate) ? typeDate : "datetime" ), + placeholder: tradDynForm.endDate, + label : tradDynForm.endDate, + rules : { + required : true, + greaterThan: ["#ajaxFormModal #startDate",tradDynForm.thestartDate], + duringDates: ["#startDateParent","#endDateParent",tradDynForm.theendDate] + } + } + return inputObj; + }, + birthDate : { + inputType : "date", + label : tradDynForm.birthdate, + placeholder: tradDynForm.birthdate + }, + dateEnd :{ + inputType : "date", + label : tradDynForm.endDate, + placeholder : "Fin de la période de vote", + rules : { + required : true, + greaterThanNow : ["DD/MM/YYYY"] + } + }, + voteDateEnd :{ + inputType : "datetime", + label : tradDynForm.dateEndVoteSession, + placeholder : tradDynForm.dateEndVoteSession, + rules : { + required : true, + greaterThanNow : ["DD/MM/YYYY H:m"] + } + }, + amendementDateEnd :{ + inputType : "datetime", + label : tradDynForm.dateEndAmendementSessionStartVote, + placeholder : tradDynForm.dateEndAmendementSession, + rules : { + required : true, + greaterThanNow : ["DD/MM/YYYY H:m"] + } + }, + inviteSearch : { + inputType : "searchInvite", + init : function(){ + $("#ajaxFormModal #inviteSearch ").keyup(function(e){ + var search = $('#inviteSearch').val(); + if(search.length>2){ + clearTimeout(timeout); + timeout = setTimeout('autoCompleteInviteSearch("'+encodeURI(search)+'")', 500); + }else{ + $("#newInvite #dropdown_searchInvite").css({"display" : "none" }); + } + }); + } + }, + invitedUserEmail : { + placeholder : "Email", + inputType : "text", + rules : { + required : true + }, + init:function(){ + $(".invitedUserEmailtext").css("display","none"); + } + }, + inputHidden :function(value, rules) { + var inputObj = { inputType : "hidden"}; + if( notNull(value) ) inputObj.value = value ; + if( notNull(rules) ) inputObj.rules = rules ; + return inputObj; + }, + get:function(type){ + //mylog.log("dyFInputs.get", type); + if( type == "undefined" ){ + toastr.error("type can't be undefined"); + return null; + } + var obj = null; + if( jsonHelper.notNull("typeObj."+type)){ + if (jsonHelper.notNull("typeObj."+type+".sameAs") ){ + obj = typeObj[ typeObj[type].sameAs ]; + } else + obj = typeObj[type]; + obj.name = (trad[type]) ? trad[type] : type; + } + if( obj === null ){ + obj = dyFInputs.deepGet(type); + if( obj ) + obj = dyFInputs.get( obj.col ) + } + return obj; + }, + deepGet:function(type){ + //mylog.log("get", type); + var obj = null; + $.each( typeObj,function(k,o) { + if( o.subTypes && ( $.inArray( type, o.subTypes )>=0 ) ){ + obj = o; + return false; + } + }); + return obj; + } +}; + +var typeObj = { + themes:{ + dynForm : { + jsonSchema : { + title : "Theme Switcher ?", + icon : "question-cirecle-o", + noSubmitBtns : true, + properties : { + custom :{ + inputType : "custom", + html : function() { + return "<div class='menuSmallMenu'>"+js_templates.loop( [ + { label : "ph dori", classes:"bg-dark", icon:"fa-bullseye", action : "javascript:window.location.href = moduleId+'?theme=ph-dori'"}, + { label : "notragora", classes:"bg-grey", icon:"fa-video-camera ", action : "javascript:window.location.href = moduleId+'?theme=notragora'"}, + { label : "C02", classes:"bg-red", icon:"fa-search", action : "javascript:window.location.href = moduleId+'?theme=CO2'"}, + { label : "network", classes:"bg-orange", icon:"fa-bars", action : "javascript:window.location.href = moduleId+'?theme=network'"}, + + ], "col_Link_Label_Count", { classes : "bg-red kickerBtn", parentClass : "col-xs-12 col-sm-4 "} )+"</div>"; + } + } + } + } + } }, + addElement:{ + dynForm : { + jsonSchema : { + title : "Ajouter un élément ?", + icon : "question-cirecle-o", + noSubmitBtns : true, + properties : { + custom :{ + inputType : "custom", + html : function() { + return "<div class='menuSmallMenu'>"+js_templates.loop( [ + { label : "event", classes:"col-xs-12 text-bold bg-"+typeObj["event"].color, icon:"fa-"+typeObj["event"].icon, action : "javascript:dyFObj.openForm('event')"}, + { label : "organization", classes:"col-xs-12 text-bold bg-"+typeObj["organization"].color, icon:"fa-"+typeObj["organization"].icon, action : "javascript:dyFObj.openForm('organization')"}, + { label : "project", classes:"col-xs-12 text-bold bg-"+typeObj["project"].color, icon:"fa-"+typeObj["project"].icon, action : "javascript:dyFObj.openForm('project')"}, + { label : "poi", classes:"col-xs-12 text-bold bg-"+typeObj["poi"].color, icon:"fa-"+typeObj["poi"].icon, action : "javascript:dyFObj.openForm('poi')"}, + { label : "entry", classes:"col-xs-12 text-bold bg-"+typeObj["entry"].color, icon:"fa-"+typeObj["entry"].icon, action : "javascript:dyFObj.openForm('entry')"}, + { label : "action", classes:"col-xs-12 text-bold bg-"+typeObj["actions"].color, icon:"fa-"+typeObj["actions"].icon, action : "javascript:dyFObj.openForm('action')"}, + { label : "classified", classes:"col-xs-12 text-bold bg-"+typeObj["classified"].color, icon:"fa-"+typeObj["classified"].icon, action : "javascript:dyFObj.openForm('classified')"}, + { label : "Documentation", classes:"col-xs-12 text-white text-bold bg-red lbh", icon:"fa-book", action : "#default.view.page.index.dir.docs"}, + { label : "Signaler un bug", classes:"col-xs-12 text-white text-bold bg-red lbh", icon:"fa-bug", action : "#news.index.type.pixels"}, + ], "col_Link_Label_Count", { classes : "bg-red kickerBtn", parentClass : "col-xs-12 col-sm-6 "} )+"</div>"; + } + } + } + } + } }, + addPhoto:{ titleClass : "bg-dark", color : "bg-dark" }, + addFile:{ titleClass : "bg-dark", color : "bg-dark" }, + person : { col : "citoyens" ,ctrl : "person",titleClass : "bg-yellow",bgClass : "bgPerson",color:"yellow",icon:"user",lbh : "#person.invite", }, + persons : { sameAs:"person" }, + people : { sameAs:"person" }, + citoyen : { sameAs:"person" }, + citoyens : { sameAs:"person" }, + + poi:{ col:"poi",ctrl:"poi",color:"green-poi", titleClass : "bg-green-poi", icon:"map-marker", + subTypes:["link" ,"tool","machine","software","rh","RessourceMaterielle","RessourceFinanciere", + "ficheBlanche","geoJson","compostPickup","video","sharedLibrary","artPiece","recoveryCenter", + "trash","history","something2See","funPlace","place","streetArts","openScene","stand","parking","other" ] }, + place:{ col:"place",ctrl:"place",color:"green",icon:"map-marker"}, + TiersLieux : {sameAs:"place",color: "azure",icon: "home"}, + Maison : {sameAs:"place", color: "azure",icon: "home"}, + ressource:{ col:"ressource",ctrl:"ressource",color:"purple",icon:"cube" }, + + siteurl:{ col:"siteurl",ctrl:"siteurl"}, + organization : { col:"organizations", ctrl:"organization", icon : "group",titleClass : "bg-green",color:"green",bgClass : "bgOrga"}, + organizations : {sameAs:"organization"}, + LocalBusiness : {col:"organizations",color: "azure",icon: "industry"}, + NGO : {sameAs:"organization", color:"green", icon:"users"}, + Association : {sameAs:"organization", color:"green", icon: "group"}, + GovernmentOrganization : {col:"organization", color: "red",icon: "university"}, + Group : { col:"organizations",color: "turq",icon: "circle-o"}, + event : {col:"events",ctrl:"event",icon : "calendar",titleClass : "bg-orange",color:"orange",bgClass : "bgEvent"}, + events : {sameAs:"event"}, + project : {col:"projects",ctrl:"project", icon : "lightbulb-o",color : "purple",titleClass : "bg-purple", bgClass : "bgProject"}, + projects : {sameAs:"project"}, + city : {sameAs:"cities"}, + cities : {col:"cities",ctrl:"city", titleClass : "bg-red", icon : "university",color:"red"}, + + entry : { col:"surveys", ctrl:"survey", titleClass : "bg-dark",bgClass : "bgDDA", icon : "gavel", color : "azure", + saveUrl : baseUrl+"/" + moduleId + "/survey/saveSession"}, + vote : {col:"actionRooms",ctrl:"survey"}, + survey : {col:"actionRooms",ctrl:"entry",color:"lightblue2",icon:"cog"}, + surveys : {sameAs:"survey"}, + proposal : { col:"proposals", ctrl:"proposal",color:"dark",icon:"hashtag", titleClass : "bg-turq" }, + proposals : { sameAs : "proposal" }, + action : {col:"actions", ctrl:"action", titleClass : "bg-turq", bgClass : "bgDDA", icon : "cogs", color : "dark" }, + actions : { sameAs : "action" }, + actionRooms : {sameAs:"room"}, + rooms : {sameAs:"room"}, + room : {col:"rooms",ctrl:"room",color:"azure",icon:"connectdevelop",titleClass : "bg-turq"}, + discuss : {col:"actionRooms",ctrl:"room"}, + + contactPoint : {col : "contact" , ctrl : "person",titleClass : "bg-blue",bgClass : "bgPerson",color:"blue",icon:"user", + saveUrl : baseUrl+"/" + moduleId + "/element/saveContact"}, + product:{ col:"products",ctrl:"product", titleClass : "bg-orange", color:"orange", icon:"shopping-basket"}, + products : {sameAs:"product"}, + service:{ col:"services",ctrl:"service", titleClass : "bg-green", color:"green", icon:"sun-o"}, + services : {sameAs:"service"}, + circuit:{ col:"circuits",ctrl:"circuit", titleClass : "bg-orange", color:"green", icon:"ravelry"}, + circuits : {sameAs:"circuit"}, + classified:{ col:"classified",ctrl:"classified", titleClass : "bg-azure", color:"azure", icon:"bullhorn", + subTypes : [ + //FR + "Technologie","Immobilier","Véhicules","Maison","Loisirs","Mode", + //EN + "Technology","Property","Vehicles","Home","Leisure","Fashion" + ] }, + url : {col : "url" , ctrl : "url",titleClass : "bg-blue",bgClass : "bgPerson",color:"blue",icon:"user",saveUrl : baseUrl+"/" + moduleId + "/element/saveurl", }, + bookmark : {col : "bookmarks" , ctrl : "bookmark",titleClass : "bg-dark",bgClass : "bgPerson",color:"blue",icon:"bookmark"}, + document : {col : "document" , ctrl : "document",titleClass : "bg-dark",bgClass : "bgPerson",color:"dark",icon:"upload",saveUrl : baseUrl+"/" + moduleId + "/element/savedocument", }, + default : {icon:"arrow-circle-right",color:"dark"}, + //"video" : {icon:"video-camera",color:"dark"}, + formContact : { titleClass : "bg-yellow",bgClass : "bgPerson",color:"yellow",icon:"user", saveUrl : baseUrl+"/"+moduleId+"/app/sendmailformcontact"}, + news : { col : "news" }, + config : { col:"config",color:"azure",icon:"cogs",titleClass : "bg-azure", title : tradDynForm.addconfig, + sections : { + network : { label: "Network Config",key:"network",icon:"map-marker"} + }}, + network : { col:"network",color:"azure",icon:"connectdevelop",titleClass : "bg-turq"}, + inputs : { color:"red",icon:"address-card-o",titleClass : "bg-phink", title : "All inputs"}, + addAny : { color:"pink",icon:"plus",titleClass : "bg-phink",title : tradDynForm.wantToAddSomething, + sections : { + person : { label: trad["Invite your contacts"],key:"person",icon:"user"}, + organization : { label: trad.organization,key:"organization",icon:"group"}, + event : { label: trad.event,key:"event",icon:"calendar"}, + project : { label: trad.project ,key:"project",icon:"lightbulb-o"}, + }}, + apps : { color:"pink",icon:"cubes",titleClass : "bg-phink",title : tradDynForm.appList, + sections : { + search : { label: "SEARCH",key:"#search",icon:"search fa-2x text-red"}, + agenda : { label: "AGENDA",key:"#agenda",icon:"group fa-2x text-red"}, + news : { label: "NEWS",key:"#news",icon:"newspaper-o fa-2x text-red"}, + classifieds : { label: "ANNONCEs",key:"#classifieds",icon:"bullhorn fa-2x text-red"}, + dda : { label: "DISCUSS DECIDE ACT" ,key:"#dda",icon:"gavel fa-2x text-red"}, + chat : { label: "CHAT" ,key:"#chat",icon:"comments fa-2x text-red"}, + }}, + filter : { color:"azure",icon:"list",titleClass : "bg-turq",title : "Nouveau Filtre"} +}; + +var documents = { + objFile:{ + "pdf":{icon:"file-pdf-o",class:"text-red"}, + "text":{icon:"file-text-o",class:"text-blue"}, + "presentation":{icon:"file-powerpoint-o",class:"text-orange"}, + "spreadsheet":{icon:"file-excel-o",class:"text-green"} + }, + getIcon : function(contentKey){ + return '<i class="fa fa-'+documents.objFile[contentKey].icon+' '+documents.objFile[contentKey].class+'"></i>'; + }, + saveImages : function (contextType, contextId,contentKey){ + //alert("saveImages"+contextType+contextId); + $.ajax({ + url : baseUrl+"/"+moduleId+"/document/"+uploadUrl+"dir/"+moduleId+"/folder/"+contextType+"/ownerId/"+contextId+"/input/dynform", + type: "POST", + data: new FormData(this), + contentType: false, + cache: false, + processData: false, + dataType: "json", + success: function(data){ + if(debug)mylog.log(data); + if( data.success ){ + mylog.log("success"); + imageName = data.name; + var doc = { + "id":contextId, + "type":contextType, + "folder":contextType+"/"+contextId, + "moduleId":moduleId, + "author" : userId , + "name" : data.name , + "date" : new Date() , + "size" : data.size , + "doctype" : docType, + "contentKey" : contentKey + }; + mylog.log(doc); + path = "/"+data.dir+data.name; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/document/save", + data: doc, + dataType: "json" + }).done( function(data){ + if(data.result){ + toastr.success(data.msg); + //setTimeout(function(){ + $(".imagesNews").last().val(data.id.$id); + $(".imagesNews").last().attr("name",""); + $(".newImageAlbum").last().find("img").removeClass("grayscale"); + $(".newImageAlbum").last().find("i").remove(); + $(".newImageAlbum").last().append("<a href='javascript:;' onclick='deleteImage(\""+data.id.$id+"\",\""+data.name+"\")'><i class='fa fa-times fa-x padding-5 text-white removeImage' id='deleteImg"+data.id.$id+"'></i></a>"); + //},200); + + } else{ + toastr.error(data.msg); + if($("#resultsImage img").length>1) + $(".newImageAlbum").last().remove(); + else{ + $("#resultsImage").empty(); + $("#resultsImage").hide(); + } + } + $("#addImage").off(); + }); + } + else{ + if($("#resultsImage img").length>1) + $(".newImageAlbum").last().remove(); + else{ + $("#resultsImage").empty(); + $("#resultsImage").hide(); + } + $("#addImage").off(); + toastr.error(data.msg); + } + }, + }); + } +} +/* ************************************ +Keyboard Shortcuts +*************************************** */ +var keyboardNav = { + keycodeObj : {"backspace":8,"tab":9,"enter":13,"shift":16,"ctrl":17,"alt":18,"pause/break":19,"capslock":20,"escape":27,"pageup":33,"pagedown":34,"end":35, + "home":36,"left":37,"up":38,"right":39,"down":40,"insert":45,"delete":46,"0":48,"1":49,"2":50,"3":51,"4":52,"5":53,"6":54,"7":55,"8":56,"9":57, + "a":65,"b":66,"c":67,"d":68,"e":69,"f":70,"g":71,"h":72,"i":73,"j":74,"k":75,"l":76,"m":77,"n":78,"o":79,"p":80,"q":81,"r":82,"s":83,"t":84,"u":85,"v":86,"w":87, + "x":88,"y":89,"z":90,"left window key":91,"right window key":92,"select key":93,"numpad 0":96,"numpad 1":97,"numpad 2":98,"numpad 3":99,"numpad 4":100,"numpad 5":101, + "numpad 6":102,"numpad 7":103,"numpad 8":104,"numpad 9":105,"multiply":106,"add":107,"subtract":109,"decimal point":110,"divide":111,"f1":112,"f2":113,"f3":114, + "f4":115,"f5":116,"f6":117,"f7":118,"f8":119,"f9":120,"f10":121,"f11":122,"f12":123,"num lock":144,"scroll lock":145,"semi-colon":186,"equal sign":187, + "comma":188,"dash":189,"period":190,"forward slash":191,"grave accent":192,"open bracket":219,"back slash":220,"close braket":221,"single quote":222}, + + keyMap : { + //"112" : function(){ $('#modalMainMenu').modal("show"); },//f1 + "113" : function(){ if(userId)urlCtrl.loadByHash('#person.detail.id.'+userId); else alert("login first"); },//f2 + "114" : function(){ $('#openModal').modal('hide'); showMap(true); },//f3 + //"115" : function(){ dyFObj.openForm('themes') },//f4 + "117" : function(){ console.clear();urlCtrl.loadByHash(location.hash) },//f6 + }, + keyMapCombo : { + "13" : function(){$('#openModal').modal('hide');$('#selectCreate').modal('show');//dyFObj.openForm('addElement') + },//enter : add elements + "61" : function(){$('#openModal').modal('hide');$('#selectCreate').modal('show')},//= : add elements + "65" : function(){$('#openModal').modal('hide');dyFObj.openForm('action')},//a : actions + "66" : function(){$('#openModal').modal('hide'); smallMenu.destination = "#openModal"; smallMenu.openAjax(baseUrl+'/'+moduleId+'/collections/list','Mes Favoris','fa-star','yellow') },//b best : favoris + "67" : function(){$('#openModal').modal('hide');dyFObj.openForm('classified')},//c : classified + "69" : function(){$('#openModal').modal('hide');dyFObj.openForm('event')}, //e : event + "70" : function(){$('#openModal').modal('hide'); $(".searchIcon").trigger("click") },//f : find + "72" : function(){ smallMenu.openAjaxHTML(baseUrl+'/'+moduleId+'/default/view/page/help') },//h : help + "73" : function(){$('#openModal').modal('hide');dyFObj.openForm('person')},//i : invite + "76" : function(){ smallMenu.openAjaxHTML(baseUrl+'/'+moduleId+'/default/view/page/links')},//l : links and infos + "79" : function(){$('#openModal').modal('hide');dyFObj.openForm('organization')},//o : orga + "80" : function(){$('#openModal').modal('hide');dyFObj.openForm('project')},//p : project + "82" : function(){$('#openModal').modal('hide');smallMenu.openAjax(baseUrl+'/'+moduleId+'/person/directory?tpl=json','Mon répertoire','fa-book','red')},//r : annuaire + "86" : function(){$('#openModal').modal('hide');dyFObj.openForm('entry')},//v : votes + }, + checkKeycode : function(e) { + e.preventDefault(); + var keycode; + if (window.event) {keycode = window.event.keyCode;e=event;} + else if (e){ keycode = e.which;} + //console.log("keycode: ",keycode); + + if(e.ctrlKey && e.altKey && keyboardNav.keyMapCombo[keycode] ){ + console.warn("keyMapCombo",keycode);//shiftKey ctrlKey altKey + keyboardNav.keyMapCombo[keycode](); + } + else if( keyboardNav.keyMap[keycode] ){ + console.warn("keyMap",keycode); + keyboardNav.keyMap[keycode](); + } + } +} + +//********************************************************************************* +// Utility for events date +//********************************************************************************* +function manageTimestampOnDate() { + $.each($(".date2format"), function(k, v) { + var dates = ""; + var dateFormat = "DD-MM-YYYY HH:mm"; + if ($(this).data("allday") == true) { + dateFormat = "DD-MM-YYYY"; + } + dates = moment($(this).data("startdate")).local().format(dateFormat); + dates += "</br>"+moment($(this).data("enddate")).local().format(dateFormat); + $(this).html(dates); + }) +} + +//Display event start and end date depending on allDay params +//Used on popup and right list on map +function displayStartAndEndDate(event) { + var content = ""; + //si on a bien les dates + mylog.log("event map", event); + if("undefined" != typeof event['startDateDB'] && "undefined" != typeof event['endDateDB']){ + //var start = dateToStr(data['startDate'], "fr", true); + //var end = dateToStr(data['endDate'], "fr", true); + + var startDateMoment = moment(event['startDateDB']).local(); + var endDateMoment = moment(event['endDateDB']).local(); + + var startDate = startDateMoment.format("DD-MM-YYYY"); + var endDate = endDateMoment.format("DD-MM-YYYY"); + + var hour1 = "Toute la journée"; + var hour2 = "Toute la journée"; + if(event["allDay"] == false || event["allDay"] == null) { + hour1 = startDateMoment.format("HH:mm"); + hour2 = endDateMoment.format("HH:mm"); + } + //si la date de debut == la date de fin + if( startDate == endDate) { + content += "<div class='info_item startDate_item_map_list double'><i class='fa fa-caret-right'></i> Le " + startDate; + + if(event["allDay"] == true) { + content += "</br><i class='fa fa-caret-right'></i> " + hour1; + } else { + content += "</br><i class='fa fa-caret-right'></i> " + hour1 + " - " + hour2; + } + content += "</div>"; + } else { + content += "<div class='info_item startDate_item_map_list double'><i class='fa fa-caret-right'></i> Du " + + startDate + " - " + hour1 + + "</div>" + + "<div class='info_item startDate_item_map_list double'><i class='fa fa-caret-right'></i> Au " + + endDate + " - " + hour2 + + "</div></br>"; + } + } + return content; +} + +//********************************************************************************* +// JS Template +//********************************************************************************* +var js_templates = { + objectify : function(obj) + { + var tplObj = { label : obj.label }; + tplObj.lblCount = (notNull(obj.labelCount)) ? ' <span class="labelCount">('+obj.labelCount+')</span>' : ''; + tplObj.action = (notNull(obj.action)) ? obj.action : 'javascript:smallMenu.openAjax(\''+baseUrl+'/'+moduleId+'/collections/list/col/'+obj.label+'\',\''+obj.label+'\',\'fa-folder-open\',\'yellow\'})'; + tplObj.icon = (notNull(obj.icon)) ? obj.icon : "fa-question-circle-o"; + tplObj.classes = (notNull(obj.classes)) ? obj.classes : ""; + tplObj.parentClass = (notNull(obj.parentClass)) ? obj.parentClass : ""; + tplObj.key = (notNull(obj.key)) ? ' data-key="'+obj.key+'"' : ""; + tplObj.color = (notNull(obj.color)) ? obj.color : "white"; + tplObj.tooltip = (notNull(obj.tooltip)) ? 'data-toggle="tooltip" data-placement="left" title="'+tooltip+'"' : ""; + return tplObj; + }, + + //params : + //obj : + //classes :: applies a class on each rendered element + //open / close :: is a globale container + //el_open/el_close :: is a container for each element of the list rendering + loop : function(obj,tpl,tplparams) + { + var str = (notNull(tplparams) && notNull(tplparams.open)) ? tplparams.open : ""; + var cleanup = false; + $.each(obj ,function(k,v){ + if( !notNull( v.classes ) && notNull(tplparams) && notNull( tplparams.classes )){ + v.classes = tplparams.classes; + cleanup = true; + } + if( !notNull( v.parentClass ) && notNull(tplparams) && notNull( tplparams.parentClass )) + v.parentClass = tplparams.parentClass; + var opener = (notNull(tplparams) && notNull(tplparams.el_open)) ? tplparams.el_open : ""; + str += opener+js_templates[tpl]( v ); + if(notNull(tplparams) && notNull(tplparams.el_close)) str += tplparams.el_close; + if(cleanup) + delete v.classes; + }); + if(notNull(tplparams) && notNull(tplparams.close)) str += tplparams.close; + return str; + }, + + col_Link_Label_Count : function(obj) + { + var tplObj = js_templates.objectify(obj); + return ' <div class="'+tplObj.parentClass+' center padding-5 ">'+ + '<a href="'+tplObj.action+'" '+ + 'class="'+tplObj.classes+' btn tooltips text-'+tplObj.color+'" '+tplObj.tooltip+' '+tplObj.key+'>'+ + '<i class="fa '+tplObj.icon+' text-'+tplObj.color+'"></i> '+ + '<br/>'+tplObj.label+tplObj.lblCount+ + '</a>'+ + '</div>' + }, + + linkList : function (obj) + { + var tplObj = js_templates.objectify(obj); + mylog.log("classes",tplObj.classes); + return '<a href="'+tplObj.action+'" class="'+tplObj.classes+' btn btn-xs btn-link text-white text-left w100p" '+tplObj.key+'><i class="fa '+tplObj.icon+' text-'+tplObj.color+'"></i> '+tplObj.label+tplObj.lblCount+'</a><br/>'; + }, + + leftMenu_content : function(params) + { + //left menu section + var str = '<div class="menuSmallMenu"><div class="menuSmallLeftMenu col-sm-3 col-xs-12 center margin-top-15 margin-bottom-5">'; + str += js_templates.loop( params.menu,"linkList",{ classes : "padding-5 bg-dark center col-xs-12 ", el_open:'<div class="col-xs-12 center no-padding">', el_close:'</div>'} ); + str += '</div>'+ + //right content section + '<div class="col-sm-9 col-xs-12 no-padding">'; + + str += "<div class='homestead titleSmallMenu' style='font-size:45px'> "+ + params.title1+' <i class="fa fa-angle-right"></i> '+params.title2+"</div>"; + + str += js_templates.loop( params.list,"col_Link_Label_Count", { classes : "bg-red kickerBtn", parentClass : "col-xs-12 col-sm-4 "} ); + str += '</div></div>'; + return str; + }, + + album : function (obj) + { + isDoc = (obj.name.toLowerCase().indexOf(".pdf")>0) ? true : false; + target = (isDoc) ? " target='_blanck'" : ""; + str = ' <div class="col-xs-3 portfolio-item" id="'+obj.id+'">'+ + ' <a class="thumb-info pull-left '+obj.classes+'" '+target+' href="'+obj.path+'/'+obj.name+'" data-lightbox="all">'; + + if( isDoc ) + str += '<i class="fa fa-file-text-o fa-x5"></i>'; + else + str += ' <img src="'+obj.path+'/medium/'+obj.name+'" class="img-responsive" alt="'+obj.name+'">'; + + str += ' </a>'+ + ( ( notNull(userId) && obj.author == userId) ? ' <br/><a class="btnRemove" href="javascript:;" data-id="'+obj.id+'" data-key="" data-name="'+obj.name+'" ><i class="fa text-red fa-trash"></i> </a>' : '')+ + '</div>' ; + return str; + + } + + }; + +//********************************************************************************* +// smallMenu Photo Albums +//********************************************************************************* +var album = { + show : function (id,type){ + uploadObj.set(type,id); + getAjax( null , baseUrl+'/'+moduleId+"/document/list/id/"+id+"/type/"+type+"/tpl/json" , function( data ) { + + console.dir(data); + smallMenu.build( + data.list , + function( params ){ + str = '<style>.thumb-info{height:200px; overflow: hidden; position: relative; } .thumb-info img{}</style><a class="pull-left btn bg-red addPhotoBtn" data-type="'+type+'" data-id="'+id+'" href="javascript:;"> Ajouter des Photos <i class="fa fa-plus"></i></a>'+ + "<div class='homestead titleSmallMenu' style='font-size:35px'> Album <i class='fa fa-angle-right'></i> "+data.element.name+" </div><br/>"+ + js_templates.loop( params, "album" ); + return str; + }, + function(){ + $(".addPhotoBtn").click(function() { + uploadObj.set(type,id); + dyFObj.openForm("addPhoto"); + }); + album.delete(); + }); + }); + }, + delete : function(){ + $(".portfolio-item .btnRemove").off().on("click", function(e){ + e.preventDefault(); + var imageId = $(this).data("id"); + var params = { + "parentId": uploadObj.id, + "parentType": uploadObj.type, + "docId" : imageId}; + console.dir(params); + bootbox.confirm( trad.areyousuretodelete+"<span class='text-red'> "+$(this).data("name")+"</span> ?", + function(result) { + if(result){ + $.ajax({ + url: baseUrl+"/"+moduleId+"/document/delete/dir/"+moduleId+"/type/"+uploadObj.type+"/parentId/"+uploadObj.id, + type: "POST", + dataType : "json", + data: params, + success: function(data){ + if(data.result){ + toastr.success(data.msg); + $("#"+imageId).remove(); + }else{ + toastr.error(data.error) + } + } + }) + } + }) + }) + } +} + +var CoAllReadyLoad = false; +var CoSigAllReadyLoad = false; +//back sert juste a differencier un load avec le back btn +//ne sert plus, juste a savoir d'ou vient drait l'appel + +function KScrollTo(target){ + mylog.log("KScrollTo target", target); + if($(target).length>=1){ + $('html, body').stop().animate({ + scrollTop: $(target).offset().top - 60 + }, 500, ''); + } +} + +var timerCloseDropdownUser = false; +function initKInterface(params){ console.log("initKInterface"); + + $(window).off(); + + $(window).resize(function(){ + resizeInterface(); + }); + resizeInterface(); + + //jQuery for page scrolling feature - requires jQuery Easing plugin + $('.page-scroll a').bind('click', function(event) { + var $anchor = $(this); + $('html, body').stop().animate({ + scrollTop: ($($anchor.attr('href')).offset().top - 50) + }, 1250, 'easeInOutExpo'); + event.preventDefault(); + }); + + // jQuery for page scrolling feature - requires jQuery Easing plugin + $('.btn-scroll').bind('click', function(event) { + var target = $(this).data('targetid'); + KScrollTo(target); + event.preventDefault(); + }); + + // Highlight the top nav as scrolling occurs + $('body').scrollspy({ + target: '.navbar-fixed-top', + offset: 51 + }); + + // Closes the Responsive Menu on Menu Item Click + $('.navbar-collapse ul li a').click(function(){ + $('.navbar-toggle:visible').click(); + }); + + $(".openModalSelectCreate").click(function(){ + $("#selectCreate").modal("show"); + showFloopDrawer(false); + showNotif(false); + }); + + $(".btn-open-floopdrawer").click(function(){ + showNotif(false); + $("#dropdown-user").removeClass("open"); + showFloopDrawer(true); + }); + $("#floopDrawerDirectory").mouseleave(function(){ + showFloopDrawer(false); + }); + + + $(".btn-show-mainmenu").click(function(){ + showFloopDrawer(false); + showNotif(false); + $("#dropdown-user").addClass("open"); + //clearTimeout(timerCloseDropdownUser); + }); + + $("#dropdown-user").mouseleave(function(){ //alert("dropdown-user mouseleave"); + $("#dropdown-user").removeClass("open"); + }); + + $("header .container").mouseenter(function(){ + $("#dropdown-user").removeClass("open"); + }); + + + $(".logout").click(function(){ + window.location.href=baseUrl+"/co2/person/logout"; + }); + + $("#btn-sethome").click(function(){ + urlCtrl.loadByHash("#info.p.sethome") + }); + $("#btn-apropos").click(function(){ + urlCtrl.loadByHash("#info.p.apropos") + }); + + var affixTop = 300; + if(notEmpty(params)){ + if(typeof params["affixTop"] != "undefined") affixTop = params["affixTop"]; + } + console.log("affixTop", affixTop); + if(affixTop > 0){ + // Offset for Main Navigation + $('#mainNav').affix({ + offset: { + top: affixTop + } + }); + } + + // Floating label headings for the contact form + $(function() { + $("body").on("input propertychange", ".floating-label-form-group", function(e) { + $(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val()); + }).on("focus", ".floating-label-form-group", function() { + $(this).addClass("floating-label-form-group-with-focus"); + }).on("blur", ".floating-label-form-group", function() { + $(this).removeClass("floating-label-form-group-with-focus"); + }); + }); + + + $(".btn-show-map").off().click(function(){ + if(typeof formInMap != "undefined" && formInMap.actived == true) + formInMap.cancel(true); + //else if(isMapEnd == false && notEmpty(contextData) && location.hash.indexOf("#page.type."+contextData.type+"."+contextData.id)) + // getContextDataLinks(); + else{ + + if(isMapEnd == false && contextData && contextData.map && location.hash.indexOf("#page.type."+contextData.type+"."+contextData.id) ) + Sig.showMapElements(Sig.map, contextData.map.data, contextData.map.icon, contextData.map.title); + + showMap(); + } + }); + + bindLBHLinks(); + initSearchInterface(); + + $(".tooltips").tooltip(); + + //sur mobile la carto est désactivée car non fonctionnelle pour le moment + //(pb pour manipuler la carte open/close etc) + // if($("#mainNav .btn-show-map").css("display") != "none"){ + // setTimeout(function(){ + // mapBg = Sig.loadMap("mapCanvas", initSigParams); + // Sig.showIcoLoading(false); + // CoSigAllReadyLoad = true; + // }, 3000); + // } + + KScrollTo(".main-container"); + +} + +function getContextDataLinks(){ + mylog.log("getContextDataLinks"); + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+"/element/getalllinks/type/"+contextData.type+"/id/"+contextData.id, + dataType: "json", + success: function(data){ + mylog.log("getContextDataLinks data", data); + Sig.restartMap(); + if(notNull(contextData)){ + contextData.map = { + data : data, + icon : "link", + title : trad.thecommunityof+" <b>"+contextData.name+"</b>" + } ; + Sig.showMapElements(Sig.map, data, "link", trad.thecommunityof+" <b>"+contextData.name+"</b>"); + } + + //showMap(); + }, + error: function (error) { + mylog.log("getContextDataLinks error findGeoposByInsee", error); + Sig.restartMap(); + callbackFindByInseeError(error); + //showMap(); + } + + }); +} + +function test(params, itemType){ + var typeIco = i; + params.size = size; + params.id = getObjectId(params); + params.name = notEmpty(params.name) ? params.name : ""; + params.description = notEmpty(params.shortDescription) ? params.shortDescription : + (notEmpty(params.message)) ? params.message : + (notEmpty(params.description)) ? params.description : + ""; + + //mapElements.push(params); + //alert("TYPE ----------- "+contentType+":"+params.name); + + if(typeof( typeObj[itemType] ) == "undefined") + itemType="poi"; + typeIco = itemType; + if(directory.dirLog) mylog.warn("itemType",itemType,"typeIco",typeIco); + if(typeof params.typeOrga != "undefined") + typeIco = params.typeOrga; + + var obj = (dyFInputs.get(typeIco)) ? dyFInputs.get(typeIco) : typeObj["default"] ; + params.ico = "fa-"+obj.icon; + params.color = obj.color; + if(params.parentType){ + if(directory.dirLog) mylog.log("params.parentType",params.parentType); + var parentObj = (dyFInputs.get(params.parentType)) ? dyFInputs.get(params.parentType) : typeObj["default"] ; + params.parentIcon = "fa-"+parentObj.icon; + params.parentColor = parentObj.color; + } + if(params.type == "classified" && typeof params.category != "undefined"){ + params.ico = typeof classified.filters[params.category] != "undefined" ? + "fa-" + classified.filters[params.category]["icon"] : ""; + } + + params.htmlIco ="<i class='fa "+ params.ico +" fa-2x bg-"+params.color+"'></i>"; + + // var urlImg = "/upload/communecter/color.jpg"; + // params.profilImageUrl = urlImg; + params.useMinSize = typeof size != "undefined" && size == "min"; + params.imgProfil = ""; + if(!params.useMinSize) + params.imgProfil = "<i class='fa fa-image fa-2x'></i>"; + + if("undefined" != typeof params.profilMediumImageUrl && params.profilMediumImageUrl != "") + params.imgProfil= "<img class='img-responsive' src='"+baseUrl+params.profilMediumImageUrl+"'/>"; + + if(dyFInputs.get(itemType) && + dyFInputs.get(itemType).col == "poi" && + typeof params.medias != "undefined" && typeof params.medias[0].content.image != "undefined") + params.imgProfil= "<img class='img-responsive' src='"+params.medias[0].content.image+"'/>"; + + params.insee = params.insee ? params.insee : ""; + params.postalCode = "", params.city="",params.cityName=""; + if (params.address != null) { + params.city = params.address.addressLocality; + params.postalCode = params.cp ? params.cp : params.address.postalCode ? params.address.postalCode : ""; + params.cityName = params.address.addressLocality ? params.address.addressLocality : ""; + } + params.fullLocality = params.postalCode + " " + params.cityName; + + params.type = dyFInputs.get(itemType).col; + params.urlParent = (notEmpty(params.parentType) && notEmpty(params.parentId)) ? + '#page.type.'+params.parentType+'.id.' + params.parentId : ""; + + //params.url = '#page.type.'+params.type+'.id.' + params.id; + params.hash = '#page.type.'+params.type+'.id.' + params.id; + /* if(params.type == "poi") + params.hash = '#element.detail.type.poi.id.' + id; + + params.onclick = 'urlCtrl.loadByHash("' + params.hash + '");';*/ + + params.elTagsList = ""; + var thisTags = ""; + if(typeof params.tags != "undefined" && params.tags != null){ + $.each(params.tags, function(key, value){ + if(typeof value != "undefined" && value != "" && value != "undefined"){ + thisTags += "<span class='badge bg-transparent text-red btn-tag tag' data-tag-value='"+slugify(value)+"'>#" + value + "</span> "; + params.elTagsList += slugify(value)+" "; + } + }); + params.tagsLbl = thisTags; + }else{ + params.tagsLbl = ""; + } + + params.updated = notEmpty(params.updatedLbl) ? params.updatedLbl : null; +} + +$(document).ready(function() { + setTimeout( function () { checkPoll() }, 10000); + document.onkeyup = keyboardNav.checkKeycode; + if(notNull(userId) && userId!="") + bindRightClicks(); +}); \ No newline at end of file diff --git a/assets/js/cooperation/uiCoop.js b/assets/js/cooperation/uiCoop.js new file mode 100644 index 0000000000000000000000000000000000000000..cbde7e71fcecd3f60fe762172663c4bc90c8a473 --- /dev/null +++ b/assets/js/cooperation/uiCoop.js @@ -0,0 +1,626 @@ +/* uiCoop is use for all function relative to UI for Cooperation Spaces (DDA) */ +var uiCoop = { + "startUI" : function(loadData=true){ + console.log("startUICOOP"); + //$("#menu-left-container").hide(); + //$("#div-reopen-menu-left-container").removeClass("hidden"); + $("#main-coop-container").html(""); + + $("#btn-close-coop").click(function(){ + if(contextData.slug != "undefined") + location.hash="#"+contextData.slug; + $("#coop-data-container").html(""); + }); + //KScrollTo("#div-reopen-menu-left-container"); + + //toogleNotif(false); + + $("a.title-section").off().click(function(){ + if($(this).hasClass("open")){ + $("#menuCoop .sub-"+$(this).data("key")).addClass("hidden"); + $(this).removeClass("open"); + $(this).find(".fa-caret-down").removeClass("fa-caret-down").addClass("fa-caret-right"); + }else{ + $("#menuCoop .sub-"+$(this).data("key")).removeClass("hidden"); + $(this).addClass("open"); + $(this).find(".fa-caret-right").removeClass("fa-caret-right").addClass("fa-caret-down"); + } + }); + + uiCoop.initBtnLoadData(); + + uiCoop.getCoopData(contextData.type, contextData.id, "menucoop"); + + if(loadData){ + uiCoop.getCoopData(contextData.type, contextData.id, "proposal"); + } + }, + + "closeUI" : function(reloadStream){ + + }, + + "initBtnLoadData" : function(){ + //alert('initBtnLoadData'); + $(".load-coop-data").off().click(function(){ + var type = $(this).data("type"); + + if(type == "locked"){ + toastr.info("Vous n'avez pas accès à cet espace"); + return; + } + + $("#menu-room .load-coop-data").removeClass("active"); + $(".load-coop-data[data-type='"+type+"']").removeClass("active"); + + $(this).addClass("active"); + + var type = $(this).data("type"); + var status = $(this).data("status"); + var dataId = $(this).data("dataid"); + //console.log("LOAD COOP DATA", contextData.type, contextData.id, type, status, dataId); + uiCoop.getCoopData(contextData.type, contextData.id, type, status, dataId); + }); + }, + + "initDragAndDrop" : function(){ console.log('initDragAndDrop'); + $('.draggable').draggable({ + revert : true, // sera renvoyé à sa place s'il n'est pas déposé dans #drop + appendTo: 'body', + helper: 'clone', + zIndex: 10000, + scroll: false, + start : function(){ + uiCoop.dragId = $(this).data("dataid"); + uiCoop.dragType = $(this).data("type"); + console.log("start drag", $(this).data("dataid"), "coopId", uiCoop.dragId, "coopType", uiCoop.dragType); + } + }); + $('.droppable').droppable({ + accept : '.draggable', // je n'accepte que le bloc ayant "draggable" pour class + drop : function(event, ui){ + var idNewRoom = $(this).data("dataid"); + uiCoop.changeRoom(uiCoop.dragType, uiCoop.dragId, idNewRoom, contextData.type, contextData.id); + toastr.info("L'élément a bien été déplacé"); + }, + activate : function( event, ui ){ + var roomid = $(this).data("dataid"); + //console.log("activate", roomid); + $(this).parent().addClass("bg-lightblue draggin"); + }, + deactivate : function( event, ui ){ + var roomid = $(this).data("dataid"); + //console.log("deactivate", roomid); + $(this).removeClass("text-white").parent().removeClass("bg-lightblue draggin bg-turq"); + }, + over : function( event, ui ){ + var roomid = $(this).data("dataid"); + console.log("over", roomid); + $(this).addClass("text-white").parent().addClass("bg-turq"); + $(this).parent().removeClass("bg-lightblue"); + }, + out : function( event, ui ){ + var roomid = $(this).data("dataid"); + console.log("out", roomid); + $(this).removeClass("text-white").parent().removeClass("bg-turq"); + $(this).parent().addClass("bg-lightblue"); + } + }); + }, + + "minimizeMenuRoom" : function(min){ console.log("minimizeMenuRoom", min); + if(min) { + $("#menu-room").addClass("min col-lg-4 col-md-4 col-sm-4") + .removeClass("col-lg-12 col-md-12 col-sm-12"); + $("#coop-data-container").addClass("col-lg-8 col-md-8 col-sm-8").removeClass("hidden"); + } + else{ + uiCoop.maximizeReader(false); + $("#menu-room").removeClass("min col-lg-4 col-md-4 col-sm-4") + .addClass("col-lg-12 col-md-12 col-sm-12"); + $("#coop-data-container").removeClass("min col-lg-8 col-md-8 col-sm-8").addClass("hidden"); + } + }, + + "maximizeReader" : function(max){ console.log("maximizeReader", max); + if(max) { + $("#menu-room").addClass("hidden"); + $("#coop-data-container").removeClass("col-lg-8 col-md-8 col-sm-8") + .addClass("col-lg-12 col-md-12 col-sm-12"); + } + else{ + $("#menu-room").removeClass("hidden"); + $("#coop-data-container").removeClass("col-lg-12 col-md-12 col-sm-12") + .addClass("col-lg-8 col-md-8 col-sm-8"); + } + }, + + "showAmendement" : function(show){ + if(show){ + $("#menu-room").addClass("hidden"); + $("#coop-data-container").addClass("col-lg-12 col-md-12 col-sm-12") + .removeClass("col-lg-8 col-md-8 col-sm-8"); + $("#amendement-container").removeClass("hidden"); + + }else{ + $("#menu-room").removeClass("hidden"); + $("#coop-data-container").removeClass("col-lg-12 col-md-12 col-sm-12") + .addClass("col-lg-8 col-md-8 col-sm-8"); + $("#amendement-container").addClass("hidden"); + + } + }, + + "getCoopData" : function(parentType, parentId, type, status, dataId, onSuccess, showLoading){ + console.log("getCoopData", parentType, parentId, type, status, dataId, onSuccess, showLoading) + var url = moduleId+'/cooperation/getcoopdata'; + var params = { + "parentType" : parentType, + "parentId" : parentId, + "type" : type, + "status" : status, + "dataId" : dataId, + "json" : false + }; + //console.log("showLoading ?", typeof showLoading, showLoading); + + if(typeof showLoading == "undefined" || showLoading == true){ + if(typeof dataId == "undefined" || dataId == null || type == "room"){ + $("#main-coop-container").html( + "<h2 class='margin-top-50 text-center'><i class='fa fa-refresh fa-spin'></i></h2>"); + } + else{ + $("#coop-data-container").html( + "<h2 class='margin-top-50 text-center'><i class='fa fa-refresh fa-spin'></i></h2>"); + } + } + + ajaxPost("", url, params, + function (data){ + if(typeof dataId == "undefined" || dataId == null || type == "room") { + if(type == "menucoop") + $("#menuCoop").html(data); + else if(dataId == null && type == "room") + $("#coop-room-list").html(data); + else + $("#main-coop-container").html(data); + uiCoop.minimizeMenuRoom(false); + } + else{ + $("#coop-data-container").html(data); + uiCoop.minimizeMenuRoom(true); + } + + uiCoop.initBtnLoadData(); + + $(".btn-hide-data-room").off().click(function(){ + if($(this).hasClass("open")){ + $("#menu-room .sub-"+$(this).data("key")).addClass("hidden"); + $(this).removeClass("open"); + //$(this).find(".fa-caret-down").removeClass("fa-caret-down").addClass("fa-caret-right"); + }else{ + $("#menu-room .sub-"+$(this).data("key")).removeClass("hidden"); + $(this).addClass("open"); + //$(this).find(".fa-caret-right").removeClass("fa-caret-right").addClass("fa-caret-down"); + } + }); + + $(".tooltips").tooltip(); + + if(typeof onSuccess == "function") onSuccess(); + } + ); + }, + + "initSearchInMenuRoom" : function(){ + $(".inputSearchInMenuRoom").keyup(function(){ + var type = $(this).data('type-search'); + var searchVal = $(this).val(); + if(searchVal == "") { + $(".submenucoop.sub-"+type).show(); + return; + } + + $("#coop-container .submenucoop.sub-"+type).hide(); + console.log("searchVal", searchVal, "type", type); + $.each($("#coop-container .submenucoop.sub-"+type), function(){ + console.log("this", this); + + var content = $(this).data("name-search"); + + if(typeof content != "undefined"){ + var found = content.search(new RegExp(searchVal, "i")); + console.log("content", content); + if(found >= 0){ + var id = $(this).show(); + } + } + }); + + }); + }, + + "sendVote" : function(parentType, parentId, voteValue, idParentRoom, idAmdt){ + console.log("sendVote", parentType, parentId, voteValue, idParentRoom, idAmdt); + + var params = { + "parentType" : parentType, + "parentId" : parentId, + "voteValue" : voteValue, + "json" : false + }; + if(typeof idAmdt != "undefined") + params["idAmdt"] = idAmdt; + + var url = moduleId+'/cooperation/savevote'; + + toastr.info(trad["processing save"]); + ajaxPost("", url, params, + function (proposalView){ + console.log("success save vote"); + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, idParentRoom, + function(){ + toastr.success(trad["Your vote has been save with success"]); + + uiCoop.minimizeMenuRoom(true); + $("#coop-data-container").html(proposalView); + if(parentType == "amendement") + uiCoop.showAmendement(true); + }, false); + } + ); + }, + + "activateVote" : function(proposalId){ + + var param = { + block: "activeCoop", + typeElement: "proposals", + id: proposalId, + + status: "tovote", + voteActivated: true, + amendementActivated: false + + }; + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updateblock/", + data: param, + dataType: "json", + success: function(data){ + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, proposalId); + } + }); + + }, + + "saveAmendement" : function(proposalId, typeAmdt){ + var txtAmdt = $("#txtAmdt").val(); + if(txtAmdt.length < 10){ + toastr.error(trad.amendementTooShort); + return; + } + + var param = { + block: "amendement", + typeElement: "proposals", + id: proposalId, + txtAmdt: txtAmdt, + typeAmdt: typeAmdt + }; + console.log("saveAmendement", param); + toastr.info(trad["processing save"]); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updateblock/", + data: param, + dataType: "json", + success: function(data){ + console.log("success updateblock", data); + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, proposalId, function(){ + uiCoop.showAmendement(true); + toastr.success(trad["Your amendement has been save with success"]); + }, false); + } + }); + + }, + + "changeStatus" : function(type, id, status, parentType, parentId){ + var param = { + parentType : parentType, + parentId : parentId, + type: type, + id: id, + name: "status", + value: status + }; + + toastr.info(trad["processing save"]); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefield/", + data: param, + dataType: "json", + success: function(data){ + type = (type == "proposals") ? "proposal" : type; + type = (type == "actions") ? "action" : type; + toastr.success(trad["processing ok"]); + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, idParentRoom, function(){ + uiCoop.getCoopData(parentType, parentId, type, null, id); + }); + } + }); + }, + + "changeRoom" : function(dragType, dragId, idNewRoom, parentType, parentId){ + var param = { + parentType : parentType, + parentId : parentId, + type: dragType, + id: dragId, + name: "idParentRoom", + value: idNewRoom + }; + console.log("changeRoom", param); + toastr.info(trad["processing save"]); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefield/", + data: param, + dataType: "json", + success: function(data){ + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, idNewRoom); + } + }); + }, + + deleteByTypeAndId : function(typeDelete, idDelete){ + toastr.info(trad["processing save"]); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/delete/type/"+typeDelete+"/id/"+idDelete, + success: function(data){ + uiCoop.getCoopData(contextData.type, contextData.id, "room"); + uiCoop.startUI(); + } + }); + }, + + deleteAmendement : function(numAm, idProposal){ + var param = { + numAm : numAm, + idProposal : idProposal, + json : false + }; + + toastr.info(trad["processing delete"]); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/cooperation/deleteamendement/", + data: param, + //dataType: "json", + success: function(data){ + toastr.success(trad["processing delete ok"]); + toastr.success(trad["processing ok"]); + $("#coop-data-container").html(data); + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(true); + }, + error: function(data){ + console.log("error data ", data); + toastr.error(trad["processing delete KO"]); + } + }); + }, + + assignMe : function(idAction){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/rooms/assignme", + data: { "id" : idAction }, + success: function(data){ + if(data.result){ + toastr.success(trad.thxForParticipation); + uiCoop.getCoopData(contextData.type, contextData.id, "action", null, idAction); + //alert("Tango a l'aide comment je reload stp action.php > function assignMe > l.181"); + } + else + toastr.error(data.msg); + } + }); + }, + + initUIProposal : function(){ + + $("#comments-container").html("<i class='fa fa-spin fa-refresh'></i> " + trad.loadingComments); + + $(".footer-comments").html(""); + getAjax("#comments-container",baseUrl+"/"+moduleId+"/comment/index/type/proposals/id/"+idParentProposal, + function(){ //$(".commentCount").html( $(".nbComments").html() ); + $(".container-txtarea").hide(); + + $(".btn-select-arg-comment").click(function(){ + var argval = $(this).data("argval"); + $(".container-txtarea").show(); + + $(".textarea-new-comment").removeClass("bg-green-comment bg-white-comment bg-red-comment"); + var classe=""; + var pholder="Votre commentaire"; + if(argval == "up") { classe="bg-green-comment"; pholder="Votre argument pour"; } + if(argval == "down") { classe="bg-red-comment"; pholder="Votre argument contre"; } + $(".textarea-new-comment").addClass(classe).attr("placeholder", pholder); + $("#argval").val(argval); + }); + + },"html"); + + $("#btn-close-proposal").click(function(){ + uiCoop.minimizeMenuRoom(false); + }); + + $(".btn-extend-proposal").click(function(){ + uiCoop.maximizeReader(true); + $(".btn-minimize-proposal").removeClass("hidden"); + $(".btn-extend-proposal").addClass("hidden"); + }); + + $(".btn-minimize-proposal").click(function(){ + uiCoop.maximizeReader(false); + $(".btn-minimize-proposal").addClass("hidden"); + $(".btn-extend-proposal").removeClass("hidden"); + }); + + $(".btn-show-amendement").click(function(){ + uiCoop.showAmendement(true); + }); + + $("#btn-hide-amendement").click(function(){ + uiCoop.showAmendement(false); + }); + + $(".btn-create-amendement").click(function(){ + uiCoop.showAmendement(true); + if($("#form-amendement").hasClass("hidden")) + $("#form-amendement").removeClass("hidden"); + else + $("#form-amendement").addClass("hidden"); + }); + + $(".btn-modal-delete-am").click(function(){ //alert(".btn-modal-delete-am " + $(this).data("id-am")); + var idAm = $(this).data("id-am"); + //$("#btn-delete-am").attr("data-id-am", idAm); + + + $("#btn-delete-am").off().click(function(){ + //var idAm = $(this).data("id-am"); + uiCoop.deleteAmendement(idAm, idParentProposal); + }); + }); + + + $(".btn-send-vote").click(function(){ + var voteValue = $(this).data('vote-value'); + console.log("send vote", voteValue), + uiCoop.sendVote("proposal", idParentProposal, voteValue, idParentRoom); + }); + + $("#btn-activate-vote").click(function(){ + uiCoop.activateVote(idParentProposal); + }); + + $("#btn-refresh-proposal").click(function(){ + toastr.info(trad["processing"]); + var idProposal = $(this).data("id-proposal"); + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, idProposal, + function(){ + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(false); + toastr.success(trad["processing ok"]); + }, false); + }); + + $("#btn-refresh-amendement").click(function(){ + toastr.info(trad["processing"]); + var idProposal = $(this).data("id-proposal"); + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, idProposal, + function(){ + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(true); + toastr.success(trad["processing ok"]); + }, false); + }); + + $(".btn-option-status-proposal").click(function(){ + var idProposal = $(this).data("id-proposal"); + var status = $(this).data("status"); + console.log("update status proposals", idProposal, status, parentTypeElement, parentIdElement); + uiCoop.changeStatus("proposals", idProposal, status, parentTypeElement, parentIdElement); + }); + + $("#btn-edit-proposal").click(function(){ + var idProposal = $(this).data("id-proposal"); + console.log("edit idProposal", idProposal); + dyFObj.editElement('proposals', idProposal); + }); + addCoopHash=".view.coop.room." + idParentRoom + ".proposal." + idParentProposal; + if(typeof hashUrlPage != "undefined") + location.hash = hashUrlPage +addCoopHash; + else if(notNull(contextData) && typeof contextData.slug != "undefined") + location.hash = "#" + contextData.slug + addCoopHash; + else + location.hash = "#page.type." + parentTypeElement + ".id." + parentIdElement +addCoopHash; + + + if(msgController != ""){ + toastr.error(msgController); + } + }, + + initUIAction : function(){ + + $("#comments-container").html("<i class='fa fa-spin fa-refresh'></i> " + trad.loadingComments); + + $(".footer-comments").html(""); + + getAjax("#comments-container",baseUrl+"/"+moduleId+"/comment/index/type/actions/id/"+idAction, + function(){ //$(".commentCount").html( $(".nbComments").html() ); + },"html"); + + + $("#btn-close-action").click(function(){ + uiCoop.minimizeMenuRoom(false); + }); + + $(".btn-extend-action").click(function(){ + uiCoop.maximizeReader(true); + $(".btn-minimize-action").removeClass("hidden"); + $(".btn-extend-action").addClass("hidden"); + }); + + $(".btn-minimize-action").click(function(){ + uiCoop.maximizeReader(false); + $(".btn-minimize-action").addClass("hidden"); + $(".btn-extend-action").removeClass("hidden"); + }); + + $("#btn-refresh-action").click(function(){ + toastr.info(trad["processing"]); + var idProposal = $(this).data("id-action"); + uiCoop.getCoopData(contextData.type, contextData.id, "action", null, idProposal, + function(){ + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(false); + toastr.success(trad["processing ok"]); + }, false); + }); + + $(".btn-option-status-action").click(function(){ + var idAction = $(this).data("id-action"); + var status = $(this).data("status"); + console.log("update status actions", idAction, status, parentTypeElement, parentIdElement); + uiCoop.changeStatus("actions", idAction, status, parentTypeElement, parentIdElement); + }); + + $("#btn-edit-action").click(function(){ + var idaction = $(this).data("id-action"); + console.log("edit idAction", idAction); + dyFObj.editElement('actions', idAction); + }); + + $("#btn-validate-assign-me").off().click(function(){ + uiCoop.assignMe(idAction); + }); + addCoopHash=".view.coop.room." + idParentRoom + ".action." + idAction; + if(typeof hashUrlPage != "undefined") + location.hash = hashUrlPage +addCoopHash; + else if(notNull(contextData) && typeof contextData.slug != "undefined") + location.hash = "#" + contextData.slug + addCoopHash; + else + location.hash = "#page.type." + parentTypeElement + ".id." + parentIdElement +addCoopHash; + + } + +} \ No newline at end of file diff --git a/assets/js/dataHelpers.js b/assets/js/dataHelpers.js new file mode 100644 index 0000000000000000000000000000000000000000..b2a31c356c41cb535d00093a887137a416ba2f4e --- /dev/null +++ b/assets/js/dataHelpers.js @@ -0,0 +1,444 @@ +//Retrieve the countries in ajax and return an array of value +//The selectType change the value key : +//for select input : {"value":"FR", "text":"France"} +//for select2 input : {"id":"FR", "text":"France"} +function getCountries(selectType) { + var result = new Array(); + $.ajax({ + url: baseUrl+'/'+moduleId+"/opendata/getcountries", + type: 'post', + global: false, + async: false, + dataType: 'json', + success: function(data) { + $.each(data, function(i,value) { + if (selectType == "select2") { + result.push({"id" : value.value, "text" :value.text}); + } else { + result.push({"value" : value.value, "text" :value.text}); + } + }) + } + }); + return result; +} + +function formatDataForSelect(data, selectType) { + var result = new Array(); + $.each(data, function(key,value) { + if (selectType == "select2") { + result.push({"id" : key, "text" :value}); + } else { + result.push({"value" : key, "text" :value}); + } + }); + return result; +} + +function getCitiesByPostalCode(postalCode, selectType) { + var result =new Array(); + $.ajax({ + url: baseUrl+'/'+moduleId+"/opendata/getcitiesbypostalcode/", + data: {postalCode: postalCode}, + type: 'post', + global: false, + async: false, + dataType: 'json', + success: function(data) { + $.each(data, function(key,value) { + if (selectType == "select2") { + result.push({"id" : value.insee, "text" :value.name}); + } else { + result.push({"value" : value.insee, "text" :value.name}); + } + }); + } + }); + return result; +} + +/** added by tristan **/ +function getCitiesGeoPosByPostalCode(postalCode, selectType) { + var result =new Array(); + $.ajax({ + url: baseUrl+'/'+moduleId+"/opendata/getcitiesgeoposbypostalcode/", + data: {postalCode: postalCode}, + type: 'post', + global: false, + async: false, + dataType: 'json', + success: function(data) { //mylog.dir(data); + result.push(data); + } + }); + return result; +} +function isUniqueUsername(username) { + var response; + $.ajax({ + url: baseUrl+'/'+moduleId+"/person/checkusername/", + data: {username: username}, + type: 'post', + global: false, + async: false, + dataType: 'json', + success: function(data) { + response = data; + } + }); + mylog.log("isUniqueUsername=", response); + return response; +} +function slugUnique(searchValue){ + + //searchType = (types) ? types : ["organizations", "projects", "events", "needs", "citoyens"]; + var response; + var data = { + "id":contextData.id, + "type": contextData.type, + "slug" : searchValue + }; + //$("#listSameSlug").html("<i class='fa fa-spin fa-circle-o-notch'></i> Vérification d'existence"); + //$("#similarLink").show(); + //$("#btn-submit-form").html('<i class="fa fa-spinner fa-spin"></i>').prop("disabled",true); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/slug/check", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + //$("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + }, + success: function(data){ + //var msg = "Ce pseudo est déjà utilisé"; + //$("#btn-submit-form").html('Valider <i class="fa fa-arrow-circle-right"></i>').prop("disabled",false); + if (!data.result) { + //response=false; + if(!$("#ajaxFormModal #slug").parent().hasClass("has-error")) + $("#ajaxFormModal #slug").parent().removeClass('has-success').addClass('has-error');//.find("span").text("cucu"); + //.addClass("has-error").parent().find("span").text("cretin"); + msgSlug="This slug is already used."; + //bindLBHLinks(); + } else { + //response=true; + if(!$("#ajaxFormModal #slug").parent().hasClass("has-success")) + $("#ajaxFormModal #slug").parent().removeClass('has-error').addClass('has-success'); + //.addClass("has-success").parent().find("span").text("good peydé"); + msgSlug="This slug is not used."; + //$("#slug").html("<span class='txt-green'><i class='fa fa-thumbs-up text-green'></i> Aucun pseudo avec ce nom.</span>"); + + } + $("#ajaxFormModal #slug").next().text(msgSlug); + } + }); + //return response; +} +function addCustomValidators() { + mylog.log("addCustomValidators"); + //Validate a postalCode + jQuery.validator.addMethod("validPostalCode", function(value, element) { + var response; + $.ajax({ + url: baseUrl+'/'+moduleId+"/opendata/getcitiesbypostalcode/", + data: {postalCode: value}, + type: 'post', + global: false, + async: false, + dataType: 'json', + success: function(data) { + response = data; + } + }); + + if (Object.keys(response).length > 0) { + return true; + } else { + return false; + } + }, "Code postal inconnu"); + /*jQuery.validator.addMethod("uniqueSlug", function(value, element) { + //Check unique username + return slugUnique(value); + }, "This slug already exists. Please choose an other one.");*/ + jQuery.validator.addMethod("validUserName", function(value, element) { + //Check authorized caracters + var usernameRegex = /^[a-zA-Z0-9\-]+$/; + var validUsername = value.match(usernameRegex); + if (validUsername == null) { + return false; + } else { + return true; + } + }, tradDynForm.invalidUsername); + + jQuery.validator.addMethod("uniqueUserName", function(value, element) { + //Check unique username + return isUniqueUsername(value); + }, "A user with the same username already exists. Please choose an other one."); + + jQuery.validator.addMethod("inArray", function(value, element) { + //Check authorized caracters + test = $.inArray( element, value ); + if (test >= 0) + return true; + else + return false; + }, "Invalid : please stick to given values."); + + jQuery.validator.addMethod("greaterThan", function(value, element, params) { + mylog.log("greaterThan", value, params); + mylog.log(moment(value, "DD/MM/YYYY HH:mm").format()); + mylog.log(!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))); + //if (!/Invalid|NaN/.test(new Date(value))) { + if (!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))) { + mylog.log(!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))); + + return moment(value, "DD/MM/YYYY HH:mm").isAfter(moment($(params[0]).val(), "DD/MM/YYYY HH:mm")); + } + return isNaN(value) && isNaN($(params[0]).val()) || (Number(value) > Number($(params[0]).val())); + },'Doit ètre aprés {1}.'); + + + // jQuery.validator.addMethod("greaterThanOrSame", function(value, element, params) { + // mylog.log("greaterThan", value, params); + // mylog.log(moment(value, "DD/MM/YYYY HH:mm").format()); + // mylog.log(!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))); + // //if (!/Invalid|NaN/.test(new Date(value))) { + // if (!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))) { + // mylog.log(!/Invalid|NaN/.test(new Date(moment(value, "DD/MM/YYYY HH:mm").format()))); + + // return moment(value, "DD/MM/YYYY HH:mm").isSameOrAfter(moment($(params[0]).val(), "DD/MM/YYYY HH:mm")); + // } + // return isNaN(value) && isNaN($(params[0]).val()) || (Number(value) > Number($(params[0]).val())); + // },'Doit ètre aprés {1}.'); + + jQuery.validator.addMethod("greaterThanNow", function(value, element, params) { + mylog.log("greaterThanNow", value, params[0]); + mylog.log(moment(value, params[0])," < ",moment()); + return moment(value, params[0]).isAfter(moment()); + },"Doit être après la date d'aujourd'hui."); + + jQuery.validator.addMethod("duringDates", function(value, element, params) { + if( $(params[0]).val() && $(params[1]).val() ){ + //console.warn(moment(value, "DD/MM/YYYY HH:mm"),moment($(params[0]).val()),moment($(params[1]).val())); + return (moment(value, "DD/MM/YYYY HH:mm").isSameOrAfter(moment($(params[0]).val())) + && moment(value, "DD/MM/YYYY HH:mm").isSameOrBefore(moment($(params[1]).val()))); + //return ( new Date(value) >= new Date( $(params[0]).val() ) && new Date(value) <= new Date($(params[1]).val()) ); + } + return true; + },"Cette date est exterieure à l'évènement parent."); +} + + + +function showLoadingMsg(msg){ + $("#main-title-public1").html("<i class='fa fa-refresh fa-spin'></i> "+msg+" ..."); + $("#main-title-public1").show(300); +} +function hideLoadingMsg(){ + $("#main-title-public1").html(""); + $("#main-title-public1").hide(300); +} +function dateSecToString(date){ + var yyyy = date.getFullYear().toString(); + var mm = (date.getMonth()+1).toString(); // getMonth() is zero-based + var dd = date.getDate().toString(); + var min = date.getMinutes().toString(); + var ss = date.getSeconds().toString(); + date = yyyy + "-" + (mm[1]?mm:"0"+mm[0]) + "-" + (dd[1]?dd:"0"+dd[0]) + " " + + (min[1]?min:"0"+min[0]) + ":" + (ss[1]?ss:"0"+ss[0]) + ":00"; // padding + return date; +} +function dateToStr(date, lang, inline, fullMonth){ //work with date formated : yyyy-mm-dd hh:mm:ss ou millisecond + + if(typeof date == "undefined") return; + if(fullMonth != true) fullMonth = false; + + //mylog.log("convert format date 1", date); + if(typeof date.sec != "undefined"){ + date = new Date(date.sec); + date = dateSecToString(date); + } + else if(typeof date == "number"){ + date = new Date(date); + date = dateSecToString(date); + } + //mylog.log(date); + if(lang == "fr"){ + //(year, month, day, hours, minutes, seconds, milliseconds) + //mylog.log("convert format date", date); + var year = date.substr(0, 4); + var month = date.substr(5, 2);//getMonthStr(date.substr(5, 2), lang); + var day = date.substr(8, 2); + var hours = date.substr(11, 2); + var minutes = date.substr(14, 2); + + + var str = day + "/" + month + "/" + year; + + if(fullMonth) str = day + " " + getMonthStr(month, "fr") + " " + year; + + + if(!inline) str += "</br>"; + else str += " - "; + str += hours + "h" + minutes; + + return str; + } + + function getMonthStr(monthInt, lang){ + if(lang == "fr"){ + if(monthInt == "01") return "Janvier"; + if(monthInt == "02") return "Février"; + if(monthInt == "03") return "Mars"; + if(monthInt == "04") return "Avril"; + if(monthInt == "05") return "Mai"; + if(monthInt == "06") return "Juin"; + if(monthInt == "07") return "Juillet"; + if(monthInt == "08") return "Août"; + if(monthInt == "09") return "Septembre"; + if(monthInt == "10") return "Octobre"; + if(monthInt == "11") return "Novembre"; + if(monthInt == "12") return "Décembre"; + } + } +} + +function getObjectId(object){ + if(object === null) return null; + if("undefined" != typeof object._id && "undefined" != typeof object._id.$id) return object._id.$id.toString(); + if("undefined" != typeof object.id) return object.id; + if("undefined" != typeof object.$id) return object.$id; + return null; +}; + + +function getFullTextCountry(codeCountry){ + var countries = { + "FR" : "France", + "RE" : "Réunion", + "NC" : "Nouvelle-Calédonie", + "GP" : "Gouadeloupe", + "GF" : "Guyanne-Française", + "MQ" : "MartiniqueMQ", + "PM" : "Saint-Pierre-Et-Miquelon" + }; + if(typeof countries[codeCountry] != "undefined") + return countries[codeCountry]; + else return ""; +} + + + + + +var dataHelper = { + + csvToArray : function (csv, separateur, separateurText){ + var lines = csv.split("\n"); + var result = []; + $.each(lines, function(key, value){ + if(value.length > 0){ + var colonnes = value.split(separateur); + var newColonnes = []; + $.each(colonnes, function(keyCol, valueCol){ + + if(typeof separateurText == "undefined" || separateurText =="") + newColonnes.push(valueCol); + else{ + if(valueCol.charAt(0) == separateurText && valueCol.charAt(valueCol.length-1) == separateurText){ + var elt = valueCol.substr(1,valueCol.length-2); + newColonnes.push(elt); + }else{ + newColonnes.push(valueCol); + } + } + + + }); + result.push(newColonnes); + } + + }); + return result; + }, + + markdownToHtml : function (str) { + var converter = new showdown.Converter(); + var res = converter.makeHtml(str); + return res; + }, + + convertMardownToHtml : function (text) { + var converter = new showdown.Converter(); + return converter.makeHtml(text); + }, + + + activateMarkdown : function (elem) { + mylog.log("activateMarkdown", elem); + + markdownParams = { + savable:false, + iconlibrary:'fa', + language:'fr', + onPreview: function(e) { + var previewContent = ""; + if (e.isDirty()) { + previewContent = dataHelper.convertMardownToHtml(e.getContent()); + } else { + previewContent = dataHelper.convertMardownToHtml($(elem).val()); + } + return previewContent; + }, + onSave: function(e) { + mylog.log(e); + } + } + + if( !$('script[src="'+baseUrl+'/plugins/bootstrap-markdown/js/bootstrap-markdown.js"]').length ){ + mylog.log("activateMarkdown if"); + + $("<link/>", { + rel: "stylesheet", + type: "text/css", + href: baseUrl+"/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css" + }).appendTo("head"); + $.getScript( baseUrl+"/plugins/showdown/showdown.min.js", function( data, textStatus, jqxhr ) { + + $.getScript( baseUrl+"/plugins/bootstrap-markdown/js/bootstrap-markdown.js", function( data, textStatus, jqxhr ) { + mylog.log("HERE", elem); + + $.fn.markdown.messages['fr'] = { + 'Bold': trad.Bold, + 'Italic': trad.Italic, + 'Heading': trad.Heading, + 'URL/Link': trad['URL/Link'], + 'Image': trad.Image, + 'List': trad.List, + 'Preview': trad.Preview, + 'strong text': trad['strong text'], + 'emphasized text': trad['strong text'], + 'heading text': trad[''], + 'enter link description here': trad['enter link description here'], + 'Insert Hyperlink': trad['Insert Hyperlink'], + 'enter image description here': trad['enter image description here'], + 'Insert Image Hyperlink': trad['Insert Image Hyperlink'], + 'enter image title here': trad['enter image title here'], + 'list text here': trad['list text here'] + }; + $(elem).markdown(markdownParams); + }); + + + }); + } else { + mylog.log("activateMarkdown else"); + $(elem).markdown(markdownParams); + } + + $(elem).before(tradDynForm["syntaxmarkdownused"]); + } + +} diff --git a/assets/js/default/agenda.js b/assets/js/default/agenda.js new file mode 100644 index 0000000000000000000000000000000000000000..2a8a25f8b723ca37f04a436ba5518e3e92eb8838 --- /dev/null +++ b/assets/js/default/agenda.js @@ -0,0 +1,434 @@ + +var indexStepInit = 100; +var indexStep = indexStepInit; +var currentIndexMin = 0; +var currentIndexMax = indexStep; +var scrollEnd = false; +var totalData = 0; + +var timeout = null; + +function startSearch(indexMin, indexMax){ + console.log("startSearch agenda.js", indexMin, indexMax, indexStep); + + mylog.log("loadingData", loadingData); + if(loadingData) return; + loadingData = true; + + + mylog.log("loadingData true"); + indexStep = indexStepInit; + + var name = $('#searchBarText').val(); + //var locality = $('#searchBarPostalCode').val(); + //inseeCommunexion = locality; + + //if(communexionActivated) + //$(".lbl-scope-list").html("<i class='fa fa-check'></i> " + cityNameCommunexion.toLowerCase() + ", " + cpCommunexion); + + if(typeof indexMin == "undefined") indexMin = 0; + if(typeof indexMax == "undefined") indexMax = indexStep; + + currentIndexMin = indexMin; + currentIndexMax = indexMax; + + if(indexMin == 0 && indexMax == indexStep) { + totalData = 0; + mapElements = new Array(); + } + else{ if(scrollEnd) return; } + + //name = name.replace(/[^\w\s']/gi, ''); + ///locality = locality.replace(/[^\w\s']/gi, ''); + + //verification si c'est un nombre + //if(!isNaN(parseInt(locality))){ + // if(locality.length == 0 || locality.length > 5) locality = ""; + //} + + if(name.length>=3 || name.length == 0){ + var locality = ""; + if(communexionActivated){ + if(typeof(cityInseeCommunexion) != "undefined"){ + if(levelCommunexion == 1) locality = cpCommunexion; + if(levelCommunexion == 2) locality = inseeCommunexion; + }else{ + if(levelCommunexion == 1) locality = inseeCommunexion; + if(levelCommunexion == 2) locality = cpCommunexion; + } + if(levelCommunexion == 3) locality = inseeCommunexion; + /*if(levelCommunexion == 3) locality = cpCommunexion.substr(0, 2);*/ + if(levelCommunexion == 4) locality = inseeCommunexion; + if(levelCommunexion == 5) locality = ""; + } + autoCompleteSearch(name, locality, indexMin, indexMax); + }else{ + + } +} + +function addSearchType(type){ + var index = searchType.indexOf(type); + if (index == -1) { + searchType.push(type); + $(".search_"+type).removeClass("fa-circle-o"); + $(".search_"+type).addClass("fa-check-circle-o"); + } +} +function removeSearchType(type){ + var index = searchType.indexOf(type); + if (index > -1) { + searchType.splice(index, 1); + $(".search_"+type).removeClass("fa-check-circle-o"); + $(".search_"+type).addClass("fa-circle-o"); + } +} + +var loadingData = false; +var mapElements = new Array(); +function autoCompleteSearch(name, locality, indexMin, indexMax){ + var searchLocality = getLocalityForSearch(); + var data = { "name" : name, + "locality" : searchLocality, + "searchType" : searchType, + "indexMin" : indexMin, + "indexMax" : indexMax }; + + str = "<i class='fa fa-circle-o-notch fa-spin'></i>"; + $(".btn-start-search").html(str); + $(".btn-start-search").addClass("bg-azure"); + $(".btn-start-search").removeClass("bg-dark"); + //$("#dropdown_search").css({"display" : "inline" }); + + if(indexMin > 0) + $("#btnShowMoreResult").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + else + $("#dropdown_search").html("<center><span class='search-loader text-dark' style='font-size:20px;'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span></center>"); + + if(isMapEnd) + $.blockUI({ + message : "<h1 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> Commune<span class='text-dark'>xion en cours ...</span></h1>" + }); + + $(".responsive-calendar").hide(); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + if(!data){ toastr.error(data.content); } + else + { + var countData = 0; + $.each(data, function(i, v) { if(v.length!=0){ countData++; } }); + + totalData += countData; + + str = ""; + var city, postalCode = ""; + + //parcours la liste des résultats de la recherche + $.each(data, function(i, o) { + var typeIco = i; + var ico = "fa-"+typeObj["default"].icon; + var color = mapColorIconTop["default"]; + + mapElements.push(o); + + typeIco = o.type; + ico = ("undefined" != typeof typeObj[typeIco].icon) ? "fa-"+typeObj[typeIco].icon : "fa-"+typeObj["default"].icon; + color = ("undefined" != typeof mapColorIconTop[typeIco]) ? mapColorIconTop[typeIco] : mapColorIconTop["default"]; + + htmlIco ="<i class='fa "+ ico +" fa-2x bg-"+color+"'></i>"; + if("undefined" != typeof o.profilThumbImageUrl && o.profilThumbImageUrl != ""){ + var htmlIco= "<img width='80' height='80' alt='' class='img-circle bg-"+color+"' src='"+baseUrl+o.profilThumbImageUrl+"'/>" + } + + city=""; + + var postalCode = o.cp + if (o.address != null) { + city = o.address.addressLocality; + postalCode = o.cp ? o.cp : o.address.postalCode ? o.address.postalCode : ""; + } + + //mylog.dir(o); + var id = getObjectId(o); + var insee = o.insee ? o.insee : ""; + type = typeObj[o.type].ctrl; + //if(type=="citoyen") type = "person"; + var url = "javascript:"; //baseUrl+'/'+moduleId+ "/default/simple#" + o.type + ".detail.id." + id; + var onclick = 'urlCtrl.loadByHash("#page.type.' + o.type + '.id.' + id + '");'; + var onclickCp = ""; + var target = " target='_blank'"; + var dataId = ""; + if(type == "city"){ + url = "javascript:"; //#main-col-search"; + onclick = 'setScopeValue($(this))'; //"'+o.name.replace("'", "\'")+'");'; + onclickCp = 'setScopeValue($(this));'; + target = ""; + dataId = o.name; //.replace("'", "\'"); + } + + var tags = ""; + if(typeof o.tags != "undefined" && o.tags != null){ + $.each(o.tags, function(key, value){ + if(value != "") + tags += "<a href='javascript:' class='badge bg-red btn-tag'>#" + value + "</a>"; + }); + } + + var name = typeof o.name != "undefined" ? o.name : ""; + var postalCode = (typeof o.address != "undefined" && + typeof o.address.postalCode != "undefined") ? o.address.postalCode : ""; + + if(postalCode == "") postalCode = typeof o.cp != "undefined" ? o.cp : ""; + var cityName = (typeof o.address != "undefined" && + typeof o.address.addressLocality != "undefined") ? o.address.addressLocality : ""; + + var fullLocality = postalCode + " " + cityName; + + var description = (typeof o.shortDescription != "undefined" && + o.shortDescription != null) ? o.shortDescription : ""; + if(description == "") description = (typeof o.description != "undefined" && + o.description != null) ? o.description : ""; + + var startDate = (typeof o.startDate != "undefined") ? "Du "+dateToStr(o.startDate, "fr", true, true) : null; + var endDate = (typeof o.endDate != "undefined") ? "Au "+dateToStr(o.endDate, "fr", true, true) : null; + + //template principal + str += "<div class='col-md-12 searchEntity'>"; + str += "<div class='col-md-5 col-sm-4 entityLeft'>"; + if(userId != null){ + isFollowed=false; + if(typeof o.isFollowed != "undefined" ) + isFollowed=true; + if(type!="city" && id != userId && userId != null && userId != "") + str += "<a href='javascript:;' class='btn btn-default btn-sm btn-add-to-directory bg-white tooltips followBtn'" + + 'data-toggle="tooltip" data-placement="left" data-original-title="Participer"'+ + " data-ownerlink='participate' data-id='"+id+"' data-type='"+type+"' data-name='"+name+"' data-isFollowed='"+isFollowed+"'>"+ + "<i class='fa fa-chain'></i>"+ //fa-bookmark fa-rotate-270 + "</a>"; + } + str += tags; + + str += "</div>"; + + str += "<div class='col-md-2 col-sm-2 entityCenter'>"; + str += "<a href='"+url+"' onclick='"+onclick+"'>" + htmlIco + "</a>"; + str += "</div>"; + target = ""; + str += "<div class='col-md-5 col-sm-5 entityRight no-padding'>"; + str += "<a href='"+url+"' onclick='"+onclick+"'"+target+" class='entityName text-dark'>" + name + "</a>"; + if(fullLocality != "" && fullLocality != " ") + str += "<a href='"+url+"' onclick='"+onclickCp+"'"+target+ ' data-id="' + dataId + '"' + " class='entityLocality'><i class='fa fa-home'></i> " + fullLocality + "</a>"; + if(startDate != null) + str += "<a href='"+url+"' onclick='"+onclick+"'"+target+" class='entityDate bg-azure badge'><i class='fa fa-caret-right'></i> " + startDate + "</a>"; + if(endDate != null) + str += "<a href='"+url+"' onclick='"+onclick+"'"+target+" class='entityDate bg-azure badge'><i class='fa fa-caret-right'></i> " + endDate + "</a>"; + if(description != "") + str += "<div onclick='"+onclick+"'"+target+" class='entityDescription'>" + description + "</div>"; + str += "</div>"; + + str += "</div>"; + }); //end each + + if(str == "") { + $.unblockUI(); + showMap(false); + + $(".btn-start-search").html("<i class='fa fa-search'></i>"); + if(indexMin == 0){ + //ajout du footer + var msg = trad.noresult; + if(name == "" && locality == "") msg = "<h3 class='text-dark'><i class='fa fa-3x fa-keyboard-o'></i><br> Préciser votre recherche pour plus de résultats ...</h3>"; + str += '<div class="center" id="footerDropdown">'; + str += "<hr style='float:left; width:100%;'/><label style='margin-bottom:10px; margin-left:15px;' class='text-dark'>"+msg+"</label><br/>"; + str += "</div>"; + $("#dropdown_search").html(str); + $("#searchBarText").focus(); + } + } + else + { + //ajout du footer + str += '<div class="center" id="footerDropdown">'; + str += "<hr style='float:left; width:100%;'/><label style='margin-bottom:10px; margin-left:15px;' class='text-dark'>" + totalData + " "+trad["results"]+"</label><br/>"; + str += '<button class="btn btn-default" id="btnShowMoreResult"><i class="fa fa-angle-down"></i> Afficher plus de résultat</div></center>'; + str += "</div>"; + + //si on n'est pas sur une première recherche (chargement de la suite des résultat) + if(indexMin > 0){ + //on supprime l'ancien bouton "afficher plus de résultat" + $("#btnShowMoreResult").remove(); + //on supprimer le footer (avec nb résultats) + $("#footerDropdown").remove(); + + //on calcul la valeur du nouveau scrollTop + var heightContainer = $(".my-main-container")[0].scrollHeight - 180; + //on affiche le résultat à l'écran + $("#dropdown_search").append(str); + //on scroll pour afficher le premier résultat de la dernière recherche + $(".my-main-container").animate({"scrollTop" : heightContainer}, 1700); + //$(".my-main-container").scrollTop(heightContainer); + + + //si on est sur une première recherche + }else{ + //on affiche le résultat à l'écran + $("#dropdown_search").html(str); + //on scroll pour coller le haut de l'arbre au menuTop + //$(".my-main-container").scrollTop(95); + } + //remet l'icon "loupe" du bouton search + $(".btn-start-search").html("<i class='fa fa-search'></i>"); + $.unblockUI(); + showMap(false); + + //affiche la dropdown + //$("#dropdown_search").css({"display" : "inline" }); + + //active le chargement de la suite des résultat au survol du bouton "afficher plus de résultats" + //(au cas où le scroll n'ait pas lancé le chargement comme prévu) + $("#btnShowMoreResult").mouseenter(function(){ + // if(!loadingData){ + // startSearch(indexMin+indexStep, indexMax+indexStep); + // $("#btnShowMoreResult").mouseenter(function(){}); + // } + }); + + //initialise les boutons pour garder une entité dans Mon répertoire (boutons links) + initBtnLink(); + + } //end else (str=="") + + //signal que le chargement est terminé + mylog.log("loadingData false"); + loadingData = false; + + //quand la recherche est terminé, on remet la couleur normal du bouton search + $(".btn-start-search").removeClass("bg-azure"); + } + + $('.tooltips').tooltip(); + mylog.log("scrollEnd ? ", scrollEnd, indexMax, countData , indexMin); + //si le nombre de résultat obtenu est inférieur au indexStep => tous les éléments ont été chargé et affiché + if(indexMax - countData > indexMin){ + $("#btnShowMoreResult").remove(); + scrollEnd = true; + }else{ + scrollEnd = false; + } + + showResultInCalendar(mapElements); + //affiche les éléments sur la carte + Sig.showMapElements(Sig.map, mapElements); + } + }); + + + } + + function addEventOnSearch() { + $('.searchEntry').off().on("click", function(){ + + //toastr.success($("#dropdown_search").position().top); + var top = $(this).position().top;// + $("#dropdown_search").position().top; + + setSearchInput($(this).data("id"), $(this).data("type"), + $(this).data("insee"), top ); + }); + } + + function initBtnLink(){ + + //parcours tous les boutons link pour vérifier si l'entité est déjà dans mon répertoire + $.each($(".followBtn"), function(index, value){ + var id = $(value).attr("data-id"); + var type = $(value).attr("data-type"); + type = dyFInputs.get(type).col; + + //mylog.log("#floopItem-"+type+"-"+id); + if($("#floopItem-"+type+"-"+id).length){ + //mylog.log("I FOLLOW THIS"); + $(value).html("<i class='fa fa-unlink text-green'></i>"); + $(value).attr("data-ownerlink","unparticipate"); + $(value).attr("data-original-title","Ne plus participer à l\'évènement"); + } + }); + //on click sur les boutons link + $(".followBtn").click(function(){ + formData = new Object(); + formData.parentId = $(this).attr("data-id"); + formData.parentType = $(this).attr("data-id"); + formData.childId = userId; + formData.childType = personCOLLECTION; + var type = $(this).attr("data-type"); + var name = $(this).attr("data-name"); + var id = $(this).attr("data-id"); + //traduction du type pour le floopDrawer + var typeOrigine = type + "s"; + formData.parentType = typeOrigine; + type = type2collection[type]; + var thiselement = this; + $(this).html("<i class='fa fa-spin fa-circle-o-notch text-azure'></i>"); + mylog.log(formData); + if ($(this).attr("data-ownerlink")=="participate"){ + formData.connectType = "attendee"; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/connect", + data: formData, + dataType: "json", + success: function(data) { + if(data.result){ + //addFloopEntity(data.parent["_id"]["$id"], data.parentType, data.parent); + toastr.success(data.msg); + $(thiselement).html("<i class='fa fa-unlink text-green'></i>"); + $(thiselement).attr("data-ownerlink","unparticipate"); + $(thiselement).attr("data-original-title", "Ne plus participer à l'évènement"); + addFloopEntity(id, type, data.parent); + showFloopDrawer(true); + } + else + toastr.error(data.msg); + }, + }); + } else if ($(this).attr("data-ownerlink")=="unparticipate"){ + formData.connectType = "attendees"; + mylog.log(formData); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/disconnect", + data : formData, + dataType: "json", + success: function(data){ + if ( data && data.result ) { + $(thiselement).html("<i class='fa fa-link'></i>"); + $(thiselement).attr("data-ownerlink","participate"); + $(thiselement).attr("data-original-title", "Suivre"); + removeFloopEntity(data.parentId, type); + toastr.success(trad["leaveeventsuccess"]); + } else { + toastr.error("You leave succesfully"); + } + } + }); + } + }); + + $(".btn-tag").click(function(){ + setSearchValue($(this).html()); + }); + } + + + function setSearchValue(value){ + $("#searchBarText").val(value); + startSearch(); + } \ No newline at end of file diff --git a/assets/js/default/calendar.js b/assets/js/default/calendar.js new file mode 100644 index 0000000000000000000000000000000000000000..b8fc2b71c10ccdd3f80d5735fe20bf1198951f8a --- /dev/null +++ b/assets/js/default/calendar.js @@ -0,0 +1,333 @@ +var calendar = { + init : function(domCal){ + $("#showHideCalendar").click(function(){ + if($(this).data("hidden")){ + $(this).html("<i class='fa fa-caret-up'></i> "+trad.showcalendar+"</a>"); + $(this).data("hidden",0); + $(domCal).show(700); + }else{ + $(this).html("<i class='fa fa-caret-down'></i> "+trad.showcalendar+"</a>"); + $(this).data("hidden",1); + $(domCal).hide(700); + } + + }); + + /*lazyLoad('/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + null,false); + lazyLoad( baseUrl+'/plugins/fullcalendar/fullcalendar/locale/'+mainLanguage+'.js',null,null,false);*/ + }, + bindEventCalendar : function(){ + //var popoverElement; + + $('.popover').mouseenter(function(){ + // alert(); + $(this).hide(); + // calendar.showPopup=false; + }); + $('body').off().on('click', function (e) { + // close the popover if: click outside of the popover || click on the close button of the popover + //alert(e.target); + if (typeof popoverElement != "undefined" && popoverElement + && ((!popoverElement.is(e.target) && popoverElement.has(e.target).length === 0 && $('.popover').has(e.target).length === 0) + || (popoverElement.has(e.target) && e.target.id === 'closepopover'))) { + + // $('.popover').popover('hide'); --> works + // if(calendar.showPopup) + //alert("ici"); + calendar.closePopovers(); + } + }); + }, + closePopovers : function() { + calendar.showPopup=false; + $('.popover').not(this).popover('hide'); + }, + templateRef : { + "competition":"#ed553b", + "concert" :"#b45f04", + "contest":"#ed553b", + "exhibition":"#b45f04", + "festival":"#b45f04", + "getTogether":"#eb4124", + "market":"#df01a5", + "meeting":"#eb4124", + "course":"#df01a5", + "workshop":"#eb4124", + "conference":"#0073b0", + "debate":"#0073b0", + "film":"#2e2e2e", + "crowdfunding":"#93be3d", + "others":"#93be3d", + }, + events : [], + //dateToShow, calendar, $eventDetail, eventClass, eventCategory, + widgetNotes : $('#notes .e-slider'), + sliderNotes : $('#readNote .e-slider'), + //oTable, + //contributors, + //subViewElement, subViewContent, subViewIndex, + tabOrganiser : [], + showPopup : false, + //creates fullCalendar + buildCalObj: function(eventObj) { + //entries for the calendar + //console.log("eventcaleanr",eventObj); + var taskCal = null; + if(eventObj.startDate && eventObj.startDate != "") { + if(typeof eventObj.startDateCal != "undefined") + var startDate = moment(eventObj.startDateCal).local(); + else if(typeof eventObj.startDateDB != "undefined") + var startDate = moment(eventObj.startDateDB).local(); + else + var startDate = moment(eventObj.startDate).local(); + var endDate = null; + if(eventObj.endDate && eventObj.endDate != "" ){ + if(typeof eventObj.endDateCal != "undefined") + endDate = moment(eventObj.endDateCal).local(); + if(typeof eventObj.endDateDB != "undefined") + endDate = moment(eventObj.endDateDB).local(); + else + endDate = moment(eventObj.endDate).local(); + + + + } + mylog.log("Start Date = "+startDate+" // End Date = "+endDate); + + var organiser = ""; + if("undefined" != typeof eventObj["links"] && "undefined" != typeof eventObj.links["organizer"]){ + $.each(eventObj.links["organizer"], function(k, v){ + if($.inArray(k, calendar.tabOrganiser)==-1) + calendar.tabOrganiser.push(k); + organiser = k; + }) + } + var organizerName = eventObj.name; + if(eventObj.organizer != "") + organizerName = eventObj.organizer +" : "+ eventObj.name; + // console.log("eventObj",eventObj); + taskCal = { + "title" : eventObj.name + " : "+tradCategory[eventObj.typeEvent], + + "content" : (eventObj.description && eventObj.description != "" ) ? eventObj.description : "", + "start" : startDate.format(), + "end" : ( endDate ) ? endDate.format() : startDate.format(), + "startDate" : eventObj.startDate, + "endDate" : eventObj.endDate, + "startDateDB" : eventObj.startDateDB, + "endDateDB" : eventObj.endDateDB, + "allDay" : eventObj.allDay, + "className": organiser, + "category": organiser, + "type": eventObj.typeEvent, + "description":eventObj.description, + "shortDescription": eventObj.shortDescription, + "profilMediumImageUrl": eventObj.profilMediumImageUrl, + "adresse": eventObj.cityName, + //"adresse": eventObj.cityName, + //"backgroundColor":calendar.templateColor[eventObj.typeEvent], + "links":eventObj.links, + } + if(typeof eventObj.imgProfil != "undefined") + taskCal.imgProfil=eventObj.imgProfil; + if(typeof eventObj.id != "undefined") + taskCal.id = eventObj.id; + else + taskCal.id = eventObj._id.$id; + if(eventObj.allDay ) + taskCal.allDay = eventObj.allDay; + //mylog.log(taskCal); + } + return taskCal; + }, + showCalendar : function (domElement, events, initMode, initDate) { + calendarObject = []; + console.log("showEvent",events); + if(events){ + $.each(events,function(eventId,eventObj){ + eventCal = calendar.buildCalObj(eventObj); + if(eventCal) + calendarObject.push( eventCal ); + }); + } + //mylog.log(calendar); + if(typeof initDate != "undefined" && notNull(initDate) ){ + splitInit=initDate.split("-"); + dateToShow = new Date(splitInit[0], splitInit[1]-1, splitInit[2]); + } + else{ + initDate=null; + dateToShow = new Date(); + } + $(domElement).fullCalendar({ + header : { + left : 'prev,next', + center : 'title', + right : 'today, month, agendaWeek, agendaDay' + }, + lang : mainLanguage, + year : dateToShow.getFullYear(), + month : dateToShow.getMonth(), + date : dateToShow.getDate(), + //gotoDate:moment(initDate), + editable : false, + eventBackgroundColor: '#FFA200', + textColor: '#fff', + defaultView: initMode, + events : calendarObject, + eventLimit: true, + timezone : 'local', + /*select: function (start, end, jsEvent) { + closePopovers(); + popoverElement = $(jsEvent.target); + $(jsEvent.target).popover({ + title: 'the title', + content: function () { + return $("#popoverContent").html(); + }, + template: popTemplate, + placement: 'left', + html: 'true', + trigger: 'click', + animation: 'true', + container: 'body' + }).popover('show'); + },*/ + eventClick: function (calEvent, jsEvent, view) { + //closePopovers(); + // calendar.showPopup=true; + console.log(jsEvent); + popoverElement = $(jsEvent.currentTarget); + + + }, + eventRender:function(event, element, view) { + console.log("event",event,"element",element); + popupHtml=calendar.popupHtml(event); + element.popover({ + html:true, + animation: true, + container:'body', + title: event.name, + template:calendar.popupTemplate(), + placement: 'top', + trigger: 'focus', + content: popupHtml, + }); + element.attr('tabindex', -1); + // $("#popup"+event.id).mouseout(function(){ + // $(this).remove(); + //}); + //element.find(".fc-content").css("background-color", calendar.templateColor[event.type]); + }, + /*eventClick : function(calEvent, jsEvent, view) { + //show event in subview + dateToShow = calEvent.start; + urlCtrl.loadByHash("#page.type.events.id."+calEvent._id); + }*/ + }); + calendar.setCategoryColor(calendar.tabOrganiser); + calendar.bindEventCalendar(); + dateToShow = new Date(); + }, + setCategoryColor : function(tab){ + $(".fc-content").css("color", "white"); + for(var i =0; i<tab.length; i++){ + $("."+tab[i]+" .fc-content").css("color", "white"); + $("."+tab[i]+" .fc-content").css("background-color", calendar.templateColor[i]); + } + }, + getRandomColor : function() { + var letters = '0123456789ABCDEF'.split(''); + var color = '#'; + for (var i = 0; i < 6; i++ ) { + color += letters[Math.floor(Math.random() * 16)]; + } + return color; + }, + popupTemplate : function(){ + template='<div class="popover" style="max-width:300px; no-padding" >'+ + '<div class="arrow"></div>'+ + '<div class="popover-header" style="background-color:lightgray;">'+ + '<button id="closepopover" type="button" class="close margin-right-5" aria-hidden="true">×</button>'+ + '<h3 class="popover-title"></h3>'+ + '</div>'+ + '<div class="popover-content no-padding"></div>'+ + '</div>'; + return template; + }, + popupHtml : function(data){ + console.log("eventPopup",data); + var popupContent = "<div class='popup-calendar'>"; + + var color = "orange"; + var ico = 'calendar'; + var imgProfilPath = assetPath + "/images/thumb/default_events.png"; + if(typeof data.profilMediumImageUrl !== "undefined" && data.profilMediumImageUrl != "") + imgProfilPath = baseUrl + data.profilMediumImageUrl; + var icons = '<i class="fa fa-'+ ico + ' text-'+ color +'"></i>'; + + var typeElement = "events"; + var icon = 'fa-calendar'; + + var onclick = ""; + var url = '#page.type.'+typeElement+'.id.'+data.id; + onclick = 'calendar.closePopovers();urlCtrl.loadByHash("'+url+'");'; + + popupContent += "<div class='' id='popup"+data.id+"'>"; + popupContent += "<div class='main-panel'>" + + "<div class='col-md-12 col-sm-12 col-xs-12 no-padding'>" + + "<div class='thumbnail-profil' style='max-height: 200px;text-align: -webkit-center; overflow-y: hidden;background-color: #cccccc;'><img src='" + imgProfilPath + "' class='popup-info-profil-thumb img-responsive'></div>" + + "</div>" + + "<div class='col-md-12 col-sm-12 col-xs-12 padding-5'>"; + + if("undefined" != typeof data.title) + popupContent += "<div class='' style='text-transform:uppercase;'>" + data.title + "</div>"; + + if(data.start != null){ + popupContent +="<div style='color:#777'>"; + startLbl="<i class='fa fa-calendar-o'></i> "; + startDate=moment(data.start).format("DD MMMM YYYY"); + endDate=""; + hoursStr="<br/>"; + if(data.allDay) + hoursStr+=tradDynForm.allday; + else + hoursStr+="<i class='fa fa-clock-o'></i> "+moment(data.start).format("H:mm"); + if(data.end != null){ + if(startDate != moment(data.end).format("DD MMMM YYYY")){ + startLbl+=trad.fromdate+" "; + endDate=" "+trad.todatemin+" "+moment(data.end).format("DD MMMM YYYY"); + } + if(!data.allDay) + hoursStr+= " - "+moment(data.end).format("H:mm"); + } + popupContent += startLbl+startDate+endDate+hoursStr; + popupContent +="</div>"; + } + popupContent += "</div>"; + //Short description + if ("undefined" != typeof data['shortDescription'] && data['shortDescription'] != "" && data['shortDescription'] != null) { + popupContent += "<div id='pop-description' class='popup-section'>" + + "<div class='popup-info-profil'>" + data['shortDescription'] + "</div>" + + "</div>"; + } + //Contacts information + // popupContent += this.getPopupContactsInformation(data); + //address +// popupContent += this.getPopupAddressInformation(data); + // popupContent += directory.getDateFormated(data,true); + + popupContent += '</div>'; + + + + popupContent += "<a href='"+url+"' onclick='"+onclick+"' class='lbh'>"; + popupContent += '<div class="btn btn-sm btn-more col-md-12 col-sm-12 col-xs-12"><i class="fa fa-hand-pointer-o"></i> en savoir +</div>'; + popupContent += '</a>'; + + return popupContent; + } +} \ No newline at end of file diff --git a/assets/js/default/circuit.js b/assets/js/default/circuit.js new file mode 100644 index 0000000000000000000000000000000000000000..9a1c75c749985fddfe2199fa03a7a20169a93ac1 --- /dev/null +++ b/assets/js/default/circuit.js @@ -0,0 +1,534 @@ +var circuit = { + obj:{ + show:false, + name:"", + description:"", + capacity:12, + frequency:"", + countQuantity:0, + total : 0, + services:{} + }, + init:function(){ + return { + show:false, + name:"", + description:"", + capacity:12, + frequency:"", + countQuantity:0, + total : 0, + services:{} + }; + }, + addToCircuit: function(id, type, ranges){ + incCart=true; + if(typeof userId != "undefined" && userId != ""){ + //if(typeof circuit.obj[type] == "undefined") + // shopping.cart[type]=new Object; + //if(type=="services" ){ + if(typeof circuit.obj.services[type]=="undefined") + circuit.obj.services[type]=new Object; + + if(typeof circuit.obj.services[type][id]=="undefined"){ + params={ + name : element.name, + providerId : element.parentId, + providerName : element.name, + providerType : element.parentType, + price : element.price, + countQuantity:1 + }; + if(typeof element.imgProfil != "undefined") + params.imgProfil=element.imgProfil; + if(typeof element.description != "undefined") + params.description=element.description; + if(typeof element.capacity != "undefined") + params.capacity=element.capacity; + if(notNull(type)) + params.type=type; + circuit.obj.services[type][id]=params; + } + else{ + circuit.obj.services[type][id]["countQuantity"]++; + incCart=false; + } + if(typeof ranges != "undefined" && notNull(ranges)){ + + if(typeof circuit.obj.services[type][id]["reservations"] == "undefined") + circuit.obj.services[type][id]["reservations"]=new Object; + + if(typeof circuit.obj.services[type][id]["reservations"][ranges.date] == "undefined"){ + circuit.obj.services[type][id]["reservations"][ranges.date] = {"countQuantity":1}; + }else{ + circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]++; + incCart=false; + } + if(typeof ranges.hours != "undefined"){ + ranges.hours.countQuantity=1; + if(typeof circuit.obj.services[type][id]["reservations"][ranges.date]["hours"] == "undefined") + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"]=[]; + + if(jQuery.isEmptyObject(circuit.obj.services[type][id]["reservations"][ranges.date]["hours"])){ + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"].push(ranges.hours); + }else{ + hoursInArray=false; + $.each(circuit.obj.services[type][id]["reservations"][ranges.date]["hours"], function(e,v){ + if(v.start==ranges.hours.start && v.end==ranges.hours.end){ + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]++; + hoursInArray=true; + } + }); + if(!hoursInArray) + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"].push(ranges.hours); + } + } + } + if(incCart) + circuit.countCircuit(true); + localStorage.setItem("circuit",JSON.stringify(circuit.obj)); + }else{ + $('#modalLogin').modal("show"); + } + }, + removeFromCircuit:function(id, type, deleteAll, ranges){ + incCart=false; + if(typeof userId != "undefined" && userId != ""){ + //if(type=="services" ){ + if(circuit.obj.services[type][id]["countQuantity"]==1 || (deleteAll && ranges==null)){ + delete circuit.obj.services[type][id]; + incCart=true; + }else{ + if(!deleteAll) + circuit.obj.services[type][id]["countQuantity"]--; + if(typeof ranges != "undefined" && notNull(ranges)){ + console.log(ranges); + if(deleteAll && typeof ranges.hours == "undefined"){ + removeQuantityDate=circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]; + delete circuit.obj.services[type][id]["reservations"][ranges.date]; + }else{ + if(circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]==1){ + delete circuit.obj.services[type][id]["reservations"][ranges.date]; + }else{ + if(!deleteAll) + circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]--; + if(typeof ranges.hours != "undefined"){ + $.each(circuit.obj.services[type][id]["reservations"][ranges.date]["hours"], function(e,v){ + if(typeof v != "undefined"){ + if(v.start==ranges.hours.start && v.end==ranges.hours.end){ + if(deleteAll){ + removeQuantityHours=circuit.obj.services[type][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]; + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"].splice(e,1); + }else{ + if(v.countQuantity==1) + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"].splic(e,1); + else + circuit.obj.services[type][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]--; + } + } + } + }); + if(typeof removeQuantityHours != "undefined"){ + circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]=circuit.obj.services[type][subType][id]["reservations"][ranges.date]["countQuantity"]-removeQuantityHours; + circuit.obj.services[type][id]["countQuantity"]=circuit.obj.services[type][id]["countQuantity"]-removeQuantityHours; + if(circuit.obj.services[type][id]["reservations"][ranges.date]["countQuantity"]==0){ + delete circuit.obj.services[type][id]["reservations"][ranges.date]; + } + if(circuit.obj.services[type][id]["countQuantity"]==0){ + delete circuit.obj.services[type][id]; + incCart=true; + } + } + } + } + } + if(typeof removeQuantityDate != "undefined"){ + circuit.obj.services[type][id]["countQuantity"]=circuit.obj.services[type][id]["countQuantity"]-removeQuantityDate; + if(circuit.obj.services[type][id]["countQuantity"]==0){ + delete circuit.obj.services[type][id]; + incCart=true; + } + } + } + } + /*}else{ + if(deleteAll){ + delete shopping.cart[type][id]; + incCart=true; + }else{ + if(shopping.cart[type][id].countQuantity==1){ + incCart=true; + delete shopping.cart[type][id]; + }else{ + shopping.cart[type][id].countQuantity--; + } + } + }*/ + if(incCart) + circuit.countCircuit(false); + localStorage.setItem("circuit",JSON.stringify(circuit.obj)); + }else{ + $('#modalLogin').modal("show"); + } + }, + addEvent : function($this,data){ + bookDate=data.start.format('YYYY-MM-DD'); + var ranges = new Object; + ranges.date=bookDate; + $this.find(".add-session").addClass("hide"); + $this.find(".remove-session").removeClass("hide"); + if(typeof data.allDay == "undefined" || !data.allDay) + ranges.hours={start: data.startTime , end: data.endTime}; + circuit.addToCircuit(itemId, subType, ranges); + //availableCal.push(data); + }, + removeEvent: function($this,data){ + bookDate=data.start.format('YYYY-MM-DD'); + //if(data.capacity > 0) + $this.find(".remove-session").addClass("hide"); + $this.find(".add-session").removeClass("hide"); + /*$this.find(".add-session").off().on("click", function(){ + + });*/ + var ranges = new Object; + ranges.date=bookDate; + if(typeof data.allDay == "undefined" || !data.allDay) + ranges.hours={start: data.startTime , end: data.endTime}; + //availableCal.push(data); + circuit.removeFromCircuit(itemId, subType, false, ranges); + }, + getDayFilter : function(event){ + currentCartFilter=false; + // GET QUANTITY OF CURRENT CART + if(typeof circuit.obj.services != "undefined" + && typeof circuit.obj.services[subType] != "undefined" + && typeof circuit.obj.services[subType][itemId] != "undefined" + && typeof circuit.obj.services[subType][id]["reservations"][event.start.format('YYYY-MM-DD')] != "undefined"){ + if(event.allDay==true){ + currentCartFilter=true; + }else{ + if(typeof circuit.obj.services[subType][id]["reservations"][event.start.format('YYYY-MM-DD')]["hours"] != "undefined"){ + $.each(circuit.obj.services[subType][id]["reservations"][event.start.format('YYYY-MM-DD')]["hours"],function(e,v){ + if(v.start==event.startTime && v.end==event.endTime) + currentCartFilter=true; + }); + } + } + } + return currentCartFilter; + }, + countCircuit:function(pos){ + if(pos != "init"){ + if(pos) + circuit.obj.countQuantity++; + else + circuit.obj.countQuantity--; + } + + if(circuit.obj.show) + $('.btn-circuit').removeClass('hide'); + else + $('.btn-circuit').addClass('hide'); + + if(circuit.obj.countQuantity > 0){ + $(".circuit-count").html(circuit.obj.countQuantity); + $('.circuit-count').removeClass('hide'); + $('.circuit-count').addClass('animated bounceIn'); + $('.circuit-count').addClass('badge-success'); + $('.circuit-count').removeClass('badge-tranparent'); + }else{ + $('.circuit-count').addClass('hide'); + $('.circuit-count').removeClass('badge-success'); + $('.circuit-count').addClass('badge-tranparent'); + } + }, + initHeaderCircuit : function(object){ + $(".circuitsInfo #name, #circuitNameHeader").text(object.name); + $(".circuitsInfo #description").text(object.description); + $(".circuitsInfo #capacity .capacityValue").text(object.capacity); + $(".circuitsInfo #frequency .frequencyValue").text(object.frequency); + $(".circuitsInfo #total .totalValue").text(totalCircuit); + }, + generateEmptyCircuitView:function(){ + str="<span>Le circuit est vide</span><br/>"+ + "<a href='#activities' class='btn bg-orange lbh'>Continue circuit</a>"; + return str; + }, + generateCircuitView:function(object){ + // In process of construction of circuit, initialization of start and end circuit + if(circuit.obj.show){ + delete circuit.obj.start; + delete circuit.obj.end + } + + var htmls = circuit.getComponentsHtml(object,true); + //****************************************** + // CART + //****************************************** + str="<div class='col-md-12'>"; + str+=htmls.strHtml; + str+="</div>"; + return { circuit : str }; + }, + getComponentsHtml:function(object, firstLevel){ + var strHtml = ""; + var editMode=false; + if(typeof object.show != "undefined" && object.show) + editMode=true; + $.each(object.services,function(i,v){ + strHtml += circuit.getItemByCategory(i,v,"services", editMode); + }); + return { "strHtml" : strHtml }; + }, + getItemByCategory:function(label,listItem, type, edit){ + typeHtml=""; + if(Object.keys(listItem).length){ + typeHtml="<div class='col-md-12 col-sm-12 col-xs-12 headerCategory margin-top-20 margin-bottom-10'>"+ + "<h2 class='letter-orange mainTitle text-left'>"+trad[label]+"</h2>"+ + "</div>"; + } + $.each(listItem,function(e,data){ + typeHtml+=circuit.getViewItem(e, data, type, edit); + totalCircuit=totalCircuit+(data.price*data.countQuantity); + }); + return typeHtml; + }, + + getViewItem:function(key, data, type, edit){ + itemId=key; + itemType=type; + s=(data.countQuantity > 1) ? "s" : ""; + itemHtml="<div class='col-md-12 col-sm-12 col-xs-12 contentProduct contentProduct"+itemId+" text-left'>"+ + "<div class='col-md-3 col-sm-3 col-xs-3 no-padding text-center' style='line-height:120px;'>"+data.imgProfil+"</div>"+ + "<div class='col-md-7 col-sm-7 col-xs-7'>"+ + "<h4 class='text-dark'>"+data.name+"</h4>"+ + "<span>"+data.price+" € (for a session per person)</span><br>"+ + "<span>"+data.countQuantity+" session"+s+" booked for this circuit</span><br>"+ + "<span>"+(data.price*data.countQuantity)+" € (for all session per person)</span><br>"; + if(typeof data.description != "undefined" && data.description != "") + itemHtml += "<div class='description'>"+data.description+"</div><br>"; + itemHtml +="</div>"; + if(edit){ + itemHtml += "<div class='col-md-2 col-sm-2 col-xs-2 text-right pull-right'>"+ + "<a href='javascript:;' class='btn btn-link' onclick='circuit.removeInCircuit(\""+itemId+"\", \""+itemType+"\",true,\""+data.type+"\");'>"+ + "<i class='fa fa-trash fa-2x'></i>"+ + "</a>"+ + "</div>"; + } + if(typeof data.reservations != "undefined"){ + itemHtml += "<div class='col-md-12 col-sm-12 col-xs-12 dateHoursDetail no-padding margin-top-15'>"; + $.each(data.reservations, function(date, value){ + dateStr=directory.getDateFormated({startDate:date}, true); + if(circuit.obj.show && circuit.obj.frequency=="unique"){ + if(typeof circuit.obj.start == "undefined" || circuit.obj.start==""){ + circuit.obj.start=date; + circuit.obj.end=date; + } + else if(moment(date).unix() < moment(circuit.obj.start).unix()) + circuit.obj.start=date; + else if(moment(date).unix() > moment(circuit.obj.end).unix()) + circuit.obj.end=date; + } + arrayDate=date.split("-"); + itemHtml += "<div class='col-md-4 col-sm-4 col-xs-4 bookDate"+date+" margin-bottom-10'>"+ + "<div class='col-md-12 col-sm-12 col-xs-12 dateHeader shadow2'>"+ + "<h5 class='pull-left margin-bottom-5 no-margin col-md-12 col-sm-12 col-xs-12 no-padding'><i class='fa fa-calendar'></i> "+dateStr+"</h5>"; + if(edit){ + itemHtml += "<br>"+ + "<a href='javascript:;' class='text-red' onclick='circuit.removeInCircuit(\""+itemId+"\", \""+itemType+"\",true,\""+data.type+"\",\""+date+"\");'>"+ + "<i class='fa fa-trash'></i> Remove this date"+ + "</a>"; + } + itemHtml += "</div>"; + + if(typeof value.hours != "undefined"){ + $.each(value.hours, function(key, hours){ + s=(hours.countQuantity > 1) ? "s" : ""; + startHours=hours.start.split(":"); + endHours=hours.end.split(":"); + newObject=new Object; + newObject={ + "name":data.name, + "typeEvent":"others", + "id" : key, + "description" : (data.description && data.description != "" ) ? data.description : "", + "allDay" : false, + "type": "others", + "shortDescription": (data.description && data.description != "" ) ? checkAndCutLongString(data.description,120) : "", + "profilMediumImageUrl": "", + "imgProfil":data.imgProfil, + "adresse": "", + "startDate":new Date(arrayDate[0],arrayDate[1]-1,arrayDate[2],startHours[0],startHours[1]), + "endDate":new Date(arrayDate[0],arrayDate[1]-1,arrayDate[2],endHours[0],endHours[1]), + }; + eventsCircuit.push(newObject); + itemHtml += "<div class='col-md-12 col-sm-12 col-xs-12 margin-bottom-5 padding-5 contentHoursSession'>"+ + "<h4 class='col-md-4 col-sm-4 col-xs-3 no-padding no-margin'><i class='fa fa-clock-o'></i> "+hours.start+" - "+hours.end+"</h4>"; + if(edit){ + itemHtml += "<div class='pull-right'>"+ + "<a href='javascript:;' class='text-red' onclick='circuit.removeInCircuit(\""+itemId+"\", \""+itemType+"\",true,\""+data.type+"\",\""+date+"\",\""+hours.start+"\",\""+hours.end+"\");'>"+ + "<i class='fa fa-times'></i>"+ + "</a>"+ + "</div>"; + } + itemHtml +="</div>"; + }); + }else{ + newObject=new Object; + newObject=new Object; + newObject={ + "name":data.name, + "typeEvent":"others", + "id" : key, + "description" : (data.description && data.description != "" ) ? data.description : "", + "allDay" : true, + "type": "others", + "shortDescription": (data.description && data.description != "" ) ? checkAndCutLongString(data.description,120) : "", + "profilMediumImageUrl": "", + "imgProfil":data.imgProfil, + "adresse": "", + "startDate":new Date(arrayDate[0],arrayDate[1]-1,arrayDate[2]), + "endDate":new Date(arrayDate[0],arrayDate[1]-1,arrayDate[2]), + }; + eventsCircuit.push(newObject); + } + itemHtml += "</div>"; + }); + itemHtml += "</div>"; + } + itemHtml += "</div>"; + return itemHtml; + }, + removeInCircuit:function(id, type, deleteAll, subType, date, start, end){ + ranges=null; + if(notNull(date)){ + ranges=new Object; + ranges.date=date; + if(notNull(start)) + ranges.hours={start: start , end: end}; + } + circuit.removeFromCircuit(id, subType, deleteAll, ranges); + circuit.reloadViewCircuit(); + }, + addInCart:function(id, type, subType, date, start, end){ + ranges=null; + if(notNull(date)){ + ranges=new Object; + ranges.date=date; + if(notNull(start)) + ranges.hours={start: start , end: end}; + } + circuit.addToCircuit(id, subType, ranges); + circuit.reloadViewCircuit(); + }, + reloadViewCircuit:function(){ + circuit.obj.total=0; + htmlCart = ""; + if(circuit.obj.countQuantity > 0 ) + html = circuit.generateCircuitView(); + else { + html= circuit.generateEmptyCircuitView(); + } + + $(".contentCircuit").html(html.circuit); + circuit.initHeaderCircuit(); + //bindCartEvent(); + initBtnLink(); + + /*if(openDetails.length > 0){ + $.each(openDetails,function(i,v){ + $(".showDetail"+v).trigger("click"); + }); + }*/ + }, + save:function(){ + delete circuit.obj.show; + circuitParams = circuit.obj; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/circuit/save", + data: circuitParams, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + circuit.obj=circuit.init(); + localStorage.removeItem("circuit"); + circuit.countCircuit("init"); + + urlCtrl.loadByHash("#admin.view.circuits"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + + }, + backup:function(){ + var params = { + object: circuit.obj, + type:"circuits" + }; + delete params.object.show; + if(typeof circuit.obj.backup !="undefined"){ + params.id = circuit.obj.backup; + $.ajax({ + type : "POST", + url : baseUrl+"/"+moduleId+"/backup/update", + data : params, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + circuit.obj=circuit.init(); + localStorage.removeItem("circuit"); + circuit.countCircuit("init"); + urlCtrl.loadByHash("#admin.view.circuits.dir.backups"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + }else{ + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/backup/save", + data: params, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + circuit.obj=circuit.init(); + localStorage.removeItem("circuit"); + circuit.countCircuit("init"); + urlCtrl.loadByHash("#admin.view.circuits.dir.backups"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + } + }, + restartBackup : function(obj, idBackup){ + circuit.obj=obj; + circuit.obj.show=true; + circuit.obj.backup=idBackup; + circuit.countCircuit("init"); + localStorage.setItem("circuit",JSON.stringify(circuit.obj)); + smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/pod/circuit"); + }, + goToShoppingCart:function(obj, bookingFor){ + shopping.cart=obj; + shopping.cart.bookingFor=bookingFor; + shopping.cart.idCircuit=obj._id.$id; + delete shopping.cart.frequency; + delete shopping.cart._id; + delete shopping.cart.description; + delete shopping.cart.capacity; + shopping.countShoppingCart("init"); + localStorage.setItem("shoppingCart",JSON.stringify(shopping.cart)); + smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/person/shoppingcart"); + toastr.success("You finalize your purchase now"); + } +} diff --git a/assets/js/default/directory.js b/assets/js/default/directory.js index 7bfe7bec6cca2f5be6112da07793c71d29575d61..30b6fec25046e8eb49e5ac1eec3c082cabcd88aa 100644 --- a/assets/js/default/directory.js +++ b/assets/js/default/directory.js @@ -1328,7 +1328,11 @@ var directory = { var devise = (typeof params.devise != "undefined") ? params.devise : ""; if(typeof params.price != "undefined" && params.price != "") +<<<<<<< HEAD str += "<div class='entityPrice text-azure'><i class='fa fa-money'></i>pp " + params.price + " " + devise + "</div>"; +======= + str += "<div class='entityPrice text-azure'><i class='fa fa-money'></i> " + params.price + " " + devise + "</div>"; +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla if(typeof params.category != "undefined"){ str += "<div class='entityType'><span class='uppercase bold'>" + tradCategory[params.section] + "</span> > " + tradCategory[params.category]; @@ -1379,7 +1383,11 @@ var directory = { if(directory.dirLog) mylog.log("----------- classifiedPanelHtml",params,params.name); str = ""; +<<<<<<< HEAD str += "<div class='col-lg-6 col-md-12 col-sm-12 col-xs-12 searchEntityContainer "+params.type+params.id+" "+params.type+" "+params.elTagsList+" '>"; +======= + str += "<div class='col-lg-12 col-md-12 col-sm-12 col-xs-12 searchEntityContainer "+params.type+params.id+" "+params.type+" "+params.elTagsList+" '>"; +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla str += "<div class='searchEntity' id='entity"+params.id+"'>"; // directory.colPos = directory.colPos == "left" ? "right" : "left"; @@ -1397,7 +1405,11 @@ var directory = { str += "<div class='padding-10 informations'>"; +<<<<<<< HEAD str += "<div class='entityRight no-padding'>"; +======= + str += "<div class='entityRight padding-5'>"; +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla /*if(typeof params.size == "undefined" || params.size == "max"){ str += "<div class='entityCenter no-padding'>"; @@ -1434,7 +1446,11 @@ var directory = { // str += "<div class='entityPrice col-md-6'><span class='price-trunc'>"+ Math.trunc(params.price) + "</span> " + devise + "</div>"; str += "<a href='"+params.hash+"' class='showMore btn bg-orange text-white lbhp' data-modalshow='"+params.id+"'>"+ +<<<<<<< HEAD "Show +"+ +======= + tradDynForm["show"] + "+" + +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla "</a>"; str += "</div>"; @@ -1444,6 +1460,7 @@ var directory = { str += "</div>"; return str; }, +<<<<<<< HEAD // storePanelHtml : function(params){ // if(directory.dirLog) mylog.log("----------- storePanelHtml",params,params.name); @@ -1484,6 +1501,77 @@ var directory = { // str += "</div>"; // return str; // }, +======= + storePanelHtml : function(params){ + if(directory.dirLog) mylog.log("----------- classifiedPanelHtml",params,params.name); + + str = ""; + str += "<div class='col-lg-3 col-md-4 col-sm-4 col-xs-12 searchEntityContainer "+params.type+params.id+" "+params.type+" "+params.elTagsList+" '>"; + str += "<div class='searchEntity' id='entity"+params.id+"'>"; + + // directory.colPos = directory.colPos == "left" ? "right" : "left"; + + /* if(params.updated != null ) + str += "<div class='dateUpdated'><i class='fa fa-flash'></i> <span class='hidden-xs'>publié </span>" + + params.updated + + "</div>";*/ + if(typeof userId != "undefined" && params.creator == userId) + params.hash=params.hash+'.view.show'; + //if(typeof params.size == "undefined" || params.size == "max") + str += "<a href='"+params.hash+"' class='container-img-profil lbhp add2fav' data-modalshow='"+params.id+"'>" + + params.imgProfil + + "</a>"; + + str += "<div class='padding-10 informations'>"; + + str += "<div class='entityRight no-padding'>"; + + /*if(typeof params.size == "undefined" || params.size == "max"){ + str += "<div class='entityCenter no-padding'>"; + str += "<a href='"+params.hash+"' class='lbhp add2fav' data-modalshow='"+params.id+"'>" + params.htmlIco + "</a>"; + str += "</div>"; + }*/ + + /*str += "<button id='btn-share-event' class='text-dark btn btn-link no-padding margin-left-10 btn-share pull-right'"+ + " data-ownerlink='share' data-id='"+params.id+"' data-type='"+params.type+"'>"+ + "<i class='fa fa-share'></i> Partager</button>";*/ + + /* if(typeof params.category != "undefined"){ + str += "<div class='entityType'><span class='uppercase bold'>" + params.section + "</span> > " + params.category; + if(typeof params.subtype != "undefined") str += " > " + params.subtype; + str += "</div>"; + }*/ + + /* var iconFaReply = notEmpty(params.parent) ? "<i class='fa fa-reply fa-rotate-180'></i> " : ""; + str += "<a href='"+params.hash+"' class='"+params.size+" entityName text-dark lbhp add2fav' data-modalshow='"+params.id+"'>"+ + iconFaReply + params.name + + "</a>";*/ + + + if(typeof params.name != "undefined" && params.name != "") + str += "<div class='entityName'>" + params.name + "</div>"; + + if(typeof params.description != "undefined" && params.description != "") + str += "<div class='entityDescription'>" + params.description + "</div>"; + str += "</div>"; + str += "<div class='entityRight no-padding price'>"; + str += "<hr class='margin-bottom-10 margin-top-10'>"; + var devise = typeof params.devise != "undefined" ? params.devise : "€"; + if(typeof params.price != "undefined" && params.price != "") + str += "<div class='entityPrice col-md-6'><span class='price-trunc'>"+ Math.trunc(params.price) + "</span> " + devise + "</div>"; + + str += "<a href='"+params.hash+"' class='showMore btn bg-orange text-white lbhp' data-modalshow='"+params.id+"'>"+ + tradTerla.show+" +"+ + "</a>"; + + str += "</div>"; + str += "</div>"; + str += "</div>"; + + str += "</div>"; + return str; + }, +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla // ******************************** // EVENT DIRECTORY PANEL // ******************************** @@ -2168,11 +2256,16 @@ var directory = { if(domainName=="terla"){ if(params.type=="circuits") str += directory.circuitPanelHtml(params); +<<<<<<< HEAD else{ if(notNull(contextData)) $("#headerServices").html(contextData.name); str += directory.storePanelHtml(params); } +======= + else + str += directory.storePanelHtml(params); +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla //template principal }else{ if(params.type == "cities") diff --git a/assets/js/default/editInPlace.js b/assets/js/default/editInPlace.js new file mode 100644 index 0000000000000000000000000000000000000000..204183d71663c21fa49a00d8975ba040e760f487 --- /dev/null +++ b/assets/js/default/editInPlace.js @@ -0,0 +1,996 @@ +function bindAboutPodElement() { + $("#editGeoPosition").click(function(){ + Sig.startModifyGeoposition(contextData.id, contextData.type, contextData); + showMap(true); + }); + + $("#editElementDetail").on("click", function(){ + switchModeElement(); + }); +} + + function changeHiddenFields() { + mylog.log("-----------------changeHiddenFields----------------------"); + // + listFields = [ "username", "birthDate", "email", "avancement", "url", "fixe", + "mobile","fax", "facebook", "twitter", "gpplus", "github", "skype", "telegram"]; + + $.each(listFields, function(i,value) { + mylog.log("listFields", value, typeof contextData[value]); + if(typeof contextData[value] != "undefined" && contextData[value].length == 0) + $("."+value).val("<i>"+trad.notSpecified+"<i>"); + }); + mylog.log("-----------------changeHiddenFields END----------------------"); + } + + function updateCalendar() { + if(contextData.type == typeObj.event.col){ + getAjax(".calendar",baseUrl+"/"+moduleId+"/event/calendarview/id/"+contextData.id +"/pod/1?date=1",null,"html"); + } + } + + function removeAddresses (index, formInMap){ + + bootbox.confirm({ + message: trad.suredeletelocality+"<span class='text-red'></span>", + buttons: { + confirm: { + label: trad.yes, + className: 'btn-success' + }, + cancel: { + label: trad.no, + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + var addresses = { addressesIndex : index }; + var param = new Object; + param.name = "addresses"; + param.value = addresses; + param.pk = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + + if(formInMap == true){ + $(".locationEl"+ index).remove(); + dyFInputs.locationObj.elementLocation = null; + dyFInputs.locationObj.elementLocations.splice(ix,1); + //TODO check if this center then apply on first + //$(".locationEl"+dyFInputs.locationObj.countLocation).remove(); + } + else + urlCtrl.loadByHash(location.hash); + } + } + }); + } + } + }); + } + + function bindDynFormEditable(){ + $(".btn-update-when").off().on( "click", function(){ + var form = { + saveUrl : baseUrl+"/"+moduleId+"/element/updateblock/", + dynForm : { + jsonSchema : { + + title : trad["Update date"], + icon : "fa-key", + onLoads : { + initUpdateWhen : function(){ + mylog.log("initUpdateInfo"); + $("#ajax-modal .modal-header").removeClass("bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + } + }, + beforeSave : function(){ + mylog.log("beforeSave"); + var allDay = $("#ajaxFormModal #allDay").is(':checked'); + $("#ajaxFormModal #allDayHidden").val(allDay); + removeFieldUpdateDynForm(contextData.type); + + var dateformat = "DD/MM/YYYY"; + //var outputFormat="YYYY-MM-DD"; + if (! allDay && contextData.type == typeObj.event.col) { + var dateformat = "DD/MM/YYYY HH:mm" ; + //var outputFormat="YYYY-MM-DD HH::mm"; + } + // $("#ajaxFormModal #startDate").val( moment( $("#ajaxFormModal #startDate").val(), dateformat).format(outputFormat)); + // $("#ajaxFormModal #endDate").val( moment( $("#ajaxFormModal #endDate").val(), dateformat).format(outputFormat)); + $("#ajaxFormModal #startDate").val( moment( $("#ajaxFormModal #startDate").val(), dateformat).format()); + $("#ajaxFormModal #endDate").val( moment( $("#ajaxFormModal #endDate").val(), dateformat).format()); + }, + + afterSave : function(data){ + mylog.dir(data); + if(data.result&& data.resultGoods && data.resultGoods.result){ + if(typeof data.resultGoods.values.allDay != "undefined"){ + contextData.allDay = data.resultGoods.values.allDay; + + $("#allDayAbout").html((contextData.allDay ? trad["yes"] : trad["no"])); + } + if(typeof data.resultGoods.values.startDate != "undefined"){ + contextData.startDate = data.resultGoods.values.startDate; + //$("#startDateAbout").html(moment(contextData.startDate).local().locale("fr").format(formatDateView)); + //$("#startDateAbout").html(directory.returnDate(contextData.startDate, formatDateView)); + } + if(typeof data.resultGoods.values.endDate != "undefined"){ + contextData.endDate = data.resultGoods.values.endDate; + //$("#endDateAbout").html(moment(contextData.endDate).local().locale("fr").format(formatDateView)); + //$("#endDateAbout").html(directory.returnDate(contextData.endDate, formatDateView)); + } + initDateHeaderPage(contextData); + initDate(); + updateCalendar(); + } + //urlCtrl.loadByHash(location.hash); + dyFObj.closeForm(); + }, + properties : { + block : dyFInputs.inputHidden(), + typeElement : dyFInputs.inputHidden(), + isUpdate : dyFInputs.inputHidden(true) + } + } + } + }; + + var typeDate = "date"; + if(contextData.type == typeObj.event.col){ + var checked = (notNull(contextData.allDay) && contextData.allDay == true) ? true : false ; + form.dynForm.jsonSchema.properties.allDay = dyFInputs.allDay(checked); + form.dynForm.jsonSchema.properties.allDayHidden = dyFInputs.inputHidden(checked); + mylog.log("allDay", checked) + if(checked == false ) + typeDate = "datetime"; + + } + + + form.dynForm.jsonSchema.properties.startDate = dyFInputs.startDateInput(typeDate); + form.dynForm.jsonSchema.properties.endDate = dyFInputs.endDateInput(typeDate); + + var dataUpdate = { + block : "when", + id : contextData.id, + typeElement : contextData.type, + }; + + if(notEmpty(contextData.startDateDB)) + dataUpdate.startDate = moment(contextData.startDateDB/*,"YYYY-MM-DD HH:mm"*/).local().format(formatDatedynForm); + + if(notEmpty(contextData.endDateDB)) + dataUpdate.endDate = moment(contextData.endDateDB/*,"YYYY-MM-DD HH:mm"*/).local().format(formatDatedynForm); + + mylog.log("btn-update-when", form, dataUpdate, formatDatedynForm); + dyFObj.openForm(form, "initUpdateWhen", dataUpdate); + }); + + + $(".btn-update-info").off().on( "click", function(){ + var form = { + saveUrl : baseUrl+"/"+moduleId+"/element/updateblock/", + dynForm : { + jsonSchema : { + title : trad["Update general information"], + icon : "fa-key", + type: "object", + onLoads : { + initUpdateInfo : function(){ + mylog.log("initUpdateInfo"); + $(".emailOptionneltext").slideToggle(); + $("#ajax-modal .modal-header").removeClass("bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + } + }, + beforeSave : function(){ + mylog.log("beforeSave"); + removeFieldUpdateDynForm(contextData.type); + }, + afterSave : function(data){ + mylog.dir(data); + if(data.result&& data.resultGoods && data.resultGoods.result){ + + if(typeof data.resultGoods.values.name != "undefined"){ + contextData.name = data.resultGoods.values.name; + $("#nameHeader > .name-header").html(contextData.name); + $("#nameAbout").html(contextData.name); + } + + if(typeof data.resultGoods.values.username != "undefined"){ + contextData.username = data.resultGoods.values.username; + $("#usernameAbout").html(contextData.username); + } + + if(typeof data.resultGoods.values.tags != "undefined"){ + contextData.tags = data.resultGoods.values.tags; + var strHeader = ""; + var strAbout = trad["notSpecified"]; + if($('.header-tags').length && typeof contextData.tags != "undefined" && contextData.tags.length > 0){ + strAbout = "" ; + $.each(contextData.tags, function (key, tag){ + /*str += '<div class="tag label label-danger pull-right" data-val="'+tag+'">'+ + '<i class="fa fa-tag"></i>'+tag+ + '</div>';*/ + strHeader += '<span class="badge letter-red bg-white" style="vertical-align: top;">#'+tag+'</span>'; + /*if(typeof globalTheme == "undefined" || globalTheme != "network") + addTagToMultitag(tag);*/ + strAbout += '<span class="badge letter-red bg-white">'+tag+'</span>'; + }); + } + $('.header-tags').html(strHeader); + $('#tagsAbout').html(strAbout); + if(strHeader == "" && typeof contextData.address == "undefined") + $('.header-address-tags').addClass("hidden"); + else + $('.header-address-tags').removeClass("hidden"); + + if(strHeader == "") + $('#separateurTag').addClass("hidden"); + else + $('#separateurTag').removeClass("hidden"); + + } + + if(typeof data.resultGoods.values.avancement != "undefined"){ + contextData.avancement = data.resultGoods.values.avancement.trim(); + val=0; + if(contextData.avancement=="idea") + val=5; + else if(contextData.avancement=="concept") + val=20; + else if (contextData.avancement== "started") + val=40; + else if (contextData.avancement == "development") + val=60; + else if (contextData.avancement == "testing") + val=80; + else if (contextData.avancement == "mature") + val=100; + $('#progressStyle').val(val); + $('#labelProgressStyle').html(contextData.avancement); + $('#avancementAbout').html(trad[contextData.avancement] ); + } + + if(typeof data.resultGoods.values.type != "undefined"){ + + if(contextData.type == typeObj.organization.col ){ + contextData.typeOrga = data.resultGoods.values.type; + $(".pastille-type-element").removeClass("bg-azure bg-red bg-green bg-turq").addClass("bg-"+typeObj[contextData.typeOrga]["color"]); + $("#nameHeader").find("i").removeClass("fa-university fa-industry fa-users fa-group").addClass("fa-"+typeObj[contextData.typeOrga]["icon"]); + } + else + contextData.typeEvent = data.resultGoods.values.type; + //$("#typeHeader").html(data.resultGoods.values.type); + $("#typeAbout").html(tradCategory[data.resultGoods.values.type]); + $("#typeHeader .type-header").html(tradCategory[data.resultGoods.values.type]); + } + + if(typeof data.resultGoods.values.email != "undefined"){ + mylog.log("update email"); + contextData.email = data.resultGoods.values.email; + $("#emailAbout").html(contextData.email); + } + + if(typeof data.resultGoods.values.url != "undefined"){ + mylog.log("update url"); + contextData.url = data.resultGoods.values.url.trim(); + if(contextData.url != "" ){ + $("#webAbout").html('<a href="'+contextData.url+'" target="_blank" id="urlWebAbout" style="cursor:pointer;">'+contextData.url+'</a>'); + }else{ + $("#webAbout").html("<i>"+trad["notSpecified"]+"</i>"); + } + } + + if(typeof data.resultGoods.values.birthDate != "undefined"){ + mylog.log("update birthDate"); + contextData.birthDate = data.resultGoods.values.birthDate; + $("#birthDateAbout").html(moment(contextData.birthDate).local().format("DD/MM/YYYY")); + } + + if(typeof data.resultGoods.values.fixe != "undefined"){ + mylog.log("update fixe"); + contextData.fixe = parsePhone(data.resultGoods.values.fixe); + $("#fixeAbout").html(contextData.fixe); + } + + if(typeof data.resultGoods.values.mobile != "undefined"){ + mylog.log("update mobile"); + contextData.mobile = parsePhone(data.resultGoods.values.mobile); + $("#mobileAbout").html(contextData.mobile); + } + + if(typeof data.resultGoods.values.fax != "undefined"){ + mylog.log("update fax"); + contextData.fax = parsePhone(data.resultGoods.values.fax); + $("#faxAbout").html(contextData.fax); + } + + if(typeof data.resultGoods.values.parent != "undefined"){ + mylog.log("modif parent", data.resultGoods.values.parent); + contextData.parent = data.resultGoods.values.parent.parent; + contextData.parentId = data.resultGoods.values.parent.parentId; + contextData.parentType = data.resultGoods.values.parent.parentType; + + var htmlAbout = "<i>"+trad["notSpecified"]+"</i>"; + var htmlHeader = ""; + + if(notEmpty(contextData.parentId)){ + htmlAbout = '<a href="#page.type.'+contextData.parentType+'.id.'+contextData.parentId+'" class="lbh">'+ + '<i class="fa fa-'+dyFInputs.get(contextData.parentType).icon+'"></i> '+ + contextData.parent.name+'</a><br/>'; + + htmlHeader =((contextData.type == typeObj.event.col) ? trad["Planned on"] : trad.carriedby ) ; + htmlHeader += htmlAbout; + } + + $("#parentAbout").html(htmlAbout); + $("#parentHeader").html(htmlHeader); + } + + if(typeof data.resultGoods.values.organizer != "undefined"){ + mylog.log("modif organizer", data.resultGoods.values.organizer); + contextData.organizer = data.resultGoods.values.organizer.organizer; + contextData.organizerId = data.resultGoods.values.organizer.organizerId; + contextData.organizerType = data.resultGoods.values.organizer.organizerType; + + var html = "<i>"+trad["notSpecified"]+"</i>"; + var htmlHeader = ""; + + if(notEmpty(contextData.organizerId) && contextData.organizerId!="dontKnow"){ + html = '<a href="#page.type.'+contextData.organizerType+'.id.'+contextData.organizerId+'" class="lbh">'+ + '<i class="fa fa-'+dyFInputs.get(contextData.organizerType).icon+'"></i> '+ + contextData.organizer.name+'</a><br/>'; + htmlHeader = tradDynForm.organizedby + " " + html; + } + + $("#organizerAbout").html(html); + $("#organizerHeader").html(htmlHeader); + } + } + dyFObj.closeForm(); + changeHiddenFields(); + }, + properties : { + block : dyFInputs.inputHidden(), + name : dyFInputs.name(contextData.type), + similarLink : dyFInputs.similarLink, + typeElement : dyFInputs.inputHidden(), + isUpdate : dyFInputs.inputHidden(true) + } + } + } + }; + + if(contextData.type == typeObj.person.col ){ + form.dynForm.jsonSchema.properties.username = dyFInputs.inputText("Username", "Username", { required : true }); + form.dynForm.jsonSchema.properties.birthDate = dyFInputs.birthDate; + } + + if(contextData.type == typeObj.organization.col ){ + form.dynForm.jsonSchema.properties.type = dyFInputs.inputSelect(tradDynForm["organizationType"], tradDynForm["organizationType"], organizationTypes, { required : true }); + }else if(contextData.type == typeObj.event.col ){ + form.dynForm.jsonSchema.properties.type = dyFInputs.inputSelect(tradDynForm["eventTypes"], tradDynForm["eventTypes"], eventTypes, { required : true }); + } + + if(contextData.type == typeObj.project.col ){ + form.dynForm.jsonSchema.properties.avancement = dyFInputs.inputSelect(tradDynForm["theprojectmaturity"], tradDynForm["projectmaturity"], avancementProject); + } + + form.dynForm.jsonSchema.properties.tags = dyFInputs.tags(); + + if(contextData.type == typeObj.person.col || contextData.type == typeObj.organization.col ){ + form.dynForm.jsonSchema.properties.email = dyFInputs.text(); + form.dynForm.jsonSchema.properties.fixe= dyFInputs.inputText(tradDynForm["fix"],tradDynForm["enterfixnumber"]); + form.dynForm.jsonSchema.properties.mobile= dyFInputs.inputText(tradDynForm["mobile"],tradDynForm["entermobilenumber"]); + form.dynForm.jsonSchema.properties.fax= dyFInputs.inputText(tradDynForm["fax"],tradDynForm["enterfaxnumber"]); + } + + if(contextData.type != typeObj.poi.col) + form.dynForm.jsonSchema.properties.url = dyFInputs.inputUrl(); + + + var listParent = ["organizations"] ; + + if(contextData.type == typeObj.event.col) + listParent = ["events"] ; + + if(contextData.type == typeObj.event.col || contextData.type == typeObj.project.col){ + form.dynForm.jsonSchema.properties.parentId = { + label : tradDynForm["ispartofelement"]+" ?", + inputType : "select", + class : "", + placeholder : tradDynForm["ispartofelement"]+" ?", + options : firstOptions(), + "groupOptions" : parentList( listParent, contextData.parentId, contextData.parentType ), + init : function(){ + mylog.log("init ParentId"); + $("#ajaxFormModal #parentId").off().on("change",function(){ + + var selected = $(':selected', this); + mylog.log("change ParentId", selected, selected.data('type')); + $("#ajaxFormModal #parentType").val(selected.data('type')); + }); + } + }; + + form.dynForm.jsonSchema.properties.parentType = dyFInputs.inputHidden(); + } + + if(contextData.type == typeObj.event.col){ + form.dynForm.jsonSchema.properties.organizerId = dyFInputs.organizerId(contextData.parentId, contextData.parentType); + form.dynForm.jsonSchema.properties.organizerType = dyFInputs.inputHidden(); + } + + + var dataUpdate = { + block : "info", + id : contextData.id, + typeElement : contextData.type, + name : contextData.name, + }; + if(notNull(contextData.slug) && contextData.slug.length > 0) + dataUpdate.slug = contextData.slug; + + if(notNull(contextData.tags) && contextData.tags.length > 0) + dataUpdate.tags = contextData.tags; + + if(contextData.type == typeObj.person.col ){ + if(notNull(contextData.username) && contextData.username.length > 0) + dataUpdate.username = contextData.username; + if(notEmpty(contextData.birthDate)) + dataUpdate.birthDate = moment(contextData.birthDate).local().format("DD/MM/YYYY"); + } + + if(contextData.type == typeObj.organization.col ){ + if(notEmpty(contextData.typeOrga)) + dataUpdate.type = contextData.typeOrga; + } + + if(contextData.type == typeObj.event.col ){ + if(notEmpty(contextData.typeEvent)) + dataUpdate.type = contextData.typeEvent; + } + + if(contextData.type == typeObj.project.col ){ + if(notEmpty(contextData.avancement)) + dataUpdate.avancement = contextData.avancement; + } + + if(contextData.type == typeObj.person.col || contextData.type == typeObj.organization.col ){ + if(notEmpty(contextData.email)) + dataUpdate.email = contextData.email; + if(notEmpty(contextData.fixe)) + dataUpdate.fixe = contextData.fixe; + if(notEmpty(contextData.mobile)) + dataUpdate.mobile = contextData.mobile; + if(notEmpty(contextData.fax)) + dataUpdate.fax = contextData.fax; + } + + if(contextData.type != typeObj.poi.col && notEmpty(contextData.url)) + dataUpdate.url = contextData.url; + + if(notEmpty(contextData.parentId)) + dataUpdate.parentId = contextData.parentId; + else + dataUpdate.parentId = "dontKnow"; + + if(notEmpty(contextData.parentType)) + dataUpdate.parentType = contextData.parentType; + + if(notEmpty(contextData.organizerId)) + dataUpdate.organizerId = contextData.organizerId; + + if(notEmpty(contextData.organizerType)) + dataUpdate.organizerType = contextData.organizerType; + + mylog.log("dataUpdate", dataUpdate); + dyFObj.openForm(form, "initUpdateInfo", dataUpdate); + }); + + $(".btn-update-descriptions").off().on( "click", function(){ + + var form = { + saveUrl : baseUrl+"/"+moduleId+"/element/updateblock/", + dynForm : { + jsonSchema : { + title : trad["Update description"], + icon : "fa-key", + onLoads : { + + markdown : function(){ + dataHelper.activateMarkdown("#ajaxFormModal #description"); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + //bindDesc("#ajaxFormModal"); + } + }, + afterSave : function(data){ + mylog.dir(data); + if(data.result&& data.resultGoods && data.resultGoods.result){ + if(data.resultGoods.values.shortDescription=="") + $(".contentInformation #shortDescriptionAbout").html('<i>'+trad["notSpecified"]+'</i>'); + else + $(".contentInformation #shortDescriptionAbout").html(data.resultGoods.values.shortDescription); + $(".contentInformation #shortDescriptionAboutEdit").html(data.resultGoods.values.shortDescription); + $("#shortDescriptionHeader").html(data.resultGoods.values.shortDescription); + if(data.resultGoods.values.description=="") + $(".contentInformation #descriptionAbout").html(dataHelper.markdownToHtml('<i>'+trad["notSpecified"]+'</i>')); + else + $(".contentInformation #descriptionAbout").html(dataHelper.markdownToHtml(data.resultGoods.values.description)); + $("#descriptionMarkdown").html(data.resultGoods.values.description); + } + dyFObj.closeForm(); + changeHiddenFields(); + }, + properties : { + block : dyFInputs.inputHidden(), + typeElement : dyFInputs.inputHidden(), + isUpdate : dyFInputs.inputHidden(true), + shortDescription : dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }), + description : dyFInputs.textarea(tradDynForm["longDescription"], "..."), + } + } + } + }; + + var dataUpdate = { + block : "descriptions", + id : contextData.id, + typeElement : contextData.type, + name : contextData.name, + shortDescription : $(".contentInformation #shortDescriptionAboutEdit").html(), + description : $("#descriptionMarkdown").html(), + }; + + dyFObj.openForm(form, "markdown", dataUpdate); + }); + + + $(".btn-update-network").off().on( "click", function(){ + var form = { + saveUrl : baseUrl+"/"+moduleId+"/element/updateblock/", + dynForm : { + jsonSchema : { + title : trad["Update network"], + icon : "fa-key", + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + //bindDesc("#ajaxFormModal"); + } + }, + beforeSave : function(){ + mylog.log("beforeSave"); + removeFieldUpdateDynForm(contextData.type); + }, + afterSave : function(data){ + mylog.dir(data); + if(data.result&& data.resultGoods && data.resultGoods.result){ + + if(!notEmpty(contextData.socialNetwork)) + contextData.socialNetwork = {}; + + if(typeof data.resultGoods.values.telegram != "undefined"){ + contextData.socialNetwork.telegram = data.resultGoods.values.telegram.trim(); + changeNetwork('#telegramAbout', contextData.socialNetwork.telegram, 'https://web.telegram.org/#/im?p=@'+contextData.socialNetwork.telegram); + } + + if(typeof data.resultGoods.values.facebook != "undefined"){ + contextData.socialNetwork.facebook = data.resultGoods.values.facebook.trim(); + changeNetwork('#facebookAbout', contextData.socialNetwork.facebook, contextData.socialNetwork.facebook); + } + + if(typeof data.resultGoods.values.twitter != "undefined"){ + contextData.socialNetwork.twitter = data.resultGoods.values.twitter.trim(); + changeNetwork('#twitterAbout', contextData.socialNetwork.twitter, contextData.socialNetwork.twitter); + } + + if(typeof data.resultGoods.values.github != "undefined"){ + contextData.socialNetwork.github = data.resultGoods.values.github.trim(); + changeNetwork('#githubAbout', contextData.socialNetwork.github, contextData.socialNetwork.github); + } + + if(typeof data.resultGoods.values.skype != "undefined"){ + contextData.socialNetwork.skype = data.resultGoods.values.skype.trim(); + changeNetwork('#skypeAbout', contextData.socialNetwork.skype, contextData.socialNetwork.skype); + } + + if(typeof data.resultGoods.values.gpplus != "undefined"){ + contextData.socialNetwork.gpplus = data.resultGoods.values.gpplus.trim(); + changeNetwork('#gpplusAbout', contextData.socialNetwork.gpplus, contextData.socialNetwork.gpplus); + } + } + dyFObj.closeForm(); + changeHiddenFields(); + }, + + properties : { + block : dyFInputs.inputHidden(), + typeElement : dyFInputs.inputHidden(), + isUpdate : dyFInputs.inputHidden(true), + skype : dyFInputs.inputUrl(tradDynForm["linkSkype"]), + github : dyFInputs.inputUrl(tradDynForm["linkGithub"]), + gpplus : dyFInputs.inputUrl(tradDynForm["linkGplus"]), + twitter : dyFInputs.inputUrl(tradDynForm["linkTwitter"]), + facebook : dyFInputs.inputUrl(tradDynForm["linkFacebook"]), + } + } + } + }; + + if(contextData.type == typeObj.person.col ){ + form.dynForm.jsonSchema.properties.telegram = dyFInputs.inputText("Votre Speudo Telegram","Votre Speudo Telegram"); + } + + var dataUpdate = { + block : "network", + id : contextData.id, + typeElement : contextData.type, + }; + + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.twitter)) + dataUpdate.twitter = contextData.socialNetwork.twitter; + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.gpplus)) + dataUpdate.gpplus = contextData.socialNetwork.gpplus; + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.github)) + dataUpdate.github = contextData.socialNetwork.github; + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.skype)) + dataUpdate.skype = contextData.socialNetwork.skype; + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.telegram)) + dataUpdate.telegram = contextData.socialNetwork.telegram; + if(notEmpty(contextData.socialNetwork) && notEmpty(contextData.socialNetwork.facebook)) + dataUpdate.facebook = contextData.socialNetwork.facebook; + + dyFObj.openForm(form, "sub", dataUpdate); + + + }); + } + function updateSlug() { + /*var type=type; + var canEdit=canEdit; + var hasRc=hasRc;*/ + var form = { + saveUrl : baseUrl+"/"+moduleId+"/element/updateblock/", + dynForm : { + jsonSchema : { + title : tradDynForm.updateslug,// trad["Update network"], + icon : "fa-key", + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + //bindDesc("#ajaxFormModal"); + } + }, + beforeSave : function(){ + mylog.log("beforeSave"); + //removeFieldUpdateDynForm(contextData.type); + }, + afterSave : function(data){ + dyFObj.closeForm(); + toastr.success("Votre slug a bien été enregistré"); + strHash=""; + if(location.hash.indexOf(".view")>0){ + hashPage=location.hash.split(".view"); + strHash=".view"+hashPage[1]; + } + location.hash = data.resultGoods.values.slug+strHash; + hashUrlPage="#"+data.resultGoods.values.slug; + contextData.slug=data.resultGoods.values.slug; + //rcObj.loadChat(data.resultGoods.values.slug,type,canEdit,hasRc); + //loadDataDirectory(connectType, "user", true); + //changeHiddenFields(); + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-dark'><i class='fa fa-info-circle'></i> "+tradDynForm.infoslug+"<hr></p>", + }, + block : dyFInputs.inputHidden(), + id : dyFInputs.inputHidden(), + typeElement : dyFInputs.inputHidden(), + slug : dyFInputs.slug(tradDynForm.slug,tradDynForm.slug,{minlength:3/*, uniqueSlug:true*/}), + } + } + } + }; + var dataUpdate = { + block : "info", + id : contextData.id, + typeElement : contextData.type, + slug : contextData.slug, + }; + dyFObj.openForm(form, "sub", dataUpdate); + } + function changeNetwork(id, url, str){ + mylog.log("changeNetwork", id, url, str); + $(id).attr('href', url); + $(id).html(str); + } + + function parsePhone(arrayPhones){ + var str = ""; + $.each(arrayPhones, function(i,num) { + if(str != "") + str += ", "; + str += num.trim(); + }); + return str ; + } + + + /*function bindDesc(parent){ + $(".maxlengthTextarea").off().keyup(function(){ + var name = "#" + $(this).attr("id") ; + mylog.log(".maxlengthTextarea", parent+" "+name, $(this).attr("id"), $(parent+" "+name).val().length, $(this).val().length); + $(parent+" #maxlength"+$(this).attr("id")).html($(parent+" "+name).val().length); + maxlengthshortDescription + }); + }*/ + + + function updateUrl(ind, title, url, type) { + mylog.log("updateUrl", ind, title, url, type); + var params = { + title : title, + type : type, + url : url, + index : ind.toString() + } + mylog.log("params",params); + dyFObj.openForm( 'url','sub', params); + } + function updateRoles(childId, childType, childName, connectType, roles) { + var form = { + saveUrl : baseUrl+"/"+moduleId+"/link/removerole/", + dynForm : { + jsonSchema : { + title : tradDynForm.modifyoraddroles+"<br/>"+childName,// trad["Update network"], + icon : "fa-key", + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + //bindDesc("#ajaxFormModal"); + } + }, + beforeSave : function(){ + mylog.log("beforeSave"); + //removeFieldUpdateDynForm(contextData.type); + }, + afterSave : function(data){ + mylog.dir(data); + dyFObj.closeForm(); + loadDataDirectory(connectType, "user", true); + //changeHiddenFields(); + }, + properties : { + contextId : dyFInputs.inputHidden(), + contextType : dyFInputs.inputHidden(), + roles : dyFInputs.tags(rolesList, tradDynForm["addroles"] , tradDynForm["addroles"]), + childId : dyFInputs.inputHidden(), + childType : dyFInputs.inputHidden(), + connectType : dyFInputs.inputHidden() + } + } + } + }; + + var dataUpdate = { + contextId : contextData.id, + contextType : contextData.type, + childId : childId, + childType : childType, + connectType : connectType, + }; + + if(notEmpty(roles)) + dataUpdate.roles = roles.split(","); + dyFObj.openForm(form, "sub", dataUpdate); + } + function updateBookmark(id) { + mylog.log("updBook",id); + filesUp=files[id]; + var params=new Object; + params.id=id; + if(filesUp.url != "undefined") + params.url=filesUp.url; + if(filesUp.name != "undefined") + params.name=filesUp.name; + if(filesUp.tags != "undefined") + params.tags=filesUp.tags; + if(filesUp.description != "undefined") + params.description=filesUp.description; + mylog.log("params",params); + dyFObj.openForm( 'bookmark','sub', params); + } + + + function updateContact(ind, name, email, role, telephone) { + mylog.log("updateContact", ind, name, email, role, telephone); + dataUpdate = { index : ind.toString() } ; + if(name != "undefined") + dataUpdate.name = name; + if(email != "undefined") + dataUpdate.email = email; + if(role != "undefined") + dataUpdate.role = role; + if(telephone != "undefined") + dataUpdate.phone = telephone; + mylog.log("dataUpdate", dataUpdate); + dyFObj.openForm ('contactPoint','contact', dataUpdate); + } + function updateDocument(id, title) { + mylog.log("updateDocument", id, name); + dataUpdate = { docId : id } ; + if(title != "undefined") + dataUpdate.title = title; + mylog.log("dataUpdate", dataUpdate); + dyFObj.openForm ('document','sub', dataUpdate); + } + + function removeUrl(ind) { + bootbox.confirm({ + message: trad["suretodeletelink"]+"<span class='text-red'></span>", + buttons: { + confirm: { + label: trad["yes"], + className: 'btn-success' + }, + cancel: { + label: trad["no"], + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + param = new Object; + param.name = "urls"; + param.value = {index : ind}; + param.pk = contextData.id; + param.type = contextData.type; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + mylog.log("data", data); + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + } + } + }); + } + } + }); + + } + + function removeContact(ind) { + bootbox.confirm({ + message: trad["suretodeletecontact"]+"<span class='text-red'></span>", + buttons: { + confirm: { + label: trad["yes"], + className: 'btn-success' + }, + cancel: { + label: trad["no"], + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + param = new Object; + param.name = "contacts"; + param.value = {index : ind}; + param.pk = contextData.id; + param.type = contextData.type; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + mylog.log("data", data); + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + } + } + }); + } + } + }); + } + + + function removeFieldUpdateDynForm(collection){ + mylog.log("------------------------ removeFieldUpdateDynForm", collection); + var fieldsElement = [ "name", "slug", "tags", "email", "url", "fixe", "mobile", "fax", + "telegram", "github", "skype", "twitter", "facebook", "gpplus"]; + var fieldsPerson = ["username", "birthDate"]; + var fieldsProject = [ "avancement", "startDate", "endDate", "parentId" ]; + var fieldsOrga = [ "type", "parentId" ]; + var fieldsEvent = [ "type", "startDate", "endDate", "parentId", , "organizerId"]; + + var SNetwork = [ "telegram", "github", "skype", "twitter", "facebook", "gpplus"]; + + if(collection == typeObj.person.col) + fieldsElement = fieldsElement.concat(fieldsPerson); + else if(collection == typeObj.project.col) + fieldsElement = fieldsElement.concat(fieldsProject); + else if(collection == typeObj.organization.col) + fieldsElement = fieldsElement.concat(fieldsOrga) + else if(collection == typeObj.event.col) + fieldsElement = fieldsElement.concat(fieldsEvent); + var valCD = ""; + + + $.each(fieldsElement, function(key, val){ + + valCD = val; + if(val == "type" && collection == typeObj.organization.col) + valCD = "typeOrga"; + else if(val == "type" && collection == typeObj.event.col) + valCD = "typeEvent"; + else if(val == "type" && collection == typeObj.event.col) + valCD = "typeEvent"; + + mylog.log("val", val, valCD); + mylog.log("val2", $("#ajaxFormModal #"+val).length); + if( $("#ajaxFormModal #"+val).length && + ( ( typeof contextData[valCD] != "undefined" && + contextData[valCD] != null && + $("#ajaxFormModal #"+val).val() == contextData[valCD] + ) || + ( ( typeof contextData[valCD] == "undefined" || + contextData[valCD] == null ) && + $("#ajaxFormModal #"+val).val().trim().length == 0 ) || + //social network + ( $.inArray( val, SNetwork ) >= 0 && + ( typeof contextData["socialNetwork"] != "undefined" && + contextData["socialNetwork"] != null ) && + ( + ( typeof contextData["socialNetwork"][val] != "undefined" || + contextData["socialNetwork"][val] != null && + $("#ajaxFormModal #"+val).val().trim() == contextData["socialNetwork"][val] ) + || + ( ( typeof contextData["socialNetwork"][val] == "undefined" || + contextData["socialNetwork"][val] == null ) && + $("#ajaxFormModal #"+val).val().trim().length == 0 ) ) + ) + ) + ) { + $("#ajaxFormModal #"+val).remove(); + } + else if(val == "birthDate"){ + var dateformat = "DD/MM/YYYY"; + $("#ajaxFormModal #"+val).val( moment( $("#ajaxFormModal #"+val).val(), dateformat).format()); + } + + }); + } + + diff --git a/assets/js/default/formInMap.js b/assets/js/default/formInMap.js new file mode 100644 index 0000000000000000000000000000000000000000..3de54ae3cce627254d4bfaf25e4d22847fc183c1 --- /dev/null +++ b/assets/js/default/formInMap.js @@ -0,0 +1,970 @@ +var formInMap = { + actived : false, + timeoutAddCity : null, + NE_insee : "", + NE_lat : "", + NE_lng : "", + NE_city : "", + NE_cp : "", + NE_street : "", + NE_country : "", + NE_level4 : "", + NE_level4Name : "", + NE_level3 : "", + NE_level3Name : "", + NE_level2 : "", + NE_level2Name : "", + NE_level1 : "", + NE_level1Name : "", + + NE_localityId : "", + NE_betweenCP : false, + geoShape : "", + + typeSearchInternational : "", + formType : "", + updateLocality : false, + addressesIndex : false, + saveCities : {}, + bindActived : false, + + + showMarkerNewElement : function(modePC){ + mylog.log("forminmap showMarkerNewElement"); + Sig.clearMap(); + formInMap.actived = true ; + formInMap.hiddenHtmlMap(true); + + if(typeof Sig.myMarker != "undefined") + Sig.map.removeLayer(Sig.myMarker); + + mylog.log("formType", formInMap.formType); + var options = { id : 0, + icon : Sig.getIcoMarkerMap({'type' : formInMap.formType}), + content : Sig.getPopupInfoAddress() + }; + mylog.log(options); + + if( notNull(currentUser) && notNull(currentUser.addressCountry) && formInMap.NE_country== "" ){ + formInMap.NE_country = currentUser.addressCountry; + mylog.log("NE_country", formInMap.NE_country); + } + + var coordinates = new Array(0, 0); + if( notNull(contextData) && notNull(contextData.geo) && formInMap.updateLocality == true + && formInMap.NE_lat != "" && formInMap.NE_lng != "") + coordinates = new Array(formInMap.NE_lat, formInMap.NE_lng); + + mylog.log("coordinates", coordinates); + + //efface le marker s'il existe + if(Sig.markerFindPlace != null) + Sig.map.removeLayer(Sig.markerFindPlace); + Sig.markerFindPlace = Sig.getMarkerSingle(Sig.map, options, coordinates); + Sig.markerFindPlace.openPopup(); + Sig.markerFindPlace.dragging.enable(); + Sig.centerPopupMarker(coordinates, 12); + + + $('[name="newElement_country"]').val(formInMap.NE_country); + + if(formInMap.NE_country != ""){ + $("#divPostalCode").removeClass("hidden"); + $("#divCity").removeClass("hidden"); + } + + if(formInMap.updateLocality == true){ + formInMap.initHtml(); + $("#newElement_btnValidateAddress").prop('disabled', (formInMap.NE_insee==""?true:false)); + if(formInMap.NE_insee != ""){ + if(userId == "") + $("#divStreetAddress").addClass("hidden"); + else + $("#divStreetAddress").removeClass("hidden"); + } + } + + Sig.markerFindPlace.on('dragend', function(){ + formInMap.NE_lat = Sig.markerFindPlace.getLatLng().lat; + formInMap.NE_lng = Sig.markerFindPlace.getLatLng().lng; + Sig.markerFindPlace.openPopup(); + }); + + if(formInMap.bindActived == false) + formInMap.bindFormInMap(); + + if(userId == "" || formInMap.NE_insee == "") + $("#divStreetAddress").addClass("hidden"); + else + $("#divStreetAddress").removeClass("hidden"); + + $("#right_tool_map_locality").removeClass("hidden"); + $("#right_tool_map_search, #sub-menu-left").addClass("hidden"); + $("#right_tool_map").removeClass("min"); + if(typeof networkJson == "undefined" || networkJson == null) + $("#mapLegende").addClass("hidden"); + }, + + initUpdateLocality : function(address, geo, type, index){ + mylog.log("initUpdateLocality", address, geo, type, index); + showMap(true); + if(address != null && geo != null ){ + formInMap.NE_insee = address.codeInsee; + formInMap.NE_lat = geo.latitude; + formInMap.NE_lng = geo.longitude; + formInMap.NE_city = address.addressLocality; + formInMap.NE_cp = address.postalCode; + formInMap.NE_street = address.streetAddress.trim(); + formInMap.NE_country = address.addressCountry; + + formInMap.NE_level4 = address.level4; + formInMap.NE_level4Name = address.level4Name; + formInMap.NE_level3 = address.level3; + formInMap.NE_level3Name = address.level3Name; + formInMap.NE_level2 = address.level2; + formInMap.NE_level2Name = address.level2Name; + formInMap.NE_level1 = address.level1; + formInMap.NE_level1Name = address.level1Name; + formInMap.NE_localityId = address.localityId; + + if(index) + formInMap.addressesIndex = index ; + formInMap.initDropdown(); + formInMap.getLevel(); + formInMap.getDetailCity(); + }else{ + formInMap.initVarNE(); + formInMap.geoShape = ""; + if(index) + formInMap.addressesIndex = index ; + } + formInMap.formType = type ; + formInMap.updateLocality = true; + + if(typeof contextMap == "undefined") + contextMap = []; + formInMap.showMarkerNewElement(); + }, + + bindFormInMap : function(){ + // ---------------- newElement_country + $('[name="newElement_country"]').change(function(){ + mylog.log("change country"); + + formInMap.initVarNE() + formInMap.NE_country = $('[name="newElement_country"]').val() ; + formInMap.initHtml(); + $("#country_sumery_value").html($('[name="newElement_country"]').val()); + $("#newElement_btnValidateAddress").prop('disabled', true); + $("#divStreetAddress").addClass("hidden"); + + formInMap.initDropdown(); + mylog.log("formInMap.NE_country", formInMap.NE_country, typeof formInMap.NE_country, formInMap.NE_country.length); + if(formInMap.NE_country != ""){ + $("#divCP").addClass("hidden"); + $("#divCity").removeClass("hidden"); + }else{ + $("#divCity").addClass("hidden"); + } + + }); + + // ---------------- newElement_city + $('[name="newElement_city"]').keyup(function(){ + $("#dropdown-city-found").show(); + mylog.log("newElement_city", $('[name="newElement_city"]').val().trim().length); + if($('[name="newElement_city"]').val().trim().length > 1){ + formInMap.NE_city = $('[name="newElement_city"]').val(); + formInMap.changeSelectCountrytim(); + + if(notNull(formInMap.timeoutAddCity)) + clearTimeout(formInMap.timeoutAddCity); + + formInMap.timeoutAddCity = setTimeout(function(){ + formInMap.autocompleteFormAddress("locality", $('[name="newElement_city"]').val()); + }, 500); + + } + }); + + + // ---------------- newElement_city + $('[name="newElement_cp"]').keyup(function(){ + mylog.log("newElement_cp", $('[name="newElement_cp"]').val().trim()); + formInMap.NE_cp = $('[name="newElement_cp"]').val().trim(); + formInMap.btnValideDisable( ($('[name="newElement_cp"]').val().trim().length == 0 ? true : false) ); + + }); + + $('[name="newElement_city"]').focusout(function(){ + if(notNull(formInMap.timeoutAddCity)) + clearTimeout(formInMap.timeoutAddCity); + if( $('[name="dropdown-newElement_city-found"]').length ) + formInMap.timeoutAddCity = setTimeout(function(){ $("#dropdown-newElement_city-found").hide(); }, 200); + /*if( $('[name="dropdown-newElement_locality-found"]').length ) + formInMap.timeoutAddCity = setTimeout(function(){ $("#dropdown-newElement_locality-found").hide(); }, 200);*/ + }); + + $('[name="newElement_city"]').focus(function(){ + $(".dropdown-menu").hide(); + + if( $('[name="newElement_city"]').length ){ + $("#dropdown-newElement_city-found").show(); + if($('[name="newElement_city"]').val().length > 0){ + formInMap.autocompleteFormAddress("locality", $('[name="newElement_city"]').val()); + } + } + + if( $('[name="dropdown-newElement_locality-found"]').length ){ + $("#dropdown-newElement_locality-found").show(); + if($('[name="newElement_city"]').val().length > 0){ + formInMap.autocompleteFormAddress("locality", $('[name="newElement_city"]').val()); + } + } + }); + + // ---------------- newElement_streetAddress + $("#newElement_btnSearchAddress").click(function(){ + $(".dropdown-menu").hide(); + formInMap.searchAdressNewElement(); + }); + + $('[name="newElement_street"]').keyup(function(){ + formInMap.showWarningGeo( ( ( $('[name="newElement_street"]').val().length > 0 ) ? true : false ) ); + }); + + + $("#newElement_btnValidateAddress").click(function(){ + processingBlockUi(); + mylog.log("#newElement_btnValidateAddress"); + if(notEmpty(formInMap.saveCities[formInMap.NE_insee])){ + var obj = { city : formInMap.saveCities[formInMap.NE_insee] } + obj.city.geoShape = 1; + if(formInMap.NE_betweenCP != false){ + var postalCode = {}; + + postalCode.name = obj.city.name; + postalCode.postalCode = formInMap.NE_cp; + postalCode.geo = obj.city.geo; + postalCode.geoPosition = obj.city.geoPosition; + + mylog.log("saveCities", typeof obj.city.postalCodes, obj.city.postalCodes); + + obj.city.postalCodes.push(postalCode); + } + + mylog.log("city/save", obj); + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/city/save", + data: obj, + dataType: "json", + success: function(data){ + mylog.log("city/save obj.city", obj.city); + mylog.log("city/save data", data); + if(data.result){ + toastr.success(data.msg); + } + + formInMap.NE_localityId = data.id + if(data.city.level1){ + formInMap.NE_level1 = data.city.level1; + formInMap.NE_level1Name = data.city.level1Name; + mylog.log("city/save data.city.level1", data.city.level1); + } + + if(data.city.level2){ + formInMap.NE_level2 = data.city.level2; + formInMap.NE_level2Name = data.city.level2Name; + } + + if(data.city.level3){ + formInMap.NE_level3 = data.city.level3; + formInMap.NE_level3Name = data.city.level3Name; + } + + if(data.city.level4){ + formInMap.NE_level4 = data.city.level4; + formInMap.NE_level4Name = data.city.level4Name; + } + formInMap.backToForm(); + }, + error: function(error){ + mylog.log("error", error); + $("#dropdown-newElement_"+currentScopeType+"-found").html("error"); + mylog.log("Une erreur est survenue pendant l'enregistrement de la commune"); + } + }); + }else + formInMap.backToForm(); + }); + + $("#newElement_btnCancelAddress").click(function(){ + formInMap.cancel(); + }); + + formInMap.bindActived = true ; + }, + + autocompleteFormAddress : function(currentScopeType, scopeValue){ + mylog.log("autocompleteFormAddress", currentScopeType, scopeValue); + $("#dropdown-newElement_"+currentScopeType+"-found").html("<li><a href='javascript:'><i class='fa fa-refresh fa-spin'></i></a></li>"); + $("#dropdown-newElement_"+currentScopeType+"-found").show(); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/city/autocompletemultiscope", + data: { + type: currentScopeType, + scopeValue: scopeValue, + geoShape: true, + formInMap: true, + countryCode : $('[name="newElement_country"]').val() + }, + dataType: "json", + success: function(data){ + + mylog.log("autocompleteFormAddress success", data); + html=""; + var inseeGeoSHapes = {}; + formInMap.saveCities = {}; + $.each(data.cities, function(key, value){ + mylog.log("HERE", value); + var insee = value.insee; + var country = value.country; + mylog.log("HERE formInMap.saveCities", notEmpty(value.save), value.save); + if(notEmpty(value.save) && value.save == true){ + formInMap.saveCities[insee] = value; + mylog.log("HERE good save", insee, value, formInMap.saveCities); + } + mylog.log("HERE formInMap.saveCities", formInMap.saveCities); + if(notEmpty(value.geoShape)) + inseeGeoSHapes[insee] = value.geoShape.coordinates[0]; + + if(currentScopeType == "city" || currentScopeType == "locality") { + mylog.log("in scope city"); + mylog.dir(value); + mylog.log("locId", key, value); + if(value.postalCodes.length > 0){ + $.each(value.postalCodes, function(keyCP, valueCP){ + var val = valueCP.name; + var lbl = valueCP.postalCode ; + var lat = valueCP.geo.latitude; + var lng = valueCP.geo.longitude; + + var lblList = value.name + ", " + valueCP.name + ", " + valueCP.postalCode ; + if(notNull(value.level4Name)) + lblList += " ( " + value.level4Name + " ) "; + else if(notNull(value.level3Name)) + lblList += " ( " + value.level3Name + " ) "; + else if(notNull(value.level2Name)) + lblList += " ( " + value.level2Name + " ) "; + + html += "<li><a href='javascript:;' data-type='"+currentScopeType+"' "+ + "data-locId='"+key+"' "+ + "data-level4='"+value.level4+"' data-level4name='"+value.level4Name+"'"+ + "data-level3='"+value.level3+"' data-level3name='"+value.level3Name+"'"+ + "data-level2='"+value.level2+"' data-level2name='"+value.level2Name+"'"+ + "data-level1='"+value.level1+"' data-level1name='"+value.level1Name+"'"+ + "data-country='"+country+"' "+ + "data-city='"+val+"' data-cp='"+lbl+"' "+ + "data-lat='"+lat+"' data-lng='"+lng+"' "+ + "data-insee='"+insee+"' class='item-city-found'>"+lblList+"</a></li>"; + }); + }else{ + var val = value.name; + var lat = value.geo.latitude; + var lng = value.geo.longitude; + var lblList = value.name ; + if(notNull(value.level4Name)) + lblList += " ( " + value.level4Name + " ) "; + else if(notNull(value.level3Name)) + lblList += " ( " + value.level3Name + " ) "; + else if(notNull(value.level2Name)) + lblList += " ( " + value.level2Name + " ) "; + + html += "<li><a href='javascript:;' data-type='"+currentScopeType+"' "+ + "data-locid='"+key+"' "; + if(notNull(value.level4Name)) + lblList += " ( " + value.level4Name + " ) "; + else if(notNull(value.level3Name)) + lblList += " ( " + value.level3Name + " ) "; + else if(notNull(value.level2Name)) + lblList += " ( " + value.level2Name + " ) "; + + html += "data-level4='"+value.level4+"' data-level4name='"+value.level4Name+"'"+ + "data-level3='"+value.level3+"' data-level3name='"+value.level3Name+"'"+ + "data-level2='"+value.level2+"' data-level2name='"+value.level2Name+"'"+ + "data-level1='"+value.level1+"' data-level1name='"+value.level1Name+"'"; + // if(notEmpty(level4)) + // html += "data-level4='"+level4+"' dta-level4name='"+level4Name+"'"; + // if(notEmpty(level3)) + // html += "data-level3='"+level3+"' data-level3name='"+level3Name+"'"; + // if(notEmpty(level2)) + // html += "data-level2='"+level2+"' data-level2name='"+level2Name+"'"; + // if(notEmpty(level1)) + // html += "data-level1='"+level1+"' data-level1name='"+level1Name+"'"; + html += "data-country='"+country+"' "+ + "data-city='"+val+"' data-lat='"+lat+"' "+ + "data-lng='"+lng+"' data-insee='"+insee+"' "+ + "class='item-city-found-uncomplete'>"+lblList+"</a></li>"; + } + }; + }); + + if(html == "") html = "<i class='fa fa-ban'></i> "+trad.noresult; + $("#dropdown-newElement_"+currentScopeType+"-found").html(html); + $("#dropdown-newElement_"+currentScopeType+"-found").show(); + + $(".item-city-found, .item-cp-found").click(function(){ + formInMap.add(true, $(this), inseeGeoSHapes); + }); + + $(".item-city-found-uncomplete").click(function(){ + formInMap.add(false, $(this), inseeGeoSHapes); + }); + }, + error: function(error){ + $("#dropdown-newElement_"+currentScopeType+"-found").html("error"); + mylog.log("Une erreur est survenue pendant autocompleteMultiScope", error); + } + }); + }, + + add : function(complete, data, inseeGeoSHapes){ + mylog.log("add2", complete, data, inseeGeoSHapes); + + formInMap.NE_insee = data.data("insee"); + formInMap.NE_lat = data.data("lat"); + formInMap.NE_lng = data.data("lng"); + formInMap.NE_city = data.data("city"); + formInMap.NE_country = data.data("country"); + formInMap.NE_level4 = (notEmpty(data.data("level4")) ? data.data("level4") : null) ; + formInMap.NE_level4Name = (notEmpty(data.data("level4name")) ? data.data("level4name") : null) ; + formInMap.NE_level3 = (notEmpty(data.data("level3")) ? data.data("level3") : null) ; + formInMap.NE_level3Name = (notEmpty(data.data("level3name")) ? data.data("level3name") : null) ; + formInMap.NE_level2 = (notEmpty(data.data("level2")) ? data.data("level2") : null) ; + formInMap.NE_level2Name = (notEmpty(data.data("level2name")) ? data.data("level2name") : null); + formInMap.NE_level1 = (notEmpty(data.data("level1")) ? data.data("level1") : null) ; + formInMap.NE_level1Name = (notEmpty(data.data("level1name")) ? data.data("level1name") : null) ; + + mylog.log("NE_localityId", data.data("locid")); + formInMap.NE_localityId = data.data("locid"); + + if(complete == true){ + formInMap.NE_cp = data.data("cp"); + }else if ( notEmpty(formInMap.saveCities) && + notEmpty(formInMap.saveCities[formInMap.NE_insee]) && + notEmpty(formInMap.saveCities[formInMap.NE_insee].betweenCP) + ) + formInMap.NE_betweenCP = formInMap.saveCities[formInMap.NE_insee].betweenCP ; + + formInMap.initHtml(); + + Sig.markerFindPlace.setLatLng([data.data("lat"), data.data("lng")]); + mylog.log("geoShape", inseeGeoSHapes); + if(notEmpty(inseeGeoSHapes[formInMap.NE_insee])){ + var shape = inseeGeoSHapes[formInMap.NE_insee]; + shape = Sig.inversePolygon(shape); + Sig.showPolygon(shape); + setTimeout(function(){ + Sig.map.fitBounds(shape); + Sig.map.invalidateSize(); + }, 1500); + }else{ + setTimeout(function(){ + Sig.centerPopupMarker([formInMap.NE_lat, formInMap.NE_lng], 12); + }, 2500); + } + $("#dropdown-newElement_cp-found, #dropdown-newElement_city-found, #dropdown-newElement_streetAddress-found, #dropdown-newElement_locality-found").hide(); + + + //formInMap.updateSummeryLocality(data); + mylog.log("formInMap.NE_betweenCP ", formInMap.NE_betweenCP ); + formInMap.btnValideDisable( (formInMap.NE_betweenCP == false ? false : true) ); + + + if(userId == "") + $("#divStreetAddress").addClass("hidden"); + else + $("#divStreetAddress").removeClass("hidden"); + }, + + searchAdressNewElement : function(){ + mylog.log("searchAdressNewElement"); + var providerName = ""; + var requestPart = ""; + + var street = ($('[name="newElement_street"]').val() != "") ? $('[name="newElement_street"]').val() : ""; + var city = formInMap.NE_city; + var cp = formInMap.NE_cp; + var countryCode = formInMap.NE_country; + + + if($('[name="newElement_street"]').val() != ""){ + providerName = "nominatim"; + formInMap.typeSearchInternational = "address"; + //construction de la requete + requestPart = addToRequest(requestPart, street); + requestPart = addToRequest(requestPart, city); + requestPart = addToRequest(requestPart, cp); + }else{ + providerName = "communecter" + formInMap.typeSearchInternational = "city"; + //construction de la requete + if(cp != ""){ + requestPart = addToRequest(requestPart, cp); + } + } + + formInMap.NE_street = $('[name="newElement_street"]').val(); + + $("#dropdown-newElement_streetAddress-found").html("<li><a href='javascript:'><i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+"</a></li>"); + $("#dropdown-newElement_streetAddress-found").show(); + mylog.log("countryCode", countryCode); + + var countryDataGouv = ["FR","GP","MQ","GF","RE","PM","YT"]; + if(countryDataGouv.indexOf(countryCode) != -1){ + countryCode = formInMap.changeCountryForNominatim(countryCode); + mylog.log("countryCodeHere", countryCode); + callDataGouv(requestPart, countryCode); + + }else{ + countryCode = formInMap.changeCountryForNominatim(countryCode); + mylog.log("countryCode", countryCode); + callNominatim(requestPart, countryCode); + } + + formInMap.btnValideDisable(false); + }, + + // Pour effectuer une recherche a la Réunion avec Nominatim, il faut choisir le code de la France, pas celui de la Réunion + changeCountryForNominatim : function(country){ + var codeCountry = { + "FR" : ["RE", "GP", "GF", "MQ", "YT", "NC", "PM"] + }; + $.each(codeCountry, function(key, countries){ + if(countries.indexOf(country) != -1) + country = key; + }); + return country ; + }, + + backToForm : function(cancel){ + $("#right_tool_map_locality").addClass("hidden"); + $("#right_tool_map_search, #sub-menu-left").removeClass("hidden"); + $("#right_tool_map").addClass("min"); + if(typeof networkJson == "undefined" || networkJson == null) + $("#mapLegende").removeClass("hidden"); + mylog.log("backToForm 2"); + formInMap.actived = false ; + + mylog.log("backToForm 3"); + if(formInMap.updateLocality == false ){ + mylog.log("backToForm 6"); + if(notEmpty($("[name='newElement_lat']").val())){ + locObj = formInMap.createLocalityObj(); + mylog.log("forminmap copyMapForm2Dynform"); + dyFInputs.locationObj.copyMapForm2Dynform(locObj); + dyFInputs.locationObj.addLocationToForm(locObj); + } + $("#form-street").val($('#street_sumery_value').html()); + $(".locationBtn").html("<i class='fa fa-home'></i> Adresse secondaire"); + formInMap.initData(); + $.unblockUI(); + showMap(false); + Sig.clearMap(); + if(location.hash != "#referencement" && location.hash != "#web") + $('#ajax-modal').modal("show"); + }else{ + + mylog.log("backToForm 5"); + formInMap.updateLocality = false; + if(typeof cancel == "undefined" || cancel == false) + formInMap.updateLocalityElement(); + + $.unblockUI(); + showMap(false); + if(typeof contextData.map != "undefined" && contextData.map != null) + Sig.showMapElements(Sig.map, contextData.map.data, contextData.map.icon, contextData.map.title); + } + + }, + + updateLocalityElement : function(){ + mylog.log("updateLocalityElement"); + var locality = formInMap.createLocalityObj(true); + + if(formInMap.addressesIndex) + locality["addressesIndex"] = formInMap.addressesIndex ; + + var params = { + name : ((formInMap.addressesIndex)?"addresses":"locality"), + value : locality, + pk : contextData.id, + type : contextData.type + }; + + if(userId != ""){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+params.type, + data: params, + dataType: "json", + success: function(data){ + mylog.log("updateLocalityElement data", data); + + if(data.result){ + var inMap = true ; + + if(typeof contextData.address == "undefined" || contextData.address == null){ + inMap =false ; + } + + if(notEmpty(data.locality)){ + contextData.address = data.locality.address; + contextData.geo = data.locality.geo; + contextData.geoPosition = data.locality.geoPosition; + } + + + formInMap.hiddenHtmlMap(false); + formInMap.initData(); + + if(!formInMap.addressesIndex){ + if(contextData.id != userId){ + var typeMap = ((typeof contextData == "undefined" || contextData == null) ? "citoyens" : contextData.type) ; + if(typeMap == "citoyens") + typeMap = "people"; + if(inMap == false) + contextMap = Sig.addContextMap(contextMap, contextData, typeMap); + else + contextMap = Sig.modifLocalityContextMap(contextMap, contextData, typeMap); + }else{ + currentUser.addressCountry = locality.address.addressCountry; + currentUser.postalCode = locality.address.postalCode; + currentUser.codeInsee = locality.address.codeInsee; + currentUser.keyLocality = locality.address.key; + setCookies(); + if(typeof Sig.myPosition != "undefined"){ + Sig.myPosition.position.latitude = locality.geo.latitude; + Sig.myPosition.position.longitude = locality.geo.longitude; + } + } + } + + Sig.restartMap(); + mylog.log("right_tool_map_locality"); + $("#right_tool_map_locality").addClass("hidden"); + $("#right_tool_map_search, #sub-menu-left").removeClass("hidden"); + if(typeof networkJson == "undefined" || networkJson == null) + $("#mapLegende").removeClass("hidden"); + mylog.log("contextData", contextData.type, contextData.id); + urlCtrl.loadByHash("#page.type."+contextData.type+".id."+contextData.id+".view.detail"); + toastr.success(data.msg); + }else{ + toastr.error(data.msg); + } + } + }); + } else { + mylog.log("locality communexion", locality); + $.removeCookie('communexionType', { path: '/' }); $.removeCookie('communexionValue', { path: '/' }); + $.removeCookie('communexionName', { path: '/' }); $.removeCookie('communexionLevel', { path: '/' }); + $.removeCookie('inseeCommunexion', { path: '/' }); $.removeCookie('cityNameCommunexion', { path: '/' }); + $.removeCookie('cpCommunexion', { path: '/' }); $.removeCookie('communexionActivated', { path: '/' }); + + $.cookie("inseeCommunexion", locality.address.codeInsee, { expires: 365, path : "/" }); + $.cookie("cpCommunexion", locality.address.postalCode, { expires: 365, path : "/" }); + $.cookie("cityNameCommunexion", locality.address.addressLocality , { expires: 365, path : "/" }); + $.cookie("communexionActivated", false, { expires: 365, path : "/" }); + $.cookie("communexionValue", locality.address.key, { expires: 365, path : "/" }); + //$.cookie("communexionValue", locality.address.addressCountry+"_"+locality.address.codeInsee+"-"+locality.address.postalCode, { expires: 365, path : "/" }); + $.cookie("communexionName", locality.address.addressLocality, { expires: 365, path : "/" }); + $.cookie("communexionType", "cp", { expires: 365, path : "/" }); + $.cookie("communexionLevel", "cpCommunexion", { expires: 365, path : "/" }); + urlCtrl.loadByHash(location.hash); + } + }, + + // setCommunexion : function(address){ + // var coFIM = { + // city : address.localityId, + // cityName : address.addressLocality, + // cp : address.postalCodes, + // level1 : address.level1, + // level1Name : address.level1Name, + // level2 : address.level2, + // level2Name : address.level2Name, + // level3 : address.level3, + // level3Name : address.level3Name, + // level4 : address.level4, + // level4Name : address.level4Name, + // } + // setGlobalScope(address.localityId, address.addressLocality, "cp", "city", coFIM); + // }, + + initDropdown : function(){ + mylog.log("initDropdown"); + $("#dropdown-newElement_cp-found").html("<li><a href='javascript:' class='disabled'>"+trad['Currently researching']+"</a></li>"); + $("#dropdown-newElement_city-found").html("<li><a href='javascript:' class='disabled'>"+trad['Search a city, a town or a postal code'] +"</a></li>"); + }, + + initHtml : function(){ + var fieldsLocality = [ "insee", "lat", "lng", "city", "country", "cp", "street", + "level4", "level4Name", "level3", "level3Name", + "level2", "level2Name", "level1", "level1Name" ] + + + $.each(fieldsLocality, function(key, value){ + $('[name="newElement_'+value+'"]').val(formInMap["NE_"+value]); + if(value == "country") + $('#'+value+'_sumery_value').html(tradCountry[ formInMap["NE_"+value] ]); + else + $('#'+value+'_sumery_value').html(formInMap["NE_"+value]); + + if(formInMap["NE_"+value] != ""){ + $('#'+value+'_sumery').removeClass("hidden"); + } + else + $('#'+value+'_sumery').addClass("hidden"); + }); + + if(formInMap.NE_betweenCP != false) + $("#divCP").removeClass("hidden"); + + + }, + + initVarNE : function(){ + formInMap.NE_insee = ""; + formInMap.NE_lat = ""; + formInMap.NE_lng = ""; + formInMap.NE_city = ""; + formInMap.NE_cp = ""; + formInMap.NE_street = ""; + formInMap.NE_country = ""; + formInMap.NE_level4 = ""; + formInMap.NE_level4Name = ""; + formInMap.NE_level3 = ""; + formInMap.NE_level3Name = ""; + formInMap.NE_level2 = ""; + formInMap.NE_level2Name = ""; + formInMap.NE_level1 = ""; + formInMap.NE_level1Name = ""; + formInMap.NE_localityId = ""; + formInMap.NE_betweenCP = false; + }, + + createLocalityObj : function(withUnikey){ + mylog.log("createLocalityObj"); + + var locality = { + address : { + "@type" : "PostalAddress", + codeInsee : formInMap.NE_insee, + streetAddress : formInMap.NE_street.trim(), + postalCode : formInMap.NE_cp, + addressLocality : formInMap.NE_city, + level1 : formInMap.NE_level1, + level1Name : formInMap.NE_level1Name, + addressCountry : formInMap.NE_country, + localityId : formInMap.NE_localityId + + }, + geo : { + "@type" : "GeoCoordinates", + latitude : formInMap.NE_lat, + longitude : formInMap.NE_lng + }, + geoPosition : { + "type" : "Point", + "coordinates" : [ parseFloat(formInMap.NE_lng), parseFloat(formInMap.NE_lat) ] + } + }; + + mylog.log("createLocalityObj", formInMap.NE_level2, notEmpty(formInMap.NE_level2)) + if( notEmpty(formInMap.NE_level2) && formInMap.NE_level2 != "undefined" ){ + locality.address.level2 = formInMap.NE_level2; + locality.address.level2Name = formInMap.NE_level2Name; + } + if(notEmpty(formInMap.NE_level3 != "" && formInMap.NE_level3 != "undefined")){ + locality.address.level3 = formInMap.NE_level3; + locality.address.level3Name = formInMap.NE_level3Name; + } + if(notEmpty(formInMap.NE_level4 != "" && formInMap.NE_level4 != "undefined")){ + locality.address.level4 = formInMap.NE_level4; + locality.address.level4Name = formInMap.NE_level4Name; + } + + if(typeof withUnikey != "undefined" && withUnikey == true){ + var unikey = formInMap.NE_country + "_" + formInMap.NE_insee + "-" + formInMap.NE_cp; + locality.unikey = unikey; + } + + return locality; + }, + + seenAddress : function(street, cp, city, country, insee){ + var val = "" ; + val += ( ( notEmpty(street) ) ? street+"<br/>": ( (notEmpty(insee) ) ? "": trad.UnknownLocality ) ); + val += ( ( notEmpty(cp) ) ? cp + ", " : "") + " " + ( ( notEmpty(city) ) ? city : "") ; + val += ( ( notEmpty(country) && notEmpty(tradCountry[ country ]) ) ? ", " + tradCountry[ country ] : "" ) ; + return val ; + }, + + getLevel : function(){ + mylog.log("getLevel"); + if(notEmpty(formInMap.NE_localityId) && + ( typeof formInMap.NE_level1 == "undefined" || formInMap.NE_level1 == "" || + typeof formInMap.NE_level2 == "undefined" || formInMap.NE_level2 == ""|| + typeof formInMap.NE_level3 == "undefined" || formInMap.NE_level3 == ""|| + typeof formInMap.NE_level4 == "undefined" || formInMap.NE_level4 == "") ){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/city/getLevel/", + data: { cityId : formInMap.NE_localityId }, + dataType: "json", + success: function(data){ + mylog.log("getLevel", data); + if(data){ + formInMap.NE_level1 = ((data.level1) ? data.level1 : ""); + formInMap.NE_level1Name = ((data.level1Name) ? data.level1Name : ""); + formInMap.NE_level2 = ((data.level2) ? data.level2 : ""); + formInMap.NE_level2Name = ((data.level2Name) ? data.level2Name : ""); + formInMap.NE_level3 = ((data.level3) ? data.level3 : ""); + formInMap.NE_level3Name = ((data.level3Name) ? data.level3Name : ""); + formInMap.NE_level4 = ((data.level4) ? data.level4 : ""); + formInMap.NE_level4Name = ((data.level4Name) ? data.level4Name : ""); + } + } + }); + } + }, + + changeSelectCountrytim : function(){ + mylog.log("changeSelectCountrytim", formInMap.NE_country); + mylog.log("formInMap.NE_cp.substring(0, 3)"); + var countryFR = ["FR","GP","MQ","GF","RE","PM","YT"]; + var regexNumber = new RegExp("[1-9]+") ; + if(countryFR.indexOf(formInMap.NE_country) != -1 && regexNumber.test(formInMap.NE_country) ) { + var name = $('[name="newElement_city"]').val(); + if(name.substring(0, 3) == "971") + $('[name="newElement_country"]').val("GP"); + else if(name.substring(0, 3) == "972") + $('[name="newElement_country"]').val("MQ"); + else if(name.substring(0, 3) == "973") + $('[name="newElement_country"]').val("GF"); + else if(name.substring(0, 3) == "974") + $('[name="newElement_country"]').val("RE"); + else if(name.substring(0, 3) == "975") + $('[name="newElement_country"]').val("PM"); + else if(name.substring(0, 3) == "976") + $('[name="newElement_country"]').val("YT"); + else + $('[name="newElement_country"]').val("FR"); + } + }, + + btnValideDisable : function(bool){ + mylog.log("btnValideDisable"); + $("#newElement_btnValidateAddress").prop('disabled', bool); + }, + + showWarningGeo : function(bool){ + mylog.log("showWarningGeo"); + if(bool == true){ + $("#alertGeo").removeClass("hidden"); + $("#newElement_btnSearchAddress").removeClass("btn-default"); + $("#newElement_btnSearchAddress").addClass("btn-warning"); + }else{ + $("#alertGeo").addClass("hidden"); + $("#newElement_btnSearchAddress").removeClass("btn-warning"); + $("#newElement_btnSearchAddress").addClass("btn-default"); + } + }, + + hiddenHtmlMap : function(bool){ + mylog.log("formInMap hiddenHtmlMap()", bool); + if(bool == true){ + $("#txt-find-place").addClass("hidden"); + $("#input-search-map").addClass("hidden"); + $("#menu-map-btn-start-search").addClass("hidden"); + $("#mainMap .tools-btn").addClass("hidden"); + $("#map-loading-data").addClass("hidden"); + }else{ + $("#txt-find-place").removeClass("hidden"); + $("#input-search-map").removeClass("hidden"); + $("#menu-map-btn-start-search").removeClass("hidden"); + $("#mainMap .tools-btn").removeClass("hidden"); + //$("#map-loading-data").removeClass("hidden"); + } + }, + + getDetailCity : function(){ + mylog.log("getDetailCity"); + if(notEmpty(formInMap.NE_localityId)){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/city/detailforminmap/", + data: {id : formInMap.NE_localityId}, + dataType: "json", + success: function(data){ + formInMap.geoShape = data.geoShape; + + if(notEmpty(data.betweenCP)){ + formInMap.NE_betweenCP = data.betweenCP; + $("#divCP").removeClass("hidden"); + } + + formInMap.displayGeoShape(); + } + }); + } + }, + + displayGeoShape : function(){ + mylog.log("displayGeoShape"); + if(typeof formInMap.geoShape == "undefined") return; + var geoShape = Sig.inversePolygon(formInMap.geoShape.coordinates[0]); + Sig.showPolygon(geoShape); + setTimeout(function(){ + Sig.map.fitBounds(geoShape); + Sig.map.invalidateSize(); + }, 1500); + }, + + initData : function(keepType){ + mylog.log("initData"); + formInMap.timeoutAddCity; + formInMap.initVarNE(); + formInMap.typeSearchInternational = ""; + formInMap.geoShape = ""; + if(typeof keepType =="undefined" || keepType==false){ + formInMap.formType = ""; + } + //formInMap.updateLocality = false; + formInMap.addressesIndex = false; + formInMap.initDropdown(); + formInMap.saveCities = {} ; + formInMap.bindActived = false; + + $("#divStreetAddress").addClass("hidden"); + $("#divCity").addClass("hidden"); + $("#divCP").addClass("hidden"); + formInMap.initHtml(); + }, + + cancel : function(){ + mylog.log("formInMap cancel()"); + formInMap.typeSearchInternational = ""; + formInMap.geoShape = ""; + //formInMap.formType = ""; + formInMap.addressesIndex = false; + formInMap.initVarNE(); + formInMap.initHtml(); + formInMap.hiddenHtmlMap(false); + formInMap.backToForm(true); + } + +}; \ No newline at end of file diff --git a/assets/js/default/globalsearch.js b/assets/js/default/globalsearch.js new file mode 100644 index 0000000000000000000000000000000000000000..a5aa216b18e0aa010d7d26bb140371e822dddc75 --- /dev/null +++ b/assets/js/default/globalsearch.js @@ -0,0 +1,314 @@ + + +/* GLOBAL SEARCH JS */ +function showDropDownGS(show){ + if(typeof show == "undefined") show = true; + + if(show){ + if($(".dropdown-result-global-search").css("display") == "none"){ + $(".dropdown-result-global-search").css("maxHeight", "0px"); + $(".dropdown-result-global-search").show(); + $(".dropdown-result-global-search").animate({"maxHeight" : "70%"}, 300); + } + }else{ + if(!loadingDataGS){ + $(".dropdown-result-global-search").animate({"maxHeight" : "0%"}, 300); + $(".dropdown-result-global-search").hide(300); + } + } +} + +var searchTypeGS = [ "persons", "organizations", "projects", "events", "poi", "cities" ]; +var allSearchTypeGS = [ "persons", "organizations", "projects", "events", "poi", "cities" ]; + +var loadingDataGS = false; +var indexStepGS = 20; +var currentIndexMinGS = 0; +var currentIndexMaxGS = indexStepGS; +var scrollEndGS = false; +var totalDataGS = 0; +var mapElementsGS = new Array(); + +function startGlobalSearch(indexMin, indexMax){ + mylog.log("startGlobalSearch", indexMin, indexMax, indexStepGS, loadingDataGS); + + setTimeout(function(){ loadingDataGS = false; }, 10000); + + var search = $('#second-search-bar').val(); + //if(search == "") search = $('#input-global-search-xs').val(); + if(loadingDataGS || search.length<3) return; + + mylog.log("loadingDataGS true"); + loadingDataGS = true; + + if(typeof indexMin == "undefined") indexMin = 0; + if(typeof indexMax == "undefined") indexMax = indexStepGS; + + currentIndexMinGS = indexMin; + currentIndexMaxGS = indexMax; + + if(indexMin == 0) { + totalDataGS = 0; + mapElementsGS = new Array(); + } + else{ mylog.log("scrollEndGS ? ", scrollEndGS); if(scrollEndGS) return; } + + autoCompleteSearchGS(search, indexMin, indexMax); +} + + +function autoCompleteSearchGS(search, indexMin, indexMax){ + mylog.log("autoCompleteSearchGS"); + + var data = {"name" : search, "locality" : "", "searchType" : searchTypeGS, "searchBy" : "ALL", + "indexMin" : indexMin, "indexMax" : indexMax }; + + showDropDownGS(true); + + if(indexMin > 0) + $("#btnShowMoreResultGS").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + else + $(".dropdown-result-global-search").html( + "<h5 class='text-dark center padding-15'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</h5>"); + + showIsLoading(true); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + if(!data){ toastr.error(data.content); } + else + { + mylog.log("DATA GS"); + mylog.dir(data); + + var countData = 0; + $.each(data, function(i, v) { if(v.length!=0){ countData++; } }); + + totalDataGS += countData; + + str = ""; + var city, postalCode = ""; + + if(totalDataGS == 0) totalDataGSMSG = "<i class='fa fa-ban'></i> "+trad.noresult; + else if(totalDataGS == 1) totalDataGSMSG = totalDataGS + " "+trad.result; + else if(totalDataGS > 1) totalDataGSMSG = totalDataGS + " "+trad.results; + + if(totalDataGS > 0){ + str += '<div class="text-left" id="footerDropdownGS" style="">'; + str += "<label class='text-dark margin-top-5'><i class='fa fa-angle-down'></i> " + totalDataGSMSG + "</label>"; + str += '<a href="#search" class="btn btn-default btn-sm pull-right lbh" id="btnShowMoreResultGS">'+ + '<i class="fa fa-angle-right"></i> <i class="fa fa-search"></i> '+trad.extendedsearch+ + '</a>'; + str += '</div>'; + str += "<hr style='margin: 0px; float:left; width:100%;'/>" + } + + //parcours la liste des résultats de la recherche + $.each(data, function(i, o) { + console.log(o); + mylog.log("globalsearch res : ", o); + var typeIco = i; + var ico = "fa-"+typeObj["default"].icon; + var color = mapColorIconTop["default"]; + + mapElementsGS.push(o); + if(typeof( typeObj[o.type] ) == "undefined") + itemType="poi"; + typeIco = o.type; + //if(directory.dirLog) mylog.warn("itemType",itemType,"typeIco",typeIco); + if(typeof o.typeOrga != "undefined") + typeIco = o.typeOrga; + + var obj = (dyFInputs.get(typeIco)) ? dyFInputs.get(typeIco) : typeObj["default"] ; + ico = "fa-"+obj.icon; + color = obj.color; + //typeIco = o.type; + //ico = ("undefined" != typeof typeObj[typeIco]) ? "fa-"+typeObj[typeIco].icon : "fa-"+typeObj["default"].icon; + //color = ("undefined" != typeof mapColorIconTop[typeIco]) ? mapColorIconTop[typeIco] : mapColorIconTop["default"]; + + htmlIco ="<i class='fa "+ ico +" fa-2x bg-"+color+"'></i>"; + if("undefined" != typeof o.profilThumbImageUrl && o.profilThumbImageUrl != ""){ + var htmlIco= "<img width='80' height='80' alt='' class='img-circle bg-"+color+"' src='"+baseUrl+o.profilThumbImageUrl+"'/>" + } + + city=""; + + var postalCode = o.cp + if (o.address != null) { + city = o.address.addressLocality; + postalCode = o.cp ? o.cp : o.address.postalCode ? o.address.postalCode : ""; + } + + + var id = getObjectId(o); + var insee = o.insee ? o.insee : ""; + type = o.type; + if(type=="citoyens") type = "person"; + //var url = "javascript:"; //baseUrl+'/'+moduleId+ "/default/simple#" + o.type + ".detail.id." + id; + var url = (notEmpty(o.type) && notEmpty(id)) ? + '#page.type.'+o.type+'.id.' + id : ""; + + //var onclick = 'urlCtrl.loadByHash("#' + type + '.detail.id.' + id + '");'; + var onclickCp = ""; + var target = " target='_blank'"; + var dataId = ""; + if(type == "city"){ + dataId = o.name; //.replace("'", "\'"); + } + + + var tags = ""; + if(typeof o.tags != "undefined" && o.tags != null){ + $.each(o.tags, function(key, value){ + if(value != "") + tags += "<a href='javascript:' class='badge bg-red btn-tag'>#" + value + "</a>"; + }); + } + + var name = typeof o.name != "undefined" ? o.name : ""; + var postalCode = (typeof o.address != "undefined" && + o.address != null && + typeof o.address.postalCode != "undefined") ? o.address.postalCode : ""; + + if(postalCode == "") postalCode = typeof o.cp != "undefined" ? o.cp : ""; + var cityName = (typeof o.address != "undefined" && + o.address != null && + typeof o.address.addressLocality != "undefined") ? o.address.addressLocality : ""; + + var fullLocality = postalCode + " " + cityName; + if(fullLocality == " Addresse non renseignée" || fullLocality == "" || fullLocality == " ") + fullLocality = "<i class='fa fa-ban'></i>"; + mylog.log("fullLocality", fullLocality); + + var description = (typeof o.shortDescription != "undefined" && + o.shortDescription != null) ? o.shortDescription : ""; + if(description == "") description = (typeof o.description != "undefined" && + o.description != null) ? o.description : ""; + + var startDate = (typeof o.startDate != "undefined") ? "Du "+dateToStr(o.startDate, "fr", true, true) : null; + var endDate = (typeof o.endDate != "undefined") ? "Au "+dateToStr(o.endDate, "fr", true, true) : null; + + var followers = (typeof o.links != "undefined" && o.links != null && typeof o.links.followers != "undefined") ? + o.links.followers : 0; + var nbFollower = 0; + if(followers !== 0) + $.each(followers, function(key, value){ + nbFollower++; + }); + + target = ""; + + + if(type != "city"){ + str += "<a href='"+url+"' class='lbh col-md-12 col-sm-12 col-xs-12 no-padding searchEntity'>"; + str += "<div class='col-md-2 col-sm-2 col-xs-2 no-padding entityCenter'>"; + str += htmlIco; + str += "</div>"; + str += "<div class='col-md-10 col-sm-10 col-xs-10 entityRight'>"; + + str += "<div class='entityName text-dark'>" + name + "</div>"; + + str += '<div data-id="' + dataId + '"' + " class='entityLocality'>"+ + "<i class='fa fa-home'></i> " + fullLocality; + + if(nbFollower >= 1) + str += " <span class='pull-right'><i class='fa fa-chain margin-left-10'></i> " + nbFollower + " follower</span>"; + + str += '</div>'; + + str += "</div>"; + + str += "</a>"; + + }else{ + var citykey = o.country + "_" + o.insee + "-" + o.cp; + str += "<a href='javascript:' class='col-md-12 col-sm-12 col-xs-12 no-padding searchEntity start-new-communexion' "; + str += "data-scope-value='" + citykey + "' " + + "data-scope-name='" + o.name + "' " + + "data-scope-type='city' " + + "data-insee-communexion='" + o.insee + "' "+ + "data-name-communexion='" + o.name + "' "+ + "data-cp-communexion='" + o.cp + "' "+ + "data-region-communexion='" + o.regionName + "' "+ + "data-dep-communexion='" + o.depName + "' "+ + "data-country-communexion='" + o.country + "' "; + str += ">"; + str += "<div class='col-md-2 col-sm-2 col-xs-2 no-padding entityCenter'>"; + str += htmlIco; + str += "</div>"; + str += "<div class='col-md-10 col-sm-10 col-xs-10 entityRight'>"; + + str += "<div class='entityName text-dark'>" + name + "</div>"; + + str += '<div data-id="' + dataId + '"' + " class='entityLocality'>"+ + "<i class='fa fa-home'></i> " + fullLocality; + + if(nbFollower >= 1) + str += " <span class='pull-right'><i class='fa fa-chain margin-left-10'></i> " + nbFollower + " follower</span>"; + + str += '</div>'; + + str += "</div>"; + + str += "</a>"; + } + + }); //end each + + //ajout du footer + str += '<div class="text-center" id="footerDropdownGS">'; + str += "<label class='text-dark'>" + totalDataGSMSG + "</label><br/>"; + str += '<a href="#search" class="btn btn-default btn-sm lbh" id="btnShowMoreResultGS">'+ + '<i class="fa fa-angle-right"></i> <i class="fa fa-search"></i> '+trad.extendedsearch+ + '</a>'; + str += '</div>'; + + //on ajoute le texte dans le html + $(".dropdown-result-global-search").html(str); + //on scroll pour coller le haut de l'arbre au menuTop + $(".dropdown-result-global-search").scrollTop(0); + //on affiche la dropdown + showDropDownGS(true); + + $(".start-new-communexion").click(function(){ + $("#main-search-bar, #second-search-bar, #input-search-map").val(""); + setGlobalScope( $(this).data("scope-value"), $(this).data("scope-name"), $(this).data("scope-type"), "city", + $(this).data("insee-communexion"), $(this).data("name-communexion"), $(this).data("cp-communexion"), + $(this).data("region-communexion"), $(this).data("dep-communexion"), $(this).data("country-communexion") ) ; + + urlCtrl.loadByHash("#search") + }); + + bindLBHLinks(); + + //signal que le chargement est terminé + mylog.log("loadingDataGS false"); + loadingDataGS = false; + } + + //si le nombre de résultat obtenu est inférieur au indexStep => tous les éléments ont été chargé et affiché + if(indexMax - countData > indexMin){ + $("#btnShowMoreResultGS").remove(); + scrollEndGS = true; + }else{ + scrollEndGS = false; + } + + if(isMapEnd){ + //affiche les éléments sur la carte + showDropDownGS(false); + Sig.showMapElements(Sig.map, mapElementsGS, "globe", "Recherche globale"); + } + + //$("#footerDropdownGS").append("<br><a class='btn btn-default' href='javascript:' onclick='urlCtrl.loadByHash("+'"#default.directory"'+")'><i class='fa fa-plus'></i></a>"); + } + }); + + + } \ No newline at end of file diff --git a/assets/js/default/index.js b/assets/js/default/index.js new file mode 100644 index 0000000000000000000000000000000000000000..7c8f7d20b09c365530e7b7cf9030f7e9f42eca48 --- /dev/null +++ b/assets/js/default/index.js @@ -0,0 +1,588 @@ + +function startNewCommunexion(country){ + + clearTimeout(timeoutSearch); + + var locality = $('#searchBarPostalCode').val(); + locality = locality.replace(/[^\w\s-']/gi, ''); + + $(".search-loader").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + + var data = {"name" : name, "locality" : locality, "country" : country, "searchType" : [ "cities" ], "searchBy" : "ALL" }; + var countData = 0; + var oneElement = null; + mylog.log(data); + $.blockUI({ + message : "<h1 class='homestead text-dark'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span></h1>" + }); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); + mylog.dir(data); + $(".search-loader").html("<i class='fa fa-ban'></i> "+trad.noresult); + }, + success: function(data){ + mylog.log("success, try to load sig"); + mylog.dir(data); + if(!data){ + toastr.error(data.content); + }else{ + + + $.each(data, function(i, v) { + if(v.length!=0){ + $.each(v, function(k, o){ countData++; }); + } + }); + + if(countData == 0){ + $(".search-loader").html("<i class='fa fa-ban'></i> "+trad.noresult); + }else{ + $(".search-loader").html("<i class='fa fa-crosshairs'></i> Sélectionnez une commune ..."); + showMap(true); + Sig.showMapElements(Sig.map, data); + + } + + $.unblockUI(); + + } + + } + }); +} + +function resizeInterface() +{ + mylog.log("resize"); + var height = $("#mapCanvasBg").height() - 55; + $("#ajaxSV").css({"minHeight" : height}); + //$("#menu-container").css({"minHeight" : height}); + var heightDif = $("#search-contact").height() + $("#floopHeader").height() + 80 /* top */ + 0 /* bottom */; + var menuTopHeight = $("#mainNav").height();// - $(".toolbar").height(); + + //mylog.log("heightDif", heightDif); + $(".floopScroll").css({"minHeight" : height-heightDif}); + $(".floopScroll").css({"maxHeight" : height-heightDif}); + //$(".my-main-container").css("min-height", $(".sigModuleBg").height()-menuTopHeight); + //$(".my-main-container").css("max-height", $(".sigModuleBg").height()-menuTopHeight); + //$(".my-main-container").css("height", $(".sigModuleBg").height()-menuTopHeight); + //$(".main-col-search").css("min-height", $(".sigModuleBg").height()); + //$("ul.notifList").css({"maxHeight" : height-heightDif}); + +} + +function initNotifications(){ + + $('.btn-menu-notif').off().click(function(){ + mylog.log("click notification main-top-menu"); + showNotif(); + }); + /*$('.my-main-container .btn-menu-notif').off().click(function(){ + mylog.log("click notification my-main-container"); + showNotif(); + });*/ +} +function showNotif(show){ + if(typeof show == "undefined"){ + if($("#notificationPanelSearch").css("display") == "none") show = true; + else show = false; + } + + if(show){ + $('#notificationPanelSearch').show("fast"); + markAllAsSeen(false,""); + refreshNotifications(userId,"citoyens","","menuTop"); + + } + else $('#notificationPanelSearch').hide("fast"); + + + $("#dropdown-user").removeClass("open"); + showFloopDrawer(false); +} + +function checkScroll(){ + $(".main-top-menu").animate({ + top: 0, + opacity:1 + }, 500 ); + +} + +var currentScrollTop = 0; +var isMapEnd = false; +function showMap(show) +{ + if(show != false && CoSigAllReadyLoad == false){ + console.log("showMap", show, "elementsMap", Sig.preloadElementsMap); + mapBg = Sig.loadMap("mapCanvas", initSigParams); + Sig.showIcoLoading(false); + Sig.showMapElements(Sig.map, Sig.preloadElementsMap, Sig.preloadIconLegende, Sig.preloadTextLegende); + } + + if(mapBg == null) return; + + //if(typeof Sig == "undefined") { alert("Pas de SIG"); return; } + mylog.log("typeof SIG : ", typeof Sig); + if(typeof Sig == "undefined") show = false; + + //chargement de la carte + + mylog.log("showMap"); + if(show === undefined) show = !isMapEnd; + var mainContainer = (typeof networkJson != "undefined" && networkJson != null) ? ".my-main-container" : ".main-container" ; + if(show){ + isMapEnd =true; + showNotif(false); + + currentScrollTop = $('html').scrollTop(); + + + //$("#mapLegende").html(""); + //$("#mapLegende").hide(); + + showTopMenu(true); + if(Sig.currentMarkerPopupOpen != null){ + Sig.currentMarkerPopupOpen.fire('click'); + } + + $(".btn-group-map").show( 700 ); + $("#right_tool_map").show(700); + // $(".btn-menu5, .btn-menu6, .btn-menu7, .btn-menu8, .btn-menu9, .btn-menu10, .btn-menu-add").hide(); + // $("#btn-toogle-map").html("<i class='fa fa-th-large'></i>"); + // $("#btn-toogle-map").attr("data-original-title", "Tableau de bord"); + // $("#btn-toogle-map").css("display","inline !important"); + // $("#btn-toogle-map").show(); + //$(".lbl-btn-menu").hide(400); + //$(".fa-angle-right").hide(400); + //$(".menu-left-container hr").css({opacity:0}); + $(".main-menu-left").hide(); //addClass("inSig"); + $("body").addClass("inSig"); + + + + $(mainContainer).animate({ + //top: -1000, + opacity:0, + }, 'slow' ); + + setTimeout(function(){ $(mainContainer).hide(); }, 100); + var timer = setTimeout("Sig.constructUI()", 1000); + + }else{ + isMapEnd = false; + //hideMapLegende(); + + var iconMap = "map-marker"; + if(typeof ICON_MAP_MENU_TOP != "undefined") iconMap = ICON_MAP_MENU_TOP; + //mylog.log(ICON_MAP_MENU_TOP); + // $(".btn-group-map").hide( 700 ); + // $("#right_tool_map").hide(700); + // $(".btn-menu5, .btn-menu6, .btn-menu7, .btn-menu8, .btn-menu9, .btn-menu10, .btn-menu-add").show(); + // $(".panel_map").hide(1); + // $("#btn-toogle-map").html("<i class='fa fa-"+iconMap+"'></i>"); + // $("#btn-toogle-map").attr("data-original-title", "Carte"); + //$(".main-col-search").animate({ top: 0, opacity:1 }, 800 ); + //$(".lbl-btn-menu").show(400); + //$(".fa-angle-right").show(400); + //$(".menu-left-container hr").css({opacity:1} ); + //$(".main-menu-left").removeClass("inSig"); + $("body").removeClass("inSig"); + $(mainContainer).animate({ + //top: 50, + opacity:1 + }, 'slow' ); + setTimeout(function(){ + $(mainContainer).show(); + $('html, body').stop().animate({ + scrollTop: currentScrollTop + }, 500, ''); + }, 100); + + //hideFormInMap(); + + // if(typeof Sig != "undefined") + // if(Sig.currentMarkerPopupOpen != null){ + // Sig.currentMarkerPopupOpen.closePopup(); + // } + + //if($(".box-add").css("display") == "none" && notEmpty(userId)) + // $("#ajaxSV").show( 700 ); + + //showTopMenu(true); + //checkScroll(); + } + +} +/* +function showFormInMap(){ + $("#form-in-map #form-in-map-content").html($("#ajaxFormModal").html()); + $("#form-in-map").show(200); + $("#right_tool_map").hide(); + Sig.showMyPosition(); +} +function hideFormInMap(){ + $("#form-in-map").hide(200); + $("#ajax-modal-modal-body").append($("#ajaxFormModal")); +} +*/ +function setScopeValue(btn){ mylog.log("setScopeValue"); + if( typeof btn === "object" ){ + //récupère les valeurs + inseeCommunexion = btn.attr("insee-com"); + cityNameCommunexion = btn.attr("name-com"); + cpCommunexion = btn.attr("cp-com"); + regionNameCommunexion = btn.attr("reg-com"); + countryCommunexion = btn.attr("ctry-com"); + latCommunexion = btn.attr("lat-com"); + lngCommunexion = btn.attr("lng-com"); + if(typeof(btn.attr("nbCpByInsee-com")) != "undefined"){ + nbCpbyInseeCommunexion = btn.attr("nbCpByInsee-com"); + cityInseeCommunexion = btn.attr("cityInsee-com"); + } else { + nbCpbyInseeCommunexion = undefined; + cityInseeCommunexion = undefined; + + } + //var path = location.pathname; + //setCookies(); + //definit le path du cookie selon si on est en local, ou en prod + + setCookies(location.pathname); + + $(".search-loader").html("<i class='fa fa-check'></i> Vous êtes communecté à " + cityNameCommunexion + ', ' + cpCommunexion); + $(".lbl-btn-menu-name-city .lbl-btn-menu").html(cityNameCommunexion);// + ", " + cpCommunexion); + + $("#btn-geoloc-auto-menu .fa-crosshairs").attr("data-original-title", cityNameCommunexion); + $("#btn-geoloc-auto-menu .fa-crosshairs").attr("title", cityNameCommunexion); + $("#btn-geoloc-auto-menu").off(); //click(function(){ urlCtrl.loadByHash("#city.detail.insee." + inseeCommunexion+"."+"postalCode."+cpCommunexion) }); + $("#btn-geoloc-auto-menu").attr("href", '#city.detail.insee.' + inseeCommunexion+'.'+'postalCode.'+cpCommunexion); + $("#btn-geoloc-auto-menu").data("hash", "#city.detail.insee." + inseeCommunexion+"."+"postalCode."+cpCommunexion); + //mylog.log("HASHHHHHHHHHHHHHHHHHHHH", $("#btn-geoloc-auto-menu").data("hash")); + $("#btn-menuSmall-mycity").attr("href", '#city.detail.insee.' + inseeCommunexion+"."+"postalCode."+cpCommunexion); + + $("#btn-citizen-council-commun").attr("href", '#rooms.index.type.cities.id.' + countryCommunexion+'_' + inseeCommunexion+'-'+cpCommunexion); + + $("#btn-citizen-council-commun").data("hash", "#rooms.index.type.cities.id." + countryCommunexion+"_" + inseeCommunexion+"-"+cpCommunexion); + + $("#btn-menuSmall-citizenCouncil").attr("href", '#rooms.index.type.cities.id.' + countryCommunexion+'_' + inseeCommunexion+'-'+cpCommunexion); + + + if(location.hash.indexOf("#default.twostepregister") == -1) + $("#searchBarPostalCode").val(cityNameCommunexion); + + selectScopeLevelCommunexion(levelCommunexion); + + $(".menu-left-container .visible-communected, .menuSmall .visible-communected").show(400); + $(".menu-left-container .hide-communected, .menuSmall .hide-communected").hide(400); + + if(!userId) + $(".btn-geoloc-auto").attr("onclick", + "urlCtrl.loadByHash('#rooms.index.type.cities.id.' + countryCommunexion + '_'+ inseeCommunexion + '-'+ cpCommunexion)"); + + + Sig.clearMap(); + mylog.log("hash city ? ", location.hash.indexOf("#default.city")); + if(location.hash == "#default.home"){ + //showLocalActorsCityCommunexion(); + urlCtrl.loadByHash("#city.detail.insee."+inseeCommunexion+".postalCode."+cpCommunexion); + }else + if(location.hash == "#default.directory"){ + startSearch(); + }else + if(location.hash == "#default.agenda"){ + startSearch(); + }else + if(location.hash == "#default.news"){ + startSearch(); + showMap(false); + }else + if(location.hash.indexOf("#city.detail") >= 0) { + //showLocalActorsCityCommunexion(); + if(location.hash != "#city.detail.insee." + inseeCommunexion+"."+"postalCode."+cpCommunexion){ + urlCtrl.loadByHash("#city.detail.insee."+inseeCommunexion+".postalCode."+cpCommunexion); + }else{ + $("#btn-communecter").html("<i class='fa fa-check'></i> COMMUNECTÉ"); + $("#btn-communecter").attr("onclick", ""); + toastr.success('Vous êtes communecté à ' + cityNameCommunexion); + } + //showMap(false); + }else + if(location.hash.indexOf("#default.twostepregister") >= 0) { + + showMap(false); + $("#tsr-commune-name-cp").html(cityNameCommunexion + ", " + cpCommunexion); + + $("#conf-commune").html(cityNameCommunexion + ", " + cpCommunexion); + + $("#TSR-load-conf-communexion").html("<h1><i class='fa fa-spin fa-circle-o-notch text-white'></i></h1>"); + showTwoStep("load-conf-communexion"); + setCookies(); + $(".btn-param-postal-code").attr("data-original-title", cityNameCommunexion + " en détail"); + //$(".btn-param-postal-code").attr("onclick", "urlCtrl.loadByHash('#city.detail.insee."+inseeCommunexion+"')"); + $(".search-loader").html("<i class='fa fa-check'></i> Vous êtes communecté : " + cityNameCommunexion + ', ' + cpCommunexion); + $(".lbl-btn-menu-name-city .lbl-btn-menu").html(cityNameCommunexion); + setTimeout(function(){ achiveTSRAddress(); /*showTwoStep("street");*/ }, 2000); + //showMap(false); + }else{ + //showLocalActorsCityCommunexion(); + urlCtrl.loadByHash("#city.detail.insee."+inseeCommunexion+".postalCode."+cpCommunexion); + } + } + + mylog.log("setScopeValue", inseeCommunexion, cityNameCommunexion, cpCommunexion); +} + +function showLocalActorsCityCommunexion(){ + + urlCtrl.loadByHash("#city.detail.insee."+inseeCommunexion+".postalCode."+cpCommunexion); + return; + + mylog.log("showLocalActorsCityCommunexion"); + var data = { "name" : "", + "locality" : inseeCommunexion, + "searchType" : [ "persons", "organizations", "projects", "events", "cities" ], + "searchBy" : "INSEE", + "indexMin" : 0, + "indexMax" : 500 + }; + + setTitle("Les acteurs locaux : <span class='text-red'>" + cityNameCommunexion + ", " + cpCommunexion + "</span>","spin fa-circle-o-notch","Les acteurs locaux : " + cityNameCommunexion + ", " + cpCommunexion); + + $.blockUI({ + message : "<h1 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> " + cpCommunexion + " : Commune<span class='text-dark'>xion en cours ...</span></h1>" + }); + + showMap(true); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + if(!data){ toastr.error(data.content); } + else{ + //mylog.dir(data); + Sig.showMapElements(Sig.map, data); + setTitle("Les acteurs locaux : <span class='text-red'>" + cityNameCommunexion + ", " + cpCommunexion + "</span>","connect-develop","Les acteurs locaux : " + cityNameCommunexion + ", " + cpCommunexion ); + $(".search-loader").html("<i class='fa fa-check'></i> Vous êtes communecté à " + cityNameCommunexion + ', ' + cpCommunexion); + + toastr.success('Vous êtes communecté !<br/>' + cityNameCommunexion + ', ' + cpCommunexion); + $.unblockUI(); + } + } + }); + +} + + +var topMenuActivated = true; +function showTopMenu(show){ + + if(typeof show == "undefined") + show = $("#main-top-menu").css("opacity") == 1; + + if(show){ + $(".main-top-menu").animate({ top: 0, opacity:1 }, 500 ); + } + else{ + $(".main-top-menu").animate({ top: -60, opacity:0 }, 500 ); + } +} + + +function initFloopDrawer(){ + mylog.log("initFloopDrawer"); + //mylog.dir(myContacts); + if(myContacts != null){ + var floopDrawerHtml = buildListContactHtml(myContacts, userId); + $("#floopDrawerDirectory").html(floopDrawerHtml); + initFloopScrollByType(); + + //$("#floopDrawerDirectory").hide(); + if($(".tooltips").length) { + $('.tooltips').tooltip(); + } + $("#btnFloopClose").click(function(){ + showFloopDrawer(false); + }); + $(".main-col-search").mouseenter(function(){ + showFloopDrawer(false); + }); + + bindEventFloopDrawer(); + } +} + +// function initBtnScopeList(){ +// $(".btn-scope-list").click(function(){ +// setInputPlaceValue(this); +// }); +// } + +function setInputPlaceValue(thisBtn){ + //if(location.hash == "#default.home"){ + //$("#autoGeoPostalCode").val($(thisBtn).attr("val")); + //}else{ + $("#searchBarPostalCode").val($(thisBtn).attr("val")); + + mylog.log("setInputPlaceValue") + $("#input-communexion").show(); + //$("#searchBarPostalCode").animate({"width" : "350px !important", "padding-left" : "70px !important;"}, 200); + setTimeout(function(){ $("#input-communexion").hide(300); }, 300); + + //} + //$.cookie("HTML5CityName", $(thisBtn).attr("val"), { path : '/ph/' }); + startNewCommunexion(); +} + +var communexionActivated = false; +function toogleCommunexion(init){ //this = jQuery Element + + if(init != true) + communexionActivated = !communexionActivated; + + mylog.log("communexionActivated", communexionActivated); + if(communexionActivated){ + //btn.removeClass("text-red"); + //btn.addClass("bg-red"); + $(".btn-activate-communexion, .btn-param-postal-code").removeClass("text-red"); + $(".btn-activate-communexion, .btn-param-postal-code").addClass("bg-red"); + $("#searchBarPostalCode").val(cityNameCommunexion); + + if(inseeCommunexion != "") + $(".search-loader").html("<i class='fa fa-check'></i> Vous êtes communecté à " + cityNameCommunexion + ', ' + cpCommunexion); + + // $("#searchBarPostalCode").animate({"width" : "0px !important", "padding-left" : "51px !important;"}, 200); + //$(".lbl-scope-list").html("<i class='fa fa-check'></i> " + cityNameCommunexion.toLowerCase() + ", " + cpCommunexion); + selectScopeLevelCommunexion(levelCommunexion); + $(".lbl-scope-list").show(400); + mylog.log("inseeCommunexion", inseeCommunexion); + //setScopeValue(inseeCommunexion); + //showInputCommunexion(); + }else{ + $(".btn-activate-communexion, .btn-param-postal-code").addClass("text-red"); + $(".btn-activate-communexion, .btn-param-postal-code").removeClass("bg-red"); + //$("#searchBarPostalCode").animate({"width" : "350px !important", "padding-left" : "70px !important;"}, 200); + + $(".search-loader").html("<i class='fa fa-times'></i> Communection désactivée (" + cityNameCommunexion + ', ' + cpCommunexion + ")"); + + $(".lbl-scope-list").hide(400); + $("#searchBarPostalCode").val(""); + } +} + +function initBtnToogleCommunexion(){ + toogleCommunexion(true); +} + +function showInputCommunexion(){ + clearTimeout(timeoutCommunexion); + mylog.log("showCommunexion"); + $("#searchBarPostalCode").css({"width" : "0px !important", "padding-left" : "51px !important;"}, 200); + + if(communexionActivated) + $("#searchBarPostalCode").animate({"width" : "350px !important", "padding-left" : "70px !important;"}, 200 ); + + $("#input-communexion").show(300); + //$(".main-col-search").animate({ opacity:0.3 }, 200 ); + $(".hover-info,.hover-info2").hide(); +} + +//niv 1 : city +//niv 2 : CP +//niv 3 : department +//niv 4 : region +//niv 4 : pays / global / tout +var levelCommunexion = 1; +function selectScopeLevelCommunexion(level){ + + //var department = ""; + var department = inseeCommunexion; + mylog.log("selectScopeLevelCommunexion", countryCommunexion, $.inArray(countryCommunexion, ["RE", "NC","GP","GF","MQ","YT","PM"])); + + if($.inArray(countryCommunexion, ["RE", "NC","GP","GF","MQ","YT","PM"]) >= 0){ + department = cpCommunexion.substr(0, 3); + }else{ + department = cpCommunexion.substr(0, 2); + } + + var change = (level != levelCommunexion); + + $(".btn-scope").removeClass("selected"); + $(".btn-scope-niv-"+level).addClass("selected"); + levelCommunexion = level; + + if(level == 1) endMsg = "à " + cityNameCommunexion + ", " + cpCommunexion; + if(level == 2) { + if(typeof(cityInseeCommunexion)!="undefined") + endMsg = "à la ville de " + cityInseeCommunexion; + else + endMsg = "au code postal " + cpCommunexion; + } + if(level == 3) endMsg = "au département " + department; + //if(level == 3) endMsg = "au département "; + if(level == 4) endMsg = "à votre région " + regionNameCommunexion; + if(level == 5) endMsg = "à l'ensemble du réseau"; + + if(change){ + toastr.success('Les données sont maintenant filtrées par rapport ' + endMsg); + $('.search-loader').html("<i class='fa fa-check'></i> Vous êtes connecté " + endMsg) + } + + + if(level == 1) endMsg = cityNameCommunexion + ", " + cpCommunexion; + if(level == 2){ + if(typeof(cityInseeCommunexion)!="undefined") + endMsg = cityInseeCommunexion; + else + endMsg = cpCommunexion; + } + //if(level == 3) endMsg = "Département " + department; + if(level == 3) endMsg = "Département " + department; + if(level == 4) endMsg = "Votre région " + regionNameCommunexion; + if(level == 5) endMsg = "Tout le réseau"; + + if(!communexionActivated) + toogleCommunexion(); + + $(".lbl-scope-list").html("<i class='fa fa-check'></i> " + endMsg); + + $(".btn-scope-niv-5").attr("data-original-title", "Niveau 5 - Tout le réseau"); + $(".btn-scope-niv-4").attr("data-original-title", "Niveau 4 - Région " + regionNameCommunexion); + $(".btn-scope-niv-3").attr("data-original-title", "Niveau 3 - Département " + department); + //$(".btn-scope-niv-3").attr("data-original-title", "Niveau 3 - Département "); + if(typeof(cityInseeCommunexion)!="undefined"){ + $(".btn-scope-niv-2").attr("data-original-title", "Niveau 2 - Ville entière : " + cityInseeCommunexion); + } + else{ + $(".btn-scope-niv-2").attr("data-original-title", "Niveau 2 - Code postal : " + cpCommunexion); + } + $(".btn-scope-niv-1").attr("data-original-title", "Niveau 1 - " + cityNameCommunexion + ", " + cpCommunexion); + $('.tooltips').tooltip(); + + if(typeof startSearch == "function") + startSearch(); +} + +function setCookies(){ + mylog.log("setCookies"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/getCommunexion/", + dataType: "json", + success: function(data){ + communexion = data ; + } + }); +} \ No newline at end of file diff --git a/assets/js/default/live.js b/assets/js/default/live.js new file mode 100644 index 0000000000000000000000000000000000000000..d85cf46719d95d9e05c6e76b4c936378d4d7b73f --- /dev/null +++ b/assets/js/default/live.js @@ -0,0 +1,310 @@ + +var liveScopeType = "global"; +function initLiveInterface(){ + $("#main-btn-start-search, .menu-btn-start-search").click(function(){ + var search = $("#main-search-bar").val(); + startWebSearch(search, currentCategory); + }); + + $("#second-search-bar").keyup(function(e){ + $("#main-search-bar").val($("#second-search-bar").val()); + $("#input-search-map").val($("#second-search-bar").val()); + if(e.keyCode == 13){ + var search = $(this).val(); + startWebSearch(search, currentCategory); + } + }); + $("#main-search-bar").keyup(function(e){ + $("#second-search-bar").val($("#main-search-bar").val()); + $("#input-search-map").val($("#main-search-bar").val()); + if(e.keyCode == 13){ + var search = $(this).val(); + startWebSearch(search, currentCategory); + } + }); + $("#input-search-map").keyup(function(e){ + $("#second-search-bar").val($("#input-search-map").val()); + $("#main-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + var search = $(this).val(); + startWebSearch(search, currentCategory); + } + }); + + $("#menu-map-btn-start-search").click(function(){ + var search = $("#input-search-map").val(); + startWebSearch(search, currentCategory); + }); +} + + +/*function bindCommunexionScopeEvents(){ + $(".btn-decommunecter").off().click(function(){ + activateGlobalCommunexion(false); + showTagsScopesMin(); + rebuildSearchScopeInput(); + $('.tooltips').tooltip(); + }); + $(".item-globalscope-checker").off().click(function(){ + $(".item-globalscope-checker").addClass("inactive"); + $(this).removeClass("inactive"); + + mylog.log("globalscope-checker", $(this).data("scope-name"), $(this).data("scope-type")); + setGlobalScope( $(this).data("scope-value"), $(this).data("scope-name"), $(this).data("scope-type"), + $(this).data("insee-communexion"), $(this).data("name-communexion"), $(this).data("cp-communexion"), + $(this).data("region-communexion"), $(this).data("country-communexion"), actionOnSetGlobalScope ) ; + }); + + $(".start-new-communexion").off().click(function(){ + activateGlobalCommunexion(true); + }); +}*/ +/*function initFilterLive(){ + dataNewsSearch = { + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + + }; + console.log(dataNewsSearch); + dataNewsSearch.tagSearch = $('#searchTags').val().split(','); + dataNewsSearch.searchType = searchType; + dataNewsSearch.textSearch = $('#main-search-bar').val(); + } */ + +function initFreedomInterface(){ + + initFormImages(); + + //loadLiveNow(); +} + +var timeout; +function startNewsSearch(isFirst){ + //Modif SBAR + //$(".my-main-container").off(); + //if(liveScopeType == "global"){ + dateLimit=0; + isFirst=true; + showNewsStream(isFirst); + /*$(".start-new-communexion").click(function(){ + setGlobalScope( $(this).data("scope-value"), $(this).data("scope-name"), $(this).data("scope-type"), + $(this).data("insee-communexion"), $(this).data("name-communexion"), $(this).data("cp-communexion"), + $(this).data("region-communexion"), $(this).data("country-communexion"),actionOnSetGlobalScope) ; + activateGlobalCommunexion(true); + });*/ + //}else{ + // showNewsStream(isFirst);//loadStream(0,5); + //} + //loadLiveNow(); +} + + +/*function loadStream(indexMin, indexMax){ console.log("LOAD STREAM FREEDOM"); + loadingData = true; + currentIndexMin = indexMin; + currentIndexMax = indexMax; + + //isLive = isLiveBool==true ? "/isLive/true" : ""; + //var url = "news/index/type/citoyens/id/<?php echo @Yii::app()->session["userId"]; ?>"+isLive+"/date/"+dateLimit+"?isFirst=1&tpl=co2&renderPartial=true"; + + var url = "news/index/type/city/isLive/true/date/"+dateLimit+"?tpl=co2&renderPartial=true&nbCol=2"; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/'+url, + data: { indexMin: indexMin, + indexMax:indexMax, + renderPartial:true + }, + success: + function(data) { + if(data){ //alert(data); + $("#news-list").append(data); + //bindTags(); + + } + loadingData = false; + $(".stream-processing").hide(); + }, + error:function(xhr, status, error){ + loadingData = false; + $("#newsstream").html("erreur"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + $("#newsstream").html("not found"); + } + } + }); +} + +function loadLiveNow () { + + var searchParams = { + "name":"", + "tpl":"/pod/nowList", + "latest" : true, + "searchType" : ["<?php echo Event::COLLECTION?>","<?php echo Project::COLLECTION?>", + "<?php echo Organization::COLLECTION?>","<?php echo ActionRoom::COLLECTION?>"], + "searchTag" : $('#searchTags').val().split(','), //is an array + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + "indexMin" : 0, + "indexMax" : 10 + }; + + + /*ajaxPost( "#nowList", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if($('.el-nowList').length==0) + $('.titleNowEvents').addClass("hidden"); + else + $('.titleNowEvents').removeClass("hidden"); + } , "html" ); +}*/ + +function showNewsStream(isFirst){ mylog.log("showNewsStream freedom"); + var isFirstParam = isFirst ? "?isFirst=1&tpl=co2" : "?tpl=co2"; + isFirstParam += "&nbCol=2"; + + var thisType="ko"; + var urlCtrl = "" + if(liveScopeType == "global") { + thisType = "city"; + urlCtrl = "/news/index/type/city/isLive/true"; + } + + var searchLocality = getLocalityForSearch(); + mylog.log("searchLocality", searchLocality); + var dataSearch = { + //"name" : name, + "localities" : searchLocality, + "searchType" : searchType, + "textSearch" : $('#main-search-bar').val(), + "searchTag" : ($('#searchTags').length ) ? $('#searchTags').val().split(',') : [] , + //"indexMin" : indexMin, + //"indexMax" : indexMax + }; + /*<?php if(@Yii::app()->session["userId"]){ ?> + else if(liveScopeType == "community"){ + thisType = "citoyens"; + urlCtrl = "/news/index/type/citoyens/id/<?php echo @Yii::app()->session["userId"]; ?>/isLive/true"; + } + <?php } ?>*/ + + //dataNewsSearch.type = thisType; + //var myParent = <?php echo json_encode(@$parent)?>; + //dataNewsSearch.parent = { } + + var loading = "<div class='loader text-dark text-center'>"+ + "<span style='font-size:25px;'>"+ + "<i class='fa fa-spin fa-circle-o-notch'></i> "+ + "<span class='text-dark'>"+trad.currentlyloading+" ...</span>" + + "</div>"; + + //loading = ""; + + if(isFirst){ //render HTML for 1st load + //if($("#newsstream .loader").length<0){ + // $("#newsstream").html(loading); + //} + ajaxPost("#newsstream",baseUrl+"/"+moduleId+urlCtrl+"/date/0"+isFirstParam,dataSearch, function(news){ + //showTagsScopesMin(".list_tags_scopes"); + $(window).bind("scroll",function(){ + if(!loadingData && !scrollEnd){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + //loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + showNewsStream(false); + } + } + }); + if(loadContent != ''){ + if(userId){ + //showFormBlock(true); + if(loadContent.indexOf("%hash%")) + loadContent = loadContent.replace("%hash%", "#"); + $("#get_url").val(loadContent); + $("#get_url").trigger("input"); + } + else { + toastr.error('you must be loggued to post on communecter!'); + } + } + //else + // showFormBlock(false); + + bindTags(); + if($("#noMoreNews").length<=0) + $("#newsstream").append(loading); + + //$("#formCreateNewsTemp").appendTo("#modal-create-anc #formCreateNews"); + //$("#info-write-msg").html("<?php echo Yii::t("common","Write a public message visible on the wall of selected places") ?>"); + //$("#info-write-msg").html("Conseil : donnez un maximum de détails"); + //showFormBlock(true); + //$("#formCreateNewsTemp").html(""); + + },"html"); + }else{ //data JSON for load next + //dateLimit=0;currentMonth = null; + loadingData = true; + //if($("#newsstream .loader").length<0){ + // alert(); + // $("#newsstream").append(loading); + //} + console.log("data",dataSearch); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+urlCtrl+"/date/"+dateLimit+"?tpl=co2&renderPartial=true&nbCol=2", + data: dataSearch, + success: function(data){ + if(data){ + $("#newsstream").find(".loader").remove(); + $("#news-list").append(data); + if($("#noMoreNews").length<=0) + $("#newsstream").append(loading); + //buildTimeLine (data.news, 0, 5); + //bindTags(); + //if(typeof(data.limitDate.created) == "object") + // dateLimit=data.limitDate.created.sec; + //else + // dateLimit=data.limitDate.created; + } + loadingData = false; + }, + error: function(){ + loadingData = false; + } + }); + } + $("#dropdown_search").hide(300); + +} + +function addSearchType(type){ + var index = searchType.indexOf(type); + if (index == -1) { + searchType.push(type); + $(".search_"+type).removeClass("fa-circle-o"); + $(".search_"+type).addClass("fa-check-circle-o"); + } + mylog.log(searchType); +} +function removeSearchType(type){ + var index = searchType.indexOf(type); + if (index > -1) { + searchType.splice(index, 1); + $(".search_"+type).removeClass("fa-check-circle-o"); + $(".search_"+type).addClass("fa-circle-o"); + } + mylog.log(searchType); +} + +function hideNewLiveFeedForm(){ + //$("#newLiveFeedForm").hide(200); + showFormBlock(false); +} diff --git a/assets/js/default/loginRegister.js b/assets/js/default/loginRegister.js new file mode 100644 index 0000000000000000000000000000000000000000..f67f14fc078bdcac3ddf50f52f1234a84f49e7d1 --- /dev/null +++ b/assets/js/default/loginRegister.js @@ -0,0 +1,542 @@ + +function userValidatedActions() { + if (userValidated) { + $(".errorHandler").hide(); + $(".emailValidated").show(); + $(".form-login #password-login").focus(); + } + + //We are in a process of invitation. The user already exists in the db. + if (invitor != "") { + $(".errorHandler").hide(); + $('.pendingProcess').show(); + $('.form-register #registerName').val(name); + $('.form-register #isInvitation').val(true); + $('#email3').prop('disabled', true); + $('#inviteCodeLink').hide(); + } +} + +function removeParametersWithoutReloading() { + window.history.pushState("Invitation", + "Invitation", + location.href.replace(location.search,"")); +} + +var Login = function() { + "use strict"; + var runBoxToShow = function() { + var el = $('.box-login'); + if (getParameterByName('box').length) { + switch(getParameterByName('box')) { + case "register" : + el = $('.box-register'); + break; + case "password" : + el = $('.box-email'); + emailType = 'password' + break; + case "validate" : + el = $('.box-email'); + emailType = 'validateEmail' + break; + default : + el = $('.box-login'); + break; + } + } + }; + + //function to return the querystring parameter with a given name. + var getParameterByName = function(name) { + name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); + var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); + return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); + }; + var runSetDefaultValidation = function() { + $.validator.setDefaults({ + errorElement : "span", // contain the error msg in a small tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") { + // for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.attr("name") == "card_expiry_mm" || element.attr("name") == "card_expiry_yyyy") { + error.appendTo($(element).closest('.form-group').children('div')); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : ':hidden', + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error'); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').addClass('has-error'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + } + }); + }; + var runLoginValidator = function() { + var form = $('.form-login'); + var loginBtn = null; + /*Ladda.bind('.loginBtn', { + callback: function (instance) { + loginBtn = instance; + } + });*/ + form.submit(function(e){e.preventDefault() }); + var errorHandler = $('.errorHandler', form); + form.validate({ + rules : { + email : { + minlength : 2, + required : true + }, + password : { + minlength : 4, + required : true + } + }, + submitHandler : function(form) { + errorHandler.hide(); + $(".alert").hide(); + //loginBtn.start(); + $(".loginBtn").find(".fa").removeClass("fa-sign-in").addClass("fa-spinner fa-spin"); + var params = { + "email" : $("#email-login").val(), + "pwd" : $("#password-login").val(), + "remember" : $("#formLogin #remember").prop("checked") + }; + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/authenticate", + data: params, + success: function(data){ + if(data.result) + { + //alert("dyFObj.openForm"+dyFObj.openFormAfterLogin.type); + var url = requestedUrl; + //mylog.warn(url,", has #"+url.indexOf("#"),"count / : ",url.split("/").length - 1 ); + if(data.goto != null){ + window.location.href = baseUrl+"/"+moduleId+data.goto; + } else if( typeof dyFObj.openFormAfterLogin != "undefined"){ + userId = data.id; + $('#modalLogin').modal("hide"); + dyFObj.openForm( dyFObj.openFormAfterLogin.type, dyFObj.openFormAfterLogin.afterLoad, dyFObj.openFormAfterLogin.data ); + } else { + userId=data.id; + var hash = location.hash.replace( "#","" ); + if(typeof hash != "undefined" && hash != ""){ + var hashT=hash.split("."); + if(typeof hashT == "string") + var slug=hashT; + else + var slug=hashT[0]; + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/slug/check", + data: {slug:slug}, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + if (!data.result) + window.location.reload(); + else{ + if(location.hash.indexOf("#page") >= 0) + window.location.reload(); + else if( url.split("/").length - 1 <= 3 ) { + location.hash='#page.type.citoyens.id.'+userId; + window.location.reload(); + } + else { + location.hash='#page.type.citoyens.id.'+userId; + window.location.reload(); + } + } + } + }); + }else{ + if(location.hash.indexOf("#page") >= 0) + window.location.reload(); + else if( url.split("/").length - 1 <= 3 ) { + location.hash='#page.type.citoyens.id.'+userId; + window.location.reload(); + } + else { + location.hash='#page.type.citoyens.id.'+userId; + window.location.reload(); + } + } + } + } else { + var msg; + if (data.msg == "notValidatedEmail") { + $('.notValidatedEmailResult').show(); + } else if (data.msg == "betaTestNotOpen") { + $('.betaTestNotOpenResult').show(); + } else if (data.msg == "emailNotFound") { + $('.emailNotFoundResult').show(); + } else if (data.msg == "emailAndPassNotMatch") { + $('.emailAndPassNotMatchResult').show(); + } else if (data.msg == "accountPending") { + pendingUserId = data.pendingUserId; + $(".errorHandler").hide(); + $('.register').click(); + $('.pendingProcess').show(); + var pendingUserEmail = data.pendingUserEmail; + $('#email3').val(pendingUserEmail); + $('#email3').prop('disabled', true); + } else{ + msg = data.msg; + $('.loginResult').html(msg); + $('.loginResult').show(); + } + $(".loginBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + //loginBtn.stop(); + } + }, + error: function(data) { + console.log(data); + $(".loginBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + toastr.error("Something went really bad : contact your administrator !"); + //loginBtn.stop(); + }, + dataType: "json" + }); + return false; // required to block normal submit since you used ajax + }, + invalidHandler : function(event, validator) {//display error alert on form submit + $(".loginBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + errorHandler.show(); + //loginBtn.stop(); + } + }); + }; + + var runForgotValidator = function() { + var form2 = $('.form-email'); + var errorHandler2 = $('.errorHandler', form2); + var forgotBtn = null; + Ladda.bind('.forgotBtn', { + callback: function (instance) { + forgotBtn = instance; + } + }); + form2.validate({ + rules : { + email2 : { + required : true + } + }, + submitHandler : function(form) { + errorHandler2.hide(); + forgotBtn.start(); + var params = { + "email" : $("#email2").val(), + "type" : "password" + }; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/sendemail", + data: params, + success: function(data){ + if (data.result) { + alert(data.msg); + window.location.reload(); + } else if (data.errId == "UNKNOWN_ACCOUNT_ID") { + if (confirm(data.msg)) { + $('.box-email').removeClass("animated flipInX").addClass("animated bounceOutRight").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).hide().removeClass("animated bounceOutRight"); + }); + $('.box-register').show().addClass("animated bounceInLeft").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).show().removeClass("animated bounceInLeft"); + + }); + } else { + window.location.reload(); + } + } + }, + error: function(data) { + toastr.error("Something went really bad : contact your administrator !"); + }, + dataType: "json" + }); + return false; + }, + invalidHandler : function(event, validator) {//display error alert on form submit + errorHandler2.show(); + forgotBtn.stop(); + } + }); + }; + + var runRegisterValidator = function() { console.log("runRegisterValidator!!!!"); + var form3 = $('.form-register'); + var errorHandler3 = $('.errorHandler', form3); + var createBtn = null; + + /*Ladda.bind('.createBtn', { + callback: function (instance) { + createBtn = instance; + } + });*/ + form3.validate({ + rules : { + name : { + required : true, + minlength : 4 + }, + username : { + required : true, + validUserName : true, + rangelength : [4, 32] + }, + email3 : { + required : { + depends:function(){ + $(this).val($.trim($(this).val())); + return true; + } + }, + email : true + }, + password3 : { + minlength : 8, + required : true + }, + passwordAgain : { + equalTo : "#password3", + required : true + }, + agree: { + minlength : 1, + required : true + } + }, + + messages: { + agree: trad["mustacceptCGU"], + }, + submitHandler : function(form) { console.log("runRegisterValidator submitHandler"); + errorHandler3.hide(); + //createBtn.start(); + $(".createBtn").prop('disabled', true); + $(".createBtn").find(".fa").removeClass("fa-sign-in").addClass("fa-spinner fa-spin"); + var params = { + "name" : $('.form-register #registerName').val(), + "username" :$(".form-register #username").val(), + "email" : $(".form-register #email3").val(), + "pwd" : $(".form-register #password3").val(), + "app" : moduleId, //"$this->module->id" + "pendingUserId" : pendingUserId, + "mode" : REGISTER_MODE_TWO_STEPS + }; + if($('.form-register #isInvitation').val()) + params.isInvitation=true; + if( $("#inviteCode").val() ) + params.inviteCode = $("#inviteCode").val(); + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/register", + data: params, + success: function(data){ + if(data.result) { + //createBtn.stop(); + $(".createBtn").prop('disabled', false); + $(".createBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + $("#registerName").val(""); + $("#username").val(""); + $("#email3").val(""); + $("#password3").val(""); + $("#passwordAgain").val(""); + $('#agree').prop('checked', false); + console.log(data); + if(typeof data.isInvitation != "undefined" && data.isInvitation){ + toastr.success(data.msg); + history.pushState(null, "New Title",'#page.type.citoyens.id.'+data.id); + //window.location.href = baseUrl+'#page.type.citoyens.id.'+data.id; + window.location.reload(); + + } + else{ + $("#modalRegisterSuccessContent").html("<h3><i class='fa fa-smile-o fa-4x text-green'></i><br><br> "+data.msg+"</h3>"); + $("#modalRegisterSuccess").modal({ show: 'true' }); + // Hide modal if "Okay" is pressed + $('#modalRegisterSuccess .btn-default').click(function() { + mylog.log("hide modale and reload"); + $('.modal').modal('hide'); + //window.location.href = baseUrl+'/#default.live'; + window.location.href = baseUrl+"/"+moduleId; + window.location.reload(); + }); + } + //urlCtrl.loadByHash("#default.directory"); + } + else { + $('.registerResult').html(data.msg); + $('.registerResult').show(); + $(".createBtn").prop('disabled', false); + $(".createBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + //createBtn.stop(); + } + }, + error: function(data) { + toastr.error(trad["somethingwentwrong"]); + $(".createBtn").prop('disabled', false); + $(".createBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + //createBtn.stop(); + }, + dataType: "json" + }); + return false; + }, + invalidHandler : function(event, validator) {//display error alert on form submit + errorHandler3.show(); + $(".createBtn").prop('disabled', false); + $(".createBtn").find(".fa").removeClass("fa-spinner fa-spin").addClass("fa-sign-in"); + //createBtn.stop(); + } + }); + }; + return { + //main function to initiate template pages + init : function() { + addCustomValidators(); + runBoxToShow(); + runSetDefaultValidation(); + runLoginValidator(); + runForgotValidator(); + runRegisterValidator(); + } + }; +}(); + +var oldCp = ""; + +function validateUserName() { mylog.log("validateUserName click"); + var username = $('.form-register #username').val(); + if(username.length >= 4) { + clearTimeout(timeout); + timeout = setTimeout(function() { + //mylog.log("bing !"); + if (! isUniqueUsername(username)) { mylog.log("validateUserName notUnik"); + var validator = $( '.form-register' ).validate(); + validator.showErrors({ + "username": trad["usernamenotunique"] + }); + } + }, 3000); + } +} + +function callBackFullSearch(resultNominatim){ + mylog.log("callback ok"); + var ok = Sig.showCityOnMap(resultNominatim, true, "person"); + if(!ok){ + if($('#city').val() != "") { + findGeoposByInsee($('#city').val(), callbackFindByInseeSuccessRegister); + } + } + //$(".topLogoAnim").hide(); + + //setTimeout("setMapPositionregister();", 1000); +} + +//quand la recherche par code insee a fonctionné +function callbackFindByInseeSuccessRegister(obj){ + mylog.log("callbackFindByInseeSuccess"); + //si on a bien un résultat + if (typeof obj != "undefined" && obj != "") { + //récupère les coordonnées + var coords = Sig.getCoordinates(obj, "markerSingle"); + //si on a une geoShape on l'affiche + if(typeof obj.geoShape != "undefined") Sig.showPolygon(obj.geoShape); + //on affiche le marker sur la carte + $("#alert-city-found").show(); + //mylog.log("verification contenue obj"); + //mylog.dir(obj); + Sig.showCityOnMap(obj, true, "person"); + + if(typeof obj.name != "undefined"){ + $("#main-title-public2").html("<i class='fa fa-university'></i> "+obj.name); + $("#main-title-public2").show(); + } + + hideLoadingMsg(); + + //showGeoposFound(coords, projectId, "projects", projectData); + } + else { + mylog.log("Erreur getlatlngbyinsee vide"); + } +} + function searchAddressInGeoShape(){ + if($('#cp').val() != "" && $('#cp').val() != null){ + findGeoposByInsee($('#city').val(), callbackFindByInseeSuccessAdd); + } + } + + function callbackFindByInseeSuccessAdd(obj){ + mylog.log("callbackFindByInseeSuccessAdd"); + mylog.dir(obj); + //si on a bien un résultat + if (typeof obj != "undefined" && obj != "") { + currentCityByInsee = obj; + //récupère les coordonnées + var coords = Sig.getCoordinates(obj, "markerSingle"); + //si on a une street dans le form + if($('#fullStreet').val() != "" && $('#fullStreet').val() != null){ + //si on a une geoShape dans la reponse obj + if(typeof obj.geoShape != "undefined") { + //on recherche avec une limit bounds + var polygon = L.polygon(obj.geoShape.coordinates); + var bounds = polygon.getBounds(); + Sig.execFullSearchNominatim(0, bounds); + } + else{ + //on recherche partout + Sig.execFullSearchNominatim(0); + } + } + else{ + Sig.showCityOnMap(obj, true, "person"); + } + + if(typeof obj.name != "undefined"){ + $("#main-title-public2").html("<i class='fa fa-university'></i> "+obj.name); + $("#main-title-public2").show(); + } + hideLoadingMsg(); + } + else { + mylog.log("Erreur getlatlngbyinsee vide"); + } + } +//quand la recherche par code insee n'a pas fonctionné +function callbackFindByInseeError(){ + mylog.log("erreur getlatlngbyinsee"); +} + +function initRegister() { + $('.form-register #registerName').val(""); + $(".form-register #username").val(""); + $(".form-register #email3").val(""); + $(".form-register #password3").val(""); + $(".form-register #passwordAgain").val(""); + $(".form-register #inviteCode").val(""); +} \ No newline at end of file diff --git a/assets/js/default/media.js b/assets/js/default/media.js new file mode 100644 index 0000000000000000000000000000000000000000..6ae0032dc288935bb86e563e2b66f0be367efb4b --- /dev/null +++ b/assets/js/default/media.js @@ -0,0 +1,223 @@ + +function initMediaInterface(){ + //init loading in scroll + $(window).bind("scroll",function(){ + if(!loadingData && !scrollEnd){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + } + } + }); + + $(".btn-select-media-src").click(function(){ + var src = $(this).data("srcid"); + var srcActive = $(this).data("srcactive"); + console.log("srcactive", srcActive, sources); + if(srcActive==true){ + if(sources.length == 1){ + //toastr.error("Looooongin ! Impossible de désactiver toutes les sources en même temps !"); + /*setTimeout(function(){ + toastr.error("Nan mé... t'as cru koi ?"); + setTimeout(function(){ + toastr.error("Fou la flème !.."); + }, 1000); + }, 1500);*/ + return; + } + for(var i = sources.length; i--;){ + if (sources[i] === src) sources.splice(i, 1); + $(this).data("srcactive", false); + $(".src"+src+" .srcActive").addClass("hidden"); + $(".src"+src+" .srcDisable").removeClass("hidden"); + } + }else{ + sources.push(src); + $(this).data("srcactive", true); + $(".src"+src+" .srcActive").removeClass("hidden"); + $(".src"+src+" .srcDisable").addClass("hidden"); + } + startReloadTimeout(); + console.log("srcactive", srcActive, sources); + + }); + + //btn to load media data for first time (if no media found) + $("#main-btn-start-search, #main-search-bar-addon, .menu-btn-start-search").click(function(){ + $("#timeline-live").html(""); + loadStream(0, indexStep); + }); + + $("#second-search-bar").keyup(function(e){ + $("#main-search-bar").val($("#second-search-bar").val()); + $("#input-search-map").val($("#second-search-bar").val()); + if(e.keyCode == 13){ + $("#timeline-live").html(""); + loadStream(0, indexStep); + } + }); + $("#main-search-bar").keyup(function(e){ + $("#second-search-bar").val($("#main-search-bar").val()); + $("#input-search-map").val($("#main-search-bar").val()); + if(e.keyCode == 13){ + $("#timeline-live").html(""); + loadStream(0, indexStep); + } + }); + $("#input-search-map").keyup(function(e){ + $("#second-search-bar").val($("#input-search-map").val()); + $("#main-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + $("#timeline-live").html(""); + loadStream(0, indexStep); + } + }); + + $("#menu-map-btn-start-search, #main-search-bar-addon").click(function(){ + $("#timeline-live").html(""); + loadStream(0, indexStep); + }); + + $('#main-search-bar, #second-search-bar, #input-search-map').filter_input({regex:'[^@#\"\`/\(|\)/\\\\]'}); //[a-zA-Z0-9_] + + + $("#btn-show-sources-xs").click(function(){ + if($(".medias-sources").hasClass("hidden-xs")){ + $(".medias-sources").removeClass("hidden-xs"); + }else{ + $(".medias-sources").addClass("hidden-xs"); + } + }); +} + + + +function startReloadTimeout(){ + $("#timeline-live").html(""); + $("#timeline-reload").html("<i class='fa fa-circle'></i> "+ + "<i class='fa fa-circle'></i> "+ + "<i class='fa fa-circle'></i>"+ + "<hr style='margin-top: 34px;'>"); + var sec = 3; + if(typeof interval != "undefined") clearInterval(interval); + interval = setInterval(function(){ + if(sec == 1){ + loadStream(0, indexStep); + $("#timeline-reload").html(""); + $("#timeline-live").html(""); + clearInterval(interval); + } + else{ + sec--; + var str = ""; + for(n=0;n<sec;n++) str += "<i class='fa fa-circle'></i> "; + str += "<hr style='margin-top: 34px;'>"; + $("#timeline-reload").html(str); + } + }, 800); +} + + +var sources = new Array("NC1", "NCI", "NCTV", "TAZAR", "OUTREMERS360"); + +function loadStream(indexMin, indexMax){ console.log("load stream media"); + if(indexMin == 0) scrollEnd = false; + + loadingData = true; + currentIndexMin = indexMin; + currentIndexMax = indexMax; + var search = $("#main-search-bar").val(); + + + if(indexMin == 0){ + $("#timeline-live").html(""); + KScrollTo("#content-media"); + } + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/media", + data: { indexMin: indexMin, + indexMax:indexMax, + sources: sources, + search: search, + renderPartial:true + }, + success: + function(html) { + $("#timeline-live").append(html); + $(".medias-sources").hasClass("hidden-xs"); + loadingData = false; + }, + error:function(xhr, status, error){ + loadingData = false; + $("#timeline-live").html("erreur"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + $("#timeline-live").html("not found"); + } + } + }); +} + + +//lance le chargement des commentaires pour une publication +function showMediaComments(id){ + if(!$("#commentContent"+id).hasClass("hidden")){ + $(".commentContent").html(""); + $(".commentContent").removeClass("hidden"); + + $('#commentContent'+id).html('<div class="text-dark margin-bottom-10"><i class="fa fa-spin fa-refresh"></i> Chargement des commentaires ...</div>'); + getAjax('#commentContent'+id ,baseUrl+'/'+moduleId+"/comment/index/type/media/id/"+id,function(){ + + },"html"); + }else{ + $("#commentContent"+id).removeClass("hidden"); + mylog.log("scroll TO : ", $('#newsFeed'+id).position().top); + + } +} + +/* COMMENTS vvv */ + + +function initCommentsTools(thisMedias){ + //ajoute la barre de commentaire & vote up down signalement sur tous les medias + $.each(thisMedias, function(key, media){ + if(typeof media._id != "undefined"){ + media.target = "media"; + + var commentCount = 0; + idMedia=media._id['$id']; + if ("undefined" != typeof media.commentCount) + commentCount = media.commentCount; + + idSession = typeof idSession != "undefined" ? idSession : false; + + var lblCommentCount = ''; + if(commentCount == 0 && idSession) lblCommentCount = "<i class='fa fa-comment'></i> Commenter"; + if(commentCount == 1) lblCommentCount = "<i class='fa fa-comment'></i> <span class='nbNewsComment'>" + commentCount + "</span> commentaire"; + if(commentCount > 1) lblCommentCount = "<i class='fa fa-comment'></i> <span class='nbNewsComment'>" + commentCount + "</span> commentaires"; + if(commentCount == 0 && !idSession) lblCommentCount = "0 <i class='fa fa-comment'></i> "; + + lblCommentCount = '<a href="javascript:" class="newsAddComment letter-blue" data-media-id="'+idMedia+'">' + + lblCommentCount + + '</a>'; + + var voteTools = voteCheckAction(media._id['$id'], media); + + voteTools = lblCommentCount + voteTools; + + $("#footer-media-"+media._id['$id']).html(voteTools); + } + }); + + $(".newsAddComment").click(function(){ + var id = $(this).data("media-id"); + showMediaComments(id); + }); +} + +/* COMMENTS ^^^ */ \ No newline at end of file diff --git a/assets/js/default/menu.js b/assets/js/default/menu.js new file mode 100644 index 0000000000000000000000000000000000000000..29596ce9a6b2410f5c17167b437105ec995858b6 --- /dev/null +++ b/assets/js/default/menu.js @@ -0,0 +1,356 @@ + +function removeExplainations(){ + $(".removeExplanation").replaceWith("<i class='fa fa-spin fa-circle-o-notch text-azure'></i>"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/updatesettings", + dataType: "json", + success: function(data) { + if(data.result){ + toastr.success(data.msg); + showMenuExplanation = false; + $(".removeExplanationCont").hide(); + } + else + toastr.error(data.msg); + }, + }); +} + +var timeoutSearch = setTimeout(function(){}, 0); + + +function realTimeKKBB(){ + + var contents = $("#iframe-kkbb"); + var collected = contents.find( ".collected" ).html(); + var amount = contents.find( ".amount .small .funded" ).html(); + + $("#kkbb-big #collected").html(collected); + $("#kkbb-big #collected small").html(""); + $("#kkbb-big #collected strong").html(""); + + + var amountNumeric = amount.replace("%", ""); + $("#kkbb-big #amount").html(amount); + $("#kkbb-big .percentage-wrapper").html(""); + $("#kkbb-big .progress-bar").css("width", amount); + $("#kkbb-big .progress-bar").attr("aria-valuenow", amountNumeric); + + $( "#iframe-kkbb" ).html(""); +} + + +function bindEventMenu(){ + //setTimeout(function(){ + $(".globale-announce").css("width", 200); + $("#kkbb-big").hide(400); + $("#kkbb-min").show(400); + //}, 5000); + + $('#btn-close-globale-announce').click( function(e){ + $(".globale-announce").css("width", 200); + $("#kkbb-big").hide(400); + $("#kkbb-min").show(400); + //var path = "/"; + //if(location.hostname.indexOf("localhost") >= 0) path = "/ph/"; + + //$.cookie('kkbbok', true, { expires: 365, path: path }); + }); + $('.globale-announce').mouseleave( function(e){ + $(".globale-announce").css("width", 200); + $("#kkbb-big").hide(400); + $("#kkbb-min").show(400); + //var path = "/"; + //if(location.hostname.indexOf("localhost") >= 0) path = "/ph/"; + + //$.cookie('kkbbok', true, { expires: 365, path: path }); + }); + + $('#kkbb-min').mouseenter( function(e){ + $(".globale-announce").css("width", 400); + $("#kkbb-min").hide(400); + $("#kkbb-big").show(400); + + }); + + $('.btn-menu0').click( function(e){ + if(location.hash != "#default.twostepregister") + urlCtrl.loadByHash("#default.home"); + else + urlCtrl.loadByHash("#default.twostepregister"); + } ); + + $('.btn-menu2') + .click(function(e){ + if(location.hash != "#default.directory" || isMapEnd == false) + urlCtrl.loadByHash("#default.directory"); + else showMap(false); + }) + .mouseenter(function(e){ + if(showMenuExplanation){ + toggle(".explainDirectory",".explain"); + $(".removeExplanation").parent().show(); + } + }); + + $('.btn-menu3') + .click(function(e){ + if(location.hash != "#default.agenda" || isMapEnd == false) + urlCtrl.loadByHash("#default.agenda"); + else showMap(false); + }) + .mouseenter(function(e){ + if(showMenuExplanation){ + toggle(".explainAgenda",".explain"); + $(".removeExplanation").parent().show(); + } + }); + + $('.btn-menu4') + .click(function(e){ + if(location.hash != "#default.news" || isMapEnd == false) + urlCtrl.loadByHash("#default.news"); + else showMap(false); + }) + .mouseenter(function(e){ + if(showMenuExplanation){ + $(".removeExplanation").parent().show(); + toggle(".explainNews",".explain") + } + }); + + + + // $('.btn-menu3').click(function(e){ urlCtrl.loadByHash("#default.agenda"); }).mouseenter(function(e){ toggle(".explainAgenda",".explain")}); + //$('.btn-menu4').click(function(e){ urlCtrl.loadByHash("#default.news"); }).mouseenter(function(e){ toggle(".explainNews",".explain")} ); + $('.btn-menu5').click(function(e){ + showFloopDrawer(true); + }) + .mouseenter(function(e){ + // if(showMenuExplanation) + // toggle(".explainMyDirectory",".explain") + }); + $('.btn-menu6').mouseenter(function(e){ + if(showMenuExplanation){ + $(".removeExplanation").parent().show(); + toggle(".explainHelpUs",".explain") + } + }); + + // $(".btn-menu-add").mouseenter(function(){ + // $(".drop-up-btn-add").show(400); + // $(".drop-up-btn-add .lbl-btn-menu-name").css("display","inline"); + // $(".btn-menu-add .lbl-btn-menu-name").css("display", "inline"); + // }); + + $(".btn-login").click(function(){ + //mylog.log("btn-login"); + showPanel("box-login"); + //$(".main-col-search").html(""); + }).mouseenter(function(e){ + if(showMenuExplanation){ + $(".removeExplanation").parent().show(); + toggle(".explainConnect",".explain"); + } + }); + + $(".btn-register").click(function(){ + //mylog.log("btn-register"); + showPanel("box-register"); + //$(".main-col-search").html(""); + }).mouseenter(function(e){ + if(showMenuExplanation){ + $(".removeExplanation").parent().show(); + toggle(".explainRegister",".explain"); + } + }); + +/* $(".btn-logout").click(function(){ + mylog.log("btn-logout"); + window.location.href = urlLogout; + });*/ + + $(".btn-scope, .btn-param-postal-code").mouseenter(function(e){ + clearTimeout(timeoutHover); + $(".hover-info,.hover-info2").hide(); + }); + + $(".btn-param-postal-code").mouseenter(function(e){ + showInputCommunexion(); + if(showMenuExplanation){ + $(".removeExplanation").parent().show(); + //showDefinition("explainCommunectMe"); + } + }); + $(".btn-param-postal-code").click(function(e){ + ////mylog.log("cookie", $.cookie('inseeCommunexion')); + if(typeof $.cookie('inseeCommunexion') == "undefined" && typeof inseeCommunexion == "undefined"){ + //$(".search-loader").html("<i class='fa fa-spin fa-circle-o-notch'></i> Géolocalisation en cours ..."); + showMap(true); + initHTML5Localisation('communexion'); + }else{ + selectScopeLevelCommunexion(1); + } + }); + $("#searchBarPostalCode").mouseenter(function(e){ + clearTimeout(timeoutCommunexion); + }); + + $('#searchBarPostalCode').keyup(function(e){ + //if(location.hash == "#default.home"){ + clearTimeout(timeoutSearch); + timeoutSearch = setTimeout(function(){ startNewCommunexion(); }, 5000); + //} + }); + + $(".btn-geoloc-auto").click(function(e){ + //mylog.log("cookie", $.cookie('inseeCommunexion')); + if($.cookie('inseeCommunexion')){ + //urlCtrl.loadByHash("#city.detail.insee." + $.cookie('inseeCommunexion')+ ".postalCode." + $.cookie('cpCommunexion')); + }else{ + if(geolocHTML5Done == false){ + //$(".search-loader").html("<i class='fa fa-spin fa-circle-o-notch'></i> Géolocalisation en cours ..."); + + initHTML5Localisation('communexion'); + } + } + + }).mouseenter(function(e){ + if(showMenuExplanation){ + showDefinition("explainCommunectMe"); + $(".removeExplanation").parent().show(); + } + });; + + + + var timeoutHover = setTimeout(function(){}, 0); + var hoverPersist = false; + var positionMouseMenu = "out"; + + // $(".hover-menu").mouseenter(function(){ + // ////mylog.log("enter all"); + // positionMouseMenu = "in"; + // //$(".main-col-search").animate({ opacity:0.3 }, 0 ); + // $(".main-menu-right .lbl-btn-menu-name").show(0); + // $(".main-menu-right .lbl-btn-menu-name").css("display", "inline"); + // $(".main-menu-right .menu-button-title").addClass("large"); + + // //showInputCommunexion(); + + + // }); + + // $(".hover-menu").mouseleave(function(){ + // //clearTimeout(timeoutHover); + // //$(".hover-info").hide(); + // }); + + + // $(".hover-menu .btn-menu").mouseenter(function(){ + // ////mylog.log("enter btn, loginRegister", isLoginRegister()); + // if(!isLoginRegister()){ + // positionMouseMenu = "inBtn"; + // //$(".main-col-search").animate({ opacity:0.3 }, 0 ); + // $(".main-menu-right .menu-button-title").addClass("large"); + + // if(!showMenuExplanation) + // $(".removeExplanationCont").hide(); + + // $(".main-menu-right .lbl-btn-menu-name, .infoVersion").css("display" , "inline"); + + // clearTimeout(timeoutHover); + // timeoutHover = setTimeout(function(){ + // //hoverPersist = true; + // if(showMenuExplanation) + // $(".hover-info").css("display" , "inline"); + // }, 1500); + // } + // }); + + $(document).mouseleave(function(){ + if(!isLoginRegister()){ + // hoverPersist = false; + // clearTimeout(timeoutHover); + // positionMouseMenu = "out"; + // //$(".main-col-search").animate({ opacity:1 }, 0 ); + // $(".main-menu-right .lbl-btn-menu-name").hide(); + // $(".main-menu-right .menu-button").removeClass("large"); + } + $(".hover-info,.hover-info2, .infoVersion").hide(); + $(".drop-up-btn-add").hide(400); + $("#notificationPanelSearch").hide(); + $("#input-communexion").hide(400); + + clearTimeout(timeoutSearch); + clearTimeout(timeoutHover); + }); + + $(".main-col-search, .mapCanvas").click(function(){ + //permet de savoir si l'utilisateur est en train de se logguer ou de s'inscrire + if(!isLoginRegister()){ + hoverPersist = false; + clearTimeout(timeoutHover); + positionMouseMenu = "out"; + $(".main-col-search").animate({ opacity:1 }, 200 ); + $(".lbl-btn-menu-name").hide(); + $(".menu-button").removeClass("large"); + } + $(".hover-info,.hover-info2, .infoVersion").hide(); + $(".drop-up-btn-add").hide(400); + $("#notificationPanelSearch").hide(); + $("#input-communexion").hide(400); + + clearTimeout(timeoutSearch); + clearTimeout(timeoutHover); + }); + + $(".main-col-search, .mapCanvas").mouseenter(function(){ + //permet de savoir si l'utilisateur est en train de se logguer ou de s'inscrire + if(!hoverPersist){ + if(!isLoginRegister()){ + positionMouseMenu = "out"; + $(".main-col-search").animate({ opacity:1 }, 200 ); + $(".main-menu-right .lbl-btn-menu-name").hide(); + $(".menu-button").removeClass("large"); + timeoutCommunexion = setTimeout(function(){ + //mylog.log("HIDE HIDE"); $("#input-communexion").hide(200); clearTimeout(timeoutCommunexion); + }, 300); + } + //$(".hover-info,.hover-info2").hide(); + $(".drop-up-btn-add").hide(400); + $("#notificationPanelSearch").hide(); + clearTimeout(timeoutHover); + //$("#input-communexion").hide(400); + } + }); + + $(".menu-button").click(function(){ + ////mylog.log("login display", !isLoginRegister()); + //permet de savoir si l'utilisateur est en train de se logguer ou de s'inscrire + var login_register = isLoginRegister(); + + //mylog.log(isLoginRegister()); + if(!isLoginRegister()){ + positionMouseMenu = "out"; + $(".main-col-search").animate({ opacity:1 }, 200 ); + hoverPersist = false; + $(".main-menu-right .lbl-btn-menu-name").hide(); + $(".menu-button").removeClass("large"); + } + $(".hover-info,.hover-info2, .infoVersion").hide(); + //$(".drop-up-btn-add").hide(400); + }); + + // $(".btn-menu-add").click(function(){ + // $(".btn-menu-add .lbl-btn-menu-name").show(200); + // $(".btn-menu-add .lbl-btn-menu-name").css("display", "inline");; + // }); + + + function isLoginRegister(){ + if($(".box-login").length <= 0) return false; + return ($(".box-login").css("display") != "none" || $(".box-register").css("display") != "none"); + } +} \ No newline at end of file diff --git a/assets/js/default/notifications.js b/assets/js/default/notifications.js new file mode 100644 index 0000000000000000000000000000000000000000..564e96a4544bd52f4f1cea4db7dcd74736d26600 --- /dev/null +++ b/assets/js/default/notifications.js @@ -0,0 +1,284 @@ +var notifications = null; +var maxNotifTimstamp = 0; + +function bindNotifEvents(element){ + $(".notifList"+element+" a.notif").off().on("mousedown",function (e) + { + markAsRead( $(this).data("id") ); + hash = $(this).data("href"); + elem = $(this).parent(); + //elem.removeClass('animated bounceInRight').addClass("animated bounceOutRight"); + //elem.removeClass("enable"); + setTimeout(function(){ + // elem.addClass("read"); + //elem.removeClass('animated bounceOutRight'); + if(e.which==2) + window.open(baseUrl+hash, '_blank'); + else + urlCtrl.loadByHash(hash); + //notifCount(); + }, 200); + }); + $('.tooltips').tooltip(); + $(".notifList"+element+" li").mouseenter(function(){ + $(this).find(".removeBtn").show(); + }).mouseleave(function(){ + $(this).find(".removeBtn").hide(); + }) +} +function updateNotification(action, element, id) +{ + var action = action; + var all = true; + data = new Object; + if(id != null){ + var notifId=id; + all=false; + data.id=id + } else { + data.action=action; + data.all=all; + } + //ajax remove Notifications by AS Id + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/notification/update", + data: data, + dataType : 'json' + }) + .done( function (data) { + mylog.dir(data); + if ( data && data.result ) { + if(action=="seen"){ + $(".notifList"+element+" li.notifLi").addClass("seen") + notifCount(); + }else{ + if(all) + $(".notifList"+element+" li.notifLi").addClass("read"); + else + $(".notifList"+element+" li.notif_"+notifId).addClass("read"); + } + mylog.log("notification cleared ",data); + } else { + toastr.error("no notifications found "); + } + + }); +} +function markAllAsSeen(){ + updateNotification("seen",""); +} +function markAsRead(id){ + updateNotification("read","", id); +} +function markAllAsRead(element) +{ + updateNotification("read",element); +} +function removeNotification(id) +{ // Ancienne markAsRead + mylog.log("markAsRead",id); + //ajax remove Notifications by AS Id + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/notification/marknotificationasread", + data: { "id" : id }, + dataType : 'json' + }) + .done( function (data) { + //mylog.dir(data); + if ( data && data.result ) { + $("li.notif_"+id).remove(); + mylog.log("notification cleared ",data); + } else { + toastr.error("no notifications found "); + } + notifCount(); + }); +} + +function removeAllNotifications() +{ + //Ancienne markAllAsRead + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/notification/removeall", + dataType : 'json' + }) + .done( function (data) { + mylog.dir(data); + if ( data && data.result ) { + refreshNotifications(userId,"citoyens","","menuTop"); + //$(".notifList li.notifLi").remove(); + //mylog.log("notifications cleared ",data); + //$(".sb-toggle-right").trigger("click"); + } else { + toastr.error("no notifications found "); + } + notifCount(); + }); + +} + +function refreshNotifications(elementId,elementType,element,event) +{ + //ajax get Notifications + $(".pageslide-list.header .btn-primary i.fa-refresh").addClass("fa-spin"); + mylog.log("refreshNotifications", maxNotifTimstamp); + var element = element; + if(typeof event != "undefined" && event) + var event=event; + else + var event=null; + $.ajax({ + type: "GET", + url: baseUrl+"/"+moduleId+"/notification/getnotifications/type/"+elementType+"/id/"+elementId+"?ts="+maxNotifTimstamp + }) + .done(function (data) { //mylog.log("REFRESH NOTIF : "); mylog.dir(data); + if (data) { + buildNotifications(data,element,event); + } else { + toastr.error("no notifications found "); + } + $(".pageslide-list.header .btn-primary i.fa-refresh").removeClass("fa-spin"); + }).fail(function(){ + toastr.error("error notifications"); + $(".pageslide-list.header .btn-primary i.fa-refresh").removeClass("fa-spin"); + }); +} +/*function markAllNotificationsAsSeen() +{ + $.ajax({ + type: "POST", + data:{"action":"seen","all":true} + url: baseUrl+"/"+moduleId+"/notification/update" + }) + .done(function (data) { //mylog.log("REFRESH NOTIF : "); mylog.dir(data); + if (data) { + countNotif(true); + } else { + //toastr.error("no notifications found "); + } + $(".pageslide-list.header .btn-primary i.fa-refresh").removeClass("fa-spin"); + }).fail(function(){ + toastr.error("error notifications"); + $(".pageslide-list.header .btn-primary i.fa-refresh").removeClass("fa-spin"); + }); + +}*/ +function buildNotifications(list, element, event) +{ mylog.log(list); + //element=""; +// if(isPodView) +// element="Element"; +// mylog.info("buildNotifications"+element+"()"); + mylog.log(typeof list); + if(event==null) + $(".notifList"+element).html(""); + else + notifHtml=""; + if(typeof list != "undefined" && typeof list == "object"){ + $.each( list , function( notifKey , notifObj ) + { + var url = (typeof notifObj.notify != "undefined") ? notifObj.notify.url : "#"; + //convert url to hash for loadByHash + if(url.indexOf("communecter/")>0){ + url=url.split("communecter/"); + url=url[1]; + } + url = "#"+url.replace(/\//g, "."); + //var moment = require('moment'); + momentNotif=notifObj.timeAgo; + /*moment.lang('fr'); + if(typeof notifObj.updated != "undefined") + momentNotif=moment(new Date( parseInt(notifObj.updated.sec)*1000 )).fromNow(); + else if(typeof notifObj.created != "undefined") + momentNotif=moment(new Date( parseInt(notifObj.created.sec)*1000 )).fromNow(); + else + momentNotif="";*/ + //if(typeof notifObj.timestamp != "undefined") + // momentNotif=moment(new Date( parseInt(notifObj.timestamp.sec)*1000 )).fromNow(); + var icon = (typeof notifObj.notify != "undefined") ? notifObj.notify.icon : "fa-bell"; + var displayName = (typeof notifObj.notify != "undefined") ? notifObj.notify.displayName : "Undefined notification"; + //console.log(notifObj); + //console.log(userId); + //console.log(notifObj.notify); + //console.log(notifObj.notify.id[userId]); + var isSeen = (typeof notifObj.notify.id[userId] != "undefined" && typeof notifObj.notify.id[userId].isUnseen != "undefined") ? "" : "seen"; + var isRead = (typeof notifObj.notify.id[userId] != "undefined" && typeof notifObj.notify.id[userId].isUnread != "undefined") ? "" : "read"; + + str = "<li class='notifLi notif_"+notifKey+" "+isSeen+" "+isRead+" "; + if(event==null) + str+="hide"; + else + str+="enable"; + str+="'>"+ + "<a href='javascript:;' class='notif col-md-12 col-sm-12 col-xs-12 no-padding' data-id='"+notifKey+"' data-href='"+ url +"'>"+ + "<div class='content-icon col-md-1 col-sm-1 col-xs-1 no-padding'>"+ + "<span class='label bg-dark pull-left'>"+ + '<i class="fa '+icon+'"></i>'+ + "</span>" + + "</div>"+ + "<div class='col-md-10 col-sm-10 col-xs-10 no-padding'>"+ + '<span class="message pull-left">'+ + displayName+ + "</span>" + + + "<span class='time pull-left'>"+momentNotif+"</span>"+ + "</div>"+ + "</a>"+ + "<a href='javascript:;' class='label removeBtn tooltips' onclick='removeNotification(\""+notifKey+"\")' data-toggle='tooltip' data-placement='left' title='Delete' style='display:none;'>"+ + '<i class="fa fa-remove"></i>'+ + "</a>" + + "</li>"; + if(event==null){ + $(".notifList"+element).append(str); + $(".notif_"+notifKey).removeClass('hide').addClass("animated bounceInRight enable col-md-12 col-sm-12 col-xs-12"); + }else{ + notifHtml+=str; + } + if( notifObj.timestamp > maxNotifTimstamp ) + maxNotifTimstamp = notifObj.timestamp; + }); + if(event != null){ + $(".notifList"+element).html(notifHtml); + $(".notifLi").addClass("col-md-12 col-sm-12 col-xs-12"); + } + setTimeout( function(){ + notifCount(false, element); + bindNotifEvents(element); + //bindLBHLinks(); + }, 800); + //bindNotifEvents(); + } +} + +function notifCount(upNotifUnseen, element) +{ var countNotif = $(".notifList"+element+" li.enable").length; + var countNotifSeen = $(".notifList"+element+" li.seen").length; + var countNotifUnseen = countNotif-countNotifSeen; + if(upNotifUnseen) + countNotifUnseen=0; + mylog.log(" !!!! notifCount", countNotif, "element :",element); + $(".notifCount").html( countNotif ); + if(countNotif == 0) + $(".notifList"+element).html("<li class='col-md-12 col-sm-12 col-xs-12'><i class='fa fa-ban'></i> "+trad["noMoreNotifs"]+"</li>"); + //if(element==""){ + if( countNotifUnseen > 0) + { + $(".notifications-count"+element).html(countNotifUnseen); + $('.notifications-count'+element).removeClass('hide'); + $('.notifications-count'+element).addClass('animated bounceIn'); + $('.notifications-count'+element).addClass('badge-success'); + $('.notifications-count'+element).removeClass('badge-tranparent'); + $(".markAllAsRead").show(); + } else { + //$('.notifications-count').addClass('hide'); + //$(".notifications-count").html("0"); + $('.notifications-count'+element).addClass('hide'); + $('.notifications-count'+element).removeClass('badge-success'); + $('.notifications-count'+element).addClass('badge-tranparent'); + $(".markAllAsRead").hide(); + } + //} +} \ No newline at end of file diff --git a/assets/js/default/profilSocial.js b/assets/js/default/profilSocial.js new file mode 100644 index 0000000000000000000000000000000000000000..e5eab29564218ceea8182e4267b9235819a8b2f7 --- /dev/null +++ b/assets/js/default/profilSocial.js @@ -0,0 +1,1082 @@ +function initDateHeaderPage(params){ + var str = directory.getDateFormated(params); + //$(".section-date").prepend(str); + $(".header-banner").html(str); +} + +function pushListRoles(links){ + //Members + if(typeof links.members != "undefined"){ + $.each(links.members, function(e,v){ + if(typeof v.roles != "undefined"){ + $.each(v.roles, function(i,data){ + if(data != "" && !rolesList.includes(data)){ + rolesList.push(data); + } + }); + } + }); + } + //Contributors + if(typeof links.contributors != "undefined"){ + $.each(links.contributors, function(e,v){ + if(typeof v.roles != "undefined"){ + $.each(v.roles, function(i,data){ + if(data != "" && !rolesList.includes(data)){ + rolesList.push(data); + } + }); + } + }); + } + //Attendees + if(typeof links.attendees != "undefined"){ + $.each(links.attendees, function(e,v){ + if(typeof v.roles != "undefined"){ + $.each(v.roles, function(i,data){ + if(data != "" && !rolesList.includes(data)){ + rolesList.push(data); + } + }); + } + }); + } +} + +function menuLeftShow(){ + if($("#menu-left-container").hasClass("hidden-xs")) + $("#menu-left-container").removeClass("hidden-xs"); + else + $("#menu-left-container").addClass("hidden-xs"); +} +function responsiveMenuLeft(menuTop){ + if($(window).width()<768) + menuLeftShow(); + if(menuTop){ + if($(window).width()>768) + $(".ssmla").removeClass('active'); + } +} +function bindButtonMenu(){ + $("#btn-superadmin").click(function(){ + loadAdminDashboard(); + }); + $(".btn-start-newsstream").click(function(){ + //$(".ssmla").removeClass('active'); + responsiveMenuLeft(true); + location.hash=hashUrlPage + //history.pushState(null, "New Title", hashUrlPage); + loadNewsStream(true); + }); + $(".btn-start-mystream").click(function(){ + //$(".ssmla").removeClass('active'); + responsiveMenuLeft(true); + if(contextData.type=="citoyens" && userId==contextData.id){ + location.hash=hashUrlPage+".view.mystream"; + //history.pushState(null, "New Title", hashUrlPage+".view.mystream"); + } + else{ + location.hash=hashUrlPage; + //history.pushState(null, "New Title", hashUrlPage); + } + loadNewsStream(false); + uiCoop.closeUI(false); + }); + $("#btn-start-gallery").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.gallery"; + //history.pushState(null, "New Title", hashUrlPage+".view.gallery"); + //location.search="?view=gallery"; + loadGallery(); + }); + $("#btn-start-library").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.library"; + //history.pushState(null, "New Title", hashUrlPage+".view.gallery"); + //location.search="?view=gallery"; + loadLibrary(); + }); + $(".btn-start-notifications").click(function(){ + //$(".ssmla").removeClass('active'); + responsiveMenuLeft(true); + reloadWindow=false; + location.hash=hashUrlPage+".view.notifications"; + loadNotifications(); + }); + $(".btn-start-chart").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.chart"; + //history.pushState(null, "New Title", hashUrlPage+".view.chart"); + loadChart(); + }); + + $(".btn-start-actionrooms").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.actionRooms"; + //history.pushState(null, "New Title", hashUrlPage+".view.chart"); + loadActionRoom(); + }); + + + $(".btn-show-activity").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.history"; + //history.pushState(null, "New Title", hashUrlPage+".view.history"); + loadHistoryActivity(); + }); + + $(".open-confidentiality").click(function(){ + responsiveMenuLeft(); + mylog.log("open-confidentiality"); + toogleNotif(false); + smallMenu.open( dataHelper.markdownToHtml($("#descriptionMarkdown").html())); + bindLBHLinks(); + }); + + $(".open-directory").click(function(){ + responsiveMenuLeft(); + history.pushState(null, "New Title", hashUrlPage+".view.directory"); + loadDirectory(); + }); + $(".edit-chart").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.editChart"; + //history.pushState(null, "New Title", hashUrlPage+".view.editChart"); + loadEditChart(); + }); + $(".btn-open-collection").click(function(){ + responsiveMenuLeft(); + toogleNotif(false); + }); + + $("#btn-start-detail").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.detail"; + //history.pushState(null, "New Title", hashUrlPage+".view.detail"); + loadDetail(); + }); + + $(".load-data-directory").click(function(){ + responsiveMenuLeft(); + var dataName = $(this).data("type-dir"); + location.hash=hashUrlPage+".view.directory.dir."+dataName; + loadDataDirectory(dataName, "", edit); + }); + + $("#subsubMenuLeft a").click(function(){ + onchangeClick=false; + $("#subsubMenuLeft a").removeClass("active"); + $(this).addClass("active"); + }); + + $("#btn-start-urls").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.urls"; + //history.pushState(null, "New Title", hashUrlPage+".view.urls"); + loadUrls(); + }); + + $("#btn-start-contacts").click(function(){ + responsiveMenuLeft(); + location.hash=hashUrlPage+".view.contacts"; + //history.pushState(null, "New Title", hashUrlPage+".view.contacts"); + loadContacts(); + }); + + $("#btn-hide-desc").click(function(){ + if($("#desc-event").hasClass("hidden")){ + $("#desc-event").removeClass("hidden"); + $("#btn-hide-desc").html("<i class='fa fa-angle-up'></i> "+trad.hide); + }else{ + $("#desc-event").addClass("hidden"); + $("#btn-hide-desc").html("<i class='fa fa-angle-down'></i> "+trad.showdescr); + } + }); + + $("#btn-update-password").off().on( "click", function(){ + var form = { + saveUrl : baseUrl+"/"+moduleId+"/person/changepassword", + dynForm : { + jsonSchema : { + title : trad["Change password"], + icon : "fa-key", + afterSave : function(data){ + dyFObj.closeForm(); + }, + properties : { + mode : dyFInputs.inputHidden(), + userId : dyFInputs.inputHidden(), + oldPassword : dyFInputs.password(trad["Old password"]), + newPassword : dyFInputs.password("", { required : true, minlength : 8 } ), + newPassword2 : dyFInputs.password(trad["Repeat your new password"], {required : true, minlength : 8, equalTo : "#ajaxFormModal #newPassword"}) + } + } + } + }; + + var dataUpdate = { + mode : "changePassword", + userId : userId + }; + dyFObj.openForm(form, null, dataUpdate); + }); + + + $("#btn-update-coop").click(function(){ + toastr.info(trad["processing"]); + uiCoop.getCoopData(contextData.type, contextData.id, "room"); + uiCoop.startUI(); + }); + + bindButtonOpenForm(); + + /*$("#div-select-create").mouseleave(function(){ + $("#div-select-create").stop(true, true).delay(200).fadeOut(500); + //$(".central-section").show(); + });*/ + + $("#btn-close-select-create").click(function(){ + $("#div-select-create").hide(200); + //$(".central-section").show(); + }); + + $("#open-select-create, .open-create-form-modal").click(function(){ + responsiveMenuLeft(true); + //$(".central-section").hide(); + $("#div-select-create").show(200); + setTimeout(function(){ + //KScrollTo("#div-select-create"); + $('html, body').stop().animate({ + scrollTop: $("#div-select-create").offset().top - 300 + }, 300, ''); + }, 500); + }); + + $("#div-select-create").hide(); + $("#div-select-create").removeClass("hidden"); + + + $("#downloadProfil").click(function () { + $.ajax({ + url: baseUrl + "/communecter/data/get/type/citoyens/id/"+contextData.id , + type: 'POST', + dataType: 'json', + async:false, + crossDomain:true, + complete: function () {}, + success: function (obj){ + mylog.log("obj", obj); + $("<a/>", { + "download": "profil.json", + "href" : "data:application/json," + encodeURIComponent(JSON.stringify(obj)) + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() ; + }, + error: function (error) { + + } + }); + }); + + $(".confidentialitySettings").click(function(){ + param = new Object; + param.type = $(this).attr("type"); + param.value = $(this).attr("value"); + param.typeEntity = contextData.type; + param.idEntity = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatesettings", + data: param, + dataType: "json", + success: function(data){ + toastr.success(data.msg); + } + }); + }); + + $("#editConfidentialityBtn").on("click", function(){ + mylog.log("confidentiality", seePreferences); + $("#modal-confidentiality").modal("show"); + if(seePreferences=="true"){ + param = new Object; + param.name = "seePreferences"; + param.value = false; + param.pk = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + $("#divSeePreferencesHeader").addClass("hidden"); + $('#editConfidentialityBtn').removeClass("btn-red"); + } + } + }); + } + }); + + $("#inviteBtn").on("click", function(){ + mylog.log("invite"); + $("#modal-invite").modal("show"); + }); + + $("#btn-delete-element").on("click", function(){ + mylog.log("Delete Element"); + $("#modal-delete-element").modal("show"); + }); + + $(".panel-btn-confidentiality .btn").click(function(){ + var type = $(this).attr("type"); + var value = $(this).attr("value"); + $(".btn-group-"+type + " .btn").removeClass("active"); + $(this).addClass("active"); + }); + + $("#open-co-space").click(function(){ + uiCoop.startUI(); + }); + + $("#reopen-menu-left-container").click(function(){ + uiCoop.closeUI(); + }); + + initBtnShare(); + +} + +function bindButtonOpenForm(){ + //window select open form type (selectCreate) + $(".btn-open-form").off().on("click",function(){ + var typeForm = $(this).data("form-type"); + mylog.log("test", $(this).data("form-subtype")), + currentKFormType = ($(this).data("form-subtype")) ? $(this).data("form-subtype") : null; + + //alert(contextData.type+" && "+contextData.id+" : "+typeForm); + if(contextData && contextData.type && contextData.id ) + dyFObj.openForm(typeForm,"sub"); + else + dyFObj.openForm(typeForm); + }); +} + +function loadDataDirectory(dataName, dataIcon, edit){ console.log("loadDataDirectory"); + showLoader('#central-container'); + + var dataIcon = $(".load-data-directory[data-type-dir="+dataName+"]").data("icon"); + //history.pushState(null, "New Title", hashUrlPage+".view.directory.dir."+dataName); + // $('#central-container').html("<center><i class='fa fa-spin fa-refresh margin-top-50 fa-2x'></i></center>");return; + getAjax('', baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+contextData.type+ + '/id/'+contextData.id+'/dataName/'+dataName+'?tpl=json', + function(data){ + var type = ($.inArray(dataName, ["poi","ressource","vote","actions","discuss"]) >=0) ? dataName : null; + if(typeof edit != "undefined" && edit) + edit=dataName; + displayInTheContainer(data, dataName, dataIcon, type, edit); + bindButtonOpenForm(); + } + ,"html"); +} + +function getLabelTitleDir(dataName, dataIcon, countData, n){ + //mylog.log("bgetLabelTitleDir", dataName, dataIcon, countData, n, trad); + var elementName = "<span class='Montserrat' id='name-lbl-title'>"+$("#nameHeader .name-header").html()+"</span>"; + + var s = (n>1) ? "s" : ""; + + //if(countData=='Aucun') + // countData=tradException.no; + var html = "<i class='fa fa-"+dataIcon+" fa-2x margin-right-10'></i> <i class='fa fa-angle-down'></i> "; + if(dataName == "follows") { html += elementName + " "+trad.isfollowing+" " + countData + " "+trad["page"+s]+""; } + else if(dataName == "followers") { html += countData + " <b>"+trad["follower"+s]+"</b> "+trad.to+" "+ elementName; } + else if(dataName == "members") { html += elementName + " "+trad.iscomposedof+" " + countData + " <b>"+trad["member"+s]+"</b>"; } + else if(dataName == "attendees") { html += countData + " <b>"+trad["attendee"+s]+"</b> "+trad.toevent+" " + elementName; } + else if(dataName == "guests") { html += countData + " <b>"+trad["guest"+s]+"</b> "+trad.on+" " + elementName; } + else if(dataName == "contributors") { html += countData + " <b>"+trad["contributor"+s]+"</b> "+trad.toproject+" " + elementName; } + + else if(dataName == "events"){ + if(type == "events"){ + html += elementName + " "+trad.iscomposedof+" " + countData+" <b> "+trad["subevent"+s]; + }else{ + html += elementName + " "+trad.takepart+" " + countData+" <b> "+trad["event"+s]; + } + } + else if(dataName == "organizations") { html += elementName + " "+trad.ismemberof+" "+ countData+" <b>"+trad["organization"+s]; } + else if(dataName == "projects") { html += elementName + " "+trad.contributeto+" " + countData+" <b>"+trad["project"+s] } + + else if(dataName == "collections"){ html += elementName+" "+trad.hasgot+" "+countData+" <b>"+trad["collection"+s]+"</b>"; } + else if(dataName == "poi"){ html += countData+" <b>"+trad["point"+s+"interest"+s]+"</b> "+trad['createdby'+s]+" " + elementName; } + else if(dataName == "classified"){ html += countData+" <b>"+trad[classified+s]+"</b> "+trad['createdby'+s]+" " + elementName; } + + else if(dataName == "needs"){ html += countData+" <b>"+trad[need+s]+"</b> "+trad.of+" " + elementName; } + + else if(dataName == "vote"){ html += countData+" <b>"+trad[proposal+s]+"</b> "+trad.of+" " + elementName; } + else if(dataName == "discuss"){ html += countData+" <b>"+trad.discussion+s+"</b> "+trad.of+" " + elementName; } + else if(dataName == "actions"){ html += countData+" <b>"+trad.actions+s+"</b> "+trad.of+" " + elementName; } + + else if(dataName == "actionRooms"){ html += countData+" <b>espace de décision"+s+"</b> de " + elementName; } + + else if(dataName == "urls"){ + var str = " a " + countData; + if(countData == "Aucun") + str = " n'a aucun"; + html += elementName + str+" <b> lien"+s; + if( (typeof openEdition != "undefined" && openEdition == true) || (typeof edit != "undefined" && edit == true) ){ + html += '<a class="btn btn-sm btn-link bg-green-k pull-right " href="javascript:;" onclick="dyFObj.openForm ( \'url\',\'sub\')">'; + html += '<i class="fa fa-plus"></i> '+trad["Add link"]+'</a>' ; + } + + } + + else if(dataName == "contacts"){ + var str = " a " + countData; + if(countData == "Aucun") + str = " n'a aucun"; + html += elementName + " a " + countData+" <b> point de contact"+s; + if( (typeof openEdition != "undefined" && openEdition == true) || (typeof edit != "undefined" && edit == true) ){ + html += '<a class="btn btn-sm btn-link bg-green-k pull-right " href="javascript:;" onclick="dyFObj.openForm ( \'contactPoint\',\'contact\')">'; + html += '<i class="fa fa-plus"></i> '+trad["Add contact"]+'</a>' ; + } + + + } + + if( openEdition || edit ){ + if( $.inArray( dataName, ["events","projects","organizations","poi","classified","collections","actionRooms"] ) >= 0 ){ + if(dataName == "collections"){ + html += '<a class="btn btn-sm btn-link bg-green-k pull-right " href="javascript:;" onclick="collection.crud()">'; + html += '<i class="fa fa-plus"></i> '+trad.createcollection+'</a>' ; + } + else { + var elemSpec = dyFInputs.get(dataName); + html += '<button class="btn btn-sm btn-link bg-green-k pull-right btn-open-form" data-form-type="'+elemSpec.ctrl+'" data-dismiss="modal">'; + html += '<i class="fa fa-plus"></i> '+trad["create"+elemSpec.ctrl]+'</button>' ; + } + } + } + + return html; +} + +function loadAdminDashboard(week){ + showLoader('#central-container'); + ajaxPost('#central-container' ,baseUrl+'/'+moduleId+"/app/superadmin/action/main/week/"+week, + { "week" : week }, + function(){ + + },"html"); +} + +function loadNewsStream(isLiveBool){ + + KScrollTo("#profil_imgPreview"); + + isLive = isLiveBool==true ? "/isLive/true" : ""; + dateLimit = 0; + scrollEnd = false; + loadingData = true; + toogleNotif(true); + + var url = "news/index/type/"+typeItem+"/id/"+contextData.id+isLive+"/date/"+dateLimit+ + "?isFirst=1&tpl=co2&renderPartial=true"; + + setTimeout(function(){ //attend que le scroll retourn en haut (kscrollto) + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){ + if(typeItem=="citoyens") loadLiveNow(); + $(window).bind("scroll",function(){ + if(!loadingData && !scrollEnd && colNotifOpen){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep, isLiveBool); + } + } + }); + loadingData = false; + },"html"); + }, 700); +} +function loadSettings(){ + mylog.log("confidentiality", seePreferences); + loadNewsStream(true); + history.pushState(null, "New Title", hashUrlPage); + $("#modal-confidentiality").modal("show"); + if(seePreferences=="true"){ + param = new Object; + param.name = "seePreferences"; + param.value = false; + param.pk = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + $("#divSeePreferencesHeader").addClass("hidden"); + $('#editConfidentialityBtn').removeClass("btn-red"); + } + } + }); + } +} +function loadGallery(){ + toogleNotif(false); + var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id+"/docType/image"; + + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} +function loadLibrary(){ + toogleNotif(false); + var url = "gallery/index/type/"+typeItem+"/id/"+contextData.id+"/docType/file"; + + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} +function loadChart(){ + toogleNotif(false); + var url = "chart/header/type/"+typeItem+"/id/"+contextData.id; + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} + +function loadNotifications(){ + toogleNotif(false); + var url = "element/notifications/type/"+typeItem+"/id/"+contextData.id; + + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} + +function loadHistoryActivity(){ + toogleNotif(false); + var url = "pod/activitylist/type/"+typeItem+"/id/"+contextData.id; + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} + +function loadDirectory(){ + toogleNotif(false); + smallMenu.openAjax(baseUrl+'/'+moduleId+'/element/directory/type/'+contextData.type+'/id/'+contextData.id+ + '?tpl=json','Communauté','fa-connectdevelop','dark'); + bindLBHLinks(); +} + +function loadEditChart(){ + toogleNotif(false); + var url = "chart/addchartsv/type/"+contextData.type+"/id/"+contextData.id; + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} + +function loadDetail(){ + toogleNotif(false); + var url = "element/about/type/"+contextData.type+"/id/"+contextData.id; + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url+'?tpl=ficheInfoElement', null, function(){},"html"); +} + +function loadInvite(){ + toogleNotif(false); + var url = "element/about/type/"+contextData.type+"/id/"+contextData.id; + showLoader('#central-container'); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url+'?tpl=ficheInfoElement', null, function(){},"html"); +} + +function loadUrls(){ + showLoader('#central-container'); + getAjax('', baseUrl+'/'+moduleId+'/element/geturls/type/'+contextData.type+ + '/id/'+contextData.id, + function(data){ + displayInTheContainer(data, "urls", "external-link", "urls"); + } + ,"html"); +} + +function loadActionRoom(){ + //toogleNotif(false); + showLoader('#fast-rooms'); + var params = { }; + ajaxPost('#fast-rooms', baseUrl+'/'+moduleId+'/rooms/index/type/'+contextData.type+ + '/id/'+contextData.id, params, function(){},"html"); +} + +function loadContacts(){ + showLoader('#central-container'); + getAjax('', baseUrl+'/'+moduleId+'/element/getcontacts/type/'+contextData.type+ + '/id/'+contextData.id, + function(data){ + displayInTheContainer(data, "contacts", "envelope", "contacts"); + $(".openFormContact").click(function(){ + var idReceiver = $(this).data("id-receiver"); + var idReceiverParent = contextData.id; + var typeReceiverParent = contextData.type; + + var contactMail = $(this).data("email"); + var contactName = $(this).data("name"); + //console.log('contactMail', contactMail); + $("#formContact .contact-email").html(contactMail); + $("#formContact #contact-name").html(contactName); + + $("#formContact #emailSender").val(userConnected.email); + $("#formContact #name").val(userConnected.name); + + $("#formContact #form-control").val(""); + + $("#formContact #idReceiver").val(idReceiver); + $("#formContact #idReceiverParent").val(idReceiverParent); + $("#formContact #typeReceiverParent").val(typeReceiverParent); + + $("#conf-fail-mail, #conf-send-mail, #form-fail").addClass("hidden"); + $("#form-group-contact").removeClass("hidden"); + $("#formContact").modal("show"); + }); + } + ,"html"); +} + + + +//todo add count on each tag + function getfilterRoles(roles) { + console.log("getfilterRoles roles",roles); + if(typeof roles == "undefined") { + $("#listRoles").hide(); + return; + } + + var nRole = 0; + $.each( roles,function(k,o){ nRole++; } ); + if(nRole == 0){ + $("#listRoles").hide(); + return; + } + $("#listRoles").show(300); + $("#listRoles").html("<i class='fa fa-filter'></i> "+trad.sortbyrole+": "); + $("#listRoles").append("<a class='btn btn-link btn-sm letter-blue favElBtn favAllBtn' "+ + "href='javascript:directory.toggleEmptyParentSection(\".favSection\",null,\".searchEntityContainer\",1)'>"+ + " <i class='fa fa-refresh'></i> <b>"+trad["seeall"]+"</b></a>"); + $.each( roles,function(k,o){ + $("#listRoles").append("<a class='btn btn-link btn-sm favElBtn letter-blue "+slugify(k)+"Btn' "+ + "data-tag='"+slugify(k)+"' "+ + "href='javascript:directory.toggleEmptyParentSection(\".favSection\",\"."+slugify(k)+"\",\".searchEntityContainer\",1)'>"+ + k+" <span class='badge'>"+o.count+"</span>"+ + "</a>"); + }); + } +function displayInTheContainer(data, dataName, dataIcon, contextType, edit){ + mylog.log("displayInTheContainer",data, dataName, dataIcon, contextType, edit) + var n=0; + listRoles={}; + $.each(data, function(key, val){ + //console.log("rolesShox",val); + if(typeof key != "undefined") n++; + if(typeof val.rolesLink != "undefined"){ + console.log(val.rolesLink); + $.each(val.rolesLink, function(i,v){ + //Push new roles in rolesList + if(v != "" && !rolesList.includes(v)) + rolesList.push(v); + //Incrément and push roles in filter array + if(typeof listRoles[v] != "undefined") + listRoles[v].count++; + else + listRoles[v]={"count": 1} + }); + } + }); + if(n>0){ + var thisTitle = getLabelTitleDir(dataName, dataIcon, parseInt(n), n); + + var html = ""; + + var btnMap = '<button class="btn btn-default btn-sm btn-show-onmap inline" id="btn-show-links-onmap">'+ + '<i class="fa fa-map-marker"></i>'+ + '</button>'; + + html += "<div class='col-md-12 margin-bottom-15 labelTitleDir'>"; + + if(dataName != "urls") + html += btnMap; + + html += thisTitle; + html += "<div id='listRoles' class='shadow2'></div>"+ + "<hr>"; + html += "</div>"; + + if(dataName=="events") + html += "<div class='col-md-12 col-sm-12 col-xs-12 margin-bottom-10'>"+ + "<a href='javascript:;' id='showHideCalendar' class='text-azure' data-hidden='0'><i class='fa fa-caret-up'></i> Hide calendar</a>"+ + "</div>"+ + "<div id='profil-content-calendar' class='col-md-12 col-sm-12 col-xs-12 margin-bottom-20'></div>"; + mapElements = []; + + console.log("listRoles",listRoles); + if(dataName != "collections"){ + if(mapElements.length==0) mapElements = data; + else $.extend(mapElements, data); + + html += directory.showResultsDirectoryHtml(data, contextType, null, edit); + }else{ + $.each(data, function(col, val){ + colName=col; + if(col=="favorites") + colName="favoris"; + html += "<a class='btn btn-default col-xs-12 shadow2 padding-10 margin-bottom-20' onclick='$(\"."+colName+"\").toggleClass(\"hide\")' ><h2><i class='fa fa-star'></i> "+colName+" ("+Object.keys(val.list).length+")</h2></a>"+ + "<div class='"+colName+" hide'>"; + console.log("list", val); + if(val.count==0) + html +="<span class='col-xs-12 text-dark margin-bottom-20'>"+trad.noelementinthiscollection+"</span>"; + else{ + $.each(val.list, function(key, elements){ + if(mapElements.length==0) mapElements = elements; + else $.extend(mapElements, elements); + html += directory.showResultsDirectoryHtml(elements, key); + }); + } + html += "</div>"; + }); + } + toogleNotif(false); + $("#central-container").html(html); + if(dataName == "events"){ + //init calendar view + calendar.init("#profil-content-calendar"); + calendar.showCalendar("#profil-content-calendar", data); + $(window).on('resize', function(){ + $("#profil-content-calendar").fullCalendar('destroy'); + calendar.showCalendar("#profil-content-calendar", data, "month"); + }); + /*$(".fc-button").on("click", function(e){ + calendar.setCategoryColor(); + })*/ + } + initBtnLink(); + initBtnAdmin(); + bindButtonOpenForm(); + + getfilterRoles(listRoles); + + var dataToMap = data; + if(dataName == "collections"){ + dataToMap = new Array(); + $.each(data, function(key, val){ + $.each(val.list, function(type, list){ + mylog.log("collection", type, list); + $.each(list, function(id, el){ + dataToMap.push(el); + }); + }); + }); + } + + mylog.log("dataToMap", dataToMap); + $("#btn-show-links-onmap").off().click(function(){ + Sig.showMapElements(Sig.map, dataToMap, "", thisTitle); + showMap(true); + }); + + }else{ + //var nothing = tradException.no; + //if(dataName == "organizations" || dataName == "collections" || dataName == "follows") + // nothing = tradException.nofem; + + var html = "<div class='col-md-12 margin-bottom-15'>"+ + getLabelTitleDir(dataName, dataIcon, parseInt(n), n)+ + "</div>"; + $("#central-container").html(html + "<span class='col-md-12 alert bold bg-white'>"+ + "<i class='fa fa-ban'></i> "+trad.nodata+ + "</span>"); + toogleNotif(false); + } + +} +var loading = "<div class='loader text-dark text-center'>"+ + "<span style='font-size:25px;'>"+ + "<i class='fa fa-spin fa-circle-o-notch'></i> "+ + "<span class='text-dark'>"+trad.currentlyloading+" ...</span>" + + "</div>"; + +function loadStream(indexMin, indexMax, isLiveBool){ mylog.log("LOAD STREAM PROFILSOCIAL"); //loadLiveNow + loadingData = true; + currentIndexMin = indexMin; + currentIndexMax = indexMax; + + + if(typeof dateLimit == "undefined") dateLimit = 0; + + isLive = isLiveBool==true ? "/isLive/true" : ""; + var url = "news/index/type/"+typeItem+"/id/"+contextData.id+isLive+"/date/"+dateLimit+"?tpl=co2&renderPartial=true"; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/'+url, + data: { indexMin: indexMin, + indexMax:indexMax, + renderPartial:true + }, + success: + function(data) { + if(data){ //alert(data); + $("#news-list").find(".loader").remove(); + $("#news-list").append(data); + if($("#noMoreNews").length<=0) + $("#news-list").append(loading); + //bindTags(); + + } + loadingData = false; + $(".stream-processing").hide(); + }, + error:function(xhr, status, error){ + loadingData = false; + $("#news-list").html("erreur"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + $("#news-list").html("not found"); + } + } + }); +} + +var colNotifOpen = true; +function toogleNotif(open){ + if(typeof open == "undefined") open = false; + + if(open==false){ + $('#notif-column').removeClass("col-md-3 col-sm-3 col-lg-3").addClass("hidden"); + $('#central-container').removeClass("col-md-9 col-lg-9").addClass("col-md-12 col-lg-12"); + }else{ + $('#notif-column').addClass("col-md-3 col-sm-3 col-lg-3").removeClass("hidden"); + $('#central-container').addClass("col-sm-12 col-md-9 col-lg-9").removeClass("col-md-12 col-lg-12"); + } + + colNotifOpen = open; +} + +function loadLiveNow () { + //mylog.log("loadLiveNow1", contextData.address); + + var level = {} ; + if( notNull(contextData.address)) { + mylog.log("loadLiveNow2", contextData.address); + if(notNull(contextData.address.level4)){ + mylog.log("loadLiveNow3", contextData.address.level4); + level[contextData.address.level4] = { type : "level4", name : contextData.address.level4Name } ; + } else if(notNull(contextData.address.level3)){ + level[contextData.address.level3] = { type : "level3", name : contextData.address.level3Name } ; + } else if(notNull(contextData.address.level2)){ + level[contextData.address.level2] = { type : "level2", name : contextData.address.level2Name } ; + } else if(notNull(contextData.address.level1)){ + level[contextData.address.level1] = { type : "level1", name : contextData.address.level1Name } ; + } + } + + if(CO2DomainName == "kgougle") + level[contextData.address.level3] = { type : "level3", name : contextData.address.level3Name } ; + + mylog.log("loadLiveNow4", level); + if( jQuery.isEmptyObject(level) ) { + //alert("Vous n'êtes pas communecté ?"); + } //else{ + var searchParams = { + "tpl":"/pod/nowList", + "searchLocality" : level, + "indexMin" : 0, + "indexMax" : 30 + }; + + ajaxPost( "#notif-column", baseUrl+'/'+moduleId+'/element/getdatadetail/type/'+contextData.type+ + '/id/'+contextData.id+'/dataName/liveNow?tpl=nowList', + searchParams, function() { + bindLBHLinks(); + } , "html" ); + //} +} + +function showLoader(id){ + $(id).html("<center><i class='fa fa-spin fa-refresh margin-top-50 fa-2x'></i></center>"); +} + +function descHtmlToMarkdown() { + mylog.log("htmlToMarkdown"); + if(typeof contextData.descriptionHTML != "undefined" && contextData.descriptionHTML == true) { + mylog.log("htmlToMarkdown"); + if( $("#descriptionAbout").html() != "" ){ + var paramSpan = { + filter: ['span'], + replacement: function(innerHTML, node) { + return innerHTML; + } + } + var paramDiv = { + filter: ['div'], + replacement: function(innerHTML, node) { + return innerHTML; + } + } + mylog.log("htmlToMarkdown2"); + var converters = { converters: [paramSpan, paramDiv] }; + var descToMarkdown = toMarkdown( $("#descriptionMarkdown").html(), converters ) ; + mylog.log("descToMarkdown", descToMarkdown); + $("descriptionMarkdown").html(descToMarkdown); + var param = new Object; + param.name = "description"; + param.value = descToMarkdown; + param.id = contextData.id; + param.typeElement = contextData.type; + param.block = "toMarkdown"; + $.ajax({ + type: "POST", + url : baseUrl+"/"+moduleId+"/element/updateblock/", + data: param, + dataType: "json", + success: function(data){ + //toastr.success(data.msg); + } + }); + mylog.log("param", param); + } + } +} + +function inintDescs() { + mylog.log("inintDescs"); + if(edit == true || openEdition== true) + descHtmlToMarkdown(); + mylog.log("after"); + mylog.log("inintDescs", $("#descriptionMarkdown").html()); + var descHtml = "<i>"+trad.notSpecified+"</i>"; + if($("#descriptionMarkdown").html().length > 0){ + descHtml = dataHelper.markdownToHtml($("#descriptionMarkdown").html()) ; + } + + $("#descriptionAbout").html(descHtml); + $("#descProfilsocial").html(descHtml); + mylog.log("descHtml", descHtml); +} + +function removeAddress(form){ + var msg = trad.suredeletelocality ; + if(!form && contextData.type == personCOLLECTION) + msg = trad.suredeletepersonlocality ; + + bootbox.confirm({ + message: msg + "<span class='text-red'></span>", + buttons: { + confirm: { + label: trad.yes, + className: 'btn-success' + }, + cancel: { + label: trad.no, + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + param = new Object; + param.name = "locality"; + param.value = ""; + param.pk = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextData.type, + data: param, + dataType: "json", + success: function(data){ + // + if(data.result && !form){ + if(contextData.type == personCOLLECTION) { + //Menu Left + $("#btn-geoloc-auto-menu").attr("href", "javascript:"); + $('#btn-geoloc-auto-menu > span.lbl-btn-menu').html("Communectez-vous"); + $("#btn-geoloc-auto-menu").attr("onclick", "communecterUser()"); + $("#btn-geoloc-auto-menu").off().removeClass("lbh"); + //Dashbord + $("#btn-menuSmall-mycity").attr("href", "javascript:"); + $("#btn-menuSmall-citizenCouncil").attr("href", "javascript:"); + //Multiscope + $(".msg-scope-co").html("<i class='fa fa-cogs'></i> Paramétrer mon code postal</a>"); + //MenuSmall + $(".hide-communected").show(); + $(".visible-communected").hide(); + + $(".communecter-btn").removeClass("hidden"); + } + communexion.currentLevel = null; + communexion.currentName = null; + communexion.currentValue = null; + communexion.values = null; + communexion.state = false; + toastr.success(data.msg); + urlCtrl.loadByHash("#page.type."+contextData.type+".id."+contextData.id+".view.detail"); + } + } + }); + } + } + }); +} + + +var mapUrl = { "discuss": + { "url" : "comment/index/type/actionRooms", + "hash" : "comment.index.type.actionRooms" + } , + "vote": + { "url" : "survey/entries", + "hash" : "survey.entries" + } , + "entry" : + { "url" : "survey/entry", + "hash" : "survey.entry", + }, + "actions": + { "url" : "rooms/actions", + "hash" : "rooms.actions" + } , + "action": + { "url" : "rooms/action", + "hash" : "rooms.action", + } + } + +function loadRoom(type, id){ + location.hash=hashUrlPage+".view.dda.dir."+type+".idda."+id; +} + +function startLoadRoom(type, id){ + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+mapUrl[type]["url"]+ '/id/'+id+"?renderPartial=true", + null, function(){ + },"html"); + + toogleNotif(false); + KScrollTo("#shortDescriptionHeader"); +} +/*function createSlugBeforeChat(type,canEdit,hasRc){ + dynForm.openForm("slug","sub"); + rcObj.loadChat(loadChat,type,canEdit,hasRC); +}*/ diff --git a/assets/js/default/responsive-calendar.js b/assets/js/default/responsive-calendar.js new file mode 100644 index 0000000000000000000000000000000000000000..98a29209f24db9f9389f1894f9c87cb77f38d7eb --- /dev/null +++ b/assets/js/default/responsive-calendar.js @@ -0,0 +1,442 @@ +// Generated by CoffeeScript 1.6.1 + +/*! + # Responsive Celendar widget script + # by w3widgets + # + # Author: Lukasz Kokoszkiewicz + # + # Copyright © w3widgets 2013 All Rights Reserved +*/ + + +(function() { + + (function($) { + "use strict"; + var Calendar, opts, spy; + Calendar = function(element, options) { + var time; + this.$element = element; + this.options = options; + this.weekDays = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun']; + this.time = new Date(); + this.currentYear = this.time.getFullYear(); + this.currentMonth = this.time.getMonth(); + if (this.options.time) { + time = this.splitDateString(this.options.time); + this.currentYear = time.year; + this.currentMonth = time.month; + } + this.initialDraw(); + return null; + }; + Calendar.prototype = { + addLeadingZero: function(num) { + if (num < 10) { + return "0" + num; + } else { + return "" + num; + } + }, + applyTransition: function($el, transition) { + $el.css('transition', transition); + $el.css('-ms-transition', '-ms-' + transition); + $el.css('-moz-transition', '-moz-' + transition); + return $el.css('-webkit-transition', '-webkit-' + transition); + }, + applyBackfaceVisibility: function($el) { + $el.css('backface-visibility', 'hidden'); + $el.css('-ms-backface-visibility', 'hidden'); + $el.css('-moz-backface-visibility', 'hidden'); + return $el.css('-webkit-backface-visibility', 'hidden'); + }, + applyTransform: function($el, transform) { + $el.css('transform', transform); + $el.css('-ms-transform', transform); + $el.css('-moz-transform', transform); + return $el.css('-webkit-transform', transform); + }, + splitDateString: function(dateString) { + var day, month, time, year; + time = dateString.split('-'); + year = parseInt(time[0]); + month = parseInt(time[1] - 1); + day = parseInt(time[2]); + return time = { + year: year, + month: month, + day: day + }; + }, + initialDraw: function() { + return this.drawDays(this.currentYear, this.currentMonth); + }, + editDays: function(events) { + var dateString, day, dayEvents, time, _results; + _results = []; + for (dateString in events) { + dayEvents = events[dateString]; + this.options.events[dateString] = events[dateString]; + time = this.splitDateString(dateString); + day = this.$element.find('[data-year="' + time.year + '"][data-month="' + (time.month + 1) + '"][data-day="' + time.day + '"]').parent('.day'); + day.removeClass('active'); + day.find('.badge').remove(); + day.find('a').removeAttr('href'); + if (this.currentMonth === time.month || this.options.activateNonCurrentMonths) { + _results.push(this.makeActive(day, dayEvents)); + } else { + _results.push(void 0); + } + } + return _results; + }, + clearDays: function(days) { + var dateString, day, time, _i, _len, _results; + _results = []; + for (_i = 0, _len = days.length; _i < _len; _i++) { + dateString = days[_i]; + delete this.options.events[dateString]; + time = this.splitDateString(dateString); + day = this.$element.find('[data-year="' + time.year + '"][data-month="' + (time.month + 1) + '"][data-day="' + time.day + '"]').parent('.day'); + day.removeClass('active'); + day.find('.badge').remove(); + _results.push(day.find('a').removeAttr('href')); + } + return _results; + }, + clearAll: function() { + var day, days, i, _i, _len, _results; + this.options.events = {}; + days = this.$element.find('[data-group="days"] .day'); + _results = []; + for (i = _i = 0, _len = days.length; _i < _len; i = ++_i) { + day = days[i]; + $(day).removeClass('active'); + $(day).find('.badge').remove(); + _results.push($(day).find('a').removeAttr('href')); + } + return _results; + }, + setMonthYear: function(dateString) { + var time; + time = this.splitDateString(dateString); + this.currentMonth = this.drawDays(time.year, time.month); + return this.currentYear = time.year; + }, + prev: function() { + /*if (this.currentMonth - 1 < 0) { + this.currentYear = this.currentYear - 1; + this.currentMonth = 11; + } else { + this.currentMonth = this.currentMonth - 1; + } + this.drawDays(this.currentYear, this.currentMonth); + if (this.options.onMonthChange) { + this.options.onMonthChange.call(this); + }*/ + + agendaWinMonth--; + calculateAgendaWindow(agendaWinMonth); + startSearch(0, indexStep, searchCallback); + + return null; + }, + next: function() { + /*if (this.currentMonth + 1 > 11) { + this.currentYear = this.currentYear + 1; + this.currentMonth = 0; + } else { + this.currentMonth = this.currentMonth + 1; + } + this.drawDays(this.currentYear, this.currentMonth); + if (this.options.onMonthChange) { + this.options.onMonthChange.call(this); + }*/ + + agendaWinMonth++; + calculateAgendaWindow(agendaWinMonth); + startSearch(0, indexStep, searchCallback); + + return null; + }, + curr: function() { + this.currentYear = this.time.getFullYear(); + this.currentMonth = this.time.getMonth(); + this.drawDays(this.currentYear, this.currentMonth); + if (this.options.onMonthChange) { + this.options.onMonthChange.call(this); + } + return null; + }, + addOthers: function(day, allDayEvents) { + var badge; + var countEvent = 0; + var items = ""; + var startDate = ""; + var zIndex=31; + //console.log("allDayEvents"); + //console.dir(allDayEvents); + + $.each(allDayEvents, function(key, dayEvents){ + + if (typeof dayEvents === "object") { + var action = 'urlCtrl.loadByHash("#event.detail.id.'+dayEvents.id+'");'; + var item = "<li>"; + var imgProfil = "<span class='badge bg-orange'></span>"; + if (typeof dayEvents.thumb_url != "undefined" && dayEvents.thumb_url != "") { + imgProfil = "<img class='badge bg-orange' src='"+dayEvents.thumb_url+"'>"; + } + item += "<a href='#page.type.events.id."+dayEvents.id+"' class='loadByHash'>" + + imgProfil + + "<div class='info-event text-dark'>" + dayEvents.name+"<br><small class='text-red'>"+ dayEvents["position"] + "</small></div>" + + "</a>"; + + item += "</li>"; + + items += item; + } + if(typeof dayEvents["startDate"] != "undefined") + startDate = dayEvents["startDate"].substr(0, 10); + countEvent++; + }); + + // if(typeof dayEvents["startDate"] != "undefined"){ + var align = "pull-right"; + var d = new Date(startDate); + var numDay = d.getDay(); + //console.log("ce jour est le "+numDay+" de la semaine"); + if(numDay>0&&numDay<4) align = "pull-left"; + var dropdown = + '<button class="btn bg-orange homestead dropdown-toggle" type="button" data-toggle="dropdown">'+ + '<span class="hidden-xs">'+countEvent+'</span> <i class="fa fa-calendar hidden-sm hidden-xs"></i>'+ + ' <span class="caret"></span>'+ + '</button>'+ + '<ul class="'+align+' dropdown-menu date'+startDate+'">'+ + items + + '</ul>'; + dropdown = $(dropdown); + day.append(dropdown); + // } + zIndex--; + return day; + }, + makeActive: function(day, dayEvents) { + var classes, eventClass, i, _i, _len; + if (dayEvents) { + if (dayEvents["class"]) { + classes = dayEvents["class"].split(" "); + for (i = _i = 0, _len = classes.length; _i < _len; i = ++_i) { + eventClass = classes[i]; + day.addClass(eventClass); + } + } else { + day.addClass("active"); + } + day = this.addOthers(day, dayEvents); + } + return day; + }, + getDaysInMonth: function(year, month) { + return new Date(year, month + 1, 0).getDate(); + }, + drawDay: function(lastDayOfMonth, yearNum, monthNum, dayNum, i) { + var calcDate, dateNow, dateString, day, dayDate, pastFutureClass; + day = $("<div></div>").addClass("day dropdown"); + day.css("zIndex",100-dayNum); + dateNow = new Date(); + dateNow.setHours(0, 0, 0, 0); + dayDate = new Date(yearNum, monthNum - 1, dayNum); + if (dayDate.getTime() < dateNow.getTime()) { + pastFutureClass = "past"; + } else if (dayDate.getTime() === dateNow.getTime()) { + pastFutureClass = "today"; + } else { + pastFutureClass = "future"; + } + day.addClass(this.weekDays[i % 7]); + day.addClass(pastFutureClass); + dateString = yearNum + "-" + this.addLeadingZero(monthNum) + "-" + this.addLeadingZero(dayNum); + if (dayNum <= 0 || dayNum > lastDayOfMonth) { + calcDate = new Date(yearNum, monthNum - 1, dayNum); + dayNum = calcDate.getDate(); + monthNum = calcDate.getMonth() + 1; + yearNum = calcDate.getFullYear(); + day.addClass("not-current").addClass(pastFutureClass); + if (this.options.activateNonCurrentMonths) { + dateString = yearNum + "-" + this.addLeadingZero(monthNum) + "-" + this.addLeadingZero(dayNum); + } + } + day.append($("<div class='dayNum'>" + dayNum + "</div>").attr("data-day", dayNum).attr("data-month", monthNum).attr("data-year", yearNum)); /*TODO*/ + if (this.options.monthChangeAnimation) { + this.applyTransform(day, 'rotateY(180deg)'); + this.applyBackfaceVisibility(day); + } + //console.log("debug calendar", this.options); + day = this.makeActive(day, this.options.events[dateString]); + return this.$element.find('[data-group="days"]').append(day); + }, + drawDays: function(year, month) { + var currentMonth, day, dayBase, days, delay, draw, firstDayOfMonth, i, lastDayOfMonth, loopBase, monthNum, multiplier, thisRef, time, timeout, yearNum, _i, _len; + thisRef = this; + time = new Date(year, month); + currentMonth = time.getMonth(); + monthNum = time.getMonth() + 1; + yearNum = time.getFullYear(); + time.setDate(1); + firstDayOfMonth = this.options.startFromSunday ? time.getDay() + 1 : time.getDay() || 7; + lastDayOfMonth = this.getDaysInMonth(year, month); + timeout = 0; + if (this.options.monthChangeAnimation) { + days = this.$element.find('[data-group="days"] .day'); + for (i = _i = 0, _len = days.length; _i < _len; i = ++_i) { + day = days[i]; + delay = i * 0.01; + this.applyTransition($(day), 'transform .5s ease ' + delay + 's'); + this.applyTransform($(day), 'rotateY(180deg)'); + this.applyBackfaceVisibility($(day)); + timeout = (delay + 0.1) * 1000; + } + } + dayBase = 2; + if (this.options.allRows) { + loopBase = 42; + } else { + multiplier = Math.ceil((firstDayOfMonth - (dayBase - 1) + lastDayOfMonth) / 7); + loopBase = multiplier * 7; + } + this.$element.find("[data-head-year]").html(time.getFullYear()); + this.$element.find("[data-head-month]").html(this.options.translateMonths[time.getMonth()]); + draw = function() { + var dayNum, setEvents; + thisRef.$element.find('[data-group="days"]').empty(); + dayNum = dayBase - firstDayOfMonth; + i = thisRef.options.startFromSunday ? 0 : 1; + while (dayNum < loopBase - firstDayOfMonth + dayBase) { + thisRef.drawDay(lastDayOfMonth, yearNum, monthNum, dayNum, i); + dayNum = dayNum + 1; + i = i + 1; + } + setEvents = function() { + var _j, _len1; + days = thisRef.$element.find('[data-group="days"] .day'); + for (i = _j = 0, _len1 = days.length; _j < _len1; i = ++_j) { + day = days[i]; + thisRef.applyTransition($(day), 'transform .5s ease ' + (i * 0.01) + 's'); + thisRef.applyTransform($(day), 'rotateY(0deg)'); + } + if (thisRef.options.onDayClick) { + thisRef.$element.find('[data-group="days"] .day a').click(function() { + return thisRef.options.onDayClick.call(this, thisRef.options.events); + }); + } + if (thisRef.options.onDayHover) { + thisRef.$element.find('[data-group="days"] .day a').hover(function() { + return thisRef.options.onDayHover.call(this, thisRef.options.events); + }); + } + if (thisRef.options.onActiveDayClick) { + thisRef.$element.find('[data-group="days"] .day.active a').click(function() { + return thisRef.options.onActiveDayClick.call(this, thisRef.options.events); + }); + } + if (thisRef.options.onActiveDayHover) { + return thisRef.$element.find('[data-group="days"] .day.active a').hover(function() { + return thisRef.options.onActiveDayHover.call(this, thisRef.options.events); + }); + } + }; + return setTimeout(setEvents, 0); + }; + setTimeout(draw, timeout); + return currentMonth; + } + }; + $.fn.responsiveCalendar = function(option, params) { //console.log("RELOAD CALENDAR"); + var init, options, publicFunc; + options = $.extend({}, $.fn.responsiveCalendar.defaults, typeof option === 'object' && option); + publicFunc = { + next: 'next', + prev: 'prev', + edit: 'editDays', + clear: 'clearDays', + clearAll: 'clearAll', + getYearMonth: 'getYearMonth', + jump: 'jump', + curr: 'curr' + }; + init = function($this) { + var data; + options = $.metadata ? $.extend({}, options, $this.metadata()) : options; + $this.data('calendar', (data = new Calendar($this, options))); + if (options.onInit) { + options.onInit.call(data); + } + return $this.find("[data-go]").click(function() { + if ($(this).data("go") === "prev") { + data.prev(); + } + if ($(this).data("go") === "next") { + return data.next(); + } + }); + }; + return this.each(function() { + var $this, data; + $this = $(this); + data = $this.data('calendar'); + if (!data) { + init($this); + } else if (typeof option === 'string') { + if (publicFunc[option] != null) { + data[publicFunc[option]](params); + } else { + data.setMonthYear(option); + } + } else if (typeof option === 'number') { + data.jump(Math.abs(option) + 1); + } + return null; + }); + }; + $.fn.responsiveCalendar.defaults = { + translateMonths: [trad.january, trad.february, trad.march, trad.april, trad.may, trad.june, trad.july, trad.august, trad.september, trad.october, trad.november, trad.december], + events: {}, + time: void 0, + allRows: true, + startFromSunday: false, + activateNonCurrentMonths: false, + monthChangeAnimation: true, + onInit: void 0, + onDayClick: void 0, + onDayHover: void 0, + onActiveDayClick: void 0, + onActiveDayHover: void 0, + onMonthChange: void 0 + }; + spy = $('[data-spy="responsive-calendar"]'); + if (spy.length) { + opts = {}; + if ((spy.data('translate-months')) != null) { + opts.translateMonths = spy.data('translate-months').split(','); + } + if ((spy.data('time')) != null) { + opts.time = spy.data('time'); + } + if ((spy.data('all-rows')) != null) { + opts.allRows = spy.data('all-rows'); + } + if ((spy.data('start-from-sunday')) != null) { + opts.startFromSunday = spy.data('start-from-sunday'); + } + if ((spy.data('activate-non-current-months')) != null) { + opts.activateNonCurrentMonths = spy.data('activate-non-current-months'); + } + if ((spy.data('month-change-animation')) != null) { + opts.monthChangeAnimation = spy.data('month-change-animation'); + } + return spy.responsiveCalendar(opts); + } + })(jQuery); + +}).call(this); diff --git a/assets/js/default/search.js b/assets/js/default/search.js new file mode 100644 index 0000000000000000000000000000000000000000..56fd548e728ddf625ea8af383ef1d334d76e3a00 --- /dev/null +++ b/assets/js/default/search.js @@ -0,0 +1,295 @@ +function initSearchInterface(){ + + $("#main-search-bar").keyup(function(e){ + $("#second-search-bar").val($(this).val()); + $("#input-search-map").val($(this).val()); + if(e.keyCode == 13){ + initTypeSearch(typeInit); + startSearch(0, indexStepInit, searchCallback); + $(".btn-directory-type").removeClass("active"); + KScrollTo("#content-social"); + } + }); + $("#main-search-bar").change(function(){ + $("#second-search-bar").val($(this).val()); + }); + + $("#second-search-bar").keyup(function(e){ + //$("#main-search-bar").val($(this).val()); + //$("#input-search-map").val($(this).val()); + if(e.keyCode == 13){ + initTypeSearch(typeInit); + startSearchTerla(0, indexStepInit, searchCallback); + //$(".btn-directory-type").removeClass("active"); + //KScrollTo("#content-social"); + } + }); + + $("#input-search-map").off().keyup(function(e){ + $("#second-search-bar").val($("#input-search-map").val()); + $("#main-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + if(typeInit == "all") initTypeSearch("allSig"); + else initTypeSearch(typeInit); + startSearch(0, indexStepInit, searchCallback); + $(".btn-directory-type").removeClass("active"); + } + }); + + $("#menu-map-btn-start-search, #main-search-bar-addon").off().click(function(){ + $("#second-search-bar").val($("#input-search-map").val()); + $("#main-search-bar").val($("#input-search-map").val()); + console.log("typeInit", typeInit); + if(typeInit == "all") initTypeSearch("allSig"); + else initTypeSearch(typeInit); + startSearchTerla(0, indexStepInit, searchCallback); + $(".btn-directory-type").removeClass("active"); + }); + + $(".btn-create-elem").click(function(){ + currentKFormType = $(this).data("ktype"); + var type = $(this).data("type"); + setTimeout(function(){ + dyFObj.openForm(type); + },300); + + }); + + $(".main-btn-create").click(function(){ + currentKFormType = $(this).data("ktype"); + var type = $(this).data("type"); + + if(type=="all"){ + $("#dash-create-modal").modal("show"); + return; + } + + if(type=="events") type="event"; + if(type=="vote") type="entry"; + dyFObj.openForm(type); + }); +} + +function startSearchTerla(indexMin, indexMax, callBack){ + var name = $("#second-search-bar").val() != "" ? $("#second-search-bar").val() : $("#new-search-bar").val(); + memorySearch = name; + var data = { + "name" : name, + "tpl" : "searchTerla", + "locality" : "",//locality, + "searchType" : searchType, + "searchTag" : ($('#searchTags').length ) ? $('#searchTags').val().split(',') : [] , + "indexMin" : indexMin, + "indexMax" : indexMax + }; + + //alert(); + $.blockUI(); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + //dataType: "json", + error: function (data){ + mylog.log(">>> error autocomplete search"); + mylog.dir(data); + $(".main-container").html(data.responseText); + $("#searchVal").html(name); + //signal que le chargement est terminé + loadingData = false; + }, + success: function(data){ + mylog.log(">>> success startSearchTerla", data); //mylog.dir(data); + $(".main-container").html(data); + $.unblockUI(); + /* if(!data){ + toastr.error(data.content); + } + else + { + }*/ + + //affiche les éléments sur la carte + //Sig.showMapElements(Sig.map, mapElements, "search", "Résultats de votre recherche"); + + //if(typeof callBack == "function") + // callBack(); + } + }); +} + + +/* ------------------------- +CLASSIFIED +----------------------------- */ +var section = ""; +var sectionKey; +var classType = ""; +var classSubType = ""; +function initClassifiedInterface(){ return; + classified.currentLeftFilters = null; + $('#menu-section-'+typeInit).removeClass("hidden"); + $("#btn-create-classified").click(function(){ + dyFObj.openForm('classified'); + }); +} + +function bindLeftMenuFilters () { + + $(".btn-select-type-anc").off().on("click", function() + { + searchType = [ typeInit ]; + indexStepInit = 100; + + if( $(this).hasClass( "active" ) ) + { + sectionKey = null; + $('#searchTags').val(""); + $('.classifiedSection').remove(); + $(".label-category,.resultTypes").html(""); + } + else + { + + section = $(this).data("type-anc"); + sectionKey = $(this).data("key"); + //alert("section : " + section); + + if( sectionKey == "forsale" || sectionKey == "forrent" || sectionKey == "job"){ + $("#section-price").show(200); + setTimeout(function(){ + KScrollTo("#container-scope-filter"); + }, 400); + } + else { + $("#section-price").hide(); + $("#priceMin").val(""); + $("#priceMax").val(""); + KScrollTo("#container-scope-filter"); + } + + if( jsonHelper.notNull("classified.sections."+sectionKey+".filters") ){ + //alert('build left menu'+classified.sections[sectionKey].filters); + classified.currentLeftFilters = classified.sections[sectionKey].filters; + var filters = classified[ classified.currentLeftFilters ]; + var what = { title : classified.sections[sectionKey].label, + icon : classified.sections[sectionKey].icon } + directory.sectionFilter( filters, ".classifiedFilters",what); + bindLeftMenuFilters (); + + } + else if(classified.currentLeftFilters != null) { + //alert('rebuild original'); + var what = { title : classified.sections[sectionKey].label, + icon : classified.sections[sectionKey].icon } + directory.sectionFilter( classified.filters, ".classifiedFilters",what); + bindLeftMenuFilters (); + classified.currentLeftFilters = null; + } + $('#searchTags').val(sectionKey); + } + + $(".btn-select-type-anc, .btn-select-category-1, .keycat").removeClass("active"); + $(".keycat").addClass("hidden"); + + + if(sectionKey) + $(this).addClass("active"); + + startSearch(0, indexStepInit, searchCallback); + + if(sectionKey && typeof classified.sections[sectionKey] != "undefined") { + var label = classified.sections[sectionKey]["labelFront"]; + $(".label-category").html("<i class='fa fa-"+ classified.sections[sectionKey]["icon"] + "'></i> " + tradCategory[label]); + $('.classifiedSection').remove(); + $(".resultTypes").append( "<span class='classifiedSection text-azure text-bold hidden-xs pull-right'><i class='fa fa-"+ classified.sections[sectionKey]["icon"] + "'></i> " + classified.sections[sectionKey]["label"]+'<i class="fa fa-times text-red resetFilters"></i></span>'); + $(".label-category").removeClass("letter-blue letter-red letter-green letter-yellow").addClass("letter-"+classified.sections[sectionKey]["color"]) + $(".fa-title-list").removeClass("hidden"); + } + }); + + $(".btn-select-category-1").off().on("click", function(){ //alert("onclick"); + searchType = [ typeInit ]; + var searchTxt = ""; + var section = $('#searchTags').val(); + var classType = $(this).data("keycat"); + console.log("bindLeftMenuFilters sectionKey", sectionKey); + + if( $(this).hasClass( "active" ) ){ + searchTxt = sectionKey; + $(this).removeClass( "active" ); + $(".keycat-"+classType).addClass("hidden"); + }else{ + $(".btn-select-category-1").removeClass("active"); + $(this).addClass("active"); + + $(".keycat").addClass("hidden"); + $(".keycat-"+classType).removeClass("hidden"); + + if(typeof sectionKey != "undefined" && typeof sectionKey != null) + searchTxt = sectionKey+","; + + searchTxt += classType; + } + $('#searchTags').val(searchTxt); + startSearch(0, indexStepInit, searchCallback); + }); + + $(".btn-select-category-services").off().on("click", function(){ //alert("onclick"); + var tags = ""; + var keycat = $(this).data("keycat"); + if( $(this).hasClass( "active" ) ){ + $(".btn-select-category-services[data-keycat='"+keycat+"']").removeClass( "active" ); + $(".btn-select-category-services[data-keycat='"+keycat+"']").prop( "checked", false ); + }else{ + $(".btn-select-category-services[data-keycat='"+keycat+"']").addClass("active"); + $(".btn-select-category-services[data-keycat='"+keycat+"']").prop( "checked", true ); + } + + //.filterMenuMap + + $.each($("#page .btn-select-category-services"), function (key, value){ + console.log("checked ?", $(this).val()); + if($(this).hasClass( "active" )){ + if(tags!="") tags+=","; + tags+=$(this).data("keycat"); + } + }); + $('#searchTags').val(tags); + startSearch(0, indexStepInit, searchCallback); + }); + + $(".keycat").off().on("click", function(){ + searchType = [ typeInit ]; + var searchTxt = ""; + var classType = $(this).data("categ"); + var classSubType = $(this).data("keycat"); + if( $(this).hasClass( "active" ) ){ + searchTxt = sectionKey+","+classType; + $(this).removeClass( "active" ); + }else{ + $(".keycat").removeClass("active"); + $(this).addClass("active"); + + searchTxt = sectionKey+","+classType+","+classSubType; + } + + $('#searchTags').val( searchTxt ); + KScrollTo("#container-scope-filter"); + startSearch(0, indexStepInit, searchCallback); + }); + + $("#btn-create-classified").off().on("click", function(){ + dyFObj.openForm('classified'); + }); + + $("#priceMin").filter_input({regex:'[0-9]'}); //[a-zA-Z0-9_] + $("#priceMax").filter_input({regex:'[0-9]'}); //[a-zA-Z0-9_] + + $('#main-search-bar, #second-search-bar, #input-search-map').filter_input({regex:'[^@\"\`/\(|\)/\\\\]'}); //[a-zA-Z0-9_] + + } + +/* ------------------------- +END CLASSIFIED +----------------------------- */ diff --git a/assets/js/default/shoppingCart.js b/assets/js/default/shoppingCart.js new file mode 100644 index 0000000000000000000000000000000000000000..e07a64e1dfea22a0895111c1c04825fa064b97b5 --- /dev/null +++ b/assets/js/default/shoppingCart.js @@ -0,0 +1,817 @@ +var shopping = { + cart:{ + countQuantity:0, + totalCart : 0 + }, + checkoutObj : { + total : 0, + sellers : {} + }, + totalCart:0, + init : function(){ + shopping.cart={ + countQuantity:0, + totalCart : 0 + }; + shopping.checkoutObj = { + total : 0, + sellers : {} + }; + shopping.totalCart=0; + }, + addToShoppingCart: function(id, type, subType, ranges){ + incCart=true; + if(typeof userId != "undefined" && userId != ""){ + if(typeof shopping.cart[type] == "undefined") + shopping.cart[type]=new Object; + if(type=="services" ){ + if(typeof shopping.cart[type][subType]=="undefined") + shopping.cart[type][subType]=new Object; + + if(typeof shopping.cart[type][subType][id]=="undefined"){ + params={ + name : element.name, + providerId : element.parentId, + providerName : element.name, + providerType : element.parentType, + price : element.price, + countQuantity:1 + }; + if(typeof element.imgProfil != "undefined") + params.imgProfil=element.imgProfil; + if(typeof element.description != "undefined") + params.description=element.description; + if(typeof element.capacity != "undefined") + params.capacity=element.capacity; + if(notNull(subType)) + params.type=subType; + shopping.cart[type][subType][id]=params; + } + else{ + shopping.cart[type][subType][id]["countQuantity"]++; + incCart=false; + } + if(typeof ranges != "undefined" && notNull(ranges)){ + if(typeof shopping.cart[type][subType][id]["reservations"] == "undefined") + shopping.cart[type][subType][id]["reservations"]=new Object; + + if(typeof shopping.cart[type][subType][id]["reservations"][ranges.date] == "undefined"){ + shopping.cart[type][subType][id]["reservations"][ranges.date] = {"countQuantity":1}; + }else{ + shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]++; + incCart=false; + } + if(typeof ranges.hours != "undefined"){ + ranges.hours.countQuantity=1; + if(typeof shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"] == "undefined") + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"]=[]; + + if(jQuery.isEmptyObject(shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"])){ + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"].push(ranges.hours); + }else{ + hoursInArray=false; + $.each(shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"], function(e,v){ + if(v.start==ranges.hours.start && v.end==ranges.hours.end){ + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]++; + hoursInArray=true; + } + }); + if(!hoursInArray) + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"].push(ranges.hours); + } + } + } + }else{ + if(typeof shopping.cart[type][id] == "undefined"){ + params={ + name : element.name, + providerId : element.parentId, + providerType : element.parentType, + providerName : element.name, + price : element.price, + countQuantity:1 + }; + if(typeof element.imgProfil != "undefined") + params.imgProfil=element.imgProfil; + if(typeof element.description != "undefined") + params.description=element.description; + if(typeof element.capacity != "undefined") + params.capacity=element.capacity; + if(notNull(subType)) + params.type=subType; + shopping.cart[type][id]={}; + shopping.cart[type][id]=params; + }else{ + shopping.cart[type][id].countQuantity++; + incCart=false; + } + } + if(incCart) + shopping.countShoppingCart(true); + localStorage.setItem("shoppingCart",JSON.stringify(shopping.cart)); + }else{ + $('#modalLogin').modal("show"); + } + }, + removeFromShoppingCart:function(id, type, deleteAll, subType, ranges){ + incCart=false; + if(typeof userId != "undefined" && userId != ""){ + if(type=="services" ){ + if(shopping.cart[type][subType][id]["countQuantity"]==1 || (deleteAll && ranges==null)){ + delete shopping.cart[type][subType][id]; + incCart=true; + }else{ + if(!deleteAll) + shopping.cart[type][subType][id]["countQuantity"]--; + if(typeof ranges != "undefined" && notNull(ranges)){ + console.log(ranges); + if(deleteAll && typeof ranges.hours == "undefined"){ + removeQuantityDate=shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]; + delete shopping.cart[type][subType][id]["reservations"][ranges.date]; + }else{ + if(shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]==1){ + delete shopping.cart[type][subType][id]["reservations"][ranges.date]; + }else{ + if(!deleteAll) + shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]--; + if(typeof ranges.hours != "undefined"){ + $.each(shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"], function(e,v){ + if(typeof v != "undefined"){ + if(v.start==ranges.hours.start && v.end==ranges.hours.end){ + if(deleteAll){ + removeQuantityHours=shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]; + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"].splice(e,1); + }else{ + if(v.countQuantity==1){ + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"].splic(e,1); + } + else{ + shopping.cart[type][subType][id]["reservations"][ranges.date]["hours"][e]["countQuantity"]--; + } + } + } + } + }); + if(typeof removeQuantityHours != "undefined"){ + shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]=shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]-removeQuantityHours; + shopping.cart[type][subType][id]["countQuantity"]=shopping.cart[type][subType][id]["countQuantity"]-removeQuantityHours; + if(shopping.cart[type][subType][id]["reservations"][ranges.date]["countQuantity"]==0){ + delete shopping.cart[type][subType][id]["reservations"][ranges.date]; + } + if(shopping.cart[type][subType][id]["countQuantity"]==0){ + delete shopping.cart[type][subType][id]; + incCart=true; + } + } + } + } + } + if(typeof removeQuantityDate != "undefined"){ + shopping.cart[type][subType][id]["countQuantity"]=shopping.cart[type][subType][id]["countQuantity"]-removeQuantityDate; + if(shopping.cart[type][subType][id]["countQuantity"]==0){ + delete shopping.cart[type][subType][id]; + incCart=true; + } + } + } + } + }else{ + if(deleteAll){ + delete shopping.cart[type][id]; + incCart=true; + }else{ + if(shopping.cart[type][id].countQuantity==1){ + incCart=true; + delete shopping.cart[type][id]; + }else{ + shopping.cart[type][id].countQuantity--; + } + } + } + if(incCart) + shopping.countShoppingCart(false); + localStorage.setItem("shoppingCart",JSON.stringify(shopping.cart)); + }else{ + $('#modalLogin').modal("show"); + } + }, + addEvent : function($this,data){ + bookDate=data.start.format('YYYY-MM-DD'); + var ranges = new Object; + ranges.date=bookDate; + data.capacity--; + data.quantity++; + if(data.quantity > 0){ + $this.find(".remove-session").removeClass("hide"); + $this.find(".inc-session").html(data.quantity); + $this.find('.inc-session').removeClass('hide'); + $this.find('.inc-session').addClass('animated bounceIn'); + $this.find('.inc-session').addClass('badge-success'); + $this.find('.inc-session').removeClass('badge-tranparent'); + }else{ + $this.find('.inc-session').addClass('hide'); + $this.find('.inc-session').removeClass('badge-success'); + $this.find('.inc-session').addClass('badge-tranparent'); + $this.find(".inc-session").addClass("hide"); + } + if(data.capacity === 0){ + $this.find(".add-session").addClass("hide"); + } + //element.find(".inc-session").data("value",event.quantity).text(event.quantity); + $this.find(".inc-capacity").data("value",data.capacity).text(data.capacity); + if(typeof data.allDay == "undefined" || !data.allDay) + ranges.hours={start: data.startTime , end: data.endTime}; + shopping.addToShoppingCart(itemId, itemType, subType, ranges); + availableCal.push(data); + }, + removeEvent: function($this,data){ + bookDate=data.start.format('YYYY-MM-DD'); + data.capacity++; + data.quantity--; + if(data.capacity > 0) + $this.find(".add-session").removeClass("hide"); + if(data.quantity === 0){ + $this.find('.remove-session').addClass('hide'); + $this.find('.inc-session').removeClass('badge-success'); + $this.find('.inc-session').addClass('badge-tranparent'); + $this.find(".inc-session").addClass("hide"); + }else{ + $this.find(".inc-session").html(data.quantity); + $this.find('.inc-session').removeClass('hide'); + $this.find('.inc-session').addClass('animated bounceIn'); + $this.find('.inc-session').addClass('badge-success'); + $this.find('.inc-session').removeClass('badge-tranparent'); + } + //element.find(".inc-session").text(event.quantity); + $this.find(".inc-capacity").text(data.capacity); + var ranges = new Object; + ranges.date=bookDate; + if(typeof data.allDay == "undefined" || !data.allDay) + ranges.hours={start: data.startTime , end: data.endTime}; + availableCal.push(data); + shopping.removeFromShoppingCart(itemId, itemType, false, subType, ranges); + }, + getDayFilter : function(event){ + currentCartFilter={"quantity":0,"myQuantity":0}; + // GET QUANTITY OF CURRENT CART + if(typeof shopping.cart.services != "undefined" + && typeof shopping.cart.services[subType] != "undefined" + && typeof shopping.cart.services[subType][itemId] != "undefined" + && typeof shopping.cart[type][subType][id]["reservations"][event.start.format('YYYY-MM-DD')] != "undefined"){ + if(event.allDay==true){ + currentCartFilter.myQuantity=currentCartFilter.myQuantity+shopping.cart[type][subType][id]["reservations"][event.start.format('YYYY-MM-DD')]["countQuantity"]; + }else{ + if(typeof shopping.cart[type][subType][id]["reservations"][event.start.format('YYYY-MM-DD')]["hours"] != "undefined"){ + $.each(shopping.cart[type][subType][id]["reservations"][event.start.format('YYYY-MM-DD')]["hours"],function(e,v){ + if(v.start==event.startTime && v.end==event.endTime) + currentCartFilter.myQuantity=currentCartFilter.myQuantity+v.countQuantity; + }); + } + } + } + // GET QUANTITY ALREADY BOOKED + //console.log("allBook",allBookings); + if(allBookings.length && typeof event.filtered == "undefined"){ + //console.log("allBookings",allBookings); + $.each(allBookings,function(e,v){ + date=new Date( parseInt(v.date.sec)*1000 ); + if(moment(date).format('YYYY-MM-DD')==event.start.format('YYYY-MM-DD')){ + if(event.allDay){ + currentCartFilter.quantity=currentCartFilter.quantity+parseInt(v.countQuantity); + }else{ + if(typeof v.hours != "undefined"){ + $.each(v.hours,function(i, hours){ + if(hours.start==event.startTime && hours.end==event.endTime) + currentCartFilter.quantity=currentCartFilter.quantity+parseInt(hours.countQuantity); + }); + } + } + } + //alert(currentCartFilter.quantity); + }); + } + return currentCartFilter; + }, + countShoppingCart:function(pos){ + if(pos != "init"){ + if(pos) + shopping.cart.countQuantity++; + else + shopping.cart.countQuantity--; + } + if(shopping.cart.countQuantity > 0){ + $(".shoppingCart-count").html(shopping.cart.countQuantity); + $('.shoppingCart-count').removeClass('hide'); + $('.shoppingCart-count').addClass('animated bounceIn'); + $('.shoppingCart-count').addClass('badge-success'); + $('.shoppingCart-count').removeClass('badge-tranparent'); + }else{ + $('.shoppingCart-count').addClass('hide'); + $('.shoppingCart-count').removeClass('badge-success'); + $('.shoppingCart-count').addClass('badge-tranparent'); + } + }, + generateEmptyCartView:function(){ + str="<span>Va vite faire tes courses</span><br/>"+ + "<a href='#store' class='btn bg-orange lbh'>Acheter Acheter Acheter</a>"; + return str; + }, + generateCartView:function(){ + var htmls = shopping.getComponentsHtml(true); + //****************************************** + // CART + //****************************************** + str="<div class='col-md-12 bg-orange padding-10'>"+ + "<div class='pull-right'>"+ + "<a href='javascript:alert(\"Rapha pour toi\")' class='text-white padding-5' onclick=''><i class='fa fa-print'></i> Print</a>"+ + "<a href='javascript:;' onclick='shopping.saveCart();' class='text-white padding-5' onclick=''><i class='fa fa-floppy-o'></i> Save</a>"+ + "<a href='javascript:alert(\"Partager quoi sur quoi???\")' class='text-white padding-5' onclick=''><i class='fa fa-link'></i> Share</a>"+ + "<a href='javascript:alert(\"Kill all mother fuck\")' class='text-white padding-5' onclick=''><i class='fa fa-trash'></i> Empty</a>"+ + "</div>"+ + "</div>"+ + "<div class='col-xs-12'>"; + str+=htmls.itemHtml; + str+="<div class='col-xs-12 bg-orange padding-10 margin-top-20 radius-5 text-right'>"+ + "<h4 class='text-white no-margin totalPrice'>"+ + "<small class='text-white'>"+trad["Total of your order"] + " : </small>"+shopping.totalCart+ + "<small class='text-white'> euros</small>"+ + "</h4>"+ + "</div>"; + str+="<div class='col-xs-12 pull-right btn-cart margin-top-20 no-padding'>"+ + "<button onclick='shopping.checkout();' class='btn btn-link bg-orange text-white pull-right'>"+trad["Checkout"] +"</button>"+ + "<button class='btn btn-link letter-orange pull-right margin-right-10 text-white' data-toggle='modal'>"+trad["Continue"] +"</button>"+ + "<div class='margin-top-10 pull-left'>"+ + "* folder fee included and delivery tax not included"+ + "</div>"+ + "</div>" + + "</div>"; + + //****************************************** + // CHECKOUT + //****************************************** + cStr = "<div class='col-xs-12 bg-orange padding-10'>"+ + "<div class='pull-left'>"+ + "<span class='text-white'> " + trad["Checkout"] + " </span>"+ + "</div>"+ + "</div>"+ + "<div class='col-xs-12'>"; + cStr += htmls.sellerHtml; + cStr += "<div class='pull-right bg-orange text-right padding-5 margin-top-20 radius-5'>"+ + "<h4 class='text-white no-margin totalPrice'>Passer à la caisse : "+shopping.totalCart+" euros</h4>"+ + "</div>"; + cStr += "<div class='col-xs-12 padding-15 text-right'>"+ + "<span>* folder fee included and delivery tax not included</span>"+ + "</div></div>"; + return { cart : str , checkout : cStr }; + }, + checkout : function() { + getAjax(".contentCB", baseUrl+'/'+moduleId+"/pay?amount="+shopping.checkoutObj.total+"&cur=EUR&card=CB_VISA_MASTERCARD", null,"html"); + $("#shoppingCart").addClass("hide"); + $("#checkoutCart").removeClass("hide"); + }, + pay : function() { + getAjax(".contentCB", baseUrl+'/'+moduleId+"/done?amount="+shopping.checkoutObj.total+"&cur=EUR&card=CB_VISA_MASTERCARD", null,"html"); + $("#shoppingCart").addClass("hide"); + $("#checkoutCart").addClass("hide"); + $("#checkoutResult").addClass("hide"); + }, + getComponentsHtml:function(firstLevel){ + var itemHtml = ""; + shopping.checkoutObj = { + total:0, + sellers : {} + }; + $.each(shopping.cart,function(i,v){ + console.log(v); + if(i=="services" || i=="products"){ + if(i=="services"){ + $.each(v,function(e, service){ + console.log(service); + itemHtml += shopping.getItemByCategory(e,service,"services"); + }); + } + else{ + itemHtml += shopping.getItemByCategory(i,v, "products"); + } + } + }); + + var sellerHtml = ""; + $.each(shopping.checkoutObj.sellers,function(id,seller){ + console.log(seller); + sellerHtml += "<div class='col-md-12 headerCategory margin-top-20'>"+ + "<div class='col-md-12'>"+ + "<h5 class='letter-orange text-left'>"+id+ + "<span class='pull-right subTitleCart'>"+seller.total+" ttc</span>"+ + "<h5>"+ + "</div>"+ + "</div>"; + }); + + return { "itemHtml" : itemHtml , "sellerHtml" : sellerHtml }; + }, + getItemByCategory:function(label,item, type){ + itemHtml="<div class='col-md-12 headerCategory margin-top-20'>"+ + "<div class='col-md-12'>"+ + "<h2 class='letter-orange mainTitle text-left'>"+label+"</h2>"+ + "</div>"+ + "<div class='col-md-2'></div>"+ + "<div class='col-md-4'><h3 class='subTitleCart letter-orange'>Label<h3></div>"+ + "<div class='col-md-2'><h3 class='subTitleCart letter-orange'>Price ht<h3></div>"+ + "<div class='col-md-1'><h3 class='subTitleCart letter-orange'>Detail<h3></div>"+ + "<div class='col-md-2'><h3 class='subTitleCart letter-orange'>Price ttc<h3></div>"+ + "<div class='col-md-1'></div>"+ + "</div>"; + $.each(item,function(e,data){ + itemHtml+=shopping.getViewItem(e, data, type); + if(shopping.cart.idCircuit=="undefined") + shopping.totalCart+=data.price*data.countQuantity; + else + shopping.totalCart+=data.price*data.countQuantity*shopping.cart.bookingFor; + if(shopping.cart.idCircuit=="undefined"){ + totalCheck=data.price*data.countQuantity; + qtyCheck=data.countQuantity; + } + else{ + totalCheck=data.price*data.countQuantity*shopping.cart.bookingFor; + qtyCheck=data.countQuantity*shopping.cart.bookingFor; + } + if( typeof shopping.checkoutObj.sellers[data.providerId] == "undefined" ){ + + shopping.checkoutObj.sellers[data.providerId] = { + total : totalCheck, + qty : qtyCheck, + type : data.providerType, + name : data.providerName, + }; + }else { + shopping.checkoutObj.sellers[data.providerId].total += totalCheck; + shopping.checkoutObj.sellers[data.providerId].qty += qtyCheck; + } + if(shopping.cart.idCircuit=="undefined") + shopping.checkoutObj.total+=data.price*data.countQuantity; + else + shopping.checkoutObj.total+=data.price*data.countQuantity*shopping.cart.bookingFor; + }); + return itemHtml; + }, + + getViewItem:function(key, data, type){ + itemId=key; + itemType=type; + subType=null; + if(data.type != "undefined") + subType=data.type; + // View for products without reservations + if(typeof data.reservations =="undefined"){ + if(typeof shopping.cart.idCircuit == "undefined"){ + classRemove=""; + classAdd=""; + if(data.countQuantity==1) + classRemove="hide"; + if(typeof data.capacity != "undefined" && data.countQuantity>=data.capacity) + classAdd="hide"; + incQtt="<a href='javascript:;' class='letter-orange remove-session "+classRemove+"' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",null);'>" + +"<i class='fa fa-minus'></i></a>" + +'<span class="eventCountItem margin-left-5 margin-right-5">' + +'<i class="fa fa-shopping-cart"></i>' + +'<span class="inc-session topbar-badge badge animated bounceIn badge-transparent badge-success">'+data.countQuantity+'</span>' + +'</span>' + +"<a href='javascript:;' class='letter-orange add-session "+classAdd+"' onclick='shopping.addInCart(\""+itemId+"\", \""+itemType+"\", null);'><i class='fa fa-plus'></i></a>"; + } else + incQtt="<span class='showDetail showDetail"+key+"' data-value='"+key+"''><i class='fa fa-2x fa-angle-down'></i></span>"; + }else + incQtt="<span class='showDetail showDetail"+key+"' data-value='"+key+"''><i class='fa fa-2x fa-angle-down'></i></span>"; + // View detail reservations + // Quantity systeme for circuit and specific user travel (desactivated) + if(typeof shopping.cart.idCircuit == "undefined"){ + quantityShop=data.countQuantity; + priceHT=data.price*data.countQuantity + priceTTC=data.price*data.countQuantity; + } + else{ + quantityShop=data.countQuantity*shopping.cart.bookingFor; + priceHT=data.price*data.countQuantity*shopping.cart.bookingFor; + priceTTC=data.price*data.countQuantity*shopping.cart.bookingFor; + } + itemHtml="<div class='col-md-12 contentProduct contentProduct"+itemId+" text-left'>"+ + "<div class='col-md-2 no-padding'>"+data.imgProfil+"</div>"+ + "<div class='col-md-4'>"+ + "<h4 class='text-dark'>"+data.name+"</h4>"+ + "<span>Quantity booked : "+quantityShop+"</span><br>"; + if(typeof data.description != "undefined" && data.description != "") + itemHtml += "<div class='description'>"+data.description+"</div><br>"; + //itemHtml += "<a href='javascript:;' class='letter-blue-5' onclick='alert(\"What's the quoi???\")'> Save / Update</a>"+ + itemHtml += "</div>"+ + "<div class='col-md-2 text-center'><span>"+priceHT+" €</span></div>"+ + "<div class='col-md-1 text-center no-padding'>"+incQtt+"</div>"+ + "<div class='col-md-2 text-center'><span>"+priceTTC+" €</span></div>"+ + "<div class='col-md-1 text-center'><span>"; + if(typeof shopping.cart.idCircuit == "undefined") + itemHtml += "<a href='javascript:;' class='letter-lightgray' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",true,\""+subType+"\");'><i class='fa fa-trash fa-2x'></i></a></span>"; + itemHtml += "</span></div>"; + if(typeof data.reservations != "undefined"){ + itemHtml += "<div class='col-md-12 col-sm-12 col-xs-12 dateHoursDetail'>"; + // countDate=Object.keys(data.reservations).length; + // s=(countDate > 1) ? "s" : ""; + //itemHtml += "<span>"+countDate+" date"+s+" booked</span><br/>"; + $.each(data.reservations, function(date, value){ + s=(value.countQuantity > 1) ? "s" : ""; + dateStr=directory.getDateFormated({startDate:date}, true); + itemHtml += "<div class='col-md-12 col-sm-12 col-xs-12 bookDate"+date+" shadow2 margin-bottom-10'>"+ + "<div class='col-md-12 col-sm-12 col-xs-12 dateHeader'>"+ + "<h4 class='pull-left margin-bottom-5 no-margin col-md-5 col-sm-5 col-xs-5 no-padding'><i class='fa fa-calendar'></i> "+dateStr+"</h4>"; + if(typeof shopping.cart.idCircuit == "undefined"){ + if(typeof value.hours =="undefined"){ + classRemove=""; + classAdd=""; + if(value.countQuantity==1) + classRemove="hide"; + if(value.countQuantity>=data.capacity) + classAdd="hide"; + incQtt="<a href='javascript:;' class='letter-orange remove-session "+classRemove+"' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",null,\""+subType+"\",\""+date+"\");'>" + +"<i class='fa fa-minus'></i></a>" + +'<span class="eventCountItem margin-left-5 margin-right-5">' + +'<i class="fa fa-shopping-cart"></i>' + +'<span class="inc-session topbar-badge badge animated bounceIn badge-transparent badge-success">'+value.countQuantity+'</span>' + +'</span>' + +"<a href='javascript:;' class='letter-orange add-session "+classAdd+"' onclick='shopping.addInCart(\""+itemId+"\", \""+itemType+"\",\""+subType+"\",\""+date+"\");'><i class='fa fa-plus'></i></a>"; + }else + incQtt=value.countQuantity+" reservation"+s; + }else + incQtt=value.countQuantity+" sessions"+s+" at this date"; + itemHtml += "<span class='pull-left text-center col-md-3 col-sm-3 col-xs-3'>"+incQtt+"</span>"; + if(typeof shopping.cart.idCircuit == "undefined"){ + itemHtml += "<div class='pull-right'>"+ + "<a href='javascript:;' class='text-red' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",true,\""+subType+"\",\""+date+"\");'>"+ + "<i class='fa fa-trash'></i> Remove this date</a>"+ + "</div>"; + } + itemHtml += "</div>"; + + if(typeof value.hours != "undefined"){ + //countSession=Object.keys(value.hours).length; + //s=(countSession > 1) ? "s" : ""; + //itemHtml += "<span>"+countSession+" session"+s+"</span><br/>"; + $.each(value.hours, function(key, hours){ + s=(hours.countQuantity > 1) ? "s" : ""; + if(typeof shopping.cart.idCircuit == "undefined"){ + classRemove=""; + classAdd=""; + if(hours.countQuantity==1) + classRemove="hide"; + if(hours.countQuantity>=data.capacity) + classAdd="hide"; + incQtt="<a href='javascript:;' class='letter-orange "+classRemove+"' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",null,\""+subType+"\",\""+date+"\",\""+hours.start+"\",\""+hours.end+"\");'>" + +"<i class='fa fa-minus'></i></a>" + +'<span class="eventCountItem margin-left-5 margin-right-5">' + +'<i class="fa fa-shopping-cart"></i>' + +'<span class="inc-session topbar-badge badge animated bounceIn badge-transparent badge-success">'+hours.countQuantity+'</span>' + +'</span>' + +"<a href='javascript:;' class='letter-orange "+classAdd+"' onclick='shopping.addInCart(\""+itemId+"\", \""+itemType+"\",\""+subType+"\",\""+date+"\",\""+hours.start+"\",\""+hours.end+"\");'><i class='fa fa-plus'></i></a>"; + }else{ + s=(shopping.cart.bookingFor > 1) ? "s" : ""; + incQtt = "session booked for "+shopping.cart.bookingFor+" person"+s; + } + itemHtml += "<div class='col-md-12 col-sm-12 col-xs-12 margin-bottom-5 padding-5 contentHoursSession'>"+ + "<h4 class='col-md-4 col-sm-4 col-xs-3 no-padding no-margin'><i class='fa fa-clock-o'></i> "+hours.start+" - "+hours.end+"</h4>"+ + "<span class='col-md-5 col-sm-5 col-xs-6 text-center'>"+incQtt+"</span>"; + if(typeof shopping.cart.idCircuit == "undefined"){ + itemHtml += "<div class='pull-right'>"+ + "<a href='javascript:;' class='text-red' onclick='shopping.removeInCart(\""+itemId+"\", \""+itemType+"\",true,\""+subType+"\",\""+date+"\",\""+hours.start+"\",\""+hours.end+"\");'>"+ + "<i class='fa fa-times'></i>"+ + "</a>"+ + "</div>"; + } + itemHtml += "</div>"; + }); + } + itemHtml += "</div>"; + }); + itemHtml += "</div>"; + } + itemHtml += "</div>"; + return itemHtml; + + }, + removeInCart:function(id, type, deleteAll, subType, date, start, end){ + ranges=null; + if(notNull(date)){ + ranges=new Object; + ranges.date=date; + if(notNull(start)) + ranges.hours={start: start , end: end}; + } + shopping.removeFromShoppingCart(id, type, deleteAll, subType, ranges); + shopping.reloadViewCart(); + }, + addInCart:function(id, type, subType, date, start, end){ + ranges=null; + if(notNull(date)){ + ranges=new Object; + ranges.date=date; + if(notNull(start)) + ranges.hours={start: start , end: end}; + } + shopping.addToShoppingCart(id, type, subType, ranges); + shopping.reloadViewCart(); + }, + reloadViewCart:function(){ + shopping.totalCart=0; + htmlCart = "", htmlCheckout = ''; + if(shopping.cart.countQuantity > 0 ){ + cartview = shopping.generateCartView(); + htmlCart = cartview.cart; + htmlCheckout = cartview.checkout; + } + else { + htmlCart = shopping.generateEmptyCartView(); + htmlCheckout = ""; + } + + $(".contentCart").html(htmlCart); + $(".contentCheckout").html(htmlCheckout); + + bindCartEvent(); + initBtnLink(); + + if(openDetails.length > 0){ + $.each(openDetails,function(i,v){ + $(".showDetail"+v).trigger("click"); + }); + } + }, + buyCart:function(){ + order = { + totalPrice : shopping.totalCart, + currency : "EUR" + }; + orderItem=new Object; + + if(typeof shopping.cart.idCircuit != "undefined"){ + order.circuit=shopping.cart.idCircuit; + } + if(typeof shopping.cart.idCircuit != "undefined"){ + order.bookingFor=shopping.cart.bookingFor; + } + if(typeof shopping.cart.name != "undefined"){ + order.name=shopping.cart.name; + } + if(typeof shopping.cart.backup != "undefined"){ + order.backup=shopping.cart.backup; + } + + $.each(shopping.cart,function(e,v){ + if(e=="countQuantity") + order.countOrderItem=v; + else if(e=="services"){ + $.each(v, function(cat, listByCat){ + $.each(listByCat, function(key, data){ + if(typeof shopping.cart.idCircuit == "undefined"){ + quantityByItem=data.countQuantity; + priceByItem=data.price * data.countQuantity; + reservationsByItem=data.reservations; + } + else{ + quantityByItem=data.countQuantity*shopping.cart.bookingFor; + priceByItem=data.price * data.countQuantity*shopping.cart.bookingFor; + reservationsByItem=data.reservations; + $.each(reservationsByItem, function(i,v){ + reservationsByItem[i].countQuantity=v.countQuantity*shopping.cart.bookingFor; + if(typeof v.hours != "undefined"){ + $.each(v.hours, function(key,hour){ + reservationsByItem[i].hours[key].countQuantity=hour.countQuantity*shopping.cart.bookingFor; + }); + } + }); + + } + orderItem[key]={ + orderedItemType : e, + quantity : quantityByItem, + price : priceByItem, + reservations : reservationsByItem + }; + }); + }); + }else if(e=="products"){ + $.each(v, function(key, data){ + orderItem[key]={ + orderedItemType : e, + quantity : data.countQuantity, + price : (data.price*data.countQuantity) + }; + }); + } + }); + order.orderItems=orderItem; + + if(typeof order.name == "undefined"){ + bootbox.prompt({ + title: "Give a name to your command:", + value : "Cart of "+moment(new Date()).format('DD-MM-YYYY HH:MM'), + callback : function(result){ + order.name=result; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/order/save", + data: order, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + shopping.init(); + localStorage.removeItem("shoppingCart"); + urlCtrl.loadByHash("#page.type.citoyens.id."+userId+".view.history"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + console.log(order); + } + }); + }else{ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/order/save", + data: order, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + shopping.init(); + localStorage.removeItem("shoppingCart"); + urlCtrl.loadByHash("#page.type.citoyens.id."+userId+".view.history"); + //urlCtrl.loadByHash("#checkout"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + } + }, + saveCart:function(){ + if(typeof shopping.cart.backup !="undefined"){ + params={ + id : shopping.cart.backup, + totalPrice : shopping.totalCart, + object : shopping.cart + }; + $.ajax({ + type : "POST", + url : baseUrl+"/"+moduleId+"/backup/update", + data : params, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + shopping.cart={countQuantity:0}; + localStorage.removeItem("shoppingCart"); + urlCtrl.loadByHash("#page.type.citoyens.id."+userId+".view.backup"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + }else{ + bootbox.prompt({ + title: "Give a name to the saving cart:", + value : "Backup of "+moment(new Date()).format('DD-MM-YYYY HH:MM'), + callback : function(result){ + params={ + name:result, + type:"shoppingCart", + totalPrice:shopping.totalCart, + currency:"EUR", + object:shopping.cart + }; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/backup/save", + data: params, + success: function(data){ + if(data.result) { + toastr.success(data.msg); + shopping.cart={countQuantity:0}; + localStorage.removeItem("shoppingCart"); + //if(reload) + urlCtrl.loadByHash("#page.type.citoyens.id."+userId+".view.backup"); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + } + }) + } + }, + restartBackup : function(obj,idBackup){ + shopping.cart=obj; + shopping.cart.backup=idBackup; + shopping.countShoppingCart("init"); + localStorage.setItem("shoppingCart",JSON.stringify(shopping.cart)); + smallMenu.openAjaxHTML( baseUrl+'/'+moduleId+"/person/shoppingcart"); + } +} diff --git a/assets/js/directory.js b/assets/js/directory.js deleted file mode 100644 index 1ee0367704dd2635a140225303d1ab8a20598aac..0000000000000000000000000000000000000000 --- a/assets/js/directory.js +++ /dev/null @@ -1,41 +0,0 @@ -directory.storePanelHtml = function(params){ - if(directory.dirLog) - mylog.log("----------- storePanelHtml",params,params.name); - - str = ""; - str += "<div class='col-lg-3 col-md-4 col-sm-4 col-xs-12 searchEntityContainer "+params.type+params.id+" "+params.type+" "+params.elTagsList+" '>"; - str += "<div class='searchEntity' id='entity"+params.id+"'>"; - - if(typeof userId != "undefined" && params.creator == userId) - params.hash=params.hash+'.view.show'; - str += "<a href='"+params.hash+"' class='container-img-profil lbhp add2fav' data-modalshow='"+params.id+"'>" + - params.imgProfil + - "</a>"; - - str += "<div class='padding-10 informations'>"; - - str += "<div class='entityRight no-padding'>"; - - if(typeof params.name != "undefined" && params.name != "") - str += "<div class='entityName'>" + params.name + "</div>"; - - if(typeof params.description != "undefined" && params.description != "") - str += "<div class='entityDescription'>" + params.description + "</div>"; - str += "</div>"; - str += "<div class='entityRight no-padding price'>"; - str += "<hr class='margin-bottom-10 margin-top-10'>"; - var devise = typeof params.devise != "undefined" ? params.devise : "€"; - if(typeof params.price != "undefined" && params.price != "") - str += "<div class='entityPrice col-md-6'><span class='price-trunc'>"+ Math.trunc(params.price) + "</span> " + devise + "</div>"; - - str += "<a href='"+params.hash+"' class='showMore btn bg-orange text-white lbhp' data-modalshow='"+params.id+"'>"+ - tradTerla.show+" +"+ - "</a>"; - - str += "</div>"; - str += "</div>"; - str += "</div>"; - - str += "</div>"; - return str; -}; \ No newline at end of file diff --git a/assets/js/docs/docs.js b/assets/js/docs/docs.js new file mode 100644 index 0000000000000000000000000000000000000000..f12148310220b46b51a4de8a8be901f91e578c81 --- /dev/null +++ b/assets/js/docs/docs.js @@ -0,0 +1,19 @@ +function initDocJs(faIcon, title){ + setTitle(" La doc : <span class='text-red'><i class='fa fa-"+faIcon+"'></i> "+title+"</span>", "binoculars",title); + + $(".carousel-control").click(function(){ + var top = $("#docCarousel").position().top-30; + $(".my-main-container").animate({ scrollTop: top, }, 100 ); + }); + + $(".btn-carousel-previous").click(function(){ //toastr.success('success!'); mylog.log("CAROUSEL CLICK"); + var top = $("#docCarousel").position().top-30; + $(".my-main-container").animate({ scrollTop: top, }, 100 ); + setTimeout(function(){ $(".carousel-control.left").click(); }, 500); + }); + $(".btn-carousel-next").click(function(){ //toastr.success('success!'); mylog.log("CAROUSEL CLICK"); + var top = $("#docCarousel").position().top-30; + $(".my-main-container").animate({ scrollTop: top, }, 100 ); + setTimeout(function(){ $(".carousel-control.right").click(); }, 500); + }); +} \ No newline at end of file diff --git a/assets/js/dynForm/BCH/prestation.js b/assets/js/dynForm/BCH/prestation.js new file mode 100644 index 0000000000000000000000000000000000000000..0ddfc021fdc398489bc83dfbcdac44f0f8608d73 --- /dev/null +++ b/assets/js/dynForm/BCH/prestation.js @@ -0,0 +1,86 @@ +dynForm = { + jsonSchema : { + title : trad.addOrganization, + icon : "group", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + + if(typeof currentKFormType == "undefined" || currentKFormType == "" || + currentKFormType == "null" || currentKFormType == null){ + currentKFormType = "organization"; + }else{ + $("#ajaxFormModal .typeselect").addClass("hidden"); + } + //console.log("onLoads Sub currentKFormType", currentKFormType, contextData, contextData.id); + var typeName = (typeof currentKFormType != "undefined" && currentKFormType!=null) ? trad["add"+currentKFormType] : elementObj.dynForm.jsonSchema.title; + var typeIcon = (typeof currentKFormType != "undefined" && currentKFormType!=null) ? typeObj[currentKFormType].icon : elementObj.dynForm.jsonSchema.icon; + + + $("#ajax-modal-modal-title").html( + "<i class='fa fa-"+typeIcon+"'></i> "+typeName); + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-red bg-purple bg-green bg-green-poi bg-orange bg-turq bg-yellow bg-url"); + $("#ajax-modal .infocustom p").removeClass("text-dark text-red text-purple text-green text-green-poi text-orange text-turq text-yellow text-url"); + + if(typeof currentKFormType != "undefined" && typeObj[currentKFormType] && typeObj[currentKFormType].color){ + $("#ajax-modal .modal-header").addClass("bg-"+typeObj[currentKFormType].color); + $("#ajax-modal .infocustom p").addClass("text-"+typeObj[currentKFormType].color); + }else{ + $("#ajax-modal .modal-header").addClass("bg-dark"); + $("#ajax-modal .infocustom p").addClass("text-dark"); + } + + if(contextData && contextData.type && contextData.id ){ + //console.log("HERE WE ARE"); + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + + $("#ajax-modal-modal-title").append( + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+ + contextData.name+ + "</span></small>" ); + } + }, + }, + beforeBuild : function(){ + dyFObj.setMongoId('organizations', function(){ + uploadObj.gotoUrl = '#page.type.organizations.id.'+uploadObj.id; + }); + + }, + beforeSave : function(){ + if (typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl ); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-"+typeObj["organization"].color+"'>"+ + //"Faire connaître votre Organisation n'a jamais été aussi simple !<br>" + + tradDynForm["infocreateorganization"]+" ...<hr>" + + "</p>", + }, + name : dyFInputs.name("organization"), + similarLink : dyFInputs.similarLink, + type : dyFInputs.inputSelect(tradDynForm["prestationType"], tradDynForm["prestationType"], pretationsTypes, { required : true }), + role : dyFInputs.inputHidden("admin"), + toModerate : dyFInputs.inputHidden(true), + tags : dyFInputs.tags(), + location : dyFInputs.location, + image : dyFInputs.image(), + email : dyFInputs.text(), + shortDescription : dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }), + url : dyFInputs.inputUrl() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/BCH/product.js b/assets/js/dynForm/BCH/product.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/assets/js/dynForm/action.js b/assets/js/dynForm/action.js new file mode 100644 index 0000000000000000000000000000000000000000..341ce106e65064c08b8afe3017560e91f87615f3 --- /dev/null +++ b/assets/js/dynForm/action.js @@ -0,0 +1,143 @@ +dynForm = { + jsonSchema : { + title : trad.addAction, + icon : "cogs", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + /*"onload" : function(){ + $("#ajaxFormModal #room").val( contextData.room ); + $("#ajax-modal-modal-title").html($("#ajax-modal-modal-title").html()+" dans :<br><small class='text-white'>"+contextData.name+"</small>" ); + },*/ + sub : function(){ //alert("yo"); + + }, + onload : function(data){ + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-turq"); + + if (typeof contextData.name != "undefined" && contextData.name != "") + $("#ajax-modal-modal-title").html($("#ajax-modal-modal-title").html()+"<small class='text-white'><br>" + tradDynForm.inSpace + " : <i class='text-white'>#"+currentRoomName+"</i></small>" ); + + console.log("onload action data", data, "currentRoomId", typeof currentRoomId); + if(typeof currentRoomId != "undefined" && currentRoomId != "") + $("#ajaxFormModal #idParentRoom").val(currentRoomId); + else if(typeof data.idParentRoom != "undefined") + $("#ajaxFormModal #idParentRoom").val(data.idParentRoom); + + if(typeof data.startDate != "undefined"){ + var d = new Date(data.startDate); + var startDate = moment(d).format("DD/MM/YYYY HH:mm"); + console.log("startDate", d, startDate); + $("#ajaxFormModal #startDate").val(startDate); + } + + if(typeof data.endDate != "undefined"){ + d = new Date(data.endDate); + var endDate = moment(d).format("DD/MM/YYYY HH:mm"); + $("#ajaxFormModal #endDate").val(endDate); + }else{ + $("#ajaxFormModal #endDate").val(""); + } + + if(typeof useIdParentResolution != "undefined" && useIdParentResolution == true){ + $("#idParentResolution").val(idParentResolution); + useIdParentResolution = false; + } + } + }, + beforeBuild : function(){ + //dyFObj.setMongoId('actions',function(){}); + }, + beforeSave : function(){ + var dateformat = "DD/MM/YYYY HH:mm"; + var outputFormat="YYYY-MM-DD HH::mm"; + + console.log("TEST DATE TIMEZONE"); + console.log($("#ajaxFormModal #amendementDateEnd").val()); + + $("#ajaxFormModal #startDate").val( moment( $("#ajaxFormModal #startDate").val(), dateformat).format() ); + $("#ajaxFormModal #endDate").val( moment( $("#ajaxFormModal #endDate").val(), dateformat).format() ); + }, + afterSave : function(data){ + if( $('.fine-uploader-manual-trigger').length && $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { + console.log("afterSave action data", data); + dyFObj.closeForm(); + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, data.map.idParentRoom); + setTimeout(function(){ + uiCoop.getCoopData(contextData.type, contextData.id, "action", null, data.id); + }, 1000); + //urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Une Action permet de faire avancer votre projet ou le fonctionnement de votre association</p>", + }, + id : dyFInputs.inputHidden(""), + /*room :{ + inputType : "select", + placeholder : "Choisir un espace", + init : function(){ + if( userId ) + { + /*filling the seclect* / + if(notNull(window.myActionsList)){ + html = buildSelectGroupOptions( window.myActionsList); + $("#room").append(html); + } else { + getAjax( null , baseUrl+"/" + moduleId + "/rooms/index/type/citoyens/id/"+userId+"/view/data/fields/actions" , function(data){ + window.myActionsList = {}; + $.each( data.actions , function( k,v ) { + mylog.log(v.parentType,v.parentId); + if(v.parentType && v.parentType != "cities"){ + if( !window.myActionsList[ v.parentType] ){ + var label = ( v.parentType == "cities" && cpCommunexion && v.parentId.indexOf(cpCommunexion) ) ? cityNameCommunexion : "Thématique des " + trad[v.parentType]; + window.myActionsList[ v.parentType] = {"label":label}; + window.myActionsList[ v.parentType].options = {}; + } + window.myActionsList[v.parentType].options[v['_id']['$id'] ] = v.name; + } + }); + mylog.dir(window.myActionsList); + html = buildSelectGroupOptions(window.myActionsList); + $("#room").append(html); + if(contextData && contextData.room) + $("#ajaxFormModal #room").val( contextData.room ); + } ); + } + } + }, + custom : "<br/><span class='text-small'>Choisir l'espace où s'ajoutera votre action parmi vos organisations et projets<br/>Vous pouvez créer des espaces coopératifs sur votre commune, organisation et projet </span>" + },*/ + idParentRoom : dyFInputs.inputHidden(currentRoomId), + name : dyFInputs.name("action"), + description : dyFInputs.textarea(tradDynForm.longDescription, "..."), + startDate :{ + inputType : "datetime", + label : tradDynForm.startDate, + placeholder : tradDynForm.startDate + }, + endDate :{ + inputType : "datetime", + label : tradDynForm.endDate, + placeholder : tradDynForm.endDate + }, + status: dyFInputs.inputHidden( "todo" ), + idParentResolution: dyFInputs.inputHidden( "" ), + tags : dyFInputs.tags(), + urls : dyFInputs.urls, + email : dyFInputs.inputHidden( ( (userId!=null && userConnected != null) ? userConnected.email : "" ) ), + idUserAuthor: dyFInputs.inputHidden(userId), + //type : dyFInputs.inputHidden( "action" ), + parentId : dyFInputs.inputHidden(contextData.id), + parentType : dyFInputs.inputHidden(contextData.type), + // image : dyFInputs.image() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/addAny.js b/assets/js/dynForm/addAny.js new file mode 100644 index 0000000000000000000000000000000000000000..b2920d25520fdb7398122e8b9e8a44f8a7047a22 --- /dev/null +++ b/assets/js/dynForm/addAny.js @@ -0,0 +1,24 @@ +dynForm = { + jsonSchema : { + title : typeObj.addAny.title, + icon : typeObj.addAny.icon, + noSubmitBtns : true, + properties : { + sectionBtn :{ + label : tradDynForm.what+" ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : typeObj.addAny.sections, + trad : tradCategory, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + dyFObj.openForm($(this).data('key')); + }); + //manage update bulding here + } + }, + + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/addFile.js b/assets/js/dynForm/addFile.js new file mode 100644 index 0000000000000000000000000000000000000000..cb6e6aca6fa796b94c0a3b87431ce6104ab80123 --- /dev/null +++ b/assets/js/dynForm/addFile.js @@ -0,0 +1,46 @@ +dynForm = { + jsonSchema : { + title : tradDynForm.uploadfile, + icon : "file-text-o", + onLoads : { + //pour creer un subevnt depuis un event existant + onload : function(){ + //$("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + // .addClass("bg-orange"); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + } + }, + beforeBuild : function(){ + uploadObj.gotoUrl = location.hash; + uploadObj.contentKey="file"; + uploadObj.set( contextData.type,contextData.id,true); + }, + save : function() { + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-dark'><i class='fa fa-info-circle'></i> "+tradDynForm.infouploadfile+" <hr></p>", + }, + file : dyFInputs.file(), + //newsCreation : dyFInputs.checkbox(false,"newsCreation",{labelText: tradDynForm.sharefilesasnews, onText:tradDynForm.yes, offText:tradDynForm.no,labelInInput:tradDynForm.shareit, inputId: "#createNews"}), + newsCreation : dyFInputs.checkboxSimple("false", "newsCreation", { + labelText: tradDynForm.shareimagesasnews + " ?", + onText:tradDynForm.yes, + offText:tradDynForm.no, + onLabel : tradDynForm.yes, + offLabel: tradDynForm.no, + inputId: "#createNews" + }), + news: dyFInputs.createNews() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/addPhoto.js b/assets/js/dynForm/addPhoto.js new file mode 100644 index 0000000000000000000000000000000000000000..eb0d6b930ba33eaeab109936c935628880f9f2f6 --- /dev/null +++ b/assets/js/dynForm/addPhoto.js @@ -0,0 +1,47 @@ +dynForm = { + jsonSchema : { + title : tradDynForm.addphotos, + icon : "camera", + onLoads : { + //pour creer un subevnt depuis un event existant + onload : function(){ + //$("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + // .addClass("bg-orange"); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-dark"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + } + }, + beforeBuild : function(){ + uploadObj.gotoUrl = location.hash; + uploadObj.contentKey="slider"; + uploadObj.set( contextData.type,contextData.id ); + }, + save : function() { + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-dark'>"+ + tradDynForm.infoaddphoto+" ! <hr>" + + "</p>", + }, + image : dyFInputs.image(), + newsCreation : dyFInputs.checkboxSimple("false", "newsCreation", { + labelText: tradDynForm.shareimagesasnews + " ?", + onText:tradDynForm.yes, + offText:tradDynForm.no, + onLabel : tradDynForm.yes, + offLabel: tradDynForm.no, + inputId: "#createNews" + }), + news: dyFInputs.createNews() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/apps.js b/assets/js/dynForm/apps.js new file mode 100644 index 0000000000000000000000000000000000000000..10b436b666411970515f25e62324f62d507fe0e5 --- /dev/null +++ b/assets/js/dynForm/apps.js @@ -0,0 +1,21 @@ +dynForm = { + jsonSchema : { + title : typeObj.apps.title, + icon : typeObj.apps.icon, + noSubmitBtns : true, + properties : { + sectionBtn :{ + inputType : "tagList", + list : typeObj.apps.sections, + trad : tradCategory, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + urlCtrl.loadByHash($(this).data('key')); + }); + } + }, + + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/bookmark.js b/assets/js/dynForm/bookmark.js new file mode 100644 index 0000000000000000000000000000000000000000..b05762f4f68ad035880e8e8a38dd9a94e1aa57ee --- /dev/null +++ b/assets/js/dynForm/bookmark.js @@ -0,0 +1,44 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addbookmark"], + icon : "bookmark", + type : "object", + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-url"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + if( contextData && contextData.id ) + $("#ajaxFormModal #parentId").val( contextData.id ); + if( contextData && contextData.type ) + $("#ajaxFormModal #parentType").val( contextData.type ); + }, + }, + afterSave : function(){ + dyFObj.closeForm(); + if(location.hash.indexOf("view.library")>0){ + buildNewBreadcrum("bookmarks"); + getViewGallery(1,"","bookmarks"); + }else + urlCtrl.loadByHash( location.hash ); + }, + properties : { + // url : dyFInputs.bookmarkUrl(tradDynForm["linkUrl"], tradDynForm["linkUrl"], { required : true, url : true }), + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm["infocreatebookmark"]+".</p>", + }, + url : dyFInputs.bookmarkUrl(tradDynForm["linkUrl"], tradDynForm["linkUrl"], { required : true, url : true }), + name : dyFInputs.inputText(tradDynForm["titleurl"], tradDynForm["titleurl"], { required : true }), + tags :dyFInputs.tags(), + description : dyFInputs.textarea(tradDynForm["description"], "..."), + index : dyFInputs.inputHidden(), + parentId : dyFInputs.inputHidden(null, { required : true }), + parentType : dyFInputs.inputHidden(null, { required : true }) + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/cities.js b/assets/js/dynForm/cities.js new file mode 100644 index 0000000000000000000000000000000000000000..5cb44042b13bbb6cf70ec8aa23e7802dc87417e6 --- /dev/null +++ b/assets/js/dynForm/cities.js @@ -0,0 +1,25 @@ +dynForm = { + jsonSchema : { + title : "Modifier une ville", + icon : "university", + properties : { + info : { + "inputType" : "custom", + "html":"<p><i class='fa fa-info-circle'></i> Modifier une ville</p>", + }, + id :dyFInputs.inputHidden(), + insee : dyFInputs.inputHidden(null, { required : true }), + name : dyFInputs.name, + country : dyFInputs.inputHidden(null, { required : true }), + level1 : dyFInputs.inputText("Numéro du département", "Numéro du département"), + level1Name : dyFInputs.inputText("Nom du département", "Nom du département"), + region : dyFInputs.inputText("Numéro de la région", "Numéro de la région"), + regionName : dyFInputs.inputText("Nom de la région", "Nom de la région", rules), + latitude : dyFInputs.inputText("Latitude", "Latitude"), + longitude : dyFInputs.inputText("Longitude", "Longitude"), + postalcode : dyFInputs.inputText("postalcode", "postalcode"), + osmid : dyFInputs.inputText("OSM id", "OSM id"), + wikidata : dyFInputs.inputText("wikidata", "wikidata") + } + } +} \ No newline at end of file diff --git a/assets/js/dynForm/classified.js b/assets/js/dynForm/classified.js new file mode 100644 index 0000000000000000000000000000000000000000..2fd8ecdce33ce61ec27661b19f92e19e90e7317f --- /dev/null +++ b/assets/js/dynForm/classified.js @@ -0,0 +1,219 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addclassified"], + icon : "bullhorn", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + if(typeof contextData != "undefined" && contextData != null && contextData.type && contextData.id ){ + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + } + }, + onload : function(data){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-azure"); + + if(data && data.section && data.type && data.subtype ){ + $("#ajaxFormModal #id").val(data.id); + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+data.section+" > "+data.type+" > "+data.subtype+"</h4>" ); + $(".sectionBtntagList").hide(); + $(".typeBtntagList").hide(); + } else + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, #btn-submit-form, .deviseselect").hide(); + + $("#devise").val(deviseDefault); + }, + /*, + loadData : function(data){ + mylog.warn("--------------- loadData ---------------------",data); + $('#ajaxFormModal #name').val(data.name); + $('#ajaxFormModal #type').val(data.type); + $('#ajaxFormModal #parentId').val(data.parentId); + $("#ajaxFormModal #parentType").val( data.parentType ); + },*/ + }, + beforeBuild : function(){ + dyFObj.setMongoId('classified',function(){ + uploadObj.gotoUrl = (contextData != null && contextData.type && contextData.id ) ? "#page.type."+contextData.type+".id."+contextData.id+".view.directory.dir.classified" : location.hash; + }); + }, + beforeSave : function(){ + var tagAndTypes = ( $("#ajaxFormModal #tags").val() != "" ) ? $("#ajaxFormModal #tags").val()+"," : "" ; + + if( $("#ajaxFormModal #section").val() ) + tagAndTypes += $("#ajaxFormModal #section").val(); + if( $("#ajaxFormModal #type").val() ) + tagAndTypes += ","+$("#ajaxFormModal #type").val(); + if( $("#ajaxFormModal #subtype").val() ) + tagAndTypes += ","+$("#ajaxFormModal #subtype").val(); + $("#ajaxFormModal #tags").val( tagAndTypes ); + + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val(userId); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + canSubmitIf : function () { + if( $("#ajaxFormModal #section").val() && $("#ajaxFormModal #type").val() && $("#ajaxFormModal #subtype").val() ) + return true; + else + return false; + }, + actions : { + clear : function() { + + $("#ajaxFormModal #section, #ajaxFormModal #type, #ajaxFormModal #subtype").val(""); + + $(".breadcrumbcustom").html( ""); + $(".sectionBtntagList").show(); + $(".typeBtntagList").hide(); + $(".subtypeSection").html(""); + $(".subtypeSectioncustom").show(); + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").hide(); + $("#btn-submit-form").hide(); + }, + initTypeBtn : function () { + $(".typeBtn").off().on("click",function(){ + + $(".typeBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #type").val( ( $(this).hasClass('active') ) ? $(this).data('key') : "" ); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+"</h4>" ); + $(".typeBtntagList").hide(); + + //$(".typeBtn:not(.active)").hide(); + $("#ajaxFormModal #subtype").val(""); + fieldHTML = ""; + var filt = (classified.currentLeftFilters != null ) ? classified[classified.currentLeftFilters] : classified.filters; + if(filt[ $(this).data('key') ]["subcat"].length >= 1) + { + $.each(filt[ $(this).data('key') ]["subcat"], function(k,v) { + fieldHTML += '<div class="col-md-6 padding-5">'+ + '<a class="btn tagListEl subtypeBtn '+tradCategory[k]+'Btn " data-tag="'+tradCategory[v]+'" data-key="'+v+'" href="javascript:;">'+tradCategory[v]+'</a>' + + "</div>"; + }); + $(".subtypeSection").html('<hr class="col-md-12 no-padding">'+ + '<label class="col-md-12 text-left control-label no-padding" for="typeBtn">'+ + '<i class="fa fa-chevron-down"></i> '+tradDynForm["subcategory"]+ + '</label>' + fieldHTML ); + + $(".subtypeBtn").off().on("click",function() + { + $( ".subtypeBtn" ).removeClass("active"); + $(this).addClass("active"); + $("#ajaxFormModal #subtype").val( ( $(this).hasClass('active') ) ? $(this).data('key') : "" ); + $(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show(); + + if($(".form-group.sectionhidden #section").val() == "donation" || + $(".form-group.sectionhidden #section").val() == "sharing" || + $(".form-group.sectionhidden #section").val() == "lookingfor"){ + $(".pricetext, .deviseselect").hide(); + }else{ + $(".pricetext, .deviseselect").show(); + } + //$(".subtypeBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+ + $(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+" > "+$(".subtypeBtn.active").data('tag')+"</h4>" ); + $(".subtypeSectioncustom").hide(); + dyFObj.canSubmitIf(); + }); + } else { + $(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags, .deviseselect").show(); + } + }); + } + }, + properties : { + info : { + inputType : "custom", + html:"",//<p><i class='fa fa-info-circle'></i> Une Annonce est un élément assez libre qui peut etre géolocalisé ou pas, qui peut etre rataché à tous les éléments.</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + sectionBtn :{ + label : tradDynForm["whichkindofclassified"]+" ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : classified.sections, + trad : tradCategory, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + $(".typeBtntagList").show(); + $(".sectionBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #section").val( ( $(this).hasClass('active') ) ? $(this).data('key') : "" ); + //$(".sectionBtn:not(.active)").hide(); + var sectionKey = $(this).data('key'); + //alert(sectionKey); + var what = { title : tradDynForm["inwhichcategoryforclassified"]+" ?", + icon : classified.sections[sectionKey].icon } + if( jsonHelper.notNull( "classified.sections."+sectionKey+".filters" ) ){ + //alert('build btns menu'+classified.sections[sectionKey].filters); + classified.currentLeftFilters = classified.sections[sectionKey].filters; + var filters = classified[classified.currentLeftFilters]; + directory.sectionFilter( filters, ".typeBtntagList",what,'btn'); + dyFObj.elementObj.dynForm.jsonSchema.actions.initTypeBtn(); + } + else if( classified.currentLeftFilters != null ) { + //alert('rebuild common list'); + directory.sectionFilter( classified.filters, ".typeBtntagList",what,'btn'); + dyFObj.elementObj.dynForm.jsonSchema.actions.initTypeBtn() + classified.currentLeftFilters = null; + } + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(this).data('tag')+"</h4>"); + $(".sectionBtntagList").hide(); + }); + } + }, + section : dyFInputs.inputHidden(), + typeBtn :{ + label : tradDynForm["inwhichcategoryforclassified"]+" ? ", + inputType : "tagList", + placeholder : "Choisir une catégorie", + list : classified.filters, + trad:tradCategory, + init : function(){ + classified.currentLeftFilters = null; + dyFObj.elementObj.dynForm.jsonSchema.actions.initTypeBtn(); + } + }, + type : dyFInputs.inputHidden(), + subtypeSection : { + inputType : "custom", + html:"<div class='subtypeSection'></div>" + }, + subtype : dyFInputs.inputHidden(), + name : dyFInputs.name( "classified" ) , + description : dyFInputs.textarea(tradDynForm.description, "..."), + price : dyFInputs.price(), + devise : dyFInputs.inputSelect(tradDynForm.currency, tradDynForm.indicatethemoneyused, deviseTheme), + image : dyFInputs.image(), + contactInfo : dyFInputs.inputText(tradDynForm.contactinfo, tradDynForm.telemail+" ..."), + location : dyFInputs.location, + tags : dyFInputs.tags(), + parentId : dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/config.js b/assets/js/dynForm/config.js new file mode 100644 index 0000000000000000000000000000000000000000..7c515865a256e2b942066e06b481474686c6ab92 --- /dev/null +++ b/assets/js/dynForm/config.js @@ -0,0 +1,24 @@ +dynForm = { + jsonSchema : { + title : typeObj.config.title, + icon : "cogs", + noSubmitBtns : true, + properties : { + sectionBtn :{ + label : tradDynForm.whichkindofconfig+" ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : typeObj.config.sections, + trad : tradCategory, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + dyFObj.openForm($(this).data('key')); + }); + //manage update bulding here + } + }, + + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/configSections.js b/assets/js/dynForm/configSections.js new file mode 100644 index 0000000000000000000000000000000000000000..5ca15a7e81f3fee9b0fe2a6452eef94660cc4708 --- /dev/null +++ b/assets/js/dynForm/configSections.js @@ -0,0 +1,5 @@ +typeObj.config.sections = { + "sections" : { + "network" : { "label": "Network","key":"network","icon":"map-marker", "col":"network"} + } +}; diff --git a/assets/js/dynForm/contactPoint.js b/assets/js/dynForm/contactPoint.js new file mode 100644 index 0000000000000000000000000000000000000000..040a793c0592bc65ee2db87db1d1f2d0ddeac1ec --- /dev/null +++ b/assets/js/dynForm/contactPoint.js @@ -0,0 +1,41 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addcontact"], + icon : "user", + type : "object", + onLoads : { + //pour creer un contact depuis un element existant + "sub" : function(){ + if( contextData && contextData.id ) + $("#ajaxFormModal #parentId").val( contextData.id ); + if( contextData && contextData.type ) + $("#ajaxFormModal #parentType").val( contextData.type ); + + console.log("input name ? ", $('#ajaxFormModal #name').length); + $('#ajaxFormModal #name').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #email').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #role').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #telephone').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + } + }, + afterSave : function(){ + dyFObj.closeForm(); + urlCtrl.loadByHash(location.hash); + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm["infocreatecontact"]+"</p>", + }, + name : dyFInputs.name("citoyens", {}, true), + similarLink : dyFInputs.similarLink, + email : dyFInputs.text(tradDynForm["mainemail"], "exemple@mail.com"), + role : dyFInputs.inputText(tradDynForm["contactrole"], tradDynForm["contactrole"]), + phone : dyFInputs.inputText(tradDynForm["contactphone"], tradDynForm["contactphone"]), + idContact : dyFInputs.inputHidden(), + parentId :dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + index : dyFInputs.inputHidden() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/document.js b/assets/js/dynForm/document.js new file mode 100644 index 0000000000000000000000000000000000000000..ec2a57fb8f3abf1023e8817d5a922051d8ca31e9 --- /dev/null +++ b/assets/js/dynForm/document.js @@ -0,0 +1,69 @@ +dynForm = { + jsonSchema : { + title : tradDynForm.addinfotodoc, + icon : "camera", + type : "object", + save : function (){ + mylog.log("type : ", $("#ajaxFormModal #type").val()); + var params = { + id : $("#ajaxFormModal #docId").val(), + title : $("#ajaxFormModal #title").val() , + //tags : $("#ajaxFormModal #tags").val().split(","), + //type : $("#ajaxFormModal #type").val(), + //parentId : (contextData.parentId) ? contextData.parentId : contextData.id, + //parentType : (contextData.parentType) ? contextData.parentType : contextData.type + }; + + mylog.dir(params); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/document/update', + data: params, + success: function(data){ + if(data.result){ + //delete window.myActionsList; + //delete window.myVotesList; + toastr.success( "SUCCESS have title !"); + mylog.dir(data); + $("#"+data.data.id).find(".tools-bottom > span").html(data.data.title); + dyFObj.closeForm(); + //uploadObj.gotoUrl = (uploadObj.gotoUrl) ? "#page.type."+params.parentType+".id."+params.parentId+".view.dda.dir."+$("#ajaxFormModal #type").val() +".idda."+ uploadObj.id : location.hash; + //dyFObj.elementObj.dynForm.jsonSchema.afterSave(); + } + else { + toastr.error(data.msg); + } + $.unblockUI(); + }, + dataType: "json" + }); + }, + + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-url"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()); + + //$("#ajaxFormModal #docId").val(); + //if( contextData && contextData.type ) + // $("#ajaxFormModal #parentType").val( contextData.type ); + }, + }, + afterSave : function(data){ + dyFObj.closeForm(); + mylog.dir(data); + //urlCtrl.loadByHash( location.hash ); + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm.infoimages+".</p>", + }, + title : dyFInputs.inputText(tradDynForm.titleimage, tradDynForm.titleimage, { required : true }), + docId : dyFInputs.inputHidden(null, { required : true }), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/entry.js b/assets/js/dynForm/entry.js new file mode 100644 index 0000000000000000000000000000000000000000..74999b5d24737fb9872c8a5ea653d710397dd76e --- /dev/null +++ b/assets/js/dynForm/entry.js @@ -0,0 +1,87 @@ +dynForm = { + jsonSchema : { + title : "Ajouter une proposition", + icon : "gavel", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + onload : function(data){ + dataHelper.activateMarkdown("#ajaxFormModal #message"); + if (typeof contextDataDDA.name != "undefined" && contextDataDDA.name != "") + $("#ajax-modal-modal-title").html($("#ajax-modal-modal-title").html()+" dans :<br><small class='text-white'>"+contextDataDDA.name+"</small>" ); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('survey',function(){}); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').length && $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { + dyFObj.closeForm(); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + properties : { + info : { + inputType : "custom", + html:"<br><p><i class='fa fa-info-circle'></i> Une proposition sert à discuter et demander l'avis d'une communauté sur une idée ou une question donnée</p>", + }, + id : dyFInputs.inputHidden(), + survey :{ + inputType : "select", + label : "Choisir un espace", + init : function(){ + if( userId ) + { + /*filling the seclect*/ + if(notNull(window.myVotesList)){ + html = buildSelectGroupOptions( window.myVotesList); + $("#survey").append(html); + } else { + getAjax( null , baseUrl+"/" + moduleId + "/rooms/index/type/citoyens/id/"+userId+"/view/data/fields/votes" , function(data){ + window.myVotesList = {}; + $.each( data.votes , function( k,v ) + { + parentName = ""; + if(v.parentType != "cities" && !window.myVotesList[ v.parentType]){ + var label = ( v.parentType == "cities" && cpCommunexion && v.parentId.indexOf(cpCommunexion) ) ? cityNameCommunexion : v.parentType; + window.myVotesList[ v.parentType] = {"label":label}; + window.myVotesList[ v.parentType].options = {} + } /*else{ + //if(notNull(myContactsById[v.parentType]) && notNull(myContactsById[v.parentType][v['_id']['$id']])) + //parentName = myContactsById[v.parentType][v['_id']['$id']].name; + }*/ + window.myVotesList[ v.parentType].options[v['_id']['$id'] ] = v.name+parentName; + }); + //run through myContacts to fill parent names + mylog.dir(window.myVotesList); + + html = buildSelectGroupOptions(window.myVotesList); + $("#survey").append(html); + if(contextDataDDA && contextDataDDA.room) + $("#ajaxFormModal #survey").val( contextDataDDA.room ); + } ); + } + /*$("#survey").change(function() { + mylog.dir( $(this).val().split("_")); + });*/ + + } + }, + //custom : "<br/><span class='text-small'>Une thématique est un espace de décision lié à une ville, une organisation ou un projet <br/>Vous pouvez créer des espaces coopératifs sur votre commune, organisation et projet</span>" + }, + name : dyFInputs.name("vote"), + message : dyFInputs.textarea(tradDynForm.longDescription, "..."), + dateEnd : dyFInputs.dateEnd, + tags : dyFInputs.tags(), + image : dyFInputs.image(), + urls : dyFInputs.urls, + email: dyFInputs.inputHidden( ( (userId!=null && userConnected!=null) ? userConnected.email : "") ), + organizer : dyFInputs.inputHidden("currentUser"), + type : dyFInputs.inputHidden("entry") + + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/event.js b/assets/js/dynForm/event.js new file mode 100644 index 0000000000000000000000000000000000000000..1e48d40ef38ecbd5cf0cdce4322164a380fa6806 --- /dev/null +++ b/assets/js/dynForm/event.js @@ -0,0 +1,189 @@ +dynForm = { + jsonSchema : { + title : trad.addEvent, + icon : "calendar", + type : "object", + onLoads : { + onload : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-orange"); + }, + //pour creer un subevnt depuis un event existant + sub : function(){ + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-orange"); + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + + if(contextData && contextData.type == "events"){ + $("#ajaxFormModal #parentId").removeClass('hidden'); + + if( $('#ajaxFormModal #parentId > optgroup > option[value="'+contextData.id+'"]').length == 0 ) + $('#ajaxFormModal #parentId > optgroup[label="events"]').prepend('<option value="'+contextData.id+'" selected>'+tradDynForm["ispartof"]+' : '+contextData.name+'</option>'); + else if ( contextData && contextData.id ){ + $("#ajaxFormModal #parentId").val( contextData.id ); + } + + if ( contextData && typeof contextData.organizerId != "undefined"){ + $("#ajaxFormModal #organizerId").val( contextData.organizerId ); + } + if(contextData && typeof contextData.organizerType != "undefined") + $("#ajaxFormModal #organizerType").val( contextData.organizerType ); + //$("#ajax-modal-modal-title").html($("#ajax-modal-modal-title").html()+" sur "+contextData.name ); + if( contextData && contextData.type ) + $("#ajaxFormModal #parentType").val( contextData.type ); + + if(contextData.startDateDB && contextData.endDateDB){ + $("#ajaxFormModal").after("<input type='hidden' id='startDateParent' value='"+contextData.startDateDB+"'/>"+ + "<input type='hidden' id='endDateParent' value='"+contextData.endDateDB+"'/>"); + $("#ajaxFormModal #startDate").after("<span id='parentstartDate'><i class='fa fa-warning'></i> "+tradDynForm["parentStartDate"]+" : "+ moment( contextData.startDateDB /*,"YYYY-MM-DD HH:mm"*/).format('DD/MM/YYYY HH:mm')+"</span>"); + $("#ajaxFormModal #endDate").after("<span id='parentendDate'><i class='fa fa-warning'></i> "+tradDynForm["parentEndDate"]+" : "+ moment( contextData.endDateDB /*,"YYYY-MM-DD HH:mm"*/).format('DD/MM/YYYY HH:mm')+"</span>"); + } + //alert($("#ajaxFormModal #parentId").val() +" | "+$("#ajaxFormModal #parentType").val()); + } + else { + if( $('#ajaxFormModal #organizerId > optgroup > option[value="'+contextData.id+'"]').length == 0 ) + $('#ajaxFormModal #organizerId').prepend('<option data-type="'+typeObj[contextData.type].ctrl+'" value="'+contextData.id+'" selected>'+tradDynForm["organizedby"]+' : '+contextData.name+'</option>'); + else if( contextData && contextData.id ) + $("#ajaxFormModal #organizerId").val( contextData.id ); + if( contextData && contextData.type ) + $("#ajaxFormModal #organizerType").val( contextData.type); + //alert($("#ajaxFormModal #organizerId").val() +" | "+$("#ajaxFormModal #organizerType").val()); + } + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('events',function(){ + uploadObj.gotoUrl = '#page.type.events.id.'+uploadObj.id; + }); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl); + } + }, + beforeSave : function(){ + if( !$("#ajaxFormModal #allDay").val()) + $("#ajaxFormModal #allDay").val(false); + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + //mylog.log($("#ajaxFormModal #startDate").val(),moment( $("#ajaxFormModal #startDate").val()).format('YYYY/MM/DD HH:mm')); + + //Transform datetime before sending + var allDay = $("#ajaxFormModal #allDay").is(':checked'); + var dateformat = "DD/MM/YYYY"; + var outputFormat="YYYY-MM-DD"; + if (! allDay) { + var dateformat = "DD/MM/YYYY HH:mm"; + var outputFormat="YYYY-MM-DD HH::mm"; + } + // $("#ajaxFormModal #startDate").val( moment( $("#ajaxFormModal #startDate").val(), dateformat).format(outputFormat)); + // $("#ajaxFormModal #endDate").val( moment( $("#ajaxFormModal #endDate").val(), dateformat).format(outputFormat)); + + mylog.log( "HERE", $("#ajaxFormModal #startDate").val(), moment( $("#ajaxFormModal #startDate").val(), dateformat).format() ) ; + $("#ajaxFormModal #startDate").val( moment( $("#ajaxFormModal #startDate").val(), dateformat).format() ); + $("#ajaxFormModal #endDate").val( moment( $("#ajaxFormModal #endDate").val(), dateformat).format() ); + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm["infocreateevent"]+"...</p>", + }, + name : dyFInputs.name("event"), + similarLink : dyFInputs.similarLink, + organizerId :{ + label : tradDynForm["whoorganizedevent"]+" ?", + rules : { required : true }, + inputType : "select", + placeholder : tradDynForm["whoorganize"]+" ?", + rules : { required : true }, + options : firstOptions(), + groupOptions : myAdminList( ["organizations","projects"] ), + init : function(){ + $("#ajaxFormModal #organizerId").off().on("change",function(){ + + var organizerId = $(this).val(); + var organizerType = "notfound"; + if(organizerId == "dontKnow" ) + organizerType = "dontKnow"; + else if( $('#organizerId').find(':selected').data('type') && typeObj[$('#organizerId').find(':selected').data('type')] ) + organizerType = $('#organizerId').find(':selected').data('type'); + else + organizerType = typeObj["person"].col; + + mylog.warn( "organizer",organizerId,organizerType, $('#organizerId').find(':selected').data('type') ); + $("#ajaxFormModal #organizerType").val( organizerType ); + }); + } + }, + organizerType : dyFInputs.inputHidden(), + parentId :{ + label : tradDynForm["ispartofevent"]+" ?", + inputType : "select", + class : "", + placeholder : tradDynForm["ispartofevent"]+" ?", + options : { + "":tradDynForm["noparent"] + }, + "groupOptions" : myAdminList( ["events"] ), + init : function(){ console.log("init ParentId"); + $("#ajaxFormModal #parentId").off().on("change",function(){ + console.log("on change ParentId"); + parentId = $(this).val(); + startDateParent = "2000/01/01 00:00"; + endDateParent = "2100/01/01 00:00"; + if( parentId != "" ){ + //Search in the current context + if (typeof contextData != "undefined" && notNull(contextData)) { + if (contextData.type == "events" && contextData.id == parentId) { + mylog.warn("event found in contextData : ",contextData.startDate+"|"+contextData.endDate); + startDateParent = contextData.startDate; + endDateParent = contextData.endDate + } + } + //Search in my contacts list + if(typeof myContacts != "undefined") { + $.each(myContacts.events,function (i,evObj) { + if( evObj["_id"]["$id"] == parentId){ + mylog.warn("event found in my contact list: ",evObj.startDate+"|"+evObj.endDate); + startDateParent = evObj.startDate; + endDateParent = evObj.endDate + } + }); + } + $("#startDateParent").val(startDateParent); + $("#endDateParent").val(endDateParent); + $("#parentstartDate").html("<i class='fa fa-warning'></i> "+tradDynForm["eventparentStartDate"]+" : "+moment( startDateParent ).format('DD/MM/YYYY HH:mm')); + $("#parentendDate").html("<i class='fa fa-warning'></i> "+tradDynForm["eventparentEndDate"]+" : "+moment( endDateParent ).format('DD/MM/YYYY HH:mm')); + } + }); + } + }, + parentType : dyFInputs.inputHidden(), + type : dyFInputs.inputSelect(tradDynForm["eventTypes"],null,eventTypes, { required : true }), + image : dyFInputs.image( ), + allDay : dyFInputs.allDay(), + startDate : dyFInputs.startDateInput("datetime"), + endDate : dyFInputs.endDateInput("datetime"), + location : dyFInputs.location, + tags : dyFInputs.tags(), + shortDescription : dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }), + formshowers : { + label : tradDynForm["indetails"], + inputType : "custom", + html:"<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".descriptionwysiwyg,.urltext\").slideToggle();activateSummernote(\"#ajaxFormModal #description\");'><i class='fa fa-plus'></i> "+tradDynForm["optiondescrurl"]+"</a>", + }, + url : dyFInputs.inputUrlOptionnel(), + "preferences[publicFields]" : dyFInputs.inputHidden([]), + "preferences[privateFields]" : dyFInputs.inputHidden([]), + "preferences[isOpenData]" : dyFInputs.inputHidden(true), + "preferences[isOpenEdition]" : dyFInputs.inputHidden(true) + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/filter.js b/assets/js/dynForm/filter.js new file mode 100644 index 0000000000000000000000000000000000000000..177f16247ae1efbc788e4ff89052c434a2226813 --- /dev/null +++ b/assets/js/dynForm/filter.js @@ -0,0 +1,37 @@ +dynForm = { + jsonSchema : { + title : typeObj.filter.title, + icon : typeObj.filter.title, + debug:true, + save : function () { + //alert("filter save "+dyFObj.activeModal); + if( typeof typeObj.network.filters == "undefined" ) + typeObj.network.filters = []; + var formData = $("#openModal #ajaxFormModal").serializeFormJSON(); + if(formData.key){ + delete formData.key; + delete formData.collection; + delete formData.id; + } + formData.tags = formData.tags.split(","); + + typeObj.network.filters.push( formData ); + //mylog.log(typeObj.network.filters); + $(".filterList").html(""); + $.each(typeObj.network.filters,function(k,v) { + $(".filterList").append(v.name+" <a href='javascript:;' onclick='typeObj.network.dynForm.removeFilter("+k+")'><i class='fa fa-times text-red'></i> </a><br/>"); + }) + $("#openModal").modal("hide"); + dyFObj.activeModal = "#ajax-modal"; + dyFObj.activeElem = "elementObj"; + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-red'>Les Filtres controle le menu de gauche et les tags que vous voulez présenter aux utilisateurs<hr></p>", + }, + name : dyFInputs.name(), + tags : dyFInputs.tags() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/formContact.js b/assets/js/dynForm/formContact.js new file mode 100644 index 0000000000000000000000000000000000000000..9dda9b3c8da46dc4c16ff5eea2bc8faf3207fdb3 --- /dev/null +++ b/assets/js/dynForm/formContact.js @@ -0,0 +1,58 @@ +dynForm = { + jsonSchema : { + title : "Envoyer un email", + icon : "user", + type : "object", + onLoads : { + //pour creer un contact depuis un element existant + "init" : function(){ + + function filterFormContact() { + $('#ajaxFormModal #emailSender').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #names').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #contentMsg').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $('#ajaxFormModal #subject').filter_input({regex:'[^<>#\"\`/\(|\)/\\\\]'}); + $("#ajaxFormModal #captcha").realperson({length: 4}); + } + + function initRealPerson() { + lazyLoad( themeUrl+"/assets/vendor/jquery_realperson_captcha/jquery.realperson.min.js", + themeUrl+"/assets/vendor/jquery_realperson_captcha/jquery.realperson.css", + filterFormContact, true); + } + + if( notEmpty(userConnected) ) { + if( notEmpty(userConnected.email) ) + $("#ajaxFormModal #emailSender").val( userConnected.email ); + if( notEmpty(userConnected.name) ) + $("#ajaxFormModal #names").val( userConnected.name ); + } + + lazyLoad( themeUrl+"/assets/vendor/jquery_realperson_captcha/jquery.plugin.js",null, initRealPerson, true ); + + } + }, + beforeSave : function(){ + $("#ajaxFormModal #captchaUserVal").val($("#ajaxFormModal #captcha").val()); + $("#ajaxFormModal #captchaHash").val($("#ajaxFormModal #captcha").realperson('getHash')); + }, + afterSave : function(){ + dyFObj.closeForm(); + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Envoyer un mail</p>", + }, + names : dyFInputs.inputText("Nom / Prénom", "Comment vous appelez vous", { required : true }), + emailSender : dyFInputs.inputText("Votre addresse e-mail", "votre addresse e-mail : exemple@mail.com", { required : true, email : true }), + subject : dyFInputs.inputText("Objet de votre message", "C'est à quel sujet", { required : true } ), + contentMsg : dyFInputs.textarea(null, null, { required : true }), + captcha :{ + inputType : "captcha" + }, + captchaUserVal : dyFInputs.inputHidden(), + captchaHash :dyFInputs.inputHidden() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/inputs.js b/assets/js/dynForm/inputs.js new file mode 100644 index 0000000000000000000000000000000000000000..75e380a1a40df7a8c51297db2e93aa5fafd46aaf --- /dev/null +++ b/assets/js/dynForm/inputs.js @@ -0,0 +1,41 @@ +dynForm = { + jsonSchema : { + title : typeObj.config.title, + icon : "cogs", + debug:true, + properties : { + info : { + inputType : "custom", + html:"<p class='text-red'>All DYNFORM existing inputs are all here <hr></p>", + }, + type : dyFInputs.inputHidden(), + name : dyFInputs.name("network"), + "skin[title]" : dyFInputs.name(), + image : dyFInputs.image(), + "request[searchTag]" : dyFInputs.tags(), + tags : dyFInputs.tags(), + description : dyFInputs.textarea(tradDynForm.longDescription, "..."), + startDate :{ + inputType : "datetime", + label : "Date de début", + placeholder : "Date de début" + }, + endDate :{ + inputType : "datetime", + label : "Date de fin", + placeholder : "Date de fin" + }, + urls : dyFInputs.urls, + "result[displayImage]" : dyFInputs.radio( "Display Images ?", { "true" : { icon:"check-circle-o", lbl:trad.yes }, + "false" : { icon:"circle-o", lbl:trad.no} } ), + //keyVal : dyFInputs.keyVal, + /*"linksTag[]" : dyFInputs.subDynform({ + key : dyFInputs.name(), + tagParent : "Type", + "background-color" : "#f5f5f5", + "image" : "Travail.png", + "tags" : dyFInputs.tags(), + }, "multi"),*/ + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/network.js b/assets/js/dynForm/network.js new file mode 100644 index 0000000000000000000000000000000000000000..fe7d8ff5784b695d6477970b65cb5f24006bb003 --- /dev/null +++ b/assets/js/dynForm/network.js @@ -0,0 +1,108 @@ +dynForm = { + removeFilter : function (ix) { + //alert(ix); + typeObj.network.filters.splice( ix, 1 ); + $(".filterList").html(""); + $.each(typeObj.network.filters,function( k,v ) { + $(".filterList").append(v.name+" <a href='javascript:;' onclick='typeObj.network.dynForm.removeFilter("+k+")'><i class='fa fa-times text-red'></i> </a><br/>"); + }) + }, + jsonSchema : { + title : tradDynForm.configNetwork, + icon : "connectdevelop", + type : "object", + //debug : true, + beforeBuild : function(){ + dyFObj.setMongoId('network',function(){ + uploadObj.gotoUrl = location.hash; + }); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { + dyFObj.closeForm(); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + canSubmitIf : function () { + return ( $("#ajaxFormModal #type").val() ) ? true : false ; + }, + formatData : function(formData){ + //alert("formatData"); + if( $(dyFObj.activeModal+" #ajaxFormModal request[searchTag]").val() != "" && formData["request[searchTag]"] ) + formData["request[searchTag]"] = formData["request[searchTag]"].split(","); + if( $(dyFObj.activeModal+" #ajaxFormModal add").val() != "" && formData.add ) + formData.add = formData.add.split(","); + if( typeObj.network.filters ) + formData.filters = typeObj.network.filters; + return formData; + }, + properties : { + breadcrumb : { + inputType : "custom", + html:"<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.openForm(\"filr\")'><i class='fa fa-times'></i></a> NETWORK </h4>", + }, + + "type" : dyFInputs.inputHidden(), + "name" : dyFInputs.name(), + + skinInfo : { + inputType : "custom", + html:"<p class='item-comment bg-green-comment'>SKIN Section<hr></p>", + }, + "skin[title]" : dyFInputs.name(), + "skin[logo]" : dyFInputs.image(), + "skin[paramsLogo][origin]" : dyFInputs.radio( "Logo Origin ?", { "true" : { icon:"check-circle-o", lbl:trad.yes }, + "false" : { icon:"circle-o", lbl:trad.no} } ), + /*dyFInputs.checkboxSimple("true", "skinparamsLogoorigin", + { "onText" : "Oui", + "offText": "Non", + "onLabel" : "on", + "offLabel": "off", + "inputId" : ".skinparamsLogoorigin", + "labelText": "skin params Logo origin ?", + "labelInInput": "Activer les amendements", + "labelInformation": "<i class='fa fa-info-circle'></i> Les votes sont désactivés pendant la période d'amendement" + + }),*/ + + filterInfo : { + inputType : "custom", + html:"<p class='item-comment bg-green-comment'>FILTER Section "+ + "</p>", + }, + "filters[types]" : dyFInputs.radio( "Types ?", { "true" : { icon:"check-circle-o", lbl:trad.yes }, + "false" : { icon:"circle-o", lbl:trad.no} } ), + filterTagsInfo : { + inputType : "custom", + html:"<a href='javascript:;' class='btn btn-dark' onclick='dyFObj.openForm(\"filter\",null,null,true)'><i class='fa fa-plus'></i> Ajouter un Filtre</a>"+ + "<div class='filterList'></div>", + }, + + addInfo : { + inputType : "custom", + html:"<p class='item-comment bg-green-comment'>ADD Section</p>", + }, + add : dyFInputs.tags( ["organization","project","event"] ), + + resultInfo : { + inputType : "custom", + html:"<p class='item-comment bg-green-comment'>RESULT Section</p>", + }, + "result[displayImage]" : dyFInputs.radio( "Display Images ?", { "true" : { icon:"check-circle-o", lbl:trad.yes }, + "false" : { icon:"circle-o", lbl:trad.no} } ), + requestInfo : { + inputType : "custom", + html:"<p class='item-comment bg-green-comment'>REQUEST Section</p>", + }, + "request[searchTag]" : dyFInputs.tags(), + }, + tooltips : { + filterTagsInfo : "CLALALALAL LFGSGSDF\n GFDSG FDSGSD", + "filters[types]" : "CLALALALAL LFGSGSDF\n GFDSG FDSGSD", + add : "XXXX SXKXKKXXOKOXSPOKXSKXSXSXS \n XS XS \n XS XS XS XS" + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/organization.js b/assets/js/dynForm/organization.js new file mode 100644 index 0000000000000000000000000000000000000000..8a566c9db5d57838903f9ce3ce7eb77e4dd4e13b --- /dev/null +++ b/assets/js/dynForm/organization.js @@ -0,0 +1,93 @@ +dynForm = { + jsonSchema : { + title : trad.addOrganization, + icon : "group", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + + if(typeof currentKFormType == "undefined" || currentKFormType == "" || + currentKFormType == "null" || currentKFormType == null){ + currentKFormType = "organization"; + }else{ + $("#ajaxFormModal .typeselect").addClass("hidden"); + } + //console.log("onLoads Sub currentKFormType", currentKFormType, contextData, contextData.id); + var typeName = (typeof currentKFormType != "undefined" && currentKFormType!=null) ? trad["add"+currentKFormType] : elementObj.dynForm.jsonSchema.title; + var typeIcon = (typeof currentKFormType != "undefined" && currentKFormType!=null) ? typeObj[currentKFormType].icon : elementObj.dynForm.jsonSchema.icon; + + + $("#ajax-modal-modal-title").html( + "<i class='fa fa-"+typeIcon+"'></i> "+typeName); + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-red bg-purple bg-green bg-green-poi bg-orange bg-turq bg-yellow bg-url"); + $("#ajax-modal .infocustom p").removeClass("text-dark text-red text-purple text-green text-green-poi text-orange text-turq text-yellow text-url"); + + if(typeof currentKFormType != "undefined" && typeObj[currentKFormType] && typeObj[currentKFormType].color){ + //alert("dyn" + typeObj[currentKFormType].color); + $("#ajax-modal .modal-header").addClass("bg-"+typeObj[currentKFormType].color); + $("#ajax-modal .infocustom p").addClass("text-"+typeObj[currentKFormType].color); + }else{ + $("#ajax-modal .modal-header").addClass("bg-dark"); + $("#ajax-modal .infocustom p").addClass("text-dark"); + } + + if(contextData && contextData.type && contextData.id ){ + //console.log("HERE WE ARE"); + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + + $("#ajax-modal-modal-title").append( + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+ + contextData.name+ + "</span></small>" ); + } + }, + }, + beforeBuild : function(){ + dyFObj.setMongoId('organizations', function(){ + uploadObj.gotoUrl = '#page.type.organizations.id.'+uploadObj.id; + }); + + }, + beforeSave : function(){ + if (typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl ); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-"+typeObj["organization"].color+"'>"+ + //"Faire connaître votre Organisation n'a jamais été aussi simple !<br>" + + tradDynForm["infocreateorganization"]+" ...<hr>" + + "</p>", + }, + name : dyFInputs.name("organization"), + similarLink : dyFInputs.similarLink, + type : dyFInputs.inputSelect(tradDynForm["organizationType"], tradDynForm["organizationType"], organizationTypes, { required : true }), + role : dyFInputs.inputSelect( tradDynForm["yourrole"], + tradDynForm["whichrole"]+" ?", + { admin : trad.administrator, member : trad.Member, creator : trad.justCitizen }, + { required : true } ), + tags : dyFInputs.tags(), + location : dyFInputs.location, + image : dyFInputs.image(), + email : dyFInputs.text(), + shortDescription : dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }), + url : dyFInputs.inputUrl(), + "preferences[publicFields]" : dyFInputs.inputHidden([]), + "preferences[privateFields]" : dyFInputs.inputHidden([]), + "preferences[isOpenData]" : dyFInputs.inputHidden(true), + "preferences[isOpenEdition]" : dyFInputs.inputHidden(true) + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/person.js b/assets/js/dynForm/person.js new file mode 100644 index 0000000000000000000000000000000000000000..b648f2261a51416802762c53a3c054ec1d851127 --- /dev/null +++ b/assets/js/dynForm/person.js @@ -0,0 +1,19 @@ +dynForm = { + jsonSchema : { + title : "Inviter quelqu'un", + icon : "user", + type : "object", + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Si vous voulez inviter quelqu'un à rejoindre Communecter ...</p>", + }, + inviteSearch : dyFInputs.inviteSearch, + /*invitedUserName : dyFInputs.invitedUserName, + invitedUserEmail : dyFInputs.invitedUserEmail,*/ + "preferences[publicFields]" : dyFInputs.inputHidden([]), + "preferences[privateFields]" : dyFInputs.inputHidden([]), + "preferences[isOpenData]" : dyFInputs.inputHidden(false) + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/place.js b/assets/js/dynForm/place.js new file mode 100644 index 0000000000000000000000000000000000000000..70af1352caf7ca9a3ae17bc275a36e38446aa20b --- /dev/null +++ b/assets/js/dynForm/place.js @@ -0,0 +1,160 @@ +dynForm = { + jsonSchema : { + title : "Formulaire d'un Lieu", + icon : "map-marker", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + if(contextData.type && contextData.id ) + { + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + } + }, + onload : function(){ + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").hide(); + }, + }, + beforeSave : function(){ + + var tagAndTypes = ( $("#ajaxFormModal #tags").val() != "" ) ? $("#ajaxFormModal #tags").val()+"," : "" ; + + if( $("#ajaxFormModal #section").val() ) + tagAndTypes += $("#ajaxFormModal #section").val(); + if( $("#ajaxFormModal #type").val() ) + tagAndTypes += ","+$("#ajaxFormModal #type").val(); + if( $("#ajaxFormModal #subtype").val() ) + tagAndTypes += ","+$("#ajaxFormModal #subtype").val(); + $("#ajaxFormModal #tags").val( tagAndTypes ); + + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val( userId ); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('place',function(){ + uploadObj.gotoUrl = '#page.type.places.id.'+uploadObj.id; + }); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl ); + } + }, + actions : { + clear : function() { + + $("#ajaxFormModal #section, #ajaxFormModal #type, #ajaxFormModal #subtype").val(""); + + $(".breadcrumbcustom").html( ""); + $(".sectionBtntagList").show(); + $(".typeBtntagList").hide(); + $(".subtypeSection").html(""); + $(".subtypeSectioncustom").show(); + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").hide(); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Un Point d'interet est un élément assez libre qui peut etre géolocalisé ou pas, qui peut etre rataché à une organisation, un projet ou un évènement.</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + sectionBtn :{ + label : "De quel type de Lieu s'agit-il ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : place.sections, + trad : trad, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + $(".typeBtntagList").show(); + $(".sectionBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #section").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + //$(".sectionBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(this).data('tag')+"</h4>"); + $(".sectionBtntagList").hide(); + }); + } + }, + section : dyFInputs.hidden, + typeBtn :{ + label : "Type de lieu ? ", + inputType : "tagList", + placeholder : "Choisir une catégorie", + list : place.filters, + init : function(){ + $(".typeBtn").off().on("click",function() + { + + $(".typeBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #type").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+"</h4>" ); + $(".typeBtntagList").hide(); + + //$(".typeBtn:not(.active)").hide(); + $("#ajaxFormModal #subtype").val(""); + fieldHTML = ""; + $.each(place.filters[ $(this).data('key') ]["subcat"], function(k,v) { + fieldHTML += '<div class="col-md-6 padding-5">'+ + '<a class="btn tagListEl subtypeBtn '+k+'Btn " data-tag="'+v+'" href="javascript:;">'+v+'</a>' + + "</div>"; + }); + $(".subtypeSection").html('<hr class="col-md-12 no-padding">'+ + '<label class="col-md-12 text-left control-label no-padding" for="typeBtn">'+ + '<i class="fa fa-chevron-down"></i> Sous-catégorie'+ + '</label>' + + fieldHTML ); + + $(".subtypeBtn").off().on("click",function() + { + $( ".subtypeBtn" ).removeClass("active"); + $(this).addClass("active"); + $("#ajaxFormModal #subtype").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + $(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").show(); + //$(".subtypeBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+" > "+$(".subtypeBtn.active").data('tag')+"</h4>" ); + $(".subtypeSectioncustom").hide(); + }); + }); + } + }, + type : dyFInputs.hidden, + subtypeSection : { + inputType : "custom", + html:"<div class='subtypeSection'></div>" + }, + subtype : dyFInputs.hidden, + name : dyFInputs.name("place"), + image : dyFInputs.image( ), + //description : dyFInputs.description, + description : dyFInputs.textarea("Description", "..."), + location : dyFInputs.location, + tags :dyFInputs.tags(), + formshowers : { + label : "En détails", + inputType : "custom", + html: "<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".urlsarray\").slideToggle()'><i class='fa fa-plus'></i> options (urls)</a>", + }, + urls : dyFInputs.urlsOptionnel, + parentId : dyFInputs.hidden, + parentType : dyFInputs.hidden, + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/poi.js b/assets/js/dynForm/poi.js new file mode 100644 index 0000000000000000000000000000000000000000..37cdd4e2979309d788176f28bdfd4e08055c1081 --- /dev/null +++ b/assets/js/dynForm/poi.js @@ -0,0 +1,118 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addpoi"], + icon : "map-marker", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-green-poi"); + + if(contextData.type && contextData.id ) + { + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + } + }, + onload : function(data){ + if(data && data.type){ + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+tradCategory[data.type]+"</h4>"); + $(".sectionBtntagList").hide(); + } else + $(".nametext, .descriptiontextarea, .contactInfotext, .locationlocation, .urlsarray, .imageuploader, .tagstags, #btn-submit-form").hide(); + }, + }, + beforeSave : function(){ + + if( $("#ajaxFormModal #section").val() ) + $("#ajaxFormModal #type").val($("#ajaxFormModal #section").val()); + + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val( userId ); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('poi',function(){ + uploadObj.gotoUrl = (contextData != null && contextData.type && contextData.id ) ? "#page.type."+contextData.type+".id."+contextData.id+".view.directory.dir.poi" : location.hash; + }); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { + dyFObj.closeForm(); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + canSubmitIf : function () { + return ( $("#ajaxFormModal #type").val() ) ? true : false ; + }, + actions : { + clear : function() { + + $("#ajaxFormModal #section, #ajaxFormModal #type, #ajaxFormModal #subtype").val(""); + + $(".breadcrumbcustom").html( ""); + $(".sectionBtntagList").show(); + $(".typeBtntagList").hide(); + $(".subtypeSection").html(""); + $(".subtypeSectioncustom").show(); + $(".nametext, .descriptiontextarea, .contactInfotext, .locationlocation, .urlsarray, .imageuploader, .tagstags, #btn-submit-form").hide(); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-"+typeObj["poi"].color+"'>"+ + tradDynForm["infocreatepoi"]+ + "<hr>"+ + "</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + sectionBtn :{ + label : tradDynForm["whichkindofpoi"]+" ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : poi.sections, + trad : tradCategory, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + $(".typeBtntagList").show(); + $(".sectionBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #type").val( ( $(this).hasClass('active') ) ? $(this).data('key') : "" ); + //$(".sectionBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(this).data('tag')+"</h4>"); + $(".sectionBtntagList").hide(); + $(".nametext, .descriptiontextarea, .contactInfotext, .locationlocation, .urlsarray, .imageuploader, .tagstags").show(); + dyFObj.canSubmitIf(); + }); + } + }, + type : dyFInputs.inputHidden(), + name : dyFInputs.name("poi"), + image : dyFInputs.image(), + //description : dyFInputs.description, + description : dyFInputs.textarea(tradDynForm["description"], "..."), + location : dyFInputs.location, + tags :dyFInputs.tags(), + urls : dyFInputs.urls, + parentId : dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/product.js b/assets/js/dynForm/product.js new file mode 100644 index 0000000000000000000000000000000000000000..8fabaf3241e8182f89e6985eb0bca85aa563d2fc --- /dev/null +++ b/assets/js/dynForm/product.js @@ -0,0 +1,80 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addclassified"], + icon : "bullhorn", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + if(typeof contextData != "undefined" && contextData != null && contextData.type && contextData.id ){ + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-azure"); + $("#ajaxFormModal #toBeValidated").val(true); + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + } + }, + onload : function(data){ + }, + /*, + loadData : function(data){ + mylog.warn("--------------- loadData ---------------------",data); + $('#ajaxFormModal #name').val(data.name); + $('#ajaxFormModal #type').val(data.type); + $('#ajaxFormModal #parentId').val(data.parentId); + $("#ajaxFormModal #parentType").val( data.parentType ); + },*/ + }, + beforeBuild : function(){ + dyFObj.setMongoId('products',function(){ + uploadObj.gotoUrl = (contextData != null && contextData.type && contextData.id ) ? "#page.type."+contextData.type+".id."+contextData.id+".view.directory.dir.classified" : location.hash; + }); + }, + beforeSave : function(){ + var tagAndTypes = ( $("#ajaxFormModal #tags").val() != "" ) ? $("#ajaxFormModal #tags").val()+"," : "" ; + + $("#ajaxFormModal #tags").val( tagAndTypes ); + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val(userId); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + loadProducts(); + //urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + properties : { + info : { + inputType : "custom", + html:"",//<p><i class='fa fa-info-circle'></i> Une Annonce est un élément assez libre qui peut etre géolocalisé ou pas, qui peut etre rataché à tous les éléments.</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + type : dyFInputs.inputHidden(), + price : dyFInputs.price(), + //devise : dyFInputs.inputSelect("Devise", "Iniquez la monnaie utilisée pour votre annonce", ["€", "$"]), + name : dyFInputs.name( "classified" ) , + description : dyFInputs.textarea("Description", "..."), + image : dyFInputs.image(), + medias : dyFInputs.videos, + contactInfo : dyFInputs.inputText(tradDynForm["contactinfo"], tradDynForm["telemail"]+" ..."), + location : dyFInputs.location, + tags : dyFInputs.tags(), + parentId : dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + toBeValidated : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/project.js b/assets/js/dynForm/project.js new file mode 100644 index 0000000000000000000000000000000000000000..2f5de9437fb571d232449546d96cbd4dbc76ecb2 --- /dev/null +++ b/assets/js/dynForm/project.js @@ -0,0 +1,61 @@ +dynForm = { + jsonSchema : { + title : trad.addProject, + icon : "lightbulb-o", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + "sub" : function(){ + $("#ajaxFormModal #parentId").val( contextData.id ); + $("#ajaxFormModal #parentType").val( contextData.type ); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-purple"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('projects', function(){ + uploadObj.gotoUrl = '#page.type.projects.id.'+uploadObj.id; + }); + }, + afterSave : function(urlReload){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ){ + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + } else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl ); + } + }, + beforeSave : function(){ + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + }, + properties : { + info : { + inputType : "custom", + html:"<p class='text-purple'>"+tradDynForm["infocreateproject"]+"<hr>" + + "</p>", + }, + name : dyFInputs.name("project"), + parentType : dyFInputs.inputHidden(), + parentId : dyFInputs.inputHidden(), + image : dyFInputs.image(), + location : dyFInputs.location, + tags :dyFInputs.tags(), + shortDescription : dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }), + formshowers : { + label : tradDynForm["indetails"], + inputType : "custom", + html:"<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".descriptionwysiwyg,.urltext\").slideToggle();activateSummernote(\"#ajaxFormModal #description\");'><i class='fa fa-plus'></i> "+tradDynForm["optiondescrurl"]+"</a>", + }, + url : dyFInputs.inputUrlOptionnel(), + "preferences[publicFields]" : dyFInputs.inputHidden([]), + "preferences[privateFields]" : dyFInputs.inputHidden([]), + "preferences[isOpenData]" : dyFInputs.inputHidden(true), + "preferences[isOpenEdition]" : dyFInputs.inputHidden(true) + } + } + }; \ No newline at end of file diff --git a/assets/js/dynForm/proposal.js b/assets/js/dynForm/proposal.js new file mode 100644 index 0000000000000000000000000000000000000000..ad23550f7a449a6dbd44caf3a5f3634c65c6941c --- /dev/null +++ b/assets/js/dynForm/proposal.js @@ -0,0 +1,260 @@ +dynForm = { + jsonSchema : { + title : trad.addProposal, + icon : "gavel", + type : "object", + onLoads : { + + sub : function(){ + + }, + onload : function(data){ + $("#ajaxFormModal #idParentRoom").val(currentRoomId); + console.log("checkcheck0", data, typeof data, contextData); + + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-turq"); + console.log("dynFormProposal", contextData); + + //dataHelper.activateMarkdown("#ajaxFormModal #message"); + //$("#ajaxFormModal #survey").val( contextData.id ); + if (typeof contextData.name != "undefined" && contextData.name != "") + $("#ajax-modal-modal-title").html($("#ajax-modal-modal-title").html()+"<small class='text-white'><br>" + tradDynForm.inSpace + " : <i class='text-white'>#"+currentRoomName+"</i></small>" ); + + + if(typeof data.amendementActivated != "undefined"){ + data.amendementActivated = (data.amendementActivated == "true" || data.amendementActivated == true) ? true : false; + data.voteActivated = (data.voteActivated == "true" || data.voteActivated == true) ? true : false; + + console.log("checkcheck1", data); + + if(data.amendementActivated == false){ + var idTrue = "#ajaxFormModal .amendementActivatedcheckboxSimple .btn-dyn-checkbox[data-checkval='true']"; + var idFalse = "#ajaxFormModal .amendementActivatedcheckboxSimple .btn-dyn-checkbox[data-checkval='false']"; + + $("#ajaxFormModal #amendementActivated").val("false"); + $("#ajaxFormModal .amendementActivatedcheckboxSimple .btn-dyn-checkbox[data-checkval='false']").trigger( "click" ); + + $(idFalse).addClass("bg-red").removeClass("letter-red"); + $(idTrue).removeClass("bg-green-k").addClass("letter-green"); + + $("#ajaxFormModal .amendementActivatedcheckboxSimple .lbl-status-check").html( + '<span class="letter-red"><i class="fa fa-minus-circle"></i> désactivés</span>'); + + if(typeof params["inputId"] != "undefined") $(params["inputId"]).hide(400); + } + } + + if(typeof data.voteDateEnd != "undefined"){ + var d = new Date(data.voteDateEnd); + var voteDateEnd = moment(d).format("DD/MM/YYYY HH:mm"); + console.log("voteDateEnd", d, voteDateEnd); + $("#ajaxFormModal #voteDateEnd").val(voteDateEnd); + } + + if(typeof data.amendementDateEnd != "undefined"){ + d = new Date(data.amendementDateEnd); + var amendementDateEnd = moment(d).format("DD/MM/YYYY HH:mm"); + $("#ajaxFormModal #amendementDateEnd").val(amendementDateEnd); + }else{ + $("#ajaxFormModal #amendementDateEnd").val(""); + } + + $("#ajaxFormModal .majoritytext").append( + "<small class='pull-left margin-top-5' id='info'><i class='fa fa-info-circle'></i> "+ + tradDynForm.proposalMustHaveMore + "<b>"+ + "50%</b> "+tradDynForm.ofvotes+" <span class='letter-green'>"+tradDynForm.favorables+"</span> "+tradDynForm.tobevalidated + + "</small>"); + + $("#ajaxFormModal #majority").val("50"); + $('#ajaxFormModal #majority').filter_input({regex:'^(0|[1-9][0-9]*)$'}); + + $('#ajaxFormModal #majority').keyup (function(){ + var strval = $(this).val(); + var intval = strval != "" ? parseInt(strval) : 0; + console.log("intval1", intval); + if(intval > 100) + $("#ajaxFormModal .majoritytext small#info").html( + "<i class='fa fa-info-circle'></i> "+ tradDynForm.nowayover100); + + if(intval < 50) + $("#ajaxFormModal .majoritytext small#info").html( + "<i class='fa fa-info-circle'></i> "+ tradDynForm.nowayunder50); + + if(intval >= 50 && intval <= 100) + $("#ajaxFormModal .majoritytext small#info").html( + "<i class='fa fa-info-circle'></i> "+tradDynForm.proposalMustHaveMore+" <b>"+ + intval + "%</b> "+tradDynForm.ofvotes+" <span class='letter-green'>"+tradDynForm.favorables+"</span> "+tradDynForm.tobevalidated); + }); + + $('#ajaxFormModal #majority').focusout (function(){ + var strval = $(this).val(); + var intval = strval != "" ? parseInt(strval) : 0; + console.log("intval1", intval); + if(intval > 100) intval = 100; + if(intval < 50) intval = 50; + console.log("intval2", intval); + $('#ajaxFormModal #majority').val(intval); + $("#ajaxFormModal .majoritytext small#info").html( + "<i class='fa fa-info-circle'></i> "+tradDynForm.proposalMustHaveMore+" <b>"+ + intval + "%</b> "+tradDynForm.ofvotes+" <span class='letter-green'>"+tradDynForm.favorables+"</span> "+tradDynForm.tobevalidated); + }); + + } + }, + beforeSave : function(){ + if($("#ajaxFormModal #amendementActivated").val() == "true"){ + $("#ajaxFormModal #status").val("amendable"); + } + else if($("#ajaxFormModal #voteActivated").val() == "true"){ + $("#ajaxFormModal #status").val("tovote"); + } + console.log("beforeSave", $("#ajaxFormModal #voteActivated").val(), $("#ajaxFormModal #status").val()); + + var dateformat = "DD/MM/YYYY HH:mm"; + var outputFormat="YYYY-MM-DD HH::mm"; + + //console.log("TEST DATE TIMEZONE"); + //console.log($("#ajaxFormModal #amendementDateEnd").val()); + $("#ajaxFormModal #amendementDateEnd").val( moment( $("#ajaxFormModal #amendementDateEnd").val(), dateformat).format() ); + //console.log($("#ajaxFormModal #amendementDateEnd").val()); + + $("#ajaxFormModal #voteDateEnd").val( moment( $("#ajaxFormModal #voteDateEnd").val(), dateformat).format() ); + }, + afterSave : function(data){ + if( $('.fine-uploader-manual-trigger').length && $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { + dyFObj.closeForm(); + var oldCount = $("li.sub-proposals a.load-coop-data[data-status='"+data.map.status+"'] .badge").html(); + console.log("data success save proposal", data); + $("li.sub-proposals a.load-coop-data[data-status='"+data.map.status+"'] .badge").html(parseInt(oldCount)+1); + + if(typeof data.map.idParentRoom != "undefined"){ + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, data.map.idParentRoom); + setTimeout(function(){ + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, data.id); + }, 1000); + }else{ + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, currentRoomId); + setTimeout(function(){ + uiCoop.getCoopData(contextData.type, contextData.id, "proposal", null, idParentProposal); + }, 1000); + } + } + }, + properties : { + info : { + inputType : "custom", + html:"<br><p><i class='fa fa-info-circle'></i> "+tradDynForm.infoProposal3+"</p>", + }, + id : dyFInputs.inputHidden(), + idParentRoom : dyFInputs.inputHidden(currentRoomId), + /*idParentRoom :{ + inputType : "select", + label : "Choisir un espace", + init : function(){ + if( userId ) + { + /*filling the seclect* / + if(notNull(window.myVotesList)){ + html = buildSelectGroupOptions( window.myVotesList); + $("#survey").append(html); + } else { + getAjax( null , baseUrl+"/" + moduleId + "/rooms/index/type/citoyens/id/"+userId+"/view/data/fields/votes" , function(data){ + window.myVotesList = {}; + $.each( data.votes , function( k,v ) + { + parentName = ""; + if(!window.myVotesList[ v.parentType]){ + var label = ( v.parentType == "cities" && cpCommunexion && v.parentId.indexOf(cpCommunexion) ) ? cityNameCommunexion : v.parentType; + window.myVotesList[ v.parentType] = {"label":label}; + window.myVotesList[ v.parentType].options = {} + } /*else{ + //if(notNull(myContactsById[v.parentType]) && notNull(myContactsById[v.parentType][v['_id']['$id']])) + //parentName = myContactsById[v.parentType][v['_id']['$id']].name; + }* / + window.myVotesList[ v.parentType].options[v['_id']['$id'] ] = v.name+parentName; + }); + //run through myContacts to fill parent names + mylog.dir(window.myVotesList); + + html = buildSelectGroupOptions(window.myVotesList); + $("#survey").append(html); + if(contextData && contextData.id) + $("#ajaxFormModal #survey").val( contextData.id ); + } ); + } + /*$("#survey").change(function() { + mylog.dir( $(this).val().split("_")); + });* / + + } + }, + //custom : "<br/><span class='text-small'>Une thématique est un espace de décision lié à une ville, une organisation ou un projet <br/>Vous pouvez créer des espaces coopératifs sur votre commune, organisation et projet</span>" + },*/ + title : dyFInputs.name("proposal", { required : false }), + description : dyFInputs.textarea(tradDynForm.textproposal, "..."), + infoargs : { + inputType : "custom", + html:"<div class='text-left'><b><i class='fa fa-info-circle'></i> "+tradDynForm.infoProposal1+"</b>"+ + "<br>"+tradDynForm.infoProposal2+"</i></div>", + }, + arguments : dyFInputs.textarea(tradDynForm.textargumentsandmore, "..."), + amendementActivated : dyFInputs.checkboxSimple("true", "amendementActivated", + { "onText" : trad.yes, + "offText": trad.no, + "onLabel" : trad.activated, + "offLabel": trad.disabled, + "inputId" : ".amendementDateEnddatetime", + "labelText": tradDynForm.lblAmmendementEnabled + " ?", + "labelInInput": tradDynForm.lblAmmendementEnabled, + "labelInformation": "<i class='fa fa-info-circle'></i> "+ + tradDynForm.lblAmmendementDisabled + }), + amendementDateEnd : dyFInputs.amendementDateEnd, + voteActivated : dyFInputs.inputHidden( true ), + voteDateEnd : dyFInputs.voteDateEnd, + majority: dyFInputs.inputText( trad.ruleOfMajority + " (%) <small class='letter-green'>"+trad.giveValueMajority+"</small>", "50%" ), + + voteAnonymous : dyFInputs.checkboxSimple("true", "voteAnonymous", + { "onText" : trad.yes, + "offText": trad.no, + "onLabel" : tradDynForm.anonymous, + "offLabel": tradDynForm.nominative, + //"inputId" : ".amendementDateEnddatetime", + "labelText": tradDynForm.voteAnonymous + " ?", + //"labelInInput": "Activer les amendements", + "labelInformation": "<i class='fa fa-info-circle'></i> " + tradDynForm.keepSecretIdentityVote + + }), + + voteCanChange : dyFInputs.checkboxSimple("true", "voteCanChange", + { "onText" : trad.yes, + "offText": trad.no, + "onLabel" : tradDynForm.changeVoteEnabled, + "offLabel": tradDynForm.changeVoteForbiden, + //"inputId" : ".amendementDateEnddatetime", + "labelText": tradDynForm.authorizeChangeVote, + //"labelInInput": "Activer les amendements", + "labelInformation": "<i class='fa fa-info-circle'></i> " + tradDynForm.allowChangeVote + + }), + + + tags : dyFInputs.tags(), + //image : dyFInputs.image(), + urls : dyFInputs.urls, + //email: dyFInputs.inputHidden( ( (userId!=null && userConnected!=null) ? userConnected.email : "") ), + //idUserAuthor : dyFInputs.inputHidden( ( (userId!=null && userConnected!=null) ? userId : "") ), + status: dyFInputs.inputHidden( "amendable" ), + //canModify: dyFInputs.inputHidden( true ), + parentId : dyFInputs.inputHidden(contextData.id), + parentType : dyFInputs.inputHidden(contextData.type), + //organizer : dyFInputs.inputHidden("currentUser"), + //type : dyFInputs.inputHidden("entry") + + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/ressource.js b/assets/js/dynForm/ressource.js new file mode 100644 index 0000000000000000000000000000000000000000..0219786aa1c0cee3ef322c33bc618e68897c02b2 --- /dev/null +++ b/assets/js/dynForm/ressource.js @@ -0,0 +1,159 @@ +dynForm = { + jsonSchema : { + title : "Formulaire d'un ressource", + icon : "map-marker", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + if(contextData.type && contextData.id ) + { + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + } + }, + onload : function(){ + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").hide(); + }, + }, + beforeSave : function(){ + + var tagAndTypes = ( $("#ajaxFormModal #tags").val() != "" ) ? $("#ajaxFormModal #tags").val()+"," : "" ; + + if( $("#ajaxFormModal #section").val() ) + tagAndTypes += $("#ajaxFormModal #section").val(); + if( $("#ajaxFormModal #type").val() ) + tagAndTypes += ","+$("#ajaxFormModal #type").val(); + if( $("#ajaxFormModal #subtype").val() ) + tagAndTypes += ","+$("#ajaxFormModal #subtype").val(); + $("#ajaxFormModal #tags").val( tagAndTypes ); + + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val( userId ); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('ressource', function(){ + uploadObj.gotoUrl = '#page.type.ressource.id.'+uploadObj.id; + }); + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( uploadObj.gotoUrl ); + } + }, + actions : { + clear : function() { + + $("#ajaxFormModal #section, #ajaxFormModal #type, #ajaxFormModal #subtype").val(""); + + $(".breadcrumbcustom").html( ""); + $(".sectionBtntagList").show(); + $(".typeBtntagList").hide(); + $(".subtypeSection").html(""); + $(".subtypeSectioncustom").show(); + $(".typeBtntagList, .nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").hide(); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Un Point d'interet est un élément assez libre qui peut etre géolocalisé ou pas, qui peut etre rataché à une organisation, un projet ou un évènement.</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + sectionBtn :{ + label : "De quel type de ressource s'agit-il ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : ressource.sections, + trad : trad, + init : function(){ + $(".sectionBtn").off().on("click",function() + { + $(".typeBtntagList").show(); + $(".sectionBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #section").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + //$(".sectionBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(this).data('tag')+"</h4>"); + $(".sectionBtntagList").hide(); + }); + } + }, + section : dyFInputs.inputHidden(), + typeBtn :{ + label : "Type de ressource ? ", + inputType : "tagList", + placeholder : "Choisir une catégorie", + list : ressource.filters, + init : function(){ + $(".typeBtn").off().on("click",function() + { + + $(".typeBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #type").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+"</h4>" ); + $(".typeBtntagList").hide(); + + //$(".typeBtn:not(.active)").hide(); + $("#ajaxFormModal #subtype").val(""); + fieldHTML = ""; + $.each(ressource.filters[ $(this).data('key') ]["subcat"], function(k,v) { + fieldHTML += '<div class="col-md-6 padding-5">'+ + '<a class="btn tagListEl subtypeBtn '+k+'Btn " data-tag="'+v+'" href="javascript:;">'+v+'</a>' + + "</div>"; + }); + $(".subtypeSection").html('<hr class="col-md-12 no-padding">'+ + '<label class="col-md-12 text-left control-label no-padding" for="typeBtn">'+ + '<i class="fa fa-chevron-down"></i> Sous-catégorie'+ + '</label>' + + fieldHTML ); + + $(".subtypeBtn").off().on("click",function() + { + $( ".subtypeBtn" ).removeClass("active"); + $(this).addClass("active"); + $("#ajaxFormModal #subtype").val( ( $(this).hasClass('active') ) ? $(this).data('tag') : "" ); + $(".nametext, .descriptiontextarea, .pricetext, .contactInfotext, .locationlocation, .imageuploader, .formshowerscustom, .tagstags").show(); + //$(".subtypeBtn:not(.active)").hide(); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(".sectionBtn.active").data('tag')+" > "+$(".typeBtn.active").data('tag')+" > "+$(".subtypeBtn.active").data('tag')+"</h4>" ); + $(".subtypeSectioncustom").hide(); + }); + }); + } + }, + type : dyFInputs.inputHidden(), + subtypeSection : { + inputType : "custom", + html:"<div class='subtypeSection'></div>" + }, + subtype : dyFInputs.inputHidden(), + name : dyFInputs.name("ressource"), + image : dyFInputs.image(), + description : dyFInputs.textarea("Description", "..."), + location : dyFInputs.location, + tags :dyFInputs.tags(), + formshowers : { + label : "En détails", + inputType : "custom", + html: "<a class='btn btn-default text-dark w100p' href='javascript:;' onclick='$(\".urlsarray\").slideToggle()'><i class='fa fa-plus'></i> options (urls)</a>", + }, + urls : dyFInputs.urlsOptionnel, + parentId : dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/room.js b/assets/js/dynForm/room.js new file mode 100644 index 0000000000000000000000000000000000000000..474f2665cb40d5103ebdac6521a1c47096f547ed --- /dev/null +++ b/assets/js/dynForm/room.js @@ -0,0 +1,133 @@ +dynForm = { + jsonSchema : { + title : tradDynForm.addroom, + icon : "connectdevelop", + type : "object", + /* save : function (){ + mylog.log("type : ", $("#ajaxFormModal #type").val()); + var params = { + email : userConnected.email , + id : uploadObj.id, + name : $("#ajaxFormModal #name").val() , + tags : $("#ajaxFormModal #tags").val().split(","), + topic : $("#ajaxFormModal #topic").val(), + description : $("#ajaxFormModal #description").val(), + parentId : (contextData.parentId) ? contextData.parentId : contextData.id, + parentType : (contextData.parentType) ? contextData.parentType : contextData.type + }; + + mylog.dir(params); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/rooms/saveroom', + data: params, + success: function(data){ + if(data.result){ + delete window.myActionsList; + delete window.myVotesList; + toastr.success( "SUCCESS saving Room !"); + mylog.log("DATA RES"); + mylog.dir(data); + //uploadObj.gotoUrl = (uploadObj.gotoUrl) ? "#page.type."+params.parentType+".id."+params.parentId+".view.dda.dir."+$("#ajaxFormModal #type").val() +".idda."+ uploadObj.id : location.hash; + dyFObj.elementObj.dynForm.jsonSchema.afterSave(); + uiCoop.getCoopData(params.parentType, params.parentId, "room"); + uiCoop.getCoopData(params.parentType, params.parentId, "room", null, data.newInfos.id); + } + else { + toastr.error(data.msg); + } + $.unblockUI(); + }, + dataType: "json" + }); + },*/ + onLoads : { + sub : function(){ + uploadObj.gotoUrl = "tmp"; + }, + onload : function(data){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-turq"); + // if(data && data.type){ + // $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+tradCategory[data.type]+"</h4>"); + // $(".sectionBtntagList").hide(); + // } else + // $(".nametext, .imageuploader, .tagstags, #btn-submit-form").hide(); + } + }, + beforeBuild : function(){ + dyFObj.setMongoId('actionRooms',function(){}); + }, + afterSave : function(data){ + /*if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else + { */ + console.log("RES CREATE ROOM :", data); + dyFObj.closeForm(); + uiCoop.getCoopData(data.map.parentType, data.map.parentId, "room"); + setTimeout(function(){ + uiCoop.getCoopData(data.map.parentType, data.map.parentId, "room", null, data.id); + }, 1000); + + //uiCoop.getCoopData(contextData.type, contextData.id, "room", null, uploadObj.id); + //urlCtrl.loadByHash( uploadObj.gotoUrl ); + /*}*/ + }, + canSubmitIf : function () { + return ( $("#ajaxFormModal #type").val() ) ? true : false ; + }, + actions : { + clear : function() { + + $("#ajaxFormModal #section, #ajaxFormModal #type").val(""); + + $(".breadcrumbcustom").html( ""); + $(".sectionBtntagList").show(); + $(".nametext, .imageuploader, .tagstags, #btn-submit-form").hide(); + } + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm.infocreateRoom+".</p>", + }, + parentId : dyFInputs.inputHidden(contextData.id), + parentType : dyFInputs.inputHidden(contextData.type), + status : dyFInputs.inputHidden("open"), + /*breadcrumb : { + inputType : "custom", + html:"", + },*/ + /*sectionBtn :{ + label : tradDynForm.whichkindofroom+" ? ", + inputType : "tagList", + placeholder : "Choisir un type", + list : roomList.sections, + trad : tradCategory, + init : function(){ //console.log("LIST ROOM TYPE", roomList); + $(".sectionBtn").off().on("click",function() + { + $(".typeBtntagList").show(); + $(".sectionBtn").removeClass("active btn-dark-blue text-white"); + $( "."+$(this).data('key')+"Btn" ).toggleClass("active btn-dark-blue text-white"); + $("#ajaxFormModal #type").val( $(this).data('key') ); + + $(".breadcrumbcustom").html( "<h4><a href='javascript:;'' class='btn btn-xs btn-danger' onclick='dyFObj.elementObj.dynForm.jsonSchema.actions.clear()'><i class='fa fa-times'></i></a> "+$(this).data('tag')+"</h4>"); + $(".sectionBtntagList").hide(); + $(".nametext, .imageuploader, .tagstags").show(); + dyFObj.canSubmitIf(); + }); + } + },*/ + //type : dyFInputs.inputHidden(), + + name : dyFInputs.name("room"), + //topic : dyFInputs.inputText("Sujet traité", "..."), + description : dyFInputs.textarea(tradDynForm.description, "..."), + roles : dyFInputs.tags(rolesList, tradDynForm["addroles"] , tradDynForm["limitAccessRole"]), + // image : dyFInputs.image(), + //tags : dyFInputs.tags() + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/service.js b/assets/js/dynForm/service.js new file mode 100644 index 0000000000000000000000000000000000000000..c1fd02c942079cb01d0b78028160359287d1a87f --- /dev/null +++ b/assets/js/dynForm/service.js @@ -0,0 +1,82 @@ +dynForm = { + jsonSchema : { + title : "Add a services", + icon : "sun-o", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + sub : function(){ + if(typeof contextData != "undefined" && contextData != null && contextData.type && contextData.id ){ + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-azure"); + $("#ajaxFormModal #toBeValidated").val(true); + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + } + }, + onload : function(data){ + }, + /*, + loadData : function(data){ + mylog.warn("--------------- loadData ---------------------",data); + $('#ajaxFormModal #name').val(data.name); + $('#ajaxFormModal #type').val(data.type); + $('#ajaxFormModal #parentId').val(data.parentId); + $("#ajaxFormModal #parentType").val( data.parentType ); + },*/ + }, + beforeBuild : function(){ + dyFObj.setMongoId('services',function(){ + uploadObj.gotoUrl = location.hash; + }); + }, + beforeSave : function(){ + var tagAndTypes = ( $("#ajaxFormModal #tags").val() != "" ) ? $("#ajaxFormModal #tags").val()+"," : "" ; + + $("#ajaxFormModal #tags").val( tagAndTypes ); + if( typeof $("#ajaxFormModal #description").code === 'function' ) + $("#ajaxFormModal #description").val( $("#ajaxFormModal #description").code() ); + if($('#ajaxFormModal #parentId').val() == "" && $('#ajaxFormModal #parentType').val() ){ + $('#ajaxFormModal #parentId').val(userId); + $("#ajaxFormModal #parentType").val( "citoyens" ); + } + }, + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + //loadProducts(); + urlCtrl.loadByHash( (uploadObj.gotoUrl) ? uploadObj.gotoUrl : location.hash ); + } + }, + properties : { + info : { + inputType : "custom", + html:"",//<p><i class='fa fa-info-circle'></i> Une Annonce est un élément assez libre qui peut etre géolocalisé ou pas, qui peut etre rataché à tous les éléments.</p>", + }, + breadcrumb : { + inputType : "custom", + html:"", + }, + type : dyFInputs.inputSelect(tradDynForm.servicesTypes,null,servicesList, { required : true }), + name : dyFInputs.name( "service" ) , + price : dyFInputs.price(), + //devise : dyFInputs.inputSelect("Devise", "Iniquez la monnaie utilisée pour votre annonce", ["€", "$"]), + capacity : dyFInputs.quantity(), + openingHours : dyFInputs.openingHours(true), + description : dyFInputs.textarea("Description", "..."), + image : dyFInputs.image(), + medias : dyFInputs.videos, + contactInfo : dyFInputs.inputText(tradDynForm.contactinfo, tradDynForm["telemail"]+" ..."), + location : dyFInputs.location, + tags : dyFInputs.tags(), + parentId : dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + //toBeValidated : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/siteurl.js b/assets/js/dynForm/siteurl.js new file mode 100644 index 0000000000000000000000000000000000000000..272d824355b2df129c504920fc6ec8e98f41ac3b --- /dev/null +++ b/assets/js/dynForm/siteurl.js @@ -0,0 +1,30 @@ +dynForm = { + jsonSchema : { + title : "Point of interest Form", + icon : "map-marker", + type : "object", + onLoads : { + //pour creer un subevnt depuis un event existant + subPoi : function(){ + if(contextData.type && contextData.id ){ + $('#ajaxFormModal #parentId').val(contextData.id); + $("#ajaxFormModal #parentType").val( contextData.type ); + } + } + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> Une url.</p>", + }, + urls : dyFInputs.urls, + type : dyFInputs.inputSelect("Type du point d'intérêt", null, poiTypes), + name : dyFInputs.name, + description : dyFInputs.descriptionOptionnel , + location : dyFInputs.location, + tags : dyFInputs.tags(), + parentId :dyFInputs.inputHidden(), + parentType : dyFInputs.inputHidden(), + } + } +}; \ No newline at end of file diff --git a/assets/js/dynForm/url.js b/assets/js/dynForm/url.js new file mode 100644 index 0000000000000000000000000000000000000000..bec28997803d12d8e5e5d4546deb1276009fd777 --- /dev/null +++ b/assets/js/dynForm/url.js @@ -0,0 +1,38 @@ +dynForm = { + jsonSchema : { + title : tradDynForm["addurl"], + icon : "link", + type : "object", + onLoads : { + sub : function(){ + $("#ajax-modal .modal-header").removeClass("bg-dark bg-purple bg-red bg-azure bg-green bg-green-poi bg-orange bg-yellow bg-blue bg-turq bg-url") + .addClass("bg-url"); + + $("#ajax-modal-modal-title").html( + $("#ajax-modal-modal-title").html()+ + " <br><small class='text-white'>"+tradDynForm["speakingas"]+" : <span class='text-dark'>"+contextData.name+"</span></small>" ); + + if( contextData && contextData.id ) + $("#ajaxFormModal #parentId").val( contextData.id ); + if( contextData && contextData.type ) + $("#ajaxFormModal #parentType").val( contextData.type ); + }, + }, + afterSave : function(){ + dyFObj.closeForm(); + urlCtrl.loadByHash( location.hash ); + }, + properties : { + info : { + inputType : "custom", + html:"<p><i class='fa fa-info-circle'></i> "+tradDynForm["infocreateurl"]+".</p>", + }, + title : dyFInputs.inputText(tradDynForm["name"], tradDynForm["titleurl"], { required : true }), + url : dyFInputs.inputText(tradDynForm["linkUrl"], tradDynForm["linkUrl"], { required : true, url : true }), + type : dyFInputs.inputSelect(tradDynForm["urltype"], tradDynForm["choosetype"], urlTypes, { required : true }), + index : dyFInputs.inputHidden(), + parentId : dyFInputs.inputHidden(null, { required : true }), + parentType : dyFInputs.inputHidden(null, { required : true }) + } + } +}; \ No newline at end of file diff --git a/assets/js/element.js b/assets/js/element.js new file mode 100644 index 0000000000000000000000000000000000000000..94c14926f497a39b94031cc35fe3c15ebea0726a --- /dev/null +++ b/assets/js/element.js @@ -0,0 +1,261 @@ +/* ********************************* + EVENTS +********************************** */ +function runEventFormValidation(el) { + mylog.log("runEventFormValidation"); + var formEvent = $('.form-event'); + var errorHandler2 = $('.errorHandler', formEvent); + var successHandler2 = $('.successHandler', formEvent); + + formEvent.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + eventCountry : { + required : true + }, + eventName : { + minlength : 2, + required : true + }, + postalCode : { + rangelength : [5, 5], + required : true + }, + city : { + required : true + }, + eventStartDate : { + required : true + }, + eventEndDate : { + required : true + } + }, + messages : { + eventName : "* Please specify the name of the event", + postalCode : "* Please specify the postal code", + eventCountry : "* Please specify the country", + city : "* Please specify the city", + }, + invalidHandler : function(event, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + mylog.log("success"); + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + mylog.log("submitHandler"); + successHandler2.show(); + errorHandler2.hide(); + + var startDateSubmit = moment($(".form-event .event-start-date").val()).format('YYYY/MM/DD HH:mm'); + var endDateSubmit = moment($(".form-event .event-end-date").val()).format('YYYY/MM/DD HH:mm'); + + newEvent = new Object; + newEvent.allDay = $(".form-event .all-day").bootstrapSwitch('state'); + newEvent.name = $(".form-event .event-name ").val(); + newEvent.type = $(".form-event .event-categories option:checked").val(); + newEvent.startDate = startDateSubmit; + newEvent.endDate = endDateSubmit; + newEvent.description = $(".form-event .eventDetail ").val(); + //newEvent.userId = "<?php echo Yii::app() ->session['userId'] ?>"; + newEvent.postalCode = $(".form-event #postalCode ").val(); + newEvent.streetAddress = $(".form-event #fullStreet ").val(); + newEvent.city = $(".form-event #city ").val(); + newEvent.cityName = $(".form-event #cityName").val(); + newEvent.country = $(".form-event #eventCountry ").val(); + newEvent.organizerId = $(".form-event #newEventOrgaId").val(); + newEvent.organizerType = $(".form-event #newEventOrgaType").val(); + newEvent.geoPosLatitude = $(".form-event #geoPosLatitude").val(); + newEvent.geoPosLongitude = $(".form-event #geoPosLongitude").val(); + newEvent.tags = $(".form-event #tagsEvent").val(); + if( $("#newEventParentId").val() ) + newEvent.parentId = $("#newEventParentId").val(); + + mylog.log("newEvent"); + mylog.dir(newEvent); + $.blockUI( { message : '<span class="homestead"><i class="fa fa-spinner fa-circle-o-noch"></i> Save Processing ...</span>' }); + + $.ajax( + { + type: "POST", + url: baseUrl+"/"+moduleId+'/event/save', + dataType : "json", + data:newEvent, + type:"POST", + }) + .done(function (data) + { + $.unblockUI(); + if (data && data.result) { + toastr.success("Event Created success"); + $("#newEventId").val(data.id["$id"]); + mylog.log(data); + addFloopEntity(data.id["$id"], "events", data.event); + urlCtrl.loadByHash("#event.detail.id."+data.id["$id"]); + + } else { + toastr.error(data.msg); + } + }); + } + }); +}; + +/* ********************************* + PROJECTS +********************************** */ + +function runProjectFormValidation(el) { + var formProject = $('.form-project'); + var errorHandler2 = $('.errorHandler', formProject); + var successHandler2 = $('.successHandler', formProject); + formProject.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + projectName : { + minlength : 2, + required : true + }, + projectStartDate : { + required : true, + date : true + }, + projectEndDate : { + required : true, + date : true + }, + postalCode : { + rangelength : [5, 5], + required : true, + validPostalCode : true + } + }, + messages : { + projectName : "Please specify the name" + + }, + invalidHandler : function(project, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + successHandler2.show(); + errorHandler2.hide(); + + startDateSubmitProj = moment($(".form-project .project-start-date").val()).format('YYYY/MM/DD HH:mm'); + endDateSubmitProj = moment($(".form-project .project-end-date").val()).format('YYYY/MM/DD HH:mm'); + + newProject = new Object; + newProject.name = $(".form-project .project-name ").val(), + newProject.parentType=parentType, + newProject.parentId=parentId + newProject.startDate=startDateSubmitProj, + newProject.endDate=endDateSubmitProj, + newProject.city=$(".form-project #city").val(), + newProject.cityName=$(".form-project #cityName").val(), + newProject.streetAddress=$(".form-project #fullStreet").val(), + newProject.postalCode=$(".form-project #postalCode").val(), + newProject.description=$(".form-project .project-description").val(), + newProject.geoPosLatitude = $(".form-project #geoPosLatitude").val(), + newProject.geoPosLongitude = $(".form-project #geoPosLongitude").val(), + newProject.tags = $(".form-project #tagsProject").val(); + mylog.log(newProject); + $.blockUI({ + message : '<span class="homestead"><i class="fa fa-spinner fa-circle-o-noch"></i> <?php echo Yii::t("common","Save Processing") ?> ...</span>' + }); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/project/save', + dataType: "json", + data: newProject, + type: "POST", + }) + .done(function (data) { + if (data && data.result) { + toastr.success("Project created successfully"); + $.unblockUI(); + //mylog.dir(data); + addFloopEntity(data.id.$id, "projects", newProject); + urlCtrl.loadByHash("#project.detail.id."+data.id.$id); + } else { + $.unblockUI(); + toastr.error(data.msg); + } + }); + } + }); +}; + + +/* +Element + type : poi + $res = Element::insert($_POST, $id,$type); +Projects + $res = Project::insert($_POST, $id,$type); + self::getAndCheckProject($params, Yii::app() -> session["userId"]); + PHDB::insert(self::COLLECTION,$newProject); +Orga + //POST to element + $newOrganization = Organization::newOrganizationFromPost($_POST); + Rest::json(Organization::insert($newOrganization, Yii::app()->session["userId"])); + $newOrganization = Organization::getAndCheckOrganization($organization); +Event + $res = Event::saveEvent($_POST); + $newEvent = self::getAndCheckEvent($params); +Person */ \ No newline at end of file diff --git a/assets/js/floopDrawerRight.js b/assets/js/floopDrawerRight.js new file mode 100644 index 0000000000000000000000000000000000000000..0b985fdceafd0ffdeab8ec42ad540faa63f13a94 --- /dev/null +++ b/assets/js/floopDrawerRight.js @@ -0,0 +1,293 @@ +/* + Pour info, depuis qu'on utilise le nouveau design Tango + on utilise aussi le floopDrawerRight.js + floopDrawer.js n'est plus utilisé +*/ + +//liste des types à afficher avec leurs icons +var floopContactTypes = [ { name : "projects", color: "purple" , icon:"lightbulb-o" }, + { name : "events", color: "orange" , icon:"calendar" }, + { name : "people", color: "yellow" , icon:"user" }, + { name : "organizations", color: "green" , icon:"group" }]; + +var openPanelType = { "people" : "citoyens", + "organizations" : "organizations", + "projects" : "projects", + "events" : "events", + }; + +var tooltips_lbl = { "people" : "Ajouter quelqu'un à votre répertoire.", + "organizations" : "Créer une nouvelle organisation", + "projects" : "Créer un nouveau projet", + "projectsHistory" : trad.showhideoldprojects, + "events" : "Créer un nouvel événement", + "eventsHistory" : trad.showhideoldevents, + }; + +var floopTypeUsed = new Array(); +var floopShowLock = false; +var timeoutShowFloopDrawer = false; + +var floopContacts; + +function getFloopContacts(){ return floopContacts; } + +function buildListContactHtml(contacts, myId){ + + floopContacts = contacts; + + var HTML = '<div class="floopHeader bg-white">'+ + //'<a href="#person.directory.id.'+userId+'?tpl=directory2" '+ + // 'class="text-white pull-left lbh" style="color:white !important;">'+ + //t("My directory")+ + '<i class="fa fa-link pull-left text-dark" style="margin-right:15px;margin-top:4px;"></i> '+ + //'</a>'+ + '<div id="floopScrollByType" class="pull-left"></div>' + + '<button id="btnFloopClose"><i class="fa fa-times"></i></button>' + + + '</div>'; + HTML += '<div class="floopScroll">' ; + + $.each(floopContactTypes, function(key, type){ + + var n=0; + //compte le nombre d'élément à afficher + $.each(contacts[type.name], function(key2, value){ n++; }); + //si aucun élément, on affiche pas cette section + //if(n > 0){ + var urlBtnAdd = ""; + if(type.name == "people") urlBtnAdd = "dyFObj.openForm( 'person')"; + if(type.name == "organizations") urlBtnAdd = "dyFObj.openForm( 'organization')"; + if(type.name == "events") urlBtnAdd = "dyFObj.openForm( 'event')"; + if(type.name == "projects") urlBtnAdd = "dyFObj.openForm( 'project')"; + + floopTypeUsed.push(type); + + HTML += '<div class="panel panel-default" id="scroll-type-'+type.name+'"> '+ + '<div class="panel-heading">'; + HTML += '<h4 class="text-'+type.color+'">'+ + //'<button onclick="'+urlBtnAdd+'" class="tooltips btn btn-default btn-sm pull-right btn_shortcut_add bg-'+type.color+'" data-placement="left" data-original-title="'+tooltips_lbl[type.name]+'">'+ + // '<i class="fa fa-search"></i>'+ + //'</button>' + + '<i class="fa fa-'+type.icon+'"></i> <span class="">'+trad['my'+type.name]+"</span>"; + if(myId != ""){ + //HTML += '<button onclick="'+urlBtnAdd+'" class="tooltips btn btn-default btn-sm pull-right btn_shortcut_add text-'+type.color+'" data-placement="left" data-original-title="'+tooltips_lbl[type.name]+'">'+ + // '<i class="fa fa-plus"></i>'+ + // '</button>'; + if (type.name == "events" || type.name == "projects") { + HTML += '<button onclick="showHideOldElements(\''+type.name+'\')" class="tooltips btn btn-default btn-sm pull-right btn_shortcut_add text-'+type.color+'" data-placement="left" data-original-title="'+tooltips_lbl[type.name+'History']+'">'+ + '<i class="fa fa-history"></i>'+ + '</button>'; + } + } + HTML += '</h4>'+ + '</div>'+ + '<div class="panel-body no-padding">'+ + '<div class="list-group no-padding">'+ + '<ul id="floopType-'+type.name+'">'; + if($(contacts[type.name]).size() == 0){ + HTML += '<label class="no-element"><i class="fa fa-angle-right"></i> Aucun élément</label>'; + } + $.each(contacts[type.name], function(key2, value){ + HTML += getFloopItem(key2, type, value); + }); + HTML += '</ul>' + + '</div>'+ + '</div>'+ + '</div>'; + }); + HTML += '</div>' + + '</div>'+ + '</div>' + + '</div>'; + HTML += '<i class="fa fa-search" style="padding:15px 0px 15px 11px;"></i><input type="text" id="search-contact" class="form-control" placeholder="'+trad.searchnamepostalcity+'">'; + + + return HTML; +} + + +//création HTML d'un élément +function getFloopItem(id, type, value){ + var oldElement = isOldElement(value); + + var cp = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.postalCode != "undefined") ? value.address.postalCode : typeof value.cp != "undefined" ? value.cp : ""; + var city = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.addressLocality != "undefined") ? value.address.addressLocality : ""; + defaultImg=type.name; + if(defaultImg=="people") + defaultImg="citoyens"; + var profilThumbImageUrl = (typeof value.profilThumbImageUrl != "undefined" && value.profilThumbImageUrl != "") ? baseUrl + value.profilThumbImageUrl : assetPath + "/images/thumb/default_"+defaultImg+".png"; + var id = (typeof value._id != "undefined" && typeof value._id.$id != "undefined") ? value._id.$id : id; + var path = "#page.type."+openPanelType[type.name]+".id."+id; + var elementClass = oldElement ? "oldFloopDrawer"+type.name : ""; + var elementStyle = oldElement ? "display:none" : ""; + + var HTML = '<li style="'+elementStyle+'" class="'+elementClass+'" id="floopItem-'+type.name+'-'+id+'">' + + '<a href="'+path+'" class="btn btn-default btn-scroll-type btn-select-contact lbh" id="contact'+id+'">' + + '<div class="btn-chk-contact" idcontact="'+id+'">' + + '<img src="'+ profilThumbImageUrl+'" class="thumb-send-to bg-'+type.color+'" height="35" width="35">'+ + '<span class="info-contact">' + + '<span class="name-contact text-dark text-bold" idcontact="'+id+'">' + value.name + '</span>'+ + '<br/>'+ + '<span class="cp-contact text-light" idcontact="'+id+'">' + cp + ' </span>'+ + '<span class="city-contact text-light" idcontact="'+id+'">' + city + '</span>'+ + '</span>' + + '</div>' + + '</a>' + + '</li>'; + return HTML; +} + +var translation = { + "My people" : "Mes contacts", + "My organizations" : "Mes organisations", + "My projects" : "Mes projets", + "My events" : "Mes événements", + "My directory" : "Mon répertoire", + "Search name, postal code, city ..." : "nom, code postal, ville ..." +} + +function t(string){ + if(typeof translation[string] != "undefined"){ + return translation[string]; + }else { return string; } +} +function showFloopDrawer(show){ + if(show){ + if($(".floopDrawer" ).css("display") == "none"){ + $(".floopDrawer").stop().show(); + $(".floopDrawer" ).css("width", 0); + $(".floopDrawer" ).animate( { width: 300 }, 300 ); + } + }else{ + $(".floopDrawer").hide("fast"); + } +} +function getFloopContactTypes(type){ + var goodType = null; + $.each(floopContactTypes, function(key, value){ + if(value.name == type) { + goodType = value; + } + }); + return goodType; +} + + +function bindEventFloopDrawer(){ + + $(".floopDrawer #search-contact").keyup(function(){ + filterFloopDrawer($(this).val()); + }); + + //parcourt tous les types de contacts + $.each(floopContactTypes, function(key, type){ + //initialise le scoll automatique de la liste de contact + $(".floopHeader #btn-scroll-type-"+type.name).mouseover(function(){ + + //var width = $(this).width(); + //$("#floopDrawerDirectory").css({left:width}); + //showFloopDrawer(true); + var scrollTOP = $('.floopScroll').scrollTop() - $('.floopScroll').position().top + + $(".floopScroll #scroll-type-"+type.name).position().top; + $('.floopScroll').scrollTop(scrollTOP); + }); + }); + + + $("#ajaxSV,#menu-top-container").mouseenter(function() { + if(!floopShowLock) + showFloopDrawer(false); + }); + $(".floopDrawer, .floopDrawer #search-contact").mouseover(function() { + showFloopDrawer(true); + }); + $(".menuIcon.no-floop-item, .box-add, .blockUI, .mapCanvas").mouseover(function() { + if(!floopShowLock) + showFloopDrawer(false); + }); + +} + +function initFloopScrollByType(){ + var HTML = ""; + $.each(floopTypeUsed, function(key, value){ + var type = value.name; //openPanelType[value.name]; + HTML += "<a href='javascript:' id='btn-scroll-type-"+type+"' class='bg-"+value.color+" btn-scroll-type'><i class='fa fa-"+value.icon+"'></i></button>"; + }); + $("#floopScrollByType").html(HTML); +} + + +//recherche text par nom, cp et city +function filterFloopDrawer(searchVal){ + //masque/affiche tous les contacts présents dans la liste + if(searchVal != "") $(".floopDrawer .btn-select-contact").hide(); + else $(".floopDrawer .btn-select-contact").show(); + //recherche la valeur recherché dans les 3 champs "name", "cp", et "city" + $.each($(".floopDrawer .name-contact"), function() { checkFloopSearch($(this), searchVal); }); + $.each($(".floopDrawer .cp-contact"), function() { checkFloopSearch($(this), searchVal); }); + $.each($(".floopDrawer .city-contact"), function() { checkFloopSearch($(this), searchVal); }); +} + +//si l'élément contient la searchVal, on l'affiche +function checkFloopSearch(thisElement, searchVal, type){ + var content = thisElement.html(); + var found = content.search(new RegExp(searchVal, "i")); + if(found >= 0){ + var id = thisElement.attr("idcontact"); + $(".floopDrawer #contact"+id).show(); + } +} + +//ajout d'un élément dans la liste +function addFloopEntity(entityId, entityType, entityValue){ + //Exception with citoyens collection which is managed like people in display + if(entityType == "citoyens") entityType = "people"; + + floopContacts[entityType].push(entityValue); + + var type = getFloopContactTypes(entityType); + //mylog.log("getFloopContactTypes", entityType, type); + + //We check if the element is already displayed + if($('#floopItem-'+type.name+'-'+entityId).length < 1){ + var html = getFloopItem(entityId, type, entityValue); + $("ul#floopType-"+entityType).prepend(html); + } + + $("ul#floopType-"+entityType+" .no-element").hide(); + floopShowLock = true; + showFloopDrawer(true); + + setTimeout(function(){ + if ($('.floopScroll').position().top != null ) { + var scrollTOP = $('.floopScroll').scrollTop() - $('.floopScroll').position().top + + $(".floopScroll #scroll-type-"+entityType).position().top; + $('.floopScroll').scrollTop(scrollTOP); + } + }, 1000); + + timeoutShowFloopDrawer = setTimeout(function(){ + floopShowLock = false; + showFloopDrawer(false); + clearTimeout(timeoutShowFloopDrawer); + }, 4000); + //toastr.success("ajout de l'element floop ok"); +} + +//ajout d'un élément dans la liste +function removeFloopEntity(entityId, entityType){ + $('#floopItem-'+entityType+'-'+entityId).remove(); +} + +function showHideOldElements(type) { + $(".oldFloopDrawer"+type).toggle("slow"); +} + +// Return true if the endDate of the Element is before the current Date. +function isOldElement(value) { + var endDate = (typeof value["endDate"] != undefined) ? value["endDate"] : ""; + if (endDate == "") return false; + return new Date(endDate) < new Date(); +} diff --git a/assets/js/images/btn_go_home.png b/assets/js/images/btn_go_home.png new file mode 100644 index 0000000000000000000000000000000000000000..48843a6af5e57c01a421d911066a4595629a1a65 Binary files /dev/null and b/assets/js/images/btn_go_home.png differ diff --git a/assets/js/images/ico_filter_pseudo.png b/assets/js/images/ico_filter_pseudo.png new file mode 100644 index 0000000000000000000000000000000000000000..1637baafb4774205c483763c9b47c3c48ef399ad Binary files /dev/null and b/assets/js/images/ico_filter_pseudo.png differ diff --git a/assets/js/images/reload.png b/assets/js/images/reload.png new file mode 100644 index 0000000000000000000000000000000000000000..87eef3d6f31e6977cf4b407dc4ee161574e553ee Binary files /dev/null and b/assets/js/images/reload.png differ diff --git a/assets/js/interoperability/interoperability.js b/assets/js/interoperability/interoperability.js new file mode 100644 index 0000000000000000000000000000000000000000..6f613248890809dc9f14704989a6aad99ad1cde2 --- /dev/null +++ b/assets/js/interoperability/interoperability.js @@ -0,0 +1,903 @@ + +function getGeoShapeForOsm(geoShape) { + + city_geoShape = []; + + $.each(geoShape.coordinates, function( index, value ) { + + $.each(value, function(index2, value2) { + city_geoShape.push(value2[1], value2[0]); + }); + }); + + res = city_geoShape.join(" "); + return res; +} + +function getGeofilterPolygon(geoShape) { + + city_geoShape = []; + + if (geoShape.type == "Polygon") { + + $.each(geoShape.coordinates, function(index, value) { + $.each(value, function(index2, value2) { + city_geoShape.push("("+value2[1], value2[0]+")"); + }); + }); + res = city_geoShape.join(","); + } else if (geoShape.type == "MultiPolygon") { + + $.each(geoShape.coordinates, function(index, value) { + $.each(value, function(index2, value2) { + $.each(value, function(index3, value3) { + city_geoShape.push("("+value2[1], value2[0]+")"); + }); + }); + }); + res = city_geoShape.join(","); + } + + mylog.log('LE NOUVEAU GEOSHAPE', res); + return res; +} + +function getListTagsCity(all_data) { + + list_tags = []; + + $.each(all_data,function(index, value) { + $.each(value.tags, function(index2, value2) { + if (list_tags.indexOf(index2) == -1) { + list_tags.push(index2); + } + }); + }); + + return list_tags; +} + +function changeValueSelectByTheme() { + + theme_array = getThemeArray(); + + $.each(theme_array, function(index, value) { + if (searchTags == index) { + $.each(value, function(index2, value2) { + $("#tags_value").append( + '<option value="'+value2+'">'+value2+'</option>' + ); + icon = getIcon(value2); + $("#ajax-modal-modal-title").append( + "<div id='btn_"+value2+"' class='col-md-4 padding-5 sectionBtnC forrent'>"+ + "<a class='btn tagListEl btn-select-type-anc sectionBtn forrentBtn' data-tag='"+value2+"' data-key='forrent'><i class='fa fa-"+icon+" fa-2x'></i><br/>"+value2+ + "</a>"+ + "</div>" + ); + putEventOnResultButton(value2); + }); + } + }); +} + +function changeValueSelectByThemeForActivity() { + + $("#all_activity").html(' '); + + $("#all_activity").append( + "<div id='btn_all_activity' class='col-xs-offset-4 col-md-4 padding-5 sectionBtnC forrent'>"+ + "<a class='btn tagListEl btn-select-type-anc sectionBtn forrentBtn' data-tag='all_activity' data-key='forrent'><i class='fa fa-exclamation-circle fa-2x'></i><br/>Afficher tout le secteur d'activité"+ + "</a>"+ + "</div>" + ); + + $("#btn_all_activity").off().on('click', function(e){ + $("#select_activity").val("-1"); + $("#activity_elected_div").html("TOUT LE SECTEUR D'ACTIVITE<br/>"); + getOpendatasoftItem(limit,0); + }); + + $.each(activity_array, function(index, value) { + if (searchTags == index) { + $.each(value, function(index2, value2) { + icon = getIcon(value2); + + value_sans_spec = value2; + value_sans_spec = value_sans_spec.replace(/\'/g, "_SQUOTE_"); + value_sans_spec = value_sans_spec.replace(/ /g, "_SPACE_"); + value_sans_spec = value_sans_spec.replace(/\./g, "_DOT_"); + value_sans_spec = value_sans_spec.replace(/\&/g, "_AND_"); + value_sans_spec = value_sans_spec.replace(/\(/g, "_PAR-OUVRANT_"); + value_sans_spec = value_sans_spec.replace(/\)/g, "_PAR-FERMANT_"); + value_sans_spec = value_sans_spec.replace(/\,/g, "_VIRGULE_"); + + $("#select_activity").append("<option value='"+value_sans_spec+"'>"+value2+"</option>"); + + $("#all_activity").append( + "<div id='btn_"+value_sans_spec+"' class='col-md-6 padding-5 sectionBtnC forrent'>"+ + "<a class='btn tagListEl btn-select-type-anc sectionBtn forrentBtn' data-tag='"+value_sans_spec+"' data-key='forrent'><i class='fa fa-"+icon+" fa-2x'></i><br/>"+value2+ + "</a>"+ + "</div>" + ); + putEventOnResultButtonForActivity(value_sans_spec); + }); + } + }); +} + +function putEventOnResultButton(value) { + + $("#btn_"+value+"").off().on('click', function(e){ + $("#tags_value").val(value); + $('#tag_value_selected').html("Tag choisi : "+value+"<br/>"); + }); +} + +function putEventOnResultButtonForActivity(activity) { + + $("#btn_"+activity+"").off().on('click', function(e){ + value_with_spec = activity.replace(/_SPACE_/g, " "); + value_with_spec = activity.replace(/_DOT_/g, "."); + value_with_spec = activity.replace(/_AND_/g, "&"); + value_with_spec = activity.replace(/_PAR-OUVRANT_/g, "("); + value_with_spec = activity.replace(/_PAR-FERMANT_/g, ")"); + value_with_spec = activity.replace(/_SQUOTE_/g, "'"); + value_with_spec = activity.replace(/_VIRGULE_/g, ","); + $("#select_activity").val(activity); + $("#activity_selected_div").html("<h2>Activité selectionné : "+value_with_spec+"<br/></h3>"); + getOpendatasoftItem(limit,0); + }); + +} + +function getThemeArray() { + + theme_array = {}; + + theme_array["commun"] = []; + + theme_array["déchets"] = []; + theme_array["déchets"].push("waste_basket"); + theme_array["déchets"].push("recycling"); + theme_array["déchets"].push("waste_disposal"); + theme_array["déchets"].push("waste_transfert_station"); + + theme_array["agriculture,alimentation"] = []; + theme_array["agriculture,alimentation"].push("restaurant"); + theme_array["agriculture,alimentation"].push("pub"); + theme_array["agriculture,alimentation"].push("fast_food"); + theme_array["agriculture,alimentation"].push("bar"); + theme_array["agriculture,alimentation"].push("bbq"); + theme_array["agriculture,alimentation"].push("biergarten"); + theme_array["agriculture,alimentation"].push("cafe"); + theme_array["agriculture,alimentation"].push("food_court"); + theme_array["agriculture,alimentation"].push("ice_cream"); + theme_array["agriculture,alimentation"].push("marketplace"); + + theme_array["santé"] = []; + theme_array["santé"].push("doctors"); + theme_array["santé"].push("pharmacy"); + theme_array["santé"].push("veterinary"); + theme_array["santé"].push("hospital"); + theme_array["santé"].push("baby_hatch"); + theme_array["santé"].push("clinic"); + theme_array["santé"].push("nursing_home"); + theme_array["santé"].push("social_facility"); + + theme_array["aménagement,transport,construction"] = []; + theme_array["aménagement,transport,construction"].push("bicycle_parking"); + theme_array["aménagement,transport,construction"].push("bicycle_repair_station"); + theme_array["aménagement,transport,construction"].push("bicycle_rental"); + theme_array["aménagement,transport,construction"].push("boat_sharing"); + theme_array["aménagement,transport,construction"].push("bus_station"); + theme_array["aménagement,transport,construction"].push("car_rental"); + theme_array["aménagement,transport,construction"].push("car_sharing"); + theme_array["aménagement,transport,construction"].push("car_wash"); + theme_array["aménagement,transport,construction"].push("charging_station"); + theme_array["aménagement,transport,construction"].push("fuel"); + theme_array["aménagement,transport,construction"].push("ferry_terminal"); + theme_array["aménagement,transport,construction"].push("grit_bin"); + theme_array["aménagement,transport,construction"].push("motorcycle_parking"); + theme_array["aménagement,transport,construction"].push("parking"); + theme_array["aménagement,transport,construction"].push("parking_entrance"); + theme_array["aménagement,transport,construction"].push("parking_space"); + theme_array["aménagement,transport,construction"].push("taxi"); + theme_array["aménagement,transport,construction"].push("bench"); + theme_array["aménagement,transport,construction"].push("clock"); + theme_array["aménagement,transport,construction"].push("courthouse"); + theme_array["aménagement,transport,construction"].push("coworking_space"); + theme_array["aménagement,transport,construction"].push("crematorium"); + theme_array["aménagement,transport,construction"].push("crypt"); + theme_array["aménagement,transport,construction"].push("dive_centre"); + theme_array["aménagement,transport,construction"].push("dojo"); + theme_array["aménagement,transport,construction"].push("embassy"); + theme_array["aménagement,transport,construction"].push("fire_station"); + theme_array["aménagement,transport,construction"].push("game_feeding"); + theme_array["aménagement,transport,construction"].push("grave_yard"); + theme_array["aménagement,transport,construction"].push("hunting_stand"); + theme_array["aménagement,transport,construction"].push("photo_booth"); + theme_array["aménagement,transport,construction"].push("place_of_worship"); + theme_array["aménagement,transport,construction"].push("police"); + theme_array["aménagement,transport,construction"].push("post_box"); + theme_array["aménagement,transport,construction"].push("post_office"); + theme_array["aménagement,transport,construction"].push("prison"); + theme_array["aménagement,transport,construction"].push("ranger_station"); + theme_array["aménagement,transport,construction"].push("shelter"); + theme_array["aménagement,transport,construction"].push("shower"); + theme_array["aménagement,transport,construction"].push("table"); + theme_array["aménagement,transport,construction"].push("telephone"); + theme_array["aménagement,transport,construction"].push("toilets"); + theme_array["aménagement,transport,construction"].push("townhall"); + theme_array["aménagement,transport,construction"].push("vending_machine"); + theme_array["aménagement,transport,construction"].push("watering_place"); + theme_array["aménagement,transport,construction"].push("water_point"); + + theme_array["éducation,petite Enfance"] = []; + theme_array["éducation,petite Enfance"].push("school"); + theme_array["éducation,petite Enfance"].push("university"); + theme_array["éducation,petite Enfance"].push("college"); + theme_array["éducation,petite Enfance"].push("kindergarten"); + theme_array["éducation,petite Enfance"].push("childcare"); + theme_array["éducation,petite Enfance"].push("music_school"); + theme_array["éducation,petite Enfance"].push("driving_school"); + theme_array["éducation,petite Enfance"].push("language_school"); + + theme_array["citoyenneté"] = []; + + theme_array["ess,economie social solidaire"] = []; + theme_array["ess,economie social solidaire"].push("atm"); + theme_array["ess,economie social solidaire"].push("bank"); + theme_array["ess,economie social solidaire"].push("bureau_de_change"); + theme_array["ess,economie social solidaire"].push("social_centre"); + theme_array["ess,economie social solidaire"].push("animal_shelter"); + theme_array["ess,economie social solidaire"].push("rescue_station"); + + theme_array["energie,climat"] = []; + + theme_array["culture,animation"] = []; + theme_array["culture,animation"].push("theatre"); + theme_array["culture,animation"].push("cinema"); + theme_array["culture,animation"].push("library"); + theme_array["culture,animation"].push("arts_centre"); + theme_array["culture,animation"].push("brothel"); + theme_array["culture,animation"].push("stripclub"); + theme_array["culture,animation"].push("swingerclub"); + theme_array["culture,animation"].push("casino"); + theme_array["culture,animation"].push("community_centre"); + theme_array["culture,animation"].push("fountain"); + theme_array["culture,animation"].push("gambling"); + theme_array["culture,animation"].push("nightclub"); + theme_array["culture,animation"].push("planetarium"); + theme_array["culture,animation"].push("studio"); + + theme_array["biodiversité"] = []; + + theme_array["numérique,tic,internet"] = []; + theme_array["numérique,tic,internet"].push("internet_cafe"); + + return theme_array; +} + +function getActivityArray() { + + activity_array = {}; + + activity_array["commun"] = []; + activity_array["commun"].push("Autres organisations fonctionnant par adhésion volontaire"); + + activity_array["déchets"] = []; + + activity_array["agriculture,alimentation"] = []; + activity_array["agriculture,alimentation"].push("Culture de céréales (sf riz) légumineuses, graines oléagineuses"); + activity_array["agriculture,alimentation"].push("Restauration traditionnelle"); + activity_array["agriculture,alimentation"].push("Culture de la vigne"); + activity_array["agriculture,alimentation"].push("Restauration de type rapide"); + activity_array["agriculture,alimentation"].push("Élevage d'autres bovins et de buffles"); + activity_array["agriculture,alimentation"].push("Élevage de vaches laitières"); + activity_array["agriculture,alimentation"].push("Culture et élevage associés"); + activity_array["agriculture,alimentation"].push("Élevage d'autres animaux"); + activity_array["agriculture,alimentation"].push("Débits de boissons"); + activity_array["agriculture,alimentation"].push("Boulangerie et boulangerie-pâtisserie"); + activity_array["agriculture,alimentation"].push("Commerce de détail alimentaire sur éventaires et marchés"); + activity_array["agriculture,alimentation"].push("Commerce d'alimentation générale"); + activity_array["agriculture,alimentation"].push("Élevage d'ovins et de caprins"); + activity_array["agriculture,alimentation"].push("Culture de légumes, de melons, de racines et de tubercules"); + activity_array["agriculture,alimentation"].push("Sylviculture et autres activités forestières"); + + activity_array["santé"] = []; + activity_array["santé"].push("Activité profess. rééducation appareillage & pédicures-podologues"); + activity_array["santé"].push("Activités des infirmiers et des sages-femmes"); + activity_array["santé"].push("Activité des médecins généralistes"); + activity_array["santé"].push("Activités de santé humaine non classées ailleurs"); + activity_array["santé"].push("Autres services personnels n.c.a"); + activity_array["santé"].push("Autres activités des médecins spécialistes"); + activity_array["santé"].push("Pratique dentaire"); + activity_array["santé"].push("Commerce de détail produits pharmaceutiques (magasin spécialisé)"); + + activity_array["aménagement,transport,construction"] = []; + activity_array["aménagement,transport,construction"].push("Location de terrains et d'autres biens immobiliers") + activity_array["aménagement,transport,construction"].push("Location de logements"); + activity_array["aménagement,transport,construction"].push("Activités combinées de soutien lié aux bâtiments"); + activity_array["aménagement,transport,construction"].push("Travaux de maçonnerie générale et gros oeuvre de bâtiment"); + activity_array["aménagement,transport,construction"].push("Agences immobilières"); + activity_array["aménagement,transport,construction"].push("Transports de voyageurs par taxis"); + activity_array["aménagement,transport,construction"].push("Entretien et réparation de véhicules automobiles légers"); + activity_array["aménagement,transport,construction"].push("Commerce de voitures et de véhicules automobiles légers"); + activity_array["aménagement,transport,construction"].push("Administration d'immeubles et autres biens immobiliers"); + activity_array["aménagement,transport,construction"].push("Activités d'architecture"); + activity_array["aménagement,transport,construction"].push("Services d'aménagement paysager"); + activity_array["aménagement,transport,construction"].push("Hébergement touristique et autre hébergement de courte durée"); + activity_array["aménagement,transport,construction"].push("Hôtels et hébergement similaire"); + activity_array["aménagement,transport,construction"].push("Activités des marchands de biens immobiliers"); + activity_array["aménagement,transport,construction"].push("Construction de maisons individuelles"); + activity_array["aménagement,transport,construction"].push("Transports routiers de fret de proximité"); + activity_array["aménagement,transport,construction"].push("Travaux de terrassement courants et travaux préparatoires"); + + activity_array["éducation,petite Enfance"] = []; + + activity_array["citoyenneté"] = []; + activity_array["citoyenneté"].push("Conseil pour les affaires et autres conseils de gestion"); + activity_array["citoyenneté"].push("Administration publique générale"); + + activity_array["ess,economie social solidaire"] = []; + activity_array["ess,economie social solidaire"].push("Vente à domicile"); + activity_array["ess,economie social solidaire"].push("Autres commerces de détail sur éventaires et marchés"); + activity_array["ess,economie social solidaire"].push("Commerce de détail d'habillement en magasin spécialisé"); + activity_array["ess,economie social solidaire"].push("Action sociale sans hébergement n.c.a."); + activity_array["ess,economie social solidaire"].push("Autres intermédiaires du commerce en produits divers"); + activity_array["ess,economie social solidaire"].push("Autres commerces de détail spécialisés divers"); + activity_array["ess,economie social solidaire"].push("Autres activités de soutien aux entreprises n.c.a."); + activity_array["ess,economie social solidaire"].push("Autres intermédiations monétaires"); + activity_array["ess,economie social solidaire"].push("Activités des sièges sociaux"); + activity_array["ess,economie social solidaire"].push("Commerce de gros (commerce interentreprises) non spécialisé"); + + activity_array["energie,climat"] = []; + activity_array["energie,climat"].push("Travaux d'installation électrique dans tous locaux"); + activity_array["energie,climat"].push("Production d'électricité"); + activity_array["energie,climat"].push("Travaux d'installation d'eau et de gaz en tous locaux"); + + activity_array["culture,animation"] = []; + activity_array["culture,animation"].push("Activités de clubs de sports"); + activity_array["culture,animation"].push("Arts du spectacle vivant"); + activity_array["culture,animation"].push("Création artistique relevant des arts plastiques"); + activity_array["culture,animation"].push("Enseignement de disciplines sportives et d'activités de loisirs"); + activity_array["culture,animation"].push("Autres activités récréatives et de loisirs"); + activity_array["culture,animation"].push("Autre création artistique"); + activity_array["culture,animation"].push("Enseignement culturel"); + activity_array["culture,animation"].push("Activités de soutien aux cultures"); + activity_array["culture,animation"].push("Activités de soutien au spectacle vivant"); + + activity_array["biodiversité"] = []; + + activity_array["numérique,tic,internet"] = []; + activity_array["numérique,tic,internet"].push("Programmation informatique"); + activity_array["numérique,tic,internet"].push("Conseil en systèmes et logiciels informatiques"); + + activity_array["autres"] = []; + activity_array["autres"].push("Activités des sociétés holding"); + activity_array["autres"].push("Activités juridiques"); + activity_array["autres"].push("Coiffure"); + activity_array["autres"].push("Travaux de peinture et vitrerie"); + activity_array["autres"].push("Ingénierie, études techniques"); + activity_array["autres"].push("Travaux de menuiserie bois et PVC"); + activity_array["autres"].push("Formation continue d'adultes"); + activity_array["autres"].push("Supports juridiques de programmes"); + activity_array["autres"].push("Nettoyage courant des bâtiments"); + activity_array["autres"].push("Autres enseignements"); + activity_array["autres"].push("Soins de beauté"); + activity_array["autres"].push("Activités spécialisées de design"); + activity_array["autres"].push("Activités des agents et courtiers d'assurances"); + activity_array["autres"].push("Photocopie prépa. documents & aut. activ. spéc. soutien de bureau"); + activity_array["autres"].push("En attente de chiffrement sans activité"); + activity_array["autres"].push("Travaux de plâtrerie"); + activity_array["autres"].push("Conseil en relations publiques et communication"); + activity_array["autres"].push("Activités comptables"); + activity_array["autres"].push("Travaux de revêtement des sols et des murs"); + activity_array["autres"].push("Activités spécialisées, scientifiques et techniques diverses"); + activity_array["autres"].push("Activités photographiques"); + activity_array["autres"].push("Activités des agences de publicité"); + activity_array["autres"].push("Supports juridiques de gestion de patrimoine mobilier"); + activity_array["autres"].push("Travaux d'installation équipements thermiques et climatisation"); + activity_array["autres"].push("Autres activités liées au sport"); + activity_array["autres"].push("Comm. détail textiles habillt & chaussures s/éventaires & marchés"); + activity_array["autres"].push("Autres travaux de finition"); + activity_array["autres"].push("Location et location-bail machines, équipements et biens divers"); + activity_array["autres"].push("Vente à distance sur catalogue spécialisé"); + activity_array["autres"].push("Vente à distance sur catalogue général"); + activity_array["autres"].push("Réparation d'autres biens personnels et domestiques"); + activity_array["autres"].push("Travaux de couverture par éléments"); + activity_array["autres"].push("Traduction et interprétation"); + + return activity_array; + +} + +function getAllValueForTagAmenityOSM(){ + + var list_tags_amenity = {}; + + list_tags_amenity["Sustenance"] = []; + list_tags_amenity["Sustenance"].push("restaurant", "pub", "fast_food", "food_court", "ice_cream", "bar", "bbq", "biergarten", "cafe", "food_court", "ice_cream", "marketplace","drinking_water"); + + + list_tags_amenity["Education"] = []; + list_tags_amenity["Education"].push("school", "university", "college", "kindergarten", "childcare", "music_school", "driving_school", "language_school"); + + + list_tags_amenity["Transport"] = []; + list_tags_amenity["Transport"].push("bicycle_parking", "bicycle_repair_station", "bicycle_rental", "boat_sharing", "bus_station", "car_rental", "car_sharing", "car_wash", "charging_station", "fuel", "ferry_terminal", "grit_bin", "motorcycle_parking", "parking", "parking_entrance", "parking_space", "taxi"); + + list_tags_amenity["Financier"] = []; + list_tags_amenity["Financier"].push("atm", "bank", "bureau_de_change"); + + + list_tags_amenity["Santé"] = []; + list_tags_amenity["Santé"].push("doctors", "pharmacy", "veterinary", "hospital", "baby_hatch", "clinic", "nursing_home", "social_facility"); + + + list_tags_amenity["Divertissement, Art et Culture"] = []; + list_tags_amenity["Divertissement, Art et Culture"].push("theatre", "cinema", "library", "arts_centre", "brothel", "stripclub", "swingerclub", "casino", "community_centre", "fountain", "gambling", "nightclub", "planetarium", "studio"); + + list_tags_amenity["Autres"] = []; + list_tags_amenity["Autres"].push("animal_boarding", "animal_shelter", "baking_oven", "bench", "clock", "courthouse", "coworking_space", "crematorium", "crypt", "dive_centre", "dojo", "embassy", "fire_station", "game_feeding", "grave_yard", "hunting_stand", "internet_cafe", "marketplace", "photo_booth", "place_of_worship", "police", "post_box", "post_office", "prison", "ranger_station", "recycling", "rescue_station", "sanitary_dump_station", "shelter", "shower", "table", "telephone", "toilets", "townhall", "vending_machine", "waste_basket", "waste_disposal", "waste_transfert_station", "watering_place", "water_point"); + + return list_tags_amenity; +} + +function getAllValueForTagPlaceOSM() { + + var list_tags_place = {}; + + list_tags_place["Lieu administrativement déclarer"] = []; + list_tags_place["Lieu administrativement déclarer"].push("country", "state", "region", "province", "district", "country", "municipality"); + + list_tags_place["Lieu peuplé, milieu urbain"] = []; + list_tags_place["Lieu peuplé, milieu urbain"].push("city", "quarter", "city_block", "borough") + + list_tags_place["Lieu peuplé, milieu urbain et rural"] = []; + list_tags_place["Lieu peuplé, milieu urbain et rural"].push("town", "village", "hamlet", "farm", "allotments"); + + list_tags_place["Autres"] = []; + list_tags_place["Autres"].push("continent","archipelago", "island", "islet", "square", "locality"); + + return list_tags_place; + +} + +function getAllValueForTagOfficeOSM() { + + var list_tags_office = {}; + + list_tags_office["Office"] = []; + list_tags_office["Office"].push("accountant", "adoption agency", "advertising agency", "architect", "association", "charity", "company", "educational institution", "employement agency", "energy supplier", "estate agent", "foresty", "fondation", "guide", "insurance", "it", "lawyer", "logistics", "moving company", "newspaper", "ngo", "notary", "political party", "private investigator", "quango", "religion", "research", "tax", "tax_advisor", "telecommunication", "therapist", "travel_agent", "water_utility"); + + return list_tags_office; +} + +function getAllValueForTagLeisureOSM() { + + var list_tags_leisure = {}; + + list_tags_leisure["Loisirs"] = []; + list_tags_leisure["Loisirs"].push("adult_gaming_centre", "amusement_arcade", "beach_resort", "bandstant", "bird_hide", "common", "dance", "disc_golf_tour", "dog_park", "escape_game", "firepit", "fishing", "fitness_centre", "garden", "golfcourt", "hackerspace", "horse_riding", "ice_rink", "marina", "miniature_golf", "nature_reserve", "park", "picnic_table", "pitch","playground", "slipway", "sports_centre", "stadium", "summer_camp", "swimming_area" , "swimming_pool", "track", "water_park", "wildhide_life"); + + return list_tags_leisure; +} + +function getAllValueForTagShopOSM() { + + var list_tags_shop = {}; + + list_tags_shop["Nouriture, Boissons"] = []; + list_tags_shop["Nouriture, Boissons"].push("alcohol" , "bakery", "beverages", "brewing_supplies", "butcher", "cheese", "chocolate", "coffee", "confectionery", "convenience", "deli", "dairy", "farm", "greengrocer", "ice_cream", "pasta", "pastry", "seafood", "spices", "tea"); + + list_tags_shop["Magasin général, super et hyper marché"] = []; + list_tags_shop["Magasin général, super et hyper marché"].push("department_store", "general", "kiosk", "mall", "supermarket"); + + list_tags_shop["Vêtement, Chaussure, Accessoires"] = []; + list_tags_shop["Vêtement, Chaussure, Accessoires"].push("baby_goods", "bag", "boutique", "clothes", "fabric", "fashion", "jewelry", "leather", "sewing", "shoes", "tailor", "watches"); + + list_tags_shop["Magasin Discount, de charité"] = []; + list_tags_shop["Magasin Discount, de charité"].push("charity", "second_hand", "variety_store"); + + list_tags_shop["Santé et beauté"] = []; + list_tags_shop["Santé et beauté"].push("beauty", "chemist", "cosmetics", "erotic", "hairdresser", "hairdresser_supply", "hearing_aids", "herbalist", "massage", "medical_supply", "nutrition_supplements", "optician", "perfumery", "tatoo"); + + list_tags_shop["Do-it-yourself, household, building materials, gardening"] = []; + list_tags_shop["Do-it-yourself, household, building materials, gardening"].push("agrarian", "bathroom_furnishing", "doityourself", "electrical", "energy", "fireplace" , "florist", " garden_centre", " garden_furniture" , "gas", " glaziery", "hardware", " houseware" , "locksmith", "paint", "security", "trade"); + + list_tags_shop["Furniture and interior"] = []; + list_tags_shop["Furniture and interior"].push("antiques", "bed", "candles", "carpet", "curtain" , "furniture", " interior_decoration" , "kitchen", "lamps", "tiles", " window_blind"); + + list_tags_shop["Electronics"] = []; + list_tags_shop["Electronics"].push(" computer" , "electronics", "hifi", "mobile_phone", "radiotechnics" , "vacuum_cleaner"); + + list_tags_shop["Outdoors and sport, vehicles"] = []; + list_tags_shop["Outdoors and sport, vehicles"].push("atv", "bicycle", "car", "car_repair", "car_parts", "fuel", "fishing", "free_flying", "hunting", "motorcycle", "outdoor", "scuba_diving", "sports", "swimming_pool" , "tyres"); + + list_tags_shop["Art, music, hobbies"] = []; + list_tags_shop["Art, music, hobbies"].push("art", "collector", "craft", "frame", "games", "model", "music", "musical_instrument", "photo", "camera", "trophy", "video", "video_games"); + + list_tags_shop["Stationery, gifts, books, newspapers"] = []; + list_tags_shop["Stationery, gifts, books, newspapers"].push("anime", "book", "gift", "lottery", "newsagent", "stationery", "ticket"); + + list_tags_shop["Autres"] = []; + list_tags_shop["Autres"].push("bookmaker", "copyshop", "dry_cleaning", "e-cigarette", "funeral_directors", "laundry", "money_lender", "party", "pawnbroker", "pet", "pyrotechnics", "religion", "tobacco", "toys", "travel_agency", "vacant", "weapons"); + + return list_tags_shop; +} + +function getRomeActivityCodeFromThematic(thematic) { + + if (thematic == "commun") { + rome_activity_letter = null; + } else if (thematic == "déchets") { + rome_activity_letter = null; + } else if (thematic == "agriculture,alimentation") { + rome_activity_letter = "A"; + } else if (thematic == "santé") { + rome_activity_letter = "J"; + } else if (thematic == "aménagement,transport,construction") { + rome_activity_letter = "F,G,I,N"; + } else if (thematic == "éducation,petite Enfance") { + rome_activity_letter = null; + } else if (thematic == "citoyenneté") { + rome_activity_letter = "K"; + } else if (thematic == "ess,economie social solidaire") { + rome_activity_letter = "M,C,D"; + } else if (thematic == "energie,climat") { + rome_activity_letter = "H"; + } else if (thematic == "culture,animation") { + rome_activity_letter = "B,L"; + } else if (thematic == "biodiversité") { + rome_activity_letter = null; + } else if (thematic == "numérique,tic,internet") { + rome_activity_letter = "E"; + } else if (thematic == "autres") { + rome_activity_letter = null; + } + + return rome_activity_letter; +} + +function getScopeValue() { + + $.each(myMultiScopes, function(index, value) { + if (value.active == true) { + if (index.indexOf("_") > 0) { + scope_value = index; + } else { + scope_value = value.name; + } + } + }); + + return scope_value; +} + +function getCityId() { + + if ($.cookie().communexionActivated == true) { + city_id = communexion.currentValue; + } else { + $.each(myMultiScopes, function(index, value) { + if (value.active == true) { + if (value.type == "city") { + city_id = index; + } else if (value.type == "cp") { + city_data = getCityDataByInsee(value.name); + city_id = city_data._id.$id + } else { + city_id = index; + } + } + }); + } + + return city_id; +} + +function getTypeZone() { + + if ($.cookie().communexionActivated == true) { + type_zone = "city"; + } else { + $.each(myMultiScopes, function(index, value) { + if (value.active == true) { + if (value.type == "city") { + type_zone = "city"; + } else if (value.type == "cp") { + type_zone = "city"; + } else { + type_zone = "zone"; + } + } + }); + } + + return type_zone; +} + +function getCityDataByInsee(insee) { + + $.ajax({ + type: "GET", + url: baseUrl + "/co2/interoperability/get/insee/"+insee, + async: false, + success: function(data){ mylog.log("succes get CityDataByInsee", data); //mylog.dir(data); + if ((Object.keys(data).length) <= 1) { + $.each(data, function(index, value) { + city_data = value; + }); + } + else { + city_data = data; + } + } + }); + return city_data; +} + +function getCityDataById(id, type=null) { + + $.ajax({ + type: "GET", + url: baseUrl + "/co2/interoperability/get/type/"+type+"/id/"+id, + async: false, + success: function(data){ mylog.log("succes get CityDataById", data); //mylog.dir(data); + if ((Object.keys(data).length) <= 1) { + $.each(data, function(index, value) { + city_data = value; + }); + } + else { + city_data = data; + } + } + }); + + return city_data; +} + +function getUrlInteropForWiki(wikidataID) { + + var url_wiki = baseUrl + "/api/convert/wikipedia?url=https://www.wikidata.org/wiki/Special:EntityData/"+wikidataID+".json"; + + if (text_search_name !== "") { + url_wiki += "&text_filter="+text_search_name; + } + + return url_wiki; +} + +function getUrlInteropForDatagouv(insee) { + + var url_datagouv = baseUrl + "/api/convert/datagouv?url=https://www.data.gouv.fr/api/1/spatial/zone/fr/town/"+insee+"/datasets"; + + return url_datagouv; +} + +function getUrlInteropForOsm(geoShape, amenity_filter = null) { + + var url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"](poly:"'+geoShape+'");out%20'+endNow+';'; + + if (amenity_filter == null) { + if (text_search_name !== "") { + url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"~"'+text_search_name+'",i](poly:"'+geoShape+'");out%20'+endNow+';'; + } + } else { + if (amenity_filter == "") { + url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["amenity"="NIMPORTEQUOI"](poly:"'+geoShape+'");out%20'+endNow+';'; + } else { + if (text_search_name == "") { + url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["amenity"~"^('+amenity_filter+')"](poly:"'+geoShape+'");out%20'+endNow+';'; + } else { + url_osm = baseUrl + '/api/convert/osm?url=http://overpass-api.de/api/interpreter?data=[out:json];node["name"~"'+text_search_name+'"]["amenity"~"^('+amenity_filter+')"](poly:"'+geoShape+'");out%20'+endNow+';'; + } + } + } + + return url_osm; +} + +function getUrlInteropForOds(geofilter, filter = null) { + + var url_ods = baseUrl + "/api/convert/ods?url=https://data.opendatasoft.com/api/records/1.0/search/?dataset=sirene%40public&facet=categorie&facet=proden&facet=libapen&facet=siege&facet=libreg_new&facet=saisonat&facet=libtefen&facet=depet&facet=libnj&facet=libtca&facet=liborigine&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_ods += "&q="+text_search_name; + } + + if (filter !== null) { + url_ods = url_ods + filter; + } + + return url_ods; +} + +function getUrlInteropForDatanova(geofilter) { + + var url_datanova = baseUrl + "/api/convert/datanova?url=https://datanova.laposte.fr/api/records/1.0/search/?dataset=laposte_poincont&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_datanova = baseUrl + "/api/convert/datanova?url=https://datanova.laposte.fr/api/records/1.0/search/?dataset=laposte_poincont&q="+text_search_name+"&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + } + + return url_datanova; +} + +function getUrlInteropForPoleEmploi(insee, filter = null) { + + var url_pole_emploi = baseUrl + "/api/convert/poleemploi?url=https://api.emploi-store.fr/partenaire/infotravail/v1/datastore_search_sql?sql=SELECT%20%2A%20FROM%20%22421692f5%2Df342%2D4223%2D9c51%2D72a27dcaf51e%22%20WHERE%20%22CITY_CODE%22=%27"+insee+"%27%20LIMIT%20"+endNow; + + if (filter !== null) { + url_pole_emploi = baseUrl + "/api/convert/poleemploi?rome_activity="+filter+"&url=https://api.emploi-store.fr/partenaire/infotravail/v1/datastore_search_sql?sql=SELECT%20%2A%20FROM%20%22421692f5%2Df342%2D4223%2D9c51%2D72a27dcaf51e%22%20WHERE%20%22CITY_CODE%22=%27"+insee+"%27%20LIMIT%20"+endNow; + } + + return url_pole_emploi; +} + +function getUrlInteropForEducMembre(geofilter) { + + + var url_educ_membre = baseUrl + "/api/convert/educmembre?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-iuf-les-membres&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_educ_membre = baseUrl + "/api/convert/educmembre?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-iuf-les-membres&q="+text_search_name+"&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + } + + return url_educ_membre; +} + +function getUrlInteropForEducEtab(geofilter) { + + var url_educ_etab = baseUrl + "/api/convert/educetab?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-etablissements-publics-prives-impliques-recherche-developpement&facet=siren&facet=libelle&facet=date_de_creation&facet=categorie&facet=libelle_ape&facet=tranche_etp&facet=categorie_juridique&facet=wikidata&facet=commune&facet=unite_urbaine&facet=departement&facet=region&facet=pays&facet=badge&facet=region_avant_2016&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_educ_etab = baseUrl + "/api/convert/educetab?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-etablissements-publics-prives-impliques-recherche-developpement&facet=siren&facet=libelle&facet=date_de_creation&facet=categorie&facet=libelle_ape&facet=tranche_etp&facet=categorie_juridique&facet=wikidata&facet=commune&facet=unite_urbaine&facet=departement&facet=region&facet=pays&facet=badge&facet=region_avant_2016&q="+text_search_name+"&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + } + + return url_educ_etab; +} + +function getUrlInteropForEducStruct(geofilter) { + + var url_educ_struct = baseUrl + "/api/convert/educstruct?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-structures-recherche-publiques-actives&facet=numero_national_de_structure&facet=annee_de_creation&facet=tutelles&facet=type_de_tutelle&facet=nature_de_tutelle&facet=nature_de_structure&facet=type_de_structure&facet=niveau_de_structure&facet=domaine_scientifique&facet=panel_erc&facet=theme_de_recherche&facet=commune&facet=unite_urbaine&facet=departement&facet=region&facet=pays&facet=comue&facet=region_avant_2016&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_educ_struct = baseUrl + "/api/convert/educstruct?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-structures-recherche-publiques-actives&facet=numero_national_de_structure&facet=annee_de_creation&facet=tutelles&facet=type_de_tutelle&facet=nature_de_tutelle&facet=nature_de_structure&facet=type_de_structure&facet=niveau_de_structure&facet=domaine_scientifique&facet=panel_erc&facet=theme_de_recherche&facet=commune&facet=unite_urbaine&facet=departement&facet=region&facet=pays&facet=comue&facet=region_avant_2016&rows=30&start="+startNow+"&q="+text_search_name+"&geofilter.polygon="+geofilter; + } + + return url_educ_struct; +} + +function getUrlInteropForEducEcole(geofilter) { + + var url_educ_ecole = baseUrl + "/api/convert/educecole?url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-ecoles_doctorales_annuaire&facet=numero&facet=groupe_disciplinaire&facet=toutes_les_disciplines&facet=discipline_principale&facet=localisation&facet=liste_tous_etablissements&facet=laboratoires_rattaches&facet=annee_de_creation&facet=annee_accreditation&facet=etablissement_support&facet=liste_codes_tous_etablissements&facet=identifiants_des_laboratoires&facet=libelle_unite_urbaine&facet=libelle_departement&facet=libelle_academie&facet=libelle_region&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + if (text_search_name !== "") { + url_educ_ecole = baseUrl + "/api/convert/educ?dataset=ecole&url=https://data.enseignementsup-recherche.gouv.fr/api/records/1.0/search/?dataset=fr-esr-ecoles_doctorales_annuaire&facet=numero&facet=groupe_disciplinaire&facet=toutes_les_disciplines&facet=discipline_principale&facet=localisation&facet=liste_tous_etablissements&facet=laboratoires_rattaches&facet=annee_de_creation&facet=annee_accreditation&facet=etablissement_support&facet=liste_codes_tous_etablissements&facet=identifiants_des_laboratoires&facet=libelle_unite_urbaine&facet=libelle_departement&facet=libelle_academie&facet=libelle_region&q="+text_search_name+"&rows=30&start="+startNow+"&geofilter.polygon="+geofilter; + + } + + return url_educ_ecole; +} + +function getUrlForInteropDirectoryElements(type_elt, id, url_elt) { + + if (type_elt == "datanova") { + url_directory_elt = "https://datanova.laposte.fr/explore/embed/dataset/laposte_poincont/table/?disjunctive.nature_juridique&disjunctive.code_postal&disjunctive.localite&disjunctive.code_insee&q="+id+"&static=false&datasetcard=true"; + } else if (type_elt == "ods") { + url_directory_elt = "https://data.opendatasoft.com/explore/dataset/sirene%40public/table/?sort=datemaj&q="+id; + } else if (type_elt == "osm") { + url_directory_elt = "http://www.openstreetmap.org/node/"+id; + } else { + url_directory_elt = url_elt; + } + + return url_directory_elt; +} + +function getTypeInteropData(type_convert) { + + var type_interop = type_convert.substr(type_convert.indexOf("_") + 1); + + return type_interop; +} + +function getIconForInteropElements(type_elt) { + + var icon_elt = ""; + + if (type_elt == "datanova") { + icon_elt = "envelope"; + } else if (type_elt == "ods") { + icon_elt = "cubes"; + } else if (type_elt == "osm") { + icon_elt = 'map'; + } else if (type_elt == "wiki") { + icon_elt = 'wikipedia-w'; + } else if (type_elt == "datagouv") { + icon_elt = "database"; + } else { + icon_elt = "group"; + } + + return icon_elt; +} + +function getIconColorForInteropElements(type_elt) { + + var icon_color = ""; + + if (type_elt == "datanova") { + icon_color = "yellow"; + } else if (type_elt == "ods") { + icon_color = "blue"; + } else if (type_elt == "osm") { + icon_color = 'green'; + } else if (type_elt == "wiki") { + icon_color = 'purple'; + } else if (type_elt == "datagouv") { + icon_color = "red"; + } else { + icon_color = "white"; + } + + return icon_color; + +} + +function getImageIcoForInteropElements(type_elt) { + + var icon_image = ""; + + if (type_elt == "datanova") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/logo-laposte.png'>"; + } else if (type_elt == "ods") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/opendata-soft-logo.png'>"; + } else if (type_elt == "osm") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/OSM-logo.png'>"; + } else if (type_elt == "wiki") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/logo-wikidata.png'>"; + } else if (type_elt == "datagouv") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/data-gouv-logo.png'>"; + } else if (type_elt == "poleemploi") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/logo_pole_emploi.png'>"; + } else if (type_elt == "educ_etab" || type_elt == "educ_membre" || type_elt == "educ_ecole" || type_elt == "educ_struct") { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"/images/logos/logo_open_data_educ.jpg'>"; + } + + else { + icon_image = "<img width=100 style='margin-top:20px;' src='"+moduleUrl+"'>"; + } + + return icon_image; + +} + +function getimgProfilPathForInteropDataOnMap(type_elt) { + + // var imgProfilPath; + // var baseUrlJustForThis = baseUrl.substring(0,baseUrl.length-2); + + if (type_elt == "poi.interop.datanova") { + var imgProfilPath = moduleUrl+"/images/logos/logo-laposte.png"; + } else if (type_elt == "poi.interop.wiki") { + var imgProfilPath = moduleUrl+"/images/logos/logo-wikidata.png"; + } else if (type_elt == "poi.interop.datagouv") { + var imgProfilPath = moduleUrl+"/images/logos/data-gouv-logo.png"; + } else if (type_elt == "poi.interop.poleemploi") { + var imgProfilPath = moduleUrl+"/images/logos/logo_pole_emploi.png"; + } else if (type_elt == "poi.interop.osm") { + var imgProfilPath = moduleUrl+"/images/logos/OSM-logo.png"; + } else if (type_elt == "poi.interop.ods") { + var imgProfilPath = moduleUrl+"/images/logos/opendata-soft-logo.png"; + } else if (type_elt == "poi.interop.educ_etab" || type_elt == "poi.interop.educ_membre" || type_elt == "poi.interop.educ_ecole" || type_elt == "poi.interop.educ_struct") { + var imgProfilPath = moduleUrl+"/images/logos/logo_open_data_educ.jpg"; + } + return imgProfilPath; +} + + + diff --git a/assets/js/interoperability/timeline-chart.js b/assets/js/interoperability/timeline-chart.js new file mode 100644 index 0000000000000000000000000000000000000000..8f9325e34d7600dd2b360df1fb0c21d13f252457 --- /dev/null +++ b/assets/js/interoperability/timeline-chart.js @@ -0,0 +1,292 @@ +(function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module'], factory); + } else if (typeof exports !== "undefined") { + factory(module); + } else { + var mod = { + exports: {} + }; + factory(mod); + global.TimelineChart = mod.exports; + } +})(this, function (module) { + 'use strict'; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + var TimelineChart = function () { + function TimelineChart(element, data, opts, label_dbpedia, wikidataID) { + _classCallCheck(this, TimelineChart); + + var self = this; + + element.classList.add('timeline-chart'); + + var options = this.extendOptions(opts); + + var allElements = data.reduce(function (agg, e) { + return agg.concat(e.data); + }, []); + + var minDt = d3.min(allElements, this.getPointMinDt); + var maxDt = d3.max(allElements, this.getPointMaxDt); + + var elementWidth = options.width || element.clientWidth; + var elementHeight = options.height || element.clientHeight; + + var margin = { + top: 0, + right: 0, + bottom: 20, + left: 0 + }; + + var width = elementWidth - margin.left - margin.right; + var height = elementHeight - margin.top - margin.bottom; + + var groupWidth = 200; + + var x = d3.time.scale().domain([minDt, maxDt]).range([groupWidth, width]); + + var xAxis = d3.svg.axis().scale(x).orient('bottom').tickSize(-height); + + var zoom = d3.behavior.zoom().x(x).on('zoom', zoomed); + + var svg = d3.select(element).append('svg').attr('width', width + margin.left + margin.right).attr('height', height + margin.top + margin.bottom).append('g').attr('transform', 'translate(' + margin.left + ',' + margin.top + ')').call(zoom); + + svg.append('defs').append('clipPath').attr('id', 'chart-content').append('rect').attr('x', groupWidth).attr('y', 0).attr('height', height).attr('width', width - groupWidth); + + svg.append('rect').attr('class', 'chart-bounds').attr('x', groupWidth).attr('y', 0).attr('height', height).attr('width', width - groupWidth); + + svg.append('g').attr('class', 'x axis').attr('transform', 'translate(0,' + height + ')').call(xAxis); + + if (options.enableLiveTimer) { + self.now = svg.append('line').attr('clip-path', 'url(#chart-content)').attr('class', 'vertical-marker now').attr("y1", 0).attr("y2", height); + } + + var groupHeight = height / data.length; + var groupSection = svg.selectAll('.group-section').data(data).enter().append('line').attr('class', 'group-section').attr('x1', 0).attr('x2', width).attr('y1', function (d, i) { + return groupHeight * (i + 1); + }).attr('y2', function (d, i) { + return groupHeight * (i + 1); + }); + + var groupLabels = svg.selectAll('.group-label').data(data).enter().append('text').attr('class', 'group-label').attr('x', 0).attr('y', function (d, i) { + return groupHeight * i + groupHeight / 2 + 5.5; + }).attr('dx', '0.5em').text(function (d) { + return d.label; + }); + + var lineSection = svg.append('line').attr('x1', groupWidth).attr('x2', groupWidth).attr('y1', 0).attr('y2', height).attr('stroke', 'black'); + + var groupIntervalItems = svg.selectAll('.group-interval-item').data(data).enter().append('g').attr('clip-path', 'url(#chart-content)').attr('class', 'item').attr('transform', function (d, i) { + return 'translate(0, ' + groupHeight * i + ')'; + }).selectAll('.dot').data(function (d) { + return d.data.filter(function (_) { + return _.type === TimelineChart.TYPE.INTERVAL; + }); + }).enter(); + + var intervalBarHeight = 0.8 * groupHeight; + var intervalBarMargin = (groupHeight - intervalBarHeight) / 2; + var intervals = groupIntervalItems.append('rect').attr('class', withCustom('interval')).attr('width', function (d) { + return Math.max(options.intervalMinWidth, x(d.to) - x(d.from)); + }).attr('height', intervalBarHeight).attr('y', intervalBarMargin).attr('x', function (d) { + return x(d.from); + }); + + var intervalTexts = groupIntervalItems.append('text').text(function (d) { + return d.label; + }).attr('fill', 'white').attr('class', withCustom('interval-text')).attr('y', groupHeight / 2 + 5).attr('x', function (d) { + return x(d.from); + }); + + var groupDotItems = svg.selectAll('.group-dot-item').data(data).enter().append('g').attr('clip-path', 'url(#chart-content)').attr('class', 'item').attr('transform', function (d, i) { + return 'translate(0, ' + groupHeight * i + ')'; + }).selectAll('.dot').data(function (d) { + return d.data.filter(function (_) { + return _.type === TimelineChart.TYPE.POINT; + }); + }).enter(); + + var dots = groupDotItems.append('circle').attr('class', withCustom('dot')).attr('cx', function (d) { + return x(d.at); + }).attr('cy', groupHeight / 2).attr('r', 5); + + var tip_link = {}; + tip_link.label_dbpedia = label_dbpedia; + + if (options.tip) { + if (d3.tip) { + var tip = d3.tip().attr('class', 'd3-tip').html(options.tip); + console.log(tip); + + svg.call(tip); + dots.on('mouseover', tip.show).on('mouseout', tip.hide); + dots.on('click', function() { + mylog.log('LE FOCUS EST SUR : ', $(".n")[0].innerHTML); + displayDetailModal($(".n")[0].innerHTML); + }); + } else { + console.error('Please make sure you have d3.tip included as dependency (https://github.com/Caged/d3-tip)'); + } + } + + zoomed(); + + if (options.enableLiveTimer) { + setInterval(updateNowMarker, options.timerTickInterval); + } + + function updateNowMarker() { + var nowX = x(new Date()); + + self.now.attr('x1', nowX).attr('x2', nowX); + } + + function withCustom(defaultClass) { + return function (d) { + return d.customClass ? [d.customClass, defaultClass].join(' ') : defaultClass; + }; + } + + function zoomed() { + if (self.onVizChangeFn && d3.event) { + self.onVizChangeFn.call(self, { + scale: d3.event.scale, + translate: d3.event.translate, + domain: x.domain() + }); + } + + if (options.enableLiveTimer) { + updateNowMarker(); + } + + svg.select('.x.axis').call(xAxis); + + svg.selectAll('circle.dot').attr('cx', function (d) { + return x(d.at); + }); + svg.selectAll('rect.interval').attr('x', function (d) { + return x(d.from); + }).attr('width', function (d) { + return Math.max(options.intervalMinWidth, x(d.to) - x(d.from)); + }); + + svg.selectAll('.interval-text').attr('x', function (d) { + var positionData = getTextPositionData.call(this, d); + if (positionData.upToPosition - groupWidth - 10 < positionData.textWidth) { + return positionData.upToPosition; + } else if (positionData.xPosition < groupWidth && positionData.upToPosition > groupWidth) { + return groupWidth; + } + return positionData.xPosition; + }).attr('text-anchor', function (d) { + var positionData = getTextPositionData.call(this, d); + if (positionData.upToPosition - groupWidth - 10 < positionData.textWidth) { + return 'end'; + } + return 'start'; + }).attr('dx', function (d) { + var positionData = getTextPositionData.call(this, d); + if (positionData.upToPosition - groupWidth - 10 < positionData.textWidth) { + return '-0.5em'; + } + return '0.5em'; + }).text(function (d) { + var positionData = getTextPositionData.call(this, d); + var percent = (positionData.width - options.textTruncateThreshold) / positionData.textWidth; + if (percent < 1) { + if (positionData.width > options.textTruncateThreshold) { + return d.label.substr(0, Math.floor(d.label.length * percent)) + '...'; + } else { + return ''; + } + } + + return d.label; + }); + + function getTextPositionData(d) { + this.textSizeInPx = this.textSizeInPx || this.getComputedTextLength(); + var from = x(d.from); + var to = x(d.to); + return { + xPosition: from, + upToPosition: to, + width: to - from, + textWidth: this.textSizeInPx + }; + } + } + } + + _createClass(TimelineChart, [{ + key: 'extendOptions', + value: function extendOptions() { + var ext = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + var defaultOptions = { + intervalMinWidth: 8, // px + tip: undefined, + textTruncateThreshold: 30, + enableLiveTimer: false, + timerTickInterval: 1000 + }; + Object.keys(ext).map(function (k) { + return defaultOptions[k] = ext[k]; + }); + return defaultOptions; + } + }, { + key: 'getPointMinDt', + value: function getPointMinDt(p) { + return p.type === TimelineChart.TYPE.POINT ? p.at : p.from; + } + }, { + key: 'getPointMaxDt', + value: function getPointMaxDt(p) { + return p.type === TimelineChart.TYPE.POINT ? p.at : p.to; + } + }, { + key: 'onVizChange', + value: function onVizChange(fn) { + this.onVizChangeFn = fn; + return this; + } + }]); + + return TimelineChart; + }(); + + TimelineChart.TYPE = { + POINT: Symbol(), + INTERVAL: Symbol() + }; + + module.exports = TimelineChart; +}); \ No newline at end of file diff --git a/assets/js/jquery-ui-1.11.4/external/jquery/jquery.js b/assets/js/jquery-ui-1.11.4/external/jquery/jquery.js new file mode 100644 index 0000000000000000000000000000000000000000..c5c648255c1574dcc95c506b82c25044f0972dfd --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/external/jquery/jquery.js @@ -0,0 +1,9789 @@ +/*! + * jQuery JavaScript Library v1.10.2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03T13:48Z + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<10 + // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + location = window.location, + document = window.document, + docElem = document.documentElement, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.10.2", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + /* jshint eqeqeq: false */ + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + var key; + + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Support: IE<9 + // Handle iteration over inherited properties before own properties. + if ( jQuery.support.ownLast ) { + for ( key in obj ) { + return core_hasOwn.call( obj, key ); + } + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations. + // Note: this method belongs to the css module but it's needed here for the support module. + // If support gets modularized, this method should be moved back to the css module. + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +/*! + * Sizzle CSS Selector Engine v1.10.2 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-07-03 + */ +(function( window, undefined ) { + +var i, + support, + cachedruns, + Expr, + getText, + isXML, + compile, + outermostContext, + sortInput, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + hasDuplicate = false, + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + return 0; + } + return 0; + }, + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Instance methods + hasOwn = ({}).hasOwnProperty, + arr = [], + pop = arr.pop, + push_native = arr.push, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + + rsibling = new RegExp( whitespace + "*[+~]" ), + rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), + funescape = function( _, escaped, escapedWhitespace ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + // Support: Firefox + // Workaround erroneous numeric interpretation of +"0x" + return high !== high || escapedWhitespace ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + (arr = slice.call( preferredDoc.childNodes )), + preferredDoc.childNodes + ); + // Support: Android<4.0 + // Detect silently failing push.apply + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + push_native.apply( target, slice.call(els) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + // Can't trust NodeList.length + while ( (target[j++] = els[i++]) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( documentIsHTML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // QSA path + if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { + nid = old = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return !!fn( div ); + } catch (e) { + return false; + } finally { + // Remove from its parent by default + if ( div.parentNode ) { + div.parentNode.removeChild( div ); + } + // release memory in IE + div = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split("|"), + i = attrs.length; + + while ( i-- ) { + Expr.attrHandle[ arr[i] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + ( ~b.sourceIndex || MAX_NEGATIVE ) - + ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc, + parent = doc.defaultView; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsHTML = !isXML( doc ); + + // Support: IE>8 + // If iframe document is assigned to "document" variable and if iframe has been reloaded, + // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 + // IE6-8 do not support the defaultView property so parent will be undefined + if ( parent && parent.attachEvent && parent !== parent.top ) { + parent.attachEvent( "onbeforeunload", function() { + setDocument(); + }); + } + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) + support.attributes = assert(function( div ) { + div.className = "i"; + return !div.getAttribute("className"); + }); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if getElementsByClassName can be trusted + support.getElementsByClassName = assert(function( div ) { + div.innerHTML = "<div class='a'></div><div class='a i'></div>"; + + // Support: Safari<4 + // Catch class over-caching + div.firstChild.className = "i"; + // Support: Opera<10 + // Catch gEBCN failure to find non-leading classes + return div.getElementsByClassName("i").length === 2; + }); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert(function( div ) { + docElem.appendChild( div ).id = expando; + return !doc.getElementsByName || !doc.getElementsByName( expando ).length; + }); + + // ID find and filter + if ( support.getById ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && documentIsHTML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + // Support: IE6/7 + // getElementById is not reliable as a find shortcut + delete Expr.find["ID"]; + + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See http://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = "<select><option selected=''></option></select>"; + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Support: Opera 10-12/IE8 + // ^= $= *= and empty values + // Should not select anything + // Support: Windows 8 Native Apps + // The type attribute is restricted during .innerHTML assignment + var input = doc.createElement("input"); + input.setAttribute( "type", "hidden" ); + div.appendChild( input ).setAttribute( "t", "" ); + + if ( div.querySelectorAll("[t^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + + /* Contains + ---------------------------------------------------------------------- */ + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); + + if ( compare ) { + // Disconnected nodes + if ( compare & 1 || + (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + + // Choose the first element that is related to our preferred document + if ( a === doc || contains(preferredDoc, a) ) { + return -1; + } + if ( b === doc || contains(preferredDoc, b) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } + + // Not directly comparable, sort on existence of method + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + return doc; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + if ( support.matchesSelector && documentIsHTML && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val === undefined ? + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + (val = elem.getAttributeNode(name)) && val.specified ? + val.value : + null : + val; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( (elem = results[i++]) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[3] && match[4] !== undefined ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { return true; } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifier + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push({ + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + }); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push({ + value: matched, + type: type, + matches: match + }); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + support.getById && context.nodeType === 9 && documentIsHTML && + Expr.relative[ tokens[1].type ] ) { + + context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + if ( !context ) { + return results; + } + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + !documentIsHTML, + results, + rsibling.test( selector ) + ); + return results; +} + +// One-time assignments + +// Sort stability +support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; + +// Support: Chrome<14 +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert(function( div1 ) { + // Should return 1, but returns 4 (following) + return div1.compareDocumentPosition( document.createElement("div") ) & 1; +}); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert(function( div ) { + div.innerHTML = "<a href='#'></a>"; + return div.firstChild.getAttribute("href") === "#" ; +}) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + }); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert(function( div ) { + div.innerHTML = "<input/>"; + div.firstChild.setAttribute( "value", "" ); + return div.firstChild.getAttribute( "value" ) === ""; +}) ) { + addHandle( "value", function( elem, name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + }); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert(function( div ) { + return div.getAttribute("disabled") == null; +}) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return (val = elem.getAttributeNode( name )) && val.specified ? + val.value : + elem[ name ] === true ? name.toLowerCase() : null; + } + }); +} + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + firingLength = 0; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( list && ( !fired || stack ) ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function( support ) { + + var all, a, input, select, fragment, opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = " <link/><table></table><a href='/a'>a</a><input type='checkbox'/>"; + + // Finish early in limited (non-browser) environments + all = div.getElementsByTagName("*") || []; + a = div.getElementsByTagName("a")[ 0 ]; + if ( !a || !a.style || !all.length ) { + return support; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + support.getSetAttribute = div.className !== "t"; + + // IE strips leading whitespace when .innerHTML is used + support.leadingWhitespace = div.firstChild.nodeType === 3; + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + support.tbody = !div.getElementsByTagName("tbody").length; + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + support.htmlSerialize = !!div.getElementsByTagName("link").length; + + // Get the style information from getAttribute + // (IE uses .cssText instead) + support.style = /top/.test( a.getAttribute("style") ); + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + support.hrefNormalized = a.getAttribute("href") === "/a"; + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + support.opacity = /^0.5/.test( a.style.opacity ); + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + support.cssFloat = !!a.style.cssFloat; + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + support.checkOn = !!input.value; + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + support.optSelected = opt.selected; + + // Tests for enctype support on a form (#6743) + support.enctype = !!document.createElement("form").enctype; + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>"; + + // Will be defined later + support.inlineBlockNeedsLayout = false; + support.shrinkWrapBlocks = false; + support.pixelPosition = false; + support.deleteExpando = true; + support.noCloneEvent = true; + support.reliableMarginRight = true; + support.boxSizingReliable = true; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Support: IE<9 + // Iteration over object's inherited properties before its own. + for ( i in jQuery( support ) ) { + break; + } + support.ownLast = i !== "0"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>"; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior. + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + + // Workaround failing boxSizing test due to offsetWidth returning wrong value + // with some non-1 values of body zoom, ticket #13543 + jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { + support.boxSizing = div.offsetWidth === 4; + }); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "<div></div>"; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})({}); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var ret, thisCache, + internalKey = jQuery.expando, + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + // Avoid exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( typeof name === "string" ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, i, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + i = name.length; + while ( i-- ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + /* jshint eqeqeq: false */ + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + /* jshint eqeqeq: true */ + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "applet": true, + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + data = null, + i = 0, + elem = this[0]; + + // Special expections of .data basically thwart jQuery.access, + // so implement the relevant behavior ourselves + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( name.indexOf("data-") === 0 ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return arguments.length > 1 ? + + // Sets one value + this.each(function() { + jQuery.data( this, key, value ); + }) : + + // Gets one value + // Try to fetch any internally stored data first + elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n\f]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value; + + if ( typeof stateVal === "boolean" && type === "string" ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // Use proper attribute retrieval(#6932, #12072) + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { + optionSet = true; + } + } + + // force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( jQuery.expr.match.bool.test( name ) ) { + // Set corresponding property to false + if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + elem[ propName ] = false; + // Support: IE<9 + // Also clear defaultChecked/defaultSelected (if appropriate) + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? + ret : + ( elem[ name ] = value ); + + } else { + return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? + ret : + elem[ name ]; + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + return tabindex ? + parseInt( tabindex, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + -1; + } + } + } +}); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { + var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; + + jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? + function( elem, name, isXML ) { + var fn = jQuery.expr.attrHandle[ name ], + ret = isXML ? + undefined : + /* jshint eqeqeq: false */ + (jQuery.expr.attrHandle[ name ] = undefined) != + getter( elem, name, isXML ) ? + + name.toLowerCase() : + null; + jQuery.expr.attrHandle[ name ] = fn; + return ret; + } : + function( elem, name, isXML ) { + return isXML ? + undefined : + elem[ jQuery.camelCase( "default-" + name ) ] ? + name.toLowerCase() : + null; + }; +}); + +// fix oldIE attroperties +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = { + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = + // Some attributes are constructed with empty-string values when not defined + function( elem, name, isXML ) { + var ret; + return isXML ? + undefined : + (ret = elem.getAttributeNode( name )) && ret.value !== "" ? + ret.value : + null; + }; + jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ret.specified ? + ret.value : + undefined; + }, + set: nodeHook.set + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }; + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }; +} + +jQuery.each([ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +}); + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }; + if ( !jQuery.support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + // Support: Webkit + // "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + }; + } +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && + jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG <use> instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + /* jshint eqeqeq: false */ + for ( ; cur != this; cur = cur.parentNode || this ) { + /* jshint eqeqeq: true */ + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== safeActiveElement() && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === safeActiveElement() && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + }, + + // For cross-browser consistency, don't fire native .click() on links + _default: function( event ) { + return jQuery.nodeName( event.target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +var isSimple = /^.[^:#\[\.,]*$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, + ret = [], + self = this, + len = self.length; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = this.selector ? this.selector + " " + selector : selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector || [], true) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector || [], false) ); + }, + + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { + // Always skip document fragments + if ( cur.nodeType < 11 && (pos ? + pos.index(cur) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector(cur, selectors)) ) { + + cur = ret.push( cur ); + break; + } + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + if ( this.length > 1 ) { + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + ret = jQuery.unique( ret ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 && elem.nodeType === 1 ? + jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : + jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + })); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + /* jshint -W018 */ + return !!qualifier.call( elem, i, elem ) !== not; + }); + + } + + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + }); + + } + + if ( typeof qualifier === "string" ) { + if ( isSimple.test( qualifier ) ) { + return jQuery.filter( qualifier, elements, not ); + } + + qualifier = jQuery.filter( qualifier, elements ); + } + + return jQuery.grep( elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /<tbody/i, + rhtml = /<|&#?\w+;/, + rnoInnerhtml = /<(?:script|style|link)/i, + manipulation_rcheckableType = /^(?:checkbox|radio)$/i, + // checked="checked" or checked + rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, + rscriptType = /^$|\/(?:java|ecma)script/i, + rscriptTypeMasked = /^true\/(.*)/, + rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "<select multiple='multiple'>", "</select>" ], + legend: [ 1, "<fieldset>", "</fieldset>" ], + area: [ 1, "<map>", "</map>" ], + param: [ 1, "<object>", "</object>" ], + thead: [ 1, "<table>", "</table>" ], + tr: [ 2, "<table><tbody>", "</tbody></table>" ], + col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ], + td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>" ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + append: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip( arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + elems = selector ? jQuery.filter( selector, this ) : this, + i = 0; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1></$2>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var + // Snapshot the DOM in case .domManip sweeps something relevant into its fragment + args = jQuery.map( this, function( elem ) { + return [ elem.nextSibling, elem.parentNode ]; + }), + i = 0; + + // Make the changes, replacing each context element with the new content + this.domManip( arguments, function( elem ) { + var next = args[ i++ ], + parent = args[ i++ ]; + + if ( parent ) { + // Don't use the snapshot next if it has moved (#13810) + if ( next && next.parentNode !== parent ) { + next = this.nextSibling; + } + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + // Allow new content to include elements from the context set + }, true ); + + // Force removal if there was no new content (e.g., from empty arguments) + return i ? this : this.remove(); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, callback, allowIntersection ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, self.html() ); + } + self.domManip( args, callback, allowIntersection ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( this[i], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery._evalUrl( node.src ); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +// Support: IE<8 +// Manipulating tables requires a tbody +function manipulationTarget( elem, content ) { + return jQuery.nodeName( elem, "table" ) && + jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? + + elem.getElementsByTagName("tbody")[0] || + elem.appendChild( elem.ownerDocument.createElement("tbody") ) : + elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted <tbody> from table fragments + if ( !jQuery.support.tbody ) { + + // String was a <table>, *may* have spurious <tbody> + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare <thead> or <tfoot> + wrap[1] === "<table>" && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + }, + + _evalUrl: function( url ) { + return jQuery.ajax({ + url: url, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } +}); +jQuery.fn.extend({ + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each(function() { + if ( isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("<iframe frameborder='0' width='0' height='0'/>") + .css( "cssText", "display:block !important" ) + ).appendTo( doc.documentElement ); + + // Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse + doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document; + doc.write("<!doctype html><html><body>"); + doc.close(); + + display = actualDisplay( nodeName, doc ); + iframe.detach(); + } + + // Store the correct default display + elemdisplay[ nodeName ] = display; + } + + return display; +} + +// Called ONLY from within css_defaultDisplay +function actualDisplay( name, doc ) { + var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + display = jQuery.css( elem[0], "display" ); + elem.remove(); + return display; +} + +jQuery.each([ "height", "width" ], function( i, name ) { + jQuery.cssHooks[ name ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + // certain elements can have dimension info if we invisibly show them + // however, it must have a current display style that would benefit from this + return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + jQuery.swap( elem, cssShow, function() { + return getWidthOrHeight( elem, name, extra ); + }) : + getWidthOrHeight( elem, name, extra ); + } + }, + + set: function( elem, value, extra ) { + var styles = extra && getStyles( elem ); + return setPositiveNumber( elem, value, extra ? + augmentWidthOrHeight( + elem, + name, + extra, + jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + styles + ) : 0 + ); + } + }; +}); + +if ( !jQuery.support.opacity ) { + jQuery.cssHooks.opacity = { + get: function( elem, computed ) { + // IE uses filters for opacity + return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ? + ( 0.01 * parseFloat( RegExp.$1 ) ) + "" : + computed ? "1" : ""; + }, + + set: function( elem, value ) { + var style = elem.style, + currentStyle = elem.currentStyle, + opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "", + filter = currentStyle && currentStyle.filter || style.filter || ""; + + // IE has trouble with opacity if it does not have layout + // Force it by setting the zoom level + style.zoom = 1; + + // if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652 + // if value === "", then remove inline opacity #12685 + if ( ( value >= 1 || value === "" ) && + jQuery.trim( filter.replace( ralpha, "" ) ) === "" && + style.removeAttribute ) { + + // Setting style.filter to null, "" & " " still leave "filter:" in the cssText + // if "filter:" is present at all, clearType is disabled, we want to avoid this + // style.removeAttribute is IE Only, but so apparently is this code path... + style.removeAttribute( "filter" ); + + // if there is no filter style applied in a css rule or unset inline opacity, we are done + if ( value === "" || currentStyle && !currentStyle.filter ) { + return; + } + } + + // otherwise, set new filter values + style.filter = ralpha.test( filter ) ? + filter.replace( ralpha, opacity ) : + filter + " " + opacity; + } + }; +} + +// These hooks cannot be added until DOM ready because the support test +// for it is not run until after DOM ready +jQuery(function() { + if ( !jQuery.support.reliableMarginRight ) { + jQuery.cssHooks.marginRight = { + get: function( elem, computed ) { + if ( computed ) { + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + // Work around by temporarily setting element display to inline-block + return jQuery.swap( elem, { "display": "inline-block" }, + curCSS, [ elem, "marginRight" ] ); + } + } + }; + } + + // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 + // getComputedStyle returns percent when specified for top/left/bottom/right + // rather than make the css module depend on the offset module, we just check for it here + if ( !jQuery.support.pixelPosition && jQuery.fn.position ) { + jQuery.each( [ "top", "left" ], function( i, prop ) { + jQuery.cssHooks[ prop ] = { + get: function( elem, computed ) { + if ( computed ) { + computed = curCSS( elem, prop ); + // if curCSS returns percentage, fallback to offset + return rnumnonpx.test( computed ) ? + jQuery( elem ).position()[ prop ] + "px" : + computed; + } + } + }; + }); + } + +}); + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.hidden = function( elem ) { + // Support: Opera <= 12.12 + // Opera reports offsetWidths and offsetHeights less than zero on some elements + return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 || + (!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none"); + }; + + jQuery.expr.filters.visible = function( elem ) { + return !jQuery.expr.filters.hidden( elem ); + }; +} + +// These hooks are used by animate to expand properties +jQuery.each({ + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // assumes a single number if not a string + parts = typeof value === "string" ? value.split(" ") : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( !rmargin.test( prefix ) ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +}); +var r20 = /%20/g, + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +jQuery.fn.extend({ + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map(function(){ + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + }) + .filter(function(){ + var type = this.type; + // Use .is(":disabled") so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !manipulation_rcheckableType.test( type ) ); + }) + .map(function( i, elem ){ + var val = jQuery( this ).val(); + + return val == null ? + null : + jQuery.isArray( val ) ? + jQuery.map( val, function( val ){ + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }) : + { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + }).get(); + } +}); + +//Serialize an array of form elements or a set of +//key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, value ) { + // If value is a function, invoke it and return its value + value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value ); + s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value ); + }; + + // Set traditional to true for jQuery <= 1.3.2 behavior. + if ( traditional === undefined ) { + traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + }); + + } else { + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ).replace( r20, "+" ); +}; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( jQuery.isArray( obj ) ) { + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + // Item is non-scalar (array or object), encode its numeric index. + buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add ); + } + }); + + } else if ( !traditional && jQuery.type( obj ) === "object" ) { + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + // Serialize scalar item. + add( prefix, obj ); + } +} +jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; +}); + +jQuery.fn.extend({ + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + } +}); +var + // Document location + ajaxLocParts, + ajaxLocation, + ajax_nonce = jQuery.now(), + + ajax_rquery = /\?/, + rhash = /#.*$/, + rts = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/, + + // Keep a copy of the old load method + _load = jQuery.fn.load, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat("*"); + +// #8138, IE may throw an exception when accessing +// a field from window.location if document.domain has been set +try { + ajaxLocation = location.href; +} catch( e ) { + // Use the href attribute of an A element + // since IE will modify it given document.location + ajaxLocation = document.createElement( "a" ); + ajaxLocation.href = ""; + ajaxLocation = ajaxLocation.href; +} + +// Segment location into parts +ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || []; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || []; + + if ( jQuery.isFunction( func ) ) { + // For each dataType in the dataTypeExpression + while ( (dataType = dataTypes[i++]) ) { + // Prepend if requested + if ( dataType[0] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + (structure[ dataType ] = structure[ dataType ] || []).unshift( func ); + + // Otherwise append + } else { + (structure[ dataType ] = structure[ dataType ] || []).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + }); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var deep, key, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +jQuery.fn.load = function( url, params, callback ) { + if ( typeof url !== "string" && _load ) { + return _load.apply( this, arguments ); + } + + var selector, response, type, + self = this, + off = url.indexOf(" "); + + if ( off >= 0 ) { + selector = url.slice( off, url.length ); + url = url.slice( 0, off ); + } + + // If it's a function + if ( jQuery.isFunction( params ) ) { + + // We assume that it's the callback + callback = params; + params = undefined; + + // Otherwise, build a param string + } else if ( params && typeof params === "object" ) { + type = "POST"; + } + + // If we have elements to modify, make the request + if ( self.length > 0 ) { + jQuery.ajax({ + url: url, + + // if "type" variable is undefined, then "GET" method will be used + type: type, + dataType: "html", + data: params + }).done(function( responseText ) { + + // Save response for use in complete callback + response = arguments; + + self.html( selector ? + + // If a selector was specified, locate the right elements in a dummy div + // Exclude scripts to avoid IE 'Permission Denied' errors + jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) : + + // Otherwise use the full result + responseText ); + + }).complete( callback && function( jqXHR, status ) { + self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] ); + }); + } + + return this; +}; + +// Attach a bunch of functions for handling common AJAX events +jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){ + jQuery.fn[ type ] = function( fn ){ + return this.on( type, fn ); + }; +}); + +jQuery.extend({ + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: ajaxLocation, + type: "GET", + isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /xml/, + html: /html/, + json: /json/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": jQuery.parseJSON, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var // Cross-domain detection vars + parts, + // Loop variable + i, + // URL without anti-cache param + cacheURL, + // Response headers as string + responseHeadersString, + // timeout handle + timeoutTimer, + + // To know if global events are to be dispatched + fireGlobals, + + transport, + // Response headers + responseHeaders, + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + // Callbacks context + callbackContext = s.context || s, + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks("once memory"), + // Status-dependent callbacks + statusCode = s.statusCode || {}, + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + // The jqXHR state + state = 0, + // Default abort message + strAbort = "canceled", + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( state === 2 ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( (match = rheaders.exec( responseHeadersString )) ) { + responseHeaders[ match[1].toLowerCase() ] = match[ 2 ]; + } + } + match = responseHeaders[ key.toLowerCase() ]; + } + return match == null ? null : match; + }, + + // Raw string + getAllResponseHeaders: function() { + return state === 2 ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + var lname = name.toLowerCase(); + if ( !state ) { + name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( !state ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( state < 2 ) { + for ( code in map ) { + // Lazy-add the new callback in a way that preserves old ones + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } else { + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ).complete = completeDeferred.add; + jqXHR.success = jqXHR.done; + jqXHR.error = jqXHR.fail; + + // Remove hash character (#7531: and string promotion) + // Add protocol if not provided (#5866: IE7 issue with protocol-less urls) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""]; + + // A cross-domain request is in order when we have a protocol:host:port mismatch + if ( s.crossDomain == null ) { + parts = rurl.exec( s.url.toLowerCase() ); + s.crossDomain = !!( parts && + ( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] || + ( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !== + ( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) ) + ); + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( state === 2 ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + fireGlobals = s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger("ajaxStart"); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + cacheURL = s.url; + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // If data is available, append data to url + if ( s.data ) { + cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data ); + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add anti-cache in url if needed + if ( s.cache === false ) { + s.url = rts.test( cacheURL ) ? + + // If there is already a '_' parameter, set its value + cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) : + + // Otherwise add one to the end + cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++; + } + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ? + s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) { + // Abort if not done already and return + return jqXHR.abort(); + } + + // aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + for ( i in { success: 1, error: 1, complete: 1 } ) { + jqXHR[ i ]( s[ i ] ); + } + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = setTimeout(function() { + jqXHR.abort("timeout"); + }, s.timeout ); + } + + try { + state = 1; + transport.send( requestHeaders, done ); + } catch ( e ) { + // Propagate exception as error if not done + if ( state < 2 ) { + done( -1, e ); + // Simply rethrow otherwise + } else { + throw e; + } + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Called once + if ( state === 2 ) { + return; + } + + // State is "done" now + state = 2; + + // Clear timeout if it exists + if ( timeoutTimer ) { + clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader("Last-Modified"); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader("etag"); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + // We extract error from statusText + // then normalize statusText and status for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger("ajaxStop"); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +}); + +jQuery.each( [ "get", "post" ], function( i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + // shift arguments if data argument was omitted + if ( jQuery.isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + return jQuery.ajax({ + url: url, + type: method, + dataType: type, + data: data, + success: callback + }); + }; +}); + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + var firstDataType, ct, finalDataType, type, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader("Content-Type"); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s[ "throws" ] ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} +// Install script dataType +jQuery.ajaxSetup({ + accepts: { + script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /(?:java|ecma)script/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +}); + +// Handle cache's special case and global +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + s.global = false; + } +}); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function(s) { + + // This transport only deals with cross domain requests + if ( s.crossDomain ) { + + var script, + head = document.head || jQuery("head")[0] || document.documentElement; + + return { + + send: function( _, callback ) { + + script = document.createElement("script"); + + script.async = true; + + if ( s.scriptCharset ) { + script.charset = s.scriptCharset; + } + + script.src = s.url; + + // Attach handlers for all browsers + script.onload = script.onreadystatechange = function( _, isAbort ) { + + if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) { + + // Handle memory leak in IE + script.onload = script.onreadystatechange = null; + + // Remove the script + if ( script.parentNode ) { + script.parentNode.removeChild( script ); + } + + // Dereference the script + script = null; + + // Callback if not abort + if ( !isAbort ) { + callback( 200, "success" ); + } + } + }; + + // Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending + // Use native DOM manipulation to avoid our domManip AJAX trickery + head.insertBefore( script, head.firstChild ); + }, + + abort: function() { + if ( script ) { + script.onload( undefined, true ); + } + } + }; + } +}); +var oldCallbacks = [], + rjsonp = /(=)\?(?=&|$)|\?\?/; + +// Default jsonp settings +jQuery.ajaxSetup({ + jsonp: "callback", + jsonpCallback: function() { + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) ); + this[ callback ] = true; + return callback; + } +}); + +// Detect, normalize options and install callbacks for jsonp requests +jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { + + var callbackName, overwritten, responseContainer, + jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? + "url" : + typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data" + ); + + // Handle iff the expected data type is "jsonp" or we have a parameter to set + if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { + + // Get callback name, remembering preexisting value associated with it + callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? + s.jsonpCallback() : + s.jsonpCallback; + + // Insert callback into url or form data + if ( jsonProp ) { + s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); + } else if ( s.jsonp !== false ) { + s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; + } + + // Use data converter to retrieve json after script execution + s.converters["script json"] = function() { + if ( !responseContainer ) { + jQuery.error( callbackName + " was not called" ); + } + return responseContainer[ 0 ]; + }; + + // force json dataType + s.dataTypes[ 0 ] = "json"; + + // Install callback + overwritten = window[ callbackName ]; + window[ callbackName ] = function() { + responseContainer = arguments; + }; + + // Clean-up function (fires after converters) + jqXHR.always(function() { + // Restore preexisting value + window[ callbackName ] = overwritten; + + // Save back as free + if ( s[ callbackName ] ) { + // make sure that re-using the options doesn't screw things around + s.jsonpCallback = originalSettings.jsonpCallback; + + // save the callback name for future use + oldCallbacks.push( callbackName ); + } + + // Call if it was a function and we have a response + if ( responseContainer && jQuery.isFunction( overwritten ) ) { + overwritten( responseContainer[ 0 ] ); + } + + responseContainer = overwritten = undefined; + }); + + // Delegate to script + return "script"; + } +}); +var xhrCallbacks, xhrSupported, + xhrId = 0, + // #5280: Internet Explorer will keep connections alive if we don't abort on unload + xhrOnUnloadAbort = window.ActiveXObject && function() { + // Abort all pending requests + var key; + for ( key in xhrCallbacks ) { + xhrCallbacks[ key ]( undefined, true ); + } + }; + +// Functions to create xhrs +function createStandardXHR() { + try { + return new window.XMLHttpRequest(); + } catch( e ) {} +} + +function createActiveXHR() { + try { + return new window.ActiveXObject("Microsoft.XMLHTTP"); + } catch( e ) {} +} + +// Create the request object +// (This is still attached to ajaxSettings for backward compatibility) +jQuery.ajaxSettings.xhr = window.ActiveXObject ? + /* Microsoft failed to properly + * implement the XMLHttpRequest in IE7 (can't request local files), + * so we use the ActiveXObject when it is available + * Additionally XMLHttpRequest can be disabled in IE7/IE8 so + * we need a fallback. + */ + function() { + return !this.isLocal && createStandardXHR() || createActiveXHR(); + } : + // For all other browsers, use the standard XMLHttpRequest object + createStandardXHR; + +// Determine support properties +xhrSupported = jQuery.ajaxSettings.xhr(); +jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +xhrSupported = jQuery.support.ajax = !!xhrSupported; + +// Create transport if the browser can provide an xhr +if ( xhrSupported ) { + + jQuery.ajaxTransport(function( s ) { + // Cross domain only allowed if supported through XMLHttpRequest + if ( !s.crossDomain || jQuery.support.cors ) { + + var callback; + + return { + send: function( headers, complete ) { + + // Get a new xhr + var handle, i, + xhr = s.xhr(); + + // Open the socket + // Passing null username, generates a login popup on Opera (#2865) + if ( s.username ) { + xhr.open( s.type, s.url, s.async, s.username, s.password ); + } else { + xhr.open( s.type, s.url, s.async ); + } + + // Apply custom fields if provided + if ( s.xhrFields ) { + for ( i in s.xhrFields ) { + xhr[ i ] = s.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( s.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( s.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !s.crossDomain && !headers["X-Requested-With"] ) { + headers["X-Requested-With"] = "XMLHttpRequest"; + } + + // Need an extra try/catch for cross domain requests in Firefox 3 + try { + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + } catch( err ) {} + + // Do send the request + // This may raise an exception which is actually + // handled in jQuery.ajax (so no try/catch here) + xhr.send( ( s.hasContent && s.data ) || null ); + + // Listener + callback = function( _, isAbort ) { + var status, responseHeaders, statusText, responses; + + // Firefox throws exceptions when accessing properties + // of an xhr when a network error occurred + // http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE) + try { + + // Was never called and is aborted or complete + if ( callback && ( isAbort || xhr.readyState === 4 ) ) { + + // Only called once + callback = undefined; + + // Do not keep as active anymore + if ( handle ) { + xhr.onreadystatechange = jQuery.noop; + if ( xhrOnUnloadAbort ) { + delete xhrCallbacks[ handle ]; + } + } + + // If it's an abort + if ( isAbort ) { + // Abort it manually if needed + if ( xhr.readyState !== 4 ) { + xhr.abort(); + } + } else { + responses = {}; + status = xhr.status; + responseHeaders = xhr.getAllResponseHeaders(); + + // When requesting binary data, IE6-9 will throw an exception + // on any attempt to access responseText (#11426) + if ( typeof xhr.responseText === "string" ) { + responses.text = xhr.responseText; + } + + // Firefox throws an exception when accessing + // statusText for faulty cross-domain requests + try { + statusText = xhr.statusText; + } catch( e ) { + // We normalize with Webkit giving an empty statusText + statusText = ""; + } + + // Filter status for non standard behaviors + + // If the request is local and we have data: assume a success + // (success with no data won't get notified, that's the best we + // can do given current implementations) + if ( !status && s.isLocal && !s.crossDomain ) { + status = responses.text ? 200 : 404; + // IE - #1450: sometimes returns 1223 when it should be 204 + } else if ( status === 1223 ) { + status = 204; + } + } + } + } catch( firefoxAccessException ) { + if ( !isAbort ) { + complete( -1, firefoxAccessException ); + } + } + + // Call complete if needed + if ( responses ) { + complete( status, statusText, responses, responseHeaders ); + } + }; + + if ( !s.async ) { + // if we're in sync mode we fire the callback + callback(); + } else if ( xhr.readyState === 4 ) { + // (IE6 & IE7) if it's in cache and has been + // retrieved directly we need to fire the callback + setTimeout( callback ); + } else { + handle = ++xhrId; + if ( xhrOnUnloadAbort ) { + // Create the active xhrs callbacks list if needed + // and attach the unload handler + if ( !xhrCallbacks ) { + xhrCallbacks = {}; + jQuery( window ).unload( xhrOnUnloadAbort ); + } + // Add to list of active xhrs callbacks + xhrCallbacks[ handle ] = callback; + } + xhr.onreadystatechange = callback; + } + }, + + abort: function() { + if ( callback ) { + callback( undefined, true ); + } + } + }; + } + }); +} +var fxNow, timerId, + rfxtypes = /^(?:toggle|show|hide)$/, + rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ), + rrun = /queueHooks$/, + animationPrefilters = [ defaultPrefilter ], + tweeners = { + "*": [function( prop, value ) { + var tween = this.createTween( prop, value ), + target = tween.cur(), + parts = rfxnum.exec( value ), + unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) && + rfxnum.exec( jQuery.css( tween.elem, prop ) ), + scale = 1, + maxIterations = 20; + + if ( start && start[ 3 ] !== unit ) { + // Trust units reported by jQuery.css + unit = unit || start[ 3 ]; + + // Make sure we update the tween properties later on + parts = parts || []; + + // Iteratively approximate from a nonzero starting point + start = +target || 1; + + do { + // If previous iteration zeroed out, double until we get *something* + // Use a string for doubling factor so we don't accidentally see scale as unchanged below + scale = scale || ".5"; + + // Adjust and apply + start = start / scale; + jQuery.style( tween.elem, prop, start + unit ); + + // Update scale, tolerating zero or NaN from tween.cur() + // And breaking the loop if scale is unchanged or perfect, or if we've just had enough + } while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations ); + } + + // Update tween properties + if ( parts ) { + start = tween.start = +start || +target || 0; + tween.unit = unit; + // If a +=/-= token was provided, we're doing a relative animation + tween.end = parts[ 1 ] ? + start + ( parts[ 1 ] + 1 ) * parts[ 2 ] : + +parts[ 2 ]; + } + + return tween; + }] + }; + +// Animations created synchronously will run synchronously +function createFxNow() { + setTimeout(function() { + fxNow = undefined; + }); + return ( fxNow = jQuery.now() ); +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( (tween = collection[ index ].call( animation, prop, value )) ) { + + // we're done with this property + return tween; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = animationPrefilters.length, + deferred = jQuery.Deferred().always( function() { + // don't match elem in the :animated selector + delete tick.elem; + }), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + // archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ]); + + if ( percent < 1 && length ) { + return remaining; + } else { + deferred.resolveWith( elem, [ animation ] ); + return false; + } + }, + animation = deferred.promise({ + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { specialEasing: {} }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + // if we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length ; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // resolve when we played the last frame + // otherwise, reject + if ( gotoEnd ) { + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + }), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length ; index++ ) { + result = animationPrefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( jQuery.isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + }) + ); + + // attach callbacks from options + return animation.progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = jQuery.camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( jQuery.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // not quite $.extend, this wont overwrite keys already present. + // also - reusing 'index' from above because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweener: function( props, callback ) { + if ( jQuery.isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.split(" "); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length ; index++ ) { + prop = props[ index ]; + tweeners[ prop ] = tweeners[ prop ] || []; + tweeners[ prop ].unshift( callback ); + } + }, + + prefilter: function( callback, prepend ) { + if ( prepend ) { + animationPrefilters.unshift( callback ); + } else { + animationPrefilters.push( callback ); + } + } +}); + +function defaultPrefilter( elem, props, opts ) { + /* jshint validthis: true */ + var prop, value, toggle, tween, hooks, oldfire, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHidden( elem ), + dataShow = jQuery._data( elem, "fxshow" ); + + // handle queue: false promises + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always(function() { + // doing this makes sure that the complete handler will be called + // before this completes + anim.always(function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + }); + }); + } + + // height/width overflow pass + if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) { + // Make sure that nothing sneaks out + // Record all 3 overflow attributes because IE does not + // change the overflow attribute when overflowX and + // overflowY are set to the same value + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Set display property to inline-block for height/width + // animations on inline elements that are having width/height animated + if ( jQuery.css( elem, "display" ) === "inline" && + jQuery.css( elem, "float" ) === "none" ) { + + // inline-level elements accept inline-block; + // block-level elements need to be inline with layout + if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) { + style.display = "inline-block"; + + } else { + style.zoom = 1; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + if ( !jQuery.support.shrinkWrapBlocks ) { + anim.always(function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + }); + } + } + + + // show/hide pass + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.exec( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + continue; + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + if ( !jQuery.isEmptyObject( orig ) ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = jQuery._data( elem, "fxshow", {} ); + } + + // store state if its toggle - enables .stop().toggle() to "reverse" + if ( toggle ) { + dataShow.hidden = !hidden; + } + if ( hidden ) { + jQuery( elem ).show(); + } else { + anim.done(function() { + jQuery( elem ).hide(); + }); + } + anim.done(function() { + var prop; + jQuery._removeData( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + }); + for ( prop in orig ) { + tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = tween.start; + if ( hidden ) { + tween.end = tween.start; + tween.start = prop === "width" || prop === "height" ? 1 : 0; + } + } + } + } +} + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || "swing"; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + if ( tween.elem[ tween.prop ] != null && + (!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) { + return tween.elem[ tween.prop ]; + } + + // passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails + // so, simple values such as "10px" are parsed to Float. + // complex values such as "rotate(1rad)" are returned as is. + result = jQuery.css( tween.elem, tween.prop, "" ); + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + // use step hook for back compat - use cssHook if its there - use .style if its + // available and use plain properties where available + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 +// Panic based approach to setting things on disconnected nodes + +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.each([ "toggle", "show", "hide" ], function( i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +}); + +jQuery.fn.extend({ + fadeTo: function( speed, to, easing, callback ) { + + // show any hidden elements after setting opacity to 0 + return this.filter( isHidden ).css( "opacity", 0 ).show() + + // animate to the value specified + .end().animate({ opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || jQuery._data( this, "finish" ) ) { + anim.stop( true ); + } + }; + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue && type !== false ) { + this.queue( type || "fx", [] ); + } + + return this.each(function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = jQuery._data( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) { + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // start the next in the queue if the last step wasn't forced + // timers currently will call their complete callbacks, which will dequeue + // but only if they were gotoEnd + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + }); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each(function() { + var index, + data = jQuery._data( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // enable finishing flag on private data + data.finish = true; + + // empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // turn off finishing flag + delete data.finish; + }); + } +}); + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + attrs = { height: type }, + i = 0; + + // if we include width, step value is 1 to do all cssExpand values, + // if we don't include width, step value is 2 to skip over Left and Right + includeWidth = includeWidth? 1 : 0; + for( ; i < 4 ; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +// Generate shortcuts for custom animations +jQuery.each({ + slideDown: genFx("show"), + slideUp: genFx("hide"), + slideToggle: genFx("toggle"), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +}); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + jQuery.isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing + }; + + opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration : + opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default; + + // normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( jQuery.isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p*Math.PI ) / 2; + } +}; + +jQuery.timers = []; +jQuery.fx = Tween.prototype.init; +jQuery.fx.tick = function() { + var timer, + timers = jQuery.timers, + i = 0; + + fxNow = jQuery.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + // Checks the timer has not already been removed + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + if ( timer() && jQuery.timers.push( timer ) ) { + jQuery.fx.start(); + } +}; + +jQuery.fx.interval = 13; + +jQuery.fx.start = function() { + if ( !timerId ) { + timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval ); + } +}; + +jQuery.fx.stop = function() { + clearInterval( timerId ); + timerId = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + // Default speed + _default: 400 +}; + +// Back Compat <1.8 extension point +jQuery.fx.step = {}; + +if ( jQuery.expr && jQuery.expr.filters ) { + jQuery.expr.filters.animated = function( elem ) { + return jQuery.grep(jQuery.timers, function( fn ) { + return elem === fn.elem; + }).length; + }; +} +jQuery.fn.offset = function( options ) { + if ( arguments.length ) { + return options === undefined ? + this : + this.each(function( i ) { + jQuery.offset.setOffset( this, options, i ); + }); + } + + var docElem, win, + box = { top: 0, left: 0 }, + elem = this[ 0 ], + doc = elem && elem.ownerDocument; + + if ( !doc ) { + return; + } + + docElem = doc.documentElement; + + // Make sure it's not a disconnected DOM node + if ( !jQuery.contains( docElem, elem ) ) { + return box; + } + + // If we don't have gBCR, just use 0,0 rather than error + // BlackBerry 5, iOS 3 (original iPhone) + if ( typeof elem.getBoundingClientRect !== core_strundefined ) { + box = elem.getBoundingClientRect(); + } + win = getWindow( doc ); + return { + top: box.top + ( win.pageYOffset || docElem.scrollTop ) - ( docElem.clientTop || 0 ), + left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 ) + }; +}; + +jQuery.offset = { + + setOffset: function( elem, options, i ) { + var position = jQuery.css( elem, "position" ); + + // set position first, in-case top/left are set even on static elem + if ( position === "static" ) { + elem.style.position = "relative"; + } + + var curElem = jQuery( elem ), + curOffset = curElem.offset(), + curCSSTop = jQuery.css( elem, "top" ), + curCSSLeft = jQuery.css( elem, "left" ), + calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1, + props = {}, curPosition = {}, curTop, curLeft; + + // need to be able to calculate position if either top or left is auto and position is either absolute or fixed + if ( calculatePosition ) { + curPosition = curElem.position(); + curTop = curPosition.top; + curLeft = curPosition.left; + } else { + curTop = parseFloat( curCSSTop ) || 0; + curLeft = parseFloat( curCSSLeft ) || 0; + } + + if ( jQuery.isFunction( options ) ) { + options = options.call( elem, i, curOffset ); + } + + if ( options.top != null ) { + props.top = ( options.top - curOffset.top ) + curTop; + } + if ( options.left != null ) { + props.left = ( options.left - curOffset.left ) + curLeft; + } + + if ( "using" in options ) { + options.using.call( elem, props ); + } else { + curElem.css( props ); + } + } +}; + + +jQuery.fn.extend({ + + position: function() { + if ( !this[ 0 ] ) { + return; + } + + var offsetParent, offset, + parentOffset = { top: 0, left: 0 }, + elem = this[ 0 ]; + + // fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent + if ( jQuery.css( elem, "position" ) === "fixed" ) { + // we assume that getBoundingClientRect is available when computed position is fixed + offset = elem.getBoundingClientRect(); + } else { + // Get *real* offsetParent + offsetParent = this.offsetParent(); + + // Get correct offsets + offset = this.offset(); + if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { + parentOffset = offsetParent.offset(); + } + + // Add offsetParent borders + parentOffset.top += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ); + parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ); + } + + // Subtract parent offsets and element margins + // note: when an element has margin: auto the offsetLeft and marginLeft + // are the same in Safari causing offset.left to incorrectly be 0 + return { + top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), + left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true) + }; + }, + + offsetParent: function() { + return this.map(function() { + var offsetParent = this.offsetParent || docElem; + while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) { + offsetParent = offsetParent.offsetParent; + } + return offsetParent || docElem; + }); + } +}); + + +// Create scrollLeft and scrollTop methods +jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) { + var top = /Y/.test( prop ); + + jQuery.fn[ method ] = function( val ) { + return jQuery.access( this, function( elem, method, val ) { + var win = getWindow( elem ); + + if ( val === undefined ) { + return win ? (prop in win) ? win[ prop ] : + win.document.documentElement[ method ] : + elem[ method ]; + } + + if ( win ) { + win.scrollTo( + !top ? val : jQuery( win ).scrollLeft(), + top ? val : jQuery( win ).scrollTop() + ); + + } else { + elem[ method ] = val; + } + }, method, val, arguments.length, null ); + }; +}); + +function getWindow( elem ) { + return jQuery.isWindow( elem ) ? + elem : + elem.nodeType === 9 ? + elem.defaultView || elem.parentWindow : + false; +} +// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods +jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { + jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) { + // margin is only for outerHeight, outerWidth + jQuery.fn[ funcName ] = function( margin, value ) { + var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), + extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); + + return jQuery.access( this, function( elem, type, value ) { + var doc; + + if ( jQuery.isWindow( elem ) ) { + // As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there + // isn't a whole lot we can do. See pull request at this URL for discussion: + // https://github.com/jquery/jquery/pull/764 + return elem.document.documentElement[ "client" + name ]; + } + + // Get document width or height + if ( elem.nodeType === 9 ) { + doc = elem.documentElement; + + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it. + return Math.max( + elem.body[ "scroll" + name ], doc[ "scroll" + name ], + elem.body[ "offset" + name ], doc[ "offset" + name ], + doc[ "client" + name ] + ); + } + + return value === undefined ? + // Get width or height on the element, requesting but not forcing parseFloat + jQuery.css( elem, type, extra ) : + + // Set width or height on the element + jQuery.style( elem, type, value, extra ); + }, type, chainable ? margin : undefined, chainable, null ); + }; + }); +}); +// Limit scope pollution from any deprecated API +// (function() { + +// The number of elements contained in the matched element set +jQuery.fn.size = function() { + return this.length; +}; + +jQuery.fn.andSelf = jQuery.fn.addBack; + +// })(); +if ( typeof module === "object" && module && typeof module.exports === "object" ) { + // Expose jQuery as module.exports in loaders that implement the Node + // module pattern (including browserify). Do not create the global, since + // the user will be storing it themselves locally, and globals are frowned + // upon in the Node module world. + module.exports = jQuery; +} else { + // Otherwise expose jQuery to the global object as usual + window.jQuery = window.$ = jQuery; + + // Register as a named AMD module, since jQuery can be concatenated with other + // files that may use define, but not via a proper concatenation script that + // understands anonymous AMD modules. A named AMD is safest and most robust + // way to register. Lowercase jquery is used because AMD module names are + // derived from file names, and jQuery is normally delivered in a lowercase + // file name. Do this after creating the global so that if an AMD module wants + // to call noConflict to hide this version of jQuery, it will work. + if ( typeof define === "function" && define.amd ) { + define( "jquery", [], function () { return jQuery; } ); + } +} + +})( window ); diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..f508c474824ad11aef235b4d6fd95e625577dbac Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_20_666666_40x40.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100644 index 0000000000000000000000000000000000000000..c303f85451840316af7bb04e5a501a0d27bb0c46 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_flat_10_000000_40x100.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_flat_10_000000_40x100.png new file mode 100644 index 0000000000000000000000000000000000000000..8901742a0a25e4a7bde7b549478e85b4a7871543 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_f6f6f6_1x400.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..b6ce4f269bb4a92b2c567842b804a8885fd9f5ea Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_fdf5ce_1x400.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..cdebd359be921fcbd2acce9a1ae82f7d48ebce36 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_65_ffffff_1x400.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000000000000000000000000000000000000..1de6dac3e92f0134959a77509012ba85d75638ff Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100644 index 0000000000000000000000000000000000000000..64743683416254eb67e8f2f5c66c2c4edd982ceb Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..69f185042f3ac187893bc9bc0f7f851cba349ed4 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100644 index 0000000000000000000000000000000000000000..d4e77a86dacbc66fc0ae8b3f91dc35a4dacef2fd Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-icons_222222_256x240.png b/assets/js/jquery-ui-1.11.4/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..e9c8e16ac5e7f61c843fbac290ce30c5de7e40b6 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-icons_222222_256x240.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-icons_228ef1_256x240.png b/assets/js/jquery-ui-1.11.4/images/ui-icons_228ef1_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..8d68c543e056482edc5b48a09a73de2636d5580f Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-icons_228ef1_256x240.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-icons_ef8c08_256x240.png b/assets/js/jquery-ui-1.11.4/images/ui-icons_ef8c08_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..18bbfe8215ac92fa1edd1f21a72bb6b14b4fa39d Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-icons_ef8c08_256x240.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-icons_ffd27a_256x240.png b/assets/js/jquery-ui-1.11.4/images/ui-icons_ffd27a_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..4435b497eb4f472cbb1bd75616da555f6d49d082 Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-icons_ffd27a_256x240.png differ diff --git a/assets/js/jquery-ui-1.11.4/images/ui-icons_ffffff_256x240.png b/assets/js/jquery-ui-1.11.4/images/ui-icons_ffffff_256x240.png new file mode 100644 index 0000000000000000000000000000000000000000..4d66f596e5967a460a37526e2130a55711eeca3c Binary files /dev/null and b/assets/js/jquery-ui-1.11.4/images/ui-icons_ffffff_256x240.png differ diff --git a/assets/js/jquery-ui-1.11.4/index.html b/assets/js/jquery-ui-1.11.4/index.html new file mode 100644 index 0000000000000000000000000000000000000000..5b262351b67335a34ee5d968184ee015fac6a919 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/index.html @@ -0,0 +1,513 @@ +<!doctype html> +<html lang="us"> +<head> + <meta charset="utf-8"> + <title>jQuery UI Example Page</title> + <link href="jquery-ui.css" rel="stylesheet"> + <style> + body{ + font: 62.5% "Trebuchet MS", sans-serif; + margin: 50px; + } + .demoHeaders { + margin-top: 2em; + } + #dialog-link { + padding: .4em 1em .4em 20px; + text-decoration: none; + position: relative; + } + #dialog-link span.ui-icon { + margin: 0 5px 0 0; + position: absolute; + left: .2em; + top: 50%; + margin-top: -8px; + } + #icons { + margin: 0; + padding: 0; + } + #icons li { + margin: 2px; + position: relative; + padding: 4px 0; + cursor: pointer; + float: left; + list-style: none; + } + #icons span.ui-icon { + float: left; + margin: 0 4px; + } + .fakewindowcontain .ui-widget-overlay { + position: absolute; + } + select { + width: 200px; + } + </style> +</head> +<body> + +<h1>Welcome to jQuery UI!</h1> + +<div class="ui-widget"> + <p>This page demonstrates the widgets and theme you selected in Download Builder. Please make sure you are using them with a compatible jQuery version.</p> +</div> + +<h1>YOUR COMPONENTS:</h1> + + +<!-- Accordion --> +<h2 class="demoHeaders">Accordion</h2> +<div id="accordion"> + <h3>First</h3> + <div>Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet.</div> + <h3>Second</h3> + <div>Phasellus mattis tincidunt nibh.</div> + <h3>Third</h3> + <div>Nam dui erat, auctor a, dignissim quis.</div> +</div> + + + +<!-- Autocomplete --> +<h2 class="demoHeaders">Autocomplete</h2> +<div> + <input id="autocomplete" title="type "a""> +</div> + + + +<!-- Button --> +<h2 class="demoHeaders">Button</h2> +<button id="button">A button element</button> +<form style="margin-top: 1em;"> + <div id="radioset"> + <input type="radio" id="radio1" name="radio"><label for="radio1">Choice 1</label> + <input type="radio" id="radio2" name="radio" checked="checked"><label for="radio2">Choice 2</label> + <input type="radio" id="radio3" name="radio"><label for="radio3">Choice 3</label> + </div> +</form> + + + +<!-- Tabs --> +<h2 class="demoHeaders">Tabs</h2> +<div id="tabs"> + <ul> + <li><a href="#tabs-1">First</a></li> + <li><a href="#tabs-2">Second</a></li> + <li><a href="#tabs-3">Third</a></li> + </ul> + <div id="tabs-1">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</div> + <div id="tabs-2">Phasellus mattis tincidunt nibh. Cras orci urna, blandit id, pretium vel, aliquet ornare, felis. Maecenas scelerisque sem non nisl. Fusce sed lorem in enim dictum bibendum.</div> + <div id="tabs-3">Nam dui erat, auctor a, dignissim quis, sollicitudin eu, felis. Pellentesque nisi urna, interdum eget, sagittis et, consequat vestibulum, lacus. Mauris porttitor ullamcorper augue.</div> +</div> + + + +<!-- Dialog NOTE: Dialog is not generated by UI in this demo so it can be visually styled in themeroller--> +<h2 class="demoHeaders">Dialog</h2> +<p><a href="#" id="dialog-link" class="ui-state-default ui-corner-all"><span class="ui-icon ui-icon-newwin"></span>Open Dialog</a></p> + +<h2 class="demoHeaders">Overlay and Shadow Classes <em>(not currently used in UI widgets)</em></h2> +<div style="position: relative; width: 96%; height: 200px; padding:1% 2%; overflow:hidden;" class="fakewindowcontain"> + <p>Lorem ipsum dolor sit amet, Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. </p><p>Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. </p><p>Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. </p><p>Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. Aliquam ante. </p><p>Suspendisse scelerisque dui nec velit. Duis augue augue, gravida euismod, vulputate ac, facilisis id, sem. Morbi in orci. Nulla purus lacus, pulvinar vel, malesuada ac, mattis nec, quam. Nam molestie scelerisque quam. Nullam feugiat cursus lacus.orem ipsum dolor sit amet, consectetur adipiscing elit. Donec libero risus, commodo vitae, pharetra mollis, posuere eu, pede. Nulla nec tortor. Donec id elit quis purus consectetur consequat. Nam congue semper tellus. Sed erat dolor, dapibus sit amet, venenatis ornare, ultrices ut, nisi. </p> + + <!-- ui-dialog --> + <div class="ui-overlay"><div class="ui-widget-overlay"></div><div class="ui-widget-shadow ui-corner-all" style="width: 302px; height: 152px; position: absolute; left: 50px; top: 30px;"></div></div> + <div style="position: absolute; width: 280px; height: 130px;left: 50px; top: 30px; padding: 10px;" class="ui-widget ui-widget-content ui-corner-all"> + <div class="ui-dialog-content ui-widget-content" style="background: none; border: 0;"> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> + </div> + </div> + +</div> + +<!-- ui-dialog --> +<div id="dialog" title="Dialog Title"> + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p> +</div> + + + +<h2 class="demoHeaders">Framework Icons (content color preview)</h2> +<ul id="icons" class="ui-widget ui-helper-clearfix"> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-n"><span class="ui-icon ui-icon-carat-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-ne"><span class="ui-icon ui-icon-carat-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-e"><span class="ui-icon ui-icon-carat-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-se"><span class="ui-icon ui-icon-carat-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-s"><span class="ui-icon ui-icon-carat-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-sw"><span class="ui-icon ui-icon-carat-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-w"><span class="ui-icon ui-icon-carat-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-1-nw"><span class="ui-icon ui-icon-carat-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-n-s"><span class="ui-icon ui-icon-carat-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-carat-2-e-w"><span class="ui-icon ui-icon-carat-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-n"><span class="ui-icon ui-icon-triangle-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-ne"><span class="ui-icon ui-icon-triangle-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-e"><span class="ui-icon ui-icon-triangle-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-se"><span class="ui-icon ui-icon-triangle-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-s"><span class="ui-icon ui-icon-triangle-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-sw"><span class="ui-icon ui-icon-triangle-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-w"><span class="ui-icon ui-icon-triangle-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-1-nw"><span class="ui-icon ui-icon-triangle-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-n-s"><span class="ui-icon ui-icon-triangle-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-triangle-2-e-w"><span class="ui-icon ui-icon-triangle-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-n"><span class="ui-icon ui-icon-arrow-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-ne"><span class="ui-icon ui-icon-arrow-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-e"><span class="ui-icon ui-icon-arrow-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-se"><span class="ui-icon ui-icon-arrow-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-s"><span class="ui-icon ui-icon-arrow-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-sw"><span class="ui-icon ui-icon-arrow-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-w"><span class="ui-icon ui-icon-arrow-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-1-nw"><span class="ui-icon ui-icon-arrow-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-n-s"><span class="ui-icon ui-icon-arrow-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-ne-sw"><span class="ui-icon ui-icon-arrow-2-ne-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-e-w"><span class="ui-icon ui-icon-arrow-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-2-se-nw"><span class="ui-icon ui-icon-arrow-2-se-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-n"><span class="ui-icon ui-icon-arrowstop-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-e"><span class="ui-icon ui-icon-arrowstop-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-s"><span class="ui-icon ui-icon-arrowstop-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowstop-1-w"><span class="ui-icon ui-icon-arrowstop-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-n"><span class="ui-icon ui-icon-arrowthick-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-ne"><span class="ui-icon ui-icon-arrowthick-1-ne"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-e"><span class="ui-icon ui-icon-arrowthick-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-se"><span class="ui-icon ui-icon-arrowthick-1-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-s"><span class="ui-icon ui-icon-arrowthick-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-sw"><span class="ui-icon ui-icon-arrowthick-1-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-w"><span class="ui-icon ui-icon-arrowthick-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-1-nw"><span class="ui-icon ui-icon-arrowthick-1-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-n-s"><span class="ui-icon ui-icon-arrowthick-2-n-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-ne-sw"><span class="ui-icon ui-icon-arrowthick-2-ne-sw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-e-w"><span class="ui-icon ui-icon-arrowthick-2-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthick-2-se-nw"><span class="ui-icon ui-icon-arrowthick-2-se-nw"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-n"><span class="ui-icon ui-icon-arrowthickstop-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-e"><span class="ui-icon ui-icon-arrowthickstop-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-s"><span class="ui-icon ui-icon-arrowthickstop-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowthickstop-1-w"><span class="ui-icon ui-icon-arrowthickstop-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-w"><span class="ui-icon ui-icon-arrowreturnthick-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-n"><span class="ui-icon ui-icon-arrowreturnthick-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-e"><span class="ui-icon ui-icon-arrowreturnthick-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturnthick-1-s"><span class="ui-icon ui-icon-arrowreturnthick-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-w"><span class="ui-icon ui-icon-arrowreturn-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-n"><span class="ui-icon ui-icon-arrowreturn-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-e"><span class="ui-icon ui-icon-arrowreturn-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowreturn-1-s"><span class="ui-icon ui-icon-arrowreturn-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-w"><span class="ui-icon ui-icon-arrowrefresh-1-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-n"><span class="ui-icon ui-icon-arrowrefresh-1-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-e"><span class="ui-icon ui-icon-arrowrefresh-1-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrowrefresh-1-s"><span class="ui-icon ui-icon-arrowrefresh-1-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4"><span class="ui-icon ui-icon-arrow-4"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-arrow-4-diag"><span class="ui-icon ui-icon-arrow-4-diag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-extlink"><span class="ui-icon ui-icon-extlink"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-newwin"><span class="ui-icon ui-icon-newwin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-refresh"><span class="ui-icon ui-icon-refresh"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-shuffle"><span class="ui-icon ui-icon-shuffle"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-transfer-e-w"><span class="ui-icon ui-icon-transfer-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-transferthick-e-w"><span class="ui-icon ui-icon-transferthick-e-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-collapsed"><span class="ui-icon ui-icon-folder-collapsed"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-folder-open"><span class="ui-icon ui-icon-folder-open"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-document"><span class="ui-icon ui-icon-document"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-document-b"><span class="ui-icon ui-icon-document-b"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-note"><span class="ui-icon ui-icon-note"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-closed"><span class="ui-icon ui-icon-mail-closed"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-mail-open"><span class="ui-icon ui-icon-mail-open"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-suitcase"><span class="ui-icon ui-icon-suitcase"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-comment"><span class="ui-icon ui-icon-comment"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-person"><span class="ui-icon ui-icon-person"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-print"><span class="ui-icon ui-icon-print"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-trash"><span class="ui-icon ui-icon-trash"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-locked"><span class="ui-icon ui-icon-locked"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-unlocked"><span class="ui-icon ui-icon-unlocked"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-bookmark"><span class="ui-icon ui-icon-bookmark"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-tag"><span class="ui-icon ui-icon-tag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-home"><span class="ui-icon ui-icon-home"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-flag"><span class="ui-icon ui-icon-flag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-calculator"><span class="ui-icon ui-icon-calculator"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-cart"><span class="ui-icon ui-icon-cart"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pencil"><span class="ui-icon ui-icon-pencil"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-clock"><span class="ui-icon ui-icon-clock"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-disk"><span class="ui-icon ui-icon-disk"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-calendar"><span class="ui-icon ui-icon-calendar"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomin"><span class="ui-icon ui-icon-zoomin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-zoomout"><span class="ui-icon ui-icon-zoomout"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-search"><span class="ui-icon ui-icon-search"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-wrench"><span class="ui-icon ui-icon-wrench"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-gear"><span class="ui-icon ui-icon-gear"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-heart"><span class="ui-icon ui-icon-heart"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-star"><span class="ui-icon ui-icon-star"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-link"><span class="ui-icon ui-icon-link"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-cancel"><span class="ui-icon ui-icon-cancel"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-plus"><span class="ui-icon ui-icon-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-plusthick"><span class="ui-icon ui-icon-plusthick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-minus"><span class="ui-icon ui-icon-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-minusthick"><span class="ui-icon ui-icon-minusthick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-close"><span class="ui-icon ui-icon-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-closethick"><span class="ui-icon ui-icon-closethick"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-key"><span class="ui-icon ui-icon-key"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-lightbulb"><span class="ui-icon ui-icon-lightbulb"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-scissors"><span class="ui-icon ui-icon-scissors"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-clipboard"><span class="ui-icon ui-icon-clipboard"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-copy"><span class="ui-icon ui-icon-copy"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-contact"><span class="ui-icon ui-icon-contact"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-image"><span class="ui-icon ui-icon-image"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-video"><span class="ui-icon ui-icon-video"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-script"><span class="ui-icon ui-icon-script"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-alert"><span class="ui-icon ui-icon-alert"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-info"><span class="ui-icon ui-icon-info"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-notice"><span class="ui-icon ui-icon-notice"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-help"><span class="ui-icon ui-icon-help"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-check"><span class="ui-icon ui-icon-check"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-bullet"><span class="ui-icon ui-icon-bullet"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-off"><span class="ui-icon ui-icon-radio-off"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-radio-on"><span class="ui-icon ui-icon-radio-on"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-w"><span class="ui-icon ui-icon-pin-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pin-s"><span class="ui-icon ui-icon-pin-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-play"><span class="ui-icon ui-icon-play"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-pause"><span class="ui-icon ui-icon-pause"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-next"><span class="ui-icon ui-icon-seek-next"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-prev"><span class="ui-icon ui-icon-seek-prev"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-end"><span class="ui-icon ui-icon-seek-end"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-seek-first"><span class="ui-icon ui-icon-seek-first"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-stop"><span class="ui-icon ui-icon-stop"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-eject"><span class="ui-icon ui-icon-eject"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-off"><span class="ui-icon ui-icon-volume-off"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-volume-on"><span class="ui-icon ui-icon-volume-on"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-power"><span class="ui-icon ui-icon-power"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-signal-diag"><span class="ui-icon ui-icon-signal-diag"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-signal"><span class="ui-icon ui-icon-signal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-0"><span class="ui-icon ui-icon-battery-0"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-1"><span class="ui-icon ui-icon-battery-1"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-2"><span class="ui-icon ui-icon-battery-2"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-battery-3"><span class="ui-icon ui-icon-battery-3"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-plus"><span class="ui-icon ui-icon-circle-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-minus"><span class="ui-icon ui-icon-circle-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-close"><span class="ui-icon ui-icon-circle-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-e"><span class="ui-icon ui-icon-circle-triangle-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-s"><span class="ui-icon ui-icon-circle-triangle-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-w"><span class="ui-icon ui-icon-circle-triangle-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-triangle-n"><span class="ui-icon ui-icon-circle-triangle-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-e"><span class="ui-icon ui-icon-circle-arrow-e"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-s"><span class="ui-icon ui-icon-circle-arrow-s"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-w"><span class="ui-icon ui-icon-circle-arrow-w"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-arrow-n"><span class="ui-icon ui-icon-circle-arrow-n"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomin"><span class="ui-icon ui-icon-circle-zoomin"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-zoomout"><span class="ui-icon ui-icon-circle-zoomout"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circle-check"><span class="ui-icon ui-icon-circle-check"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-plus"><span class="ui-icon ui-icon-circlesmall-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-minus"><span class="ui-icon ui-icon-circlesmall-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-circlesmall-close"><span class="ui-icon ui-icon-circlesmall-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-plus"><span class="ui-icon ui-icon-squaresmall-plus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-minus"><span class="ui-icon ui-icon-squaresmall-minus"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-squaresmall-close"><span class="ui-icon ui-icon-squaresmall-close"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-vertical"><span class="ui-icon ui-icon-grip-dotted-vertical"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-dotted-horizontal"><span class="ui-icon ui-icon-grip-dotted-horizontal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-vertical"><span class="ui-icon ui-icon-grip-solid-vertical"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-solid-horizontal"><span class="ui-icon ui-icon-grip-solid-horizontal"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-gripsmall-diagonal-se"><span class="ui-icon ui-icon-gripsmall-diagonal-se"></span></li> + <li class="ui-state-default ui-corner-all" title=".ui-icon-grip-diagonal-se"><span class="ui-icon ui-icon-grip-diagonal-se"></span></li> +</ul> + + +<!-- Slider --> +<h2 class="demoHeaders">Slider</h2> +<div id="slider"></div> + + + +<!-- Datepicker --> +<h2 class="demoHeaders">Datepicker</h2> +<div id="datepicker"></div> + + + +<!-- Progressbar --> +<h2 class="demoHeaders">Progressbar</h2> +<div id="progressbar"></div> + + + +<!-- Progressbar --> +<h2 class="demoHeaders">Selectmenu</h2> +<select id="selectmenu"> + <option>Slower</option> + <option>Slow</option> + <option selected="selected">Medium</option> + <option>Fast</option> + <option>Faster</option> +</select> + + + +<!-- Spinner --> +<h2 class="demoHeaders">Spinner</h2> +<input id="spinner"> + + + +<!-- Menu --> +<h2 class="demoHeaders">Menu</h2> +<ul style="width:100px;" id="menu"> + <li>Item 1</li> + <li>Item 2</li> + <li>Item 3 + <ul> + <li>Item 3-1</li> + <li>Item 3-2</li> + <li>Item 3-3</li> + <li>Item 3-4</li> + <li>Item 3-5</li> + </ul> + </li> + <li>Item 4</li> + <li>Item 5</li> +</ul> + + + +<!-- Tooltip --> +<h2 class="demoHeaders">Tooltip</h2> +<p id="tooltip"> + <a href="#" title="That's what this widget is">Tooltips</a> can be attached to any element. When you hover +the element with your mouse, the title attribute is displayed in a little box next to the element, just like a native tooltip. +</p> + + +<!-- Highlight / Error --> +<h2 class="demoHeaders">Highlight / Error</h2> +<div class="ui-widget"> + <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;"> + <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span> + <strong>Hey!</strong> Sample ui-state-highlight style.</p> + </div> +</div> +<br> +<div class="ui-widget"> + <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> + <p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> + <strong>Alert:</strong> Sample ui-state-error style.</p> + </div> +</div> + +<script src="external/jquery/jquery.js"></script> +<script src="jquery-ui.js"></script> +<script type="text/javascript" > + +$( "#accordion" ).accordion(); + + + +var availableTags = [ + "ActionScript", + "AppleScript", + "Asp", + "BASIC", + "C", + "C++", + "Clojure", + "COBOL", + "ColdFusion", + "Erlang", + "Fortran", + "Groovy", + "Haskell", + "Java", + "JavaScript", + "Lisp", + "Perl", + "PHP", + "Python", + "Ruby", + "Scala", + "Scheme" +]; +$( "#autocomplete" ).autocomplete({ + source: availableTags +}); + + + +$( "#button" ).button(); +$( "#radioset" ).buttonset(); + + + +$( "#tabs" ).tabs(); + + + +$( "#dialog" ).dialog({ + autoOpen: false, + width: 400, + buttons: [ + { + text: "Ok", + click: function() { + $( this ).dialog( "close" ); + } + }, + { + text: "Cancel", + click: function() { + $( this ).dialog( "close" ); + } + } + ] +}); + +// Link to open the dialog +$( "#dialog-link" ).click(function( event ) { + $( "#dialog" ).dialog( "open" ); + event.preventDefault(); +}); + + + +$( "#datepicker" ).datepicker({ + inline: true +}); + + + +$( "#slider" ).slider({ + range: true, + values: [ 17, 67 ] +}); + + + +$( "#progressbar" ).progressbar({ + value: 20 +}); + + + +$( "#spinner" ).spinner(); + + + +$( "#menu" ).menu(); + + + +$( "#tooltip" ).tooltip(); + + + +$( "#selectmenu" ).selectmenu(); + + +// Hover states on the static widgets +$( "#dialog-link, #icons li" ).hover( + function() { + $( this ).addClass( "ui-state-hover" ); + }, + function() { + $( this ).removeClass( "ui-state-hover" ); + } +); +</script> +</body> +</html> diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.css b/assets/js/jquery-ui-1.11.4/jquery-ui.css new file mode 100644 index 0000000000000000000000000000000000000000..697746a26d7855955941cb00b724b644f271f61f --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.css @@ -0,0 +1,1225 @@ +/*! jQuery UI - v1.11.4 - 2015-10-27 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwA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+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_228ef1_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_ffd27a_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); /* support: IE8 */ + border-radius: 5px; +} diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.js b/assets/js/jquery-ui-1.11.4/jquery-ui.js new file mode 100644 index 0000000000000000000000000000000000000000..d15d5ca3ce6dafe31ab76b4a0263c267a38985c9 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.js @@ -0,0 +1,16617 @@ +/*! jQuery UI - v1.11.4 - 2015-10-25 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function( factory ) { + if ( typeof define === "function" && define.amd ) { + + // AMD. Register as an anonymous module. + define([ "jquery" ], factory ); + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { +/*! + * jQuery UI Core 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/ui-core/ + */ + + +// $.ui might exist from components with no dependencies, e.g., $.ui.position +$.ui = $.ui || {}; + +$.extend( $.ui, { + version: "1.11.4", + + keyCode: { + BACKSPACE: 8, + COMMA: 188, + DELETE: 46, + DOWN: 40, + END: 35, + ENTER: 13, + ESCAPE: 27, + HOME: 36, + LEFT: 37, + PAGE_DOWN: 34, + PAGE_UP: 33, + PERIOD: 190, + RIGHT: 39, + SPACE: 32, + TAB: 9, + UP: 38 + } +}); + +// plugins +$.fn.extend({ + scrollParent: function( includeHidden ) { + var position = this.css( "position" ), + excludeStaticParent = position === "absolute", + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/, + scrollParent = this.parents().filter( function() { + var parent = $( this ); + if ( excludeStaticParent && parent.css( "position" ) === "static" ) { + return false; + } + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) ); + }).eq( 0 ); + + return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent; + }, + + uniqueId: (function() { + var uuid = 0; + + return function() { + return this.each(function() { + if ( !this.id ) { + this.id = "ui-id-" + ( ++uuid ); + } + }); + }; + })(), + + removeUniqueId: function() { + return this.each(function() { + if ( /^ui-id-\d+$/.test( this.id ) ) { + $( this ).removeAttr( "id" ); + } + }); + } +}); + +// selectors +function focusable( element, isTabIndexNotNaN ) { + var map, mapName, img, + nodeName = element.nodeName.toLowerCase(); + if ( "area" === nodeName ) { + map = element.parentNode; + mapName = map.name; + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) { + return false; + } + img = $( "img[usemap='#" + mapName + "']" )[ 0 ]; + return !!img && visible( img ); + } + return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ? + !element.disabled : + "a" === nodeName ? + element.href || isTabIndexNotNaN : + isTabIndexNotNaN) && + // the element and all of its ancestors must be visible + visible( element ); +} + +function visible( element ) { + return $.expr.filters.visible( element ) && + !$( element ).parents().addBack().filter(function() { + return $.css( this, "visibility" ) === "hidden"; + }).length; +} + +$.extend( $.expr[ ":" ], { + data: $.expr.createPseudo ? + $.expr.createPseudo(function( dataName ) { + return function( elem ) { + return !!$.data( elem, dataName ); + }; + }) : + // support: jQuery <1.8 + function( elem, i, match ) { + return !!$.data( elem, match[ 3 ] ); + }, + + focusable: function( element ) { + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) ); + }, + + tabbable: function( element ) { + var tabIndex = $.attr( element, "tabindex" ), + isTabIndexNaN = isNaN( tabIndex ); + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN ); + } +}); + +// support: jQuery <1.8 +if ( !$( "<a>" ).outerWidth( 1 ).jquery ) { + $.each( [ "Width", "Height" ], function( i, name ) { + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ], + type = name.toLowerCase(), + orig = { + innerWidth: $.fn.innerWidth, + innerHeight: $.fn.innerHeight, + outerWidth: $.fn.outerWidth, + outerHeight: $.fn.outerHeight + }; + + function reduce( elem, size, border, margin ) { + $.each( side, function() { + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0; + if ( border ) { + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0; + } + if ( margin ) { + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0; + } + }); + return size; + } + + $.fn[ "inner" + name ] = function( size ) { + if ( size === undefined ) { + return orig[ "inner" + name ].call( this ); + } + + return this.each(function() { + $( this ).css( type, reduce( this, size ) + "px" ); + }); + }; + + $.fn[ "outer" + name] = function( size, margin ) { + if ( typeof size !== "number" ) { + return orig[ "outer" + name ].call( this, size ); + } + + return this.each(function() { + $( this).css( type, reduce( this, size, true, margin ) + "px" ); + }); + }; + }); +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413) +if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) { + $.fn.removeData = (function( removeData ) { + return function( key ) { + if ( arguments.length ) { + return removeData.call( this, $.camelCase( key ) ); + } else { + return removeData.call( this ); + } + }; + })( $.fn.removeData ); +} + +// deprecated +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() ); + +$.fn.extend({ + focus: (function( orig ) { + return function( delay, fn ) { + return typeof delay === "number" ? + this.each(function() { + var elem = this; + setTimeout(function() { + $( elem ).focus(); + if ( fn ) { + fn.call( elem ); + } + }, delay ); + }) : + orig.apply( this, arguments ); + }; + })( $.fn.focus ), + + disableSelection: (function() { + var eventType = "onselectstart" in document.createElement( "div" ) ? + "selectstart" : + "mousedown"; + + return function() { + return this.bind( eventType + ".ui-disableSelection", function( event ) { + event.preventDefault(); + }); + }; + })(), + + enableSelection: function() { + return this.unbind( ".ui-disableSelection" ); + }, + + zIndex: function( zIndex ) { + if ( zIndex !== undefined ) { + return this.css( "zIndex", zIndex ); + } + + if ( this.length ) { + var elem = $( this[ 0 ] ), position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + } + + return 0; + } +}); + +// $.ui.plugin is deprecated. Use $.widget() extensions instead. +$.ui.plugin = { + add: function( module, option, set ) { + var i, + proto = $.ui[ module ].prototype; + for ( i in set ) { + proto.plugins[ i ] = proto.plugins[ i ] || []; + proto.plugins[ i ].push( [ option, set[ i ] ] ); + } + }, + call: function( instance, name, args, allowDisconnected ) { + var i, + set = instance.plugins[ name ]; + + if ( !set ) { + return; + } + + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) { + return; + } + + for ( i = 0; i < set.length; i++ ) { + if ( instance.options[ set[ i ][ 0 ] ] ) { + set[ i ][ 1 ].apply( instance.element, args ); + } + } + } +}; + + +/*! + * jQuery UI Widget 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/jQuery.widget/ + */ + + +var widget_uuid = 0, + widget_slice = Array.prototype.slice; + +$.cleanData = (function( orig ) { + return function( elems ) { + var events, elem, i; + for ( i = 0; (elem = elems[i]) != null; i++ ) { + try { + + // Only trigger remove when necessary to save time + events = $._data( elem, "events" ); + if ( events && events.remove ) { + $( elem ).triggerHandler( "remove" ); + } + + // http://bugs.jquery.com/ticket/8235 + } catch ( e ) {} + } + orig( elems ); + }; +})( $.cleanData ); + +$.widget = function( name, base, prototype ) { + var fullName, existingConstructor, constructor, basePrototype, + // proxiedPrototype allows the provided prototype to remain unmodified + // so that it can be used as a mixin for multiple widgets (#8876) + proxiedPrototype = {}, + namespace = name.split( "." )[ 0 ]; + + name = name.split( "." )[ 1 ]; + fullName = namespace + "-" + name; + + if ( !prototype ) { + prototype = base; + base = $.Widget; + } + + // create selector for plugin + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) { + return !!$.data( elem, fullName ); + }; + + $[ namespace ] = $[ namespace ] || {}; + existingConstructor = $[ namespace ][ name ]; + constructor = $[ namespace ][ name ] = function( options, element ) { + // allow instantiation without "new" keyword + if ( !this._createWidget ) { + return new constructor( options, element ); + } + + // allow instantiation without initializing for simple inheritance + // must use "new" keyword (the code above always passes args) + if ( arguments.length ) { + this._createWidget( options, element ); + } + }; + // extend with the existing constructor to carry over any static properties + $.extend( constructor, existingConstructor, { + version: prototype.version, + // copy the object used to create the prototype in case we need to + // redefine the widget later + _proto: $.extend( {}, prototype ), + // track widgets that inherit from this widget in case this widget is + // redefined after a widget inherits from it + _childConstructors: [] + }); + + basePrototype = new base(); + // we need to make the options hash a property directly on the new instance + // otherwise we'll modify the options hash on the prototype that we're + // inheriting from + basePrototype.options = $.widget.extend( {}, basePrototype.options ); + $.each( prototype, function( prop, value ) { + if ( !$.isFunction( value ) ) { + proxiedPrototype[ prop ] = value; + return; + } + proxiedPrototype[ prop ] = (function() { + var _super = function() { + return base.prototype[ prop ].apply( this, arguments ); + }, + _superApply = function( args ) { + return base.prototype[ prop ].apply( this, args ); + }; + return function() { + var __super = this._super, + __superApply = this._superApply, + returnValue; + + this._super = _super; + this._superApply = _superApply; + + returnValue = value.apply( this, arguments ); + + this._super = __super; + this._superApply = __superApply; + + return returnValue; + }; + })(); + }); + constructor.prototype = $.widget.extend( basePrototype, { + // TODO: remove support for widgetEventPrefix + // always use the name + a colon as the prefix, e.g., draggable:start + // don't prefix for widgets that aren't DOM-based + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name + }, proxiedPrototype, { + constructor: constructor, + namespace: namespace, + widgetName: name, + widgetFullName: fullName + }); + + // If this widget is being redefined then we need to find all widgets that + // are inheriting from it and redefine all of them so that they inherit from + // the new version of this widget. We're essentially trying to replace one + // level in the prototype chain. + if ( existingConstructor ) { + $.each( existingConstructor._childConstructors, function( i, child ) { + var childPrototype = child.prototype; + + // redefine the child widget using the same prototype that was + // originally used, but inherit from the new version of the base + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto ); + }); + // remove the list of existing child constructors from the old constructor + // so the old child constructors can be garbage collected + delete existingConstructor._childConstructors; + } else { + base._childConstructors.push( constructor ); + } + + $.widget.bridge( name, constructor ); + + return constructor; +}; + +$.widget.extend = function( target ) { + var input = widget_slice.call( arguments, 1 ), + inputIndex = 0, + inputLength = input.length, + key, + value; + for ( ; inputIndex < inputLength; inputIndex++ ) { + for ( key in input[ inputIndex ] ) { + value = input[ inputIndex ][ key ]; + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) { + // Clone objects + if ( $.isPlainObject( value ) ) { + target[ key ] = $.isPlainObject( target[ key ] ) ? + $.widget.extend( {}, target[ key ], value ) : + // Don't extend strings, arrays, etc. with objects + $.widget.extend( {}, value ); + // Copy everything else by reference + } else { + target[ key ] = value; + } + } + } + } + return target; +}; + +$.widget.bridge = function( name, object ) { + var fullName = object.prototype.widgetFullName || name; + $.fn[ name ] = function( options ) { + var isMethodCall = typeof options === "string", + args = widget_slice.call( arguments, 1 ), + returnValue = this; + + if ( isMethodCall ) { + this.each(function() { + var methodValue, + instance = $.data( this, fullName ); + if ( options === "instance" ) { + returnValue = instance; + return false; + } + if ( !instance ) { + return $.error( "cannot call methods on " + name + " prior to initialization; " + + "attempted to call method '" + options + "'" ); + } + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) { + return $.error( "no such method '" + options + "' for " + name + " widget instance" ); + } + methodValue = instance[ options ].apply( instance, args ); + if ( methodValue !== instance && methodValue !== undefined ) { + returnValue = methodValue && methodValue.jquery ? + returnValue.pushStack( methodValue.get() ) : + methodValue; + return false; + } + }); + } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + + this.each(function() { + var instance = $.data( this, fullName ); + if ( instance ) { + instance.option( options || {} ); + if ( instance._init ) { + instance._init(); + } + } else { + $.data( this, fullName, new object( options, this ) ); + } + }); + } + + return returnValue; + }; +}; + +$.Widget = function( /* options, element */ ) {}; +$.Widget._childConstructors = []; + +$.Widget.prototype = { + widgetName: "widget", + widgetEventPrefix: "", + defaultElement: "<div>", + options: { + disabled: false, + + // callbacks + create: null + }, + _createWidget: function( options, element ) { + element = $( element || this.defaultElement || this )[ 0 ]; + this.element = $( element ); + this.uuid = widget_uuid++; + this.eventNamespace = "." + this.widgetName + this.uuid; + + this.bindings = $(); + this.hoverable = $(); + this.focusable = $(); + + if ( element !== this ) { + $.data( element, this.widgetFullName, this ); + this._on( true, this.element, { + remove: function( event ) { + if ( event.target === element ) { + this.destroy(); + } + } + }); + this.document = $( element.style ? + // element within the document + element.ownerDocument : + // element is window or document + element.document || element ); + this.window = $( this.document[0].defaultView || this.document[0].parentWindow ); + } + + this.options = $.widget.extend( {}, + this.options, + this._getCreateOptions(), + options ); + + this._create(); + this._trigger( "create", null, this._getCreateEventData() ); + this._init(); + }, + _getCreateOptions: $.noop, + _getCreateEventData: $.noop, + _create: $.noop, + _init: $.noop, + + destroy: function() { + this._destroy(); + // we can probably remove the unbind calls in 2.0 + // all event bindings should go through this._on() + this.element + .unbind( this.eventNamespace ) + .removeData( this.widgetFullName ) + // support: jquery <1.6.3 + // http://bugs.jquery.com/ticket/9413 + .removeData( $.camelCase( this.widgetFullName ) ); + this.widget() + .unbind( this.eventNamespace ) + .removeAttr( "aria-disabled" ) + .removeClass( + this.widgetFullName + "-disabled " + + "ui-state-disabled" ); + + // clean up events and states + this.bindings.unbind( this.eventNamespace ); + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + }, + _destroy: $.noop, + + widget: function() { + return this.element; + }, + + option: function( key, value ) { + var options = key, + parts, + curOption, + i; + + if ( arguments.length === 0 ) { + // don't return a reference to the internal hash + return $.widget.extend( {}, this.options ); + } + + if ( typeof key === "string" ) { + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } } + options = {}; + parts = key.split( "." ); + key = parts.shift(); + if ( parts.length ) { + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] ); + for ( i = 0; i < parts.length - 1; i++ ) { + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {}; + curOption = curOption[ parts[ i ] ]; + } + key = parts.pop(); + if ( arguments.length === 1 ) { + return curOption[ key ] === undefined ? null : curOption[ key ]; + } + curOption[ key ] = value; + } else { + if ( arguments.length === 1 ) { + return this.options[ key ] === undefined ? null : this.options[ key ]; + } + options[ key ] = value; + } + } + + this._setOptions( options ); + + return this; + }, + _setOptions: function( options ) { + var key; + + for ( key in options ) { + this._setOption( key, options[ key ] ); + } + + return this; + }, + _setOption: function( key, value ) { + this.options[ key ] = value; + + if ( key === "disabled" ) { + this.widget() + .toggleClass( this.widgetFullName + "-disabled", !!value ); + + // If the widget is becoming disabled, then nothing is interactive + if ( value ) { + this.hoverable.removeClass( "ui-state-hover" ); + this.focusable.removeClass( "ui-state-focus" ); + } + } + + return this; + }, + + enable: function() { + return this._setOptions({ disabled: false }); + }, + disable: function() { + return this._setOptions({ disabled: true }); + }, + + _on: function( suppressDisabledCheck, element, handlers ) { + var delegateElement, + instance = this; + + // no suppressDisabledCheck flag, shuffle arguments + if ( typeof suppressDisabledCheck !== "boolean" ) { + handlers = element; + element = suppressDisabledCheck; + suppressDisabledCheck = false; + } + + // no element argument, shuffle and use this.element + if ( !handlers ) { + handlers = element; + element = this.element; + delegateElement = this.widget(); + } else { + element = delegateElement = $( element ); + this.bindings = this.bindings.add( element ); + } + + $.each( handlers, function( event, handler ) { + function handlerProxy() { + // allow widgets to customize the disabled handling + // - disabled as an array instead of boolean + // - disabled class as method for disabling individual parts + if ( !suppressDisabledCheck && + ( instance.options.disabled === true || + $( this ).hasClass( "ui-state-disabled" ) ) ) { + return; + } + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + + // copy the guid so direct unbinding works + if ( typeof handler !== "string" ) { + handlerProxy.guid = handler.guid = + handler.guid || handlerProxy.guid || $.guid++; + } + + var match = event.match( /^([\w:-]*)\s*(.*)$/ ), + eventName = match[1] + instance.eventNamespace, + selector = match[2]; + if ( selector ) { + delegateElement.delegate( selector, eventName, handlerProxy ); + } else { + element.bind( eventName, handlerProxy ); + } + }); + }, + + _off: function( element, eventName ) { + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + + this.eventNamespace; + element.unbind( eventName ).undelegate( eventName ); + + // Clear the stack to avoid memory leaks (#10056) + this.bindings = $( this.bindings.not( element ).get() ); + this.focusable = $( this.focusable.not( element ).get() ); + this.hoverable = $( this.hoverable.not( element ).get() ); + }, + + _delay: function( handler, delay ) { + function handlerProxy() { + return ( typeof handler === "string" ? instance[ handler ] : handler ) + .apply( instance, arguments ); + } + var instance = this; + return setTimeout( handlerProxy, delay || 0 ); + }, + + _hoverable: function( element ) { + this.hoverable = this.hoverable.add( element ); + this._on( element, { + mouseenter: function( event ) { + $( event.currentTarget ).addClass( "ui-state-hover" ); + }, + mouseleave: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-hover" ); + } + }); + }, + + _focusable: function( element ) { + this.focusable = this.focusable.add( element ); + this._on( element, { + focusin: function( event ) { + $( event.currentTarget ).addClass( "ui-state-focus" ); + }, + focusout: function( event ) { + $( event.currentTarget ).removeClass( "ui-state-focus" ); + } + }); + }, + + _trigger: function( type, event, data ) { + var prop, orig, + callback = this.options[ type ]; + + data = data || {}; + event = $.Event( event ); + event.type = ( type === this.widgetEventPrefix ? + type : + this.widgetEventPrefix + type ).toLowerCase(); + // the original event may come from any element + // so we need to reset the target on the new event + event.target = this.element[ 0 ]; + + // copy original event properties over to the new event + orig = event.originalEvent; + if ( orig ) { + for ( prop in orig ) { + if ( !( prop in event ) ) { + event[ prop ] = orig[ prop ]; + } + } + } + + this.element.trigger( event, data ); + return !( $.isFunction( callback ) && + callback.apply( this.element[0], [ event ].concat( data ) ) === false || + event.isDefaultPrevented() ); + } +}; + +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) { + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) { + if ( typeof options === "string" ) { + options = { effect: options }; + } + var hasOptions, + effectName = !options ? + method : + options === true || typeof options === "number" ? + defaultEffect : + options.effect || defaultEffect; + options = options || {}; + if ( typeof options === "number" ) { + options = { duration: options }; + } + hasOptions = !$.isEmptyObject( options ); + options.complete = callback; + if ( options.delay ) { + element.delay( options.delay ); + } + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) { + element[ method ]( options ); + } else if ( effectName !== method && element[ effectName ] ) { + element[ effectName ]( options.duration, options.easing, callback ); + } else { + element.queue(function( next ) { + $( this )[ method ](); + if ( callback ) { + callback.call( element[ 0 ] ); + } + next(); + }); + } + }; +}); + +var widget = $.widget; + + +/*! + * jQuery UI Mouse 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/mouse/ + */ + + +var mouseHandled = false; +$( document ).mouseup( function() { + mouseHandled = false; +}); + +var mouse = $.widget("ui.mouse", { + version: "1.11.4", + options: { + cancel: "input,textarea,button,select,option", + distance: 1, + delay: 0 + }, + _mouseInit: function() { + var that = this; + + this.element + .bind("mousedown." + this.widgetName, function(event) { + return that._mouseDown(event); + }) + .bind("click." + this.widgetName, function(event) { + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) { + $.removeData(event.target, that.widgetName + ".preventClickEvent"); + event.stopImmediatePropagation(); + return false; + } + }); + + this.started = false; + }, + + // TODO: make sure destroying one instance of mouse doesn't mess with + // other instances of mouse + _mouseDestroy: function() { + this.element.unbind("." + this.widgetName); + if ( this._mouseMoveDelegate ) { + this.document + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate) + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate); + } + }, + + _mouseDown: function(event) { + // don't let more than one widget handle mouseStart + if ( mouseHandled ) { + return; + } + + this._mouseMoved = false; + + // we may have missed mouseup (out of window) + (this._mouseStarted && this._mouseUp(event)); + + this._mouseDownEvent = event; + + var that = this, + btnIsLeft = (event.which === 1), + // event.target.nodeName works around a bug in IE 8 with + // disabled inputs (#7620) + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false); + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) { + return true; + } + + this.mouseDelayMet = !this.options.delay; + if (!this.mouseDelayMet) { + this._mouseDelayTimer = setTimeout(function() { + that.mouseDelayMet = true; + }, this.options.delay); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = (this._mouseStart(event) !== false); + if (!this._mouseStarted) { + event.preventDefault(); + return true; + } + } + + // Click event may never have fired (Gecko & Opera) + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) { + $.removeData(event.target, this.widgetName + ".preventClickEvent"); + } + + // these delegates are required to keep context + this._mouseMoveDelegate = function(event) { + return that._mouseMove(event); + }; + this._mouseUpDelegate = function(event) { + return that._mouseUp(event); + }; + + this.document + .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .bind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + event.preventDefault(); + + mouseHandled = true; + return true; + }, + + _mouseMove: function(event) { + // Only check for mouseups outside the document if you've moved inside the document + // at least once. This prevents the firing of mouseup in the case of IE<9, which will + // fire a mousemove event if content is placed under the cursor. See #7778 + // Support: IE <9 + if ( this._mouseMoved ) { + // IE mouseup check - mouseup happened when mouse was out of window + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) { + return this._mouseUp(event); + + // Iframe mouseup check - mouseup occurred in another document + } else if ( !event.which ) { + return this._mouseUp( event ); + } + } + + if ( event.which || event.button ) { + this._mouseMoved = true; + } + + if (this._mouseStarted) { + this._mouseDrag(event); + return event.preventDefault(); + } + + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) { + this._mouseStarted = + (this._mouseStart(this._mouseDownEvent, event) !== false); + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event)); + } + + return !this._mouseStarted; + }, + + _mouseUp: function(event) { + this.document + .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate ) + .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate ); + + if (this._mouseStarted) { + this._mouseStarted = false; + + if (event.target === this._mouseDownEvent.target) { + $.data(event.target, this.widgetName + ".preventClickEvent", true); + } + + this._mouseStop(event); + } + + mouseHandled = false; + return false; + }, + + _mouseDistanceMet: function(event) { + return (Math.max( + Math.abs(this._mouseDownEvent.pageX - event.pageX), + Math.abs(this._mouseDownEvent.pageY - event.pageY) + ) >= this.options.distance + ); + }, + + _mouseDelayMet: function(/* event */) { + return this.mouseDelayMet; + }, + + // These are placeholder methods, to be overriden by extending plugin + _mouseStart: function(/* event */) {}, + _mouseDrag: function(/* event */) {}, + _mouseStop: function(/* event */) {}, + _mouseCapture: function(/* event */) { return true; } +}); + + +/*! + * jQuery UI Position 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/position/ + */ + +(function() { + +$.ui = $.ui || {}; + +var cachedScrollbarWidth, supportsOffsetFractions, + max = Math.max, + abs = Math.abs, + round = Math.round, + rhorizontal = /left|center|right/, + rvertical = /top|center|bottom/, + roffset = /[\+\-]\d+(\.[\d]+)?%?/, + rposition = /^\w+/, + rpercent = /%$/, + _position = $.fn.position; + +function getOffsets( offsets, width, height ) { + return [ + parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ), + parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 ) + ]; +} + +function parseCss( element, property ) { + return parseInt( $.css( element, property ), 10 ) || 0; +} + +function getDimensions( elem ) { + var raw = elem[0]; + if ( raw.nodeType === 9 ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: 0, left: 0 } + }; + } + if ( $.isWindow( raw ) ) { + return { + width: elem.width(), + height: elem.height(), + offset: { top: elem.scrollTop(), left: elem.scrollLeft() } + }; + } + if ( raw.preventDefault ) { + return { + width: 0, + height: 0, + offset: { top: raw.pageY, left: raw.pageX } + }; + } + return { + width: elem.outerWidth(), + height: elem.outerHeight(), + offset: elem.offset() + }; +} + +$.position = { + scrollbarWidth: function() { + if ( cachedScrollbarWidth !== undefined ) { + return cachedScrollbarWidth; + } + var w1, w2, + div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ), + innerDiv = div.children()[0]; + + $( "body" ).append( div ); + w1 = innerDiv.offsetWidth; + div.css( "overflow", "scroll" ); + + w2 = innerDiv.offsetWidth; + + if ( w1 === w2 ) { + w2 = div[0].clientWidth; + } + + div.remove(); + + return (cachedScrollbarWidth = w1 - w2); + }, + getScrollInfo: function( within ) { + var overflowX = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-x" ), + overflowY = within.isWindow || within.isDocument ? "" : + within.element.css( "overflow-y" ), + hasOverflowX = overflowX === "scroll" || + ( overflowX === "auto" && within.width < within.element[0].scrollWidth ), + hasOverflowY = overflowY === "scroll" || + ( overflowY === "auto" && within.height < within.element[0].scrollHeight ); + return { + width: hasOverflowY ? $.position.scrollbarWidth() : 0, + height: hasOverflowX ? $.position.scrollbarWidth() : 0 + }; + }, + getWithinInfo: function( element ) { + var withinElement = $( element || window ), + isWindow = $.isWindow( withinElement[0] ), + isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9; + return { + element: withinElement, + isWindow: isWindow, + isDocument: isDocument, + offset: withinElement.offset() || { left: 0, top: 0 }, + scrollLeft: withinElement.scrollLeft(), + scrollTop: withinElement.scrollTop(), + + // support: jQuery 1.6.x + // jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows + width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(), + height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight() + }; + } +}; + +$.fn.position = function( options ) { + if ( !options || !options.of ) { + return _position.apply( this, arguments ); + } + + // make a copy, we don't want to modify arguments + options = $.extend( {}, options ); + + var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions, + target = $( options.of ), + within = $.position.getWithinInfo( options.within ), + scrollInfo = $.position.getScrollInfo( within ), + collision = ( options.collision || "flip" ).split( " " ), + offsets = {}; + + dimensions = getDimensions( target ); + if ( target[0].preventDefault ) { + // force left top to allow flipping + options.at = "left top"; + } + targetWidth = dimensions.width; + targetHeight = dimensions.height; + targetOffset = dimensions.offset; + // clone to reuse original targetOffset later + basePosition = $.extend( {}, targetOffset ); + + // force my and at to have valid horizontal and vertical positions + // if a value is missing or invalid, it will be converted to center + $.each( [ "my", "at" ], function() { + var pos = ( options[ this ] || "" ).split( " " ), + horizontalOffset, + verticalOffset; + + if ( pos.length === 1) { + pos = rhorizontal.test( pos[ 0 ] ) ? + pos.concat( [ "center" ] ) : + rvertical.test( pos[ 0 ] ) ? + [ "center" ].concat( pos ) : + [ "center", "center" ]; + } + pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center"; + pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center"; + + // calculate offsets + horizontalOffset = roffset.exec( pos[ 0 ] ); + verticalOffset = roffset.exec( pos[ 1 ] ); + offsets[ this ] = [ + horizontalOffset ? horizontalOffset[ 0 ] : 0, + verticalOffset ? verticalOffset[ 0 ] : 0 + ]; + + // reduce to just the positions without the offsets + options[ this ] = [ + rposition.exec( pos[ 0 ] )[ 0 ], + rposition.exec( pos[ 1 ] )[ 0 ] + ]; + }); + + // normalize collision option + if ( collision.length === 1 ) { + collision[ 1 ] = collision[ 0 ]; + } + + if ( options.at[ 0 ] === "right" ) { + basePosition.left += targetWidth; + } else if ( options.at[ 0 ] === "center" ) { + basePosition.left += targetWidth / 2; + } + + if ( options.at[ 1 ] === "bottom" ) { + basePosition.top += targetHeight; + } else if ( options.at[ 1 ] === "center" ) { + basePosition.top += targetHeight / 2; + } + + atOffset = getOffsets( offsets.at, targetWidth, targetHeight ); + basePosition.left += atOffset[ 0 ]; + basePosition.top += atOffset[ 1 ]; + + return this.each(function() { + var collisionPosition, using, + elem = $( this ), + elemWidth = elem.outerWidth(), + elemHeight = elem.outerHeight(), + marginLeft = parseCss( this, "marginLeft" ), + marginTop = parseCss( this, "marginTop" ), + collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width, + collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height, + position = $.extend( {}, basePosition ), + myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() ); + + if ( options.my[ 0 ] === "right" ) { + position.left -= elemWidth; + } else if ( options.my[ 0 ] === "center" ) { + position.left -= elemWidth / 2; + } + + if ( options.my[ 1 ] === "bottom" ) { + position.top -= elemHeight; + } else if ( options.my[ 1 ] === "center" ) { + position.top -= elemHeight / 2; + } + + position.left += myOffset[ 0 ]; + position.top += myOffset[ 1 ]; + + // if the browser doesn't support fractions, then round for consistent results + if ( !supportsOffsetFractions ) { + position.left = round( position.left ); + position.top = round( position.top ); + } + + collisionPosition = { + marginLeft: marginLeft, + marginTop: marginTop + }; + + $.each( [ "left", "top" ], function( i, dir ) { + if ( $.ui.position[ collision[ i ] ] ) { + $.ui.position[ collision[ i ] ][ dir ]( position, { + targetWidth: targetWidth, + targetHeight: targetHeight, + elemWidth: elemWidth, + elemHeight: elemHeight, + collisionPosition: collisionPosition, + collisionWidth: collisionWidth, + collisionHeight: collisionHeight, + offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ], + my: options.my, + at: options.at, + within: within, + elem: elem + }); + } + }); + + if ( options.using ) { + // adds feedback as second argument to using callback, if present + using = function( props ) { + var left = targetOffset.left - position.left, + right = left + targetWidth - elemWidth, + top = targetOffset.top - position.top, + bottom = top + targetHeight - elemHeight, + feedback = { + target: { + element: target, + left: targetOffset.left, + top: targetOffset.top, + width: targetWidth, + height: targetHeight + }, + element: { + element: elem, + left: position.left, + top: position.top, + width: elemWidth, + height: elemHeight + }, + horizontal: right < 0 ? "left" : left > 0 ? "right" : "center", + vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle" + }; + if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) { + feedback.horizontal = "center"; + } + if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) { + feedback.vertical = "middle"; + } + if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) { + feedback.important = "horizontal"; + } else { + feedback.important = "vertical"; + } + options.using.call( this, props, feedback ); + }; + } + + elem.offset( $.extend( position, { using: using } ) ); + }); +}; + +$.ui.position = { + fit: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollLeft : within.offset.left, + outerWidth = within.width, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = withinOffset - collisionPosLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset, + newOverRight; + + // element is wider than within + if ( data.collisionWidth > outerWidth ) { + // element is initially over the left side of within + if ( overLeft > 0 && overRight <= 0 ) { + newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset; + position.left += overLeft - newOverRight; + // element is initially over right side of within + } else if ( overRight > 0 && overLeft <= 0 ) { + position.left = withinOffset; + // element is initially over both left and right sides of within + } else { + if ( overLeft > overRight ) { + position.left = withinOffset + outerWidth - data.collisionWidth; + } else { + position.left = withinOffset; + } + } + // too far left -> align with left edge + } else if ( overLeft > 0 ) { + position.left += overLeft; + // too far right -> align with right edge + } else if ( overRight > 0 ) { + position.left -= overRight; + // adjust based on position and margin + } else { + position.left = max( position.left - collisionPosLeft, position.left ); + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.isWindow ? within.scrollTop : within.offset.top, + outerHeight = data.within.height, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = withinOffset - collisionPosTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset, + newOverBottom; + + // element is taller than within + if ( data.collisionHeight > outerHeight ) { + // element is initially over the top of within + if ( overTop > 0 && overBottom <= 0 ) { + newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset; + position.top += overTop - newOverBottom; + // element is initially over bottom of within + } else if ( overBottom > 0 && overTop <= 0 ) { + position.top = withinOffset; + // element is initially over both top and bottom of within + } else { + if ( overTop > overBottom ) { + position.top = withinOffset + outerHeight - data.collisionHeight; + } else { + position.top = withinOffset; + } + } + // too far up -> align with top + } else if ( overTop > 0 ) { + position.top += overTop; + // too far down -> align with bottom edge + } else if ( overBottom > 0 ) { + position.top -= overBottom; + // adjust based on position and margin + } else { + position.top = max( position.top - collisionPosTop, position.top ); + } + } + }, + flip: { + left: function( position, data ) { + var within = data.within, + withinOffset = within.offset.left + within.scrollLeft, + outerWidth = within.width, + offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left, + collisionPosLeft = position.left - data.collisionPosition.marginLeft, + overLeft = collisionPosLeft - offsetLeft, + overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft, + myOffset = data.my[ 0 ] === "left" ? + -data.elemWidth : + data.my[ 0 ] === "right" ? + data.elemWidth : + 0, + atOffset = data.at[ 0 ] === "left" ? + data.targetWidth : + data.at[ 0 ] === "right" ? + -data.targetWidth : + 0, + offset = -2 * data.offset[ 0 ], + newOverRight, + newOverLeft; + + if ( overLeft < 0 ) { + newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset; + if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) { + position.left += myOffset + atOffset + offset; + } + } else if ( overRight > 0 ) { + newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft; + if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) { + position.left += myOffset + atOffset + offset; + } + } + }, + top: function( position, data ) { + var within = data.within, + withinOffset = within.offset.top + within.scrollTop, + outerHeight = within.height, + offsetTop = within.isWindow ? within.scrollTop : within.offset.top, + collisionPosTop = position.top - data.collisionPosition.marginTop, + overTop = collisionPosTop - offsetTop, + overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop, + top = data.my[ 1 ] === "top", + myOffset = top ? + -data.elemHeight : + data.my[ 1 ] === "bottom" ? + data.elemHeight : + 0, + atOffset = data.at[ 1 ] === "top" ? + data.targetHeight : + data.at[ 1 ] === "bottom" ? + -data.targetHeight : + 0, + offset = -2 * data.offset[ 1 ], + newOverTop, + newOverBottom; + if ( overTop < 0 ) { + newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset; + if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) { + position.top += myOffset + atOffset + offset; + } + } else if ( overBottom > 0 ) { + newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop; + if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) { + position.top += myOffset + atOffset + offset; + } + } + } + }, + flipfit: { + left: function() { + $.ui.position.flip.left.apply( this, arguments ); + $.ui.position.fit.left.apply( this, arguments ); + }, + top: function() { + $.ui.position.flip.top.apply( this, arguments ); + $.ui.position.fit.top.apply( this, arguments ); + } + } +}; + +// fraction support test +(function() { + var testElement, testElementParent, testElementStyle, offsetLeft, i, + body = document.getElementsByTagName( "body" )[ 0 ], + div = document.createElement( "div" ); + + //Create a "fake body" for testing based on method used in jQuery.support + testElement = document.createElement( body ? "div" : "body" ); + testElementStyle = { + visibility: "hidden", + width: 0, + height: 0, + border: 0, + margin: 0, + background: "none" + }; + if ( body ) { + $.extend( testElementStyle, { + position: "absolute", + left: "-1000px", + top: "-1000px" + }); + } + for ( i in testElementStyle ) { + testElement.style[ i ] = testElementStyle[ i ]; + } + testElement.appendChild( div ); + testElementParent = body || document.documentElement; + testElementParent.insertBefore( testElement, testElementParent.firstChild ); + + div.style.cssText = "position: absolute; left: 10.7432222px;"; + + offsetLeft = $( div ).offset().left; + supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11; + + testElement.innerHTML = ""; + testElementParent.removeChild( testElement ); +})(); + +})(); + +var position = $.ui.position; + + +/*! + * jQuery UI Draggable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/draggable/ + */ + + +$.widget("ui.draggable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "drag", + options: { + addClasses: true, + appendTo: "parent", + axis: false, + connectToSortable: false, + containment: false, + cursor: "auto", + cursorAt: false, + grid: false, + handle: false, + helper: "original", + iframeFix: false, + opacity: false, + refreshPositions: false, + revert: false, + revertDuration: 500, + scope: "default", + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + snap: false, + snapMode: "both", + snapTolerance: 20, + stack: false, + zIndex: false, + + // callbacks + drag: null, + start: null, + stop: null + }, + _create: function() { + + if ( this.options.helper === "original" ) { + this._setPositionRelative(); + } + if (this.options.addClasses){ + this.element.addClass("ui-draggable"); + } + if (this.options.disabled){ + this.element.addClass("ui-draggable-disabled"); + } + this._setHandleClassName(); + + this._mouseInit(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "handle" ) { + this._removeHandleClassName(); + this._setHandleClassName(); + } + }, + + _destroy: function() { + if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) { + this.destroyOnClear = true; + return; + } + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); + this._removeHandleClassName(); + this._mouseDestroy(); + }, + + _mouseCapture: function(event) { + var o = this.options; + + this._blurActiveElement( event ); + + // among others, prevent a drag on a resizable-handle + if (this.helper || o.disabled || $(event.target).closest(".ui-resizable-handle").length > 0) { + return false; + } + + //Quit if we're not on a valid handle + this.handle = this._getHandle(event); + if (!this.handle) { + return false; + } + + this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix ); + + return true; + + }, + + _blockFrames: function( selector ) { + this.iframeBlocks = this.document.find( selector ).map(function() { + var iframe = $( this ); + + return $( "<div>" ) + .css( "position", "absolute" ) + .appendTo( iframe.parent() ) + .outerWidth( iframe.outerWidth() ) + .outerHeight( iframe.outerHeight() ) + .offset( iframe.offset() )[ 0 ]; + }); + }, + + _unblockFrames: function() { + if ( this.iframeBlocks ) { + this.iframeBlocks.remove(); + delete this.iframeBlocks; + } + }, + + _blurActiveElement: function( event ) { + var document = this.document[ 0 ]; + + // Only need to blur if the event occurred on the draggable itself, see #10527 + if ( !this.handleElement.is( event.target ) ) { + return; + } + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> + try { + + // Support: IE9, IE10 + // If the <body> is blurred, IE will switch windows, see #9520 + if ( document.activeElement && document.activeElement.nodeName.toLowerCase() !== "body" ) { + + // Blur any element that currently has focus, see #4261 + $( document.activeElement ).blur(); + } + } catch ( error ) {} + }, + + _mouseStart: function(event) { + + var o = this.options; + + //Create and append the visible helper + this.helper = this._createHelper(event); + + this.helper.addClass("ui-draggable-dragging"); + + //Cache the helper size + this._cacheHelperProportions(); + + //If ddmanager is used for droppables, set the global draggable + if ($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Store the helper's css position + this.cssPosition = this.helper.css( "position" ); + this.scrollParent = this.helper.scrollParent( true ); + this.offsetParent = this.helper.offsetParent(); + this.hasFixedAncestor = this.helper.parents().filter(function() { + return $( this ).css( "position" ) === "fixed"; + }).length > 0; + + //The element's absolute position on the page minus margins + this.positionAbs = this.element.offset(); + this._refreshOffsets( event ); + + //Generate the original position + this.originalPosition = this.position = this._generatePosition( event, false ); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Set a containment if given in the options + this._setContainment(); + + //Trigger event + callbacks + if (this._trigger("start", event) === false) { + this._clear(); + return false; + } + + //Recache the helper size + this._cacheHelperProportions(); + + //Prepare the droppable offsets + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + // Reset helper's right/bottom css if they're set and set explicit width/height instead + // as this prevents resizing of elements with right/bottom set (see #7772) + this._normalizeRightBottom(); + + this._mouseDrag(event, true); //Execute the drag once - this causes the helper not to be visible before getting its correct position + + //If the ddmanager is used for droppables, inform the manager that dragging has started (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStart(this, event); + } + + return true; + }, + + _refreshOffsets: function( event ) { + this.offset = { + top: this.positionAbs.top - this.margins.top, + left: this.positionAbs.left - this.margins.left, + scroll: false, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() + }; + + this.offset.click = { + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }; + }, + + _mouseDrag: function(event, noPropagation) { + // reset any necessary cached properties (see #5009) + if ( this.hasFixedAncestor ) { + this.offset.parent = this._getParentOffset(); + } + + //Compute the helpers position + this.position = this._generatePosition( event, true ); + this.positionAbs = this._convertPositionTo("absolute"); + + //Call plugins and callbacks and use the resulting position if something is returned + if (!noPropagation) { + var ui = this._uiHash(); + if (this._trigger("drag", event, ui) === false) { + this._mouseUp({}); + return false; + } + this.position = ui.position; + } + + this.helper[ 0 ].style.left = this.position.left + "px"; + this.helper[ 0 ].style.top = this.position.top + "px"; + + if ($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + return false; + }, + + _mouseStop: function(event) { + + //If we are using droppables, inform the manager about the drop + var that = this, + dropped = false; + if ($.ui.ddmanager && !this.options.dropBehaviour) { + dropped = $.ui.ddmanager.drop(this, event); + } + + //if a drop comes from outside (a sortable) + if (this.dropped) { + dropped = this.dropped; + this.dropped = false; + } + + if ((this.options.revert === "invalid" && !dropped) || (this.options.revert === "valid" && dropped) || this.options.revert === true || ($.isFunction(this.options.revert) && this.options.revert.call(this.element, dropped))) { + $(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function() { + if (that._trigger("stop", event) !== false) { + that._clear(); + } + }); + } else { + if (this._trigger("stop", event) !== false) { + this._clear(); + } + } + + return false; + }, + + _mouseUp: function( event ) { + this._unblockFrames(); + + //If the ddmanager is used for droppables, inform the manager that dragging has stopped (see #5003) + if ( $.ui.ddmanager ) { + $.ui.ddmanager.dragStop(this, event); + } + + // Only need to focus if the event occurred on the draggable itself, see #10527 + if ( this.handleElement.is( event.target ) ) { + // The interaction is over; whether or not the click resulted in a drag, focus the element + this.element.focus(); + } + + return $.ui.mouse.prototype._mouseUp.call(this, event); + }, + + cancel: function() { + + if (this.helper.is(".ui-draggable-dragging")) { + this._mouseUp({}); + } else { + this._clear(); + } + + return this; + + }, + + _getHandle: function(event) { + return this.options.handle ? + !!$( event.target ).closest( this.element.find( this.options.handle ) ).length : + true; + }, + + _setHandleClassName: function() { + this.handleElement = this.options.handle ? + this.element.find( this.options.handle ) : this.element; + this.handleElement.addClass( "ui-draggable-handle" ); + }, + + _removeHandleClassName: function() { + this.handleElement.removeClass( "ui-draggable-handle" ); + }, + + _createHelper: function(event) { + + var o = this.options, + helperIsFunction = $.isFunction( o.helper ), + helper = helperIsFunction ? + $( o.helper.apply( this.element[ 0 ], [ event ] ) ) : + ( o.helper === "clone" ? + this.element.clone().removeAttr( "id" ) : + this.element ); + + if (!helper.parents("body").length) { + helper.appendTo((o.appendTo === "parent" ? this.element[0].parentNode : o.appendTo)); + } + + // http://bugs.jqueryui.com/ticket/9446 + // a helper function can return the original element + // which wouldn't have been set to relative in _create + if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) { + this._setPositionRelative(); + } + + if (helper[0] !== this.element[0] && !(/(fixed|absolute)/).test(helper.css("position"))) { + helper.css("position", "absolute"); + } + + return helper; + + }, + + _setPositionRelative: function() { + if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) { + this.element[ 0 ].style.position = "relative"; + } + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = { left: +obj[0], top: +obj[1] || 0 }; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _isRootNode: function( element ) { + return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ]; + }, + + _getParentOffset: function() { + + //Get the offsetParent and cache its position + var po = this.offsetParent.offset(), + document = this.document[ 0 ]; + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if (this.cssPosition === "absolute" && this.scrollParent[0] !== document && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + if ( this._isRootNode( this.offsetParent[ 0 ] ) ) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0) + }; + + }, + + _getRelativeOffset: function() { + if ( this.cssPosition !== "relative" ) { + return { top: 0, left: 0 }; + } + + var p = this.element.position(), + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); + + return { + top: p.top - ( parseInt(this.helper.css( "top" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ), + left: p.left - ( parseInt(this.helper.css( "left" ), 10) || 0 ) + ( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 ) + }; + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.element.css("marginLeft"), 10) || 0), + top: (parseInt(this.element.css("marginTop"), 10) || 0), + right: (parseInt(this.element.css("marginRight"), 10) || 0), + bottom: (parseInt(this.element.css("marginBottom"), 10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var isUserScrollable, c, ce, + o = this.options, + document = this.document[ 0 ]; + + this.relativeContainer = null; + + if ( !o.containment ) { + this.containment = null; + return; + } + + if ( o.containment === "window" ) { + this.containment = [ + $( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left, + $( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top, + $( window ).scrollLeft() + $( window ).width() - this.helperProportions.width - this.margins.left, + $( window ).scrollTop() + ( $( window ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment === "document") { + this.containment = [ + 0, + 0, + $( document ).width() - this.helperProportions.width - this.margins.left, + ( $( document ).height() || document.body.parentNode.scrollHeight ) - this.helperProportions.height - this.margins.top + ]; + return; + } + + if ( o.containment.constructor === Array ) { + this.containment = o.containment; + return; + } + + if ( o.containment === "parent" ) { + o.containment = this.helper[ 0 ].parentNode; + } + + c = $( o.containment ); + ce = c[ 0 ]; + + if ( !ce ) { + return; + } + + isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) ); + + this.containment = [ + ( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ), + ( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) + ( parseInt( c.css( "paddingTop" ), 10 ) || 0 ), + ( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) - + ( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) - + ( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) - + this.helperProportions.width - + this.margins.left - + this.margins.right, + ( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) - + ( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) - + ( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) - + this.helperProportions.height - + this.margins.top - + this.margins.bottom + ]; + this.relativeContainer = c; + }, + + _convertPositionTo: function(d, pos) { + + if (!pos) { + pos = this.position; + } + + var mod = d === "absolute" ? 1 : -1, + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod) + ) + }; + + }, + + _generatePosition: function( event, constrainPosition ) { + + var containment, co, top, left, + o = this.options, + scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ), + pageX = event.pageX, + pageY = event.pageY; + + // Cache the scroll + if ( !scrollIsRootNode || !this.offset.scroll ) { + this.offset.scroll = { + top: this.scrollParent.scrollTop(), + left: this.scrollParent.scrollLeft() + }; + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + // If we are not dragging yet, we won't check for options + if ( constrainPosition ) { + if ( this.containment ) { + if ( this.relativeContainer ){ + co = this.relativeContainer.offset(); + containment = [ + this.containment[ 0 ] + co.left, + this.containment[ 1 ] + co.top, + this.containment[ 2 ] + co.left, + this.containment[ 3 ] + co.top + ]; + } else { + containment = this.containment; + } + + if (event.pageX - this.offset.click.left < containment[0]) { + pageX = containment[0] + this.offset.click.left; + } + if (event.pageY - this.offset.click.top < containment[1]) { + pageY = containment[1] + this.offset.click.top; + } + if (event.pageX - this.offset.click.left > containment[2]) { + pageX = containment[2] + this.offset.click.left; + } + if (event.pageY - this.offset.click.top > containment[3]) { + pageY = containment[3] + this.offset.click.top; + } + } + + if (o.grid) { + //Check for grid elements set to 0 to prevent divide by 0 error causing invalid argument errors in IE (see ticket #6950) + top = o.grid[1] ? this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1] : this.originalPageY; + pageY = containment ? ((top - this.offset.click.top >= containment[1] || top - this.offset.click.top > containment[3]) ? top : ((top - this.offset.click.top >= containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = o.grid[0] ? this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0] : this.originalPageX; + pageX = containment ? ((left - this.offset.click.left >= containment[0] || left - this.offset.click.left > containment[2]) ? left : ((left - this.offset.click.left >= containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + if ( o.axis === "y" ) { + pageX = this.originalPageX; + } + + if ( o.axis === "x" ) { + pageY = this.originalPageY; + } + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.offset.scroll.top : ( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( this.cssPosition === "fixed" ? -this.offset.scroll.left : ( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) + ) + }; + + }, + + _clear: function() { + this.helper.removeClass("ui-draggable-dragging"); + if (this.helper[0] !== this.element[0] && !this.cancelHelperRemoval) { + this.helper.remove(); + } + this.helper = null; + this.cancelHelperRemoval = false; + if ( this.destroyOnClear ) { + this.destroy(); + } + }, + + _normalizeRightBottom: function() { + if ( this.options.axis !== "y" && this.helper.css( "right" ) !== "auto" ) { + this.helper.width( this.helper.width() ); + this.helper.css( "right", "auto" ); + } + if ( this.options.axis !== "x" && this.helper.css( "bottom" ) !== "auto" ) { + this.helper.height( this.helper.height() ); + this.helper.css( "bottom", "auto" ); + } + }, + + // From now on bulk stuff - mainly helpers + + _trigger: function( type, event, ui ) { + ui = ui || this._uiHash(); + $.ui.plugin.call( this, type, [ event, ui, this ], true ); + + // Absolute position and offset (see #6884 ) have to be recalculated after plugins + if ( /^(drag|start|stop)/.test( type ) ) { + this.positionAbs = this._convertPositionTo( "absolute" ); + ui.offset = this.positionAbs; + } + return $.Widget.prototype._trigger.call( this, type, event, ui ); + }, + + plugins: {}, + + _uiHash: function() { + return { + helper: this.helper, + position: this.position, + originalPosition: this.originalPosition, + offset: this.positionAbs + }; + } + +}); + +$.ui.plugin.add( "draggable", "connectToSortable", { + start: function( event, ui, draggable ) { + var uiSortable = $.extend( {}, ui, { + item: draggable.element + }); + + draggable.sortables = []; + $( draggable.options.connectToSortable ).each(function() { + var sortable = $( this ).sortable( "instance" ); + + if ( sortable && !sortable.options.disabled ) { + draggable.sortables.push( sortable ); + + // refreshPositions is called at drag start to refresh the containerCache + // which is used in drag. This ensures it's initialized and synchronized + // with any changes that might have happened on the page since initialization. + sortable.refreshPositions(); + sortable._trigger("activate", event, uiSortable); + } + }); + }, + stop: function( event, ui, draggable ) { + var uiSortable = $.extend( {}, ui, { + item: draggable.element + }); + + draggable.cancelHelperRemoval = false; + + $.each( draggable.sortables, function() { + var sortable = this; + + if ( sortable.isOver ) { + sortable.isOver = 0; + + // Allow this sortable to handle removing the helper + draggable.cancelHelperRemoval = true; + sortable.cancelHelperRemoval = false; + + // Use _storedCSS To restore properties in the sortable, + // as this also handles revert (#9675) since the draggable + // may have modified them in unexpected ways (#8809) + sortable._storedCSS = { + position: sortable.placeholder.css( "position" ), + top: sortable.placeholder.css( "top" ), + left: sortable.placeholder.css( "left" ) + }; + + sortable._mouseStop(event); + + // Once drag has ended, the sortable should return to using + // its original helper, not the shared helper from draggable + sortable.options.helper = sortable.options._helper; + } else { + // Prevent this Sortable from removing the helper. + // However, don't set the draggable to remove the helper + // either as another connected Sortable may yet handle the removal. + sortable.cancelHelperRemoval = true; + + sortable._trigger( "deactivate", event, uiSortable ); + } + }); + }, + drag: function( event, ui, draggable ) { + $.each( draggable.sortables, function() { + var innermostIntersecting = false, + sortable = this; + + // Copy over variables that sortable's _intersectsWith uses + sortable.positionAbs = draggable.positionAbs; + sortable.helperProportions = draggable.helperProportions; + sortable.offset.click = draggable.offset.click; + + if ( sortable._intersectsWith( sortable.containerCache ) ) { + innermostIntersecting = true; + + $.each( draggable.sortables, function() { + // Copy over variables that sortable's _intersectsWith uses + this.positionAbs = draggable.positionAbs; + this.helperProportions = draggable.helperProportions; + this.offset.click = draggable.offset.click; + + if ( this !== sortable && + this._intersectsWith( this.containerCache ) && + $.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) { + innermostIntersecting = false; + } + + return innermostIntersecting; + }); + } + + if ( innermostIntersecting ) { + // If it intersects, we use a little isOver variable and set it once, + // so that the move-in stuff gets fired only once. + if ( !sortable.isOver ) { + sortable.isOver = 1; + + // Store draggable's parent in case we need to reappend to it later. + draggable._parent = ui.helper.parent(); + + sortable.currentItem = ui.helper + .appendTo( sortable.element ) + .data( "ui-sortable-item", true ); + + // Store helper option to later restore it + sortable.options._helper = sortable.options.helper; + + sortable.options.helper = function() { + return ui.helper[ 0 ]; + }; + + // Fire the start events of the sortable with our passed browser event, + // and our own helper (so it doesn't create a new one) + event.target = sortable.currentItem[ 0 ]; + sortable._mouseCapture( event, true ); + sortable._mouseStart( event, true, true ); + + // Because the browser event is way off the new appended portlet, + // modify necessary variables to reflect the changes + sortable.offset.click.top = draggable.offset.click.top; + sortable.offset.click.left = draggable.offset.click.left; + sortable.offset.parent.left -= draggable.offset.parent.left - + sortable.offset.parent.left; + sortable.offset.parent.top -= draggable.offset.parent.top - + sortable.offset.parent.top; + + draggable._trigger( "toSortable", event ); + + // Inform draggable that the helper is in a valid drop zone, + // used solely in the revert option to handle "valid/invalid". + draggable.dropped = sortable.element; + + // Need to refreshPositions of all sortables in the case that + // adding to one sortable changes the location of the other sortables (#9675) + $.each( draggable.sortables, function() { + this.refreshPositions(); + }); + + // hack so receive/update callbacks work (mostly) + draggable.currentItem = draggable.element; + sortable.fromOutside = draggable; + } + + if ( sortable.currentItem ) { + sortable._mouseDrag( event ); + // Copy the sortable's position because the draggable's can potentially reflect + // a relative position, while sortable is always absolute, which the dragged + // element has now become. (#8809) + ui.position = sortable.position; + } + } else { + // If it doesn't intersect with the sortable, and it intersected before, + // we fake the drag stop of the sortable, but make sure it doesn't remove + // the helper by using cancelHelperRemoval. + if ( sortable.isOver ) { + + sortable.isOver = 0; + sortable.cancelHelperRemoval = true; + + // Calling sortable's mouseStop would trigger a revert, + // so revert must be temporarily false until after mouseStop is called. + sortable.options._revert = sortable.options.revert; + sortable.options.revert = false; + + sortable._trigger( "out", event, sortable._uiHash( sortable ) ); + sortable._mouseStop( event, true ); + + // restore sortable behaviors that were modfied + // when the draggable entered the sortable area (#9481) + sortable.options.revert = sortable.options._revert; + sortable.options.helper = sortable.options._helper; + + if ( sortable.placeholder ) { + sortable.placeholder.remove(); + } + + // Restore and recalculate the draggable's offset considering the sortable + // may have modified them in unexpected ways. (#8809, #10669) + ui.helper.appendTo( draggable._parent ); + draggable._refreshOffsets( event ); + ui.position = draggable._generatePosition( event, true ); + + draggable._trigger( "fromSortable", event ); + + // Inform draggable that the helper is no longer in a valid drop zone + draggable.dropped = false; + + // Need to refreshPositions of all sortables just in case removing + // from one sortable changes the location of other sortables (#9675) + $.each( draggable.sortables, function() { + this.refreshPositions(); + }); + } + } + }); + } +}); + +$.ui.plugin.add("draggable", "cursor", { + start: function( event, ui, instance ) { + var t = $( "body" ), + o = instance.options; + + if (t.css("cursor")) { + o._cursor = t.css("cursor"); + } + t.css("cursor", o.cursor); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + if (o._cursor) { + $("body").css("cursor", o._cursor); + } + } +}); + +$.ui.plugin.add("draggable", "opacity", { + start: function( event, ui, instance ) { + var t = $( ui.helper ), + o = instance.options; + if (t.css("opacity")) { + o._opacity = t.css("opacity"); + } + t.css("opacity", o.opacity); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + if (o._opacity) { + $(ui.helper).css("opacity", o._opacity); + } + } +}); + +$.ui.plugin.add("draggable", "scroll", { + start: function( event, ui, i ) { + if ( !i.scrollParentNotHidden ) { + i.scrollParentNotHidden = i.helper.scrollParent( false ); + } + + if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] && i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) { + i.overflowOffset = i.scrollParentNotHidden.offset(); + } + }, + drag: function( event, ui, i ) { + + var o = i.options, + scrolled = false, + scrollParent = i.scrollParentNotHidden[ 0 ], + document = i.document[ 0 ]; + + if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { + if ( !o.axis || o.axis !== "x" ) { + if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < o.scrollSensitivity ) { + scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; + } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { + scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; + } + } + + if ( !o.axis || o.axis !== "y" ) { + if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < o.scrollSensitivity ) { + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; + } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; + } + } + + } else { + + if (!o.axis || o.axis !== "x") { + if (event.pageY - $(document).scrollTop() < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() - o.scrollSpeed); + } else if ($(window).height() - (event.pageY - $(document).scrollTop()) < o.scrollSensitivity) { + scrolled = $(document).scrollTop($(document).scrollTop() + o.scrollSpeed); + } + } + + if (!o.axis || o.axis !== "y") { + if (event.pageX - $(document).scrollLeft() < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() - o.scrollSpeed); + } else if ($(window).width() - (event.pageX - $(document).scrollLeft()) < o.scrollSensitivity) { + scrolled = $(document).scrollLeft($(document).scrollLeft() + o.scrollSpeed); + } + } + + } + + if (scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(i, event); + } + + } +}); + +$.ui.plugin.add("draggable", "snap", { + start: function( event, ui, i ) { + + var o = i.options; + + i.snapElements = []; + + $(o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap).each(function() { + var $t = $(this), + $o = $t.offset(); + if (this !== i.element[0]) { + i.snapElements.push({ + item: this, + width: $t.outerWidth(), height: $t.outerHeight(), + top: $o.top, left: $o.left + }); + } + }); + + }, + drag: function( event, ui, inst ) { + + var ts, bs, ls, rs, l, r, t, b, i, first, + o = inst.options, + d = o.snapTolerance, + x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width, + y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height; + + for (i = inst.snapElements.length - 1; i >= 0; i--){ + + l = inst.snapElements[i].left - inst.margins.left; + r = l + inst.snapElements[i].width; + t = inst.snapElements[i].top - inst.margins.top; + b = t + inst.snapElements[i].height; + + if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d || !$.contains( inst.snapElements[ i ].item.ownerDocument, inst.snapElements[ i ].item ) ) { + if (inst.snapElements[i].snapping) { + (inst.options.snap.release && inst.options.snap.release.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = false; + continue; + } + + if (o.snapMode !== "inner") { + ts = Math.abs(t - y2) <= d; + bs = Math.abs(b - y1) <= d; + ls = Math.abs(l - x2) <= d; + rs = Math.abs(r - x1) <= d; + if (ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t - inst.helperProportions.height, left: 0 }).top; + } + if (bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b, left: 0 }).top; + } + if (ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l - inst.helperProportions.width }).left; + } + if (rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r }).left; + } + } + + first = (ts || bs || ls || rs); + + if (o.snapMode !== "outer") { + ts = Math.abs(t - y1) <= d; + bs = Math.abs(b - y2) <= d; + ls = Math.abs(l - x1) <= d; + rs = Math.abs(r - x2) <= d; + if (ts) { + ui.position.top = inst._convertPositionTo("relative", { top: t, left: 0 }).top; + } + if (bs) { + ui.position.top = inst._convertPositionTo("relative", { top: b - inst.helperProportions.height, left: 0 }).top; + } + if (ls) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: l }).left; + } + if (rs) { + ui.position.left = inst._convertPositionTo("relative", { top: 0, left: r - inst.helperProportions.width }).left; + } + } + + if (!inst.snapElements[i].snapping && (ts || bs || ls || rs || first)) { + (inst.options.snap.snap && inst.options.snap.snap.call(inst.element, event, $.extend(inst._uiHash(), { snapItem: inst.snapElements[i].item }))); + } + inst.snapElements[i].snapping = (ts || bs || ls || rs || first); + + } + + } +}); + +$.ui.plugin.add("draggable", "stack", { + start: function( event, ui, instance ) { + var min, + o = instance.options, + group = $.makeArray($(o.stack)).sort(function(a, b) { + return (parseInt($(a).css("zIndex"), 10) || 0) - (parseInt($(b).css("zIndex"), 10) || 0); + }); + + if (!group.length) { return; } + + min = parseInt($(group[0]).css("zIndex"), 10) || 0; + $(group).each(function(i) { + $(this).css("zIndex", min + i); + }); + this.css("zIndex", (min + group.length)); + } +}); + +$.ui.plugin.add("draggable", "zIndex", { + start: function( event, ui, instance ) { + var t = $( ui.helper ), + o = instance.options; + + if (t.css("zIndex")) { + o._zIndex = t.css("zIndex"); + } + t.css("zIndex", o.zIndex); + }, + stop: function( event, ui, instance ) { + var o = instance.options; + + if (o._zIndex) { + $(ui.helper).css("zIndex", o._zIndex); + } + } +}); + +var draggable = $.ui.draggable; + + +/*! + * jQuery UI Droppable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/droppable/ + */ + + +$.widget( "ui.droppable", { + version: "1.11.4", + widgetEventPrefix: "drop", + options: { + accept: "*", + activeClass: false, + addClasses: true, + greedy: false, + hoverClass: false, + scope: "default", + tolerance: "intersect", + + // callbacks + activate: null, + deactivate: null, + drop: null, + out: null, + over: null + }, + _create: function() { + + var proportions, + o = this.options, + accept = o.accept; + + this.isover = false; + this.isout = true; + + this.accept = $.isFunction( accept ) ? accept : function( d ) { + return d.is( accept ); + }; + + this.proportions = function( /* valueToWrite */ ) { + if ( arguments.length ) { + // Store the droppable's proportions + proportions = arguments[ 0 ]; + } else { + // Retrieve or derive the droppable's proportions + return proportions ? + proportions : + proportions = { + width: this.element[ 0 ].offsetWidth, + height: this.element[ 0 ].offsetHeight + }; + } + }; + + this._addToManager( o.scope ); + + o.addClasses && this.element.addClass( "ui-droppable" ); + + }, + + _addToManager: function( scope ) { + // Add the reference and positions to the manager + $.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || []; + $.ui.ddmanager.droppables[ scope ].push( this ); + }, + + _splice: function( drop ) { + var i = 0; + for ( ; i < drop.length; i++ ) { + if ( drop[ i ] === this ) { + drop.splice( i, 1 ); + } + } + }, + + _destroy: function() { + var drop = $.ui.ddmanager.droppables[ this.options.scope ]; + + this._splice( drop ); + + this.element.removeClass( "ui-droppable ui-droppable-disabled" ); + }, + + _setOption: function( key, value ) { + + if ( key === "accept" ) { + this.accept = $.isFunction( value ) ? value : function( d ) { + return d.is( value ); + }; + } else if ( key === "scope" ) { + var drop = $.ui.ddmanager.droppables[ this.options.scope ]; + + this._splice( drop ); + this._addToManager( value ); + } + + this._super( key, value ); + }, + + _activate: function( event ) { + var draggable = $.ui.ddmanager.current; + if ( this.options.activeClass ) { + this.element.addClass( this.options.activeClass ); + } + if ( draggable ){ + this._trigger( "activate", event, this.ui( draggable ) ); + } + }, + + _deactivate: function( event ) { + var draggable = $.ui.ddmanager.current; + if ( this.options.activeClass ) { + this.element.removeClass( this.options.activeClass ); + } + if ( draggable ){ + this._trigger( "deactivate", event, this.ui( draggable ) ); + } + }, + + _over: function( event ) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.hoverClass ) { + this.element.addClass( this.options.hoverClass ); + } + this._trigger( "over", event, this.ui( draggable ) ); + } + + }, + + _out: function( event ) { + + var draggable = $.ui.ddmanager.current; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.hoverClass ) { + this.element.removeClass( this.options.hoverClass ); + } + this._trigger( "out", event, this.ui( draggable ) ); + } + + }, + + _drop: function( event, custom ) { + + var draggable = custom || $.ui.ddmanager.current, + childrenIntersection = false; + + // Bail if draggable and droppable are same element + if ( !draggable || ( draggable.currentItem || draggable.element )[ 0 ] === this.element[ 0 ] ) { + return false; + } + + this.element.find( ":data(ui-droppable)" ).not( ".ui-draggable-dragging" ).each(function() { + var inst = $( this ).droppable( "instance" ); + if ( + inst.options.greedy && + !inst.options.disabled && + inst.options.scope === draggable.options.scope && + inst.accept.call( inst.element[ 0 ], ( draggable.currentItem || draggable.element ) ) && + $.ui.intersect( draggable, $.extend( inst, { offset: inst.element.offset() } ), inst.options.tolerance, event ) + ) { childrenIntersection = true; return false; } + }); + if ( childrenIntersection ) { + return false; + } + + if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + if ( this.options.activeClass ) { + this.element.removeClass( this.options.activeClass ); + } + if ( this.options.hoverClass ) { + this.element.removeClass( this.options.hoverClass ); + } + this._trigger( "drop", event, this.ui( draggable ) ); + return this.element; + } + + return false; + + }, + + ui: function( c ) { + return { + draggable: ( c.currentItem || c.element ), + helper: c.helper, + position: c.position, + offset: c.positionAbs + }; + } + +}); + +$.ui.intersect = (function() { + function isOverAxis( x, reference, size ) { + return ( x >= reference ) && ( x < ( reference + size ) ); + } + + return function( draggable, droppable, toleranceMode, event ) { + + if ( !droppable.offset ) { + return false; + } + + var x1 = ( draggable.positionAbs || draggable.position.absolute ).left + draggable.margins.left, + y1 = ( draggable.positionAbs || draggable.position.absolute ).top + draggable.margins.top, + x2 = x1 + draggable.helperProportions.width, + y2 = y1 + draggable.helperProportions.height, + l = droppable.offset.left, + t = droppable.offset.top, + r = l + droppable.proportions().width, + b = t + droppable.proportions().height; + + switch ( toleranceMode ) { + case "fit": + return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b ); + case "intersect": + return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half + x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half + t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half + y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half + case "pointer": + return isOverAxis( event.pageY, t, droppable.proportions().height ) && isOverAxis( event.pageX, l, droppable.proportions().width ); + case "touch": + return ( + ( y1 >= t && y1 <= b ) || // Top edge touching + ( y2 >= t && y2 <= b ) || // Bottom edge touching + ( y1 < t && y2 > b ) // Surrounded vertically + ) && ( + ( x1 >= l && x1 <= r ) || // Left edge touching + ( x2 >= l && x2 <= r ) || // Right edge touching + ( x1 < l && x2 > r ) // Surrounded horizontally + ); + default: + return false; + } + }; +})(); + +/* + This manager tracks offsets of draggables and droppables +*/ +$.ui.ddmanager = { + current: null, + droppables: { "default": [] }, + prepareOffsets: function( t, event ) { + + var i, j, + m = $.ui.ddmanager.droppables[ t.options.scope ] || [], + type = event ? event.type : null, // workaround for #2317 + list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack(); + + droppablesLoop: for ( i = 0; i < m.length; i++ ) { + + // No disabled and non-accepted + if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ], ( t.currentItem || t.element ) ) ) ) { + continue; + } + + // Filter out elements in the current dragged item + for ( j = 0; j < list.length; j++ ) { + if ( list[ j ] === m[ i ].element[ 0 ] ) { + m[ i ].proportions().height = 0; + continue droppablesLoop; + } + } + + m[ i ].visible = m[ i ].element.css( "display" ) !== "none"; + if ( !m[ i ].visible ) { + continue; + } + + // Activate the droppable if used directly from draggables + if ( type === "mousedown" ) { + m[ i ]._activate.call( m[ i ], event ); + } + + m[ i ].offset = m[ i ].element.offset(); + m[ i ].proportions({ width: m[ i ].element[ 0 ].offsetWidth, height: m[ i ].element[ 0 ].offsetHeight }); + + } + + }, + drop: function( draggable, event ) { + + var dropped = false; + // Create a copy of the droppables in case the list changes during the drop (#9116) + $.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() { + + if ( !this.options ) { + return; + } + if ( !this.options.disabled && this.visible && $.ui.intersect( draggable, this, this.options.tolerance, event ) ) { + dropped = this._drop.call( this, event ) || dropped; + } + + if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ], ( draggable.currentItem || draggable.element ) ) ) { + this.isout = true; + this.isover = false; + this._deactivate.call( this, event ); + } + + }); + return dropped; + + }, + dragStart: function( draggable, event ) { + // Listen for scrolling so that if the dragging causes scrolling the position of the droppables can be recalculated (see #5003) + draggable.element.parentsUntil( "body" ).bind( "scroll.droppable", function() { + if ( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + }); + }, + drag: function( draggable, event ) { + + // If you have a highly dynamic page, you might try this option. It renders positions every time you move the mouse. + if ( draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + + // Run through all droppables and check their positions based on specific tolerance options + $.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() { + + if ( this.options.disabled || this.greedyChild || !this.visible ) { + return; + } + + var parentInstance, scope, parent, + intersects = $.ui.intersect( draggable, this, this.options.tolerance, event ), + c = !intersects && this.isover ? "isout" : ( intersects && !this.isover ? "isover" : null ); + if ( !c ) { + return; + } + + if ( this.options.greedy ) { + // find droppable parents with same scope + scope = this.options.scope; + parent = this.element.parents( ":data(ui-droppable)" ).filter(function() { + return $( this ).droppable( "instance" ).options.scope === scope; + }); + + if ( parent.length ) { + parentInstance = $( parent[ 0 ] ).droppable( "instance" ); + parentInstance.greedyChild = ( c === "isover" ); + } + } + + // we just moved into a greedy child + if ( parentInstance && c === "isover" ) { + parentInstance.isover = false; + parentInstance.isout = true; + parentInstance._out.call( parentInstance, event ); + } + + this[ c ] = true; + this[c === "isout" ? "isover" : "isout"] = false; + this[c === "isover" ? "_over" : "_out"].call( this, event ); + + // we just moved out of a greedy child + if ( parentInstance && c === "isout" ) { + parentInstance.isout = false; + parentInstance.isover = true; + parentInstance._over.call( parentInstance, event ); + } + }); + + }, + dragStop: function( draggable, event ) { + draggable.element.parentsUntil( "body" ).unbind( "scroll.droppable" ); + // Call prepareOffsets one final time since IE does not fire return scroll events when overflow was caused by drag (see #5003) + if ( !draggable.options.refreshPositions ) { + $.ui.ddmanager.prepareOffsets( draggable, event ); + } + } +}; + +var droppable = $.ui.droppable; + + +/*! + * jQuery UI Resizable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/resizable/ + */ + + +$.widget("ui.resizable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "resize", + options: { + alsoResize: false, + animate: false, + animateDuration: "slow", + animateEasing: "swing", + aspectRatio: false, + autoHide: false, + containment: false, + ghost: false, + grid: false, + handles: "e,s,se", + helper: false, + maxHeight: null, + maxWidth: null, + minHeight: 10, + minWidth: 10, + // See #7960 + zIndex: 90, + + // callbacks + resize: null, + start: null, + stop: null + }, + + _num: function( value ) { + return parseInt( value, 10 ) || 0; + }, + + _isNumber: function( value ) { + return !isNaN( parseInt( value, 10 ) ); + }, + + _hasScroll: function( el, a ) { + + if ( $( el ).css( "overflow" ) === "hidden") { + return false; + } + + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop", + has = false; + + if ( el[ scroll ] > 0 ) { + return true; + } + + // TODO: determine which cases actually cause this to happen + // if the element doesn't have the scroll set, see if it's possible to + // set the scroll + el[ scroll ] = 1; + has = ( el[ scroll ] > 0 ); + el[ scroll ] = 0; + return has; + }, + + _create: function() { + + var n, i, handle, axis, hname, + that = this, + o = this.options; + this.element.addClass("ui-resizable"); + + $.extend(this, { + _aspectRatio: !!(o.aspectRatio), + aspectRatio: o.aspectRatio, + originalElement: this.element, + _proportionallyResizeElements: [], + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null + }); + + // Wrap the element if it cannot hold child nodes + if (this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)) { + + this.element.wrap( + $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({ + position: this.element.css("position"), + width: this.element.outerWidth(), + height: this.element.outerHeight(), + top: this.element.css("top"), + left: this.element.css("left") + }) + ); + + this.element = this.element.parent().data( + "ui-resizable", this.element.resizable( "instance" ) + ); + + this.elementIsWrapper = true; + + this.element.css({ + marginLeft: this.originalElement.css("marginLeft"), + marginTop: this.originalElement.css("marginTop"), + marginRight: this.originalElement.css("marginRight"), + marginBottom: this.originalElement.css("marginBottom") + }); + this.originalElement.css({ + marginLeft: 0, + marginTop: 0, + marginRight: 0, + marginBottom: 0 + }); + // support: Safari + // Prevent Safari textarea resize + this.originalResizeStyle = this.originalElement.css("resize"); + this.originalElement.css("resize", "none"); + + this._proportionallyResizeElements.push( this.originalElement.css({ + position: "static", + zoom: 1, + display: "block" + }) ); + + // support: IE9 + // avoid IE jump (hard set the margin) + this.originalElement.css({ margin: this.originalElement.css("margin") }); + + this._proportionallyResize(); + } + + this.handles = o.handles || + ( !$(".ui-resizable-handle", this.element).length ? + "e,s,se" : { + n: ".ui-resizable-n", + e: ".ui-resizable-e", + s: ".ui-resizable-s", + w: ".ui-resizable-w", + se: ".ui-resizable-se", + sw: ".ui-resizable-sw", + ne: ".ui-resizable-ne", + nw: ".ui-resizable-nw" + } ); + + this._handles = $(); + if ( this.handles.constructor === String ) { + + if ( this.handles === "all") { + this.handles = "n,e,s,w,se,sw,ne,nw"; + } + + n = this.handles.split(","); + this.handles = {}; + + for (i = 0; i < n.length; i++) { + + handle = $.trim(n[i]); + hname = "ui-resizable-" + handle; + axis = $("<div class='ui-resizable-handle " + hname + "'></div>"); + + axis.css({ zIndex: o.zIndex }); + + // TODO : What's going on here? + if ("se" === handle) { + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se"); + } + + this.handles[handle] = ".ui-resizable-" + handle; + this.element.append(axis); + } + + } + + this._renderAxis = function(target) { + + var i, axis, padPos, padWrapper; + + target = target || this.element; + + for (i in this.handles) { + + if (this.handles[i].constructor === String) { + this.handles[i] = this.element.children( this.handles[ i ] ).first().show(); + } else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) { + this.handles[ i ] = $( this.handles[ i ] ); + this._on( this.handles[ i ], { "mousedown": that._mouseDown }); + } + + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)) { + + axis = $(this.handles[i], this.element); + + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth(); + + padPos = [ "padding", + /ne|nw|n/.test(i) ? "Top" : + /se|sw|s/.test(i) ? "Bottom" : + /^e$/.test(i) ? "Right" : "Left" ].join(""); + + target.css(padPos, padWrapper); + + this._proportionallyResize(); + } + + this._handles = this._handles.add( this.handles[ i ] ); + } + }; + + // TODO: make renderAxis a prototype function + this._renderAxis(this.element); + + this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) ); + this._handles.disableSelection(); + + this._handles.mouseover(function() { + if (!that.resizing) { + if (this.className) { + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i); + } + that.axis = axis && axis[1] ? axis[1] : "se"; + } + }); + + if (o.autoHide) { + this._handles.hide(); + $(this.element) + .addClass("ui-resizable-autohide") + .mouseenter(function() { + if (o.disabled) { + return; + } + $(this).removeClass("ui-resizable-autohide"); + that._handles.show(); + }) + .mouseleave(function() { + if (o.disabled) { + return; + } + if (!that.resizing) { + $(this).addClass("ui-resizable-autohide"); + that._handles.hide(); + } + }); + } + + this._mouseInit(); + }, + + _destroy: function() { + + this._mouseDestroy(); + + var wrapper, + _destroy = function(exp) { + $(exp) + .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing") + .removeData("resizable") + .removeData("ui-resizable") + .unbind(".resizable") + .find(".ui-resizable-handle") + .remove(); + }; + + // TODO: Unwrap at same DOM position + if (this.elementIsWrapper) { + _destroy(this.element); + wrapper = this.element; + this.originalElement.css({ + position: wrapper.css("position"), + width: wrapper.outerWidth(), + height: wrapper.outerHeight(), + top: wrapper.css("top"), + left: wrapper.css("left") + }).insertAfter( wrapper ); + wrapper.remove(); + } + + this.originalElement.css("resize", this.originalResizeStyle); + _destroy(this.originalElement); + + return this; + }, + + _mouseCapture: function(event) { + var i, handle, + capture = false; + + for (i in this.handles) { + handle = $(this.handles[i])[0]; + if (handle === event.target || $.contains(handle, event.target)) { + capture = true; + } + } + + return !this.options.disabled && capture; + }, + + _mouseStart: function(event) { + + var curleft, curtop, cursor, + o = this.options, + el = this.element; + + this.resizing = true; + + this._renderProxy(); + + curleft = this._num(this.helper.css("left")); + curtop = this._num(this.helper.css("top")); + + if (o.containment) { + curleft += $(o.containment).scrollLeft() || 0; + curtop += $(o.containment).scrollTop() || 0; + } + + this.offset = this.helper.offset(); + this.position = { left: curleft, top: curtop }; + + this.size = this._helper ? { + width: this.helper.width(), + height: this.helper.height() + } : { + width: el.width(), + height: el.height() + }; + + this.originalSize = this._helper ? { + width: el.outerWidth(), + height: el.outerHeight() + } : { + width: el.width(), + height: el.height() + }; + + this.sizeDiff = { + width: el.outerWidth() - el.width(), + height: el.outerHeight() - el.height() + }; + + this.originalPosition = { left: curleft, top: curtop }; + this.originalMousePosition = { left: event.pageX, top: event.pageY }; + + this.aspectRatio = (typeof o.aspectRatio === "number") ? + o.aspectRatio : + ((this.originalSize.width / this.originalSize.height) || 1); + + cursor = $(".ui-resizable-" + this.axis).css("cursor"); + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor); + + el.addClass("ui-resizable-resizing"); + this._propagate("start", event); + return true; + }, + + _mouseDrag: function(event) { + + var data, props, + smp = this.originalMousePosition, + a = this.axis, + dx = (event.pageX - smp.left) || 0, + dy = (event.pageY - smp.top) || 0, + trigger = this._change[a]; + + this._updatePrevProperties(); + + if (!trigger) { + return false; + } + + data = trigger.apply(this, [ event, dx, dy ]); + + this._updateVirtualBoundaries(event.shiftKey); + if (this._aspectRatio || event.shiftKey) { + data = this._updateRatio(data, event); + } + + data = this._respectSize(data, event); + + this._updateCache(data); + + this._propagate("resize", event); + + props = this._applyChanges(); + + if ( !this._helper && this._proportionallyResizeElements.length ) { + this._proportionallyResize(); + } + + if ( !$.isEmptyObject( props ) ) { + this._updatePrevProperties(); + this._trigger( "resize", event, this.ui() ); + this._applyChanges(); + } + + return false; + }, + + _mouseStop: function(event) { + + this.resizing = false; + var pr, ista, soffseth, soffsetw, s, left, top, + o = this.options, that = this; + + if (this._helper) { + + pr = this._proportionallyResizeElements; + ista = pr.length && (/textarea/i).test(pr[0].nodeName); + soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height; + soffsetw = ista ? 0 : that.sizeDiff.width; + + s = { + width: (that.helper.width() - soffsetw), + height: (that.helper.height() - soffseth) + }; + left = (parseInt(that.element.css("left"), 10) + + (that.position.left - that.originalPosition.left)) || null; + top = (parseInt(that.element.css("top"), 10) + + (that.position.top - that.originalPosition.top)) || null; + + if (!o.animate) { + this.element.css($.extend(s, { top: top, left: left })); + } + + that.helper.height(that.size.height); + that.helper.width(that.size.width); + + if (this._helper && !o.animate) { + this._proportionallyResize(); + } + } + + $("body").css("cursor", "auto"); + + this.element.removeClass("ui-resizable-resizing"); + + this._propagate("stop", event); + + if (this._helper) { + this.helper.remove(); + } + + return false; + + }, + + _updatePrevProperties: function() { + this.prevPosition = { + top: this.position.top, + left: this.position.left + }; + this.prevSize = { + width: this.size.width, + height: this.size.height + }; + }, + + _applyChanges: function() { + var props = {}; + + if ( this.position.top !== this.prevPosition.top ) { + props.top = this.position.top + "px"; + } + if ( this.position.left !== this.prevPosition.left ) { + props.left = this.position.left + "px"; + } + if ( this.size.width !== this.prevSize.width ) { + props.width = this.size.width + "px"; + } + if ( this.size.height !== this.prevSize.height ) { + props.height = this.size.height + "px"; + } + + this.helper.css( props ); + + return props; + }, + + _updateVirtualBoundaries: function(forceAspectRatio) { + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b, + o = this.options; + + b = { + minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0, + maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity, + minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0, + maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity + }; + + if (this._aspectRatio || forceAspectRatio) { + pMinWidth = b.minHeight * this.aspectRatio; + pMinHeight = b.minWidth / this.aspectRatio; + pMaxWidth = b.maxHeight * this.aspectRatio; + pMaxHeight = b.maxWidth / this.aspectRatio; + + if (pMinWidth > b.minWidth) { + b.minWidth = pMinWidth; + } + if (pMinHeight > b.minHeight) { + b.minHeight = pMinHeight; + } + if (pMaxWidth < b.maxWidth) { + b.maxWidth = pMaxWidth; + } + if (pMaxHeight < b.maxHeight) { + b.maxHeight = pMaxHeight; + } + } + this._vBoundaries = b; + }, + + _updateCache: function(data) { + this.offset = this.helper.offset(); + if (this._isNumber(data.left)) { + this.position.left = data.left; + } + if (this._isNumber(data.top)) { + this.position.top = data.top; + } + if (this._isNumber(data.height)) { + this.size.height = data.height; + } + if (this._isNumber(data.width)) { + this.size.width = data.width; + } + }, + + _updateRatio: function( data ) { + + var cpos = this.position, + csize = this.size, + a = this.axis; + + if (this._isNumber(data.height)) { + data.width = (data.height * this.aspectRatio); + } else if (this._isNumber(data.width)) { + data.height = (data.width / this.aspectRatio); + } + + if (a === "sw") { + data.left = cpos.left + (csize.width - data.width); + data.top = null; + } + if (a === "nw") { + data.top = cpos.top + (csize.height - data.height); + data.left = cpos.left + (csize.width - data.width); + } + + return data; + }, + + _respectSize: function( data ) { + + var o = this._vBoundaries, + a = this.axis, + ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width), + ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height), + isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width), + isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height), + dw = this.originalPosition.left + this.originalSize.width, + dh = this.position.top + this.size.height, + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a); + if (isminw) { + data.width = o.minWidth; + } + if (isminh) { + data.height = o.minHeight; + } + if (ismaxw) { + data.width = o.maxWidth; + } + if (ismaxh) { + data.height = o.maxHeight; + } + + if (isminw && cw) { + data.left = dw - o.minWidth; + } + if (ismaxw && cw) { + data.left = dw - o.maxWidth; + } + if (isminh && ch) { + data.top = dh - o.minHeight; + } + if (ismaxh && ch) { + data.top = dh - o.maxHeight; + } + + // Fixing jump error on top/left - bug #2330 + if (!data.width && !data.height && !data.left && data.top) { + data.top = null; + } else if (!data.width && !data.height && !data.top && data.left) { + data.left = null; + } + + return data; + }, + + _getPaddingPlusBorderDimensions: function( element ) { + var i = 0, + widths = [], + borders = [ + element.css( "borderTopWidth" ), + element.css( "borderRightWidth" ), + element.css( "borderBottomWidth" ), + element.css( "borderLeftWidth" ) + ], + paddings = [ + element.css( "paddingTop" ), + element.css( "paddingRight" ), + element.css( "paddingBottom" ), + element.css( "paddingLeft" ) + ]; + + for ( ; i < 4; i++ ) { + widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 ); + widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 ); + } + + return { + height: widths[ 0 ] + widths[ 2 ], + width: widths[ 1 ] + widths[ 3 ] + }; + }, + + _proportionallyResize: function() { + + if (!this._proportionallyResizeElements.length) { + return; + } + + var prel, + i = 0, + element = this.helper || this.element; + + for ( ; i < this._proportionallyResizeElements.length; i++) { + + prel = this._proportionallyResizeElements[i]; + + // TODO: Seems like a bug to cache this.outerDimensions + // considering that we are in a loop. + if (!this.outerDimensions) { + this.outerDimensions = this._getPaddingPlusBorderDimensions( prel ); + } + + prel.css({ + height: (element.height() - this.outerDimensions.height) || 0, + width: (element.width() - this.outerDimensions.width) || 0 + }); + + } + + }, + + _renderProxy: function() { + + var el = this.element, o = this.options; + this.elementOffset = el.offset(); + + if (this._helper) { + + this.helper = this.helper || $("<div style='overflow:hidden;'></div>"); + + this.helper.addClass(this._helper).css({ + width: this.element.outerWidth() - 1, + height: this.element.outerHeight() - 1, + position: "absolute", + left: this.elementOffset.left + "px", + top: this.elementOffset.top + "px", + zIndex: ++o.zIndex //TODO: Don't modify option + }); + + this.helper + .appendTo("body") + .disableSelection(); + + } else { + this.helper = this.element; + } + + }, + + _change: { + e: function(event, dx) { + return { width: this.originalSize.width + dx }; + }, + w: function(event, dx) { + var cs = this.originalSize, sp = this.originalPosition; + return { left: sp.left + dx, width: cs.width - dx }; + }, + n: function(event, dx, dy) { + var cs = this.originalSize, sp = this.originalPosition; + return { top: sp.top + dy, height: cs.height - dy }; + }, + s: function(event, dx, dy) { + return { height: this.originalSize.height + dy }; + }, + se: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), + this._change.e.apply(this, [ event, dx, dy ])); + }, + sw: function(event, dx, dy) { + return $.extend(this._change.s.apply(this, arguments), + this._change.w.apply(this, [ event, dx, dy ])); + }, + ne: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), + this._change.e.apply(this, [ event, dx, dy ])); + }, + nw: function(event, dx, dy) { + return $.extend(this._change.n.apply(this, arguments), + this._change.w.apply(this, [ event, dx, dy ])); + } + }, + + _propagate: function(n, event) { + $.ui.plugin.call(this, n, [ event, this.ui() ]); + (n !== "resize" && this._trigger(n, event, this.ui())); + }, + + plugins: {}, + + ui: function() { + return { + originalElement: this.originalElement, + element: this.element, + helper: this.helper, + position: this.position, + size: this.size, + originalSize: this.originalSize, + originalPosition: this.originalPosition + }; + } + +}); + +/* + * Resizable Extensions + */ + +$.ui.plugin.add("resizable", "animate", { + + stop: function( event ) { + var that = $(this).resizable( "instance" ), + o = that.options, + pr = that._proportionallyResizeElements, + ista = pr.length && (/textarea/i).test(pr[0].nodeName), + soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height, + soffsetw = ista ? 0 : that.sizeDiff.width, + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) }, + left = (parseInt(that.element.css("left"), 10) + + (that.position.left - that.originalPosition.left)) || null, + top = (parseInt(that.element.css("top"), 10) + + (that.position.top - that.originalPosition.top)) || null; + + that.element.animate( + $.extend(style, top && left ? { top: top, left: left } : {}), { + duration: o.animateDuration, + easing: o.animateEasing, + step: function() { + + var data = { + width: parseInt(that.element.css("width"), 10), + height: parseInt(that.element.css("height"), 10), + top: parseInt(that.element.css("top"), 10), + left: parseInt(that.element.css("left"), 10) + }; + + if (pr && pr.length) { + $(pr[0]).css({ width: data.width, height: data.height }); + } + + // propagating resize, and updating values for each animation step + that._updateCache(data); + that._propagate("resize", event); + + } + } + ); + } + +}); + +$.ui.plugin.add( "resizable", "containment", { + + start: function() { + var element, p, co, ch, cw, width, height, + that = $( this ).resizable( "instance" ), + o = that.options, + el = that.element, + oc = o.containment, + ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc; + + if ( !ce ) { + return; + } + + that.containerElement = $( ce ); + + if ( /document/.test( oc ) || oc === document ) { + that.containerOffset = { + left: 0, + top: 0 + }; + that.containerPosition = { + left: 0, + top: 0 + }; + + that.parentData = { + element: $( document ), + left: 0, + top: 0, + width: $( document ).width(), + height: $( document ).height() || document.body.parentNode.scrollHeight + }; + } else { + element = $( ce ); + p = []; + $([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) { + p[ i ] = that._num( element.css( "padding" + name ) ); + }); + + that.containerOffset = element.offset(); + that.containerPosition = element.position(); + that.containerSize = { + height: ( element.innerHeight() - p[ 3 ] ), + width: ( element.innerWidth() - p[ 1 ] ) + }; + + co = that.containerOffset; + ch = that.containerSize.height; + cw = that.containerSize.width; + width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw ); + height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ; + + that.parentData = { + element: ce, + left: co.left, + top: co.top, + width: width, + height: height + }; + } + }, + + resize: function( event ) { + var woset, hoset, isParent, isOffsetRelative, + that = $( this ).resizable( "instance" ), + o = that.options, + co = that.containerOffset, + cp = that.position, + pRatio = that._aspectRatio || event.shiftKey, + cop = { + top: 0, + left: 0 + }, + ce = that.containerElement, + continueResize = true; + + if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) { + cop = co; + } + + if ( cp.left < ( that._helper ? co.left : 0 ) ) { + that.size.width = that.size.width + + ( that._helper ? + ( that.position.left - co.left ) : + ( that.position.left - cop.left ) ); + + if ( pRatio ) { + that.size.height = that.size.width / that.aspectRatio; + continueResize = false; + } + that.position.left = o.helper ? co.left : 0; + } + + if ( cp.top < ( that._helper ? co.top : 0 ) ) { + that.size.height = that.size.height + + ( that._helper ? + ( that.position.top - co.top ) : + that.position.top ); + + if ( pRatio ) { + that.size.width = that.size.height * that.aspectRatio; + continueResize = false; + } + that.position.top = that._helper ? co.top : 0; + } + + isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 ); + isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) ); + + if ( isParent && isOffsetRelative ) { + that.offset.left = that.parentData.left + that.position.left; + that.offset.top = that.parentData.top + that.position.top; + } else { + that.offset.left = that.element.offset().left; + that.offset.top = that.element.offset().top; + } + + woset = Math.abs( that.sizeDiff.width + + (that._helper ? + that.offset.left - cop.left : + (that.offset.left - co.left)) ); + + hoset = Math.abs( that.sizeDiff.height + + (that._helper ? + that.offset.top - cop.top : + (that.offset.top - co.top)) ); + + if ( woset + that.size.width >= that.parentData.width ) { + that.size.width = that.parentData.width - woset; + if ( pRatio ) { + that.size.height = that.size.width / that.aspectRatio; + continueResize = false; + } + } + + if ( hoset + that.size.height >= that.parentData.height ) { + that.size.height = that.parentData.height - hoset; + if ( pRatio ) { + that.size.width = that.size.height * that.aspectRatio; + continueResize = false; + } + } + + if ( !continueResize ) { + that.position.left = that.prevPosition.left; + that.position.top = that.prevPosition.top; + that.size.width = that.prevSize.width; + that.size.height = that.prevSize.height; + } + }, + + stop: function() { + var that = $( this ).resizable( "instance" ), + o = that.options, + co = that.containerOffset, + cop = that.containerPosition, + ce = that.containerElement, + helper = $( that.helper ), + ho = helper.offset(), + w = helper.outerWidth() - that.sizeDiff.width, + h = helper.outerHeight() - that.sizeDiff.height; + + if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) { + $( this ).css({ + left: ho.left - cop.left - co.left, + width: w, + height: h + }); + } + + if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) { + $( this ).css({ + left: ho.left - cop.left - co.left, + width: w, + height: h + }); + } + } +}); + +$.ui.plugin.add("resizable", "alsoResize", { + + start: function() { + var that = $(this).resizable( "instance" ), + o = that.options; + + $(o.alsoResize).each(function() { + var el = $(this); + el.data("ui-resizable-alsoresize", { + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10), + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10) + }); + }); + }, + + resize: function(event, ui) { + var that = $(this).resizable( "instance" ), + o = that.options, + os = that.originalSize, + op = that.originalPosition, + delta = { + height: (that.size.height - os.height) || 0, + width: (that.size.width - os.width) || 0, + top: (that.position.top - op.top) || 0, + left: (that.position.left - op.left) || 0 + }; + + $(o.alsoResize).each(function() { + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {}, + css = el.parents(ui.originalElement[0]).length ? + [ "width", "height" ] : + [ "width", "height", "top", "left" ]; + + $.each(css, function(i, prop) { + var sum = (start[prop] || 0) + (delta[prop] || 0); + if (sum && sum >= 0) { + style[prop] = sum || null; + } + }); + + el.css(style); + }); + }, + + stop: function() { + $(this).removeData("resizable-alsoresize"); + } +}); + +$.ui.plugin.add("resizable", "ghost", { + + start: function() { + + var that = $(this).resizable( "instance" ), o = that.options, cs = that.size; + + that.ghost = that.originalElement.clone(); + that.ghost + .css({ + opacity: 0.25, + display: "block", + position: "relative", + height: cs.height, + width: cs.width, + margin: 0, + left: 0, + top: 0 + }) + .addClass("ui-resizable-ghost") + .addClass(typeof o.ghost === "string" ? o.ghost : ""); + + that.ghost.appendTo(that.helper); + + }, + + resize: function() { + var that = $(this).resizable( "instance" ); + if (that.ghost) { + that.ghost.css({ + position: "relative", + height: that.size.height, + width: that.size.width + }); + } + }, + + stop: function() { + var that = $(this).resizable( "instance" ); + if (that.ghost && that.helper) { + that.helper.get(0).removeChild(that.ghost.get(0)); + } + } + +}); + +$.ui.plugin.add("resizable", "grid", { + + resize: function() { + var outerDimensions, + that = $(this).resizable( "instance" ), + o = that.options, + cs = that.size, + os = that.originalSize, + op = that.originalPosition, + a = that.axis, + grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid, + gridX = (grid[0] || 1), + gridY = (grid[1] || 1), + ox = Math.round((cs.width - os.width) / gridX) * gridX, + oy = Math.round((cs.height - os.height) / gridY) * gridY, + newWidth = os.width + ox, + newHeight = os.height + oy, + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth), + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight), + isMinWidth = o.minWidth && (o.minWidth > newWidth), + isMinHeight = o.minHeight && (o.minHeight > newHeight); + + o.grid = grid; + + if (isMinWidth) { + newWidth += gridX; + } + if (isMinHeight) { + newHeight += gridY; + } + if (isMaxWidth) { + newWidth -= gridX; + } + if (isMaxHeight) { + newHeight -= gridY; + } + + if (/^(se|s|e)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + } else if (/^(ne)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.top = op.top - oy; + } else if (/^(sw)$/.test(a)) { + that.size.width = newWidth; + that.size.height = newHeight; + that.position.left = op.left - ox; + } else { + if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) { + outerDimensions = that._getPaddingPlusBorderDimensions( this ); + } + + if ( newHeight - gridY > 0 ) { + that.size.height = newHeight; + that.position.top = op.top - oy; + } else { + newHeight = gridY - outerDimensions.height; + that.size.height = newHeight; + that.position.top = op.top + os.height - newHeight; + } + if ( newWidth - gridX > 0 ) { + that.size.width = newWidth; + that.position.left = op.left - ox; + } else { + newWidth = gridX - outerDimensions.width; + that.size.width = newWidth; + that.position.left = op.left + os.width - newWidth; + } + } + } + +}); + +var resizable = $.ui.resizable; + + +/*! + * jQuery UI Selectable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectable/ + */ + + +var selectable = $.widget("ui.selectable", $.ui.mouse, { + version: "1.11.4", + options: { + appendTo: "body", + autoRefresh: true, + distance: 0, + filter: "*", + tolerance: "touch", + + // callbacks + selected: null, + selecting: null, + start: null, + stop: null, + unselected: null, + unselecting: null + }, + _create: function() { + var selectees, + that = this; + + this.element.addClass("ui-selectable"); + + this.dragged = false; + + // cache selectee children based on filter + this.refresh = function() { + selectees = $(that.options.filter, that.element[0]); + selectees.addClass("ui-selectee"); + selectees.each(function() { + var $this = $(this), + pos = $this.offset(); + $.data(this, "selectable-item", { + element: this, + $element: $this, + left: pos.left, + top: pos.top, + right: pos.left + $this.outerWidth(), + bottom: pos.top + $this.outerHeight(), + startselected: false, + selected: $this.hasClass("ui-selected"), + selecting: $this.hasClass("ui-selecting"), + unselecting: $this.hasClass("ui-unselecting") + }); + }); + }; + this.refresh(); + + this.selectees = selectees.addClass("ui-selectee"); + + this._mouseInit(); + + this.helper = $("<div class='ui-selectable-helper'></div>"); + }, + + _destroy: function() { + this.selectees + .removeClass("ui-selectee") + .removeData("selectable-item"); + this.element + .removeClass("ui-selectable ui-selectable-disabled"); + this._mouseDestroy(); + }, + + _mouseStart: function(event) { + var that = this, + options = this.options; + + this.opos = [ event.pageX, event.pageY ]; + + if (this.options.disabled) { + return; + } + + this.selectees = $(options.filter, this.element[0]); + + this._trigger("start", event); + + $(options.appendTo).append(this.helper); + // position helper (lasso) + this.helper.css({ + "left": event.pageX, + "top": event.pageY, + "width": 0, + "height": 0 + }); + + if (options.autoRefresh) { + this.refresh(); + } + + this.selectees.filter(".ui-selected").each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.startselected = true; + if (!event.metaKey && !event.ctrlKey) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + }); + + $(event.target).parents().addBack().each(function() { + var doSelect, + selectee = $.data(this, "selectable-item"); + if (selectee) { + doSelect = (!event.metaKey && !event.ctrlKey) || !selectee.$element.hasClass("ui-selected"); + selectee.$element + .removeClass(doSelect ? "ui-unselecting" : "ui-selected") + .addClass(doSelect ? "ui-selecting" : "ui-unselecting"); + selectee.unselecting = !doSelect; + selectee.selecting = doSelect; + selectee.selected = doSelect; + // selectable (UN)SELECTING callback + if (doSelect) { + that._trigger("selecting", event, { + selecting: selectee.element + }); + } else { + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + return false; + } + }); + + }, + + _mouseDrag: function(event) { + + this.dragged = true; + + if (this.options.disabled) { + return; + } + + var tmp, + that = this, + options = this.options, + x1 = this.opos[0], + y1 = this.opos[1], + x2 = event.pageX, + y2 = event.pageY; + + if (x1 > x2) { tmp = x2; x2 = x1; x1 = tmp; } + if (y1 > y2) { tmp = y2; y2 = y1; y1 = tmp; } + this.helper.css({ left: x1, top: y1, width: x2 - x1, height: y2 - y1 }); + + this.selectees.each(function() { + var selectee = $.data(this, "selectable-item"), + hit = false; + + //prevent helper from being selected if appendTo: selectable + if (!selectee || selectee.element === that.element[0]) { + return; + } + + if (options.tolerance === "touch") { + hit = ( !(selectee.left > x2 || selectee.right < x1 || selectee.top > y2 || selectee.bottom < y1) ); + } else if (options.tolerance === "fit") { + hit = (selectee.left > x1 && selectee.right < x2 && selectee.top > y1 && selectee.bottom < y2); + } + + if (hit) { + // SELECT + if (selectee.selected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + } + if (selectee.unselecting) { + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + } + if (!selectee.selecting) { + selectee.$element.addClass("ui-selecting"); + selectee.selecting = true; + // selectable SELECTING callback + that._trigger("selecting", event, { + selecting: selectee.element + }); + } + } else { + // UNSELECT + if (selectee.selecting) { + if ((event.metaKey || event.ctrlKey) && selectee.startselected) { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + selectee.$element.addClass("ui-selected"); + selectee.selected = true; + } else { + selectee.$element.removeClass("ui-selecting"); + selectee.selecting = false; + if (selectee.startselected) { + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + } + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + if (selectee.selected) { + if (!event.metaKey && !event.ctrlKey && !selectee.startselected) { + selectee.$element.removeClass("ui-selected"); + selectee.selected = false; + + selectee.$element.addClass("ui-unselecting"); + selectee.unselecting = true; + // selectable UNSELECTING callback + that._trigger("unselecting", event, { + unselecting: selectee.element + }); + } + } + } + }); + + return false; + }, + + _mouseStop: function(event) { + var that = this; + + this.dragged = false; + + $(".ui-unselecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-unselecting"); + selectee.unselecting = false; + selectee.startselected = false; + that._trigger("unselected", event, { + unselected: selectee.element + }); + }); + $(".ui-selecting", this.element[0]).each(function() { + var selectee = $.data(this, "selectable-item"); + selectee.$element.removeClass("ui-selecting").addClass("ui-selected"); + selectee.selecting = false; + selectee.selected = true; + selectee.startselected = true; + that._trigger("selected", event, { + selected: selectee.element + }); + }); + this._trigger("stop", event); + + this.helper.remove(); + + return false; + } + +}); + + +/*! + * jQuery UI Sortable 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/sortable/ + */ + + +var sortable = $.widget("ui.sortable", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "sort", + ready: false, + options: { + appendTo: "parent", + axis: false, + connectWith: false, + containment: false, + cursor: "auto", + cursorAt: false, + dropOnEmpty: true, + forcePlaceholderSize: false, + forceHelperSize: false, + grid: false, + handle: false, + helper: "original", + items: "> *", + opacity: false, + placeholder: false, + revert: false, + scroll: true, + scrollSensitivity: 20, + scrollSpeed: 20, + scope: "default", + tolerance: "intersect", + zIndex: 1000, + + // callbacks + activate: null, + beforeStop: null, + change: null, + deactivate: null, + out: null, + over: null, + receive: null, + remove: null, + sort: null, + start: null, + stop: null, + update: null + }, + + _isOverAxis: function( x, reference, size ) { + return ( x >= reference ) && ( x < ( reference + size ) ); + }, + + _isFloating: function( item ) { + return (/left|right/).test(item.css("float")) || (/inline|table-cell/).test(item.css("display")); + }, + + _create: function() { + this.containerCache = {}; + this.element.addClass("ui-sortable"); + + //Get the items + this.refresh(); + + //Let's determine the parent's offset + this.offset = this.element.offset(); + + //Initialize mouse events for interaction + this._mouseInit(); + + this._setHandleClassName(); + + //We're ready to go + this.ready = true; + + }, + + _setOption: function( key, value ) { + this._super( key, value ); + + if ( key === "handle" ) { + this._setHandleClassName(); + } + }, + + _setHandleClassName: function() { + this.element.find( ".ui-sortable-handle" ).removeClass( "ui-sortable-handle" ); + $.each( this.items, function() { + ( this.instance.options.handle ? + this.item.find( this.instance.options.handle ) : this.item ) + .addClass( "ui-sortable-handle" ); + }); + }, + + _destroy: function() { + this.element + .removeClass( "ui-sortable ui-sortable-disabled" ) + .find( ".ui-sortable-handle" ) + .removeClass( "ui-sortable-handle" ); + this._mouseDestroy(); + + for ( var i = this.items.length - 1; i >= 0; i-- ) { + this.items[i].item.removeData(this.widgetName + "-item"); + } + + return this; + }, + + _mouseCapture: function(event, overrideHandle) { + var currentItem = null, + validHandle = false, + that = this; + + if (this.reverting) { + return false; + } + + if(this.options.disabled || this.options.type === "static") { + return false; + } + + //We have to refresh the items data once first + this._refreshItems(event); + + //Find out if the clicked node (or one of its parents) is a actual item in this.items + $(event.target).parents().each(function() { + if($.data(this, that.widgetName + "-item") === that) { + currentItem = $(this); + return false; + } + }); + if($.data(event.target, that.widgetName + "-item") === that) { + currentItem = $(event.target); + } + + if(!currentItem) { + return false; + } + if(this.options.handle && !overrideHandle) { + $(this.options.handle, currentItem).find("*").addBack().each(function() { + if(this === event.target) { + validHandle = true; + } + }); + if(!validHandle) { + return false; + } + } + + this.currentItem = currentItem; + this._removeCurrentsFromItems(); + return true; + + }, + + _mouseStart: function(event, overrideHandle, noActivation) { + + var i, body, + o = this.options; + + this.currentContainer = this; + + //We only need to call refreshPositions, because the refreshItems call has been moved to mouseCapture + this.refreshPositions(); + + //Create and append the visible helper + this.helper = this._createHelper(event); + + //Cache the helper size + this._cacheHelperProportions(); + + /* + * - Position generation - + * This block generates everything position related - it's the core of draggables. + */ + + //Cache the margins of the original element + this._cacheMargins(); + + //Get the next scrolling parent + this.scrollParent = this.helper.scrollParent(); + + //The element's absolute position on the page minus margins + this.offset = this.currentItem.offset(); + this.offset = { + top: this.offset.top - this.margins.top, + left: this.offset.left - this.margins.left + }; + + $.extend(this.offset, { + click: { //Where the click happened, relative to the element + left: event.pageX - this.offset.left, + top: event.pageY - this.offset.top + }, + parent: this._getParentOffset(), + relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper + }); + + // Only after we got the offset, we can change the helper's position to absolute + // TODO: Still need to figure out a way to make relative sorting possible + this.helper.css("position", "absolute"); + this.cssPosition = this.helper.css("position"); + + //Generate the original position + this.originalPosition = this._generatePosition(event); + this.originalPageX = event.pageX; + this.originalPageY = event.pageY; + + //Adjust the mouse offset relative to the helper if "cursorAt" is supplied + (o.cursorAt && this._adjustOffsetFromHelper(o.cursorAt)); + + //Cache the former DOM position + this.domPosition = { prev: this.currentItem.prev()[0], parent: this.currentItem.parent()[0] }; + + //If the helper is not the original, hide the original so it's not playing any role during the drag, won't cause anything bad this way + if(this.helper[0] !== this.currentItem[0]) { + this.currentItem.hide(); + } + + //Create the placeholder + this._createPlaceholder(); + + //Set a containment if given in the options + if(o.containment) { + this._setContainment(); + } + + if( o.cursor && o.cursor !== "auto" ) { // cursor option + body = this.document.find( "body" ); + + // support: IE + this.storedCursor = body.css( "cursor" ); + body.css( "cursor", o.cursor ); + + this.storedStylesheet = $( "<style>*{ cursor: "+o.cursor+" !important; }</style>" ).appendTo( body ); + } + + if(o.opacity) { // opacity option + if (this.helper.css("opacity")) { + this._storedOpacity = this.helper.css("opacity"); + } + this.helper.css("opacity", o.opacity); + } + + if(o.zIndex) { // zIndex option + if (this.helper.css("zIndex")) { + this._storedZIndex = this.helper.css("zIndex"); + } + this.helper.css("zIndex", o.zIndex); + } + + //Prepare scrolling + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + this.overflowOffset = this.scrollParent.offset(); + } + + //Call callbacks + this._trigger("start", event, this._uiHash()); + + //Recache the helper size + if(!this._preserveHelperProportions) { + this._cacheHelperProportions(); + } + + + //Post "activate" events to possible containers + if( !noActivation ) { + for ( i = this.containers.length - 1; i >= 0; i-- ) { + this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) ); + } + } + + //Prepare possible droppables + if($.ui.ddmanager) { + $.ui.ddmanager.current = this; + } + + if ($.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + + this.dragging = true; + + this.helper.addClass("ui-sortable-helper"); + this._mouseDrag(event); //Execute the drag once - this causes the helper not to be visible before getting its correct position + return true; + + }, + + _mouseDrag: function(event) { + var i, item, itemElement, intersection, + o = this.options, + scrolled = false; + + //Compute the helpers position + this.position = this._generatePosition(event); + this.positionAbs = this._convertPositionTo("absolute"); + + if (!this.lastPositionAbs) { + this.lastPositionAbs = this.positionAbs; + } + + //Do scrolling + if(this.options.scroll) { + if(this.scrollParent[0] !== this.document[0] && this.scrollParent[0].tagName !== "HTML") { + + if((this.overflowOffset.top + this.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop + o.scrollSpeed; + } else if(event.pageY - this.overflowOffset.top < o.scrollSensitivity) { + this.scrollParent[0].scrollTop = scrolled = this.scrollParent[0].scrollTop - o.scrollSpeed; + } + + if((this.overflowOffset.left + this.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft + o.scrollSpeed; + } else if(event.pageX - this.overflowOffset.left < o.scrollSensitivity) { + this.scrollParent[0].scrollLeft = scrolled = this.scrollParent[0].scrollLeft - o.scrollSpeed; + } + + } else { + + if(event.pageY - this.document.scrollTop() < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() - o.scrollSpeed); + } else if(this.window.height() - (event.pageY - this.document.scrollTop()) < o.scrollSensitivity) { + scrolled = this.document.scrollTop(this.document.scrollTop() + o.scrollSpeed); + } + + if(event.pageX - this.document.scrollLeft() < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() - o.scrollSpeed); + } else if(this.window.width() - (event.pageX - this.document.scrollLeft()) < o.scrollSensitivity) { + scrolled = this.document.scrollLeft(this.document.scrollLeft() + o.scrollSpeed); + } + + } + + if(scrolled !== false && $.ui.ddmanager && !o.dropBehaviour) { + $.ui.ddmanager.prepareOffsets(this, event); + } + } + + //Regenerate the absolute position used for position checks + this.positionAbs = this._convertPositionTo("absolute"); + + //Set the helper position + if(!this.options.axis || this.options.axis !== "y") { + this.helper[0].style.left = this.position.left+"px"; + } + if(!this.options.axis || this.options.axis !== "x") { + this.helper[0].style.top = this.position.top+"px"; + } + + //Rearrange + for (i = this.items.length - 1; i >= 0; i--) { + + //Cache variables and intersection, continue if no intersection + item = this.items[i]; + itemElement = item.item[0]; + intersection = this._intersectsWithPointer(item); + if (!intersection) { + continue; + } + + // Only put the placeholder inside the current Container, skip all + // items from other containers. This works because when moving + // an item from one container to another the + // currentContainer is switched before the placeholder is moved. + // + // Without this, moving items in "sub-sortables" can cause + // the placeholder to jitter between the outer and inner container. + if (item.instance !== this.currentContainer) { + continue; + } + + // cannot intersect with itself + // no useless actions that have been done before + // no action if the item moved is the parent of the item checked + if (itemElement !== this.currentItem[0] && + this.placeholder[intersection === 1 ? "next" : "prev"]()[0] !== itemElement && + !$.contains(this.placeholder[0], itemElement) && + (this.options.type === "semi-dynamic" ? !$.contains(this.element[0], itemElement) : true) + ) { + + this.direction = intersection === 1 ? "down" : "up"; + + if (this.options.tolerance === "pointer" || this._intersectsWithSides(item)) { + this._rearrange(event, item); + } else { + break; + } + + this._trigger("change", event, this._uiHash()); + break; + } + } + + //Post events to containers + this._contactContainers(event); + + //Interconnect with droppables + if($.ui.ddmanager) { + $.ui.ddmanager.drag(this, event); + } + + //Call callbacks + this._trigger("sort", event, this._uiHash()); + + this.lastPositionAbs = this.positionAbs; + return false; + + }, + + _mouseStop: function(event, noPropagation) { + + if(!event) { + return; + } + + //If we are using droppables, inform the manager about the drop + if ($.ui.ddmanager && !this.options.dropBehaviour) { + $.ui.ddmanager.drop(this, event); + } + + if(this.options.revert) { + var that = this, + cur = this.placeholder.offset(), + axis = this.options.axis, + animation = {}; + + if ( !axis || axis === "x" ) { + animation.left = cur.left - this.offset.parent.left - this.margins.left + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollLeft); + } + if ( !axis || axis === "y" ) { + animation.top = cur.top - this.offset.parent.top - this.margins.top + (this.offsetParent[0] === this.document[0].body ? 0 : this.offsetParent[0].scrollTop); + } + this.reverting = true; + $(this.helper).animate( animation, parseInt(this.options.revert, 10) || 500, function() { + that._clear(event); + }); + } else { + this._clear(event, noPropagation); + } + + return false; + + }, + + cancel: function() { + + if(this.dragging) { + + this._mouseUp({ target: null }); + + if(this.options.helper === "original") { + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + //Post deactivating events to containers + for (var i = this.containers.length - 1; i >= 0; i--){ + this.containers[i]._trigger("deactivate", null, this._uiHash(this)); + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", null, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + if (this.placeholder) { + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + if(this.placeholder[0].parentNode) { + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + } + if(this.options.helper !== "original" && this.helper && this.helper[0].parentNode) { + this.helper.remove(); + } + + $.extend(this, { + helper: null, + dragging: false, + reverting: false, + _noFinalSort: null + }); + + if(this.domPosition.prev) { + $(this.domPosition.prev).after(this.currentItem); + } else { + $(this.domPosition.parent).prepend(this.currentItem); + } + } + + return this; + + }, + + serialize: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + str = []; + o = o || {}; + + $(items).each(function() { + var res = ($(o.item || this).attr(o.attribute || "id") || "").match(o.expression || (/(.+)[\-=_](.+)/)); + if (res) { + str.push((o.key || res[1]+"[]")+"="+(o.key && o.expression ? res[1] : res[2])); + } + }); + + if(!str.length && o.key) { + str.push(o.key + "="); + } + + return str.join("&"); + + }, + + toArray: function(o) { + + var items = this._getItemsAsjQuery(o && o.connected), + ret = []; + + o = o || {}; + + items.each(function() { ret.push($(o.item || this).attr(o.attribute || "id") || ""); }); + return ret; + + }, + + /* Be careful with the following core functions */ + _intersectsWith: function(item) { + + var x1 = this.positionAbs.left, + x2 = x1 + this.helperProportions.width, + y1 = this.positionAbs.top, + y2 = y1 + this.helperProportions.height, + l = item.left, + r = l + item.width, + t = item.top, + b = t + item.height, + dyClick = this.offset.click.top, + dxClick = this.offset.click.left, + isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t && ( y1 + dyClick ) < b ), + isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l && ( x1 + dxClick ) < r ), + isOverElement = isOverElementHeight && isOverElementWidth; + + if ( this.options.tolerance === "pointer" || + this.options.forcePointerForContainers || + (this.options.tolerance !== "pointer" && this.helperProportions[this.floating ? "width" : "height"] > item[this.floating ? "width" : "height"]) + ) { + return isOverElement; + } else { + + return (l < x1 + (this.helperProportions.width / 2) && // Right Half + x2 - (this.helperProportions.width / 2) < r && // Left Half + t < y1 + (this.helperProportions.height / 2) && // Bottom Half + y2 - (this.helperProportions.height / 2) < b ); // Top Half + + } + }, + + _intersectsWithPointer: function(item) { + + var isOverElementHeight = (this.options.axis === "x") || this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top, item.height), + isOverElementWidth = (this.options.axis === "y") || this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left, item.width), + isOverElement = isOverElementHeight && isOverElementWidth, + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (!isOverElement) { + return false; + } + + return this.floating ? + ( ((horizontalDirection && horizontalDirection === "right") || verticalDirection === "down") ? 2 : 1 ) + : ( verticalDirection && (verticalDirection === "down" ? 2 : 1) ); + + }, + + _intersectsWithSides: function(item) { + + var isOverBottomHalf = this._isOverAxis(this.positionAbs.top + this.offset.click.top, item.top + (item.height/2), item.height), + isOverRightHalf = this._isOverAxis(this.positionAbs.left + this.offset.click.left, item.left + (item.width/2), item.width), + verticalDirection = this._getDragVerticalDirection(), + horizontalDirection = this._getDragHorizontalDirection(); + + if (this.floating && horizontalDirection) { + return ((horizontalDirection === "right" && isOverRightHalf) || (horizontalDirection === "left" && !isOverRightHalf)); + } else { + return verticalDirection && ((verticalDirection === "down" && isOverBottomHalf) || (verticalDirection === "up" && !isOverBottomHalf)); + } + + }, + + _getDragVerticalDirection: function() { + var delta = this.positionAbs.top - this.lastPositionAbs.top; + return delta !== 0 && (delta > 0 ? "down" : "up"); + }, + + _getDragHorizontalDirection: function() { + var delta = this.positionAbs.left - this.lastPositionAbs.left; + return delta !== 0 && (delta > 0 ? "right" : "left"); + }, + + refresh: function(event) { + this._refreshItems(event); + this._setHandleClassName(); + this.refreshPositions(); + return this; + }, + + _connectWith: function() { + var options = this.options; + return options.connectWith.constructor === String ? [options.connectWith] : options.connectWith; + }, + + _getItemsAsjQuery: function(connected) { + + var i, j, cur, inst, + items = [], + queries = [], + connectWith = this._connectWith(); + + if(connectWith && connected) { + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for ( j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element) : $(inst.options.items, inst.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), inst]); + } + } + } + } + + queries.push([$.isFunction(this.options.items) ? this.options.items.call(this.element, null, { options: this.options, item: this.currentItem }) : $(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]); + + function addItems() { + items.push( this ); + } + for (i = queries.length - 1; i >= 0; i--){ + queries[i][0].each( addItems ); + } + + return $(items); + + }, + + _removeCurrentsFromItems: function() { + + var list = this.currentItem.find(":data(" + this.widgetName + "-item)"); + + this.items = $.grep(this.items, function (item) { + for (var j=0; j < list.length; j++) { + if(list[j] === item.item[0]) { + return false; + } + } + return true; + }); + + }, + + _refreshItems: function(event) { + + this.items = []; + this.containers = [this]; + + var i, j, cur, inst, targetData, _queries, item, queriesLength, + items = this.items, + queries = [[$.isFunction(this.options.items) ? this.options.items.call(this.element[0], event, { item: this.currentItem }) : $(this.options.items, this.element), this]], + connectWith = this._connectWith(); + + if(connectWith && this.ready) { //Shouldn't be run the first time through due to massive slow-down + for (i = connectWith.length - 1; i >= 0; i--){ + cur = $(connectWith[i], this.document[0]); + for (j = cur.length - 1; j >= 0; j--){ + inst = $.data(cur[j], this.widgetFullName); + if(inst && inst !== this && !inst.options.disabled) { + queries.push([$.isFunction(inst.options.items) ? inst.options.items.call(inst.element[0], event, { item: this.currentItem }) : $(inst.options.items, inst.element), inst]); + this.containers.push(inst); + } + } + } + } + + for (i = queries.length - 1; i >= 0; i--) { + targetData = queries[i][1]; + _queries = queries[i][0]; + + for (j=0, queriesLength = _queries.length; j < queriesLength; j++) { + item = $(_queries[j]); + + item.data(this.widgetName + "-item", targetData); // Data for target checking (mouse manager) + + items.push({ + item: item, + instance: targetData, + width: 0, height: 0, + left: 0, top: 0 + }); + } + } + + }, + + refreshPositions: function(fast) { + + // Determine whether items are being displayed horizontally + this.floating = this.items.length ? + this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) : + false; + + //This has to be redone because due to the item being moved out/into the offsetParent, the offsetParent's position will change + if(this.offsetParent && this.helper) { + this.offset.parent = this._getParentOffset(); + } + + var i, item, t, p; + + for (i = this.items.length - 1; i >= 0; i--){ + item = this.items[i]; + + //We ignore calculating positions of all connected containers when we're not over them + if(item.instance !== this.currentContainer && this.currentContainer && item.item[0] !== this.currentItem[0]) { + continue; + } + + t = this.options.toleranceElement ? $(this.options.toleranceElement, item.item) : item.item; + + if (!fast) { + item.width = t.outerWidth(); + item.height = t.outerHeight(); + } + + p = t.offset(); + item.left = p.left; + item.top = p.top; + } + + if(this.options.custom && this.options.custom.refreshContainers) { + this.options.custom.refreshContainers.call(this); + } else { + for (i = this.containers.length - 1; i >= 0; i--){ + p = this.containers[i].element.offset(); + this.containers[i].containerCache.left = p.left; + this.containers[i].containerCache.top = p.top; + this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); + this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); + } + } + + return this; + }, + + _createPlaceholder: function(that) { + that = that || this; + var className, + o = that.options; + + if(!o.placeholder || o.placeholder.constructor === String) { + className = o.placeholder; + o.placeholder = { + element: function() { + + var nodeName = that.currentItem[0].nodeName.toLowerCase(), + element = $( "<" + nodeName + ">", that.document[0] ) + .addClass(className || that.currentItem[0].className+" ui-sortable-placeholder") + .removeClass("ui-sortable-helper"); + + if ( nodeName === "tbody" ) { + that._createTrPlaceholder( + that.currentItem.find( "tr" ).eq( 0 ), + $( "<tr>", that.document[ 0 ] ).appendTo( element ) + ); + } else if ( nodeName === "tr" ) { + that._createTrPlaceholder( that.currentItem, element ); + } else if ( nodeName === "img" ) { + element.attr( "src", that.currentItem.attr( "src" ) ); + } + + if ( !className ) { + element.css( "visibility", "hidden" ); + } + + return element; + }, + update: function(container, p) { + + // 1. If a className is set as 'placeholder option, we don't force sizes - the class is responsible for that + // 2. The option 'forcePlaceholderSize can be enabled to force it even if a class name is specified + if(className && !o.forcePlaceholderSize) { + return; + } + + //If the element doesn't have a actual height by itself (without styles coming from a stylesheet), it receives the inline height from the dragged item + if(!p.height()) { p.height(that.currentItem.innerHeight() - parseInt(that.currentItem.css("paddingTop")||0, 10) - parseInt(that.currentItem.css("paddingBottom")||0, 10)); } + if(!p.width()) { p.width(that.currentItem.innerWidth() - parseInt(that.currentItem.css("paddingLeft")||0, 10) - parseInt(that.currentItem.css("paddingRight")||0, 10)); } + } + }; + } + + //Create the placeholder + that.placeholder = $(o.placeholder.element.call(that.element, that.currentItem)); + + //Append it after the actual current item + that.currentItem.after(that.placeholder); + + //Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317) + o.placeholder.update(that, that.placeholder); + + }, + + _createTrPlaceholder: function( sourceTr, targetTr ) { + var that = this; + + sourceTr.children().each(function() { + $( "<td> </td>", that.document[ 0 ] ) + .attr( "colspan", $( this ).attr( "colspan" ) || 1 ) + .appendTo( targetTr ); + }); + }, + + _contactContainers: function(event) { + var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom, floating, axis, + innermostContainer = null, + innermostIndex = null; + + // get innermost container that intersects with item + for (i = this.containers.length - 1; i >= 0; i--) { + + // never consider a container that's located within the item itself + if($.contains(this.currentItem[0], this.containers[i].element[0])) { + continue; + } + + if(this._intersectsWith(this.containers[i].containerCache)) { + + // if we've already found a container and it's more "inner" than this, then continue + if(innermostContainer && $.contains(this.containers[i].element[0], innermostContainer.element[0])) { + continue; + } + + innermostContainer = this.containers[i]; + innermostIndex = i; + + } else { + // container doesn't intersect. trigger "out" event if necessary + if(this.containers[i].containerCache.over) { + this.containers[i]._trigger("out", event, this._uiHash(this)); + this.containers[i].containerCache.over = 0; + } + } + + } + + // if no intersecting containers found, return + if(!innermostContainer) { + return; + } + + // move the item into the container if it's not there already + if(this.containers.length === 1) { + if (!this.containers[innermostIndex].containerCache.over) { + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + } else { + + //When entering a new container, we will find the item with the least distance and append our item near it + dist = 10000; + itemWithLeastDistance = null; + floating = innermostContainer.floating || this._isFloating(this.currentItem); + posProperty = floating ? "left" : "top"; + sizeProperty = floating ? "width" : "height"; + axis = floating ? "clientX" : "clientY"; + + for (j = this.items.length - 1; j >= 0; j--) { + if(!$.contains(this.containers[innermostIndex].element[0], this.items[j].item[0])) { + continue; + } + if(this.items[j].item[0] === this.currentItem[0]) { + continue; + } + + cur = this.items[j].item.offset()[posProperty]; + nearBottom = false; + if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) { + nearBottom = true; + } + + if ( Math.abs( event[ axis ] - cur ) < dist ) { + dist = Math.abs( event[ axis ] - cur ); + itemWithLeastDistance = this.items[ j ]; + this.direction = nearBottom ? "up": "down"; + } + } + + //Check if dropOnEmpty is enabled + if(!itemWithLeastDistance && !this.options.dropOnEmpty) { + return; + } + + if(this.currentContainer === this.containers[innermostIndex]) { + if ( !this.currentContainer.containerCache.over ) { + this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() ); + this.currentContainer.containerCache.over = 1; + } + return; + } + + itemWithLeastDistance ? this._rearrange(event, itemWithLeastDistance, null, true) : this._rearrange(event, null, this.containers[innermostIndex].element, true); + this._trigger("change", event, this._uiHash()); + this.containers[innermostIndex]._trigger("change", event, this._uiHash(this)); + this.currentContainer = this.containers[innermostIndex]; + + //Update the placeholder + this.options.placeholder.update(this.currentContainer, this.placeholder); + + this.containers[innermostIndex]._trigger("over", event, this._uiHash(this)); + this.containers[innermostIndex].containerCache.over = 1; + } + + + }, + + _createHelper: function(event) { + + var o = this.options, + helper = $.isFunction(o.helper) ? $(o.helper.apply(this.element[0], [event, this.currentItem])) : (o.helper === "clone" ? this.currentItem.clone() : this.currentItem); + + //Add the helper to the DOM if that didn't happen already + if(!helper.parents("body").length) { + $(o.appendTo !== "parent" ? o.appendTo : this.currentItem[0].parentNode)[0].appendChild(helper[0]); + } + + if(helper[0] === this.currentItem[0]) { + this._storedCSS = { width: this.currentItem[0].style.width, height: this.currentItem[0].style.height, position: this.currentItem.css("position"), top: this.currentItem.css("top"), left: this.currentItem.css("left") }; + } + + if(!helper[0].style.width || o.forceHelperSize) { + helper.width(this.currentItem.width()); + } + if(!helper[0].style.height || o.forceHelperSize) { + helper.height(this.currentItem.height()); + } + + return helper; + + }, + + _adjustOffsetFromHelper: function(obj) { + if (typeof obj === "string") { + obj = obj.split(" "); + } + if ($.isArray(obj)) { + obj = {left: +obj[0], top: +obj[1] || 0}; + } + if ("left" in obj) { + this.offset.click.left = obj.left + this.margins.left; + } + if ("right" in obj) { + this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left; + } + if ("top" in obj) { + this.offset.click.top = obj.top + this.margins.top; + } + if ("bottom" in obj) { + this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top; + } + }, + + _getParentOffset: function() { + + + //Get the offsetParent and cache its position + this.offsetParent = this.helper.offsetParent(); + var po = this.offsetParent.offset(); + + // This is a special case where we need to modify a offset calculated on start, since the following happened: + // 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent + // 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that + // the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag + if(this.cssPosition === "absolute" && this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) { + po.left += this.scrollParent.scrollLeft(); + po.top += this.scrollParent.scrollTop(); + } + + // This needs to be actually done for all browsers, since pageX/pageY includes this information + // with an ugly IE fix + if( this.offsetParent[0] === this.document[0].body || (this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() === "html" && $.ui.ie)) { + po = { top: 0, left: 0 }; + } + + return { + top: po.top + (parseInt(this.offsetParent.css("borderTopWidth"),10) || 0), + left: po.left + (parseInt(this.offsetParent.css("borderLeftWidth"),10) || 0) + }; + + }, + + _getRelativeOffset: function() { + + if(this.cssPosition === "relative") { + var p = this.currentItem.position(); + return { + top: p.top - (parseInt(this.helper.css("top"),10) || 0) + this.scrollParent.scrollTop(), + left: p.left - (parseInt(this.helper.css("left"),10) || 0) + this.scrollParent.scrollLeft() + }; + } else { + return { top: 0, left: 0 }; + } + + }, + + _cacheMargins: function() { + this.margins = { + left: (parseInt(this.currentItem.css("marginLeft"),10) || 0), + top: (parseInt(this.currentItem.css("marginTop"),10) || 0) + }; + }, + + _cacheHelperProportions: function() { + this.helperProportions = { + width: this.helper.outerWidth(), + height: this.helper.outerHeight() + }; + }, + + _setContainment: function() { + + var ce, co, over, + o = this.options; + if(o.containment === "parent") { + o.containment = this.helper[0].parentNode; + } + if(o.containment === "document" || o.containment === "window") { + this.containment = [ + 0 - this.offset.relative.left - this.offset.parent.left, + 0 - this.offset.relative.top - this.offset.parent.top, + o.containment === "document" ? this.document.width() : this.window.width() - this.helperProportions.width - this.margins.left, + (o.containment === "document" ? this.document.width() : this.window.height() || this.document[0].body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top + ]; + } + + if(!(/^(document|window|parent)$/).test(o.containment)) { + ce = $(o.containment)[0]; + co = $(o.containment).offset(); + over = ($(ce).css("overflow") !== "hidden"); + + this.containment = [ + co.left + (parseInt($(ce).css("borderLeftWidth"),10) || 0) + (parseInt($(ce).css("paddingLeft"),10) || 0) - this.margins.left, + co.top + (parseInt($(ce).css("borderTopWidth"),10) || 0) + (parseInt($(ce).css("paddingTop"),10) || 0) - this.margins.top, + co.left+(over ? Math.max(ce.scrollWidth,ce.offsetWidth) : ce.offsetWidth) - (parseInt($(ce).css("borderLeftWidth"),10) || 0) - (parseInt($(ce).css("paddingRight"),10) || 0) - this.helperProportions.width - this.margins.left, + co.top+(over ? Math.max(ce.scrollHeight,ce.offsetHeight) : ce.offsetHeight) - (parseInt($(ce).css("borderTopWidth"),10) || 0) - (parseInt($(ce).css("paddingBottom"),10) || 0) - this.helperProportions.height - this.margins.top + ]; + } + + }, + + _convertPositionTo: function(d, pos) { + + if(!pos) { + pos = this.position; + } + var mod = d === "absolute" ? 1 : -1, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, + scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + return { + top: ( + pos.top + // The absolute mouse position + this.offset.relative.top * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod) + ), + left: ( + pos.left + // The absolute mouse position + this.offset.relative.left * mod + // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left * mod - // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() ) * mod) + ) + }; + + }, + + _generatePosition: function(event) { + + var top, left, + o = this.options, + pageX = event.pageX, + pageY = event.pageY, + scroll = this.cssPosition === "absolute" && !(this.scrollParent[0] !== this.document[0] && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName); + + // This is another very weird special case that only happens for relative elements: + // 1. If the css position is relative + // 2. and the scroll parent is the document or similar to the offset parent + // we have to refresh the relative offset during the scroll so there are no jumps + if(this.cssPosition === "relative" && !(this.scrollParent[0] !== this.document[0] && this.scrollParent[0] !== this.offsetParent[0])) { + this.offset.relative = this._getRelativeOffset(); + } + + /* + * - Position constraining - + * Constrain the position to a mix of grid, containment. + */ + + if(this.originalPosition) { //If we are not dragging yet, we won't check for options + + if(this.containment) { + if(event.pageX - this.offset.click.left < this.containment[0]) { + pageX = this.containment[0] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top < this.containment[1]) { + pageY = this.containment[1] + this.offset.click.top; + } + if(event.pageX - this.offset.click.left > this.containment[2]) { + pageX = this.containment[2] + this.offset.click.left; + } + if(event.pageY - this.offset.click.top > this.containment[3]) { + pageY = this.containment[3] + this.offset.click.top; + } + } + + if(o.grid) { + top = this.originalPageY + Math.round((pageY - this.originalPageY) / o.grid[1]) * o.grid[1]; + pageY = this.containment ? ( (top - this.offset.click.top >= this.containment[1] && top - this.offset.click.top <= this.containment[3]) ? top : ((top - this.offset.click.top >= this.containment[1]) ? top - o.grid[1] : top + o.grid[1])) : top; + + left = this.originalPageX + Math.round((pageX - this.originalPageX) / o.grid[0]) * o.grid[0]; + pageX = this.containment ? ( (left - this.offset.click.left >= this.containment[0] && left - this.offset.click.left <= this.containment[2]) ? left : ((left - this.offset.click.left >= this.containment[0]) ? left - o.grid[0] : left + o.grid[0])) : left; + } + + } + + return { + top: ( + pageY - // The absolute mouse position + this.offset.click.top - // Click offset (relative to the element) + this.offset.relative.top - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.top + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollTop() : ( scrollIsRootNode ? 0 : scroll.scrollTop() ) )) + ), + left: ( + pageX - // The absolute mouse position + this.offset.click.left - // Click offset (relative to the element) + this.offset.relative.left - // Only for relative positioned nodes: Relative offset from element to offset parent + this.offset.parent.left + // The offsetParent's offset without borders (offset + border) + ( ( this.cssPosition === "fixed" ? -this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 : scroll.scrollLeft() )) + ) + }; + + }, + + _rearrange: function(event, i, a, hardRefresh) { + + a ? a[0].appendChild(this.placeholder[0]) : i.item[0].parentNode.insertBefore(this.placeholder[0], (this.direction === "down" ? i.item[0] : i.item[0].nextSibling)); + + //Various things done here to improve the performance: + // 1. we create a setTimeout, that calls refreshPositions + // 2. on the instance, we have a counter variable, that get's higher after every append + // 3. on the local scope, we copy the counter variable, and check in the timeout, if it's still the same + // 4. this lets only the last addition to the timeout stack through + this.counter = this.counter ? ++this.counter : 1; + var counter = this.counter; + + this._delay(function() { + if(counter === this.counter) { + this.refreshPositions(!hardRefresh); //Precompute after each DOM insertion, NOT on mousemove + } + }); + + }, + + _clear: function(event, noPropagation) { + + this.reverting = false; + // We delay all events that have to be triggered to after the point where the placeholder has been removed and + // everything else normalized again + var i, + delayedTriggers = []; + + // We first have to update the dom position of the actual currentItem + // Note: don't do it if the current item is already removed (by a user), or it gets reappended (see #4088) + if(!this._noFinalSort && this.currentItem.parent().length) { + this.placeholder.before(this.currentItem); + } + this._noFinalSort = null; + + if(this.helper[0] === this.currentItem[0]) { + for(i in this._storedCSS) { + if(this._storedCSS[i] === "auto" || this._storedCSS[i] === "static") { + this._storedCSS[i] = ""; + } + } + this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"); + } else { + this.currentItem.show(); + } + + if(this.fromOutside && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("receive", event, this._uiHash(this.fromOutside)); }); + } + if((this.fromOutside || this.domPosition.prev !== this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent !== this.currentItem.parent()[0]) && !noPropagation) { + delayedTriggers.push(function(event) { this._trigger("update", event, this._uiHash()); }); //Trigger update callback if the DOM position has changed + } + + // Check if the items Container has Changed and trigger appropriate + // events. + if (this !== this.currentContainer) { + if(!noPropagation) { + delayedTriggers.push(function(event) { this._trigger("remove", event, this._uiHash()); }); + delayedTriggers.push((function(c) { return function(event) { c._trigger("receive", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + delayedTriggers.push((function(c) { return function(event) { c._trigger("update", event, this._uiHash(this)); }; }).call(this, this.currentContainer)); + } + } + + + //Post events to containers + function delayEvent( type, instance, container ) { + return function( event ) { + container._trigger( type, event, instance._uiHash( instance ) ); + }; + } + for (i = this.containers.length - 1; i >= 0; i--){ + if (!noPropagation) { + delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) ); + } + if(this.containers[i].containerCache.over) { + delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) ); + this.containers[i].containerCache.over = 0; + } + } + + //Do what was originally in plugins + if ( this.storedCursor ) { + this.document.find( "body" ).css( "cursor", this.storedCursor ); + this.storedStylesheet.remove(); + } + if(this._storedOpacity) { + this.helper.css("opacity", this._storedOpacity); + } + if(this._storedZIndex) { + this.helper.css("zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex); + } + + this.dragging = false; + + if(!noPropagation) { + this._trigger("beforeStop", event, this._uiHash()); + } + + //$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately, it unbinds ALL events from the original node! + this.placeholder[0].parentNode.removeChild(this.placeholder[0]); + + if ( !this.cancelHelperRemoval ) { + if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) { + this.helper.remove(); + } + this.helper = null; + } + + if(!noPropagation) { + for (i=0; i < delayedTriggers.length; i++) { + delayedTriggers[i].call(this, event); + } //Trigger all delayed events + this._trigger("stop", event, this._uiHash()); + } + + this.fromOutside = false; + return !this.cancelHelperRemoval; + + }, + + _trigger: function() { + if ($.Widget.prototype._trigger.apply(this, arguments) === false) { + this.cancel(); + } + }, + + _uiHash: function(_inst) { + var inst = _inst || this; + return { + helper: inst.helper, + placeholder: inst.placeholder || $([]), + position: inst.position, + originalPosition: inst.originalPosition, + offset: inst.positionAbs, + item: inst.currentItem, + sender: _inst ? _inst.element : null + }; + } + +}); + + +/*! + * jQuery UI Accordion 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/accordion/ + */ + + +var accordion = $.widget( "ui.accordion", { + version: "1.11.4", + options: { + active: 0, + animate: {}, + collapsible: false, + event: "click", + header: "> li > :first-child,> :not(li):even", + heightStyle: "auto", + icons: { + activeHeader: "ui-icon-triangle-1-s", + header: "ui-icon-triangle-1-e" + }, + + // callbacks + activate: null, + beforeActivate: null + }, + + hideProps: { + borderTopWidth: "hide", + borderBottomWidth: "hide", + paddingTop: "hide", + paddingBottom: "hide", + height: "hide" + }, + + showProps: { + borderTopWidth: "show", + borderBottomWidth: "show", + paddingTop: "show", + paddingBottom: "show", + height: "show" + }, + + _create: function() { + var options = this.options; + this.prevShow = this.prevHide = $(); + this.element.addClass( "ui-accordion ui-widget ui-helper-reset" ) + // ARIA + .attr( "role", "tablist" ); + + // don't allow collapsible: false and active: false / null + if ( !options.collapsible && (options.active === false || options.active == null) ) { + options.active = 0; + } + + this._processPanels(); + // handle negative values + if ( options.active < 0 ) { + options.active += this.headers.length; + } + this._refresh(); + }, + + _getCreateEventData: function() { + return { + header: this.active, + panel: !this.active.length ? $() : this.active.next() + }; + }, + + _createIcons: function() { + var icons = this.options.icons; + if ( icons ) { + $( "<span>" ) + .addClass( "ui-accordion-header-icon ui-icon " + icons.header ) + .prependTo( this.headers ); + this.active.children( ".ui-accordion-header-icon" ) + .removeClass( icons.header ) + .addClass( icons.activeHeader ); + this.headers.addClass( "ui-accordion-icons" ); + } + }, + + _destroyIcons: function() { + this.headers + .removeClass( "ui-accordion-icons" ) + .children( ".ui-accordion-header-icon" ) + .remove(); + }, + + _destroy: function() { + var contents; + + // clean up main element + this.element + .removeClass( "ui-accordion ui-widget ui-helper-reset" ) + .removeAttr( "role" ); + + // clean up headers + this.headers + .removeClass( "ui-accordion-header ui-accordion-header-active ui-state-default " + + "ui-corner-all ui-state-active ui-state-disabled ui-corner-top" ) + .removeAttr( "role" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-controls" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this._destroyIcons(); + + // clean up content panels + contents = this.headers.next() + .removeClass( "ui-helper-reset ui-widget-content ui-corner-bottom " + + "ui-accordion-content ui-accordion-content-active ui-state-disabled" ) + .css( "display", "" ) + .removeAttr( "role" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-labelledby" ) + .removeUniqueId(); + + if ( this.options.heightStyle !== "content" ) { + contents.css( "height", "" ); + } + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "event" ) { + if ( this.options.event ) { + this._off( this.headers, this.options.event ); + } + this._setupEvents( value ); + } + + this._super( key, value ); + + // setting collapsible: false while collapsed; open first panel + if ( key === "collapsible" && !value && this.options.active === false ) { + this._activate( 0 ); + } + + if ( key === "icons" ) { + this._destroyIcons(); + if ( value ) { + this._createIcons(); + } + } + + // #5332 - opacity doesn't cascade to positioned elements in IE + // so we need to add the disabled class to the headers and panels + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + this.headers.add( this.headers.next() ) + .toggleClass( "ui-state-disabled", !!value ); + } + }, + + _keydown: function( event ) { + if ( event.altKey || event.ctrlKey ) { + return; + } + + var keyCode = $.ui.keyCode, + length = this.headers.length, + currentIndex = this.headers.index( event.target ), + toFocus = false; + + switch ( event.keyCode ) { + case keyCode.RIGHT: + case keyCode.DOWN: + toFocus = this.headers[ ( currentIndex + 1 ) % length ]; + break; + case keyCode.LEFT: + case keyCode.UP: + toFocus = this.headers[ ( currentIndex - 1 + length ) % length ]; + break; + case keyCode.SPACE: + case keyCode.ENTER: + this._eventHandler( event ); + break; + case keyCode.HOME: + toFocus = this.headers[ 0 ]; + break; + case keyCode.END: + toFocus = this.headers[ length - 1 ]; + break; + } + + if ( toFocus ) { + $( event.target ).attr( "tabIndex", -1 ); + $( toFocus ).attr( "tabIndex", 0 ); + toFocus.focus(); + event.preventDefault(); + } + }, + + _panelKeyDown: function( event ) { + if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) { + $( event.currentTarget ).prev().focus(); + } + }, + + refresh: function() { + var options = this.options; + this._processPanels(); + + // was collapsed or no panel + if ( ( options.active === false && options.collapsible === true ) || !this.headers.length ) { + options.active = false; + this.active = $(); + // active false only when collapsible is true + } else if ( options.active === false ) { + this._activate( 0 ); + // was active, but active panel is gone + } else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + // all remaining panel are disabled + if ( this.headers.length === this.headers.find(".ui-state-disabled").length ) { + options.active = false; + this.active = $(); + // activate previous panel + } else { + this._activate( Math.max( 0, options.active - 1 ) ); + } + // was active, active panel still exists + } else { + // make sure active index is correct + options.active = this.headers.index( this.active ); + } + + this._destroyIcons(); + + this._refresh(); + }, + + _processPanels: function() { + var prevHeaders = this.headers, + prevPanels = this.panels; + + this.headers = this.element.find( this.options.header ) + .addClass( "ui-accordion-header ui-state-default ui-corner-all" ); + + this.panels = this.headers.next() + .addClass( "ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom" ) + .filter( ":not(.ui-accordion-content-active)" ) + .hide(); + + // Avoid memory leaks (#10056) + if ( prevPanels ) { + this._off( prevHeaders.not( this.headers ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + _refresh: function() { + var maxHeight, + options = this.options, + heightStyle = options.heightStyle, + parent = this.element.parent(); + + this.active = this._findActive( options.active ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ) + .removeClass( "ui-corner-all" ); + this.active.next() + .addClass( "ui-accordion-content-active" ) + .show(); + + this.headers + .attr( "role", "tab" ) + .each(function() { + var header = $( this ), + headerId = header.uniqueId().attr( "id" ), + panel = header.next(), + panelId = panel.uniqueId().attr( "id" ); + header.attr( "aria-controls", panelId ); + panel.attr( "aria-labelledby", headerId ); + }) + .next() + .attr( "role", "tabpanel" ); + + this.headers + .not( this.active ) + .attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }) + .next() + .attr({ + "aria-hidden": "true" + }) + .hide(); + + // make sure at least one header is in the tab order + if ( !this.active.length ) { + this.headers.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }) + .next() + .attr({ + "aria-hidden": "false" + }); + } + + this._createIcons(); + + this._setupEvents( options.event ); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.headers.each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.headers.next() + .each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.headers.next() + .each(function() { + maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() ); + }) + .height( maxHeight ); + } + }, + + _activate: function( index ) { + var active = this._findActive( index )[ 0 ]; + + // trying to activate the already active panel + if ( active === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the currently active header + active = active || this.active[ 0 ]; + + this._eventHandler({ + target: active, + currentTarget: active, + preventDefault: $.noop + }); + }, + + _findActive: function( selector ) { + return typeof selector === "number" ? this.headers.eq( selector ) : $(); + }, + + _setupEvents: function( event ) { + var events = { + keydown: "_keydown" + }; + if ( event ) { + $.each( event.split( " " ), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.headers.add( this.headers.next() ) ); + this._on( this.headers, events ); + this._on( this.headers.next(), { keydown: "_panelKeyDown" }); + this._hoverable( this.headers ); + this._focusable( this.headers ); + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + clicked = $( event.currentTarget ), + clickedIsActive = clicked[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : clicked.next(), + toHide = active.next(), + eventData = { + oldHeader: active, + oldPanel: toHide, + newHeader: collapsing ? $() : clicked, + newPanel: toShow + }; + + event.preventDefault(); + + if ( + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.headers.index( clicked ); + + // when the call to ._toggle() comes after the class changes + // it causes a very odd bug in IE 8 (see #6720) + this.active = clickedIsActive ? $() : clicked; + this._toggle( eventData ); + + // switch classes + // corner classes on the previously active header stay after the animation + active.removeClass( "ui-accordion-header-active ui-state-active" ); + if ( options.icons ) { + active.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.activeHeader ) + .addClass( options.icons.header ); + } + + if ( !clickedIsActive ) { + clicked + .removeClass( "ui-corner-all" ) + .addClass( "ui-accordion-header-active ui-state-active ui-corner-top" ); + if ( options.icons ) { + clicked.children( ".ui-accordion-header-icon" ) + .removeClass( options.icons.header ) + .addClass( options.icons.activeHeader ); + } + + clicked + .next() + .addClass( "ui-accordion-content-active" ); + } + }, + + _toggle: function( data ) { + var toShow = data.newPanel, + toHide = this.prevShow.length ? this.prevShow : data.oldPanel; + + // handle activating a panel during the animation for another activation + this.prevShow.add( this.prevHide ).stop( true, true ); + this.prevShow = toShow; + this.prevHide = toHide; + + if ( this.options.animate ) { + this._animate( toShow, toHide, data ); + } else { + toHide.hide(); + toShow.show(); + this._toggleComplete( data ); + } + + toHide.attr({ + "aria-hidden": "true" + }); + toHide.prev().attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // if we're switching panels, remove the old header from the tab order + // if we're opening from collapsed state, remove the previous header from the tab order + // if we're collapsing, then keep the collapsing header in the tab order + if ( toShow.length && toHide.length ) { + toHide.prev().attr({ + "tabIndex": -1, + "aria-expanded": "false" + }); + } else if ( toShow.length ) { + this.headers.filter(function() { + return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow + .attr( "aria-hidden", "false" ) + .prev() + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _animate: function( toShow, toHide, data ) { + var total, easing, duration, + that = this, + adjust = 0, + boxSizing = toShow.css( "box-sizing" ), + down = toShow.length && + ( !toHide.length || ( toShow.index() < toHide.index() ) ), + animate = this.options.animate || {}, + options = down && animate.down || animate, + complete = function() { + that._toggleComplete( data ); + }; + + if ( typeof options === "number" ) { + duration = options; + } + if ( typeof options === "string" ) { + easing = options; + } + // fall back from options to animation in case of partial down settings + easing = easing || options.easing || animate.easing; + duration = duration || options.duration || animate.duration; + + if ( !toHide.length ) { + return toShow.animate( this.showProps, duration, easing, complete ); + } + if ( !toShow.length ) { + return toHide.animate( this.hideProps, duration, easing, complete ); + } + + total = toShow.show().outerHeight(); + toHide.animate( this.hideProps, { + duration: duration, + easing: easing, + step: function( now, fx ) { + fx.now = Math.round( now ); + } + }); + toShow + .hide() + .animate( this.showProps, { + duration: duration, + easing: easing, + complete: complete, + step: function( now, fx ) { + fx.now = Math.round( now ); + if ( fx.prop !== "height" ) { + if ( boxSizing === "content-box" ) { + adjust += fx.now; + } + } else if ( that.options.heightStyle !== "content" ) { + fx.now = Math.round( total - toHide.outerHeight() - adjust ); + adjust = 0; + } + } + }); + }, + + _toggleComplete: function( data ) { + var toHide = data.oldPanel; + + toHide + .removeClass( "ui-accordion-content-active" ) + .prev() + .removeClass( "ui-corner-top" ) + .addClass( "ui-corner-all" ); + + // Work around for rendering bug in IE (#5421) + if ( toHide.length ) { + toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className; + } + this._trigger( "activate", null, data ); + } +}); + + +/*! + * jQuery UI Menu 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/menu/ + */ + + +var menu = $.widget( "ui.menu", { + version: "1.11.4", + defaultElement: "<ul>", + delay: 300, + options: { + icons: { + submenu: "ui-icon-carat-1-e" + }, + items: "> *", + menus: "ul", + position: { + my: "left-1 top", + at: "right top" + }, + role: "menu", + + // callbacks + blur: null, + focus: null, + select: null + }, + + _create: function() { + this.activeMenu = this.element; + + // Flag used to prevent firing of the click handler + // as the event bubbles up through nested menus + this.mouseHandled = false; + this.element + .uniqueId() + .addClass( "ui-menu ui-widget ui-widget-content" ) + .toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ) + .attr({ + role: this.options.role, + tabIndex: 0 + }); + + if ( this.options.disabled ) { + this.element + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } + + this._on({ + // Prevent focus from sticking to links inside menu after clicking + // them (focus should always stay on UL during navigation). + "mousedown .ui-menu-item": function( event ) { + event.preventDefault(); + }, + "click .ui-menu-item": function( event ) { + var target = $( event.target ); + if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) { + this.select( event ); + + // Only set the mouseHandled flag if the event will bubble, see #9469. + if ( !event.isPropagationStopped() ) { + this.mouseHandled = true; + } + + // Open submenu on click + if ( target.has( ".ui-menu" ).length ) { + this.expand( event ); + } else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) { + + // Redirect focus to the menu + this.element.trigger( "focus", [ true ] ); + + // If the active item is on the top level, let it stay active. + // Otherwise, blur the active item since it is no longer visible. + if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) { + clearTimeout( this.timer ); + } + } + } + }, + "mouseenter .ui-menu-item": function( event ) { + // Ignore mouse events while typeahead is active, see #10458. + // Prevents focusing the wrong item when typeahead causes a scroll while the mouse + // is over an item in the menu + if ( this.previousFilter ) { + return; + } + var target = $( event.currentTarget ); + // Remove ui-state-active class from siblings of the newly focused menu item + // to avoid a jump caused by adjacent elements both having a class with a border + target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" ); + this.focus( event, target ); + }, + mouseleave: "collapseAll", + "mouseleave .ui-menu": "collapseAll", + focus: function( event, keepActiveItem ) { + // If there's already an active item, keep it active + // If not, activate the first item + var item = this.active || this.element.find( this.options.items ).eq( 0 ); + + if ( !keepActiveItem ) { + this.focus( event, item ); + } + }, + blur: function( event ) { + this._delay(function() { + if ( !$.contains( this.element[0], this.document[0].activeElement ) ) { + this.collapseAll( event ); + } + }); + }, + keydown: "_keydown" + }); + + this.refresh(); + + // Clicks outside of a menu collapse any open menus + this._on( this.document, { + click: function( event ) { + if ( this._closeOnDocumentClick( event ) ) { + this.collapseAll( event ); + } + + // Reset the mouseHandled flag + this.mouseHandled = false; + } + }); + }, + + _destroy: function() { + // Destroy (sub)menus + this.element + .removeAttr( "aria-activedescendant" ) + .find( ".ui-menu" ).addBack() + .removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .show(); + + // Destroy menu items + this.element.find( ".ui-menu-item" ) + .removeClass( "ui-menu-item" ) + .removeAttr( "role" ) + .removeAttr( "aria-disabled" ) + .removeUniqueId() + .removeClass( "ui-state-hover" ) + .removeAttr( "tabIndex" ) + .removeAttr( "role" ) + .removeAttr( "aria-haspopup" ) + .children().each( function() { + var elem = $( this ); + if ( elem.data( "ui-menu-submenu-carat" ) ) { + elem.remove(); + } + }); + + // Destroy menu dividers + this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" ); + }, + + _keydown: function( event ) { + var match, prev, character, skip, + preventDefault = true; + + switch ( event.keyCode ) { + case $.ui.keyCode.PAGE_UP: + this.previousPage( event ); + break; + case $.ui.keyCode.PAGE_DOWN: + this.nextPage( event ); + break; + case $.ui.keyCode.HOME: + this._move( "first", "first", event ); + break; + case $.ui.keyCode.END: + this._move( "last", "last", event ); + break; + case $.ui.keyCode.UP: + this.previous( event ); + break; + case $.ui.keyCode.DOWN: + this.next( event ); + break; + case $.ui.keyCode.LEFT: + this.collapse( event ); + break; + case $.ui.keyCode.RIGHT: + if ( this.active && !this.active.is( ".ui-state-disabled" ) ) { + this.expand( event ); + } + break; + case $.ui.keyCode.ENTER: + case $.ui.keyCode.SPACE: + this._activate( event ); + break; + case $.ui.keyCode.ESCAPE: + this.collapse( event ); + break; + default: + preventDefault = false; + prev = this.previousFilter || ""; + character = String.fromCharCode( event.keyCode ); + skip = false; + + clearTimeout( this.filterTimer ); + + if ( character === prev ) { + skip = true; + } else { + character = prev + character; + } + + match = this._filterMenuItems( character ); + match = skip && match.index( this.active.next() ) !== -1 ? + this.active.nextAll( ".ui-menu-item" ) : + match; + + // If no matches on the current filter, reset to the last character pressed + // to move down the menu to the first item that starts with that character + if ( !match.length ) { + character = String.fromCharCode( event.keyCode ); + match = this._filterMenuItems( character ); + } + + if ( match.length ) { + this.focus( event, match ); + this.previousFilter = character; + this.filterTimer = this._delay(function() { + delete this.previousFilter; + }, 1000 ); + } else { + delete this.previousFilter; + } + } + + if ( preventDefault ) { + event.preventDefault(); + } + }, + + _activate: function( event ) { + if ( !this.active.is( ".ui-state-disabled" ) ) { + if ( this.active.is( "[aria-haspopup='true']" ) ) { + this.expand( event ); + } else { + this.select( event ); + } + } + }, + + refresh: function() { + var menus, items, + that = this, + icon = this.options.icons.submenu, + submenus = this.element.find( this.options.menus ); + + this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length ); + + // Initialize nested menus + submenus.filter( ":not(.ui-menu)" ) + .addClass( "ui-menu ui-widget ui-widget-content ui-front" ) + .hide() + .attr({ + role: this.options.role, + "aria-hidden": "true", + "aria-expanded": "false" + }) + .each(function() { + var menu = $( this ), + item = menu.parent(), + submenuCarat = $( "<span>" ) + .addClass( "ui-menu-icon ui-icon " + icon ) + .data( "ui-menu-submenu-carat", true ); + + item + .attr( "aria-haspopup", "true" ) + .prepend( submenuCarat ); + menu.attr( "aria-labelledby", item.attr( "id" ) ); + }); + + menus = submenus.add( this.element ); + items = menus.find( this.options.items ); + + // Initialize menu-items containing spaces and/or dashes only as dividers + items.not( ".ui-menu-item" ).each(function() { + var item = $( this ); + if ( that._isDivider( item ) ) { + item.addClass( "ui-widget-content ui-menu-divider" ); + } + }); + + // Don't refresh list items that are already adapted + items.not( ".ui-menu-item, .ui-menu-divider" ) + .addClass( "ui-menu-item" ) + .uniqueId() + .attr({ + tabIndex: -1, + role: this._itemRole() + }); + + // Add aria-disabled attribute to any disabled menu item + items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" ); + + // If the active item has been removed, blur the menu + if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) { + this.blur(); + } + }, + + _itemRole: function() { + return { + menu: "menuitem", + listbox: "option" + }[ this.options.role ]; + }, + + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.element.find( ".ui-menu-icon" ) + .removeClass( this.options.icons.submenu ) + .addClass( value.submenu ); + } + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + } + this._super( key, value ); + }, + + focus: function( event, item ) { + var nested, focused; + this.blur( event, event && event.type === "focus" ); + + this._scrollIntoView( item ); + + this.active = item.first(); + focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" ); + // Only update aria-activedescendant if there's a role + // otherwise we assume focus is managed elsewhere + if ( this.options.role ) { + this.element.attr( "aria-activedescendant", focused.attr( "id" ) ); + } + + // Highlight active parent menu item, if any + this.active + .parent() + .closest( ".ui-menu-item" ) + .addClass( "ui-state-active" ); + + if ( event && event.type === "keydown" ) { + this._close(); + } else { + this.timer = this._delay(function() { + this._close(); + }, this.delay ); + } + + nested = item.children( ".ui-menu" ); + if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) { + this._startOpening(nested); + } + this.activeMenu = item.parent(); + + this._trigger( "focus", event, { item: item } ); + }, + + _scrollIntoView: function( item ) { + var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight; + if ( this._hasScroll() ) { + borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0; + paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0; + offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop; + scroll = this.activeMenu.scrollTop(); + elementHeight = this.activeMenu.height(); + itemHeight = item.outerHeight(); + + if ( offset < 0 ) { + this.activeMenu.scrollTop( scroll + offset ); + } else if ( offset + itemHeight > elementHeight ) { + this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight ); + } + } + }, + + blur: function( event, fromFocus ) { + if ( !fromFocus ) { + clearTimeout( this.timer ); + } + + if ( !this.active ) { + return; + } + + this.active.removeClass( "ui-state-focus" ); + this.active = null; + + this._trigger( "blur", event, { item: this.active } ); + }, + + _startOpening: function( submenu ) { + clearTimeout( this.timer ); + + // Don't open if already open fixes a Firefox bug that caused a .5 pixel + // shift in the submenu position when mousing over the carat icon + if ( submenu.attr( "aria-hidden" ) !== "true" ) { + return; + } + + this.timer = this._delay(function() { + this._close(); + this._open( submenu ); + }, this.delay ); + }, + + _open: function( submenu ) { + var position = $.extend({ + of: this.active + }, this.options.position ); + + clearTimeout( this.timer ); + this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) ) + .hide() + .attr( "aria-hidden", "true" ); + + submenu + .show() + .removeAttr( "aria-hidden" ) + .attr( "aria-expanded", "true" ) + .position( position ); + }, + + collapseAll: function( event, all ) { + clearTimeout( this.timer ); + this.timer = this._delay(function() { + // If we were passed an event, look for the submenu that contains the event + var currentMenu = all ? this.element : + $( event && event.target ).closest( this.element.find( ".ui-menu" ) ); + + // If we found no valid submenu ancestor, use the main menu to close all sub menus anyway + if ( !currentMenu.length ) { + currentMenu = this.element; + } + + this._close( currentMenu ); + + this.blur( event ); + this.activeMenu = currentMenu; + }, this.delay ); + }, + + // With no arguments, closes the currently active menu - if nothing is active + // it closes all menus. If passed an argument, it will search for menus BELOW + _close: function( startMenu ) { + if ( !startMenu ) { + startMenu = this.active ? this.active.parent() : this.element; + } + + startMenu + .find( ".ui-menu" ) + .hide() + .attr( "aria-hidden", "true" ) + .attr( "aria-expanded", "false" ) + .end() + .find( ".ui-state-active" ).not( ".ui-state-focus" ) + .removeClass( "ui-state-active" ); + }, + + _closeOnDocumentClick: function( event ) { + return !$( event.target ).closest( ".ui-menu" ).length; + }, + + _isDivider: function( item ) { + + // Match hyphen, em dash, en dash + return !/[^\-\u2014\u2013\s]/.test( item.text() ); + }, + + collapse: function( event ) { + var newItem = this.active && + this.active.parent().closest( ".ui-menu-item", this.element ); + if ( newItem && newItem.length ) { + this._close(); + this.focus( event, newItem ); + } + }, + + expand: function( event ) { + var newItem = this.active && + this.active + .children( ".ui-menu " ) + .find( this.options.items ) + .first(); + + if ( newItem && newItem.length ) { + this._open( newItem.parent() ); + + // Delay so Firefox will not hide activedescendant change in expanding submenu from AT + this._delay(function() { + this.focus( event, newItem ); + }); + } + }, + + next: function( event ) { + this._move( "next", "first", event ); + }, + + previous: function( event ) { + this._move( "prev", "last", event ); + }, + + isFirstItem: function() { + return this.active && !this.active.prevAll( ".ui-menu-item" ).length; + }, + + isLastItem: function() { + return this.active && !this.active.nextAll( ".ui-menu-item" ).length; + }, + + _move: function( direction, filter, event ) { + var next; + if ( this.active ) { + if ( direction === "first" || direction === "last" ) { + next = this.active + [ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" ) + .eq( -1 ); + } else { + next = this.active + [ direction + "All" ]( ".ui-menu-item" ) + .eq( 0 ); + } + } + if ( !next || !next.length || !this.active ) { + next = this.activeMenu.find( this.options.items )[ filter ](); + } + + this.focus( event, next ); + }, + + nextPage: function( event ) { + var item, base, height; + + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isLastItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.nextAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base - height < 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ) + [ !this.active ? "first" : "last" ]() ); + } + }, + + previousPage: function( event ) { + var item, base, height; + if ( !this.active ) { + this.next( event ); + return; + } + if ( this.isFirstItem() ) { + return; + } + if ( this._hasScroll() ) { + base = this.active.offset().top; + height = this.element.height(); + this.active.prevAll( ".ui-menu-item" ).each(function() { + item = $( this ); + return item.offset().top - base + height > 0; + }); + + this.focus( event, item ); + } else { + this.focus( event, this.activeMenu.find( this.options.items ).first() ); + } + }, + + _hasScroll: function() { + return this.element.outerHeight() < this.element.prop( "scrollHeight" ); + }, + + select: function( event ) { + // TODO: It should never be possible to not have an active item at this + // point, but the tests don't trigger mouseenter before click. + this.active = this.active || $( event.target ).closest( ".ui-menu-item" ); + var ui = { item: this.active }; + if ( !this.active.has( ".ui-menu" ).length ) { + this.collapseAll( event, true ); + } + this._trigger( "select", event, ui ); + }, + + _filterMenuItems: function(character) { + var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ), + regex = new RegExp( "^" + escapedCharacter, "i" ); + + return this.activeMenu + .find( this.options.items ) + + // Only match on items, not dividers or other content (#10571) + .filter( ".ui-menu-item" ) + .filter(function() { + return regex.test( $.trim( $( this ).text() ) ); + }); + } +}); + + +/*! + * jQuery UI Autocomplete 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/autocomplete/ + */ + + +$.widget( "ui.autocomplete", { + version: "1.11.4", + defaultElement: "<input>", + options: { + appendTo: null, + autoFocus: false, + delay: 300, + minLength: 1, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + source: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + response: null, + search: null, + select: null + }, + + requestIndex: 0, + pending: 0, + + _create: function() { + // Some browsers only repeat keydown events, not keypress events, + // so we use the suppressKeyPress flag to determine if we've already + // handled the keydown event. #7269 + // Unfortunately the code for & in keypress is the same as the up arrow, + // so we use the suppressKeyPressRepeat flag to avoid handling keypress + // events when we know the keydown event was used to modify the + // search term. #7799 + var suppressKeyPress, suppressKeyPressRepeat, suppressInput, + nodeName = this.element[ 0 ].nodeName.toLowerCase(), + isTextarea = nodeName === "textarea", + isInput = nodeName === "input"; + + this.isMultiLine = + // Textareas are always multi-line + isTextarea ? true : + // Inputs are always single-line, even if inside a contentEditable element + // IE also treats inputs as contentEditable + isInput ? false : + // All other element types are determined by whether or not they're contentEditable + this.element.prop( "isContentEditable" ); + + this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; + this.isNewMenu = true; + + this.element + .addClass( "ui-autocomplete-input" ) + .attr( "autocomplete", "off" ); + + this._on( this.element, { + keydown: function( event ) { + if ( this.element.prop( "readOnly" ) ) { + suppressKeyPress = true; + suppressInput = true; + suppressKeyPressRepeat = true; + return; + } + + suppressKeyPress = false; + suppressInput = false; + suppressKeyPressRepeat = false; + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + suppressKeyPress = true; + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + suppressKeyPress = true; + this._move( "nextPage", event ); + break; + case keyCode.UP: + suppressKeyPress = true; + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + suppressKeyPress = true; + this._keyEvent( "next", event ); + break; + case keyCode.ENTER: + // when menu is open and has focus + if ( this.menu.active ) { + // #6055 - Opera still allows the keypress to occur + // which causes forms to submit + suppressKeyPress = true; + event.preventDefault(); + this.menu.select( event ); + } + break; + case keyCode.TAB: + if ( this.menu.active ) { + this.menu.select( event ); + } + break; + case keyCode.ESCAPE: + if ( this.menu.element.is( ":visible" ) ) { + if ( !this.isMultiLine ) { + this._value( this.term ); + } + this.close( event ); + // Different browsers have different default behavior for escape + // Single press can mean undo or clear + // Double press in IE means clear the whole form + event.preventDefault(); + } + break; + default: + suppressKeyPressRepeat = true; + // search timeout should be triggered before the input value is changed + this._searchTimeout( event ); + break; + } + }, + keypress: function( event ) { + if ( suppressKeyPress ) { + suppressKeyPress = false; + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + event.preventDefault(); + } + return; + } + if ( suppressKeyPressRepeat ) { + return; + } + + // replicate some key handlers to allow them to repeat in Firefox and Opera + var keyCode = $.ui.keyCode; + switch ( event.keyCode ) { + case keyCode.PAGE_UP: + this._move( "previousPage", event ); + break; + case keyCode.PAGE_DOWN: + this._move( "nextPage", event ); + break; + case keyCode.UP: + this._keyEvent( "previous", event ); + break; + case keyCode.DOWN: + this._keyEvent( "next", event ); + break; + } + }, + input: function( event ) { + if ( suppressInput ) { + suppressInput = false; + event.preventDefault(); + return; + } + this._searchTimeout( event ); + }, + focus: function() { + this.selectedItem = null; + this.previous = this._value(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + clearTimeout( this.searching ); + this.close( event ); + this._change( event ); + } + }); + + this._initSource(); + this.menu = $( "<ul>" ) + .addClass( "ui-autocomplete ui-front" ) + .appendTo( this._appendTo() ) + .menu({ + // disable ARIA support, the live region takes care of that + role: null + }) + .hide() + .menu( "instance" ); + + this._on( this.menu.element, { + mousedown: function( event ) { + // prevent moving focus out of the text field + event.preventDefault(); + + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + }); + + // clicking on the scrollbar causes focus to shift to the body + // but we can't detect a mouseup or a click immediately afterward + // so we have to track the next mousedown and close the menu if + // the user clicks somewhere outside of the autocomplete + var menuElement = this.menu.element[ 0 ]; + if ( !$( event.target ).closest( ".ui-menu-item" ).length ) { + this._delay(function() { + var that = this; + this.document.one( "mousedown", function( event ) { + if ( event.target !== that.element[ 0 ] && + event.target !== menuElement && + !$.contains( menuElement, event.target ) ) { + that.close(); + } + }); + }); + } + }, + menufocus: function( event, ui ) { + var label, item; + // support: Firefox + // Prevent accidental activation of menu items in Firefox (#7024 #9118) + if ( this.isNewMenu ) { + this.isNewMenu = false; + if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) { + this.menu.blur(); + + this.document.one( "mousemove", function() { + $( event.target ).trigger( event.originalEvent ); + }); + + return; + } + } + + item = ui.item.data( "ui-autocomplete-item" ); + if ( false !== this._trigger( "focus", event, { item: item } ) ) { + // use value to match what will end up in the input, if it was a key event + if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) { + this._value( item.value ); + } + } + + // Announce the value in the liveRegion + label = ui.item.attr( "aria-label" ) || item.value; + if ( label && $.trim( label ).length ) { + this.liveRegion.children().hide(); + $( "<div>" ).text( label ).appendTo( this.liveRegion ); + } + }, + menuselect: function( event, ui ) { + var item = ui.item.data( "ui-autocomplete-item" ), + previous = this.previous; + + // only trigger when focus was lost (click on menu) + if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) { + this.element.focus(); + this.previous = previous; + // #6109 - IE triggers two focus events and the second + // is asynchronous, so we need to reset the previous + // term synchronously and asynchronously :-( + this._delay(function() { + this.previous = previous; + this.selectedItem = item; + }); + } + + if ( false !== this._trigger( "select", event, { item: item } ) ) { + this._value( item.value ); + } + // reset the term after the select event + // this allows custom select handling to work properly + this.term = this._value(); + + this.close( event ); + this.selectedItem = item; + } + }); + + this.liveRegion = $( "<span>", { + role: "status", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _destroy: function() { + clearTimeout( this.searching ); + this.element + .removeClass( "ui-autocomplete-input" ) + .removeAttr( "autocomplete" ); + this.menu.element.remove(); + this.liveRegion.remove(); + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "source" ) { + this._initSource(); + } + if ( key === "appendTo" ) { + this.menu.element.appendTo( this._appendTo() ); + } + if ( key === "disabled" && value && this.xhr ) { + this.xhr.abort(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element || !element[ 0 ] ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[ 0 ].body; + } + + return element; + }, + + _initSource: function() { + var array, url, + that = this; + if ( $.isArray( this.options.source ) ) { + array = this.options.source; + this.source = function( request, response ) { + response( $.ui.autocomplete.filter( array, request.term ) ); + }; + } else if ( typeof this.options.source === "string" ) { + url = this.options.source; + this.source = function( request, response ) { + if ( that.xhr ) { + that.xhr.abort(); + } + that.xhr = $.ajax({ + url: url, + data: request, + dataType: "json", + success: function( data ) { + response( data ); + }, + error: function() { + response([]); + } + }); + }; + } else { + this.source = this.options.source; + } + }, + + _searchTimeout: function( event ) { + clearTimeout( this.searching ); + this.searching = this._delay(function() { + + // Search if the value has changed, or if the user retypes the same value (see #7434) + var equalValues = this.term === this._value(), + menuVisible = this.menu.element.is( ":visible" ), + modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey; + + if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) { + this.selectedItem = null; + this.search( null, event ); + } + }, this.options.delay ); + }, + + search: function( value, event ) { + value = value != null ? value : this._value(); + + // always save the actual value, not the one passed as an argument + this.term = this._value(); + + if ( value.length < this.options.minLength ) { + return this.close( event ); + } + + if ( this._trigger( "search", event ) === false ) { + return; + } + + return this._search( value ); + }, + + _search: function( value ) { + this.pending++; + this.element.addClass( "ui-autocomplete-loading" ); + this.cancelSearch = false; + + this.source( { term: value }, this._response() ); + }, + + _response: function() { + var index = ++this.requestIndex; + + return $.proxy(function( content ) { + if ( index === this.requestIndex ) { + this.__response( content ); + } + + this.pending--; + if ( !this.pending ) { + this.element.removeClass( "ui-autocomplete-loading" ); + } + }, this ); + }, + + __response: function( content ) { + if ( content ) { + content = this._normalize( content ); + } + this._trigger( "response", null, { content: content } ); + if ( !this.options.disabled && content && content.length && !this.cancelSearch ) { + this._suggest( content ); + this._trigger( "open" ); + } else { + // use ._close() instead of .close() so we don't cancel future searches + this._close(); + } + }, + + close: function( event ) { + this.cancelSearch = true; + this._close( event ); + }, + + _close: function( event ) { + if ( this.menu.element.is( ":visible" ) ) { + this.menu.element.hide(); + this.menu.blur(); + this.isNewMenu = true; + this._trigger( "close", event ); + } + }, + + _change: function( event ) { + if ( this.previous !== this._value() ) { + this._trigger( "change", event, { item: this.selectedItem } ); + } + }, + + _normalize: function( items ) { + // assume all items have the right format when the first item is complete + if ( items.length && items[ 0 ].label && items[ 0 ].value ) { + return items; + } + return $.map( items, function( item ) { + if ( typeof item === "string" ) { + return { + label: item, + value: item + }; + } + return $.extend( {}, item, { + label: item.label || item.value, + value: item.value || item.label + }); + }); + }, + + _suggest: function( items ) { + var ul = this.menu.element.empty(); + this._renderMenu( ul, items ); + this.isNewMenu = true; + this.menu.refresh(); + + // size and position menu + ul.show(); + this._resizeMenu(); + ul.position( $.extend({ + of: this.element + }, this.options.position ) ); + + if ( this.options.autoFocus ) { + this.menu.next(); + } + }, + + _resizeMenu: function() { + var ul = this.menu.element; + ul.outerWidth( Math.max( + // Firefox wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping (#7513) + ul.width( "" ).outerWidth() + 1, + this.element.outerWidth() + ) ); + }, + + _renderMenu: function( ul, items ) { + var that = this; + $.each( items, function( index, item ) { + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); + }, + + _renderItem: function( ul, item ) { + return $( "<li>" ).text( item.label ).appendTo( ul ); + }, + + _move: function( direction, event ) { + if ( !this.menu.element.is( ":visible" ) ) { + this.search( null, event ); + return; + } + if ( this.menu.isFirstItem() && /^previous/.test( direction ) || + this.menu.isLastItem() && /^next/.test( direction ) ) { + + if ( !this.isMultiLine ) { + this._value( this.term ); + } + + this.menu.blur(); + return; + } + this.menu[ direction ]( event ); + }, + + widget: function() { + return this.menu.element; + }, + + _value: function() { + return this.valueMethod.apply( this.element, arguments ); + }, + + _keyEvent: function( keyEvent, event ) { + if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) { + this._move( keyEvent, event ); + + // prevents moving cursor to beginning/end of the text field in some browsers + event.preventDefault(); + } + } +}); + +$.extend( $.ui.autocomplete, { + escapeRegex: function( value ) { + return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); + }, + filter: function( array, term ) { + var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); + return $.grep( array, function( value ) { + return matcher.test( value.label || value.value || value ); + }); + } +}); + +// live region extension, adding a `messages` option +// NOTE: This is an experimental API. We are still investigating +// a full solution for string manipulation and internationalization. +$.widget( "ui.autocomplete", $.ui.autocomplete, { + options: { + messages: { + noResults: "No search results.", + results: function( amount ) { + return amount + ( amount > 1 ? " results are" : " result is" ) + + " available, use up and down arrow keys to navigate."; + } + } + }, + + __response: function( content ) { + var message; + this._superApply( arguments ); + if ( this.options.disabled || this.cancelSearch ) { + return; + } + if ( content && content.length ) { + message = this.options.messages.results( content.length ); + } else { + message = this.options.messages.noResults; + } + this.liveRegion.children().hide(); + $( "<div>" ).text( message ).appendTo( this.liveRegion ); + } +}); + +var autocomplete = $.ui.autocomplete; + + +/*! + * jQuery UI Button 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/button/ + */ + + +var lastActive, + baseClasses = "ui-button ui-widget ui-state-default ui-corner-all", + typeClasses = "ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only", + formResetHandler = function() { + var form = $( this ); + setTimeout(function() { + form.find( ":ui-button" ).button( "refresh" ); + }, 1 ); + }, + radioGroup = function( radio ) { + var name = radio.name, + form = radio.form, + radios = $( [] ); + if ( name ) { + name = name.replace( /'/g, "\\'" ); + if ( form ) { + radios = $( form ).find( "[name='" + name + "'][type=radio]" ); + } else { + radios = $( "[name='" + name + "'][type=radio]", radio.ownerDocument ) + .filter(function() { + return !this.form; + }); + } + } + return radios; + }; + +$.widget( "ui.button", { + version: "1.11.4", + defaultElement: "<button>", + options: { + disabled: null, + text: true, + label: null, + icons: { + primary: null, + secondary: null + } + }, + _create: function() { + this.element.closest( "form" ) + .unbind( "reset" + this.eventNamespace ) + .bind( "reset" + this.eventNamespace, formResetHandler ); + + if ( typeof this.options.disabled !== "boolean" ) { + this.options.disabled = !!this.element.prop( "disabled" ); + } else { + this.element.prop( "disabled", this.options.disabled ); + } + + this._determineButtonType(); + this.hasTitle = !!this.buttonElement.attr( "title" ); + + var that = this, + options = this.options, + toggleButton = this.type === "checkbox" || this.type === "radio", + activeClass = !toggleButton ? "ui-state-active" : ""; + + if ( options.label === null ) { + options.label = (this.type === "input" ? this.buttonElement.val() : this.buttonElement.html()); + } + + this._hoverable( this.buttonElement ); + + this.buttonElement + .addClass( baseClasses ) + .attr( "role", "button" ) + .bind( "mouseenter" + this.eventNamespace, function() { + if ( options.disabled ) { + return; + } + if ( this === lastActive ) { + $( this ).addClass( "ui-state-active" ); + } + }) + .bind( "mouseleave" + this.eventNamespace, function() { + if ( options.disabled ) { + return; + } + $( this ).removeClass( activeClass ); + }) + .bind( "click" + this.eventNamespace, function( event ) { + if ( options.disabled ) { + event.preventDefault(); + event.stopImmediatePropagation(); + } + }); + + // Can't use _focusable() because the element that receives focus + // and the element that gets the ui-state-focus class are different + this._on({ + focus: function() { + this.buttonElement.addClass( "ui-state-focus" ); + }, + blur: function() { + this.buttonElement.removeClass( "ui-state-focus" ); + } + }); + + if ( toggleButton ) { + this.element.bind( "change" + this.eventNamespace, function() { + that.refresh(); + }); + } + + if ( this.type === "checkbox" ) { + this.buttonElement.bind( "click" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + }); + } else if ( this.type === "radio" ) { + this.buttonElement.bind( "click" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).addClass( "ui-state-active" ); + that.buttonElement.attr( "aria-pressed", "true" ); + + var radio = that.element[ 0 ]; + radioGroup( radio ) + .not( radio ) + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + }); + } else { + this.buttonElement + .bind( "mousedown" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).addClass( "ui-state-active" ); + lastActive = this; + that.document.one( "mouseup", function() { + lastActive = null; + }); + }) + .bind( "mouseup" + this.eventNamespace, function() { + if ( options.disabled ) { + return false; + } + $( this ).removeClass( "ui-state-active" ); + }) + .bind( "keydown" + this.eventNamespace, function(event) { + if ( options.disabled ) { + return false; + } + if ( event.keyCode === $.ui.keyCode.SPACE || event.keyCode === $.ui.keyCode.ENTER ) { + $( this ).addClass( "ui-state-active" ); + } + }) + // see #8559, we bind to blur here in case the button element loses + // focus between keydown and keyup, it would be left in an "active" state + .bind( "keyup" + this.eventNamespace + " blur" + this.eventNamespace, function() { + $( this ).removeClass( "ui-state-active" ); + }); + + if ( this.buttonElement.is("a") ) { + this.buttonElement.keyup(function(event) { + if ( event.keyCode === $.ui.keyCode.SPACE ) { + // TODO pass through original event correctly (just as 2nd argument doesn't work) + $( this ).click(); + } + }); + } + } + + this._setOption( "disabled", options.disabled ); + this._resetButton(); + }, + + _determineButtonType: function() { + var ancestor, labelSelector, checked; + + if ( this.element.is("[type=checkbox]") ) { + this.type = "checkbox"; + } else if ( this.element.is("[type=radio]") ) { + this.type = "radio"; + } else if ( this.element.is("input") ) { + this.type = "input"; + } else { + this.type = "button"; + } + + if ( this.type === "checkbox" || this.type === "radio" ) { + // we don't search against the document in case the element + // is disconnected from the DOM + ancestor = this.element.parents().last(); + labelSelector = "label[for='" + this.element.attr("id") + "']"; + this.buttonElement = ancestor.find( labelSelector ); + if ( !this.buttonElement.length ) { + ancestor = ancestor.length ? ancestor.siblings() : this.element.siblings(); + this.buttonElement = ancestor.filter( labelSelector ); + if ( !this.buttonElement.length ) { + this.buttonElement = ancestor.find( labelSelector ); + } + } + this.element.addClass( "ui-helper-hidden-accessible" ); + + checked = this.element.is( ":checked" ); + if ( checked ) { + this.buttonElement.addClass( "ui-state-active" ); + } + this.buttonElement.prop( "aria-pressed", checked ); + } else { + this.buttonElement = this.element; + } + }, + + widget: function() { + return this.buttonElement; + }, + + _destroy: function() { + this.element + .removeClass( "ui-helper-hidden-accessible" ); + this.buttonElement + .removeClass( baseClasses + " ui-state-active " + typeClasses ) + .removeAttr( "role" ) + .removeAttr( "aria-pressed" ) + .html( this.buttonElement.find(".ui-button-text").html() ); + + if ( !this.hasTitle ) { + this.buttonElement.removeAttr( "title" ); + } + }, + + _setOption: function( key, value ) { + this._super( key, value ); + if ( key === "disabled" ) { + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); + if ( value ) { + if ( this.type === "checkbox" || this.type === "radio" ) { + this.buttonElement.removeClass( "ui-state-focus" ); + } else { + this.buttonElement.removeClass( "ui-state-focus ui-state-active" ); + } + } + return; + } + this._resetButton(); + }, + + refresh: function() { + //See #8237 & #8828 + var isDisabled = this.element.is( "input, button" ) ? this.element.is( ":disabled" ) : this.element.hasClass( "ui-button-disabled" ); + + if ( isDisabled !== this.options.disabled ) { + this._setOption( "disabled", isDisabled ); + } + if ( this.type === "radio" ) { + radioGroup( this.element[0] ).each(function() { + if ( $( this ).is( ":checked" ) ) { + $( this ).button( "widget" ) + .addClass( "ui-state-active" ) + .attr( "aria-pressed", "true" ); + } else { + $( this ).button( "widget" ) + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + } + }); + } else if ( this.type === "checkbox" ) { + if ( this.element.is( ":checked" ) ) { + this.buttonElement + .addClass( "ui-state-active" ) + .attr( "aria-pressed", "true" ); + } else { + this.buttonElement + .removeClass( "ui-state-active" ) + .attr( "aria-pressed", "false" ); + } + } + }, + + _resetButton: function() { + if ( this.type === "input" ) { + if ( this.options.label ) { + this.element.val( this.options.label ); + } + return; + } + var buttonElement = this.buttonElement.removeClass( typeClasses ), + buttonText = $( "<span></span>", this.document[0] ) + .addClass( "ui-button-text" ) + .html( this.options.label ) + .appendTo( buttonElement.empty() ) + .text(), + icons = this.options.icons, + multipleIcons = icons.primary && icons.secondary, + buttonClasses = []; + + if ( icons.primary || icons.secondary ) { + if ( this.options.text ) { + buttonClasses.push( "ui-button-text-icon" + ( multipleIcons ? "s" : ( icons.primary ? "-primary" : "-secondary" ) ) ); + } + + if ( icons.primary ) { + buttonElement.prepend( "<span class='ui-button-icon-primary ui-icon " + icons.primary + "'></span>" ); + } + + if ( icons.secondary ) { + buttonElement.append( "<span class='ui-button-icon-secondary ui-icon " + icons.secondary + "'></span>" ); + } + + if ( !this.options.text ) { + buttonClasses.push( multipleIcons ? "ui-button-icons-only" : "ui-button-icon-only" ); + + if ( !this.hasTitle ) { + buttonElement.attr( "title", $.trim( buttonText ) ); + } + } + } else { + buttonClasses.push( "ui-button-text-only" ); + } + buttonElement.addClass( buttonClasses.join( " " ) ); + } +}); + +$.widget( "ui.buttonset", { + version: "1.11.4", + options: { + items: "button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)" + }, + + _create: function() { + this.element.addClass( "ui-buttonset" ); + }, + + _init: function() { + this.refresh(); + }, + + _setOption: function( key, value ) { + if ( key === "disabled" ) { + this.buttons.button( "option", key, value ); + } + + this._super( key, value ); + }, + + refresh: function() { + var rtl = this.element.css( "direction" ) === "rtl", + allButtons = this.element.find( this.options.items ), + existingButtons = allButtons.filter( ":ui-button" ); + + // Initialize new buttons + allButtons.not( ":ui-button" ).button(); + + // Refresh existing buttons + existingButtons.button( "refresh" ); + + this.buttons = allButtons + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-corner-all ui-corner-left ui-corner-right" ) + .filter( ":first" ) + .addClass( rtl ? "ui-corner-right" : "ui-corner-left" ) + .end() + .filter( ":last" ) + .addClass( rtl ? "ui-corner-left" : "ui-corner-right" ) + .end() + .end(); + }, + + _destroy: function() { + this.element.removeClass( "ui-buttonset" ); + this.buttons + .map(function() { + return $( this ).button( "widget" )[ 0 ]; + }) + .removeClass( "ui-corner-left ui-corner-right" ) + .end() + .button( "destroy" ); + } +}); + +var button = $.ui.button; + + +/*! + * jQuery UI Datepicker 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/datepicker/ + */ + + +$.extend($.ui, { datepicker: { version: "1.11.4" } }); + +var datepicker_instActive; + +function datepicker_getZindex( elem ) { + var position, value; + while ( elem.length && elem[ 0 ] !== document ) { + // Ignore z-index if position is set to a value where z-index is ignored by the browser + // This makes behavior of this function consistent across browsers + // WebKit always returns auto if the element is positioned + position = elem.css( "position" ); + if ( position === "absolute" || position === "relative" || position === "fixed" ) { + // IE returns 0 when zIndex is not specified + // other browsers return a string + // we ignore the case of nested elements with an explicit value of 0 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div> + value = parseInt( elem.css( "zIndex" ), 10 ); + if ( !isNaN( value ) && value !== 0 ) { + return value; + } + } + elem = elem.parent(); + } + + return 0; +} +/* Date picker manager. + Use the singleton instance of this class, $.datepicker, to interact with the date picker. + Settings for (groups of) date pickers are maintained in an instance object, + allowing multiple different settings on the same page. */ + +function Datepicker() { + this._curInst = null; // The current instance in use + this._keyEvent = false; // If the last event was a key event + this._disabledInputs = []; // List of date picker inputs that have been disabled + this._datepickerShowing = false; // True if the popup picker is showing , false if not + this._inDialog = false; // True if showing within a "dialog", false if not + this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division + this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class + this._appendClass = "ui-datepicker-append"; // The name of the append marker class + this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class + this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class + this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class + this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class + this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class + this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class + this.regional = []; // Available regional settings, indexed by language code + this.regional[""] = { // Default regional settings + closeText: "Done", // Display text for close link + prevText: "Prev", // Display text for previous month link + nextText: "Next", // Display text for next month link + currentText: "Today", // Display text for current month link + monthNames: ["January","February","March","April","May","June", + "July","August","September","October","November","December"], // Names of months for drop-down and formatting + monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting + dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting + dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting + dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday + weekHeader: "Wk", // Column header for week of the year + dateFormat: "mm/dd/yy", // See format options on parseDate + firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ... + isRTL: false, // True if right-to-left language, false if left-to-right + showMonthAfterYear: false, // True if the year select precedes month, false for month then year + yearSuffix: "" // Additional text to append to the year in the month headers + }; + this._defaults = { // Global defaults for all the date picker instances + showOn: "focus", // "focus" for popup on focus, + // "button" for trigger button, or "both" for either + showAnim: "fadeIn", // Name of jQuery animation for popup + showOptions: {}, // Options for enhanced animations + defaultDate: null, // Used when field is blank: actual date, + // +/-number for offset from today, null for today + appendText: "", // Display text following the input box, e.g. showing the format + buttonText: "...", // Text for trigger button + buttonImage: "", // URL for trigger button image + buttonImageOnly: false, // True if the image appears alone, false if it appears on a button + hideIfNoPrevNext: false, // True to hide next/previous month links + // if not applicable, false to just disable them + navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links + gotoCurrent: false, // True if today link goes back to current selection instead + changeMonth: false, // True if month can be selected directly, false if only prev/next + changeYear: false, // True if year can be selected directly, false if only prev/next + yearRange: "c-10:c+10", // Range of years to display in drop-down, + // either relative to today's year (-nn:+nn), relative to currently displayed year + // (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n) + showOtherMonths: false, // True to show dates in other months, false to leave blank + selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable + showWeek: false, // True to show week of the year, false to not show it + calculateWeek: this.iso8601Week, // How to calculate the week of the year, + // takes a Date and returns the number of the week for it + shortYearCutoff: "+10", // Short year values < this are in the current century, + // > this are in the previous century, + // string value starting with "+" for current year + value + minDate: null, // The earliest selectable date, or null for no limit + maxDate: null, // The latest selectable date, or null for no limit + duration: "fast", // Duration of display/closure + beforeShowDay: null, // Function that takes a date and returns an array with + // [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "", + // [2] = cell title (optional), e.g. $.datepicker.noWeekends + beforeShow: null, // Function that takes an input field and + // returns a set of custom settings for the date picker + onSelect: null, // Define a callback function when a date is selected + onChangeMonthYear: null, // Define a callback function when the month or year is changed + onClose: null, // Define a callback function when the datepicker is closed + numberOfMonths: 1, // Number of months to show at a time + showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0) + stepMonths: 1, // Number of months to step back/forward + stepBigMonths: 12, // Number of months to step back/forward for the big links + altField: "", // Selector for an alternate field to store selected dates into + altFormat: "", // The date format to use for the alternate field + constrainInput: true, // The input is constrained by the current date format + showButtonPanel: false, // True to show button panel, false to not show it + autoSize: false, // True to size the input for the date format, false to leave as is + disabled: false // The initial disabled state + }; + $.extend(this._defaults, this.regional[""]); + this.regional.en = $.extend( true, {}, this.regional[ "" ]); + this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en ); + this.dpDiv = datepicker_bindHover($("<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")); +} + +$.extend(Datepicker.prototype, { + /* Class name added to elements to indicate already configured with a date picker. */ + markerClassName: "hasDatepicker", + + //Keep track of the maximum number of rows displayed (see #7043) + maxRows: 4, + + // TODO rename to "widget" when switching to widget factory + _widgetDatepicker: function() { + return this.dpDiv; + }, + + /* Override the default settings for all instances of the date picker. + * @param settings object - the new settings to use as defaults (anonymous object) + * @return the manager object + */ + setDefaults: function(settings) { + datepicker_extendRemove(this._defaults, settings || {}); + return this; + }, + + /* Attach the date picker to a jQuery selection. + * @param target element - the target input field or division or span + * @param settings object - the new settings to use for this date picker instance (anonymous) + */ + _attachDatepicker: function(target, settings) { + var nodeName, inline, inst; + nodeName = target.nodeName.toLowerCase(); + inline = (nodeName === "div" || nodeName === "span"); + if (!target.id) { + this.uuid += 1; + target.id = "dp" + this.uuid; + } + inst = this._newInst($(target), inline); + inst.settings = $.extend({}, settings || {}); + if (nodeName === "input") { + this._connectDatepicker(target, inst); + } else if (inline) { + this._inlineDatepicker(target, inst); + } + }, + + /* Create a new instance object. */ + _newInst: function(target, inline) { + var id = target[0].id.replace(/([^A-Za-z0-9_\-])/g, "\\\\$1"); // escape jQuery meta chars + return {id: id, input: target, // associated target + selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection + drawMonth: 0, drawYear: 0, // month being drawn + inline: inline, // is datepicker inline or not + dpDiv: (!inline ? this.dpDiv : // presentation div + datepicker_bindHover($("<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")))}; + }, + + /* Attach the date picker to an input field. */ + _connectDatepicker: function(target, inst) { + var input = $(target); + inst.append = $([]); + inst.trigger = $([]); + if (input.hasClass(this.markerClassName)) { + return; + } + this._attachments(input, inst); + input.addClass(this.markerClassName).keydown(this._doKeyDown). + keypress(this._doKeyPress).keyup(this._doKeyUp); + this._autoSize(inst); + $.data(target, "datepicker", inst); + //If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + }, + + /* Make attachments based on settings. */ + _attachments: function(input, inst) { + var showOn, buttonText, buttonImage, + appendText = this._get(inst, "appendText"), + isRTL = this._get(inst, "isRTL"); + + if (inst.append) { + inst.append.remove(); + } + if (appendText) { + inst.append = $("<span class='" + this._appendClass + "'>" + appendText + "</span>"); + input[isRTL ? "before" : "after"](inst.append); + } + + input.unbind("focus", this._showDatepicker); + + if (inst.trigger) { + inst.trigger.remove(); + } + + showOn = this._get(inst, "showOn"); + if (showOn === "focus" || showOn === "both") { // pop-up date picker when in the marked field + input.focus(this._showDatepicker); + } + if (showOn === "button" || showOn === "both") { // pop-up date picker when button clicked + buttonText = this._get(inst, "buttonText"); + buttonImage = this._get(inst, "buttonImage"); + inst.trigger = $(this._get(inst, "buttonImageOnly") ? + $("<img/>").addClass(this._triggerClass). + attr({ src: buttonImage, alt: buttonText, title: buttonText }) : + $("<button type='button'></button>").addClass(this._triggerClass). + html(!buttonImage ? buttonText : $("<img/>").attr( + { src:buttonImage, alt:buttonText, title:buttonText }))); + input[isRTL ? "before" : "after"](inst.trigger); + inst.trigger.click(function() { + if ($.datepicker._datepickerShowing && $.datepicker._lastInput === input[0]) { + $.datepicker._hideDatepicker(); + } else if ($.datepicker._datepickerShowing && $.datepicker._lastInput !== input[0]) { + $.datepicker._hideDatepicker(); + $.datepicker._showDatepicker(input[0]); + } else { + $.datepicker._showDatepicker(input[0]); + } + return false; + }); + } + }, + + /* Apply the maximum length for the date format. */ + _autoSize: function(inst) { + if (this._get(inst, "autoSize") && !inst.inline) { + var findMax, max, maxI, i, + date = new Date(2009, 12 - 1, 20), // Ensure double digits + dateFormat = this._get(inst, "dateFormat"); + + if (dateFormat.match(/[DM]/)) { + findMax = function(names) { + max = 0; + maxI = 0; + for (i = 0; i < names.length; i++) { + if (names[i].length > max) { + max = names[i].length; + maxI = i; + } + } + return maxI; + }; + date.setMonth(findMax(this._get(inst, (dateFormat.match(/MM/) ? + "monthNames" : "monthNamesShort")))); + date.setDate(findMax(this._get(inst, (dateFormat.match(/DD/) ? + "dayNames" : "dayNamesShort"))) + 20 - date.getDay()); + } + inst.input.attr("size", this._formatDate(inst, date).length); + } + }, + + /* Attach an inline date picker to a div. */ + _inlineDatepicker: function(target, inst) { + var divSpan = $(target); + if (divSpan.hasClass(this.markerClassName)) { + return; + } + divSpan.addClass(this.markerClassName).append(inst.dpDiv); + $.data(target, "datepicker", inst); + this._setDate(inst, this._getDefaultDate(inst), true); + this._updateDatepicker(inst); + this._updateAlternate(inst); + //If disabled option is true, disable the datepicker before showing it (see ticket #5665) + if( inst.settings.disabled ) { + this._disableDatepicker( target ); + } + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); + }, + + /* Pop-up the date picker in a "dialog" box. + * @param input element - ignored + * @param date string or Date - the initial date to display + * @param onSelect function - the function to call when a date is selected + * @param settings object - update the dialog date picker instance's settings (anonymous object) + * @param pos int[2] - coordinates for the dialog's position within the screen or + * event - with x/y coordinates or + * leave empty for default (screen centre) + * @return the manager object + */ + _dialogDatepicker: function(input, date, onSelect, settings, pos) { + var id, browserWidth, browserHeight, scrollX, scrollY, + inst = this._dialogInst; // internal instance + + if (!inst) { + this.uuid += 1; + id = "dp" + this.uuid; + this._dialogInput = $("<input type='text' id='" + id + + "' style='position: absolute; top: -100px; width: 0px;'/>"); + this._dialogInput.keydown(this._doKeyDown); + $("body").append(this._dialogInput); + inst = this._dialogInst = this._newInst(this._dialogInput, false); + inst.settings = {}; + $.data(this._dialogInput[0], "datepicker", inst); + } + datepicker_extendRemove(inst.settings, settings || {}); + date = (date && date.constructor === Date ? this._formatDate(inst, date) : date); + this._dialogInput.val(date); + + this._pos = (pos ? (pos.length ? pos : [pos.pageX, pos.pageY]) : null); + if (!this._pos) { + browserWidth = document.documentElement.clientWidth; + browserHeight = document.documentElement.clientHeight; + scrollX = document.documentElement.scrollLeft || document.body.scrollLeft; + scrollY = document.documentElement.scrollTop || document.body.scrollTop; + this._pos = // should use actual width/height below + [(browserWidth / 2) - 100 + scrollX, (browserHeight / 2) - 150 + scrollY]; + } + + // move input on screen for focus, but hidden behind dialog + this._dialogInput.css("left", (this._pos[0] + 20) + "px").css("top", this._pos[1] + "px"); + inst.settings.onSelect = onSelect; + this._inDialog = true; + this.dpDiv.addClass(this._dialogClass); + this._showDatepicker(this._dialogInput[0]); + if ($.blockUI) { + $.blockUI(this.dpDiv); + } + $.data(this._dialogInput[0], "datepicker", inst); + return this; + }, + + /* Detach a datepicker from its control. + * @param target element - the target input field or division or span + */ + _destroyDatepicker: function(target) { + var nodeName, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + $.removeData(target, "datepicker"); + if (nodeName === "input") { + inst.append.remove(); + inst.trigger.remove(); + $target.removeClass(this.markerClassName). + unbind("focus", this._showDatepicker). + unbind("keydown", this._doKeyDown). + unbind("keypress", this._doKeyPress). + unbind("keyup", this._doKeyUp); + } else if (nodeName === "div" || nodeName === "span") { + $target.removeClass(this.markerClassName).empty(); + } + + if ( datepicker_instActive === inst ) { + datepicker_instActive = null; + } + }, + + /* Enable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _enableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = false; + inst.trigger.filter("button"). + each(function() { this.disabled = false; }).end(). + filter("img").css({opacity: "1.0", cursor: ""}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().removeClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", false); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + }, + + /* Disable the date picker to a jQuery selection. + * @param target element - the target input field or division or span + */ + _disableDatepicker: function(target) { + var nodeName, inline, + $target = $(target), + inst = $.data(target, "datepicker"); + + if (!$target.hasClass(this.markerClassName)) { + return; + } + + nodeName = target.nodeName.toLowerCase(); + if (nodeName === "input") { + target.disabled = true; + inst.trigger.filter("button"). + each(function() { this.disabled = true; }).end(). + filter("img").css({opacity: "0.5", cursor: "default"}); + } else if (nodeName === "div" || nodeName === "span") { + inline = $target.children("." + this._inlineClass); + inline.children().addClass("ui-state-disabled"); + inline.find("select.ui-datepicker-month, select.ui-datepicker-year"). + prop("disabled", true); + } + this._disabledInputs = $.map(this._disabledInputs, + function(value) { return (value === target ? null : value); }); // delete entry + this._disabledInputs[this._disabledInputs.length] = target; + }, + + /* Is the first field in a jQuery collection disabled as a datepicker? + * @param target element - the target input field or division or span + * @return boolean - true if disabled, false if enabled + */ + _isDisabledDatepicker: function(target) { + if (!target) { + return false; + } + for (var i = 0; i < this._disabledInputs.length; i++) { + if (this._disabledInputs[i] === target) { + return true; + } + } + return false; + }, + + /* Retrieve the instance data for the target control. + * @param target element - the target input field or division or span + * @return object - the associated instance data + * @throws error if a jQuery problem getting data + */ + _getInst: function(target) { + try { + return $.data(target, "datepicker"); + } + catch (err) { + throw "Missing instance data for this datepicker"; + } + }, + + /* Update or retrieve the settings for a date picker attached to an input field or division. + * @param target element - the target input field or division or span + * @param name object - the new settings to update or + * string - the name of the setting to change or retrieve, + * when retrieving also "all" for all instance settings or + * "defaults" for all global defaults + * @param value any - the new value for the setting + * (omit if above is an object or to retrieve a value) + */ + _optionDatepicker: function(target, name, value) { + var settings, date, minDate, maxDate, + inst = this._getInst(target); + + if (arguments.length === 2 && typeof name === "string") { + return (name === "defaults" ? $.extend({}, $.datepicker._defaults) : + (inst ? (name === "all" ? $.extend({}, inst.settings) : + this._get(inst, name)) : null)); + } + + settings = name || {}; + if (typeof name === "string") { + settings = {}; + settings[name] = value; + } + + if (inst) { + if (this._curInst === inst) { + this._hideDatepicker(); + } + + date = this._getDateDatepicker(target, true); + minDate = this._getMinMaxDate(inst, "min"); + maxDate = this._getMinMaxDate(inst, "max"); + datepicker_extendRemove(inst.settings, settings); + // reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided + if (minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined) { + inst.settings.minDate = this._formatDate(inst, minDate); + } + if (maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined) { + inst.settings.maxDate = this._formatDate(inst, maxDate); + } + if ( "disabled" in settings ) { + if ( settings.disabled ) { + this._disableDatepicker(target); + } else { + this._enableDatepicker(target); + } + } + this._attachments($(target), inst); + this._autoSize(inst); + this._setDate(inst, date); + this._updateAlternate(inst); + this._updateDatepicker(inst); + } + }, + + // change method deprecated + _changeDatepicker: function(target, name, value) { + this._optionDatepicker(target, name, value); + }, + + /* Redraw the date picker attached to an input field or division. + * @param target element - the target input field or division or span + */ + _refreshDatepicker: function(target) { + var inst = this._getInst(target); + if (inst) { + this._updateDatepicker(inst); + } + }, + + /* Set the dates for a jQuery selection. + * @param target element - the target input field or division or span + * @param date Date - the new date + */ + _setDateDatepicker: function(target, date) { + var inst = this._getInst(target); + if (inst) { + this._setDate(inst, date); + this._updateDatepicker(inst); + this._updateAlternate(inst); + } + }, + + /* Get the date(s) for the first entry in a jQuery selection. + * @param target element - the target input field or division or span + * @param noDefault boolean - true if no default date is to be used + * @return Date - the current date + */ + _getDateDatepicker: function(target, noDefault) { + var inst = this._getInst(target); + if (inst && !inst.inline) { + this._setDateFromField(inst, noDefault); + } + return (inst ? this._getDate(inst) : null); + }, + + /* Handle keystrokes. */ + _doKeyDown: function(event) { + var onSelect, dateStr, sel, + inst = $.datepicker._getInst(event.target), + handled = true, + isRTL = inst.dpDiv.is(".ui-datepicker-rtl"); + + inst._keyEvent = true; + if ($.datepicker._datepickerShowing) { + switch (event.keyCode) { + case 9: $.datepicker._hideDatepicker(); + handled = false; + break; // hide on tab out + case 13: sel = $("td." + $.datepicker._dayOverClass + ":not(." + + $.datepicker._currentClass + ")", inst.dpDiv); + if (sel[0]) { + $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); + } + + onSelect = $.datepicker._get(inst, "onSelect"); + if (onSelect) { + dateStr = $.datepicker._formatDate(inst); + + // trigger custom callback + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); + } else { + $.datepicker._hideDatepicker(); + } + + return false; // don't submit the form + case 27: $.datepicker._hideDatepicker(); + break; // hide on escape + case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + break; // previous month/year on page up/+ ctrl + case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + break; // next month/year on page down/+ ctrl + case 35: if (event.ctrlKey || event.metaKey) { + $.datepicker._clearDate(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // clear on ctrl or command +end + case 36: if (event.ctrlKey || event.metaKey) { + $.datepicker._gotoToday(event.target); + } + handled = event.ctrlKey || event.metaKey; + break; // current on ctrl or command +home + case 37: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // -1 day on ctrl or command +left + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + -$.datepicker._get(inst, "stepBigMonths") : + -$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +left on Mac + break; + case 38: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, -7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // -1 week on ctrl or command +up + case 39: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), "D"); + } + handled = event.ctrlKey || event.metaKey; + // +1 day on ctrl or command +right + if (event.originalEvent.altKey) { + $.datepicker._adjustDate(event.target, (event.ctrlKey ? + +$.datepicker._get(inst, "stepBigMonths") : + +$.datepicker._get(inst, "stepMonths")), "M"); + } + // next month/year on alt +right + break; + case 40: if (event.ctrlKey || event.metaKey) { + $.datepicker._adjustDate(event.target, +7, "D"); + } + handled = event.ctrlKey || event.metaKey; + break; // +1 week on ctrl or command +down + default: handled = false; + } + } else if (event.keyCode === 36 && event.ctrlKey) { // display the date picker on ctrl+home + $.datepicker._showDatepicker(this); + } else { + handled = false; + } + + if (handled) { + event.preventDefault(); + event.stopPropagation(); + } + }, + + /* Filter entered characters - based on date format. */ + _doKeyPress: function(event) { + var chars, chr, + inst = $.datepicker._getInst(event.target); + + if ($.datepicker._get(inst, "constrainInput")) { + chars = $.datepicker._possibleChars($.datepicker._get(inst, "dateFormat")); + chr = String.fromCharCode(event.charCode == null ? event.keyCode : event.charCode); + return event.ctrlKey || event.metaKey || (chr < " " || !chars || chars.indexOf(chr) > -1); + } + }, + + /* Synchronise manual entry and field/alternate field. */ + _doKeyUp: function(event) { + var date, + inst = $.datepicker._getInst(event.target); + + if (inst.input.val() !== inst.lastVal) { + try { + date = $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + (inst.input ? inst.input.val() : null), + $.datepicker._getFormatConfig(inst)); + + if (date) { // only if valid + $.datepicker._setDateFromField(inst); + $.datepicker._updateAlternate(inst); + $.datepicker._updateDatepicker(inst); + } + } + catch (err) { + } + } + return true; + }, + + /* Pop-up the date picker for a given input field. + * If false returned from beforeShow event handler do not show. + * @param input element - the input field attached to the date picker or + * event - if triggered by focus + */ + _showDatepicker: function(input) { + input = input.target || input; + if (input.nodeName.toLowerCase() !== "input") { // find from button/image trigger + input = $("input", input.parentNode)[0]; + } + + if ($.datepicker._isDisabledDatepicker(input) || $.datepicker._lastInput === input) { // already here + return; + } + + var inst, beforeShow, beforeShowSettings, isFixed, + offset, showAnim, duration; + + inst = $.datepicker._getInst(input); + if ($.datepicker._curInst && $.datepicker._curInst !== inst) { + $.datepicker._curInst.dpDiv.stop(true, true); + if ( inst && $.datepicker._datepickerShowing ) { + $.datepicker._hideDatepicker( $.datepicker._curInst.input[0] ); + } + } + + beforeShow = $.datepicker._get(inst, "beforeShow"); + beforeShowSettings = beforeShow ? beforeShow.apply(input, [input, inst]) : {}; + if(beforeShowSettings === false){ + return; + } + datepicker_extendRemove(inst.settings, beforeShowSettings); + + inst.lastVal = null; + $.datepicker._lastInput = input; + $.datepicker._setDateFromField(inst); + + if ($.datepicker._inDialog) { // hide cursor + input.value = ""; + } + if (!$.datepicker._pos) { // position below input + $.datepicker._pos = $.datepicker._findPos(input); + $.datepicker._pos[1] += input.offsetHeight; // add the height + } + + isFixed = false; + $(input).parents().each(function() { + isFixed |= $(this).css("position") === "fixed"; + return !isFixed; + }); + + offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; + $.datepicker._pos = null; + //to avoid flashes on Firefox + inst.dpDiv.empty(); + // determine sizing offscreen + inst.dpDiv.css({position: "absolute", display: "block", top: "-1000px"}); + $.datepicker._updateDatepicker(inst); + // fix width for dynamic number of date pickers + // and adjust position before showing + offset = $.datepicker._checkOffset(inst, offset, isFixed); + inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? + "static" : (isFixed ? "fixed" : "absolute")), display: "none", + left: offset.left + "px", top: offset.top + "px"}); + + if (!inst.inline) { + showAnim = $.datepicker._get(inst, "showAnim"); + duration = $.datepicker._get(inst, "duration"); + inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 ); + $.datepicker._datepickerShowing = true; + + if ( $.effects && $.effects.effect[ showAnim ] ) { + inst.dpDiv.show(showAnim, $.datepicker._get(inst, "showOptions"), duration); + } else { + inst.dpDiv[showAnim || "show"](showAnim ? duration : null); + } + + if ( $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + $.datepicker._curInst = inst; + } + }, + + /* Generate the date picker content. */ + _updateDatepicker: function(inst) { + this.maxRows = 4; //Reset the max number of rows being displayed (see #7043) + datepicker_instActive = inst; // for delegate hover events + inst.dpDiv.empty().append(this._generateHTML(inst)); + this._attachHandlers(inst); + + var origyearshtml, + numMonths = this._getNumberOfMonths(inst), + cols = numMonths[1], + width = 17, + activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" ); + + if ( activeCell.length > 0 ) { + datepicker_handleMouseover.apply( activeCell.get( 0 ) ); + } + + inst.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""); + if (cols > 1) { + inst.dpDiv.addClass("ui-datepicker-multi-" + cols).css("width", (width * cols) + "em"); + } + inst.dpDiv[(numMonths[0] !== 1 || numMonths[1] !== 1 ? "add" : "remove") + + "Class"]("ui-datepicker-multi"); + inst.dpDiv[(this._get(inst, "isRTL") ? "add" : "remove") + + "Class"]("ui-datepicker-rtl"); + + if (inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) { + inst.input.focus(); + } + + // deffered render of the years select (to avoid flashes on Firefox) + if( inst.yearshtml ){ + origyearshtml = inst.yearshtml; + setTimeout(function(){ + //assure that inst.yearshtml didn't change. + if( origyearshtml === inst.yearshtml && inst.yearshtml ){ + inst.dpDiv.find("select.ui-datepicker-year:first").replaceWith(inst.yearshtml); + } + origyearshtml = inst.yearshtml = null; + }, 0); + } + }, + + // #6694 - don't focus the input if it's already focused + // this breaks the change event in IE + // Support: IE and jQuery <1.9 + _shouldFocusInput: function( inst ) { + return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" ); + }, + + /* Check positioning to remain on screen. */ + _checkOffset: function(inst, offset, isFixed) { + var dpWidth = inst.dpDiv.outerWidth(), + dpHeight = inst.dpDiv.outerHeight(), + inputWidth = inst.input ? inst.input.outerWidth() : 0, + inputHeight = inst.input ? inst.input.outerHeight() : 0, + viewWidth = document.documentElement.clientWidth + (isFixed ? 0 : $(document).scrollLeft()), + viewHeight = document.documentElement.clientHeight + (isFixed ? 0 : $(document).scrollTop()); + + offset.left -= (this._get(inst, "isRTL") ? (dpWidth - inputWidth) : 0); + offset.left -= (isFixed && offset.left === inst.input.offset().left) ? $(document).scrollLeft() : 0; + offset.top -= (isFixed && offset.top === (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0; + + // now check if datepicker is showing outside window viewport - move to a better place if so. + offset.left -= Math.min(offset.left, (offset.left + dpWidth > viewWidth && viewWidth > dpWidth) ? + Math.abs(offset.left + dpWidth - viewWidth) : 0); + offset.top -= Math.min(offset.top, (offset.top + dpHeight > viewHeight && viewHeight > dpHeight) ? + Math.abs(dpHeight + inputHeight) : 0); + + return offset; + }, + + /* Find an object's position on the screen. */ + _findPos: function(obj) { + var position, + inst = this._getInst(obj), + isRTL = this._get(inst, "isRTL"); + + while (obj && (obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden(obj))) { + obj = obj[isRTL ? "previousSibling" : "nextSibling"]; + } + + position = $(obj).offset(); + return [position.left, position.top]; + }, + + /* Hide the date picker from view. + * @param input element - the input field attached to the date picker + */ + _hideDatepicker: function(input) { + var showAnim, duration, postProcess, onClose, + inst = this._curInst; + + if (!inst || (input && inst !== $.data(input, "datepicker"))) { + return; + } + + if (this._datepickerShowing) { + showAnim = this._get(inst, "showAnim"); + duration = this._get(inst, "duration"); + postProcess = function() { + $.datepicker._tidyDialog(inst); + }; + + // DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed + if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) { + inst.dpDiv.hide(showAnim, $.datepicker._get(inst, "showOptions"), duration, postProcess); + } else { + inst.dpDiv[(showAnim === "slideDown" ? "slideUp" : + (showAnim === "fadeIn" ? "fadeOut" : "hide"))]((showAnim ? duration : null), postProcess); + } + + if (!showAnim) { + postProcess(); + } + this._datepickerShowing = false; + + onClose = this._get(inst, "onClose"); + if (onClose) { + onClose.apply((inst.input ? inst.input[0] : null), [(inst.input ? inst.input.val() : ""), inst]); + } + + this._lastInput = null; + if (this._inDialog) { + this._dialogInput.css({ position: "absolute", left: "0", top: "-100px" }); + if ($.blockUI) { + $.unblockUI(); + $("body").append(this.dpDiv); + } + } + this._inDialog = false; + } + }, + + /* Tidy up after a dialog display. */ + _tidyDialog: function(inst) { + inst.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar"); + }, + + /* Close date picker if clicked elsewhere. */ + _checkExternalClick: function(event) { + if (!$.datepicker._curInst) { + return; + } + + var $target = $(event.target), + inst = $.datepicker._getInst($target[0]); + + if ( ( ( $target[0].id !== $.datepicker._mainDivId && + $target.parents("#" + $.datepicker._mainDivId).length === 0 && + !$target.hasClass($.datepicker.markerClassName) && + !$target.closest("." + $.datepicker._triggerClass).length && + $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) || + ( $target.hasClass($.datepicker.markerClassName) && $.datepicker._curInst !== inst ) ) { + $.datepicker._hideDatepicker(); + } + }, + + /* Adjust one of the date sub-fields. */ + _adjustDate: function(id, offset, period) { + var target = $(id), + inst = this._getInst(target[0]); + + if (this._isDisabledDatepicker(target[0])) { + return; + } + this._adjustInstDate(inst, offset + + (period === "M" ? this._get(inst, "showCurrentAtPos") : 0), // undo positioning + period); + this._updateDatepicker(inst); + }, + + /* Action for current link. */ + _gotoToday: function(id) { + var date, + target = $(id), + inst = this._getInst(target[0]); + + if (this._get(inst, "gotoCurrent") && inst.currentDay) { + inst.selectedDay = inst.currentDay; + inst.drawMonth = inst.selectedMonth = inst.currentMonth; + inst.drawYear = inst.selectedYear = inst.currentYear; + } else { + date = new Date(); + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + } + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a new month/year. */ + _selectMonthYear: function(id, select, period) { + var target = $(id), + inst = this._getInst(target[0]); + + inst["selected" + (period === "M" ? "Month" : "Year")] = + inst["draw" + (period === "M" ? "Month" : "Year")] = + parseInt(select.options[select.selectedIndex].value,10); + + this._notifyChange(inst); + this._adjustDate(target); + }, + + /* Action for selecting a day. */ + _selectDay: function(id, month, year, td) { + var inst, + target = $(id); + + if ($(td).hasClass(this._unselectableClass) || this._isDisabledDatepicker(target[0])) { + return; + } + + inst = this._getInst(target[0]); + inst.selectedDay = inst.currentDay = $("a", td).html(); + inst.selectedMonth = inst.currentMonth = month; + inst.selectedYear = inst.currentYear = year; + this._selectDate(id, this._formatDate(inst, + inst.currentDay, inst.currentMonth, inst.currentYear)); + }, + + /* Erase the input field and hide the date picker. */ + _clearDate: function(id) { + var target = $(id); + this._selectDate(target, ""); + }, + + /* Update the input field with the selected date. */ + _selectDate: function(id, dateStr) { + var onSelect, + target = $(id), + inst = this._getInst(target[0]); + + dateStr = (dateStr != null ? dateStr : this._formatDate(inst)); + if (inst.input) { + inst.input.val(dateStr); + } + this._updateAlternate(inst); + + onSelect = this._get(inst, "onSelect"); + if (onSelect) { + onSelect.apply((inst.input ? inst.input[0] : null), [dateStr, inst]); // trigger custom callback + } else if (inst.input) { + inst.input.trigger("change"); // fire the change event + } + + if (inst.inline){ + this._updateDatepicker(inst); + } else { + this._hideDatepicker(); + this._lastInput = inst.input[0]; + if (typeof(inst.input[0]) !== "object") { + inst.input.focus(); // restore focus + } + this._lastInput = null; + } + }, + + /* Update any alternate field to synchronise with the main field. */ + _updateAlternate: function(inst) { + var altFormat, date, dateStr, + altField = this._get(inst, "altField"); + + if (altField) { // update alternate field too + altFormat = this._get(inst, "altFormat") || this._get(inst, "dateFormat"); + date = this._getDate(inst); + dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); + $(altField).each(function() { $(this).val(dateStr); }); + } + }, + + /* Set as beforeShowDay function to prevent selection of weekends. + * @param date Date - the date to customise + * @return [boolean, string] - is this date selectable?, what is its CSS class? + */ + noWeekends: function(date) { + var day = date.getDay(); + return [(day > 0 && day < 6), ""]; + }, + + /* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition. + * @param date Date - the date to get the week for + * @return number - the number of the week within the year that contains this date + */ + iso8601Week: function(date) { + var time, + checkDate = new Date(date.getTime()); + + // Find Thursday of this week starting on Monday + checkDate.setDate(checkDate.getDate() + 4 - (checkDate.getDay() || 7)); + + time = checkDate.getTime(); + checkDate.setMonth(0); // Compare with Jan 1 + checkDate.setDate(1); + return Math.floor(Math.round((time - checkDate) / 86400000) / 7) + 1; + }, + + /* Parse a string value into a date object. + * See formatDate below for the possible formats. + * + * @param format string - the expected format of the date + * @param value string - the date in the above format + * @param settings Object - attributes include: + * shortYearCutoff number - the cutoff year for determining the century (optional) + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return Date - the extracted date value or null if value is blank + */ + parseDate: function (format, value, settings) { + if (format == null || value == null) { + throw "Invalid arguments"; + } + + value = (typeof value === "object" ? value.toString() : value + ""); + if (value === "") { + return null; + } + + var iFormat, dim, extra, + iValue = 0, + shortYearCutoffTemp = (settings ? settings.shortYearCutoff : null) || this._defaults.shortYearCutoff, + shortYearCutoff = (typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp : + new Date().getFullYear() % 100 + parseInt(shortYearCutoffTemp, 10)), + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + year = -1, + month = -1, + day = -1, + doy = -1, + literal = false, + date, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Extract a number from the string value + getNumber = function(match) { + var isDoubled = lookAhead(match), + size = (match === "@" ? 14 : (match === "!" ? 20 : + (match === "y" && isDoubled ? 4 : (match === "o" ? 3 : 2)))), + minSize = (match === "y" ? size : 1), + digits = new RegExp("^\\d{" + minSize + "," + size + "}"), + num = value.substring(iValue).match(digits); + if (!num) { + throw "Missing number at position " + iValue; + } + iValue += num[0].length; + return parseInt(num[0], 10); + }, + // Extract a name from the string value and convert to an index + getName = function(match, shortNames, longNames) { + var index = -1, + names = $.map(lookAhead(match) ? longNames : shortNames, function (v, k) { + return [ [k, v] ]; + }).sort(function (a, b) { + return -(a[1].length - b[1].length); + }); + + $.each(names, function (i, pair) { + var name = pair[1]; + if (value.substr(iValue, name.length).toLowerCase() === name.toLowerCase()) { + index = pair[0]; + iValue += name.length; + return false; + } + }); + if (index !== -1) { + return index + 1; + } else { + throw "Unknown name at position " + iValue; + } + }, + // Confirm that a literal character matches the string value + checkLiteral = function() { + if (value.charAt(iValue) !== format.charAt(iFormat)) { + throw "Unexpected literal at position " + iValue; + } + iValue++; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + checkLiteral(); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + day = getNumber("d"); + break; + case "D": + getName("D", dayNamesShort, dayNames); + break; + case "o": + doy = getNumber("o"); + break; + case "m": + month = getNumber("m"); + break; + case "M": + month = getName("M", monthNamesShort, monthNames); + break; + case "y": + year = getNumber("y"); + break; + case "@": + date = new Date(getNumber("@")); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "!": + date = new Date((getNumber("!") - this._ticksTo1970) / 10000); + year = date.getFullYear(); + month = date.getMonth() + 1; + day = date.getDate(); + break; + case "'": + if (lookAhead("'")){ + checkLiteral(); + } else { + literal = true; + } + break; + default: + checkLiteral(); + } + } + } + + if (iValue < value.length){ + extra = value.substr(iValue); + if (!/^\s+/.test(extra)) { + throw "Extra/unparsed characters found in date: " + extra; + } + } + + if (year === -1) { + year = new Date().getFullYear(); + } else if (year < 100) { + year += new Date().getFullYear() - new Date().getFullYear() % 100 + + (year <= shortYearCutoff ? 0 : -100); + } + + if (doy > -1) { + month = 1; + day = doy; + do { + dim = this._getDaysInMonth(year, month - 1); + if (day <= dim) { + break; + } + month++; + day -= dim; + } while (true); + } + + date = this._daylightSavingAdjust(new Date(year, month - 1, day)); + if (date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day) { + throw "Invalid date"; // E.g. 31/02/00 + } + return date; + }, + + /* Standard date formats. */ + ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601) + COOKIE: "D, dd M yy", + ISO_8601: "yy-mm-dd", + RFC_822: "D, d M y", + RFC_850: "DD, dd-M-y", + RFC_1036: "D, d M y", + RFC_1123: "D, d M yy", + RFC_2822: "D, d M yy", + RSS: "D, d M y", // RFC 822 + TICKS: "!", + TIMESTAMP: "@", + W3C: "yy-mm-dd", // ISO 8601 + + _ticksTo1970: (((1970 - 1) * 365 + Math.floor(1970 / 4) - Math.floor(1970 / 100) + + Math.floor(1970 / 400)) * 24 * 60 * 60 * 10000000), + + /* Format a date object into a string value. + * The format can be combinations of the following: + * d - day of month (no leading zero) + * dd - day of month (two digit) + * o - day of year (no leading zeros) + * oo - day of year (three digit) + * D - day name short + * DD - day name long + * m - month of year (no leading zero) + * mm - month of year (two digit) + * M - month name short + * MM - month name long + * y - year (two digit) + * yy - year (four digit) + * @ - Unix timestamp (ms since 01/01/1970) + * ! - Windows ticks (100ns since 01/01/0001) + * "..." - literal text + * '' - single quote + * + * @param format string - the desired format of the date + * @param date Date - the date value to format + * @param settings Object - attributes include: + * dayNamesShort string[7] - abbreviated names of the days from Sunday (optional) + * dayNames string[7] - names of the days from Sunday (optional) + * monthNamesShort string[12] - abbreviated names of the months (optional) + * monthNames string[12] - names of the months (optional) + * @return string - the date in the above format + */ + formatDate: function (format, date, settings) { + if (!date) { + return ""; + } + + var iFormat, + dayNamesShort = (settings ? settings.dayNamesShort : null) || this._defaults.dayNamesShort, + dayNames = (settings ? settings.dayNames : null) || this._defaults.dayNames, + monthNamesShort = (settings ? settings.monthNamesShort : null) || this._defaults.monthNamesShort, + monthNames = (settings ? settings.monthNames : null) || this._defaults.monthNames, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }, + // Format a number, with leading zero if necessary + formatNumber = function(match, value, len) { + var num = "" + value; + if (lookAhead(match)) { + while (num.length < len) { + num = "0" + num; + } + } + return num; + }, + // Format a name, short or long as requested + formatName = function(match, value, shortNames, longNames) { + return (lookAhead(match) ? longNames[value] : shortNames[value]); + }, + output = "", + literal = false; + + if (date) { + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + output += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": + output += formatNumber("d", date.getDate(), 2); + break; + case "D": + output += formatName("D", date.getDay(), dayNamesShort, dayNames); + break; + case "o": + output += formatNumber("o", + Math.round((new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() - new Date(date.getFullYear(), 0, 0).getTime()) / 86400000), 3); + break; + case "m": + output += formatNumber("m", date.getMonth() + 1, 2); + break; + case "M": + output += formatName("M", date.getMonth(), monthNamesShort, monthNames); + break; + case "y": + output += (lookAhead("y") ? date.getFullYear() : + (date.getYear() % 100 < 10 ? "0" : "") + date.getYear() % 100); + break; + case "@": + output += date.getTime(); + break; + case "!": + output += date.getTime() * 10000 + this._ticksTo1970; + break; + case "'": + if (lookAhead("'")) { + output += "'"; + } else { + literal = true; + } + break; + default: + output += format.charAt(iFormat); + } + } + } + } + return output; + }, + + /* Extract all possible characters from the date format. */ + _possibleChars: function (format) { + var iFormat, + chars = "", + literal = false, + // Check whether a format character is doubled + lookAhead = function(match) { + var matches = (iFormat + 1 < format.length && format.charAt(iFormat + 1) === match); + if (matches) { + iFormat++; + } + return matches; + }; + + for (iFormat = 0; iFormat < format.length; iFormat++) { + if (literal) { + if (format.charAt(iFormat) === "'" && !lookAhead("'")) { + literal = false; + } else { + chars += format.charAt(iFormat); + } + } else { + switch (format.charAt(iFormat)) { + case "d": case "m": case "y": case "@": + chars += "0123456789"; + break; + case "D": case "M": + return null; // Accept anything + case "'": + if (lookAhead("'")) { + chars += "'"; + } else { + literal = true; + } + break; + default: + chars += format.charAt(iFormat); + } + } + } + return chars; + }, + + /* Get a setting value, defaulting if necessary. */ + _get: function(inst, name) { + return inst.settings[name] !== undefined ? + inst.settings[name] : this._defaults[name]; + }, + + /* Parse existing date and initialise date picker. */ + _setDateFromField: function(inst, noDefault) { + if (inst.input.val() === inst.lastVal) { + return; + } + + var dateFormat = this._get(inst, "dateFormat"), + dates = inst.lastVal = inst.input ? inst.input.val() : null, + defaultDate = this._getDefaultDate(inst), + date = defaultDate, + settings = this._getFormatConfig(inst); + + try { + date = this.parseDate(dateFormat, dates, settings) || defaultDate; + } catch (event) { + dates = (noDefault ? "" : dates); + } + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + inst.currentDay = (dates ? date.getDate() : 0); + inst.currentMonth = (dates ? date.getMonth() : 0); + inst.currentYear = (dates ? date.getFullYear() : 0); + this._adjustInstDate(inst); + }, + + /* Retrieve the default date shown on opening. */ + _getDefaultDate: function(inst) { + return this._restrictMinMax(inst, + this._determineDate(inst, this._get(inst, "defaultDate"), new Date())); + }, + + /* A date may be specified as an exact value or a relative one. */ + _determineDate: function(inst, date, defaultDate) { + var offsetNumeric = function(offset) { + var date = new Date(); + date.setDate(date.getDate() + offset); + return date; + }, + offsetString = function(offset) { + try { + return $.datepicker.parseDate($.datepicker._get(inst, "dateFormat"), + offset, $.datepicker._getFormatConfig(inst)); + } + catch (e) { + // Ignore + } + + var date = (offset.toLowerCase().match(/^c/) ? + $.datepicker._getDate(inst) : null) || new Date(), + year = date.getFullYear(), + month = date.getMonth(), + day = date.getDate(), + pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, + matches = pattern.exec(offset); + + while (matches) { + switch (matches[2] || "d") { + case "d" : case "D" : + day += parseInt(matches[1],10); break; + case "w" : case "W" : + day += parseInt(matches[1],10) * 7; break; + case "m" : case "M" : + month += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + case "y": case "Y" : + year += parseInt(matches[1],10); + day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); + break; + } + matches = pattern.exec(offset); + } + return new Date(year, month, day); + }, + newDate = (date == null || date === "" ? defaultDate : (typeof date === "string" ? offsetString(date) : + (typeof date === "number" ? (isNaN(date) ? defaultDate : offsetNumeric(date)) : new Date(date.getTime())))); + + newDate = (newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate); + if (newDate) { + newDate.setHours(0); + newDate.setMinutes(0); + newDate.setSeconds(0); + newDate.setMilliseconds(0); + } + return this._daylightSavingAdjust(newDate); + }, + + /* Handle switch to/from daylight saving. + * Hours may be non-zero on daylight saving cut-over: + * > 12 when midnight changeover, but then cannot generate + * midnight datetime, so jump to 1AM, otherwise reset. + * @param date (Date) the date to check + * @return (Date) the corrected date + */ + _daylightSavingAdjust: function(date) { + if (!date) { + return null; + } + date.setHours(date.getHours() > 12 ? date.getHours() + 2 : 0); + return date; + }, + + /* Set the date(s) directly. */ + _setDate: function(inst, date, noChange) { + var clear = !date, + origMonth = inst.selectedMonth, + origYear = inst.selectedYear, + newDate = this._restrictMinMax(inst, this._determineDate(inst, date, new Date())); + + inst.selectedDay = inst.currentDay = newDate.getDate(); + inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth(); + inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear(); + if ((origMonth !== inst.selectedMonth || origYear !== inst.selectedYear) && !noChange) { + this._notifyChange(inst); + } + this._adjustInstDate(inst); + if (inst.input) { + inst.input.val(clear ? "" : this._formatDate(inst)); + } + }, + + /* Retrieve the date(s) directly. */ + _getDate: function(inst) { + var startDate = (!inst.currentYear || (inst.input && inst.input.val() === "") ? null : + this._daylightSavingAdjust(new Date( + inst.currentYear, inst.currentMonth, inst.currentDay))); + return startDate; + }, + + /* Attach the onxxx handlers. These are declared statically so + * they work with static code transformers like Caja. + */ + _attachHandlers: function(inst) { + var stepMonths = this._get(inst, "stepMonths"), + id = "#" + inst.id.replace( /\\\\/g, "\\" ); + inst.dpDiv.find("[data-handler]").map(function () { + var handler = { + prev: function () { + $.datepicker._adjustDate(id, -stepMonths, "M"); + }, + next: function () { + $.datepicker._adjustDate(id, +stepMonths, "M"); + }, + hide: function () { + $.datepicker._hideDatepicker(); + }, + today: function () { + $.datepicker._gotoToday(id); + }, + selectDay: function () { + $.datepicker._selectDay(id, +this.getAttribute("data-month"), +this.getAttribute("data-year"), this); + return false; + }, + selectMonth: function () { + $.datepicker._selectMonthYear(id, this, "M"); + return false; + }, + selectYear: function () { + $.datepicker._selectMonthYear(id, this, "Y"); + return false; + } + }; + $(this).bind(this.getAttribute("data-event"), handler[this.getAttribute("data-handler")]); + }); + }, + + /* Generate the HTML for the current state of the date picker. */ + _generateHTML: function(inst) { + var maxDraw, prevText, prev, nextText, next, currentText, gotoDate, + controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin, + monthNames, monthNamesShort, beforeShowDay, showOtherMonths, + selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate, + cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows, + printDate, dRow, tbody, daySettings, otherMonth, unselectable, + tempDate = new Date(), + today = this._daylightSavingAdjust( + new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate())), // clear time + isRTL = this._get(inst, "isRTL"), + showButtonPanel = this._get(inst, "showButtonPanel"), + hideIfNoPrevNext = this._get(inst, "hideIfNoPrevNext"), + navigationAsDateFormat = this._get(inst, "navigationAsDateFormat"), + numMonths = this._getNumberOfMonths(inst), + showCurrentAtPos = this._get(inst, "showCurrentAtPos"), + stepMonths = this._get(inst, "stepMonths"), + isMultiMonth = (numMonths[0] !== 1 || numMonths[1] !== 1), + currentDate = this._daylightSavingAdjust((!inst.currentDay ? new Date(9999, 9, 9) : + new Date(inst.currentYear, inst.currentMonth, inst.currentDay))), + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + drawMonth = inst.drawMonth - showCurrentAtPos, + drawYear = inst.drawYear; + + if (drawMonth < 0) { + drawMonth += 12; + drawYear--; + } + if (maxDate) { + maxDraw = this._daylightSavingAdjust(new Date(maxDate.getFullYear(), + maxDate.getMonth() - (numMonths[0] * numMonths[1]) + 1, maxDate.getDate())); + maxDraw = (minDate && maxDraw < minDate ? minDate : maxDraw); + while (this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1)) > maxDraw) { + drawMonth--; + if (drawMonth < 0) { + drawMonth = 11; + drawYear--; + } + } + } + inst.drawMonth = drawMonth; + inst.drawYear = drawYear; + + prevText = this._get(inst, "prevText"); + prevText = (!navigationAsDateFormat ? prevText : this.formatDate(prevText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth - stepMonths, 1)), + this._getFormatConfig(inst))); + + prev = (this._canAdjustMonth(inst, -1, drawYear, drawMonth) ? + "<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" + + " title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>" : + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+ prevText +"'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w") + "'>" + prevText + "</span></a>")); + + nextText = this._get(inst, "nextText"); + nextText = (!navigationAsDateFormat ? nextText : this.formatDate(nextText, + this._daylightSavingAdjust(new Date(drawYear, drawMonth + stepMonths, 1)), + this._getFormatConfig(inst))); + + next = (this._canAdjustMonth(inst, +1, drawYear, drawMonth) ? + "<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" + + " title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>" : + (hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+ nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e") + "'>" + nextText + "</span></a>")); + + currentText = this._get(inst, "currentText"); + gotoDate = (this._get(inst, "gotoCurrent") && inst.currentDay ? currentDate : today); + currentText = (!navigationAsDateFormat ? currentText : + this.formatDate(currentText, gotoDate, this._getFormatConfig(inst))); + + controls = (!inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" + + this._get(inst, "closeText") + "</button>" : ""); + + buttonPanel = (showButtonPanel) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + (isRTL ? controls : "") + + (this._isInRange(inst, gotoDate) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" + + ">" + currentText + "</button>" : "") + (isRTL ? "" : controls) + "</div>" : ""; + + firstDay = parseInt(this._get(inst, "firstDay"),10); + firstDay = (isNaN(firstDay) ? 0 : firstDay); + + showWeek = this._get(inst, "showWeek"); + dayNames = this._get(inst, "dayNames"); + dayNamesMin = this._get(inst, "dayNamesMin"); + monthNames = this._get(inst, "monthNames"); + monthNamesShort = this._get(inst, "monthNamesShort"); + beforeShowDay = this._get(inst, "beforeShowDay"); + showOtherMonths = this._get(inst, "showOtherMonths"); + selectOtherMonths = this._get(inst, "selectOtherMonths"); + defaultDate = this._getDefaultDate(inst); + html = ""; + dow; + for (row = 0; row < numMonths[0]; row++) { + group = ""; + this.maxRows = 4; + for (col = 0; col < numMonths[1]; col++) { + selectedDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, inst.selectedDay)); + cornerClass = " ui-corner-all"; + calender = ""; + if (isMultiMonth) { + calender += "<div class='ui-datepicker-group"; + if (numMonths[1] > 1) { + switch (col) { + case 0: calender += " ui-datepicker-group-first"; + cornerClass = " ui-corner-" + (isRTL ? "right" : "left"); break; + case numMonths[1]-1: calender += " ui-datepicker-group-last"; + cornerClass = " ui-corner-" + (isRTL ? "left" : "right"); break; + default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break; + } + } + calender += "'>"; + } + calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" + + (/all|left/.test(cornerClass) && row === 0 ? (isRTL ? next : prev) : "") + + (/all|right/.test(cornerClass) && row === 0 ? (isRTL ? prev : next) : "") + + this._generateMonthYearHeader(inst, drawMonth, drawYear, minDate, maxDate, + row > 0 || col > 0, monthNames, monthNamesShort) + // draw month headers + "</div><table class='ui-datepicker-calendar'><thead>" + + "<tr>"; + thead = (showWeek ? "<th class='ui-datepicker-week-col'>" + this._get(inst, "weekHeader") + "</th>" : ""); + for (dow = 0; dow < 7; dow++) { // days of the week + day = (dow + firstDay) % 7; + thead += "<th scope='col'" + ((dow + firstDay + 6) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "") + ">" + + "<span title='" + dayNames[day] + "'>" + dayNamesMin[day] + "</span></th>"; + } + calender += thead + "</tr></thead><tbody>"; + daysInMonth = this._getDaysInMonth(drawYear, drawMonth); + if (drawYear === inst.selectedYear && drawMonth === inst.selectedMonth) { + inst.selectedDay = Math.min(inst.selectedDay, daysInMonth); + } + leadDays = (this._getFirstDayOfMonth(drawYear, drawMonth) - firstDay + 7) % 7; + curRows = Math.ceil((leadDays + daysInMonth) / 7); // calculate the number of rows to generate + numRows = (isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows); //If multiple months, use the higher number of rows (see #7043) + this.maxRows = numRows; + printDate = this._daylightSavingAdjust(new Date(drawYear, drawMonth, 1 - leadDays)); + for (dRow = 0; dRow < numRows; dRow++) { // create date picker rows + calender += "<tr>"; + tbody = (!showWeek ? "" : "<td class='ui-datepicker-week-col'>" + + this._get(inst, "calculateWeek")(printDate) + "</td>"); + for (dow = 0; dow < 7; dow++) { // create date picker days + daySettings = (beforeShowDay ? + beforeShowDay.apply((inst.input ? inst.input[0] : null), [printDate]) : [true, ""]); + otherMonth = (printDate.getMonth() !== drawMonth); + unselectable = (otherMonth && !selectOtherMonths) || !daySettings[0] || + (minDate && printDate < minDate) || (maxDate && printDate > maxDate); + tbody += "<td class='" + + ((dow + firstDay + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + // highlight weekends + (otherMonth ? " ui-datepicker-other-month" : "") + // highlight days from other months + ((printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent) || // user pressed key + (defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime()) ? + // or defaultDate is current printedDate and defaultDate is selectedDate + " " + this._dayOverClass : "") + // highlight selected day + (unselectable ? " " + this._unselectableClass + " ui-state-disabled": "") + // highlight unselectable days + (otherMonth && !showOtherMonths ? "" : " " + daySettings[1] + // highlight custom dates + (printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "") + // highlight selected day + (printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "")) + "'" + // highlight today (if different) + ((!otherMonth || showOtherMonths) && daySettings[2] ? " title='" + daySettings[2].replace(/'/g, "'") + "'" : "") + // cell title + (unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'") + ">" + // actions + (otherMonth && !showOtherMonths ? " " : // display for other months + (unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" + + (printDate.getTime() === today.getTime() ? " ui-state-highlight" : "") + + (printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "") + // highlight selected day + (otherMonth ? " ui-priority-secondary" : "") + // distinguish dates from other months + "' href='#'>" + printDate.getDate() + "</a>")) + "</td>"; // display selectable date + printDate.setDate(printDate.getDate() + 1); + printDate = this._daylightSavingAdjust(printDate); + } + calender += tbody + "</tr>"; + } + drawMonth++; + if (drawMonth > 11) { + drawMonth = 0; + drawYear++; + } + calender += "</tbody></table>" + (isMultiMonth ? "</div>" + + ((numMonths[0] > 0 && col === numMonths[1]-1) ? "<div class='ui-datepicker-row-break'></div>" : "") : ""); + group += calender; + } + html += group; + } + html += buttonPanel; + inst._keyEvent = false; + return html; + }, + + /* Generate the month and year header. */ + _generateMonthYearHeader: function(inst, drawMonth, drawYear, minDate, maxDate, + secondary, monthNames, monthNamesShort) { + + var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear, + changeMonth = this._get(inst, "changeMonth"), + changeYear = this._get(inst, "changeYear"), + showMonthAfterYear = this._get(inst, "showMonthAfterYear"), + html = "<div class='ui-datepicker-title'>", + monthHtml = ""; + + // month selection + if (secondary || !changeMonth) { + monthHtml += "<span class='ui-datepicker-month'>" + monthNames[drawMonth] + "</span>"; + } else { + inMinYear = (minDate && minDate.getFullYear() === drawYear); + inMaxYear = (maxDate && maxDate.getFullYear() === drawYear); + monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>"; + for ( month = 0; month < 12; month++) { + if ((!inMinYear || month >= minDate.getMonth()) && (!inMaxYear || month <= maxDate.getMonth())) { + monthHtml += "<option value='" + month + "'" + + (month === drawMonth ? " selected='selected'" : "") + + ">" + monthNamesShort[month] + "</option>"; + } + } + monthHtml += "</select>"; + } + + if (!showMonthAfterYear) { + html += monthHtml + (secondary || !(changeMonth && changeYear) ? " " : ""); + } + + // year selection + if ( !inst.yearshtml ) { + inst.yearshtml = ""; + if (secondary || !changeYear) { + html += "<span class='ui-datepicker-year'>" + drawYear + "</span>"; + } else { + // determine range of years to display + years = this._get(inst, "yearRange").split(":"); + thisYear = new Date().getFullYear(); + determineYear = function(value) { + var year = (value.match(/c[+\-].*/) ? drawYear + parseInt(value.substring(1), 10) : + (value.match(/[+\-].*/) ? thisYear + parseInt(value, 10) : + parseInt(value, 10))); + return (isNaN(year) ? thisYear : year); + }; + year = determineYear(years[0]); + endYear = Math.max(year, determineYear(years[1] || "")); + year = (minDate ? Math.max(year, minDate.getFullYear()) : year); + endYear = (maxDate ? Math.min(endYear, maxDate.getFullYear()) : endYear); + inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>"; + for (; year <= endYear; year++) { + inst.yearshtml += "<option value='" + year + "'" + + (year === drawYear ? " selected='selected'" : "") + + ">" + year + "</option>"; + } + inst.yearshtml += "</select>"; + + html += inst.yearshtml; + inst.yearshtml = null; + } + } + + html += this._get(inst, "yearSuffix"); + if (showMonthAfterYear) { + html += (secondary || !(changeMonth && changeYear) ? " " : "") + monthHtml; + } + html += "</div>"; // Close datepicker_header + return html; + }, + + /* Adjust one of the date sub-fields. */ + _adjustInstDate: function(inst, offset, period) { + var year = inst.drawYear + (period === "Y" ? offset : 0), + month = inst.drawMonth + (period === "M" ? offset : 0), + day = Math.min(inst.selectedDay, this._getDaysInMonth(year, month)) + (period === "D" ? offset : 0), + date = this._restrictMinMax(inst, this._daylightSavingAdjust(new Date(year, month, day))); + + inst.selectedDay = date.getDate(); + inst.drawMonth = inst.selectedMonth = date.getMonth(); + inst.drawYear = inst.selectedYear = date.getFullYear(); + if (period === "M" || period === "Y") { + this._notifyChange(inst); + } + }, + + /* Ensure a date is within any min/max bounds. */ + _restrictMinMax: function(inst, date) { + var minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + newDate = (minDate && date < minDate ? minDate : date); + return (maxDate && newDate > maxDate ? maxDate : newDate); + }, + + /* Notify change of month/year. */ + _notifyChange: function(inst) { + var onChange = this._get(inst, "onChangeMonthYear"); + if (onChange) { + onChange.apply((inst.input ? inst.input[0] : null), + [inst.selectedYear, inst.selectedMonth + 1, inst]); + } + }, + + /* Determine the number of months to show. */ + _getNumberOfMonths: function(inst) { + var numMonths = this._get(inst, "numberOfMonths"); + return (numMonths == null ? [1, 1] : (typeof numMonths === "number" ? [1, numMonths] : numMonths)); + }, + + /* Determine the current maximum date - ensure no time components are set. */ + _getMinMaxDate: function(inst, minMax) { + return this._determineDate(inst, this._get(inst, minMax + "Date"), null); + }, + + /* Find the number of days in a given month. */ + _getDaysInMonth: function(year, month) { + return 32 - this._daylightSavingAdjust(new Date(year, month, 32)).getDate(); + }, + + /* Find the day of the week of the first of a month. */ + _getFirstDayOfMonth: function(year, month) { + return new Date(year, month, 1).getDay(); + }, + + /* Determines if we should allow a "next/prev" month display change. */ + _canAdjustMonth: function(inst, offset, curYear, curMonth) { + var numMonths = this._getNumberOfMonths(inst), + date = this._daylightSavingAdjust(new Date(curYear, + curMonth + (offset < 0 ? offset : numMonths[0] * numMonths[1]), 1)); + + if (offset < 0) { + date.setDate(this._getDaysInMonth(date.getFullYear(), date.getMonth())); + } + return this._isInRange(inst, date); + }, + + /* Is the given date in the accepted range? */ + _isInRange: function(inst, date) { + var yearSplit, currentYear, + minDate = this._getMinMaxDate(inst, "min"), + maxDate = this._getMinMaxDate(inst, "max"), + minYear = null, + maxYear = null, + years = this._get(inst, "yearRange"); + if (years){ + yearSplit = years.split(":"); + currentYear = new Date().getFullYear(); + minYear = parseInt(yearSplit[0], 10); + maxYear = parseInt(yearSplit[1], 10); + if ( yearSplit[0].match(/[+\-].*/) ) { + minYear += currentYear; + } + if ( yearSplit[1].match(/[+\-].*/) ) { + maxYear += currentYear; + } + } + + return ((!minDate || date.getTime() >= minDate.getTime()) && + (!maxDate || date.getTime() <= maxDate.getTime()) && + (!minYear || date.getFullYear() >= minYear) && + (!maxYear || date.getFullYear() <= maxYear)); + }, + + /* Provide the configuration settings for formatting/parsing. */ + _getFormatConfig: function(inst) { + var shortYearCutoff = this._get(inst, "shortYearCutoff"); + shortYearCutoff = (typeof shortYearCutoff !== "string" ? shortYearCutoff : + new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); + return {shortYearCutoff: shortYearCutoff, + dayNamesShort: this._get(inst, "dayNamesShort"), dayNames: this._get(inst, "dayNames"), + monthNamesShort: this._get(inst, "monthNamesShort"), monthNames: this._get(inst, "monthNames")}; + }, + + /* Format the given date for display. */ + _formatDate: function(inst, day, month, year) { + if (!day) { + inst.currentDay = inst.selectedDay; + inst.currentMonth = inst.selectedMonth; + inst.currentYear = inst.selectedYear; + } + var date = (day ? (typeof day === "object" ? day : + this._daylightSavingAdjust(new Date(year, month, day))) : + this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay))); + return this.formatDate(this._get(inst, "dateFormat"), date, this._getFormatConfig(inst)); + } +}); + +/* + * Bind hover events for datepicker elements. + * Done via delegate so the binding only occurs once in the lifetime of the parent div. + * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker. + */ +function datepicker_bindHover(dpDiv) { + var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a"; + return dpDiv.delegate(selector, "mouseout", function() { + $(this).removeClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).removeClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).removeClass("ui-datepicker-next-hover"); + } + }) + .delegate( selector, "mouseover", datepicker_handleMouseover ); +} + +function datepicker_handleMouseover() { + if (!$.datepicker._isDisabledDatepicker( datepicker_instActive.inline? datepicker_instActive.dpDiv.parent()[0] : datepicker_instActive.input[0])) { + $(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); + $(this).addClass("ui-state-hover"); + if (this.className.indexOf("ui-datepicker-prev") !== -1) { + $(this).addClass("ui-datepicker-prev-hover"); + } + if (this.className.indexOf("ui-datepicker-next") !== -1) { + $(this).addClass("ui-datepicker-next-hover"); + } + } +} + +/* jQuery extend now ignores nulls! */ +function datepicker_extendRemove(target, props) { + $.extend(target, props); + for (var name in props) { + if (props[name] == null) { + target[name] = props[name]; + } + } + return target; +} + +/* Invoke the datepicker functionality. + @param options string - a command, optionally followed by additional parameters or + Object - settings for attaching new datepicker functionality + @return jQuery object */ +$.fn.datepicker = function(options){ + + /* Verify an empty collection wasn't passed - Fixes #6976 */ + if ( !this.length ) { + return this; + } + + /* Initialise the date picker. */ + if (!$.datepicker.initialized) { + $(document).mousedown($.datepicker._checkExternalClick); + $.datepicker.initialized = true; + } + + /* Append datepicker main container to body if not exist. */ + if ($("#"+$.datepicker._mainDivId).length === 0) { + $("body").append($.datepicker.dpDiv); + } + + var otherArgs = Array.prototype.slice.call(arguments, 1); + if (typeof options === "string" && (options === "isDisabled" || options === "getDate" || options === "widget")) { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + if (options === "option" && arguments.length === 2 && typeof arguments[1] === "string") { + return $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this[0]].concat(otherArgs)); + } + return this.each(function() { + typeof options === "string" ? + $.datepicker["_" + options + "Datepicker"]. + apply($.datepicker, [this].concat(otherArgs)) : + $.datepicker._attachDatepicker(this, options); + }); +}; + +$.datepicker = new Datepicker(); // singleton instance +$.datepicker.initialized = false; +$.datepicker.uuid = new Date().getTime(); +$.datepicker.version = "1.11.4"; + +var datepicker = $.datepicker; + + +/*! + * jQuery UI Dialog 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/dialog/ + */ + + +var dialog = $.widget( "ui.dialog", { + version: "1.11.4", + options: { + appendTo: "body", + autoOpen: true, + buttons: [], + closeOnEscape: true, + closeText: "Close", + dialogClass: "", + draggable: true, + hide: null, + height: "auto", + maxHeight: null, + maxWidth: null, + minHeight: 150, + minWidth: 150, + modal: false, + position: { + my: "center", + at: "center", + of: window, + collision: "fit", + // Ensure the titlebar is always visible + using: function( pos ) { + var topOffset = $( this ).css( pos ).offset().top; + if ( topOffset < 0 ) { + $( this ).css( "top", pos.top - topOffset ); + } + } + }, + resizable: true, + show: null, + title: null, + width: 300, + + // callbacks + beforeClose: null, + close: null, + drag: null, + dragStart: null, + dragStop: null, + focus: null, + open: null, + resize: null, + resizeStart: null, + resizeStop: null + }, + + sizeRelatedOptions: { + buttons: true, + height: true, + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true, + width: true + }, + + resizableRelatedOptions: { + maxHeight: true, + maxWidth: true, + minHeight: true, + minWidth: true + }, + + _create: function() { + this.originalCss = { + display: this.element[ 0 ].style.display, + width: this.element[ 0 ].style.width, + minHeight: this.element[ 0 ].style.minHeight, + maxHeight: this.element[ 0 ].style.maxHeight, + height: this.element[ 0 ].style.height + }; + this.originalPosition = { + parent: this.element.parent(), + index: this.element.parent().children().index( this.element ) + }; + this.originalTitle = this.element.attr( "title" ); + this.options.title = this.options.title || this.originalTitle; + + this._createWrapper(); + + this.element + .show() + .removeAttr( "title" ) + .addClass( "ui-dialog-content ui-widget-content" ) + .appendTo( this.uiDialog ); + + this._createTitlebar(); + this._createButtonPane(); + + if ( this.options.draggable && $.fn.draggable ) { + this._makeDraggable(); + } + if ( this.options.resizable && $.fn.resizable ) { + this._makeResizable(); + } + + this._isOpen = false; + + this._trackFocus(); + }, + + _init: function() { + if ( this.options.autoOpen ) { + this.open(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + if ( element && (element.jquery || element.nodeType) ) { + return $( element ); + } + return this.document.find( element || "body" ).eq( 0 ); + }, + + _destroy: function() { + var next, + originalPosition = this.originalPosition; + + this._untrackInstance(); + this._destroyOverlay(); + + this.element + .removeUniqueId() + .removeClass( "ui-dialog-content ui-widget-content" ) + .css( this.originalCss ) + // Without detaching first, the following becomes really slow + .detach(); + + this.uiDialog.stop( true, true ).remove(); + + if ( this.originalTitle ) { + this.element.attr( "title", this.originalTitle ); + } + + next = originalPosition.parent.children().eq( originalPosition.index ); + // Don't try to place the dialog next to itself (#8613) + if ( next.length && next[ 0 ] !== this.element[ 0 ] ) { + next.before( this.element ); + } else { + originalPosition.parent.append( this.element ); + } + }, + + widget: function() { + return this.uiDialog; + }, + + disable: $.noop, + enable: $.noop, + + close: function( event ) { + var activeElement, + that = this; + + if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) { + return; + } + + this._isOpen = false; + this._focusedElement = null; + this._destroyOverlay(); + this._untrackInstance(); + + if ( !this.opener.filter( ":focusable" ).focus().length ) { + + // support: IE9 + // IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe> + try { + activeElement = this.document[ 0 ].activeElement; + + // Support: IE9, IE10 + // If the <body> is blurred, IE will switch windows, see #4520 + if ( activeElement && activeElement.nodeName.toLowerCase() !== "body" ) { + + // Hiding a focused element doesn't trigger blur in WebKit + // so in case we have nothing to focus on, explicitly blur the active element + // https://bugs.webkit.org/show_bug.cgi?id=47182 + $( activeElement ).blur(); + } + } catch ( error ) {} + } + + this._hide( this.uiDialog, this.options.hide, function() { + that._trigger( "close", event ); + }); + }, + + isOpen: function() { + return this._isOpen; + }, + + moveToTop: function() { + this._moveToTop(); + }, + + _moveToTop: function( event, silent ) { + var moved = false, + zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map(function() { + return +$( this ).css( "z-index" ); + }).get(), + zIndexMax = Math.max.apply( null, zIndices ); + + if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) { + this.uiDialog.css( "z-index", zIndexMax + 1 ); + moved = true; + } + + if ( moved && !silent ) { + this._trigger( "focus", event ); + } + return moved; + }, + + open: function() { + var that = this; + if ( this._isOpen ) { + if ( this._moveToTop() ) { + this._focusTabbable(); + } + return; + } + + this._isOpen = true; + this.opener = $( this.document[ 0 ].activeElement ); + + this._size(); + this._position(); + this._createOverlay(); + this._moveToTop( null, true ); + + // Ensure the overlay is moved to the top with the dialog, but only when + // opening. The overlay shouldn't move after the dialog is open so that + // modeless dialogs opened after the modal dialog stack properly. + if ( this.overlay ) { + this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 ); + } + + this._show( this.uiDialog, this.options.show, function() { + that._focusTabbable(); + that._trigger( "focus" ); + }); + + // Track the dialog immediately upon openening in case a focus event + // somehow occurs outside of the dialog before an element inside the + // dialog is focused (#10152) + this._makeFocusTarget(); + + this._trigger( "open" ); + }, + + _focusTabbable: function() { + // Set focus to the first match: + // 1. An element that was focused previously + // 2. First element inside the dialog matching [autofocus] + // 3. Tabbable element inside the content element + // 4. Tabbable element inside the buttonpane + // 5. The close button + // 6. The dialog itself + var hasFocus = this._focusedElement; + if ( !hasFocus ) { + hasFocus = this.element.find( "[autofocus]" ); + } + if ( !hasFocus.length ) { + hasFocus = this.element.find( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialogButtonPane.find( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" ); + } + if ( !hasFocus.length ) { + hasFocus = this.uiDialog; + } + hasFocus.eq( 0 ).focus(); + }, + + _keepFocus: function( event ) { + function checkFocus() { + var activeElement = this.document[0].activeElement, + isActive = this.uiDialog[0] === activeElement || + $.contains( this.uiDialog[0], activeElement ); + if ( !isActive ) { + this._focusTabbable(); + } + } + event.preventDefault(); + checkFocus.call( this ); + // support: IE + // IE <= 8 doesn't prevent moving focus even with event.preventDefault() + // so we check again later + this._delay( checkFocus ); + }, + + _createWrapper: function() { + this.uiDialog = $("<div>") + .addClass( "ui-dialog ui-widget ui-widget-content ui-corner-all ui-front " + + this.options.dialogClass ) + .hide() + .attr({ + // Setting tabIndex makes the div focusable + tabIndex: -1, + role: "dialog" + }) + .appendTo( this._appendTo() ); + + this._on( this.uiDialog, { + keydown: function( event ) { + if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode && + event.keyCode === $.ui.keyCode.ESCAPE ) { + event.preventDefault(); + this.close( event ); + return; + } + + // prevent tabbing out of dialogs + if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) { + return; + } + var tabbables = this.uiDialog.find( ":tabbable" ), + first = tabbables.filter( ":first" ), + last = tabbables.filter( ":last" ); + + if ( ( event.target === last[0] || event.target === this.uiDialog[0] ) && !event.shiftKey ) { + this._delay(function() { + first.focus(); + }); + event.preventDefault(); + } else if ( ( event.target === first[0] || event.target === this.uiDialog[0] ) && event.shiftKey ) { + this._delay(function() { + last.focus(); + }); + event.preventDefault(); + } + }, + mousedown: function( event ) { + if ( this._moveToTop( event ) ) { + this._focusTabbable(); + } + } + }); + + // We assume that any existing aria-describedby attribute means + // that the dialog content is marked up properly + // otherwise we brute force the content as the description + if ( !this.element.find( "[aria-describedby]" ).length ) { + this.uiDialog.attr({ + "aria-describedby": this.element.uniqueId().attr( "id" ) + }); + } + }, + + _createTitlebar: function() { + var uiDialogTitle; + + this.uiDialogTitlebar = $( "<div>" ) + .addClass( "ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix" ) + .prependTo( this.uiDialog ); + this._on( this.uiDialogTitlebar, { + mousedown: function( event ) { + // Don't prevent click on close button (#8838) + // Focusing a dialog that is partially scrolled out of view + // causes the browser to scroll it into view, preventing the click event + if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) { + // Dialog isn't getting focus when dragging (#8063) + this.uiDialog.focus(); + } + } + }); + + // support: IE + // Use type="button" to prevent enter keypresses in textboxes from closing the + // dialog in IE (#9312) + this.uiDialogTitlebarClose = $( "<button type='button'></button>" ) + .button({ + label: this.options.closeText, + icons: { + primary: "ui-icon-closethick" + }, + text: false + }) + .addClass( "ui-dialog-titlebar-close" ) + .appendTo( this.uiDialogTitlebar ); + this._on( this.uiDialogTitlebarClose, { + click: function( event ) { + event.preventDefault(); + this.close( event ); + } + }); + + uiDialogTitle = $( "<span>" ) + .uniqueId() + .addClass( "ui-dialog-title" ) + .prependTo( this.uiDialogTitlebar ); + this._title( uiDialogTitle ); + + this.uiDialog.attr({ + "aria-labelledby": uiDialogTitle.attr( "id" ) + }); + }, + + _title: function( title ) { + if ( !this.options.title ) { + title.html( " " ); + } + title.text( this.options.title ); + }, + + _createButtonPane: function() { + this.uiDialogButtonPane = $( "<div>" ) + .addClass( "ui-dialog-buttonpane ui-widget-content ui-helper-clearfix" ); + + this.uiButtonSet = $( "<div>" ) + .addClass( "ui-dialog-buttonset" ) + .appendTo( this.uiDialogButtonPane ); + + this._createButtons(); + }, + + _createButtons: function() { + var that = this, + buttons = this.options.buttons; + + // if we already have a button pane, remove it + this.uiDialogButtonPane.remove(); + this.uiButtonSet.empty(); + + if ( $.isEmptyObject( buttons ) || ($.isArray( buttons ) && !buttons.length) ) { + this.uiDialog.removeClass( "ui-dialog-buttons" ); + return; + } + + $.each( buttons, function( name, props ) { + var click, buttonOptions; + props = $.isFunction( props ) ? + { click: props, text: name } : + props; + // Default to a non-submitting button + props = $.extend( { type: "button" }, props ); + // Change the context for the click callback to be the main element + click = props.click; + props.click = function() { + click.apply( that.element[ 0 ], arguments ); + }; + buttonOptions = { + icons: props.icons, + text: props.showText + }; + delete props.icons; + delete props.showText; + $( "<button></button>", props ) + .button( buttonOptions ) + .appendTo( that.uiButtonSet ); + }); + this.uiDialog.addClass( "ui-dialog-buttons" ); + this.uiDialogButtonPane.appendTo( this.uiDialog ); + }, + + _makeDraggable: function() { + var that = this, + options = this.options; + + function filteredUi( ui ) { + return { + position: ui.position, + offset: ui.offset + }; + } + + this.uiDialog.draggable({ + cancel: ".ui-dialog-content, .ui-dialog-titlebar-close", + handle: ".ui-dialog-titlebar", + containment: "document", + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-dragging" ); + that._blockFrames(); + that._trigger( "dragStart", event, filteredUi( ui ) ); + }, + drag: function( event, ui ) { + that._trigger( "drag", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + var left = ui.offset.left - that.document.scrollLeft(), + top = ui.offset.top - that.document.scrollTop(); + + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; + $( this ).removeClass( "ui-dialog-dragging" ); + that._unblockFrames(); + that._trigger( "dragStop", event, filteredUi( ui ) ); + } + }); + }, + + _makeResizable: function() { + var that = this, + options = this.options, + handles = options.resizable, + // .ui-resizable has position: relative defined in the stylesheet + // but dialogs have to use absolute or fixed positioning + position = this.uiDialog.css("position"), + resizeHandles = typeof handles === "string" ? + handles : + "n,e,s,w,se,sw,ne,nw"; + + function filteredUi( ui ) { + return { + originalPosition: ui.originalPosition, + originalSize: ui.originalSize, + position: ui.position, + size: ui.size + }; + } + + this.uiDialog.resizable({ + cancel: ".ui-dialog-content", + containment: "document", + alsoResize: this.element, + maxWidth: options.maxWidth, + maxHeight: options.maxHeight, + minWidth: options.minWidth, + minHeight: this._minHeight(), + handles: resizeHandles, + start: function( event, ui ) { + $( this ).addClass( "ui-dialog-resizing" ); + that._blockFrames(); + that._trigger( "resizeStart", event, filteredUi( ui ) ); + }, + resize: function( event, ui ) { + that._trigger( "resize", event, filteredUi( ui ) ); + }, + stop: function( event, ui ) { + var offset = that.uiDialog.offset(), + left = offset.left - that.document.scrollLeft(), + top = offset.top - that.document.scrollTop(); + + options.height = that.uiDialog.height(); + options.width = that.uiDialog.width(); + options.position = { + my: "left top", + at: "left" + (left >= 0 ? "+" : "") + left + " " + + "top" + (top >= 0 ? "+" : "") + top, + of: that.window + }; + $( this ).removeClass( "ui-dialog-resizing" ); + that._unblockFrames(); + that._trigger( "resizeStop", event, filteredUi( ui ) ); + } + }) + .css( "position", position ); + }, + + _trackFocus: function() { + this._on( this.widget(), { + focusin: function( event ) { + this._makeFocusTarget(); + this._focusedElement = $( event.target ); + } + }); + }, + + _makeFocusTarget: function() { + this._untrackInstance(); + this._trackingInstances().unshift( this ); + }, + + _untrackInstance: function() { + var instances = this._trackingInstances(), + exists = $.inArray( this, instances ); + if ( exists !== -1 ) { + instances.splice( exists, 1 ); + } + }, + + _trackingInstances: function() { + var instances = this.document.data( "ui-dialog-instances" ); + if ( !instances ) { + instances = []; + this.document.data( "ui-dialog-instances", instances ); + } + return instances; + }, + + _minHeight: function() { + var options = this.options; + + return options.height === "auto" ? + options.minHeight : + Math.min( options.minHeight, options.height ); + }, + + _position: function() { + // Need to show the dialog to get the actual offset in the position plugin + var isVisible = this.uiDialog.is( ":visible" ); + if ( !isVisible ) { + this.uiDialog.show(); + } + this.uiDialog.position( this.options.position ); + if ( !isVisible ) { + this.uiDialog.hide(); + } + }, + + _setOptions: function( options ) { + var that = this, + resize = false, + resizableOptions = {}; + + $.each( options, function( key, value ) { + that._setOption( key, value ); + + if ( key in that.sizeRelatedOptions ) { + resize = true; + } + if ( key in that.resizableRelatedOptions ) { + resizableOptions[ key ] = value; + } + }); + + if ( resize ) { + this._size(); + this._position(); + } + if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { + this.uiDialog.resizable( "option", resizableOptions ); + } + }, + + _setOption: function( key, value ) { + var isDraggable, isResizable, + uiDialog = this.uiDialog; + + if ( key === "dialogClass" ) { + uiDialog + .removeClass( this.options.dialogClass ) + .addClass( value ); + } + + if ( key === "disabled" ) { + return; + } + + this._super( key, value ); + + if ( key === "appendTo" ) { + this.uiDialog.appendTo( this._appendTo() ); + } + + if ( key === "buttons" ) { + this._createButtons(); + } + + if ( key === "closeText" ) { + this.uiDialogTitlebarClose.button({ + // Ensure that we always pass a string + label: "" + value + }); + } + + if ( key === "draggable" ) { + isDraggable = uiDialog.is( ":data(ui-draggable)" ); + if ( isDraggable && !value ) { + uiDialog.draggable( "destroy" ); + } + + if ( !isDraggable && value ) { + this._makeDraggable(); + } + } + + if ( key === "position" ) { + this._position(); + } + + if ( key === "resizable" ) { + // currently resizable, becoming non-resizable + isResizable = uiDialog.is( ":data(ui-resizable)" ); + if ( isResizable && !value ) { + uiDialog.resizable( "destroy" ); + } + + // currently resizable, changing handles + if ( isResizable && typeof value === "string" ) { + uiDialog.resizable( "option", "handles", value ); + } + + // currently non-resizable, becoming resizable + if ( !isResizable && value !== false ) { + this._makeResizable(); + } + } + + if ( key === "title" ) { + this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) ); + } + }, + + _size: function() { + // If the user has resized the dialog, the .ui-dialog and .ui-dialog-content + // divs will both have width and height set, so we need to reset them + var nonContentHeight, minContentHeight, maxContentHeight, + options = this.options; + + // Reset content sizing + this.element.show().css({ + width: "auto", + minHeight: 0, + maxHeight: "none", + height: 0 + }); + + if ( options.minWidth > options.width ) { + options.width = options.minWidth; + } + + // reset wrapper sizing + // determine the height of all the non-content elements + nonContentHeight = this.uiDialog.css({ + height: "auto", + width: options.width + }) + .outerHeight(); + minContentHeight = Math.max( 0, options.minHeight - nonContentHeight ); + maxContentHeight = typeof options.maxHeight === "number" ? + Math.max( 0, options.maxHeight - nonContentHeight ) : + "none"; + + if ( options.height === "auto" ) { + this.element.css({ + minHeight: minContentHeight, + maxHeight: maxContentHeight, + height: "auto" + }); + } else { + this.element.height( Math.max( 0, options.height - nonContentHeight ) ); + } + + if ( this.uiDialog.is( ":data(ui-resizable)" ) ) { + this.uiDialog.resizable( "option", "minHeight", this._minHeight() ); + } + }, + + _blockFrames: function() { + this.iframeBlocks = this.document.find( "iframe" ).map(function() { + var iframe = $( this ); + + return $( "<div>" ) + .css({ + position: "absolute", + width: iframe.outerWidth(), + height: iframe.outerHeight() + }) + .appendTo( iframe.parent() ) + .offset( iframe.offset() )[0]; + }); + }, + + _unblockFrames: function() { + if ( this.iframeBlocks ) { + this.iframeBlocks.remove(); + delete this.iframeBlocks; + } + }, + + _allowInteraction: function( event ) { + if ( $( event.target ).closest( ".ui-dialog" ).length ) { + return true; + } + + // TODO: Remove hack when datepicker implements + // the .ui-front logic (#8989) + return !!$( event.target ).closest( ".ui-datepicker" ).length; + }, + + _createOverlay: function() { + if ( !this.options.modal ) { + return; + } + + // We use a delay in case the overlay is created from an + // event that we're going to be cancelling (#2804) + var isOpening = true; + this._delay(function() { + isOpening = false; + }); + + if ( !this.document.data( "ui-dialog-overlays" ) ) { + + // Prevent use of anchors and inputs + // Using _on() for an event handler shared across many instances is + // safe because the dialogs stack and must be closed in reverse order + this._on( this.document, { + focusin: function( event ) { + if ( isOpening ) { + return; + } + + if ( !this._allowInteraction( event ) ) { + event.preventDefault(); + this._trackingInstances()[ 0 ]._focusTabbable(); + } + } + }); + } + + this.overlay = $( "<div>" ) + .addClass( "ui-widget-overlay ui-front" ) + .appendTo( this._appendTo() ); + this._on( this.overlay, { + mousedown: "_keepFocus" + }); + this.document.data( "ui-dialog-overlays", + (this.document.data( "ui-dialog-overlays" ) || 0) + 1 ); + }, + + _destroyOverlay: function() { + if ( !this.options.modal ) { + return; + } + + if ( this.overlay ) { + var overlays = this.document.data( "ui-dialog-overlays" ) - 1; + + if ( !overlays ) { + this.document + .unbind( "focusin" ) + .removeData( "ui-dialog-overlays" ); + } else { + this.document.data( "ui-dialog-overlays", overlays ); + } + + this.overlay.remove(); + this.overlay = null; + } + } +}); + + +/*! + * jQuery UI Progressbar 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/progressbar/ + */ + + +var progressbar = $.widget( "ui.progressbar", { + version: "1.11.4", + options: { + max: 100, + value: 0, + + change: null, + complete: null + }, + + min: 0, + + _create: function() { + // Constrain initial value + this.oldValue = this.options.value = this._constrainedValue(); + + this.element + .addClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .attr({ + // Only set static values, aria-valuenow and aria-valuemax are + // set inside _refreshValue() + role: "progressbar", + "aria-valuemin": this.min + }); + + this.valueDiv = $( "<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>" ) + .appendTo( this.element ); + + this._refreshValue(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-progressbar ui-widget ui-widget-content ui-corner-all" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + + this.valueDiv.remove(); + }, + + value: function( newValue ) { + if ( newValue === undefined ) { + return this.options.value; + } + + this.options.value = this._constrainedValue( newValue ); + this._refreshValue(); + }, + + _constrainedValue: function( newValue ) { + if ( newValue === undefined ) { + newValue = this.options.value; + } + + this.indeterminate = newValue === false; + + // sanitize value + if ( typeof newValue !== "number" ) { + newValue = 0; + } + + return this.indeterminate ? false : + Math.min( this.options.max, Math.max( this.min, newValue ) ); + }, + + _setOptions: function( options ) { + // Ensure "value" option is set after other values (like max) + var value = options.value; + delete options.value; + + this._super( options ); + + this.options.value = this._constrainedValue( value ); + this._refreshValue(); + }, + + _setOption: function( key, value ) { + if ( key === "max" ) { + // Don't allow a max less than min + value = Math.max( this.min, value ); + } + if ( key === "disabled" ) { + this.element + .toggleClass( "ui-state-disabled", !!value ) + .attr( "aria-disabled", value ); + } + this._super( key, value ); + }, + + _percentage: function() { + return this.indeterminate ? 100 : 100 * ( this.options.value - this.min ) / ( this.options.max - this.min ); + }, + + _refreshValue: function() { + var value = this.options.value, + percentage = this._percentage(); + + this.valueDiv + .toggle( this.indeterminate || value > this.min ) + .toggleClass( "ui-corner-right", value === this.options.max ) + .width( percentage.toFixed(0) + "%" ); + + this.element.toggleClass( "ui-progressbar-indeterminate", this.indeterminate ); + + if ( this.indeterminate ) { + this.element.removeAttr( "aria-valuenow" ); + if ( !this.overlayDiv ) { + this.overlayDiv = $( "<div class='ui-progressbar-overlay'></div>" ).appendTo( this.valueDiv ); + } + } else { + this.element.attr({ + "aria-valuemax": this.options.max, + "aria-valuenow": value + }); + if ( this.overlayDiv ) { + this.overlayDiv.remove(); + this.overlayDiv = null; + } + } + + if ( this.oldValue !== value ) { + this.oldValue = value; + this._trigger( "change" ); + } + if ( value === this.options.max ) { + this._trigger( "complete" ); + } + } +}); + + +/*! + * jQuery UI Selectmenu 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/selectmenu + */ + + +var selectmenu = $.widget( "ui.selectmenu", { + version: "1.11.4", + defaultElement: "<select>", + options: { + appendTo: null, + disabled: null, + icons: { + button: "ui-icon-triangle-1-s" + }, + position: { + my: "left top", + at: "left bottom", + collision: "none" + }, + width: null, + + // callbacks + change: null, + close: null, + focus: null, + open: null, + select: null + }, + + _create: function() { + var selectmenuId = this.element.uniqueId().attr( "id" ); + this.ids = { + element: selectmenuId, + button: selectmenuId + "-button", + menu: selectmenuId + "-menu" + }; + + this._drawButton(); + this._drawMenu(); + + if ( this.options.disabled ) { + this.disable(); + } + }, + + _drawButton: function() { + var that = this; + + // Associate existing label with the new button + this.label = $( "label[for='" + this.ids.element + "']" ).attr( "for", this.ids.button ); + this._on( this.label, { + click: function( event ) { + this.button.focus(); + event.preventDefault(); + } + }); + + // Hide original select element + this.element.hide(); + + // Create button + this.button = $( "<span>", { + "class": "ui-selectmenu-button ui-widget ui-state-default ui-corner-all", + tabindex: this.options.disabled ? -1 : 0, + id: this.ids.button, + role: "combobox", + "aria-expanded": "false", + "aria-autocomplete": "list", + "aria-owns": this.ids.menu, + "aria-haspopup": "true" + }) + .insertAfter( this.element ); + + $( "<span>", { + "class": "ui-icon " + this.options.icons.button + }) + .prependTo( this.button ); + + this.buttonText = $( "<span>", { + "class": "ui-selectmenu-text" + }) + .appendTo( this.button ); + + this._setText( this.buttonText, this.element.find( "option:selected" ).text() ); + this._resizeButton(); + + this._on( this.button, this._buttonEvents ); + this.button.one( "focusin", function() { + + // Delay rendering the menu items until the button receives focus. + // The menu may have already been rendered via a programmatic open. + if ( !that.menuItems ) { + that._refreshMenu(); + } + }); + this._hoverable( this.button ); + this._focusable( this.button ); + }, + + _drawMenu: function() { + var that = this; + + // Create menu + this.menu = $( "<ul>", { + "aria-hidden": "true", + "aria-labelledby": this.ids.button, + id: this.ids.menu + }); + + // Wrap menu + this.menuWrap = $( "<div>", { + "class": "ui-selectmenu-menu ui-front" + }) + .append( this.menu ) + .appendTo( this._appendTo() ); + + // Initialize menu widget + this.menuInstance = this.menu + .menu({ + role: "listbox", + select: function( event, ui ) { + event.preventDefault(); + + // support: IE8 + // If the item was selected via a click, the text selection + // will be destroyed in IE + that._setSelection(); + + that._select( ui.item.data( "ui-selectmenu-item" ), event ); + }, + focus: function( event, ui ) { + var item = ui.item.data( "ui-selectmenu-item" ); + + // Prevent inital focus from firing and check if its a newly focused item + if ( that.focusIndex != null && item.index !== that.focusIndex ) { + that._trigger( "focus", event, { item: item } ); + if ( !that.isOpen ) { + that._select( item, event ); + } + } + that.focusIndex = item.index; + + that.button.attr( "aria-activedescendant", + that.menuItems.eq( item.index ).attr( "id" ) ); + } + }) + .menu( "instance" ); + + // Adjust menu styles to dropdown + this.menu + .addClass( "ui-corner-bottom" ) + .removeClass( "ui-corner-all" ); + + // Don't close the menu on mouseleave + this.menuInstance._off( this.menu, "mouseleave" ); + + // Cancel the menu's collapseAll on document click + this.menuInstance._closeOnDocumentClick = function() { + return false; + }; + + // Selects often contain empty items, but never contain dividers + this.menuInstance._isDivider = function() { + return false; + }; + }, + + refresh: function() { + this._refreshMenu(); + this._setText( this.buttonText, this._getSelectedItem().text() ); + if ( !this.options.width ) { + this._resizeButton(); + } + }, + + _refreshMenu: function() { + this.menu.empty(); + + var item, + options = this.element.find( "option" ); + + if ( !options.length ) { + return; + } + + this._parseOptions( options ); + this._renderMenu( this.menu, this.items ); + + this.menuInstance.refresh(); + this.menuItems = this.menu.find( "li" ).not( ".ui-selectmenu-optgroup" ); + + item = this._getSelectedItem(); + + // Update the menu to have the correct item focused + this.menuInstance.focus( null, item ); + this._setAria( item.data( "ui-selectmenu-item" ) ); + + // Set disabled state + this._setOption( "disabled", this.element.prop( "disabled" ) ); + }, + + open: function( event ) { + if ( this.options.disabled ) { + return; + } + + // If this is the first time the menu is being opened, render the items + if ( !this.menuItems ) { + this._refreshMenu(); + } else { + + // Menu clears focus on close, reset focus to selected item + this.menu.find( ".ui-state-focus" ).removeClass( "ui-state-focus" ); + this.menuInstance.focus( null, this._getSelectedItem() ); + } + + this.isOpen = true; + this._toggleAttr(); + this._resizeMenu(); + this._position(); + + this._on( this.document, this._documentClick ); + + this._trigger( "open", event ); + }, + + _position: function() { + this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) ); + }, + + close: function( event ) { + if ( !this.isOpen ) { + return; + } + + this.isOpen = false; + this._toggleAttr(); + + this.range = null; + this._off( this.document ); + + this._trigger( "close", event ); + }, + + widget: function() { + return this.button; + }, + + menuWidget: function() { + return this.menu; + }, + + _renderMenu: function( ul, items ) { + var that = this, + currentOptgroup = ""; + + $.each( items, function( index, item ) { + if ( item.optgroup !== currentOptgroup ) { + $( "<li>", { + "class": "ui-selectmenu-optgroup ui-menu-divider" + + ( item.element.parent( "optgroup" ).prop( "disabled" ) ? + " ui-state-disabled" : + "" ), + text: item.optgroup + }) + .appendTo( ul ); + + currentOptgroup = item.optgroup; + } + + that._renderItemData( ul, item ); + }); + }, + + _renderItemData: function( ul, item ) { + return this._renderItem( ul, item ).data( "ui-selectmenu-item", item ); + }, + + _renderItem: function( ul, item ) { + var li = $( "<li>" ); + + if ( item.disabled ) { + li.addClass( "ui-state-disabled" ); + } + this._setText( li, item.label ); + + return li.appendTo( ul ); + }, + + _setText: function( element, value ) { + if ( value ) { + element.text( value ); + } else { + element.html( " " ); + } + }, + + _move: function( direction, event ) { + var item, next, + filter = ".ui-menu-item"; + + if ( this.isOpen ) { + item = this.menuItems.eq( this.focusIndex ); + } else { + item = this.menuItems.eq( this.element[ 0 ].selectedIndex ); + filter += ":not(.ui-state-disabled)"; + } + + if ( direction === "first" || direction === "last" ) { + next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 ); + } else { + next = item[ direction + "All" ]( filter ).eq( 0 ); + } + + if ( next.length ) { + this.menuInstance.focus( event, next ); + } + }, + + _getSelectedItem: function() { + return this.menuItems.eq( this.element[ 0 ].selectedIndex ); + }, + + _toggle: function( event ) { + this[ this.isOpen ? "close" : "open" ]( event ); + }, + + _setSelection: function() { + var selection; + + if ( !this.range ) { + return; + } + + if ( window.getSelection ) { + selection = window.getSelection(); + selection.removeAllRanges(); + selection.addRange( this.range ); + + // support: IE8 + } else { + this.range.select(); + } + + // support: IE + // Setting the text selection kills the button focus in IE, but + // restoring the focus doesn't kill the selection. + this.button.focus(); + }, + + _documentClick: { + mousedown: function( event ) { + if ( !this.isOpen ) { + return; + } + + if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" + this.ids.button ).length ) { + this.close( event ); + } + } + }, + + _buttonEvents: { + + // Prevent text selection from being reset when interacting with the selectmenu (#10144) + mousedown: function() { + var selection; + + if ( window.getSelection ) { + selection = window.getSelection(); + if ( selection.rangeCount ) { + this.range = selection.getRangeAt( 0 ); + } + + // support: IE8 + } else { + this.range = document.selection.createRange(); + } + }, + + click: function( event ) { + this._setSelection(); + this._toggle( event ); + }, + + keydown: function( event ) { + var preventDefault = true; + switch ( event.keyCode ) { + case $.ui.keyCode.TAB: + case $.ui.keyCode.ESCAPE: + this.close( event ); + preventDefault = false; + break; + case $.ui.keyCode.ENTER: + if ( this.isOpen ) { + this._selectFocusedItem( event ); + } + break; + case $.ui.keyCode.UP: + if ( event.altKey ) { + this._toggle( event ); + } else { + this._move( "prev", event ); + } + break; + case $.ui.keyCode.DOWN: + if ( event.altKey ) { + this._toggle( event ); + } else { + this._move( "next", event ); + } + break; + case $.ui.keyCode.SPACE: + if ( this.isOpen ) { + this._selectFocusedItem( event ); + } else { + this._toggle( event ); + } + break; + case $.ui.keyCode.LEFT: + this._move( "prev", event ); + break; + case $.ui.keyCode.RIGHT: + this._move( "next", event ); + break; + case $.ui.keyCode.HOME: + case $.ui.keyCode.PAGE_UP: + this._move( "first", event ); + break; + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_DOWN: + this._move( "last", event ); + break; + default: + this.menu.trigger( event ); + preventDefault = false; + } + + if ( preventDefault ) { + event.preventDefault(); + } + } + }, + + _selectFocusedItem: function( event ) { + var item = this.menuItems.eq( this.focusIndex ); + if ( !item.hasClass( "ui-state-disabled" ) ) { + this._select( item.data( "ui-selectmenu-item" ), event ); + } + }, + + _select: function( item, event ) { + var oldIndex = this.element[ 0 ].selectedIndex; + + // Change native select element + this.element[ 0 ].selectedIndex = item.index; + this._setText( this.buttonText, item.label ); + this._setAria( item ); + this._trigger( "select", event, { item: item } ); + + if ( item.index !== oldIndex ) { + this._trigger( "change", event, { item: item } ); + } + + this.close( event ); + }, + + _setAria: function( item ) { + var id = this.menuItems.eq( item.index ).attr( "id" ); + + this.button.attr({ + "aria-labelledby": id, + "aria-activedescendant": id + }); + this.menu.attr( "aria-activedescendant", id ); + }, + + _setOption: function( key, value ) { + if ( key === "icons" ) { + this.button.find( "span.ui-icon" ) + .removeClass( this.options.icons.button ) + .addClass( value.button ); + } + + this._super( key, value ); + + if ( key === "appendTo" ) { + this.menuWrap.appendTo( this._appendTo() ); + } + + if ( key === "disabled" ) { + this.menuInstance.option( "disabled", value ); + this.button + .toggleClass( "ui-state-disabled", value ) + .attr( "aria-disabled", value ); + + this.element.prop( "disabled", value ); + if ( value ) { + this.button.attr( "tabindex", -1 ); + this.close(); + } else { + this.button.attr( "tabindex", 0 ); + } + } + + if ( key === "width" ) { + this._resizeButton(); + } + }, + + _appendTo: function() { + var element = this.options.appendTo; + + if ( element ) { + element = element.jquery || element.nodeType ? + $( element ) : + this.document.find( element ).eq( 0 ); + } + + if ( !element || !element[ 0 ] ) { + element = this.element.closest( ".ui-front" ); + } + + if ( !element.length ) { + element = this.document[ 0 ].body; + } + + return element; + }, + + _toggleAttr: function() { + this.button + .toggleClass( "ui-corner-top", this.isOpen ) + .toggleClass( "ui-corner-all", !this.isOpen ) + .attr( "aria-expanded", this.isOpen ); + this.menuWrap.toggleClass( "ui-selectmenu-open", this.isOpen ); + this.menu.attr( "aria-hidden", !this.isOpen ); + }, + + _resizeButton: function() { + var width = this.options.width; + + if ( !width ) { + width = this.element.show().outerWidth(); + this.element.hide(); + } + + this.button.outerWidth( width ); + }, + + _resizeMenu: function() { + this.menu.outerWidth( Math.max( + this.button.outerWidth(), + + // support: IE10 + // IE10 wraps long text (possibly a rounding bug) + // so we add 1px to avoid the wrapping + this.menu.width( "" ).outerWidth() + 1 + ) ); + }, + + _getCreateOptions: function() { + return { disabled: this.element.prop( "disabled" ) }; + }, + + _parseOptions: function( options ) { + var data = []; + options.each(function( index, item ) { + var option = $( item ), + optgroup = option.parent( "optgroup" ); + data.push({ + element: option, + index: index, + value: option.val(), + label: option.text(), + optgroup: optgroup.attr( "label" ) || "", + disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" ) + }); + }); + this.items = data; + }, + + _destroy: function() { + this.menuWrap.remove(); + this.button.remove(); + this.element.show(); + this.element.removeUniqueId(); + this.label.attr( "for", this.ids.element ); + } +}); + + +/*! + * jQuery UI Slider 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slider/ + */ + + +var slider = $.widget( "ui.slider", $.ui.mouse, { + version: "1.11.4", + widgetEventPrefix: "slide", + + options: { + animate: false, + distance: 0, + max: 100, + min: 0, + orientation: "horizontal", + range: false, + step: 1, + value: 0, + values: null, + + // callbacks + change: null, + slide: null, + start: null, + stop: null + }, + + // number of pages in a slider + // (how many times can you page up/down to go through the whole range) + numPages: 5, + + _create: function() { + this._keySliding = false; + this._mouseSliding = false; + this._animateOff = true; + this._handleIndex = null; + this._detectOrientation(); + this._mouseInit(); + this._calculateNewMax(); + + this.element + .addClass( "ui-slider" + + " ui-slider-" + this.orientation + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all"); + + this._refresh(); + this._setOption( "disabled", this.options.disabled ); + + this._animateOff = false; + }, + + _refresh: function() { + this._createRange(); + this._createHandles(); + this._setupEvents(); + this._refreshValue(); + }, + + _createHandles: function() { + var i, handleCount, + options = this.options, + existingHandles = this.element.find( ".ui-slider-handle" ).addClass( "ui-state-default ui-corner-all" ), + handle = "<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>", + handles = []; + + handleCount = ( options.values && options.values.length ) || 1; + + if ( existingHandles.length > handleCount ) { + existingHandles.slice( handleCount ).remove(); + existingHandles = existingHandles.slice( 0, handleCount ); + } + + for ( i = existingHandles.length; i < handleCount; i++ ) { + handles.push( handle ); + } + + this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) ); + + this.handle = this.handles.eq( 0 ); + + this.handles.each(function( i ) { + $( this ).data( "ui-slider-handle-index", i ); + }); + }, + + _createRange: function() { + var options = this.options, + classes = ""; + + if ( options.range ) { + if ( options.range === true ) { + if ( !options.values ) { + options.values = [ this._valueMin(), this._valueMin() ]; + } else if ( options.values.length && options.values.length !== 2 ) { + options.values = [ options.values[0], options.values[0] ]; + } else if ( $.isArray( options.values ) ) { + options.values = options.values.slice(0); + } + } + + if ( !this.range || !this.range.length ) { + this.range = $( "<div></div>" ) + .appendTo( this.element ); + + classes = "ui-slider-range" + + // note: this isn't the most fittingly semantic framework class for this element, + // but worked best visually with a variety of themes + " ui-widget-header ui-corner-all"; + } else { + this.range.removeClass( "ui-slider-range-min ui-slider-range-max" ) + // Handle range switching from true to min/max + .css({ + "left": "", + "bottom": "" + }); + } + + this.range.addClass( classes + + ( ( options.range === "min" || options.range === "max" ) ? " ui-slider-range-" + options.range : "" ) ); + } else { + if ( this.range ) { + this.range.remove(); + } + this.range = null; + } + }, + + _setupEvents: function() { + this._off( this.handles ); + this._on( this.handles, this._handleEvents ); + this._hoverable( this.handles ); + this._focusable( this.handles ); + }, + + _destroy: function() { + this.handles.remove(); + if ( this.range ) { + this.range.remove(); + } + + this.element + .removeClass( "ui-slider" + + " ui-slider-horizontal" + + " ui-slider-vertical" + + " ui-widget" + + " ui-widget-content" + + " ui-corner-all" ); + + this._mouseDestroy(); + }, + + _mouseCapture: function( event ) { + var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle, + that = this, + o = this.options; + + if ( o.disabled ) { + return false; + } + + this.elementSize = { + width: this.element.outerWidth(), + height: this.element.outerHeight() + }; + this.elementOffset = this.element.offset(); + + position = { x: event.pageX, y: event.pageY }; + normValue = this._normValueFromMouse( position ); + distance = this._valueMax() - this._valueMin() + 1; + this.handles.each(function( i ) { + var thisDistance = Math.abs( normValue - that.values(i) ); + if (( distance > thisDistance ) || + ( distance === thisDistance && + (i === that._lastChangedValue || that.values(i) === o.min ))) { + distance = thisDistance; + closestHandle = $( this ); + index = i; + } + }); + + allowed = this._start( event, index ); + if ( allowed === false ) { + return false; + } + this._mouseSliding = true; + + this._handleIndex = index; + + closestHandle + .addClass( "ui-state-active" ) + .focus(); + + offset = closestHandle.offset(); + mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" ); + this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : { + left: event.pageX - offset.left - ( closestHandle.width() / 2 ), + top: event.pageY - offset.top - + ( closestHandle.height() / 2 ) - + ( parseInt( closestHandle.css("borderTopWidth"), 10 ) || 0 ) - + ( parseInt( closestHandle.css("borderBottomWidth"), 10 ) || 0) + + ( parseInt( closestHandle.css("marginTop"), 10 ) || 0) + }; + + if ( !this.handles.hasClass( "ui-state-hover" ) ) { + this._slide( event, index, normValue ); + } + this._animateOff = true; + return true; + }, + + _mouseStart: function() { + return true; + }, + + _mouseDrag: function( event ) { + var position = { x: event.pageX, y: event.pageY }, + normValue = this._normValueFromMouse( position ); + + this._slide( event, this._handleIndex, normValue ); + + return false; + }, + + _mouseStop: function( event ) { + this.handles.removeClass( "ui-state-active" ); + this._mouseSliding = false; + + this._stop( event, this._handleIndex ); + this._change( event, this._handleIndex ); + + this._handleIndex = null; + this._clickOffset = null; + this._animateOff = false; + + return false; + }, + + _detectOrientation: function() { + this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal"; + }, + + _normValueFromMouse: function( position ) { + var pixelTotal, + pixelMouse, + percentMouse, + valueTotal, + valueMouse; + + if ( this.orientation === "horizontal" ) { + pixelTotal = this.elementSize.width; + pixelMouse = position.x - this.elementOffset.left - ( this._clickOffset ? this._clickOffset.left : 0 ); + } else { + pixelTotal = this.elementSize.height; + pixelMouse = position.y - this.elementOffset.top - ( this._clickOffset ? this._clickOffset.top : 0 ); + } + + percentMouse = ( pixelMouse / pixelTotal ); + if ( percentMouse > 1 ) { + percentMouse = 1; + } + if ( percentMouse < 0 ) { + percentMouse = 0; + } + if ( this.orientation === "vertical" ) { + percentMouse = 1 - percentMouse; + } + + valueTotal = this._valueMax() - this._valueMin(); + valueMouse = this._valueMin() + percentMouse * valueTotal; + + return this._trimAlignValue( valueMouse ); + }, + + _start: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + return this._trigger( "start", event, uiHash ); + }, + + _slide: function( event, index, newVal ) { + var otherVal, + newValues, + allowed; + + if ( this.options.values && this.options.values.length ) { + otherVal = this.values( index ? 0 : 1 ); + + if ( ( this.options.values.length === 2 && this.options.range === true ) && + ( ( index === 0 && newVal > otherVal) || ( index === 1 && newVal < otherVal ) ) + ) { + newVal = otherVal; + } + + if ( newVal !== this.values( index ) ) { + newValues = this.values(); + newValues[ index ] = newVal; + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal, + values: newValues + } ); + otherVal = this.values( index ? 0 : 1 ); + if ( allowed !== false ) { + this.values( index, newVal ); + } + } + } else { + if ( newVal !== this.value() ) { + // A slide can be canceled by returning false from the slide callback + allowed = this._trigger( "slide", event, { + handle: this.handles[ index ], + value: newVal + } ); + if ( allowed !== false ) { + this.value( newVal ); + } + } + } + }, + + _stop: function( event, index ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + this._trigger( "stop", event, uiHash ); + }, + + _change: function( event, index ) { + if ( !this._keySliding && !this._mouseSliding ) { + var uiHash = { + handle: this.handles[ index ], + value: this.value() + }; + if ( this.options.values && this.options.values.length ) { + uiHash.value = this.values( index ); + uiHash.values = this.values(); + } + + //store the last changed value index for reference when handles overlap + this._lastChangedValue = index; + + this._trigger( "change", event, uiHash ); + } + }, + + value: function( newValue ) { + if ( arguments.length ) { + this.options.value = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, 0 ); + return; + } + + return this._value(); + }, + + values: function( index, newValue ) { + var vals, + newValues, + i; + + if ( arguments.length > 1 ) { + this.options.values[ index ] = this._trimAlignValue( newValue ); + this._refreshValue(); + this._change( null, index ); + return; + } + + if ( arguments.length ) { + if ( $.isArray( arguments[ 0 ] ) ) { + vals = this.options.values; + newValues = arguments[ 0 ]; + for ( i = 0; i < vals.length; i += 1 ) { + vals[ i ] = this._trimAlignValue( newValues[ i ] ); + this._change( null, i ); + } + this._refreshValue(); + } else { + if ( this.options.values && this.options.values.length ) { + return this._values( index ); + } else { + return this.value(); + } + } + } else { + return this._values(); + } + }, + + _setOption: function( key, value ) { + var i, + valsLength = 0; + + if ( key === "range" && this.options.range === true ) { + if ( value === "min" ) { + this.options.value = this._values( 0 ); + this.options.values = null; + } else if ( value === "max" ) { + this.options.value = this._values( this.options.values.length - 1 ); + this.options.values = null; + } + } + + if ( $.isArray( this.options.values ) ) { + valsLength = this.options.values.length; + } + + if ( key === "disabled" ) { + this.element.toggleClass( "ui-state-disabled", !!value ); + } + + this._super( key, value ); + + switch ( key ) { + case "orientation": + this._detectOrientation(); + this.element + .removeClass( "ui-slider-horizontal ui-slider-vertical" ) + .addClass( "ui-slider-" + this.orientation ); + this._refreshValue(); + + // Reset positioning from previous orientation + this.handles.css( value === "horizontal" ? "bottom" : "left", "" ); + break; + case "value": + this._animateOff = true; + this._refreshValue(); + this._change( null, 0 ); + this._animateOff = false; + break; + case "values": + this._animateOff = true; + this._refreshValue(); + for ( i = 0; i < valsLength; i += 1 ) { + this._change( null, i ); + } + this._animateOff = false; + break; + case "step": + case "min": + case "max": + this._animateOff = true; + this._calculateNewMax(); + this._refreshValue(); + this._animateOff = false; + break; + case "range": + this._animateOff = true; + this._refresh(); + this._animateOff = false; + break; + } + }, + + //internal value getter + // _value() returns value trimmed by min and max, aligned by step + _value: function() { + var val = this.options.value; + val = this._trimAlignValue( val ); + + return val; + }, + + //internal values getter + // _values() returns array of values trimmed by min and max, aligned by step + // _values( index ) returns single value trimmed by min and max, aligned by step + _values: function( index ) { + var val, + vals, + i; + + if ( arguments.length ) { + val = this.options.values[ index ]; + val = this._trimAlignValue( val ); + + return val; + } else if ( this.options.values && this.options.values.length ) { + // .slice() creates a copy of the array + // this copy gets trimmed by min and max and then returned + vals = this.options.values.slice(); + for ( i = 0; i < vals.length; i += 1) { + vals[ i ] = this._trimAlignValue( vals[ i ] ); + } + + return vals; + } else { + return []; + } + }, + + // returns the step-aligned value that val is closest to, between (inclusive) min and max + _trimAlignValue: function( val ) { + if ( val <= this._valueMin() ) { + return this._valueMin(); + } + if ( val >= this._valueMax() ) { + return this._valueMax(); + } + var step = ( this.options.step > 0 ) ? this.options.step : 1, + valModStep = (val - this._valueMin()) % step, + alignValue = val - valModStep; + + if ( Math.abs(valModStep) * 2 >= step ) { + alignValue += ( valModStep > 0 ) ? step : ( -step ); + } + + // Since JavaScript has problems with large floats, round + // the final value to 5 digits after the decimal point (see #4124) + return parseFloat( alignValue.toFixed(5) ); + }, + + _calculateNewMax: function() { + var max = this.options.max, + min = this._valueMin(), + step = this.options.step, + aboveMin = Math.floor( ( +( max - min ).toFixed( this._precision() ) ) / step ) * step; + max = aboveMin + min; + this.max = parseFloat( max.toFixed( this._precision() ) ); + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _valueMin: function() { + return this.options.min; + }, + + _valueMax: function() { + return this.max; + }, + + _refreshValue: function() { + var lastValPercent, valPercent, value, valueMin, valueMax, + oRange = this.options.range, + o = this.options, + that = this, + animate = ( !this._animateOff ) ? o.animate : false, + _set = {}; + + if ( this.options.values && this.options.values.length ) { + this.handles.each(function( i ) { + valPercent = ( that.values(i) - that._valueMin() ) / ( that._valueMax() - that._valueMin() ) * 100; + _set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + $( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + if ( that.options.range === true ) { + if ( that.orientation === "horizontal" ) { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { left: valPercent + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { width: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } else { + if ( i === 0 ) { + that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { bottom: ( valPercent ) + "%" }, o.animate ); + } + if ( i === 1 ) { + that.range[ animate ? "animate" : "css" ]( { height: ( valPercent - lastValPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + } + lastValPercent = valPercent; + }); + } else { + value = this.value(); + valueMin = this._valueMin(); + valueMax = this._valueMax(); + valPercent = ( valueMax !== valueMin ) ? + ( value - valueMin ) / ( valueMax - valueMin ) * 100 : + 0; + _set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%"; + this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate ); + + if ( oRange === "min" && this.orientation === "horizontal" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { width: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "horizontal" ) { + this.range[ animate ? "animate" : "css" ]( { width: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + if ( oRange === "min" && this.orientation === "vertical" ) { + this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( { height: valPercent + "%" }, o.animate ); + } + if ( oRange === "max" && this.orientation === "vertical" ) { + this.range[ animate ? "animate" : "css" ]( { height: ( 100 - valPercent ) + "%" }, { queue: false, duration: o.animate } ); + } + } + }, + + _handleEvents: { + keydown: function( event ) { + var allowed, curVal, newVal, step, + index = $( event.target ).data( "ui-slider-handle-index" ); + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + case $.ui.keyCode.END: + case $.ui.keyCode.PAGE_UP: + case $.ui.keyCode.PAGE_DOWN: + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + event.preventDefault(); + if ( !this._keySliding ) { + this._keySliding = true; + $( event.target ).addClass( "ui-state-active" ); + allowed = this._start( event, index ); + if ( allowed === false ) { + return; + } + } + break; + } + + step = this.options.step; + if ( this.options.values && this.options.values.length ) { + curVal = newVal = this.values( index ); + } else { + curVal = newVal = this.value(); + } + + switch ( event.keyCode ) { + case $.ui.keyCode.HOME: + newVal = this._valueMin(); + break; + case $.ui.keyCode.END: + newVal = this._valueMax(); + break; + case $.ui.keyCode.PAGE_UP: + newVal = this._trimAlignValue( + curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages ) + ); + break; + case $.ui.keyCode.PAGE_DOWN: + newVal = this._trimAlignValue( + curVal - ( (this._valueMax() - this._valueMin()) / this.numPages ) ); + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.RIGHT: + if ( curVal === this._valueMax() ) { + return; + } + newVal = this._trimAlignValue( curVal + step ); + break; + case $.ui.keyCode.DOWN: + case $.ui.keyCode.LEFT: + if ( curVal === this._valueMin() ) { + return; + } + newVal = this._trimAlignValue( curVal - step ); + break; + } + + this._slide( event, index, newVal ); + }, + keyup: function( event ) { + var index = $( event.target ).data( "ui-slider-handle-index" ); + + if ( this._keySliding ) { + this._keySliding = false; + this._stop( event, index ); + this._change( event, index ); + $( event.target ).removeClass( "ui-state-active" ); + } + } + } +}); + + +/*! + * jQuery UI Spinner 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/spinner/ + */ + + +function spinner_modifier( fn ) { + return function() { + var previous = this.element.val(); + fn.apply( this, arguments ); + this._refresh(); + if ( previous !== this.element.val() ) { + this._trigger( "change" ); + } + }; +} + +var spinner = $.widget( "ui.spinner", { + version: "1.11.4", + defaultElement: "<input>", + widgetEventPrefix: "spin", + options: { + culture: null, + icons: { + down: "ui-icon-triangle-1-s", + up: "ui-icon-triangle-1-n" + }, + incremental: true, + max: null, + min: null, + numberFormat: null, + page: 10, + step: 1, + + change: null, + spin: null, + start: null, + stop: null + }, + + _create: function() { + // handle string values that need to be parsed + this._setOption( "max", this.options.max ); + this._setOption( "min", this.options.min ); + this._setOption( "step", this.options.step ); + + // Only format if there is a value, prevents the field from being marked + // as invalid in Firefox, see #9573. + if ( this.value() !== "" ) { + // Format the value, but don't constrain. + this._value( this.element.val(), true ); + } + + this._draw(); + this._on( this._events ); + this._refresh(); + + // turning off autocomplete prevents the browser from remembering the + // value when navigating through history, so we re-enable autocomplete + // if the page is unloaded before the widget is destroyed. #7790 + this._on( this.window, { + beforeunload: function() { + this.element.removeAttr( "autocomplete" ); + } + }); + }, + + _getCreateOptions: function() { + var options = {}, + element = this.element; + + $.each( [ "min", "max", "step" ], function( i, option ) { + var value = element.attr( option ); + if ( value !== undefined && value.length ) { + options[ option ] = value; + } + }); + + return options; + }, + + _events: { + keydown: function( event ) { + if ( this._start( event ) && this._keydown( event ) ) { + event.preventDefault(); + } + }, + keyup: "_stop", + focus: function() { + this.previous = this.element.val(); + }, + blur: function( event ) { + if ( this.cancelBlur ) { + delete this.cancelBlur; + return; + } + + this._stop(); + this._refresh(); + if ( this.previous !== this.element.val() ) { + this._trigger( "change", event ); + } + }, + mousewheel: function( event, delta ) { + if ( !delta ) { + return; + } + if ( !this.spinning && !this._start( event ) ) { + return false; + } + + this._spin( (delta > 0 ? 1 : -1) * this.options.step, event ); + clearTimeout( this.mousewheelTimer ); + this.mousewheelTimer = this._delay(function() { + if ( this.spinning ) { + this._stop( event ); + } + }, 100 ); + event.preventDefault(); + }, + "mousedown .ui-spinner-button": function( event ) { + var previous; + + // We never want the buttons to have focus; whenever the user is + // interacting with the spinner, the focus should be on the input. + // If the input is focused then this.previous is properly set from + // when the input first received focus. If the input is not focused + // then we need to set this.previous based on the value before spinning. + previous = this.element[0] === this.document[0].activeElement ? + this.previous : this.element.val(); + function checkFocus() { + var isActive = this.element[0] === this.document[0].activeElement; + if ( !isActive ) { + this.element.focus(); + this.previous = previous; + // support: IE + // IE sets focus asynchronously, so we need to check if focus + // moved off of the input because the user clicked on the button. + this._delay(function() { + this.previous = previous; + }); + } + } + + // ensure focus is on (or stays on) the text field + event.preventDefault(); + checkFocus.call( this ); + + // support: IE + // IE doesn't prevent moving focus even with event.preventDefault() + // so we set a flag to know when we should ignore the blur event + // and check (again) if focus moved off of the input. + this.cancelBlur = true; + this._delay(function() { + delete this.cancelBlur; + checkFocus.call( this ); + }); + + if ( this._start( event ) === false ) { + return; + } + + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + "mouseup .ui-spinner-button": "_stop", + "mouseenter .ui-spinner-button": function( event ) { + // button will add ui-state-active if mouse was down while mouseleave and kept down + if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) { + return; + } + + if ( this._start( event ) === false ) { + return false; + } + this._repeat( null, $( event.currentTarget ).hasClass( "ui-spinner-up" ) ? 1 : -1, event ); + }, + // TODO: do we really want to consider this a stop? + // shouldn't we just stop the repeater and wait until mouseup before + // we trigger the stop event? + "mouseleave .ui-spinner-button": "_stop" + }, + + _draw: function() { + var uiSpinner = this.uiSpinner = this.element + .addClass( "ui-spinner-input" ) + .attr( "autocomplete", "off" ) + .wrap( this._uiSpinnerHtml() ) + .parent() + // add buttons + .append( this._buttonHtml() ); + + this.element.attr( "role", "spinbutton" ); + + // button bindings + this.buttons = uiSpinner.find( ".ui-spinner-button" ) + .attr( "tabIndex", -1 ) + .button() + .removeClass( "ui-corner-all" ); + + // IE 6 doesn't understand height: 50% for the buttons + // unless the wrapper has an explicit height + if ( this.buttons.height() > Math.ceil( uiSpinner.height() * 0.5 ) && + uiSpinner.height() > 0 ) { + uiSpinner.height( uiSpinner.height() ); + } + + // disable spinner if element was already disabled + if ( this.options.disabled ) { + this.disable(); + } + }, + + _keydown: function( event ) { + var options = this.options, + keyCode = $.ui.keyCode; + + switch ( event.keyCode ) { + case keyCode.UP: + this._repeat( null, 1, event ); + return true; + case keyCode.DOWN: + this._repeat( null, -1, event ); + return true; + case keyCode.PAGE_UP: + this._repeat( null, options.page, event ); + return true; + case keyCode.PAGE_DOWN: + this._repeat( null, -options.page, event ); + return true; + } + + return false; + }, + + _uiSpinnerHtml: function() { + return "<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"; + }, + + _buttonHtml: function() { + return "" + + "<a class='ui-spinner-button ui-spinner-up ui-corner-tr'>" + + "<span class='ui-icon " + this.options.icons.up + "'>▲</span>" + + "</a>" + + "<a class='ui-spinner-button ui-spinner-down ui-corner-br'>" + + "<span class='ui-icon " + this.options.icons.down + "'>▼</span>" + + "</a>"; + }, + + _start: function( event ) { + if ( !this.spinning && this._trigger( "start", event ) === false ) { + return false; + } + + if ( !this.counter ) { + this.counter = 1; + } + this.spinning = true; + return true; + }, + + _repeat: function( i, steps, event ) { + i = i || 500; + + clearTimeout( this.timer ); + this.timer = this._delay(function() { + this._repeat( 40, steps, event ); + }, i ); + + this._spin( steps * this.options.step, event ); + }, + + _spin: function( step, event ) { + var value = this.value() || 0; + + if ( !this.counter ) { + this.counter = 1; + } + + value = this._adjustValue( value + step * this._increment( this.counter ) ); + + if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false) { + this._value( value ); + this.counter++; + } + }, + + _increment: function( i ) { + var incremental = this.options.incremental; + + if ( incremental ) { + return $.isFunction( incremental ) ? + incremental( i ) : + Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 ); + } + + return 1; + }, + + _precision: function() { + var precision = this._precisionOf( this.options.step ); + if ( this.options.min !== null ) { + precision = Math.max( precision, this._precisionOf( this.options.min ) ); + } + return precision; + }, + + _precisionOf: function( num ) { + var str = num.toString(), + decimal = str.indexOf( "." ); + return decimal === -1 ? 0 : str.length - decimal - 1; + }, + + _adjustValue: function( value ) { + var base, aboveMin, + options = this.options; + + // make sure we're at a valid step + // - find out where we are relative to the base (min or 0) + base = options.min !== null ? options.min : 0; + aboveMin = value - base; + // - round to the nearest step + aboveMin = Math.round(aboveMin / options.step) * options.step; + // - rounding is based on 0, so adjust back to our base + value = base + aboveMin; + + // fix precision from bad JS floating point math + value = parseFloat( value.toFixed( this._precision() ) ); + + // clamp the value + if ( options.max !== null && value > options.max) { + return options.max; + } + if ( options.min !== null && value < options.min ) { + return options.min; + } + + return value; + }, + + _stop: function( event ) { + if ( !this.spinning ) { + return; + } + + clearTimeout( this.timer ); + clearTimeout( this.mousewheelTimer ); + this.counter = 0; + this.spinning = false; + this._trigger( "stop", event ); + }, + + _setOption: function( key, value ) { + if ( key === "culture" || key === "numberFormat" ) { + var prevValue = this._parse( this.element.val() ); + this.options[ key ] = value; + this.element.val( this._format( prevValue ) ); + return; + } + + if ( key === "max" || key === "min" || key === "step" ) { + if ( typeof value === "string" ) { + value = this._parse( value ); + } + } + if ( key === "icons" ) { + this.buttons.first().find( ".ui-icon" ) + .removeClass( this.options.icons.up ) + .addClass( value.up ); + this.buttons.last().find( ".ui-icon" ) + .removeClass( this.options.icons.down ) + .addClass( value.down ); + } + + this._super( key, value ); + + if ( key === "disabled" ) { + this.widget().toggleClass( "ui-state-disabled", !!value ); + this.element.prop( "disabled", !!value ); + this.buttons.button( value ? "disable" : "enable" ); + } + }, + + _setOptions: spinner_modifier(function( options ) { + this._super( options ); + }), + + _parse: function( val ) { + if ( typeof val === "string" && val !== "" ) { + val = window.Globalize && this.options.numberFormat ? + Globalize.parseFloat( val, 10, this.options.culture ) : +val; + } + return val === "" || isNaN( val ) ? null : val; + }, + + _format: function( value ) { + if ( value === "" ) { + return ""; + } + return window.Globalize && this.options.numberFormat ? + Globalize.format( value, this.options.numberFormat, this.options.culture ) : + value; + }, + + _refresh: function() { + this.element.attr({ + "aria-valuemin": this.options.min, + "aria-valuemax": this.options.max, + // TODO: what should we do with values that can't be parsed? + "aria-valuenow": this._parse( this.element.val() ) + }); + }, + + isValid: function() { + var value = this.value(); + + // null is invalid + if ( value === null ) { + return false; + } + + // if value gets adjusted, it's invalid + return value === this._adjustValue( value ); + }, + + // update the value without triggering change + _value: function( value, allowAny ) { + var parsed; + if ( value !== "" ) { + parsed = this._parse( value ); + if ( parsed !== null ) { + if ( !allowAny ) { + parsed = this._adjustValue( parsed ); + } + value = this._format( parsed ); + } + } + this.element.val( value ); + this._refresh(); + }, + + _destroy: function() { + this.element + .removeClass( "ui-spinner-input" ) + .prop( "disabled", false ) + .removeAttr( "autocomplete" ) + .removeAttr( "role" ) + .removeAttr( "aria-valuemin" ) + .removeAttr( "aria-valuemax" ) + .removeAttr( "aria-valuenow" ); + this.uiSpinner.replaceWith( this.element ); + }, + + stepUp: spinner_modifier(function( steps ) { + this._stepUp( steps ); + }), + _stepUp: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * this.options.step ); + this._stop(); + } + }, + + stepDown: spinner_modifier(function( steps ) { + this._stepDown( steps ); + }), + _stepDown: function( steps ) { + if ( this._start() ) { + this._spin( (steps || 1) * -this.options.step ); + this._stop(); + } + }, + + pageUp: spinner_modifier(function( pages ) { + this._stepUp( (pages || 1) * this.options.page ); + }), + + pageDown: spinner_modifier(function( pages ) { + this._stepDown( (pages || 1) * this.options.page ); + }), + + value: function( newVal ) { + if ( !arguments.length ) { + return this._parse( this.element.val() ); + } + spinner_modifier( this._value ).call( this, newVal ); + }, + + widget: function() { + return this.uiSpinner; + } +}); + + +/*! + * jQuery UI Tabs 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tabs/ + */ + + +var tabs = $.widget( "ui.tabs", { + version: "1.11.4", + delay: 300, + options: { + active: null, + collapsible: false, + event: "click", + heightStyle: "content", + hide: null, + show: null, + + // callbacks + activate: null, + beforeActivate: null, + beforeLoad: null, + load: null + }, + + _isLocal: (function() { + var rhash = /#.*$/; + + return function( anchor ) { + var anchorUrl, locationUrl; + + // support: IE7 + // IE7 doesn't normalize the href property when set via script (#9317) + anchor = anchor.cloneNode( false ); + + anchorUrl = anchor.href.replace( rhash, "" ); + locationUrl = location.href.replace( rhash, "" ); + + // decoding may throw an error if the URL isn't UTF-8 (#9518) + try { + anchorUrl = decodeURIComponent( anchorUrl ); + } catch ( error ) {} + try { + locationUrl = decodeURIComponent( locationUrl ); + } catch ( error ) {} + + return anchor.hash.length > 1 && anchorUrl === locationUrl; + }; + })(), + + _create: function() { + var that = this, + options = this.options; + + this.running = false; + + this.element + .addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ) + .toggleClass( "ui-tabs-collapsible", options.collapsible ); + + this._processTabs(); + options.active = this._initialActive(); + + // Take disabling tabs via class attribute from HTML + // into account and update option properly. + if ( $.isArray( options.disabled ) ) { + options.disabled = $.unique( options.disabled.concat( + $.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) { + return that.tabs.index( li ); + }) + ) ).sort(); + } + + // check for length avoids error when initializing empty list + if ( this.options.active !== false && this.anchors.length ) { + this.active = this._findActive( options.active ); + } else { + this.active = $(); + } + + this._refresh(); + + if ( this.active.length ) { + this.load( options.active ); + } + }, + + _initialActive: function() { + var active = this.options.active, + collapsible = this.options.collapsible, + locationHash = location.hash.substring( 1 ); + + if ( active === null ) { + // check the fragment identifier in the URL + if ( locationHash ) { + this.tabs.each(function( i, tab ) { + if ( $( tab ).attr( "aria-controls" ) === locationHash ) { + active = i; + return false; + } + }); + } + + // check for a tab marked active via a class + if ( active === null ) { + active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) ); + } + + // no active tab, set to false + if ( active === null || active === -1 ) { + active = this.tabs.length ? 0 : false; + } + } + + // handle numbers: negative, out of range + if ( active !== false ) { + active = this.tabs.index( this.tabs.eq( active ) ); + if ( active === -1 ) { + active = collapsible ? false : 0; + } + } + + // don't allow collapsible: false and active: false + if ( !collapsible && active === false && this.anchors.length ) { + active = 0; + } + + return active; + }, + + _getCreateEventData: function() { + return { + tab: this.active, + panel: !this.active.length ? $() : this._getPanelForTab( this.active ) + }; + }, + + _tabKeydown: function( event ) { + var focusedTab = $( this.document[0].activeElement ).closest( "li" ), + selectedIndex = this.tabs.index( focusedTab ), + goingForward = true; + + if ( this._handlePageNav( event ) ) { + return; + } + + switch ( event.keyCode ) { + case $.ui.keyCode.RIGHT: + case $.ui.keyCode.DOWN: + selectedIndex++; + break; + case $.ui.keyCode.UP: + case $.ui.keyCode.LEFT: + goingForward = false; + selectedIndex--; + break; + case $.ui.keyCode.END: + selectedIndex = this.anchors.length - 1; + break; + case $.ui.keyCode.HOME: + selectedIndex = 0; + break; + case $.ui.keyCode.SPACE: + // Activate only, no collapsing + event.preventDefault(); + clearTimeout( this.activating ); + this._activate( selectedIndex ); + return; + case $.ui.keyCode.ENTER: + // Toggle (cancel delayed activation, allow collapsing) + event.preventDefault(); + clearTimeout( this.activating ); + // Determine if we should collapse or activate + this._activate( selectedIndex === this.options.active ? false : selectedIndex ); + return; + default: + return; + } + + // Focus the appropriate tab, based on which key was pressed + event.preventDefault(); + clearTimeout( this.activating ); + selectedIndex = this._focusNextTab( selectedIndex, goingForward ); + + // Navigating with control/command key will prevent automatic activation + if ( !event.ctrlKey && !event.metaKey ) { + + // Update aria-selected immediately so that AT think the tab is already selected. + // Otherwise AT may confuse the user by stating that they need to activate the tab, + // but the tab will already be activated by the time the announcement finishes. + focusedTab.attr( "aria-selected", "false" ); + this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" ); + + this.activating = this._delay(function() { + this.option( "active", selectedIndex ); + }, this.delay ); + } + }, + + _panelKeydown: function( event ) { + if ( this._handlePageNav( event ) ) { + return; + } + + // Ctrl+up moves focus to the current tab + if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) { + event.preventDefault(); + this.active.focus(); + } + }, + + // Alt+page up/down moves focus to the previous/next tab (and activates) + _handlePageNav: function( event ) { + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) { + this._activate( this._focusNextTab( this.options.active - 1, false ) ); + return true; + } + if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) { + this._activate( this._focusNextTab( this.options.active + 1, true ) ); + return true; + } + }, + + _findNextTab: function( index, goingForward ) { + var lastTabIndex = this.tabs.length - 1; + + function constrain() { + if ( index > lastTabIndex ) { + index = 0; + } + if ( index < 0 ) { + index = lastTabIndex; + } + return index; + } + + while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) { + index = goingForward ? index + 1 : index - 1; + } + + return index; + }, + + _focusNextTab: function( index, goingForward ) { + index = this._findNextTab( index, goingForward ); + this.tabs.eq( index ).focus(); + return index; + }, + + _setOption: function( key, value ) { + if ( key === "active" ) { + // _activate() will handle invalid values and update this.options + this._activate( value ); + return; + } + + if ( key === "disabled" ) { + // don't use the widget factory's disabled handling + this._setupDisabled( value ); + return; + } + + this._super( key, value); + + if ( key === "collapsible" ) { + this.element.toggleClass( "ui-tabs-collapsible", value ); + // Setting collapsible: false while collapsed; open first panel + if ( !value && this.options.active === false ) { + this._activate( 0 ); + } + } + + if ( key === "event" ) { + this._setupEvents( value ); + } + + if ( key === "heightStyle" ) { + this._setupHeightStyle( value ); + } + }, + + _sanitizeSelector: function( hash ) { + return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : ""; + }, + + refresh: function() { + var options = this.options, + lis = this.tablist.children( ":has(a[href])" ); + + // get disabled tabs from class attribute from HTML + // this will get converted to a boolean if needed in _refresh() + options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) { + return lis.index( tab ); + }); + + this._processTabs(); + + // was collapsed or no tabs + if ( options.active === false || !this.anchors.length ) { + options.active = false; + this.active = $(); + // was active, but active tab is gone + } else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) { + // all remaining tabs are disabled + if ( this.tabs.length === options.disabled.length ) { + options.active = false; + this.active = $(); + // activate previous tab + } else { + this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) ); + } + // was active, active tab still exists + } else { + // make sure active index is correct + options.active = this.tabs.index( this.active ); + } + + this._refresh(); + }, + + _refresh: function() { + this._setupDisabled( this.options.disabled ); + this._setupEvents( this.options.event ); + this._setupHeightStyle( this.options.heightStyle ); + + this.tabs.not( this.active ).attr({ + "aria-selected": "false", + "aria-expanded": "false", + tabIndex: -1 + }); + this.panels.not( this._getPanelForTab( this.active ) ) + .hide() + .attr({ + "aria-hidden": "true" + }); + + // Make sure one tab is in the tab order + if ( !this.active.length ) { + this.tabs.eq( 0 ).attr( "tabIndex", 0 ); + } else { + this.active + .addClass( "ui-tabs-active ui-state-active" ) + .attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + this._getPanelForTab( this.active ) + .show() + .attr({ + "aria-hidden": "false" + }); + } + }, + + _processTabs: function() { + var that = this, + prevTabs = this.tabs, + prevAnchors = this.anchors, + prevPanels = this.panels; + + this.tablist = this._getList() + .addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .attr( "role", "tablist" ) + + // Prevent users from focusing disabled tabs via click + .delegate( "> li", "mousedown" + this.eventNamespace, function( event ) { + if ( $( this ).is( ".ui-state-disabled" ) ) { + event.preventDefault(); + } + }) + + // support: IE <9 + // Preventing the default action in mousedown doesn't prevent IE + // from focusing the element, so if the anchor gets focused, blur. + // We don't have to worry about focusing the previously focused + // element since clicking on a non-focusable element should focus + // the body anyway. + .delegate( ".ui-tabs-anchor", "focus" + this.eventNamespace, function() { + if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) { + this.blur(); + } + }); + + this.tabs = this.tablist.find( "> li:has(a[href])" ) + .addClass( "ui-state-default ui-corner-top" ) + .attr({ + role: "tab", + tabIndex: -1 + }); + + this.anchors = this.tabs.map(function() { + return $( "a", this )[ 0 ]; + }) + .addClass( "ui-tabs-anchor" ) + .attr({ + role: "presentation", + tabIndex: -1 + }); + + this.panels = $(); + + this.anchors.each(function( i, anchor ) { + var selector, panel, panelId, + anchorId = $( anchor ).uniqueId().attr( "id" ), + tab = $( anchor ).closest( "li" ), + originalAriaControls = tab.attr( "aria-controls" ); + + // inline tab + if ( that._isLocal( anchor ) ) { + selector = anchor.hash; + panelId = selector.substring( 1 ); + panel = that.element.find( that._sanitizeSelector( selector ) ); + // remote tab + } else { + // If the tab doesn't already have aria-controls, + // generate an id by using a throw-away element + panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id; + selector = "#" + panelId; + panel = that.element.find( selector ); + if ( !panel.length ) { + panel = that._createPanel( panelId ); + panel.insertAfter( that.panels[ i - 1 ] || that.tablist ); + } + panel.attr( "aria-live", "polite" ); + } + + if ( panel.length) { + that.panels = that.panels.add( panel ); + } + if ( originalAriaControls ) { + tab.data( "ui-tabs-aria-controls", originalAriaControls ); + } + tab.attr({ + "aria-controls": panelId, + "aria-labelledby": anchorId + }); + panel.attr( "aria-labelledby", anchorId ); + }); + + this.panels + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .attr( "role", "tabpanel" ); + + // Avoid memory leaks (#10056) + if ( prevTabs ) { + this._off( prevTabs.not( this.tabs ) ); + this._off( prevAnchors.not( this.anchors ) ); + this._off( prevPanels.not( this.panels ) ); + } + }, + + // allow overriding how to find the list for rare usage scenarios (#7715) + _getList: function() { + return this.tablist || this.element.find( "ol,ul" ).eq( 0 ); + }, + + _createPanel: function( id ) { + return $( "<div>" ) + .attr( "id", id ) + .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) + .data( "ui-tabs-destroy", true ); + }, + + _setupDisabled: function( disabled ) { + if ( $.isArray( disabled ) ) { + if ( !disabled.length ) { + disabled = false; + } else if ( disabled.length === this.anchors.length ) { + disabled = true; + } + } + + // disable tabs + for ( var i = 0, li; ( li = this.tabs[ i ] ); i++ ) { + if ( disabled === true || $.inArray( i, disabled ) !== -1 ) { + $( li ) + .addClass( "ui-state-disabled" ) + .attr( "aria-disabled", "true" ); + } else { + $( li ) + .removeClass( "ui-state-disabled" ) + .removeAttr( "aria-disabled" ); + } + } + + this.options.disabled = disabled; + }, + + _setupEvents: function( event ) { + var events = {}; + if ( event ) { + $.each( event.split(" "), function( index, eventName ) { + events[ eventName ] = "_eventHandler"; + }); + } + + this._off( this.anchors.add( this.tabs ).add( this.panels ) ); + // Always prevent the default action, even when disabled + this._on( true, this.anchors, { + click: function( event ) { + event.preventDefault(); + } + }); + this._on( this.anchors, events ); + this._on( this.tabs, { keydown: "_tabKeydown" } ); + this._on( this.panels, { keydown: "_panelKeydown" } ); + + this._focusable( this.tabs ); + this._hoverable( this.tabs ); + }, + + _setupHeightStyle: function( heightStyle ) { + var maxHeight, + parent = this.element.parent(); + + if ( heightStyle === "fill" ) { + maxHeight = parent.height(); + maxHeight -= this.element.outerHeight() - this.element.height(); + + this.element.siblings( ":visible" ).each(function() { + var elem = $( this ), + position = elem.css( "position" ); + + if ( position === "absolute" || position === "fixed" ) { + return; + } + maxHeight -= elem.outerHeight( true ); + }); + + this.element.children().not( this.panels ).each(function() { + maxHeight -= $( this ).outerHeight( true ); + }); + + this.panels.each(function() { + $( this ).height( Math.max( 0, maxHeight - + $( this ).innerHeight() + $( this ).height() ) ); + }) + .css( "overflow", "auto" ); + } else if ( heightStyle === "auto" ) { + maxHeight = 0; + this.panels.each(function() { + maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() ); + }).height( maxHeight ); + } + }, + + _eventHandler: function( event ) { + var options = this.options, + active = this.active, + anchor = $( event.currentTarget ), + tab = anchor.closest( "li" ), + clickedIsActive = tab[ 0 ] === active[ 0 ], + collapsing = clickedIsActive && options.collapsible, + toShow = collapsing ? $() : this._getPanelForTab( tab ), + toHide = !active.length ? $() : this._getPanelForTab( active ), + eventData = { + oldTab: active, + oldPanel: toHide, + newTab: collapsing ? $() : tab, + newPanel: toShow + }; + + event.preventDefault(); + + if ( tab.hasClass( "ui-state-disabled" ) || + // tab is already loading + tab.hasClass( "ui-tabs-loading" ) || + // can't switch durning an animation + this.running || + // click on active header, but not collapsible + ( clickedIsActive && !options.collapsible ) || + // allow canceling activation + ( this._trigger( "beforeActivate", event, eventData ) === false ) ) { + return; + } + + options.active = collapsing ? false : this.tabs.index( tab ); + + this.active = clickedIsActive ? $() : tab; + if ( this.xhr ) { + this.xhr.abort(); + } + + if ( !toHide.length && !toShow.length ) { + $.error( "jQuery UI Tabs: Mismatching fragment identifier." ); + } + + if ( toShow.length ) { + this.load( this.tabs.index( tab ), event ); + } + this._toggle( event, eventData ); + }, + + // handles show/hide for selecting tabs + _toggle: function( event, eventData ) { + var that = this, + toShow = eventData.newPanel, + toHide = eventData.oldPanel; + + this.running = true; + + function complete() { + that.running = false; + that._trigger( "activate", event, eventData ); + } + + function show() { + eventData.newTab.closest( "li" ).addClass( "ui-tabs-active ui-state-active" ); + + if ( toShow.length && that.options.show ) { + that._show( toShow, that.options.show, complete ); + } else { + toShow.show(); + complete(); + } + } + + // start out by hiding, then showing, then completing + if ( toHide.length && this.options.hide ) { + this._hide( toHide, this.options.hide, function() { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + show(); + }); + } else { + eventData.oldTab.closest( "li" ).removeClass( "ui-tabs-active ui-state-active" ); + toHide.hide(); + show(); + } + + toHide.attr( "aria-hidden", "true" ); + eventData.oldTab.attr({ + "aria-selected": "false", + "aria-expanded": "false" + }); + // If we're switching tabs, remove the old tab from the tab order. + // If we're opening from collapsed state, remove the previous tab from the tab order. + // If we're collapsing, then keep the collapsing tab in the tab order. + if ( toShow.length && toHide.length ) { + eventData.oldTab.attr( "tabIndex", -1 ); + } else if ( toShow.length ) { + this.tabs.filter(function() { + return $( this ).attr( "tabIndex" ) === 0; + }) + .attr( "tabIndex", -1 ); + } + + toShow.attr( "aria-hidden", "false" ); + eventData.newTab.attr({ + "aria-selected": "true", + "aria-expanded": "true", + tabIndex: 0 + }); + }, + + _activate: function( index ) { + var anchor, + active = this._findActive( index ); + + // trying to activate the already active panel + if ( active[ 0 ] === this.active[ 0 ] ) { + return; + } + + // trying to collapse, simulate a click on the current active header + if ( !active.length ) { + active = this.active; + } + + anchor = active.find( ".ui-tabs-anchor" )[ 0 ]; + this._eventHandler({ + target: anchor, + currentTarget: anchor, + preventDefault: $.noop + }); + }, + + _findActive: function( index ) { + return index === false ? $() : this.tabs.eq( index ); + }, + + _getIndex: function( index ) { + // meta-function to give users option to provide a href string instead of a numerical index. + if ( typeof index === "string" ) { + index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) ); + } + + return index; + }, + + _destroy: function() { + if ( this.xhr ) { + this.xhr.abort(); + } + + this.element.removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ); + + this.tablist + .removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ) + .removeAttr( "role" ); + + this.anchors + .removeClass( "ui-tabs-anchor" ) + .removeAttr( "role" ) + .removeAttr( "tabIndex" ) + .removeUniqueId(); + + this.tablist.unbind( this.eventNamespace ); + + this.tabs.add( this.panels ).each(function() { + if ( $.data( this, "ui-tabs-destroy" ) ) { + $( this ).remove(); + } else { + $( this ) + .removeClass( "ui-state-default ui-state-active ui-state-disabled " + + "ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel" ) + .removeAttr( "tabIndex" ) + .removeAttr( "aria-live" ) + .removeAttr( "aria-busy" ) + .removeAttr( "aria-selected" ) + .removeAttr( "aria-labelledby" ) + .removeAttr( "aria-hidden" ) + .removeAttr( "aria-expanded" ) + .removeAttr( "role" ); + } + }); + + this.tabs.each(function() { + var li = $( this ), + prev = li.data( "ui-tabs-aria-controls" ); + if ( prev ) { + li + .attr( "aria-controls", prev ) + .removeData( "ui-tabs-aria-controls" ); + } else { + li.removeAttr( "aria-controls" ); + } + }); + + this.panels.show(); + + if ( this.options.heightStyle !== "content" ) { + this.panels.css( "height", "" ); + } + }, + + enable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === false ) { + return; + } + + if ( index === undefined ) { + disabled = false; + } else { + index = this._getIndex( index ); + if ( $.isArray( disabled ) ) { + disabled = $.map( disabled, function( num ) { + return num !== index ? num : null; + }); + } else { + disabled = $.map( this.tabs, function( li, num ) { + return num !== index ? num : null; + }); + } + } + this._setupDisabled( disabled ); + }, + + disable: function( index ) { + var disabled = this.options.disabled; + if ( disabled === true ) { + return; + } + + if ( index === undefined ) { + disabled = true; + } else { + index = this._getIndex( index ); + if ( $.inArray( index, disabled ) !== -1 ) { + return; + } + if ( $.isArray( disabled ) ) { + disabled = $.merge( [ index ], disabled ).sort(); + } else { + disabled = [ index ]; + } + } + this._setupDisabled( disabled ); + }, + + load: function( index, event ) { + index = this._getIndex( index ); + var that = this, + tab = this.tabs.eq( index ), + anchor = tab.find( ".ui-tabs-anchor" ), + panel = this._getPanelForTab( tab ), + eventData = { + tab: tab, + panel: panel + }, + complete = function( jqXHR, status ) { + if ( status === "abort" ) { + that.panels.stop( false, true ); + } + + tab.removeClass( "ui-tabs-loading" ); + panel.removeAttr( "aria-busy" ); + + if ( jqXHR === that.xhr ) { + delete that.xhr; + } + }; + + // not remote + if ( this._isLocal( anchor[ 0 ] ) ) { + return; + } + + this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) ); + + // support: jQuery <1.8 + // jQuery <1.8 returns false if the request is canceled in beforeSend, + // but as of 1.8, $.ajax() always returns a jqXHR object. + if ( this.xhr && this.xhr.statusText !== "canceled" ) { + tab.addClass( "ui-tabs-loading" ); + panel.attr( "aria-busy", "true" ); + + this.xhr + .done(function( response, status, jqXHR ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + panel.html( response ); + that._trigger( "load", event, eventData ); + + complete( jqXHR, status ); + }, 1 ); + }) + .fail(function( jqXHR, status ) { + // support: jQuery <1.8 + // http://bugs.jquery.com/ticket/11778 + setTimeout(function() { + complete( jqXHR, status ); + }, 1 ); + }); + } + }, + + _ajaxSettings: function( anchor, event, eventData ) { + var that = this; + return { + url: anchor.attr( "href" ), + beforeSend: function( jqXHR, settings ) { + return that._trigger( "beforeLoad", event, + $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) ); + } + }; + }, + + _getPanelForTab: function( tab ) { + var id = $( tab ).attr( "aria-controls" ); + return this.element.find( this._sanitizeSelector( "#" + id ) ); + } +}); + + +/*! + * jQuery UI Tooltip 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/tooltip/ + */ + + +var tooltip = $.widget( "ui.tooltip", { + version: "1.11.4", + options: { + content: function() { + // support: IE<9, Opera in jQuery <1.7 + // .text() can't accept undefined, so coerce to a string + var title = $( this ).attr( "title" ) || ""; + // Escape title, since we're going from an attribute to raw HTML + return $( "<a>" ).text( title ).html(); + }, + hide: true, + // Disabled elements have inconsistent behavior across browsers (#8661) + items: "[title]:not([disabled])", + position: { + my: "left top+15", + at: "left bottom", + collision: "flipfit flip" + }, + show: true, + tooltipClass: null, + track: false, + + // callbacks + close: null, + open: null + }, + + _addDescribedBy: function( elem, id ) { + var describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ); + describedby.push( id ); + elem + .data( "ui-tooltip-id", id ) + .attr( "aria-describedby", $.trim( describedby.join( " " ) ) ); + }, + + _removeDescribedBy: function( elem ) { + var id = elem.data( "ui-tooltip-id" ), + describedby = (elem.attr( "aria-describedby" ) || "").split( /\s+/ ), + index = $.inArray( id, describedby ); + + if ( index !== -1 ) { + describedby.splice( index, 1 ); + } + + elem.removeData( "ui-tooltip-id" ); + describedby = $.trim( describedby.join( " " ) ); + if ( describedby ) { + elem.attr( "aria-describedby", describedby ); + } else { + elem.removeAttr( "aria-describedby" ); + } + }, + + _create: function() { + this._on({ + mouseover: "open", + focusin: "open" + }); + + // IDs of generated tooltips, needed for destroy + this.tooltips = {}; + + // IDs of parent tooltips where we removed the title attribute + this.parents = {}; + + if ( this.options.disabled ) { + this._disable(); + } + + // Append the aria-live region so tooltips announce correctly + this.liveRegion = $( "<div>" ) + .attr({ + role: "log", + "aria-live": "assertive", + "aria-relevant": "additions" + }) + .addClass( "ui-helper-hidden-accessible" ) + .appendTo( this.document[ 0 ].body ); + }, + + _setOption: function( key, value ) { + var that = this; + + if ( key === "disabled" ) { + this[ value ? "_disable" : "_enable" ](); + this.options[ key ] = value; + // disable element style changes + return; + } + + this._super( key, value ); + + if ( key === "content" ) { + $.each( this.tooltips, function( id, tooltipData ) { + that._updateContent( tooltipData.element ); + }); + } + }, + + _disable: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + var event = $.Event( "blur" ); + event.target = event.currentTarget = tooltipData.element[ 0 ]; + that.close( event, true ); + }); + + // remove title attributes to prevent native tooltips + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.is( "[title]" ) ) { + element + .data( "ui-tooltip-title", element.attr( "title" ) ) + .removeAttr( "title" ); + } + }); + }, + + _enable: function() { + // restore title attributes + this.element.find( this.options.items ).addBack().each(function() { + var element = $( this ); + if ( element.data( "ui-tooltip-title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + }); + }, + + open: function( event ) { + var that = this, + target = $( event ? event.target : this.element ) + // we need closest here due to mouseover bubbling, + // but always pointing at the same event target + .closest( this.options.items ); + + // No element to show a tooltip for or the tooltip is already open + if ( !target.length || target.data( "ui-tooltip-id" ) ) { + return; + } + + if ( target.attr( "title" ) ) { + target.data( "ui-tooltip-title", target.attr( "title" ) ); + } + + target.data( "ui-tooltip-open", true ); + + // kill parent tooltips, custom or native, for hover + if ( event && event.type === "mouseover" ) { + target.parents().each(function() { + var parent = $( this ), + blurEvent; + if ( parent.data( "ui-tooltip-open" ) ) { + blurEvent = $.Event( "blur" ); + blurEvent.target = blurEvent.currentTarget = this; + that.close( blurEvent, true ); + } + if ( parent.attr( "title" ) ) { + parent.uniqueId(); + that.parents[ this.id ] = { + element: this, + title: parent.attr( "title" ) + }; + parent.attr( "title", "" ); + } + }); + } + + this._registerCloseHandlers( event, target ); + this._updateContent( target, event ); + }, + + _updateContent: function( target, event ) { + var content, + contentOption = this.options.content, + that = this, + eventType = event ? event.type : null; + + if ( typeof contentOption === "string" ) { + return this._open( event, target, contentOption ); + } + + content = contentOption.call( target[0], function( response ) { + + // IE may instantly serve a cached response for ajax requests + // delay this call to _open so the other call to _open runs first + that._delay(function() { + + // Ignore async response if tooltip was closed already + if ( !target.data( "ui-tooltip-open" ) ) { + return; + } + + // jQuery creates a special event for focusin when it doesn't + // exist natively. To improve performance, the native event + // object is reused and the type is changed. Therefore, we can't + // rely on the type being correct after the event finished + // bubbling, so we set it back to the previous value. (#8740) + if ( event ) { + event.type = eventType; + } + this._open( event, target, response ); + }); + }); + if ( content ) { + this._open( event, target, content ); + } + }, + + _open: function( event, target, content ) { + var tooltipData, tooltip, delayedShow, a11yContent, + positionOption = $.extend( {}, this.options.position ); + + if ( !content ) { + return; + } + + // Content can be updated multiple times. If the tooltip already + // exists, then just update the content and bail. + tooltipData = this._find( target ); + if ( tooltipData ) { + tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content ); + return; + } + + // if we have a title, clear it to prevent the native tooltip + // we have to check first to avoid defining a title if none exists + // (we don't want to cause an element to start matching [title]) + // + // We use removeAttr only for key events, to allow IE to export the correct + // accessible attributes. For mouse events, set to empty string to avoid + // native tooltip showing up (happens only when removing inside mouseover). + if ( target.is( "[title]" ) ) { + if ( event && event.type === "mouseover" ) { + target.attr( "title", "" ); + } else { + target.removeAttr( "title" ); + } + } + + tooltipData = this._tooltip( target ); + tooltip = tooltipData.tooltip; + this._addDescribedBy( target, tooltip.attr( "id" ) ); + tooltip.find( ".ui-tooltip-content" ).html( content ); + + // Support: Voiceover on OS X, JAWS on IE <= 9 + // JAWS announces deletions even when aria-relevant="additions" + // Voiceover will sometimes re-read the entire log region's contents from the beginning + this.liveRegion.children().hide(); + if ( content.clone ) { + a11yContent = content.clone(); + a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" ); + } else { + a11yContent = content; + } + $( "<div>" ).html( a11yContent ).appendTo( this.liveRegion ); + + function position( event ) { + positionOption.of = event; + if ( tooltip.is( ":hidden" ) ) { + return; + } + tooltip.position( positionOption ); + } + if ( this.options.track && event && /^mouse/.test( event.type ) ) { + this._on( this.document, { + mousemove: position + }); + // trigger once to override element-relative positioning + position( event ); + } else { + tooltip.position( $.extend({ + of: target + }, this.options.position ) ); + } + + tooltip.hide(); + + this._show( tooltip, this.options.show ); + // Handle tracking tooltips that are shown with a delay (#8644). As soon + // as the tooltip is visible, position the tooltip using the most recent + // event. + if ( this.options.show && this.options.show.delay ) { + delayedShow = this.delayedShow = setInterval(function() { + if ( tooltip.is( ":visible" ) ) { + position( positionOption.of ); + clearInterval( delayedShow ); + } + }, $.fx.interval ); + } + + this._trigger( "open", event, { tooltip: tooltip } ); + }, + + _registerCloseHandlers: function( event, target ) { + var events = { + keyup: function( event ) { + if ( event.keyCode === $.ui.keyCode.ESCAPE ) { + var fakeEvent = $.Event(event); + fakeEvent.currentTarget = target[0]; + this.close( fakeEvent, true ); + } + } + }; + + // Only bind remove handler for delegated targets. Non-delegated + // tooltips will handle this in destroy. + if ( target[ 0 ] !== this.element[ 0 ] ) { + events.remove = function() { + this._removeTooltip( this._find( target ).tooltip ); + }; + } + + if ( !event || event.type === "mouseover" ) { + events.mouseleave = "close"; + } + if ( !event || event.type === "focusin" ) { + events.focusout = "close"; + } + this._on( true, target, events ); + }, + + close: function( event ) { + var tooltip, + that = this, + target = $( event ? event.currentTarget : this.element ), + tooltipData = this._find( target ); + + // The tooltip may already be closed + if ( !tooltipData ) { + + // We set ui-tooltip-open immediately upon open (in open()), but only set the + // additional data once there's actually content to show (in _open()). So even if the + // tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in + // the period between open() and _open(). + target.removeData( "ui-tooltip-open" ); + return; + } + + tooltip = tooltipData.tooltip; + + // disabling closes the tooltip, so we need to track when we're closing + // to avoid an infinite loop in case the tooltip becomes disabled on close + if ( tooltipData.closing ) { + return; + } + + // Clear the interval for delayed tracking tooltips + clearInterval( this.delayedShow ); + + // only set title if we had one before (see comment in _open()) + // If the title attribute has changed since open(), don't restore + if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) { + target.attr( "title", target.data( "ui-tooltip-title" ) ); + } + + this._removeDescribedBy( target ); + + tooltipData.hiding = true; + tooltip.stop( true ); + this._hide( tooltip, this.options.hide, function() { + that._removeTooltip( $( this ) ); + }); + + target.removeData( "ui-tooltip-open" ); + this._off( target, "mouseleave focusout keyup" ); + + // Remove 'remove' binding only on delegated targets + if ( target[ 0 ] !== this.element[ 0 ] ) { + this._off( target, "remove" ); + } + this._off( this.document, "mousemove" ); + + if ( event && event.type === "mouseleave" ) { + $.each( this.parents, function( id, parent ) { + $( parent.element ).attr( "title", parent.title ); + delete that.parents[ id ]; + }); + } + + tooltipData.closing = true; + this._trigger( "close", event, { tooltip: tooltip } ); + if ( !tooltipData.hiding ) { + tooltipData.closing = false; + } + }, + + _tooltip: function( element ) { + var tooltip = $( "<div>" ) + .attr( "role", "tooltip" ) + .addClass( "ui-tooltip ui-widget ui-corner-all ui-widget-content " + + ( this.options.tooltipClass || "" ) ), + id = tooltip.uniqueId().attr( "id" ); + + $( "<div>" ) + .addClass( "ui-tooltip-content" ) + .appendTo( tooltip ); + + tooltip.appendTo( this.document[0].body ); + + return this.tooltips[ id ] = { + element: element, + tooltip: tooltip + }; + }, + + _find: function( target ) { + var id = target.data( "ui-tooltip-id" ); + return id ? this.tooltips[ id ] : null; + }, + + _removeTooltip: function( tooltip ) { + tooltip.remove(); + delete this.tooltips[ tooltip.attr( "id" ) ]; + }, + + _destroy: function() { + var that = this; + + // close open tooltips + $.each( this.tooltips, function( id, tooltipData ) { + // Delegate to close method to handle common cleanup + var event = $.Event( "blur" ), + element = tooltipData.element; + event.target = event.currentTarget = element[ 0 ]; + that.close( event, true ); + + // Remove immediately; destroying an open tooltip doesn't use the + // hide animation + $( "#" + id ).remove(); + + // Restore the title + if ( element.data( "ui-tooltip-title" ) ) { + // If the title attribute has changed since open(), don't restore + if ( !element.attr( "title" ) ) { + element.attr( "title", element.data( "ui-tooltip-title" ) ); + } + element.removeData( "ui-tooltip-title" ); + } + }); + this.liveRegion.remove(); + } +}); + + +/*! + * jQuery UI Effects 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/effects-core/ + */ + + +var dataSpace = "ui-effects-", + + // Create a local jQuery because jQuery Color relies on it and the + // global may not exist with AMD and a custom build (#10199) + jQuery = $; + +$.effects = { + effect: {} +}; + +/*! + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2014 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function( jQuery, undefined ) { + + var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", + + // plusequals test for += 100 -= 100 + rplusequals = /^([\-+])=\s*(\d+\.?\d*)/, + // a set of RE's that can match strings and generate color tuples. + stringParsers = [ { + re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ], + execResult[ 3 ], + execResult[ 4 ] + ]; + } + }, { + re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + parse: function( execResult ) { + return [ + execResult[ 1 ] * 2.55, + execResult[ 2 ] * 2.55, + execResult[ 3 ] * 2.55, + execResult[ 4 ] + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ], 16 ) + ]; + } + }, { + // this regex ignores A-F because it's compared against an already lowercased string + re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, + parse: function( execResult ) { + return [ + parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ), + parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ), + parseInt( execResult[ 3 ] + execResult[ 3 ], 16 ) + ]; + } + }, { + re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, + space: "hsla", + parse: function( execResult ) { + return [ + execResult[ 1 ], + execResult[ 2 ] / 100, + execResult[ 3 ] / 100, + execResult[ 4 ] + ]; + } + } ], + + // jQuery.Color( ) + color = jQuery.Color = function( color, green, blue, alpha ) { + return new jQuery.Color.fn.parse( color, green, blue, alpha ); + }, + spaces = { + rgba: { + props: { + red: { + idx: 0, + type: "byte" + }, + green: { + idx: 1, + type: "byte" + }, + blue: { + idx: 2, + type: "byte" + } + } + }, + + hsla: { + props: { + hue: { + idx: 0, + type: "degrees" + }, + saturation: { + idx: 1, + type: "percent" + }, + lightness: { + idx: 2, + type: "percent" + } + } + } + }, + propTypes = { + "byte": { + floor: true, + max: 255 + }, + "percent": { + max: 1 + }, + "degrees": { + mod: 360, + floor: true + } + }, + support = color.support = {}, + + // element for support tests + supportElem = jQuery( "<p>" )[ 0 ], + + // colors = jQuery.Color.names + colors, + + // local aliases of functions called often + each = jQuery.each; + +// determine rgba support immediately +supportElem.style.cssText = "background-color:rgba(1,1,1,.5)"; +support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1; + +// define cache name and alpha properties +// for rgba and hsla spaces +each( spaces, function( spaceName, space ) { + space.cache = "_" + spaceName; + space.props.alpha = { + idx: 3, + type: "percent", + def: 1 + }; +}); + +function clamp( value, prop, allowEmpty ) { + var type = propTypes[ prop.type ] || {}; + + if ( value == null ) { + return (allowEmpty || !prop.def) ? null : prop.def; + } + + // ~~ is an short way of doing floor for positive numbers + value = type.floor ? ~~value : parseFloat( value ); + + // IE will pass in empty strings as value for alpha, + // which will hit this case + if ( isNaN( value ) ) { + return prop.def; + } + + if ( type.mod ) { + // we add mod before modding to make sure that negatives values + // get converted properly: -10 -> 350 + return (value + type.mod) % type.mod; + } + + // for now all property types without mod have min and max + return 0 > value ? 0 : type.max < value ? type.max : value; +} + +function stringParse( string ) { + var inst = color(), + rgba = inst._rgba = []; + + string = string.toLowerCase(); + + each( stringParsers, function( i, parser ) { + var parsed, + match = parser.re.exec( string ), + values = match && parser.parse( match ), + spaceName = parser.space || "rgba"; + + if ( values ) { + parsed = inst[ spaceName ]( values ); + + // if this was an rgba parse the assignment might happen twice + // oh well.... + inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ]; + rgba = inst._rgba = parsed._rgba; + + // exit each( stringParsers ) here because we matched + return false; + } + }); + + // Found a stringParser that handled it + if ( rgba.length ) { + + // if this came from a parsed string, force "transparent" when alpha is 0 + // chrome, (and maybe others) return "transparent" as rgba(0,0,0,0) + if ( rgba.join() === "0,0,0,0" ) { + jQuery.extend( rgba, colors.transparent ); + } + return inst; + } + + // named colors + return colors[ string ]; +} + +color.fn = jQuery.extend( color.prototype, { + parse: function( red, green, blue, alpha ) { + if ( red === undefined ) { + this._rgba = [ null, null, null, null ]; + return this; + } + if ( red.jquery || red.nodeType ) { + red = jQuery( red ).css( green ); + green = undefined; + } + + var inst = this, + type = jQuery.type( red ), + rgba = this._rgba = []; + + // more than 1 argument specified - assume ( red, green, blue, alpha ) + if ( green !== undefined ) { + red = [ red, green, blue, alpha ]; + type = "array"; + } + + if ( type === "string" ) { + return this.parse( stringParse( red ) || colors._default ); + } + + if ( type === "array" ) { + each( spaces.rgba.props, function( key, prop ) { + rgba[ prop.idx ] = clamp( red[ prop.idx ], prop ); + }); + return this; + } + + if ( type === "object" ) { + if ( red instanceof color ) { + each( spaces, function( spaceName, space ) { + if ( red[ space.cache ] ) { + inst[ space.cache ] = red[ space.cache ].slice(); + } + }); + } else { + each( spaces, function( spaceName, space ) { + var cache = space.cache; + each( space.props, function( key, prop ) { + + // if the cache doesn't exist, and we know how to convert + if ( !inst[ cache ] && space.to ) { + + // if the value was null, we don't need to copy it + // if the key was alpha, we don't need to copy it either + if ( key === "alpha" || red[ key ] == null ) { + return; + } + inst[ cache ] = space.to( inst._rgba ); + } + + // this is the only case where we allow nulls for ALL properties. + // call clamp with alwaysAllowEmpty + inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true ); + }); + + // everything defined but alpha? + if ( inst[ cache ] && jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) { + // use the default of 1 + inst[ cache ][ 3 ] = 1; + if ( space.from ) { + inst._rgba = space.from( inst[ cache ] ); + } + } + }); + } + return this; + } + }, + is: function( compare ) { + var is = color( compare ), + same = true, + inst = this; + + each( spaces, function( _, space ) { + var localCache, + isCache = is[ space.cache ]; + if (isCache) { + localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || []; + each( space.props, function( _, prop ) { + if ( isCache[ prop.idx ] != null ) { + same = ( isCache[ prop.idx ] === localCache[ prop.idx ] ); + return same; + } + }); + } + return same; + }); + return same; + }, + _space: function() { + var used = [], + inst = this; + each( spaces, function( spaceName, space ) { + if ( inst[ space.cache ] ) { + used.push( spaceName ); + } + }); + return used.pop(); + }, + transition: function( other, distance ) { + var end = color( other ), + spaceName = end._space(), + space = spaces[ spaceName ], + startColor = this.alpha() === 0 ? color( "transparent" ) : this, + start = startColor[ space.cache ] || space.to( startColor._rgba ), + result = start.slice(); + + end = end[ space.cache ]; + each( space.props, function( key, prop ) { + var index = prop.idx, + startValue = start[ index ], + endValue = end[ index ], + type = propTypes[ prop.type ] || {}; + + // if null, don't override start value + if ( endValue === null ) { + return; + } + // if null - use end + if ( startValue === null ) { + result[ index ] = endValue; + } else { + if ( type.mod ) { + if ( endValue - startValue > type.mod / 2 ) { + startValue += type.mod; + } else if ( startValue - endValue > type.mod / 2 ) { + startValue -= type.mod; + } + } + result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop ); + } + }); + return this[ spaceName ]( result ); + }, + blend: function( opaque ) { + // if we are already opaque - return ourself + if ( this._rgba[ 3 ] === 1 ) { + return this; + } + + var rgb = this._rgba.slice(), + a = rgb.pop(), + blend = color( opaque )._rgba; + + return color( jQuery.map( rgb, function( v, i ) { + return ( 1 - a ) * blend[ i ] + a * v; + })); + }, + toRgbaString: function() { + var prefix = "rgba(", + rgba = jQuery.map( this._rgba, function( v, i ) { + return v == null ? ( i > 2 ? 1 : 0 ) : v; + }); + + if ( rgba[ 3 ] === 1 ) { + rgba.pop(); + prefix = "rgb("; + } + + return prefix + rgba.join() + ")"; + }, + toHslaString: function() { + var prefix = "hsla(", + hsla = jQuery.map( this.hsla(), function( v, i ) { + if ( v == null ) { + v = i > 2 ? 1 : 0; + } + + // catch 1 and 2 + if ( i && i < 3 ) { + v = Math.round( v * 100 ) + "%"; + } + return v; + }); + + if ( hsla[ 3 ] === 1 ) { + hsla.pop(); + prefix = "hsl("; + } + return prefix + hsla.join() + ")"; + }, + toHexString: function( includeAlpha ) { + var rgba = this._rgba.slice(), + alpha = rgba.pop(); + + if ( includeAlpha ) { + rgba.push( ~~( alpha * 255 ) ); + } + + return "#" + jQuery.map( rgba, function( v ) { + + // default to 0 when nulls exist + v = ( v || 0 ).toString( 16 ); + return v.length === 1 ? "0" + v : v; + }).join(""); + }, + toString: function() { + return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString(); + } +}); +color.fn.parse.prototype = color.fn; + +// hsla conversions adapted from: +// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021 + +function hue2rgb( p, q, h ) { + h = ( h + 1 ) % 1; + if ( h * 6 < 1 ) { + return p + ( q - p ) * h * 6; + } + if ( h * 2 < 1) { + return q; + } + if ( h * 3 < 2 ) { + return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6; + } + return p; +} + +spaces.hsla.to = function( rgba ) { + if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) { + return [ null, null, null, rgba[ 3 ] ]; + } + var r = rgba[ 0 ] / 255, + g = rgba[ 1 ] / 255, + b = rgba[ 2 ] / 255, + a = rgba[ 3 ], + max = Math.max( r, g, b ), + min = Math.min( r, g, b ), + diff = max - min, + add = max + min, + l = add * 0.5, + h, s; + + if ( min === max ) { + h = 0; + } else if ( r === max ) { + h = ( 60 * ( g - b ) / diff ) + 360; + } else if ( g === max ) { + h = ( 60 * ( b - r ) / diff ) + 120; + } else { + h = ( 60 * ( r - g ) / diff ) + 240; + } + + // chroma (diff) == 0 means greyscale which, by definition, saturation = 0% + // otherwise, saturation is based on the ratio of chroma (diff) to lightness (add) + if ( diff === 0 ) { + s = 0; + } else if ( l <= 0.5 ) { + s = diff / add; + } else { + s = diff / ( 2 - add ); + } + return [ Math.round(h) % 360, s, l, a == null ? 1 : a ]; +}; + +spaces.hsla.from = function( hsla ) { + if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) { + return [ null, null, null, hsla[ 3 ] ]; + } + var h = hsla[ 0 ] / 360, + s = hsla[ 1 ], + l = hsla[ 2 ], + a = hsla[ 3 ], + q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s, + p = 2 * l - q; + + return [ + Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ), + Math.round( hue2rgb( p, q, h ) * 255 ), + Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ), + a + ]; +}; + +each( spaces, function( spaceName, space ) { + var props = space.props, + cache = space.cache, + to = space.to, + from = space.from; + + // makes rgba() and hsla() + color.fn[ spaceName ] = function( value ) { + + // generate a cache for this space if it doesn't exist + if ( to && !this[ cache ] ) { + this[ cache ] = to( this._rgba ); + } + if ( value === undefined ) { + return this[ cache ].slice(); + } + + var ret, + type = jQuery.type( value ), + arr = ( type === "array" || type === "object" ) ? value : arguments, + local = this[ cache ].slice(); + + each( props, function( key, prop ) { + var val = arr[ type === "object" ? key : prop.idx ]; + if ( val == null ) { + val = local[ prop.idx ]; + } + local[ prop.idx ] = clamp( val, prop ); + }); + + if ( from ) { + ret = color( from( local ) ); + ret[ cache ] = local; + return ret; + } else { + return color( local ); + } + }; + + // makes red() green() blue() alpha() hue() saturation() lightness() + each( props, function( key, prop ) { + // alpha is included in more than one space + if ( color.fn[ key ] ) { + return; + } + color.fn[ key ] = function( value ) { + var vtype = jQuery.type( value ), + fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ), + local = this[ fn ](), + cur = local[ prop.idx ], + match; + + if ( vtype === "undefined" ) { + return cur; + } + + if ( vtype === "function" ) { + value = value.call( this, cur ); + vtype = jQuery.type( value ); + } + if ( value == null && prop.empty ) { + return this; + } + if ( vtype === "string" ) { + match = rplusequals.exec( value ); + if ( match ) { + value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 ); + } + } + local[ prop.idx ] = value; + return this[ fn ]( local ); + }; + }); +}); + +// add cssHook and .fx.step function for each named hook. +// accept a space separated string of properties +color.hook = function( hook ) { + var hooks = hook.split( " " ); + each( hooks, function( i, hook ) { + jQuery.cssHooks[ hook ] = { + set: function( elem, value ) { + var parsed, curElem, + backgroundColor = ""; + + if ( value !== "transparent" && ( jQuery.type( value ) !== "string" || ( parsed = stringParse( value ) ) ) ) { + value = color( parsed || value ); + if ( !support.rgba && value._rgba[ 3 ] !== 1 ) { + curElem = hook === "backgroundColor" ? elem.parentNode : elem; + while ( + (backgroundColor === "" || backgroundColor === "transparent") && + curElem && curElem.style + ) { + try { + backgroundColor = jQuery.css( curElem, "backgroundColor" ); + curElem = curElem.parentNode; + } catch ( e ) { + } + } + + value = value.blend( backgroundColor && backgroundColor !== "transparent" ? + backgroundColor : + "_default" ); + } + + value = value.toRgbaString(); + } + try { + elem.style[ hook ] = value; + } catch ( e ) { + // wrapped to prevent IE from throwing errors on "invalid" values like 'auto' or 'inherit' + } + } + }; + jQuery.fx.step[ hook ] = function( fx ) { + if ( !fx.colorInit ) { + fx.start = color( fx.elem, hook ); + fx.end = color( fx.end ); + fx.colorInit = true; + } + jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) ); + }; + }); + +}; + +color.hook( stepHooks ); + +jQuery.cssHooks.borderColor = { + expand: function( value ) { + var expanded = {}; + + each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) { + expanded[ "border" + part + "Color" ] = value; + }); + return expanded; + } +}; + +// Basic color names only. +// Usage of any of the other color names requires adding yourself or including +// jquery.color.svg-names.js. +colors = jQuery.Color.names = { + // 4.1. Basic color keywords + aqua: "#00ffff", + black: "#000000", + blue: "#0000ff", + fuchsia: "#ff00ff", + gray: "#808080", + green: "#008000", + lime: "#00ff00", + maroon: "#800000", + navy: "#000080", + olive: "#808000", + purple: "#800080", + red: "#ff0000", + silver: "#c0c0c0", + teal: "#008080", + white: "#ffffff", + yellow: "#ffff00", + + // 4.2.3. "transparent" color keyword + transparent: [ null, null, null, 0 ], + + _default: "#ffffff" +}; + +})( jQuery ); + +/******************************************************************************/ +/****************************** CLASS ANIMATIONS ******************************/ +/******************************************************************************/ +(function() { + +var classAnimationActions = [ "add", "remove", "toggle" ], + shorthandStyles = { + border: 1, + borderBottom: 1, + borderColor: 1, + borderLeft: 1, + borderRight: 1, + borderTop: 1, + borderWidth: 1, + margin: 1, + padding: 1 + }; + +$.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function( _, prop ) { + $.fx.step[ prop ] = function( fx ) { + if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) { + jQuery.style( fx.elem, prop, fx.end ); + fx.setAttr = true; + } + }; +}); + +function getElementStyles( elem ) { + var key, len, + style = elem.ownerDocument.defaultView ? + elem.ownerDocument.defaultView.getComputedStyle( elem, null ) : + elem.currentStyle, + styles = {}; + + if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) { + len = style.length; + while ( len-- ) { + key = style[ len ]; + if ( typeof style[ key ] === "string" ) { + styles[ $.camelCase( key ) ] = style[ key ]; + } + } + // support: Opera, IE <9 + } else { + for ( key in style ) { + if ( typeof style[ key ] === "string" ) { + styles[ key ] = style[ key ]; + } + } + } + + return styles; +} + +function styleDifference( oldStyle, newStyle ) { + var diff = {}, + name, value; + + for ( name in newStyle ) { + value = newStyle[ name ]; + if ( oldStyle[ name ] !== value ) { + if ( !shorthandStyles[ name ] ) { + if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) { + diff[ name ] = value; + } + } + } + } + + return diff; +} + +// support: jQuery <1.8 +if ( !$.fn.addBack ) { + $.fn.addBack = function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + }; +} + +$.effects.animateClass = function( value, duration, easing, callback ) { + var o = $.speed( duration, easing, callback ); + + return this.queue( function() { + var animated = $( this ), + baseClass = animated.attr( "class" ) || "", + applyClassChange, + allAnimations = o.children ? animated.find( "*" ).addBack() : animated; + + // map the animated objects to store the original styles. + allAnimations = allAnimations.map(function() { + var el = $( this ); + return { + el: el, + start: getElementStyles( this ) + }; + }); + + // apply class change + applyClassChange = function() { + $.each( classAnimationActions, function(i, action) { + if ( value[ action ] ) { + animated[ action + "Class" ]( value[ action ] ); + } + }); + }; + applyClassChange(); + + // map all animated objects again - calculate new styles and diff + allAnimations = allAnimations.map(function() { + this.end = getElementStyles( this.el[ 0 ] ); + this.diff = styleDifference( this.start, this.end ); + return this; + }); + + // apply original class + animated.attr( "class", baseClass ); + + // map all animated objects again - this time collecting a promise + allAnimations = allAnimations.map(function() { + var styleInfo = this, + dfd = $.Deferred(), + opts = $.extend({}, o, { + queue: false, + complete: function() { + dfd.resolve( styleInfo ); + } + }); + + this.el.animate( this.diff, opts ); + return dfd.promise(); + }); + + // once all animations have completed: + $.when.apply( $, allAnimations.get() ).done(function() { + + // set the final class + applyClassChange(); + + // for each animated element, + // clear all css properties that were animated + $.each( arguments, function() { + var el = this.el; + $.each( this.diff, function(key) { + el.css( key, "" ); + }); + }); + + // this is guarnteed to be there if you use jQuery.speed() + // it also handles dequeuing the next anim... + o.complete.call( animated[ 0 ] ); + }); + }); +}; + +$.fn.extend({ + addClass: (function( orig ) { + return function( classNames, speed, easing, callback ) { + return speed ? + $.effects.animateClass.call( this, + { add: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + })( $.fn.addClass ), + + removeClass: (function( orig ) { + return function( classNames, speed, easing, callback ) { + return arguments.length > 1 ? + $.effects.animateClass.call( this, + { remove: classNames }, speed, easing, callback ) : + orig.apply( this, arguments ); + }; + })( $.fn.removeClass ), + + toggleClass: (function( orig ) { + return function( classNames, force, speed, easing, callback ) { + if ( typeof force === "boolean" || force === undefined ) { + if ( !speed ) { + // without speed parameter + return orig.apply( this, arguments ); + } else { + return $.effects.animateClass.call( this, + (force ? { add: classNames } : { remove: classNames }), + speed, easing, callback ); + } + } else { + // without force parameter + return $.effects.animateClass.call( this, + { toggle: classNames }, force, speed, easing ); + } + }; + })( $.fn.toggleClass ), + + switchClass: function( remove, add, speed, easing, callback) { + return $.effects.animateClass.call( this, { + add: add, + remove: remove + }, speed, easing, callback ); + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EFFECTS **********************************/ +/******************************************************************************/ + +(function() { + +$.extend( $.effects, { + version: "1.11.4", + + // Saves a set of properties in a data storage + save: function( element, set ) { + for ( var i = 0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] ); + } + } + }, + + // Restores a set of previously saved properties from a data storage + restore: function( element, set ) { + var val, i; + for ( i = 0; i < set.length; i++ ) { + if ( set[ i ] !== null ) { + val = element.data( dataSpace + set[ i ] ); + // support: jQuery 1.6.2 + // http://bugs.jquery.com/ticket/9917 + // jQuery 1.6.2 incorrectly returns undefined for any falsy value. + // We can't differentiate between "" and 0 here, so we just assume + // empty string since it's likely to be a more common value... + if ( val === undefined ) { + val = ""; + } + element.css( set[ i ], val ); + } + } + }, + + setMode: function( el, mode ) { + if (mode === "toggle") { + mode = el.is( ":hidden" ) ? "show" : "hide"; + } + return mode; + }, + + // Translates a [top,left] array into a baseline value + // this should be a little more flexible in the future to handle a string & hash + getBaseline: function( origin, original ) { + var y, x; + switch ( origin[ 0 ] ) { + case "top": y = 0; break; + case "middle": y = 0.5; break; + case "bottom": y = 1; break; + default: y = origin[ 0 ] / original.height; + } + switch ( origin[ 1 ] ) { + case "left": x = 0; break; + case "center": x = 0.5; break; + case "right": x = 1; break; + default: x = origin[ 1 ] / original.width; + } + return { + x: x, + y: y + }; + }, + + // Wraps the element around a wrapper that copies position properties + createWrapper: function( element ) { + + // if the element is already wrapped, return it + if ( element.parent().is( ".ui-effects-wrapper" )) { + return element.parent(); + } + + // wrap the element + var props = { + width: element.outerWidth(true), + height: element.outerHeight(true), + "float": element.css( "float" ) + }, + wrapper = $( "<div></div>" ) + .addClass( "ui-effects-wrapper" ) + .css({ + fontSize: "100%", + background: "transparent", + border: "none", + margin: 0, + padding: 0 + }), + // Store the size in case width/height are defined in % - Fixes #5245 + size = { + width: element.width(), + height: element.height() + }, + active = document.activeElement; + + // support: Firefox + // Firefox incorrectly exposes anonymous content + // https://bugzilla.mozilla.org/show_bug.cgi?id=561664 + try { + active.id; + } catch ( e ) { + active = document.body; + } + + element.wrap( wrapper ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + + wrapper = element.parent(); //Hotfix for jQuery 1.4 since some change in wrap() seems to actually lose the reference to the wrapped element + + // transfer positioning properties to the wrapper + if ( element.css( "position" ) === "static" ) { + wrapper.css({ position: "relative" }); + element.css({ position: "relative" }); + } else { + $.extend( props, { + position: element.css( "position" ), + zIndex: element.css( "z-index" ) + }); + $.each([ "top", "left", "bottom", "right" ], function(i, pos) { + props[ pos ] = element.css( pos ); + if ( isNaN( parseInt( props[ pos ], 10 ) ) ) { + props[ pos ] = "auto"; + } + }); + element.css({ + position: "relative", + top: 0, + left: 0, + right: "auto", + bottom: "auto" + }); + } + element.css(size); + + return wrapper.css( props ).show(); + }, + + removeWrapper: function( element ) { + var active = document.activeElement; + + if ( element.parent().is( ".ui-effects-wrapper" ) ) { + element.parent().replaceWith( element ); + + // Fixes #7595 - Elements lose focus when wrapped. + if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) { + $( active ).focus(); + } + } + + return element; + }, + + setTransition: function( element, list, factor, value ) { + value = value || {}; + $.each( list, function( i, x ) { + var unit = element.cssUnit( x ); + if ( unit[ 0 ] > 0 ) { + value[ x ] = unit[ 0 ] * factor + unit[ 1 ]; + } + }); + return value; + } +}); + +// return an effect options object for the given parameters: +function _normalizeArguments( effect, options, speed, callback ) { + + // allow passing all options as the first parameter + if ( $.isPlainObject( effect ) ) { + options = effect; + effect = effect.effect; + } + + // convert to an object + effect = { effect: effect }; + + // catch (effect, null, ...) + if ( options == null ) { + options = {}; + } + + // catch (effect, callback) + if ( $.isFunction( options ) ) { + callback = options; + speed = null; + options = {}; + } + + // catch (effect, speed, ?) + if ( typeof options === "number" || $.fx.speeds[ options ] ) { + callback = speed; + speed = options; + options = {}; + } + + // catch (effect, options, callback) + if ( $.isFunction( speed ) ) { + callback = speed; + speed = null; + } + + // add options to effect + if ( options ) { + $.extend( effect, options ); + } + + speed = speed || options.duration; + effect.duration = $.fx.off ? 0 : + typeof speed === "number" ? speed : + speed in $.fx.speeds ? $.fx.speeds[ speed ] : + $.fx.speeds._default; + + effect.complete = callback || options.complete; + + return effect; +} + +function standardAnimationOption( option ) { + // Valid standard speeds (nothing, number, named speed) + if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) { + return true; + } + + // Invalid strings - treat as "normal" speed + if ( typeof option === "string" && !$.effects.effect[ option ] ) { + return true; + } + + // Complete callback + if ( $.isFunction( option ) ) { + return true; + } + + // Options hash (but not naming an effect) + if ( typeof option === "object" && !option.effect ) { + return true; + } + + // Didn't match any standard API + return false; +} + +$.fn.extend({ + effect: function( /* effect, options, speed, callback */ ) { + var args = _normalizeArguments.apply( this, arguments ), + mode = args.mode, + queue = args.queue, + effectMethod = $.effects.effect[ args.effect ]; + + if ( $.fx.off || !effectMethod ) { + // delegate to the original method (e.g., .show()) if possible + if ( mode ) { + return this[ mode ]( args.duration, args.complete ); + } else { + return this.each( function() { + if ( args.complete ) { + args.complete.call( this ); + } + }); + } + } + + function run( next ) { + var elem = $( this ), + complete = args.complete, + mode = args.mode; + + function done() { + if ( $.isFunction( complete ) ) { + complete.call( elem[0] ); + } + if ( $.isFunction( next ) ) { + next(); + } + } + + // If the element already has the correct final state, delegate to + // the core methods so the internal tracking of "olddisplay" works. + if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) { + elem[ mode ](); + done(); + } else { + effectMethod.call( elem[0], args, done ); + } + } + + return queue === false ? this.each( run ) : this.queue( queue || "fx", run ); + }, + + show: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "show"; + return this.effect.call( this, args ); + } + }; + })( $.fn.show ), + + hide: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "hide"; + return this.effect.call( this, args ); + } + }; + })( $.fn.hide ), + + toggle: (function( orig ) { + return function( option ) { + if ( standardAnimationOption( option ) || typeof option === "boolean" ) { + return orig.apply( this, arguments ); + } else { + var args = _normalizeArguments.apply( this, arguments ); + args.mode = "toggle"; + return this.effect.call( this, args ); + } + }; + })( $.fn.toggle ), + + // helper functions + cssUnit: function(key) { + var style = this.css( key ), + val = []; + + $.each( [ "em", "px", "%", "pt" ], function( i, unit ) { + if ( style.indexOf( unit ) > 0 ) { + val = [ parseFloat( style ), unit ]; + } + }); + return val; + } +}); + +})(); + +/******************************************************************************/ +/*********************************** EASING ***********************************/ +/******************************************************************************/ + +(function() { + +// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) + +var baseEasings = {}; + +$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { + baseEasings[ name ] = function( p ) { + return Math.pow( p, i + 2 ); + }; +}); + +$.extend( baseEasings, { + Sine: function( p ) { + return 1 - Math.cos( p * Math.PI / 2 ); + }, + Circ: function( p ) { + return 1 - Math.sqrt( 1 - p * p ); + }, + Elastic: function( p ) { + return p === 0 || p === 1 ? p : + -Math.pow( 2, 8 * (p - 1) ) * Math.sin( ( (p - 1) * 80 - 7.5 ) * Math.PI / 15 ); + }, + Back: function( p ) { + return p * p * ( 3 * p - 2 ); + }, + Bounce: function( p ) { + var pow2, + bounce = 4; + + while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {} + return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 ); + } +}); + +$.each( baseEasings, function( name, easeIn ) { + $.easing[ "easeIn" + name ] = easeIn; + $.easing[ "easeOut" + name ] = function( p ) { + return 1 - easeIn( 1 - p ); + }; + $.easing[ "easeInOut" + name ] = function( p ) { + return p < 0.5 ? + easeIn( p * 2 ) / 2 : + 1 - easeIn( p * -2 + 2 ) / 2; + }; +}); + +})(); + +var effect = $.effects; + + +/*! + * jQuery UI Effects Blind 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/blind-effect/ + */ + + +var effectBlind = $.effects.effect.blind = function( o, done ) { + // Create element + var el = $( this ), + rvertical = /up|down|vertical/, + rpositivemotion = /up|left|vertical|horizontal/, + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + direction = o.direction || "up", + vertical = rvertical.test( direction ), + ref = vertical ? "height" : "width", + ref2 = vertical ? "top" : "left", + motion = rpositivemotion.test( direction ), + animation = {}, + show = mode === "show", + wrapper, distance, margin; + + // if already wrapped, the wrapper's properties are my property. #6245 + if ( el.parent().is( ".ui-effects-wrapper" ) ) { + $.effects.save( el.parent(), props ); + } else { + $.effects.save( el, props ); + } + el.show(); + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + distance = wrapper[ ref ](); + margin = parseFloat( wrapper.css( ref2 ) ) || 0; + + animation[ ref ] = show ? distance : 0; + if ( !motion ) { + el + .css( vertical ? "bottom" : "right", 0 ) + .css( vertical ? "top" : "left", "auto" ) + .css({ position: "absolute" }); + + animation[ ref2 ] = show ? margin : distance + margin; + } + + // start at 0 if we are showing + if ( show ) { + wrapper.css( ref, 0 ); + if ( !motion ) { + wrapper.css( ref2, margin + distance ); + } + } + + // Animate + wrapper.animate( animation, { + duration: o.duration, + easing: o.easing, + queue: false, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Bounce 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/bounce-effect/ + */ + + +var effectBounce = $.effects.effect.bounce = function( o, done ) { + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + + // defaults: + mode = $.effects.setMode( el, o.mode || "effect" ), + hide = mode === "hide", + show = mode === "show", + direction = o.direction || "up", + distance = o.distance, + times = o.times || 5, + + // number of internal animations + anims = times * 2 + ( show || hide ? 1 : 0 ), + speed = o.duration / anims, + easing = o.easing, + + // utility: + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ), + i, + upAnim, + downAnim, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + // Avoid touching opacity to prevent clearType and PNG issues in IE + if ( show || hide ) { + props.push( "opacity" ); + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); // Create Wrapper + + // default distance for the BIGGEST bounce is the outer Distance / 3 + if ( !distance ) { + distance = el[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3; + } + + if ( show ) { + downAnim = { opacity: 1 }; + downAnim[ ref ] = 0; + + // if we are showing, force opacity 0 and set the initial position + // then do the "first" animation + el.css( "opacity", 0 ) + .css( ref, motion ? -distance * 2 : distance * 2 ) + .animate( downAnim, speed, easing ); + } + + // start at the smallest distance if we are hiding + if ( hide ) { + distance = distance / Math.pow( 2, times - 1 ); + } + + downAnim = {}; + downAnim[ ref ] = 0; + // Bounces up/down/left/right then back to 0 -- times * 2 animations happen here + for ( i = 0; i < times; i++ ) { + upAnim = {}; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ) + .animate( downAnim, speed, easing ); + + distance = hide ? distance * 2 : distance / 2; + } + + // Last Bounce when Hiding + if ( hide ) { + upAnim = { opacity: 0 }; + upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance; + + el.animate( upAnim, speed, easing ); + } + + el.queue(function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + + +/*! + * jQuery UI Effects Clip 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/clip-effect/ + */ + + +var effectClip = $.effects.effect.clip = function( o, done ) { + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "vertical", + vert = direction === "vertical", + size = vert ? "height" : "width", + position = vert ? "top" : "left", + animation = {}, + wrapper, animate, distance; + + // Save & Show + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + animate = ( el[0].tagName === "IMG" ) ? wrapper : el; + distance = animate[ size ](); + + // Shift + if ( show ) { + animate.css( size, 0 ); + animate.css( position, distance / 2 ); + } + + // Create Animation Object: + animation[ size ] = show ? distance : 0; + animation[ position ] = show ? 0 : distance / 2; + + // Animate + animate.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( !show ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + + +/*! + * jQuery UI Effects Drop 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/drop-effect/ + */ + + +var effectDrop = $.effects.effect.drop = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "opacity", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + direction = o.direction || "left", + ref = ( direction === "up" || direction === "down" ) ? "top" : "left", + motion = ( direction === "up" || direction === "left" ) ? "pos" : "neg", + animation = { + opacity: show ? 1 : 0 + }, + distance; + + // Adjust + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2; + + if ( show ) { + el + .css( "opacity", 0 ) + .css( ref, motion === "pos" ? -distance : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( motion === "pos" ? "+=" : "-=" ) : + ( motion === "pos" ? "-=" : "+=" ) ) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Explode 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/explode-effect/ + */ + + +var effectExplode = $.effects.effect.explode = function( o, done ) { + + var rows = o.pieces ? Math.round( Math.sqrt( o.pieces ) ) : 3, + cells = rows, + el = $( this ), + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + + // show and then visibility:hidden the element before calculating offset + offset = el.show().css( "visibility", "hidden" ).offset(), + + // width and height of a piece + width = Math.ceil( el.outerWidth() / cells ), + height = Math.ceil( el.outerHeight() / rows ), + pieces = [], + + // loop + i, j, left, top, mx, my; + + // children animate complete: + function childComplete() { + pieces.push( this ); + if ( pieces.length === rows * cells ) { + animComplete(); + } + } + + // clone the element for each row and cell. + for ( i = 0; i < rows ; i++ ) { // ===> + top = offset.top + i * height; + my = i - ( rows - 1 ) / 2 ; + + for ( j = 0; j < cells ; j++ ) { // ||| + left = offset.left + j * width; + mx = j - ( cells - 1 ) / 2 ; + + // Create a clone of the now hidden main element that will be absolute positioned + // within a wrapper div off the -left and -top equal to size of our pieces + el + .clone() + .appendTo( "body" ) + .wrap( "<div></div>" ) + .css({ + position: "absolute", + visibility: "visible", + left: -j * width, + top: -i * height + }) + + // select the wrapper - make it overflow: hidden and absolute positioned based on + // where the original was located +left and +top equal to the size of pieces + .parent() + .addClass( "ui-effects-explode" ) + .css({ + position: "absolute", + overflow: "hidden", + width: width, + height: height, + left: left + ( show ? mx * width : 0 ), + top: top + ( show ? my * height : 0 ), + opacity: show ? 0 : 1 + }).animate({ + left: left + ( show ? 0 : mx * width ), + top: top + ( show ? 0 : my * height ), + opacity: show ? 1 : 0 + }, o.duration || 500, o.easing, childComplete ); + } + } + + function animComplete() { + el.css({ + visibility: "visible" + }); + $( pieces ).remove(); + if ( !show ) { + el.hide(); + } + done(); + } +}; + + +/*! + * jQuery UI Effects Fade 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fade-effect/ + */ + + +var effectFade = $.effects.effect.fade = function( o, done ) { + var el = $( this ), + mode = $.effects.setMode( el, o.mode || "toggle" ); + + el.animate({ + opacity: mode + }, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: done + }); +}; + + +/*! + * jQuery UI Effects Fold 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/fold-effect/ + */ + + +var effectFold = $.effects.effect.fold = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "hide" ), + show = mode === "show", + hide = mode === "hide", + size = o.size || 15, + percent = /([0-9]+)%/.exec( size ), + horizFirst = !!o.horizFirst, + widthFirst = show !== horizFirst, + ref = widthFirst ? [ "width", "height" ] : [ "height", "width" ], + duration = o.duration / 2, + wrapper, distance, + animation1 = {}, + animation2 = {}; + + $.effects.save( el, props ); + el.show(); + + // Create Wrapper + wrapper = $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + distance = widthFirst ? + [ wrapper.width(), wrapper.height() ] : + [ wrapper.height(), wrapper.width() ]; + + if ( percent ) { + size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ]; + } + if ( show ) { + wrapper.css( horizFirst ? { + height: 0, + width: size + } : { + height: size, + width: 0 + }); + } + + // Animation + animation1[ ref[ 0 ] ] = show ? distance[ 0 ] : size; + animation2[ ref[ 1 ] ] = show ? distance[ 1 ] : 0; + + // Animate + wrapper + .animate( animation1, duration, o.easing ) + .animate( animation2, duration, o.easing, function() { + if ( hide ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + +}; + + +/*! + * jQuery UI Effects Highlight 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/highlight-effect/ + */ + + +var effectHighlight = $.effects.effect.highlight = function( o, done ) { + var elem = $( this ), + props = [ "backgroundImage", "backgroundColor", "opacity" ], + mode = $.effects.setMode( elem, o.mode || "show" ), + animation = { + backgroundColor: elem.css( "backgroundColor" ) + }; + + if (mode === "hide") { + animation.opacity = 0; + } + + $.effects.save( elem, props ); + + elem + .show() + .css({ + backgroundImage: "none", + backgroundColor: o.color || "#ffff99" + }) + .animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + elem.hide(); + } + $.effects.restore( elem, props ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Size 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/size-effect/ + */ + + +var effectSize = $.effects.effect.size = function( o, done ) { + + // Create element + var original, baseline, factor, + el = $( this ), + props0 = [ "position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity" ], + + // Always restore + props1 = [ "position", "top", "bottom", "left", "right", "overflow", "opacity" ], + + // Copy for children + props2 = [ "width", "height", "overflow" ], + cProps = [ "fontSize" ], + vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], + hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], + + // Set options + mode = $.effects.setMode( el, o.mode || "effect" ), + restore = o.restore || mode !== "effect", + scale = o.scale || "both", + origin = o.origin || [ "middle", "center" ], + position = el.css( "position" ), + props = restore ? props0 : props1, + zero = { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + }; + + if ( mode === "show" ) { + el.show(); + } + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }; + + if ( o.mode === "toggle" && mode === "show" ) { + el.from = o.to || zero; + el.to = o.from || original; + } else { + el.from = o.from || ( mode === "show" ? zero : original ); + el.to = o.to || ( mode === "hide" ? zero : original ); + } + + // Set scaling factor + factor = { + from: { + y: el.from.height / original.height, + x: el.from.width / original.width + }, + to: { + y: el.to.height / original.height, + x: el.to.width / original.width + } + }; + + // Scale the css box + if ( scale === "box" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( vProps ); + el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + props = props.concat( hProps ); + el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from ); + el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to ); + } + } + + // Scale the content + if ( scale === "content" || scale === "both" ) { + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + props = props.concat( cProps ).concat( props2 ); + el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from ); + el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to ); + } + } + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + el.css( "overflow", "hidden" ).css( el.from ); + + // Adjust + if (origin) { // Calculate baseline shifts + baseline = $.effects.getBaseline( origin, original ); + el.from.top = ( original.outerHeight - el.outerHeight() ) * baseline.y; + el.from.left = ( original.outerWidth - el.outerWidth() ) * baseline.x; + el.to.top = ( original.outerHeight - el.to.outerHeight ) * baseline.y; + el.to.left = ( original.outerWidth - el.to.outerWidth ) * baseline.x; + } + el.css( el.from ); // set top & left + + // Animate + if ( scale === "content" || scale === "both" ) { // Scale the children + + // Add margins/font-size + vProps = vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); + hProps = hProps.concat([ "marginLeft", "marginRight" ]); + props2 = props0.concat(vProps).concat(hProps); + + el.find( "*[width]" ).each( function() { + var child = $( this ), + c_original = { + height: child.height(), + width: child.width(), + outerHeight: child.outerHeight(), + outerWidth: child.outerWidth() + }; + if (restore) { + $.effects.save(child, props2); + } + + child.from = { + height: c_original.height * factor.from.y, + width: c_original.width * factor.from.x, + outerHeight: c_original.outerHeight * factor.from.y, + outerWidth: c_original.outerWidth * factor.from.x + }; + child.to = { + height: c_original.height * factor.to.y, + width: c_original.width * factor.to.x, + outerHeight: c_original.height * factor.to.y, + outerWidth: c_original.width * factor.to.x + }; + + // Vertical props scaling + if ( factor.from.y !== factor.to.y ) { + child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from ); + child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to ); + } + + // Horizontal props scaling + if ( factor.from.x !== factor.to.x ) { + child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from ); + child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to ); + } + + // Animate children + child.css( child.from ); + child.animate( child.to, o.duration, o.easing, function() { + + // Restore children + if ( restore ) { + $.effects.restore( child, props2 ); + } + }); + }); + } + + // Animate + el.animate( el.to, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( el.to.opacity === 0 ) { + el.css( "opacity", el.from.opacity ); + } + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + if ( !restore ) { + + // we need to calculate our new positioning based on the scaling + if ( position === "static" ) { + el.css({ + position: "relative", + top: el.to.top, + left: el.to.left + }); + } else { + $.each([ "top", "left" ], function( idx, pos ) { + el.css( pos, function( _, str ) { + var val = parseInt( str, 10 ), + toRef = idx ? el.to.left : el.to.top; + + // if original was "auto", recalculate the new value from wrapper + if ( str === "auto" ) { + return toRef + "px"; + } + + return val + toRef + "px"; + }); + }); + } + } + + $.effects.removeWrapper( el ); + done(); + } + }); + +}; + + +/*! + * jQuery UI Effects Scale 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/scale-effect/ + */ + + +var effectScale = $.effects.effect.scale = function( o, done ) { + + // Create element + var el = $( this ), + options = $.extend( true, {}, o ), + mode = $.effects.setMode( el, o.mode || "effect" ), + percent = parseInt( o.percent, 10 ) || + ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode === "hide" ? 0 : 100 ) ), + direction = o.direction || "both", + origin = o.origin, + original = { + height: el.height(), + width: el.width(), + outerHeight: el.outerHeight(), + outerWidth: el.outerWidth() + }, + factor = { + y: direction !== "horizontal" ? (percent / 100) : 1, + x: direction !== "vertical" ? (percent / 100) : 1 + }; + + // We are going to pass this effect to the size effect: + options.effect = "size"; + options.queue = false; + options.complete = done; + + // Set default origin and restore for show/hide + if ( mode !== "effect" ) { + options.origin = origin || [ "middle", "center" ]; + options.restore = true; + } + + options.from = o.from || ( mode === "show" ? { + height: 0, + width: 0, + outerHeight: 0, + outerWidth: 0 + } : original ); + options.to = { + height: original.height * factor.y, + width: original.width * factor.x, + outerHeight: original.outerHeight * factor.y, + outerWidth: original.outerWidth * factor.x + }; + + // Fade option to support puff + if ( options.fade ) { + if ( mode === "show" ) { + options.from.opacity = 0; + options.to.opacity = 1; + } + if ( mode === "hide" ) { + options.from.opacity = 1; + options.to.opacity = 0; + } + } + + // Animate + el.effect( options ); + +}; + + +/*! + * jQuery UI Effects Puff 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/puff-effect/ + */ + + +var effectPuff = $.effects.effect.puff = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "hide" ), + hide = mode === "hide", + percent = parseInt( o.percent, 10 ) || 150, + factor = percent / 100, + original = { + height: elem.height(), + width: elem.width(), + outerHeight: elem.outerHeight(), + outerWidth: elem.outerWidth() + }; + + $.extend( o, { + effect: "scale", + queue: false, + fade: true, + mode: mode, + complete: done, + percent: hide ? percent : 100, + from: hide ? + original : + { + height: original.height * factor, + width: original.width * factor, + outerHeight: original.outerHeight * factor, + outerWidth: original.outerWidth * factor + } + }); + + elem.effect( o ); +}; + + +/*! + * jQuery UI Effects Pulsate 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/pulsate-effect/ + */ + + +var effectPulsate = $.effects.effect.pulsate = function( o, done ) { + var elem = $( this ), + mode = $.effects.setMode( elem, o.mode || "show" ), + show = mode === "show", + hide = mode === "hide", + showhide = ( show || mode === "hide" ), + + // showing or hiding leaves of the "last" animation + anims = ( ( o.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ), + duration = o.duration / anims, + animateTo = 0, + queue = elem.queue(), + queuelen = queue.length, + i; + + if ( show || !elem.is(":visible")) { + elem.css( "opacity", 0 ).show(); + animateTo = 1; + } + + // anims - 1 opacity "toggles" + for ( i = 1; i < anims; i++ ) { + elem.animate({ + opacity: animateTo + }, duration, o.easing ); + animateTo = 1 - animateTo; + } + + elem.animate({ + opacity: animateTo + }, duration, o.easing); + + elem.queue(function() { + if ( hide ) { + elem.hide(); + } + done(); + }); + + // We just queued up "anims" animations, we need to put them next in the queue + if ( queuelen > 1 ) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + elem.dequeue(); +}; + + +/*! + * jQuery UI Effects Shake 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/shake-effect/ + */ + + +var effectShake = $.effects.effect.shake = function( o, done ) { + + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "height", "width" ], + mode = $.effects.setMode( el, o.mode || "effect" ), + direction = o.direction || "left", + distance = o.distance || 20, + times = o.times || 3, + anims = times * 2 + 1, + speed = Math.round( o.duration / anims ), + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + animation = {}, + animation1 = {}, + animation2 = {}, + i, + + // we will need to re-assemble the queue to stack our animations in place + queue = el.queue(), + queuelen = queue.length; + + $.effects.save( el, props ); + el.show(); + $.effects.createWrapper( el ); + + // Animation + animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance; + animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2; + animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2; + + // Animate + el.animate( animation, speed, o.easing ); + + // Shakes + for ( i = 1; i < times; i++ ) { + el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing ); + } + el + .animate( animation1, speed, o.easing ) + .animate( animation, speed / 2, o.easing ) + .queue(function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + }); + + // inject all the animations we just queued to be first in line (after "inprogress") + if ( queuelen > 1) { + queue.splice.apply( queue, + [ 1, 0 ].concat( queue.splice( queuelen, anims + 1 ) ) ); + } + el.dequeue(); + +}; + + +/*! + * jQuery UI Effects Slide 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/slide-effect/ + */ + + +var effectSlide = $.effects.effect.slide = function( o, done ) { + + // Create element + var el = $( this ), + props = [ "position", "top", "bottom", "left", "right", "width", "height" ], + mode = $.effects.setMode( el, o.mode || "show" ), + show = mode === "show", + direction = o.direction || "left", + ref = (direction === "up" || direction === "down") ? "top" : "left", + positiveMotion = (direction === "up" || direction === "left"), + distance, + animation = {}; + + // Adjust + $.effects.save( el, props ); + el.show(); + distance = o.distance || el[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ); + + $.effects.createWrapper( el ).css({ + overflow: "hidden" + }); + + if ( show ) { + el.css( ref, positiveMotion ? (isNaN(distance) ? "-" + distance : -distance) : distance ); + } + + // Animation + animation[ ref ] = ( show ? + ( positiveMotion ? "+=" : "-=") : + ( positiveMotion ? "-=" : "+=")) + + distance; + + // Animate + el.animate( animation, { + queue: false, + duration: o.duration, + easing: o.easing, + complete: function() { + if ( mode === "hide" ) { + el.hide(); + } + $.effects.restore( el, props ); + $.effects.removeWrapper( el ); + done(); + } + }); +}; + + +/*! + * jQuery UI Effects Transfer 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/transfer-effect/ + */ + + +var effectTransfer = $.effects.effect.transfer = function( o, done ) { + var elem = $( this ), + target = $( o.to ), + targetFixed = target.css( "position" ) === "fixed", + body = $("body"), + fixTop = targetFixed ? body.scrollTop() : 0, + fixLeft = targetFixed ? body.scrollLeft() : 0, + endPosition = target.offset(), + animation = { + top: endPosition.top - fixTop, + left: endPosition.left - fixLeft, + height: target.innerHeight(), + width: target.innerWidth() + }, + startPosition = elem.offset(), + transfer = $( "<div class='ui-effects-transfer'></div>" ) + .appendTo( document.body ) + .addClass( o.className ) + .css({ + top: startPosition.top - fixTop, + left: startPosition.left - fixLeft, + height: elem.innerHeight(), + width: elem.innerWidth(), + position: targetFixed ? "fixed" : "absolute" + }) + .animate( animation, o.duration, o.easing, function() { + transfer.remove(); + done(); + }); +}; + + + +})); \ No newline at end of file diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.min.css b/assets/js/jquery-ui-1.11.4/jquery-ui.min.css new file mode 100644 index 0000000000000000000000000000000000000000..7d317e82e72efff3a061bd3cb72b2a05f02d9a14 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.11.4 - 2015-10-27 +* http://jqueryui.com +* Includes: core.css, draggable.css, resizable.css, selectable.css, sortable.css, accordion.css, autocomplete.css, button.css, datepicker.css, dialog.css, menu.css, progressbar.css, selectmenu.css, slider.css, spinner.css, tabs.css, tooltip.css, theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKX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VLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.min.js b/assets/js/jquery-ui-1.11.4/jquery-ui.min.js new file mode 100644 index 0000000000000000000000000000000000000000..516e5a8ab76c99f586c96e78538635c0cda78515 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.min.js @@ -0,0 +1,13 @@ +/*! jQuery UI - v1.11.4 - 2015-10-25 +* http://jqueryui.com +* Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,r,o=t.nodeName.toLowerCase();return"area"===o?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(r=e("img[usemap='#"+a+"']")[0],!!r&&i(r)):!1):(/^(input|select|textarea|button|object)$/.test(o)?!t.disabled:"a"===o?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",r)}function r(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function o(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),r={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?r["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?r["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(r){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,r,o,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],r=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new r(e,t)},e.extend(r,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),o=new i,o.options=e.widget.extend({},o.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),r.prototype=e.widget.extend(o,{widgetEventPrefix:a?o.widgetEventPrefix||t:t},h,{constructor:r,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,r,i._proto)}),delete a._childConstructors):i._childConstructors.push(r),e.widget.bridge(t,r),r},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,r=n.length;r>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,r=u.call(arguments,1),o=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(o=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,r),i!==a&&void 0!==i?(o=i&&i.jquery?o.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(r.length&&(n=e.widget.extend.apply(null,[n].concat(r))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),o}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,r=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(r={},s=t.split("."),t=s.shift(),s.length){for(n=r[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];r[t]=i}return this._setOptions(r),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,r){function o(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof r?a[r]:r).apply(a,arguments):void 0}"string"!=typeof r&&(o.guid=r.guid=r.guid||o.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,o):i.bind(l,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,r=Math.max,o=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,M=e.extend({},y),N=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=d:"center"===n.my[0]&&(M.left-=d/2),"bottom"===n.my[1]?M.top-=c:"center"===n.my[1]&&(M.top-=c/2),M.left+=N[0],M.top+=N[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+N[0],p[1]+N[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>o(t+i)&&(h.horizontal="center"),c>g&&g>o(s+a)&&(h.vertical="middle"),h.important=r(o(t),o(i))>r(o(s),o(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,o=e.left-t.collisionPosition.marginLeft,h=n-o,l=o+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=r(e.left-o,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,o=e.top-t.collisionPosition.marginTop,h=n-o,l=o+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=r(e.top-o,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,r=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-r-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-r-a,(0>i||o(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>o(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,r=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-r-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-r-a,(0>s||o(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>o(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,r,o=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(r in s)t.style[r]=s[r];t.appendChild(h),i=o||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,r=this.options,o=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return o&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),r.grid&&(n=r.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-r.grid[1]:n+r.grid[1]:n,a=r.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-r.grid[0]:a+r.grid[0]:a),"y"===r.axis&&(h=this.originalPageX),"x"===r.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:o?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:o?0:this.offset.scroll.left)} +},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,r=s.scrollParentNotHidden[0],o=s.document[0];r!==o&&"HTML"!==r.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+r.offsetHeight-t.pageY<n.scrollSensitivity?r.scrollTop=a=r.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(r.scrollTop=a=r.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+r.offsetWidth-t.pageX<n.scrollSensitivity?r.scrollLeft=a=r.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(r.scrollLeft=a=r.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(o).scrollTop()<n.scrollSensitivity?a=e(o).scrollTop(e(o).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(o).scrollTop())<n.scrollSensitivity&&(a=e(o).scrollTop(e(o).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(o).scrollLeft()<n.scrollSensitivity?a=e(o).scrollLeft(e(o).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(o).scrollLeft())<n.scrollSensitivity&&(a=e(o).scrollLeft(e(o).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,r,o,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),r=m>=Math.abs(h-v),o=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||r||o,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),r=m>=Math.abs(h-g),o=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||r||o||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||r||o||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,r=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});r.length&&(n=parseInt(e(r[0]).css("zIndex"),10)||0,e(r).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+r.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,r=(t.positionAbs||t.position.absolute).top+t.margins.top,o=a+t.helperProportions.width,h=r+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=o&&r>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>o-t.helperProportions.width/2&&r+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(r>=u&&c>=r||h>=u&&c>=h||u>r&&h>c)&&(a>=l&&d>=a||o>=l&&d>=o||l>a&&o>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],r=i?i.type:null,o=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;o.length>n;n++)if(o[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===r&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,r=e.ui.intersect(t,this,this.options.tolerance,i),o=!r&&this.isover?"isout":r&&!this.isover?"isover":null;o&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===o)),s&&"isover"===o&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[o]=!0,this["isout"===o?"isover":"isout"]=!1,this["isover"===o?"_over":"_out"].call(this,i),s&&"isout"===o&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,r=this,o=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!o.aspectRatio,aspectRatio:o.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:o.helper||o.ghost||o.animate?o.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=o.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:o.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:r._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){r.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),r.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){o.disabled||(e(this).removeClass("ui-resizable-autohide"),r._handles.show())}).mouseleave(function(){o.disabled||r.resizing||(e(this).addClass("ui-resizable-autohide"),r._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,r=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:r.width(),height:r.height()},this.originalSize=this._helper?{width:r.outerWidth(),height:r.outerHeight()}:{width:r.width(),height:r.height()},this.sizeDiff={width:r.outerWidth()-r.width(),height:r.outerHeight()-r.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),r.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,r=t.pageX-n.left||0,o=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,r,o]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,r,o,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,r={width:u.helper.width()-a,height:u.helper.height()-n},o=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(r,{top:h,left:o})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,r=this.options;a={minWidth:this._isNumber(r.minWidth)?r.minWidth:0,maxWidth:this._isNumber(r.maxWidth)?r.maxWidth:1/0,minHeight:this._isNumber(r.minHeight)?r.minHeight:0,maxHeight:this._isNumber(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,r=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,o=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),r&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=o-t.minWidth),s&&l&&(e.left=o-t.maxWidth),r&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),r=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,o=a?0:i.sizeDiff.width,h={width:i.size.width-o,height:i.size.height-r},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,r,o,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,r=h._hasScroll(c,"left")?c.scrollWidth:a,o=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:r,height:o}))},resize:function(t){var i,s,n,a,r=e(this).resizable("instance"),o=r.options,h=r.containerOffset,l=r.position,u=r._aspectRatio||t.shiftKey,d={top:0,left:0},c=r.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(r._helper?h.left:0)&&(r.size.width=r.size.width+(r._helper?r.position.left-h.left:r.position.left-d.left),u&&(r.size.height=r.size.width/r.aspectRatio,p=!1),r.position.left=o.helper?h.left:0),l.top<(r._helper?h.top:0)&&(r.size.height=r.size.height+(r._helper?r.position.top-h.top:r.position.top),u&&(r.size.width=r.size.height*r.aspectRatio,p=!1),r.position.top=r._helper?h.top:0),n=r.containerElement.get(0)===r.element.parent().get(0),a=/relative|absolute/.test(r.containerElement.css("position")),n&&a?(r.offset.left=r.parentData.left+r.position.left,r.offset.top=r.parentData.top+r.position.top):(r.offset.left=r.element.offset().left,r.offset.top=r.element.offset().top),i=Math.abs(r.sizeDiff.width+(r._helper?r.offset.left-d.left:r.offset.left-h.left)),s=Math.abs(r.sizeDiff.height+(r._helper?r.offset.top-d.top:r.offset.top-h.top)),i+r.size.width>=r.parentData.width&&(r.size.width=r.parentData.width-i,u&&(r.size.height=r.size.width/r.aspectRatio,p=!1)),s+r.size.height>=r.parentData.height&&(r.size.height=r.parentData.height-s,u&&(r.size.width=r.size.height*r.aspectRatio,p=!1)),p||(r.position.left=r.prevPosition.left,r.position.top=r.prevPosition.top,r.size.width=r.prevSize.width,r.size.height=r.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,r=e(t.helper),o=r.offset(),h=r.outerWidth()-t.sizeDiff.width,l=r.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:o.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:o.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,r=s.originalPosition,o={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-r.top||0,left:s.position.left-r.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(o[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,r=i.originalPosition,o=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(o)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(o)?(i.size.width=p,i.size.height=f,i.position.top=r.top-c):/^(sw)$/.test(o)?(i.size.width=p,i.size.height=f,i.position.left=r.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=r.top-c):(f=u-t.height,i.size.height=f,i.position.top=r.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=r.left-d):(p=l-t.width,i.size.width=p,i.position.left=r.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this; +this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],r=this.opos[1],o=t.pageX,h=t.pageY;return a>o&&(i=o,o=a,a=i),r>h&&(i=h,h=r,r=i),this.helper.css({left:a,top:r,width:o-a,height:h-r}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>o||a>i.right||i.top>h||r>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&o>i.right&&i.top>r&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(a)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,r=this.options,o=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<r.scrollSensitivity?this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop+r.scrollSpeed:t.pageY-this.overflowOffset.top<r.scrollSensitivity&&(this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop-r.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<r.scrollSensitivity?this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft+r.scrollSpeed:t.pageX-this.overflowOffset.left<r.scrollSensitivity&&(this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft-r.scrollSpeed)):(t.pageY-this.document.scrollTop()<r.scrollSensitivity?o=this.document.scrollTop(this.document.scrollTop()-r.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<r.scrollSensitivity&&(o=this.document.scrollTop(this.document.scrollTop()+r.scrollSpeed)),t.pageX-this.document.scrollLeft()<r.scrollSensitivity?o=this.document.scrollLeft(this.document.scrollLeft()-r.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<r.scrollSensitivity&&(o=this.document.scrollLeft(this.document.scrollLeft()+r.scrollSpeed))),o!==!1&&e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,r={};a&&"x"!==a||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,r=a+e.width,o=e.top,h=o+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>o&&h>s+l,c="y"===this.options.axis||t+u>a&&r>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&r>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>o&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){o.push(this)}var s,n,a,r,o=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)r=e.data(a[n],this.widgetFullName),r&&r!==this&&!r.options.disabled&&h.push([e.isFunction(r.options.items)?r.options.items.call(r.element):e(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(o)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,r,o,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(r=d[i][1],o=d[i][0],s=0,l=o.length;l>s;s++)h=e(o[s]),h.data(this.widgetName+"-item",r),u.push({item:h,instance:r,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td> </td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,r,o,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),r=u?"left":"top",o=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[r],l=!1,t[d]-h>this.items[s][o]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,r=t.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:o.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:o.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels))) +},_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],r=a&&i.collapsible,o=r?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:r?e():n,newPanel:o};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=r?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,r=this,o=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){r._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(o+=i.now):"content"!==r.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-o),o=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,r=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:r=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}r&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,r,o;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),r=this.activeMenu.height(),o=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+o>r&&this.activeMenu.scrollTop(a+n-r+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,r="input"===n;this.isMultiLine=a?!0:r?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||r?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];g(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return o(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=e("<span class='"+this._appendClass+"'>"+r+"</span>"),t[o?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[o?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),r=this._get(e,"dateFormat");r.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var r,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,r="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+r+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),o(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this +},_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,r,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),r=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),o(l.settings,n),null!==r&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,r)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),r=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?1:-1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,o?-1:1,"D"),r=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),r=t.ctrlKey||t.metaKey;break;default:r=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,r,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(o(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),r=!1,e(t).parents().each(function(){return r|="fixed"===e(this).css("position"),!r}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,r),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":r?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,o=t.dpDiv.find("."+this._dayOverClass+" a");o.length>0&&r.apply(o.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),r=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-r:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+o?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,r=this._curInst;!r||t&&r!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(r,"showAnim"),s=this._get(r,"duration"),n=function(){e.datepicker._tidyDialog(r)},e.effects&&(e.effects.effect[i]||e.effects[i])?r.dpDiv.hide(i,e.datepicker._get(r,"showOptions"),s,n):r.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(r,"onClose"),a&&a.apply(r.input?r.input[0]:null,[r.input?r.input.val():"",r]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,r=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,r,o,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),r=i.substring(h).match(a);if(!r)throw"Missing number at position "+h;return h+=r[0].length,parseInt(r[0],10)},w=function(t,s,n){var a=-1,r=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(r,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":o=new Date(x("@")),m=o.getFullYear(),g=o.getMonth()+1,v=o.getDate();break;case"!":o=new Date((x("!")-this._ticksTo1970)/1e4),m=o.getFullYear(),g=o.getMonth()+1,v=o.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(r=i.substr(h),!/^\s+/.test(r)))throw"Extra/unparsed characters found in date: "+r;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(o=this._daylightSavingAdjust(new Date(m,g-1,v)),o.getFullYear()!==m||o.getMonth()+1!==g||o.getDate()!==v)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),r,o);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,r=this._getFormatConfig(e);try{a=this.parseDate(i,s,r)||n}catch(o){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,e.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,r=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=r.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=r.getMonth(),e.drawYear=e.selectedYear=e.currentYear=r.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,r,o,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,N,C,A,I,P,H,F,z,j,E,O,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),J=this._get(e,"showButtonPanel"),B=this._get(e,"hideIfNoPrevNext"),K=this._get(e,"navigationAsDateFormat"),q=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),G=1!==q[0]||1!==q[1],Q=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-q[0]*q[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":B?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":B?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(e,"currentText"),o=this._get(e,"gotoCurrent")&&e.currentDay?Q:R,r=K?this.formatDate(r,o,this._getFormatConfig(e)):r,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=J?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;q[0]>w;w++){for(k="",this.maxRows=4,T=0;q[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",G){if(M+="<div class='ui-datepicker-group",q[1]>1)switch(T){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");break;case q[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",N=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)C=(x+u)%7,N+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+c[C]+"'>"+p[C]+"</span></th>";for(M+=N+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),I=(this._getFirstDayOfMonth(et,Z)-u+7)%7,P=Math.ceil((I+A)/7),H=G?this.maxRows>P?this.maxRows:P:P,this.maxRows=H,F=this._daylightSavingAdjust(new Date(et,Z,1-I)),z=0;H>z;z++){for(M+="<tr>",j=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(F)+"</td>":"",x=0;7>x;x++)E=g?g.apply(e.input?e.input[0]:null,[F]):[!0,""],O=F.getMonth()!==Z,W=O&&!y||!E[0]||X&&X>F||$&&F>$,j+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(O?" ui-datepicker-other-month":"")+(F.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===F.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(O&&!v?"":" "+E[1]+(F.getTime()===Q.getTime()?" "+this._currentClass:"")+(F.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(O&&!v||!E[2]?"":" title='"+E[2].replace(/'/g,"'")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+F.getMonth()+"' data-year='"+F.getFullYear()+"'")+">"+(O&&!v?" ":W?"<span class='ui-state-default'>"+F.getDate()+"</span>":"<a class='ui-state-default"+(F.getTime()===R.getTime()?" ui-state-highlight":"")+(F.getTime()===Q.getTime()?" ui-state-active":"")+(O?" ui-priority-secondary":"")+"' href='#'>"+F.getDate()+"</a>")+"</td>",F.setDate(F.getDate()+1),F=this._daylightSavingAdjust(F);M+=j+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(G?"</div>"+(q[0]>0&&T===q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,r,o){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(a||!g)_+="<span class='ui-datepicker-month'>"+r[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+o[u]+"</option>");_+="</select>"}if(y||(b+=_+(!a&&g&&v?"":" ")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":" ")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),r=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=r.getDate(),e.drawMonth=e.selectedMonth=r.getMonth(),e.drawYear=e.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),r=null,o=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!r||t.getFullYear()>=r)&&(!o||o>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this; +return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html(" "),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var r=a.offset.left-i.document.scrollLeft(),o=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(o>=0?"+":"")+o,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),r="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:r,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var r=i.uiDialog.offset(),o=r.left-i.document.scrollLeft(),h=r.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var s=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger("focus",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr("aria-activedescendant",t.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n="";e.each(i,function(i,a){a.optgroup!==n&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var s=e("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html(" ")},_move:function(e,t){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent("optgroup");i.push({element:n,index:t,value:n.val(),label:n.text(),optgroup:a.attr("label")||"",disabled:a.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",r=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)r.push(a);this.handles=n.add(e(r.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,r,o,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),r=t)}),o=this._start(t,r),o===!1?!1:(this._mouseSliding=!0,this._handleIndex=r,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,r,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,r=this.options.range,o=this.options,h=this,l=this._animateOff?!1:o.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,o.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:o.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},o.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:o.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,o.animate),"min"===r&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},o.animate),"max"===r&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:o.animate}),"min"===r&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},o.animate),"max"===r&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:o.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,r=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,r),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(r):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,r,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable() +},_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>▲</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>▼</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,r,o=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,r=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(r=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+r,a=t.element.find(n),a.length||(a=t._createPanel(r),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":r,"aria-labelledby":o}),a.attr("aria-labelledby",o)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),r=a[0]===s[0],o=r&&i.collapsible,h=o?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:o?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||r&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=o?!1:this.tabs.index(a),this.active=r?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),r.length&&a.options.show?a._show(r,a.options.show,s):(r.show(),s())}var a=this,r=i.newPanel,o=i.oldPanel;this.running=!0,o.length&&this.options.hide?this._hide(o,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),o.hide(),n()),o.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&o.length?i.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),r=this._getPanelForTab(n),o={tab:n,panel:r},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){r.html(e),s._trigger("load",i,o),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,r.is(":hidden")||r.position(l)}var a,r,o,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),r=a.tooltip,this._addDescribedBy(i,r.attr("id")),r.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("<div>").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):r.position(e.extend({of:i},this.options.position)),r.hide(),this._show(r,this.options.show),this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){r.is(":visible")&&(n(l.of),clearInterval(o))},e.fx.interval)),this._trigger("open",t,{tooltip:r})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var r,o=a.re.exec(i),h=o&&a.parse(o),l=a.space||"rgba";return h?(r=s[l](h),s[u[l].cache]=r[u[l].cache],n=s._rgba=r._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,r="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",o=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,r,o,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(r),r=t);var d=this,c=e.type(n),p=this._rgba=[];return r!==t&&(n=[n,r,o,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var r,o=i[a.cache];return o&&(r=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=o[i.idx]?s=o[i.idx]===r[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],r=0===this.alpha()?l("transparent"):this,o=r[a.cache]||a.to(r._rgba),h=o.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,r=o[a],l=s[a],u=d[n.type]||{};null!==l&&(null===r?h[a]=l:(u.mod&&(l-r>u.mod/2?r+=u.mod:r-l>u.mod/2&&(r-=u.mod)),h[a]=i((l-r)*t+r,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,r=e[3],o=Math.max(s,n,a),h=Math.min(s,n,a),l=o-h,u=o+h,d=.5*u;return t=h===o?0:s===o?60*(n-a)/l+360:n===o?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==r?1:r]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],r=.5>=s?s*(1+i):s+i-s*i,o=2*s-r;return[Math.round(255*n(o,r,t+1/3)),Math.round(255*n(o,r,t)),Math.round(255*n(o,r,t-1/3)),a]},f(u,function(s,n){var a=n.props,r=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[r]&&(this[r]=h(this._rgba)),s===t)return this[r].slice();var n,o=e.type(s),d="array"===o||"object"===o?s:arguments,c=this[r].slice();return f(a,function(e,t){var s=d["object"===o?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[r]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,r=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===r?u:("function"===r&&(n=n.call(this,u),r=e.type(n)),null==n&&i.empty?this:("string"===r&&(a=o.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,r,o="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(r="backgroundColor"===i?t.parentNode:t;(""===o||"transparent"===o)&&r&&r.style;)try{o=e.css(r,"backgroundColor"),r=r.parentNode}catch(h){}n=n.blend(o&&"transparent"!==o?o:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(r),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,r={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(r[s]=a));return r}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,r,o){var h=e.speed(a,r,o);return this.queue(function(){var a,r=e(this),o=r.attr("class")||"",l=h.children?r.find("*").addBack():r;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&r[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),r.attr("class",o),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(r[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,r){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,r):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(r){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement; +return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,o=s.mode;(n.is(":hidden")?"hide"===o:"show"===o)?(n[o](),i()):r.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,r=e.effects.effect[s.effect];return e.fx.off||!r?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,r=e(this),o=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(r,t.mode||"hide"),d=t.direction||"up",c=o.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;r.parent().is(".ui-effects-wrapper")?e.effects.save(r.parent(),l):e.effects.save(r,l),r.show(),s=e.effects.createWrapper(r).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(r.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&r.hide(),e.effects.restore(r,l),e.effects.removeWrapper(r),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,r=e(this),o=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(r,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=r.queue(),_=b.length;for((u||l)&&o.push("opacity"),e.effects.save(r,o),r.show(),e.effects.createWrapper(r),c||(c=r["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,r.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,r.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,r.animate(n,m,g)),r.queue(function(){l&&r.hide(),e.effects.restore(r,o),e.effects.removeWrapper(r),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),r.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,r=e(this),o=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(r,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(r,o),r.show(),s=e.effects.createWrapper(r).css({overflow:"hidden"}),n="IMG"===r[0].tagName?s:r,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||r.hide(),e.effects.restore(r,o),e.effects.removeWrapper(r),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],r=e.effects.setMode(n,t.mode||"hide"),o="show"===r,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:o?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,o&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(o?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,r,o,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,r=0;c>r;r++)o=g.left+r*v,l=r-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:o+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:o+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),r=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(a,t.mode||"hide"),h="show"===o,l="hide"===o,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,r),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,r),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),r={backgroundColor:s.css("backgroundColor")};"hide"===a&&(r.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(r,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,r=e(this),o=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(r,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=r.css("position"),y=f?o:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&r.show(),s={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},"toggle"===t.mode&&"show"===p?(r.from=t.to||b,r.to=t.from||s):(r.from=t.from||("show"===p?b:s),r.to=t.to||("hide"===p?b:s)),a={from:{y:r.from.height/s.height,x:r.from.width/s.width},to:{y:r.to.height/s.height,x:r.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),r.from=e.effects.setTransition(r,d,a.from.y,r.from),r.to=e.effects.setTransition(r,d,a.to.y,r.to)),a.from.x!==a.to.x&&(y=y.concat(c),r.from=e.effects.setTransition(r,c,a.from.x,r.from),r.to=e.effects.setTransition(r,c,a.to.x,r.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),r.from=e.effects.setTransition(r,u,a.from.y,r.from),r.to=e.effects.setTransition(r,u,a.to.y,r.to)),e.effects.save(r,y),r.show(),e.effects.createWrapper(r),r.css("overflow","hidden").css(r.from),g&&(n=e.effects.getBaseline(g,s),r.from.top=(s.outerHeight-r.outerHeight())*n.y,r.from.left=(s.outerWidth-r.outerWidth())*n.x,r.to.top=(s.outerHeight-r.to.outerHeight)*n.y,r.to.left=(s.outerWidth-r.to.outerWidth)*n.x),r.css(r.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=o.concat(d).concat(c),r.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),r.animate(r.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===r.to.opacity&&r.css("opacity",r.from.opacity),"hide"===p&&r.hide(),e.effects.restore(r,y),f||("static"===v?r.css({position:"relative",top:r.to.top,left:r.to.left}):e.each(["top","left"],function(e,t){r.css(t,function(t,i){var s=parseInt(i,10),n=e?r.to.left:r.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(r),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),r=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),o=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==o?r/100:1,x:"vertical"!==o?r/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,r=parseInt(t.percent,10)||150,o=r/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?r:100,from:a?h:{height:h.height*o,width:h.width*o,outerHeight:h.outerHeight*o,outerWidth:h.outerWidth*o}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),r="show"===a,o="hide"===a,h=r||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((r||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){o&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(n,t.mode||"effect"),o=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===o||"down"===o?"top":"left",p="up"===o||"left"===o,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===r&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],r=e.effects.setMode(n,t.mode||"show"),o="show"===r,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),o&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(o?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===r&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),r=e("body"),o=a?r.scrollTop():0,h=a?r.scrollLeft():0,l=n.offset(),u={top:l.top-o,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-o,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}}); \ No newline at end of file diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.structure.css b/assets/js/jquery-ui-1.11.4/jquery-ui.structure.css new file mode 100644 index 0000000000000000000000000000000000000000..8184e152df2d03022a325af8c2ea41ff4137bbe0 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.structure.css @@ -0,0 +1,833 @@ +/*! + * jQuery UI CSS Framework 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); /* support: IE8 */ +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-draggable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; + -ms-touch-action: none; + touch-action: none; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable { + -ms-touch-action: none; + touch-action: none; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-sortable-handle { + -ms-touch-action: none; + touch-action: none; +} +.ui-accordion .ui-accordion-header { + display: block; + cursor: pointer; + position: relative; + margin: 2px 0 0 0; + padding: .5em .5em .5em .7em; + min-height: 0; /* support: IE7 */ + font-size: 100%; +} +.ui-accordion .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-icons .ui-accordion-icons { + padding-left: 2.2em; +} +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { + position: absolute; + left: .5em; + top: 50%; + margin-top: -8px; +} +.ui-accordion .ui-accordion-content { + padding: 1em 2.2em; + border-top: 0; + overflow: auto; +} +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-datepicker { + width: 17em; + padding: .2em .2em 0; + display: none; +} +.ui-datepicker .ui-datepicker-header { + position: relative; + padding: .2em 0; +} +.ui-datepicker .ui-datepicker-prev, +.ui-datepicker .ui-datepicker-next { + position: absolute; + top: 2px; + width: 1.8em; + height: 1.8em; +} +.ui-datepicker .ui-datepicker-prev-hover, +.ui-datepicker .ui-datepicker-next-hover { + top: 1px; +} +.ui-datepicker .ui-datepicker-prev { + left: 2px; +} +.ui-datepicker .ui-datepicker-next { + right: 2px; +} +.ui-datepicker .ui-datepicker-prev-hover { + left: 1px; +} +.ui-datepicker .ui-datepicker-next-hover { + right: 1px; +} +.ui-datepicker .ui-datepicker-prev span, +.ui-datepicker .ui-datepicker-next span { + display: block; + position: absolute; + left: 50%; + margin-left: -8px; + top: 50%; + margin-top: -8px; +} +.ui-datepicker .ui-datepicker-title { + margin: 0 2.3em; + line-height: 1.8em; + text-align: center; +} +.ui-datepicker .ui-datepicker-title select { + font-size: 1em; + margin: 1px 0; +} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { + width: 45%; +} +.ui-datepicker table { + width: 100%; + font-size: .9em; + border-collapse: collapse; + margin: 0 0 .4em; +} +.ui-datepicker th { + padding: .7em .3em; + text-align: center; + font-weight: bold; + border: 0; +} +.ui-datepicker td { + border: 0; + padding: 1px; +} +.ui-datepicker td span, +.ui-datepicker td a { + display: block; + padding: .2em; + text-align: right; + text-decoration: none; +} +.ui-datepicker .ui-datepicker-buttonpane { + background-image: none; + margin: .7em 0 0 0; + padding: 0 .2em; + border-left: 0; + border-right: 0; + border-bottom: 0; +} +.ui-datepicker .ui-datepicker-buttonpane button { + float: right; + margin: .5em .2em .4em; + cursor: pointer; + padding: .2em .6em .3em .6em; + width: auto; + overflow: visible; +} +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { + float: left; +} + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { + width: auto; +} +.ui-datepicker-multi .ui-datepicker-group { + float: left; +} +.ui-datepicker-multi .ui-datepicker-group table { + width: 95%; + margin: 0 auto .4em; +} +.ui-datepicker-multi-2 .ui-datepicker-group { + width: 50%; +} +.ui-datepicker-multi-3 .ui-datepicker-group { + width: 33.3%; +} +.ui-datepicker-multi-4 .ui-datepicker-group { + width: 25%; +} +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { + border-left-width: 0; +} +.ui-datepicker-multi .ui-datepicker-buttonpane { + clear: left; +} +.ui-datepicker-row-break { + clear: both; + width: 100%; + font-size: 0; +} + +/* RTL support */ +.ui-datepicker-rtl { + direction: rtl; +} +.ui-datepicker-rtl .ui-datepicker-prev { + right: 2px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next { + left: 2px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-prev:hover { + right: 1px; + left: auto; +} +.ui-datepicker-rtl .ui-datepicker-next:hover { + left: 1px; + right: auto; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane { + clear: right; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button { + float: left; +} +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current, +.ui-datepicker-rtl .ui-datepicker-group { + float: right; +} +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header, +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { + border-right-width: 0; + border-left-width: 1px; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-menu { + list-style: none; + padding: 0; + margin: 0; + display: block; + outline: none; +} +.ui-menu .ui-menu { + position: absolute; +} +.ui-menu .ui-menu-item { + position: relative; + margin: 0; + padding: 3px 1em 3px .4em; + cursor: pointer; + min-height: 0; /* support: IE7 */ + /* support: IE10, see #8844 */ + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); +} +.ui-menu .ui-menu-divider { + margin: 5px 0; + height: 0; + font-size: 0; + line-height: 0; + border-width: 1px 0 0 0; +} +.ui-menu .ui-state-focus, +.ui-menu .ui-state-active { + margin: -1px; +} + +/* icon support */ +.ui-menu-icons { + position: relative; +} +.ui-menu-icons .ui-menu-item { + padding-left: 2em; +} + +/* left-aligned */ +.ui-menu .ui-icon { + position: absolute; + top: 0; + bottom: 0; + left: .2em; + margin: auto 0; +} + +/* right-aligned */ +.ui-menu .ui-menu-icon { + left: auto; + right: 0; +} +.ui-progressbar { + height: 2em; + text-align: left; + overflow: hidden; +} +.ui-progressbar .ui-progressbar-value { + margin: -1px; + height: 100%; +} +.ui-progressbar .ui-progressbar-overlay { + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJ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X6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw=="); + height: 100%; + filter: alpha(opacity=25); /* support: IE8 */ + opacity: 0.25; +} +.ui-progressbar-indeterminate .ui-progressbar-value { + background-image: none; +} +.ui-selectmenu-menu { + padding: 0; + margin: 0; + position: absolute; + top: 0; + left: 0; + display: none; +} +.ui-selectmenu-menu .ui-menu { + overflow: auto; + /* Support: IE7 */ + overflow-x: hidden; + padding-bottom: 1px; +} +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup { + font-size: 1em; + font-weight: bold; + line-height: 1.5; + padding: 2px 0.4em; + margin: 0.5em 0 0 0; + height: auto; + border: 0; +} +.ui-selectmenu-open { + display: block; +} +.ui-selectmenu-button { + display: inline-block; + overflow: hidden; + position: relative; + text-decoration: none; + cursor: pointer; +} +.ui-selectmenu-button span.ui-icon { + right: 0.5em; + left: auto; + margin-top: -8px; + position: absolute; + top: 50%; +} +.ui-selectmenu-button span.ui-selectmenu-text { + text-align: left; + padding: 0.4em 2.1em 0.4em 1em; + display: block; + line-height: 1.4; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.ui-slider { + position: relative; + text-align: left; +} +.ui-slider .ui-slider-handle { + position: absolute; + z-index: 2; + width: 1.2em; + height: 1.2em; + cursor: default; + -ms-touch-action: none; + touch-action: none; +} +.ui-slider .ui-slider-range { + position: absolute; + z-index: 1; + font-size: .7em; + display: block; + border: 0; + background-position: 0 0; +} + +/* support: IE8 - See #6727 */ +.ui-slider.ui-state-disabled .ui-slider-handle, +.ui-slider.ui-state-disabled .ui-slider-range { + filter: inherit; +} + +.ui-slider-horizontal { + height: .8em; +} +.ui-slider-horizontal .ui-slider-handle { + top: -.3em; + margin-left: -.6em; +} +.ui-slider-horizontal .ui-slider-range { + top: 0; + height: 100%; +} +.ui-slider-horizontal .ui-slider-range-min { + left: 0; +} +.ui-slider-horizontal .ui-slider-range-max { + right: 0; +} + +.ui-slider-vertical { + width: .8em; + height: 100px; +} +.ui-slider-vertical .ui-slider-handle { + left: -.3em; + margin-left: 0; + margin-bottom: -.6em; +} +.ui-slider-vertical .ui-slider-range { + left: 0; + width: 100%; +} +.ui-slider-vertical .ui-slider-range-min { + bottom: 0; +} +.ui-slider-vertical .ui-slider-range-max { + top: 0; +} +.ui-spinner { + position: relative; + display: inline-block; + overflow: hidden; + padding: 0; + vertical-align: middle; +} +.ui-spinner-input { + border: none; + background: none; + color: inherit; + padding: 0; + margin: .2em 0; + vertical-align: middle; + margin-left: .4em; + margin-right: 22px; +} +.ui-spinner-button { + width: 16px; + height: 50%; + font-size: .5em; + padding: 0; + margin: 0; + text-align: center; + position: absolute; + cursor: default; + display: block; + overflow: hidden; + right: 0; +} +/* more specificity required here to override default borders */ +.ui-spinner a.ui-spinner-button { + border-top: none; + border-bottom: none; + border-right: none; +} +/* vertically center icon */ +.ui-spinner .ui-icon { + position: absolute; + margin-top: -8px; + top: 50%; + left: 0; +} +.ui-spinner-up { + top: 0; +} +.ui-spinner-down { + bottom: 0; +} + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position: -65px -16px; +} +.ui-tabs { + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ + padding: .2em; +} +.ui-tabs .ui-tabs-nav { + margin: 0; + padding: .2em .2em 0; +} +.ui-tabs .ui-tabs-nav li { + list-style: none; + float: left; + position: relative; + top: 0; + margin: 1px .2em 0 0; + border-bottom-width: 0; + padding: 0; + white-space: nowrap; +} +.ui-tabs .ui-tabs-nav .ui-tabs-anchor { + float: left; + padding: .5em 1em; + text-decoration: none; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active { + margin-bottom: -1px; + padding-bottom: 1px; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor, +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor { + cursor: text; +} +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor { + cursor: pointer; +} +.ui-tabs .ui-tabs-panel { + display: block; + border-width: 0; + padding: 1em 1.4em; + background: none; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.structure.min.css b/assets/js/jquery-ui-1.11.4/jquery-ui.structure.min.css new file mode 100644 index 0000000000000000000000000000000000000000..e44e9444b53a718dde80612d7250a58e557c5925 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.4 - 2015-10-25 +* http://jqueryui.com +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-draggable-handle{-ms-touch-action:none;touch-action:none}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block;-ms-touch-action:none;touch-action:none}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable{-ms-touch-action:none;touch-action:none}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-sortable-handle{-ms-touch-action:none;touch-action:none}.ui-accordion .ui-accordion-header{display:block;cursor:pointer;position:relative;margin:2px 0 0 0;padding:.5em .5em .5em .7em;min-height:0;font-size:100%}.ui-accordion .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-icons .ui-accordion-icons{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-accordion-header-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;overflow:auto}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-progressbar{height:2em;text-align:left;overflow:hidden}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}.ui-progressbar .ui-progressbar-overlay{background:url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdj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ZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");height:100%;filter:alpha(opacity=25);opacity:0.25}.ui-progressbar-indeterminate .ui-progressbar-value{background-image:none}.ui-selectmenu-menu{padding:0;margin:0;position:absolute;top:0;left:0;display:none}.ui-selectmenu-menu .ui-menu{overflow:auto;overflow-x:hidden;padding-bottom:1px}.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup{font-size:1em;font-weight:bold;line-height:1.5;padding:2px 0.4em;margin:0.5em 0 0 0;height:auto;border:0}.ui-selectmenu-open{display:block}.ui-selectmenu-button{display:inline-block;overflow:hidden;position:relative;text-decoration:none;cursor:pointer}.ui-selectmenu-button span.ui-icon{right:0.5em;left:auto;margin-top:-8px;position:absolute;top:50%}.ui-selectmenu-button span.ui-selectmenu-text{text-align:left;padding:0.4em 2.1em 0.4em 1em;display:block;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ui-slider{position:relative;text-align:left}.ui-slider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default;-ms-touch-action:none;touch-action:none}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider.ui-state-disabled .ui-slider-handle,.ui-slider.ui-state-disabled .ui-slider-range{filter:inherit}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-spinner{position:relative;display:inline-block;overflow:hidden;padding:0;vertical-align:middle}.ui-spinner-input{border:none;background:none;color:inherit;padding:0;margin:.2em 0;vertical-align:middle;margin-left:.4em;margin-right:22px}.ui-spinner-button{width:16px;height:50%;font-size:.5em;padding:0;margin:0;text-align:center;position:absolute;cursor:default;display:block;overflow:hidden;right:0}.ui-spinner a.ui-spinner-button{border-top:none;border-bottom:none;border-right:none}.ui-spinner .ui-icon{position:absolute;margin-top:-8px;top:50%;left:0}.ui-spinner-up{top:0}.ui-spinner-down{bottom:0}.ui-spinner .ui-icon-triangle-1-s{background-position:-65px -16px}.ui-tabs{position:relative;padding:.2em}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:0;margin:1px .2em 0 0;border-bottom-width:0;padding:0;white-space:nowrap}.ui-tabs .ui-tabs-nav .ui-tabs-anchor{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-active{margin-bottom:-1px;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor{cursor:text}.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:none}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px} \ No newline at end of file diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.theme.css b/assets/js/jquery-ui-1.11.4/jquery-ui.theme.css new file mode 100644 index 0000000000000000000000000000000000000000..5db92db3eba26a617fae6c75e8e88527bc234412 --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.theme.css @@ -0,0 +1,410 @@ +/*! + * jQuery UI CSS Framework 1.11.4 + * http://jqueryui.com + * + * Copyright jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * http://api.jqueryui.com/category/theming/ + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CTahoma%2CVerdana%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=gloss_wave&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=glass&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=glass&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=highlight_soft&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=diagonals_thick&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=diagonals_thick&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=flat&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Trebuchet MS,Tahoma,Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #dddddd; + background: #eeeeee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x; + color: #333333; +} +.ui-widget-content a { + color: #333333; +} +.ui-widget-header { + border: 1px solid #e78f08; + background: #f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x; + color: #ffffff; + font-weight: bold; +} +.ui-widget-header a { + color: #ffffff; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #cccccc; + background: #f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #1c94c4; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #1c94c4; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #fbcb09; + background: #fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #c77405; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #c77405; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #fbd850; + background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x; + font-weight: bold; + color: #eb8f00; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #eb8f00; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fed22f; + background: #ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat; + color: #ffffff; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #ffffff; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #ffffff; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); /* support: IE8 */ + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); /* support: IE8 */ + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url("images/ui-icons_222222_256x240.png"); +} +.ui-widget-header .ui-icon { + background-image: url("images/ui-icons_ffffff_256x240.png"); +} +.ui-state-default .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-active .ui-icon { + background-image: url("images/ui-icons_ef8c08_256x240.png"); +} +.ui-state-highlight .ui-icon { + background-image: url("images/ui-icons_228ef1_256x240.png"); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url("images/ui-icons_ffd27a_256x240.png"); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #666666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat; + opacity: .5; + filter: Alpha(Opacity=50); /* support: IE8 */ +} +.ui-widget-shadow { + margin: -5px 0 0 -5px; + padding: 5px; + background: #000000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x; + opacity: .2; + filter: Alpha(Opacity=20); /* support: IE8 */ + border-radius: 5px; +} diff --git a/assets/js/jquery-ui-1.11.4/jquery-ui.theme.min.css b/assets/js/jquery-ui-1.11.4/jquery-ui.theme.min.css new file mode 100644 index 0000000000000000000000000000000000000000..f557d2752348e670a7f16cc2441e3b98e9f414de --- /dev/null +++ b/assets/js/jquery-ui-1.11.4/jquery-ui.theme.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.11.4 - 2015-10-27 +* http://jqueryui.com +* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-widget{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Trebuchet MS,Tahoma,Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #ddd;background:#eee url("images/ui-bg_highlight-soft_100_eeeeee_1x100.png") 50% top repeat-x;color:#333}.ui-widget-content a{color:#333}.ui-widget-header{border:1px solid #e78f08;background:#f6a828 url("images/ui-bg_gloss-wave_35_f6a828_500x100.png") 50% 50% repeat-x;color:#fff;font-weight:bold}.ui-widget-header a{color:#fff}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #ccc;background:#f6f6f6 url("images/ui-bg_glass_100_f6f6f6_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#1c94c4}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#1c94c4;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #fbcb09;background:#fdf5ce url("images/ui-bg_glass_100_fdf5ce_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#c77405}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#c77405;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #fbd850;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:bold;color:#eb8f00}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#eb8f00;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fed22f;background:#ffe45c url("images/ui-bg_highlight-soft_75_ffe45c_1x100.png") 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#b81900 url("images/ui-bg_diagonals-thick_18_b81900_40x40.png") 50% 50% repeat;color:#fff}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#fff}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_ffffff_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_ef8c08_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_228ef1_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_ffd27a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#666 url("images/ui-bg_diagonals-thick_20_666666_40x40.png") 50% 50% repeat;opacity:.5;filter:Alpha(Opacity=50)}.ui-widget-shadow{margin:-5px 0 0 -5px;padding:5px;background:#000 url("images/ui-bg_flat_10_000000_40x100.png") 50% 50% repeat-x;opacity:.2;filter:Alpha(Opacity=20);border-radius:5px} \ No newline at end of file diff --git a/assets/js/jquery.filter_input.js b/assets/js/jquery.filter_input.js new file mode 100755 index 0000000000000000000000000000000000000000..64ee0e3d3fbca83833cc2c417a78f012ae6a8117 --- /dev/null +++ b/assets/js/jquery.filter_input.js @@ -0,0 +1,151 @@ +/* + + Author - Rudolf Naprstek + Website - http://www.thimbleopensource.com/tutorials-snippets/jquery-plugin-filter-text-input + Version - 1.5.3 + Release - 12th February 2014 + + Thanks to Niko Halink from ARGH!media for bugfix! + + Remy Blom: Added a callback function when the filter surpresses a keypress in order to give user feedback + + Don Myers: Added extension for using predefined filter masks + + Richard Eddy: Added extension for using negative number + + +*/ + +(function($){ + + $.fn.extend({ + + filter_input: function(options) { + + var defaults = { + regex:".", + negkey: false, // use "-" if you want to allow minus sign at the beginning of the string + live:false, + events:'keypress paste' + } + + var options = $.extend(defaults, options); + + function filter_input_function(event) { + + var input = (event.input) ? event.input : $(this); + if (event.ctrlKey || event.altKey) return; + if (event.type=='keypress') { + + var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0; + + // 8 = backspace, 9 = tab, 13 = enter, 35 = end, 36 = home, 37 = left, 39 = right, 46 = delete + if (key == 8 || key == 9 || key == 13 || key == 35 || key == 36|| key == 37 || key == 39 || key == 46) { + + // if charCode = key & keyCode = 0 + // 35 = #, 36 = $, 37 = %, 39 = ', 46 = . + + if (event.charCode == 0 && event.keyCode == key) { + return true; + } + } + var string = String.fromCharCode(key); + // if they pressed the defined negative key + if (options.negkey && string == options.negkey) { + // if there is already one at the beginning, remove it + if (input.val().substr(0, 1) == string) { + input.val(input.val().substring(1, input.val().length)).change(); + } else { + // it isn't there so add it to the beginning of the string + input.val(string + input.val()).change(); + } + return false; + } + var regex = new RegExp(options.regex); + } else if (event.type=='paste') { + input.data('value_before_paste', event.target.value); + setTimeout(function(){ + filter_input_function({type:'after_paste', input:input}); + }, 1); + return true; + } else if (event.type=='after_paste') { + var string = input.val(); + var regex = new RegExp('^('+options.regex+')+$'); + } else { + return false; + } + + if (regex.test(string)) { + return true; + } else if (typeof(options.feedback) == 'function') { + options.feedback.call(this, string); + } + if (event.type=='after_paste') input.val(input.data('value_before_paste')); + return false; + } + + var jquery_version = $.fn.jquery.split('.'); + if (options.live) { + if (parseInt(jquery_version[0]) >= 1 && parseInt(jquery_version[1]) >= 7) { + $(this).on(options.events, filter_input_function); + } else { + $(this).live(options.events, filter_input_function); + } + } else { + return this.each(function() { + var input = $(this); + if (parseInt(jquery_version[0]) >= 1 && parseInt(jquery_version[1]) >= 7) { + input.off(options.events).on(options.events, filter_input_function); + } else { + input.unbind(options.events).bind(options.events, filter_input_function); + } + }); + } + + } + }); + +})(jQuery); + +/* + Author - Don Myers + Version - 0.1.0 + Release - March 1st 2013 +*/ + + /* + use any of these filters or regular expression in some cases the regular expression is shorter but for some people the "names" might be easier + + ie. + <input type="text" name="first_name" value="" data-mask="[a-zA-Z ]" placeholder="eg. John"/> + <input type="text" name="last_name" value="" data-mask="int" placeholder="eg. Smith"/> + +*/ + +/* +jQuery(document).ready(function() { + + var masks = { + 'int':   /[\d]/, + 'float':   /[\d\.]/, + 'money':   /[\d\.\s,]/, + 'num':    /[\d\-\.]/, + 'hex':    /[0-9a-f]/i, + 'email':   /[a-z0-9_\.\-@]/i, + 'alpha':   /[a-z_]/i, + 'alphanum': /[a-z0-9_]/i, + 'alphanumlower':/[a-z0-9_]/, + 'alphaspace':   /[a-z ]/i, + 'alphanumspace': /[a-z0-9_ ]/i, + 'alphanumspacelower':/[a-z0-9_ ]/ + }; + + jQuery('input[data-mask]').each(function(idx) { + var mask = jQuery(this).data('mask'); + var regex = (masks[mask]) ? masks[mask] : mask; + + jQuery(this).filter_input({ regex: regex, live: true }); + }); +}); + +*/ \ No newline at end of file diff --git a/assets/js/menus/multi_tags_scopes.js b/assets/js/menus/multi_tags_scopes.js new file mode 100644 index 0000000000000000000000000000000000000000..074f3071a00248882a497a955e19a66891b2ad56 --- /dev/null +++ b/assets/js/menus/multi_tags_scopes.js @@ -0,0 +1,209 @@ + + function showTagsScopesMin(htmlId){ + htmlId=".scope-min-header"; + var numberOfScope = 0; + if(typeof myMultiScopes != "undefined"){ + $.each(myMultiScopes, function(key, value){ + numberOfScope++; + }) ; + } + scopeHtml=""; + + //if(typeof userConnected != "undefined" && userConnected != null ){ + if( typeof communexion != "undefined" && notEmpty(communexion.values) ) { + scopeHtml='<button class="pull-left btn btn-link bg-white text-red tooltips item-globalscope-checker start-new-communexion" '+ + 'data-toggle="tooltip" data-placement="top" title="'+trad["communectwith"]+' '+communexion.currentName+'" '+ + 'data-scope-value="'+communexion.currentValue+'" '+ + 'data-scope-name="'+communexion.currentName+'" '+ + 'data-scope-level="'+communexion.currentLevel+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'id="btn-my-co">'+ + '<i class="fa fa-university"></i>'+ + '</button>'; + }else{ + if(userId!=""){ + scopeHtml='<button class="pull-left btn btn-link bg-white text-red tooltips" onclick="communecterUser();" '+ + 'data-toggle="tooltip" data-placement="top" title="'+trad["communectyou"]+'" '+ + 'id="btn-my-co">'+ + '<i class="fa fa-university"></i>'+ + '</button>'; + } + } + //} + + scopeHtml+='<h5 class="pull-left letter-red" style="margin-bottom: -8px;margin-top: 14px;">'+ + '<button class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-left-10 margin-right-10" '+ + 'data-target="#modalScopes" data-toggle="modal" '+ + 'data-toggle="tooltip" data-placement="top" '+ + 'title="'+trad["selectscopesearch"]+'">'+ + '<img src="'+themeUrl+'/assets/img/cible3.png" height=25>'+ + '</button>'; + if(numberOfScope > 0){ + scopeHtml+= trad["searchingon"]+' <i class="fa fa-angle-right"></i>'; + } else{ + scopeHtml+= '<span id="helpMultiScope" class="toggle-scope-dropdown">'+ + '<a href="javascript:" data-target="#modalScopes" data-toggle="modal" class="letter-red">'+ + '<i class="fa fa-plus"></i> '+trad["addScopeFilters"]+' ?'+ + '</a>'+ + '</span>'; + } + + + + scopeHtml+= '</h5>'+ + '<div class="scope-min-header list_tags_scopes text-left ellipsis">'+ + '</div>'; + + if( notEmpty(userConnected) && notEmpty(userConnected.inter) ) { + scopeHtml+= "<div id='divInterScope' class='no-padding letter-red' style=''><br/><br/><br/><br/>"+ + "Nous avons du remettre les paramètres géographiques à zéro, pour prendre en compte la nouvelle mise à jour "+ + '<a class="btn btn-xs tooltips btn-accept" href="javascript:;" onclick="validateScopeInter()">'+ + '<i class="fa fa-check "></i> Cliquer ici pour ne plus voir ce message.'+ + '</a>'+ + "</div>"; + } + + $("#container-scope-filter").html(scopeHtml); + //} + /************** SCOPES **************/ + var iconSelectScope = "<i class='fa fa-circle-o'></i>"; + var scopeSelected = true; + // $.each(myMultiScopes, function(key, value){ + // if(value.active == false) + // scopeSelected = false; + // }); + + html = "<div class='list-select-scopes'>"; + if(numberOfScope > 0){ + $.each(myMultiScopes, function(key, value){ + numberOfScope++; + var disabled = value.active == false ? "disabled" : ""; + if(typeof value.name == "undefined") value.name = key; + html += "<span data-toggle='dropdown' data-target='dropdown-multi-scope' "+ + "class='text-red "+disabled+" item-scope-checker item-scope-input margin-right-10' data-scope-value='"+ key + "'>" + + "<i class='fa fa-check-circle'></i> " + value.name + + "</span> "; + }); + } + html += "</div>"; + $(htmlId).html(html); + if(actionOnSetGlobalScope=="save"){ + scopeHtml='<a class="pull-left btn btn-link bg-white text-red tooltips item-globalscope-checker start-new-communexion" '+ + 'data-toggle="tooltip" data-placement="top" title="title="'+trad["communectwith"]+' '+communexion.currentName+'" '+ + 'data-scope-value="'+communexion.currentValue+'" '+ + 'data-scope-name="'+communexion.currentName+'" '+ + 'data-scope-level="'+communexion.currentLevel+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'id="btn-my-co">'+ + '<i class="fa fa-university"></i>'+ + '</a>'+ + '<h5 class="pull-left letter-red" style="margin-bottom: -8px;margin-top: 14px;">'+ + '<a class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-left-10 margin-right-10" '+ + 'data-target="#modalScopes" data-toggle="modal" '+ + 'data-toggle="tooltip" data-placement="top" '+ + 'title="Sélectionner des lieux de recherche">'+ + '<img src="'+themeUrl+'/assets/img/cible3.png" height=25>'+ + '</a>'+ + 'Selectionner les endroits de publications <i class="fa fa-angle-right"></i>'+ + '</h5>'+ + '<div class="scope-min-header list_tags_scopes hidden-xs text-left ellipsis">'+ + html+ + '</div>'; + $("#scopeListContainerForm").html(scopeHtml); + } + multiTagScopeLbl(); + //bindCommunexionScopeEvents(); + + $(".toggle-scope-dropdown").click(function(){ //mylog.log("toogle"); + if(!$("#dropdown-content-multi-scope").hasClass('open')) + setTimeout(function(){ $("#dropdown-content-multi-scope").addClass('open'); }, 300); + }); + + + // if(scopeSelected){ $(".btnShowAllScope").hide(); $(".btnHideAllScope").show(); } + // else { $(".btnShowAllScope").show(); $(".btnHideAllScope").hide(); } + + checkScopeMax(); + rebuildSearchScopeInput(); + + } + +var currentTypeSearchSend = "search"; +function multiTagScopeLbl(type){ + if(!notEmpty(type)) type = currentTypeSearchSend; + if(type=="search"){ + $("#lbl-my-scopes").html("Rechercher par lieux <i class='fa fa-angle-right'></i> "); + $("#lbl-my-tags").html("Rechercher par tags <i class='fa fa-angle-right'></i> "); + $("br.visible-in-form").hide(); + }else if(type=="send"){ + $("#lbl-my-scopes").html("<i class='fa fa-angle-down'></i> Sélectionnez les lieux de destination"); + $("#lbl-my-tags").html("<i class='fa fa-angle-down'></i> Sélectionner des tags<span class='hidden-xs'> pour définir le contenu de votre message</span>"); + $("br.visible-in-form").show(); + } + currentTypeSearchSend = type; +} + +function showEmptyMsg(){ + var c=0; + if(typeof myMultiScopes != "undefined") + $.each(myMultiScopes, function(key, value){ c++; }); + mylog.log("showEmptyMsg", c); + if(c==0) + $("#modalScopes .visible-empty").show(); + else + $("#modalScopes .visible-empty").hide(); + if(c==0) + $("#modalScopes .hidden-empty").hide(); + else + $("#modalScopes .hidden-empty").show(); + + //c=0; $.each(myMultiTags, function(key, value){ c++; }); + //if(c==0) $("#dropdown-multi-tag .visible-empty").show(); else $("#dropdown-multi-tag .visible-empty").hide(); + +} + + +function slidupScopetagsMin(show){ //mylog.log("slidupScopetagsMin", show); + if($("#list_filters").hasClass("hidden")){ + $("#list_filters").removeClass("hidden"); + $("#btn-slidup-scopetags").html("<i class='fa fa-minus'></i>"); + } + else{ + $("#list_filters").addClass("hidden"); //mylog.log("hidden slidupScopetagsMin", show); + $("#btn-slidup-scopetags").html("<i class='fa fa-plus'></i>"); + } + + if(show==true){ + $("#list_filters").removeClass("hidden"); //mylog.log("removeClass hidden slidupScopetagsMin", show); + $("#btn-slidup-scopetags").html("<i class='fa fa-minus'></i>"); + } + else if(show==false){ + $("#list_filters").addClass("hidden"); + $("#btn-slidup-scopetags").html("<i class='fa fa-plus'></i>"); + } +} + +function validateScopeInter(){ + mylog.log("validateScopeInter"); + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/updatescopeinter/", + data: {}, + dataType: "json", + success: function(data){ + mylog.log("validateScopeInter", data); + if(data.result){ + toastr.success(data.msg); + userConnected.inter = false ; + $("#divInterScope").addClass("hidden"); + } + else + toastr.error(data.msg); + }, + + }); +} + + + diff --git a/assets/js/menus/multiscopes.js b/assets/js/menus/multiscopes.js new file mode 100644 index 0000000000000000000000000000000000000000..deea23b1ed8ba7deb3a6440a87cacc7c5ace0f94 --- /dev/null +++ b/assets/js/menus/multiscopes.js @@ -0,0 +1,487 @@ + +function scopeExists(scopeValue){ + return typeof myMultiScopes[scopeValue] != "undefined"; +} + +function saveMultiScope(){ + mylog.log("saveMultiScope() try - userId = ", userId); + mylog.dir(myMultiScopes); + hideSearchResults(); + if(userId != null && userId != ""){ + if(!notEmpty(myMultiScopes)) myMultiScopes = {}; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/updatemultiscope", + data: {"multiscopes" : myMultiScopes}, + dataType: "json", + success: function(data){ + mylog.log("updatemultiscope success"); + }, + error: function(error){ + mylog.log("Une erreur est survenue pendant l'enregistrement des scopes"); + } + }); + } + + showCountScope(); + //rebuildSearchScopeInput(); + setTimeout(function(){ rebuildSearchScopeInput() }, 1000); + saveCookieMultiscope(); +} +function saveCookieMultiscope(){ + mylog.log("saveCookieMultiscope", typeof myMultiScopes, myMultiScopes); + $.cookie('multiscopes', JSON.stringify(myMultiScopes), { expires: 365, path: '/' }); +} + +function autocompleteMultiScope(){ + var scopeValue = $('#input-add-multi-scope').val(); + var countryCode = $('#select-country').val(); + $("#dropdown-multi-scope-found").html("<li><i class='fa fa-refresh fa-spin'></i></li>"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/city/autocompletemultiscope", + data: { + type: currentScopeType, + scopeValue: scopeValue, + countryCode: countryCode + }, + dataType: "json", + success: function(data){ + mylog.log("autocompleteMultiScope() success"); + mylog.dir(data); + $("#dropdown-multi-scope-found").html(trad.noresult); + html=""; + var allCP = new Array(); + var allCities = new Array(); + $.each(data.cities, function(key, value){ + if(currentScopeType == "city") { //mylog.log("in scope city"); + //val = value.country + '_' + value.insee; + val = key; + lbl = (typeof value.name!= "undefined") ? value.name : ""; //value.name ; + lblList = lbl + ((typeof value.level3Name!= "undefined") ? " (" +value.level3Name + ")" : ""); + html += '<li><a href="javascript:;" class="addScope" data-country="'+value.country+'" data-val="'+val+'" data-lbl="'+lbl+'" >'+lblList+'</a></li>'; + + }; + if(currentScopeType == "cp") { + $.each(value.postalCodes, function(key, valueCP){ //mylog.log(allCities); + val = valueCP.postalCode; + lbl = valueCP.postalCode ; + lblList = valueCP.name + ", " +valueCP.postalCode ; + html += '<li><a href="javascript:;" class="addScope" data-country="'+value.country+'" data-val="'+val+'" data-lbl="'+lbl+'" >'+lblList+'</a></li>'; + }); + }; + + if(currentScopeType == "zone"){ + val = key; + lbl = (typeof value.name!= "undefined") ? value.name : ""; + lblList = lbl + " (" +value.countryCode + ")"; + level = value.level[0]; + html += '<li><a href="javascript:;" class="addScope" data-country="'+value.country+'" data-level="'+level+'" data-val="'+val+'" data-lbl="'+lbl+'" >'+lblList+'</a></li>'; + + } + }); + if(html != "") + $("#dropdown-multi-scope-found").html(html); + $("#dropdown-multi-scope-found").mouseleave(function(){ + $(this).hide(); + }); + + $(".addScope").click(function(){ + addScopeToMultiscope($(this).data("val"), $(this).data("lbl"), $(this).data("level"), $(this).data("country")); + }); + + }, + error: function(error){ + $("#dropdown-multi-scope-found").html("error"); + mylog.log("Une erreur est survenue pendant autocompleteMultiScope"); + } + }); +} +/**********************************************/ +function loadMultiScopes(){ + mylog.log("loadMultiScopes"); + $.each(myMultiScopes, function(key, value){ + showScopeInMultiscope(key); + }); + //bindCommunexionScopeEvents(); + showCountScope(); + saveCookieMultiscope(); +} + +function showCountScope(){ + mylog.log("showCountScope"); + var count = 0; + var types = new Array("city", "cp", "level1", "level2", "level3", "level4"); + //mylog.log("showCountScope"); + //mylog.dir(myMultiScopes); + $.each(myMultiScopes, function(key, value){ + if(value.active==true) count++; + //mylog.log(types.indexOf(value.type), value.type); + + var levelType = ( (value.type == "zone") ? "level"+value.level : value.type ) ; + + if(types.indexOf(levelType)>-1) + types.splice(types.indexOf(levelType), 1); + }); + $.each(types, function(key, value){ + $("#multi-scope-list-"+value).hide(); + }); + $(".scope-count").html(count); + //showTagsScopesMin(".list_tags_scopes"); + showEmptyMsg(); +} + +function selectAllScopes(select){ + mylog.log("selectAllScopes", select); + // if(typeof select == "undefined"){ + // select = true; + // $.each(myMultiScopes, function(key, value){ + // if(value.active) + // select = false; + // }); + // } + + if(typeof select == "undefined"){ + select = false; + } + + $.each(myMultiScopes, function(key, value){ + value.active = select ; + myMultiScopes[key] = value ; + }); + + $.each(myMultiScopes, function(key, value){ + scopeActive(key); + }); + + saveMultiScope(); +} + +function showScopeInMultiscope(scopeValue){ + mylog.log("showScopeInMultiscope()", scopeValue); + var html = ""; + if(scopeExists(scopeValue)){ + var scope = myMultiScopes[scopeValue]; + mylog.log("scope", scope); + if(typeof scope.name == "undefined") scope.name = scopeValue; + var faActive = (myMultiScopes[scopeValue].active == true) ? "check-circle" : "circle-o"; + var classDisable = (myMultiScopes[scopeValue].active == false) ? "disabled" : ""; + html = + '<span class="item-scope-input bg-red item-scope-'+scope.type+' '+classDisable+'" data-scope-value="'+scopeValue+'">' + + '<a href="javascript:" class="item-scope-checker tooltips"' + + 'data-toggle="tooltip" data-placement="bottom" ' + + 'title="Activer/Désactiver" data-scope-value="'+scopeValue+'">' + + '<i class="fa fa-'+faActive+'"></i>' + + '</a>' + + '<span class="item-scope-name" >'+scope.name+'</span>' + + '<a href="javascript:" class="item-scope-deleter tooltips"' + + 'data-toggle="tooltip" data-placement="bottom" ' + + 'title="Supprimer" data-scope-value="'+scopeValue+'">' + + '<i class="fa fa-times"></i>' + + '</a>' + + '</span>'; + + var levelType = ( (scope.type == "zone") ? "level"+scope.level : scope.type ) ; + mylog.log("levelType", levelType, "#multi-scope-list-"+levelType); + $("#multi-scope-list-"+levelType).append(html); + $("#multi-scope-list-"+levelType).show(); + + if(actionOnSetGlobalScope=="save") + $("#scopeListContainerForm").html(html); + $(".item-scope-checker").off().click(function(){ toogleScopeMultiscope( $(this).data("scope-value")) }); + $(".item-scope-deleter").off().click(function(){ deleteScopeInMultiscope( $(this).data("scope-value")); }); + //showMsgInfoMultiScope("Le scope a bien été ajouté", "success"); + }else{ + html = ""; + //showMsgInfoMultiScope("showScopeInMultiscope error : ce lieu n'existe pas - " + scopeValue, "error"); + } + + $(".tooltips").tooltip(); +} + +//scopeValue est la valeur utilisée pour la recherche +//scopeName est la valeur affichée +function addScopeToMultiscope(scopeValue, scopeName, scopeLevel, scopeCountry){ + mylog.log("addScopeToMultiscope", scopeValue, scopeName); + if(scopeValue == "") return; + if(!scopeExists(scopeValue)){ + mylog.log("adding", scopeValue); + var scopeType = currentScopeType; + myMultiScopes[scopeValue] = { name: scopeName, active: true, type: scopeType }; + if(notEmpty(scopeLevel)){ + if(scopeLevel == "1") + scopeType = "level1"; + else if(scopeLevel == "2") + scopeType = "level2"; + else if(scopeLevel == "3") + scopeType = "level3"; + else if(scopeLevel == "4") + scopeType = "level4"; + myMultiScopes[scopeValue].type = scopeType ; + myMultiScopes[scopeValue].level = scopeLevel ; + + + } + + if(notNull(scopeCountry)) + myMultiScopes[scopeValue].countryCode = scopeCountry ; + //myMultiScopes[scopeValue].type = scopeType ; + mylog.log("myMultiScopes") + //alert(); + showScopeInMultiscope(scopeValue); + $("#input-add-multi-scope").val(""); + saveMultiScope(); + showTagsScopesMin(); + bindCommunexionScopeEvents(); + }else{ + showMsgInfoMultiScope("Ce lieu est déjà dans votre liste", "info"); + } + $("#dropdown-multi-scope-found").hide(); +} + + +function deleteScopeInMultiscope(scopeValue){ mylog.log("deleteScopeInMultiscope(scopeValue)", scopeValue); + if(scopeExists(scopeValue)){ + delete myMultiScopes[scopeValue]; + $("[data-scope-value=\""+scopeValue+"\"]").remove(); + saveMultiScope(); + } + //mylog.dir(myMultiScopes); +} + +function toogleScopeMultiscope(scopeValue){ + mylog.log("toogleScopeMultiscope(scopeValue)", scopeValue); + if(scopeExists(scopeValue)){ + myMultiScopes[scopeValue].active = !myMultiScopes[scopeValue].active; + + if(typeof selected == "undefined") saveMultiScope(); + else myMultiScopes[scopeValue].active = selected; + + /*if(myMultiScopes[scopeValue].active){ + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-circle-o"); + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-check-circle"); + $("[data-scope-value='"+scopeValue+"'].item-scope-input").removeClass("disabled"); + }else{ + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").addClass("fa-circle-o"); + $("[data-scope-value='"+scopeValue+"'] .item-scope-checker i.fa").removeClass("fa-check-circle"); + $("[data-scope-value='"+scopeValue+"'].item-scope-input").addClass("disabled"); + }*/ + mylog.log("before rebuildSearchScopeInput from toogleScope"); + //rebuildSearchScopeInput(); + setTimeout(function(){ rebuildSearchScopeInput() }, 1000); + }else{ + //showMsgInfoMultiScope("Ce scope n'existe pas", "danger"); + } +} + +function getMultiScopeList(){ return myMultiScopes; } + + +function getLocalityForSearch(noScope){ + + if(typeof communexion.state == "undefined") communexion.state = false; + + mylog.log("getLocalityForSearch", $.cookie('communexionActivated'), communexion.state, communexion.communexionType); + if(communexion.state == true ){ + var searchLocality = {}; + if(communexion.communexionType == "cp"){ + searchLocality[communexion.currentValue] = { type : communexion.currentLevel, + name : communexion.currentName, + cp : communexion.values.cp, + active : true }; + } + else{ + searchLocality[communexion.currentValue] = { type : communexion.currentLevel, + name : communexion.currentName, + active : true }; + } + + }else if(notNull(noScope) && noScope){ + var searchLocality = {}; + } + else{ + var searchLocality = getMultiScopeForSearch(); + } + return searchLocality; +} + +function getMultiScopeForSearch(){ + var res = {}; + mylog.log("getMultiScopeForSearch", myMultiScopes); + $.each(myMultiScopes, function(key, value){ + mylog.log("getMultiScopeForSearch value.active", value.active); + if(value.active == true){ + res[key] = value; + mylog.log("getMultiScopeForSearch search2", res); + } + }); + + mylog.log("getMultiScopeForSearch search", res); + return res; + +} + + +var timerMsgMultiscope; +function showMsgInfoMultiScope(msg, type){ + if(type == "success") msg = "<i class='fa fa-check'></i> " + msg; + if(type == "danger") msg = "<i class='fa fa-times'></i> " + msg; + if(type == "info") msg = "<i class='fa fa-info-circle'></i> " + msg; + + var id = "#lbl-info-select-multi-scope"; + $(id).html(msg); + if(type == "success") $(id).addClass("label-success"); else $(id).removeClass("label-success"); + if(type == "danger") $(id).addClass("label-danger"); else $(id).removeClass("label-danger"); + if(type == "info") $(id).addClass("label-info"); else $(id).removeClass("label-info"); + + $(id).off().hide(); + $(id).show(200); + + if(typeof timerMsgMultiscope != "undefined") clearTimeout(timerMsgMultiscope); + timerMsgMultiscope = setTimeout(function(){ $(id).off().hide(500)}, 3000); +} + +/**********************************************/ + +function rebuildSearchScopeInput(){ + mylog.log("rebuildSearchScopeInput"); + $("#searchLocalityLEVEL").val(""); + /*****************************************************************************************/ + searchLocalityCITYKEYs = ""; + $.each($('.item-scope-city'), function(key, value){ + if(!$(value).hasClass('disabled')){ + key = $(value).data("scope-value"); + searchLocalityCITYKEYs += (searchLocalityCITYKEYs == "") ? key : ","+key; + } + }); + //mylog.log("searchLocalityCITYKEYs",searchLocalityCITYKEYs); + if( $("#searchLocalityCITYKEY") ) + $("#searchLocalityCITYKEY").val(searchLocalityCITYKEYs); + + /*****************************************************************************************/ + searchLocalityCODE_POSTALs = ""; + $.each($('.item-scope-cp'), function(key, value){ + if(!$(value).hasClass('disabled')){ + key = $(value).data("scope-value"); + searchLocalityCODE_POSTALs += (searchLocalityCODE_POSTALs == "") ? key : ","+key; + } + }); + //mylog.log("searchLocalityCODE_POSTALs",searchLocalityCODE_POSTALs); + if( $("#searchLocalityCODE_POSTAL") ) + $("#searchLocalityCODE_POSTAL").val(searchLocalityCODE_POSTALs); + + + searchLocalityZONEs = ""; + $.each($('.item-scope-zone'), function(key, value){ + if(!$(value).hasClass('disabled')){ + key = $(value).data("scope-value"); + searchLocalityZONEs += (searchLocalityZONEs == "") ? key : ","+key; + } + }); + //mylog.log("searchLocalityZONEs",searchLocalityZONEs); + if( $("#searchLocalityZONE") ) + $("#searchLocalityZONE").val(searchLocalityZONEs); + + + $(".list_tags_scopes").removeClass("tagOnly"); + $(".city-name-locked").html(""); + //if( typeof searchCallback == "function" ) + //searchCallback(); +} + + +function lockScopeOnCityKey(cityKey, cityName){ + mylog.log("lockScopeOnCityKey", cityKey, cityName); + $("#searchLocalityCITYKEY").val(cityKey); + $("#searchLocalityCODE_POSTAL").val(""); + // $("#searchLocalityDEPARTEMENT").val(""); + // $("#searchLocalityREGION").val(""); + $("#searchLocalityZONE").val(""); + $(".list_tags_scopes").addClass("tagOnly"); + + var insee = cityKeyPart(cityKey, "insee"); + var cp = cityKeyPart(cityKey, "cp"); + var url = "#city.detail.insee." + insee; + if(cp != "") url += ".postalCode." + cityKeyPart(cityKey, "cp"); + + $(".city-name-locked").html("<a href='javascript:' class='text-red'>"+ + "<i class='fa fa-lock tooltips' id='cadenas' data-toggle='tooltip' data-placement='top' title='"+trad.Unblock+"'></i>"+ + "</a> <a href='"+url+"' class='lbh homestead text-red tooltips' data-toggle='tooltip' data-placement='top' title='"+trad.backtopage+"'>"+ cityName + "</a>" ); + + $(".city-name-locked").click(function(){ + rebuildSearchScopeInput(); + }); + $("#cadenas").mouseover(function(){ + $("#cadenas").removeClass("fa-lock").addClass("fa-unlock"); + }); + $("#cadenas").mouseout(function(){ + $("#cadenas").addClass("fa-lock").removeClass("fa-unlock"); + }); +} + +function openDropdownMultiscope(){ + if(!$("#dropdown-content-multi-scope").hasClass('open')) + setTimeout(function(){ $("#dropdown-content-multi-scope").addClass('open'); }, 300); +} + +function setGlobalScope(scopeValue, scopeName, scopeType, scopeLevel, values, notSearch, testCo){ + + mylog.log("setGlobalScope !", scopeValue, scopeName, scopeType, scopeLevel, notSearch); + mylog.log("notSearch", notSearch, notNull(notSearch)) + + if(scopeValue == "") return; + + mylog.log("myMultiScopes", myMultiScopes, indexStepInit); + $("#main-scope-name").html('<i class="fa fa-university"></i> ' + scopeName + "<small class='text-dark'>.CO</small>"); + + communexion.currentLevel = scopeLevel; + communexion.currentName = scopeName; + communexion.currentValue = scopeValue; + communexion.communexionType = scopeType; + + if(values){ + if(typeof values == "string") + values = jQuery.parseJSON(values); + communexion.values = values; + } + mylog.log("communexion before save", communexion); + + if( notNull(testCo) && testCo == false) + $.cookie('communexion', communexion, { expires: 365, path: "/" }); + + if($("#communexionNameHome").length){ + $("#communexionNameHome").html('Vous êtes <span class="text-dark">communecté à <span class="text-red">'+scopeName+'</span></span>'); + $("#liveNowCoName").html("<span class='text-red'> à "+ scopeName +"</span>"); + $("#main-search-bar").val(""); + $(".info_co, .input_co").addClass("hidden"); + $("#change_co").removeClass("hidden"); + $("#dropdown_search").html(""); + var searchParams = { + "tpl":"/pod/nowList", + "indexMin" : 0, + "indexMax" : 30 + }; + if(notNull(scopeValue)){ + communexion.state = true; + searchParams.searchLocality = getLocalityForSearch(true); + } + + ajaxPost( "#nowList", baseUrl+'/'+moduleId+'/element/getdatadetail/type/0/id/0/dataName/liveNow?tpl=nowList', + searchParams, function(data) { + bindLBHLinks(); + } , "html" ); + } + + + if(!notNull(notSearch) || notSearch == true) + activateGlobalCommunexion(true); + + //rebuildSearchScopeInput(); + + //startSearch(0, indexStepInit, searchCallback); + //loadByHash(location.hash); +} + + +//vision city : scoping global for all applications +//levelCO == city cp dep region diff --git a/assets/js/menus/multitags.js b/assets/js/menus/multitags.js new file mode 100644 index 0000000000000000000000000000000000000000..3e8c598460ac7f731bfc2409ea00f963a348d551 --- /dev/null +++ b/assets/js/menus/multitags.js @@ -0,0 +1,251 @@ + + +function saveMultiTag(){ + //mylog.log("saveMultiTag() try"); mylog.log(myMultiTags); + hideSearchResults(); + if(userId != null && userId != ""){ + if(!notEmpty(myMultiTags)) myMultiTags = {}; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/person/updatemultitag", + data: {multitags : myMultiTags}, + dataType: "json", + success: function(data){ + mylog.log("saveMultiTag() success"); + }, + error: function(error){ + mylog.log("Une erreur est survenue pendant l'enregistrement des tags"); + } + }); + }else{ + + } + showCountTag(); + rebuildSearchTagInput(); + saveCookieMultitags(); +} + +function saveCookieMultitags(){ //mylog.log("saveCookieMultitags", myMultiTags); + $.cookie('multitags', JSON.stringify(myMultiTags), { expires: 365, path: "/" }); + +} + +function loadMultiTags(){ + $.each(myMultiTags, function(key, value){ //mylog.log("each myMultiTags", myMultiTags); + showTagInMultitag(key); + }); + showCountTag(); + saveCookieMultitags(); +} + +function showCountTag(){ + var count = 0; + //mylog.log("myMultiTags"); mylog.log(myMultiTags); + $.each(myMultiTags, function(key, value){ //mylog.log("each myMultiTags"); + if(value.active==true) count++; + }); //onsole.log("TAG COUNT : ", count); + $(".tags-count").html(count); + showTagsScopesMin(".list_tags_scopes"); + showEmptyMsg(); +} +function tagExists(tagValue){ + return typeof myMultiTags[tagValue] != "undefined"; +} +function selectAllTags(select){ + if(typeof select == "undefined"){ select = true; + $.each(myMultiTags, function(key, value){ + if(value.active) select = false; + }); + } + $.each(myMultiTags, function(key, value){ + toogleTagMultitag(key, select); + }); + saveMultiTag(); +} +function showTagInMultitag(tagValue){ //mylog.log("showTagInMultitag()", tagValue); + var html = ""; + if(tagExists(tagValue)){ + var faActive = myMultiTags[tagValue].active == true ? "check-circle" : "circle-o"; + var classDisable = myMultiTags[tagValue].active == false ? "disabled" : ""; + html = + '<span class="item-tag-input bg-red '+classDisable+'" data-tag-value="'+tagValue+'">' + + '<a href="javascript:" class="item-tag-checker tooltips"' + + 'data-toggle="tooltip" data-placement="bottom" ' + + 'title="Activer/Désactiver" data-tag-value="'+tagValue+'">' + + '<i class="fa fa-'+faActive+'"></i>' + + '</a>' + + '<span class="item-tag-name">#'+tagValue+'</span>' + + '<a href="javascript:" class="item-tag-deleter tooltips"' + + 'data-toggle="tooltip" data-placement="bottom" ' + + 'title="Supprimer" data-tag-value="'+tagValue+'">' + + '<i class="fa fa-times"></i>' + + '</a>' + + '</span>'; + $("#multi-tag-list").append(html); + $(".tooltips").tooltip(); + $(".item-tag-checker").off().click(function(){ toogleTagMultitag( $(this).data("tag-value")) }); + $(".item-tag-deleter").off().click(function(){ deleteTagInMultitag( $(this).data("tag-value")); }); + //showMsgInfoMultiTag("Le tag a bien été ajouté", "success"); + }else{ + html = ""; + //showMsgInfoMultiTag("showTagInMultitag error : ce tag n'existe pas - " + tagValue, "danger"); + } + + +} + + +function addTagToMultitag(tagValue){ + if(tagValue == "") return; + if(tagValue.indexOf("#") == 0) tagValue = tagValue.substr(1, tagValue.length); + if(!tagExists(tagValue)){ + //mylog.log("adding", tagValue); + myMultiTags[tagValue] = { active: true }; + //mylog.log("adding : myMultiTags :", myMultiTags); + showTagInMultitag(tagValue); + saveMultiTag(); + $("#input-add-multi-tag").val(""); + $("[data-tag-value='"+tagValue+"'].item-tag-suggest").hide(); + return true; + }else{ + showMsgInfoMultiTag("Ce tag est déjà dans votre liste", "info"); + return false; + } +} + +function deleteTagInMultitag(tagValue){ //mylog.log("deleteTagInMultitag(tagValue)", tagValue); + if(tagExists(tagValue)){ + delete myMultiTags[tagValue]; + $("[data-tag-value='"+tagValue+"'].item-tag-input ").remove(); + $("[data-tag-value='"+tagValue+"'].item-tag-suggest").show(); + saveMultiTag(); + //showMsgInfoMultiTag("Le tag a bien été supprimé", "success"); + } + //mylog.dir(myMultiTags); +} + +function toogleTagMultitag(tagValue, selected){ //mylog.log("toogleTagMultitag(tagValue)", tagValue); + if(tagExists(tagValue)){ + myMultiTags[tagValue].active = !myMultiTags[tagValue].active; + + if(typeof selected != "undefined") + myMultiTags[tagValue].active = selected; + + saveMultiTag(); + + if(myMultiTags[tagValue].active){ + $("[data-tag-value='"+tagValue+"'].item-tag-checker i.fa").removeClass("fa-circle-o"); + $("[data-tag-value='"+tagValue+"'].item-tag-checker i.fa").addClass("fa-check-circle"); + $("[data-tag-value='"+tagValue+"'].item-tag-input").removeClass("disabled"); + }else{ + $("[data-tag-value='"+tagValue+"'].item-tag-checker i.fa").addClass("fa-circle-o"); + $("[data-tag-value='"+tagValue+"'].item-tag-checker i.fa").removeClass("fa-check-circle"); + $("[data-tag-value='"+tagValue+"'].item-tag-input").addClass("disabled"); + } + + //rebuildSearchTagInput(); + + }else{ + //showMsgInfoMultiTag("Ce tag n'existe pas", "danger"); + } +} + +function getMultiTagList(){ return myMultiTags; } + +var timerMsgMultitag; +function showMsgInfoMultiTag(msg, type){ + if(type == "success") msg = "<i class='fa fa-check'></i> " + msg; + if(type == "danger") msg = "<i class='fa fa-times'></i> " + msg; + if(type == "info") msg = "<i class='fa fa-info-circle'></i> " + msg; + + var id = "#lbl-info-select-multi-tag"; + $(id).html(msg); + if(type == "success") $(id).addClass("label-success"); else $(id).removeClass("label-success"); + if(type == "danger") $(id).addClass("label-danger"); else $(id).removeClass("label-danger"); + if(type == "info") $(id).addClass("label-info"); else $(id).removeClass("label-info"); + + $(id).off().hide(); + $(id).show(200); + + if(typeof timerMsgMultitag != "undefined") clearTimeout(timerMsgMultitag); + timerMsgMultitag = setTimeout(function(){ $(id).off().hide(500)}, 3000); +} + +function rebuildSearchTagInput() +{ + searchTags = ""; + $.each(myMultiTags, function(key, value){ + if(value.active) + searchTags += (searchTags == "") ? key : ","+key; + }); + //mylog.log("searchTags",searchTags); + if( $("#searchTags") ) + $("#searchTags").val(searchTags); + + //if( typeof searchCallback == "function" ) + // searchCallback(); +} + + +function showTagsMin(htmlId){ + var html = ""; //'<a href="javascript" onclick="javascript:selectAllTags(true)">' + + //'<i class="fa fa-cogs"></i>' + + // '</button> '; + + $.each(myMultiTags, function(key, value){ + var disabled = value.active == false ? "disabled" : ""; + html += "<span data-toggle='dropdown' data-target='dropdown-multi-tag' "+ + "class='text-red "+disabled+" item-tag-checker' data-tag-value='"+ key + "'>" + + "#" + key + + "</span> "; + }); + html += "<hr style='margin-top:5px;margin-bottom:5px;'>"; + + $(htmlId).html(html); + + $(".item-tag-checker").off().click(function(){ toogleTagMultitag( $(this).data("tag-value")) }); + + $(".toggle-tag-dropdown").click(function(){ //mylog.log("toogle"); + if(!$("#dropdown-content-multi-tag").hasClass('open')) + setTimeout(function(){ $("#dropdown-content-multi-tag").addClass('open'); }, 300); + $("#dropdown-content-multi-tag").addClass('open'); + //else + //$("#dropdown-content-multi-tag").removeClass('open'); + }); +} + +function loadTagSuggestion(tagsSuggest){ + $.each(tagsSuggest, function(key, value){ //mylog.log("each tagsSuggest"); + showTagSuggestion(key, value); + }); +} +function showTagSuggestion(tagValue, tagSpec){ //mylog.log("showTagSuggestion()", tagValue); + var html = ""; + if(!tagExists(tagValue)){ + var faActive = tagSpec.active == true ? "check-circle" : "circle-o"; + var classDisable = tagSpec.active == false ? "disabled" : ""; + html = + '<span class="item-tag-suggest bg-red '+classDisable+'" data-tag-value="'+tagValue+'">' + + '<a href="javascript:" class="item-tag-adder tooltips"' + + 'data-toggle="tooltip" data-placement="bottom" ' + + 'title="Ajouter à mes favoris" data-tag-value="'+tagValue+'">' + + '<i class="fa fa-plus-circle"></i>' + + '</a>' + + '<span class="item-tag-name">#'+tagValue+'</span>' + + '</span>'; + $("#multi-tag-suggestion").append(html); + $(".tooltips").tooltip(); + $(".item-tag-suggest").off().click(function(){ addTagToMultitag( $(this).data("tag-value")) }); + //showMsgInfoMultiTag("Le tag a bien été ajouté", "success"); + }else{ + html = ""; + //showMsgInfoMultiTag("showTagInMultitag error : ce tag n'existe pas - " + tagValue, "danger"); + } +} + +function resetMyTags(){ + myMultiTags = {}; + saveMultiTag(); + startSearch(0, indexStepInit); + $('#sub-menu-filliaire').addClass('hidden'); +} \ No newline at end of file diff --git a/assets/js/news/autosize.js b/assets/js/news/autosize.js new file mode 100644 index 0000000000000000000000000000000000000000..2108e9033e4bee083c686d4bb75697ad67d93a8c --- /dev/null +++ b/assets/js/news/autosize.js @@ -0,0 +1,6 @@ +/*! + Autosize 3.0.17 + license: MIT + http://www.jacklmoore.com/autosize +*/ +!function(e,t){if("function"==typeof define&&define.amd)define(["exports","module"],t);else if("undefined"!=typeof exports&&"undefined"!=typeof module)t(exports,module);else{var n={exports:{}};t(n.exports,n),e.autosize=n.exports}}(this,function(e,t){"use strict";function n(e){function t(){var t=window.getComputedStyle(e,null);"vertical"===t.resize?e.style.resize="none":"both"===t.resize&&(e.style.resize="horizontal"),l="content-box"===t.boxSizing?-(parseFloat(t.paddingTop)+parseFloat(t.paddingBottom)):parseFloat(t.borderTopWidth)+parseFloat(t.borderBottomWidth),isNaN(l)&&(l=0),a()}function n(t){var n=e.style.width;e.style.width="0px",e.offsetWidth,e.style.width=n,e.style.overflowY=t,r()}function o(e){for(var t=[];e&&e.parentNode&&e.parentNode instanceof Element;)e.parentNode.scrollTop&&t.push({node:e.parentNode,scrollTop:e.parentNode.scrollTop}),e=e.parentNode;return t}function r(){var t=e.style.height,n=o(e),r=document.documentElement&&document.documentElement.scrollTop;e.style.height="auto";var i=e.scrollHeight+l;return 0===e.scrollHeight?void(e.style.height=t):(e.style.height=i+"px",s=e.clientWidth,n.forEach(function(e){e.node.scrollTop=e.scrollTop}),void(r&&(document.documentElement.scrollTop=r)))}function a(){r();var t=window.getComputedStyle(e,null),o=Math.round(parseFloat(t.height)),i=Math.round(parseFloat(e.style.height));if(o!==i?"visible"!==t.overflowY&&n("visible"):"hidden"!==t.overflowY&&n("hidden"),u!==o){u=o;var a=d("autosize:resized");e.dispatchEvent(a)}}if(e&&e.nodeName&&"TEXTAREA"===e.nodeName&&!i.has(e)){var l=null,s=e.clientWidth,u=null,c=function(){e.clientWidth!==s&&a()},p=function(t){window.removeEventListener("resize",c,!1),e.removeEventListener("input",a,!1),e.removeEventListener("keyup",a,!1),e.removeEventListener("autosize:destroy",p,!1),e.removeEventListener("autosize:update",a,!1),i["delete"](e),Object.keys(t).forEach(function(n){e.style[n]=t[n]})}.bind(e,{height:e.style.height,resize:e.style.resize,overflowY:e.style.overflowY,overflowX:e.style.overflowX,wordWrap:e.style.wordWrap});e.addEventListener("autosize:destroy",p,!1),"onpropertychange"in e&&"oninput"in e&&e.addEventListener("keyup",a,!1),window.addEventListener("resize",c,!1),e.addEventListener("input",a,!1),e.addEventListener("autosize:update",a,!1),i.add(e),e.style.overflowX="hidden",e.style.wordWrap="break-word",t()}}function o(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=d("autosize:destroy");e.dispatchEvent(t)}}function r(e){if(e&&e.nodeName&&"TEXTAREA"===e.nodeName){var t=d("autosize:update");e.dispatchEvent(t)}}var i="function"==typeof Set?new Set:function(){var e=[];return{has:function(t){return Boolean(e.indexOf(t)>-1)},add:function(t){e.push(t)},"delete":function(t){e.splice(e.indexOf(t),1)}}}(),d=function(e){return new Event(e)};try{new Event("test")}catch(a){d=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!1),t}}var l=null;"undefined"==typeof window||"function"!=typeof window.getComputedStyle?(l=function(e){return e},l.destroy=function(e){return e},l.update=function(e){return e}):(l=function(e,t){return e&&Array.prototype.forEach.call(e.length?e:[e],function(e){return n(e,t)}),e},l.destroy=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],o),e},l.update=function(e){return e&&Array.prototype.forEach.call(e.length?e:[e],r),e}),t.exports=l}); \ No newline at end of file diff --git a/assets/js/news/formGenreAbout.js b/assets/js/news/formGenreAbout.js new file mode 100644 index 0000000000000000000000000000000000000000..1cd90aa8135e9fa9ad3bb5b3c843d72485bdcdfe --- /dev/null +++ b/assets/js/news/formGenreAbout.js @@ -0,0 +1,83 @@ + + var listGenre = { "free_msg" : { "color" : "white", "name" : "Message libre" }, + "idea" : { "color" : "yellow", "name" : "Idée" }, + "help" : { "color" : "red", "name" : "Demande d'aide" }, + "rumor" : { "color" : "orange", "name" : "Rumeur" }, + "true_information" : { "color" : "green", "name" : "Information vérifiée" }, + "question" : { "color" : "purple", "name" : "Question" }, + }; + + var genreHover = "free_msg"; + function showTooltipGenre(genre){ + var genreName = listGenre[genre]["name"]; + $("#tooltip_genre_name").html(genreName); + + var left = $("#itemSelectGenre" + genre).position().left - + ($("#tooltip_genre_name").width()/2+20) + + ($("#itemSelectGenre" + genre).width()/2+4); + ; + + $("#tooltip_genre_name").css({"left": left + "px"}); + + var classRemove = listGenre[genreHover]["color"]; + var classAdd = listGenre[genre]["color"]; + //alert(classRemove); + $("#tooltip_genre_name").removeClass(classRemove).addClass(classAdd); + + genreHover = genre; + + } + + var genreSelected = "free_msg"; + function selectGenre(genre){ + var genreName = listGenre[genre]["name"]; + + var classRemove = listGenre[genreSelected]["color"]; + var classAdd = listGenre[genre]["color"]; + + //alert(classRemove); + $("#header_new_post").removeClass(classRemove).addClass(classAdd); + $("#lbl_genre_name_selected").html(genreName); + + var imgName = genre; + if(genre == "question") imgName = "question_white"; + if(genreSelected == "question") genreSelected = "question_white"; + + var src = $("#imgGenreSelected").attr("src").replace(genreSelected, imgName); + //$(this).attr("src", src); + $("#imgGenreSelected").attr("src" , src); + + genreSelected = genre; + } + + var genreSelectedNewsstream = new Array("free_msg"); + function selectGenreNewsstream(genre){ + var found = false; + $.each(genreSelectedNewsstream, function(index){ //alert(this + " - " + genre); + if(this == genre) { + genreSelectedNewsstream.splice(index, 1); + $("#itemSelectGenre"+genre).removeClass("selected"); + found = true; + } + + }); + if(found == false){ //alert(found + " #itemSelectGenre"+genre); + $("#itemSelectGenre"+genre).addClass("selected"); + genreSelectedNewsstream.push(genre); + } + + } + + var aboutList = new Array(); + function checkChkAbout(i){ + var pos = aboutList.indexOf(i); + + if(pos == -1){ + $("#about_"+i).removeClass("alert-info").addClass("alert-success"); + aboutList.push(i); + } else { + $("#about_"+i).removeClass("alert-success").addClass("alert-info"); + //aboutList.remove(i); + aboutList.splice(pos, 1); + } + } \ No newline at end of file diff --git a/assets/js/news/formScope.js b/assets/js/news/formScope.js new file mode 100644 index 0000000000000000000000000000000000000000..91401515313b7557acb197f961d6c43d2b3c0aa0 --- /dev/null +++ b/assets/js/news/formScope.js @@ -0,0 +1,573 @@ + + var typeSelected = new Array("contact", "geo"); + var HASHTAGS_LIST = new Array(); + var idPlace = new Array("contact", "geo"); + var timeout = setTimeout('', 1000); + var countrycodes = "fr"; + var dataContact; + + //gère la correspondance entre les btn et les icons + var listIcoScope = { "contact" : "user", + "groupe" : "users", + "organisation" : "university", + "tous" : "asterisk", + "quartier" : "home", + "ville" : "building", + "departement" : "puzzle-piece", + "pays" : "globe" }; + + //initialisation des valeurs par defaut + function initFormScope(scope){ + + typeSelected["contact"] = "contact"; + typeSelected["geo"] = "ville"; + HASHTAGS_LIST = new Array(); + idPlace = new Array("contact", "geo"); + timeout = setTimeout('', 1000); + countrycodes = "fr"; + + initDestTools("contact"); + initDestTools("geo"); + + showDestInput("contact", "contact"); + showDestInput("geo", "ville"); + + initScope(scope); + initDataContact(); + + //initialise la taille des champs de texte + $("#input-group-contact").css({"width" : $("#btn-group-contact").width()}); + $("#input-group-geo").css({"width" : $("#btn-group-geo").width()}); + + } + + function initScope(scope){ + //alert(JSON.stringify(scope)); + + HASHTAGS_LIST = scope; + //$("#hashtags_list_json").html(JSON.stringify(HASHTAGS_LIST)); + + $.each(HASHTAGS_LIST, function(){ //alert("value : "+JSON.stringify(this.scopeType)); + var ico = getIcoScope(this.scopeType); + var display = this.at; + if(this.scopeType == "ville") display = "ma ville"; + if(this.scopeType == "departement") display = "mon département"; + + $("#hashtags_list").append("<span class='tag' id='idPlace"+this.id+"'><span><a href='javascript:removeHashtag(\""+this.id+"\")'>x </a> <i class='fa fa-"+ ico +"'></i> @" + display + "</span></span>"); + }); + + } + + function initDataContact(){ + ajaxPost("", baseUrl + "/" + moduleId + '/news/initDataContact', null, //ShowMapByOrigine', params, + function (data){ //alert(JSON.stringify(data)); + dataContact = data; + }); + } + + + // ------- INITIALISATION DES OUTILS DE SELECTION DES DESTINATAIRES / SCOPE (CONTACT + GEO) + function initDestTools(type){ + $("#scope_news_"+type).focusout( function (){ + //$("#dropdown_"+type).css({"display" : "none" }); + }); + + $("#scope_news_"+type).focus( function (){ + //$("#dropdown_"+type).css({"display" : "block" }); + + }); + + $("#scope_news_"+type).click( function (){ + if($("#scope_news_"+type).val() == "") + $("#scope_news_"+type).val("@"); + if(type == "contact") findContact(); + }); + + $("#scope_news_"+type).keyup( function (){ + var length = $("#scope_news_"+type).val().length; + if(length == 0){ + $("#scope_news_"+type).val("@"); + } + if(length <= 1){ + if($("#dropdown_"+type).css("display") != "none") + $("#dropdown_"+type).css({"display" : "none" }); + } + if(length == 1){ + //if($("#dropdown_"+type).css("display") != "block") + //$("#dropdown_"+type).css({"display" : "block" }); + if(type == "contact") findContact(); + } + if(length >= 3){ + //alert("lancement de la recherche en BD"); + var action = ""; + if(type == "contact") action = "findContact()"; + if(type == "geo") action = "findPlace()"; + + clearTimeout(timeout); + timeout = setTimeout(action, 1000); + //findPlace(); + } + $("#btn_add_"+type).removeClass('btn-green').addClass('btn-blue'); + }); + + $("#select_state").change( function (){ + countrycodes = $("#select_state").val(); + }); + } + + //ON CLICK BTN_GROUP type = CONTACT/GEO, val |= contact, groupe, tous, quartier, ville, departement, pays + //CHOIX D'UN TYPE DE SCOPE + function showDestInput(type, val){ + + //raz champs texte + $("#scope_news_" + type).val(""); + $("#scope_news_" + type).attr("placeholder", "@" + val); + + $("#btn_group_" + type + "_" + typeSelected[type]).removeClass('btn-blue').addClass('btn-default'); + $("#btn_group_" + type + "_" + val).removeClass('btn-default').addClass('btn-blue'); + + //masque la dropdown + if($("#dropdown_"+type).css("display") != "none"){ + $("#dropdown_"+type).css({"display" : "none" }); + $("#dropdown_"+type).html("<li class='li-dropdown-scope'>-</li>"); + } + + //desactive le bouton + + //activateBtnAdd(false, type); + + //memorise le nouveau choix (dans le tableau qui correspond à Contact ou Geo (type)) + typeSelected[type] = val; + + if(type == "contact"){ + if(val == "contact"){ + } + if(val == "groupe"){ + } + if(val == "tous"){ + } + + } + else if(type == "geo"){ + if(val == "quartier"){ + } + if(val == "ville"){ //$("#scope_news_" + type).attr("placeholder", "@" + val + " (code postal)"); + } + if(val == "departement"){ $("#scope_news_" + type).attr("placeholder", "@" + val + " (code postal)"); + } + if(val == "region"){ $("#scope_news_" + type).attr("placeholder", "@" + val + " (code postal / nom)"); + } + if(val == "pays"){ + } + + } + } + + //ON CLICK ELEMENT DROPDOWN + function setChoice(value, type, placeId){ + + + //remplace le contenu du champs de texte + $("#scope_news_" + type).val("@"); + + //ferme la liste déroulante + $("#dropdown_" + type).css({"display" : "none" }); + + //idPlace[type] = placeId; + //change la couleur du bouton + ("ajouter") en vert + //activateBtnAdd(true, type); + + //récupère le contenu du champs de texte + //var value = $("#scope_news_" + type).val(); //alert(value); + + //récupère l'icon correspondant au type de scope choisi (contact, groupe, departement, etc) + var ico = getIcoScope(typeSelected[type]); //alert(ico); + + //memorise le hashtag + if(type=="geo") + HASHTAGS_LIST.push({ "scopeType" : typeSelected[type], + "at" : value, + "id" : placeId, + "countrycodes" : countrycodes }); + if(type=="contact") + HASHTAGS_LIST.push({ "scopeType" : typeSelected[type], + "at" : value, + "id" : placeId }); + + //$("#hashtags_list_json").html(JSON.stringify(HASHTAGS_LIST)); + //rajoute l'élément dans la liste des destinataires + //$("#hashtags_list").append("<div class='label label-info'><i class='fa fa-"+ ico +"'></i> " + value + "</span>"); + $("#hashtags_list").append("<span class='tag' id='idPlace"+idPlace[type]+"'><span><a href='javascript:removeHashtag(\""+idPlace[type]+"\")'>x </a> <i class='fa fa-"+ ico +"'></i> " + value + "</span></span>"); + $("#scope_news_" + type).val("@"); + + //activateBtnAdd(false, type); + } + + + function findPlace(){ + + //récupère le contenu du champs de texte GEO + var lieu = $("#scope_news_geo").val(); + lieu = lieu.substring(1, lieu.length); //supprime le @ + + //récupère le type de scope choisi + var type = typeSelected["geo"]; + + //initialisation de la requete Nominatim + var request = ""; + request += "limit=10"; + request += "&format=json"; + + //limite la recherche par pays (sauf si le scope choisi est le pays) + if(type != "pays") + request += "&countrycodes=" + countrycodes; + + var address = ""; + + //si on cherche une ville + if(type == "ville"){ + //si le lieu fourni est sous forme numérique : recherche par code postal + if($.isNumeric(lieu)){ + if(lieu.length == 5) + address += "&postalcode=" + lieu; + else address = ""; + } //si le lieu n'est pas numérique : recherche par nom de ville + else { address += "&city=" + lieu; } + } + + //si on cherche un département + if(type == "departement"){ + //on utilise toujours le code numérique du département (pas de nom de dep) + if($.isNumeric(lieu)){ + //l'utilisateur n'indique que 2 chiffres, on rajoute 3 zéro pour que la recherche fonctionne + if(lieu.length == 2) lieu += "000"; + address += "&postalcode=" + lieu; + } + //else { address += "&county=" + lieu; } + } + + //si on cherche un département + if(type == "region"){ + //on utilise toujours le code numérique du département (pas de nom de dep) + if($.isNumeric(lieu)){ + //l'utilisateur n'indique que 2 chiffres, on rajoute 3 zéro pour que la recherche fonctionne + if(lieu.length == 2) lieu += "000"; + address += "&postalcode=" + lieu; + } + else { address += "&state=" + lieu; } + } + + //si on cherche un pays + if(type == "pays") + address += "&country=" + lieu;//+"&state=" + lieu; + + //si la requette est vide, il y a eu un pb + if(address == "") { + if($("#dropdown_geo").css("display") != "block") + $("#dropdown_geo").css({"display" : "block" }); + $("#dropdown_geo").html("<li class='li-dropdown-scope'>aucune recherche possible</li>"); + return; + } + + request += address; + + //affiche le chargement en cours + $("#dropdown_geo").html('<i class="fa fa-circle-o-notch fa-spin" style="padding:4px;"></i> '+trad.currentlyresearching); + if($("#dropdown_geo").css("display") != "block") + $("#dropdown_geo").css({"display" : "block" }); + + //requête auprès du service Nominatim + $.ajax({ + url: "http://nominatim.openstreetmap.org/search?" + request + "&format=json&polygon=0&addressdetails=1", + type: 'POST', + complete: function () { }, + success: function (obj) { //alert(JSON.stringify(obj)); + //$("#hashtags_list").html(JSON.stringify(obj)); + if (obj.length > 0) { + //initialise le contenu de la dropdown + var dropdown_content = ""; + $.each(obj, + function() { //alert(request + " "); + + //cas du quartier à définir + //if(type == "quartier") + + //cas ou on recherche une ville par son nom + if(type == "ville") + if(request.indexOf("city") > 0){ //alert(JSON.stringify(this)); + + var cityName = ""; + var cp = ""; + + //le nom de la ville peut être défini dans l'attribut Town ou City + if(this.address.town != undefined) { cityName = this.address.town; } + else if(this.address.city != undefined) { cityName = this.address.city; } + else if(this.address.hamlet != undefined) { cityName = this.address.hamlet; + if(this.address.county != undefined) cityName += ", " + this.address.county; + } + + //on utilise le CP seulement s'il est unique, ex : 17100. + //Pour les grandes ville comme Marseille qui ont des arrondissements => 13001, 13002, etc, on utilise le nom de la ville + if(this.address.postcode != undefined && this.address.postcode.length == 5) + cp = this.address.postcode; + else cp = cityName; + + var placeName = cp; + if(cp != cityName) placeName += ", " + cityName; + + if(placeName != ""){// && this.address.postcode != undefined) + var display = placeName+', '+this.address.state+', '+this.address.country_code; + dropdown_content += getDropdownElement(display, "geo", this.place_id, display); + } + } + //cas ou on recherche une ville par son Code Postal + if(type == "ville") + if(request.indexOf("postalcode") > 0){ //alert(JSON.stringify(this)); + var cityName = ""; + if(this.address.town != undefined) cityName = ', '+this.address.town; + if(this.address.city != undefined) cityName = ', '+this.address.city; + + var display = this.address.postcode + cityName+', '+this.address.state+', '+this.address.country_code; + dropdown_content += getDropdownElement(display, "geo", this.place_id, display); + } + + + if(type == "departement") + if($.isNumeric(lieu)){ + if(lieu.length == 5){ //alert(JSON.stringify(this)); + var departementName = this.display_name;//getDepName(this.display_name); + var display = departementName; + dropdown_content += getDropdownElement(lieu, "geo", this.place_id, display); + } + } else { + var display = this.address.county; + dropdown_content += getDropdownElement(lieu, "geo", this.place_id, display); + } + + if(type == "region"){ + //if($.isNumeric(lieu)){ + var display = this.address.state; + dropdown_content += getDropdownElement(display, "geo", this.place_id, display); + //} + //else { //alert(JSON.stringify(this)); + //var departementName = getDepName(this.display_name); + // var display = this.display_name;//getRegionName(this.display_name); + // dropdown_content += getDropdownElement(display, "geo", this.place_id, display); + //} + } + + if(type == "pays"){ + var state = ""; + if(this.address.country != undefined) + if(lieu.toLowerCase() == this.address.country.toLowerCase()) state = this.address.country; + + if(this.address.state != undefined) + if(lieu.toLowerCase() == this.address.state.toLowerCase()) state = this.address.state; + + if(state != ""){ + var display = state; + dropdown_content += getDropdownElement(state, "geo", this.place_id, display); + } + } + }); + $("#dropdown_geo").html(dropdown_content); + } + else { + $("#dropdown_geo").html("<li class='li-dropdown-scope'>"+trad.noresult+"</li>"); + } + }, + error: function (error) { + $("#dropdown_geo").html("<li class='li-dropdown-scope'>Erreur</li>"); + } + }); + } + + + + function findContact(){ //initDataContact(); + //récupère le contenu du champs de texte CONTACT + var searchString = $("#scope_news_contact").val(); + searchString = searchString.substring(1, searchString.length); //supprime le @ + + //récupère le type de scope choisi + var type = typeSelected["contact"]; + var action = "searchContact"; + var dropdownContent = ""; + + if(type != "groupe") + dropdownContent += getDropdownElement("tous", "contact", "all_"+type, "tous"); + + if(type == "contact"){ + showContactLoading(); + $.each(dataContact["knows"], function(){ //alert("1 " +addslashes(this["name"])) ; + var currentGroupName = this["name"]; + $.each(this["members"], function(){ //alert(addslashes("2 "+this["name"])) ; + if( this["name"].toLowerCase().indexOf(searchString.toLowerCase()) >= 0 ){ + var display = this["name"]; + if(currentGroupName != "*") display += " (" + currentGroupName + ")"; + dropdownContent += getDropdownElement(this["name"], "contact", this["id"]["$id"], display); + } + }); + }); + //alert(dropdownContent); + } + if(type == "groupe"){ + showContactLoading(); + $.each(dataContact["knows"], function(){ //alert("1 " +addslashes(this["name"])) ; + var currentGroupName = this["name"]; + if( currentGroupName != "*") + if( currentGroupName.toLowerCase().indexOf(searchString.toLowerCase()) >= 0){ + dropdownContent += getDropdownElement(currentGroupName, "contact", currentGroupName, currentGroupName); + } + }); + } + if(type == "organisation"){ + showContactLoading(); + $.each(dataContact["organizations"], function(){ //alert(JSON.stringify(this)) ; + if( this["name"].toLowerCase().indexOf(searchString.toLowerCase()) >= 0 ) + dropdownContent += getDropdownElement(this["name"], "contact", this["_id"]["$id"], this["name"]); + }); + } + if(type == "tous"){ + } + + + $("#dropdown_contact").html(dropdownContent); + + } + + //var genreSelected = "free_msg"; + function saveNews(){ + + var name = $("#title_news").val(); + var text = $("#txt_news").html(); + + //récupère les valeurs des checkbox "about" + /*var about = new Array(); + for(var i=1;i<21;i++){ + if($("#chk_about_"+i).is(':checked')) + about.push($("#chk_about_"+i).val()); + }*/ + + + //récupère la valeur du genre (radio btn) (free_msg, idea, true_information, rumor, question, help) + var genre = genreSelected; + + var news = { "name" : name, + "text" : text, + "genre" : genre, + "about" : aboutList, + "scope" : HASHTAGS_LIST + }; + //alert(JSON.stringify(news)); + ajaxPost("", baseUrl + "/" + moduleId + '/news/saveNews', "json="+JSON.stringify(news), //ShowMapByOrigine', params, + function (data){ + $("#hashtags_list_json").html("VOTRE MESSAGE A BIEN ÉTÉ PUBLIÉ</br>");// + JSON.stringify(data)); + + }); + } + function openListGenre(genre){ + $("#").removeClass('btn-blue').addClass('btn-info'); + $("#btn_group_" + type + "_" + val).removeClass('btn-info').addClass('btn-blue'); + + } + + function showContactLoading(){ + //affiche le chargement en cours + $("#dropdown_contact").html('<i class="fa fa-circle-o-notch fa-spin" style="padding:4px;"></i> '+trad.currentlyresearching); + if($("#dropdown_contact").css("display") != "block") + $("#dropdown_contact").css({"display" : "block" }); + + } + //retourne le nom du département à partir du display_name (après la 2eme virgule) + function getDepName(display_name){ //alert(display_name); + var depName = ""; + var x = 0; + for(var i = 0; i<2; i++){ + x = display_name.indexOf(",", x+1); + //alert(x); + } + var x2 = display_name.indexOf(",", x+1); + depName = display_name.substring(x+2, x2); + return depName; + } + //retourne le nom du département à partir du display_name (après la 3eme virgule) + function getRegionName(display_name){ //alert(display_name); + var depName = ""; + var x = 0; + for(var i = 0; i<3; i++){ + x = display_name.indexOf(",", x+1); + //alert(x); + } + var x2 = display_name.indexOf(",", x+1); + depName = display_name.substring(x+1, x2); + return depName; + } + + function getIcoScope(value){ + return listIcoScope[value]; + } + + //retourne un élément de la dropdown + function getDropdownElement(HTag, type, place_id, display_content){ + return '<li class="li-dropdown-scope">'+ + '<a class="item_dropdown" href="javascript:setChoice(\'@'+addslashes(HTag)+'\', \''+type+'\', \''+addslashes(place_id)+'\')">@'+display_content+'</a></li>'; + } + + function removeHashtag(refId){ + $("#idPlace"+refId).remove(); + $.each(HASHTAGS_LIST, function(index){ + if(this.refId == refId) HASHTAGS_LIST.splice(index, 1); + }); + //$("#hashtags_list_json").html(JSON.stringify(HASHTAGS_LIST)); + } + + function addslashes(str) { + // discuss at: http://phpjs.org/functions/addslashes/ + // original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) + // improved by: Ates Goral (http://magnetiq.com) + // improved by: marrtins + // improved by: Nate + // improved by: Onno Marsman + // improved by: Brett Zamir (http://brett-zamir.me) + // improved by: Oskar Larsson Högfeldt (http://oskar-lh.name/) + // input by: Denny Wardhana + // example 1: addslashes("kevin's birthday"); + // returns 1: "kevin\\'s birthday" + + return (str + '') + .replace(/[\\"']/g, '\\$&') + .replace(/\u0000/g, '\\0'); + } + + + /* + +$note = $(".form-note .summernote"); +$note.summernote({ + +oninit: function() { +if ($note.code() == "" || $note.code().replace(/(<([^>]+)>)/ig, "") == "") { +$note.code($note.attr("placeholder")); +} +}, onfocus: function(e) { +if ($note.code() == $note.attr("placeholder")) { +$note.code(""); +} +}, onblur: function(e) { +if ($note.code() == "" || $note.code().replace(/(<([^>]+)>)/ig, "") == "") { +$note.code($note.attr("placeholder")); +} +}, onkeyup: function(e) { +$("span[for='noteEditor']").remove(); +}, + + +toolbar: [ +['style', ['bold', 'italic', 'underline', 'clear']], +['color', ['color']], +['para', ['ul', 'ol', 'paragraph']], +] +}); +}; + + */ \ No newline at end of file diff --git a/assets/js/news/index.js b/assets/js/news/index.js new file mode 100644 index 0000000000000000000000000000000000000000..989b100d36a4073e88a53e88b5748abb68d54b67 --- /dev/null +++ b/assets/js/news/index.js @@ -0,0 +1,1501 @@ +function isLiveGlobal(){ + return (location.hash.indexOf("#live") == 0 || location.hash.indexOf("#city.detail") == 0); + return typeof liveScopeType != "undefined";// && liveScopeType == "global"; +} +/* +* function loadStream() loads news for timeline: 5 news are download foreach call +* @param string contextParentType indicates type of wall news +* @param string contextParentId indicates the precise parent id +* @param strotime dateLimite indicates the date to load news +*/ +var loadStream = function(indexMin, indexMax){ mylog.log("loadStream"); + loadingData = true; + indexStep = 5; + if(typeof indexMin == "undefined") indexMin = 0; + if(typeof indexMax == "undefined") indexMax = indexStep; + + currentIndexMin = indexMin; + currentIndexMax = indexMax; + if(indexMin == 0 && indexMax == indexStep) { + totalData = 0; + mapElements = new Array(); + $(".newsFeedNews, #backToTop, #footerDropdown").remove(); + scrollEnd = false; + } + else{ if(scrollEnd) return; } + if(isLive != "") + simpleUserData="/isLive/true"; + else + simpleUserData=""; + + + filter = new Object; + //filter.parent=parent; + // if (typeof(locality) != "undefined") filter.locality=locality; + // if (typeof(searchBy) != "undefined") filter.searchBy=searchBy; + + if (typeof(searchType) != "undefined") filter.searchType=searchType; + //if (typeof(tagSearch) != "undefined") + if(isLiveGlobal()) + filter.tagSearch=$('#searchTags').val().split(','); + + //mylog.log("index.js liveScopeType", liveScopeType); + if(isLiveGlobal() && liveScopeType == "global"){ + //getMultiTagList(); //$('#searchBarText').val(); + filter = { + "locality" : getLocalityForSearch(), + "searchType" : searchType + }; + //contextParentType = "city"; + } + //var tagSearch = $('#searchTags').val().split(','); + if($('#searchTags').length >= 0) + filter.tagSearch = $('#searchTags').val().split(','); + filter.textSearch=$('#main-search-bar').val(); + + var thisParentId = ""; + if(contextParentType != "city") thisParentId = "/id/"+contextParentId; + + mylog.log("loadStream", dateLimit); + mylog.dir(filter); + $(".stream-processing").show(); + $(".search-loader-news").html('<i class="fa fa-spin fa-circle-o-notch"></i>'); + + if(typeof(dateLimit)!="undefined"){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/news/index/type/"+contextParentType+thisParentId+"/date/"+dateLimit+simpleUserData, + dataType: "json", + data: filter, + success: function(data){ + mylog.log("LOAD NEWS BY AJAX"); + //mylog.log(data.news); + if(data){ + buildTimeLine (data.news, indexMin, indexMax); + bindTags(); + if(typeof(data.limitDate.created) == "object") + dateLimit=data.limitDate.created.sec; + else + dateLimit=data.limitDate.created; + + mylog.log(dateLimit); + } + loadingData = false; + $(".stream-processing").hide(); + }, + error: function(){ + loadingData = false; + $(".stream-processing").hide(); + } + }); + } +} + +var tagsFilterListHTML = ""; +var scopesFilterListHTML = ""; +function buildTimeLine (news, indexMin, indexMax) +{ + mylog.log("-----------------buildTimeLine Editable Test----------------------"); + if (dateLimit==0){ + //$(".newsTL").html('<div class="spine"></div>'); + $(".newsFeedNews, #backToTop, #footerDropdown").remove(); + } + //insertion du formulaire CreateNews dans le stream + var formCreateNews = $("#formCreateNewsTemp"); + //currentMonth = null; + var countEntries = 0; + $.each(news, function(i, v) { if(v.length!=0){ countEntries++; } }); + + totalEntries += countEntries; + + str = ""; + //mylog.log(news); + $.each( news , function(key,newsObj) + { + //console.log(newsObj); + if(newsObj.created) + { + if(typeof(newsObj.created) == "object") + var date = new Date( parseInt(newsObj.created.sec)*1000 ); + else + var date = new Date( parseInt(newsObj.created)*1000 ); + var d = new Date(); + if(typeof(newsObj.target)!="undefined" && typeof(newsObj.target.type)!="undefined") + buildLineHTML(newsObj, idSession); + + + } + }); + + //if(canPostNews==true){ + // $("#newFeedForm").append(formCreateNews); + // $("#formCreateNewsTemp").css("display", "inline"); + //} + /*offsetLastNews=""; + $i=0; + $( ".newsFeed:gt(-6)" ).each(function(){ + if($i!=0){ + if(typeof(offsetLastNews)!="undefined" && typeof(offsetLastNews.top)!="undefined") + mylog.log(offsetLastNews.top+" // VS // "+$(this).offset().top); + if($(this).offset().top == offsetLastNews.top){ + $(this).css("margin-top","20px"); + } + } + offsetLastNews=$(this).offset(); + //alert(); + })*/ + $.each( news , function(key,o){ + initXEditable(); + manageModeContext(key); + }); + //offset=$('.newsTL'+' .newsFeed:last').offset(); + if( tagsFilterListHTML != "" ) + $("#tagFilters").html(tagsFilterListHTML); + if( scopesFilterListHTML != "" ) + $("#scopeFilters").html(scopesFilterListHTML); + + if(!countEntries || countEntries < indexStep){ + if( dateLimit == 0 && countEntries == 0){ + var date = new Date(); + form =""; + + if(canPostNews==true){ //alert($("#month"+date.getMonth()+date.getFullYear()).length ); + if(!isLiveGlobal() && $("#month"+date.getMonth()+date.getFullYear()).length < 1){ + form ='<div class="date_separator" id="'+'month'+date.getMonth()+date.getFullYear()+'" data-appear-top-offset="-400">'+ + '<span>'+months[date.getMonth()]+' '+date.getFullYear()+'</span>'+ + '</div>'+ + "<div class='newsFeed'>"+ + "<div id='newFeedForm"+"' class='timeline_element partition-white no-padding newsFeedForm' style='min-width:85%;'></div>"+ + "</div>"; + } + msg = "<li class='newsFeed newsFeedNews'><i class='fa fa-ban'></i> Aucun message ne correspond à vos critères de recherche.</li>"; + } + else{ + msg = "<li class='newsFeed newsFeedNews'><i class='fa fa-ban'></i> Aucun message sur ce journal.</li>"; + } + scrollEnd = true; + // newsTLLine = '<div class="date_separator" id="'+'month'+date.getMonth()+date.getFullYear()+'" data-appear-top-offset="-400">'+ + // '<span>'+months[date.getMonth()]+' '+date.getFullYear()+'</span>'+ + // '</div>'; + newsTLLine = form+"<div class='col-md-5 col-sm-5 col-xs-12 text-extra-large emptyNews newsFeedNews"+"'>"+msg+"</div>"; + + $(".spine").css("bottom","0px"); + $(".tagFilter, .scopeFilter").hide(); + //$(".date_separator").remove(); + $(".newsTL").append(newsTLLine); + + titleHTML = '<div class="date_separator" id="backToTop" data-appear-top-offset="-400" style="height:150px;">'+ + '<a href="javascript:;" onclick="smoothScroll(\'0px\');" title="retour en haut de page">'+ + '<span style="height:inherit;" class=""><i class="fa fa-ban"></i> ' + trad["nomorenews"] + '<br/><i class="fa fa-arrow-circle-o-up fa-2x"></i> </span>'+ + '</a>'+ + '</div>';// + $(".newsTL").append(titleHTML); + + if(canPostNews==true){ //alert(isLiveGlobal()); + if(isLiveGlobal()){ + $("#newLiveFeedForm").append($("#formCreateNewsTemp")); + $("#formCreateNewsTemp").css("display", "inline"); + $(".newsFeedForm").css("display", "none"); + + }else{ mylog.log("newFeedForm"); + //$("#newLiveFeedForm").append($("#formCreateNewsTemp")); + $("#newFeedForm").append($("#formCreateNewsTemp")); + $("#formCreateNewsTemp").css("display", "inline"); + } + } + } + else { + if($("#backToTop").length <= 0){ + //$('.first') + titleHTML = '<div class="date_separator" id="backToTop" data-appear-top-offset="-400" style="height:150px;">'+ + '<a href="javascript:;" onclick="smoothScroll(\'0px\');" title="retour en haut de page">'+ + '<span style="height:inherit;" class="homestead"><i class="fa fa-ban"></i> ' + trad["nomorenews"] + '<br/><i class="fa fa-arrow-circle-o-up fa-2x"></i> </span>'+ + '</a>'+ + '</div>'; + $(".newsTL").append(titleHTML); + $(".spine").css('bottom',"0px"); + scrollEnd = true; + }else{ + scrollEnd = false; + } + } + + } + $(".stream-processing").hide(); + bindEventNews(); + //Unblock message when click to change type stream + if (dateLimit==0) + setTimeout(function(){$.unblockUI()},1); +} + + +function bindEventNews(){ + var separator, anchor; + $("#get_url").elastic(); + + $(".scopeShare").click(function() { + mylog.log(this); + replaceText=$(this).find("h4").html(); + $("#btn-toogle-dropdown-scope").html(replaceText+' <i class="fa fa-caret-down" style="font-size:inherit;"></i>'); + scopeChange=$(this).data("value"); + $("input[name='scope']").val(scopeChange); + /*if(scopeChange == "public"){ + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").removeClass("tagOnly"); + liveScopeType = "global"; + } else { + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").addClass("tagOnly"); + liveScopeType = "community"; + }*/ + }); + $(".targetIsAuthor").click(function() { + mylog.log(this); + srcImg=$(this).find("img").attr("src"); + $("#btn-toogle-dropdown-targetIsAuthor").html('<img height=20 width=20 src="'+srcImg+'"/> <i class="fa fa-caret-down" style="font-size:inherit;"></i>'); + authorTargetChange=$(this).data("value"); + $("#authorIsTarget").val(authorTargetChange); + /*if(scopeChange == "public"){ + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").removeClass("tagOnly"); + liveScopeType = "global"; + } else { + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").addClass("tagOnly"); + liveScopeType = "community"; + }*/ + }); + + $(".date_separator").appear().on('appear', function(event, $all_appeared_elements) { + separator = '#' + $(this).attr("id"); + $('.timeline-scrubber').find("li").removeClass("selected").find("a[href = '" + separator + "']").parent().addClass("selected"); + }).on('disappear', function(event, $all_disappeared_elements) { + separator = $(this).attr("id"); + $('.timeline-scrubber').find("a").find("a[href = '" + separator + "']").parent().removeClass("selected"); + }); + $('.newsShare').off().on("click",function(){ + toastr.info('TODO : SHARE this news Entry'); + mylog.log("newsShare",$(this).data("id")); + count = parseInt($(this).data("count")); + $(this).data( "count" , count+1 ); + $(this).children(".label").html($(this).data("count")+" <i class='fa fa-share-alt'></i>"); + }); + + $('.filter').off().on("click",function(){ + if($(this).data("filter") == ".news" || $(this).data("filter")==".activityStream"){ + htmlMessage = '<div class="title-processing homestead"><i class="fa fa-circle-o-notch fa-spin"></i></div>'; + htmlMessage += '<a class="thumb-info" href="'+proverbs[rand]+'" data-title="Proverbs, Culture, Art, Thoughts" data-lightbox="all">'+ + '<img src="'+proverbs[rand]+'" style="border:0px solid #666; border-radius:3px;"/></a><br/><br/>'; + + mylog.log(newsReferror); + if(dateLimit==0){ + $.blockUI({message : htmlMessage}); + loadStream(); + } + + if ($("#backToTop"+streamType).length > 0 || $(".emptyNews"+streamType).length > 0){ + if($("#backToTop"+streamType).length > 0){ + $(".tagFilter, .scopeFilter").show(); + } + else{ + $(".tagFilter, .scopeFilter").hide(); + } + $(".stream-processing").hide(); + } + else{ + $(".stream-processing").show(); + } + } + else{ + mylog.warn("filter",$(this).data("filter")); + filter = $(this).data("filter"); + $(".newsFeed").hide(); + $(filter).show(); + } + }); + + /*$(".form-create-news-container #get_url").keyup(function(){ + if($(this).val() != "") + showFormBlock(true); + });*/ + $(".form-create-news-container #get_url").focusout(function(){ + //if($(this).val() == "")// && location.hash.indexOf("#default.live")!=0) + //showFormBlock(false); + }); + + $(".videoSignal").click(function(){ + videoLink = $(this).find(".videoLink").val(); + iframe='<div class="embed-responsive embed-responsive-16by9">'+ + '<iframe src="'+videoLink+'" width="100%" height="" class="embed-responsive-item"></iframe></div>'; + $(this).parent().next().before(iframe); + $(this).parent().remove(); + }); +} + +function smoothScroll(scroolTo){ + $(".my-main-container").scrollTo(scroolTo,500,{over:-0.6}); +} + +function modifyNews(idNews,typeNews){ + //switchModeEdit(id); + var idNewsUpdate=idNews; + var typeNewsUpdate=typeNews; + if($('.newsContent[data-pk="'+idNews+'"] .allText').length) + var commentContent = $('.newsContent[data-pk="'+idNews+'"] .allText').html(); + else + var commentContent = $('.newsContent[data-pk="'+idNews+'"] .timeline_text').html(); + var commentTitle = $('.newsTitle[data-pk="'+idNews+'"] .timeline_title').html(); + mylog.log("commentTitle", commentTitle); + var message = ""; + if(notEmpty(commentTitle)) + message += "<input type='text' id='textarea-edit-title"+idNews+"' class='form-control margin-bottom-5' style='text-align:left;' placeholder='Titre du message' value='"+commentTitle+"'>"; + + message += "<div id='container-txtarea-news-"+idNews+"' class='updateMention'>"; + message += "<textarea id='textarea-edit-news"+idNews+"' class='form-control newsContentEdit newsTextUpdate get-url-input' placeholder='modifier votre message'>"+commentContent+"</textarea>"+ + "<div id='resultsUpdate' class='bg-white results col-sm-12 col-xs-12'>"; + if(typeof updateNews[idNews]["media"] != "undefined"){ + if(updateNews[idNews]["media"]["type"]=="url_content") + message += processUrl.getMediaCommonHtml(updateNews[idNews]["media"],"save"); + else if(updateNews[idNews]["media"]["type"]=="gallery_files"){ + message += getMediaFiles(updateNews[idNews]["media"],idNews, "update")+ + "<input type='hidden' class='type' value='gallery_files'>"; + }else if (updateNews[idNews]["media"]["type"]=="gallery_images"){ + message += getMediaImages(updateNews[idNews]["media"], idNews,null,null, "update")+ + "<input type='hidden' class='type' value='gallery_images'>"; + }else{ + message +='<a href="javascript:;" class="removeMediaUrl"><i class="fa fa-times"></i></a>'+ + directory.showResultsDirectoryHtml(new Array(updateNews[idNews]["media"]["object"]), updateNews[idNews]["media"]["object"]["type"])+ + "<input type='hidden' class='type' value='activityStream'>"+ + "<input type='hidden' class='objectId' value='"+updateNews[idNews]["media"]["object"]["id"]+"'>"+ + "<input type='hidden' class='objectType' value='"+updateNews[idNews]["media"]["object"]["type"]+"'>"; + //message += getMediaImages(updateNews[idNews]["media"], idNews,null,null, "update"); + //message += "<input type='hidden' class='type' value='gallery_images'>"; + } + } + message +="</div>"+ + '<div class="form-group tagstags col-md-12 col-sm-12 col-xs-12">'+ + '<input id="tagsUpdate" type="" data-type="select2" name="tags" placeholder="#Tags" value="" style="width:100%;">'+ + "</div>"+ + "</div>"; + + + + var boxComment = bootbox.dialog({ + message: message, + title: 'Modifier votre publication', + buttons: { + annuler: { + label: "Annuler", + className: "btn-default", + callback: function() { + mylog.log("Annuler"); + } + }, + enregistrer: { + label: "Enregistrer", + className: "btn-success", + callback: function() { + heightCurrent=$("#"+typeNewsUpdate+idNewsUpdate).find(".timeline-panel").height(); + $("#"+typeNewsUpdate+idNewsUpdate).find(".timeline-panel").append("<div class='updateLoading' style='line-height:"+heightCurrent+"px'><i class='fa fa-spin fa-spinner'></i> En cours de modification</div>"); + + /*$('.newsTextUpdate').mentionsInput('getMentions', function(data) { + mentionsInput=data; + });*/ + newNews = new Object; + newNews.idNews = idNews; + newNews.text =$(".newsTextUpdate").val(); + if($("#resultsUpdate").html() != ""){ + newNews.media=new Object; + newNews.media.type=$("#resultsUpdate .type").val(); + if($("#resultsUpdate .type").val()=="url_content"){ + if($("#resultsUpdate .name").length) + newNews.media.name=$("#resultsUpdate .name").val(); + if($("#resultsUpdate .description").length) + newNews.media.description=$("#resultsUpdate .description").val(); + newNews.media.content=new Object; + newNews.media.content.type=$("#resultsUpdate .media_type").val(), + newNews.media.content.url=$("#resultsUpdate .url").val(), + newNews.media.content.image=$("#resultsUpdate .img_link").val(); + if($("#resultsUpdate .size_img").length) + newNews.media.content.imageSize=$("#resultsUpdate .size_img").val(); + if($("#resultsUpdate .video_link_value").length) + newNews.media.content.videoLink=$("#resultsUpdate .video_link_value").val(); + } + else if($("#resultsUpdate .type").val()=="gallery_images"){ + newNews.media.countImages=$("#resultsUpdate .docsId").length; + if(newNews.media.countImages>0){ + newNews.media.images=[]; + $(".docsId").each(function(){ + newNews.media.images.push($(this).val()); + }); + }else + news.media="unset"; + }else if($("#resultsUpdate .type").val()=="gallery_files"){ + newNews.media.countFiles=$("#resultsUpdate .docsId").length; + if(newNews.media.countFiles>0){ + newNews.media.files=[]; + $(".docsId").each(function(){ + newNews.media.files.push($(this).val()); + }); + }else + newNews.media="unset"; + }else{ + newNews.media.object={ + "id":$("#resultsUpdate .objectId"), + "type":$("#resultsUpdate .objectType") + }; + } + }else + newNews.media="unset"; + if ($("#tagsUpdate").val() != ""){ + newNews.tags = $("#tagsUpdate").val().split(","); + } + newNews=mentionsInit.beforeSave(newNews, '.newsTextUpdate'); + + //if(typeof newNews.tags != "undefined") newNews.tags = newNews.tags.concat($('#searchTags').val().split(',')); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/news/update?tpl=co2", + //dataType: "json", + data: newNews, + type: "POST", + }) + .done(function (data) { + if(data) + { + $("#"+typeNewsUpdate+idNewsUpdate).replaceWith(data); + bindEventNews(); + //if the news is post in a different month than last news and current month + /*if(data.object.date.sec) { + var monthSection = new Date( parseInt(data.object.date.sec)*1000 ); + + //if we need a month space to insert the news + if ( !$( "#"+'month'+monthSection.getMonth()+''+monthSection.getFullYear()).length ) { + urlCtrl.loadByHash(location.hash); + } + } + + if( 'undefined' != typeof updateNews && typeof updateNews == "function" ){ + insertNews(data.object); + } + $("#get_url").height(50); + $.unblockUI();*/ + toastr.success("Votre publication a bien été modifié"); + return true; + } + else + { + //$.unblockUI(); + toastr.error(data.msg); + } + $("#btn-submit-form i").removeClass("fa-circle-o-notch fa-spin").addClass("fa-arrow-circle-right"); + $("#btn-submit-form").prop('disabled', false); + return false; + }).fail(function(){ + toastr.error("Something went wrong, contact your admin"); + $("#btn-submit-form i").removeClass("fa-circle-o-notch fa-spin").addClass("fa-arrow-circle-right"); + $("#btn-submit-form").prop('disabled', false); + }); + /*updateNews(idNews,$("#textarea-edit-news"+idNews).val(), "newsContent"); + if(notEmpty($("#textarea-edit-title"+idNews).val())) + updateNews(idNews,$("#textarea-edit-title"+idNews).val(), "name");*/ + + + //return true; + } + }, + } + }); + + boxComment.on("shown.bs.modal", function() { + $.unblockUI(); + bindEventTextAreaNews('#textarea-edit-news'+idNews, idNews, updateNews[idNews]); + }); + + boxComment.on("hide.bs.modal", function() { + $.unblockUI(); + }); +} +function updateNews(idNews, newText, type){ + var classe1=""; var classe2=""; + if(type == "newsContent") { classe1="text"; classe2=".newsContent"; }else{ classe1="title";classe2=".newsTitle"; } + updateField("News",idNews,type,newText,false); + $(classe2+'[data-pk="'+idNews+'"] .timeline_'+classe1).html(newText); +} + +function bindEventTextAreaNews(idTextArea, idNews,data/*, isAnswer, parentCommentId*/){ + getMediaFromUrlContent(idTextArea,"#resultsUpdate",1); + //$(idTextArea).css('height', "34px"); + //$("#container-txtarea-news-"+idNews).css('height', "34px"); + mentionsInit.get(idTextArea); + $(".removeMediaUrl").click(function(){ + $trigger=$(this).parents().eq(1).find(idTextArea); + $(idTextArea).parents().eq(1).find("#resultsUpdate").empty().hide(); + }); + $(".deleteDoc").click(function(){ + $(this).parent().remove(); + if($(".deleteDoc").length == 0) + $("#resultsUpdate").empty().hide(); + }); + autosize($(idTextArea)); + textNews=data.text; + $(idTextArea).val(textNews); + + //$(idTextArea).mentionsInput("update", data.mentions); + if(typeof data.mentions != "undefined" && data.mentions.length != 0){ + text=data.text; + $.each(data.mentions, function(e,v){ + if(typeof v.slug != "undefined") + text=text.replace("@"+v.slug, v.name); + }); + + /*$(idTextArea).mentionsInput('val', function(text) { + text.replace("@@", "@"); + $(this).val(text); + $(this).text(text); + });*/ + $(idTextArea).val(text); + $(idTextArea).mentionsInput("update", data.mentions); + //$(idTextArea).focus() + } + $(idTextArea).on('keyup ', function(e){ + var heightTxtArea = $(idTextArea).css("height"); + $("#container-txtarea-news-"+idNews).css('height', heightTxtArea); + }); + $(idTextArea).bind ("input propertychange", function(e){ + var heightTxtArea = $(idTextArea).css("height"); + $("#container-txtarea-news-"+idNews).css('height', heightTxtArea); + }); + $('#tagsUpdate').select2({tags:tagsNews}); + $("#tagsUpdate").select2('val', data.tags); + +} + +function deleteNews(id, type, $this){ + //var $this=$(this); + bootbox.confirm(trad["suretodeletenews"], + function(result) { + if (result) { + if ($(".deleteImageIdName"+id).length){ + $(".deleteImageIdName"+id).each(function(){ + deleteInfo=$(this).val().split("|"); + deleteImage(deleteInfo[0],deleteInfo[1],true); + + }); + } + if ($("#deleteImageCommunevent"+id).length){ + imageId=$("#deleteImageCommunevent"+id).val(); + deleteImage(imageId,"",true,true); + } + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/news/delete/id/"+id, + //dataType: "json", + data: {"isLive": isLive}, + success: function(data){ + if (data) { + if(typeof data.result != "undefined"){ + if(typeof data.share != "undefined") + toastr.success("Votre partage a été supprimé avec succès!!"); + else + toastr.success(trad["successdeletenews"] + "!!"); + $("#"+type+id).fadeOut(); + } else { + toastr.success("Votre partage a été supprimé avec succès!!"); + $("#"+type+id).replaceWith(data); + } + /*liParent=$this.parents().eq(4); + if (typeof(offset) != "undefined") + offset.top = offset.top-liParent.height(); + liParent.fadeOut();*/ + + } else { + toastr.error(trad["somethingwrong"] + " " + trad["tryagain"]); + } + } + }); + } + } + ) +} + +function switchModeEdit(idNews){ + //alert(mode); + if(mode == "view"){ + mode = "update"; + manageModeContext(idNews); + } else { + mode ="view"; + manageModeContext(idNews); + } +} + +function manageModeContext(id) { + listXeditables = [/*'#newsContent'+id,*/ '#newsTitle'+id]; + if (mode == "view") { + //$('.editable-project').editable('toggleDisabled'); + $.each(listXeditables, function(i,value) { + $(value).editable('toggleDisabled'); + }); + //$("#btn-update-geopos").removeClass("hidden"); + } else if (mode == "update") { + // Add a pk to make the update process available on X-Editable + $('.editable-news').editable('option', 'pk', id); + $.each(listXeditables, function(i,value) { + $(value).editable('option', 'pk', id); + $(value).editable('toggleDisabled'); + }); + } +} +function initXEditable() { + $.fn.editable.defaults.mode = 'inline'; + $('.editable-news').editable({ + url: baseUrl+"/"+moduleId+"/news/updatefield", //this url will not be used for creating new job, it is only for update + emptytext: 'Empty', + textarea: { + html: true, + video: true, + image: true + }, + showbuttons: 'bottom', + success : function(data) { + if(data.result) { + toastr.success(data.msg); + + //$('.editable-news').editable('toggleDisabled'); + switchModeEdit(data.id); + mylog.log(data); + mylog.log("ici"); + //$("a[data-id='"+data.id+"']").trigger('click'); + } + else{ + toastr.error(data.msg); + } + } + }); + /* + $('.newsContent').editable({ + url: baseUrl+"/"+moduleId+"/news/updatefield", + emptytext: 'Vide', + showbuttons: 'bottom', + wysihtml5: { + html: true, + video: true, + image: true + }, + width:100, + showbuttons: 'bottom', + success : function(data) { + if(data.result) { + // $('.newsContent').editable('toggleDisabled'); + switchModeEdit(data.id); + toastr.success(data.msg); + mylog.log(data); + } + else + toastr.error(data.msg); + }, + }); +*/ + +} + + function insertNews(newsObj) + { + var date = new Date( parseInt(newsObj.created.sec)*1000 ); + if(newsObj.date.sec && newsObj.date.sec != newsObj.created.sec) { + date = new Date( parseInt(newsObj.date.sec)*1000 ); + } + var newsTLLine = buildLineHTML(newsObj,idSession,true); + $(".emptyNews").remove(); + $("#newFeedForm").parent().after(newsTLLine).fadeIn(); + $("#newFeedForm").parent().next().css("margin-top","20px"); + manageModeContext(newsObj._id.$id); + $("#form-news #get_url").val(""); + $('textarea.mention').mentionsInput('reset'); + $("#form-news #results").html("").hide(); + $("#form-news #tags").select2('val', ""); + showFormBlock(false); + $('.tooltips').tooltip(); + bindEventNews(); + } + + +function applyTagFilter(str) +{ + $(".newsFeed").fadeOut(); + if(!str){ + if($(".btn-tag.active").length){ + str = ""; + sep = ""; + $.each( $(".btn-tag.active") , function() { + str += sep+"."+$(this).data("id"); + sep = ","; + }); + } else + str = ".newsFeed"; + } + mylog.log("applyTagFilter",str); + $(str).fadeIn(); + return $(".newsFeed").length; +} + +function applyScopeFilter(str) +{ + $(".newsFeed").fadeOut(); + if(!str){ + if($(".btn-context-scope.active").length){ + str = ""; + sep = ""; + $.each( $(".btn-context-scope.active") , function() { + str += sep+"."+$(this).data("val"); + sep = ","; + }); + } else + str = ".newsFeed"; + } + mylog.log("applyScopeFilter",str); + $(str).fadeIn(); + return $(".newsFeed").length; +} + +function toggleFilters(what){ + if( !$(what).is(":visible") ) + $('.optionFilter').hide(); + $(what).slideToggle(); + } +/* +* Save news and url generate +* +*/ +function showFormBlock(bool){ + if(bool){ + $(".form-create-news-container #text").show("fast"); + $(".form-create-news-container .tagstags").show("fast"); + $(".form-create-news-container .datedate").show("fast"); + $(".form-create-news-container .form-actions").show("fast"); + $(".form-create-news-container .publiccheckbox").show("fast"); + $(".form-create-news-container .tools_bar").show("fast"); + $(".form-create-news-container .scopescope").show("fast"); + /////multiTagScopeLbl("send"); + if(isLiveGlobal()){ + scopeHtml =""; + + if( typeof communexion != "undefined" && notEmpty(communexion.values)){ + scopeHtml +='<a class="pull-left btn btn-link bg-white text-red tooltips item-globalscope-checker start-new-communexion" '+ + 'data-toggle="tooltip" data-placement="top" title="'+trad["communectwith"]+' '+communexion.currentName+'" '+ + 'data-scope-value="'+communexion.currentValue+'" '+ + 'data-scope-name="'+communexion.currentName+'" '+ + 'data-scope-level="'+communexion.currentLevel+'" '+ + 'data-scope-type="'+communexion.communexionType+'" '+ + 'id="btn-my-co">'+ + '<i class="fa fa-university"></i>'+ + '</a>'; + }else{ + if(userId!=""){ + scopeHtml='<a href="javascript:;" class="pull-left btn btn-link bg-white text-red tooltips" onclick="communecterUser();" '+ + 'data-toggle="tooltip" data-placement="top" title="Communectez-vous" '+ + 'id="btn-my-co">'+ + '<i class="fa fa-university"></i>'+ + '</a>'; + } + } + + scopeHtml +='<h5 class="pull-left letter-red" style="margin-bottom: -8px;margin-top: 14px;">'+ + '<a class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-left-10 margin-right-10" '+ + 'data-target="#modalScopes" data-toggle="modal" '+ + 'data-toggle="tooltip" data-placement="top" '+ + 'title="Sélectionner des lieux de recherche">'+ + '<img src="'+themeUrl+'/assets/img/cible3.png" height=25>'+ + '</a>'+ + 'Selectionner les endroits de publications <i class="fa fa-angle-right"></i>'+ + '</h5>'+ + '<div class="scope-min-header list_tags_scopes hidden-xs text-left ellipsis">'+ + $(".scope-min-header").html()+ + '</div>'; + if(communexion.state){ + scopeHtml='<a class="btn btn-link text-red btn-decommunecter tooltips" data-toggle="tooltip" data-placement="top" title="" data-original-title="Quitter la communexion">'+ + '<i class="fa fa-sign-in"></i>'+ + '</a>'+ + $(".getFormLive").html(); + } + actionOnSetGlobalScope="save"; + $("#scopeListContainerForm").append(scopeHtml); + $(".item-globalscope-checker:last-child").trigger("click").removeClass("inactive"); + if(communexion.state) + $(".item-globalscope-checker").attr('disabled', true); + $("#container-scope-filter").hide(); + bindCommunexionScopeEvents(); + } + //$("#lbl-my-scopes").html("<i class='fa fa-angle-down'></i> Sélectionnez les lieux de destination"); + //$("#lbl-my-tags").html("<i class='fa fa-angle-down'></i> Sélectionner des tags<span class='hidden-xs'> pour définir le contenu de votre message</span>"); + //$("br.visible-in-form").show(); + /////// + $('.extract_url').show(); + $(".form-create-news-container #falseInput").hide(); + $('#get_url').focus(); + + $("#toogle_filters").hide(); + $(".form-create-news-container #btn-slidup-scopetags").hide("fast"); + //$("#list_tags_scopes").appendTo(".form-create-news-container #scopeListContainer"); + if(typeof slidupScopetagsMin != "undefined") slidupScopetagsMin(false); + + }else{ + $(".form-create-news-container #text").hide(); + $(".form-create-news-container .tagstags").hide(); + $(".form-create-news-container .datedate").hide(); + $(".form-create-news-container .form-actions").hide(); + $(".form-create-news-container .publiccheckbox").hide(); + $(".form-create-news-container .tools_bar").hide(); + $(".form-create-news-container .scopescope").hide(); + //if(isLiveGlobal()) + // multiTagScopeLbl("search"); + actionOnSetGlobalScope="filter"; + $("#scopeListContainerForm").html(""); + $("#container-scope-filter").show(); + $(".item-globalscope-checker").prop('disabled', false); + //SCOPE DIV// + $('.extract_url').hide(); + $(".form-create-news-container #falseInput").show(); + + $("#toogle_filters").show(); + $(".form-create-news-container #btn-slidup-scopetags").show("fast"); + //$(".form-create-news-container #scopeListContainer").appendTo("#list_tags_scopes_container"); + if(typeof slidupScopetagsMin != "undefined") slidupScopetagsMin(true); + + } +} + +function getUrlContent(){ console.log("getUrlContent getUrlContent"); + //user clicks previous thumbail + $("body").on("click","#thumb_prev", function(e){ + if(img_arr_pos>0) + { + img_arr_pos--; //thmubnail array position decrement + + //replace with new thumbnail + $("#extracted_thumb").html('<img src="'+extracted_images[img_arr_pos]+'" width="100" height="100">'+selectThumb); + + //replace thmubnail position text + $("#total_imgs").html((img_arr_pos) +' of '+ total_images); + } + }); + + //user clicks next thumbail + $("body").on("click","#thumb_next", function(e){ + if(img_arr_pos<total_images) + { + img_arr_pos++; //thmubnail array position increment + + //replace with new thumbnail + $("#extracted_thumb").html('<img src="'+extracted_images[img_arr_pos]+'" width="100" height="100">'+selectThumb); + + //replace thmubnail position text + $("#total_imgs").html((img_arr_pos) +' of '+ total_images); + } + }); + var getUrl = $('#get_url'); //url to extract from text field + getUrl.bind("input keyup", function() { //user types url in text field + //url to match in the text field + var match_url = /\b(https?):\/\/([\-A-Z0-9. \-]+)(\/[\-A-Z0-9+&@#\/%=~_|!:,.;\-]*)?(\?[A-Z0-9+&@#\/%=~_|!:,.;\-]*)?/i; + //continue if matched url is found in text field +// if(!$(".lastUrl").attr("href") || $(".lastUrl").attr("href")) + if (match_url.test(getUrl.val())) { + if(lastUrl != getUrl.val().match(match_url)[0]){ + var extracted_url = getUrl.val().match(match_url)[0]; //extracted first url from text filed + $("#results").hide(); + $("#loading_indicator").show(); //show loading indicator image + //ajax request to be sent to extract-process.php + lastUrl=extracted_url; + $.ajax({ + url: baseUrl+'/'+moduleId+"/news/extractprocess", + data: { + 'url': extracted_url}, + type: 'post', + dataType: 'json', + success: function(data){ + mylog.log(data); + content = getMediaHtml(data,"save"); + //load results in the element + $("#results").html(content); //append received data into the element + $("#results").slideDown(); //show results with slide down effect + $("#loading_indicator").hide(); //hide loading indicator image + }, + error : function(){ + $.unblockUI(); + //toastr.error(trad["wrongwithurl"] + " !"); + //content to be loaded in #results element + var content = '<h4><a href="'+extracted_url+'" target="_blank" class="lastUrl">'+extracted_url+'</a></h4>'; + //load results in the element + $("#results").html(content); //append received data into the element + $("#results").slideDown(); //show results with slide down effect + $("#loading_indicator").hide(); //hide loading indicator image + $("#loading_indicator").hide(); + } + }); + } + } + }); +} +function getMediaHtml(data,action,idNews){ + if(typeof(data.images)!="undefined"){ + extracted_images = data.images; + total_images = parseInt(data.images.length); + img_arr_pos=1; + } + inputToSave=""; + if(typeof(data.content) !="undefined" && typeof(data.content.imageSize) != "undefined"){ + if (data.content.videoLink){ + extractClass="extracted_thumb"; + width="100"; + height="100"; + + aVideo='<a href="javascript:;" class="videoSignal text-white center"><i class="fa fa-3x fa-play-circle-o"></i><input type="hidden" class="videoLink" value="'+data.content.videoLink+'"/></a>'; + inputToSave+="<input type='hidden' class='video_link_value' value='"+data.content.videoLink+"'/>"+ + "<input type='hidden' class='media_type' value='video_link' />"; + } + else{ + aVideo=""; + endAVideo=""; + if(data.content.imageSize =="large"){ + extractClass="extracted_thumb_large"; + width="100%"; + height=""; + } + else{ + extractClass="extracted_thumb"; + width="100"; + height="100"; + } + inputToSave+="<input type='hidden' class='media_type' value='img_link' />"; + } + inputToSave+="<input type='hidden' class='size_img' value='"+data.content.imageSize+"'/>" + } + if (typeof(data.content) !="undefined" && typeof(data.content.image)!="undefined"){ + inc_image = '<div class="'+extractClass+'" id="extracted_thumb">'+aVideo; + if(data.content.type=="img_link"){ + if(typeof(data.content.imageId) != "undefined"){ + inc_image += "<input type='hidden' id='deleteImageCommunevent"+idNews+"' value='"+data.content.imageId+"'/>"; + titleImg = "De l'application communevent"; + }else + titleImg = "Image partagée"; + inc_image += "<a class='thumb-info' href='"+data.content.image+"' data-title='"+titleImg+"' data-lightbox='allimgcontent'>"; + } + inc_image +='<img src="'+data.content.image+'" width="'+width+'" height="'+height+'">'; + if(data.content.type=="img_link") + inc_image += '</a>'; + inc_image += '</div>'; + countThumbail=""; + inputToSave+="<input type='hidden' class='img_link' value='"+data.content.image+"'/>"; + } + else { + if(typeof(total_images)!="undefined" && total_images > 0){ + if(total_images > 1){ + selectThumb='<div class="thumb_sel"><span class="prev_thumb" id="thumb_prev"> </span><span class="next_thumb" id="thumb_next"> </span> </div>'; + countThumbail='<span class="small_text" id="total_imgs">'+img_arr_pos+' of '+total_images+'</span><span class="small_text"> Choose a Thumbnail</span>'; + } + else{ + selectThumb=""; + countThumbail=""; + } + inc_image = '<div class="'+extractClass+'" id="extracted_thumb">'+aVideo+'<img src="'+data.images[0]+'" width="'+width+'" height="'+height+'">'+selectThumb+'</div>'; + inputToSave+="<input type='hidden' class='img_link' value='"+data.images[0]+"'/>"; + }else{ + inc_image =''; + countThumbail=''; + } + } + + //content to be loaded in #results element + if(data.content==null) + data.content=""; + if(typeof(data.url)!="undefined") + mediaUrl=data.url; + else if (typeof(data.content.url) !="undefined") + mediaUrl=data.content.url; + else + mediaUrl=""; + if((typeof(data.description) !="undefined" || typeof(data.name) != "undefined") && (data.description !="" || data.name != "")){ + contentMedia='<div class="extracted_content col-xs-8 padding-20">'+ + '<a href="'+mediaUrl+'" target="_blank" class="lastUrl text-dark">'; + if(typeof(data.name) != "undefined" && data.name!=""){ + contentMedia+='<h4>'+data.name+'</h4></a>'; + inputToSave+="<input type='hidden' class='name' value='"+data.name+"'/>"; + } + if(typeof(data.description) != "undefined" && data.description!=""){ + contentMedia+='<p>'+data.description+'</p>'+countThumbail+'>'; + if(typeof(data.name) == "undefined" || data.name=="") + contentMedia+='</a>'; + inputToSave+="<input type='hidden' class='description' value='"+data.description+"'/>"; + } + contentMedia+='</div>'; + } + else{ + contentMedia=""; + } + inputToSave+="<input type='hidden' class='url' value='"+mediaUrl+"'/>"; + inputToSave+="<input type='hidden' class='type' value='url_content'/>"; + + content = '<div class="extracted_url">'+ inc_image +contentMedia+'</div>'+inputToSave; + return content; +} +function saveNews(){ + //mentionsResult=mentionsInit.beforeSave('textarea.mention'); + /*$('textarea.mention').mentionsInput('getMentions', function(data) { + mentionsInput=data; + });*/ + var formNews = $('#form-news'); + var errorHandler2 = $('.errorHandler', formNews); + var successHandler2 = $('.successHandler', formNews); + + var validation = { + submitHandler : function(form) { + //showPanel("box-login"); + $('#modalLogin').modal("show"); + } + }; + if(userId != null && userId != ""){ + validation = { + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + goSaveNews : { + required:{ + depends: function() { + if($(".noGoSaveNews").length){ + return true; + } + else{ + return false; + } + } + } + }, + getUrl : { + required:{ + depends: function() { + if($("#results").html() !=""){ + return false + }else{ + return true; + } + } + } + }, + }, + messages : { + getUrl : "* "+trad["emptymsg"], + goSaveNews: "* Image is still loading" + + }, + submitHandler : function(form) { + $("#btn-submit-form").prop('disabled', true); + $("#btn-submit-form i").removeClass("fa-arrow-circle-right").addClass("fa-circle-o-notch fa-spin"); + successHandler2.show(); + errorHandler2.hide(); + /*if(element){ + alert(element); + jsonHelper.stringFormtoJson( $("#form-news #get_url").val(), element+"Form" ); + mylog.warn("------------ form serialised as JSON ------------------"); + mylog.dir( $("#"+element+"Form").serializeFormJSON() ); + elementValidation (element+"Form", typeObj[element].rules, typeObj[element].save); + $("#"+element+"Form").submit(); + return false; + }*/ + newNews = new Object; + if($("#form-news #results").html() != ""){ + newNews.media=new Object; + if($("#form-news #results .type").val()=="url_content"){ + newNews.media.type=$("#form-news #results .type").val(); + if($("#form-news #results .name").length) + newNews.media.name=$("#form-news #results .name").val(); + if($("#form-news #results .description").length) + newNews.media.description=$("#form-news #results .description").val(); + newNews.media.content=new Object; + newNews.media.content.type=$("#form-news #results .media_type").val(), + newNews.media.content.url=$("#form-news #results .url").val(), + newNews.media.content.image=$("#form-news #results .img_link").val(); + if($("#form-news #results .size_img").length) + newNews.media.content.imageSize=$("#form-news #results .size_img").val(); + if($("#form-news #results .video_link_value").length) + newNews.media.content.videoLink=$("#form-news #results .video_link_value").val(); + }else if($("#form-news #results .type").val()=="activityStream"){ + newNews.media.type=$("#form-news #results .type").val(), + newNews.media.object={ + "id":$("#form-news #results .objectId").val(), + "type":$("#form-news #results .objectType").val() + } + } + else{ + newNews.media.type=$("#form-news #results .type").val(), + newNews.media.countImages=$("#form-news #results .count_images").val(), + newNews.media.images=[]; + $(".imagesNews").each(function(){ + newNews.media.images.push($(this).val()); + }); + } + } + if ($("#tags").val() != ""){ + newNews.tags = $("#form-news #tags").val().split(","); + } + + if($('#searchLocalityCITYKEY') && isLiveGlobal() && liveScopeType=="global" ){ + newNews.localities = getLocalityForSearch(); + } + + + + if(typeof newNews.tags != "undefined") newNews.tags = newNews.tags.concat($('#searchTags').val().split(',')); + else newNews.tags = $('#searchTags').val().split(','); + + newNews.parentId = $("#form-news #parentId").val(), + newNews.parentType = $("#form-news #parentType").val(), + newNews.scope = $("input[name='scope']").val(), + newNews.type = $("input[name='type']").val(), + newNews.text =$("#form-news #get_url").val(); + // AFAIRE + // activateMarkdown("#id") + // markdownToHtml(description); + //plugins/showdown/showdown.min.js + //plugins/showdown/showdown.min.js // bootstrap-markdown + // example in editInPlace.js /assets/js/ + //console.log(newNews.text); + //alert(newNews.text); + if($('#authorIsTarget').length && $('#authorIsTarget').val()==1) + newNews.targetIsAuthor = true; + mylog.log("contextParentType", contextParentType); + if($("input[name='cityInsee']").length && contextParentType == "city") + newNews.codeInsee = $("input[name='cityInsee']").val(); + if($("input[name='cityPostalCode']").length && contextParentType == "city") + newNews.postalCode = $("input[name='cityPostalCode']").val(); + /*if (mentionsResult.mentionsInput.length != 0){ + newNews.mentions=mentionsResult.mentionsInput; + newNews.text=mentionsResult.text; + }*/ + newNews=mentionsInit.beforeSave(newNews, 'textarea.mention'); + mylog.log(newNews); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/news/save?tpl=co2", + //dataType: "json", + data: newNews, + type: "POST", + }) + .done(function (data) { + if(data) + { + $("#form-news #get_url").val(""); + mentionsInit.reset('textarea.mention'); + //$('textarea.mention').mentionsInput('reset'); + $("#form-news #results").html("").hide(); + $("#form-news #tags").select2('val', ""); + showFormBlock(false); + $("#news-list").prepend(data); + bindEventNews(); + //if the news is post in a different month than last news and current month + /*if(data.object.date.sec) { + var monthSection = new Date( parseInt(data.object.date.sec)*1000 ); + + //if we need a month space to insert the news + if ( !$( "#"+'month'+monthSection.getMonth()+''+monthSection.getFullYear()).length ) { + urlCtrl.loadByHash(location.hash); + } + } + + if( 'undefined' != typeof updateNews && typeof updateNews == "function" ){ + insertNews(data.object); + } + $("#get_url").height(50); + $.unblockUI();*/ + toastr.success(trad["successsavenews"]); + } + else + { + //$.unblockUI(); + toastr.error(data.msg); + } + $("#btn-submit-form i").removeClass("fa-circle-o-notch fa-spin").addClass("fa-arrow-circle-right"); + $("#btn-submit-form").prop('disabled', false); + return false; + }).fail(function(){ + toastr.error("Something went wrong, contact your admin"); + $("#btn-submit-form i").removeClass("fa-circle-o-notch fa-spin").addClass("fa-arrow-circle-right"); + $("#btn-submit-form").prop('disabled', false); + }); + } + }; + } + formNews.submit(function(e) { e.preventDefault }).validate(validation); +} + +function showAllNews(){ + $(".newsFeed").show(); + $('.optionFilter').hide(); +} +function initFormImages(){ + $("#photoAddNews").on('submit',(function(e) { + e.preventDefault(); + if(contextParentType=="city" || contextParentType=="pixels"){ + contextParentType = "citoyens"; + contextParentId = idSession; + } + $.ajax({ + url : baseUrl+"/"+moduleId+"/document/"+uploadUrl+"dir/communecter/folder/"+contextParentType+"/ownerId/"+contextParentId+"/input/newsImage", + type: "POST", + data: new FormData(this), + contentType: false, + cache: false, + processData: false, + dataType: "json", + success: function(data){ + if(debug)mylog.log(data); + if(data.success){ + imageName = data.name; + var doc = { + "id":contextParentId, + "type":contextParentType, + "folder":contextParentType+"/"+contextParentId+"/album", + "moduleId":"communecter", + "name" : data.name , + "date" : new Date() , + "size" : data.size , + "doctype" : docType, + "contentKey" : contentKey, + "formOrigin" : "news" + }; + mylog.log(doc); + path = "/"+data.dir+data.name; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/document/save", + data: doc, + dataType: "json" + }).done( function(data){ + if(data.result){ + toastr.success(data.msg); + //setTimeout(function(){ + $(".imagesNews").last().val(data.id.$id); + $(".imagesNews").last().attr("name",""); + $(".newImageAlbum").last().find("img").removeClass("grayscale"); + $(".newImageAlbum").last().find("i").remove(); + $(".newImageAlbum").last().append("<a href='javascript:;' onclick='deleteImage(\""+data.id.$id+"\",\""+data.name+"\")'><i class='fa fa-times fa-x padding-5 text-white removeImage' id='deleteImg"+data.id.$id+"'></i></a>"); + //},200); + + } else{ + toastr.error(data.msg); + if($("#results img").length>1) + $(".newImageAlbum").last().remove(); + else{ + $("#results").empty(); + $("#results").hide(); + } + } + $("#addImage").off(); + }); + } + else{ + if($("#results img").length>1) + $(".newImageAlbum").last().remove(); + else{ + $("#results").empty(); + $("#results").hide(); + } + $("#addImage").off(); + toastr.error(data.msg); + } + }, + }); + })); +} +function addMoreSpace(){ + bootbox.dialog({ + message: "You have attempt the limit of 20Mo of images for this "+contextParentType+"<br/>Please choose one of those two solutions beyond:<br/>Delete images in the <a href='javascript:;' onclick='bootbox.hideAll();urlCtrl.loadByHash(\"#gallery.index.id."+contextParentId+".type."+contextParentType+"\")'>photo gallery</a> <br/><br/>OR<br/><br/> Subscribe 12€ to the NGO Open Atlas which takes in charge communecter.org on <a href='https://www.helloasso.com/associations/open-atlas' target='_blank'>helloAsso</a> for 20Mo more. <br/><br/>Effectively, stocking images represents a cost for us and donate to the NGO will demonstrate your contribution the project and to the common we built together", + title: "Limit of <color class='red'>20 Mo</color> overhead" + }); +} +function showMyImage(fileInput) { + if($(".noGoSaveNews").length){ + toastr.info("Wait the end of image loading"); + } + else if (fileInput.files[0].size > 2097152){ + toastr.info("Please reduce your image before to 2Mo"); + } + else { + countImg=$("#results img").length; + idImg=countImg+1; + htmlImg=""; + var files = fileInput.files; + if(countImg==0){ + htmlImg = "<input type='hidden' class='type' value='gallery_images'/>"; + htmlImg += "<input type='hidden' class='count_images' value='"+idImg+"'/>"; + htmlImg += "<input type='hidden' class='algoNbImg' value='"+idImg+"'/>"; + nbId=idImg; + $("#results").show(); + } + else{ + nbId=$(".algoNbImg").val(); + nbId++; + $(".count_images").val(idImg); + $(".algoNbImg").val(nbId); + } + htmlImg+="<div class='newImageAlbum'><i class='fa fa-spin fa-circle-o-notch fa-3x text-green spinner-add-image noGoSaveNews'></i><img src='' id='thumbail"+nbId+"' class='grayscale' style='width:75px; height:75px;'/>"+ + "<input type='hidden' class='imagesNews' name='goSaveNews' value=''/></div>"; + $("#results").append(htmlImg); + for (var i = 0; i < files.length; i++) { + var file = files[i]; + var imageType = /image.*/; + if (!file.type.match(imageType)) { + continue; + } + var img=document.getElementById("thumbail"+nbId); + img.file = file; + var reader = new FileReader(); + reader.onload = (function(aImg) { + return function(e) { + aImg.src = e.target.result; + }; + })(img); + reader.readAsDataURL(file); + } + $("#photoAddNews").submit(); + } +} + +function getMediaImages(o,newsId,authorId,targetName,edit){ + countImages=o.images.length; + html=""; + if(typeof edit != "undefined" && edit=="update"){ + for(var i in o.images){ + html+="<div class='updateImageNews'><img src='"+baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name+"' style='width:75px; height:75px;'/>"+ + "<a href='javascript:;' class='btn-red text-white deleteDoc'><i class='fa fa-times text-dark'></i></a>"+ + "<input type='hidden' class='docsId' value='"+o.images[i]._id.$id+"'></div>"; + } + return html; + } + /*if(canManageNews==1 || authorId==idSession){ + for(var i in o.images){ + html+="<input type='hidden' class='deleteImageIdName"+newsId+"' value='"+o.images[i]._id.$id+"|"+o.images[i].name+"'/>"; + } + }*/ + if(countImages==1){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.images[0].folder+"/"+o.images[0].name; + html+="<div class='col-md-12 no-padding margin-top-10'><a class='thumb-info' href='"+path+"' data-title='album de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='max-height:200px;'></a></div>"; + } + else if(countImages==2){ + for(var i in o.images){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name; + html+="<div class='col-md-6 padding-5'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='max-height:200px;'></a></div>"; + } + } + else if(countImages==3){ + col0="6"; + height0="400"; + absoluteImg="position:absolute;"; + if (typeof liveScopeType != "undefined" && liveScopeType == "global"){ + col0="12"; + height0="260"; + absoluteImg=""; + } + for(var i in o.images){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name; + if(i==0){ + html+="<div class='col-md-"+col0+" padding-5' style='position:relative;height:"+height0+"px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"min-height:100%;min-width:100%;'></a></div>"; + }else{ + html+="<div class='col-md-6 padding-5' style='position:relative; height:200px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"min-height:100%;min-width:100%;'></a></div>"; + } + } + } + else if(countImages==4){ + absoluteImg="position:absolute;"; + if (typeof liveScopeType != "undefined" && liveScopeType == "global") + absoluteImg=""; + for(var i in o.images){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name; + html+="<div class='col-md-6 padding-5' style='position:relative;height:250px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"min-height:100%;min-width:100%;height:auto;'></a></div>"; + } + } + else if(countImages>=5){ + absoluteImg="position:absolute;"; + if (typeof liveScopeType != "undefined" && liveScopeType == "global") + absoluteImg=""; + for(var i in o.images){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.images[i].folder+"/"+o.images[i].name; + if(i==0) + html+="<div class='col-md-12 no-padding'><div class='col-md-6 padding-5' style='position:relative;height:260px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"min-height:100%;min-width:100%;'></a></div>"; + else if(i==1){ + html+="<div class='col-md-6 padding-5' style='position:relative;height:260px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"height:100%;width:100%;'></a></div></div>"; + } + else if(i<5){ + html+="<div class='col-md-4 padding-5' style='position:relative;height:160px;overflow:hidden;'><a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'><img src='"+path+"' class='img-responsive' style='"+absoluteImg+"height:100%;width:100%;'>"; + if(i==4 && countImages > 5){ + diff=countImages-5; + html+="<div style='position: absolute;top:5px;left:5px;right:5px;bottom:5px;background-color: rgba(0,0,0,0.4);color: white;text-align: center;line-height: 150px;font-size: 50px;'><span>+ "+diff+"</span></div>"; + } + html+="</a></div>"; + } else{ + html+="<a class='thumb-info' href='"+path+"' data-title='abum de "+targetName+"' data-lightbox='all"+newsId+"'></a>"; + } + } + } + return html; +} +function getMediaFiles(o,newsId, edit){ + html=""; + for(var i in o.files){ + path=baseUrl+"/"+uploadUrl+"communecter/"+o.files[i].folder+"/"+o.files[i].name; + html+="<div class='col-md-12 padding-5 shadow2 margin-top-5'>"+ + "<a href='"+path+"' target='_blank'>"+documents.getIcon(o.files[i].contentKey)+" "+o.files[i].name+"</a>"; + if(typeof edit != "undefined" && edit=="update"){ + html+="<a href='javascript:;' class='btn-red text-white deleteDoc'><i class='fa fa-times text-dark'></i></a>"+ + "<input type='hidden' class='docsId' value='"+o.files[i]._id.$id+"'>"; + } + html +="</div>"; + } + return html; +} +function deleteImage(id,name,hideMsg,communevent){ + var imgToDelete=id; + if(communevent==true) + path="communevent"; + else + path="commuencter"; + $.ajax({ + url : baseUrl+"/"+moduleId+"/document/delete/dir/"+moduleId+"/type/"+contextParentType+"/id/"+contextParentId, + type: "POST", + data: {"name": name, "parentId": contextParentId, "parentType": contextParentType, "path" : path, "ids" : [id]}, + dataType: "json", + success: function(data){ + if(data.result){ + if(hideMsg!=true){ + countImg=$("#results img").length; + $("#deleteImg"+imgToDelete).parents().eq(1).remove(); + idImg=countImg-1; + if(idImg==0){ + $("#results").empty().hide(); + } + else{ + $(".count_images").val(idImg); + } + toastr.success(data.msg); + } + } + else{ + toastr.error(data.msg); + } + } + }); +} + + diff --git a/assets/js/news/newsHtml.js b/assets/js/news/newsHtml.js new file mode 100644 index 0000000000000000000000000000000000000000..263cb124065fdb95fe24ec7e8bfd93bccc12fbb7 --- /dev/null +++ b/assets/js/news/newsHtml.js @@ -0,0 +1,934 @@ +var contextScopesTags = { + "tags" : [], + "scopes" : { + codeInsee : [], + codePostal : [], + region :[], + addressLocality : [] + }, +}; +var tagsFilterListHTML = ""; +var scopesFilterListHTML = ""; +var mode = "view"; + +function buildLineHTML(newsObj,idSession,update) +{ + mylog.log("buildLineHTML",newsObj,idSession,update); + addForm=false; + if(typeof(contextParentType) == "undefined") + contextParentType="citoyens"; + newsTLLine = ""; + // ManageMenu to the user de signaler un abus, de modifier ou supprimer ces news + manageMenu = ""; + + manageMenu='<div class="btn dropdown pull-right no-padding" style="padding-left:10px !important;">'+ + '<a class="dropdown-toggle" type="button" data-toggle="dropdown" style="color:#8b91a0;">'+ + '<i class="fa fa-cog"></i> <i class="fa fa-angle-down"></i>'+ + '</a>'+ + '<ul class="dropdown-menu">'; + + var reportLink = ""; + if ("undefined" != typeof newsObj.reportAbuse) { + if ("undefined" == typeof newsObj.reportAbuse[idSession]){ + reportLink = '<li><a href="javascript:;" class="newsReport" onclick="newsReportAbuse(this,\''+newsObj._id.$id+'\')" data-id="'+newsObj._id.$id+'"><small><i class="fa fa-flag"></i> '+trad['reportanabuse']+'</small></a></li>'; + } + } + else{ + reportLink = '<li><a href="javascript:;" class="newsReport" onclick="newsReportAbuse(this,\''+newsObj._id.$id+'\')" data-id="'+newsObj._id.$id+'"><small><i class="fa fa-flag"></i> '+trad['reportanabuse']+'</small></a></li>'; + } + + if (newsObj.author.id==idSession || canManageNews == true){ + manageMenu += '<li><a href="javascript:;" class="deleteNews" onclick="deleteNews(\''+newsObj._id.$id+'\', $(this))" data-id="'+newsObj._id.$id+'"><small><i class="fa fa-times"></i> '+trad['delete']+'</small></a></li>'; + if (newsObj.type != "activityStream" && newsObj.author.id==idSession){ + manageMenu += '<li><a href="javascript:" class="modifyNews" onclick="modifyNews(\''+newsObj._id.$id+'\')" data-id="'+newsObj._id.$id+'"><small><i class="fa fa-pencil"></i> '+trad['updatepublication']+'</small></a></li>'; + } + } + manageMenu += reportLink+'</ul>'+ + '</div>'; + + if(typeof(newsObj.created) == "object") + var date = new Date( parseInt(newsObj.created.sec)*1000 ); + else + var date = new Date( parseInt(newsObj.created)*1000 ); + + var year = date.getFullYear(); + var month = months[date.getMonth()]; + var day = (date.getDate() < 10) ? "0"+date.getDate() : date.getDate(); + var hour = (date.getHours() < 10) ? "0"+date.getHours() : date.getHours(); + var min = (date.getMinutes() < 10) ? "0"+date.getMinutes() : date.getMinutes(); + var dateStr = day + ' ' + month + ' ' + year + ' ' + hour + ':' + min; + if(typeof(newsObj.scope)!="undefined" && typeof(newsObj.scope.type)!="undefined"){ + scopeTooltip=trad["visible"+newsObj.scope.type]; + if(newsObj.scope.type=="public"){ + scopeIcon="globe"; + } + else if (newsObj.scope.type=="restricted"){ + scopeIcon="connectdevelop"; + }else{ + scopeIcon="lock"; + } + dateStr += " • <i class='fa fa-"+scopeIcon+" tooltips' data-toggle='tooltip' data-placement='bottom' data-original-title='"+scopeTooltip+"'></i>"; + } + // if month of the current news is different than currentMonth + // Added new month link to the right sidebar and a new date separator in the timeline + // Check if inject the new's form + if(typeof(currentMonth) != "undefined" && currentMonth != date.getMonth() && update != true) + { + form=""; + // Append for at the beginning after the construction of the timeline + //alert(canPostNews); + if (currentMonth == null && canPostNews == true){ + // alert(); + form = "<div class='newsFeed newsFeedForm'>"+ + "<div id='newFeedForm"+"' class='timeline_element partition-white no-padding' style='min-width:85%;'></div>"+ + "</div>"; + addForm=true; + + } + currentMonth = date.getMonth(); + // Add item to the left filter by month YY + linkHTML = '<li class="">'+ + '<a href="javascript:;" class="linkMonth" onclick="smoothScroll(\'#month'+date.getMonth()+date.getFullYear()+'\');">'+months[date.getMonth()]+' '+date.getFullYear()+'</a>'+ + '</li>'; + // Add date separator by month YY + $(".newsTLmonthsList").append(linkHTML); + newsTLLine += '<div class="date_separator" id="'+'month'+date.getMonth()+date.getFullYear()+'" data-appear-top-offset="-400">'+ + '<span>'+months[date.getMonth()]+' '+date.getFullYear()+'<br><i class="fa fa-angle-down fa-2x"></i></span>'+ + '</div>'+form; + + $(".spine").css("bottom","0px"); + } + else{ + $(".spine").css("bottom","30px"); + } + var color = "white"; + var icon = "fa-user"; + ///// Url link to object + urlAction=buildHtmlUrlAndActionObject(newsObj); + var imageBackground = ""; + if(typeof newsObj.author != "undefined"){ + if(typeof newsObj.author.type == "undefined") { + newsObj.author.type = "citoyens"; + } + } + + ///// Image Backgound + if(typeof(newsObj.imageBackground) != "undefined" && newsObj.imageBackground){ + imagePath = baseUrl+'/'+newsObj.imageBackground; + imageBackground = '<a '+url+'>'+ + '<div class="timeline_shared_picture" style="">'+ + //background-image:url('+imagePath+'); + '<img src="'+imagePath+'">'+ + '</div>'+ + '</a>'; + } + mylog.log(newsObj); + //END Image Background + iconStr=builHtmlAuthorImageObject(newsObj); + if(newsObj.type == "activityStream" && typeof(newsObj.target) != "undefined"){ + if(newsObj.target.type=="projects") + var iconBlank="fa-lightbulb-o"; + else if (newsObj.target.type=="organizations") + var iconBlank="fa-group"; + } + // END IMAGE AND FLAG POST BY HOSTED BY // + media=""; + title=""; + text=""; + actionTitle=""; + if (newsObj.type != "activityStream"){ + if("undefined" != typeof newsObj.name){ + title='<a href="javascript:" id="newsTitle'+newsObj._id.$id+'" data-type="text" data-pk="'+newsObj._id.$id+'" class="editable-news editable editable-click newsTitle"><span class="text-large text-bold light-text timeline_title no-margin" style="color:#719FAB;">'+newsObj.name+"</span></a><br/>"; + } + textHtml=""; + if(newsObj.text.length > 0){ + if(typeof(view) != "undefined" && view == "detail") + textNews=newsObj.text; + else + textNews=checkAndCutLongString(newsObj.text,500,newsObj._id.$id); + //Check if @mentions return text with link + if(typeof(newsObj.mentions) != "undefined"){ + actionTitle = "";//getMentionLabel(newsObj)+'<div class="space5"></div><hr/>'; + textNews = addMentionInText(textNews,newsObj.mentions); + } + textHtml='<span class="timeline_text no-padding text-black" >'+textNews+'</span>'; + } + text='<div id="newsContent'+newsObj._id.$id+'" data-pk="'+newsObj._id.$id+'" class="newsContent" >'+textHtml+'</div>'; + if("undefined" != typeof newsObj.media){ + if(typeof(newsObj.media.type)=="undefined" || newsObj.media.type=="url_content"){ + if("object" != typeof newsObj.media) + media="<div class='results'>"+newsObj.media+"</div>"; + else{ + media="<div class='results'>"+getMediaHtml(newsObj.media,"show",newsObj._id.$id)+"</div>"; + //// Fonction générant l'html + } + } else if (newsObj.media.type=="gallery_images"){ + media=getMediaImages(newsObj.media,newsObj._id.$id,newsObj.author.id,newsObj.target.name); + } + + } + } + else{ + if(newsObj.object.type=="events" || newsObj.object.type=="needs"){ + if(newsObj.startDate && newsObj.endDate){ + if(typeof(newsObj.startDate) == "object") + var startDate = new Date( parseInt(newsObj.startDate.sec)*1000 ); + else if(typeof(newsObj.startDateSec) != "undefined") + var startDate = new Date( parseInt(newsObj.startDateSec)*1000 ); + else + var startDate = new Date( parseInt(newsObj.startDate)*1000 ); + var startMonth = months[startDate.getMonth()]; + var startDay = (startDate.getDate() < 10) ? "0"+startDate.getDate() : startDate.getDate(); + if(typeof(newsObj.endDate) == "object") + var endDate = new Date( parseInt(newsObj.endDate.sec)*1000 ); + else if(typeof(newsObj.endDateSec) != "undefined") + var endDate = new Date( parseInt(newsObj.endDateSec)*1000 ); + else + var endDate = new Date( parseInt(newsObj.endDate)*1000 ); + var endMonth = months[endDate.getMonth()]; + var endDay = (endDate.getDate() < 10) ? "0"+endDate.getDate() : endDate.getDate(); + } + var objectLocality = ""; + if (newsObj.object.type=="needs") + objectLocality=newsObj.target.address.addressLocality; + else + if(typeof newsObj.scope != "undefined") + objectLocality=newsObj.scope.address.addressLocality; + + //var hour = (startDate.getHours() < 10) ? "0"+startDate.getHours() : startDate.getHours(); + //var min = (startDate.getMinutes() < 10) ? "0"+startDate.getMinutes() : startDate.getMinutes(); + //var dateStr = day + ' ' + month + ' ' + year + ' ' + hour + ':' + min; + title = '<a '+urlAction.url+' class="col-md-12 col-sm-12 col-xs-12 no-padding">'; + if (typeof(startDay)!="undefined"){ + title += '<div class="col-md-3 col-sm-3 col-xs-3 no-padding center">'+ + '<span class="text-large text-red text-bold light-text timeline_title no-margin">'+startDay+'</span><br/><span class="text-dark light-text timeline_title no-margin">'+startMonth+'</span>'+ + '</div>'; + } + title += '<div class="col-md-9 col-sm-9 col-xs-9 no-padding">'+ + '<span class="text-large text-dark light-text timeline_title no-margin">'+newsObj.name+'</span><br/>'; + if (typeof(startDay)!= "undefined" && typeof(endDay) != "undefined"){ + title += '<span style="color: #8b91a0 !important;"><i class="fa fa-calendar"></i> '+startDay+' '+startMonth+' • '+endDay+' '+endMonth+' • '; + } + title += '<i class="fa fa-map-marker"></i> '+objectLocality+'</span>'+ + '</div>'+ + '</a>'; + } else{ + title = '<a '+urlAction.url+' class="col-md-12 col-sm-12 col-xs-12 no-padding"><span class="text-large text-dark light-text timeline_title no-margin">'+newsObj.name+'</span></a>'; + } + if("undefined" != typeof newsObj.text && newsObj.text != ""){ + title += "</br><div class='col-md-12 col-sm-12 col-xs-12 no-padding'>"; + textNews=checkAndCutLongString(newsObj.text,150,newsObj._id.$id); + text = '<span class="timeline_text no-padding">'+textNews+'</span></div>'; + } + } + tags = "", + scopes = "", + tagsClass = "", + scopeClass = ""; + if( "object" == typeof newsObj.tags && newsObj.tags ) + { + var countTag = 0; + var maxTag = 5; + $.each( newsObj.tags , function(i,tag){ if(countTag < maxTag){ + if(tag != ""){ + countTag++; + tagsClass += tag+" "; + + /*tags += "<span class='label tag_item_map_list tag' data-val='"+tag+"'>#"+tag+"</span> "; + if( $.inArray(tag, contextScopesTags.tags) == -1 && tag != undefined && tag != "undefined" && tag != "" ){ + contextScopesTags.tags.push(tag);*/ + + tags += "<span class='label tag_item_map_list tag' data-tag-value='"+tag+"'>#"+tag+"</span> "; + if( $.inArray(tag, newsObj.tags/*contextMap.tags*/) == -1 && tag != undefined && tag != "undefined" && tag != "" ){ + /*contextMap.tags*/ newsObj.tags.push(tag); + tagsFilterListHTML += ' <a href="javascript:;" class="filter btn btn-xs btn-default text-red" data-filter=".'+tag+'"><span class="text-red text-xss">#'+tag+'</span></a>'; + } + } + } }); + tags = '<div class="pull-left"><i class="fa fa-tags text-red"></i> '+tags+'</div>'; + } + var author = typeof newsObj.author != "undefined" ? newsObj.author : null; + if(((author != null && typeof author.address != "undefined") || newsObj.type == "activityStream") && newsObj.scope.type != "restricted" && newsObj.scope.type != "private") + { + postalCode = ""; + city = ""; + if(newsObj.type != "activityStream"){ + // if(newsObj.target.type=="citoyens"){ + // if(typeof(newsObj.scope.cities[0].postalCode) != "undefined") + // postalCode=newsObj.scope.cities[0].postalCode; + // if(typeof(newsObj.scope.cities[0].addressLocality) != "undefined") + // city=newsObj.scope.cities[0].addressLocality; + // } + // else if(typeof(newsObj.target) != 'undefined' && typeof(newsObj.target.address) != 'undefined'){ + // postalCode=newsObj.target.address.postalCode; + // city=newsObj.target.address.addressLocality; + // } + var countScope = 0; + var maxScope = 6; + if(typeof(newsObj.scope.cities) != "undefined") + $.each(newsObj.scope.cities, function(key, value){ countScope++; + var name = ""; + if (typeof(value.postalCode) != "undefined") { + name += value.postalCode; + } + + if(name != "") name += ", " ; + + name += (value.addressLocality != "" && value.addressLocality != null) ? value.addressLocality : ""; + if(countScope<maxScope) + scopes += "<span class='label label-danger'>" + name + "</span> "; + }); + if(typeof(newsObj.scope.departements) != "undefined") + $.each(newsObj.scope.departements, function(key, value){ countScope++; + if(countScope<maxScope) + scopes += "<span class='label label-danger'>"+value.name + "</span> "; + }); + if(typeof(newsObj.scope.regions) != "undefined") + $.each(newsObj.scope.regions, function(key, value){ countScope++; + if(countScope<maxScope) + scopes += "<span class='label label-danger'>"+value.name + "</span> "; + }); + + }else { //activityStream + if (typeof(newsObj.scope.address) != "undefined" && newsObj.scope != null && newsObj.scope.address != null && newsObj.scope.address.addressLocality != "Unknown") { + postalCode=((newsObj.scope.address.postalCode)?newsObj.scope.address.postalCode+" , " : ""); + city=newsObj.scope.address.addressLocality; + scopes += "<span class='label label-danger'>"+postalCode+city+"</span> "; + } + } + // if( typeof postalCode != "undefined" && postalCode!="") + // { + // scopes += "<span class='label label-danger'>"+postalCode+"</span> "; + // scopeClass += postalCode+" "; + // if( $.inArray(postalCode, contextMap.scopes.codePostal ) == -1){ + // contextMap.scopes.codePostal.push(postalCode); + // } + // } + // if( typeof city != "undefined" && city != "") + // { + // scopes += "<span class='label label-danger'>"+city+"</span> "; + // scopeClass += city+" "; + // if( $.inArray(city, contextMap.scopes.addressLocality ) == -1){ + // cityFilter=city.replace(/\s/g, ""); + // mylog.log(city); + // contextMap.scopes.addressLocality.push(cityFilter); + // scopesFilterListHTML += ' <a href="javascript:" class="filter btn btn-xs btn-default text-red" data-filter=".'+postalCode+'"><span class="text-red text-xss">'+city+'</span></a>'; + // } + // } + if(scopes != "") + scopes = '<div class="pull-right" style="margin: 5px 0px;"><i class="fa fa-bullseye"></i> '+scopes+'</div>'; //<i class="fa fa-circle-o"></i> + + } + var objectDetail = (newsObj.object && newsObj.object.displayName) ? '<div>Name : '+newsObj.object.displayName+'</div>' : ""; + var objectLink = (newsObj.object) ? ' <a '+urlAction.url+'>'+iconStr+'</a>' : iconStr; + // HOST NAME AND REDIRECT URL + if (newsObj.type=="activityStream" && typeof(newsObj.target) != "undefined" && newsObj.target.id != newsObj.author.id){ + redirectTypeUrl=newsObj.target.type.substring(0,newsObj.target.type.length-1); + if (newsObj.target.type=="citoyens") + redirectTypeUrl="person"; + if (newsObj.target.name.length > 25) + nameAuthor = newsObj.target.name.substr(0,25)+"..."; + else + nameAuthor = newsObj.target.name; + urlTarget = 'href="#'+redirectTypeUrl+'.detail.id.'+newsObj.target.id+'" '; + var personName = "<a "+urlTarget+" class='lbh' style='color:#3C5665;'>"+nameAuthor+"</a> "+urlAction.titleAction; + } + else { + if(typeof newsObj.author.id != "undefined") + authorId=newsObj.author.id; + else + authorId=newsObj.author._id.$id; + urlTarget = 'href="#person.detail.id.'+authorId+'" onclick="urlCtrl.loadByHash(\'#person.detail.id.'+authorId+'\')"'; + if (newsObj.author.name.length > 25) + nameAuthor = newsObj.author.name.substr(0,25)+"..."; + else + nameAuthor = newsObj.author.name; + if(typeof newsObj.targetIsAuthor != "undefined") + var personName = urlAction.titleAction; + else + var personName = "<a "+urlTarget+" style='color:#3C5665;'>"+nameAuthor+"</a> "+urlAction.titleAction; + } + // END HOST NAME AND REDIRECT URL + // Created By Or invited by + /*if(typeof(newsObj.verb) != "undefined" && newsObj.target.id != newsObj.author.id){ + urlAuthor = 'href="javascript:" onclick="openMainPanelFromPanel(\'/person/detail/id/'+newsObj.author.id+'\', \'person : '+newsObj.author.name+'\',\'fa-user\', \''+newsObj.author.id+'\')"'; + authorLine=newsObj.verb+" by <a "+urlAuthor+">"+newsObj.author.name+"</a> "+urlAction.titleAction; + } + else + authorLine="";*/ + //END OF CREATED BY OR INVITED BY + + var commentCount = 0; + idVote=newsObj._id['$id']; + if ("undefined" != typeof newsObj.commentCount) + commentCount = newsObj.commentCount; + vote=voteCheckAction(idVote,newsObj); + + var lblCommentCount = ''; + if(commentCount == 0 && idSession) lblCommentCount = "<i class='fa fa-comment'></i> Commenter"; + if(commentCount == 1) lblCommentCount = "<i class='fa fa-comment'></i> <span class='nbNewsComment'>" + commentCount + "</span> commentaire"; + if(commentCount > 1) lblCommentCount = "<i class='fa fa-comment'></i> <span class='nbNewsComment'>" + commentCount + "</span> commentaires"; + if(commentCount == 0 && !idSession) lblCommentCount = "0 <i class='fa fa-comment'></i> "; + + newsTLLine += '<div class="newsFeed newsFeedNews '+''+tagsClass+' '+scopeClass+' '+newsObj.type+' " id="newsFeed'+newsObj._id.$id+'">'+ + '<div class="timeline_element partition-'+color+'">'+ + actionTitle+ + tags+ + manageMenu+ + scopes+ + '<div class="space1"></div>'+ + imageBackground+ + '<div class="timeline_author_block">'+ + objectLink+ + '<span class="light-text timeline_author text-bold">'+personName+'</span>'+ + '<div class="timeline_date"><i class="fa fa-clock-o"></i> '+dateStr+'</div>' + + '</div>'+ + '<div class="space5"></div>'+ + '<hr/>' + + //'<a '+urlAction.url+'>'+ + '<div class="space5"></div>'+ + '<div>'+title + text + "</div>"+media + + //'</a>'+ + '<div class="space5"></div>'; + + newsTLLine += '<hr>'+ + "<div class='bar_tools_post margin-bottom-10'>"+ + "<a href='javascript:;' class='newsAddComment' data-count='"+commentCount+"' onclick='showComments(\""+idVote+"\")' "+ + "data-id='"+idVote+"' data-type='"+newsObj.target.type+"'>"+ + "<span class='label text-dark lblComment'> " + lblCommentCount + "</span>"+ + "</a> "+ + vote+ + "</div>"; + newsTLLine += //'<hr>'+ + "<div id='commentContent"+idVote+"' class='commentContent'>"+ + + "</div>"; + //} + newsTLLine += '</div>'+ + '</div>'; + if(update==true) + return newsTLLine; + else{ + // Check offset of last element + var offsetLastNews = $(".newsFeed").last().position(); + // Append news in timeline + $(".newsTL").append(newsTLLine); + if(addForm==true){ + if(isLiveGlobal()){ + $("#newLiveFeedForm").append($("#formCreateNewsTemp")); + $("#formCreateNewsTemp").css("display", "inline"); + $(".newsFeedForm").css("display", "none"); + + }else{ + $("#newFeedForm").append($("#formCreateNewsTemp")); + $("#formCreateNewsTemp").css("display", "inline"); + } + + //$("#newFeedForm").append($("#formCreateNewsTemp")); + //$("#formCreateNewsTemp").css("display", "inline"); + } + // Bug on timeline style increment due to the two part + // Still have few news at the same level (but tempory fixed + // Check the offset of last .newsFeed and compare + if(typeof(offsetLastNews) != "undefined"){ + dateLimit= + minusOff=offsetLastNews.top-10; + maxOff=offsetLastNews.top+10; + } + if(typeof(offsetLastNews) == "undefined" || (minusOff < $(".newsFeed").last().position().top && $(".newsFeed").last().position().top < maxOff)){ + $(".newsFeed").last().css("margin-top","20px"); + } + //affiche en gras les tags qui font parti de mes favoris + if(typeof myMultiTags != "undefined"){ + $.each(myMultiTags, function(key, value){ //mylog.log("binding bold "+key); + $("[data-tag-value='"+key+"'].tag").addClass("bold"); + }); + } + } +} + +function buildHtmlUrlAndActionObject(obj){ + if(typeof(obj.target) != "undefined" && typeof(obj.target.type) != "undefined") + redirectTypeUrl=obj.target.type.substring(0,obj.target.type.length-1); + else + redirectTypeUrl="news"; + + if(obj.type!="activityStream"){ + url = ''; + // Check media content is gallery image + if(typeof(obj.media) != "undefined" && typeof(obj.media.type) != "undefined" && obj.media.type=="gallery_images"){ + titleAction = "a ajouté "+obj.media.countImages+" photos"; + } + else + titleAction=""; + if(((((obj.target.type != contextParentType || isLive == true) || obj.target.id != obj.author.id) && (contextParentId != obj.target.id || isLive == true)) || typeof obj.targetIsAuthor != "undefined") && (contextParentType !="city" || obj.target.type != "citoyens")){ + if(obj.target.type == "organizations"){ + color="green"; + }else if (obj.target.type == "projects"){ + color="purple"; + }else if (obj.target.type == "citoyens"){ + color="azure"; + } + else{ + color="orange"; + } + if(obj.target.type=="pixels"){ + color="black"; + redirectUrl="pixels"; + namePostOn = "Bugs et idées"; + }else{ + if (obj.target.name.length > 25) + namePostOn = obj.target.name.substr(0,25)+"..."; + else + namePostOn = obj.target.name; + } + if(typeof obj.targetIsAuthor == "undefined") + titleAction += ' <i class="fa fa-caret-right"></i> '; + urlPostIn = '<a href="#news.index.type.'+redirectTypeUrl+'s.id.'+obj.target.id+'" class="lbh"><span class="text-'+color+'">'+namePostOn+'</span></a>'; + if(titleAction != "" && typeof obj.targetIsAuthor != "undefined") + titleAction = urlPostIn + " " + titleAction; + else + titleAction += urlPostIn; + } else { + if(typeof(obj.text) != "undefined" && obj.text.length == 0 && obj.media.length) + titleAction += "a partagé un lien"; + else + titleAction += ""; + } + } + else{ + if(obj.object.type =="citoyens"){ + redirectTypeUrl="person"; + id=obj.object.id; + urlParent=""; + } + else if(obj.object.type =="organizations"){ + redirectTypeUrl="organization"; + id=obj.object.id; + urlParent=""; + titleAction = "a créé une organisation"; + } + else if(obj.object.type =="events"){ + redirectTypeUrl="event"; + id=obj.object.id; + urlParent=""; + titleAction = "a posté un évènement"; + } + else if(obj.object.type =="projects"){ + redirectTypeUrl="project"; + id=obj.object.id; + urlParent=""; + titleAction = "a créé un projet"; + } + else if(obj.object.type =="needs"){ + redirectTypeUrl="need"; + id=obj.object.id; + urlParent=""; + titleAction = "a créé un besoin"; + } + + url = 'href="#'+redirectTypeUrl+'.detail.id.'+id+'" onclick="urlCtrl.loadByHash(\'#'+redirectTypeUrl+'.detail.id.'+id+'\')"'; + } + object=new Object; + object.url= url, + object.titleAction= titleAction; + return object; +} +function builHtmlAuthorImageObject(obj){ //mylog.log("[[[[[[[[[[[[[[[[[[[[[[[[[["); mylog.dir(obj); + var icon = "fa-rss"; + var colorIcon="blue"; + if(typeof(obj.icon) != "undefined"){ + icon = "fa-" + Sig.getIcoByType({type : obj.type}); + colorIcon = Sig.getIcoColorByType({type : obj.object.type}); + if (icon == "fa-circle") + icon = obj.icon; + } + if(obj.type != "activityStream"){ + icon = "fa-" + Sig.getIcoByType({type : obj.type}); + colorIcon = Sig.getIcoColorByType({type : obj.type}); + } + var flag = '<div class="ico-type-account"><i class="fa '+icon+' fa-'+colorIcon+'"></i></div>'; + // IMAGE AND FLAG POST BY - TARGET IF PROJECT AND EVENT - AUTHOR IF ORGA + if(obj.type == "activityStream" && typeof(obj.target) != "undefined" && obj.target.type != "citoyens"){ + if(obj.target.type=="projects") + var iconBlank="fa-lightbulb-o"; + else if (obj.target.type=="organizations") + var iconBlank="fa-group"; + if(typeof obj.target.profilThumbImageUrl !== "undefined" && obj.target.profilThumbImageUrl != ""){ + imgProfilPath = obj.target.profilThumbImageUrl; + var iconStr = "<div class='thumbnail-profil'><img height=50 width=50 src='" +baseUrl+ imgProfilPath + "'></div>" + flag ; + }else { + var iconStr = "<div class='thumbnail-profil text-center text-white'><img height=50 width=50 src='"+assetPath+"/images/thumb/default_"+obj.target.type+".png'></div>"+flag; + } + }else{ + var imgProfilPath = assetPath+"/images/news/profile_default_l.png"; + if((contextParentType == "projects" || contextParentType == "organizations") && typeof(obj.verb) != "undefined"){ + if(typeof obj.target.profilThumbImageUrl != "undefined" && obj.target.profilThumbImageUrl != ""){ + imgProfilPath = obj.target.profilThumbImageUrl; + var iconStr = "<div class='thumbnail-profil'><img height=50 width=50 src='" + baseUrl + imgProfilPath + "'></div>" + flag ; + }else { + if(obj.object.type=="organizations") + var iconStr = "<div class='thumbnail-profil text-center' style='overflow:hidden;'><i class='fa fa-group' style='font-size:50px;'></i></div>"+flag; + else + var iconStr = "<div class='thumbnail-profil'><img height=50 width=50 src='" + imgProfilPath + "'></div>" + flag ; + + } + } + else{ + if(typeof obj.targetIsAuthor != "undefined"){ + if(typeof obj.target.profilThumbImageUrl !== "undefined" && obj.target.profilThumbImageUrl != "") + imgProfilPath = baseUrl + obj.target.profilThumbImageUrl; + else + imgProfilPath = assetPath+"/images/thumb/default_"+obj.target.type+".png"; + }else{ + if(typeof obj.author.profilThumbImageUrl !== "undefined" && obj.author.profilThumbImageUrl != ""){ + imgProfilPath = baseUrl + obj.author.profilThumbImageUrl; + } + } + var iconStr = "<div class='thumbnail-profil'><img height=50 width=50 src='"+ imgProfilPath + "'></div>" + flag ; + } + } + return iconStr; +} +function actionOnNews(news,action,method,reason, comment) { + + var type="news"; + if(typeof parentTypeComment != "undefined") + type = parentTypeComment; + + params=new Object, + params.id=news.data("id"), + params.collection=type, + params.action=action; + if(reason != ""){ + params.reason=reason; + } + if(comment != ""){ + params.comment=comment; + } + if(method){ + params.unset=method; + } + mylog.log(params); + $.ajax({ + url: baseUrl+'/'+moduleId+"/action/addaction/", + data: params, + type: 'post', + global: false, + dataType: 'json', + success: + function(data) { + if(!data.result){ + toastr.error(data.msg); + } + else { + if (data.userAllreadyDidAction) { + toastr.info(data.msg); + } else { + count = parseInt(news.data("count")); + if(action=="reportAbuse"){ + toastr.success(trad["thanktosignalabuse"]); + + //to hide menu + $(".newsReport[data-id="+params.id+"]").hide(); + } + else{ + if(count < count+data.inc) + toastr.success(trad["voteaddedsuccess"]); + else + toastr.success(trad["voteremovedsuccess"]); + } + news.data( "count" , count+data.inc ); + icon = news.children(".label").children(".fa").attr("class"); + news.children(".label").html(news.data("count")+" <i class='"+icon+"'></i>"); + } + } + }, + error: + function(data) { + toastr.error("Error calling the serveur : contact your administrator."); + } + }); +} + +function voteCheckAction(idVote, newsObj) { + var voteUpCount = reportAbuseCount = voteDownCount = 0; + textUp="text-dark"; + textDown="text-dark"; + textReportAbuse="text-dark"; + + if ("undefined" != typeof newsObj.voteUp && "undefined" != typeof newsObj.voteUpCount && newsObj.voteUpCount > 0){ + voteUpCount = newsObj.voteUpCount; + if ("undefined" != typeof newsObj.voteUp[idSession]){ + textUp= "text-green"; + $(".newsVoteDown[data-id="+idVote+"]").off(); + } + } + + if ("undefined" != typeof newsObj.voteDown && "undefined" != typeof newsObj.voteDownCount && newsObj.voteDownCount > 0) { + voteDownCount = newsObj.voteDownCount; + if ("undefined" != typeof newsObj.voteDown[idSession]){ + textDown= "text-orange"; + $(".newsVoteUp[data-id="+idVote+"]").off(); + } + } + + if ("undefined" != typeof newsObj.reportAbuse && "undefined" != typeof newsObj.reportAbuseCount && newsObj.reportAbuseCount > 0) { + reportAbuseCount = newsObj.reportAbuseCount; + if ("undefined" != typeof newsObj.reportAbuse[idSession]){ + textReportAbuse= "text-red"; + $(".newsReportAbuse[data-id="+idVote+"]").off(); + } + } + voteHtml = "<a href='javascript:;' class='newsVoteUp' onclick='newsVoteUp(this, \""+idVote+"\")' data-count='"+voteUpCount+"' data-id='"+idVote+"' data-type='"+newsObj.target.type+"'><span class='label "+textUp+"'>"+voteUpCount+" <i class='fa fa-thumbs-up'></i></span></a> "+ + "<a href='javascript:;' class='newsVoteDown' onclick='newsVoteDown(this, \""+idVote+"\")' data-count='"+voteDownCount+"' data-id='"+idVote+"' data-type='"+newsObj.target.type+"'><span class='label "+textDown+"'>"+voteDownCount+" <i class='fa fa-thumbs-down'></i></span></a>"+ + "<a href='javascript:;' class='newsReportAbuse' onclick='newsReportAbuse(this, \""+idVote+"\")' data-count='"+reportAbuseCount+"' data-id='"+idVote+"' data-type='"+newsObj.target.type+"'><span class='label "+textReportAbuse+"'>"+reportAbuseCount+" <i class='fa fa-flag'></i></span></a>"; + return voteHtml; +} + +function manageModeContext(id) { + mylog.log("manageModeContext"); + listXeditables = [/*'#newsContent'+id,*/ '#newsTitle'+id]; + if (mode == "view") { + //$('.editable-project').editable('toggleDisabled'); + $.each(listXeditables, function(i,value) { + $(value).editable('toggleDisabled'); + }); + //$("#btn-update-geopos").removeClass("hidden"); + } else if (mode == "update") { + // Add a pk to make the update process available on X-Editable + $('.editable-news').editable('option', 'pk', id); + $.each(listXeditables, function(i,value) { + $(value).editable('option', 'pk', id); + $(value).editable('toggleDisabled'); + }); + } +} + +function initXEditable() { + mylog.log("initXEditable"); + $.fn.editable.defaults.mode = 'inline'; + $('.editable-news').editable({ + url: baseUrl+"/"+moduleId+"/news/updatefield", //this url will not be used for creating new job, it is only for update + textarea: { + html: true, + video: true, + image: true + }, + showbuttons: 'bottom', + success : function(data) { + if(data.result) { + toastr.success(data.msg); + mylog.log(data); + } + else{ + toastr.error(data.msg); + } + } + }); + //make jobTitle required + $('.newsTitle').editable('option', 'validate', function(v) { + if(!v) return 'Required field!'; + }); + + // $('.newsContent').editable({ + // url: baseUrl+"/"+moduleId+"/news/updatefield", + // showbuttons: 'bottom', + // wysihtml5: { + // html: true, + // video: true, + // image: true + // }, + // success : function(data) { + // if(data.result) + // toastr.success(data.msg); + // else + // toastr.error(data.msg); + // }, + // }); +} + +function showComments(id){ + // $.blockUI({ + // message : '<div class=""><h2 class="homestead text-dark" style="padding:40px;"><i class="fa fa-spin fa-refresh"></i> Chargement des commentaires ...</h2></div>', + // onOverlayClick: $.unblockUI, + // css: {"text-align": "left", "cursor":"default"} + // }); + + + if(!$("#commentContent"+id).hasClass("hidden")){ + $(".commentContent").html(""); + $(".commentContent").removeClass("hidden"); + + $('#commentContent'+id).html('<div class="text-dark margin-bottom-10"><i class="fa fa-spin fa-refresh"></i> Chargement des commentaires ...</div>'); + getAjax('#commentContent'+id ,baseUrl+'/'+moduleId+"/comment/index/type/news/id/"+id,function(){ + + },"html"); + }else{ + $("#commentContent"+id).removeClass("hidden"); + mylog.log("scroll TO : ", $('#newsFeed'+id).position().top); + + } +} +function newsVoteUp($this, id){ + if($(".newsVoteDown[data-id='"+id+"']").children(".label").hasClass("text-orange")) + toastr.info(trad["removeopinionbefore"]); + else{ + //toastr.info('This vote has been well registred'); + if($($this).children(".label").hasClass("text-green")){ + method = true; + } + else{ + method = false; + } + actionOnNews($($this),'voteUp',method); + disableOtherNewsAction($($this), '.newsVoteUp', method); + count = parseInt($($this).data("count")); + $($this).children(".label").html($($this).data("count")+" <i class='fa fa-thumbs-up'></i>"); + } +} +function newsVoteDown($this, id){ + if($(".newsVoteUp[data-id='"+$($this).data("id")+"']").children(".label").hasClass("text-green")) + toastr.info(trad["removeopinionbefore"]); + else{ + //toastr.info('This vote has been well registred'); + if($($this).children(".label").hasClass("text-orange")){ + method = true; + } + else{ + method = false; + } + actionOnNews($($this),'voteDown',method); + disableOtherNewsAction($($this), '.newsVoteDown', method); + $($this).children(".label").html($($this).data("count")+" <i class='fa fa-thumbs-down'></i>"); + } +} +function newsReportAbuse($this, id){ + + //toastr.info('This vote has been well registred'); + if($($this).children(".label").hasClass("text-red")){ + method = true; + } + else{ + method = false; + } + reportNewsAbuse($($this),'reportAbuse',method); + + + //disableOtherAction($($this), '.commentReportAbuse', method); + $($this).children(".label").html($($this).data("count")+" <i class='fa fa-flag'></i>"); +} + +function reportNewsAbuse($this,action, method) { + // mylog.log(contextId); + if (method){ + toastr.info(trad["alreadyreportedabuse"]+" !"); + } + else{ + var message = "<div id='reason' class='radio'>"+ + "<label><input type='radio' name='reason' value='Propos malveillants' checked>Propos malveillants</label><br>"+ + "<label><input type='radio' name='reason' value='Incitation et glorification des conduites agressives'>Incitation et glorification des conduites agressives</label><br>"+ + "<label><input type='radio' name='reason' value='Affichage de contenu gore et trash'>Affichage de contenu gore et trash</label><br>"+ + "<label><input type='radio' name='reason' value='Contenu pornographique'>Contenu pornographique</label><br>"+ + "<label><input type='radio' name='reason' value='Liens fallacieux ou frauduleux'>Liens fallacieux ou frauduleux</label><br>"+ + "<label><input type='radio' name='reason' value='Mention de source erronée'>Mention de source erronée</label><br>"+ + "<label><input type='radio' name='reason' value='Violations des droits auteur'>Violations des droits d\'auteur</label><br>"+ + "<input type='text' class='form-control' id='reasonComment' placeholder='Laisser un commentaire...'/><br>"+ + "</div>"; + var boxNews = bootbox.dialog({ + message: message, + title: trad["askreasonreportabuse"], + buttons: { + annuler: { + label: "Annuler", + className: "btn-default", + callback: function() { + mylog.log("Annuler"); + } + }, + danger: { + label: "Déclarer cet abus", + className: "btn-primary", + callback: function() { + // var reason = $('#reason').val(); + var reason = $("#reason input[type='radio']:checked").val(); + var reasonComment = $("#reasonComment").val(); + actionOnNews($($this),action,method, reason, reasonComment); + $this.children(".label").removeClass("text-dark").addClass("text-red"); + } + }, + } + }); + boxNews.on("shown.bs.modal", function() { + $.unblockUI(); + }); + } +} + +function disableOtherNewsAction($this,action,method){ + if(method){ + if (action == ".newsVoteUp") + $this.children(".label").removeClass("text-green").addClass("text-dark"); + if (action == ".newsVoteDown") + $this.children(".label").removeClass("text-orange").addClass("text-dark"); + //if (action == ".commentReportAbuse") + // $this.children(".label").removeClass("text-red").addClass("text-dark"); + } + else{ + if (action == ".newsVoteUp") + $this.children(".label").removeClass("text-dark").addClass("text-green"); + if (action == ".newsVoteDown") + $this.children(".label").removeClass("text-dark").addClass("text-orange"); + //if (action == ".commentReportAbuse") + // $this.children(".label").removeClass("text-dark").addClass("text-red"); + } +} +function blankNews(id){ +/* $.blockUI({ + message : '<div class="newsContent"><h2 class="homestead text-dark" style="padding:40px;"><i class="fa fa-spin fa-refresh"></i> Chargement de l\'actualité ...</h2></div>', + onOverlayClick: $.unblockUI, + css: {"text-align": "left", "cursor":"default"} + }); + getAjax('.newsContent',baseUrl+'/'+moduleId+"/news/detail/id/"+id,function(){ + },"html");*/ + window.open(baseUrl+'/#news.detail.id.'+id,'_blank'); +} +function getMentionLabel(news){ + countMentions = news.mentions.length; + target=""; + mentionMe=false; + $.each(news.mentions, function( index, value ){ + if(value.id == idSession){ + target = news.author.name+" vous a cité dans sa publication"; + mentionMe=true; + } + if(value.id == contextParentId && value.id != idSession){ + target = news.author.name+" a mentionné "+value.name+" dans son post"; + + } + if(typeof(parent.links.memberOf) != "undefined" && typeof(parent.links.memberOf[value["id"]]) != "undefined"){ + if(mentionMe) + target = news.author.name+" vous a mentionné avec "+value.name+" dans son post"; + else + target = news.author.name+" a mentionné "+value.name+" dans son post"; + } + }); + return target; +} +function addMentionInText(textNews,mentions){ + $.each(mentions, function( index, value ){ + array = textNews.split(value.value); + mylog.log(array); + if(value.type == "organizations") + controler = "organization"; + else + controler = "person"; + textNews=array[0]+ + "<span class='lbh' onclick='urlCtrl.loadByHash(\"#page.type."+value.type+".id."+value.id+"\")' onmouseover='$(this).addClass(\"text-blue\");this.style.cursor=\"pointer\";' onmouseout='$(this).removeClass(\"text-blue\");' style='color: #719FAB;'>"+ + value.name+ + "</span>"+ + array[1]; + + }); + return textNews; +} \ No newline at end of file diff --git a/assets/js/react-0.13.0/README.md b/assets/js/react-0.13.0/README.md new file mode 100755 index 0000000000000000000000000000000000000000..796946030a65b492014d0d921972df1b90a9c692 --- /dev/null +++ b/assets/js/react-0.13.0/README.md @@ -0,0 +1,105 @@ +# [React](http://facebook.github.io/react) [](https://travis-ci.org/facebook/react) + +React is a JavaScript library for building user interfaces. + +* **Just the UI:** Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project. +* **Virtual DOM:** React uses a *virtual DOM* diff implementation for ultra-high performance. It can also render on the server using Node.js — no heavy browser DOM required. +* **Data flow:** React implements one-way reactive data flow which reduces boilerplate and is easier to reason about than traditional data binding. + +[Learn how to use React in your own project.](http://facebook.github.io/react/docs/getting-started.html) + +## Examples + +We have several examples [on the website](http://facebook.github.io/react/). Here is the first one to get you started: + +```js +var HelloMessage = React.createClass({ + render: function() { + return <div>Hello {this.props.name}</div>; + } +}); + +React.render( + <HelloMessage name="John" />, + document.getElementById('container') +); +``` + +This example will render "Hello John" into a container on the page. + +You'll notice that we used an HTML-like syntax; [we call it JSX](http://facebook.github.io/react/docs/jsx-in-depth.html). JSX is not required to use React, but it makes code more readable, and writing it feels like writing HTML. A simple transform is included with React that allows converting JSX into native JavaScript for browsers to digest. + +## Installation + +The fastest way to get started is to serve JavaScript from the CDN (also available on [cdnjs](https://cdnjs.com/libraries/react) and [jsdelivr](http://www.jsdelivr.com/#!react)): + +```html +<!-- The core React library --> +<script src="http://fb.me/react-0.13.0.js"></script> +<!-- In-browser JSX transformer, remove when pre-compiling JSX. --> +<script src="http://fb.me/JSXTransformer-0.13.0.js"></script> +``` + +We've also built a [starter kit](http://facebook.github.io/react/downloads/react-0.13.0.zip) which might be useful if this is your first time using React. It includes a webpage with an example of using React with live code. + +If you'd like to use [bower](http://bower.io), it's as easy as: + +```sh +bower install --save react +``` + +## Contribute + +The main purpose of this repository is to continue to evolve React core, making it faster and easier to use. If you're interested in helping with that, then keep reading. If you're not interested in helping right now that's ok too. :) Any feedback you have about using React would be greatly appreciated. + +### Building Your Copy of React + +The process to build `react.js` is built entirely on top of node.js, using many libraries you may already be familiar with. + +#### Prerequisites + +* You have `node` installed at v0.10.0+ (it might work at lower versions, we just haven't tested). +* You are familiar with `npm` and know whether or not you need to use `sudo` when installing packages globally. +* You are familiar with `git`. + +#### Build + +Once you have the repository cloned, building a copy of `react.js` is really easy. + +```sh +# grunt-cli is needed by grunt; you might have this installed already +npm install -g grunt-cli +npm install +grunt build +``` + +At this point, you should now have a `build/` directory populated with everything you need to use React. The examples should all work. + +### Grunt + +We use grunt to automate many tasks. Run `grunt -h` to see a mostly complete listing. The important ones to know: + +```sh +# Build and run tests with PhantomJS +grunt test +# Build and run tests in your browser +grunt test --debug +# For speed, you can use fasttest and add --filter to only run one test +grunt fasttest --filter=ReactIdentity +# Lint the code with ESLint +grunt lint +# Wipe out build directory +grunt clean +``` + +### License + +React is [BSD licensed](./LICENSE). We also provide an additional [patent grant](./PATENTS). + +React documentation is [Creative Commons licensed](./LICENSE-docs). + +Examples provided in this repository and in the documentation are [separately licensed](./LICENSE-examples). + +### More… + +There's only so much we can cram in here. To read more about the community and guidelines for submitting pull requests, please read the [Contributing document](CONTRIBUTING.md). diff --git a/assets/js/react-0.13.0/build/JSXTransformer.js b/assets/js/react-0.13.0/build/JSXTransformer.js new file mode 100755 index 0000000000000000000000000000000000000000..63608d408e581affca4333e7fc446a3ca87fc634 --- /dev/null +++ b/assets/js/react-0.13.0/build/JSXTransformer.js @@ -0,0 +1,15924 @@ +/** + * JSXTransformer v0.13.0 + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.JSXTransformer = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/* jshint browser: true */ +/* jslint evil: true */ +/*eslint-disable no-eval */ +/*eslint-disable block-scoped-var */ + +'use strict'; + +var ReactTools = _dereq_('../main'); +var inlineSourceMap = _dereq_('./inline-source-map'); + +var headEl; +var dummyAnchor; +var inlineScriptCount = 0; + +// The source-map library relies on Object.defineProperty, but IE8 doesn't +// support it fully even with es5-sham. Indeed, es5-sham's defineProperty +// throws when Object.prototype.__defineGetter__ is missing, so we skip building +// the source map in that case. +var supportsAccessors = Object.prototype.hasOwnProperty('__defineGetter__'); + +/** + * Run provided code through jstransform. + * + * @param {string} source Original source code + * @param {object?} options Options to pass to jstransform + * @return {object} object as returned from jstransform + */ +function transformReact(source, options) { + options = options || {}; + + // Force the sourcemaps option manually. We don't want to use it if it will + // break (see above note about supportsAccessors). We'll only override the + // value here if sourceMap was specified and is truthy. This guarantees that + // we won't override any user intent (since this method is exposed publicly). + if (options.sourceMap) { + options.sourceMap = supportsAccessors; + } + + // Otherwise just pass all options straight through to react-tools. + return ReactTools.transformWithDetails(source, options); +} + +/** + * Eval provided source after transforming it. + * + * @param {string} source Original source code + * @param {object?} options Options to pass to jstransform + */ +function exec(source, options) { + return eval(transformReact(source, options).code); +} + +/** + * This method returns a nicely formated line of code pointing to the exact + * location of the error `e`. The line is limited in size so big lines of code + * are also shown in a readable way. + * + * Example: + * ... x', overflow:'scroll'}} id={} onScroll={this.scroll} class=" ... + * ^ + * + * @param {string} code The full string of code + * @param {Error} e The error being thrown + * @return {string} formatted message + * @internal + */ +function createSourceCodeErrorMessage(code, e) { + var sourceLines = code.split('\n'); + // e.lineNumber is non-standard so we can't depend on its availability. If + // we're in a browser where it isn't supported, don't even bother trying to + // format anything. We may also hit a case where the line number is reported + // incorrectly and is outside the bounds of the actual code. Handle that too. + if (!e.lineNumber || e.lineNumber > sourceLines.length) { + return ''; + } + var erroneousLine = sourceLines[e.lineNumber - 1]; + + // Removes any leading indenting spaces and gets the number of + // chars indenting the `erroneousLine` + var indentation = 0; + erroneousLine = erroneousLine.replace(/^\s+/, function(leadingSpaces) { + indentation = leadingSpaces.length; + return ''; + }); + + // Defines the number of characters that are going to show + // before and after the erroneous code + var LIMIT = 30; + var errorColumn = e.column - indentation; + + if (errorColumn > LIMIT) { + erroneousLine = '... ' + erroneousLine.slice(errorColumn - LIMIT); + errorColumn = 4 + LIMIT; + } + if (erroneousLine.length - errorColumn > LIMIT) { + erroneousLine = erroneousLine.slice(0, errorColumn + LIMIT) + ' ...'; + } + var message = '\n\n' + erroneousLine + '\n'; + message += new Array(errorColumn - 1).join(' ') + '^'; + return message; +} + +/** + * Actually transform the code. + * + * @param {string} code + * @param {string?} url + * @param {object?} options + * @return {string} The transformed code. + * @internal + */ +function transformCode(code, url, options) { + try { + var transformed = transformReact(code, options); + } catch(e) { + e.message += '\n at '; + if (url) { + if ('fileName' in e) { + // We set `fileName` if it's supported by this error object and + // a `url` was provided. + // The error will correctly point to `url` in Firefox. + e.fileName = url; + } + e.message += url + ':' + e.lineNumber + ':' + e.columnNumber; + } else { + e.message += location.href; + } + e.message += createSourceCodeErrorMessage(code, e); + throw e; + } + + if (!transformed.sourceMap) { + return transformed.code; + } + + var source; + if (url == null) { + source = 'Inline JSX script'; + inlineScriptCount++; + if (inlineScriptCount > 1) { + source += ' (' + inlineScriptCount + ')'; + } + } else if (dummyAnchor) { + // Firefox has problems when the sourcemap source is a proper URL with a + // protocol and hostname, so use the pathname. We could use just the + // filename, but hopefully using the full path will prevent potential + // issues where the same filename exists in multiple directories. + dummyAnchor.href = url; + source = dummyAnchor.pathname.substr(1); + } + + return ( + transformed.code + + '\n' + + inlineSourceMap(transformed.sourceMap, code, source) + ); +} + + +/** + * Appends a script element at the end of the <head> with the content of code, + * after transforming it. + * + * @param {string} code The original source code + * @param {string?} url Where the code came from. null if inline + * @param {object?} options Options to pass to jstransform + * @internal + */ +function run(code, url, options) { + var scriptEl = document.createElement('script'); + scriptEl.text = transformCode(code, url, options); + headEl.appendChild(scriptEl); +} + +/** + * Load script from the provided url and pass the content to the callback. + * + * @param {string} url The location of the script src + * @param {function} callback Function to call with the content of url + * @internal + */ +function load(url, successCallback, errorCallback) { + var xhr; + xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') + : new XMLHttpRequest(); + + // async, however scripts will be executed in the order they are in the + // DOM to mirror normal script loading. + xhr.open('GET', url, true); + if ('overrideMimeType' in xhr) { + xhr.overrideMimeType('text/plain'); + } + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + if (xhr.status === 0 || xhr.status === 200) { + successCallback(xhr.responseText); + } else { + errorCallback(); + throw new Error('Could not load ' + url); + } + } + }; + return xhr.send(null); +} + +/** + * Loop over provided script tags and get the content, via innerHTML if an + * inline script, or by using XHR. Transforms are applied if needed. The scripts + * are executed in the order they are found on the page. + * + * @param {array} scripts The <script> elements to load and run. + * @internal + */ +function loadScripts(scripts) { + var result = []; + var count = scripts.length; + + function check() { + var script, i; + + for (i = 0; i < count; i++) { + script = result[i]; + + if (script.loaded && !script.executed) { + script.executed = true; + run(script.content, script.url, script.options); + } else if (!script.loaded && !script.error && !script.async) { + break; + } + } + } + + scripts.forEach(function(script, i) { + var options = { + sourceMap: true + }; + if (/;harmony=true(;|$)/.test(script.type)) { + options.harmony = true; + } + if (/;stripTypes=true(;|$)/.test(script.type)) { + options.stripTypes = true; + } + + // script.async is always true for non-javascript script tags + var async = script.hasAttribute('async'); + + if (script.src) { + result[i] = { + async: async, + error: false, + executed: false, + content: null, + loaded: false, + url: script.src, + options: options + }; + + load(script.src, function(content) { + result[i].loaded = true; + result[i].content = content; + check(); + }, function() { + result[i].error = true; + check(); + }); + } else { + result[i] = { + async: async, + error: false, + executed: false, + content: script.innerHTML, + loaded: true, + url: null, + options: options + }; + } + }); + + check(); +} + +/** + * Find and run all script tags with type="text/jsx". + * + * @internal + */ +function runScripts() { + var scripts = document.getElementsByTagName('script'); + + // Array.prototype.slice cannot be used on NodeList on IE8 + var jsxScripts = []; + for (var i = 0; i < scripts.length; i++) { + if (/^text\/jsx(;|$)/.test(scripts.item(i).type)) { + jsxScripts.push(scripts.item(i)); + } + } + + if (jsxScripts.length < 1) { + return; + } + + console.warn( + 'You are using the in-browser JSX transformer. Be sure to precompile ' + + 'your JSX for production - ' + + 'http://facebook.github.io/react/docs/tooling-integration.html#jsx' + ); + + loadScripts(jsxScripts); +} + +// Listen for load event if we're in a browser and then kick off finding and +// running of scripts. +if (typeof window !== 'undefined' && window !== null) { + headEl = document.getElementsByTagName('head')[0]; + dummyAnchor = document.createElement('a'); + + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', runScripts, false); + } else { + window.attachEvent('onload', runScripts); + } +} + +module.exports = { + transform: transformReact, + exec: exec +}; + +},{"../main":2,"./inline-source-map":41}],2:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; +/*eslint-disable no-undef*/ +var visitors = _dereq_('./vendor/fbtransform/visitors'); +var transform = _dereq_('jstransform').transform; +var typesSyntax = _dereq_('jstransform/visitors/type-syntax'); +var inlineSourceMap = _dereq_('./vendor/inline-source-map'); + +module.exports = { + transform: function(input, options) { + options = processOptions(options); + var output = innerTransform(input, options); + var result = output.code; + if (options.sourceMap) { + var map = inlineSourceMap( + output.sourceMap, + input, + options.filename + ); + result += '\n' + map; + } + return result; + }, + transformWithDetails: function(input, options) { + options = processOptions(options); + var output = innerTransform(input, options); + var result = {}; + result.code = output.code; + if (options.sourceMap) { + result.sourceMap = output.sourceMap.toJSON(); + } + if (options.filename) { + result.sourceMap.sources = [options.filename]; + } + return result; + } +}; + +/** + * Only copy the values that we need. We'll do some preprocessing to account for + * converting command line flags to options that jstransform can actually use. + */ +function processOptions(opts) { + opts = opts || {}; + var options = {}; + + options.harmony = opts.harmony; + options.stripTypes = opts.stripTypes; + options.sourceMap = opts.sourceMap; + options.filename = opts.sourceFilename; + + if (opts.es6module) { + options.sourceType = 'module'; + } + if (opts.nonStrictEs6Module) { + options.sourceType = 'nonStrict6Module'; + } + + // Instead of doing any fancy validation, only look for 'es3'. If we have + // that, then use it. Otherwise use 'es5'. + options.es3 = opts.target === 'es3'; + options.es5 = !options.es3; + + return options; +} + +function innerTransform(input, options) { + var visitorSets = ['react']; + if (options.harmony) { + visitorSets.push('harmony'); + } + + if (options.es3) { + visitorSets.push('es3'); + } + + if (options.stripTypes) { + // Stripping types needs to happen before the other transforms + // unfortunately, due to bad interactions. For example, + // es6-rest-param-visitors conflict with stripping rest param type + // annotation + input = transform(typesSyntax.visitorList, input, options).code; + } + + var visitorList = visitors.getVisitorsBySet(visitorSets); + return transform(visitorList, input, options); +} + +},{"./vendor/fbtransform/visitors":40,"./vendor/inline-source-map":41,"jstransform":22,"jstransform/visitors/type-syntax":36}],3:[function(_dereq_,module,exports){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> + * @license MIT + */ + +var base64 = _dereq_('base64-js') +var ieee754 = _dereq_('ieee754') +var isArray = _dereq_('is-array') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 // not used by this implementation + +var kMaxLength = 0x3fffffff +var rootParent = {} + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Use Object implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * Note: + * + * - Implementation must support adding new properties to `Uint8Array` instances. + * Firefox 4-29 lacked support, fixed in Firefox 30+. + * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. + * + * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. + * + * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of + * incorrect length in some situations. + * + * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they will + * get the Object implementation, which is slower but will work correctly. + */ +Buffer.TYPED_ARRAY_SUPPORT = (function () { + try { + var buf = new ArrayBuffer(0) + var arr = new Uint8Array(buf) + arr.foo = function () { return 42 } + return arr.foo() === 42 && // typed array instances can be augmented + typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` + new Uint8Array(1).subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` + } catch (e) { + return false + } +})() + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + */ +function Buffer (subject, encoding, noZero) { + if (!(this instanceof Buffer)) return new Buffer(subject, encoding, noZero) + + var type = typeof subject + var length + + if (type === 'number') { + length = +subject + } else if (type === 'string') { + length = Buffer.byteLength(subject, encoding) + } else if (type === 'object' && subject !== null) { + // assume object is array-like + if (subject.type === 'Buffer' && isArray(subject.data)) subject = subject.data + length = +subject.length + } else { + throw new TypeError('must start with number, buffer, array or string') + } + + if (length > kMaxLength) { + throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x' + + kMaxLength.toString(16) + ' bytes') + } + + if (length < 0) length = 0 + else length >>>= 0 // coerce to uint32 + + var self = this + if (Buffer.TYPED_ARRAY_SUPPORT) { + // Preferred: Return an augmented `Uint8Array` instance for best performance + /*eslint-disable consistent-this */ + self = Buffer._augment(new Uint8Array(length)) + /*eslint-enable consistent-this */ + } else { + // Fallback: Return THIS instance of Buffer (created by `new`) + self.length = length + self._isBuffer = true + } + + var i + if (Buffer.TYPED_ARRAY_SUPPORT && typeof subject.byteLength === 'number') { + // Speed optimization -- use set if we're copying from a typed array + self._set(subject) + } else if (isArrayish(subject)) { + // Treat array-ish objects as a byte array + if (Buffer.isBuffer(subject)) { + for (i = 0; i < length; i++) { + self[i] = subject.readUInt8(i) + } + } else { + for (i = 0; i < length; i++) { + self[i] = ((subject[i] % 256) + 256) % 256 + } + } + } else if (type === 'string') { + self.write(subject, 0, encoding) + } else if (type === 'number' && !Buffer.TYPED_ARRAY_SUPPORT && !noZero) { + for (i = 0; i < length; i++) { + self[i] = 0 + } + } + + if (length > 0 && length <= Buffer.poolSize) self.parent = rootParent + + return self +} + +function SlowBuffer (subject, encoding, noZero) { + if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding, noZero) + + var buf = new Buffer(subject, encoding, noZero) + delete buf.parent + return buf +} + +Buffer.isBuffer = function isBuffer (b) { + return !!(b != null && b._isBuffer) +} + +Buffer.compare = function compare (a, b) { + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError('Arguments must be Buffers') + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {} + if (i !== len) { + x = a[i] + y = b[i] + } + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'raw': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, totalLength) { + if (!isArray(list)) throw new TypeError('Usage: Buffer.concat(list[, length])') + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + var i + if (totalLength === undefined) { + totalLength = 0 + for (i = 0; i < list.length; i++) { + totalLength += list[i].length + } + } + + var buf = new Buffer(totalLength) + var pos = 0 + for (i = 0; i < list.length; i++) { + var item = list[i] + item.copy(buf, pos) + pos += item.length + } + return buf +} + +Buffer.byteLength = function byteLength (str, encoding) { + var ret + str = str + '' + switch (encoding || 'utf8') { + case 'ascii': + case 'binary': + case 'raw': + ret = str.length + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = str.length * 2 + break + case 'hex': + ret = str.length >>> 1 + break + case 'utf8': + case 'utf-8': + ret = utf8ToBytes(str).length + break + case 'base64': + ret = base64ToBytes(str).length + break + default: + ret = str.length + } + return ret +} + +// pre-set for values that may exist in the future +Buffer.prototype.length = undefined +Buffer.prototype.parent = undefined + +// toString(encoding, start=0, end=buffer.length) +Buffer.prototype.toString = function toString (encoding, start, end) { + var loweredCase = false + + start = start >>> 0 + end = end === undefined || end === Infinity ? this.length : end >>> 0 + + if (!encoding) encoding = 'utf8' + if (start < 0) start = 0 + if (end > this.length) end = this.length + if (end <= start) return '' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'binary': + return binarySlice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + if (this.length > 0) { + str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') + if (this.length > max) str += ' ... ' + } + return '<Buffer ' + str + '>' +} + +Buffer.prototype.compare = function compare (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return 0 + return Buffer.compare(this, b) +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset) { + if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff + else if (byteOffset < -0x80000000) byteOffset = -0x80000000 + byteOffset >>= 0 + + if (this.length === 0) return -1 + if (byteOffset >= this.length) return -1 + + // Negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) + + if (typeof val === 'string') { + if (val.length === 0) return -1 // special case: looking for empty string always fails + return String.prototype.indexOf.call(this, val, byteOffset) + } + if (Buffer.isBuffer(val)) { + return arrayIndexOf(this, val, byteOffset) + } + if (typeof val === 'number') { + if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { + return Uint8Array.prototype.indexOf.call(this, val, byteOffset) + } + return arrayIndexOf(this, [ val ], byteOffset) + } + + function arrayIndexOf (arr, val, byteOffset) { + var foundIndex = -1 + for (var i = 0; byteOffset + i < arr.length; i++) { + if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex + } else { + foundIndex = -1 + } + } + return -1 + } + + throw new TypeError('val must be string, number or Buffer') +} + +// `get` will be removed in Node 0.13+ +Buffer.prototype.get = function get (offset) { + console.log('.get() is deprecated. Access using array indexes instead.') + return this.readUInt8(offset) +} + +// `set` will be removed in Node 0.13+ +Buffer.prototype.set = function set (v, offset) { + console.log('.set() is deprecated. Access using array indexes instead.') + return this.writeUInt8(v, offset) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) throw new Error('Invalid hex string') + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(parsed)) throw new Error('Invalid hex string') + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + var charsWritten = blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) + return charsWritten +} + +function asciiWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) + return charsWritten +} + +function binaryWrite (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) + return charsWritten +} + +function utf16leWrite (buf, string, offset, length) { + var charsWritten = blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) + return charsWritten +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length + length = undefined + } + } else { // legacy + var swap = encoding + encoding = offset + offset = length + length = swap + } + + offset = Number(offset) || 0 + + if (length < 0 || offset < 0 || offset > this.length) { + throw new RangeError('attempt to write outside buffer bounds') + } + + var remaining = this.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + encoding = String(encoding || 'utf8').toLowerCase() + + var ret + switch (encoding) { + case 'hex': + ret = hexWrite(this, string, offset, length) + break + case 'utf8': + case 'utf-8': + ret = utf8Write(this, string, offset, length) + break + case 'ascii': + ret = asciiWrite(this, string, offset, length) + break + case 'binary': + ret = binaryWrite(this, string, offset, length) + break + case 'base64': + ret = base64Write(this, string, offset, length) + break + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + ret = utf16leWrite(this, string, offset, length) + break + default: + throw new TypeError('Unknown encoding: ' + encoding) + } + return ret +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function binarySlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf + if (Buffer.TYPED_ARRAY_SUPPORT) { + newBuf = Buffer._augment(this.subarray(start, end)) + } else { + var sliceLen = end - start + newBuf = new Buffer(sliceLen, undefined, true) + for (var i = 0; i < sliceLen; i++) { + newBuf[i] = this[i + start] + } + } + + if (newBuf.length) newBuf.parent = this.parent || this + + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) >>> 0 & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) >>> 0 & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + this[offset] = value + return offset + 1 +} + +function objectWriteUInt16 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { + buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> + (littleEndian ? i : 1 - i) * 8 + } +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +function objectWriteUInt32 (buf, value, offset, littleEndian) { + if (value < 0) value = 0xffffffff + value + 1 + for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { + buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff + } +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = value + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) + } + + var i = 0 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkInt( + this, value, offset, byteLength, + Math.pow(2, 8 * byteLength - 1) - 1, + -Math.pow(2, 8 * byteLength - 1) + ) + } + + var i = byteLength - 1 + var mul = 1 + var sub = value < 0 ? 1 : 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) + if (value < 0) value = 0xff + value + 1 + this[offset] = value + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + } else { + objectWriteUInt16(this, value, offset, true) + } + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 8) + this[offset + 1] = value + } else { + objectWriteUInt16(this, value, offset, false) + } + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = value + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + } else { + objectWriteUInt32(this, value, offset, true) + } + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + if (Buffer.TYPED_ARRAY_SUPPORT) { + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = value + } else { + objectWriteUInt32(this, value, offset, false) + } + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (value > max || value < min) throw new RangeError('value is out of bounds') + if (offset + ext > buf.length) throw new RangeError('index out of range') + if (offset < 0) throw new RangeError('index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, target_start, start, end) { + var self = this // source + + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (target_start >= target.length) target_start = target.length + if (!target_start) target_start = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || self.length === 0) return 0 + + // Fatal error conditions + if (target_start < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= self.length) throw new RangeError('sourceStart out of bounds') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - target_start < end - start) { + end = target.length - target_start + start + } + + var len = end - start + + if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { + for (var i = 0; i < len; i++) { + target[i + target_start] = this[i + start] + } + } else { + target._set(this.subarray(start, start + len), target_start) + } + + return len +} + +// fill(value, start=0, end=buffer.length) +Buffer.prototype.fill = function fill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (end < start) throw new RangeError('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') + if (end < 0 || end > this.length) throw new RangeError('end out of bounds') + + var i + if (typeof value === 'number') { + for (i = start; i < end; i++) { + this[i] = value + } + } else { + var bytes = utf8ToBytes(value.toString()) + var len = bytes.length + for (i = start; i < end; i++) { + this[i] = bytes[i % len] + } + } + + return this +} + +/** + * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. + * Added in Node 0.12. Only available in browsers that support ArrayBuffer. + */ +Buffer.prototype.toArrayBuffer = function toArrayBuffer () { + if (typeof Uint8Array !== 'undefined') { + if (Buffer.TYPED_ARRAY_SUPPORT) { + return (new Buffer(this)).buffer + } else { + var buf = new Uint8Array(this.length) + for (var i = 0, len = buf.length; i < len; i += 1) { + buf[i] = this[i] + } + return buf.buffer + } + } else { + throw new TypeError('Buffer.toArrayBuffer not supported in this browser') + } +} + +// HELPER FUNCTIONS +// ================ + +var BP = Buffer.prototype + +/** + * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods + */ +Buffer._augment = function _augment (arr) { + arr.constructor = Buffer + arr._isBuffer = true + + // save reference to original Uint8Array get/set methods before overwriting + arr._get = arr.get + arr._set = arr.set + + // deprecated, will be removed in node 0.13+ + arr.get = BP.get + arr.set = BP.set + + arr.write = BP.write + arr.toString = BP.toString + arr.toLocaleString = BP.toString + arr.toJSON = BP.toJSON + arr.equals = BP.equals + arr.compare = BP.compare + arr.indexOf = BP.indexOf + arr.copy = BP.copy + arr.slice = BP.slice + arr.readUIntLE = BP.readUIntLE + arr.readUIntBE = BP.readUIntBE + arr.readUInt8 = BP.readUInt8 + arr.readUInt16LE = BP.readUInt16LE + arr.readUInt16BE = BP.readUInt16BE + arr.readUInt32LE = BP.readUInt32LE + arr.readUInt32BE = BP.readUInt32BE + arr.readIntLE = BP.readIntLE + arr.readIntBE = BP.readIntBE + arr.readInt8 = BP.readInt8 + arr.readInt16LE = BP.readInt16LE + arr.readInt16BE = BP.readInt16BE + arr.readInt32LE = BP.readInt32LE + arr.readInt32BE = BP.readInt32BE + arr.readFloatLE = BP.readFloatLE + arr.readFloatBE = BP.readFloatBE + arr.readDoubleLE = BP.readDoubleLE + arr.readDoubleBE = BP.readDoubleBE + arr.writeUInt8 = BP.writeUInt8 + arr.writeUIntLE = BP.writeUIntLE + arr.writeUIntBE = BP.writeUIntBE + arr.writeUInt16LE = BP.writeUInt16LE + arr.writeUInt16BE = BP.writeUInt16BE + arr.writeUInt32LE = BP.writeUInt32LE + arr.writeUInt32BE = BP.writeUInt32BE + arr.writeIntLE = BP.writeIntLE + arr.writeIntBE = BP.writeIntBE + arr.writeInt8 = BP.writeInt8 + arr.writeInt16LE = BP.writeInt16LE + arr.writeInt16BE = BP.writeInt16BE + arr.writeInt32LE = BP.writeInt32LE + arr.writeInt32BE = BP.writeInt32BE + arr.writeFloatLE = BP.writeFloatLE + arr.writeFloatBE = BP.writeFloatBE + arr.writeDoubleLE = BP.writeDoubleLE + arr.writeDoubleBE = BP.writeDoubleBE + arr.fill = BP.fill + arr.inspect = BP.inspect + arr.toArrayBuffer = BP.toArrayBuffer + + return arr +} + +var INVALID_BASE64_RE = /[^+\/0-9A-z\-]/g + +function base64clean (str) { + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = stringtrim(str).replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +function isArrayish (subject) { + return isArray(subject) || Buffer.isBuffer(subject) || + subject && typeof subject === 'object' && + typeof subject.length === 'number' +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + var i = 0 + + for (; i < length; i++) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (leadSurrogate) { + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } else { + // valid surrogate pair + codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 + leadSurrogate = null + } + } else { + // no lead yet + + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else { + // valid lead + leadSurrogate = codePoint + continue + } + } + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = null + } + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x200000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; i++) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; i++) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +},{"base64-js":4,"ieee754":5,"is-array":6}],4:[function(_dereq_,module,exports){ +var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +;(function (exports) { + 'use strict'; + + var Arr = (typeof Uint8Array !== 'undefined') + ? Uint8Array + : Array + + var PLUS = '+'.charCodeAt(0) + var SLASH = '/'.charCodeAt(0) + var NUMBER = '0'.charCodeAt(0) + var LOWER = 'a'.charCodeAt(0) + var UPPER = 'A'.charCodeAt(0) + var PLUS_URL_SAFE = '-'.charCodeAt(0) + var SLASH_URL_SAFE = '_'.charCodeAt(0) + + function decode (elt) { + var code = elt.charCodeAt(0) + if (code === PLUS || + code === PLUS_URL_SAFE) + return 62 // '+' + if (code === SLASH || + code === SLASH_URL_SAFE) + return 63 // '/' + if (code < NUMBER) + return -1 //no match + if (code < NUMBER + 10) + return code - NUMBER + 26 + 26 + if (code < UPPER + 26) + return code - UPPER + if (code < LOWER + 26) + return code - LOWER + 26 + } + + function b64ToByteArray (b64) { + var i, j, l, tmp, placeHolders, arr + + if (b64.length % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + var len = b64.length + placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 + + // base64 is 4/3 + up to two characters of the original data + arr = new Arr(b64.length * 3 / 4 - placeHolders) + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length + + var L = 0 + + function push (v) { + arr[L++] = v + } + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) + push((tmp & 0xFF0000) >> 16) + push((tmp & 0xFF00) >> 8) + push(tmp & 0xFF) + } + + if (placeHolders === 2) { + tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) + push(tmp & 0xFF) + } else if (placeHolders === 1) { + tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) + push((tmp >> 8) & 0xFF) + push(tmp & 0xFF) + } + + return arr + } + + function uint8ToBase64 (uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length + + function encode (num) { + return lookup.charAt(num) + } + + function tripletToBase64 (num) { + return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) + } + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) + output += tripletToBase64(temp) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1] + output += encode(temp >> 2) + output += encode((temp << 4) & 0x3F) + output += '==' + break + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) + output += encode(temp >> 10) + output += encode((temp >> 4) & 0x3F) + output += encode((temp << 2) & 0x3F) + output += '=' + break + } + + return output + } + + exports.toByteArray = b64ToByteArray + exports.fromByteArray = uint8ToBase64 +}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) + +},{}],5:[function(_dereq_,module,exports){ +exports.read = function(buffer, offset, isLE, mLen, nBytes) { + var e, m, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + nBits = -7, + i = isLE ? (nBytes - 1) : 0, + d = isLE ? -1 : 1, + s = buffer[offset + i]; + + i += d; + + e = s & ((1 << (-nBits)) - 1); + s >>= (-nBits); + nBits += eLen; + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8); + + m = e & ((1 << (-nBits)) - 1); + e >>= (-nBits); + nBits += mLen; + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8); + + if (e === 0) { + e = 1 - eBias; + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity); + } else { + m = m + Math.pow(2, mLen); + e = e - eBias; + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen); +}; + +exports.write = function(buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c, + eLen = nBytes * 8 - mLen - 1, + eMax = (1 << eLen) - 1, + eBias = eMax >> 1, + rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0), + i = isLE ? 0 : (nBytes - 1), + d = isLE ? 1 : -1, + s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0; + + value = Math.abs(value); + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0; + e = eMax; + } else { + e = Math.floor(Math.log(value) / Math.LN2); + if (value * (c = Math.pow(2, -e)) < 1) { + e--; + c *= 2; + } + if (e + eBias >= 1) { + value += rt / c; + } else { + value += rt * Math.pow(2, 1 - eBias); + } + if (value * c >= 2) { + e++; + c /= 2; + } + + if (e + eBias >= eMax) { + m = 0; + e = eMax; + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen); + e = e + eBias; + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen); + e = 0; + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8); + + e = (e << mLen) | m; + eLen += mLen; + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8); + + buffer[offset + i - d] |= s * 128; +}; + +},{}],6:[function(_dereq_,module,exports){ + +/** + * isArray + */ + +var isArray = Array.isArray; + +/** + * toString + */ + +var str = Object.prototype.toString; + +/** + * Whether or not the given `val` + * is an array. + * + * example: + * + * isArray([]); + * // > true + * isArray(arguments); + * // > false + * isArray(''); + * // > false + * + * @param {mixed} val + * @return {bool} + */ + +module.exports = isArray || function (val) { + return !! val && '[object Array]' == str.call(val); +}; + +},{}],7:[function(_dereq_,module,exports){ +(function (process){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length - 1; i >= 0; i--) { + var last = parts[i]; + if (last === '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Split a filename into [root, dir, basename, ext], unix version +// 'root' is just a slash, or nothing. +var splitPathRe = + /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; +var splitPath = function(filename) { + return splitPathRe.exec(filename).slice(1); +}; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { + var resolvedPath = '', + resolvedAbsolute = false; + + for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) ? arguments[i] : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string') { + throw new TypeError('Arguments to path.resolve must be strings'); + } else if (!path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; + } + + // At this point the path should be resolved to a full absolute path, but + // handle relative paths to be safe (might happen when process.cwd() fails) + + // Normalize the path + resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { + var isAbsolute = exports.isAbsolute(path), + trailingSlash = substr(path, -1) === '/'; + + // Normalize the path + path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + +// posix version +exports.isAbsolute = function(path) { + return path.charAt(0) === '/'; +}; + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + if (typeof p !== 'string') { + throw new TypeError('Arguments to path.join must be strings'); + } + return p; + }).join('/')); +}; + + +// path.relative(from, to) +// posix version +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +exports.sep = '/'; +exports.delimiter = ':'; + +exports.dirname = function(path) { + var result = splitPath(path), + root = result[0], + dir = result[1]; + + if (!root && !dir) { + // No dirname whatsoever + return '.'; + } + + if (dir) { + // It has a dirname, strip trailing slash + dir = dir.substr(0, dir.length - 1); + } + + return root + dir; +}; + + +exports.basename = function(path, ext) { + var f = splitPath(path)[2]; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPath(path)[3]; +}; + +function filter (xs, f) { + if (xs.filter) return xs.filter(f); + var res = []; + for (var i = 0; i < xs.length; i++) { + if (f(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// String.prototype.substr - negative index don't work in IE8 +var substr = 'ab'.substr(-1) === 'b' + ? function (str, start, len) { return str.substr(start, len) } + : function (str, start, len) { + if (start < 0) start = str.length + start; + return str.substr(start, len); + } +; + +}).call(this,_dereq_('_process')) +},{"_process":8}],8:[function(_dereq_,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; +var queue = []; +var draining = false; + +function drainQueue() { + if (draining) { + return; + } + draining = true; + var currentQueue; + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + var i = -1; + while (++i < len) { + currentQueue[i](); + } + len = queue.length; + } + draining = false; +} +process.nextTick = function (fun) { + queue.push(fun); + if (!draining) { + setTimeout(drainQueue, 0); + } +}; + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + +},{}],9:[function(_dereq_,module,exports){ +/* + Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com> + Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com> + Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com> + Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be> + Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl> + Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com> + Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com> + Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com> + Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + + /* istanbul ignore next */ + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + FnExprTokens, + Syntax, + PropertyKind, + Messages, + Regex, + SyntaxTreeDelegate, + XHTMLEntities, + ClassPropertyType, + source, + strict, + index, + lineNumber, + lineStart, + length, + delegate, + lookahead, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9, + Template: 10, + JSXIdentifier: 11, + JSXText: 12 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = '<end>'; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.JSXIdentifier] = 'JSXIdentifier'; + TokenName[Token.JSXText] = 'JSXText'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + AnyTypeAnnotation: 'AnyTypeAnnotation', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrayTypeAnnotation: 'ArrayTypeAnnotation', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BooleanTypeAnnotation: 'BooleanTypeAnnotation', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassImplements: 'ClassImplements', + ClassProperty: 'ClassProperty', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DeclareClass: 'DeclareClass', + DeclareFunction: 'DeclareFunction', + DeclareModule: 'DeclareModule', + DeclareVariable: 'DeclareVariable', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + FunctionTypeAnnotation: 'FunctionTypeAnnotation', + FunctionTypeParam: 'FunctionTypeParam', + GenericTypeAnnotation: 'GenericTypeAnnotation', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportDefaultSpecifier: 'ImportDefaultSpecifier', + ImportNamespaceSpecifier: 'ImportNamespaceSpecifier', + ImportSpecifier: 'ImportSpecifier', + InterfaceDeclaration: 'InterfaceDeclaration', + InterfaceExtends: 'InterfaceExtends', + IntersectionTypeAnnotation: 'IntersectionTypeAnnotation', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleSpecifier: 'ModuleSpecifier', + NewExpression: 'NewExpression', + NullableTypeAnnotation: 'NullableTypeAnnotation', + NumberTypeAnnotation: 'NumberTypeAnnotation', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + ObjectTypeAnnotation: 'ObjectTypeAnnotation', + ObjectTypeCallProperty: 'ObjectTypeCallProperty', + ObjectTypeIndexer: 'ObjectTypeIndexer', + ObjectTypeProperty: 'ObjectTypeProperty', + Program: 'Program', + Property: 'Property', + QualifiedTypeIdentifier: 'QualifiedTypeIdentifier', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SpreadProperty: 'SpreadProperty', + StringLiteralTypeAnnotation: 'StringLiteralTypeAnnotation', + StringTypeAnnotation: 'StringTypeAnnotation', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TupleTypeAnnotation: 'TupleTypeAnnotation', + TryStatement: 'TryStatement', + TypeAlias: 'TypeAlias', + TypeAnnotation: 'TypeAnnotation', + TypeCastExpression: 'TypeCastExpression', + TypeofTypeAnnotation: 'TypeofTypeAnnotation', + TypeParameterDeclaration: 'TypeParameterDeclaration', + TypeParameterInstantiation: 'TypeParameterInstantiation', + UnaryExpression: 'UnaryExpression', + UnionTypeAnnotation: 'UnionTypeAnnotation', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + VoidTypeAnnotation: 'VoidTypeAnnotation', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + JSXIdentifier: 'JSXIdentifier', + JSXNamespacedName: 'JSXNamespacedName', + JSXMemberExpression: 'JSXMemberExpression', + JSXEmptyExpression: 'JSXEmptyExpression', + JSXExpressionContainer: 'JSXExpressionContainer', + JSXElement: 'JSXElement', + JSXClosingElement: 'JSXClosingElement', + JSXOpeningElement: 'JSXOpeningElement', + JSXAttribute: 'JSXAttribute', + JSXSpreadAttribute: 'JSXSpreadAttribute', + JSXText: 'JSXText', + YieldExpression: 'YieldExpression', + AwaitExpression: 'AwaitExpression' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + ClassPropertyType = { + 'static': 'static', + prototype: 'prototype' + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInFormalsList: 'Invalid left-hand side in formals list', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalDuplicateClassProperty: 'Illegal duplicate property in class definition', + IllegalClassConstructorProperty: 'Illegal constructor property in class definition', + IllegalReturn: 'Illegal return statement', + IllegalSpread: 'Illegal spread element', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + ParameterAfterRestParameter: 'Rest parameter must be final parameter of an argument list', + DefaultRestParameter: 'Rest parameter can not have a default value', + ElementAfterSpreadElement: 'Spread must be the final element of an element list', + PropertyAfterSpreadProperty: 'A rest property must be the final property of an object literal', + ObjectPatternAsRestParameter: 'Invalid rest parameter', + ObjectPatternAsSpread: 'Invalid spread argument', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + MissingFromClause: 'Missing from clause', + NoAsAfterImportNamespace: 'Missing as after import *', + InvalidModuleSpecifier: 'Invalid module specifier', + IllegalImportDeclaration: 'Illegal import declaration', + IllegalExportDeclaration: 'Illegal export declaration', + NoUninitializedConst: 'Const must be initialized', + ComprehensionRequiresBlock: 'Comprehension must have at least one block', + ComprehensionError: 'Comprehension Error', + EachNotAllowed: 'Each is not supported', + InvalidJSXAttributeValue: 'JSX value should be either an expression or a quoted JSX text', + ExpectedJSXClosingTag: 'Expected corresponding JSX closing tag for %0', + AdjacentJSXElements: 'Adjacent JSX elements must be wrapped in an enclosing tag', + ConfusedAboutFunctionType: 'Unexpected token =>. It looks like ' + + 'you are trying to write a function type, but you ended up ' + + 'writing a grouped type followed by an =>, which is a syntax ' + + 'error. Remember, function type parameters are named so function ' + + 'types look like (name1: type1, name2: type2) => returnType. You ' + + 'probably wrote (type1) => returnType' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + LeadingZeros: new RegExp('^0+(?!$)') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + /* istanbul ignore if */ + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function StringMap() { + this.$data = {}; + } + + StringMap.prototype.get = function (key) { + key = '$' + key; + return this.$data[key]; + }; + + StringMap.prototype.set = function (key, value) { + key = '$' + key; + this.$data[key] = value; + return this; + }; + + StringMap.prototype.has = function (key) { + key = '$' + key; + return Object.prototype.hasOwnProperty.call(this.$data, key); + }; + + StringMap.prototype["delete"] = function (key) { + key = '$' + key; + return delete this.$data[key]; + }; + + function isDecimalDigit(ch) { + return (ch >= 48 && ch <= 57); // 0..9 + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === 32) || // space + (ch === 9) || // tab + (ch === 0xB) || + (ch === 0xC) || + (ch === 0xA0) || + (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + } + + function isIdentifierPart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + default: + return false; + } + } + + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + // 'const' is specialized as Keyword in V8. + // 'yield' is only treated as a keyword in strict mode. + // 'let' is for compatiblity with SpiderMonkey and ES.next. + // Some others are from future reserved words. + + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } + + // 7.4 Comments + + function addComment(type, value, start, end, loc) { + var comment; + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (state.lastCommentStart >= start) { + return; + } + state.lastCommentStart = start; + + comment = { + type: type, + value: value + }; + if (extra.range) { + comment.range = [start, end]; + } + if (extra.loc) { + comment.loc = loc; + } + extra.comments.push(comment); + if (extra.attachComment) { + extra.leadingComments.push(comment); + extra.trailingComments.push(comment); + } + } + + function skipSingleLineComment() { + var start, loc, ch, comment; + + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + + while (index < length) { + ch = source.charCodeAt(index); + ++index; + if (isLineTerminator(ch)) { + if (extra.comments) { + comment = source.slice(start + 2, index - 1); + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + addComment('Line', comment, start, index - 1, loc); + } + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + return; + } + } + + if (extra.comments) { + comment = source.slice(start + 2, index); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Line', comment, start, index, loc); + } + } + + function skipMultiLineComment() { + var start, loc, ch, comment; + + if (extra.comments) { + start = index - 2; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (isLineTerminator(ch)) { + if (ch === 13 && source.charCodeAt(index + 1) === 10) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else if (ch === 42) { + // Block comment ends with '*/' (char #42, char #47). + if (source.charCodeAt(index + 1) === 47) { + ++index; + ++index; + if (extra.comments) { + comment = source.slice(start + 2, index - 2); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + } + return; + } + ++index; + } else { + ++index; + } + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + function skipComment() { + var ch; + + while (index < length) { + ch = source.charCodeAt(index); + + if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } else if (ch === 47) { // 47 is '/' + ch = source.charCodeAt(index + 1); + if (ch === 47) { + ++index; + ++index; + skipSingleLineComment(); + } else if (ch === 42) { // 42 is '*' + ++index; + ++index; + skipMultiLineComment(); + } else { + break; + } + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanUnicodeCodePointEscape() { + var ch, code, cu1, cu2; + + ch = source[index]; + code = 0; + + // At least, one hex digit is required. + if (ch === '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + while (index < length) { + ch = source[index++]; + if (!isHexDigit(ch)) { + break; + } + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + + if (code > 0x10FFFF || ch !== '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // UTF-16 Encoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } + cu1 = ((code - 0x10000) >> 10) + 0xD800; + cu2 = ((code - 0x10000) & 1023) + 0xDC00; + return String.fromCharCode(cu1, cu2); + } + + function getEscapedIdentifier() { + var ch, id; + + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id = ch; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id += ch; + } + } + + return id; + } + + function getIdentifier() { + var start, ch; + + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 92) { + // Blackslash (char #92) marks Unicode escape sequence. + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + + return source.slice(start, index); + } + + function scanIdentifier() { + var start, id, type; + + start = index; + + // Backslash (char #92) starts an escaped character. + id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier(); + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + code = source.charCodeAt(index), + code2, + ch1 = source[index], + ch2, + ch3, + ch4; + + if (state.inJSXTag || state.inJSXChild) { + // Don't need to check for '{' and '}' as it's already handled + // correctly by default. + switch (code) { + case 60: // < + case 62: // > + ++index; + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + switch (code) { + // Check for most common single-character punctuators. + case 40: // ( open bracket + case 41: // ) close bracket + case 59: // ; semicolon + case 44: // , comma + case 123: // { open curly brace + case 125: // } close curly brace + case 91: // [ + case 93: // ] + case 58: // : + case 63: // ? + case 126: // ~ + ++index; + if (extra.tokenize) { + if (code === 40) { + extra.openParenToken = extra.tokens.length; + } else if (code === 123) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + default: + code2 = source.charCodeAt(index + 1); + + // '=' (char #61) marks an assignment or comparison operator. + if (code2 === 61) { + switch (code) { + case 37: // % + case 38: // & + case 42: // *: + case 43: // + + case 45: // - + case 47: // / + case 60: // < + case 62: // > + case 94: // ^ + case 124: // | + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + case 33: // ! + case 61: // = + index += 2; + + // !== and === + if (source.charCodeAt(index) === 61) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + default: + break; + } + } + break; + } + + // Peek more characters. + + ch2 = source[index + 1]; + ch3 = source[index + 2]; + ch4 = source[index + 3]; + + // 4-character punctuator: >>>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + if (ch4 === '=') { + index += 4; + return { + type: Token.Punctuator, + value: '>>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>' && !state.inType) { + index += 3; + return { + type: Token.Punctuator, + value: '>>>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '<' && ch2 === '<' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '<<=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.' && ch2 === '.' && ch3 === '.') { + index += 3; + return { + type: Token.Punctuator, + value: '...', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Other 2-character punctuators: ++ -- << >> && || + + // Don't match these tokens if we're in a type, since they never can + // occur and can mess up types like Map<string, Array<string>> + if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0) && !state.inType) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '=' && ch2 === '>') { + index += 2; + return { + type: Token.Punctuator, + value: '=>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // 7.8.3 Numeric Literals + + function scanHexLiteral(start) { + var number = ''; + + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanBinaryLiteral(start) { + var ch, number; + + number = ''; + + while (index < length) { + ch = source[index]; + if (ch !== '0' && ch !== '1') { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + // only 0b or 0B + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (index < length) { + ch = source.charCodeAt(index); + /* istanbul ignore else */ + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanOctalLiteral(prefix, start) { + var number, octal; + + if (isOctalDigit(prefix)) { + octal = true; + number = '0' + source[index++]; + } else { + octal = false; + ++index; + number = ''; + } + + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (!octal && number.length === 0) { + // only 0o or 0O + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanNumericLiteral() { + var number, start, ch; + + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++index; + return scanBinaryLiteral(start); + } + if (ch === 'o' || ch === 'O' || isOctalDigit(ch)) { + return scanOctalLiteral(ch, start); + } + // decimal number starts with '0' such as '09' is illegal. + if (ch && isDecimalDigit(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + str += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + /* istanbul ignore else */ + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplate() { + var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal; + + terminated = false; + tail = false; + start = index; + + ++index; + + while (index < length) { + ch = source[index++]; + if (ch === '`') { + tail = true; + terminated = true; + break; + } else if (ch === '$') { + if (source[index] === '{') { + ++index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + cooked += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + cooked += unescaped; + } else { + index = restore; + cooked += ch; + } + } + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + /* istanbul ignore else */ + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + cooked += String.fromCharCode(code); + } else { + cooked += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + lineStart = index; + cooked += '\n'; + } else { + cooked += ch; + } + } + + if (!terminated) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.Template, + value: { + cooked: cooked, + raw: source.slice(start + 1, index - ((tail) ? 1 : 2)) + }, + tail: tail, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplateElement(option) { + var startsWith, template; + + lookahead = null; + skipComment(); + + startsWith = (option.head) ? '`' : '}'; + + if (source[index] !== startsWith) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + template = scanTemplate(); + + peek(); + + return template; + } + + function testRegExp(pattern, flags) { + var tmp = pattern, + value; + + if (flags.indexOf('u') >= 0) { + // Replace each astral symbol and every Unicode code point + // escape sequence with a single ASCII symbol to avoid throwing on + // regular expressions that are only valid in combination with the + // `/u` flag. + // Note: replacing with the ASCII symbol `x` might cause false + // negatives in unlikely scenarios. For example, `[\u{61}-b]` is a + // perfectly valid pattern that is equivalent to `[a-b]`, but it + // would be replaced by `[x-b]` which throws an error. + tmp = tmp + .replace(/\\u\{([0-9a-fA-F]+)\}/g, function ($0, $1) { + if (parseInt($1, 16) <= 0x10FFFF) { + return 'x'; + } + throwError({}, Messages.InvalidRegExp); + }) + .replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, 'x'); + } + + // First, detect invalid regular expressions. + try { + value = new RegExp(tmp); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + + // Return a regular expression object for this pattern-flag pair, or + // `null` in case the current environment doesn't support the flags it + // uses. + try { + return new RegExp(pattern, flags); + } catch (exception) { + return null; + } + } + + function scanRegExpBody() { + var ch, str, classMarker, terminated, body; + + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + classMarker = false; + terminated = false; + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + body = str.substr(1, str.length - 2); + return { + value: body, + literal: str + }; + } + + function scanRegExpFlags() { + var ch, str, flags, restore; + + str = ''; + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } else { + str += '\\'; + throwErrorTolerant({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + flags += ch; + str += ch; + } + } + + return { + value: flags, + literal: str + }; + } + + function scanRegExp() { + var start, body, flags, value; + + lookahead = null; + skipComment(); + start = index; + + body = scanRegExpBody(); + flags = scanRegExpFlags(); + value = testRegExp(body.value, flags.value); + + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + return { + literal: body.literal + flags.literal, + value: value, + regex: { + pattern: body.value, + flags: flags.value + }, + range: [start, index] + }; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advanceSlash() { + var prevToken, + checkToken; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + // Nothing before that: it cannot be a division. + return scanRegExp(); + } + if (prevToken.type === 'Punctuator') { + if (prevToken.value === ')') { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && + checkToken.type === 'Keyword' && + (checkToken.value === 'if' || + checkToken.value === 'while' || + checkToken.value === 'for' || + checkToken.value === 'with')) { + return scanRegExp(); + } + return scanPunctuator(); + } + if (prevToken.value === '}') { + // Dividing a function by anything makes little sense, + // but we have to check for that. + if (extra.tokens[extra.openCurlyToken - 3] && + extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { + // Anonymous function. + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && + extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { + // Named function. + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return scanRegExp(); + } + } else { + return scanPunctuator(); + } + // checkToken determines whether the function is + // a declaration or an expression. + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + // It is an expression. + return scanPunctuator(); + } + // It is a declaration. + return scanRegExp(); + } + return scanRegExp(); + } + if (prevToken.type === 'Keyword' && prevToken.value !== 'this') { + return scanRegExp(); + } + return scanPunctuator(); + } + + function advance() { + var ch; + + if (!state.inJSXChild) { + skipComment(); + } + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + range: [index, index] + }; + } + + if (state.inJSXChild) { + return advanceJSXChild(); + } + + ch = source.charCodeAt(index); + + // Very common: ( and ) and ; + if (ch === 40 || ch === 41 || ch === 58) { + return scanPunctuator(); + } + + // String literal starts with single quote (#39) or double quote (#34). + if (ch === 39 || ch === 34) { + if (state.inJSXTag) { + return scanJSXStringLiteral(); + } + return scanStringLiteral(); + } + + if (state.inJSXTag && isJSXIdentifierStart(ch)) { + return scanJSXIdentifier(); + } + + if (ch === 96) { + return scanTemplate(); + } + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + + // Dot (.) char #46 can also start a floating-point number, hence the need + // to check the next character. + if (ch === 46) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + // Slash (/) char #47 can also start a regex. + if (extra.tokenize && ch === 47) { + return advanceSlash(); + } + + return scanPunctuator(); + } + + function lex() { + var token; + + token = lookahead; + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + lookahead = advance(); + + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + return token; + } + + function peek() { + var pos, line, start; + + pos = index; + line = lineNumber; + start = lineStart; + lookahead = advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + + function lookahead2() { + var adv, pos, line, start, result; + + // If we are collecting the tokens, don't grab the next one yet. + /* istanbul ignore next */ + adv = (typeof extra.advance === 'function') ? extra.advance : advance; + + pos = index; + line = lineNumber; + start = lineStart; + + // Scan for the next immediate token. + /* istanbul ignore if */ + if (lookahead === null) { + lookahead = adv(); + } + index = lookahead.range[1]; + lineNumber = lookahead.lineNumber; + lineStart = lookahead.lineStart; + + // Grab the token right after. + result = adv(); + index = pos; + lineNumber = line; + lineStart = start; + + return result; + } + + function rewind(token) { + index = token.range[0]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + lookahead = token; + } + + function markerCreate() { + if (!extra.loc && !extra.range) { + return undefined; + } + skipComment(); + return {offset: index, line: lineNumber, col: index - lineStart}; + } + + function markerCreatePreserveWhitespace() { + if (!extra.loc && !extra.range) { + return undefined; + } + return {offset: index, line: lineNumber, col: index - lineStart}; + } + + function processComment(node) { + var lastChild, + trailingComments, + bottomRight = extra.bottomRightStack, + last = bottomRight[bottomRight.length - 1]; + + if (node.type === Syntax.Program) { + /* istanbul ignore else */ + if (node.body.length > 0) { + return; + } + } + + if (extra.trailingComments.length > 0) { + if (extra.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = extra.trailingComments; + extra.trailingComments = []; + } else { + extra.trailingComments.length = 0; + } + } else { + if (last && last.trailingComments && last.trailingComments[0].range[0] >= node.range[1]) { + trailingComments = last.trailingComments; + delete last.trailingComments; + } + } + + // Eating the stack. + if (last) { + while (last && last.range[0] >= node.range[0]) { + lastChild = last; + last = bottomRight.pop(); + } + } + + if (lastChild) { + if (lastChild.leadingComments && lastChild.leadingComments[lastChild.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = lastChild.leadingComments; + delete lastChild.leadingComments; + } + } else if (extra.leadingComments.length > 0 && extra.leadingComments[extra.leadingComments.length - 1].range[1] <= node.range[0]) { + node.leadingComments = extra.leadingComments; + extra.leadingComments = []; + } + + if (trailingComments) { + node.trailingComments = trailingComments; + } + + bottomRight.push(node); + } + + function markerApply(marker, node) { + if (extra.range) { + node.range = [marker.offset, index]; + } + if (extra.loc) { + node.loc = { + start: { + line: marker.line, + column: marker.col + }, + end: { + line: lineNumber, + column: index - lineStart + } + }; + node = delegate.postProcess(node); + } + if (extra.attachComment) { + processComment(node); + } + return node; + } + + SyntaxTreeDelegate = { + + name: 'SyntaxTree', + + postProcess: function (node) { + return node; + }, + + createArrayExpression: function (elements) { + return { + type: Syntax.ArrayExpression, + elements: elements + }; + }, + + createAssignmentExpression: function (operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator: operator, + left: left, + right: right + }; + }, + + createBinaryExpression: function (operator, left, right) { + var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : + Syntax.BinaryExpression; + return { + type: type, + operator: operator, + left: left, + right: right + }; + }, + + createBlockStatement: function (body) { + return { + type: Syntax.BlockStatement, + body: body + }; + }, + + createBreakStatement: function (label) { + return { + type: Syntax.BreakStatement, + label: label + }; + }, + + createCallExpression: function (callee, args) { + return { + type: Syntax.CallExpression, + callee: callee, + 'arguments': args + }; + }, + + createCatchClause: function (param, body) { + return { + type: Syntax.CatchClause, + param: param, + body: body + }; + }, + + createConditionalExpression: function (test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createContinueStatement: function (label) { + return { + type: Syntax.ContinueStatement, + label: label + }; + }, + + createDebuggerStatement: function () { + return { + type: Syntax.DebuggerStatement + }; + }, + + createDoWhileStatement: function (body, test) { + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + }, + + createEmptyStatement: function () { + return { + type: Syntax.EmptyStatement + }; + }, + + createExpressionStatement: function (expression) { + return { + type: Syntax.ExpressionStatement, + expression: expression + }; + }, + + createForStatement: function (init, test, update, body) { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + }, + + createForInStatement: function (left, right, body) { + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + }, + + createForOfStatement: function (left, right, body) { + return { + type: Syntax.ForOfStatement, + left: left, + right: right, + body: body + }; + }, + + createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, + isAsync, returnType, typeParameters) { + var funDecl = { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType, + typeParameters: typeParameters + }; + + if (isAsync) { + funDecl.async = true; + } + + return funDecl; + }, + + createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, + isAsync, returnType, typeParameters) { + var funExpr = { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType, + typeParameters: typeParameters + }; + + if (isAsync) { + funExpr.async = true; + } + + return funExpr; + }, + + createIdentifier: function (name) { + return { + type: Syntax.Identifier, + name: name, + // Only here to initialize the shape of the object to ensure + // that the 'typeAnnotation' key is ordered before others that + // are added later (like 'loc' and 'range'). This just helps + // keep the shape of Identifier nodes consistent with everything + // else. + typeAnnotation: undefined, + optional: undefined + }; + }, + + createTypeAnnotation: function (typeAnnotation) { + return { + type: Syntax.TypeAnnotation, + typeAnnotation: typeAnnotation + }; + }, + + createTypeCast: function (expression, typeAnnotation) { + return { + type: Syntax.TypeCastExpression, + expression: expression, + typeAnnotation: typeAnnotation + }; + }, + + createFunctionTypeAnnotation: function (params, returnType, rest, typeParameters) { + return { + type: Syntax.FunctionTypeAnnotation, + params: params, + returnType: returnType, + rest: rest, + typeParameters: typeParameters + }; + }, + + createFunctionTypeParam: function (name, typeAnnotation, optional) { + return { + type: Syntax.FunctionTypeParam, + name: name, + typeAnnotation: typeAnnotation, + optional: optional + }; + }, + + createNullableTypeAnnotation: function (typeAnnotation) { + return { + type: Syntax.NullableTypeAnnotation, + typeAnnotation: typeAnnotation + }; + }, + + createArrayTypeAnnotation: function (elementType) { + return { + type: Syntax.ArrayTypeAnnotation, + elementType: elementType + }; + }, + + createGenericTypeAnnotation: function (id, typeParameters) { + return { + type: Syntax.GenericTypeAnnotation, + id: id, + typeParameters: typeParameters + }; + }, + + createQualifiedTypeIdentifier: function (qualification, id) { + return { + type: Syntax.QualifiedTypeIdentifier, + qualification: qualification, + id: id + }; + }, + + createTypeParameterDeclaration: function (params) { + return { + type: Syntax.TypeParameterDeclaration, + params: params + }; + }, + + createTypeParameterInstantiation: function (params) { + return { + type: Syntax.TypeParameterInstantiation, + params: params + }; + }, + + createAnyTypeAnnotation: function () { + return { + type: Syntax.AnyTypeAnnotation + }; + }, + + createBooleanTypeAnnotation: function () { + return { + type: Syntax.BooleanTypeAnnotation + }; + }, + + createNumberTypeAnnotation: function () { + return { + type: Syntax.NumberTypeAnnotation + }; + }, + + createStringTypeAnnotation: function () { + return { + type: Syntax.StringTypeAnnotation + }; + }, + + createStringLiteralTypeAnnotation: function (token) { + return { + type: Syntax.StringLiteralTypeAnnotation, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createVoidTypeAnnotation: function () { + return { + type: Syntax.VoidTypeAnnotation + }; + }, + + createTypeofTypeAnnotation: function (argument) { + return { + type: Syntax.TypeofTypeAnnotation, + argument: argument + }; + }, + + createTupleTypeAnnotation: function (types) { + return { + type: Syntax.TupleTypeAnnotation, + types: types + }; + }, + + createObjectTypeAnnotation: function (properties, indexers, callProperties) { + return { + type: Syntax.ObjectTypeAnnotation, + properties: properties, + indexers: indexers, + callProperties: callProperties + }; + }, + + createObjectTypeIndexer: function (id, key, value, isStatic) { + return { + type: Syntax.ObjectTypeIndexer, + id: id, + key: key, + value: value, + "static": isStatic + }; + }, + + createObjectTypeCallProperty: function (value, isStatic) { + return { + type: Syntax.ObjectTypeCallProperty, + value: value, + "static": isStatic + }; + }, + + createObjectTypeProperty: function (key, value, optional, isStatic) { + return { + type: Syntax.ObjectTypeProperty, + key: key, + value: value, + optional: optional, + "static": isStatic + }; + }, + + createUnionTypeAnnotation: function (types) { + return { + type: Syntax.UnionTypeAnnotation, + types: types + }; + }, + + createIntersectionTypeAnnotation: function (types) { + return { + type: Syntax.IntersectionTypeAnnotation, + types: types + }; + }, + + createTypeAlias: function (id, typeParameters, right) { + return { + type: Syntax.TypeAlias, + id: id, + typeParameters: typeParameters, + right: right + }; + }, + + createInterface: function (id, typeParameters, body, extended) { + return { + type: Syntax.InterfaceDeclaration, + id: id, + typeParameters: typeParameters, + body: body, + "extends": extended + }; + }, + + createInterfaceExtends: function (id, typeParameters) { + return { + type: Syntax.InterfaceExtends, + id: id, + typeParameters: typeParameters + }; + }, + + createDeclareFunction: function (id) { + return { + type: Syntax.DeclareFunction, + id: id + }; + }, + + createDeclareVariable: function (id) { + return { + type: Syntax.DeclareVariable, + id: id + }; + }, + + createDeclareModule: function (id, body) { + return { + type: Syntax.DeclareModule, + id: id, + body: body + }; + }, + + createJSXAttribute: function (name, value) { + return { + type: Syntax.JSXAttribute, + name: name, + value: value || null + }; + }, + + createJSXSpreadAttribute: function (argument) { + return { + type: Syntax.JSXSpreadAttribute, + argument: argument + }; + }, + + createJSXIdentifier: function (name) { + return { + type: Syntax.JSXIdentifier, + name: name + }; + }, + + createJSXNamespacedName: function (namespace, name) { + return { + type: Syntax.JSXNamespacedName, + namespace: namespace, + name: name + }; + }, + + createJSXMemberExpression: function (object, property) { + return { + type: Syntax.JSXMemberExpression, + object: object, + property: property + }; + }, + + createJSXElement: function (openingElement, closingElement, children) { + return { + type: Syntax.JSXElement, + openingElement: openingElement, + closingElement: closingElement, + children: children + }; + }, + + createJSXEmptyExpression: function () { + return { + type: Syntax.JSXEmptyExpression + }; + }, + + createJSXExpressionContainer: function (expression) { + return { + type: Syntax.JSXExpressionContainer, + expression: expression + }; + }, + + createJSXOpeningElement: function (name, attributes, selfClosing) { + return { + type: Syntax.JSXOpeningElement, + name: name, + selfClosing: selfClosing, + attributes: attributes + }; + }, + + createJSXClosingElement: function (name) { + return { + type: Syntax.JSXClosingElement, + name: name + }; + }, + + createIfStatement: function (test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createLabeledStatement: function (label, body) { + return { + type: Syntax.LabeledStatement, + label: label, + body: body + }; + }, + + createLiteral: function (token) { + var object = { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + if (token.regex) { + object.regex = token.regex; + } + return object; + }, + + createMemberExpression: function (accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === '[', + object: object, + property: property + }; + }, + + createNewExpression: function (callee, args) { + return { + type: Syntax.NewExpression, + callee: callee, + 'arguments': args + }; + }, + + createObjectExpression: function (properties) { + return { + type: Syntax.ObjectExpression, + properties: properties + }; + }, + + createPostfixExpression: function (operator, argument) { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: false + }; + }, + + createProgram: function (body) { + return { + type: Syntax.Program, + body: body + }; + }, + + createProperty: function (kind, key, value, method, shorthand, computed) { + return { + type: Syntax.Property, + key: key, + value: value, + kind: kind, + method: method, + shorthand: shorthand, + computed: computed + }; + }, + + createReturnStatement: function (argument) { + return { + type: Syntax.ReturnStatement, + argument: argument + }; + }, + + createSequenceExpression: function (expressions) { + return { + type: Syntax.SequenceExpression, + expressions: expressions + }; + }, + + createSwitchCase: function (test, consequent) { + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + }, + + createSwitchStatement: function (discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + }, + + createThisExpression: function () { + return { + type: Syntax.ThisExpression + }; + }, + + createThrowStatement: function (argument) { + return { + type: Syntax.ThrowStatement, + argument: argument + }; + }, + + createTryStatement: function (block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: guardedHandlers, + handlers: handlers, + finalizer: finalizer + }; + }, + + createUnaryExpression: function (operator, argument) { + if (operator === '++' || operator === '--') { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator: operator, + argument: argument, + prefix: true + }; + }, + + createVariableDeclaration: function (declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + }, + + createVariableDeclarator: function (id, init) { + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + }, + + createWhileStatement: function (test, body) { + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + }, + + createWithStatement: function (object, body) { + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + }, + + createTemplateElement: function (value, tail) { + return { + type: Syntax.TemplateElement, + value: value, + tail: tail + }; + }, + + createTemplateLiteral: function (quasis, expressions) { + return { + type: Syntax.TemplateLiteral, + quasis: quasis, + expressions: expressions + }; + }, + + createSpreadElement: function (argument) { + return { + type: Syntax.SpreadElement, + argument: argument + }; + }, + + createSpreadProperty: function (argument) { + return { + type: Syntax.SpreadProperty, + argument: argument + }; + }, + + createTaggedTemplateExpression: function (tag, quasi) { + return { + type: Syntax.TaggedTemplateExpression, + tag: tag, + quasi: quasi + }; + }, + + createArrowFunctionExpression: function (params, defaults, body, rest, expression, isAsync) { + var arrowExpr = { + type: Syntax.ArrowFunctionExpression, + id: null, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: false, + expression: expression + }; + + if (isAsync) { + arrowExpr.async = true; + } + + return arrowExpr; + }, + + createMethodDefinition: function (propertyType, kind, key, value, computed) { + return { + type: Syntax.MethodDefinition, + key: key, + value: value, + kind: kind, + 'static': propertyType === ClassPropertyType["static"], + computed: computed + }; + }, + + createClassProperty: function (key, typeAnnotation, computed, isStatic) { + return { + type: Syntax.ClassProperty, + key: key, + typeAnnotation: typeAnnotation, + computed: computed, + "static": isStatic + }; + }, + + createClassBody: function (body) { + return { + type: Syntax.ClassBody, + body: body + }; + }, + + createClassImplements: function (id, typeParameters) { + return { + type: Syntax.ClassImplements, + id: id, + typeParameters: typeParameters + }; + }, + + createClassExpression: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { + return { + type: Syntax.ClassExpression, + id: id, + superClass: superClass, + body: body, + typeParameters: typeParameters, + superTypeParameters: superTypeParameters, + "implements": implemented + }; + }, + + createClassDeclaration: function (id, superClass, body, typeParameters, superTypeParameters, implemented) { + return { + type: Syntax.ClassDeclaration, + id: id, + superClass: superClass, + body: body, + typeParameters: typeParameters, + superTypeParameters: superTypeParameters, + "implements": implemented + }; + }, + + createModuleSpecifier: function (token) { + return { + type: Syntax.ModuleSpecifier, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createExportSpecifier: function (id, name) { + return { + type: Syntax.ExportSpecifier, + id: id, + name: name + }; + }, + + createExportBatchSpecifier: function () { + return { + type: Syntax.ExportBatchSpecifier + }; + }, + + createImportDefaultSpecifier: function (id) { + return { + type: Syntax.ImportDefaultSpecifier, + id: id + }; + }, + + createImportNamespaceSpecifier: function (id) { + return { + type: Syntax.ImportNamespaceSpecifier, + id: id + }; + }, + + createExportDeclaration: function (isDefault, declaration, specifiers, src) { + return { + type: Syntax.ExportDeclaration, + 'default': !!isDefault, + declaration: declaration, + specifiers: specifiers, + source: src + }; + }, + + createImportSpecifier: function (id, name) { + return { + type: Syntax.ImportSpecifier, + id: id, + name: name + }; + }, + + createImportDeclaration: function (specifiers, src, isType) { + return { + type: Syntax.ImportDeclaration, + specifiers: specifiers, + source: src, + isType: isType + }; + }, + + createYieldExpression: function (argument, dlg) { + return { + type: Syntax.YieldExpression, + argument: argument, + delegate: dlg + }; + }, + + createAwaitExpression: function (argument) { + return { + type: Syntax.AwaitExpression, + argument: argument + }; + }, + + createComprehensionExpression: function (filter, blocks, body) { + return { + type: Syntax.ComprehensionExpression, + filter: filter, + blocks: blocks, + body: body + }; + } + + }; + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, idx) { + assert(idx < args.length, 'Message reference must be in range'); + return args[idx]; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.range[0]; + error.lineNumber = token.lineNumber; + error.column = token.range[0] - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + error.description = msg; + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral || token.type === Token.JSXText) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + if (token.type === Token.Template) { + throwError(token, Messages.UnexpectedTemplate, token.value.raw); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword, contextual) { + var token = lex(); + if (token.type !== (contextual ? Token.Identifier : Token.Keyword) || + token.value !== keyword) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified contextual keyword. + // If not, an exception will be thrown. + + function expectContextualKeyword(keyword) { + return expectKeyword(keyword, true); + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword, contextual) { + var expectedType = contextual ? Token.Identifier : Token.Keyword; + return lookahead.type === expectedType && lookahead.value === keyword; + } + + // Return true if the next token matches the specified contextual keyword + + function matchContextualKeyword(keyword) { + return matchKeyword(keyword, true); + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var op; + + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + // Note that 'yield' is treated as a keyword in strict mode, but a + // contextual keyword (identifier) in non-strict mode, so we need to + // use matchKeyword('yield', false) and matchKeyword('yield', true) + // (i.e. matchContextualKeyword) appropriately. + function matchYield() { + return state.yieldAllowed && matchKeyword('yield', !strict); + } + + function matchAsync() { + var backtrackToken = lookahead, matches = false; + + if (matchContextualKeyword('async')) { + lex(); // Make sure peekLineTerminator() starts after 'async'. + matches = !peekLineTerminator(); + rewind(backtrackToken); // Revert the lex(). + } + + return matches; + } + + function matchAwait() { + return state.awaitAllowed && matchContextualKeyword('await'); + } + + function consumeSemicolon() { + var line, oldIndex = index, oldLineNumber = lineNumber, + oldLineStart = lineStart, oldLookahead = lookahead; + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + index = oldIndex; + lineNumber = oldLineNumber; + lineStart = oldLineStart; + lookahead = oldLookahead; + return; + } + + if (match(';')) { + lex(); + return; + } + + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpected(lookahead); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + function isAssignableLeftHandSide(expr) { + return isLeftHandSide(expr) || expr.type === Syntax.ObjectPattern || expr.type === Syntax.ArrayPattern; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, + marker = markerCreate(); + + expect('['); + while (!match(']')) { + if (lookahead.value === 'for' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + matchKeyword('for'); + tmp = parseForStatement({ignoreBody: true}); + tmp.of = tmp.type === Syntax.ForOfStatement; + tmp.type = Syntax.ComprehensionBlock; + if (tmp.left.kind) { // can't be let or const + throwError({}, Messages.ComprehensionError); + } + blocks.push(tmp); + } else if (lookahead.value === 'if' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + expectKeyword('if'); + expect('('); + filter = parseExpression(); + expect(')'); + } else if (lookahead.value === ',' && + lookahead.type === Token.Punctuator) { + possiblecomprehension = false; // no longer allowed. + lex(); + elements.push(null); + } else { + tmp = parseSpreadOrAssignmentExpression(); + elements.push(tmp); + if (tmp && tmp.type === Syntax.SpreadElement) { + if (!match(']')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) { + expect(','); // this lexes. + possiblecomprehension = false; + } + } + } + + expect(']'); + + if (filter && !blocks.length) { + throwError({}, Messages.ComprehensionRequiresBlock); + } + + if (blocks.length) { + if (elements.length !== 1) { + throwError({}, Messages.ComprehensionError); + } + return markerApply(marker, delegate.createComprehensionExpression(filter, blocks, elements[0])); + } + return markerApply(marker, delegate.createArrayExpression(elements)); + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(options) { + var previousStrict, previousYieldAllowed, previousAwaitAllowed, + params, defaults, body, marker = markerCreate(); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = options.generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = options.async; + params = options.params || []; + defaults = options.defaults || []; + + body = parseConciseBody(); + if (options.name && strict && isRestrictedWord(params[0].name)) { + throwErrorTolerant(options.name, Messages.StrictParamName); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply(marker, delegate.createFunctionExpression( + null, + params, + defaults, + body, + options.rest || null, + options.generator, + body.type !== Syntax.BlockStatement, + options.async, + options.returnType, + options.typeParameters + )); + } + + + function parsePropertyMethodFunction(options) { + var previousStrict, tmp, method; + + previousStrict = strict; + strict = true; + + tmp = parseParams(); + + if (tmp.stricted) { + throwErrorTolerant(tmp.stricted, tmp.message); + } + + method = parsePropertyFunction({ + params: tmp.params, + defaults: tmp.defaults, + rest: tmp.rest, + generator: options.generator, + async: options.async, + returnType: tmp.returnType, + typeParameters: options.typeParameters + }); + + strict = previousStrict; + + return method; + } + + + function parseObjectPropertyKey() { + var marker = markerCreate(), + token = lex(), + propertyKey, + result; + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createLiteral(token)); + } + + if (token.type === Token.Punctuator && token.value === '[') { + // For computed properties we should skip the [ and ], and + // capture in marker only the assignment expression itself. + marker = markerCreate(); + propertyKey = parseAssignmentExpression(); + result = markerApply(marker, propertyKey); + expect(']'); + return result; + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseObjectProperty() { + var token, key, id, param, computed, + marker = markerCreate(), returnType, typeParameters; + + token = lookahead; + computed = (token.value === '[' && token.type === Token.Punctuator); + + if (token.type === Token.Identifier || computed || matchAsync()) { + id = parseObjectPropertyKey(); + + if (match(':')) { + lex(); + + return markerApply( + marker, + delegate.createProperty( + 'init', + id, + parseAssignmentExpression(), + false, + false, + computed + ) + ); + } + + if (match('(') || match('<')) { + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + return markerApply( + marker, + delegate.createProperty( + 'init', + id, + parsePropertyMethodFunction({ + generator: false, + async: false, + typeParameters: typeParameters + }), + true, + false, + computed + ) + ); + } + + // Property Assignment: Getter and Setter. + + if (token.value === 'get') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + expect('('); + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + + return markerApply( + marker, + delegate.createProperty( + 'get', + key, + parsePropertyFunction({ + generator: false, + async: false, + returnType: returnType + }), + false, + false, + computed + ) + ); + } + + if (token.value === 'set') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + + return markerApply( + marker, + delegate.createProperty( + 'set', + key, + parsePropertyFunction({ + params: param, + generator: false, + async: false, + name: token, + returnType: returnType + }), + false, + false, + computed + ) + ); + } + + if (token.value === 'async') { + computed = (lookahead.value === '['); + key = parseObjectPropertyKey(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + return markerApply( + marker, + delegate.createProperty( + 'init', + key, + parsePropertyMethodFunction({ + generator: false, + async: true, + typeParameters: typeParameters + }), + true, + false, + computed + ) + ); + } + + if (computed) { + // Computed properties can only be used with full notation. + throwUnexpected(lookahead); + } + + return markerApply( + marker, + delegate.createProperty('init', id, id, false, true, false) + ); + } + + if (token.type === Token.EOF || token.type === Token.Punctuator) { + if (!match('*')) { + throwUnexpected(token); + } + lex(); + + computed = (lookahead.type === Token.Punctuator && lookahead.value === '['); + + id = parseObjectPropertyKey(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (!match('(')) { + throwUnexpected(lex()); + } + + return markerApply(marker, delegate.createProperty( + 'init', + id, + parsePropertyMethodFunction({ + generator: true, + typeParameters: typeParameters + }), + true, + false, + computed + )); + } + key = parseObjectPropertyKey(); + if (match(':')) { + lex(); + return markerApply(marker, delegate.createProperty('init', key, parseAssignmentExpression(), false, false, false)); + } + if (match('(') || match('<')) { + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + return markerApply(marker, delegate.createProperty( + 'init', + key, + parsePropertyMethodFunction({ + generator: false, + typeParameters: typeParameters + }), + true, + false, + false + )); + } + throwUnexpected(lex()); + } + + function parseObjectSpreadProperty() { + var marker = markerCreate(); + expect('...'); + return markerApply(marker, delegate.createSpreadProperty(parseAssignmentExpression())); + } + + function getFieldName(key) { + var toString = String; + if (key.type === Syntax.Identifier) { + return key.name; + } + return toString(key.value); + } + + function parseObjectInitialiser() { + var properties = [], property, name, kind, storedKind, map = new StringMap(), + marker = markerCreate(), toString = String; + + expect('{'); + + while (!match('}')) { + if (match('...')) { + property = parseObjectSpreadProperty(); + } else { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + + if (map.has(name)) { + storedKind = map.get(name); + if (storedKind === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (storedKind & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map.set(name, storedKind | kind); + } else { + map.set(name, kind); + } + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return markerApply(marker, delegate.createObjectExpression(properties)); + } + + function parseTemplateElement(option) { + var marker = markerCreate(), + token = scanTemplateElement(option); + if (strict && token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail)); + } + + function parseTemplateLiteral() { + var quasi, quasis, expressions, marker = markerCreate(); + + quasi = parseTemplateElement({ head: true }); + quasis = [ quasi ]; + expressions = []; + + while (!quasi.tail) { + expressions.push(parseExpression()); + quasi = parseTemplateElement({ head: false }); + quasis.push(quasi); + } + + return markerApply(marker, delegate.createTemplateLiteral(quasis, expressions)); + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr, marker, typeAnnotation; + + expect('('); + + ++state.parenthesizedCount; + + marker = markerCreate(); + + expr = parseExpression(); + + if (match(':')) { + typeAnnotation = parseTypeAnnotation(); + expr = markerApply(marker, delegate.createTypeCast( + expr, + typeAnnotation + )); + } + + expect(')'); + + return expr; + } + + function matchAsyncFuncExprOrDecl() { + var token; + + if (matchAsync()) { + token = lookahead2(); + if (token.type === Token.Keyword && token.value === 'function') { + return true; + } + } + + return false; + } + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var marker, type, token, expr; + + type = lookahead.type; + + if (type === Token.Identifier) { + marker = markerCreate(); + return markerApply(marker, delegate.createIdentifier(lex().value)); + } + + if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + marker = markerCreate(); + return markerApply(marker, delegate.createLiteral(lex())); + } + + if (type === Token.Keyword) { + if (matchKeyword('this')) { + marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createThisExpression()); + } + + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + + if (matchKeyword('class')) { + return parseClassExpression(); + } + + if (matchKeyword('super')) { + marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createIdentifier('super')); + } + } + + if (type === Token.BooleanLiteral) { + marker = markerCreate(); + token = lex(); + token.value = (token.value === 'true'); + return markerApply(marker, delegate.createLiteral(token)); + } + + if (type === Token.NullLiteral) { + marker = markerCreate(); + token = lex(); + token.value = null; + return markerApply(marker, delegate.createLiteral(token)); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('/') || match('/=')) { + marker = markerCreate(); + expr = delegate.createLiteral(scanRegExp()); + peek(); + return markerApply(marker, expr); + } + + if (type === Token.Template) { + return parseTemplateLiteral(); + } + + if (match('<')) { + return parseJSXElement(); + } + + throwUnexpected(lex()); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = [], arg; + + expect('('); + + if (!match(')')) { + while (index < length) { + arg = parseSpreadOrAssignmentExpression(); + args.push(arg); + + if (match(')')) { + break; + } else if (arg.type === Syntax.SpreadElement) { + throwError({}, Messages.ElementAfterSpreadElement); + } + + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseSpreadOrAssignmentExpression() { + if (match('...')) { + var marker = markerCreate(); + lex(); + return markerApply(marker, delegate.createSpreadElement(parseAssignmentExpression())); + } + return parseAssignmentExpression(); + } + + function parseNonComputedProperty() { + var marker = markerCreate(), + token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var callee, args, marker = markerCreate(); + + expectKeyword('new'); + callee = parseLeftHandSideExpression(); + args = match('(') ? parseArguments() : []; + + return markerApply(marker, delegate.createNewExpression(callee, args)); + } + + function parseLeftHandSideExpressionAllowCall() { + var expr, args, marker = markerCreate(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = markerApply(marker, delegate.createCallExpression(expr, args)); + } else if (match('[')) { + expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); + } else if (match('.')) { + expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); + } else { + expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); + } + } + + return expr; + } + + function parseLeftHandSideExpression() { + var expr, marker = markerCreate(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = markerApply(marker, delegate.createMemberExpression('[', expr, parseComputedMember())); + } else if (match('.')) { + expr = markerApply(marker, delegate.createMemberExpression('.', expr, parseNonComputedMember())); + } else { + expr = markerApply(marker, delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral())); + } + } + + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var marker = markerCreate(), + expr = parseLeftHandSideExpressionAllowCall(), + token; + + if (lookahead.type !== Token.Punctuator) { + return expr; + } + + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + token = lex(); + expr = markerApply(marker, delegate.createPostfixExpression(token.value, expr)); + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var marker, token, expr; + + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + return parsePostfixExpression(); + } + + if (match('++') || match('--')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + } + + if (match('+') || match('-') || match('~') || match('!')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + return markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + } + + if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + marker = markerCreate(); + token = lex(); + expr = parseUnaryExpression(); + expr = markerApply(marker, delegate.createUnaryExpression(token.value, expr)); + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + return expr; + } + + return parsePostfixExpression(); + } + + function binaryPrecedence(token, allowIn) { + var prec = 0; + + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + + switch (token.value) { + case '||': + prec = 1; + break; + + case '&&': + prec = 2; + break; + + case '|': + prec = 3; + break; + + case '^': + prec = 4; + break; + + case '&': + prec = 5; + break; + + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; + + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; + + case 'in': + prec = allowIn ? 7 : 0; + break; + + case '<<': + case '>>': + case '>>>': + prec = 8; + break; + + case '+': + case '-': + prec = 9; + break; + + case '*': + case '/': + case '%': + prec = 11; + break; + + default: + break; + } + + return prec; + } + + // 11.5 Multiplicative Operators + // 11.6 Additive Operators + // 11.7 Bitwise Shift Operators + // 11.8 Relational Operators + // 11.9 Equality Operators + // 11.10 Binary Bitwise Operators + // 11.11 Binary Logical Operators + + function parseBinaryExpression() { + var expr, token, prec, previousAllowIn, stack, right, operator, left, i, + marker, markers; + + previousAllowIn = state.allowIn; + state.allowIn = true; + + marker = markerCreate(); + left = parseUnaryExpression(); + + token = lookahead; + prec = binaryPrecedence(token, previousAllowIn); + if (prec === 0) { + return left; + } + token.prec = prec; + lex(); + + markers = [marker, markerCreate()]; + right = parseUnaryExpression(); + + stack = [left, token, right]; + + while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) { + + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + expr = delegate.createBinaryExpression(operator, left, right); + markers.pop(); + marker = markers.pop(); + markerApply(marker, expr); + stack.push(expr); + markers.push(marker); + } + + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + markers.push(markerCreate()); + expr = parseUnaryExpression(); + stack.push(expr); + } + + state.allowIn = previousAllowIn; + + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + markers.pop(); + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + marker = markers.pop(); + markerApply(marker, expr); + } + + return expr; + } + + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate, marker = markerCreate(); + expr = parseBinaryExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + alternate = parseAssignmentExpression(); + + expr = markerApply(marker, delegate.createConditionalExpression(expr, consequent, alternate)); + } + + return expr; + } + + // 11.13 Assignment Operators + + // 12.14.5 AssignmentPattern + + function reinterpretAsAssignmentBindingPattern(expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.type === Syntax.SpreadProperty) { + if (i < len - 1) { + throwError({}, Messages.PropertyAfterSpreadProperty); + } + reinterpretAsAssignmentBindingPattern(property.argument); + } else { + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInAssignment); + } + reinterpretAsAssignmentBindingPattern(property.value); + } + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + /* istanbul ignore else */ + if (element) { + reinterpretAsAssignmentBindingPattern(element); + } + } + } else if (expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } else if (expr.type === Syntax.SpreadElement) { + reinterpretAsAssignmentBindingPattern(expr.argument); + if (expr.argument.type === Syntax.ObjectPattern) { + throwError({}, Messages.ObjectPatternAsSpread); + } + } else { + /* istanbul ignore else */ + if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } + } + + // 13.2.3 BindingPattern + + function reinterpretAsDestructuredParameter(options, expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.type === Syntax.SpreadProperty) { + if (i < len - 1) { + throwError({}, Messages.PropertyAfterSpreadProperty); + } + reinterpretAsDestructuredParameter(options, property.argument); + } else { + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, property.value); + } + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsDestructuredParameter(options, element); + } + } + } else if (expr.type === Syntax.Identifier) { + validateParam(options, expr, expr.name); + } else if (expr.type === Syntax.SpreadElement) { + // BindingRestElement only allows BindingIdentifier + if (expr.argument.type !== Syntax.Identifier) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + validateParam(options, expr.argument, expr.argument.name); + } else { + throwError({}, Messages.InvalidLHSInFormalsList); + } + } + + function reinterpretAsCoverFormalsList(expressions) { + var i, len, param, params, defaults, defaultCount, options, rest; + + params = []; + defaults = []; + defaultCount = 0; + rest = null; + options = { + paramSet: new StringMap() + }; + + for (i = 0, len = expressions.length; i < len; i += 1) { + param = expressions[i]; + if (param.type === Syntax.Identifier) { + params.push(param); + defaults.push(null); + validateParam(options, param, param.name); + } else if (param.type === Syntax.ObjectExpression || param.type === Syntax.ArrayExpression) { + reinterpretAsDestructuredParameter(options, param); + params.push(param); + defaults.push(null); + } else if (param.type === Syntax.SpreadElement) { + assert(i === len - 1, 'It is guaranteed that SpreadElement is last element by parseExpression'); + if (param.argument.type !== Syntax.Identifier) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, param.argument); + rest = param.argument; + } else if (param.type === Syntax.AssignmentExpression) { + params.push(param.left); + defaults.push(param.right); + ++defaultCount; + validateParam(options, param.left, param.left.name); + } else { + return null; + } + } + + if (options.message === Messages.StrictParamDupe) { + throwError( + strict ? options.stricted : options.firstRestricted, + options.message + ); + } + + if (defaultCount === 0) { + defaults = []; + } + + return { + params: params, + defaults: defaults, + rest: rest, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + } + + function parseArrowFunctionExpression(options, marker) { + var previousStrict, previousYieldAllowed, previousAwaitAllowed, body; + + expect('=>'); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = !!options.async; + body = parseConciseBody(); + + if (strict && options.firstRestricted) { + throwError(options.firstRestricted, options.message); + } + if (strict && options.stricted) { + throwErrorTolerant(options.stricted, options.message); + } + + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply(marker, delegate.createArrowFunctionExpression( + options.params, + options.defaults, + body, + options.rest, + body.type !== Syntax.BlockStatement, + !!options.async + )); + } + + function parseAssignmentExpression() { + var marker, expr, token, params, oldParenthesizedCount, + startsWithParen = false, backtrackToken = lookahead, + possiblyAsync = false; + + if (matchYield()) { + return parseYieldExpression(); + } + + if (matchAwait()) { + return parseAwaitExpression(); + } + + oldParenthesizedCount = state.parenthesizedCount; + + marker = markerCreate(); + + if (matchAsyncFuncExprOrDecl()) { + return parseFunctionExpression(); + } + + if (matchAsync()) { + // We can't be completely sure that this 'async' token is + // actually a contextual keyword modifying a function + // expression, so we might have to un-lex() it later by + // calling rewind(backtrackToken). + possiblyAsync = true; + lex(); + } + + if (match('(')) { + token = lookahead2(); + if ((token.type === Token.Punctuator && token.value === ')') || token.value === '...') { + params = parseParams(); + if (!match('=>')) { + throwUnexpected(lex()); + } + params.async = possiblyAsync; + return parseArrowFunctionExpression(params, marker); + } + startsWithParen = true; + } + + token = lookahead; + + // If the 'async' keyword is not followed by a '(' character or an + // identifier, then it can't be an arrow function modifier, and we + // should interpret it as a normal identifer. + if (possiblyAsync && !match('(') && token.type !== Token.Identifier) { + possiblyAsync = false; + rewind(backtrackToken); + } + + expr = parseConditionalExpression(); + + if (match('=>') && + (state.parenthesizedCount === oldParenthesizedCount || + state.parenthesizedCount === (oldParenthesizedCount + 1))) { + if (expr.type === Syntax.Identifier) { + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.AssignmentExpression || + expr.type === Syntax.ArrayExpression || + expr.type === Syntax.ObjectExpression) { + if (!startsWithParen) { + throwUnexpected(lex()); + } + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.SequenceExpression) { + params = reinterpretAsCoverFormalsList(expr.expressions); + } + if (params) { + params.async = possiblyAsync; + return parseArrowFunctionExpression(params, marker); + } + } + + // If we haven't returned by now, then the 'async' keyword was not + // a function modifier, and we should rewind and interpret it as a + // normal identifier. + if (possiblyAsync) { + possiblyAsync = false; + rewind(backtrackToken); + expr = parseConditionalExpression(); + } + + if (matchAssign()) { + // 11.13.1 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + // ES.next draf 11.13 Runtime Semantics step 1 + if (match('=') && (expr.type === Syntax.ObjectExpression || expr.type === Syntax.ArrayExpression)) { + reinterpretAsAssignmentBindingPattern(expr); + } else if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + expr = markerApply(marker, delegate.createAssignmentExpression(lex().value, expr, parseAssignmentExpression())); + } + + return expr; + } + + // 11.14 Comma Operator + + function parseExpression() { + var marker, expr, expressions, sequence, spreadFound; + + marker = markerCreate(); + expr = parseAssignmentExpression(); + expressions = [ expr ]; + + if (match(',')) { + while (index < length) { + if (!match(',')) { + break; + } + + lex(); + expr = parseSpreadOrAssignmentExpression(); + expressions.push(expr); + + if (expr.type === Syntax.SpreadElement) { + spreadFound = true; + if (!match(')')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + break; + } + } + + sequence = markerApply(marker, delegate.createSequenceExpression(expressions)); + } + + if (spreadFound && lookahead2().value !== '=>') { + throwError({}, Messages.IllegalSpread); + } + + return sequence || expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block, marker = markerCreate(); + + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return markerApply(marker, delegate.createBlockStatement(block)); + } + + // 12.2 Variable Statement + + function parseTypeParameterDeclaration() { + var marker = markerCreate(), paramTypes = []; + + expect('<'); + while (!match('>')) { + paramTypes.push(parseTypeAnnotatableIdentifier()); + if (!match('>')) { + expect(','); + } + } + expect('>'); + + return markerApply(marker, delegate.createTypeParameterDeclaration( + paramTypes + )); + } + + function parseTypeParameterInstantiation() { + var marker = markerCreate(), oldInType = state.inType, paramTypes = []; + + state.inType = true; + + expect('<'); + while (!match('>')) { + paramTypes.push(parseType()); + if (!match('>')) { + expect(','); + } + } + expect('>'); + + state.inType = oldInType; + + return markerApply(marker, delegate.createTypeParameterInstantiation( + paramTypes + )); + } + + function parseObjectTypeIndexer(marker, isStatic) { + var id, key, value; + + expect('['); + id = parseObjectPropertyKey(); + expect(':'); + key = parseType(); + expect(']'); + expect(':'); + value = parseType(); + + return markerApply(marker, delegate.createObjectTypeIndexer( + id, + key, + value, + isStatic + )); + } + + function parseObjectTypeMethodish(marker) { + var params = [], rest = null, returnType, typeParameters = null; + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + expect('('); + while (lookahead.type === Token.Identifier) { + params.push(parseFunctionTypeParam()); + if (!match(')')) { + expect(','); + } + } + + if (match('...')) { + lex(); + rest = parseFunctionTypeParam(); + } + expect(')'); + expect(':'); + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + } + + function parseObjectTypeMethod(marker, isStatic, key) { + var optional = false, value; + value = parseObjectTypeMethodish(marker); + + return markerApply(marker, delegate.createObjectTypeProperty( + key, + value, + optional, + isStatic + )); + } + + function parseObjectTypeCallProperty(marker, isStatic) { + var valueMarker = markerCreate(); + return markerApply(marker, delegate.createObjectTypeCallProperty( + parseObjectTypeMethodish(valueMarker), + isStatic + )); + } + + function parseObjectType(allowStatic) { + var callProperties = [], indexers = [], marker, optional = false, + properties = [], propertyKey, propertyTypeAnnotation, + token, isStatic, matchStatic; + + expect('{'); + + while (!match('}')) { + marker = markerCreate(); + matchStatic = + strict + ? matchKeyword('static') + : matchContextualKeyword('static'); + + if (allowStatic && matchStatic) { + token = lex(); + isStatic = true; + } + + if (match('[')) { + indexers.push(parseObjectTypeIndexer(marker, isStatic)); + } else if (match('(') || match('<')) { + callProperties.push(parseObjectTypeCallProperty(marker, allowStatic)); + } else { + if (isStatic && match(':')) { + propertyKey = markerApply(marker, delegate.createIdentifier(token)); + throwErrorTolerant(token, Messages.StrictReservedWord); + } else { + propertyKey = parseObjectPropertyKey(); + } + if (match('<') || match('(')) { + // This is a method property + properties.push(parseObjectTypeMethod(marker, isStatic, propertyKey)); + } else { + if (match('?')) { + lex(); + optional = true; + } + expect(':'); + propertyTypeAnnotation = parseType(); + properties.push(markerApply(marker, delegate.createObjectTypeProperty( + propertyKey, + propertyTypeAnnotation, + optional, + isStatic + ))); + } + } + + if (match(';')) { + lex(); + } else if (!match('}')) { + throwUnexpected(lookahead); + } + } + + expect('}'); + + return delegate.createObjectTypeAnnotation( + properties, + indexers, + callProperties + ); + } + + function parseGenericType() { + var marker = markerCreate(), + typeParameters = null, typeIdentifier; + + typeIdentifier = parseVariableIdentifier(); + + while (match('.')) { + expect('.'); + typeIdentifier = markerApply(marker, delegate.createQualifiedTypeIdentifier( + typeIdentifier, + parseVariableIdentifier() + )); + } + + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } + + return markerApply(marker, delegate.createGenericTypeAnnotation( + typeIdentifier, + typeParameters + )); + } + + function parseVoidType() { + var marker = markerCreate(); + expectKeyword('void'); + return markerApply(marker, delegate.createVoidTypeAnnotation()); + } + + function parseTypeofType() { + var argument, marker = markerCreate(); + expectKeyword('typeof'); + argument = parsePrimaryType(); + return markerApply(marker, delegate.createTypeofTypeAnnotation( + argument + )); + } + + function parseTupleType() { + var marker = markerCreate(), types = []; + expect('['); + // We allow trailing commas + while (index < length && !match(']')) { + types.push(parseType()); + if (match(']')) { + break; + } + expect(','); + } + expect(']'); + return markerApply(marker, delegate.createTupleTypeAnnotation( + types + )); + } + + function parseFunctionTypeParam() { + var marker = markerCreate(), name, optional = false, typeAnnotation; + name = parseVariableIdentifier(); + if (match('?')) { + lex(); + optional = true; + } + expect(':'); + typeAnnotation = parseType(); + return markerApply(marker, delegate.createFunctionTypeParam( + name, + typeAnnotation, + optional + )); + } + + function parseFunctionTypeParams() { + var ret = { params: [], rest: null }; + while (lookahead.type === Token.Identifier) { + ret.params.push(parseFunctionTypeParam()); + if (!match(')')) { + expect(','); + } + } + + if (match('...')) { + lex(); + ret.rest = parseFunctionTypeParam(); + } + return ret; + } + + // The parsing of types roughly parallels the parsing of expressions, and + // primary types are kind of like primary expressions...they're the + // primitives with which other types are constructed. + function parsePrimaryType() { + var params = null, returnType = null, + marker = markerCreate(), rest = null, tmp, + typeParameters, token, type, isGroupedType = false; + + switch (lookahead.type) { + case Token.Identifier: + switch (lookahead.value) { + case 'any': + lex(); + return markerApply(marker, delegate.createAnyTypeAnnotation()); + case 'bool': // fallthrough + case 'boolean': + lex(); + return markerApply(marker, delegate.createBooleanTypeAnnotation()); + case 'number': + lex(); + return markerApply(marker, delegate.createNumberTypeAnnotation()); + case 'string': + lex(); + return markerApply(marker, delegate.createStringTypeAnnotation()); + } + return markerApply(marker, parseGenericType()); + case Token.Punctuator: + switch (lookahead.value) { + case '{': + return markerApply(marker, parseObjectType()); + case '[': + return parseTupleType(); + case '<': + typeParameters = parseTypeParameterDeclaration(); + expect('('); + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + expect(')'); + + expect('=>'); + + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + case '(': + lex(); + // Check to see if this is actually a grouped type + if (!match(')') && !match('...')) { + if (lookahead.type === Token.Identifier) { + token = lookahead2(); + isGroupedType = token.value !== '?' && token.value !== ':'; + } else { + isGroupedType = true; + } + } + + if (isGroupedType) { + type = parseType(); + expect(')'); + + // If we see a => next then someone was probably confused about + // function types, so we can provide a better error message + if (match('=>')) { + throwError({}, Messages.ConfusedAboutFunctionType); + } + + return type; + } + + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + + expect(')'); + + expect('=>'); + + returnType = parseType(); + + return markerApply(marker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + null /* typeParameters */ + )); + } + break; + case Token.Keyword: + switch (lookahead.value) { + case 'void': + return markerApply(marker, parseVoidType()); + case 'typeof': + return markerApply(marker, parseTypeofType()); + } + break; + case Token.StringLiteral: + token = lex(); + if (token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return markerApply(marker, delegate.createStringLiteralTypeAnnotation( + token + )); + } + + throwUnexpected(lookahead); + } + + function parsePostfixType() { + var marker = markerCreate(), t = parsePrimaryType(); + if (match('[')) { + expect('['); + expect(']'); + return markerApply(marker, delegate.createArrayTypeAnnotation(t)); + } + return t; + } + + function parsePrefixType() { + var marker = markerCreate(); + if (match('?')) { + lex(); + return markerApply(marker, delegate.createNullableTypeAnnotation( + parsePrefixType() + )); + } + return parsePostfixType(); + } + + + function parseIntersectionType() { + var marker = markerCreate(), type, types; + type = parsePrefixType(); + types = [type]; + while (match('&')) { + lex(); + types.push(parsePrefixType()); + } + + return types.length === 1 ? + type : + markerApply(marker, delegate.createIntersectionTypeAnnotation( + types + )); + } + + function parseUnionType() { + var marker = markerCreate(), type, types; + type = parseIntersectionType(); + types = [type]; + while (match('|')) { + lex(); + types.push(parseIntersectionType()); + } + return types.length === 1 ? + type : + markerApply(marker, delegate.createUnionTypeAnnotation( + types + )); + } + + function parseType() { + var oldInType = state.inType, type; + state.inType = true; + + type = parseUnionType(); + + state.inType = oldInType; + return type; + } + + function parseTypeAnnotation() { + var marker = markerCreate(), type; + + expect(':'); + type = parseType(); + + return markerApply(marker, delegate.createTypeAnnotation(type)); + } + + function parseVariableIdentifier() { + var marker = markerCreate(), + token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return markerApply(marker, delegate.createIdentifier(token.value)); + } + + function parseTypeAnnotatableIdentifier(requireTypeAnnotation, canBeOptionalParam) { + var marker = markerCreate(), + ident = parseVariableIdentifier(), + isOptionalParam = false; + + if (canBeOptionalParam && match('?')) { + expect('?'); + isOptionalParam = true; + } + + if (requireTypeAnnotation || match(':')) { + ident.typeAnnotation = parseTypeAnnotation(); + ident = markerApply(marker, ident); + } + + if (isOptionalParam) { + ident.optional = true; + ident = markerApply(marker, ident); + } + + return ident; + } + + function parseVariableDeclaration(kind) { + var id, + marker = markerCreate(), + init = null, + typeAnnotationMarker = markerCreate(); + if (match('{')) { + id = parseObjectInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + if (match(':')) { + id.typeAnnotation = parseTypeAnnotation(); + markerApply(typeAnnotationMarker, id); + } + } else if (match('[')) { + id = parseArrayInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + if (match(':')) { + id.typeAnnotation = parseTypeAnnotation(); + markerApply(typeAnnotationMarker, id); + } + } else { + /* istanbul ignore next */ + id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + } + + if (kind === 'const') { + if (!match('=')) { + throwError({}, Messages.NoUninitializedConst); + } + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return markerApply(marker, delegate.createVariableDeclarator(id, init)); + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations, marker = markerCreate(); + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, 'var')); + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations, marker = markerCreate(); + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, kind)); + } + + // people.mozilla.org/~jorendorff/es6-draft.html + + function parseModuleSpecifier() { + var marker = markerCreate(), + specifier; + + if (lookahead.type !== Token.StringLiteral) { + throwError({}, Messages.InvalidModuleSpecifier); + } + specifier = delegate.createModuleSpecifier(lookahead); + lex(); + return markerApply(marker, specifier); + } + + function parseExportBatchSpecifier() { + var marker = markerCreate(); + expect('*'); + return markerApply(marker, delegate.createExportBatchSpecifier()); + } + + function parseExportSpecifier() { + var id, name = null, marker = markerCreate(), from; + if (matchKeyword('default')) { + lex(); + id = markerApply(marker, delegate.createIdentifier('default')); + // export {default} from "something"; + } else { + id = parseVariableIdentifier(); + } + if (matchContextualKeyword('as')) { + lex(); + name = parseNonComputedProperty(); + } + + return markerApply(marker, delegate.createExportSpecifier(id, name)); + } + + function parseExportDeclaration() { + var declaration = null, + possibleIdentifierToken, sourceElement, + isExportFromIdentifier, + src = null, specifiers = [], + marker = markerCreate(); + + expectKeyword('export'); + + if (matchKeyword('default')) { + // covers: + // export default ... + lex(); + if (matchKeyword('function') || matchKeyword('class')) { + possibleIdentifierToken = lookahead2(); + if (isIdentifierName(possibleIdentifierToken)) { + // covers: + // export default function foo () {} + // export default class foo {} + sourceElement = parseSourceElement(); + return markerApply(marker, delegate.createExportDeclaration(true, sourceElement, [sourceElement.id], null)); + } + // covers: + // export default function () {} + // export default class {} + switch (lookahead.value) { + case 'class': + return markerApply(marker, delegate.createExportDeclaration(true, parseClassExpression(), [], null)); + case 'function': + return markerApply(marker, delegate.createExportDeclaration(true, parseFunctionExpression(), [], null)); + } + } + + if (matchContextualKeyword('from')) { + throwError({}, Messages.UnexpectedToken, lookahead.value); + } + + // covers: + // export default {}; + // export default []; + if (match('{')) { + declaration = parseObjectInitialiser(); + } else if (match('[')) { + declaration = parseArrayInitialiser(); + } else { + declaration = parseAssignmentExpression(); + } + consumeSemicolon(); + return markerApply(marker, delegate.createExportDeclaration(true, declaration, [], null)); + } + + // non-default export + if (lookahead.type === Token.Keyword || matchContextualKeyword('type')) { + // covers: + // export var f = 1; + switch (lookahead.value) { + case 'type': + case 'let': + case 'const': + case 'var': + case 'class': + case 'function': + return markerApply(marker, delegate.createExportDeclaration(false, parseSourceElement(), specifiers, null)); + } + } + + if (match('*')) { + // covers: + // export * from "foo"; + specifiers.push(parseExportBatchSpecifier()); + + if (!matchContextualKeyword('from')) { + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + + return markerApply(marker, delegate.createExportDeclaration(false, null, specifiers, src)); + } + + expect('{'); + if (!match('}')) { + do { + isExportFromIdentifier = isExportFromIdentifier || matchKeyword('default'); + specifiers.push(parseExportSpecifier()); + } while (match(',') && lex()); + } + expect('}'); + + if (matchContextualKeyword('from')) { + // covering: + // export {default} from "foo"; + // export {foo} from "foo"; + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + } else if (isExportFromIdentifier) { + // covering: + // export {default}; // missing fromClause + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } else { + // cover + // export {foo}; + consumeSemicolon(); + } + return markerApply(marker, delegate.createExportDeclaration(false, declaration, specifiers, src)); + } + + + function parseImportSpecifier() { + // import {<foo as bar>} ...; + var id, name = null, marker = markerCreate(); + + id = parseNonComputedProperty(); + if (matchContextualKeyword('as')) { + lex(); + name = parseVariableIdentifier(); + } + + return markerApply(marker, delegate.createImportSpecifier(id, name)); + } + + function parseNamedImports() { + var specifiers = []; + // {foo, bar as bas} + expect('{'); + if (!match('}')) { + do { + specifiers.push(parseImportSpecifier()); + } while (match(',') && lex()); + } + expect('}'); + return specifiers; + } + + function parseImportDefaultSpecifier() { + // import <foo> ...; + var id, marker = markerCreate(); + + id = parseNonComputedProperty(); + + return markerApply(marker, delegate.createImportDefaultSpecifier(id)); + } + + function parseImportNamespaceSpecifier() { + // import <* as foo> ...; + var id, marker = markerCreate(); + + expect('*'); + if (!matchContextualKeyword('as')) { + throwError({}, Messages.NoAsAfterImportNamespace); + } + lex(); + id = parseNonComputedProperty(); + + return markerApply(marker, delegate.createImportNamespaceSpecifier(id)); + } + + function parseImportDeclaration() { + var specifiers, src, marker = markerCreate(), isType = false, token2; + + expectKeyword('import'); + + if (matchContextualKeyword('type')) { + token2 = lookahead2(); + if ((token2.type === Token.Identifier && token2.value !== 'from') || + (token2.type === Token.Punctuator && + (token2.value === '{' || token2.value === '*'))) { + isType = true; + lex(); + } + } + + specifiers = []; + + if (lookahead.type === Token.StringLiteral) { + // covers: + // import "foo"; + src = parseModuleSpecifier(); + consumeSemicolon(); + return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); + } + + if (!matchKeyword('default') && isIdentifierName(lookahead)) { + // covers: + // import foo + // import foo, ... + specifiers.push(parseImportDefaultSpecifier()); + if (match(',')) { + lex(); + } + } + if (match('*')) { + // covers: + // import foo, * as foo + // import * as foo + specifiers.push(parseImportNamespaceSpecifier()); + } else if (match('{')) { + // covers: + // import foo, {bar} + // import {bar} + specifiers = specifiers.concat(parseNamedImports()); + } + + if (!matchContextualKeyword('from')) { + throwError({}, lookahead.value ? + Messages.UnexpectedToken : Messages.MissingFromClause, lookahead.value); + } + lex(); + src = parseModuleSpecifier(); + consumeSemicolon(); + + return markerApply(marker, delegate.createImportDeclaration(specifiers, src, isType)); + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + var marker = markerCreate(); + expect(';'); + return markerApply(marker, delegate.createEmptyStatement()); + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var marker = markerCreate(), expr = parseExpression(); + consumeSemicolon(); + return markerApply(marker, delegate.createExpressionStatement(expr)); + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate, marker = markerCreate(); + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return markerApply(marker, delegate.createIfStatement(test, consequent, alternate)); + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration, marker = markerCreate(); + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return markerApply(marker, delegate.createDoWhileStatement(body, test)); + } + + function parseWhileStatement() { + var test, body, oldInIteration, marker = markerCreate(); + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return markerApply(marker, delegate.createWhileStatement(test, body)); + } + + function parseForVariableDeclaration() { + var marker = markerCreate(), + token = lex(), + declarations = parseVariableDeclarationList(); + + return markerApply(marker, delegate.createVariableDeclaration(declarations, token.value)); + } + + function parseForStatement(opts) { + var init, test, update, left, right, body, operator, oldInIteration, + marker = markerCreate(); + init = test = update = null; + expectKeyword('for'); + + // http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators&s=each + if (matchContextualKeyword('each')) { + throwError({}, Messages.EachNotAllowed); + } + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let') || matchKeyword('const')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + + if (init.declarations.length === 1) { + if (matchKeyword('in') || matchContextualKeyword('of')) { + operator = lookahead; + if (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + + if (matchContextualKeyword('of')) { + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } else if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isAssignableLeftHandSide(init)) { + throwError({}, Messages.InvalidLHSInForIn); + } + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + if (!(opts !== undefined && opts.ignoreBody)) { + body = parseStatement(); + } + + state.inIteration = oldInIteration; + + if (typeof left === 'undefined') { + return markerApply(marker, delegate.createForStatement(init, test, update, body)); + } + + if (operator.value === 'in') { + return markerApply(marker, delegate.createForInStatement(left, right, body)); + } + return markerApply(marker, delegate.createForOfStatement(left, right, body)); + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var label = null, marker = markerCreate(); + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(index) === 59) { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(null)); + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(null)); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!state.labelSet.has(label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return markerApply(marker, delegate.createContinueStatement(label)); + } + + // 12.8 The break statement + + function parseBreakStatement() { + var label = null, marker = markerCreate(); + + expectKeyword('break'); + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(null)); + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(null)); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!state.labelSet.has(label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return markerApply(marker, delegate.createBreakStatement(label)); + } + + // 12.9 The return statement + + function parseReturnStatement() { + var argument = null, marker = markerCreate(); + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(index) === 32) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return markerApply(marker, delegate.createReturnStatement(argument)); + } + } + + if (peekLineTerminator()) { + return markerApply(marker, delegate.createReturnStatement(null)); + } + + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return markerApply(marker, delegate.createReturnStatement(argument)); + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body, marker = markerCreate(); + + if (strict) { + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return markerApply(marker, delegate.createWithStatement(object, body)); + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, + consequent = [], + sourceElement, + marker = markerCreate(); + + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + consequent.push(sourceElement); + } + + return markerApply(marker, delegate.createSwitchCase(test, consequent)); + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound, marker = markerCreate(); + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return markerApply(marker, delegate.createSwitchStatement(discriminant, cases)); + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument, marker = markerCreate(); + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createThrowStatement(argument)); + } + + // 12.14 The try statement + + function parseCatchClause() { + var param, body, marker = markerCreate(); + + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead); + } + + param = parseExpression(); + // 12.14.1 + if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + body = parseBlock(); + return markerApply(marker, delegate.createCatchClause(param, body)); + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null, marker = markerCreate(); + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return markerApply(marker, delegate.createTryStatement(block, [], handlers, finalizer)); + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + var marker = markerCreate(); + expectKeyword('debugger'); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDebuggerStatement()); + } + + // 12 Statements + + function parseStatement() { + var type = lookahead.type, + marker, + expr, + labeledBody; + + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return parseEmptyStatement(); + case '{': + return parseBlock(); + case '(': + return parseExpressionStatement(); + default: + break; + } + } + + if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return parseBreakStatement(); + case 'continue': + return parseContinueStatement(); + case 'debugger': + return parseDebuggerStatement(); + case 'do': + return parseDoWhileStatement(); + case 'for': + return parseForStatement(); + case 'function': + return parseFunctionDeclaration(); + case 'class': + return parseClassDeclaration(); + case 'if': + return parseIfStatement(); + case 'return': + return parseReturnStatement(); + case 'switch': + return parseSwitchStatement(); + case 'throw': + return parseThrowStatement(); + case 'try': + return parseTryStatement(); + case 'var': + return parseVariableStatement(); + case 'while': + return parseWhileStatement(); + case 'with': + return parseWithStatement(); + default: + break; + } + } + + if (matchAsyncFuncExprOrDecl()) { + return parseFunctionDeclaration(); + } + + marker = markerCreate(); + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + if (state.labelSet.has(expr.name)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet.set(expr.name, true); + labeledBody = parseStatement(); + state.labelSet["delete"](expr.name); + return markerApply(marker, delegate.createLabeledStatement(expr, labeledBody)); + } + + consumeSemicolon(); + + return markerApply(marker, delegate.createExpressionStatement(expr)); + } + + // 13 Function Definition + + function parseConciseBody() { + if (match('{')) { + return parseFunctionSourceElements(); + } + return parseAssignmentExpression(); + } + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount, + marker = markerCreate(); + + expect('{'); + + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + oldParenthesizedCount = state.parenthesizedCount; + + state.labelSet = new StringMap(); + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + state.parenthesizedCount = 0; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + state.parenthesizedCount = oldParenthesizedCount; + + return markerApply(marker, delegate.createBlockStatement(sourceElements)); + } + + function validateParam(options, param, name) { + if (strict) { + if (isRestrictedWord(name)) { + options.stricted = param; + options.message = Messages.StrictParamName; + } + if (options.paramSet.has(name)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictReservedWord; + } else if (options.paramSet.has(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamDupe; + } + } + options.paramSet.set(name, true); + } + + function parseParam(options) { + var marker, token, rest, param, def; + + token = lookahead; + if (token.value === '...') { + token = lex(); + rest = true; + } + + if (match('[')) { + marker = markerCreate(); + param = parseArrayInitialiser(); + reinterpretAsDestructuredParameter(options, param); + if (match(':')) { + param.typeAnnotation = parseTypeAnnotation(); + markerApply(marker, param); + } + } else if (match('{')) { + marker = markerCreate(); + if (rest) { + throwError({}, Messages.ObjectPatternAsRestParameter); + } + param = parseObjectInitialiser(); + reinterpretAsDestructuredParameter(options, param); + if (match(':')) { + param.typeAnnotation = parseTypeAnnotation(); + markerApply(marker, param); + } + } else { + param = + rest + ? parseTypeAnnotatableIdentifier( + false, /* requireTypeAnnotation */ + false /* canBeOptionalParam */ + ) + : parseTypeAnnotatableIdentifier( + false, /* requireTypeAnnotation */ + true /* canBeOptionalParam */ + ); + + validateParam(options, token, token.value); + } + + if (match('=')) { + if (rest) { + throwErrorTolerant(lookahead, Messages.DefaultRestParameter); + } + lex(); + def = parseAssignmentExpression(); + ++options.defaultCount; + } + + if (rest) { + if (!match(')')) { + throwError({}, Messages.ParameterAfterRestParameter); + } + options.rest = param; + return false; + } + + options.params.push(param); + options.defaults.push(def); + return !match(')'); + } + + function parseParams(firstRestricted) { + var options, marker = markerCreate(); + + options = { + params: [], + defaultCount: 0, + defaults: [], + rest: null, + firstRestricted: firstRestricted + }; + + expect('('); + + if (!match(')')) { + options.paramSet = new StringMap(); + while (index < length) { + if (!parseParam(options)) { + break; + } + expect(','); + } + } + + expect(')'); + + if (options.defaultCount === 0) { + options.defaults = []; + } + + if (match(':')) { + options.returnType = parseTypeAnnotation(); + } + + return markerApply(marker, options); + } + + function parseFunctionDeclaration() { + var id, body, token, tmp, firstRestricted, message, generator, isAsync, + previousStrict, previousYieldAllowed, previousAwaitAllowed, + marker = markerCreate(), typeParameters; + + isAsync = false; + if (matchAsync()) { + lex(); + isAsync = true; + } + + expectKeyword('function'); + + generator = false; + if (match('*')) { + lex(); + generator = true; + } + + token = lookahead; + + id = parseVariableIdentifier(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = isAsync; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply( + marker, + delegate.createFunctionDeclaration( + id, + tmp.params, + tmp.defaults, + body, + tmp.rest, + generator, + false, + isAsync, + tmp.returnType, + typeParameters + ) + ); + } + + function parseFunctionExpression() { + var token, id = null, firstRestricted, message, tmp, body, generator, isAsync, + previousStrict, previousYieldAllowed, previousAwaitAllowed, + marker = markerCreate(), typeParameters; + + isAsync = false; + if (matchAsync()) { + lex(); + isAsync = true; + } + + expectKeyword('function'); + + generator = false; + + if (match('*')) { + lex(); + generator = true; + } + + if (!match('(')) { + if (!match('<')) { + token = lookahead; + id = parseVariableIdentifier(); + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + previousAwaitAllowed = state.awaitAllowed; + state.awaitAllowed = isAsync; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + state.awaitAllowed = previousAwaitAllowed; + + return markerApply( + marker, + delegate.createFunctionExpression( + id, + tmp.params, + tmp.defaults, + body, + tmp.rest, + generator, + false, + isAsync, + tmp.returnType, + typeParameters + ) + ); + } + + function parseYieldExpression() { + var delegateFlag, expr, marker = markerCreate(); + + expectKeyword('yield', !strict); + + delegateFlag = false; + if (match('*')) { + lex(); + delegateFlag = true; + } + + expr = parseAssignmentExpression(); + + return markerApply(marker, delegate.createYieldExpression(expr, delegateFlag)); + } + + function parseAwaitExpression() { + var expr, marker = markerCreate(); + expectContextualKeyword('await'); + expr = parseAssignmentExpression(); + return markerApply(marker, delegate.createAwaitExpression(expr)); + } + + // 14 Functions and classes + + // 14.1 Functions is defined above (13 in ES5) + // 14.2 Arrow Functions Definitions is defined in (7.3 assignments) + + // 14.3 Method Definitions + // 14.3.7 + function specialMethod(methodDefinition) { + return methodDefinition.kind === 'get' || + methodDefinition.kind === 'set' || + methodDefinition.value.generator; + } + + function parseMethodDefinition(key, isStatic, generator, computed) { + var token, param, propType, + isAsync, typeParameters, tokenValue, returnType; + + propType = isStatic ? ClassPropertyType["static"] : ClassPropertyType.prototype; + + if (generator) { + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ generator: true }), + computed + ); + } + + tokenValue = key.type === 'Identifier' && key.name; + + if (tokenValue === 'get' && !match('(')) { + key = parseObjectPropertyKey(); + + expect('('); + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + return delegate.createMethodDefinition( + propType, + 'get', + key, + parsePropertyFunction({ generator: false, returnType: returnType }), + computed + ); + } + if (tokenValue === 'set' && !match('(')) { + key = parseObjectPropertyKey(); + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + if (match(':')) { + returnType = parseTypeAnnotation(); + } + return delegate.createMethodDefinition( + propType, + 'set', + key, + parsePropertyFunction({ + params: param, + generator: false, + name: token, + returnType: returnType + }), + computed + ); + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + isAsync = tokenValue === 'async' && !match('('); + if (isAsync) { + key = parseObjectPropertyKey(); + } + + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ + generator: false, + async: isAsync, + typeParameters: typeParameters + }), + computed + ); + } + + function parseClassProperty(key, computed, isStatic) { + var typeAnnotation; + + typeAnnotation = parseTypeAnnotation(); + expect(';'); + + return delegate.createClassProperty( + key, + typeAnnotation, + computed, + isStatic + ); + } + + function parseClassElement() { + var computed = false, generator = false, key, marker = markerCreate(), + isStatic = false, possiblyOpenBracketToken; + if (match(';')) { + lex(); + return undefined; + } + + if (lookahead.value === 'static') { + lex(); + isStatic = true; + } + + if (match('*')) { + lex(); + generator = true; + } + + possiblyOpenBracketToken = lookahead; + if (matchContextualKeyword('get') || matchContextualKeyword('set')) { + possiblyOpenBracketToken = lookahead2(); + } + + if (possiblyOpenBracketToken.type === Token.Punctuator + && possiblyOpenBracketToken.value === '[') { + computed = true; + } + + key = parseObjectPropertyKey(); + + if (!generator && lookahead.value === ':') { + return markerApply(marker, parseClassProperty(key, computed, isStatic)); + } + + return markerApply(marker, parseMethodDefinition( + key, + isStatic, + generator, + computed + )); + } + + function parseClassBody() { + var classElement, classElements = [], existingProps = {}, + marker = markerCreate(), propName, propType; + + existingProps[ClassPropertyType["static"]] = new StringMap(); + existingProps[ClassPropertyType.prototype] = new StringMap(); + + expect('{'); + + while (index < length) { + if (match('}')) { + break; + } + classElement = parseClassElement(existingProps); + + if (typeof classElement !== 'undefined') { + classElements.push(classElement); + + propName = !classElement.computed && getFieldName(classElement.key); + if (propName !== false) { + propType = classElement["static"] ? + ClassPropertyType["static"] : + ClassPropertyType.prototype; + + if (classElement.type === Syntax.MethodDefinition) { + if (propName === 'constructor' && !classElement["static"]) { + if (specialMethod(classElement)) { + throwError(classElement, Messages.IllegalClassConstructorProperty); + } + if (existingProps[ClassPropertyType.prototype].has('constructor')) { + throwError(classElement.key, Messages.IllegalDuplicateClassProperty); + } + } + existingProps[propType].set(propName, true); + } + } + } + } + + expect('}'); + + return markerApply(marker, delegate.createClassBody(classElements)); + } + + function parseClassImplements() { + var id, implemented = [], marker, typeParameters; + if (strict) { + expectKeyword('implements'); + } else { + expectContextualKeyword('implements'); + } + while (index < length) { + marker = markerCreate(); + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } else { + typeParameters = null; + } + implemented.push(markerApply(marker, delegate.createClassImplements( + id, + typeParameters + ))); + if (!match(',')) { + break; + } + expect(','); + } + return implemented; + } + + function parseClassExpression() { + var id, implemented, previousYieldAllowed, superClass = null, + superTypeParameters, marker = markerCreate(), typeParameters, + matchImplements; + + expectKeyword('class'); + + matchImplements = + strict + ? matchKeyword('implements') + : matchContextualKeyword('implements'); + + if (!matchKeyword('extends') && !matchImplements && !match('{')) { + id = parseVariableIdentifier(); + } + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseLeftHandSideExpressionAllowCall(); + if (match('<')) { + superTypeParameters = parseTypeParameterInstantiation(); + } + state.yieldAllowed = previousYieldAllowed; + } + + if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { + implemented = parseClassImplements(); + } + + return markerApply(marker, delegate.createClassExpression( + id, + superClass, + parseClassBody(), + typeParameters, + superTypeParameters, + implemented + )); + } + + function parseClassDeclaration() { + var id, implemented, previousYieldAllowed, superClass = null, + superTypeParameters, marker = markerCreate(), typeParameters; + + expectKeyword('class'); + + id = parseVariableIdentifier(); + + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseLeftHandSideExpressionAllowCall(); + if (match('<')) { + superTypeParameters = parseTypeParameterInstantiation(); + } + state.yieldAllowed = previousYieldAllowed; + } + + if (strict ? matchKeyword('implements') : matchContextualKeyword('implements')) { + implemented = parseClassImplements(); + } + + return markerApply(marker, delegate.createClassDeclaration( + id, + superClass, + parseClassBody(), + typeParameters, + superTypeParameters, + implemented + )); + } + + // 15 Program + + function parseSourceElement() { + var token; + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(lookahead.value); + case 'function': + return parseFunctionDeclaration(); + case 'export': + throwErrorTolerant({}, Messages.IllegalExportDeclaration); + return parseExportDeclaration(); + case 'import': + throwErrorTolerant({}, Messages.IllegalImportDeclaration); + return parseImportDeclaration(); + case 'interface': + if (lookahead2().type === Token.Identifier) { + return parseInterface(); + } + return parseStatement(); + default: + return parseStatement(); + } + } + + if (matchContextualKeyword('type') + && lookahead2().type === Token.Identifier) { + return parseTypeAlias(); + } + + if (matchContextualKeyword('interface') + && lookahead2().type === Token.Identifier) { + return parseInterface(); + } + + if (matchContextualKeyword('declare')) { + token = lookahead2(); + if (token.type === Token.Keyword) { + switch (token.value) { + case 'class': + return parseDeclareClass(); + case 'function': + return parseDeclareFunction(); + case 'var': + return parseDeclareVariable(); + } + } else if (token.type === Token.Identifier + && token.value === 'module') { + return parseDeclareModule(); + } + } + + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseProgramElement() { + var isModule = extra.sourceType === 'module' || extra.sourceType === 'nonStrictModule'; + + if (isModule && lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + } + } + + return parseSourceElement(); + } + + function parseProgramElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseProgramElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseProgramElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseProgram() { + var body, marker = markerCreate(); + strict = extra.sourceType === 'module'; + peek(); + body = parseProgramElements(); + return markerApply(marker, delegate.createProgram(body)); + } + + // 16 JSX + + XHTMLEntities = { + quot: '\u0022', + amp: '&', + apos: '\u0027', + lt: '<', + gt: '>', + nbsp: '\u00A0', + iexcl: '\u00A1', + cent: '\u00A2', + pound: '\u00A3', + curren: '\u00A4', + yen: '\u00A5', + brvbar: '\u00A6', + sect: '\u00A7', + uml: '\u00A8', + copy: '\u00A9', + ordf: '\u00AA', + laquo: '\u00AB', + not: '\u00AC', + shy: '\u00AD', + reg: '\u00AE', + macr: '\u00AF', + deg: '\u00B0', + plusmn: '\u00B1', + sup2: '\u00B2', + sup3: '\u00B3', + acute: '\u00B4', + micro: '\u00B5', + para: '\u00B6', + middot: '\u00B7', + cedil: '\u00B8', + sup1: '\u00B9', + ordm: '\u00BA', + raquo: '\u00BB', + frac14: '\u00BC', + frac12: '\u00BD', + frac34: '\u00BE', + iquest: '\u00BF', + Agrave: '\u00C0', + Aacute: '\u00C1', + Acirc: '\u00C2', + Atilde: '\u00C3', + Auml: '\u00C4', + Aring: '\u00C5', + AElig: '\u00C6', + Ccedil: '\u00C7', + Egrave: '\u00C8', + Eacute: '\u00C9', + Ecirc: '\u00CA', + Euml: '\u00CB', + Igrave: '\u00CC', + Iacute: '\u00CD', + Icirc: '\u00CE', + Iuml: '\u00CF', + ETH: '\u00D0', + Ntilde: '\u00D1', + Ograve: '\u00D2', + Oacute: '\u00D3', + Ocirc: '\u00D4', + Otilde: '\u00D5', + Ouml: '\u00D6', + times: '\u00D7', + Oslash: '\u00D8', + Ugrave: '\u00D9', + Uacute: '\u00DA', + Ucirc: '\u00DB', + Uuml: '\u00DC', + Yacute: '\u00DD', + THORN: '\u00DE', + szlig: '\u00DF', + agrave: '\u00E0', + aacute: '\u00E1', + acirc: '\u00E2', + atilde: '\u00E3', + auml: '\u00E4', + aring: '\u00E5', + aelig: '\u00E6', + ccedil: '\u00E7', + egrave: '\u00E8', + eacute: '\u00E9', + ecirc: '\u00EA', + euml: '\u00EB', + igrave: '\u00EC', + iacute: '\u00ED', + icirc: '\u00EE', + iuml: '\u00EF', + eth: '\u00F0', + ntilde: '\u00F1', + ograve: '\u00F2', + oacute: '\u00F3', + ocirc: '\u00F4', + otilde: '\u00F5', + ouml: '\u00F6', + divide: '\u00F7', + oslash: '\u00F8', + ugrave: '\u00F9', + uacute: '\u00FA', + ucirc: '\u00FB', + uuml: '\u00FC', + yacute: '\u00FD', + thorn: '\u00FE', + yuml: '\u00FF', + OElig: '\u0152', + oelig: '\u0153', + Scaron: '\u0160', + scaron: '\u0161', + Yuml: '\u0178', + fnof: '\u0192', + circ: '\u02C6', + tilde: '\u02DC', + Alpha: '\u0391', + Beta: '\u0392', + Gamma: '\u0393', + Delta: '\u0394', + Epsilon: '\u0395', + Zeta: '\u0396', + Eta: '\u0397', + Theta: '\u0398', + Iota: '\u0399', + Kappa: '\u039A', + Lambda: '\u039B', + Mu: '\u039C', + Nu: '\u039D', + Xi: '\u039E', + Omicron: '\u039F', + Pi: '\u03A0', + Rho: '\u03A1', + Sigma: '\u03A3', + Tau: '\u03A4', + Upsilon: '\u03A5', + Phi: '\u03A6', + Chi: '\u03A7', + Psi: '\u03A8', + Omega: '\u03A9', + alpha: '\u03B1', + beta: '\u03B2', + gamma: '\u03B3', + delta: '\u03B4', + epsilon: '\u03B5', + zeta: '\u03B6', + eta: '\u03B7', + theta: '\u03B8', + iota: '\u03B9', + kappa: '\u03BA', + lambda: '\u03BB', + mu: '\u03BC', + nu: '\u03BD', + xi: '\u03BE', + omicron: '\u03BF', + pi: '\u03C0', + rho: '\u03C1', + sigmaf: '\u03C2', + sigma: '\u03C3', + tau: '\u03C4', + upsilon: '\u03C5', + phi: '\u03C6', + chi: '\u03C7', + psi: '\u03C8', + omega: '\u03C9', + thetasym: '\u03D1', + upsih: '\u03D2', + piv: '\u03D6', + ensp: '\u2002', + emsp: '\u2003', + thinsp: '\u2009', + zwnj: '\u200C', + zwj: '\u200D', + lrm: '\u200E', + rlm: '\u200F', + ndash: '\u2013', + mdash: '\u2014', + lsquo: '\u2018', + rsquo: '\u2019', + sbquo: '\u201A', + ldquo: '\u201C', + rdquo: '\u201D', + bdquo: '\u201E', + dagger: '\u2020', + Dagger: '\u2021', + bull: '\u2022', + hellip: '\u2026', + permil: '\u2030', + prime: '\u2032', + Prime: '\u2033', + lsaquo: '\u2039', + rsaquo: '\u203A', + oline: '\u203E', + frasl: '\u2044', + euro: '\u20AC', + image: '\u2111', + weierp: '\u2118', + real: '\u211C', + trade: '\u2122', + alefsym: '\u2135', + larr: '\u2190', + uarr: '\u2191', + rarr: '\u2192', + darr: '\u2193', + harr: '\u2194', + crarr: '\u21B5', + lArr: '\u21D0', + uArr: '\u21D1', + rArr: '\u21D2', + dArr: '\u21D3', + hArr: '\u21D4', + forall: '\u2200', + part: '\u2202', + exist: '\u2203', + empty: '\u2205', + nabla: '\u2207', + isin: '\u2208', + notin: '\u2209', + ni: '\u220B', + prod: '\u220F', + sum: '\u2211', + minus: '\u2212', + lowast: '\u2217', + radic: '\u221A', + prop: '\u221D', + infin: '\u221E', + ang: '\u2220', + and: '\u2227', + or: '\u2228', + cap: '\u2229', + cup: '\u222A', + 'int': '\u222B', + there4: '\u2234', + sim: '\u223C', + cong: '\u2245', + asymp: '\u2248', + ne: '\u2260', + equiv: '\u2261', + le: '\u2264', + ge: '\u2265', + sub: '\u2282', + sup: '\u2283', + nsub: '\u2284', + sube: '\u2286', + supe: '\u2287', + oplus: '\u2295', + otimes: '\u2297', + perp: '\u22A5', + sdot: '\u22C5', + lceil: '\u2308', + rceil: '\u2309', + lfloor: '\u230A', + rfloor: '\u230B', + lang: '\u2329', + rang: '\u232A', + loz: '\u25CA', + spades: '\u2660', + clubs: '\u2663', + hearts: '\u2665', + diams: '\u2666' + }; + + function getQualifiedJSXName(object) { + if (object.type === Syntax.JSXIdentifier) { + return object.name; + } + if (object.type === Syntax.JSXNamespacedName) { + return object.namespace.name + ':' + object.name.name; + } + /* istanbul ignore else */ + if (object.type === Syntax.JSXMemberExpression) { + return ( + getQualifiedJSXName(object.object) + '.' + + getQualifiedJSXName(object.property) + ); + } + /* istanbul ignore next */ + throwUnexpected(object); + } + + function isJSXIdentifierStart(ch) { + // exclude backslash (\) + return (ch !== 92) && isIdentifierStart(ch); + } + + function isJSXIdentifierPart(ch) { + // exclude backslash (\) and add hyphen (-) + return (ch !== 92) && (ch === 45 || isIdentifierPart(ch)); + } + + function scanJSXIdentifier() { + var ch, start, value = ''; + + start = index; + while (index < length) { + ch = source.charCodeAt(index); + if (!isJSXIdentifierPart(ch)) { + break; + } + value += source[index++]; + } + + return { + type: Token.JSXIdentifier, + value: value, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanJSXEntity() { + var ch, str = '', start = index, count = 0, code; + ch = source[index]; + assert(ch === '&', 'Entity must start with an ampersand'); + index++; + while (index < length && count++ < 10) { + ch = source[index++]; + if (ch === ';') { + break; + } + str += ch; + } + + // Well-formed entity (ending was found). + if (ch === ';') { + // Numeric entity. + if (str[0] === '#') { + if (str[1] === 'x') { + code = +('0' + str.substr(1)); + } else { + // Removing leading zeros in order to avoid treating as octal in old browsers. + code = +str.substr(1).replace(Regex.LeadingZeros, ''); + } + + if (!isNaN(code)) { + return String.fromCharCode(code); + } + /* istanbul ignore else */ + } else if (XHTMLEntities[str]) { + return XHTMLEntities[str]; + } + } + + // Treat non-entity sequences as regular text. + index = start + 1; + return '&'; + } + + function scanJSXText(stopChars) { + var ch, str = '', start; + start = index; + while (index < length) { + ch = source[index]; + if (stopChars.indexOf(ch) !== -1) { + break; + } + if (ch === '&') { + str += scanJSXEntity(); + } else { + index++; + if (ch === '\r' && source[index] === '\n') { + str += ch; + ch = source[index]; + index++; + } + if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + lineStart = index; + } + str += ch; + } + } + return { + type: Token.JSXText, + value: str, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanJSXStringLiteral() { + var innerToken, quote, start; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + innerToken = scanJSXText([quote]); + + if (quote !== source[index]) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + ++index; + + innerToken.range = [start, index]; + + return innerToken; + } + + /** + * Between JSX opening and closing tags (e.g. <foo>HERE</foo>), anything that + * is not another JSX tag and is not an expression wrapped by {} is text. + */ + function advanceJSXChild() { + var ch = source.charCodeAt(index); + + // '<' 60, '>' 62, '{' 123, '}' 125 + if (ch !== 60 && ch !== 62 && ch !== 123 && ch !== 125) { + return scanJSXText(['<', '>', '{', '}']); + } + + return scanPunctuator(); + } + + function parseJSXIdentifier() { + var token, marker = markerCreate(); + + if (lookahead.type !== Token.JSXIdentifier) { + throwUnexpected(lookahead); + } + + token = lex(); + return markerApply(marker, delegate.createJSXIdentifier(token.value)); + } + + function parseJSXNamespacedName() { + var namespace, name, marker = markerCreate(); + + namespace = parseJSXIdentifier(); + expect(':'); + name = parseJSXIdentifier(); + + return markerApply(marker, delegate.createJSXNamespacedName(namespace, name)); + } + + function parseJSXMemberExpression() { + var marker = markerCreate(), + expr = parseJSXIdentifier(); + + while (match('.')) { + lex(); + expr = markerApply(marker, delegate.createJSXMemberExpression(expr, parseJSXIdentifier())); + } + + return expr; + } + + function parseJSXElementName() { + if (lookahead2().value === ':') { + return parseJSXNamespacedName(); + } + if (lookahead2().value === '.') { + return parseJSXMemberExpression(); + } + + return parseJSXIdentifier(); + } + + function parseJSXAttributeName() { + if (lookahead2().value === ':') { + return parseJSXNamespacedName(); + } + + return parseJSXIdentifier(); + } + + function parseJSXAttributeValue() { + var value, marker; + if (match('{')) { + value = parseJSXExpressionContainer(); + if (value.expression.type === Syntax.JSXEmptyExpression) { + throwError( + value, + 'JSX attributes must only be assigned a non-empty ' + + 'expression' + ); + } + } else if (match('<')) { + value = parseJSXElement(); + } else if (lookahead.type === Token.JSXText) { + marker = markerCreate(); + value = markerApply(marker, delegate.createLiteral(lex())); + } else { + throwError({}, Messages.InvalidJSXAttributeValue); + } + return value; + } + + function parseJSXEmptyExpression() { + var marker = markerCreatePreserveWhitespace(); + while (source.charAt(index) !== '}') { + index++; + } + return markerApply(marker, delegate.createJSXEmptyExpression()); + } + + function parseJSXExpressionContainer() { + var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = false; + + expect('{'); + + if (match('}')) { + expression = parseJSXEmptyExpression(); + } else { + expression = parseExpression(); + } + + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + + expect('}'); + + return markerApply(marker, delegate.createJSXExpressionContainer(expression)); + } + + function parseJSXSpreadAttribute() { + var expression, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = false; + + expect('{'); + expect('...'); + + expression = parseAssignmentExpression(); + + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + + expect('}'); + + return markerApply(marker, delegate.createJSXSpreadAttribute(expression)); + } + + function parseJSXAttribute() { + var name, marker; + + if (match('{')) { + return parseJSXSpreadAttribute(); + } + + marker = markerCreate(); + + name = parseJSXAttributeName(); + + // HTML empty attribute + if (match('=')) { + lex(); + return markerApply(marker, delegate.createJSXAttribute(name, parseJSXAttributeValue())); + } + + return markerApply(marker, delegate.createJSXAttribute(name)); + } + + function parseJSXChild() { + var token, marker; + if (match('{')) { + token = parseJSXExpressionContainer(); + } else if (lookahead.type === Token.JSXText) { + marker = markerCreatePreserveWhitespace(); + token = markerApply(marker, delegate.createLiteral(lex())); + } else if (match('<')) { + token = parseJSXElement(); + } else { + throwUnexpected(lookahead); + } + return token; + } + + function parseJSXClosingElement() { + var name, origInJSXChild, origInJSXTag, marker = markerCreate(); + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = true; + expect('<'); + expect('/'); + name = parseJSXElementName(); + // Because advance() (called by lex() called by expect()) expects there + // to be a valid token after >, it needs to know whether to look for a + // standard JS token or an JSX text node + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + expect('>'); + return markerApply(marker, delegate.createJSXClosingElement(name)); + } + + function parseJSXOpeningElement() { + var name, attributes = [], selfClosing = false, origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + state.inJSXChild = false; + state.inJSXTag = true; + + expect('<'); + + name = parseJSXElementName(); + + while (index < length && + lookahead.value !== '/' && + lookahead.value !== '>') { + attributes.push(parseJSXAttribute()); + } + + state.inJSXTag = origInJSXTag; + + if (lookahead.value === '/') { + expect('/'); + // Because advance() (called by lex() called by expect()) expects + // there to be a valid token after >, it needs to know whether to + // look for a standard JS token or an JSX text node + state.inJSXChild = origInJSXChild; + expect('>'); + selfClosing = true; + } else { + state.inJSXChild = true; + expect('>'); + } + return markerApply(marker, delegate.createJSXOpeningElement(name, attributes, selfClosing)); + } + + function parseJSXElement() { + var openingElement, closingElement = null, children = [], origInJSXChild, origInJSXTag, marker = markerCreate(); + + origInJSXChild = state.inJSXChild; + origInJSXTag = state.inJSXTag; + openingElement = parseJSXOpeningElement(); + + if (!openingElement.selfClosing) { + while (index < length) { + state.inJSXChild = false; // Call lookahead2() with inJSXChild = false because </ should not be considered in the child + if (lookahead.value === '<' && lookahead2().value === '/') { + break; + } + state.inJSXChild = true; + children.push(parseJSXChild()); + } + state.inJSXChild = origInJSXChild; + state.inJSXTag = origInJSXTag; + closingElement = parseJSXClosingElement(); + if (getQualifiedJSXName(closingElement.name) !== getQualifiedJSXName(openingElement.name)) { + throwError({}, Messages.ExpectedJSXClosingTag, getQualifiedJSXName(openingElement.name)); + } + } + + // When (erroneously) writing two adjacent tags like + // + // var x = <div>one</div><div>two</div>; + // + // the default error message is a bit incomprehensible. Since it's + // rarely (never?) useful to write a less-than sign after an JSX + // element, we disallow it here in the parser in order to provide a + // better error message. (In the rare case that the less-than operator + // was intended, the left tag can be wrapped in parentheses.) + if (!origInJSXChild && match('<')) { + throwError(lookahead, Messages.AdjacentJSXElements); + } + + return markerApply(marker, delegate.createJSXElement(openingElement, closingElement, children)); + } + + function parseTypeAlias() { + var id, marker = markerCreate(), typeParameters = null, right; + expectContextualKeyword('type'); + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + expect('='); + right = parseType(); + consumeSemicolon(); + return markerApply(marker, delegate.createTypeAlias(id, typeParameters, right)); + } + + function parseInterfaceExtends() { + var marker = markerCreate(), id, typeParameters = null; + + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterInstantiation(); + } + + return markerApply(marker, delegate.createInterfaceExtends( + id, + typeParameters + )); + } + + function parseInterfaceish(marker, allowStatic) { + var body, bodyMarker, extended = [], id, + typeParameters = null; + + id = parseVariableIdentifier(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + + while (index < length) { + extended.push(parseInterfaceExtends()); + if (!match(',')) { + break; + } + expect(','); + } + } + + bodyMarker = markerCreate(); + body = markerApply(bodyMarker, parseObjectType(allowStatic)); + + return markerApply(marker, delegate.createInterface( + id, + typeParameters, + body, + extended + )); + } + + function parseInterface() { + var marker = markerCreate(); + + if (strict) { + expectKeyword('interface'); + } else { + expectContextualKeyword('interface'); + } + + return parseInterfaceish(marker, /* allowStatic */false); + } + + function parseDeclareClass() { + var marker = markerCreate(), ret; + expectContextualKeyword('declare'); + expectKeyword('class'); + + ret = parseInterfaceish(marker, /* allowStatic */true); + ret.type = Syntax.DeclareClass; + return ret; + } + + function parseDeclareFunction() { + var id, idMarker, + marker = markerCreate(), params, returnType, rest, tmp, + typeParameters = null, value, valueMarker; + + expectContextualKeyword('declare'); + expectKeyword('function'); + idMarker = markerCreate(); + id = parseVariableIdentifier(); + + valueMarker = markerCreate(); + if (match('<')) { + typeParameters = parseTypeParameterDeclaration(); + } + expect('('); + tmp = parseFunctionTypeParams(); + params = tmp.params; + rest = tmp.rest; + expect(')'); + + expect(':'); + returnType = parseType(); + + value = markerApply(valueMarker, delegate.createFunctionTypeAnnotation( + params, + returnType, + rest, + typeParameters + )); + + id.typeAnnotation = markerApply(valueMarker, delegate.createTypeAnnotation( + value + )); + markerApply(idMarker, id); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDeclareFunction( + id + )); + } + + function parseDeclareVariable() { + var id, marker = markerCreate(); + expectContextualKeyword('declare'); + expectKeyword('var'); + id = parseTypeAnnotatableIdentifier(); + + consumeSemicolon(); + + return markerApply(marker, delegate.createDeclareVariable( + id + )); + } + + function parseDeclareModule() { + var body = [], bodyMarker, id, idMarker, marker = markerCreate(), token; + expectContextualKeyword('declare'); + expectContextualKeyword('module'); + + if (lookahead.type === Token.StringLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + idMarker = markerCreate(); + id = markerApply(idMarker, delegate.createLiteral(lex())); + } else { + id = parseVariableIdentifier(); + } + + bodyMarker = markerCreate(); + expect('{'); + while (index < length && !match('}')) { + token = lookahead2(); + switch (token.value) { + case 'class': + body.push(parseDeclareClass()); + break; + case 'function': + body.push(parseDeclareFunction()); + break; + case 'var': + body.push(parseDeclareVariable()); + break; + default: + throwUnexpected(lookahead); + } + } + expect('}'); + + return markerApply(marker, delegate.createDeclareModule( + id, + markerApply(bodyMarker, delegate.createBlockStatement(body)) + )); + } + + function collectToken() { + var loc, token, range, value, entry; + + /* istanbul ignore else */ + if (!state.inJSXChild) { + skipComment(); + } + + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + token = extra.advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (token.type !== Token.EOF) { + range = [token.range[0], token.range[1]]; + value = source.slice(token.range[0], token.range[1]); + entry = { + type: TokenName[token.type], + value: value, + range: range, + loc: loc + }; + if (token.regex) { + entry.regex = { + pattern: token.regex.pattern, + flags: token.regex.flags + }; + } + extra.tokens.push(entry); + } + + return token; + } + + function collectRegex() { + var pos, loc, regex, token; + + skipComment(); + + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + regex = extra.scanRegExp(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (!extra.tokenize) { + /* istanbul ignore next */ + // Pop the previous token, which is likely '/' or '/=' + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + regex: regex.regex, + range: [pos, index], + loc: loc + }); + } + + return regex; + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (entry.regex) { + token.regex = { + pattern: entry.regex.pattern, + flags: entry.regex.flags + }; + } + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function patch() { + if (typeof extra.tokens !== 'undefined') { + extra.advance = advance; + extra.scanRegExp = scanRegExp; + + advance = collectToken; + scanRegExp = collectRegex; + } + } + + function unpatch() { + if (typeof extra.scanRegExp === 'function') { + advance = extra.advance; + scanRegExp = extra.scanRegExp; + } + } + + // This is used to modify the delegate. + + function extend(object, properties) { + var entry, result = {}; + + for (entry in object) { + /* istanbul ignore else */ + if (object.hasOwnProperty(entry)) { + result[entry] = object[entry]; + } + } + + for (entry in properties) { + /* istanbul ignore else */ + if (properties.hasOwnProperty(entry)) { + result[entry] = properties[entry]; + } + } + + return result; + } + + function tokenize(code, options) { + var toString, + token, + tokens; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: true, + allowIn: true, + labelSet: new StringMap(), + inFunctionBody: false, + inIteration: false, + inSwitch: false, + lastCommentStart: -1 + }; + + extra = {}; + + // Options matching. + options = options || {}; + + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; + + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + + patch(); + + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } + + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== 'undefined') { + tokens.comments = extra.comments; + } + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + return tokens; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: false, + allowIn: true, + labelSet: new StringMap(), + parenthesizedCount: 0, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + inJSXChild: false, + inJSXTag: false, + inType: false, + lastCommentStart: -1, + yieldAllowed: false, + awaitAllowed: false + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + extra.attachComment = (typeof options.attachComment === 'boolean') && options.attachComment; + + if (extra.loc && options.source !== null && options.source !== undefined) { + delegate = extend(delegate, { + 'postProcess': function (node) { + node.loc.source = toString(options.source); + return node; + } + }); + } + + extra.sourceType = options.sourceType; + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + if (extra.attachComment) { + extra.range = true; + extra.comments = []; + extra.bottomRightStack = []; + extra.trailingComments = []; + extra.leadingComments = []; + } + } + + patch(); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + + return program; + } + + // Sync with *.json manifests. + exports.version = '13001.1001.0-dev-harmony-fb'; + + exports.tokenize = tokenize; + + exports.parse = parse; + + // Deep copy. + /* istanbul ignore next */ + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ + +},{}],10:[function(_dereq_,module,exports){ +var Base62 = (function (my) { + my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] + + my.encode = function(i){ + if (i === 0) {return '0'} + var s = '' + while (i > 0) { + s = this.chars[i % 62] + s + i = Math.floor(i/62) + } + return s + }; + my.decode = function(a,b,c,d){ + for ( + b = c = ( + a === (/\W|_|^$/.test(a += "") || a) + ) - 1; + d = a.charCodeAt(c++); + ) + b = b * 62 + d - [, 48, 29, 87][d >> 5]; + return b + }; + + return my; +}({})); + +module.exports = Base62 +},{}],11:[function(_dereq_,module,exports){ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = _dereq_('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = _dereq_('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = _dereq_('./source-map/source-node').SourceNode; + +},{"./source-map/source-map-consumer":16,"./source-map/source-map-generator":17,"./source-map/source-node":18}],12:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var util = _dereq_('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); + +},{"./util":19,"amdefine":20}],13:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var base64 = _dereq_('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * is placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string. + */ + exports.decode = function base64VLQ_decode(aStr) { + var i = 0; + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (i >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(i++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + return { + value: fromVLQSigned(result), + rest: aStr.slice(i) + }; + }; + +}); + +},{"./base64":14,"amdefine":20}],14:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); + +},{"amdefine":20}],15:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the next + // closest element that is less than that element. + // + // 3. We did not find the exact element, and there is no next-closest + // element which is less than the one we are searching for, so we + // return null. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return aHaystack[mid]; + } + else if (cmp > 0) { + // aHaystack[mid] is greater than our needle. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); + } + // We did not find an exact match, return the next closest one + // (termination case 2). + return aHaystack[mid]; + } + else { + // aHaystack[mid] is less than our needle. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (2) or (3) and return the appropriate thing. + return aLow < 0 + ? null + : aHaystack[aLow]; + } + } + + /** + * This is an implementation of binary search which will always try and return + * the next lowest value checked if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + */ + exports.search = function search(aNeedle, aHaystack, aCompare) { + return aHaystack.length > 0 + ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) + : null; + }; + +}); + +},{"amdefine":20}],16:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var util = _dereq_('./util'); + var binarySearch = _dereq_('./binary-search'); + var ArraySet = _dereq_('./array-set').ArraySet; + var base64VLQ = _dereq_('./base64-vlq'); + + /** + * A SourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + /** + * Create a SourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns SourceMapConsumer + */ + SourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(SourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.slice() + .sort(util.compareByGeneratedPositions); + smc.__originalMappings = aSourceMap._mappings.slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(SourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var mappingSeparator = /^[,;]/; + var str = aStr; + var mapping; + var temp; + + while (str.length > 0) { + if (str.charAt(0) === ';') { + generatedLine++; + str = str.slice(1); + previousGeneratedColumn = 0; + } + else if (str.charAt(0) === ',') { + str = str.slice(1); + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Generated column. + temp = base64VLQ.decode(str); + mapping.generatedColumn = previousGeneratedColumn + temp.value; + previousGeneratedColumn = mapping.generatedColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original source. + temp = base64VLQ.decode(str); + mapping.source = this._sources.at(previousSource + temp.value); + previousSource += temp.value; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + temp = base64VLQ.decode(str); + mapping.originalLine = previousOriginalLine + temp.value; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + str = temp.rest; + if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + temp = base64VLQ.decode(str); + mapping.originalColumn = previousOriginalColumn + temp.value; + previousOriginalColumn = mapping.originalColumn; + str = temp.rest; + + if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { + // Original name. + temp = base64VLQ.decode(str); + mapping.name = this._names.at(previousName + temp.value); + previousName += temp.value; + str = temp.rest; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + SourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator); + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + SourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var mapping = this._findMapping(needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions); + + if (mapping) { + var source = util.getArg(mapping, 'source', null); + if (source && this.sourceRoot) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + SourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + throw new Error('"' + aSource + '" is not in the SourceMap.'); + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mapping = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions); + + if (mapping) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null) + }; + } + + return { + line: null, + column: null + }; + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source && sourceRoot) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + exports.SourceMapConsumer = SourceMapConsumer; + +}); + +},{"./array-set":12,"./base64-vlq":13,"./binary-search":15,"./util":19,"amdefine":20}],17:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var base64VLQ = _dereq_('./base64-vlq'); + var util = _dereq_('./util'); + var ArraySet = _dereq_('./array-set').ArraySet; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. To create a new one, you must pass an object + * with the following properties: + * + * - file: The filename of the generated source. + * - sourceRoot: An optional root for all URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + this._file = util.getArg(aArgs, 'file'); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = []; + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source) { + newMapping.source = mapping.source; + if (sourceRoot) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + this._validateMapping(generated, original, source, name); + + if (source && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.push({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent !== null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) { + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (!aSourceFile) { + aSourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "aSourceFile" relative if an absolute Url is passed. + if (sourceRoot) { + aSourceFile = util.relative(sourceRoot, aSourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "aSourceFile" + this._mappings.forEach(function (mapping) { + if (mapping.source === aSourceFile && mapping.originalLine) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source !== null) { + // Copy mapping + if (sourceRoot) { + mapping.source = util.relative(sourceRoot, original.source); + } else { + mapping.source = original.source; + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name !== null && mapping.name !== null) { + // Only use the identifier name if it's an identifier + // in both SourceMaps + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + if (sourceRoot) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + orginal: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + // The mappings must be guaranteed to be in sorted order before we start + // serializing them or else the generated line numbers (which are defined + // via the ';' separators) will be all messed up. Note: it might be more + // performant to maintain the sorting as we insert them, rather than as we + // serialize them, but the big O is the same either way. + this._mappings.sort(util.compareByGeneratedPositions); + + for (var i = 0, len = this._mappings.length; i < len; i++) { + mapping = this._mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + file: this._file, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._sourceRoot) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); + +},{"./array-set":12,"./base64-vlq":13,"./util":19,"amdefine":20}],18:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + var SourceMapGenerator = _dereq_('./source-map-generator').SourceMapGenerator; + var util = _dereq_('./util'); + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine === undefined ? null : aLine; + this.column = aColumn === undefined ? null : aColumn; + this.source = aSource === undefined ? null : aSource; + this.name = aName === undefined ? null : aName; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // The generated code + // Processed fragments are removed from this array. + var remainingLines = aGeneratedCode.split('\n'); + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping === null) { + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(remainingLines.shift() + "\n"); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + } else { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate full lines with "lastMapping" + do { + code += remainingLines.shift() + "\n"; + lastGeneratedLine++; + lastGeneratedColumn = 0; + } while (lastGeneratedLine < mapping.generatedLine); + // When we reached the correct line, we add code until we + // reach the correct column too. + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + code += nextLine.substr(0, mapping.generatedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + // Create the SourceNode. + addMappingWithCode(lastMapping, code); + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + } + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + // Associate the remaining code in the current line with "lastMapping" + // and add the remaining lines without any mapping + addMappingWithCode(lastMapping, remainingLines.join("\n")); + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content) { + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + mapping.source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk instanceof SourceNode || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk instanceof SourceNode) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild instanceof SourceNode) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i] instanceof SourceNode) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + chunk.split('').forEach(function (ch) { + if (ch === '\n') { + generated.line++; + generated.column = 0; + } else { + generated.column++; + } + }); + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); + +},{"./source-map-generator":17,"./util":19,"amdefine":20}],19:[function(_dereq_,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = _dereq_('amdefine')(module, _dereq_); +} +define(function (_dereq_, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/; + var dataUrlRegexp = /^data:.+\,.+/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[3], + host: match[4], + port: match[6], + path: match[7] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = aParsedUrl.scheme + "://"; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + "@" + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + function join(aRoot, aPath) { + var url; + + if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) { + return aPath; + } + + if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) { + url.path = aPath; + return urlGenerate(url); + } + + return aRoot.replace(/\/$/, '') + '/' + aPath; + } + exports.join = join; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function relative(aRoot, aPath) { + aRoot = aRoot.replace(/\/$/, ''); + + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = strcmp(mappingA.name, mappingB.name); + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return mappingA.generatedColumn - mappingB.generatedColumn; + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); + +},{"amdefine":20}],20:[function(_dereq_,module,exports){ +(function (process,__filename){ +/** vim: et:ts=4:sw=4:sts=4 + * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved. + * Available via the MIT or new BSD license. + * see: http://github.com/jrburke/amdefine for details + */ + +/*jslint node: true */ +/*global module, process */ +'use strict'; + +/** + * Creates a define for node. + * @param {Object} module the "module" object that is defined by Node for the + * current module. + * @param {Function} [requireFn]. Node's require function for the current module. + * It only needs to be passed in Node versions before 0.5, when module.require + * did not exist. + * @returns {Function} a define function that is usable for the current node + * module. + */ +function amdefine(module, requireFn) { + 'use strict'; + var defineCache = {}, + loaderCache = {}, + alreadyCalled = false, + path = _dereq_('path'), + makeRequire, stringRequire; + + /** + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. + */ + function trimDots(ary) { + var i, part; + for (i = 0; ary[i]; i+= 1) { + part = ary[i]; + if (part === '.') { + ary.splice(i, 1); + i -= 1; + } else if (part === '..') { + if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { + //End of the line. Keep at least one non-dot + //path segment at the front so it can be mapped + //correctly to disk. Otherwise, there is likely + //no path mapping for a path starting with '..'. + //This can still fail, but catches the most reasonable + //uses of .. + break; + } else if (i > 0) { + ary.splice(i - 1, 2); + i -= 2; + } + } + } + } + + function normalize(name, baseName) { + var baseParts; + + //Adjust any relative paths. + if (name && name.charAt(0) === '.') { + //If have a base name, try to normalize against it, + //otherwise, assume it is a top-level require that will + //be relative to baseUrl in the end. + if (baseName) { + baseParts = baseName.split('/'); + baseParts = baseParts.slice(0, baseParts.length - 1); + baseParts = baseParts.concat(name.split('/')); + trimDots(baseParts); + name = baseParts.join('/'); + } + } + + return name; + } + + /** + * Create the normalize() function passed to a loader plugin's + * normalize method. + */ + function makeNormalize(relName) { + return function (name) { + return normalize(name, relName); + }; + } + + function makeLoad(id) { + function load(value) { + loaderCache[id] = value; + } + + load.fromText = function (id, text) { + //This one is difficult because the text can/probably uses + //define, and any relative paths and requires should be relative + //to that id was it would be found on disk. But this would require + //bootstrapping a module/require fairly deeply from node core. + //Not sure how best to go about that yet. + throw new Error('amdefine does not implement load.fromText'); + }; + + return load; + } + + makeRequire = function (systemRequire, exports, module, relId) { + function amdRequire(deps, callback) { + if (typeof deps === 'string') { + //Synchronous, single module require('') + return stringRequire(systemRequire, exports, module, deps, relId); + } else { + //Array of dependencies with a callback. + + //Convert the dependencies to modules. + deps = deps.map(function (depName) { + return stringRequire(systemRequire, exports, module, depName, relId); + }); + + //Wait for next tick to call back the require call. + process.nextTick(function () { + callback.apply(null, deps); + }); + } + } + + amdRequire.toUrl = function (filePath) { + if (filePath.indexOf('.') === 0) { + return normalize(filePath, path.dirname(module.filename)); + } else { + return filePath; + } + }; + + return amdRequire; + }; + + //Favor explicit value, passed in if the module wants to support Node 0.4. + requireFn = requireFn || function req() { + return module.require.apply(module, arguments); + }; + + function runFactory(id, deps, factory) { + var r, e, m, result; + + if (id) { + e = loaderCache[id] = {}; + m = { + id: id, + uri: __filename, + exports: e + }; + r = makeRequire(requireFn, e, m, id); + } else { + //Only support one define call per file + if (alreadyCalled) { + throw new Error('amdefine with no module ID cannot be called more than once per file.'); + } + alreadyCalled = true; + + //Use the real variables from node + //Use module.exports for exports, since + //the exports in here is amdefine exports. + e = module.exports; + m = module; + r = makeRequire(requireFn, e, m, module.id); + } + + //If there are dependencies, they are strings, so need + //to convert them to dependency values. + if (deps) { + deps = deps.map(function (depName) { + return r(depName); + }); + } + + //Call the factory with the right dependencies. + if (typeof factory === 'function') { + result = factory.apply(m.exports, deps); + } else { + result = factory; + } + + if (result !== undefined) { + m.exports = result; + if (id) { + loaderCache[id] = m.exports; + } + } + } + + stringRequire = function (systemRequire, exports, module, id, relId) { + //Split the ID by a ! so that + var index = id.indexOf('!'), + originalId = id, + prefix, plugin; + + if (index === -1) { + id = normalize(id, relId); + + //Straight module lookup. If it is one of the special dependencies, + //deal with it, otherwise, delegate to node. + if (id === 'require') { + return makeRequire(systemRequire, exports, module, relId); + } else if (id === 'exports') { + return exports; + } else if (id === 'module') { + return module; + } else if (loaderCache.hasOwnProperty(id)) { + return loaderCache[id]; + } else if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } else { + if(systemRequire) { + return systemRequire(originalId); + } else { + throw new Error('No module with ID: ' + id); + } + } + } else { + //There is a plugin in play. + prefix = id.substring(0, index); + id = id.substring(index + 1, id.length); + + plugin = stringRequire(systemRequire, exports, module, prefix, relId); + + if (plugin.normalize) { + id = plugin.normalize(id, makeNormalize(relId)); + } else { + //Normalize the ID normally. + id = normalize(id, relId); + } + + if (loaderCache[id]) { + return loaderCache[id]; + } else { + plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {}); + + return loaderCache[id]; + } + } + }; + + //Create a define function specific to the module asking for amdefine. + function define(id, deps, factory) { + if (Array.isArray(id)) { + factory = deps; + deps = id; + id = undefined; + } else if (typeof id !== 'string') { + factory = id; + id = deps = undefined; + } + + if (deps && !Array.isArray(deps)) { + factory = deps; + deps = undefined; + } + + if (!deps) { + deps = ['require', 'exports', 'module']; + } + + //Set up properties for this module. If an ID, then use + //internal cache. If no ID, then use the external variables + //for this node module. + if (id) { + //Put the module in deep freeze until there is a + //require call for it. + defineCache[id] = [id, deps, factory]; + } else { + runFactory(id, deps, factory); + } + } + + //define.require, which has access to all the values in the + //cache. Useful for AMD modules that all have IDs in the file, + //but need to finally export a value to node based on one of those + //IDs. + define.require = function (id) { + if (loaderCache[id]) { + return loaderCache[id]; + } + + if (defineCache[id]) { + runFactory.apply(null, defineCache[id]); + return loaderCache[id]; + } + }; + + define.amd = {}; + + return define; +} + +module.exports = amdefine; + +}).call(this,_dereq_('_process'),"/node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js") +},{"_process":8,"path":7}],21:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var docblockRe = /^\s*(\/\*\*(.|\r?\n)*?\*\/)/; +var ltrimRe = /^\s*/; +/** + * @param {String} contents + * @return {String} + */ +function extract(contents) { + var match = contents.match(docblockRe); + if (match) { + return match[0].replace(ltrimRe, '') || ''; + } + return ''; +} + + +var commentStartRe = /^\/\*\*?/; +var commentEndRe = /\*+\/$/; +var wsRe = /[\t ]+/g; +var stringStartRe = /(\r?\n|^) *\*/g; +var multilineRe = /(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *([^@\r\n\s][^@\r\n]+?) *\r?\n/g; +var propertyRe = /(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g; + +/** + * @param {String} contents + * @return {Array} + */ +function parse(docblock) { + docblock = docblock + .replace(commentStartRe, '') + .replace(commentEndRe, '') + .replace(wsRe, ' ') + .replace(stringStartRe, '$1'); + + // Normalize multi-line directives + var prev = ''; + while (prev != docblock) { + prev = docblock; + docblock = docblock.replace(multilineRe, "\n$1 $2\n"); + } + docblock = docblock.trim(); + + var result = []; + var match; + while (match = propertyRe.exec(docblock)) { + result.push([match[1], match[2]]); + } + + return result; +} + +/** + * Same as parse but returns an object of prop: value instead of array of paris + * If a property appers more than once the last one will be returned + * + * @param {String} contents + * @return {Object} + */ +function parseAsObject(docblock) { + var pairs = parse(docblock); + var result = {}; + for (var i = 0; i < pairs.length; i++) { + result[pairs[i][0]] = pairs[i][1]; + } + return result; +} + + +exports.extract = extract; +exports.parse = parse; +exports.parseAsObject = parseAsObject; + +},{}],22:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*jslint node: true*/ +"use strict"; + +var esprima = _dereq_('esprima-fb'); +var utils = _dereq_('./utils'); + +var getBoundaryNode = utils.getBoundaryNode; +var declareIdentInScope = utils.declareIdentInLocalScope; +var initScopeMetadata = utils.initScopeMetadata; +var Syntax = esprima.Syntax; + +/** + * @param {object} node + * @param {object} parentNode + * @return {boolean} + */ +function _nodeIsClosureScopeBoundary(node, parentNode) { + if (node.type === Syntax.Program) { + return true; + } + + var parentIsFunction = + parentNode.type === Syntax.FunctionDeclaration + || parentNode.type === Syntax.FunctionExpression + || parentNode.type === Syntax.ArrowFunctionExpression; + + var parentIsCurlylessArrowFunc = + parentNode.type === Syntax.ArrowFunctionExpression + && node === parentNode.body; + + return parentIsFunction + && (node.type === Syntax.BlockStatement || parentIsCurlylessArrowFunc); +} + +function _nodeIsBlockScopeBoundary(node, parentNode) { + if (node.type === Syntax.Program) { + return false; + } + + return node.type === Syntax.BlockStatement + && parentNode.type === Syntax.CatchClause; +} + +/** + * @param {object} node + * @param {array} path + * @param {object} state + */ +function traverse(node, path, state) { + /*jshint -W004*/ + // Create a scope stack entry if this is the first node we've encountered in + // its local scope + var startIndex = null; + var parentNode = path[0]; + if (!Array.isArray(node) && state.localScope.parentNode !== parentNode) { + if (_nodeIsClosureScopeBoundary(node, parentNode)) { + var scopeIsStrict = state.scopeIsStrict; + if (!scopeIsStrict + && (node.type === Syntax.BlockStatement + || node.type === Syntax.Program)) { + scopeIsStrict = + node.body.length > 0 + && node.body[0].type === Syntax.ExpressionStatement + && node.body[0].expression.type === Syntax.Literal + && node.body[0].expression.value === 'use strict'; + } + + if (node.type === Syntax.Program) { + startIndex = state.g.buffer.length; + state = utils.updateState(state, { + scopeIsStrict: scopeIsStrict + }); + } else { + startIndex = state.g.buffer.length + 1; + state = utils.updateState(state, { + localScope: { + parentNode: parentNode, + parentScope: state.localScope, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + }, + scopeIsStrict: scopeIsStrict + }); + + // All functions have an implicit 'arguments' object in scope + declareIdentInScope('arguments', initScopeMetadata(node), state); + + // Include function arg identifiers in the scope boundaries of the + // function + if (parentNode.params.length > 0) { + var param; + var metadata = initScopeMetadata(parentNode, path.slice(1), path[0]); + for (var i = 0; i < parentNode.params.length; i++) { + param = parentNode.params[i]; + if (param.type === Syntax.Identifier) { + declareIdentInScope(param.name, metadata, state); + } + } + } + + // Include rest arg identifiers in the scope boundaries of their + // functions + if (parentNode.rest) { + var metadata = initScopeMetadata( + parentNode, + path.slice(1), + path[0] + ); + declareIdentInScope(parentNode.rest.name, metadata, state); + } + + // Named FunctionExpressions scope their name within the body block of + // themselves only + if (parentNode.type === Syntax.FunctionExpression && parentNode.id) { + var metaData = + initScopeMetadata(parentNode, path.parentNodeslice, parentNode); + declareIdentInScope(parentNode.id.name, metaData, state); + } + } + + // Traverse and find all local identifiers in this closure first to + // account for function/variable declaration hoisting + collectClosureIdentsAndTraverse(node, path, state); + } + + if (_nodeIsBlockScopeBoundary(node, parentNode)) { + startIndex = state.g.buffer.length; + state = utils.updateState(state, { + localScope: { + parentNode: parentNode, + parentScope: state.localScope, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + } + }); + + if (parentNode.type === Syntax.CatchClause) { + var metadata = initScopeMetadata( + parentNode, + path.slice(1), + parentNode + ); + declareIdentInScope(parentNode.param.name, metadata, state); + } + collectBlockIdentsAndTraverse(node, path, state); + } + } + + // Only catchup() before and after traversing a child node + function traverser(node, path, state) { + node.range && utils.catchup(node.range[0], state); + traverse(node, path, state); + node.range && utils.catchup(node.range[1], state); + } + + utils.analyzeAndTraverse(walker, traverser, node, path, state); + + // Inject temp variables into the scope. + if (startIndex !== null) { + utils.injectTempVarDeclarations(state, startIndex); + } +} + +function collectClosureIdentsAndTraverse(node, path, state) { + utils.analyzeAndTraverse( + visitLocalClosureIdentifiers, + collectClosureIdentsAndTraverse, + node, + path, + state + ); +} + +function collectBlockIdentsAndTraverse(node, path, state) { + utils.analyzeAndTraverse( + visitLocalBlockIdentifiers, + collectBlockIdentsAndTraverse, + node, + path, + state + ); +} + +function visitLocalClosureIdentifiers(node, path, state) { + var metaData; + switch (node.type) { + case Syntax.ArrowFunctionExpression: + case Syntax.FunctionExpression: + // Function expressions don't get their names (if there is one) added to + // the closure scope they're defined in + return false; + case Syntax.ClassDeclaration: + case Syntax.ClassExpression: + case Syntax.FunctionDeclaration: + if (node.id) { + metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); + declareIdentInScope(node.id.name, metaData, state); + } + return false; + case Syntax.VariableDeclarator: + // Variables have function-local scope + if (path[0].kind === 'var') { + metaData = initScopeMetadata(getBoundaryNode(path), path.slice(), node); + declareIdentInScope(node.id.name, metaData, state); + } + break; + } +} + +function visitLocalBlockIdentifiers(node, path, state) { + // TODO: Support 'let' here...maybe...one day...or something... + if (node.type === Syntax.CatchClause) { + return false; + } +} + +function walker(node, path, state) { + var visitors = state.g.visitors; + for (var i = 0; i < visitors.length; i++) { + if (visitors[i].test(node, path, state)) { + return visitors[i](traverse, node, path, state); + } + } +} + +var _astCache = {}; + +function getAstForSource(source, options) { + if (_astCache[source] && !options.disableAstCache) { + return _astCache[source]; + } + var ast = esprima.parse(source, { + comment: true, + loc: true, + range: true, + sourceType: options.sourceType + }); + if (!options.disableAstCache) { + _astCache[source] = ast; + } + return ast; +} + +/** + * Applies all available transformations to the source + * @param {array} visitors + * @param {string} source + * @param {?object} options + * @return {object} + */ +function transform(visitors, source, options) { + options = options || {}; + var ast; + try { + ast = getAstForSource(source, options); + } catch (e) { + e.message = 'Parse Error: ' + e.message; + throw e; + } + var state = utils.createState(source, ast, options); + state.g.visitors = visitors; + + if (options.sourceMap) { + var SourceMapGenerator = _dereq_('source-map').SourceMapGenerator; + state.g.sourceMap = new SourceMapGenerator({file: options.filename || 'transformed.js'}); + } + + traverse(ast, [], state); + utils.catchup(source.length, state); + + var ret = {code: state.g.buffer, extra: state.g.extra}; + if (options.sourceMap) { + ret.sourceMap = state.g.sourceMap; + ret.sourceMapFilename = options.filename || 'source.js'; + } + return ret; +} + +exports.transform = transform; +exports.Syntax = Syntax; + +},{"./utils":23,"esprima-fb":9,"source-map":11}],23:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +/*jslint node: true*/ +var Syntax = _dereq_('esprima-fb').Syntax; +var leadingIndentRegexp = /(^|\n)( {2}|\t)/g; +var nonWhiteRegexp = /(\S)/g; + +/** + * A `state` object represents the state of the parser. It has "local" and + * "global" parts. Global contains parser position, source, etc. Local contains + * scope based properties like current class name. State should contain all the + * info required for transformation. It's the only mandatory object that is + * being passed to every function in transform chain. + * + * @param {string} source + * @param {object} transformOptions + * @return {object} + */ +function createState(source, rootNode, transformOptions) { + return { + /** + * A tree representing the current local scope (and its lexical scope chain) + * Useful for tracking identifiers from parent scopes, etc. + * @type {Object} + */ + localScope: { + parentNode: rootNode, + parentScope: null, + identifiers: {}, + tempVarIndex: 0, + tempVars: [] + }, + /** + * The name (and, if applicable, expression) of the super class + * @type {Object} + */ + superClass: null, + /** + * The namespace to use when munging identifiers + * @type {String} + */ + mungeNamespace: '', + /** + * Ref to the node for the current MethodDefinition + * @type {Object} + */ + methodNode: null, + /** + * Ref to the node for the FunctionExpression of the enclosing + * MethodDefinition + * @type {Object} + */ + methodFuncNode: null, + /** + * Name of the enclosing class + * @type {String} + */ + className: null, + /** + * Whether we're currently within a `strict` scope + * @type {Bool} + */ + scopeIsStrict: null, + /** + * Indentation offset + * @type {Number} + */ + indentBy: 0, + /** + * Global state (not affected by updateState) + * @type {Object} + */ + g: { + /** + * A set of general options that transformations can consider while doing + * a transformation: + * + * - minify + * Specifies that transformation steps should do their best to minify + * the output source when possible. This is useful for places where + * minification optimizations are possible with higher-level context + * info than what jsxmin can provide. + * + * For example, the ES6 class transform will minify munged private + * variables if this flag is set. + */ + opts: transformOptions, + /** + * Current position in the source code + * @type {Number} + */ + position: 0, + /** + * Auxiliary data to be returned by transforms + * @type {Object} + */ + extra: {}, + /** + * Buffer containing the result + * @type {String} + */ + buffer: '', + /** + * Source that is being transformed + * @type {String} + */ + source: source, + + /** + * Cached parsed docblock (see getDocblock) + * @type {object} + */ + docblock: null, + + /** + * Whether the thing was used + * @type {Boolean} + */ + tagNamespaceUsed: false, + + /** + * If using bolt xjs transformation + * @type {Boolean} + */ + isBolt: undefined, + + /** + * Whether to record source map (expensive) or not + * @type {SourceMapGenerator|null} + */ + sourceMap: null, + + /** + * Filename of the file being processed. Will be returned as a source + * attribute in the source map + */ + sourceMapFilename: 'source.js', + + /** + * Only when source map is used: last line in the source for which + * source map was generated + * @type {Number} + */ + sourceLine: 1, + + /** + * Only when source map is used: last line in the buffer for which + * source map was generated + * @type {Number} + */ + bufferLine: 1, + + /** + * The top-level Program AST for the original file. + */ + originalProgramAST: null, + + sourceColumn: 0, + bufferColumn: 0 + } + }; +} + +/** + * Updates a copy of a given state with "update" and returns an updated state. + * + * @param {object} state + * @param {object} update + * @return {object} + */ +function updateState(state, update) { + var ret = Object.create(state); + Object.keys(update).forEach(function(updatedKey) { + ret[updatedKey] = update[updatedKey]; + }); + return ret; +} + +/** + * Given a state fill the resulting buffer from the original source up to + * the end + * + * @param {number} end + * @param {object} state + * @param {?function} contentTransformer Optional callback to transform newly + * added content. + */ +function catchup(end, state, contentTransformer) { + if (end < state.g.position) { + // cannot move backwards + return; + } + var source = state.g.source.substring(state.g.position, end); + var transformed = updateIndent(source, state); + if (state.g.sourceMap && transformed) { + // record where we are + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, + original: { line: state.g.sourceLine, column: state.g.sourceColumn }, + source: state.g.sourceMapFilename + }); + + // record line breaks in transformed source + var sourceLines = source.split('\n'); + var transformedLines = transformed.split('\n'); + // Add line break mappings between last known mapping and the end of the + // added piece. So for the code piece + // (foo, bar); + // > var x = 2; + // > var b = 3; + // var c = + // only add lines marked with ">": 2, 3. + for (var i = 1; i < sourceLines.length - 1; i++) { + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: 0 }, + original: { line: state.g.sourceLine, column: 0 }, + source: state.g.sourceMapFilename + }); + state.g.sourceLine++; + state.g.bufferLine++; + } + // offset for the last piece + if (sourceLines.length > 1) { + state.g.sourceLine++; + state.g.bufferLine++; + state.g.sourceColumn = 0; + state.g.bufferColumn = 0; + } + state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; + state.g.bufferColumn += + transformedLines[transformedLines.length - 1].length; + } + state.g.buffer += + contentTransformer ? contentTransformer(transformed) : transformed; + state.g.position = end; +} + +/** + * Returns original source for an AST node. + * @param {object} node + * @param {object} state + * @return {string} + */ +function getNodeSourceText(node, state) { + return state.g.source.substring(node.range[0], node.range[1]); +} + +function _replaceNonWhite(value) { + return value.replace(nonWhiteRegexp, ' '); +} + +/** + * Removes all non-whitespace characters + */ +function _stripNonWhite(value) { + return value.replace(nonWhiteRegexp, ''); +} + +/** + * Finds the position of the next instance of the specified syntactic char in + * the pending source. + * + * NOTE: This will skip instances of the specified char if they sit inside a + * comment body. + * + * NOTE: This function also assumes that the buffer's current position is not + * already within a comment or a string. This is rarely the case since all + * of the buffer-advancement utility methods tend to be used on syntactic + * nodes' range values -- but it's a small gotcha that's worth mentioning. + */ +function getNextSyntacticCharOffset(char, state) { + var pendingSource = state.g.source.substring(state.g.position); + var pendingSourceLines = pendingSource.split('\n'); + + var charOffset = 0; + var line; + var withinBlockComment = false; + var withinString = false; + lineLoop: while ((line = pendingSourceLines.shift()) !== undefined) { + var lineEndPos = charOffset + line.length; + charLoop: for (; charOffset < lineEndPos; charOffset++) { + var currChar = pendingSource[charOffset]; + if (currChar === '"' || currChar === '\'') { + withinString = !withinString; + continue charLoop; + } else if (withinString) { + continue charLoop; + } else if (charOffset + 1 < lineEndPos) { + var nextTwoChars = currChar + line[charOffset + 1]; + if (nextTwoChars === '//') { + charOffset = lineEndPos + 1; + continue lineLoop; + } else if (nextTwoChars === '/*') { + withinBlockComment = true; + charOffset += 1; + continue charLoop; + } else if (nextTwoChars === '*/') { + withinBlockComment = false; + charOffset += 1; + continue charLoop; + } + } + + if (!withinBlockComment && currChar === char) { + return charOffset + state.g.position; + } + } + + // Account for '\n' + charOffset++; + withinString = false; + } + + throw new Error('`' + char + '` not found!'); +} + +/** + * Catches up as `catchup` but replaces non-whitespace chars with spaces. + */ +function catchupWhiteOut(end, state) { + catchup(end, state, _replaceNonWhite); +} + +/** + * Catches up as `catchup` but removes all non-whitespace characters. + */ +function catchupWhiteSpace(end, state) { + catchup(end, state, _stripNonWhite); +} + +/** + * Removes all non-newline characters + */ +var reNonNewline = /[^\n]/g; +function stripNonNewline(value) { + return value.replace(reNonNewline, function() { + return ''; + }); +} + +/** + * Catches up as `catchup` but removes all non-newline characters. + * + * Equivalent to appending as many newlines as there are in the original source + * between the current position and `end`. + */ +function catchupNewlines(end, state) { + catchup(end, state, stripNonNewline); +} + + +/** + * Same as catchup but does not touch the buffer + * + * @param {number} end + * @param {object} state + */ +function move(end, state) { + // move the internal cursors + if (state.g.sourceMap) { + if (end < state.g.position) { + state.g.position = 0; + state.g.sourceLine = 1; + state.g.sourceColumn = 0; + } + + var source = state.g.source.substring(state.g.position, end); + var sourceLines = source.split('\n'); + if (sourceLines.length > 1) { + state.g.sourceLine += sourceLines.length - 1; + state.g.sourceColumn = 0; + } + state.g.sourceColumn += sourceLines[sourceLines.length - 1].length; + } + state.g.position = end; +} + +/** + * Appends a string of text to the buffer + * + * @param {string} str + * @param {object} state + */ +function append(str, state) { + if (state.g.sourceMap && str) { + state.g.sourceMap.addMapping({ + generated: { line: state.g.bufferLine, column: state.g.bufferColumn }, + original: { line: state.g.sourceLine, column: state.g.sourceColumn }, + source: state.g.sourceMapFilename + }); + var transformedLines = str.split('\n'); + if (transformedLines.length > 1) { + state.g.bufferLine += transformedLines.length - 1; + state.g.bufferColumn = 0; + } + state.g.bufferColumn += + transformedLines[transformedLines.length - 1].length; + } + state.g.buffer += str; +} + +/** + * Update indent using state.indentBy property. Indent is measured in + * double spaces. Updates a single line only. + * + * @param {string} str + * @param {object} state + * @return {string} + */ +function updateIndent(str, state) { + /*jshint -W004*/ + var indentBy = state.indentBy; + if (indentBy < 0) { + for (var i = 0; i < -indentBy; i++) { + str = str.replace(leadingIndentRegexp, '$1'); + } + } else { + for (var i = 0; i < indentBy; i++) { + str = str.replace(leadingIndentRegexp, '$1$2$2'); + } + } + return str; +} + +/** + * Calculates indent from the beginning of the line until "start" or the first + * character before start. + * @example + * " foo.bar()" + * ^ + * start + * indent will be " " + * + * @param {number} start + * @param {object} state + * @return {string} + */ +function indentBefore(start, state) { + var end = start; + start = start - 1; + + while (start > 0 && state.g.source[start] != '\n') { + if (!state.g.source[start].match(/[ \t]/)) { + end = start; + } + start--; + } + return state.g.source.substring(start + 1, end); +} + +function getDocblock(state) { + if (!state.g.docblock) { + var docblock = _dereq_('./docblock'); + state.g.docblock = + docblock.parseAsObject(docblock.extract(state.g.source)); + } + return state.g.docblock; +} + +function identWithinLexicalScope(identName, state, stopBeforeNode) { + var currScope = state.localScope; + while (currScope) { + if (currScope.identifiers[identName] !== undefined) { + return true; + } + + if (stopBeforeNode && currScope.parentNode === stopBeforeNode) { + break; + } + + currScope = currScope.parentScope; + } + return false; +} + +function identInLocalScope(identName, state) { + return state.localScope.identifiers[identName] !== undefined; +} + +/** + * @param {object} boundaryNode + * @param {?array} path + * @return {?object} node + */ +function initScopeMetadata(boundaryNode, path, node) { + return { + boundaryNode: boundaryNode, + bindingPath: path, + bindingNode: node + }; +} + +function declareIdentInLocalScope(identName, metaData, state) { + state.localScope.identifiers[identName] = { + boundaryNode: metaData.boundaryNode, + path: metaData.bindingPath, + node: metaData.bindingNode, + state: Object.create(state) + }; +} + +function getLexicalBindingMetadata(identName, state) { + var currScope = state.localScope; + while (currScope) { + if (currScope.identifiers[identName] !== undefined) { + return currScope.identifiers[identName]; + } + + currScope = currScope.parentScope; + } +} + +function getLocalBindingMetadata(identName, state) { + return state.localScope.identifiers[identName]; +} + +/** + * Apply the given analyzer function to the current node. If the analyzer + * doesn't return false, traverse each child of the current node using the given + * traverser function. + * + * @param {function} analyzer + * @param {function} traverser + * @param {object} node + * @param {array} path + * @param {object} state + */ +function analyzeAndTraverse(analyzer, traverser, node, path, state) { + if (node.type) { + if (analyzer(node, path, state) === false) { + return; + } + path.unshift(node); + } + + getOrderedChildren(node).forEach(function(child) { + traverser(child, path, state); + }); + + node.type && path.shift(); +} + +/** + * It is crucial that we traverse in order, or else catchup() on a later + * node that is processed out of order can move the buffer past a node + * that we haven't handled yet, preventing us from modifying that node. + * + * This can happen when a node has multiple properties containing children. + * For example, XJSElement nodes have `openingElement`, `closingElement` and + * `children`. If we traverse `openingElement`, then `closingElement`, then + * when we get to `children`, the buffer has already caught up to the end of + * the closing element, after the children. + * + * This is basically a Schwartzian transform. Collects an array of children, + * each one represented as [child, startIndex]; sorts the array by start + * index; then traverses the children in that order. + */ +function getOrderedChildren(node) { + var queue = []; + for (var key in node) { + if (node.hasOwnProperty(key)) { + enqueueNodeWithStartIndex(queue, node[key]); + } + } + queue.sort(function(a, b) { return a[1] - b[1]; }); + return queue.map(function(pair) { return pair[0]; }); +} + +/** + * Helper function for analyzeAndTraverse which queues up all of the children + * of the given node. + * + * Children can also be found in arrays, so we basically want to merge all of + * those arrays together so we can sort them and then traverse the children + * in order. + * + * One example is the Program node. It contains `body` and `comments`, both + * arrays. Lexographically, comments are interspersed throughout the body + * nodes, but esprima's AST groups them together. + */ +function enqueueNodeWithStartIndex(queue, node) { + if (typeof node !== 'object' || node === null) { + return; + } + if (node.range) { + queue.push([node, node.range[0]]); + } else if (Array.isArray(node)) { + for (var ii = 0; ii < node.length; ii++) { + enqueueNodeWithStartIndex(queue, node[ii]); + } + } +} + +/** + * Checks whether a node or any of its sub-nodes contains + * a syntactic construct of the passed type. + * @param {object} node - AST node to test. + * @param {string} type - node type to lookup. + */ +function containsChildOfType(node, type) { + return containsChildMatching(node, function(node) { + return node.type === type; + }); +} + +function containsChildMatching(node, matcher) { + var foundMatchingChild = false; + function nodeTypeAnalyzer(node) { + if (matcher(node) === true) { + foundMatchingChild = true; + return false; + } + } + function nodeTypeTraverser(child, path, state) { + if (!foundMatchingChild) { + foundMatchingChild = containsChildMatching(child, matcher); + } + } + analyzeAndTraverse( + nodeTypeAnalyzer, + nodeTypeTraverser, + node, + [] + ); + return foundMatchingChild; +} + +var scopeTypes = {}; +scopeTypes[Syntax.ArrowFunctionExpression] = true; +scopeTypes[Syntax.FunctionExpression] = true; +scopeTypes[Syntax.FunctionDeclaration] = true; +scopeTypes[Syntax.Program] = true; + +function getBoundaryNode(path) { + for (var ii = 0; ii < path.length; ++ii) { + if (scopeTypes[path[ii].type]) { + return path[ii]; + } + } + throw new Error( + 'Expected to find a node with one of the following types in path:\n' + + JSON.stringify(Object.keys(scopeTypes)) + ); +} + +function getTempVar(tempVarIndex) { + return '$__' + tempVarIndex; +} + +function injectTempVar(state) { + var tempVar = '$__' + (state.localScope.tempVarIndex++); + state.localScope.tempVars.push(tempVar); + return tempVar; +} + +function injectTempVarDeclarations(state, index) { + if (state.localScope.tempVars.length) { + state.g.buffer = + state.g.buffer.slice(0, index) + + 'var ' + state.localScope.tempVars.join(', ') + ';' + + state.g.buffer.slice(index); + state.localScope.tempVars = []; + } +} + +exports.analyzeAndTraverse = analyzeAndTraverse; +exports.append = append; +exports.catchup = catchup; +exports.catchupNewlines = catchupNewlines; +exports.catchupWhiteOut = catchupWhiteOut; +exports.catchupWhiteSpace = catchupWhiteSpace; +exports.containsChildMatching = containsChildMatching; +exports.containsChildOfType = containsChildOfType; +exports.createState = createState; +exports.declareIdentInLocalScope = declareIdentInLocalScope; +exports.getBoundaryNode = getBoundaryNode; +exports.getDocblock = getDocblock; +exports.getLexicalBindingMetadata = getLexicalBindingMetadata; +exports.getLocalBindingMetadata = getLocalBindingMetadata; +exports.getNextSyntacticCharOffset = getNextSyntacticCharOffset; +exports.getNodeSourceText = getNodeSourceText; +exports.getOrderedChildren = getOrderedChildren; +exports.getTempVar = getTempVar; +exports.identInLocalScope = identInLocalScope; +exports.identWithinLexicalScope = identWithinLexicalScope; +exports.indentBefore = indentBefore; +exports.initScopeMetadata = initScopeMetadata; +exports.injectTempVar = injectTempVar; +exports.injectTempVarDeclarations = injectTempVarDeclarations; +exports.move = move; +exports.scopeTypes = scopeTypes; +exports.updateIndent = updateIndent; +exports.updateState = updateState; + +},{"./docblock":21,"esprima-fb":9}],24:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*global exports:true*/ + +/** + * Desugars ES6 Arrow functions to ES3 function expressions. + * If the function contains `this` expression -- automatically + * binds the function to current value of `this`. + * + * Single parameter, simple expression: + * + * [1, 2, 3].map(x => x * x); + * + * [1, 2, 3].map(function(x) { return x * x; }); + * + * Several parameters, complex block: + * + * this.users.forEach((user, idx) => { + * return this.isActive(idx) && this.send(user); + * }); + * + * this.users.forEach(function(user, idx) { + * return this.isActive(idx) && this.send(user); + * }.bind(this)); + * + */ +var restParamVisitors = _dereq_('./es6-rest-param-visitors'); +var destructuringVisitors = _dereq_('./es6-destructuring-visitors'); + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * @public + */ +function visitArrowFunction(traverse, node, path, state) { + var notInExpression = (path[0].type === Syntax.ExpressionStatement); + + // Wrap a function into a grouping operator, if it's not + // in the expression position. + if (notInExpression) { + utils.append('(', state); + } + + utils.append('function', state); + renderParams(traverse, node, path, state); + + // Skip arrow. + utils.catchupWhiteSpace(node.body.range[0], state); + + var renderBody = node.body.type == Syntax.BlockStatement + ? renderStatementBody + : renderExpressionBody; + + path.unshift(node); + renderBody(traverse, node, path, state); + path.shift(); + + // Bind the function only if `this` value is used + // inside it or inside any sub-expression. + var containsBindingSyntax = + utils.containsChildMatching(node.body, function(node) { + return node.type === Syntax.ThisExpression + || (node.type === Syntax.Identifier + && node.name === "super"); + }); + + if (containsBindingSyntax) { + utils.append('.bind(this)', state); + } + + utils.catchupWhiteSpace(node.range[1], state); + + // Close wrapper if not in the expression. + if (notInExpression) { + utils.append(')', state); + } + + return false; +} + +function renderParams(traverse, node, path, state) { + // To preserve inline typechecking directives, we + // distinguish between parens-free and paranthesized single param. + if (isParensFreeSingleParam(node, state) || !node.params.length) { + utils.append('(', state); + } + if (node.params.length !== 0) { + path.unshift(node); + traverse(node.params, path, state); + path.unshift(); + } + utils.append(')', state); +} + +function isParensFreeSingleParam(node, state) { + return node.params.length === 1 && + state.g.source[state.g.position] !== '('; +} + +function renderExpressionBody(traverse, node, path, state) { + // Wrap simple expression bodies into a block + // with explicit return statement. + utils.append('{', state); + + // Special handling of rest param. + if (node.rest) { + utils.append( + restParamVisitors.renderRestParamSetup(node, state), + state + ); + } + + // Special handling of destructured params. + destructuringVisitors.renderDestructuredComponents( + node, + utils.updateState(state, { + localScope: { + parentNode: state.parentNode, + parentScope: state.parentScope, + identifiers: state.identifiers, + tempVarIndex: 0 + } + }) + ); + + utils.append('return ', state); + renderStatementBody(traverse, node, path, state); + utils.append(';}', state); +} + +function renderStatementBody(traverse, node, path, state) { + traverse(node.body, path, state); + utils.catchup(node.body.range[1], state); +} + +visitArrowFunction.test = function(node, path, state) { + return node.type === Syntax.ArrowFunctionExpression; +}; + +exports.visitorList = [ + visitArrowFunction +]; + + +},{"../src/utils":23,"./es6-destructuring-visitors":27,"./es6-rest-param-visitors":30,"esprima-fb":9}],25:[function(_dereq_,module,exports){ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +/*global exports:true*/ + +/** + * Implements ES6 call spread. + * + * instance.method(a, b, c, ...d) + * + * instance.method.apply(instance, [a, b, c].concat(d)) + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +function process(traverse, node, path, state) { + utils.move(node.range[0], state); + traverse(node, path, state); + utils.catchup(node.range[1], state); +} + +function visitCallSpread(traverse, node, path, state) { + utils.catchup(node.range[0], state); + + if (node.type === Syntax.NewExpression) { + // Input = new Set(1, 2, ...list) + // Output = new (Function.prototype.bind.apply(Set, [null, 1, 2].concat(list))) + utils.append('new (Function.prototype.bind.apply(', state); + process(traverse, node.callee, path, state); + } else if (node.callee.type === Syntax.MemberExpression) { + // Input = get().fn(1, 2, ...more) + // Output = (_ = get()).fn.apply(_, [1, 2].apply(more)) + var tempVar = utils.injectTempVar(state); + utils.append('(' + tempVar + ' = ', state); + process(traverse, node.callee.object, path, state); + utils.append(')', state); + if (node.callee.property.type === Syntax.Identifier) { + utils.append('.', state); + process(traverse, node.callee.property, path, state); + } else { + utils.append('[', state); + process(traverse, node.callee.property, path, state); + utils.append(']', state); + } + utils.append('.apply(' + tempVar, state); + } else { + // Input = max(1, 2, ...list) + // Output = max.apply(null, [1, 2].concat(list)) + var needsToBeWrappedInParenthesis = + node.callee.type === Syntax.FunctionDeclaration || + node.callee.type === Syntax.FunctionExpression; + if (needsToBeWrappedInParenthesis) { + utils.append('(', state); + } + process(traverse, node.callee, path, state); + if (needsToBeWrappedInParenthesis) { + utils.append(')', state); + } + utils.append('.apply(null', state); + } + utils.append(', ', state); + + var args = node.arguments.slice(); + var spread = args.pop(); + if (args.length || node.type === Syntax.NewExpression) { + utils.append('[', state); + if (node.type === Syntax.NewExpression) { + utils.append('null' + (args.length ? ', ' : ''), state); + } + while (args.length) { + var arg = args.shift(); + utils.move(arg.range[0], state); + traverse(arg, path, state); + if (args.length) { + utils.catchup(args[0].range[0], state); + } else { + utils.catchup(arg.range[1], state); + } + } + utils.append('].concat(', state); + process(traverse, spread.argument, path, state); + utils.append(')', state); + } else { + process(traverse, spread.argument, path, state); + } + utils.append(node.type === Syntax.NewExpression ? '))' : ')', state); + + utils.move(node.range[1], state); + return false; +} + +visitCallSpread.test = function(node, path, state) { + return ( + ( + node.type === Syntax.CallExpression || + node.type === Syntax.NewExpression + ) && + node.arguments.length > 0 && + node.arguments[node.arguments.length - 1].type === Syntax.SpreadElement + ); +}; + +exports.visitorList = [ + visitCallSpread +]; + +},{"../src/utils":23,"esprima-fb":9}],26:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * @typechecks + */ +'use strict'; + +var base62 = _dereq_('base62'); +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reservedWordsHelper = _dereq_('./reserved-words-helper'); + +var declareIdentInLocalScope = utils.declareIdentInLocalScope; +var initScopeMetadata = utils.initScopeMetadata; + +var SUPER_PROTO_IDENT_PREFIX = '____SuperProtoOf'; + +var _anonClassUUIDCounter = 0; +var _mungedSymbolMaps = {}; + +function resetSymbols() { + _anonClassUUIDCounter = 0; + _mungedSymbolMaps = {}; +} + +/** + * Used to generate a unique class for use with code-gens for anonymous class + * expressions. + * + * @param {object} state + * @return {string} + */ +function _generateAnonymousClassName(state) { + var mungeNamespace = state.mungeNamespace || ''; + return '____Class' + mungeNamespace + base62.encode(_anonClassUUIDCounter++); +} + +/** + * Given an identifier name, munge it using the current state's mungeNamespace. + * + * @param {string} identName + * @param {object} state + * @return {string} + */ +function _getMungedName(identName, state) { + var mungeNamespace = state.mungeNamespace; + var shouldMinify = state.g.opts.minify; + + if (shouldMinify) { + if (!_mungedSymbolMaps[mungeNamespace]) { + _mungedSymbolMaps[mungeNamespace] = { + symbolMap: {}, + identUUIDCounter: 0 + }; + } + + var symbolMap = _mungedSymbolMaps[mungeNamespace].symbolMap; + if (!symbolMap[identName]) { + symbolMap[identName] = + base62.encode(_mungedSymbolMaps[mungeNamespace].identUUIDCounter++); + } + identName = symbolMap[identName]; + } + return '$' + mungeNamespace + identName; +} + +/** + * Extracts super class information from a class node. + * + * Information includes name of the super class and/or the expression string + * (if extending from an expression) + * + * @param {object} node + * @param {object} state + * @return {object} + */ +function _getSuperClassInfo(node, state) { + var ret = { + name: null, + expression: null + }; + if (node.superClass) { + if (node.superClass.type === Syntax.Identifier) { + ret.name = node.superClass.name; + } else { + // Extension from an expression + ret.name = _generateAnonymousClassName(state); + ret.expression = state.g.source.substring( + node.superClass.range[0], + node.superClass.range[1] + ); + } + } + return ret; +} + +/** + * Used with .filter() to find the constructor method in a list of + * MethodDefinition nodes. + * + * @param {object} classElement + * @return {boolean} + */ +function _isConstructorMethod(classElement) { + return classElement.type === Syntax.MethodDefinition && + classElement.key.type === Syntax.Identifier && + classElement.key.name === 'constructor'; +} + +/** + * @param {object} node + * @param {object} state + * @return {boolean} + */ +function _shouldMungeIdentifier(node, state) { + return ( + !!state.methodFuncNode && + !utils.getDocblock(state).hasOwnProperty('preventMunge') && + /^_(?!_)/.test(node.name) + ); +} + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassMethod(traverse, node, path, state) { + if (!state.g.opts.es5 && (node.kind === 'get' || node.kind === 'set')) { + throw new Error( + 'This transform does not support ' + node.kind + 'ter methods for ES6 ' + + 'classes. (line: ' + node.loc.start.line + ', col: ' + + node.loc.start.column + ')' + ); + } + state = utils.updateState(state, { + methodNode: node + }); + utils.catchup(node.range[0], state); + path.unshift(node); + traverse(node.value, path, state); + path.shift(); + return false; +} +visitClassMethod.test = function(node, path, state) { + return node.type === Syntax.MethodDefinition; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassFunctionExpression(traverse, node, path, state) { + var methodNode = path[0]; + var isGetter = methodNode.kind === 'get'; + var isSetter = methodNode.kind === 'set'; + + state = utils.updateState(state, { + methodFuncNode: node + }); + + if (methodNode.key.name === 'constructor') { + utils.append('function ' + state.className, state); + } else { + var methodAccessorComputed = false; + var methodAccessor; + var prototypeOrStatic = methodNode["static"] ? '' : '.prototype'; + var objectAccessor = state.className + prototypeOrStatic; + + if (methodNode.key.type === Syntax.Identifier) { + // foo() {} + methodAccessor = methodNode.key.name; + if (_shouldMungeIdentifier(methodNode.key, state)) { + methodAccessor = _getMungedName(methodAccessor, state); + } + if (isGetter || isSetter) { + methodAccessor = JSON.stringify(methodAccessor); + } else if (reservedWordsHelper.isReservedWord(methodAccessor)) { + methodAccessorComputed = true; + methodAccessor = JSON.stringify(methodAccessor); + } + } else if (methodNode.key.type === Syntax.Literal) { + // 'foo bar'() {} | get 'foo bar'() {} | set 'foo bar'() {} + methodAccessor = JSON.stringify(methodNode.key.value); + methodAccessorComputed = true; + } + + if (isSetter || isGetter) { + utils.append( + 'Object.defineProperty(' + + objectAccessor + ',' + + methodAccessor + ',' + + '{configurable:true,' + + methodNode.kind + ':function', + state + ); + } else { + if (state.g.opts.es3) { + if (methodAccessorComputed) { + methodAccessor = '[' + methodAccessor + ']'; + } else { + methodAccessor = '.' + methodAccessor; + } + utils.append( + objectAccessor + + methodAccessor + '=function' + (node.generator ? '*' : ''), + state + ); + } else { + if (!methodAccessorComputed) { + methodAccessor = JSON.stringify(methodAccessor); + } + utils.append( + 'Object.defineProperty(' + + objectAccessor + ',' + + methodAccessor + ',' + + '{writable:true,configurable:true,' + + 'value:function' + (node.generator ? '*' : ''), + state + ); + } + } + } + utils.move(methodNode.key.range[1], state); + utils.append('(', state); + + var params = node.params; + if (params.length > 0) { + utils.catchupNewlines(params[0].range[0], state); + for (var i = 0; i < params.length; i++) { + utils.catchup(node.params[i].range[0], state); + path.unshift(node); + traverse(params[i], path, state); + path.shift(); + } + } + + var closingParenPosition = utils.getNextSyntacticCharOffset(')', state); + utils.catchupWhiteSpace(closingParenPosition, state); + + var openingBracketPosition = utils.getNextSyntacticCharOffset('{', state); + utils.catchup(openingBracketPosition + 1, state); + + if (!state.scopeIsStrict) { + utils.append('"use strict";', state); + state = utils.updateState(state, { + scopeIsStrict: true + }); + } + utils.move(node.body.range[0] + '{'.length, state); + + path.unshift(node); + traverse(node.body, path, state); + path.shift(); + utils.catchup(node.body.range[1], state); + + if (methodNode.key.name !== 'constructor') { + if (isGetter || isSetter || !state.g.opts.es3) { + utils.append('})', state); + } + utils.append(';', state); + } + return false; +} +visitClassFunctionExpression.test = function(node, path, state) { + return node.type === Syntax.FunctionExpression + && path[0].type === Syntax.MethodDefinition; +}; + +function visitClassMethodParam(traverse, node, path, state) { + var paramName = node.name; + if (_shouldMungeIdentifier(node, state)) { + paramName = _getMungedName(node.name, state); + } + utils.append(paramName, state); + utils.move(node.range[1], state); +} +visitClassMethodParam.test = function(node, path, state) { + if (!path[0] || !path[1]) { + return; + } + + var parentFuncExpr = path[0]; + var parentClassMethod = path[1]; + + return parentFuncExpr.type === Syntax.FunctionExpression + && parentClassMethod.type === Syntax.MethodDefinition + && node.type === Syntax.Identifier; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function _renderClassBody(traverse, node, path, state) { + var className = state.className; + var superClass = state.superClass; + + // Set up prototype of constructor on same line as `extends` for line-number + // preservation. This relies on function-hoisting if a constructor function is + // defined in the class body. + if (superClass.name) { + // If the super class is an expression, we need to memoize the output of the + // expression into the generated class name variable and use that to refer + // to the super class going forward. Example: + // + // class Foo extends mixin(Bar, Baz) {} + // --transforms to-- + // function Foo() {} var ____Class0Blah = mixin(Bar, Baz); + if (superClass.expression !== null) { + utils.append( + 'var ' + superClass.name + '=' + superClass.expression + ';', + state + ); + } + + var keyName = superClass.name + '____Key'; + var keyNameDeclarator = ''; + if (!utils.identWithinLexicalScope(keyName, state)) { + keyNameDeclarator = 'var '; + declareIdentInLocalScope(keyName, initScopeMetadata(node), state); + } + utils.append( + 'for(' + keyNameDeclarator + keyName + ' in ' + superClass.name + '){' + + 'if(' + superClass.name + '.hasOwnProperty(' + keyName + ')){' + + className + '[' + keyName + ']=' + + superClass.name + '[' + keyName + '];' + + '}' + + '}', + state + ); + + var superProtoIdentStr = SUPER_PROTO_IDENT_PREFIX + superClass.name; + if (!utils.identWithinLexicalScope(superProtoIdentStr, state)) { + utils.append( + 'var ' + superProtoIdentStr + '=' + superClass.name + '===null?' + + 'null:' + superClass.name + '.prototype;', + state + ); + declareIdentInLocalScope(superProtoIdentStr, initScopeMetadata(node), state); + } + + utils.append( + className + '.prototype=Object.create(' + superProtoIdentStr + ');', + state + ); + utils.append( + className + '.prototype.constructor=' + className + ';', + state + ); + utils.append( + className + '.__superConstructor__=' + superClass.name + ';', + state + ); + } + + // If there's no constructor method specified in the class body, create an + // empty constructor function at the top (same line as the class keyword) + if (!node.body.body.filter(_isConstructorMethod).pop()) { + utils.append('function ' + className + '(){', state); + if (!state.scopeIsStrict) { + utils.append('"use strict";', state); + } + if (superClass.name) { + utils.append( + 'if(' + superClass.name + '!==null){' + + superClass.name + '.apply(this,arguments);}', + state + ); + } + utils.append('}', state); + } + + utils.move(node.body.range[0] + '{'.length, state); + traverse(node.body, path, state); + utils.catchupWhiteSpace(node.range[1], state); +} + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassDeclaration(traverse, node, path, state) { + var className = node.id.name; + var superClass = _getSuperClassInfo(node, state); + + state = utils.updateState(state, { + mungeNamespace: className, + className: className, + superClass: superClass + }); + + _renderClassBody(traverse, node, path, state); + + return false; +} +visitClassDeclaration.test = function(node, path, state) { + return node.type === Syntax.ClassDeclaration; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitClassExpression(traverse, node, path, state) { + var className = node.id && node.id.name || _generateAnonymousClassName(state); + var superClass = _getSuperClassInfo(node, state); + + utils.append('(function(){', state); + + state = utils.updateState(state, { + mungeNamespace: className, + className: className, + superClass: superClass + }); + + _renderClassBody(traverse, node, path, state); + + utils.append('return ' + className + ';})()', state); + return false; +} +visitClassExpression.test = function(node, path, state) { + return node.type === Syntax.ClassExpression; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitPrivateIdentifier(traverse, node, path, state) { + utils.append(_getMungedName(node.name, state), state); + utils.move(node.range[1], state); +} +visitPrivateIdentifier.test = function(node, path, state) { + if (node.type === Syntax.Identifier && _shouldMungeIdentifier(node, state)) { + // Always munge non-computed properties of MemberExpressions + // (a la preventing access of properties of unowned objects) + if (path[0].type === Syntax.MemberExpression && path[0].object !== node + && path[0].computed === false) { + return true; + } + + // Always munge identifiers that were declared within the method function + // scope + if (utils.identWithinLexicalScope(node.name, state, state.methodFuncNode)) { + return true; + } + + // Always munge private keys on object literals defined within a method's + // scope. + if (path[0].type === Syntax.Property + && path[1].type === Syntax.ObjectExpression) { + return true; + } + + // Always munge function parameters + if (path[0].type === Syntax.FunctionExpression + || path[0].type === Syntax.FunctionDeclaration + || path[0].type === Syntax.ArrowFunctionExpression) { + for (var i = 0; i < path[0].params.length; i++) { + if (path[0].params[i] === node) { + return true; + } + } + } + } + return false; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitSuperCallExpression(traverse, node, path, state) { + var superClassName = state.superClass.name; + + if (node.callee.type === Syntax.Identifier) { + if (_isConstructorMethod(state.methodNode)) { + utils.append(superClassName + '.call(', state); + } else { + var protoProp = SUPER_PROTO_IDENT_PREFIX + superClassName; + if (state.methodNode.key.type === Syntax.Identifier) { + protoProp += '.' + state.methodNode.key.name; + } else if (state.methodNode.key.type === Syntax.Literal) { + protoProp += '[' + JSON.stringify(state.methodNode.key.value) + ']'; + } + utils.append(protoProp + ".call(", state); + } + utils.move(node.callee.range[1], state); + } else if (node.callee.type === Syntax.MemberExpression) { + utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); + utils.move(node.callee.object.range[1], state); + + if (node.callee.computed) { + // ["a" + "b"] + utils.catchup(node.callee.property.range[1] + ']'.length, state); + } else { + // .ab + utils.append('.' + node.callee.property.name, state); + } + + utils.append('.call(', state); + utils.move(node.callee.range[1], state); + } + + utils.append('this', state); + if (node.arguments.length > 0) { + utils.append(',', state); + utils.catchupWhiteSpace(node.arguments[0].range[0], state); + traverse(node.arguments, path, state); + } + + utils.catchupWhiteSpace(node.range[1], state); + utils.append(')', state); + return false; +} +visitSuperCallExpression.test = function(node, path, state) { + if (state.superClass && node.type === Syntax.CallExpression) { + var callee = node.callee; + if (callee.type === Syntax.Identifier && callee.name === 'super' + || callee.type == Syntax.MemberExpression + && callee.object.name === 'super') { + return true; + } + } + return false; +}; + +/** + * @param {function} traverse + * @param {object} node + * @param {array} path + * @param {object} state + */ +function visitSuperMemberExpression(traverse, node, path, state) { + var superClassName = state.superClass.name; + + utils.append(SUPER_PROTO_IDENT_PREFIX + superClassName, state); + utils.move(node.object.range[1], state); +} +visitSuperMemberExpression.test = function(node, path, state) { + return state.superClass + && node.type === Syntax.MemberExpression + && node.object.type === Syntax.Identifier + && node.object.name === 'super'; +}; + +exports.resetSymbols = resetSymbols; + +exports.visitorList = [ + visitClassDeclaration, + visitClassExpression, + visitClassFunctionExpression, + visitClassMethod, + visitClassMethodParam, + visitPrivateIdentifier, + visitSuperCallExpression, + visitSuperMemberExpression +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"base62":10,"esprima-fb":9}],27:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/*global exports:true*/ + +/** + * Implements ES6 destructuring assignment and pattern matchng. + * + * function init({port, ip, coords: [x, y]}) { + * return (x && y) ? {id, port} : {ip}; + * }; + * + * function init($__0) { + * var + * port = $__0.port, + * ip = $__0.ip, + * $__1 = $__0.coords, + * x = $__1[0], + * y = $__1[1]; + * return (x && y) ? {id, port} : {ip}; + * } + * + * var x, {ip, port} = init({ip, port}); + * + * var x, $__0 = init({ip, port}), ip = $__0.ip, port = $__0.port; + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +var reservedWordsHelper = _dereq_('./reserved-words-helper'); +var restParamVisitors = _dereq_('./es6-rest-param-visitors'); +var restPropertyHelpers = _dereq_('./es7-rest-property-helpers'); + +// ------------------------------------------------------- +// 1. Structured variable declarations. +// +// var [a, b] = [b, a]; +// var {x, y} = {y, x}; +// ------------------------------------------------------- + +function visitStructuredVariable(traverse, node, path, state) { + // Allocate new temp for the pattern. + utils.append(utils.getTempVar(state.localScope.tempVarIndex) + '=', state); + // Skip the pattern and assign the init to the temp. + utils.catchupWhiteSpace(node.init.range[0], state); + traverse(node.init, path, state); + utils.catchup(node.init.range[1], state); + // Render the destructured data. + utils.append(',' + getDestructuredComponents(node.id, state), state); + state.localScope.tempVarIndex++; + return false; +} + +visitStructuredVariable.test = function(node, path, state) { + return node.type === Syntax.VariableDeclarator && + isStructuredPattern(node.id); +}; + +function isStructuredPattern(node) { + return node.type === Syntax.ObjectPattern || + node.type === Syntax.ArrayPattern; +} + +// Main function which does actual recursive destructuring +// of nested complex structures. +function getDestructuredComponents(node, state) { + var tmpIndex = state.localScope.tempVarIndex; + var components = []; + var patternItems = getPatternItems(node); + + for (var idx = 0; idx < patternItems.length; idx++) { + var item = patternItems[idx]; + if (!item) { + continue; + } + + if (item.type === Syntax.SpreadElement) { + // Spread/rest of an array. + // TODO(dmitrys): support spread in the middle of a pattern + // and also for function param patterns: [x, ...xs, y] + components.push(item.argument.name + + '=Array.prototype.slice.call(' + + utils.getTempVar(tmpIndex) + ',' + idx + ')' + ); + continue; + } + + if (item.type === Syntax.SpreadProperty) { + var restExpression = restPropertyHelpers.renderRestExpression( + utils.getTempVar(tmpIndex), + patternItems + ); + components.push(item.argument.name + '=' + restExpression); + continue; + } + + // Depending on pattern type (Array or Object), we get + // corresponding pattern item parts. + var accessor = getPatternItemAccessor(node, item, tmpIndex, idx); + var value = getPatternItemValue(node, item); + + // TODO(dmitrys): implement default values: {x, y=5} + if (value.type === Syntax.Identifier) { + // Simple pattern item. + components.push(value.name + '=' + accessor); + } else { + // Complex sub-structure. + components.push( + utils.getTempVar(++state.localScope.tempVarIndex) + '=' + accessor + + ',' + getDestructuredComponents(value, state) + ); + } + } + + return components.join(','); +} + +function getPatternItems(node) { + return node.properties || node.elements; +} + +function getPatternItemAccessor(node, patternItem, tmpIndex, idx) { + var tmpName = utils.getTempVar(tmpIndex); + if (node.type === Syntax.ObjectPattern) { + if (reservedWordsHelper.isReservedWord(patternItem.key.name)) { + return tmpName + '["' + patternItem.key.name + '"]'; + } else if (patternItem.key.type === Syntax.Literal) { + return tmpName + '[' + JSON.stringify(patternItem.key.value) + ']'; + } else if (patternItem.key.type === Syntax.Identifier) { + return tmpName + '.' + patternItem.key.name; + } + } else if (node.type === Syntax.ArrayPattern) { + return tmpName + '[' + idx + ']'; + } +} + +function getPatternItemValue(node, patternItem) { + return node.type === Syntax.ObjectPattern + ? patternItem.value + : patternItem; +} + +// ------------------------------------------------------- +// 2. Assignment expression. +// +// [a, b] = [b, a]; +// ({x, y} = {y, x}); +// ------------------------------------------------------- + +function visitStructuredAssignment(traverse, node, path, state) { + var exprNode = node.expression; + utils.append('var ' + utils.getTempVar(state.localScope.tempVarIndex) + '=', state); + + utils.catchupWhiteSpace(exprNode.right.range[0], state); + traverse(exprNode.right, path, state); + utils.catchup(exprNode.right.range[1], state); + + utils.append( + ';' + getDestructuredComponents(exprNode.left, state) + ';', + state + ); + + utils.catchupWhiteSpace(node.range[1], state); + state.localScope.tempVarIndex++; + return false; +} + +visitStructuredAssignment.test = function(node, path, state) { + // We consider the expression statement rather than just assignment + // expression to cover case with object patters which should be + // wrapped in grouping operator: ({x, y} = {y, x}); + return node.type === Syntax.ExpressionStatement && + node.expression.type === Syntax.AssignmentExpression && + isStructuredPattern(node.expression.left); +}; + +// ------------------------------------------------------- +// 3. Structured parameter. +// +// function foo({x, y}) { ... } +// ------------------------------------------------------- + +function visitStructuredParameter(traverse, node, path, state) { + utils.append(utils.getTempVar(getParamIndex(node, path)), state); + utils.catchupWhiteSpace(node.range[1], state); + return true; +} + +function getParamIndex(paramNode, path) { + var funcNode = path[0]; + var tmpIndex = 0; + for (var k = 0; k < funcNode.params.length; k++) { + var param = funcNode.params[k]; + if (param === paramNode) { + break; + } + if (isStructuredPattern(param)) { + tmpIndex++; + } + } + return tmpIndex; +} + +visitStructuredParameter.test = function(node, path, state) { + return isStructuredPattern(node) && isFunctionNode(path[0]); +}; + +function isFunctionNode(node) { + return (node.type == Syntax.FunctionDeclaration || + node.type == Syntax.FunctionExpression || + node.type == Syntax.MethodDefinition || + node.type == Syntax.ArrowFunctionExpression); +} + +// ------------------------------------------------------- +// 4. Function body for structured parameters. +// +// function foo({x, y}) { x; y; } +// ------------------------------------------------------- + +function visitFunctionBodyForStructuredParameter(traverse, node, path, state) { + var funcNode = path[0]; + + utils.catchup(funcNode.body.range[0] + 1, state); + renderDestructuredComponents(funcNode, state); + + if (funcNode.rest) { + utils.append( + restParamVisitors.renderRestParamSetup(funcNode, state), + state + ); + } + + return true; +} + +function renderDestructuredComponents(funcNode, state) { + var destructuredComponents = []; + + for (var k = 0; k < funcNode.params.length; k++) { + var param = funcNode.params[k]; + if (isStructuredPattern(param)) { + destructuredComponents.push( + getDestructuredComponents(param, state) + ); + state.localScope.tempVarIndex++; + } + } + + if (destructuredComponents.length) { + utils.append('var ' + destructuredComponents.join(',') + ';', state); + } +} + +visitFunctionBodyForStructuredParameter.test = function(node, path, state) { + return node.type === Syntax.BlockStatement && isFunctionNode(path[0]); +}; + +exports.visitorList = [ + visitStructuredVariable, + visitStructuredAssignment, + visitStructuredParameter, + visitFunctionBodyForStructuredParameter +]; + +exports.renderDestructuredComponents = renderDestructuredComponents; + + +},{"../src/utils":23,"./es6-rest-param-visitors":30,"./es7-rest-property-helpers":32,"./reserved-words-helper":34,"esprima-fb":9}],28:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars concise methods of objects to function expressions. + * + * var foo = { + * method(x, y) { ... } + * }; + * + * var foo = { + * method: function(x, y) { ... } + * }; + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reservedWordsHelper = _dereq_('./reserved-words-helper'); + +function visitObjectConciseMethod(traverse, node, path, state) { + var isGenerator = node.value.generator; + if (isGenerator) { + utils.catchupWhiteSpace(node.range[0] + 1, state); + } + if (node.computed) { // [<expr>]() { ...} + utils.catchup(node.key.range[1] + 1, state); + } else if (reservedWordsHelper.isReservedWord(node.key.name)) { + utils.catchup(node.key.range[0], state); + utils.append('"', state); + utils.catchup(node.key.range[1], state); + utils.append('"', state); + } + + utils.catchup(node.key.range[1], state); + utils.append( + ':function' + (isGenerator ? '*' : ''), + state + ); + path.unshift(node); + traverse(node.value, path, state); + path.shift(); + return false; +} + +visitObjectConciseMethod.test = function(node, path, state) { + return node.type === Syntax.Property && + node.value.type === Syntax.FunctionExpression && + node.method === true; +}; + +exports.visitorList = [ + visitObjectConciseMethod +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],29:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node: true*/ + +/** + * Desugars ES6 Object Literal short notations into ES3 full notation. + * + * // Easier return values. + * function foo(x, y) { + * return {x, y}; // {x: x, y: y} + * }; + * + * // Destructuring. + * function init({port, ip, coords: {x, y}}) { ... } + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * @public + */ +function visitObjectLiteralShortNotation(traverse, node, path, state) { + utils.catchup(node.key.range[1], state); + utils.append(':' + node.key.name, state); + return false; +} + +visitObjectLiteralShortNotation.test = function(node, path, state) { + return node.type === Syntax.Property && + node.kind === 'init' && + node.shorthand === true && + path[0].type !== Syntax.ObjectPattern; +}; + +exports.visitorList = [ + visitObjectLiteralShortNotation +]; + + +},{"../src/utils":23,"esprima-fb":9}],30:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars ES6 rest parameters into an ES3 arguments array. + * + * function printf(template, ...args) { + * args.forEach(...); + * } + * + * We could use `Array.prototype.slice.call`, but that usage of arguments causes + * functions to be deoptimized in V8, so instead we use a for-loop. + * + * function printf(template) { + * for (var args = [], $__0 = 1, $__1 = arguments.length; $__0 < $__1; $__0++) + * args.push(arguments[$__0]); + * args.forEach(...); + * } + * + */ +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + + + +function _nodeIsFunctionWithRestParam(node) { + return (node.type === Syntax.FunctionDeclaration + || node.type === Syntax.FunctionExpression + || node.type === Syntax.ArrowFunctionExpression) + && node.rest; +} + +function visitFunctionParamsWithRestParam(traverse, node, path, state) { + if (node.parametricType) { + utils.catchup(node.parametricType.range[0], state); + path.unshift(node); + traverse(node.parametricType, path, state); + path.shift(); + } + + // Render params. + if (node.params.length) { + path.unshift(node); + traverse(node.params, path, state); + path.shift(); + } else { + // -3 is for ... of the rest. + utils.catchup(node.rest.range[0] - 3, state); + } + utils.catchupWhiteSpace(node.rest.range[1], state); + + path.unshift(node); + traverse(node.body, path, state); + path.shift(); + + return false; +} + +visitFunctionParamsWithRestParam.test = function(node, path, state) { + return _nodeIsFunctionWithRestParam(node); +}; + +function renderRestParamSetup(functionNode, state) { + var idx = state.localScope.tempVarIndex++; + var len = state.localScope.tempVarIndex++; + + return 'for (var ' + functionNode.rest.name + '=[],' + + utils.getTempVar(idx) + '=' + functionNode.params.length + ',' + + utils.getTempVar(len) + '=arguments.length;' + + utils.getTempVar(idx) + '<' + utils.getTempVar(len) + ';' + + utils.getTempVar(idx) + '++) ' + + functionNode.rest.name + '.push(arguments[' + utils.getTempVar(idx) + ']);'; +} + +function visitFunctionBodyWithRestParam(traverse, node, path, state) { + utils.catchup(node.range[0] + 1, state); + var parentNode = path[0]; + utils.append(renderRestParamSetup(parentNode, state), state); + return true; +} + +visitFunctionBodyWithRestParam.test = function(node, path, state) { + return node.type === Syntax.BlockStatement + && _nodeIsFunctionWithRestParam(path[0]); +}; + +exports.renderRestParamSetup = renderRestParamSetup; +exports.visitorList = [ + visitFunctionParamsWithRestParam, + visitFunctionBodyWithRestParam +]; + +},{"../src/utils":23,"esprima-fb":9}],31:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * @typechecks + */ +'use strict'; + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +/** + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.1.9 + */ +function visitTemplateLiteral(traverse, node, path, state) { + var templateElements = node.quasis; + + utils.append('(', state); + for (var ii = 0; ii < templateElements.length; ii++) { + var templateElement = templateElements[ii]; + if (templateElement.value.raw !== '') { + utils.append(getCookedValue(templateElement), state); + if (!templateElement.tail) { + // + between element and substitution + utils.append(' + ', state); + } + // maintain line numbers + utils.move(templateElement.range[0], state); + utils.catchupNewlines(templateElement.range[1], state); + } else { // templateElement.value.raw === '' + // Concatenat adjacent substitutions, e.g. `${x}${y}`. Empty templates + // appear before the first and after the last element - nothing to add in + // those cases. + if (ii > 0 && !templateElement.tail) { + // + between substitution and substitution + utils.append(' + ', state); + } + } + + utils.move(templateElement.range[1], state); + if (!templateElement.tail) { + var substitution = node.expressions[ii]; + if (substitution.type === Syntax.Identifier || + substitution.type === Syntax.MemberExpression || + substitution.type === Syntax.CallExpression) { + utils.catchup(substitution.range[1], state); + } else { + utils.append('(', state); + traverse(substitution, path, state); + utils.catchup(substitution.range[1], state); + utils.append(')', state); + } + // if next templateElement isn't empty... + if (templateElements[ii + 1].value.cooked !== '') { + utils.append(' + ', state); + } + } + } + utils.move(node.range[1], state); + utils.append(')', state); + return false; +} + +visitTemplateLiteral.test = function(node, path, state) { + return node.type === Syntax.TemplateLiteral; +}; + +/** + * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-12.2.6 + */ +function visitTaggedTemplateExpression(traverse, node, path, state) { + var template = node.quasi; + var numQuasis = template.quasis.length; + + // print the tag + utils.move(node.tag.range[0], state); + traverse(node.tag, path, state); + utils.catchup(node.tag.range[1], state); + + // print array of template elements + utils.append('(function() { var siteObj = [', state); + for (var ii = 0; ii < numQuasis; ii++) { + utils.append(getCookedValue(template.quasis[ii]), state); + if (ii !== numQuasis - 1) { + utils.append(', ', state); + } + } + utils.append(']; siteObj.raw = [', state); + for (ii = 0; ii < numQuasis; ii++) { + utils.append(getRawValue(template.quasis[ii]), state); + if (ii !== numQuasis - 1) { + utils.append(', ', state); + } + } + utils.append( + ']; Object.freeze(siteObj.raw); Object.freeze(siteObj); return siteObj; }()', + state + ); + + // print substitutions + if (numQuasis > 1) { + for (ii = 0; ii < template.expressions.length; ii++) { + var expression = template.expressions[ii]; + utils.append(', ', state); + + // maintain line numbers by calling catchupWhiteSpace over the whole + // previous TemplateElement + utils.move(template.quasis[ii].range[0], state); + utils.catchupNewlines(template.quasis[ii].range[1], state); + + utils.move(expression.range[0], state); + traverse(expression, path, state); + utils.catchup(expression.range[1], state); + } + } + + // print blank lines to push the closing ) down to account for the final + // TemplateElement. + utils.catchupNewlines(node.range[1], state); + + utils.append(')', state); + + return false; +} + +visitTaggedTemplateExpression.test = function(node, path, state) { + return node.type === Syntax.TaggedTemplateExpression; +}; + +function getCookedValue(templateElement) { + return JSON.stringify(templateElement.value.cooked); +} + +function getRawValue(templateElement) { + return JSON.stringify(templateElement.value.raw); +} + +exports.visitorList = [ + visitTemplateLiteral, + visitTaggedTemplateExpression +]; + +},{"../src/utils":23,"esprima-fb":9}],32:[function(_dereq_,module,exports){ +/** + * Copyright 2013 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*jslint node:true*/ + +/** + * Desugars ES7 rest properties into ES5 object iteration. + */ + +var Syntax = _dereq_('esprima-fb').Syntax; + +// TODO: This is a pretty massive helper, it should only be defined once, in the +// transform's runtime environment. We don't currently have a runtime though. +var restFunction = + '(function(source, exclusion) {' + + 'var rest = {};' + + 'var hasOwn = Object.prototype.hasOwnProperty;' + + 'if (source == null) {' + + 'throw new TypeError();' + + '}' + + 'for (var key in source) {' + + 'if (hasOwn.call(source, key) && !hasOwn.call(exclusion, key)) {' + + 'rest[key] = source[key];' + + '}' + + '}' + + 'return rest;' + + '})'; + +function getPropertyNames(properties) { + var names = []; + for (var i = 0; i < properties.length; i++) { + var property = properties[i]; + if (property.type === Syntax.SpreadProperty) { + continue; + } + if (property.type === Syntax.Identifier) { + names.push(property.name); + } else { + names.push(property.key.name); + } + } + return names; +} + +function getRestFunctionCall(source, exclusion) { + return restFunction + '(' + source + ',' + exclusion + ')'; +} + +function getSimpleShallowCopy(accessorExpression) { + // This could be faster with 'Object.assign({}, ' + accessorExpression + ')' + // but to unify code paths and avoid a ES6 dependency we use the same + // helper as for the exclusion case. + return getRestFunctionCall(accessorExpression, '{}'); +} + +function renderRestExpression(accessorExpression, excludedProperties) { + var excludedNames = getPropertyNames(excludedProperties); + if (!excludedNames.length) { + return getSimpleShallowCopy(accessorExpression); + } + return getRestFunctionCall( + accessorExpression, + '{' + excludedNames.join(':1,') + ':1}' + ); +} + +exports.renderRestExpression = renderRestExpression; + +},{"esprima-fb":9}],33:[function(_dereq_,module,exports){ +/** + * Copyright 2004-present Facebook. All Rights Reserved. + */ +/*global exports:true*/ + +/** + * Implements ES7 object spread property. + * https://gist.github.com/sebmarkbage/aa849c7973cb4452c547 + * + * { ...a, x: 1 } + * + * Object.assign({}, a, {x: 1 }) + * + */ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); + +function visitObjectLiteralSpread(traverse, node, path, state) { + utils.catchup(node.range[0], state); + + utils.append('Object.assign({', state); + + // Skip the original { + utils.move(node.range[0] + 1, state); + + var previousWasSpread = false; + + for (var i = 0; i < node.properties.length; i++) { + var property = node.properties[i]; + if (property.type === Syntax.SpreadProperty) { + + // Close the previous object or initial object + if (!previousWasSpread) { + utils.append('}', state); + } + + if (i === 0) { + // Normally there will be a comma when we catch up, but not before + // the first property. + utils.append(',', state); + } + + utils.catchup(property.range[0], state); + + // skip ... + utils.move(property.range[0] + 3, state); + + traverse(property.argument, path, state); + + utils.catchup(property.range[1], state); + + previousWasSpread = true; + + } else { + + utils.catchup(property.range[0], state); + + if (previousWasSpread) { + utils.append('{', state); + } + + traverse(property, path, state); + + utils.catchup(property.range[1], state); + + previousWasSpread = false; + + } + } + + // Strip any non-whitespace between the last item and the end. + // We only catch up on whitespace so that we ignore any trailing commas which + // are stripped out for IE8 support. Unfortunately, this also strips out any + // trailing comments. + utils.catchupWhiteSpace(node.range[1] - 1, state); + + // Skip the trailing } + utils.move(node.range[1], state); + + if (!previousWasSpread) { + utils.append('}', state); + } + + utils.append(')', state); + return false; +} + +visitObjectLiteralSpread.test = function(node, path, state) { + if (node.type !== Syntax.ObjectExpression) { + return false; + } + // Tight loop optimization + var hasAtLeastOneSpreadProperty = false; + for (var i = 0; i < node.properties.length; i++) { + var property = node.properties[i]; + if (property.type === Syntax.SpreadProperty) { + hasAtLeastOneSpreadProperty = true; + } else if (property.kind !== 'init') { + return false; + } + } + return hasAtLeastOneSpreadProperty; +}; + +exports.visitorList = [ + visitObjectLiteralSpread +]; + +},{"../src/utils":23,"esprima-fb":9}],34:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +var KEYWORDS = [ + 'break', 'do', 'in', 'typeof', 'case', 'else', 'instanceof', 'var', 'catch', + 'export', 'new', 'void', 'class', 'extends', 'return', 'while', 'const', + 'finally', 'super', 'with', 'continue', 'for', 'switch', 'yield', 'debugger', + 'function', 'this', 'default', 'if', 'throw', 'delete', 'import', 'try' +]; + +var FUTURE_RESERVED_WORDS = [ + 'enum', 'await', 'implements', 'package', 'protected', 'static', 'interface', + 'private', 'public' +]; + +var LITERALS = [ + 'null', + 'true', + 'false' +]; + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-reserved-words +var RESERVED_WORDS = [].concat( + KEYWORDS, + FUTURE_RESERVED_WORDS, + LITERALS +); + +var reservedWordsMap = Object.create(null); +RESERVED_WORDS.forEach(function(k) { + reservedWordsMap[k] = true; +}); + +/** + * This list should not grow as new reserved words are introdued. This list is + * of words that need to be quoted because ES3-ish browsers do not allow their + * use as identifier names. + */ +var ES3_FUTURE_RESERVED_WORDS = [ + 'enum', 'implements', 'package', 'protected', 'static', 'interface', + 'private', 'public' +]; + +var ES3_RESERVED_WORDS = [].concat( + KEYWORDS, + ES3_FUTURE_RESERVED_WORDS, + LITERALS +); + +var es3ReservedWordsMap = Object.create(null); +ES3_RESERVED_WORDS.forEach(function(k) { + es3ReservedWordsMap[k] = true; +}); + +exports.isReservedWord = function(word) { + return !!reservedWordsMap[word]; +}; + +exports.isES3ReservedWord = function(word) { + return !!es3ReservedWordsMap[word]; +}; + +},{}],35:[function(_dereq_,module,exports){ +/** + * Copyright 2014 Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +/*global exports:true*/ + +var Syntax = _dereq_('esprima-fb').Syntax; +var utils = _dereq_('../src/utils'); +var reserverdWordsHelper = _dereq_('./reserved-words-helper'); + +/** + * Code adapted from https://github.com/spicyj/es3ify + * The MIT License (MIT) + * Copyright (c) 2014 Ben Alpert + */ + +function visitProperty(traverse, node, path, state) { + utils.catchup(node.key.range[0], state); + utils.append('"', state); + utils.catchup(node.key.range[1], state); + utils.append('"', state); + utils.catchup(node.value.range[0], state); + traverse(node.value, path, state); + return false; +} + +visitProperty.test = function(node) { + return node.type === Syntax.Property && + node.key.type === Syntax.Identifier && + !node.method && + !node.shorthand && + !node.computed && + reserverdWordsHelper.isES3ReservedWord(node.key.name); +}; + +function visitMemberExpression(traverse, node, path, state) { + traverse(node.object, path, state); + utils.catchup(node.property.range[0] - 1, state); + utils.append('[', state); + utils.catchupWhiteSpace(node.property.range[0], state); + utils.append('"', state); + utils.catchup(node.property.range[1], state); + utils.append('"]', state); + return false; +} + +visitMemberExpression.test = function(node) { + return node.type === Syntax.MemberExpression && + node.property.type === Syntax.Identifier && + reserverdWordsHelper.isES3ReservedWord(node.property.name); +}; + +exports.visitorList = [ + visitProperty, + visitMemberExpression +]; + +},{"../src/utils":23,"./reserved-words-helper":34,"esprima-fb":9}],36:[function(_dereq_,module,exports){ +var esprima = _dereq_('esprima-fb'); +var utils = _dereq_('../src/utils'); + +var Syntax = esprima.Syntax; + +function _isFunctionNode(node) { + return node.type === Syntax.FunctionDeclaration + || node.type === Syntax.FunctionExpression + || node.type === Syntax.ArrowFunctionExpression; +} + +function visitClassProperty(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitClassProperty.test = function(node, path, state) { + return node.type === Syntax.ClassProperty; +}; + +function visitTypeAlias(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitTypeAlias.test = function(node, path, state) { + return node.type === Syntax.TypeAlias; +}; + +function visitTypeCast(traverse, node, path, state) { + path.unshift(node); + traverse(node.expression, path, state); + path.shift(); + + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeCast.test = function(node, path, state) { + return node.type === Syntax.TypeCastExpression; +}; + +function visitInterfaceDeclaration(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitInterfaceDeclaration.test = function(node, path, state) { + return node.type === Syntax.InterfaceDeclaration; +}; + +function visitDeclare(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitDeclare.test = function(node, path, state) { + switch (node.type) { + case Syntax.DeclareVariable: + case Syntax.DeclareFunction: + case Syntax.DeclareClass: + case Syntax.DeclareModule: + return true; + } + return false; +}; + +function visitFunctionParametricAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitFunctionParametricAnnotation.test = function(node, path, state) { + return node.type === Syntax.TypeParameterDeclaration + && path[0] + && _isFunctionNode(path[0]) + && node === path[0].typeParameters; +}; + +function visitFunctionReturnAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0], state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitFunctionReturnAnnotation.test = function(node, path, state) { + return path[0] && _isFunctionNode(path[0]) && node === path[0].returnType; +}; + +function visitOptionalFunctionParameterAnnotation(traverse, node, path, state) { + utils.catchup(node.range[0] + node.name.length, state); + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitOptionalFunctionParameterAnnotation.test = function(node, path, state) { + return node.type === Syntax.Identifier + && node.optional + && path[0] + && _isFunctionNode(path[0]); +}; + +function visitTypeAnnotatedIdentifier(traverse, node, path, state) { + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeAnnotatedIdentifier.test = function(node, path, state) { + return node.type === Syntax.Identifier && node.typeAnnotation; +}; + +function visitTypeAnnotatedObjectOrArrayPattern(traverse, node, path, state) { + utils.catchup(node.typeAnnotation.range[0], state); + utils.catchupWhiteOut(node.typeAnnotation.range[1], state); + return false; +} +visitTypeAnnotatedObjectOrArrayPattern.test = function(node, path, state) { + var rightType = node.type === Syntax.ObjectPattern + || node.type === Syntax.ArrayPattern; + return rightType && node.typeAnnotation; +}; + +/** + * Methods cause trouble, since esprima parses them as a key/value pair, where + * the location of the value starts at the method body. For example + * { bar(x:number,...y:Array<number>):number {} } + * is parsed as + * { bar: function(x: number, ...y:Array<number>): number {} } + * except that the location of the FunctionExpression value is 40-something, + * which is the location of the function body. This means that by the time we + * visit the params, rest param, and return type organically, we've already + * catchup()'d passed them. + */ +function visitMethod(traverse, node, path, state) { + path.unshift(node); + traverse(node.key, path, state); + + path.unshift(node.value); + traverse(node.value.params, path, state); + node.value.rest && traverse(node.value.rest, path, state); + node.value.returnType && traverse(node.value.returnType, path, state); + traverse(node.value.body, path, state); + + path.shift(); + + path.shift(); + return false; +} + +visitMethod.test = function(node, path, state) { + return (node.type === "Property" && (node.method || node.kind === "set" || node.kind === "get")) + || (node.type === "MethodDefinition"); +}; + +function visitImportType(traverse, node, path, state) { + utils.catchupWhiteOut(node.range[1], state); + return false; +} +visitImportType.test = function(node, path, state) { + return node.type === 'ImportDeclaration' + && node.isType; +}; + +exports.visitorList = [ + visitClassProperty, + visitDeclare, + visitImportType, + visitInterfaceDeclaration, + visitFunctionParametricAnnotation, + visitFunctionReturnAnnotation, + visitMethod, + visitOptionalFunctionParameterAnnotation, + visitTypeAlias, + visitTypeCast, + visitTypeAnnotatedIdentifier, + visitTypeAnnotatedObjectOrArrayPattern +]; + +},{"../src/utils":23,"esprima-fb":9}],37:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +function renderJSXLiteral(object, isLast, state, start, end) { + var lines = object.value.split(/\r\n|\n|\r/); + + if (start) { + utils.append(start, state); + } + + var lastNonEmptyLine = 0; + + lines.forEach(function(line, index) { + if (line.match(/[^ \t]/)) { + lastNonEmptyLine = index; + } + }); + + lines.forEach(function(line, index) { + var isFirstLine = index === 0; + var isLastLine = index === lines.length - 1; + var isLastNonEmptyLine = index === lastNonEmptyLine; + + // replace rendered whitespace tabs with spaces + var trimmedLine = line.replace(/\t/g, ' '); + + // trim whitespace touching a newline + if (!isFirstLine) { + trimmedLine = trimmedLine.replace(/^[ ]+/, ''); + } + if (!isLastLine) { + trimmedLine = trimmedLine.replace(/[ ]+$/, ''); + } + + if (!isFirstLine) { + utils.append(line.match(/^[ \t]*/)[0], state); + } + + if (trimmedLine || isLastNonEmptyLine) { + utils.append( + JSON.stringify(trimmedLine) + + (!isLastNonEmptyLine ? ' + \' \' +' : ''), + state); + + if (isLastNonEmptyLine) { + if (end) { + utils.append(end, state); + } + if (!isLast) { + utils.append(', ', state); + } + } + + // only restore tail whitespace if line had literals + if (trimmedLine && !isLastLine) { + utils.append(line.match(/[ \t]*$/)[0], state); + } + } + + if (!isLastLine) { + utils.append('\n', state); + } + }); + + utils.move(object.range[1], state); +} + +function renderJSXExpressionContainer(traverse, object, isLast, path, state) { + // Plus 1 to skip `{`. + utils.move(object.range[0] + 1, state); + utils.catchup(object.expression.range[0], state); + traverse(object.expression, path, state); + + if (!isLast && object.expression.type !== Syntax.JSXEmptyExpression) { + // If we need to append a comma, make sure to do so after the expression. + utils.catchup(object.expression.range[1], state, trimLeft); + utils.append(', ', state); + } + + // Minus 1 to skip `}`. + utils.catchup(object.range[1] - 1, state, trimLeft); + utils.move(object.range[1], state); + return false; +} + +function quoteAttrName(attr) { + // Quote invalid JS identifiers. + if (!/^[a-z_$][a-z\d_$]*$/i.test(attr)) { + return '"' + attr + '"'; + } + return attr; +} + +function trimLeft(value) { + return value.replace(/^[ ]+/, ''); +} + +exports.renderJSXExpressionContainer = renderJSXExpressionContainer; +exports.renderJSXLiteral = renderJSXLiteral; +exports.quoteAttrName = quoteAttrName; +exports.trimLeft = trimLeft; + +},{"jstransform":22,"jstransform/src/utils":23}],38:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; + +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +var renderJSXExpressionContainer = + _dereq_('./jsx').renderJSXExpressionContainer; +var renderJSXLiteral = _dereq_('./jsx').renderJSXLiteral; +var quoteAttrName = _dereq_('./jsx').quoteAttrName; + +var trimLeft = _dereq_('./jsx').trimLeft; + +/** + * Customized desugar processor for React JSX. Currently: + * + * <X> </X> => React.createElement(X, null) + * <X prop="1" /> => React.createElement(X, {prop: '1'}, null) + * <X prop="2"><Y /></X> => React.createElement(X, {prop:'2'}, + * React.createElement(Y, null) + * ) + * <div /> => React.createElement("div", null) + */ + +/** + * Removes all non-whitespace/parenthesis characters + */ +var reNonWhiteParen = /([^\s\(\)])/g; +function stripNonWhiteParen(value) { + return value.replace(reNonWhiteParen, ''); +} + +var tagConvention = /^[a-z]|\-/; +function isTagName(name) { + return tagConvention.test(name); +} + +function visitReactTag(traverse, object, path, state) { + var openingElement = object.openingElement; + var nameObject = openingElement.name; + var attributesObject = openingElement.attributes; + + utils.catchup(openingElement.range[0], state, trimLeft); + + if (nameObject.type === Syntax.JSXNamespacedName && nameObject.namespace) { + throw new Error('Namespace tags are not supported. ReactJSX is not XML.'); + } + + // We assume that the React runtime is already in scope + utils.append('React.createElement(', state); + + if (nameObject.type === Syntax.JSXIdentifier && isTagName(nameObject.name)) { + utils.append('"' + nameObject.name + '"', state); + utils.move(nameObject.range[1], state); + } else { + // Use utils.catchup in this case so we can easily handle + // JSXMemberExpressions which look like Foo.Bar.Baz. This also handles + // JSXIdentifiers that aren't fallback tags. + utils.move(nameObject.range[0], state); + utils.catchup(nameObject.range[1], state); + } + + utils.append(', ', state); + + var hasAttributes = attributesObject.length; + + var hasAtLeastOneSpreadProperty = attributesObject.some(function(attr) { + return attr.type === Syntax.JSXSpreadAttribute; + }); + + // if we don't have any attributes, pass in null + if (hasAtLeastOneSpreadProperty) { + utils.append('React.__spread({', state); + } else if (hasAttributes) { + utils.append('{', state); + } else { + utils.append('null', state); + } + + // keep track of if the previous attribute was a spread attribute + var previousWasSpread = false; + + // write attributes + attributesObject.forEach(function(attr, index) { + var isLast = index === attributesObject.length - 1; + + if (attr.type === Syntax.JSXSpreadAttribute) { + // Close the previous object or initial object + if (!previousWasSpread) { + utils.append('}, ', state); + } + + // Move to the expression start, ignoring everything except parenthesis + // and whitespace. + utils.catchup(attr.range[0], state, stripNonWhiteParen); + // Plus 1 to skip `{`. + utils.move(attr.range[0] + 1, state); + utils.catchup(attr.argument.range[0], state, stripNonWhiteParen); + + traverse(attr.argument, path, state); + + utils.catchup(attr.argument.range[1], state); + + // Move to the end, ignoring parenthesis and the closing `}` + utils.catchup(attr.range[1] - 1, state, stripNonWhiteParen); + + if (!isLast) { + utils.append(', ', state); + } + + utils.move(attr.range[1], state); + + previousWasSpread = true; + + return; + } + + // If the next attribute is a spread, we're effective last in this object + if (!isLast) { + isLast = attributesObject[index + 1].type === Syntax.JSXSpreadAttribute; + } + + if (attr.name.namespace) { + throw new Error( + 'Namespace attributes are not supported. ReactJSX is not XML.'); + } + var name = attr.name.name; + + utils.catchup(attr.range[0], state, trimLeft); + + if (previousWasSpread) { + utils.append('{', state); + } + + utils.append(quoteAttrName(name), state); + utils.append(': ', state); + + if (!attr.value) { + state.g.buffer += 'true'; + state.g.position = attr.name.range[1]; + if (!isLast) { + utils.append(', ', state); + } + } else { + utils.move(attr.name.range[1], state); + // Use catchupNewlines to skip over the '=' in the attribute + utils.catchupNewlines(attr.value.range[0], state); + if (attr.value.type === Syntax.Literal) { + renderJSXLiteral(attr.value, isLast, state); + } else { + renderJSXExpressionContainer(traverse, attr.value, isLast, path, state); + } + } + + utils.catchup(attr.range[1], state, trimLeft); + + previousWasSpread = false; + + }); + + if (!openingElement.selfClosing) { + utils.catchup(openingElement.range[1] - 1, state, trimLeft); + utils.move(openingElement.range[1], state); + } + + if (hasAttributes && !previousWasSpread) { + utils.append('}', state); + } + + if (hasAtLeastOneSpreadProperty) { + utils.append(')', state); + } + + // filter out whitespace + var childrenToRender = object.children.filter(function(child) { + return !(child.type === Syntax.Literal + && typeof child.value === 'string' + && child.value.match(/^[ \t]*[\r\n][ \t\r\n]*$/)); + }); + if (childrenToRender.length > 0) { + var lastRenderableIndex; + + childrenToRender.forEach(function(child, index) { + if (child.type !== Syntax.JSXExpressionContainer || + child.expression.type !== Syntax.JSXEmptyExpression) { + lastRenderableIndex = index; + } + }); + + if (lastRenderableIndex !== undefined) { + utils.append(', ', state); + } + + childrenToRender.forEach(function(child, index) { + utils.catchup(child.range[0], state, trimLeft); + + var isLast = index >= lastRenderableIndex; + + if (child.type === Syntax.Literal) { + renderJSXLiteral(child, isLast, state); + } else if (child.type === Syntax.JSXExpressionContainer) { + renderJSXExpressionContainer(traverse, child, isLast, path, state); + } else { + traverse(child, path, state); + if (!isLast) { + utils.append(', ', state); + } + } + + utils.catchup(child.range[1], state, trimLeft); + }); + } + + if (openingElement.selfClosing) { + // everything up to /> + utils.catchup(openingElement.range[1] - 2, state, trimLeft); + utils.move(openingElement.range[1], state); + } else { + // everything up to </ sdflksjfd> + utils.catchup(object.closingElement.range[0], state, trimLeft); + utils.move(object.closingElement.range[1], state); + } + + utils.append(')', state); + return false; +} + +visitReactTag.test = function(object, path, state) { + return object.type === Syntax.JSXElement; +}; + +exports.visitorList = [ + visitReactTag +]; + +},{"./jsx":37,"jstransform":22,"jstransform/src/utils":23}],39:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ +/*global exports:true*/ +'use strict'; + +var Syntax = _dereq_('jstransform').Syntax; +var utils = _dereq_('jstransform/src/utils'); + +function addDisplayName(displayName, object, state) { + if (object && + object.type === Syntax.CallExpression && + object.callee.type === Syntax.MemberExpression && + object.callee.object.type === Syntax.Identifier && + object.callee.object.name === 'React' && + object.callee.property.type === Syntax.Identifier && + object.callee.property.name === 'createClass' && + object.arguments.length === 1 && + object.arguments[0].type === Syntax.ObjectExpression) { + // Verify that the displayName property isn't already set + var properties = object.arguments[0].properties; + var safe = properties.every(function(property) { + var value = property.key.type === Syntax.Identifier ? + property.key.name : + property.key.value; + return value !== 'displayName'; + }); + + if (safe) { + utils.catchup(object.arguments[0].range[0] + 1, state); + utils.append('displayName: "' + displayName + '",', state); + } + } +} + +/** + * Transforms the following: + * + * var MyComponent = React.createClass({ + * render: ... + * }); + * + * into: + * + * var MyComponent = React.createClass({ + * displayName: 'MyComponent', + * render: ... + * }); + * + * Also catches: + * + * MyComponent = React.createClass(...); + * exports.MyComponent = React.createClass(...); + * module.exports = {MyComponent: React.createClass(...)}; + */ +function visitReactDisplayName(traverse, object, path, state) { + var left, right; + + if (object.type === Syntax.AssignmentExpression) { + left = object.left; + right = object.right; + } else if (object.type === Syntax.Property) { + left = object.key; + right = object.value; + } else if (object.type === Syntax.VariableDeclarator) { + left = object.id; + right = object.init; + } + + if (left && left.type === Syntax.MemberExpression) { + left = left.property; + } + if (left && left.type === Syntax.Identifier) { + addDisplayName(left.name, right, state); + } +} + +visitReactDisplayName.test = function(object, path, state) { + return ( + object.type === Syntax.AssignmentExpression || + object.type === Syntax.Property || + object.type === Syntax.VariableDeclarator + ); +}; + +exports.visitorList = [ + visitReactDisplayName +]; + +},{"jstransform":22,"jstransform/src/utils":23}],40:[function(_dereq_,module,exports){ +/*global exports:true*/ + +'use strict'; + +var es6ArrowFunctions = + _dereq_('jstransform/visitors/es6-arrow-function-visitors'); +var es6Classes = _dereq_('jstransform/visitors/es6-class-visitors'); +var es6Destructuring = + _dereq_('jstransform/visitors/es6-destructuring-visitors'); +var es6ObjectConciseMethod = + _dereq_('jstransform/visitors/es6-object-concise-method-visitors'); +var es6ObjectShortNotation = + _dereq_('jstransform/visitors/es6-object-short-notation-visitors'); +var es6RestParameters = _dereq_('jstransform/visitors/es6-rest-param-visitors'); +var es6Templates = _dereq_('jstransform/visitors/es6-template-visitors'); +var es6CallSpread = + _dereq_('jstransform/visitors/es6-call-spread-visitors'); +var es7SpreadProperty = + _dereq_('jstransform/visitors/es7-spread-property-visitors'); +var react = _dereq_('./transforms/react'); +var reactDisplayName = _dereq_('./transforms/reactDisplayName'); +var reservedWords = _dereq_('jstransform/visitors/reserved-words-visitors'); + +/** + * Map from transformName => orderedListOfVisitors. + */ +var transformVisitors = { + 'es6-arrow-functions': es6ArrowFunctions.visitorList, + 'es6-classes': es6Classes.visitorList, + 'es6-destructuring': es6Destructuring.visitorList, + 'es6-object-concise-method': es6ObjectConciseMethod.visitorList, + 'es6-object-short-notation': es6ObjectShortNotation.visitorList, + 'es6-rest-params': es6RestParameters.visitorList, + 'es6-templates': es6Templates.visitorList, + 'es6-call-spread': es6CallSpread.visitorList, + 'es7-spread-property': es7SpreadProperty.visitorList, + 'react': react.visitorList.concat(reactDisplayName.visitorList), + 'reserved-words': reservedWords.visitorList +}; + +var transformSets = { + 'harmony': [ + 'es6-arrow-functions', + 'es6-object-concise-method', + 'es6-object-short-notation', + 'es6-classes', + 'es6-rest-params', + 'es6-templates', + 'es6-destructuring', + 'es6-call-spread', + 'es7-spread-property' + ], + 'es3': [ + 'reserved-words' + ], + 'react': [ + 'react' + ] +}; + +/** + * Specifies the order in which each transform should run. + */ +var transformRunOrder = [ + 'reserved-words', + 'es6-arrow-functions', + 'es6-object-concise-method', + 'es6-object-short-notation', + 'es6-classes', + 'es6-rest-params', + 'es6-templates', + 'es6-destructuring', + 'es6-call-spread', + 'es7-spread-property', + 'react' +]; + +/** + * Given a list of transform names, return the ordered list of visitors to be + * passed to the transform() function. + * + * @param {array?} excludes + * @return {array} + */ +function getAllVisitors(excludes) { + var ret = []; + for (var i = 0, il = transformRunOrder.length; i < il; i++) { + if (!excludes || excludes.indexOf(transformRunOrder[i]) === -1) { + ret = ret.concat(transformVisitors[transformRunOrder[i]]); + } + } + return ret; +} + +/** + * Given a list of visitor set names, return the ordered list of visitors to be + * passed to jstransform. + * + * @param {array} + * @return {array} + */ +function getVisitorsBySet(sets) { + var visitorsToInclude = sets.reduce(function(visitors, set) { + if (!transformSets.hasOwnProperty(set)) { + throw new Error('Unknown visitor set: ' + set); + } + transformSets[set].forEach(function(visitor) { + visitors[visitor] = true; + }); + return visitors; + }, {}); + + var visitorList = []; + for (var i = 0; i < transformRunOrder.length; i++) { + if (visitorsToInclude.hasOwnProperty(transformRunOrder[i])) { + visitorList = visitorList.concat(transformVisitors[transformRunOrder[i]]); + } + } + + return visitorList; +} + +exports.getVisitorsBySet = getVisitorsBySet; +exports.getAllVisitors = getAllVisitors; +exports.transformVisitors = transformVisitors; + +},{"./transforms/react":38,"./transforms/reactDisplayName":39,"jstransform/visitors/es6-arrow-function-visitors":24,"jstransform/visitors/es6-call-spread-visitors":25,"jstransform/visitors/es6-class-visitors":26,"jstransform/visitors/es6-destructuring-visitors":27,"jstransform/visitors/es6-object-concise-method-visitors":28,"jstransform/visitors/es6-object-short-notation-visitors":29,"jstransform/visitors/es6-rest-param-visitors":30,"jstransform/visitors/es6-template-visitors":31,"jstransform/visitors/es7-spread-property-visitors":33,"jstransform/visitors/reserved-words-visitors":35}],41:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +'use strict'; +/*eslint-disable no-undef*/ +var Buffer = _dereq_('buffer').Buffer; + +function inlineSourceMap(sourceMap, sourceCode, sourceFilename) { + // This can be used with a sourcemap that has already has toJSON called on it. + // Check first. + var json = sourceMap; + if (typeof sourceMap.toJSON === 'function') { + json = sourceMap.toJSON(); + } + json.sources = [sourceFilename]; + json.sourcesContent = [sourceCode]; + var base64 = Buffer(JSON.stringify(json)).toString('base64'); + return '//# sourceMappingURL=data:application/json;base64,' + base64; +} + +module.exports = inlineSourceMap; + +},{"buffer":3}]},{},[1])(1) +}); \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/console-polyfill.js b/assets/js/react-0.13.0/build/console-polyfill.js new file mode 100755 index 0000000000000000000000000000000000000000..7eacd7809693863912ccae7f8a90bc9ea955c9a3 --- /dev/null +++ b/assets/js/react-0.13.0/build/console-polyfill.js @@ -0,0 +1,15 @@ +// Console-polyfill. MIT license. +// https://github.com/paulmillr/console-polyfill +// Make it safe to do console.log() always. +(function(con) { + 'use strict'; + var prop, method; + var empty = {}; + var dummy = function() {}; + var properties = 'memory'.split(','); + var methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + + 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,' + + 'table,time,timeEnd,timeStamp,trace,warn').split(','); + while (prop = properties.pop()) con[prop] = con[prop] || empty; + while (method = methods.pop()) con[method] = con[method] || dummy; +})(this.console = this.console || {}); // Using `this` for web workers. diff --git a/assets/js/react-0.13.0/build/es5-sham.min.js b/assets/js/react-0.13.0/build/es5-sham.min.js new file mode 100755 index 0000000000000000000000000000000000000000..033c27a3fd8e163d9f30317745b874f682ad3231 --- /dev/null +++ b/assets/js/react-0.13.0/build/es5-sham.min.js @@ -0,0 +1,2 @@ +(function(definition){if(typeof define=="function"){define(definition)}else if(typeof YUI=="function"){YUI.add("es5-sham",definition)}else{definition()}})(function(){var call=Function.prototype.call;var prototypeOfObject=Object.prototype;var owns=call.bind(prototypeOfObject.hasOwnProperty);var defineGetter;var defineSetter;var lookupGetter;var lookupSetter;var supportsAccessors;if(supportsAccessors=owns(prototypeOfObject,"__defineGetter__")){defineGetter=call.bind(prototypeOfObject.__defineGetter__);defineSetter=call.bind(prototypeOfObject.__defineSetter__);lookupGetter=call.bind(prototypeOfObject.__lookupGetter__);lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)}if(!Object.getPrototypeOf){Object.getPrototypeOf=function getPrototypeOf(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}}function doesGetOwnPropertyDescriptorWork(object){try{object.sentinel=0;return Object.getOwnPropertyDescriptor(object,"sentinel").value===0}catch(exception){}}if(Object.defineProperty){var getOwnPropertyDescriptorWorksOnObject=doesGetOwnPropertyDescriptorWork({});var getOwnPropertyDescriptorWorksOnDom=typeof document=="undefined"||doesGetOwnPropertyDescriptorWork(document.createElement("div"));if(!getOwnPropertyDescriptorWorksOnDom||!getOwnPropertyDescriptorWorksOnObject){var getOwnPropertyDescriptorFallback=Object.getOwnPropertyDescriptor}}if(!Object.getOwnPropertyDescriptor||getOwnPropertyDescriptorFallback){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function getOwnPropertyDescriptor(object,property){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError(ERR_NON_OBJECT+object)}if(getOwnPropertyDescriptorFallback){try{return getOwnPropertyDescriptorFallback.call(Object,object,property)}catch(exception){}}if(!owns(object,property)){return}var descriptor={enumerable:true,configurable:true};if(supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property);var setter=lookupSetter(object,property);object.__proto__=prototype;if(getter||setter){if(getter){descriptor.get=getter}if(setter){descriptor.set=setter}return descriptor}}descriptor.value=object[property];descriptor.writable=true;return descriptor}}if(!Object.getOwnPropertyNames){Object.getOwnPropertyNames=function getOwnPropertyNames(object){return Object.keys(object)}}if(!Object.create){var createEmpty;var supportsProto=Object.prototype.__proto__===null;if(supportsProto||typeof document=="undefined"){createEmpty=function(){return{__proto__:null}}}else{createEmpty=function(){var iframe=document.createElement("iframe");var parent=document.body||document.documentElement;iframe.style.display="none";parent.appendChild(iframe);iframe.src="javascript:";var empty=iframe.contentWindow.Object.prototype;parent.removeChild(iframe);iframe=null;delete empty.constructor;delete empty.hasOwnProperty;delete empty.propertyIsEnumerable;delete empty.isPrototypeOf;delete empty.toLocaleString;delete empty.toString;delete empty.valueOf;empty.__proto__=null;function Empty(){}Empty.prototype=empty;createEmpty=function(){return new Empty};return new Empty}}Object.create=function create(prototype,properties){var object;function Type(){}if(prototype===null){object=createEmpty()}else{if(typeof prototype!=="object"&&typeof prototype!=="function"){throw new TypeError("Object prototype may only be an Object or null")}Type.prototype=prototype;object=new Type;object.__proto__=prototype}if(properties!==void 0){Object.defineProperties(object,properties)}return object}}function doesDefinePropertyWork(object){try{Object.defineProperty(object,"sentinel",{});return"sentinel"in object}catch(exception){}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({});var definePropertyWorksOnDom=typeof document=="undefined"||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom){var definePropertyFallback=Object.defineProperty,definePropertiesFallback=Object.defineProperties}}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ";var ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ";var ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined "+"on this javascript engine";Object.defineProperty=function defineProperty(object,property,descriptor){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError(ERR_NON_OBJECT_TARGET+object)}if(typeof descriptor!="object"&&typeof descriptor!="function"||descriptor===null){throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor)}if(definePropertyFallback){try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}}if(owns(descriptor,"value")){if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject;delete object[property];object[property]=descriptor.value;object.__proto__=prototype}else{object[property]=descriptor.value}}else{if(!supportsAccessors){throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED)}if(owns(descriptor,"get")){defineGetter(object,property,descriptor.get)}if(owns(descriptor,"set")){defineSetter(object,property,descriptor.set)}}return object}}if(!Object.defineProperties||definePropertiesFallback){Object.defineProperties=function defineProperties(object,properties){if(definePropertiesFallback){try{return definePropertiesFallback.call(Object,object,properties)}catch(exception){}}for(var property in properties){if(owns(properties,property)&&property!="__proto__"){Object.defineProperty(object,property,properties[property])}}return object}}if(!Object.seal){Object.seal=function seal(object){return object}}if(!Object.freeze){Object.freeze=function freeze(object){return object}}try{Object.freeze(function(){})}catch(exception){Object.freeze=function freeze(freezeObject){return function freeze(object){if(typeof object=="function"){return object}else{return freezeObject(object)}}}(Object.freeze)}if(!Object.preventExtensions){Object.preventExtensions=function preventExtensions(object){return object}}if(!Object.isSealed){Object.isSealed=function isSealed(object){return false}}if(!Object.isFrozen){Object.isFrozen=function isFrozen(object){return false}}if(!Object.isExtensible){Object.isExtensible=function isExtensible(object){if(Object(object)!==object){throw new TypeError}var name="";while(owns(object,name)){name+="?"}object[name]=true;var returnValue=owns(object,name);delete object[name];return returnValue}}}); +//# sourceMappingURL=es5-sham.map \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/es5-shim.min.js b/assets/js/react-0.13.0/build/es5-shim.min.js new file mode 100755 index 0000000000000000000000000000000000000000..50502e0548bde4c2f7bf03d3d4506feabba1119b --- /dev/null +++ b/assets/js/react-0.13.0/build/es5-shim.min.js @@ -0,0 +1,2 @@ +(function(definition){if(typeof define=="function"){define(definition)}else if(typeof YUI=="function"){YUI.add("es5",definition)}else{definition()}})(function(){if(parseInt("08")!==8){parseInt=function(origParseInt){var hexRegex=/^0[xX]/;return function parseIntES5(str,radix){str=String(str).trim();if(!+radix){radix=hexRegex.test(str)?16:10}return origParseInt(str,radix)}}(parseInt)}function Empty(){}if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;if(typeof target!="function"){throw new TypeError("Function.prototype.bind called on incompatible "+target)}var args=_Array_slice_.call(arguments,1);var binder=function(){if(this instanceof bound){var result=target.apply(this,args.concat(_Array_slice_.call(arguments)));if(Object(result)===result){return result}return this}else{return target.apply(that,args.concat(_Array_slice_.call(arguments)))}};var boundLength=Math.max(0,target.length-args.length);var boundArgs=[];for(var i=0;i<boundLength;i++){boundArgs.push("$"+i)}var bound=Function("binder","return function("+boundArgs.join(",")+"){return binder.apply(this,arguments)}")(binder);if(target.prototype){Empty.prototype=target.prototype;bound.prototype=new Empty;Empty.prototype=null}return bound}}var call=Function.prototype.call;var prototypeOfArray=Array.prototype;var prototypeOfObject=Object.prototype;var _Array_slice_=prototypeOfArray.slice;var _toString=call.bind(prototypeOfObject.toString);var owns=call.bind(prototypeOfObject.hasOwnProperty);var defineGetter;var defineSetter;var lookupGetter;var lookupSetter;var supportsAccessors;if(supportsAccessors=owns(prototypeOfObject,"__defineGetter__")){defineGetter=call.bind(prototypeOfObject.__defineGetter__);defineSetter=call.bind(prototypeOfObject.__defineSetter__);lookupGetter=call.bind(prototypeOfObject.__lookupGetter__);lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)}if([1,2].splice(0).length!=2){var array_splice=Array.prototype.splice;var array_push=Array.prototype.push;var array_unshift=Array.prototype.unshift;if(function(){function makeArray(l){var a=[];while(l--){a.unshift(l)}return a}var array=[],lengthBefore;array.splice.bind(array,0,0).apply(null,makeArray(20));array.splice.bind(array,0,0).apply(null,makeArray(26));lengthBefore=array.length;array.splice(5,0,"XXX");if(lengthBefore+1==array.length){return true}}()){Array.prototype.splice=function(start,deleteCount){if(!arguments.length){return[]}else{return array_splice.apply(this,[start===void 0?0:start,deleteCount===void 0?this.length-start:deleteCount].concat(_Array_slice_.call(arguments,2)))}}}else{Array.prototype.splice=function(start,deleteCount){var result,args=_Array_slice_.call(arguments,2),addElementsCount=args.length;if(!arguments.length){return[]}if(start===void 0){start=0}if(deleteCount===void 0){deleteCount=this.length-start}if(addElementsCount>0){if(deleteCount<=0){if(start==this.length){array_push.apply(this,args);return[]}if(start==0){array_unshift.apply(this,args);return[]}}result=_Array_slice_.call(this,start,start+deleteCount);args.push.apply(args,_Array_slice_.call(this,start+deleteCount,this.length));args.unshift.apply(args,_Array_slice_.call(this,0,start));args.unshift(0,this.length);array_splice.apply(this,args);return result}return array_splice.call(this,start,deleteCount)}}}if([].unshift(0)!=1){var array_unshift=Array.prototype.unshift;Array.prototype.unshift=function(){array_unshift.apply(this,arguments);return this.length}}if(!Array.isArray){Array.isArray=function isArray(obj){return _toString(obj)=="[object Array]"}}var boxedString=Object("a"),splitString=boxedString[0]!="a"||!(0 in boxedString);var boxedForEach=true;if(Array.prototype.forEach){Array.prototype.forEach.call("foo",function(item,i,obj){if(typeof obj!=="object")boxedForEach=false})}if(!Array.prototype.forEach||!boxedForEach){Array.prototype.forEach=function forEach(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError}while(++i<length){if(i in self){fun.call(thisp,self[i],i,object)}}}}if(!Array.prototype.map){Array.prototype.map=function map(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self)result[i]=fun.call(thisp,self[i],i,object)}return result}}if(!Array.prototype.filter){Array.prototype.filter=function filter(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,result=[],value,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self){value=self[i];if(fun.call(thisp,value,i,object)){result.push(value)}}}return result}}if(!Array.prototype.every){Array.prototype.every=function every(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self&&!fun.call(thisp,self[i],i,object)){return false}}return true}}if(!Array.prototype.some){Array.prototype.some=function some(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}for(var i=0;i<length;i++){if(i in self&&fun.call(thisp,self[i],i,object)){return true}}return false}}if(!Array.prototype.reduce){Array.prototype.reduce=function reduce(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}if(!length&&arguments.length==1){throw new TypeError("reduce of empty array with no initial value")}var i=0;var result;if(arguments.length>=2){result=arguments[1]}else{do{if(i in self){result=self[i++];break}if(++i>=length){throw new TypeError("reduce of empty array with no initial value")}}while(true)}for(;i<length;i++){if(i in self){result=fun.call(void 0,result,self[i],i,object)}}return result}}if(!Array.prototype.reduceRight){Array.prototype.reduceRight=function reduceRight(fun){var object=toObject(this),self=splitString&&_toString(this)=="[object String]"?this.split(""):object,length=self.length>>>0;if(_toString(fun)!="[object Function]"){throw new TypeError(fun+" is not a function")}if(!length&&arguments.length==1){throw new TypeError("reduceRight of empty array with no initial value")}var result,i=length-1;if(arguments.length>=2){result=arguments[1]}else{do{if(i in self){result=self[i--];break}if(--i<0){throw new TypeError("reduceRight of empty array with no initial value")}}while(true)}if(i<0){return result}do{if(i in this){result=fun.call(void 0,result,self[i],i,object)}}while(i--);return result}}if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1){Array.prototype.indexOf=function indexOf(sought){var self=splitString&&_toString(this)=="[object String]"?this.split(""):toObject(this),length=self.length>>>0;if(!length){return-1}var i=0;if(arguments.length>1){i=toInteger(arguments[1])}i=i>=0?i:Math.max(0,length+i);for(;i<length;i++){if(i in self&&self[i]===sought){return i}}return-1}}if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1){Array.prototype.lastIndexOf=function lastIndexOf(sought){var self=splitString&&_toString(this)=="[object String]"?this.split(""):toObject(this),length=self.length>>>0;if(!length){return-1}var i=length-1;if(arguments.length>1){i=Math.min(i,toInteger(arguments[1]))}i=i>=0?i:length-Math.abs(i);for(;i>=0;i--){if(i in self&&sought===self[i]){return i}}return-1}}if(!Object.keys){var hasDontEnumBug=true,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null}){hasDontEnumBug=false}Object.keys=function keys(object){if(typeof object!="object"&&typeof object!="function"||object===null){throw new TypeError("Object.keys called on a non-object")}var keys=[];for(var name in object){if(owns(object,name)){keys.push(name)}}if(hasDontEnumBug){for(var i=0,ii=dontEnumsLength;i<ii;i++){var dontEnum=dontEnums[i];if(owns(object,dontEnum)){keys.push(dontEnum)}}}return keys}}var negativeDate=-621987552e5,negativeYearString="-000001";if(!Date.prototype.toISOString||new Date(negativeDate).toISOString().indexOf(negativeYearString)===-1){Date.prototype.toISOString=function toISOString(){var result,length,value,year,month;if(!isFinite(this)){throw new RangeError("Date.prototype.toISOString called on non-finite value.")}year=this.getUTCFullYear();month=this.getUTCMonth();year+=Math.floor(month/12);month=(month%12+12)%12;result=[month+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()];year=(year<0?"-":year>9999?"+":"")+("00000"+Math.abs(year)).slice(0<=year&&year<=9999?-4:-6);length=result.length;while(length--){value=result[length];if(value<10){result[length]="0"+value}}return year+"-"+result.slice(0,2).join("-")+"T"+result.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"}}var dateToJSONIsSupported=false;try{dateToJSONIsSupported=Date.prototype.toJSON&&new Date(NaN).toJSON()===null&&new Date(negativeDate).toJSON().indexOf(negativeYearString)!==-1&&Date.prototype.toJSON.call({toISOString:function(){return true}})}catch(e){}if(!dateToJSONIsSupported){Date.prototype.toJSON=function toJSON(key){var o=Object(this),tv=toPrimitive(o),toISO;if(typeof tv==="number"&&!isFinite(tv)){return null}toISO=o.toISOString;if(typeof toISO!="function"){throw new TypeError("toISOString property is not callable")}return toISO.call(o)}}if(!Date.parse||"Date.parse is buggy"){Date=function(NativeDate){function Date(Y,M,D,h,m,s,ms){var length=arguments.length;if(this instanceof NativeDate){var date=length==1&&String(Y)===Y?new NativeDate(Date.parse(Y)):length>=7?new NativeDate(Y,M,D,h,m,s,ms):length>=6?new NativeDate(Y,M,D,h,m,s):length>=5?new NativeDate(Y,M,D,h,m):length>=4?new NativeDate(Y,M,D,h):length>=3?new NativeDate(Y,M,D):length>=2?new NativeDate(Y,M):length>=1?new NativeDate(Y):new NativeDate;date.constructor=Date;return date}return NativeDate.apply(this,arguments)}var isoDateExpression=new RegExp("^"+"(\\d{4}|[+-]\\d{6})"+"(?:-(\\d{2})"+"(?:-(\\d{2})"+"(?:"+"T(\\d{2})"+":(\\d{2})"+"(?:"+":(\\d{2})"+"(?:(\\.\\d{1,}))?"+")?"+"("+"Z|"+"(?:"+"([-+])"+"(\\d{2})"+":(\\d{2})"+")"+")?)?)?)?"+"$");var months=[0,31,59,90,120,151,181,212,243,273,304,334,365];function dayFromMonth(year,month){var t=month>1?1:0;return months[month]+Math.floor((year-1969+t)/4)-Math.floor((year-1901+t)/100)+Math.floor((year-1601+t)/400)+365*(year-1970)}function toUTC(t){return Number(new NativeDate(1970,0,1,0,0,0,t))}for(var key in NativeDate){Date[key]=NativeDate[key]}Date.now=NativeDate.now;Date.UTC=NativeDate.UTC;Date.prototype=NativeDate.prototype;Date.prototype.constructor=Date;Date.parse=function parse(string){var match=isoDateExpression.exec(string);if(match){var year=Number(match[1]),month=Number(match[2]||1)-1,day=Number(match[3]||1)-1,hour=Number(match[4]||0),minute=Number(match[5]||0),second=Number(match[6]||0),millisecond=Math.floor(Number(match[7]||0)*1e3),isLocalTime=Boolean(match[4]&&!match[8]),signOffset=match[9]==="-"?1:-1,hourOffset=Number(match[10]||0),minuteOffset=Number(match[11]||0),result;if(hour<(minute>0||second>0||millisecond>0?24:25)&&minute<60&&second<60&&millisecond<1e3&&month>-1&&month<12&&hourOffset<24&&minuteOffset<60&&day>-1&&day<dayFromMonth(year,month+1)-dayFromMonth(year,month)){result=((dayFromMonth(year,month)+day)*24+hour+hourOffset*signOffset)*60;result=((result+minute+minuteOffset*signOffset)*60+second)*1e3+millisecond;if(isLocalTime){result=toUTC(result)}if(-864e13<=result&&result<=864e13){return result}}return NaN}return NativeDate.parse.apply(this,arguments)};return Date}(Date)}if(!Date.now){Date.now=function now(){return(new Date).getTime()}}if(!Number.prototype.toFixed||8e-5.toFixed(3)!=="0.000"||.9.toFixed(0)==="0"||1.255.toFixed(2)!=="1.25"||0xde0b6b3a7640080.toFixed(0)!=="1000000000000000128"){(function(){var base,size,data,i;base=1e7;size=6;data=[0,0,0,0,0,0];function multiply(n,c){var i=-1;while(++i<size){c+=n*data[i];data[i]=c%base;c=Math.floor(c/base)}}function divide(n){var i=size,c=0;while(--i>=0){c+=data[i];data[i]=Math.floor(c/n);c=c%n*base}}function toString(){var i=size;var s="";while(--i>=0){if(s!==""||i===0||data[i]!==0){var t=String(data[i]);if(s===""){s=t}else{s+="0000000".slice(0,7-t.length)+t}}}return s}function pow(x,n,acc){return n===0?acc:n%2===1?pow(x,n-1,acc*x):pow(x*x,n/2,acc)}function log(x){var n=0;while(x>=4096){n+=12;x/=4096}while(x>=2){n+=1;x/=2}return n}Number.prototype.toFixed=function(fractionDigits){var f,x,s,m,e,z,j,k;f=Number(fractionDigits);f=f!==f?0:Math.floor(f);if(f<0||f>20){throw new RangeError("Number.toFixed called with invalid number of decimals")}x=Number(this);if(x!==x){return"NaN"}if(x<=-1e21||x>=1e21){return String(x)}s="";if(x<0){s="-";x=-x}m="0";if(x>1e-21){e=log(x*pow(2,69,1))-69;z=e<0?x*pow(2,-e,1):x/pow(2,e,1);z*=4503599627370496;e=52-e;if(e>0){multiply(0,z);j=f;while(j>=7){multiply(1e7,0);j-=7}multiply(pow(10,j,1),0);j=e-1;while(j>=23){divide(1<<23);j-=23}divide(1<<j);multiply(1,1);divide(2);m=toString()}else{multiply(0,z);multiply(1<<-e,0);m=toString()+"0.00000000000000000000".slice(2,2+f)}}if(f>0){k=m.length;if(k<=f){m=s+"0.0000000000000000000".slice(0,f-k+2)+m}else{m=s+m.slice(0,k-f)+"."+m.slice(k-f)}}else{m=s+m}return m}})()}var string_split=String.prototype.split;if("ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||"tesst".split(/(s)*/)[1]==="t"||"".split(/.?/).length||".".split(/()()/).length>1){(function(){var compliantExecNpcg=/()??/.exec("")[1]===void 0;String.prototype.split=function(separator,limit){var string=this;if(separator===void 0&&limit===0)return[];if(Object.prototype.toString.call(separator)!=="[object RegExp]"){return string_split.apply(this,arguments)}var output=[],flags=(separator.ignoreCase?"i":"")+(separator.multiline?"m":"")+(separator.extended?"x":"")+(separator.sticky?"y":""),lastLastIndex=0,separator=new RegExp(separator.source,flags+"g"),separator2,match,lastIndex,lastLength;string+="";if(!compliantExecNpcg){separator2=new RegExp("^"+separator.source+"$(?!\\s)",flags)}limit=limit===void 0?-1>>>0:limit>>>0;while(match=separator.exec(string)){lastIndex=match.index+match[0].length;if(lastIndex>lastLastIndex){output.push(string.slice(lastLastIndex,match.index));if(!compliantExecNpcg&&match.length>1){match[0].replace(separator2,function(){for(var i=1;i<arguments.length-2;i++){if(arguments[i]===void 0){match[i]=void 0}}})}if(match.length>1&&match.index<string.length){Array.prototype.push.apply(output,match.slice(1))}lastLength=match[0].length;lastLastIndex=lastIndex;if(output.length>=limit){break}}if(separator.lastIndex===match.index){separator.lastIndex++}}if(lastLastIndex===string.length){if(lastLength||!separator.test("")){output.push("")}}else{output.push(string.slice(lastLastIndex))}return output.length>limit?output.slice(0,limit):output}})()}else if("0".split(void 0,0).length){String.prototype.split=function(separator,limit){if(separator===void 0&&limit===0)return[];return string_split.apply(this,arguments)}}if("".substr&&"0b".substr(-1)!=="b"){var string_substr=String.prototype.substr;String.prototype.substr=function(start,length){return string_substr.call(this,start<0?(start=this.length+start)<0?0:start:start,length)}}var ws=" \n\f\r \xa0\u1680\u180e\u2000\u2001\u2002\u2003"+"\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028"+"\u2029\ufeff";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=new RegExp("^"+ws+ws+"*"),trimEndRegexp=new RegExp(ws+ws+"*$");String.prototype.trim=function trim(){if(this===void 0||this===null){throw new TypeError("can't convert "+this+" to object")}return String(this).replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}function toInteger(n){n=+n;if(n!==n){n=0}else if(n!==0&&n!==1/0&&n!==-(1/0)){n=(n>0||-1)*Math.floor(Math.abs(n))}return n}function isPrimitive(input){var type=typeof input;return input===null||type==="undefined"||type==="boolean"||type==="number"||type==="string"}function toPrimitive(input){var val,valueOf,toString;if(isPrimitive(input)){return input}valueOf=input.valueOf;if(typeof valueOf==="function"){val=valueOf.call(input);if(isPrimitive(val)){return val}}toString=input.toString;if(typeof toString==="function"){val=toString.call(input);if(isPrimitive(val)){return val}}throw new TypeError}var toObject=function(o){if(o==null){throw new TypeError("can't convert "+o+" to object")}return Object(o)}}); +//# sourceMappingURL=es5-shim.map \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/react-with-addons.js b/assets/js/react-0.13.0/build/react-with-addons.js new file mode 100755 index 0000000000000000000000000000000000000000..2910185417a9b8afd229dc086406bdef6baf7081 --- /dev/null +++ b/assets/js/react-0.13.0/build/react-with-addons.js @@ -0,0 +1,21568 @@ +/** + * React (with addons) v0.13.0 + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactWithAddons + */ + +/** + * This module exists purely in the open source project, and is meant as a way + * to create a separate standalone build of React. This build has "addons", or + * functionality we've built and think might be useful but doesn't have a good + * place to live inside React core. + */ + +'use strict'; + +var LinkedStateMixin = _dereq_(25); +var React = _dereq_(31); +var ReactComponentWithPureRenderMixin = + _dereq_(42); +var ReactCSSTransitionGroup = _dereq_(34); +var ReactFragment = _dereq_(69); +var ReactTransitionGroup = _dereq_(98); +var ReactUpdates = _dereq_(100); + +var cx = _dereq_(127); +var cloneWithProps = _dereq_(122); +var update = _dereq_(170); + +React.addons = { + CSSTransitionGroup: ReactCSSTransitionGroup, + LinkedStateMixin: LinkedStateMixin, + PureRenderMixin: ReactComponentWithPureRenderMixin, + TransitionGroup: ReactTransitionGroup, + + batchedUpdates: ReactUpdates.batchedUpdates, + classSet: cx, + cloneWithProps: cloneWithProps, + createFragment: ReactFragment.create, + update: update +}; + +if ("production" !== "development") { + React.addons.Perf = _dereq_(61); + React.addons.TestUtils = _dereq_(95); +} + +module.exports = React; + +},{"100":100,"122":122,"127":127,"170":170,"25":25,"31":31,"34":34,"42":42,"61":61,"69":69,"95":95,"98":98}],2:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule AutoFocusMixin + * @typechecks static-only + */ + +'use strict'; + +var focusNode = _dereq_(134); + +var AutoFocusMixin = { + componentDidMount: function() { + if (this.props.autoFocus) { + focusNode(this.getDOMNode()); + } + } +}; + +module.exports = AutoFocusMixin; + +},{"134":134}],3:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015 Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule BeforeInputEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPropagators = _dereq_(21); +var ExecutionEnvironment = _dereq_(22); +var FallbackCompositionState = _dereq_(23); +var SyntheticCompositionEvent = _dereq_(106); +var SyntheticInputEvent = _dereq_(110); + +var keyOf = _dereq_(157); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ( + ExecutionEnvironment.canUseDOM && + 'CompositionEvent' in window +); + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ( + ExecutionEnvironment.canUseDOM && + 'TextEvent' in window && + !documentMode && + !isPresto() +); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ( + ExecutionEnvironment.canUseDOM && + ( + (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11) + ) +); + +/** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ +function isPresto() { + var opera = window.opera; + return ( + typeof opera === 'object' && + typeof opera.version === 'function' && + parseInt(opera.version(), 10) <= 12 + ); +} + +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + +var topLevelTypes = EventConstants.topLevelTypes; + +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: keyOf({onBeforeInput: null}), + captured: keyOf({onBeforeInputCapture: null}) + }, + dependencies: [ + topLevelTypes.topCompositionEnd, + topLevelTypes.topKeyPress, + topLevelTypes.topTextInput, + topLevelTypes.topPaste + ] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionEnd: null}), + captured: keyOf({onCompositionEndCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionEnd, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionStart: null}), + captured: keyOf({onCompositionStartCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionStart, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionUpdate: null}), + captured: keyOf({onCompositionUpdateCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionUpdate, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; + +/** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); +} + + +/** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case topLevelTypes.topCompositionStart: + return eventTypes.compositionStart; + case topLevelTypes.topCompositionEnd: + return eventTypes.compositionEnd; + case topLevelTypes.topCompositionUpdate: + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return ( + topLevelType === topLevelTypes.topKeyDown && + nativeEvent.keyCode === START_KEYCODE + ); +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topKeyUp: + // Command keys insert or clear IME input. + return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1); + case topLevelTypes.topKeyDown: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return (nativeEvent.keyCode !== START_KEYCODE); + case topLevelTypes.topKeyPress: + case topLevelTypes.topMouseDown: + case topLevelTypes.topBlur: + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} + +// Track the current IME composition fallback object, if any. +var currentComposition = null; + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent +) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(topLevelTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + topLevelTargetID, + nativeEvent + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topCompositionEnd: + return getDataFromCustomEvent(nativeEvent); + case topLevelTypes.topKeyPress: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case topLevelTypes.topTextInput: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} + +/** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + if (currentComposition) { + if ( + topLevelType === topLevelTypes.topCompositionEnd || + isFallbackCompositionEnd(topLevelType, nativeEvent) + ) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case topLevelTypes.topPaste: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case topLevelTypes.topKeyPress: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case topLevelTypes.topCompositionEnd: + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {?object} A SyntheticInputEvent. + */ +function extractBeforeInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent +) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes.beforeInput, + topLevelTargetID, + nativeEvent + ); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ +var BeforeInputEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ) { + return [ + extractCompositionEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ), + extractBeforeInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ) + ]; + } +}; + +module.exports = BeforeInputEventPlugin; + +},{"106":106,"110":110,"157":157,"16":16,"21":21,"22":22,"23":23}],4:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSCore + * @typechecks + */ + +var invariant = _dereq_(150); + +/** + * The CSSCore module specifies the API (and implements most of the methods) + * that should be used when dealing with the display of elements (via their + * CSS classes and visibility on screen. It is an API focused on mutating the + * display and not reading it as no logical state should be encoded in the + * display of elements. + */ + +var CSSCore = { + + /** + * Adds the class passed in to the element if it doesn't already have it. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + addClass: function(element, className) { + ("production" !== "development" ? invariant( + !/\s/.test(className), + 'CSSCore.addClass takes only a single class name. "%s" contains ' + + 'multiple classes.', className + ) : invariant(!/\s/.test(className))); + + if (className) { + if (element.classList) { + element.classList.add(className); + } else if (!CSSCore.hasClass(element, className)) { + element.className = element.className + ' ' + className; + } + } + return element; + }, + + /** + * Removes the class passed in from the element + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @return {DOMElement} the element passed in + */ + removeClass: function(element, className) { + ("production" !== "development" ? invariant( + !/\s/.test(className), + 'CSSCore.removeClass takes only a single class name. "%s" contains ' + + 'multiple classes.', className + ) : invariant(!/\s/.test(className))); + + if (className) { + if (element.classList) { + element.classList.remove(className); + } else if (CSSCore.hasClass(element, className)) { + element.className = element.className + .replace(new RegExp('(^|\\s)' + className + '(?:\\s|$)', 'g'), '$1') + .replace(/\s+/g, ' ') // multiple spaces to one + .replace(/^\s*|\s*$/g, ''); // trim the ends + } + } + return element; + }, + + /** + * Helper to add or remove a class from an element based on a condition. + * + * @param {DOMElement} element the element to set the class on + * @param {string} className the CSS className + * @param {*} bool condition to whether to add or remove the class + * @return {DOMElement} the element passed in + */ + conditionClass: function(element, className, bool) { + return (bool ? CSSCore.addClass : CSSCore.removeClass)(element, className); + }, + + /** + * Tests whether the element has the class specified. + * + * @param {DOMNode|DOMWindow} element the element to set the class on + * @param {string} className the CSS className + * @return {boolean} true if the element has the class, false if not + */ + hasClass: function(element, className) { + ("production" !== "development" ? invariant( + !/\s/.test(className), + 'CSS.hasClass takes only a single class name.' + ) : invariant(!/\s/.test(className))); + if (element.classList) { + return !!className && element.classList.contains(className); + } + return (' ' + element.className + ' ').indexOf(' ' + className + ' ') > -1; + } + +}; + +module.exports = CSSCore; + +},{"150":150}],5:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSProperty + */ + +'use strict'; + +/** + * CSS properties which accept numbers but are not in units of "px". + */ +var isUnitlessNumber = { + boxFlex: true, + boxFlexGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + strokeOpacity: true +}; + +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} + +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. +Object.keys(isUnitlessNumber).forEach(function(prop) { + prefixes.forEach(function(prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +/** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ +var shorthandPropertyExpansions = { + background: { + backgroundImage: true, + backgroundPosition: true, + backgroundRepeat: true, + backgroundColor: true + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true + } +}; + +var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions +}; + +module.exports = CSSProperty; + +},{}],6:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSPropertyOperations + * @typechecks static-only + */ + +'use strict'; + +var CSSProperty = _dereq_(5); +var ExecutionEnvironment = _dereq_(22); + +var camelizeStyleName = _dereq_(121); +var dangerousStyleValue = _dereq_(128); +var hyphenateStyleName = _dereq_(148); +var memoizeStringOnly = _dereq_(159); +var warning = _dereq_(171); + +var processStyleName = memoizeStringOnly(function(styleName) { + return hyphenateStyleName(styleName); +}); + +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } +} + +if ("production" !== "development") { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + + var warnHyphenatedStyleName = function(name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + ("production" !== "development" ? warning( + false, + 'Unsupported style property %s. Did you mean %s?', + name, + camelizeStyleName(name) + ) : null); + }; + + var warnBadVendoredStyleName = function(name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + ("production" !== "development" ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1) + ) : null); + }; + + var warnStyleValueWithSemicolon = function(name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + ("production" !== "development" ? warning( + false, + 'Style property values shouldn\'t contain a semicolon. ' + + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, '') + ) : null); + }; + + /** + * @param {string} name + * @param {*} value + */ + var warnValidStyle = function(name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + }; +} + +/** + * Operations for dealing with CSS properties. + */ +var CSSPropertyOperations = { + + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @return {?string} + */ + createMarkupForStyles: function(styles) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if ("production" !== "development") { + warnValidStyle(styleName, styleValue); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + setValueForStyles: function(node, styles) { + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if ("production" !== "development") { + warnValidStyle(styleName, styles[styleName]); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName]); + if (styleName === 'float') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + } + +}; + +module.exports = CSSPropertyOperations; + +},{"121":121,"128":128,"148":148,"159":159,"171":171,"22":22,"5":5}],7:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CallbackQueue + */ + +'use strict'; + +var PooledClass = _dereq_(30); + +var assign = _dereq_(29); +var invariant = _dereq_(150); + +/** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ +function CallbackQueue() { + this._callbacks = null; + this._contexts = null; +} + +assign(CallbackQueue.prototype, { + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + enqueue: function(callback, context) { + this._callbacks = this._callbacks || []; + this._contexts = this._contexts || []; + this._callbacks.push(callback); + this._contexts.push(context); + }, + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + notifyAll: function() { + var callbacks = this._callbacks; + var contexts = this._contexts; + if (callbacks) { + ("production" !== "development" ? invariant( + callbacks.length === contexts.length, + 'Mismatched list of contexts in callback queue' + ) : invariant(callbacks.length === contexts.length)); + this._callbacks = null; + this._contexts = null; + for (var i = 0, l = callbacks.length; i < l; i++) { + callbacks[i].call(contexts[i]); + } + callbacks.length = 0; + contexts.length = 0; + } + }, + + /** + * Resets the internal queue. + * + * @internal + */ + reset: function() { + this._callbacks = null; + this._contexts = null; + }, + + /** + * `PooledClass` looks for this. + */ + destructor: function() { + this.reset(); + } + +}); + +PooledClass.addPoolingTo(CallbackQueue); + +module.exports = CallbackQueue; + +},{"150":150,"29":29,"30":30}],8:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ChangeEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPluginHub = _dereq_(18); +var EventPropagators = _dereq_(21); +var ExecutionEnvironment = _dereq_(22); +var ReactUpdates = _dereq_(100); +var SyntheticEvent = _dereq_(108); + +var isEventSupported = _dereq_(151); +var isTextInputElement = _dereq_(153); +var keyOf = _dereq_(157); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: keyOf({onChange: null}), + captured: keyOf({onChangeCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topChange, + topLevelTypes.topClick, + topLevelTypes.topFocus, + topLevelTypes.topInput, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyUp, + topLevelTypes.topSelectionChange + ] + } +}; + +/** + * For IE shims + */ +var activeElement = null; +var activeElementID = null; +var activeElementValue = null; +var activeElementValueProp = null; + +/** + * SECTION: handle `change` event + */ +function shouldUseChangeEvent(elem) { + return ( + elem.nodeName === 'SELECT' || + (elem.nodeName === 'INPUT' && elem.type === 'file') + ); +} + +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && ( + (!('documentMode' in document) || document.documentMode > 8) + ); +} + +function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + activeElementID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(); +} + +function startWatchingForChangeEventIE8(target, targetID) { + activeElement = target; + activeElementID = targetID; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementID = null; +} + +function getTargetIDForChangeEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topChange) { + return topLevelTargetID; + } +} +function handleEventsForChangeEventIE8( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topFocus) { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID); + } else if (topLevelType === topLevelTypes.topBlur) { + stopWatchingForChangeEventIE8(); + } +} + + +/** + * SECTION: handle `input` event + */ +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events + isInputEventSupported = isEventSupported('input') && ( + (!('documentMode' in document) || document.documentMode > 9) + ); +} + +/** + * (For old IE.) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ +var newValueProp = { + get: function() { + return activeElementValueProp.get.call(this); + }, + set: function(val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; + +/** + * (For old IE.) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ +function startWatchingForValueChange(target, targetID) { + activeElement = target; + activeElementID = targetID; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor( + target.constructor.prototype, + 'value' + ); + + Object.defineProperty(activeElement, 'value', newValueProp); + activeElement.attachEvent('onpropertychange', handlePropertyChange); +} + +/** + * (For old IE.) Removes the event listeners from the currently-tracked element, + * if any exists. + */ +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + activeElement.detachEvent('onpropertychange', handlePropertyChange); + + activeElement = null; + activeElementID = null; + activeElementValue = null; + activeElementValueProp = null; +} + +/** + * (For old IE.) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); +} + +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetIDForInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topInput) { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return topLevelTargetID; + } +} + +// For IE8 and IE9. +function handleEventsForInputEventIE( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topFocus) { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(topLevelTarget, topLevelTargetID); + } else if (topLevelType === topLevelTypes.topBlur) { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetIDForInputEventIE( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topSelectionChange || + topLevelType === topLevelTypes.topKeyUp || + topLevelType === topLevelTypes.topKeyDown) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementID; + } + } +} + + +/** + * SECTION: handle `click` event + */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return ( + elem.nodeName === 'INPUT' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); +} + +function getTargetIDForClickEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topClick) { + return topLevelTargetID; + } +} + +/** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ +var ChangeEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + + var getTargetIDFunc, handleEventFunc; + if (shouldUseChangeEvent(topLevelTarget)) { + if (doesChangeEventBubble) { + getTargetIDFunc = getTargetIDForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(topLevelTarget)) { + if (isInputEventSupported) { + getTargetIDFunc = getTargetIDForInputEvent; + } else { + getTargetIDFunc = getTargetIDForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(topLevelTarget)) { + getTargetIDFunc = getTargetIDForClickEvent; + } + + if (getTargetIDFunc) { + var targetID = getTargetIDFunc( + topLevelType, + topLevelTarget, + topLevelTargetID + ); + if (targetID) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + targetID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc( + topLevelType, + topLevelTarget, + topLevelTargetID + ); + } + } + +}; + +module.exports = ChangeEventPlugin; + +},{"100":100,"108":108,"151":151,"153":153,"157":157,"16":16,"18":18,"21":21,"22":22}],9:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ClientReactRootIndex + * @typechecks + */ + +'use strict'; + +var nextReactRootIndex = 0; + +var ClientReactRootIndex = { + createReactRootIndex: function() { + return nextReactRootIndex++; + } +}; + +module.exports = ClientReactRootIndex; + +},{}],10:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMChildrenOperations + * @typechecks static-only + */ + +'use strict'; + +var Danger = _dereq_(13); +var ReactMultiChildUpdateTypes = _dereq_(79); + +var setTextContent = _dereq_(165); +var invariant = _dereq_(150); + +/** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ +function insertChildAt(parentNode, childNode, index) { + // By exploiting arrays returning `undefined` for an undefined index, we can + // rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. However, using `undefined` is not allowed by all + // browsers so we must replace it with `null`. + parentNode.insertBefore( + childNode, + parentNode.childNodes[index] || null + ); +} + +/** + * Operations for updating with DOM children. + */ +var DOMChildrenOperations = { + + dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup, + + updateTextContent: setTextContent, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array<object>} updates List of update configurations. + * @param {array<string>} markupList List of markup strings. + * @internal + */ + processUpdates: function(updates, markupList) { + var update; + // Mapping from parent IDs to initial child orderings. + var initialChildren = null; + // List of children that will be moved or removed. + var updatedChildren = null; + + for (var i = 0; i < updates.length; i++) { + update = updates[i]; + if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || + update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { + var updatedIndex = update.fromIndex; + var updatedChild = update.parentNode.childNodes[updatedIndex]; + var parentID = update.parentID; + + ("production" !== "development" ? invariant( + updatedChild, + 'processUpdates(): Unable to find child %s of element. This ' + + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + + 'browser), usually due to forgetting a <tbody> when using tables, ' + + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + + 'in an <svg> parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); + + initialChildren = initialChildren || {}; + initialChildren[parentID] = initialChildren[parentID] || []; + initialChildren[parentID][updatedIndex] = updatedChild; + + updatedChildren = updatedChildren || []; + updatedChildren.push(updatedChild); + } + } + + var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList); + + // Remove updated children first so that `toIndex` is consistent. + if (updatedChildren) { + for (var j = 0; j < updatedChildren.length; j++) { + updatedChildren[j].parentNode.removeChild(updatedChildren[j]); + } + } + + for (var k = 0; k < updates.length; k++) { + update = updates[k]; + switch (update.type) { + case ReactMultiChildUpdateTypes.INSERT_MARKUP: + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); + break; + case ReactMultiChildUpdateTypes.MOVE_EXISTING: + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); + break; + case ReactMultiChildUpdateTypes.TEXT_CONTENT: + setTextContent( + update.parentNode, + update.textContent + ); + break; + case ReactMultiChildUpdateTypes.REMOVE_NODE: + // Already removed by the for-loop above. + break; + } + } + } + +}; + +module.exports = DOMChildrenOperations; + +},{"13":13,"150":150,"165":165,"79":79}],11:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMProperty + * @typechecks static-only + */ + +/*jslint bitwise: true */ + +'use strict'; + +var invariant = _dereq_(150); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_ATTRIBUTE: 0x1, + MUST_USE_PROPERTY: 0x2, + HAS_SIDE_EFFECTS: 0x4, + HAS_BOOLEAN_VALUE: 0x8, + HAS_NUMERIC_VALUE: 0x10, + HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x40, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function(domPropertyConfig) { + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push( + domPropertyConfig.isCustomAttribute + ); + } + + for (var propName in Properties) { + ("production" !== "development" ? invariant( + !DOMProperty.isStandardName.hasOwnProperty(propName), + 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + + '\'%s\' which has already been injected. You may be accidentally ' + + 'injecting the same DOM property config twice, or you may be ' + + 'injecting two configs that have conflicting property names.', + propName + ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName))); + + DOMProperty.isStandardName[propName] = true; + + var lowerCased = propName.toLowerCase(); + DOMProperty.getPossibleStandardName[lowerCased] = propName; + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + DOMProperty.getPossibleStandardName[attributeName] = propName; + DOMProperty.getAttributeName[propName] = attributeName; + } else { + DOMProperty.getAttributeName[propName] = lowerCased; + } + + DOMProperty.getPropertyName[propName] = + DOMPropertyNames.hasOwnProperty(propName) ? + DOMPropertyNames[propName] : + propName; + + if (DOMMutationMethods.hasOwnProperty(propName)) { + DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; + } else { + DOMProperty.getMutationMethod[propName] = null; + } + + var propConfig = Properties[propName]; + DOMProperty.mustUseAttribute[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); + DOMProperty.mustUseProperty[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); + DOMProperty.hasSideEffects[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); + DOMProperty.hasBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); + DOMProperty.hasNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); + DOMProperty.hasPositiveNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); + DOMProperty.hasOverloadedBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); + + ("production" !== "development" ? invariant( + !DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName], + 'DOMProperty: Cannot require using both attribute and property: %s', + propName + ) : invariant(!DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName])); + ("production" !== "development" ? invariant( + DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName], + 'DOMProperty: Properties that have side effects must use property: %s', + propName + ) : invariant(DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName])); + ("production" !== "development" ? invariant( + !!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + + 'numeric value, but not a combination: %s', + propName + ) : invariant(!!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1)); + } + } +}; +var defaultValueCache = {}; + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + + ID_ATTRIBUTE_NAME: 'data-reactid', + + /** + * Checks whether a property name is a standard property. + * @type {Object} + */ + isStandardName: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. + * @type {Object} + */ + getPossibleStandardName: {}, + + /** + * Mapping from normalized names to attribute names that differ. Attribute + * names are used when rendering markup or with `*Attribute()`. + * @type {Object} + */ + getAttributeName: {}, + + /** + * Mapping from normalized names to properties on DOM node instances. + * (This includes properties that mutate due to external factors.) + * @type {Object} + */ + getPropertyName: {}, + + /** + * Mapping from normalized names to mutation methods. This will only exist if + * mutation cannot be set simply by the property or `setAttribute()`. + * @type {Object} + */ + getMutationMethod: {}, + + /** + * Whether the property must be accessed and mutated as an object property. + * @type {Object} + */ + mustUseAttribute: {}, + + /** + * Whether the property must be accessed and mutated using `*Attribute()`. + * (This includes anything that fails `<propName> in <element>`.) + * @type {Object} + */ + mustUseProperty: {}, + + /** + * Whether or not setting a value causes side effects such as triggering + * resources to be loaded or text selection changes. We must ensure that + * the value is only set if it has changed. + * @type {Object} + */ + hasSideEffects: {}, + + /** + * Whether the property should be removed when set to a falsey value. + * @type {Object} + */ + hasBooleanValue: {}, + + /** + * Whether the property must be numeric or parse as a + * numeric and should be removed when set to a falsey value. + * @type {Object} + */ + hasNumericValue: {}, + + /** + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * @type {Object} + */ + hasPositiveNumericValue: {}, + + /** + * Whether the property can be used as a flag as well as with a value. Removed + * when strictly equal to false; present without a value when strictly equal + * to true; present with a value otherwise. + * @type {Object} + */ + hasOverloadedBooleanValue: {}, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function(attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + /** + * Returns the default property value for a DOM property (i.e., not an + * attribute). Most default values are '' or false, but not all. Worse yet, + * some (in particular, `type`) vary depending on the type of element. + * + * TODO: Is it better to grab all the possible properties when creating an + * element to avoid having to create the same element twice? + */ + getDefaultValueForProperty: function(nodeName, prop) { + var nodeDefaults = defaultValueCache[nodeName]; + var testElement; + if (!nodeDefaults) { + defaultValueCache[nodeName] = nodeDefaults = {}; + } + if (!(prop in nodeDefaults)) { + testElement = document.createElement(nodeName); + nodeDefaults[prop] = testElement[prop]; + } + return nodeDefaults[prop]; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; + +},{"150":150}],12:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMPropertyOperations + * @typechecks static-only + */ + +'use strict'; + +var DOMProperty = _dereq_(11); + +var quoteAttributeValueForBrowser = _dereq_(163); +var warning = _dereq_(171); + +function shouldIgnoreValue(name, value) { + return value == null || + (DOMProperty.hasBooleanValue[name] && !value) || + (DOMProperty.hasNumericValue[name] && isNaN(value)) || + (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) || + (DOMProperty.hasOverloadedBooleanValue[name] && value === false); +} + +if ("production" !== "development") { + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true + }; + var warnedProperties = {}; + + var warnUnknownProperty = function(name) { + if (reactProps.hasOwnProperty(name) && reactProps[name] || + warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return; + } + + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = ( + DOMProperty.isCustomAttribute(lowerCasedName) ? + lowerCasedName : + DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? + DOMProperty.getPossibleStandardName[lowerCasedName] : + null + ); + + // For now, only warn when we have a suggested correction. This prevents + // logging too much when using transferPropsTo. + ("production" !== "development" ? warning( + standardName == null, + 'Unknown DOM property %s. Did you mean %s?', + name, + standardName + ) : null); + + }; +} + +/** + * Operations for dealing with DOM properties. + */ +var DOMPropertyOperations = { + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function(id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + + quoteAttributeValueForBrowser(id); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function(name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + if (shouldIgnoreValue(name, value)) { + return ''; + } + var attributeName = DOMProperty.getAttributeName[name]; + if (DOMProperty.hasBooleanValue[name] || + (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { + return attributeName; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + return null; + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function(node, name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + var mutationMethod = DOMProperty.getMutationMethod[name]; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(name, value)) { + this.deleteValueForProperty(node, name); + } else if (DOMProperty.mustUseAttribute[name]) { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + node.setAttribute(DOMProperty.getAttributeName[name], '' + value); + } else { + var propName = DOMProperty.getPropertyName[name]; + // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the + // property type before comparing; only `value` does and is string. + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== ('' + value)) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propName] = value; + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function(node, name) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + var mutationMethod = DOMProperty.getMutationMethod[name]; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (DOMProperty.mustUseAttribute[name]) { + node.removeAttribute(DOMProperty.getAttributeName[name]); + } else { + var propName = DOMProperty.getPropertyName[name]; + var defaultValue = DOMProperty.getDefaultValueForProperty( + node.nodeName, + propName + ); + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== defaultValue) { + node[propName] = defaultValue; + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + } + +}; + +module.exports = DOMPropertyOperations; + +},{"11":11,"163":163,"171":171}],13:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Danger + * @typechecks static-only + */ + +/*jslint evil: true, sub: true */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +var createNodesFromMarkup = _dereq_(126); +var emptyFunction = _dereq_(129); +var getMarkupWrap = _dereq_(142); +var invariant = _dereq_(150); + +var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/; +var RESULT_INDEX_ATTR = 'data-danger-index'; + +/** + * Extracts the `nodeName` from a string of markup. + * + * NOTE: Extracting the `nodeName` does not require a regular expression match + * because we make assumptions about React-generated markup (i.e. there are no + * spaces surrounding the opening tag and there is at least one attribute). + * + * @param {string} markup String of markup. + * @return {string} Node name of the supplied markup. + * @see http://jsperf.com/extract-nodename + */ +function getNodeName(markup) { + return markup.substring(1, markup.indexOf(' ')); +} + +var Danger = { + + /** + * Renders markup into an array of nodes. The markup is expected to render + * into a list of root nodes. Also, the length of `resultList` and + * `markupList` should be the same. + * + * @param {array<string>} markupList List of markup strings to render. + * @return {array<DOMElement>} List of rendered nodes. + * @internal + */ + dangerouslyRenderMarkup: function(markupList) { + ("production" !== "development" ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); + var nodeName; + var markupByNodeName = {}; + // Group markup by `nodeName` if a wrap is necessary, else by '*'. + for (var i = 0; i < markupList.length; i++) { + ("production" !== "development" ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); + nodeName = getNodeName(markupList[i]); + nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; + markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; + markupByNodeName[nodeName][i] = markupList[i]; + } + var resultList = []; + var resultListAssignmentCount = 0; + for (nodeName in markupByNodeName) { + if (!markupByNodeName.hasOwnProperty(nodeName)) { + continue; + } + var markupListByNodeName = markupByNodeName[nodeName]; + + // This for-in loop skips the holes of the sparse array. The order of + // iteration should follow the order of assignment, which happens to match + // numerical index order, but we don't rely on that. + var resultIndex; + for (resultIndex in markupListByNodeName) { + if (markupListByNodeName.hasOwnProperty(resultIndex)) { + var markup = markupListByNodeName[resultIndex]; + + // Push the requested markup with an additional RESULT_INDEX_ATTR + // attribute. If the markup does not start with a < character, it + // will be discarded below (with an appropriate console.error). + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); + } + } + + // Render each group of markup with similar wrapping `nodeName`. + var renderNodes = createNodesFromMarkup( + markupListByNodeName.join(''), + emptyFunction // Do nothing special with <script> tags. + ); + + for (var j = 0; j < renderNodes.length; ++j) { + var renderNode = renderNodes[j]; + if (renderNode.hasAttribute && + renderNode.hasAttribute(RESULT_INDEX_ATTR)) { + + resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR); + renderNode.removeAttribute(RESULT_INDEX_ATTR); + + ("production" !== "development" ? invariant( + !resultList.hasOwnProperty(resultIndex), + 'Danger: Assigning to an already-occupied result index.' + ) : invariant(!resultList.hasOwnProperty(resultIndex))); + + resultList[resultIndex] = renderNode; + + // This should match resultList.length and markupList.length when + // we're done. + resultListAssignmentCount += 1; + + } else if ("production" !== "development") { + console.error( + 'Danger: Discarding unexpected node:', + renderNode + ); + } + } + } + + // Although resultList was populated out of order, it should now be a dense + // array. + ("production" !== "development" ? invariant( + resultListAssignmentCount === resultList.length, + 'Danger: Did not assign to every index of resultList.' + ) : invariant(resultListAssignmentCount === resultList.length)); + + ("production" !== "development" ? invariant( + resultList.length === markupList.length, + 'Danger: Expected markup to render %s nodes, but rendered %s.', + markupList.length, + resultList.length + ) : invariant(resultList.length === markupList.length)); + + return resultList; + }, + + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) { + ("production" !== "development" ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + + 'worker thread. Make sure `window` and `document` are available ' + + 'globally before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); + ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup)); + ("production" !== "development" ? invariant( + oldChild.tagName.toLowerCase() !== 'html', + 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + + '<html> node. This is because browser quirks make this unreliable ' + + 'and/or slow. If you want to render to the root you must use ' + + 'server rendering. See React.renderToString().' + ) : invariant(oldChild.tagName.toLowerCase() !== 'html')); + + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } + +}; + +module.exports = Danger; + +},{"126":126,"129":129,"142":142,"150":150,"22":22}],14:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DefaultEventPluginOrder + */ + +'use strict'; + +var keyOf = _dereq_(157); + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ +var DefaultEventPluginOrder = [ + keyOf({ResponderEventPlugin: null}), + keyOf({SimpleEventPlugin: null}), + keyOf({TapEventPlugin: null}), + keyOf({EnterLeaveEventPlugin: null}), + keyOf({ChangeEventPlugin: null}), + keyOf({SelectEventPlugin: null}), + keyOf({BeforeInputEventPlugin: null}), + keyOf({AnalyticsEventPlugin: null}), + keyOf({MobileSafariClickEventPlugin: null}) +]; + +module.exports = DefaultEventPluginOrder; + +},{"157":157}],15:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EnterLeaveEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPropagators = _dereq_(21); +var SyntheticMouseEvent = _dereq_(112); + +var ReactMount = _dereq_(77); +var keyOf = _dereq_(157); + +var topLevelTypes = EventConstants.topLevelTypes; +var getFirstReactDOM = ReactMount.getFirstReactDOM; + +var eventTypes = { + mouseEnter: { + registrationName: keyOf({onMouseEnter: null}), + dependencies: [ + topLevelTypes.topMouseOut, + topLevelTypes.topMouseOver + ] + }, + mouseLeave: { + registrationName: keyOf({onMouseLeave: null}), + dependencies: [ + topLevelTypes.topMouseOut, + topLevelTypes.topMouseOver + ] + } +}; + +var extractedEvents = [null, null]; + +var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + if (topLevelType === topLevelTypes.topMouseOver && + (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== topLevelTypes.topMouseOut && + topLevelType !== topLevelTypes.topMouseOver) { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (topLevelTarget.window === topLevelTarget) { + // `topLevelTarget` is probably a window object. + win = topLevelTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = topLevelTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from, to; + if (topLevelType === topLevelTypes.topMouseOut) { + from = topLevelTarget; + to = + getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) || + win; + } else { + from = win; + to = topLevelTarget; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromID = from ? ReactMount.getID(from) : ''; + var toID = to ? ReactMount.getID(to) : ''; + + var leave = SyntheticMouseEvent.getPooled( + eventTypes.mouseLeave, + fromID, + nativeEvent + ); + leave.type = 'mouseleave'; + leave.target = from; + leave.relatedTarget = to; + + var enter = SyntheticMouseEvent.getPooled( + eventTypes.mouseEnter, + toID, + nativeEvent + ); + enter.type = 'mouseenter'; + enter.target = to; + enter.relatedTarget = from; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID); + + extractedEvents[0] = leave; + extractedEvents[1] = enter; + + return extractedEvents; + } + +}; + +module.exports = EnterLeaveEventPlugin; + +},{"112":112,"157":157,"16":16,"21":21,"77":77}],16:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventConstants + */ + +'use strict'; + +var keyMirror = _dereq_(156); + +var PropagationPhases = keyMirror({bubbled: null, captured: null}); + +/** + * Types of raw signals from the browser caught at the top level. + */ +var topLevelTypes = keyMirror({ + topBlur: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topError: null, + topFocus: null, + topInput: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topReset: null, + topScroll: null, + topSelectionChange: null, + topSubmit: null, + topTextInput: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topWheel: null +}); + +var EventConstants = { + topLevelTypes: topLevelTypes, + PropagationPhases: PropagationPhases +}; + +module.exports = EventConstants; + +},{"156":156}],17:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule EventListener + * @typechecks + */ + +var emptyFunction = _dereq_(129); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function() { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function() { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function(target, eventType, callback) { + if (!target.addEventListener) { + if ("production" !== "development") { + console.error( + 'Attempted to listen to events during the capture phase on a ' + + 'browser that does not support the capture phase. Your application ' + + 'will not receive some events.' + ); + } + return { + remove: emptyFunction + }; + } else { + target.addEventListener(eventType, callback, true); + return { + remove: function() { + target.removeEventListener(eventType, callback, true); + } + }; + } + }, + + registerDefault: function() {} +}; + +module.exports = EventListener; + +},{"129":129}],18:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginHub + */ + +'use strict'; + +var EventPluginRegistry = _dereq_(19); +var EventPluginUtils = _dereq_(20); + +var accumulateInto = _dereq_(118); +var forEachAccumulated = _dereq_(135); +var invariant = _dereq_(150); + +/** + * Internal store for event listeners + */ +var listenerBank = {}; + +/** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ +var eventQueue = null; + +/** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ +var executeDispatchesAndRelease = function(event) { + if (event) { + var executeDispatch = EventPluginUtils.executeDispatch; + // Plugins can provide custom behavior when dispatching events. + var PluginModule = EventPluginRegistry.getPluginModuleForEvent(event); + if (PluginModule && PluginModule.executeDispatch) { + executeDispatch = PluginModule.executeDispatch; + } + EventPluginUtils.executeDispatchesInOrder(event, executeDispatch); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } +}; + +/** + * - `InstanceHandle`: [required] Module that performs logical traversals of DOM + * hierarchy given ids of the logical DOM elements involved. + */ +var InstanceHandle = null; + +function validateInstanceHandle() { + var valid = + InstanceHandle && + InstanceHandle.traverseTwoPhase && + InstanceHandle.traverseEnterLeave; + ("production" !== "development" ? invariant( + valid, + 'InstanceHandle not injected before use!' + ) : invariant(valid)); +} + +/** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ +var EventPluginHub = { + + /** + * Methods for injecting dependencies. + */ + injection: { + + /** + * @param {object} InjectedMount + * @public + */ + injectMount: EventPluginUtils.injection.injectMount, + + /** + * @param {object} InjectedInstanceHandle + * @public + */ + injectInstanceHandle: function(InjectedInstanceHandle) { + InstanceHandle = InjectedInstanceHandle; + if ("production" !== "development") { + validateInstanceHandle(); + } + }, + + getInstanceHandle: function() { + if ("production" !== "development") { + validateInstanceHandle(); + } + return InstanceHandle; + }, + + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + + }, + + eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs, + + registrationNameModules: EventPluginRegistry.registrationNameModules, + + /** + * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent. + * + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {?function} listener The callback to store. + */ + putListener: function(id, registrationName, listener) { + ("production" !== "development" ? invariant( + !listener || typeof listener === 'function', + 'Expected %s listener to be a function, instead got type %s', + registrationName, typeof listener + ) : invariant(!listener || typeof listener === 'function')); + + var bankForRegistrationName = + listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[id] = listener; + }, + + /** + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function(id, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + return bankForRegistrationName && bankForRegistrationName[id]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function(id, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + if (bankForRegistrationName) { + delete bankForRegistrationName[id]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {string} id ID of the DOM element. + */ + deleteAllListeners: function(id) { + for (var registrationName in listenerBank) { + delete listenerBank[registrationName][id]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0, l = plugins.length; i < l; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function(events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function() { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + forEachAccumulated(processingEventQueue, executeDispatchesAndRelease); + ("production" !== "development" ? invariant( + !eventQueue, + 'processEventQueue(): Additional events were enqueued while processing ' + + 'an event queue. Support for this has not yet been implemented.' + ) : invariant(!eventQueue)); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function() { + listenerBank = {}; + }, + + __getListenerBank: function() { + return listenerBank; + } + +}; + +module.exports = EventPluginHub; + +},{"118":118,"135":135,"150":150,"19":19,"20":20}],19:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginRegistry + * @typechecks static-only + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * Injectable ordering of event plugins. + */ +var EventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!EventPluginOrder) { + // Wait until an `EventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var PluginModule = namesToPlugins[pluginName]; + var pluginIndex = EventPluginOrder.indexOf(pluginName); + ("production" !== "development" ? invariant( + pluginIndex > -1, + 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + + 'the plugin ordering, `%s`.', + pluginName + ) : invariant(pluginIndex > -1)); + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + ("production" !== "development" ? invariant( + PluginModule.extractEvents, + 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + + 'method, but `%s` does not.', + pluginName + ) : invariant(PluginModule.extractEvents)); + EventPluginRegistry.plugins[pluginIndex] = PluginModule; + var publishedEvents = PluginModule.eventTypes; + for (var eventName in publishedEvents) { + ("production" !== "development" ? invariant( + publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ), + 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', + eventName, + pluginName + ) : invariant(publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ))); + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { + ("production" !== "development" ? invariant( + !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'event name, `%s`.', + eventName + ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName))); + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName( + phasedRegistrationName, + PluginModule, + eventName + ); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName( + dispatchConfig.registrationName, + PluginModule, + eventName + ); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, PluginModule, eventName) { + ("production" !== "development" ? invariant( + !EventPluginRegistry.registrationNameModules[registrationName], + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'registration name, `%s`.', + registrationName + ) : invariant(!EventPluginRegistry.registrationNameModules[registrationName])); + EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = + PluginModule.eventTypes[eventName].dependencies; +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ +var EventPluginRegistry = { + + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function(InjectedEventPluginOrder) { + ("production" !== "development" ? invariant( + !EventPluginOrder, + 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + + 'once. You are likely trying to load more than one copy of React.' + ) : invariant(!EventPluginOrder)); + // Clone the ordering so it cannot be dynamically mutated. + EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function(injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var PluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || + namesToPlugins[pluginName] !== PluginModule) { + ("production" !== "development" ? invariant( + !namesToPlugins[pluginName], + 'EventPluginRegistry: Cannot inject two different event plugins ' + + 'using the same name, `%s`.', + pluginName + ) : invariant(!namesToPlugins[pluginName])); + namesToPlugins[pluginName] = PluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function(event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[ + dispatchConfig.registrationName + ] || null; + } + for (var phase in dispatchConfig.phasedRegistrationNames) { + if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var PluginModule = EventPluginRegistry.registrationNameModules[ + dispatchConfig.phasedRegistrationNames[phase] + ]; + if (PluginModule) { + return PluginModule; + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function() { + EventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + } + +}; + +module.exports = EventPluginRegistry; + +},{"150":150}],20:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginUtils + */ + +'use strict'; + +var EventConstants = _dereq_(16); + +var invariant = _dereq_(150); + +/** + * Injected dependencies: + */ + +/** + * - `Mount`: [required] Module that can convert between React dom IDs and + * actual node references. + */ +var injection = { + Mount: null, + injectMount: function(InjectedMount) { + injection.Mount = InjectedMount; + if ("production" !== "development") { + ("production" !== "development" ? invariant( + InjectedMount && InjectedMount.getNode, + 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + + 'is missing getNode.' + ) : invariant(InjectedMount && InjectedMount.getNode)); + } + } +}; + +var topLevelTypes = EventConstants.topLevelTypes; + +function isEndish(topLevelType) { + return topLevelType === topLevelTypes.topMouseUp || + topLevelType === topLevelTypes.topTouchEnd || + topLevelType === topLevelTypes.topTouchCancel; +} + +function isMoveish(topLevelType) { + return topLevelType === topLevelTypes.topMouseMove || + topLevelType === topLevelTypes.topTouchMove; +} +function isStartish(topLevelType) { + return topLevelType === topLevelTypes.topMouseDown || + topLevelType === topLevelTypes.topTouchStart; +} + + +var validateEventDispatches; +if ("production" !== "development") { + validateEventDispatches = function(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + + var listenersIsArr = Array.isArray(dispatchListeners); + var idsIsArr = Array.isArray(dispatchIDs); + var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0; + var listenersLen = listenersIsArr ? + dispatchListeners.length : + dispatchListeners ? 1 : 0; + + ("production" !== "development" ? invariant( + idsIsArr === listenersIsArr && IDsLen === listenersLen, + 'EventPluginUtils: Invalid `event`.' + ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen)); + }; +} + +/** + * Invokes `cb(event, listener, id)`. Avoids using call if no scope is + * provided. The `(listener,id)` pair effectively forms the "dispatch" but are + * kept separate to conserve memory. + */ +function forEachEventDispatch(event, cb) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + if ("production" !== "development") { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and IDs are two parallel arrays that are always in sync. + cb(event, dispatchListeners[i], dispatchIDs[i]); + } + } else if (dispatchListeners) { + cb(event, dispatchListeners, dispatchIDs); + } +} + +/** + * Default implementation of PluginModule.executeDispatch(). + * @param {SyntheticEvent} SyntheticEvent to handle + * @param {function} Application-level callback + * @param {string} domID DOM id to pass to the callback. + */ +function executeDispatch(event, listener, domID) { + event.currentTarget = injection.Mount.getNode(domID); + var returnValue = listener(event, domID); + event.currentTarget = null; + return returnValue; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, cb) { + forEachEventDispatch(event, cb); + event._dispatchListeners = null; + event._dispatchIDs = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return id of the first dispatch execution who's listener returns true, or + * null if no listener returned true. + */ +function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + if ("production" !== "development") { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and IDs are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchIDs[i])) { + return dispatchIDs[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchIDs)) { + return dispatchIDs; + } + } + return null; +} + +/** + * @see executeDispatchesInOrderStopAtTrueImpl + */ +function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchIDs = null; + event._dispatchListeners = null; + return ret; +} + +/** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return The return value of executing the single dispatch. + */ +function executeDirectDispatch(event) { + if ("production" !== "development") { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchID = event._dispatchIDs; + ("production" !== "development" ? invariant( + !Array.isArray(dispatchListener), + 'executeDirectDispatch(...): Invalid `event`.' + ) : invariant(!Array.isArray(dispatchListener))); + var res = dispatchListener ? + dispatchListener(event, dispatchID) : + null; + event._dispatchListeners = null; + event._dispatchIDs = null; + return res; +} + +/** + * @param {SyntheticEvent} event + * @return {bool} True iff number of dispatches accumulated is greater than 0. + */ +function hasDispatches(event) { + return !!event._dispatchListeners; +} + +/** + * General utilities that are useful in creating custom Event Plugins. + */ +var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatch: executeDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + injection: injection, + useTouchEvents: false +}; + +module.exports = EventPluginUtils; + +},{"150":150,"16":16}],21:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPropagators + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPluginHub = _dereq_(18); + +var accumulateInto = _dereq_(118); +var forEachAccumulated = _dereq_(135); + +var PropagationPhases = EventConstants.PropagationPhases; +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(id, event, propagationPhase) { + var registrationName = + event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(id, registrationName); +} + +/** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ +function accumulateDirectionalDispatches(domID, upwards, event) { + if ("production" !== "development") { + if (!domID) { + throw new Error('Dispatching id must not be null'); + } + } + var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; + var listener = listenerAtPhase(domID, event, phase); + if (listener) { + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, domID); + } +} + +/** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We can not perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ +function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginHub.injection.getInstanceHandle().traverseTwoPhase( + event.dispatchMarker, + accumulateDirectionalDispatches, + event + ); + } +} + + +/** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ +function accumulateDispatches(id, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(id, registrationName); + if (listener) { + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, id); + } + } +} + +/** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ +function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event.dispatchMarker, null, event); + } +} + +function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); +} + +function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) { + EventPluginHub.injection.getInstanceHandle().traverseEnterLeave( + fromID, + toID, + accumulateDispatches, + leave, + enter + ); +} + + +function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); +} + + + +/** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ +var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches +}; + +module.exports = EventPropagators; + +},{"118":118,"135":135,"16":16,"18":18}],22:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ExecutionEnvironment + */ + +/*jslint evil: true */ + +"use strict"; + +var canUseDOM = !!( + (typeof window !== 'undefined' && + window.document && window.document.createElement) +); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: + canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +},{}],23:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule FallbackCompositionState + * @typechecks static-only + */ + +'use strict'; + +var PooledClass = _dereq_(30); + +var assign = _dereq_(29); +var getTextContentAccessor = _dereq_(145); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +assign(FallbackCompositionState.prototype, { + /** + * Get current text of input. + * + * @return {string} + */ + getText: function() { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function() { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } +}); + +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; + +},{"145":145,"29":29,"30":30}],24:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule HTMLDOMPropertyConfig + */ + +/*jslint bitwise: true*/ + +'use strict'; + +var DOMProperty = _dereq_(11); +var ExecutionEnvironment = _dereq_(22); + +var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = + DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = + DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + +var hasSVG; +if (ExecutionEnvironment.canUseDOM) { + var implementation = document.implementation; + hasSVG = ( + implementation && + implementation.hasFeature && + implementation.hasFeature( + 'http://www.w3.org/TR/SVG11/feature#BasicStructure', + '1.1' + ) + ); +} + + +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind( + /^(data|aria)-[a-z_][a-z\d_.\-]*$/ + ), + Properties: { + /** + * Standard Properties + */ + accept: null, + acceptCharset: null, + accessKey: null, + action: null, + allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + allowTransparency: MUST_USE_ATTRIBUTE, + alt: null, + async: HAS_BOOLEAN_VALUE, + autoComplete: null, + // autoFocus is polyfilled/normalized by AutoFocusMixin + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + cellPadding: null, + cellSpacing: null, + charSet: MUST_USE_ATTRIBUTE, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + classID: MUST_USE_ATTRIBUTE, + // To set className on SVG elements, it's necessary to use .setAttribute; + // this works on HTML elements too in all browsers except IE8. Conveniently, + // IE8 doesn't support SVG and so we can simply use the attribute in + // browsers that support SVG and the property in browsers that don't, + // regardless of whether the element is HTML or SVG. + className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY, + cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + colSpan: null, + content: null, + contentEditable: null, + contextMenu: MUST_USE_ATTRIBUTE, + controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + coords: null, + crossOrigin: null, + data: null, // For `<object />` acts as `src`. + dateTime: MUST_USE_ATTRIBUTE, + defer: HAS_BOOLEAN_VALUE, + dir: null, + disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: null, + encType: null, + form: MUST_USE_ATTRIBUTE, + formAction: MUST_USE_ATTRIBUTE, + formEncType: MUST_USE_ATTRIBUTE, + formMethod: MUST_USE_ATTRIBUTE, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: MUST_USE_ATTRIBUTE, + frameBorder: MUST_USE_ATTRIBUTE, + headers: null, + height: MUST_USE_ATTRIBUTE, + hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + href: null, + hrefLang: null, + htmlFor: null, + httpEquiv: null, + icon: null, + id: MUST_USE_PROPERTY, + label: null, + lang: null, + list: MUST_USE_ATTRIBUTE, + loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + manifest: MUST_USE_ATTRIBUTE, + marginHeight: null, + marginWidth: null, + max: null, + maxLength: MUST_USE_ATTRIBUTE, + media: MUST_USE_ATTRIBUTE, + mediaGroup: null, + method: null, + min: null, + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: null, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + pattern: null, + placeholder: null, + poster: null, + preload: null, + radioGroup: null, + readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + rel: null, + required: HAS_BOOLEAN_VALUE, + role: MUST_USE_ATTRIBUTE, + rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: null, + sandbox: null, + scope: null, + scrolling: null, + seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: null, + size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + sizes: MUST_USE_ATTRIBUTE, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: null, + src: null, + srcDoc: MUST_USE_PROPERTY, + srcSet: MUST_USE_ATTRIBUTE, + start: HAS_NUMERIC_VALUE, + step: null, + style: null, + tabIndex: null, + target: null, + title: null, + type: null, + useMap: null, + value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS, + width: MUST_USE_ATTRIBUTE, + wmode: MUST_USE_ATTRIBUTE, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: null, + autoCorrect: null, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: MUST_USE_ATTRIBUTE, + itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + itemType: MUST_USE_ATTRIBUTE, + // itemID and itemRef are for Microdata support as well but + // only specified in the the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: MUST_USE_ATTRIBUTE, + itemRef: MUST_USE_ATTRIBUTE, + // property is supported for OpenGraph in meta tags. + property: null + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: { + autoCapitalize: 'autocapitalize', + autoComplete: 'autocomplete', + autoCorrect: 'autocorrect', + autoFocus: 'autofocus', + autoPlay: 'autoplay', + // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter. + // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding + encType: 'encoding', + hrefLang: 'hreflang', + radioGroup: 'radiogroup', + spellCheck: 'spellcheck', + srcDoc: 'srcdoc', + srcSet: 'srcset' + } +}; + +module.exports = HTMLDOMPropertyConfig; + +},{"11":11,"22":22}],25:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule LinkedStateMixin + * @typechecks static-only + */ + +'use strict'; + +var ReactLink = _dereq_(75); +var ReactStateSetters = _dereq_(94); + +/** + * A simple mixin around ReactLink.forState(). + */ +var LinkedStateMixin = { + /** + * Create a ReactLink that's linked to part of this component's state. The + * ReactLink will have the current value of this.state[key] and will call + * setState() when a change is requested. + * + * @param {string} key state key to update. Note: you may want to use keyOf() + * if you're using Google Closure Compiler advanced mode. + * @return {ReactLink} ReactLink instance linking to the state. + */ + linkState: function(key) { + return new ReactLink( + this.state[key], + ReactStateSetters.createStateKeySetter(this, key) + ); + } +}; + +module.exports = LinkedStateMixin; + +},{"75":75,"94":94}],26:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule LinkedValueUtils + * @typechecks static-only + */ + +'use strict'; + +var ReactPropTypes = _dereq_(86); + +var invariant = _dereq_(150); + +var hasReadOnlyValue = { + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true +}; + +function _assertSingleLink(input) { + ("production" !== "development" ? invariant( + input.props.checkedLink == null || input.props.valueLink == null, + 'Cannot provide a checkedLink and a valueLink. If you want to use ' + + 'checkedLink, you probably don\'t want to use valueLink and vice versa.' + ) : invariant(input.props.checkedLink == null || input.props.valueLink == null)); +} +function _assertValueLink(input) { + _assertSingleLink(input); + ("production" !== "development" ? invariant( + input.props.value == null && input.props.onChange == null, + 'Cannot provide a valueLink and a value or onChange event. If you want ' + + 'to use value or onChange, you probably don\'t want to use valueLink.' + ) : invariant(input.props.value == null && input.props.onChange == null)); +} + +function _assertCheckedLink(input) { + _assertSingleLink(input); + ("production" !== "development" ? invariant( + input.props.checked == null && input.props.onChange == null, + 'Cannot provide a checkedLink and a checked property or onChange event. ' + + 'If you want to use checked or onChange, you probably don\'t want to ' + + 'use checkedLink' + ) : invariant(input.props.checked == null && input.props.onChange == null)); +} + +/** + * @param {SyntheticEvent} e change event to handle + */ +function _handleLinkedValueChange(e) { + /*jshint validthis:true */ + this.props.valueLink.requestChange(e.target.value); +} + +/** + * @param {SyntheticEvent} e change event to handle + */ +function _handleLinkedCheckChange(e) { + /*jshint validthis:true */ + this.props.checkedLink.requestChange(e.target.checked); +} + +/** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ +var LinkedValueUtils = { + Mixin: { + propTypes: { + value: function(props, propName, componentName) { + if (!props[propName] || + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled) { + return null; + } + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.' + ); + }, + checked: function(props, propName, componentName) { + if (!props[propName] || + props.onChange || + props.readOnly || + props.disabled) { + return null; + } + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.' + ); + }, + onChange: ReactPropTypes.func + } + }, + + /** + * @param {ReactComponent} input Form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function(input) { + if (input.props.valueLink) { + _assertValueLink(input); + return input.props.valueLink.value; + } + return input.props.value; + }, + + /** + * @param {ReactComponent} input Form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function(input) { + if (input.props.checkedLink) { + _assertCheckedLink(input); + return input.props.checkedLink.value; + } + return input.props.checked; + }, + + /** + * @param {ReactComponent} input Form component + * @return {function} change callback either from onChange prop or link. + */ + getOnChange: function(input) { + if (input.props.valueLink) { + _assertValueLink(input); + return _handleLinkedValueChange; + } else if (input.props.checkedLink) { + _assertCheckedLink(input); + return _handleLinkedCheckChange; + } + return input.props.onChange; + } +}; + +module.exports = LinkedValueUtils; + +},{"150":150,"86":86}],27:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule LocalEventTrapMixin + */ + +'use strict'; + +var ReactBrowserEventEmitter = _dereq_(33); + +var accumulateInto = _dereq_(118); +var forEachAccumulated = _dereq_(135); +var invariant = _dereq_(150); + +function remove(event) { + event.remove(); +} + +var LocalEventTrapMixin = { + trapBubbledEvent:function(topLevelType, handlerBaseName) { + ("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted())); + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + var node = this.getDOMNode(); + ("production" !== "development" ? invariant( + node, + 'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.' + ) : invariant(node)); + var listener = ReactBrowserEventEmitter.trapBubbledEvent( + topLevelType, + handlerBaseName, + node + ); + this._localEventListeners = + accumulateInto(this._localEventListeners, listener); + }, + + // trapCapturedEvent would look nearly identical. We don't implement that + // method because it isn't currently needed. + + componentWillUnmount:function() { + if (this._localEventListeners) { + forEachAccumulated(this._localEventListeners, remove); + } + } +}; + +module.exports = LocalEventTrapMixin; + +},{"118":118,"135":135,"150":150,"33":33}],28:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule MobileSafariClickEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(16); + +var emptyFunction = _dereq_(129); + +var topLevelTypes = EventConstants.topLevelTypes; + +/** + * Mobile Safari does not fire properly bubble click events on non-interactive + * elements, which means delegated click listeners do not fire. The workaround + * for this bug involves attaching an empty click listener on the target node. + * + * This particular plugin works around the bug by attaching an empty click + * listener on `touchstart` (which does fire on every element). + */ +var MobileSafariClickEventPlugin = { + + eventTypes: null, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + if (topLevelType === topLevelTypes.topTouchStart) { + var target = nativeEvent.target; + if (target && !target.onclick) { + target.onclick = emptyFunction; + } + } + } + +}; + +module.exports = MobileSafariClickEventPlugin; + +},{"129":129,"16":16}],29:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Object.assign + */ + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign + +'use strict'; + +function assign(target, sources) { + if (target == null) { + throw new TypeError('Object.assign target cannot be null or undefined'); + } + + var to = Object(target); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { + var nextSource = arguments[nextIndex]; + if (nextSource == null) { + continue; + } + + var from = Object(nextSource); + + // We don't currently support accessors nor proxies. Therefore this + // copy cannot throw. If we ever supported this then we must handle + // exceptions and side-effects. We don't support symbols so they won't + // be transferred. + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + } + + return to; +} + +module.exports = assign; + +},{}],30:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule PooledClass + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function(a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function(a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4, a5); + return instance; + } else { + return new Klass(a1, a2, a3, a4, a5); + } +}; + +var standardReleaser = function(instance) { + var Klass = this; + ("production" !== "development" ? invariant( + instance instanceof Klass, + 'Trying to release an instance into a pool of a different type.' + ) : invariant(instance instanceof Klass)); + if (instance.destructor) { + instance.destructor(); + } + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances (optional). + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function(CopyConstructor, pooler) { + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fiveArgumentPooler: fiveArgumentPooler +}; + +module.exports = PooledClass; + +},{"150":150}],31:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule React + */ + +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + +'use strict'; + +var EventPluginUtils = _dereq_(20); +var ReactChildren = _dereq_(37); +var ReactComponent = _dereq_(39); +var ReactClass = _dereq_(38); +var ReactContext = _dereq_(44); +var ReactCurrentOwner = _dereq_(45); +var ReactElement = _dereq_(63); +var ReactElementValidator = _dereq_(64); +var ReactDOM = _dereq_(46); +var ReactDOMTextComponent = _dereq_(57); +var ReactDefaultInjection = _dereq_(60); +var ReactInstanceHandles = _dereq_(72); +var ReactMount = _dereq_(77); +var ReactPerf = _dereq_(82); +var ReactPropTypes = _dereq_(86); +var ReactReconciler = _dereq_(89); +var ReactServerRendering = _dereq_(92); + +var assign = _dereq_(29); +var findDOMNode = _dereq_(132); +var onlyChild = _dereq_(160); + +ReactDefaultInjection.inject(); + +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; + +if ("production" !== "development") { + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} + +var render = ReactPerf.measure('React', 'render', ReactMount.render); + +var React = { + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + only: onlyChild + }, + Component: ReactComponent, + DOM: ReactDOM, + PropTypes: ReactPropTypes, + initializeTouchEvents: function(shouldUseTouch) { + EventPluginUtils.useTouchEvents = shouldUseTouch; + }, + createClass: ReactClass.createClass, + createElement: createElement, + cloneElement: cloneElement, + createFactory: createFactory, + createMixin: function(mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + constructAndRenderComponent: ReactMount.constructAndRenderComponent, + constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, + findDOMNode: findDOMNode, + render: render, + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + isValidElement: ReactElement.isValidElement, + withContext: ReactContext.withContext, + + // Hook for JSX spread, don't use this for anything else. + __spread: assign +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + CurrentOwner: ReactCurrentOwner, + InstanceHandles: ReactInstanceHandles, + Mount: ReactMount, + Reconciler: ReactReconciler, + TextComponent: ReactDOMTextComponent + }); +} + +if ("production" !== "development") { + var ExecutionEnvironment = _dereq_(22); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // If we're in Chrome, look for the devtools marker and provide a download + // link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'http://fb.me/react-devtools' + ); + } + } + + var expectedFeatures = [ + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.split, + String.prototype.trim, + + // shams + Object.create, + Object.freeze + ]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + console.error( + 'One or more ES5 shim/shams expected by React are not available: ' + + 'http://fb.me/react-warning-polyfills' + ); + break; + } + } + } +} + +React.version = '0.13.0'; + +module.exports = React; + +},{"132":132,"160":160,"20":20,"22":22,"29":29,"37":37,"38":38,"39":39,"44":44,"45":45,"46":46,"57":57,"60":60,"63":63,"64":64,"72":72,"77":77,"82":82,"86":86,"89":89,"92":92}],32:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactBrowserComponentMixin + */ + +'use strict'; + +var findDOMNode = _dereq_(132); + +var ReactBrowserComponentMixin = { + /** + * Returns the DOM node rendered by this component. + * + * @return {DOMElement} The root node of this component. + * @final + * @protected + */ + getDOMNode: function() { + return findDOMNode(this); + } +}; + +module.exports = ReactBrowserComponentMixin; + +},{"132":132}],33:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactBrowserEventEmitter + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPluginHub = _dereq_(18); +var EventPluginRegistry = _dereq_(19); +var ReactEventEmitterMixin = _dereq_(67); +var ViewportMetrics = _dereq_(117); + +var assign = _dereq_(29); +var isEventSupported = _dereq_(151); + +/** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + +var alreadyListeningTo = {}; +var isMonitoringScrollValue = false; +var reactTopListenersCounter = 0; + +// For events like 'submit' which don't consistently bubble (which we trap at a +// lower node than `document`), binding at `document` would cause duplicate +// events so we don't include them here +var topEventMapping = { + topBlur: 'blur', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topScroll: 'scroll', + topSelectionChange: 'selectionchange', + topTextInput: 'textInput', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topWheel: 'wheel' +}; + +/** + * To ensure no conflicts with other potential React instances on the page + */ +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + +function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; +} + +/** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ +var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { + + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function(ReactEventListener) { + ReactEventListener.setHandleTopLevel( + ReactBrowserEventEmitter.handleTopLevel + ); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function(enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function() { + return !!( + (ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()) + ); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function(registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry. + registrationNameDependencies[registrationName]; + + var topLevelTypes = EventConstants.topLevelTypes; + for (var i = 0, l = dependencies.length; i < l; i++) { + var dependency = dependencies[i]; + if (!( + (isListening.hasOwnProperty(dependency) && isListening[dependency]) + )) { + if (dependency === topLevelTypes.topWheel) { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'wheel', + mountAt + ); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'mousewheel', + mountAt + ); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'DOMMouseScroll', + mountAt + ); + } + } else if (dependency === topLevelTypes.topScroll) { + + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topScroll, + 'scroll', + mountAt + ); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topScroll, + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE + ); + } + } else if (dependency === topLevelTypes.topFocus || + dependency === topLevelTypes.topBlur) { + + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topFocus, + 'focus', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topBlur, + 'blur', + mountAt + ); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topFocus, + 'focusin', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topBlur, + 'focusout', + mountAt + ); + } + + // to make sure blur and focus event listeners are only attached once + isListening[topLevelTypes.topBlur] = true; + isListening[topLevelTypes.topFocus] = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt + ); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle + ); + }, + + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle + ); + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function() { + if (!isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + }, + + eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs, + + registrationNameModules: EventPluginHub.registrationNameModules, + + putListener: EventPluginHub.putListener, + + getListener: EventPluginHub.getListener, + + deleteListener: EventPluginHub.deleteListener, + + deleteAllListeners: EventPluginHub.deleteAllListeners + +}); + +module.exports = ReactBrowserEventEmitter; + +},{"117":117,"151":151,"16":16,"18":18,"19":19,"29":29,"67":67}],34:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * @providesModule ReactCSSTransitionGroup + */ + +'use strict'; + +var React = _dereq_(31); + +var assign = _dereq_(29); + +var ReactTransitionGroup = React.createFactory( + _dereq_(98) +); +var ReactCSSTransitionGroupChild = React.createFactory( + _dereq_(35) +); + +var ReactCSSTransitionGroup = React.createClass({ + displayName: 'ReactCSSTransitionGroup', + + propTypes: { + transitionName: React.PropTypes.string.isRequired, + transitionAppear: React.PropTypes.bool, + transitionEnter: React.PropTypes.bool, + transitionLeave: React.PropTypes.bool + }, + + getDefaultProps: function() { + return { + transitionAppear: false, + transitionEnter: true, + transitionLeave: true + }; + }, + + _wrapChild: function(child) { + // We need to provide this childFactory so that + // ReactCSSTransitionGroupChild can receive updates to name, enter, and + // leave while it is leaving. + return ReactCSSTransitionGroupChild( + { + name: this.props.transitionName, + appear: this.props.transitionAppear, + enter: this.props.transitionEnter, + leave: this.props.transitionLeave + }, + child + ); + }, + + render: function() { + return ( + ReactTransitionGroup( + assign({}, this.props, {childFactory: this._wrapChild}) + ) + ); + } +}); + +module.exports = ReactCSSTransitionGroup; + +},{"29":29,"31":31,"35":35,"98":98}],35:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks + * @providesModule ReactCSSTransitionGroupChild + */ + +'use strict'; + +var React = _dereq_(31); + +var CSSCore = _dereq_(4); +var ReactTransitionEvents = _dereq_(97); + +var onlyChild = _dereq_(160); +var warning = _dereq_(171); + +// We don't remove the element from the DOM until we receive an animationend or +// transitionend event. If the user screws up and forgets to add an animation +// their node will be stuck in the DOM forever, so we detect if an animation +// does not start and if it doesn't, we just call the end listener immediately. +var TICK = 17; +var NO_EVENT_TIMEOUT = 5000; + +var noEventListener = null; + + +if ("production" !== "development") { + noEventListener = function() { + ("production" !== "development" ? warning( + false, + 'transition(): tried to perform an animation without ' + + 'an animationend or transitionend event after timeout (' + + '%sms). You should either disable this ' + + 'transition in JS or add a CSS animation/transition.', + NO_EVENT_TIMEOUT + ) : null); + }; +} + +var ReactCSSTransitionGroupChild = React.createClass({ + displayName: 'ReactCSSTransitionGroupChild', + + transition: function(animationType, finishCallback) { + var node = this.getDOMNode(); + var className = this.props.name + '-' + animationType; + var activeClassName = className + '-active'; + var noEventTimeout = null; + + var endListener = function(e) { + if (e && e.target !== node) { + return; + } + if ("production" !== "development") { + clearTimeout(noEventTimeout); + } + + CSSCore.removeClass(node, className); + CSSCore.removeClass(node, activeClassName); + + ReactTransitionEvents.removeEndEventListener(node, endListener); + + // Usually this optional callback is used for informing an owner of + // a leave animation and telling it to remove the child. + if (finishCallback) { + finishCallback(); + } + }; + + ReactTransitionEvents.addEndEventListener(node, endListener); + + CSSCore.addClass(node, className); + + // Need to do this to actually trigger a transition. + this.queueClass(activeClassName); + + if ("production" !== "development") { + noEventTimeout = setTimeout(noEventListener, NO_EVENT_TIMEOUT); + } + }, + + queueClass: function(className) { + this.classNameQueue.push(className); + + if (!this.timeout) { + this.timeout = setTimeout(this.flushClassNameQueue, TICK); + } + }, + + flushClassNameQueue: function() { + if (this.isMounted()) { + this.classNameQueue.forEach( + CSSCore.addClass.bind(CSSCore, this.getDOMNode()) + ); + } + this.classNameQueue.length = 0; + this.timeout = null; + }, + + componentWillMount: function() { + this.classNameQueue = []; + }, + + componentWillUnmount: function() { + if (this.timeout) { + clearTimeout(this.timeout); + } + }, + + componentWillAppear: function(done) { + if (this.props.appear) { + this.transition('appear', done); + } else { + done(); + } + }, + + componentWillEnter: function(done) { + if (this.props.enter) { + this.transition('enter', done); + } else { + done(); + } + }, + + componentWillLeave: function(done) { + if (this.props.leave) { + this.transition('leave', done); + } else { + done(); + } + }, + + render: function() { + return onlyChild(this.props.children); + } +}); + +module.exports = ReactCSSTransitionGroupChild; + +},{"160":160,"171":171,"31":31,"4":4,"97":97}],36:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactChildReconciler + * @typechecks static-only + */ + +'use strict'; + +var ReactReconciler = _dereq_(89); + +var flattenChildren = _dereq_(133); +var instantiateReactComponent = _dereq_(149); +var shouldUpdateReactComponent = _dereq_(167); + +/** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ +var ReactChildReconciler = { + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function(nestedChildNodes, transaction, context) { + var children = flattenChildren(nestedChildNodes); + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + // The rendered children must be turned into instances as they're + // mounted. + var childInstance = instantiateReactComponent(child, null); + children[name] = childInstance; + } + } + return children; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextNestedChildNodes Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function( + prevChildren, + nextNestedChildNodes, + transaction, + context) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + var nextChildren = flattenChildren(nextNestedChildNodes); + if (!nextChildren && !prevChildren) { + return null; + } + var name; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent( + prevChild, nextElement, transaction, context + ); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + ReactReconciler.unmountComponent(prevChild, name); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent( + nextElement, + null + ); + nextChildren[name] = nextChildInstance; + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && + !(nextChildren && nextChildren.hasOwnProperty(name))) { + ReactReconciler.unmountComponent(prevChildren[name]); + } + } + return nextChildren; + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function(renderedChildren) { + for (var name in renderedChildren) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild); + } + } + +}; + +module.exports = ReactChildReconciler; + +},{"133":133,"149":149,"167":167,"89":89}],37:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactChildren + */ + +'use strict'; + +var PooledClass = _dereq_(30); +var ReactFragment = _dereq_(69); + +var traverseAllChildren = _dereq_(169); +var warning = _dereq_(171); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var threeArgumentPooler = PooledClass.threeArgumentPooler; + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.forEachFunction = forEachFunction; + this.forEachContext = forEachContext; +} +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(traverseContext, child, name, i) { + var forEachBookKeeping = traverseContext; + forEachBookKeeping.forEachFunction.call( + forEachBookKeeping.forEachContext, child, i); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc. + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = + ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, mapFunction, mapContext) { + this.mapResult = mapResult; + this.mapFunction = mapFunction; + this.mapContext = mapContext; +} +PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler); + +function mapSingleChildIntoContext(traverseContext, child, name, i) { + var mapBookKeeping = traverseContext; + var mapResult = mapBookKeeping.mapResult; + + var keyUnique = !mapResult.hasOwnProperty(name); + if ("production" !== "development") { + ("production" !== "development" ? warning( + keyUnique, + 'ReactChildren.map(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.', + name + ) : null); + } + + if (keyUnique) { + var mappedChild = + mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); + mapResult[name] = mappedChild; + } +} + +/** + * Maps children that are typically specified as `props.children`. + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * TODO: This may likely break any calls to `ReactChildren.map` that were + * previously relying on the fact that we guarded against null children. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} mapFunction. + * @param {*} mapContext Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var mapResult = {}; + var traverseContext = MapBookKeeping.getPooled(mapResult, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); + return ReactFragment.create(mapResult); +} + +function forEachSingleChildDummy(traverseContext, child, name, i) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + count: countChildren +}; + +module.exports = ReactChildren; + +},{"169":169,"171":171,"30":30,"69":69}],38:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactClass + */ + +'use strict'; + +var ReactComponent = _dereq_(39); +var ReactCurrentOwner = _dereq_(45); +var ReactElement = _dereq_(63); +var ReactErrorUtils = _dereq_(66); +var ReactInstanceMap = _dereq_(73); +var ReactLifeCycle = _dereq_(74); +var ReactPropTypeLocations = _dereq_(85); +var ReactPropTypeLocationNames = _dereq_(84); +var ReactUpdateQueue = _dereq_(99); + +var assign = _dereq_(29); +var invariant = _dereq_(150); +var keyMirror = _dereq_(156); +var keyOf = _dereq_(157); +var warning = _dereq_(171); + +var MIXINS_KEY = keyOf({mixins: null}); + +/** + * Policies that describe methods in `ReactClassInterface`. + */ +var SpecPolicy = keyMirror({ + /** + * These methods may be defined only once by the class specification or mixin. + */ + DEFINE_ONCE: null, + /** + * These methods may be defined by both the class specification and mixins. + * Subsequent definitions will be chained. These methods must return void. + */ + DEFINE_MANY: null, + /** + * These methods are overriding the base class. + */ + OVERRIDE_BASE: null, + /** + * These methods are similar to DEFINE_MANY, except we assume they return + * objects. We try to merge the keys of the return values of all the mixed in + * functions. If there is a key conflict we throw. + */ + DEFINE_MANY_MERGED: null +}); + + +var injectedMixins = []; + +/** + * Composite components are higher-level components that compose other composite + * or native components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ +var ReactClassInterface = { + + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: SpecPolicy.DEFINE_MANY, + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: SpecPolicy.DEFINE_MANY, + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: SpecPolicy.DEFINE_MANY, + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: SpecPolicy.DEFINE_MANY, + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: SpecPolicy.DEFINE_MANY, + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * @return {object} + * @optional + */ + getChildContext: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: SpecPolicy.DEFINE_ONCE, + + + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: SpecPolicy.DEFINE_MANY, + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: SpecPolicy.DEFINE_MANY, + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: SpecPolicy.DEFINE_ONCE, + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: SpecPolicy.DEFINE_MANY, + + + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: SpecPolicy.OVERRIDE_BASE + +}; + +/** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ +var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + childContextTypes, + ReactPropTypeLocations.childContext + ); + } + Constructor.childContextTypes = assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + contextTypes, + ReactPropTypeLocations.context + ); + } + Constructor.contextTypes = assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + propTypes, + ReactPropTypeLocations.prop + ); + } + Constructor.propTypes = assign( + {}, + Constructor.propTypes, + propTypes + ); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + } +}; + +function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but not in __DEV__ + ("production" !== "development" ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ) : null); + } + } +} + +function validateMethodOverride(proto, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? + ReactClassInterface[name] : + null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + ("production" !== "development" ? invariant( + specPolicy === SpecPolicy.OVERRIDE_BASE, + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE)); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (proto.hasOwnProperty(name)) { + ("production" !== "development" ? invariant( + specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED, + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED)); + } +} + +/** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classses. + */ +function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + return; + } + + ("production" !== "development" ? invariant( + typeof spec !== 'function', + 'ReactClass: You\'re attempting to ' + + 'use a component class as a mixin. Instead, just use a regular object.' + ) : invariant(typeof spec !== 'function')); + ("production" !== "development" ? invariant( + !ReactElement.isValidElement(spec), + 'ReactClass: You\'re attempting to ' + + 'use a component as a mixin. Instead, just use a regular object.' + ) : invariant(!ReactElement.isValidElement(spec))); + + var proto = Constructor.prototype; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above + continue; + } + + var property = spec[name]; + validateMethodOverride(proto, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = + ReactClassInterface.hasOwnProperty(name); + var isAlreadyDefined = proto.hasOwnProperty(name); + var markedDontBind = property && property.__reactDontBind; + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + !markedDontBind; + + if (shouldAutoBind) { + if (!proto.__reactAutoBindMap) { + proto.__reactAutoBindMap = {}; + } + proto.__reactAutoBindMap[name] = property; + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride + ("production" !== "development" ? invariant( + isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ) : invariant(isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ))); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === SpecPolicy.DEFINE_MANY) { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if ("production" !== "development") { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } +} + +function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + ("production" !== "development" ? invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ) : invariant(!isReserved)); + + var isInherited = name in Constructor; + ("production" !== "development" ? invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ) : invariant(!isInherited)); + Constructor[name] = property; + } +} + +/** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ +function mergeIntoWithNoDuplicateKeys(one, two) { + ("production" !== "development" ? invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ) : invariant(one && two && typeof one === 'object' && typeof two === 'object')); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + ("production" !== "development" ? invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ) : invariant(one[key] === undefined)); + one[key] = two[key]; + } + } + return one; +} + +/** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; +} + +/** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; +} + +/** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ +function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if ("production" !== "development") { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + /* eslint-disable block-scoped-var, no-undef */ + boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + ("production" !== "development" ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ) : null); + } else if (!args.length) { + ("production" !== "development" ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ) : null); + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + /* eslint-enable */ + }; + } + return boundMethod; +} + +/** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ +function bindAutoBindMethods(component) { + for (var autoBindKey in component.__reactAutoBindMap) { + if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { + var method = component.__reactAutoBindMap[autoBindKey]; + component[autoBindKey] = bindAutoBindMethod( + component, + ReactErrorUtils.guard( + method, + component.constructor.displayName + '.' + autoBindKey + ) + ); + } + } +} + +var typeDeprecationDescriptor = { + enumerable: false, + get: function() { + var displayName = this.displayName || this.name || 'Component'; + ("production" !== "development" ? warning( + false, + '%s.type is deprecated. Use %s directly to access the class.', + displayName, + displayName + ) : null); + Object.defineProperty(this, 'type', { + value: this + }); + return this; + } +}; + +/** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ +var ReactClassMixin = { + + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + ReactUpdateQueue.enqueueReplaceState(this, newState); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if ("production" !== "development") { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + ("production" !== "development" ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(this); + return ( + internalInstance && + internalInstance !== ReactLifeCycle.currentlyMountingInstance + ); + }, + + /** + * Sets a subset of the props. + * + * @param {object} partialProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @public + * @deprecated + */ + setProps: function(partialProps, callback) { + ReactUpdateQueue.enqueueSetProps(this, partialProps); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + }, + + /** + * Replace all the props. + * + * @param {object} newProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @public + * @deprecated + */ + replaceProps: function(newProps, callback) { + ReactUpdateQueue.enqueueReplaceProps(this, newProps); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + } +}; + +var ReactClassComponent = function() {}; +assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin +); + +/** + * Module for creating composite components. + * + * @class ReactClass + */ +var ReactClass = { + + /** + * Creates a composite component class given a class specification. + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function(spec) { + var Constructor = function(props, context) { + // This constructor is overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if ("production" !== "development") { + ("production" !== "development" ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: http://fb.me/react-legacyfactory' + ) : null); + } + + // Wire up auto-binding + if (this.__reactAutoBindMap) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if ("production" !== "development") { + // We allow auto-mocks to proceed as if they're returning null. + if (typeof initialState === 'undefined' && + this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + ("production" !== "development" ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + + this.state = initialState; + }; + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + + injectedMixins.forEach( + mixSpecIntoComponent.bind(null, Constructor) + ); + + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if ("production" !== "development") { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + ("production" !== "development" ? invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ) : invariant(Constructor.prototype.render)); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ) : null); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + // Legacy hook + Constructor.type = Constructor; + if ("production" !== "development") { + try { + Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + } + + return Constructor; + }, + + injection: { + injectMixin: function(mixin) { + injectedMixins.push(mixin); + } + } + +}; + +module.exports = ReactClass; + +},{"150":150,"156":156,"157":157,"171":171,"29":29,"39":39,"45":45,"63":63,"66":66,"73":73,"74":74,"84":84,"85":85,"99":99}],39:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponent + */ + +'use strict'; + +var ReactUpdateQueue = _dereq_(99); + +var invariant = _dereq_(150); +var warning = _dereq_(171); + +/** + * Base class helpers for the updating state of a component. + */ +function ReactComponent(props, context) { + this.props = props; + this.context = context; +} + +/** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ +ReactComponent.prototype.setState = function(partialState, callback) { + ("production" !== "development" ? invariant( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null, + 'setState(...): takes an object of state variables to update or a ' + + 'function which returns an object of state variables.' + ) : invariant(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null)); + if ("production" !== "development") { + ("production" !== "development" ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().' + ) : null); + } + ReactUpdateQueue.enqueueSetState(this, partialState); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } +}; + +/** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ +ReactComponent.prototype.forceUpdate = function(callback) { + ReactUpdateQueue.enqueueForceUpdate(this); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } +}; + +/** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ +if ("production" !== "development") { + var deprecatedAPIs = { + getDOMNode: 'getDOMNode', + isMounted: 'isMounted', + replaceProps: 'replaceProps', + replaceState: 'replaceState', + setProps: 'setProps' + }; + var defineDeprecationWarning = function(methodName, displayName) { + try { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function() { + ("production" !== "development" ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes.', + displayName + ) : null); + return undefined; + } + }); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } +} + +module.exports = ReactComponent; + +},{"150":150,"171":171,"99":99}],40:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentBrowserEnvironment + */ + +/*jslint evil: true */ + +'use strict'; + +var ReactDOMIDOperations = _dereq_(50); +var ReactMount = _dereq_(77); + +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + + processChildrenUpdates: + ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkupByID: + ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, + + /** + * If a particular environment requires that some resources be cleaned up, + * specify this in the injected Mixin. In the DOM, we would likely want to + * purge any cached node ID lookups. + * + * @private + */ + unmountIDFromEnvironment: function(rootNodeID) { + ReactMount.purgeID(rootNodeID); + } + +}; + +module.exports = ReactComponentBrowserEnvironment; + +},{"50":50,"77":77}],41:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentEnvironment + */ + +'use strict'; + +var invariant = _dereq_(150); + +var injected = false; + +var ReactComponentEnvironment = { + + /** + * Optionally injectable environment dependent cleanup hook. (server vs. + * browser etc). Example: A browser system caches DOM nodes based on component + * ID and must remove that cache entry when this instance is unmounted. + */ + unmountIDFromEnvironment: null, + + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkupByID: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function(environment) { + ("production" !== "development" ? invariant( + !injected, + 'ReactCompositeComponent: injectEnvironment() can only be called once.' + ) : invariant(!injected)); + ReactComponentEnvironment.unmountIDFromEnvironment = + environment.unmountIDFromEnvironment; + ReactComponentEnvironment.replaceNodeWithMarkupByID = + environment.replaceNodeWithMarkupByID; + ReactComponentEnvironment.processChildrenUpdates = + environment.processChildrenUpdates; + injected = true; + } + } + +}; + +module.exports = ReactComponentEnvironment; + +},{"150":150}],42:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * +* @providesModule ReactComponentWithPureRenderMixin +*/ + +'use strict'; + +var shallowEqual = _dereq_(166); + +/** + * If your React component's render function is "pure", e.g. it will render the + * same result given the same props and state, provide this Mixin for a + * considerable performance boost. + * + * Most React components have pure render functions. + * + * Example: + * + * var ReactComponentWithPureRenderMixin = + * require('ReactComponentWithPureRenderMixin'); + * React.createClass({ + * mixins: [ReactComponentWithPureRenderMixin], + * + * render: function() { + * return <div className={this.props.className}>foo</div>; + * } + * }); + * + * Note: This only checks shallow equality for props and state. If these contain + * complex data structures this mixin may have false-negatives for deeper + * differences. Only mixin to components which have simple props and state, or + * use `forceUpdate()` when you know deep data structures have changed. + */ +var ReactComponentWithPureRenderMixin = { + shouldComponentUpdate: function(nextProps, nextState) { + return !shallowEqual(this.props, nextProps) || + !shallowEqual(this.state, nextState); + } +}; + +module.exports = ReactComponentWithPureRenderMixin; + +},{"166":166}],43:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactCompositeComponent + */ + +'use strict'; + +var ReactComponentEnvironment = _dereq_(41); +var ReactContext = _dereq_(44); +var ReactCurrentOwner = _dereq_(45); +var ReactElement = _dereq_(63); +var ReactElementValidator = _dereq_(64); +var ReactInstanceMap = _dereq_(73); +var ReactLifeCycle = _dereq_(74); +var ReactNativeComponent = _dereq_(80); +var ReactPerf = _dereq_(82); +var ReactPropTypeLocations = _dereq_(85); +var ReactPropTypeLocationNames = _dereq_(84); +var ReactReconciler = _dereq_(89); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); +var emptyObject = _dereq_(130); +var invariant = _dereq_(150); +var shouldUpdateReactComponent = _dereq_(167); +var warning = _dereq_(171); + +function getDeclarationErrorAddendum(component) { + var owner = component._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + +/** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ +var nextMountID = 1; + +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponentMixin = { + + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function(element) { + this._currentElement = element; + this._rootNodeID = null; + this._instance = null; + + // See ReactUpdateQueue + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedComponent = null; + + this._context = null; + this._mountOrder = 0; + this._isTopLevel = false; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function(rootID, transaction, context) { + this._context = context; + this._mountOrder = nextMountID++; + this._rootNodeID = rootID; + + var publicProps = this._processProps(this._currentElement.props); + var publicContext = this._processContext(this._currentElement._context); + + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + + // Initialize the public class + var inst = new Component(publicProps, publicContext); + + if ("production" !== "development") { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + ("production" !== "development" ? warning( + inst.render != null, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render` in your ' + + 'component or you may have accidentally tried to render an element ' + + 'whose type is a function that isn\'t a React component.', + Component.displayName || Component.name || 'Component' + ) : null); + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if ("production" !== "development") { + this._warnIfContextsDiffer(this._currentElement._context, context); + } + + if ("production" !== "development") { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + ("production" !== "development" ? warning( + !inst.getInitialState || + inst.getInitialState.isReactClassApproved, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + !inst.propTypes, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + !inst.contextTypes, + 'contextTypes was defined as an instance property on %s. Use a ' + + 'static property to define contextTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + typeof inst.componentShouldUpdate !== 'function', + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + (this.getName() || 'A component') + ) : null); + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + ("production" !== "development" ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.state: must be set to an object or null', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var renderedElement; + + var previouslyMounting = ReactLifeCycle.currentlyMountingInstance; + ReactLifeCycle.currentlyMountingInstance = this; + try { + if (inst.componentWillMount) { + inst.componentWillMount(); + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + renderedElement = this._renderValidatedComponent(); + } finally { + ReactLifeCycle.currentlyMountingInstance = previouslyMounting; + } + + this._renderedComponent = this._instantiateReactComponent( + renderedElement, + this._currentElement.type // The wrapping type + ); + + var markup = ReactReconciler.mountComponent( + this._renderedComponent, + rootID, + transaction, + this._processChildContext(context) + ); + if (inst.componentDidMount) { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + + return markup; + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function() { + var inst = this._instance; + + if (inst.componentWillUnmount) { + var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance; + ReactLifeCycle.currentlyUnmountingInstance = this; + try { + inst.componentWillUnmount(); + } finally { + ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting; + } + } + + ReactReconciler.unmountComponent(this._renderedComponent); + this._renderedComponent = null; + + // Reset pending fields + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Schedule a partial update to the props. Only used for internal testing. + * + * @param {object} partialProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @internal + */ + _setPropsInternal: function(partialProps, callback) { + // This is a deoptimized path. We optimize for always having an element. + // This creates an extra internal element. + var element = this._pendingElement || this._currentElement; + this._pendingElement = ReactElement.cloneAndReplaceProps( + element, + assign({}, element.props, partialProps) + ); + ReactUpdates.enqueueUpdate(this, callback); + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function(context) { + var maskedContext = null; + // This really should be getting the component class for the element, + // but we know that we're not going to need it for built-ins. + if (typeof this._currentElement.type === 'string') { + return emptyObject; + } + var contextTypes = this._currentElement.type.contextTypes; + if (!contextTypes) { + return emptyObject; + } + maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function(context) { + var maskedContext = this._maskContext(context); + if ("production" !== "development") { + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + if (Component.contextTypes) { + this._checkPropTypes( + Component.contextTypes, + maskedContext, + ReactPropTypeLocations.context + ); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function(currentContext) { + var inst = this._instance; + var childContext = inst.getChildContext && inst.getChildContext(); + if (childContext) { + ("production" !== "development" ? invariant( + typeof inst.constructor.childContextTypes === 'object', + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof inst.constructor.childContextTypes === 'object')); + if ("production" !== "development") { + this._checkPropTypes( + inst.constructor.childContextTypes, + childContext, + ReactPropTypeLocations.childContext + ); + } + for (var name in childContext) { + ("production" !== "development" ? invariant( + name in inst.constructor.childContextTypes, + '%s.getChildContext(): key "%s" is not defined in childContextTypes.', + this.getName() || 'ReactCompositeComponent', + name + ) : invariant(name in inst.constructor.childContextTypes)); + } + return assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Processes props by setting default values for unspecified props and + * asserting that the props are valid. Does not mutate its argument; returns + * a new props object with defaults merged in. + * + * @param {object} newProps + * @return {object} + * @private + */ + _processProps: function(newProps) { + if ("production" !== "development") { + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + if (Component.propTypes) { + this._checkPropTypes( + Component.propTypes, + newProps, + ReactPropTypeLocations.prop + ); + } + } + return newProps; + }, + + /** + * Assert that the props are valid + * + * @param {object} propTypes Map of prop name to a ReactPropType + * @param {object} props + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkPropTypes: function(propTypes, props, location) { + // TODO: Stop validating prop types here and only use the element + // validation. + var componentName = this.getName(); + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error; + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + ("production" !== "development" ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually ' + + 'from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); + error = propTypes[propName](props, propName, componentName, location); + } catch (ex) { + error = ex; + } + if (error instanceof Error) { + // We may want to extend this logic for similar errors in + // React.render calls, so I'm abstracting it away into + // a function to minimize refactoring in the future + var addendum = getDeclarationErrorAddendum(this); + + if (location === ReactPropTypeLocations.prop) { + // Preface gives us something to blacklist in warning module + ("production" !== "development" ? warning( + false, + 'Failed Composite propType: %s%s', + error.message, + addendum + ) : null); + } else { + ("production" !== "development" ? warning( + false, + 'Failed Context Types: %s%s', + error.message, + addendum + ) : null); + } + } + } + } + }, + + receiveComponent: function(nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent( + transaction, + prevElement, + nextElement, + prevContext, + nextContext + ); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function(transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent( + this, + this._pendingElement || this._currentElement, + transaction, + this._context + ); + } + + if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps( + this._currentElement + ); + } + + this.updateComponent( + transaction, + this._currentElement, + this._currentElement, + this._context, + this._context + ); + } + }, + + /** + * Compare two contexts, warning if they are different + * TODO: Remove this check when owner-context is removed + */ + _warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) { + ownerBasedContext = this._maskContext(ownerBasedContext); + parentBasedContext = this._maskContext(parentBasedContext); + var parentKeys = Object.keys(parentBasedContext).sort(); + var displayName = this.getName() || 'ReactCompositeComponent'; + for (var i = 0; i < parentKeys.length; i++) { + var key = parentKeys[i]; + ("production" !== "development" ? warning( + ownerBasedContext[key] === parentBasedContext[key], + 'owner-based and parent-based contexts differ ' + + '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + + '(see: http://fb.me/react-context-by-parent)', + ownerBasedContext[key], + parentBasedContext[key], + key, + displayName + ) : null); + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function( + transaction, + prevParentElement, + nextParentElement, + prevUnmaskedContext, + nextUnmaskedContext + ) { + var inst = this._instance; + + var nextContext = inst.context; + var nextProps = inst.props; + + // Distinguish between a props update versus a simple state update + if (prevParentElement !== nextParentElement) { + nextContext = this._processContext(nextParentElement._context); + nextProps = this._processProps(nextParentElement.props); + + if ("production" !== "development") { + if (nextUnmaskedContext != null) { + this._warnIfContextsDiffer( + nextParentElement._context, + nextUnmaskedContext + ); + } + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + + if (inst.componentWillReceiveProps) { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + + var shouldUpdate = + this._pendingForceUpdate || + !inst.shouldComponentUpdate || + inst.shouldComponentUpdate(nextProps, nextState, nextContext); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + typeof shouldUpdate !== 'undefined', + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + this.getName() || 'ReactCompositeComponent' + ) : null); + } + + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate( + nextParentElement, + nextProps, + nextState, + nextContext, + transaction, + nextUnmaskedContext + ); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function(props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + var nextState = assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + assign( + nextState, + typeof partial === 'function' ? + partial.call(inst, nextState, props, context) : + partial + ); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function( + nextElement, + nextProps, + nextState, + nextContext, + transaction, + unmaskedContext + ) { + var inst = this._instance; + + var prevProps = inst.props; + var prevState = inst.state; + var prevContext = inst.context; + + if (inst.componentWillUpdate) { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (inst.componentDidUpdate) { + transaction.getReactMountReady().enqueue( + inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), + inst + ); + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function(transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent( + prevComponentInstance, + nextRenderedElement, + transaction, + this._processChildContext(context) + ); + } else { + // These two IDs are actually the same! But nothing should rely on that. + var thisID = this._rootNodeID; + var prevComponentID = prevComponentInstance._rootNodeID; + ReactReconciler.unmountComponent(prevComponentInstance); + + this._renderedComponent = this._instantiateReactComponent( + nextRenderedElement, + this._currentElement.type + ); + var nextMarkup = ReactReconciler.mountComponent( + this._renderedComponent, + thisID, + transaction, + context + ); + this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup); + } + }, + + /** + * @protected + */ + _replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) { + ReactComponentEnvironment.replaceNodeWithMarkupByID( + prevComponentID, + nextMarkup + ); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function() { + var inst = this._instance; + var renderedComponent = inst.render(); + if ("production" !== "development") { + // We allow auto-mocks to proceed as if they're returning null. + if (typeof renderedComponent === 'undefined' && + inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedComponent = null; + } + } + + return renderedComponent; + }, + + /** + * @private + */ + _renderValidatedComponent: function() { + var renderedComponent; + var previousContext = ReactContext.current; + ReactContext.current = this._processChildContext( + this._currentElement._context + ); + ReactCurrentOwner.current = this; + try { + renderedComponent = + this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactContext.current = previousContext; + ReactCurrentOwner.current = null; + } + ("production" !== "development" ? invariant( + // TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent), + '%s.render(): A valid ReactComponent must be returned. You may have ' + + 'returned undefined, an array or some other invalid object.', + this.getName() || 'ReactCompositeComponent' + ) : invariant(// TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent))); + return renderedComponent; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function(ref, component) { + var inst = this.getPublicInstance(); + var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; + refs[ref] = component.getPublicInstance(); + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function(ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function() { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return ( + type.displayName || (constructor && constructor.displayName) || + type.name || (constructor && constructor.name) || + null + ); + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by React.render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function() { + return this._instance; + }, + + // Stub + _instantiateReactComponent: null + +}; + +ReactPerf.measureMethods( + ReactCompositeComponentMixin, + 'ReactCompositeComponent', + { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent', + _renderValidatedComponent: '_renderValidatedComponent' + } +); + +var ReactCompositeComponent = { + + Mixin: ReactCompositeComponentMixin + +}; + +module.exports = ReactCompositeComponent; + +},{"100":100,"130":130,"150":150,"167":167,"171":171,"29":29,"41":41,"44":44,"45":45,"63":63,"64":64,"73":73,"74":74,"80":80,"82":82,"84":84,"85":85,"89":89}],44:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactContext + */ + +'use strict'; + +var assign = _dereq_(29); +var emptyObject = _dereq_(130); +var warning = _dereq_(171); + +var didWarn = false; + +/** + * Keeps track of the current context. + * + * The context is automatically passed down the component ownership hierarchy + * and is accessible via `this.context` on ReactCompositeComponents. + */ +var ReactContext = { + + /** + * @internal + * @type {object} + */ + current: emptyObject, + + /** + * Temporarily extends the current context while executing scopedCallback. + * + * A typical use case might look like + * + * render: function() { + * var children = ReactContext.withContext({foo: 'foo'}, () => ( + * + * )); + * return <div>{children}</div>; + * } + * + * @param {object} newContext New context to merge into the existing context + * @param {function} scopedCallback Callback to run with the new context + * @return {ReactComponent|array<ReactComponent>} + */ + withContext: function(newContext, scopedCallback) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + didWarn, + 'withContext is deprecated and will be removed in a future version. ' + + 'Use a wrapper component with getChildContext instead.' + ) : null); + + didWarn = true; + } + + var result; + var previousContext = ReactContext.current; + ReactContext.current = assign({}, previousContext, newContext); + try { + result = scopedCallback(); + } finally { + ReactContext.current = previousContext; + } + return result; + } + +}; + +module.exports = ReactContext; + +},{"130":130,"171":171,"29":29}],45:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactCurrentOwner + */ + +'use strict'; + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + * + * The depth indicate how many composite components are above this render level. + */ +var ReactCurrentOwner = { + + /** + * @internal + * @type {ReactComponent} + */ + current: null + +}; + +module.exports = ReactCurrentOwner; + +},{}],46:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOM + * @typechecks static-only + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactElementValidator = _dereq_(64); + +var mapObject = _dereq_(158); + +/** + * Create a factory that creates HTML tag elements. + * + * @param {string} tag Tag name (e.g. `div`). + * @private + */ +function createDOMFactory(tag) { + if ("production" !== "development") { + return ReactElementValidator.createFactory(tag); + } + return ReactElement.createFactory(tag); +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public + */ +var ReactDOM = mapObject({ + a: 'a', + abbr: 'abbr', + address: 'address', + area: 'area', + article: 'article', + aside: 'aside', + audio: 'audio', + b: 'b', + base: 'base', + bdi: 'bdi', + bdo: 'bdo', + big: 'big', + blockquote: 'blockquote', + body: 'body', + br: 'br', + button: 'button', + canvas: 'canvas', + caption: 'caption', + cite: 'cite', + code: 'code', + col: 'col', + colgroup: 'colgroup', + data: 'data', + datalist: 'datalist', + dd: 'dd', + del: 'del', + details: 'details', + dfn: 'dfn', + dialog: 'dialog', + div: 'div', + dl: 'dl', + dt: 'dt', + em: 'em', + embed: 'embed', + fieldset: 'fieldset', + figcaption: 'figcaption', + figure: 'figure', + footer: 'footer', + form: 'form', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + head: 'head', + header: 'header', + hr: 'hr', + html: 'html', + i: 'i', + iframe: 'iframe', + img: 'img', + input: 'input', + ins: 'ins', + kbd: 'kbd', + keygen: 'keygen', + label: 'label', + legend: 'legend', + li: 'li', + link: 'link', + main: 'main', + map: 'map', + mark: 'mark', + menu: 'menu', + menuitem: 'menuitem', + meta: 'meta', + meter: 'meter', + nav: 'nav', + noscript: 'noscript', + object: 'object', + ol: 'ol', + optgroup: 'optgroup', + option: 'option', + output: 'output', + p: 'p', + param: 'param', + picture: 'picture', + pre: 'pre', + progress: 'progress', + q: 'q', + rp: 'rp', + rt: 'rt', + ruby: 'ruby', + s: 's', + samp: 'samp', + script: 'script', + section: 'section', + select: 'select', + small: 'small', + source: 'source', + span: 'span', + strong: 'strong', + style: 'style', + sub: 'sub', + summary: 'summary', + sup: 'sup', + table: 'table', + tbody: 'tbody', + td: 'td', + textarea: 'textarea', + tfoot: 'tfoot', + th: 'th', + thead: 'thead', + time: 'time', + title: 'title', + tr: 'tr', + track: 'track', + u: 'u', + ul: 'ul', + 'var': 'var', + video: 'video', + wbr: 'wbr', + + // SVG + circle: 'circle', + defs: 'defs', + ellipse: 'ellipse', + g: 'g', + line: 'line', + linearGradient: 'linearGradient', + mask: 'mask', + path: 'path', + pattern: 'pattern', + polygon: 'polygon', + polyline: 'polyline', + radialGradient: 'radialGradient', + rect: 'rect', + stop: 'stop', + svg: 'svg', + text: 'text', + tspan: 'tspan' + +}, createDOMFactory); + +module.exports = ReactDOM; + +},{"158":158,"63":63,"64":64}],47:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMButton + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var keyMirror = _dereq_(156); + +var button = ReactElement.createFactory('button'); + +var mouseListenerNames = keyMirror({ + onClick: true, + onDoubleClick: true, + onMouseDown: true, + onMouseMove: true, + onMouseUp: true, + onClickCapture: true, + onDoubleClickCapture: true, + onMouseDownCapture: true, + onMouseMoveCapture: true, + onMouseUpCapture: true +}); + +/** + * Implements a <button> native component that does not receive mouse events + * when `disabled` is set. + */ +var ReactDOMButton = ReactClass.createClass({ + displayName: 'ReactDOMButton', + tagName: 'BUTTON', + + mixins: [AutoFocusMixin, ReactBrowserComponentMixin], + + render: function() { + var props = {}; + + // Copy the props; except the mouse listeners if we're disabled + for (var key in this.props) { + if (this.props.hasOwnProperty(key) && + (!this.props.disabled || !mouseListenerNames[key])) { + props[key] = this.props[key]; + } + } + + return button(props, this.props.children); + } + +}); + +module.exports = ReactDOMButton; + +},{"156":156,"2":2,"32":32,"38":38,"63":63}],48:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMComponent + * @typechecks static-only + */ + +/* global hasOwnProperty:true */ + +'use strict'; + +var CSSPropertyOperations = _dereq_(6); +var DOMProperty = _dereq_(11); +var DOMPropertyOperations = _dereq_(12); +var ReactBrowserEventEmitter = _dereq_(33); +var ReactComponentBrowserEnvironment = + _dereq_(40); +var ReactMount = _dereq_(77); +var ReactMultiChild = _dereq_(78); +var ReactPerf = _dereq_(82); + +var assign = _dereq_(29); +var escapeTextContentForBrowser = _dereq_(131); +var invariant = _dereq_(150); +var isEventSupported = _dereq_(151); +var keyOf = _dereq_(157); +var warning = _dereq_(171); + +var deleteListener = ReactBrowserEventEmitter.deleteListener; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules; + +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = {'string': true, 'number': true}; + +var STYLE = keyOf({style: null}); + +var ELEMENT_NODE_TYPE = 1; + +/** + * Optionally injectable operations for mutating the DOM + */ +var BackendIDOperations = null; + +/** + * @param {?object} props + */ +function assertValidProps(props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (props.dangerouslySetInnerHTML != null) { + ("production" !== "development" ? invariant( + props.children == null, + 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.' + ) : invariant(props.children == null)); + ("production" !== "development" ? invariant( + props.dangerouslySetInnerHTML.__html != null, + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + + 'Please visit http://fb.me/react-invariant-dangerously-set-inner-html ' + + 'for more information.' + ) : invariant(props.dangerouslySetInnerHTML.__html != null)); + } + if ("production" !== "development") { + ("production" !== "development" ? warning( + props.innerHTML == null, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.' + ) : null); + ("production" !== "development" ? warning( + !props.contentEditable || props.children == null, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.' + ) : null); + } + ("production" !== "development" ? invariant( + props.style == null || typeof props.style === 'object', + 'The `style` prop expects a mapping from style properties to values, ' + + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + + 'using JSX.' + ) : invariant(props.style == null || typeof props.style === 'object')); +} + +function putListener(id, registrationName, listener, transaction) { + if ("production" !== "development") { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + ("production" !== "development" ? warning( + registrationName !== 'onScroll' || isEventSupported('scroll', true), + 'This browser doesn\'t support the `onScroll` event' + ) : null); + } + var container = ReactMount.findReactContainerForID(id); + if (container) { + var doc = container.nodeType === ELEMENT_NODE_TYPE ? + container.ownerDocument : + container; + listenTo(registrationName, doc); + } + transaction.getPutListenerQueue().enqueuePutListener( + id, + registrationName, + listener + ); +} + +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special cased tags. + +var omittedCloseTags = { + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true + // NOTE: menuitem's close tag should be omitted, but that causes problems. +}; + +// We accept any tag to be rendered but since this gets injected into abitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name + +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; + +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + ("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag))); + validatedTagCache[tag] = true; + } +} + +/** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ +function ReactDOMComponent(tag) { + validateDangerousTag(tag); + this._tag = tag; + this._renderedChildren = null; + this._previousStyleCopy = null; + this._rootNodeID = null; +} + +ReactDOMComponent.displayName = 'ReactDOMComponent'; + +ReactDOMComponent.Mixin = { + + construct: function(element) { + this._currentElement = element; + }, + + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {string} rootID The root DOM ID for this node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} The computed markup. + */ + mountComponent: function(rootID, transaction, context) { + this._rootNodeID = rootID; + assertValidProps(this._currentElement.props); + var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>'; + return ( + this._createOpenTagMarkupAndPutListeners(transaction) + + this._createContentMarkup(transaction, context) + + closeTag + ); + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function(transaction) { + var props = this._currentElement.props; + var ret = '<' + this._tag; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + putListener(this._rootNodeID, propKey, propValue, transaction); + } else { + if (propKey === STYLE) { + if (propValue) { + propValue = this._previousStyleCopy = assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue); + } + var markup = + DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret + '>'; + } + + var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID); + return ret + ' ' + markupForID + '>'; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function(transaction, context) { + var prefix = ''; + if (this._tag === 'listing' || + this._tag === 'pre' || + this._tag === 'textarea') { + // Add an initial newline because browsers ignore the first newline in + // a <listing>, <pre>, or <textarea> as an "authoring convenience" -- see + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody. + prefix = '\n'; + } + + var props = this._currentElement.props; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + return prefix + innerHTML.__html; + } + } else { + var contentToUse = + CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + return prefix + escapeTextContentForBrowser(contentToUse); + } else if (childrenToUse != null) { + var mountImages = this.mountChildren( + childrenToUse, + transaction, + context + ); + return prefix + mountImages.join(''); + } + } + return prefix; + }, + + receiveComponent: function(nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a native DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function(transaction, prevElement, nextElement, context) { + assertValidProps(this._currentElement.props); + this._updateDOMProperties(prevElement.props, transaction); + this._updateDOMChildren(prevElement.props, transaction, context); + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {ReactReconcileTransaction} transaction + */ + _updateDOMProperties: function(lastProps, transaction) { + var nextProps = this._currentElement.props; + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey)) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + deleteListener(this._rootNodeID, propKey); + } else if ( + DOMProperty.isStandardName[propKey] || + DOMProperty.isCustomAttribute(propKey)) { + BackendIDOperations.deletePropertyByID( + this._rootNodeID, + propKey + ); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? + this._previousStyleCopy : + lastProps[propKey]; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + nextProp = this._previousStyleCopy = assign({}, nextProp); + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && + lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + putListener(this._rootNodeID, propKey, nextProp, transaction); + } else if ( + DOMProperty.isStandardName[propKey] || + DOMProperty.isCustomAttribute(propKey)) { + BackendIDOperations.updatePropertyByID( + this._rootNodeID, + propKey, + nextProp + ); + } + } + if (styleUpdates) { + BackendIDOperations.updateStylesByID( + this._rootNodeID, + styleUpdates + ); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {ReactReconcileTransaction} transaction + */ + _updateDOMChildren: function(lastProps, transaction, context) { + var nextProps = this._currentElement.props; + + var lastContent = + CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = + CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = + lastProps.dangerouslySetInnerHTML && + lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = + nextProps.dangerouslySetInnerHTML && + nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + BackendIDOperations.updateInnerHTMLByID( + this._rootNodeID, + nextHtml + ); + } + } else if (nextChildren != null) { + this.updateChildren(nextChildren, transaction, context); + } + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function() { + this.unmountChildren(); + ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID); + ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); + this._rootNodeID = null; + } + +}; + +ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent' +}); + +assign( + ReactDOMComponent.prototype, + ReactDOMComponent.Mixin, + ReactMultiChild.Mixin +); + +ReactDOMComponent.injection = { + injectIDOperations: function(IDOperations) { + ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations; + } +}; + +module.exports = ReactDOMComponent; + +},{"11":11,"12":12,"131":131,"150":150,"151":151,"157":157,"171":171,"29":29,"33":33,"40":40,"6":6,"77":77,"78":78,"82":82}],49:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMForm + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var LocalEventTrapMixin = _dereq_(27); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var form = ReactElement.createFactory('form'); + +/** + * Since onSubmit doesn't bubble OR capture on the top level in IE8, we need + * to capture it on the <form> element itself. There are lots of hacks we could + * do to accomplish this, but the most reliable is to make <form> a + * composite component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMForm = ReactClass.createClass({ + displayName: 'ReactDOMForm', + tagName: 'FORM', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + // TODO: Instead of using `ReactDOM` directly, we should use JSX. However, + // `jshint` fails to parse JSX so in order for linting to work in the open + // source repo, we need to just use `ReactDOM.form`. + return form(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset'); + this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit'); + } +}); + +module.exports = ReactDOMForm; + +},{"16":16,"27":27,"32":32,"38":38,"63":63}],50:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMIDOperations + * @typechecks static-only + */ + +/*jslint evil: true */ + +'use strict'; + +var CSSPropertyOperations = _dereq_(6); +var DOMChildrenOperations = _dereq_(10); +var DOMPropertyOperations = _dereq_(12); +var ReactMount = _dereq_(77); +var ReactPerf = _dereq_(82); + +var invariant = _dereq_(150); +var setInnerHTML = _dereq_(164); + +/** + * Errors for properties that should not be updated with `updatePropertyById()`. + * + * @type {object} + * @private + */ +var INVALID_PROPERTY_ERRORS = { + dangerouslySetInnerHTML: + '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', + style: '`style` must be set using `updateStylesByID()`.' +}; + +/** + * Operations used to process updates to DOM nodes. This is made injectable via + * `ReactDOMComponent.BackendIDOperations`. + */ +var ReactDOMIDOperations = { + + /** + * Updates a DOM node with new property values. This should only be used to + * update DOM properties in `DOMProperty`. + * + * @param {string} id ID of the node to update. + * @param {string} name A valid property name, see `DOMProperty`. + * @param {*} value New value of the property. + * @internal + */ + updatePropertyByID: function(id, name, value) { + var node = ReactMount.getNode(id); + ("production" !== "development" ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); + + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertantly setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (value != null) { + DOMPropertyOperations.setValueForProperty(node, name, value); + } else { + DOMPropertyOperations.deleteValueForProperty(node, name); + } + }, + + /** + * Updates a DOM node to remove a property. This should only be used to remove + * DOM properties in `DOMProperty`. + * + * @param {string} id ID of the node to update. + * @param {string} name A property name to remove, see `DOMProperty`. + * @internal + */ + deletePropertyByID: function(id, name, value) { + var node = ReactMount.getNode(id); + ("production" !== "development" ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); + DOMPropertyOperations.deleteValueForProperty(node, name, value); + }, + + /** + * Updates a DOM node with new style values. If a value is specified as '', + * the corresponding style property will be unset. + * + * @param {string} id ID of the node to update. + * @param {object} styles Mapping from styles to values. + * @internal + */ + updateStylesByID: function(id, styles) { + var node = ReactMount.getNode(id); + CSSPropertyOperations.setValueForStyles(node, styles); + }, + + /** + * Updates a DOM node's innerHTML. + * + * @param {string} id ID of the node to update. + * @param {string} html An HTML string. + * @internal + */ + updateInnerHTMLByID: function(id, html) { + var node = ReactMount.getNode(id); + setInnerHTML(node, html); + }, + + /** + * Updates a DOM node's text content set by `props.content`. + * + * @param {string} id ID of the node to update. + * @param {string} content Text content. + * @internal + */ + updateTextContentByID: function(id, content) { + var node = ReactMount.getNode(id); + DOMChildrenOperations.updateTextContent(node, content); + }, + + /** + * Replaces a DOM node that exists in the document with markup. + * + * @param {string} id ID of child to be replaced. + * @param {string} markup Dangerous markup to inject in place of child. + * @internal + * @see {Danger.dangerouslyReplaceNodeWithMarkup} + */ + dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { + var node = ReactMount.getNode(id); + DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); + }, + + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @param {array<string>} markup List of markup strings. + * @internal + */ + dangerouslyProcessChildrenUpdates: function(updates, markup) { + for (var i = 0; i < updates.length; i++) { + updates[i].parentNode = ReactMount.getNode(updates[i].parentID); + } + DOMChildrenOperations.processUpdates(updates, markup); + } +}; + +ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', { + updatePropertyByID: 'updatePropertyByID', + deletePropertyByID: 'deletePropertyByID', + updateStylesByID: 'updateStylesByID', + updateInnerHTMLByID: 'updateInnerHTMLByID', + updateTextContentByID: 'updateTextContentByID', + dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID', + dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates' +}); + +module.exports = ReactDOMIDOperations; + +},{"10":10,"12":12,"150":150,"164":164,"6":6,"77":77,"82":82}],51:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMIframe + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var LocalEventTrapMixin = _dereq_(27); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var iframe = ReactElement.createFactory('iframe'); + +/** + * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to + * capture it on the <iframe> element itself. There are lots of hacks we could + * do to accomplish this, but the most reliable is to make <iframe> a composite + * component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMIframe = ReactClass.createClass({ + displayName: 'ReactDOMIframe', + tagName: 'IFRAME', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + return iframe(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); + } +}); + +module.exports = ReactDOMIframe; + +},{"16":16,"27":27,"32":32,"38":38,"63":63}],52:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMImg + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var LocalEventTrapMixin = _dereq_(27); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var img = ReactElement.createFactory('img'); + +/** + * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to + * capture it on the <img> element itself. There are lots of hacks we could do + * to accomplish this, but the most reliable is to make <img> a composite + * component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMImg = ReactClass.createClass({ + displayName: 'ReactDOMImg', + tagName: 'IMG', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + return img(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); + this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error'); + } +}); + +module.exports = ReactDOMImg; + +},{"16":16,"27":27,"32":32,"38":38,"63":63}],53:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMInput + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var DOMPropertyOperations = _dereq_(12); +var LinkedValueUtils = _dereq_(26); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); +var ReactMount = _dereq_(77); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); +var invariant = _dereq_(150); + +var input = ReactElement.createFactory('input'); + +var instancesByReactID = {}; + +function forceUpdateIfMounted() { + /*jshint validthis:true */ + if (this.isMounted()) { + this.forceUpdate(); + } +} + +/** + * Implements an <input> native component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = ReactClass.createClass({ + displayName: 'ReactDOMInput', + tagName: 'INPUT', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + getInitialState: function() { + var defaultValue = this.props.defaultValue; + return { + initialChecked: this.props.defaultChecked || false, + initialValue: defaultValue != null ? defaultValue : null + }; + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + props.defaultChecked = null; + props.defaultValue = null; + + var value = LinkedValueUtils.getValue(this); + props.value = value != null ? value : this.state.initialValue; + + var checked = LinkedValueUtils.getChecked(this); + props.checked = checked != null ? checked : this.state.initialChecked; + + props.onChange = this._handleChange; + + return input(props, this.props.children); + }, + + componentDidMount: function() { + var id = ReactMount.getID(this.getDOMNode()); + instancesByReactID[id] = this; + }, + + componentWillUnmount: function() { + var rootNode = this.getDOMNode(); + var id = ReactMount.getID(rootNode); + delete instancesByReactID[id]; + }, + + componentDidUpdate: function(prevProps, prevState, prevContext) { + var rootNode = this.getDOMNode(); + if (this.props.checked != null) { + DOMPropertyOperations.setValueForProperty( + rootNode, + 'checked', + this.props.checked || false + ); + } + + var value = LinkedValueUtils.getValue(this); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = this.props.name; + if (this.props.type === 'radio' && name != null) { + var rootNode = this.getDOMNode(); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0, groupLen = group.length; i < groupLen; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || + otherNode.form !== rootNode.form) { + continue; + } + var otherID = ReactMount.getID(otherNode); + ("production" !== "development" ? invariant( + otherID, + 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + + 'same `name` is not supported.' + ) : invariant(otherID)); + var otherInstance = instancesByReactID[otherID]; + ("production" !== "development" ? invariant( + otherInstance, + 'ReactDOMInput: Unknown radio button ID %s.', + otherID + ) : invariant(otherInstance)); + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; + } + +}); + +module.exports = ReactDOMInput; + +},{"100":100,"12":12,"150":150,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63,"77":77}],54:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMOption + */ + +'use strict'; + +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var warning = _dereq_(171); + +var option = ReactElement.createFactory('option'); + +/** + * Implements an <option> native component that warns when `selected` is set. + */ +var ReactDOMOption = ReactClass.createClass({ + displayName: 'ReactDOMOption', + tagName: 'OPTION', + + mixins: [ReactBrowserComponentMixin], + + componentWillMount: function() { + // TODO (yungsters): Remove support for `selected` in <option>. + if ("production" !== "development") { + ("production" !== "development" ? warning( + this.props.selected == null, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.' + ) : null); + } + }, + + render: function() { + return option(this.props, this.props.children); + } + +}); + +module.exports = ReactDOMOption; + +},{"171":171,"32":32,"38":38,"63":63}],55:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMSelect + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var LinkedValueUtils = _dereq_(26); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); + +var select = ReactElement.createFactory('select'); + +function updateOptionsIfPendingUpdateAndMounted() { + /*jshint validthis:true */ + if (this._pendingUpdate) { + this._pendingUpdate = false; + var value = LinkedValueUtils.getValue(this); + if (value != null && this.isMounted()) { + updateOptions(this, value); + } + } +} + +/** + * Validation function for `value` and `defaultValue`. + * @private + */ +function selectValueType(props, propName, componentName) { + if (props[propName] == null) { + return null; + } + if (props.multiple) { + if (!Array.isArray(props[propName])) { + return new Error( + ("The `" + propName + "` prop supplied to <select> must be an array if ") + + ("`multiple` is true.") + ); + } + } else { + if (Array.isArray(props[propName])) { + return new Error( + ("The `" + propName + "` prop supplied to <select> must be a scalar ") + + ("value if `multiple` is false.") + ); + } + } +} + +/** + * @param {ReactComponent} component Instance of ReactDOMSelect + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ +function updateOptions(component, propValue) { + var selectedValue, i, l; + var options = component.getDOMNode().options; + + if (component.props.multiple) { + selectedValue = {}; + for (i = 0, l = propValue.length; i < l; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0, l = options.length; i < l; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0, l = options.length; i < l; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + options[0].selected = true; + } +} + +/** + * Implements a <select> native component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ +var ReactDOMSelect = ReactClass.createClass({ + displayName: 'ReactDOMSelect', + tagName: 'SELECT', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + propTypes: { + defaultValue: selectValueType, + value: selectValueType + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + props.onChange = this._handleChange; + props.value = null; + + return select(props, this.props.children); + }, + + componentWillMount: function() { + this._pendingUpdate = false; + }, + + componentDidMount: function() { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + updateOptions(this, value); + } else if (this.props.defaultValue != null) { + updateOptions(this, this.props.defaultValue); + } + }, + + componentDidUpdate: function(prevProps) { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + this._pendingUpdate = false; + updateOptions(this, value); + } else if (!prevProps.multiple !== !this.props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (this.props.defaultValue != null) { + updateOptions(this, this.props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(this, this.props.multiple ? [] : ''); + } + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + + this._pendingUpdate = true; + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; + } + +}); + +module.exports = ReactDOMSelect; + +},{"100":100,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],56:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMSelection + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +var getNodeForCharacterOffset = _dereq_(143); +var getTextContentAccessor = _dereq_(145); + +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} + +/** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset + }; +} + +/** + * @param {DOMElement} node + * @return {?object} + */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed( + selection.anchorNode, + selection.anchorOffset, + selection.focusNode, + selection.focusOffset + ); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed( + tempRange.startContainer, + tempRange.startOffset, + tempRange.endContainer, + tempRange.endOffset + ); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} + +/** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (typeof offsets.end === 'undefined') { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = typeof offsets.end === 'undefined' ? + start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ( + ExecutionEnvironment.canUseDOM && + 'selection' in document && + !('getSelection' in window) +); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; + +},{"143":143,"145":145,"22":22}],57:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMTextComponent + * @typechecks static-only + */ + +'use strict'; + +var DOMPropertyOperations = _dereq_(12); +var ReactComponentBrowserEnvironment = + _dereq_(40); +var ReactDOMComponent = _dereq_(48); + +var assign = _dereq_(29); +var escapeTextContentForBrowser = _dereq_(131); + +/** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings in elements so that they can undergo + * the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ +var ReactDOMTextComponent = function(props) { + // This constructor and its argument is currently used by mocks. +}; + +assign(ReactDOMTextComponent.prototype, { + + /** + * @param {ReactText} text + * @internal + */ + construct: function(text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + + // Properties + this._rootNodeID = null; + this._mountIndex = 0; + }, + + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function(rootID, transaction, context) { + this._rootNodeID = rootID; + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this in a `span` for the reasons stated above, but + // since this is a situation where React won't take over (static pages), + // we can simply return the text as it is. + return escapedText; + } + + return ( + '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + + escapedText + + '</span>' + ); + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function(nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + ReactDOMComponent.BackendIDOperations.updateTextContentByID( + this._rootNodeID, + nextStringText + ); + } + } + }, + + unmountComponent: function() { + ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); + } + +}); + +module.exports = ReactDOMTextComponent; + +},{"12":12,"131":131,"29":29,"40":40,"48":48}],58:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMTextarea + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var DOMPropertyOperations = _dereq_(12); +var LinkedValueUtils = _dereq_(26); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); +var invariant = _dereq_(150); + +var warning = _dereq_(171); + +var textarea = ReactElement.createFactory('textarea'); + +function forceUpdateIfMounted() { + /*jshint validthis:true */ + if (this.isMounted()) { + this.forceUpdate(); + } +} + +/** + * Implements a <textarea> native component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ +var ReactDOMTextarea = ReactClass.createClass({ + displayName: 'ReactDOMTextarea', + tagName: 'TEXTAREA', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + getInitialState: function() { + var defaultValue = this.props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = this.props.children; + if (children != null) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.' + ) : null); + } + ("production" !== "development" ? invariant( + defaultValue == null, + 'If you supply `defaultValue` on a <textarea>, do not pass children.' + ) : invariant(defaultValue == null)); + if (Array.isArray(children)) { + ("production" !== "development" ? invariant( + children.length <= 1, + '<textarea> can only have at most one child.' + ) : invariant(children.length <= 1)); + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + var value = LinkedValueUtils.getValue(this); + return { + // We save the initial value so that `ReactDOMComponent` doesn't update + // `textContent` (unnecessary since we update value). + // The initial value can be a boolean or object so that's why it's + // forced to be a string. + initialValue: '' + (value != null ? value : defaultValue) + }; + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + ("production" !== "development" ? invariant( + props.dangerouslySetInnerHTML == null, + '`dangerouslySetInnerHTML` does not make sense on <textarea>.' + ) : invariant(props.dangerouslySetInnerHTML == null)); + + props.defaultValue = null; + props.value = null; + props.onChange = this._handleChange; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. + return textarea(props, this.state.initialValue); + }, + + componentDidUpdate: function(prevProps, prevState, prevContext) { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + var rootNode = this.getDOMNode(); + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; + } + +}); + +module.exports = ReactDOMTextarea; + +},{"100":100,"12":12,"150":150,"171":171,"2":2,"26":26,"29":29,"32":32,"38":38,"63":63}],59:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultBatchingStrategy + */ + +'use strict'; + +var ReactUpdates = _dereq_(100); +var Transaction = _dereq_(116); + +var assign = _dereq_(29); +var emptyFunction = _dereq_(129); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function() { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } +}; + +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) +}; + +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +assign( + ReactDefaultBatchingStrategyTransaction.prototype, + Transaction.Mixin, + { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + } + } +); + +var transaction = new ReactDefaultBatchingStrategyTransaction(); + +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function(callback, a, b, c, d) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + callback(a, b, c, d); + } else { + transaction.perform(callback, null, a, b, c, d); + } + } +}; + +module.exports = ReactDefaultBatchingStrategy; + +},{"100":100,"116":116,"129":129,"29":29}],60:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultInjection + */ + +'use strict'; + +var BeforeInputEventPlugin = _dereq_(3); +var ChangeEventPlugin = _dereq_(8); +var ClientReactRootIndex = _dereq_(9); +var DefaultEventPluginOrder = _dereq_(14); +var EnterLeaveEventPlugin = _dereq_(15); +var ExecutionEnvironment = _dereq_(22); +var HTMLDOMPropertyConfig = _dereq_(24); +var MobileSafariClickEventPlugin = _dereq_(28); +var ReactBrowserComponentMixin = _dereq_(32); +var ReactClass = _dereq_(38); +var ReactComponentBrowserEnvironment = + _dereq_(40); +var ReactDefaultBatchingStrategy = _dereq_(59); +var ReactDOMComponent = _dereq_(48); +var ReactDOMButton = _dereq_(47); +var ReactDOMForm = _dereq_(49); +var ReactDOMImg = _dereq_(52); +var ReactDOMIDOperations = _dereq_(50); +var ReactDOMIframe = _dereq_(51); +var ReactDOMInput = _dereq_(53); +var ReactDOMOption = _dereq_(54); +var ReactDOMSelect = _dereq_(55); +var ReactDOMTextarea = _dereq_(58); +var ReactDOMTextComponent = _dereq_(57); +var ReactElement = _dereq_(63); +var ReactEventListener = _dereq_(68); +var ReactInjection = _dereq_(70); +var ReactInstanceHandles = _dereq_(72); +var ReactMount = _dereq_(77); +var ReactReconcileTransaction = _dereq_(88); +var SelectEventPlugin = _dereq_(102); +var ServerReactRootIndex = _dereq_(103); +var SimpleEventPlugin = _dereq_(104); +var SVGDOMPropertyConfig = _dereq_(101); + +var createFullPageComponent = _dereq_(125); + +function autoGenerateWrapperClass(type) { + return ReactClass.createClass({ + tagName: type.toUpperCase(), + render: function() { + return new ReactElement( + type, + null, + null, + null, + null, + this.props + ); + } + }); +} + +function inject() { + ReactInjection.EventEmitter.injectReactEventListener( + ReactEventListener + ); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles); + ReactInjection.EventPluginHub.injectMount(ReactMount); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + MobileSafariClickEventPlugin: MobileSafariClickEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.NativeComponent.injectGenericComponentClass( + ReactDOMComponent + ); + + ReactInjection.NativeComponent.injectTextComponentClass( + ReactDOMTextComponent + ); + + ReactInjection.NativeComponent.injectAutoWrapper( + autoGenerateWrapperClass + ); + + // This needs to happen before createFullPageComponent() otherwise the mixin + // won't be included. + ReactInjection.Class.injectMixin(ReactBrowserComponentMixin); + + ReactInjection.NativeComponent.injectComponentClasses({ + 'button': ReactDOMButton, + 'form': ReactDOMForm, + 'iframe': ReactDOMIframe, + 'img': ReactDOMImg, + 'input': ReactDOMInput, + 'option': ReactDOMOption, + 'select': ReactDOMSelect, + 'textarea': ReactDOMTextarea, + + 'html': createFullPageComponent('html'), + 'head': createFullPageComponent('head'), + 'body': createFullPageComponent('body') + }); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponent('noscript'); + + ReactInjection.Updates.injectReconcileTransaction( + ReactReconcileTransaction + ); + ReactInjection.Updates.injectBatchingStrategy( + ReactDefaultBatchingStrategy + ); + + ReactInjection.RootIndex.injectCreateReactRootIndex( + ExecutionEnvironment.canUseDOM ? + ClientReactRootIndex.createReactRootIndex : + ServerReactRootIndex.createReactRootIndex + ); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations); + + if ("production" !== "development") { + var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; + if ((/[?&]react_perf\b/).test(url)) { + var ReactDefaultPerf = _dereq_(61); + ReactDefaultPerf.start(); + } + } +} + +module.exports = { + inject: inject +}; + +},{"101":101,"102":102,"103":103,"104":104,"125":125,"14":14,"15":15,"22":22,"24":24,"28":28,"3":3,"32":32,"38":38,"40":40,"47":47,"48":48,"49":49,"50":50,"51":51,"52":52,"53":53,"54":54,"55":55,"57":57,"58":58,"59":59,"61":61,"63":63,"68":68,"70":70,"72":72,"77":77,"8":8,"88":88,"9":9}],61:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultPerf + * @typechecks static-only + */ + +'use strict'; + +var DOMProperty = _dereq_(11); +var ReactDefaultPerfAnalysis = _dereq_(62); +var ReactMount = _dereq_(77); +var ReactPerf = _dereq_(82); + +var performanceNow = _dereq_(162); + +function roundFloat(val) { + return Math.floor(val * 100) / 100; +} + +function addValue(obj, key, val) { + obj[key] = (obj[key] || 0) + val; +} + +var ReactDefaultPerf = { + _allMeasurements: [], // last item in the list is the current one + _mountStack: [0], + _injected: false, + + start: function() { + if (!ReactDefaultPerf._injected) { + ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure); + } + + ReactDefaultPerf._allMeasurements.length = 0; + ReactPerf.enableMeasure = true; + }, + + stop: function() { + ReactPerf.enableMeasure = false; + }, + + getLastMeasurements: function() { + return ReactDefaultPerf._allMeasurements; + }, + + printExclusive: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements); + console.table(summary.map(function(item) { + return { + 'Component class name': item.componentName, + 'Total inclusive time (ms)': roundFloat(item.inclusive), + 'Exclusive mount time (ms)': roundFloat(item.exclusive), + 'Exclusive render time (ms)': roundFloat(item.render), + 'Mount time per instance (ms)': roundFloat(item.exclusive / item.count), + 'Render time per instance (ms)': roundFloat(item.render / item.count), + 'Instances': item.count + }; + })); + // TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct + // number. + }, + + printInclusive: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements); + console.table(summary.map(function(item) { + return { + 'Owner > component': item.componentName, + 'Inclusive time (ms)': roundFloat(item.time), + 'Instances': item.count + }; + })); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + getMeasurementsSummaryMap: function(measurements) { + var summary = ReactDefaultPerfAnalysis.getInclusiveSummary( + measurements, + true + ); + return summary.map(function(item) { + return { + 'Owner > component': item.componentName, + 'Wasted time (ms)': item.time, + 'Instances': item.count + }; + }); + }, + + printWasted: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements)); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + printDOM: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements); + console.table(summary.map(function(item) { + var result = {}; + result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id; + result['type'] = item.type; + result['args'] = JSON.stringify(item.args); + return result; + })); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + _recordWrite: function(id, fnName, totalTime, args) { + // TODO: totalTime isn't that useful since it doesn't count paints/reflows + var writes = + ReactDefaultPerf + ._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1] + .writes; + writes[id] = writes[id] || []; + writes[id].push({ + type: fnName, + time: totalTime, + args: args + }); + }, + + measure: function(moduleName, fnName, func) { + return function() {for (var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + var totalTime; + var rv; + var start; + + if (fnName === '_renderNewRootComponent' || + fnName === 'flushBatchedUpdates') { + // A "measurement" is a set of metrics recorded for each flush. We want + // to group the metrics for a given flush together so we can look at the + // components that rendered and the DOM operations that actually + // happened to determine the amount of "wasted work" performed. + ReactDefaultPerf._allMeasurements.push({ + exclusive: {}, + inclusive: {}, + render: {}, + counts: {}, + writes: {}, + displayNames: {}, + totalTime: 0 + }); + start = performanceNow(); + rv = func.apply(this, args); + ReactDefaultPerf._allMeasurements[ + ReactDefaultPerf._allMeasurements.length - 1 + ].totalTime = performanceNow() - start; + return rv; + } else if (moduleName === 'ReactDOMIDOperations' || + moduleName === 'ReactComponentBrowserEnvironment') { + start = performanceNow(); + rv = func.apply(this, args); + totalTime = performanceNow() - start; + + if (fnName === '_mountImageIntoNode') { + var mountID = ReactMount.getID(args[1]); + ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]); + } else if (fnName === 'dangerouslyProcessChildrenUpdates') { + // special format + args[0].forEach(function(update) { + var writeArgs = {}; + if (update.fromIndex !== null) { + writeArgs.fromIndex = update.fromIndex; + } + if (update.toIndex !== null) { + writeArgs.toIndex = update.toIndex; + } + if (update.textContent !== null) { + writeArgs.textContent = update.textContent; + } + if (update.markupIndex !== null) { + writeArgs.markup = args[1][update.markupIndex]; + } + ReactDefaultPerf._recordWrite( + update.parentID, + update.type, + totalTime, + writeArgs + ); + }); + } else { + // basic format + ReactDefaultPerf._recordWrite( + args[0], + fnName, + totalTime, + Array.prototype.slice.call(args, 1) + ); + } + return rv; + } else if (moduleName === 'ReactCompositeComponent' && ( + (// TODO: receiveComponent()? + (fnName === 'mountComponent' || + fnName === 'updateComponent' || fnName === '_renderValidatedComponent')))) { + + var rootNodeID = fnName === 'mountComponent' ? + args[0] : + this._rootNodeID; + var isRender = fnName === '_renderValidatedComponent'; + var isMount = fnName === 'mountComponent'; + + var mountStack = ReactDefaultPerf._mountStack; + var entry = ReactDefaultPerf._allMeasurements[ + ReactDefaultPerf._allMeasurements.length - 1 + ]; + + if (isRender) { + addValue(entry.counts, rootNodeID, 1); + } else if (isMount) { + mountStack.push(0); + } + + start = performanceNow(); + rv = func.apply(this, args); + totalTime = performanceNow() - start; + + if (isRender) { + addValue(entry.render, rootNodeID, totalTime); + } else if (isMount) { + var subMountTime = mountStack.pop(); + mountStack[mountStack.length - 1] += totalTime; + addValue(entry.exclusive, rootNodeID, totalTime - subMountTime); + addValue(entry.inclusive, rootNodeID, totalTime); + } else { + addValue(entry.inclusive, rootNodeID, totalTime); + } + + entry.displayNames[rootNodeID] = { + current: typeof this._currentElement.type === 'string' ? + this._currentElement.type : + this.getName(), + owner: this._currentElement._owner ? + this._currentElement._owner.getName() : + '<root>' + }; + + return rv; + } else { + return func.apply(this, args); + } + }; + } +}; + +module.exports = ReactDefaultPerf; + +},{"11":11,"162":162,"62":62,"77":77,"82":82}],62:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultPerfAnalysis + */ + +var assign = _dereq_(29); + +// Don't try to save users less than 1.2ms (a number I made up) +var DONT_CARE_THRESHOLD = 1.2; +var DOM_OPERATION_TYPES = { + '_mountImageIntoNode': 'set innerHTML', + INSERT_MARKUP: 'set innerHTML', + MOVE_EXISTING: 'move', + REMOVE_NODE: 'remove', + TEXT_CONTENT: 'set textContent', + 'updatePropertyByID': 'update attribute', + 'deletePropertyByID': 'delete attribute', + 'updateStylesByID': 'update styles', + 'updateInnerHTMLByID': 'set innerHTML', + 'dangerouslyReplaceNodeWithMarkupByID': 'replace' +}; + +function getTotalTime(measurements) { + // TODO: return number of DOM ops? could be misleading. + // TODO: measure dropped frames after reconcile? + // TODO: log total time of each reconcile and the top-level component + // class that triggered it. + var totalTime = 0; + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + totalTime += measurement.totalTime; + } + return totalTime; +} + +function getDOMSummary(measurements) { + var items = []; + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var id; + + for (id in measurement.writes) { + measurement.writes[id].forEach(function(write) { + items.push({ + id: id, + type: DOM_OPERATION_TYPES[write.type] || write.type, + args: write.args + }); + }); + } + } + return items; +} + +function getExclusiveSummary(measurements) { + var candidates = {}; + var displayName; + + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var allIDs = assign( + {}, + measurement.exclusive, + measurement.inclusive + ); + + for (var id in allIDs) { + displayName = measurement.displayNames[id].current; + + candidates[displayName] = candidates[displayName] || { + componentName: displayName, + inclusive: 0, + exclusive: 0, + render: 0, + count: 0 + }; + if (measurement.render[id]) { + candidates[displayName].render += measurement.render[id]; + } + if (measurement.exclusive[id]) { + candidates[displayName].exclusive += measurement.exclusive[id]; + } + if (measurement.inclusive[id]) { + candidates[displayName].inclusive += measurement.inclusive[id]; + } + if (measurement.counts[id]) { + candidates[displayName].count += measurement.counts[id]; + } + } + } + + // Now make a sorted array with the results. + var arr = []; + for (displayName in candidates) { + if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) { + arr.push(candidates[displayName]); + } + } + + arr.sort(function(a, b) { + return b.exclusive - a.exclusive; + }); + + return arr; +} + +function getInclusiveSummary(measurements, onlyClean) { + var candidates = {}; + var inclusiveKey; + + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var allIDs = assign( + {}, + measurement.exclusive, + measurement.inclusive + ); + var cleanComponents; + + if (onlyClean) { + cleanComponents = getUnchangedComponents(measurement); + } + + for (var id in allIDs) { + if (onlyClean && !cleanComponents[id]) { + continue; + } + + var displayName = measurement.displayNames[id]; + + // Inclusive time is not useful for many components without knowing where + // they are instantiated. So we aggregate inclusive time with both the + // owner and current displayName as the key. + inclusiveKey = displayName.owner + ' > ' + displayName.current; + + candidates[inclusiveKey] = candidates[inclusiveKey] || { + componentName: inclusiveKey, + time: 0, + count: 0 + }; + + if (measurement.inclusive[id]) { + candidates[inclusiveKey].time += measurement.inclusive[id]; + } + if (measurement.counts[id]) { + candidates[inclusiveKey].count += measurement.counts[id]; + } + } + } + + // Now make a sorted array with the results. + var arr = []; + for (inclusiveKey in candidates) { + if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) { + arr.push(candidates[inclusiveKey]); + } + } + + arr.sort(function(a, b) { + return b.time - a.time; + }); + + return arr; +} + +function getUnchangedComponents(measurement) { + // For a given reconcile, look at which components did not actually + // render anything to the DOM and return a mapping of their ID to + // the amount of time it took to render the entire subtree. + var cleanComponents = {}; + var dirtyLeafIDs = Object.keys(measurement.writes); + var allIDs = assign({}, measurement.exclusive, measurement.inclusive); + + for (var id in allIDs) { + var isDirty = false; + // For each component that rendered, see if a component that triggered + // a DOM op is in its subtree. + for (var i = 0; i < dirtyLeafIDs.length; i++) { + if (dirtyLeafIDs[i].indexOf(id) === 0) { + isDirty = true; + break; + } + } + if (!isDirty && measurement.counts[id] > 0) { + cleanComponents[id] = true; + } + } + return cleanComponents; +} + +var ReactDefaultPerfAnalysis = { + getExclusiveSummary: getExclusiveSummary, + getInclusiveSummary: getInclusiveSummary, + getDOMSummary: getDOMSummary, + getTotalTime: getTotalTime +}; + +module.exports = ReactDefaultPerfAnalysis; + +},{"29":29}],63:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElement + */ + +'use strict'; + +var ReactContext = _dereq_(44); +var ReactCurrentOwner = _dereq_(45); + +var assign = _dereq_(29); +var warning = _dereq_(171); + +var RESERVED_PROPS = { + key: true, + ref: true +}; + +/** + * Warn for mutations. + * + * @internal + * @param {object} object + * @param {string} key + */ +function defineWarningProperty(object, key) { + Object.defineProperty(object, key, { + + configurable: false, + enumerable: true, + + get: function() { + if (!this._store) { + return null; + } + return this._store[key]; + }, + + set: function(value) { + ("production" !== "development" ? warning( + false, + 'Don\'t set the %s property of the React element. Instead, ' + + 'specify the correct value when initially creating the element.', + key + ) : null); + this._store[key] = value; + } + + }); +} + +/** + * This is updated to true if the membrane is successfully created. + */ +var useMutationMembrane = false; + +/** + * Warn for mutations. + * + * @internal + * @param {object} element + */ +function defineMutationMembrane(prototype) { + try { + var pseudoFrozenProperties = { + props: true + }; + for (var key in pseudoFrozenProperties) { + defineWarningProperty(prototype, key); + } + useMutationMembrane = true; + } catch (x) { + // IE will fail on defineProperty + } +} + +/** + * Base constructor for all React elements. This is only used to make this + * work with a dynamic instanceof check. Nothing should live on this prototype. + * + * @param {*} type + * @param {string|object} ref + * @param {*} key + * @param {*} props + * @internal + */ +var ReactElement = function(type, key, ref, owner, context, props) { + // Built-in properties that belong on the element + this.type = type; + this.key = key; + this.ref = ref; + + // Record the component responsible for creating this element. + this._owner = owner; + + // TODO: Deprecate withContext, and then the context becomes accessible + // through the owner. + this._context = context; + + if ("production" !== "development") { + // The validation flag and props are currently mutative. We put them on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + this._store = {props: props, originalProps: assign({}, props)}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + try { + Object.defineProperty(this._store, 'validated', { + configurable: false, + enumerable: false, + writable: true + }); + } catch (x) { + } + this._store.validated = false; + + // We're not allowed to set props directly on the object so we early + // return and rely on the prototype membrane to forward to the backing + // store. + if (useMutationMembrane) { + Object.freeze(this); + return; + } + } + + this.props = props; +}; + +// We intentionally don't expose the function on the constructor property. +// ReactElement should be indistinguishable from a plain object. +ReactElement.prototype = { + _isReactElement: true +}; + +if ("production" !== "development") { + defineMutationMembrane(ReactElement.prototype); +} + +ReactElement.createElement = function(type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + + if (config != null) { + ref = config.ref === undefined ? null : config.ref; + key = config.key === undefined ? null : '' + config.key; + // Remaining properties are added to a new props object + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (typeof props[propName] === 'undefined') { + props[propName] = defaultProps[propName]; + } + } + } + + return new ReactElement( + type, + key, + ref, + ReactCurrentOwner.current, + ReactContext.current, + props + ); +}; + +ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. <Foo />.type === Foo.type. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; +}; + +ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { + var newElement = new ReactElement( + oldElement.type, + oldElement.key, + oldElement.ref, + oldElement._owner, + oldElement._context, + newProps + ); + + if ("production" !== "development") { + // If the key on the original is valid, then the clone is valid + newElement._store.validated = oldElement._store.validated; + } + return newElement; +}; + +ReactElement.cloneElement = function(element, config, children) { + var propName; + + // Original props are copied + var props = assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (config.ref !== undefined) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (config.key !== undefined) { + key = '' + config.key; + } + // Remaining properties override existing props + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return new ReactElement( + element.type, + key, + ref, + owner, + element._context, + props + ); +}; + +/** + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ +ReactElement.isValidElement = function(object) { + // ReactTestUtils is often used outside of beforeEach where as React is + // within it. This leads to two different instances of React on the same + // page. To identify a element from a different React instance we use + // a flag instead of an instanceof check. + var isElement = !!(object && object._isReactElement); + // if (isElement && !(object instanceof ReactElement)) { + // This is an indicator that you're using multiple versions of React at the + // same time. This will screw with ownership and stuff. Fix it, please. + // TODO: We could possibly warn here. + // } + return isElement; +}; + +module.exports = ReactElement; + +},{"171":171,"29":29,"44":44,"45":45}],64:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElementValidator + */ + +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactFragment = _dereq_(69); +var ReactPropTypeLocations = _dereq_(85); +var ReactPropTypeLocationNames = _dereq_(84); +var ReactCurrentOwner = _dereq_(45); +var ReactNativeComponent = _dereq_(80); + +var getIteratorFn = _dereq_(141); +var invariant = _dereq_(150); +var warning = _dereq_(171); + +function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ +var ownerHasKeyUseWarning = {}; + +var loggedTypeFailures = {}; + +var NUMERIC_PROPERTY_REGEX = /^\d+$/; + +/** + * Gets the instance's name for use in warnings. + * + * @internal + * @return {?string} Display name or undefined + */ +function getName(instance) { + var publicInstance = instance && instance.getPublicInstance(); + if (!publicInstance) { + return undefined; + } + var constructor = publicInstance.constructor; + if (!constructor) { + return undefined; + } + return constructor.displayName || constructor.name || undefined; +} + +/** + * Gets the current owner's displayName for use in warnings. + * + * @internal + * @return {?string} Display name or undefined + */ +function getCurrentOwnerDisplayName() { + var current = ReactCurrentOwner.current; + return ( + current && getName(current) || undefined + ); +} + +/** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ +function validateExplicitKey(element, parentType) { + if (element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + + warnAndMonitorForKeyUse( + 'Each child in an array or iterator should have a unique "key" prop.', + element, + parentType + ); +} + +/** + * Warn if the key is being defined as an object property but has an incorrect + * value. + * + * @internal + * @param {string} name Property name of the key. + * @param {ReactElement} element Component that requires a key. + * @param {*} parentType element's parent's type. + */ +function validatePropertyKey(name, element, parentType) { + if (!NUMERIC_PROPERTY_REGEX.test(name)) { + return; + } + warnAndMonitorForKeyUse( + 'Child objects should have non-numeric keys so ordering is preserved.', + element, + parentType + ); +} + +/** + * Shared warning and monitoring code for the key warnings. + * + * @internal + * @param {string} message The base warning that gets output. + * @param {ReactElement} element Component that requires a key. + * @param {*} parentType element's parent's type. + */ +function warnAndMonitorForKeyUse(message, element, parentType) { + var ownerName = getCurrentOwnerDisplayName(); + var parentName = typeof parentType === 'string' ? + parentType : parentType.displayName || parentType.name; + + var useName = ownerName || parentName; + var memoizer = ownerHasKeyUseWarning[message] || ( + (ownerHasKeyUseWarning[message] = {}) + ); + if (memoizer.hasOwnProperty(useName)) { + return; + } + memoizer[useName] = true; + + var parentOrOwnerAddendum = + ownerName ? (" Check the render method of " + ownerName + ".") : + parentName ? (" Check the React.render call using <" + parentName + ">.") : + ''; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwnerAddendum = ''; + if (element && + element._owner && + element._owner !== ReactCurrentOwner.current) { + // Name of the component that originally created this child. + var childOwnerName = getName(element._owner); + + childOwnerAddendum = (" It was passed a child from " + childOwnerName + "."); + } + + ("production" !== "development" ? warning( + false, + message + '%s%s See http://fb.me/react-warning-keys for more information.', + parentOrOwnerAddendum, + childOwnerAddendum + ) : null); +} + +/** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ +function validateChildKeys(node, parentType) { + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + node._store.validated = true; + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } else if (typeof node === 'object') { + var fragment = ReactFragment.extractIfFragment(node); + for (var key in fragment) { + if (fragment.hasOwnProperty(key)) { + validatePropertyKey(key, fragment[key], parentType); + } + } + } + } +} + +/** + * Assert that the props are valid + * + * @param {string} componentName Name of the component for error messages. + * @param {object} propTypes Map of prop name to a ReactPropType + * @param {object} props + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ +function checkPropTypes(componentName, propTypes, props, location) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + ("production" !== "development" ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); + error = propTypes[propName](props, propName, componentName, location); + } catch (ex) { + error = ex; + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(this); + ("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null); + } + } + } +} + +var warnedPropsMutations = {}; + +/** + * Warn about mutating props when setting `propName` on `element`. + * + * @param {string} propName The string key within props that was set + * @param {ReactElement} element + */ +function warnForPropsMutation(propName, element) { + var type = element.type; + var elementName = typeof type === 'string' ? type : type.displayName; + var ownerName = element._owner ? + element._owner.getPublicInstance().constructor.displayName : null; + + var warningKey = propName + '|' + elementName + '|' + ownerName; + if (warnedPropsMutations.hasOwnProperty(warningKey)) { + return; + } + warnedPropsMutations[warningKey] = true; + + var elementInfo = ''; + if (elementName) { + elementInfo = ' <' + elementName + ' />'; + } + var ownerInfo = ''; + if (ownerName) { + ownerInfo = ' The element was created by ' + ownerName + '.'; + } + + ("production" !== "development" ? warning( + false, + 'Don\'t set .props.%s of the React component%s. ' + + 'Instead, specify the correct value when ' + + 'initially creating the element.%s', + propName, + elementInfo, + ownerInfo + ) : null); +} + +// Inline Object.is polyfill +function is(a, b) { + if (a !== a) { + // NaN + return b !== b; + } + if (a === 0 && b === 0) { + // +-0 + return 1 / a === 1 / b; + } + return a === b; +} + +/** + * Given an element, check if its props have been mutated since element + * creation (or the last call to this function). In particular, check if any + * new props have been added, which we can't directly catch by defining warning + * properties on the props object. + * + * @param {ReactElement} element + */ +function checkAndWarnForMutatedProps(element) { + if (!element._store) { + // Element was created using `new ReactElement` directly or with + // `ReactElement.createElement`; skip mutation checking + return; + } + + var originalProps = element._store.originalProps; + var props = element.props; + + for (var propName in props) { + if (props.hasOwnProperty(propName)) { + if (!originalProps.hasOwnProperty(propName) || + !is(originalProps[propName], props[propName])) { + warnForPropsMutation(propName, element); + + // Copy over the new value so that the two props objects match again + originalProps[propName] = props[propName]; + } + } + } +} + +/** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ +function validatePropTypes(element) { + if (element.type == null) { + // This has already warned. Don't throw. + return; + } + // Extract the component class from the element. Converts string types + // to a composite class which may have propTypes. + // TODO: Validating a string's propTypes is not decoupled from the + // rendering target which is problematic. + var componentClass = ReactNativeComponent.getComponentClassForElement( + element + ); + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkPropTypes( + name, + componentClass.propTypes, + element.props, + ReactPropTypeLocations.prop + ); + } + if (typeof componentClass.getDefaultProps === 'function') { + ("production" !== "development" ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.' + ) : null); + } +} + +var ReactElementValidator = { + + checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, + + createElement: function(type, props, children) { + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + ("production" !== "development" ? warning( + type != null, + 'React.createElement: type should not be null or undefined. It should ' + + 'be a string (for DOM elements) or a ReactClass (for composite ' + + 'components).' + ) : null); + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + + validatePropTypes(element); + + return element; + }, + + createFactory: function(type) { + var validatedFactory = ReactElementValidator.createElement.bind( + null, + type + ); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if ("production" !== "development") { + try { + Object.defineProperty( + validatedFactory, + 'type', + { + enumerable: false, + get: function() { + ("production" !== "development" ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.' + ) : null); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } + } + ); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + } + + + return validatedFactory; + }, + + cloneElement: function(element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + +}; + +module.exports = ReactElementValidator; + +},{"141":141,"150":150,"171":171,"45":45,"63":63,"69":69,"80":80,"84":84,"85":85}],65:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEmptyComponent + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactInstanceMap = _dereq_(73); + +var invariant = _dereq_(150); + +var component; +// This registry keeps track of the React IDs of the components that rendered to +// `null` (in reality a placeholder such as `noscript`) +var nullComponentIDsRegistry = {}; + +var ReactEmptyComponentInjection = { + injectEmptyComponent: function(emptyComponent) { + component = ReactElement.createFactory(emptyComponent); + } +}; + +var ReactEmptyComponentType = function() {}; +ReactEmptyComponentType.prototype.componentDidMount = function() { + var internalInstance = ReactInstanceMap.get(this); + // TODO: Make sure we run these methods in the correct order, we shouldn't + // need this check. We're going to assume if we're here it means we ran + // componentWillUnmount already so there is no internal instance (it gets + // removed as part of the unmounting process). + if (!internalInstance) { + return; + } + registerNullComponentID(internalInstance._rootNodeID); +}; +ReactEmptyComponentType.prototype.componentWillUnmount = function() { + var internalInstance = ReactInstanceMap.get(this); + // TODO: Get rid of this check. See TODO in componentDidMount. + if (!internalInstance) { + return; + } + deregisterNullComponentID(internalInstance._rootNodeID); +}; +ReactEmptyComponentType.prototype.render = function() { + ("production" !== "development" ? invariant( + component, + 'Trying to return null from a render, but no null placeholder component ' + + 'was injected.' + ) : invariant(component)); + return component(); +}; + +var emptyElement = ReactElement.createElement(ReactEmptyComponentType); + +/** + * Mark the component as having rendered to null. + * @param {string} id Component's `_rootNodeID`. + */ +function registerNullComponentID(id) { + nullComponentIDsRegistry[id] = true; +} + +/** + * Unmark the component as having rendered to null: it renders to something now. + * @param {string} id Component's `_rootNodeID`. + */ +function deregisterNullComponentID(id) { + delete nullComponentIDsRegistry[id]; +} + +/** + * @param {string} id Component's `_rootNodeID`. + * @return {boolean} True if the component is rendered to null. + */ +function isNullComponentID(id) { + return !!nullComponentIDsRegistry[id]; +} + +var ReactEmptyComponent = { + emptyElement: emptyElement, + injection: ReactEmptyComponentInjection, + isNullComponentID: isNullComponentID +}; + +module.exports = ReactEmptyComponent; + +},{"150":150,"63":63,"73":73}],66:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactErrorUtils + * @typechecks + */ + +"use strict"; + +var ReactErrorUtils = { + /** + * Creates a guarded version of a function. This is supposed to make debugging + * of event handlers easier. To aid debugging with the browser's debugger, + * this currently simply returns the original function. + * + * @param {function} func Function to be executed + * @param {string} name The name of the guard + * @return {function} + */ + guard: function(func, name) { + return func; + } +}; + +module.exports = ReactErrorUtils; + +},{}],67:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEventEmitterMixin + */ + +'use strict'; + +var EventPluginHub = _dereq_(18); + +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(); +} + +var ReactEventEmitterMixin = { + + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native environment event. + */ + handleTopLevel: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var events = EventPluginHub.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); + + runEventQueueInBatch(events); + } +}; + +module.exports = ReactEventEmitterMixin; + +},{"18":18}],68:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEventListener + * @typechecks static-only + */ + +'use strict'; + +var EventListener = _dereq_(17); +var ExecutionEnvironment = _dereq_(22); +var PooledClass = _dereq_(30); +var ReactInstanceHandles = _dereq_(72); +var ReactMount = _dereq_(77); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); +var getEventTarget = _dereq_(140); +var getUnboundedScrollPosition = _dereq_(146); + +/** + * Finds the parent React component of `node`. + * + * @param {*} node + * @return {?DOMEventTarget} Parent container, or `null` if the specified node + * is not nested. + */ +function findParent(node) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + var nodeID = ReactMount.getID(node); + var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID); + var container = ReactMount.findReactContainerForID(rootID); + var parent = ReactMount.getFirstReactDOM(container); + return parent; +} + +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function() { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo( + TopLevelCallbackBookKeeping, + PooledClass.twoArgumentPooler +); + +function handleTopLevelImpl(bookKeeping) { + var topLevelTarget = ReactMount.getFirstReactDOM( + getEventTarget(bookKeeping.nativeEvent) + ) || window; + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = topLevelTarget; + while (ancestor) { + bookKeeping.ancestors.push(ancestor); + ancestor = findParent(ancestor); + } + + for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) { + topLevelTarget = bookKeeping.ancestors[i]; + var topLevelTargetID = ReactMount.getID(topLevelTarget) || ''; + ReactEventListener._handleTopLevel( + bookKeeping.topLevelType, + topLevelTarget, + topLevelTargetID, + bookKeeping.nativeEvent + ); + } +} + +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} + +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function(handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function(enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function() { + return ReactEventListener._enabled; + }, + + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} handle Element on which to attach listener. + * @return {object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + var element = handle; + if (!element) { + return null; + } + return EventListener.listen( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType) + ); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} handle Element on which to attach listener. + * @return {object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + var element = handle; + if (!element) { + return null; + } + return EventListener.capture( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType) + ); + }, + + monitorScrollValue: function(refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function(topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled( + topLevelType, + nativeEvent + ); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; + +},{"100":100,"140":140,"146":146,"17":17,"22":22,"29":29,"30":30,"72":72,"77":77}],69:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * +* @providesModule ReactFragment +*/ + +'use strict'; + +var ReactElement = _dereq_(63); + +var warning = _dereq_(171); + +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set a fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is opaque, for now. + */ + +if ("production" !== "development") { + var fragmentKey = '_reactFragment'; + var didWarnKey = '_reactDidWarn'; + var canWarnForReactFragment = false; + + try { + // Feature test. Don't even try to issue this warning if we can't use + // enumerable: false. + + var dummy = function() { + return 1; + }; + + Object.defineProperty( + {}, + fragmentKey, + {enumerable: false, value: true} + ); + + Object.defineProperty( + {}, + 'key', + {enumerable: true, get: dummy} + ); + + canWarnForReactFragment = true; + } catch (x) { } + + var proxyPropertyAccessWithWarning = function(obj, key) { + Object.defineProperty(obj, key, { + enumerable: true, + get: function() { + ("production" !== "development" ? warning( + this[didWarnKey], + 'A ReactFragment is an opaque type. Accessing any of its ' + + 'properties is deprecated. Pass it to one of the React.Children ' + + 'helpers.' + ) : null); + this[didWarnKey] = true; + return this[fragmentKey][key]; + }, + set: function(value) { + ("production" !== "development" ? warning( + this[didWarnKey], + 'A ReactFragment is an immutable opaque type. Mutating its ' + + 'properties is deprecated.' + ) : null); + this[didWarnKey] = true; + this[fragmentKey][key] = value; + } + }); + }; + + var issuedWarnings = {}; + + var didWarnForFragment = function(fragment) { + // We use the keys and the type of the value as a heuristic to dedupe the + // warning to avoid spamming too much. + var fragmentCacheKey = ''; + for (var key in fragment) { + fragmentCacheKey += key + ':' + (typeof fragment[key]) + ','; + } + var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; + issuedWarnings[fragmentCacheKey] = true; + return alreadyWarnedOnce; + }; +} + +var ReactFragment = { + // Wrap a keyed object in an opaque proxy that warns you if you access any + // of its properties. + create: function(object) { + if ("production" !== "development") { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + ("production" !== "development" ? warning( + false, + 'React.addons.createFragment only accepts a single object.', + object + ) : null); + return object; + } + if (ReactElement.isValidElement(object)) { + ("production" !== "development" ? warning( + false, + 'React.addons.createFragment does not accept a ReactElement ' + + 'without a wrapper object.' + ) : null); + return object; + } + if (canWarnForReactFragment) { + var proxy = {}; + Object.defineProperty(proxy, fragmentKey, { + enumerable: false, + value: object + }); + Object.defineProperty(proxy, didWarnKey, { + writable: true, + enumerable: false, + value: false + }); + for (var key in object) { + proxyPropertyAccessWithWarning(proxy, key); + } + Object.preventExtensions(proxy); + return proxy; + } + } + return object; + }, + // Extract the original keyed object from the fragment opaque type. Warn if + // a plain object is passed here. + extract: function(fragment) { + if ("production" !== "development") { + if (canWarnForReactFragment) { + if (!fragment[fragmentKey]) { + ("production" !== "development" ? warning( + didWarnForFragment(fragment), + 'Any use of a keyed object should be wrapped in ' + + 'React.addons.createFragment(object) before being passed as a ' + + 'child.' + ) : null); + return fragment; + } + return fragment[fragmentKey]; + } + } + return fragment; + }, + // Check if this is a fragment and if so, extract the keyed object. If it + // is a fragment-like object, warn that it should be wrapped. Ignore if we + // can't determine what kind of object this is. + extractIfFragment: function(fragment) { + if ("production" !== "development") { + if (canWarnForReactFragment) { + // If it is the opaque type, return the keyed object. + if (fragment[fragmentKey]) { + return fragment[fragmentKey]; + } + // Otherwise, check each property if it has an element, if it does + // it is probably meant as a fragment, so we can warn early. Defer, + // the warning to extract. + for (var key in fragment) { + if (fragment.hasOwnProperty(key) && + ReactElement.isValidElement(fragment[key])) { + // This looks like a fragment object, we should provide an + // early warning. + return ReactFragment.extract(fragment); + } + } + } + } + return fragment; + } +}; + +module.exports = ReactFragment; + +},{"171":171,"63":63}],70:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInjection + */ + +'use strict'; + +var DOMProperty = _dereq_(11); +var EventPluginHub = _dereq_(18); +var ReactComponentEnvironment = _dereq_(41); +var ReactClass = _dereq_(38); +var ReactEmptyComponent = _dereq_(65); +var ReactBrowserEventEmitter = _dereq_(33); +var ReactNativeComponent = _dereq_(80); +var ReactDOMComponent = _dereq_(48); +var ReactPerf = _dereq_(82); +var ReactRootIndex = _dereq_(91); +var ReactUpdates = _dereq_(100); + +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + Class: ReactClass.injection, + DOMComponent: ReactDOMComponent.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + NativeComponent: ReactNativeComponent.injection, + Perf: ReactPerf.injection, + RootIndex: ReactRootIndex.injection, + Updates: ReactUpdates.injection +}; + +module.exports = ReactInjection; + +},{"100":100,"11":11,"18":18,"33":33,"38":38,"41":41,"48":48,"65":65,"80":80,"82":82,"91":91}],71:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInputSelection + */ + +'use strict'; + +var ReactDOMSelection = _dereq_(56); + +var containsNode = _dereq_(123); +var focusNode = _dereq_(134); +var getActiveElement = _dereq_(136); + +function isInDocument(node) { + return containsNode(document.documentElement, node); +} + +/** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ +var ReactInputSelection = { + + hasSelectionCapabilities: function(elem) { + return elem && ( + ((elem.nodeName === 'INPUT' && elem.type === 'text') || + elem.nodeName === 'TEXTAREA' || elem.contentEditable === 'true') + ); + }, + + getSelectionInformation: function() { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: + ReactInputSelection.hasSelectionCapabilities(focusedElem) ? + ReactInputSelection.getSelection(focusedElem) : + null + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function(priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && + isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection( + priorFocusedElem, + priorSelectionRange + ); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd + }; + } else if (document.selection && input.nodeName === 'INPUT') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length) + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || {start: 0, end: 0}; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function(input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (typeof end === 'undefined') { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName === 'INPUT') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + } +}; + +module.exports = ReactInputSelection; + +},{"123":123,"134":134,"136":136,"56":56}],72:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInstanceHandles + * @typechecks static-only + */ + +'use strict'; + +var ReactRootIndex = _dereq_(91); + +var invariant = _dereq_(150); + +var SEPARATOR = '.'; +var SEPARATOR_LENGTH = SEPARATOR.length; + +/** + * Maximum depth of traversals before we consider the possibility of a bad ID. + */ +var MAX_TREE_DEPTH = 100; + +/** + * Creates a DOM ID prefix to use when mounting React components. + * + * @param {number} index A unique integer + * @return {string} React root ID. + * @internal + */ +function getReactRootIDString(index) { + return SEPARATOR + index.toString(36); +} + +/** + * Checks if a character in the supplied ID is a separator or the end. + * + * @param {string} id A React DOM ID. + * @param {number} index Index of the character to check. + * @return {boolean} True if the character is a separator or end of the ID. + * @private + */ +function isBoundary(id, index) { + return id.charAt(index) === SEPARATOR || index === id.length; +} + +/** + * Checks if the supplied string is a valid React DOM ID. + * + * @param {string} id A React DOM ID, maybe. + * @return {boolean} True if the string is a valid React DOM ID. + * @private + */ +function isValidID(id) { + return id === '' || ( + id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR + ); +} + +/** + * Checks if the first ID is an ancestor of or equal to the second ID. + * + * @param {string} ancestorID + * @param {string} descendantID + * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`. + * @internal + */ +function isAncestorIDOf(ancestorID, descendantID) { + return ( + descendantID.indexOf(ancestorID) === 0 && + isBoundary(descendantID, ancestorID.length) + ); +} + +/** + * Gets the parent ID of the supplied React DOM ID, `id`. + * + * @param {string} id ID of a component. + * @return {string} ID of the parent, or an empty string. + * @private + */ +function getParentID(id) { + return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : ''; +} + +/** + * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the + * supplied `destinationID`. If they are equal, the ID is returned. + * + * @param {string} ancestorID ID of an ancestor node of `destinationID`. + * @param {string} destinationID ID of the destination node. + * @return {string} Next ID on the path from `ancestorID` to `destinationID`. + * @private + */ +function getNextDescendantID(ancestorID, destinationID) { + ("production" !== "development" ? invariant( + isValidID(ancestorID) && isValidID(destinationID), + 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', + ancestorID, + destinationID + ) : invariant(isValidID(ancestorID) && isValidID(destinationID))); + ("production" !== "development" ? invariant( + isAncestorIDOf(ancestorID, destinationID), + 'getNextDescendantID(...): React has made an invalid assumption about ' + + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', + ancestorID, + destinationID + ) : invariant(isAncestorIDOf(ancestorID, destinationID))); + if (ancestorID === destinationID) { + return ancestorID; + } + // Skip over the ancestor and the immediate separator. Traverse until we hit + // another separator or we reach the end of `destinationID`. + var start = ancestorID.length + SEPARATOR_LENGTH; + var i; + for (i = start; i < destinationID.length; i++) { + if (isBoundary(destinationID, i)) { + break; + } + } + return destinationID.substr(0, i); +} + +/** + * Gets the nearest common ancestor ID of two IDs. + * + * Using this ID scheme, the nearest common ancestor ID is the longest common + * prefix of the two IDs that immediately preceded a "marker" in both strings. + * + * @param {string} oneID + * @param {string} twoID + * @return {string} Nearest common ancestor ID, or the empty string if none. + * @private + */ +function getFirstCommonAncestorID(oneID, twoID) { + var minLength = Math.min(oneID.length, twoID.length); + if (minLength === 0) { + return ''; + } + var lastCommonMarkerIndex = 0; + // Use `<=` to traverse until the "EOL" of the shorter string. + for (var i = 0; i <= minLength; i++) { + if (isBoundary(oneID, i) && isBoundary(twoID, i)) { + lastCommonMarkerIndex = i; + } else if (oneID.charAt(i) !== twoID.charAt(i)) { + break; + } + } + var longestCommonID = oneID.substr(0, lastCommonMarkerIndex); + ("production" !== "development" ? invariant( + isValidID(longestCommonID), + 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', + oneID, + twoID, + longestCommonID + ) : invariant(isValidID(longestCommonID))); + return longestCommonID; +} + +/** + * Traverses the parent path between two IDs (either up or down). The IDs must + * not be the same, and there must exist a parent path between them. If the + * callback returns `false`, traversal is stopped. + * + * @param {?string} start ID at which to start traversal. + * @param {?string} stop ID at which to end traversal. + * @param {function} cb Callback to invoke each ID with. + * @param {?boolean} skipFirst Whether or not to skip the first node. + * @param {?boolean} skipLast Whether or not to skip the last node. + * @private + */ +function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { + start = start || ''; + stop = stop || ''; + ("production" !== "development" ? invariant( + start !== stop, + 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', + start + ) : invariant(start !== stop)); + var traverseUp = isAncestorIDOf(stop, start); + ("production" !== "development" ? invariant( + traverseUp || isAncestorIDOf(start, stop), + 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + + 'not have a parent path.', + start, + stop + ) : invariant(traverseUp || isAncestorIDOf(start, stop))); + // Traverse from `start` to `stop` one depth at a time. + var depth = 0; + var traverse = traverseUp ? getParentID : getNextDescendantID; + for (var id = start; /* until break */; id = traverse(id, stop)) { + var ret; + if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) { + ret = cb(id, traverseUp, arg); + } + if (ret === false || id === stop) { + // Only break //after// visiting `stop`. + break; + } + ("production" !== "development" ? invariant( + depth++ < MAX_TREE_DEPTH, + 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', + start, stop + ) : invariant(depth++ < MAX_TREE_DEPTH)); + } +} + +/** + * Manages the IDs assigned to DOM representations of React components. This + * uses a specific scheme in order to traverse the DOM efficiently (e.g. in + * order to simulate events). + * + * @internal + */ +var ReactInstanceHandles = { + + /** + * Constructs a React root ID + * @return {string} A React root ID. + */ + createReactRootID: function() { + return getReactRootIDString(ReactRootIndex.createReactRootIndex()); + }, + + /** + * Constructs a React ID by joining a root ID with a name. + * + * @param {string} rootID Root ID of a parent component. + * @param {string} name A component's name (as flattened children). + * @return {string} A React ID. + * @internal + */ + createReactID: function(rootID, name) { + return rootID + name; + }, + + /** + * Gets the DOM ID of the React component that is the root of the tree that + * contains the React component with the supplied DOM ID. + * + * @param {string} id DOM ID of a React component. + * @return {?string} DOM ID of the React component that is the root. + * @internal + */ + getReactRootIDFromNodeID: function(id) { + if (id && id.charAt(0) === SEPARATOR && id.length > 1) { + var index = id.indexOf(SEPARATOR, 1); + return index > -1 ? id.substr(0, index) : id; + } + return null; + }, + + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * NOTE: Does not invoke the callback on the nearest common ancestor because + * nothing "entered" or "left" that element. + * + * @param {string} leaveID ID being left. + * @param {string} enterID ID being entered. + * @param {function} cb Callback to invoke on each entered/left ID. + * @param {*} upArg Argument to invoke the callback with on left IDs. + * @param {*} downArg Argument to invoke the callback with on entered IDs. + * @internal + */ + traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) { + var ancestorID = getFirstCommonAncestorID(leaveID, enterID); + if (ancestorID !== leaveID) { + traverseParentPath(leaveID, ancestorID, cb, upArg, false, true); + } + if (ancestorID !== enterID) { + traverseParentPath(ancestorID, enterID, cb, downArg, true, false); + } + }, + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + * + * NOTE: This traversal happens on IDs without touching the DOM. + * + * @param {string} targetID ID of the target node. + * @param {function} cb Callback to invoke. + * @param {*} arg Argument to invoke the callback with. + * @internal + */ + traverseTwoPhase: function(targetID, cb, arg) { + if (targetID) { + traverseParentPath('', targetID, cb, arg, true, false); + traverseParentPath(targetID, '', cb, arg, false, true); + } + }, + + /** + * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For + * example, passing `.0.$row-0.1` would result in `cb` getting called + * with `.0`, `.0.$row-0`, and `.0.$row-0.1`. + * + * NOTE: This traversal happens on IDs without touching the DOM. + * + * @param {string} targetID ID of the target node. + * @param {function} cb Callback to invoke. + * @param {*} arg Argument to invoke the callback with. + * @internal + */ + traverseAncestors: function(targetID, cb, arg) { + traverseParentPath('', targetID, cb, arg, true, false); + }, + + /** + * Exposed for unit testing. + * @private + */ + _getFirstCommonAncestorID: getFirstCommonAncestorID, + + /** + * Exposed for unit testing. + * @private + */ + _getNextDescendantID: getNextDescendantID, + + isAncestorIDOf: isAncestorIDOf, + + SEPARATOR: SEPARATOR + +}; + +module.exports = ReactInstanceHandles; + +},{"150":150,"91":91}],73:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInstanceMap + */ + +'use strict'; + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + +// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); +var ReactInstanceMap = { + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function(key) { + key._reactInternalInstance = undefined; + }, + + get: function(key) { + return key._reactInternalInstance; + }, + + has: function(key) { + return key._reactInternalInstance !== undefined; + }, + + set: function(key, value) { + key._reactInternalInstance = value; + } + +}; + +module.exports = ReactInstanceMap; + +},{}],74:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactLifeCycle + */ + +'use strict'; + +/** + * This module manages the bookkeeping when a component is in the process + * of being mounted or being unmounted. This is used as a way to enforce + * invariants (or warnings) when it is not recommended to call + * setState/forceUpdate. + * + * currentlyMountingInstance: During the construction phase, it is not possible + * to trigger an update since the instance is not fully mounted yet. However, we + * currently allow this as a convenience for mutating the initial state. + * + * currentlyUnmountingInstance: During the unmounting phase, the instance is + * still mounted and can therefore schedule an update. However, this is not + * recommended and probably an error since it's about to be unmounted. + * Therefore we still want to trigger in an error for that case. + */ + +var ReactLifeCycle = { + currentlyMountingInstance: null, + currentlyUnmountingInstance: null +}; + +module.exports = ReactLifeCycle; + +},{}],75:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactLink + * @typechecks static-only + */ + +'use strict'; + +/** + * ReactLink encapsulates a common pattern in which a component wants to modify + * a prop received from its parent. ReactLink allows the parent to pass down a + * value coupled with a callback that, when invoked, expresses an intent to + * modify that value. For example: + * + * React.createClass({ + * getInitialState: function() { + * return {value: ''}; + * }, + * render: function() { + * var valueLink = new ReactLink(this.state.value, this._handleValueChange); + * return <input valueLink={valueLink} />; + * }, + * this._handleValueChange: function(newValue) { + * this.setState({value: newValue}); + * } + * }); + * + * We have provided some sugary mixins to make the creation and + * consumption of ReactLink easier; see LinkedValueUtils and LinkedStateMixin. + */ + +var React = _dereq_(31); + +/** + * @param {*} value current value of the link + * @param {function} requestChange callback to request a change + */ +function ReactLink(value, requestChange) { + this.value = value; + this.requestChange = requestChange; +} + +/** + * Creates a PropType that enforces the ReactLink API and optionally checks the + * type of the value being passed inside the link. Example: + * + * MyComponent.propTypes = { + * tabIndexLink: ReactLink.PropTypes.link(React.PropTypes.number) + * } + */ +function createLinkTypeChecker(linkType) { + var shapes = { + value: typeof linkType === 'undefined' ? + React.PropTypes.any.isRequired : + linkType.isRequired, + requestChange: React.PropTypes.func.isRequired + }; + return React.PropTypes.shape(shapes); +} + +ReactLink.PropTypes = { + link: createLinkTypeChecker +}; + +module.exports = ReactLink; + +},{"31":31}],76:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMarkupChecksum + */ + +'use strict'; + +var adler32 = _dereq_(119); + +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function(markup) { + var checksum = adler32(markup); + return markup.replace( + '>', + ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">' + ); + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function(markup, element) { + var existingChecksum = element.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; + +module.exports = ReactMarkupChecksum; + +},{"119":119}],77:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMount + */ + +'use strict'; + +var DOMProperty = _dereq_(11); +var ReactBrowserEventEmitter = _dereq_(33); +var ReactCurrentOwner = _dereq_(45); +var ReactElement = _dereq_(63); +var ReactElementValidator = _dereq_(64); +var ReactEmptyComponent = _dereq_(65); +var ReactInstanceHandles = _dereq_(72); +var ReactInstanceMap = _dereq_(73); +var ReactMarkupChecksum = _dereq_(76); +var ReactPerf = _dereq_(82); +var ReactReconciler = _dereq_(89); +var ReactUpdateQueue = _dereq_(99); +var ReactUpdates = _dereq_(100); + +var emptyObject = _dereq_(130); +var containsNode = _dereq_(123); +var getReactRootElementInContainer = _dereq_(144); +var instantiateReactComponent = _dereq_(149); +var invariant = _dereq_(150); +var setInnerHTML = _dereq_(164); +var shouldUpdateReactComponent = _dereq_(167); +var warning = _dereq_(171); + +var SEPARATOR = ReactInstanceHandles.SEPARATOR; + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var nodeCache = {}; + +var ELEMENT_NODE_TYPE = 1; +var DOC_NODE_TYPE = 9; + +/** Mapping from reactRootID to React component instance. */ +var instancesByReactRootID = {}; + +/** Mapping from reactRootID to `container` nodes. */ +var containersByReactRootID = {}; + +if ("production" !== "development") { + /** __DEV__-only mapping from reactRootID to root elements. */ + var rootElementsByReactRootID = {}; +} + +// Used to store breadth-first search state in findComponentRoot. +var findComponentRootReusableArray = []; + +/** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ +function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; +} + +/** + * @param {DOMElement} container DOM element that may contain a React component. + * @return {?string} A "reactRoot" ID, if a React component is rendered. + */ +function getReactRootID(container) { + var rootElement = getReactRootElementInContainer(container); + return rootElement && ReactMount.getID(rootElement); +} + +/** + * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form + * element can return its control whose name or ID equals ATTR_NAME. All + * DOM nodes support `getAttributeNode` but this can also get called on + * other objects so just return '' if we're given something other than a + * DOM node (such as window). + * + * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node. + * @return {string} ID of the supplied `domNode`. + */ +function getID(node) { + var id = internalGetID(node); + if (id) { + if (nodeCache.hasOwnProperty(id)) { + var cached = nodeCache[id]; + if (cached !== node) { + ("production" !== "development" ? invariant( + !isValid(cached, id), + 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', + ATTR_NAME, id + ) : invariant(!isValid(cached, id))); + + nodeCache[id] = node; + } + } else { + nodeCache[id] = node; + } + } + + return id; +} + +function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return node && node.getAttribute && node.getAttribute(ATTR_NAME) || ''; +} + +/** + * Sets the React-specific ID of the given node. + * + * @param {DOMElement} node The DOM node whose ID will be set. + * @param {string} id The value of the ID attribute. + */ +function setID(node, id) { + var oldID = internalGetID(node); + if (oldID !== id) { + delete nodeCache[oldID]; + } + node.setAttribute(ATTR_NAME, id); + nodeCache[id] = node; +} + +/** + * Finds the node with the supplied React-generated DOM ID. + * + * @param {string} id A React-generated DOM ID. + * @return {DOMElement} DOM node with the suppled `id`. + * @internal + */ +function getNode(id) { + if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { + nodeCache[id] = ReactMount.findReactNodeByID(id); + } + return nodeCache[id]; +} + +/** + * Finds the node with the supplied public React instance. + * + * @param {*} instance A public React instance. + * @return {?DOMElement} DOM node with the suppled `id`. + * @internal + */ +function getNodeFromInstance(instance) { + var id = ReactInstanceMap.get(instance)._rootNodeID; + if (ReactEmptyComponent.isNullComponentID(id)) { + return null; + } + if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { + nodeCache[id] = ReactMount.findReactNodeByID(id); + } + return nodeCache[id]; +} + +/** + * A node is "valid" if it is contained by a currently mounted container. + * + * This means that the node does not have to be contained by a document in + * order to be considered valid. + * + * @param {?DOMElement} node The candidate DOM node. + * @param {string} id The expected ID of the node. + * @return {boolean} Whether the node is contained by a mounted container. + */ +function isValid(node, id) { + if (node) { + ("production" !== "development" ? invariant( + internalGetID(node) === id, + 'ReactMount: Unexpected modification of `%s`', + ATTR_NAME + ) : invariant(internalGetID(node) === id)); + + var container = ReactMount.findReactContainerForID(id); + if (container && containsNode(container, node)) { + return true; + } + } + + return false; +} + +/** + * Causes the cache to forget about one React-specific ID. + * + * @param {string} id The ID to forget. + */ +function purgeID(id) { + delete nodeCache[id]; +} + +var deepestNodeSoFar = null; +function findDeepestCachedAncestorImpl(ancestorID) { + var ancestor = nodeCache[ancestorID]; + if (ancestor && isValid(ancestor, ancestorID)) { + deepestNodeSoFar = ancestor; + } else { + // This node isn't populated in the cache, so presumably none of its + // descendants are. Break out of the loop. + return false; + } +} + +/** + * Return the deepest cached node whose ID is a prefix of `targetID`. + */ +function findDeepestCachedAncestor(targetID) { + deepestNodeSoFar = null; + ReactInstanceHandles.traverseAncestors( + targetID, + findDeepestCachedAncestorImpl + ); + + var foundNode = deepestNodeSoFar; + deepestNodeSoFar = null; + return foundNode; +} + +/** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {string} rootID DOM ID of the root node. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function mountComponentIntoNode( + componentInstance, + rootID, + container, + transaction, + shouldReuseMarkup) { + var markup = ReactReconciler.mountComponent( + componentInstance, rootID, transaction, emptyObject + ); + componentInstance._isTopLevel = true; + ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup); +} + +/** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {string} rootID DOM ID of the root node. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function batchedMountComponentIntoNode( + componentInstance, + rootID, + container, + shouldReuseMarkup) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); + transaction.perform( + mountComponentIntoNode, + null, + componentInstance, + rootID, + container, + transaction, + shouldReuseMarkup + ); + ReactUpdates.ReactReconcileTransaction.release(transaction); +} + +/** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ +var ReactMount = { + /** Exposed for debugging purposes **/ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function(container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function( + prevComponent, + nextElement, + container, + callback) { + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps(nextElement); + } + + ReactMount.scrollMonitor(container, function() { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + if ("production" !== "development") { + // Record the root element in case it later gets transplanted. + rootElementsByReactRootID[getReactRootID(container)] = + getReactRootElementInContainer(container); + } + + return prevComponent; + }, + + /** + * Register a component into the instance map and starts scroll value + * monitoring + * @param {ReactComponent} nextComponent component instance to render + * @param {DOMElement} container container to render into + * @return {string} reactRoot ID prefix + */ + _registerComponent: function(nextComponent, container) { + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + '_registerComponent(...): Target container is not a DOM element.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + + var reactRootID = ReactMount.registerContainer(container); + instancesByReactRootID[reactRootID] = nextComponent; + return reactRootID; + }, + + /** + * Render a new component into the DOM. + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function( + nextElement, + container, + shouldReuseMarkup + ) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + '_renderNewRootComponent(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from ' + + 'render is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + var componentInstance = instantiateReactComponent(nextElement, null); + var reactRootID = ReactMount._registerComponent( + componentInstance, + container + ); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates( + batchedMountComponentIntoNode, + componentInstance, + reactRootID, + container, + shouldReuseMarkup + ); + + if ("production" !== "development") { + // Record the root element in case it later gets transplanted. + rootElementsByReactRootID[reactRootID] = + getReactRootElementInContainer(container); + } + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function(nextElement, container, callback) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(nextElement), + 'React.render(): Invalid component element.%s', + ( + typeof nextElement === 'string' ? + ' Instead of passing an element string, make sure to instantiate ' + + 'it by passing it to React.createElement.' : + typeof nextElement === 'function' ? + ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? + ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' : + '' + ) + ) : invariant(ReactElement.isValidElement(nextElement))); + + var prevComponent = instancesByReactRootID[getReactRootID(container)]; + + if (prevComponent) { + var prevElement = prevComponent._currentElement; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + return ReactMount._updateRootComponent( + prevComponent, + nextElement, + container, + callback + ).getPublicInstance(); + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = + reactRootElement && ReactMount.isRenderedByReact(reactRootElement); + + if ("production" !== "development") { + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (ReactMount.isRenderedByReact(rootElementSibling)) { + ("production" !== "development" ? warning( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.' + ) : null); + break; + } + + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent; + + var component = ReactMount._renderNewRootComponent( + nextElement, + container, + shouldReuseMarkup + ).getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Constructs a component instance of `constructor` with `initialProps` and + * renders it into the supplied `container`. + * + * @param {function} constructor React component constructor. + * @param {?object} props Initial props of the component instance. + * @param {DOMElement} container DOM element to render into. + * @return {ReactComponent} Component instance rendered in `container`. + */ + constructAndRenderComponent: function(constructor, props, container) { + var element = ReactElement.createElement(constructor, props); + return ReactMount.render(element, container); + }, + + /** + * Constructs a component instance of `constructor` with `initialProps` and + * renders it into a container node identified by supplied `id`. + * + * @param {function} componentConstructor React component constructor + * @param {?object} props Initial props of the component instance. + * @param {string} id ID of the DOM element to render into. + * @return {ReactComponent} Component instance rendered in the container node. + */ + constructAndRenderComponentByID: function(constructor, props, id) { + var domNode = document.getElementById(id); + ("production" !== "development" ? invariant( + domNode, + 'Tried to get element with id of "%s" but it is not present on the page.', + id + ) : invariant(domNode)); + return ReactMount.constructAndRenderComponent(constructor, props, domNode); + }, + + /** + * Registers a container node into which React components will be rendered. + * This also creates the "reactRoot" ID that will be assigned to the element + * rendered within. + * + * @param {DOMElement} container DOM element to register as a container. + * @return {string} The "reactRoot" ID of elements rendered within. + */ + registerContainer: function(container) { + var reactRootID = getReactRootID(container); + if (reactRootID) { + // If one exists, make sure it is a valid "reactRoot" ID. + reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID); + } + if (!reactRootID) { + // No valid "reactRoot" ID found, create one. + reactRootID = ReactInstanceHandles.createReactRootID(); + } + containersByReactRootID[reactRootID] = container; + return reactRootID; + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function(container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + 'unmountComponentAtNode(): Render methods should be a pure function of ' + + 'props and state; triggering nested component updates from render is ' + + 'not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + 'unmountComponentAtNode(...): Target container is not a DOM element.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + var reactRootID = getReactRootID(container); + var component = instancesByReactRootID[reactRootID]; + if (!component) { + return false; + } + ReactMount.unmountComponentFromNode(component, container); + delete instancesByReactRootID[reactRootID]; + delete containersByReactRootID[reactRootID]; + if ("production" !== "development") { + delete rootElementsByReactRootID[reactRootID]; + } + return true; + }, + + /** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ + unmountComponentFromNode: function(instance, container) { + ReactReconciler.unmountComponent(instance); + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } + }, + + /** + * Finds the container DOM element that contains React component to which the + * supplied DOM `id` belongs. + * + * @param {string} id The ID of an element rendered by a React component. + * @return {?DOMElement} DOM element that contains the `id`. + */ + findReactContainerForID: function(id) { + var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id); + var container = containersByReactRootID[reactRootID]; + + if ("production" !== "development") { + var rootElement = rootElementsByReactRootID[reactRootID]; + if (rootElement && rootElement.parentNode !== container) { + ("production" !== "development" ? invariant( + // Call internalGetID here because getID calls isValid which calls + // findReactContainerForID (this function). + internalGetID(rootElement) === reactRootID, + 'ReactMount: Root element ID differed from reactRootID.' + ) : invariant(// Call internalGetID here because getID calls isValid which calls + // findReactContainerForID (this function). + internalGetID(rootElement) === reactRootID)); + + var containerChild = container.firstChild; + if (containerChild && + reactRootID === internalGetID(containerChild)) { + // If the container has a new child with the same ID as the old + // root element, then rootElementsByReactRootID[reactRootID] is + // just stale and needs to be updated. The case that deserves a + // warning is when the container is empty. + rootElementsByReactRootID[reactRootID] = containerChild; + } else { + ("production" !== "development" ? warning( + false, + 'ReactMount: Root element has been removed from its original ' + + 'container. New container:', rootElement.parentNode + ) : null); + } + } + } + + return container; + }, + + /** + * Finds an element rendered by React with the supplied ID. + * + * @param {string} id ID of a DOM node in the React component. + * @return {DOMElement} Root DOM node of the React component. + */ + findReactNodeByID: function(id) { + var reactRoot = ReactMount.findReactContainerForID(id); + return ReactMount.findComponentRoot(reactRoot, id); + }, + + /** + * True if the supplied `node` is rendered by React. + * + * @param {*} node DOM Element to check. + * @return {boolean} True if the DOM Element appears to be rendered by React. + * @internal + */ + isRenderedByReact: function(node) { + if (node.nodeType !== 1) { + // Not a DOMElement, therefore not a React component + return false; + } + var id = ReactMount.getID(node); + return id ? id.charAt(0) === SEPARATOR : false; + }, + + /** + * Traverses up the ancestors of the supplied node to find a node that is a + * DOM representation of a React component. + * + * @param {*} node + * @return {?DOMEventTarget} + * @internal + */ + getFirstReactDOM: function(node) { + var current = node; + while (current && current.parentNode !== current) { + if (ReactMount.isRenderedByReact(current)) { + return current; + } + current = current.parentNode; + } + return null; + }, + + /** + * Finds a node with the supplied `targetID` inside of the supplied + * `ancestorNode`. Exploits the ID naming scheme to perform the search + * quickly. + * + * @param {DOMEventTarget} ancestorNode Search from this root. + * @pararm {string} targetID ID of the DOM representation of the component. + * @return {DOMEventTarget} DOM node with the supplied `targetID`. + * @internal + */ + findComponentRoot: function(ancestorNode, targetID) { + var firstChildren = findComponentRootReusableArray; + var childIndex = 0; + + var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode; + + firstChildren[0] = deepestAncestor.firstChild; + firstChildren.length = 1; + + while (childIndex < firstChildren.length) { + var child = firstChildren[childIndex++]; + var targetChild; + + while (child) { + var childID = ReactMount.getID(child); + if (childID) { + // Even if we find the node we're looking for, we finish looping + // through its siblings to ensure they're cached so that we don't have + // to revisit this node again. Otherwise, we make n^2 calls to getID + // when visiting the many children of a single node in order. + + if (targetID === childID) { + targetChild = child; + } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) { + // If we find a child whose ID is an ancestor of the given ID, + // then we can be sure that we only want to search the subtree + // rooted at this child, so we can throw out the rest of the + // search state. + firstChildren.length = childIndex = 0; + firstChildren.push(child.firstChild); + } + + } else { + // If this child had no ID, then there's a chance that it was + // injected automatically by the browser, as when a `<table>` + // element sprouts an extra `<tbody>` child as a side effect of + // `.innerHTML` parsing. Optimistically continue down this + // branch, but not before examining the other siblings. + firstChildren.push(child.firstChild); + } + + child = child.nextSibling; + } + + if (targetChild) { + // Emptying firstChildren/findComponentRootReusableArray is + // not necessary for correctness, but it helps the GC reclaim + // any nodes that were left at the end of the search. + firstChildren.length = 0; + + return targetChild; + } + } + + firstChildren.length = 0; + + ("production" !== "development" ? invariant( + false, + 'findComponentRoot(..., %s): Unable to find element. This probably ' + + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + + 'parent. ' + + 'Try inspecting the child nodes of the element with React ID `%s`.', + targetID, + ReactMount.getID(ancestorNode) + ) : invariant(false)); + }, + + _mountImageIntoNode: function(markup, container, shouldReuseMarkup) { + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + 'mountComponentIntoNode(...): Target container is not valid.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + return; + } else { + var checksum = rootElement.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME, + checksum + ); + + var diffIndex = firstDifferenceIndex(markup, rootMarkup); + var difference = ' (client) ' + + markup.substring(diffIndex - 20, diffIndex + 20) + + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + ("production" !== "development" ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document using ' + + 'server rendering but the checksum was invalid. This usually ' + + 'means you rendered a different component type or props on ' + + 'the client from the one on the server, or your render() ' + + 'methods are impure. React cannot handle this case due to ' + + 'cross-browser quirks by rendering at the document root. You ' + + 'should look for environment dependent code in your components ' + + 'and ensure the props are the same client and server side:\n%s', + difference + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + false, + 'React attempted to reuse markup in a container but the ' + + 'checksum was invalid. This generally means that you are ' + + 'using server rendering and the markup generated on the ' + + 'server was not what the client was expecting. React injected ' + + 'new markup to compensate which works but you have lost many ' + + 'of the benefits of server rendering. Instead, figure out ' + + 'why the markup being generated is different on the client ' + + 'or server:\n%s', + difference + ) : null); + } + } + } + + ("production" !== "development" ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document but ' + + 'you didn\'t use server rendering. We can\'t do this ' + + 'without using server rendering due to cross-browser quirks. ' + + 'See React.renderToString() for server rendering.' + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); + + setInnerHTML(container, markup); + }, + + /** + * React ID utilities. + */ + + getReactRootID: getReactRootID, + + getID: getID, + + setID: setID, + + getNode: getNode, + + getNodeFromInstance: getNodeFromInstance, + + purgeID: purgeID +}; + +ReactPerf.measureMethods(ReactMount, 'ReactMount', { + _renderNewRootComponent: '_renderNewRootComponent', + _mountImageIntoNode: '_mountImageIntoNode' +}); + +module.exports = ReactMount; + +},{"100":100,"11":11,"123":123,"130":130,"144":144,"149":149,"150":150,"164":164,"167":167,"171":171,"33":33,"45":45,"63":63,"64":64,"65":65,"72":72,"73":73,"76":76,"82":82,"89":89,"99":99}],78:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMultiChild + * @typechecks static-only + */ + +'use strict'; + +var ReactComponentEnvironment = _dereq_(41); +var ReactMultiChildUpdateTypes = _dereq_(79); + +var ReactReconciler = _dereq_(89); +var ReactChildReconciler = _dereq_(36); + +/** + * Updating children of a component may trigger recursive updates. The depth is + * used to batch recursive updates to render markup more efficiently. + * + * @type {number} + * @private + */ +var updateDepth = 0; + +/** + * Queue of update configuration objects. + * + * Each object has a `type` property that is in `ReactMultiChildUpdateTypes`. + * + * @type {array<object>} + * @private + */ +var updateQueue = []; + +/** + * Queue of markup to be rendered. + * + * @type {array<string>} + * @private + */ +var markupQueue = []; + +/** + * Enqueues markup to be rendered and inserted at a supplied index. + * + * @param {string} parentID ID of the parent component. + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ +function enqueueMarkup(parentID, markup, toIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.INSERT_MARKUP, + markupIndex: markupQueue.push(markup) - 1, + textContent: null, + fromIndex: null, + toIndex: toIndex + }); +} + +/** + * Enqueues moving an existing element to another index. + * + * @param {string} parentID ID of the parent component. + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ +function enqueueMove(parentID, fromIndex, toIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.MOVE_EXISTING, + markupIndex: null, + textContent: null, + fromIndex: fromIndex, + toIndex: toIndex + }); +} + +/** + * Enqueues removing an element at an index. + * + * @param {string} parentID ID of the parent component. + * @param {number} fromIndex Index of the element to remove. + * @private + */ +function enqueueRemove(parentID, fromIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.REMOVE_NODE, + markupIndex: null, + textContent: null, + fromIndex: fromIndex, + toIndex: null + }); +} + +/** + * Enqueues setting the text content. + * + * @param {string} parentID ID of the parent component. + * @param {string} textContent Text content to set. + * @private + */ +function enqueueTextContent(parentID, textContent) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.TEXT_CONTENT, + markupIndex: null, + textContent: textContent, + fromIndex: null, + toIndex: null + }); +} + +/** + * Processes any enqueued updates. + * + * @private + */ +function processQueue() { + if (updateQueue.length) { + ReactComponentEnvironment.processChildrenUpdates( + updateQueue, + markupQueue + ); + clearQueue(); + } +} + +/** + * Clears any enqueued updates. + * + * @private + */ +function clearQueue() { + updateQueue.length = 0; + markupQueue.length = 0; +} + +/** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ +var ReactMultiChild = { + + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function(nestedChildren, transaction, context) { + var children = ReactChildReconciler.instantiateChildren( + nestedChildren, transaction, context + ); + this._renderedChildren = children; + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + // Inlined for performance, see `ReactInstanceHandles.createReactID`. + var rootID = this._rootNodeID + name; + var mountImage = ReactReconciler.mountComponent( + child, + rootID, + transaction, + context + ); + child._mountIndex = index; + mountImages.push(mountImage); + index++; + } + } + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function(nextContent) { + updateDepth++; + var errorThrown = true; + try { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren); + // TODO: The setTextContent operation should be enough + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + this._unmountChildByName(prevChildren[name], name); + } + } + // Set new text content. + this.setTextContent(nextContent); + errorThrown = false; + } finally { + updateDepth--; + if (!updateDepth) { + if (errorThrown) { + clearQueue(); + } else { + processQueue(); + } + } + } + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildren Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function(nextNestedChildren, transaction, context) { + updateDepth++; + var errorThrown = true; + try { + this._updateChildren(nextNestedChildren, transaction, context); + errorThrown = false; + } finally { + updateDepth--; + if (!updateDepth) { + if (errorThrown) { + clearQueue(); + } else { + processQueue(); + } + } + + } + }, + + /** + * Improve performance by isolating this hot code path from the try/catch + * block in `updateChildren`. + * + * @param {?object} nextNestedChildren Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function(nextNestedChildren, transaction, context) { + var prevChildren = this._renderedChildren; + var nextChildren = ReactChildReconciler.updateChildren( + prevChildren, nextNestedChildren, transaction, context + ); + this._renderedChildren = nextChildren; + if (!nextChildren && !prevChildren) { + return; + } + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var lastIndex = 0; + var nextIndex = 0; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + this.moveChild(prevChild, nextIndex, lastIndex); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + this._unmountChildByName(prevChild, name); + } + // The child must be instantiated before it's mounted. + this._mountChildByNameAtIndex( + nextChild, name, nextIndex, transaction, context + ); + } + nextIndex++; + } + // Remove children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && + !(nextChildren && nextChildren.hasOwnProperty(name))) { + this._unmountChildByName(prevChildren[name], name); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @internal + */ + unmountChildren: function() { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function(child, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + enqueueMove(this._rootNodeID, child._mountIndex, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function(child, mountImage) { + enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function(child) { + enqueueRemove(this._rootNodeID, child._mountIndex); + }, + + /** + * Sets this text content string. + * + * @param {string} textContent Text content to set. + * @protected + */ + setTextContent: function(textContent) { + enqueueTextContent(this._rootNodeID, textContent); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildByNameAtIndex: function( + child, + name, + index, + transaction, + context) { + // Inlined for performance, see `ReactInstanceHandles.createReactID`. + var rootID = this._rootNodeID + name; + var mountImage = ReactReconciler.mountComponent( + child, + rootID, + transaction, + context + ); + child._mountIndex = index; + this.createChild(child, mountImage); + }, + + /** + * Unmounts a rendered child by name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @param {string} name Name of the child in `this._renderedChildren`. + * @private + */ + _unmountChildByName: function(child, name) { + this.removeChild(child); + child._mountIndex = null; + } + + } + +}; + +module.exports = ReactMultiChild; + +},{"36":36,"41":41,"79":79,"89":89}],79:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMultiChildUpdateTypes + */ + +'use strict'; + +var keyMirror = _dereq_(156); + +/** + * When a component's children are updated, a series of update configuration + * objects are created in order to batch and serialize the required changes. + * + * Enumerates all the possible types of update configurations. + * + * @internal + */ +var ReactMultiChildUpdateTypes = keyMirror({ + INSERT_MARKUP: null, + MOVE_EXISTING: null, + REMOVE_NODE: null, + TEXT_CONTENT: null +}); + +module.exports = ReactMultiChildUpdateTypes; + +},{"156":156}],80:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactNativeComponent + */ + +'use strict'; + +var assign = _dereq_(29); +var invariant = _dereq_(150); + +var autoGenerateWrapperClass = null; +var genericComponentClass = null; +// This registry keeps track of wrapper classes around native tags +var tagToComponentClass = {}; +var textComponentClass = null; + +var ReactNativeComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function(componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function(componentClass) { + textComponentClass = componentClass; + }, + // This accepts a keyed object with classes as values. Each key represents a + // tag. That particular tag will use this class instead of the generic one. + injectComponentClasses: function(componentClasses) { + assign(tagToComponentClass, componentClasses); + }, + // Temporary hack since we expect DOM refs to behave like composites, + // for this release. + injectAutoWrapper: function(wrapperFactory) { + autoGenerateWrapperClass = wrapperFactory; + } +}; + +/** + * Get a composite component wrapper class for a specific tag. + * + * @param {ReactElement} element The tag for which to get the class. + * @return {function} The React class constructor function. + */ +function getComponentClassForElement(element) { + if (typeof element.type === 'function') { + return element.type; + } + var tag = element.type; + var componentClass = tagToComponentClass[tag]; + if (componentClass == null) { + tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag); + } + return componentClass; +} + +/** + * Get a native internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ +function createInternalComponent(element) { + ("production" !== "development" ? invariant( + genericComponentClass, + 'There is no registered component for the tag %s', + element.type + ) : invariant(genericComponentClass)); + return new genericComponentClass(element.type, element.props); +} + +/** + * @param {ReactText} text + * @return {ReactComponent} + */ +function createInstanceForText(text) { + return new textComponentClass(text); +} + +/** + * @param {ReactComponent} component + * @return {boolean} + */ +function isTextComponent(component) { + return component instanceof textComponentClass; +} + +var ReactNativeComponent = { + getComponentClassForElement: getComponentClassForElement, + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactNativeComponentInjection +}; + +module.exports = ReactNativeComponent; + +},{"150":150,"29":29}],81:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactOwner + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + isValidOwner: function(object) { + return !!( + (object && + typeof object.attachRef === 'function' && typeof object.detachRef === 'function') + ); + }, + + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function(component, ref, owner) { + ("production" !== "development" ? invariant( + ReactOwner.isValidOwner(owner), + 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to add a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function(component, ref, owner) { + ("production" !== "development" ? invariant( + ReactOwner.isValidOwner(owner), + 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to remove a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); + // Check that `component` is still the current ref because we do not want to + // detach the ref if another component stole it. + if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + } + +}; + +module.exports = ReactOwner; + +},{"150":150}],82:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPerf + * @typechecks static-only + */ + +'use strict'; + +/** + * ReactPerf is a general AOP system designed to measure performance. This + * module only has the hooks: see ReactDefaultPerf for the analysis tool. + */ +var ReactPerf = { + /** + * Boolean to enable/disable measurement. Set to false by default to prevent + * accidental logging and perf loss. + */ + enableMeasure: false, + + /** + * Holds onto the measure function in use. By default, don't measure + * anything, but we'll override this if we inject a measure function. + */ + storedMeasure: _noMeasure, + + /** + * @param {object} object + * @param {string} objectName + * @param {object<string>} methodNames + */ + measureMethods: function(object, objectName, methodNames) { + if ("production" !== "development") { + for (var key in methodNames) { + if (!methodNames.hasOwnProperty(key)) { + continue; + } + object[key] = ReactPerf.measure( + objectName, + methodNames[key], + object[key] + ); + } + } + }, + + /** + * Use this to wrap methods you want to measure. Zero overhead in production. + * + * @param {string} objName + * @param {string} fnName + * @param {function} func + * @return {function} + */ + measure: function(objName, fnName, func) { + if ("production" !== "development") { + var measuredFunc = null; + var wrapper = function() { + if (ReactPerf.enableMeasure) { + if (!measuredFunc) { + measuredFunc = ReactPerf.storedMeasure(objName, fnName, func); + } + return measuredFunc.apply(this, arguments); + } + return func.apply(this, arguments); + }; + wrapper.displayName = objName + '_' + fnName; + return wrapper; + } + return func; + }, + + injection: { + /** + * @param {function} measure + */ + injectMeasure: function(measure) { + ReactPerf.storedMeasure = measure; + } + } +}; + +/** + * Simply passes through the measured function, without measuring it. + * + * @param {string} objName + * @param {string} fnName + * @param {function} func + * @return {function} + */ +function _noMeasure(objName, fnName, func) { + return func; +} + +module.exports = ReactPerf; + +},{}],83:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTransferer + */ + +'use strict'; + +var assign = _dereq_(29); +var emptyFunction = _dereq_(129); +var joinClasses = _dereq_(155); + +/** + * Creates a transfer strategy that will merge prop values using the supplied + * `mergeStrategy`. If a prop was previously unset, this just sets it. + * + * @param {function} mergeStrategy + * @return {function} + */ +function createTransferStrategy(mergeStrategy) { + return function(props, key, value) { + if (!props.hasOwnProperty(key)) { + props[key] = value; + } else { + props[key] = mergeStrategy(props[key], value); + } + }; +} + +var transferStrategyMerge = createTransferStrategy(function(a, b) { + // `merge` overrides the first object's (`props[key]` above) keys using the + // second object's (`value`) keys. An object's style's existing `propA` would + // get overridden. Flip the order here. + return assign({}, b, a); +}); + +/** + * Transfer strategies dictate how props are transferred by `transferPropsTo`. + * NOTE: if you add any more exceptions to this list you should be sure to + * update `cloneWithProps()` accordingly. + */ +var TransferStrategies = { + /** + * Never transfer `children`. + */ + children: emptyFunction, + /** + * Transfer the `className` prop by merging them. + */ + className: createTransferStrategy(joinClasses), + /** + * Transfer the `style` prop (which is an object) by merging them. + */ + style: transferStrategyMerge +}; + +/** + * Mutates the first argument by transferring the properties from the second + * argument. + * + * @param {object} props + * @param {object} newProps + * @return {object} + */ +function transferInto(props, newProps) { + for (var thisKey in newProps) { + if (!newProps.hasOwnProperty(thisKey)) { + continue; + } + + var transferStrategy = TransferStrategies[thisKey]; + + if (transferStrategy && TransferStrategies.hasOwnProperty(thisKey)) { + transferStrategy(props, thisKey, newProps[thisKey]); + } else if (!props.hasOwnProperty(thisKey)) { + props[thisKey] = newProps[thisKey]; + } + } + return props; +} + +/** + * ReactPropTransferer are capable of transferring props to another component + * using a `transferPropsTo` method. + * + * @class ReactPropTransferer + */ +var ReactPropTransferer = { + + /** + * Merge two props objects using TransferStrategies. + * + * @param {object} oldProps original props (they take precedence) + * @param {object} newProps new props to merge in + * @return {object} a new object containing both sets of props merged. + */ + mergeProps: function(oldProps, newProps) { + return transferInto(assign({}, oldProps), newProps); + } + +}; + +module.exports = ReactPropTransferer; + +},{"129":129,"155":155,"29":29}],84:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypeLocationNames + */ + +'use strict'; + +var ReactPropTypeLocationNames = {}; + +if ("production" !== "development") { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} + +module.exports = ReactPropTypeLocationNames; + +},{}],85:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypeLocations + */ + +'use strict'; + +var keyMirror = _dereq_(156); + +var ReactPropTypeLocations = keyMirror({ + prop: null, + context: null, + childContext: null +}); + +module.exports = ReactPropTypeLocations; + +},{"156":156}],86:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypes + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactFragment = _dereq_(69); +var ReactPropTypeLocationNames = _dereq_(84); + +var emptyFunction = _dereq_(129); + +/** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + +var ANONYMOUS = '<<anonymous>>'; + +var elementTypeChecker = createElementTypeChecker(); +var nodeTypeChecker = createNodeChecker(); + +var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: elementTypeChecker, + instanceOf: createInstanceTypeChecker, + node: nodeTypeChecker, + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker +}; + +function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName, location) { + componentName = componentName || ANONYMOUS; + if (props[propName] == null) { + var locationName = ReactPropTypeLocationNames[location]; + if (isRequired) { + return new Error( + ("Required " + locationName + " `" + propName + "` was not specified in ") + + ("`" + componentName + "`.") + ); + } + return null; + } else { + return validate(props, propName, componentName, location); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; +} + +function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + var locationName = ReactPropTypeLocationNames[location]; + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` ") + + ("supplied to `" + componentName + "`, expected `" + expectedType + "`.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturns(null)); +} + +function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var locationName = ReactPropTypeLocationNames[location]; + var propType = getPropType(propValue); + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type ") + + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.") + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createElementTypeChecker() { + function validate(props, propName, componentName, location) { + if (!ReactElement.isValidElement(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected a ReactElement.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location) { + if (!(props[propName] instanceof expectedClass)) { + var locationName = ReactPropTypeLocationNames[location]; + var expectedClassName = expectedClass.name || ANONYMOUS; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected instance of `" + expectedClassName + "`.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createEnumTypeChecker(expectedValues) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (propValue === expectedValues[i]) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + var valuesString = JSON.stringify(expectedValues); + return new Error( + ("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` ") + + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".") + ); + } + return createChainableTypeChecker(validate); +} + +function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type ") + + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.") + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createUnionTypeChecker(arrayOfTypeCheckers) { + function validate(props, propName, componentName, location) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location) == null) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`.") + ); + } + return createChainableTypeChecker(validate); +} + +function createNodeChecker() { + function validate(props, propName, componentName, location) { + if (!isNode(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected a ReactNode.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` ") + + ("supplied to `" + componentName + "`, expected `object`.") + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || ReactElement.isValidElement(propValue)) { + return true; + } + propValue = ReactFragment.extractIfFragment(propValue); + for (var k in propValue) { + if (!isNode(propValue[k])) { + return false; + } + } + return true; + default: + return false; + } +} + +// Equivalent of `typeof` but with special handling for array and regexp. +function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + return propType; +} + +// This handles more types than `getPropType`. Only used for error messages. +// See `createPrimitiveTypeChecker`. +function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; +} + +module.exports = ReactPropTypes; + +},{"129":129,"63":63,"69":69,"84":84}],87:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPutListenerQueue + */ + +'use strict'; + +var PooledClass = _dereq_(30); +var ReactBrowserEventEmitter = _dereq_(33); + +var assign = _dereq_(29); + +function ReactPutListenerQueue() { + this.listenersToPut = []; +} + +assign(ReactPutListenerQueue.prototype, { + enqueuePutListener: function(rootNodeID, propKey, propValue) { + this.listenersToPut.push({ + rootNodeID: rootNodeID, + propKey: propKey, + propValue: propValue + }); + }, + + putListeners: function() { + for (var i = 0; i < this.listenersToPut.length; i++) { + var listenerToPut = this.listenersToPut[i]; + ReactBrowserEventEmitter.putListener( + listenerToPut.rootNodeID, + listenerToPut.propKey, + listenerToPut.propValue + ); + } + }, + + reset: function() { + this.listenersToPut.length = 0; + }, + + destructor: function() { + this.reset(); + } +}); + +PooledClass.addPoolingTo(ReactPutListenerQueue); + +module.exports = ReactPutListenerQueue; + +},{"29":29,"30":30,"33":33}],88:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactReconcileTransaction + * @typechecks static-only + */ + +'use strict'; + +var CallbackQueue = _dereq_(7); +var PooledClass = _dereq_(30); +var ReactBrowserEventEmitter = _dereq_(33); +var ReactInputSelection = _dereq_(71); +var ReactPutListenerQueue = _dereq_(87); +var Transaction = _dereq_(116); + +var assign = _dereq_(29); + +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; + +/** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function() { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occured. `close` + * restores the previous value. + */ + close: function(previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; + +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function() { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function() { + this.reactMountReady.notifyAll(); + } +}; + +var PUT_LISTENER_QUEUEING = { + initialize: function() { + this.putListenerQueue.reset(); + }, + + close: function() { + this.putListenerQueue.putListeners(); + } +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [ + PUT_LISTENER_QUEUEING, + SELECTION_RESTORATION, + EVENT_SUPPRESSION, + ON_DOM_READY_QUEUEING +]; + +/** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ +function ReactReconcileTransaction() { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.putListenerQueue = ReactPutListenerQueue.getPooled(); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap proceedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function() { + return this.reactMountReady; + }, + + getPutListenerQueue: function() { + return this.putListenerQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be resused. + */ + destructor: function() { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + + ReactPutListenerQueue.release(this.putListenerQueue); + this.putListenerQueue = null; + } +}; + + +assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; + +},{"116":116,"29":29,"30":30,"33":33,"7":7,"71":71,"87":87}],89:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactReconciler + */ + +'use strict'; + +var ReactRef = _dereq_(90); +var ReactElementValidator = _dereq_(64); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function(internalInstance, rootID, transaction, context) { + var markup = internalInstance.mountComponent(rootID, transaction, context); + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps( + internalInstance._currentElement + ); + } + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + return markup; + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function(internalInstance) { + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(); + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function( + internalInstance, nextElement, transaction, context + ) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && nextElement._owner != null) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + return; + } + + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps(nextElement); + } + + var refsChanged = ReactRef.shouldUpdateRefs( + prevElement, + nextElement + ); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function( + internalInstance, + transaction + ) { + internalInstance.performUpdateIfNecessary(transaction); + } + +}; + +module.exports = ReactReconciler; + +},{"64":64,"90":90}],90:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactRef + */ + +'use strict'; + +var ReactOwner = _dereq_(81); + +var ReactRef = {}; + +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} + +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} + +ReactRef.attachRefs = function(instance, element) { + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; + +ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + return ( + nextElement._owner !== prevElement._owner || + nextElement.ref !== prevElement.ref + ); +}; + +ReactRef.detachRefs = function(instance, element) { + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } +}; + +module.exports = ReactRef; + +},{"81":81}],91:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactRootIndex + * @typechecks + */ + +'use strict'; + +var ReactRootIndexInjection = { + /** + * @param {function} _createReactRootIndex + */ + injectCreateReactRootIndex: function(_createReactRootIndex) { + ReactRootIndex.createReactRootIndex = _createReactRootIndex; + } +}; + +var ReactRootIndex = { + createReactRootIndex: null, + injection: ReactRootIndexInjection +}; + +module.exports = ReactRootIndex; + +},{}],92:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks static-only + * @providesModule ReactServerRendering + */ +'use strict'; + +var ReactElement = _dereq_(63); +var ReactInstanceHandles = _dereq_(72); +var ReactMarkupChecksum = _dereq_(76); +var ReactServerRenderingTransaction = + _dereq_(93); + +var emptyObject = _dereq_(130); +var instantiateReactComponent = _dereq_(149); +var invariant = _dereq_(150); + +/** + * @param {ReactElement} element + * @return {string} the HTML markup + */ +function renderToString(element) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(element), + 'renderToString(): You must pass a valid ReactElement.' + ) : invariant(ReactElement.isValidElement(element))); + + var transaction; + try { + var id = ReactInstanceHandles.createReactRootID(); + transaction = ReactServerRenderingTransaction.getPooled(false); + + return transaction.perform(function() { + var componentInstance = instantiateReactComponent(element, null); + var markup = + componentInstance.mountComponent(id, transaction, emptyObject); + return ReactMarkupChecksum.addChecksumToMarkup(markup); + }, null); + } finally { + ReactServerRenderingTransaction.release(transaction); + } +} + +/** + * @param {ReactElement} element + * @return {string} the HTML markup, without the extra React ID and checksum + * (for generating static pages) + */ +function renderToStaticMarkup(element) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(element), + 'renderToStaticMarkup(): You must pass a valid ReactElement.' + ) : invariant(ReactElement.isValidElement(element))); + + var transaction; + try { + var id = ReactInstanceHandles.createReactRootID(); + transaction = ReactServerRenderingTransaction.getPooled(true); + + return transaction.perform(function() { + var componentInstance = instantiateReactComponent(element, null); + return componentInstance.mountComponent(id, transaction, emptyObject); + }, null); + } finally { + ReactServerRenderingTransaction.release(transaction); + } +} + +module.exports = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup +}; + +},{"130":130,"149":149,"150":150,"63":63,"72":72,"76":76,"93":93}],93:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactServerRenderingTransaction + * @typechecks + */ + +'use strict'; + +var PooledClass = _dereq_(30); +var CallbackQueue = _dereq_(7); +var ReactPutListenerQueue = _dereq_(87); +var Transaction = _dereq_(116); + +var assign = _dereq_(29); +var emptyFunction = _dereq_(129); + +/** + * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks + * during the performing of the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function() { + this.reactMountReady.reset(); + }, + + close: emptyFunction +}; + +var PUT_LISTENER_QUEUEING = { + initialize: function() { + this.putListenerQueue.reset(); + }, + + close: emptyFunction +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [ + PUT_LISTENER_QUEUEING, + ON_DOM_READY_QUEUEING +]; + +/** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.reactMountReady = CallbackQueue.getPooled(null); + this.putListenerQueue = ReactPutListenerQueue.getPooled(); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap proceedures. + */ + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function() { + return this.reactMountReady; + }, + + getPutListenerQueue: function() { + return this.putListenerQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be resused. + */ + destructor: function() { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + + ReactPutListenerQueue.release(this.putListenerQueue); + this.putListenerQueue = null; + } +}; + + +assign( + ReactServerRenderingTransaction.prototype, + Transaction.Mixin, + Mixin +); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; + +},{"116":116,"129":129,"29":29,"30":30,"7":7,"87":87}],94:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactStateSetters + */ + +'use strict'; + +var ReactStateSetters = { + /** + * Returns a function that calls the provided function, and uses the result + * of that to set the component's state. + * + * @param {ReactCompositeComponent} component + * @param {function} funcReturningState Returned callback uses this to + * determine how to update state. + * @return {function} callback that when invoked uses funcReturningState to + * determined the object literal to setState. + */ + createStateSetter: function(component, funcReturningState) { + return function(a, b, c, d, e, f) { + var partialState = funcReturningState.call(component, a, b, c, d, e, f); + if (partialState) { + component.setState(partialState); + } + }; + }, + + /** + * Returns a single-argument callback that can be used to update a single + * key in the component's state. + * + * Note: this is memoized function, which makes it inexpensive to call. + * + * @param {ReactCompositeComponent} component + * @param {string} key The key in the state that you should update. + * @return {function} callback of 1 argument which calls setState() with + * the provided keyName and callback argument. + */ + createStateKeySetter: function(component, key) { + // Memoize the setters. + var cache = component.__keySetters || (component.__keySetters = {}); + return cache[key] || (cache[key] = createStateKeySetter(component, key)); + } +}; + +function createStateKeySetter(component, key) { + // Partial state is allocated outside of the function closure so it can be + // reused with every call, avoiding memory allocation when this function + // is called. + var partialState = {}; + return function stateKeySetter(value) { + partialState[key] = value; + component.setState(partialState); + }; +} + +ReactStateSetters.Mixin = { + /** + * Returns a function that calls the provided function, and uses the result + * of that to set the component's state. + * + * For example, these statements are equivalent: + * + * this.setState({x: 1}); + * this.createStateSetter(function(xValue) { + * return {x: xValue}; + * })(1); + * + * @param {function} funcReturningState Returned callback uses this to + * determine how to update state. + * @return {function} callback that when invoked uses funcReturningState to + * determined the object literal to setState. + */ + createStateSetter: function(funcReturningState) { + return ReactStateSetters.createStateSetter(this, funcReturningState); + }, + + /** + * Returns a single-argument callback that can be used to update a single + * key in the component's state. + * + * For example, these statements are equivalent: + * + * this.setState({x: 1}); + * this.createStateKeySetter('x')(1); + * + * Note: this is memoized function, which makes it inexpensive to call. + * + * @param {string} key The key in the state that you should update. + * @return {function} callback of 1 argument which calls setState() with + * the provided keyName and callback argument. + */ + createStateKeySetter: function(key) { + return ReactStateSetters.createStateKeySetter(this, key); + } +}; + +module.exports = ReactStateSetters; + +},{}],95:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactTestUtils + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPluginHub = _dereq_(18); +var EventPropagators = _dereq_(21); +var React = _dereq_(31); +var ReactElement = _dereq_(63); +var ReactEmptyComponent = _dereq_(65); +var ReactBrowserEventEmitter = _dereq_(33); +var ReactCompositeComponent = _dereq_(43); +var ReactInstanceHandles = _dereq_(72); +var ReactInstanceMap = _dereq_(73); +var ReactMount = _dereq_(77); +var ReactUpdates = _dereq_(100); +var SyntheticEvent = _dereq_(108); + +var assign = _dereq_(29); + +var topLevelTypes = EventConstants.topLevelTypes; + +function Event(suffix) {} + +/** + * @class ReactTestUtils + */ + +/** + * Todo: Support the entire DOM.scry query syntax. For now, these simple + * utilities will suffice for testing purposes. + * @lends ReactTestUtils + */ +var ReactTestUtils = { + renderIntoDocument: function(instance) { + var div = document.createElement('div'); + // None of our tests actually require attaching the container to the + // DOM, and doing so creates a mess that we rely on test isolation to + // clean up, so we're going to stop honoring the name of this method + // (and probably rename it eventually) if no problems arise. + // document.documentElement.appendChild(div); + return React.render(instance, div); + }, + + isElement: function(element) { + return ReactElement.isValidElement(element); + }, + + isElementOfType: function(inst, convenienceConstructor) { + return ( + ReactElement.isValidElement(inst) && + inst.type === convenienceConstructor + ); + }, + + isDOMComponent: function(inst) { + // TODO: Fix this heuristic. It's just here because composites can currently + // pretend to be DOM components. + return !!(inst && inst.getDOMNode && inst.tagName); + }, + + isDOMComponentElement: function(inst) { + return !!(inst && + ReactElement.isValidElement(inst) && + !!inst.tagName); + }, + + isCompositeComponent: function(inst) { + return typeof inst.render === 'function' && + typeof inst.setState === 'function'; + }, + + isCompositeComponentWithType: function(inst, type) { + return !!(ReactTestUtils.isCompositeComponent(inst) && + (inst.constructor === type)); + }, + + isCompositeComponentElement: function(inst) { + if (!ReactElement.isValidElement(inst)) { + return false; + } + // We check the prototype of the type that will get mounted, not the + // instance itself. This is a future proof way of duck typing. + var prototype = inst.type.prototype; + return ( + typeof prototype.render === 'function' && + typeof prototype.setState === 'function' + ); + }, + + isCompositeComponentElementWithType: function(inst, type) { + return !!(ReactTestUtils.isCompositeComponentElement(inst) && + (inst.constructor === type)); + }, + + getRenderedChildOfCompositeComponent: function(inst) { + if (!ReactTestUtils.isCompositeComponent(inst)) { + return null; + } + var internalInstance = ReactInstanceMap.get(inst); + return internalInstance._renderedComponent.getPublicInstance(); + }, + + findAllInRenderedTree: function(inst, test) { + if (!inst) { + return []; + } + var ret = test(inst) ? [inst] : []; + if (ReactTestUtils.isDOMComponent(inst)) { + var internalInstance = ReactInstanceMap.get(inst); + var renderedChildren = internalInstance + ._renderedComponent + ._renderedChildren; + var key; + for (key in renderedChildren) { + if (!renderedChildren.hasOwnProperty(key)) { + continue; + } + if (!renderedChildren[key].getPublicInstance) { + continue; + } + ret = ret.concat( + ReactTestUtils.findAllInRenderedTree( + renderedChildren[key].getPublicInstance(), + test + ) + ); + } + } else if (ReactTestUtils.isCompositeComponent(inst)) { + ret = ret.concat( + ReactTestUtils.findAllInRenderedTree( + ReactTestUtils.getRenderedChildOfCompositeComponent(inst), + test + ) + ); + } + return ret; + }, + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the class name matching `className`. + * @return an array of all the matches. + */ + scryRenderedDOMComponentsWithClass: function(root, className) { + return ReactTestUtils.findAllInRenderedTree(root, function(inst) { + var instClassName = inst.props.className; + return ReactTestUtils.isDOMComponent(inst) && ( + (instClassName && (' ' + instClassName + ' ').indexOf(' ' + className + ' ') !== -1) + ); + }); + }, + + /** + * Like scryRenderedDOMComponentsWithClass but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithClass: function(root, className) { + var all = + ReactTestUtils.scryRenderedDOMComponentsWithClass(root, className); + if (all.length !== 1) { + throw new Error('Did not find exactly one match ' + + '(found: ' + all.length + ') for class:' + className + ); + } + return all[0]; + }, + + + /** + * Finds all instance of components in the rendered tree that are DOM + * components with the tag name matching `tagName`. + * @return an array of all the matches. + */ + scryRenderedDOMComponentsWithTag: function(root, tagName) { + return ReactTestUtils.findAllInRenderedTree(root, function(inst) { + return ReactTestUtils.isDOMComponent(inst) && + inst.tagName === tagName.toUpperCase(); + }); + }, + + /** + * Like scryRenderedDOMComponentsWithTag but expects there to be one result, + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactDOMComponent} The one match. + */ + findRenderedDOMComponentWithTag: function(root, tagName) { + var all = ReactTestUtils.scryRenderedDOMComponentsWithTag(root, tagName); + if (all.length !== 1) { + throw new Error('Did not find exactly one match for tag:' + tagName); + } + return all[0]; + }, + + + /** + * Finds all instances of components with type equal to `componentType`. + * @return an array of all the matches. + */ + scryRenderedComponentsWithType: function(root, componentType) { + return ReactTestUtils.findAllInRenderedTree(root, function(inst) { + return ReactTestUtils.isCompositeComponentWithType( + inst, + componentType + ); + }); + }, + + /** + * Same as `scryRenderedComponentsWithType` but expects there to be one result + * and returns that one result, or throws exception if there is any other + * number of matches besides one. + * @return {!ReactComponent} The one match. + */ + findRenderedComponentWithType: function(root, componentType) { + var all = ReactTestUtils.scryRenderedComponentsWithType( + root, + componentType + ); + if (all.length !== 1) { + throw new Error( + 'Did not find exactly one match for componentType:' + componentType + ); + } + return all[0]; + }, + + /** + * Pass a mocked component module to this method to augment it with + * useful methods that allow it to be used as a dummy React component. + * Instead of rendering as usual, the component will become a simple + * <div> containing any provided children. + * + * @param {object} module the mock function object exported from a + * module that defines the component to be mocked + * @param {?string} mockTagName optional dummy root tag name to return + * from render method (overrides + * module.mockTagName if provided) + * @return {object} the ReactTestUtils object (for chaining) + */ + mockComponent: function(module, mockTagName) { + mockTagName = mockTagName || module.mockTagName || "div"; + + module.prototype.render.mockImplementation(function() { + return React.createElement( + mockTagName, + null, + this.props.children + ); + }); + + return this; + }, + + /** + * Simulates a top level event being dispatched from a raw event that occured + * on an `Element` node. + * @param topLevelType {Object} A type from `EventConstants.topLevelTypes` + * @param {!Element} node The dom to simulate an event occurring on. + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnNode: function(topLevelType, node, fakeNativeEvent) { + fakeNativeEvent.target = node; + ReactBrowserEventEmitter.ReactEventListener.dispatchEvent( + topLevelType, + fakeNativeEvent + ); + }, + + /** + * Simulates a top level event being dispatched from a raw event that occured + * on the `ReactDOMComponent` `comp`. + * @param topLevelType {Object} A type from `EventConstants.topLevelTypes`. + * @param comp {!ReactDOMComponent} + * @param {?Event} fakeNativeEvent Fake native event to use in SyntheticEvent. + */ + simulateNativeEventOnDOMComponent: function( + topLevelType, + comp, + fakeNativeEvent) { + ReactTestUtils.simulateNativeEventOnNode( + topLevelType, + comp.getDOMNode(), + fakeNativeEvent + ); + }, + + nativeTouchData: function(x, y) { + return { + touches: [ + {pageX: x, pageY: y} + ] + }; + }, + + createRenderer: function() { + return new ReactShallowRenderer(); + }, + + Simulate: null, + SimulateNative: {} +}; + +/** + * @class ReactShallowRenderer + */ +var ReactShallowRenderer = function() { + this._instance = null; +}; + +ReactShallowRenderer.prototype.getRenderOutput = function() { + return ( + (this._instance && this._instance._renderedComponent && + this._instance._renderedComponent._renderedOutput) + || null + ); +}; + +var NoopInternalComponent = function(element) { + this._renderedOutput = element; + this._currentElement = element === null || element === false ? + ReactEmptyComponent.emptyElement : + element; +}; + +NoopInternalComponent.prototype = { + + mountComponent: function() { + }, + + receiveComponent: function(element) { + this._renderedOutput = element; + this._currentElement = element === null || element === false ? + ReactEmptyComponent.emptyElement : + element; + }, + + unmountComponent: function() { + } + +}; + +var ShallowComponentWrapper = function() { }; +assign( + ShallowComponentWrapper.prototype, + ReactCompositeComponent.Mixin, { + _instantiateReactComponent: function(element) { + return new NoopInternalComponent(element); + }, + _replaceNodeWithMarkupByID: function() {}, + _renderValidatedComponent: + ReactCompositeComponent.Mixin. + _renderValidatedComponentWithoutOwnerOrContext + } +); + +ReactShallowRenderer.prototype.render = function(element, context) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); + this._render(element, transaction, context); + ReactUpdates.ReactReconcileTransaction.release(transaction); +}; + +ReactShallowRenderer.prototype.unmount = function() { + if (this._instance) { + this._instance.unmountComponent(); + } +}; + +ReactShallowRenderer.prototype._render = function(element, transaction, context) { + if (!this._instance) { + var rootID = ReactInstanceHandles.createReactRootID(); + var instance = new ShallowComponentWrapper(element.type); + instance.construct(element); + + instance.mountComponent(rootID, transaction, context); + + this._instance = instance; + } else { + this._instance.receiveComponent(element, transaction, context); + } +}; + +/** + * Exports: + * + * - `ReactTestUtils.Simulate.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.Simulate.change(Element/ReactDOMComponent)` + * - ... (All keys from event plugin `eventTypes` objects) + */ +function makeSimulator(eventType) { + return function(domComponentOrNode, eventData) { + var node; + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + node = domComponentOrNode.getDOMNode(); + } else if (domComponentOrNode.tagName) { + node = domComponentOrNode; + } + + var fakeNativeEvent = new Event(); + fakeNativeEvent.target = node; + // We don't use SyntheticEvent.getPooled in order to not have to worry about + // properly destroying any properties assigned from `eventData` upon release + var event = new SyntheticEvent( + ReactBrowserEventEmitter.eventNameDispatchConfigs[eventType], + ReactMount.getID(node), + fakeNativeEvent + ); + assign(event, eventData); + EventPropagators.accumulateTwoPhaseDispatches(event); + + ReactUpdates.batchedUpdates(function() { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(); + }); + }; +} + +function buildSimulators() { + ReactTestUtils.Simulate = {}; + + var eventType; + for (eventType in ReactBrowserEventEmitter.eventNameDispatchConfigs) { + /** + * @param {!Element || ReactDOMComponent} domComponentOrNode + * @param {?object} eventData Fake event data to use in SyntheticEvent. + */ + ReactTestUtils.Simulate[eventType] = makeSimulator(eventType); + } +} + +// Rebuild ReactTestUtils.Simulate whenever event plugins are injected +var oldInjectEventPluginOrder = EventPluginHub.injection.injectEventPluginOrder; +EventPluginHub.injection.injectEventPluginOrder = function() { + oldInjectEventPluginOrder.apply(this, arguments); + buildSimulators(); +}; +var oldInjectEventPlugins = EventPluginHub.injection.injectEventPluginsByName; +EventPluginHub.injection.injectEventPluginsByName = function() { + oldInjectEventPlugins.apply(this, arguments); + buildSimulators(); +}; + +buildSimulators(); + +/** + * Exports: + * + * - `ReactTestUtils.SimulateNative.click(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseMove(Element/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseIn/ReactDOMComponent)` + * - `ReactTestUtils.SimulateNative.mouseOut(Element/ReactDOMComponent)` + * - ... (All keys from `EventConstants.topLevelTypes`) + * + * Note: Top level event types are a subset of the entire set of handler types + * (which include a broader set of "synthetic" events). For example, onDragDone + * is a synthetic event. Except when testing an event plugin or React's event + * handling code specifically, you probably want to use ReactTestUtils.Simulate + * to dispatch synthetic events. + */ + +function makeNativeSimulator(eventType) { + return function(domComponentOrNode, nativeEventData) { + var fakeNativeEvent = new Event(eventType); + assign(fakeNativeEvent, nativeEventData); + if (ReactTestUtils.isDOMComponent(domComponentOrNode)) { + ReactTestUtils.simulateNativeEventOnDOMComponent( + eventType, + domComponentOrNode, + fakeNativeEvent + ); + } else if (!!domComponentOrNode.tagName) { + // Will allow on actual dom nodes. + ReactTestUtils.simulateNativeEventOnNode( + eventType, + domComponentOrNode, + fakeNativeEvent + ); + } + }; +} + +var eventType; +for (eventType in topLevelTypes) { + // Event type is stored as 'topClick' - we transform that to 'click' + var convenienceName = eventType.indexOf('top') === 0 ? + eventType.charAt(3).toLowerCase() + eventType.substr(4) : eventType; + /** + * @param {!Element || ReactDOMComponent} domComponentOrNode + * @param {?Event} nativeEventData Fake native event to use in SyntheticEvent. + */ + ReactTestUtils.SimulateNative[convenienceName] = + makeNativeSimulator(eventType); +} + +module.exports = ReactTestUtils; + +},{"100":100,"108":108,"16":16,"18":18,"21":21,"29":29,"31":31,"33":33,"43":43,"63":63,"65":65,"72":72,"73":73,"77":77}],96:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks static-only + * @providesModule ReactTransitionChildMapping + */ + +'use strict'; + +var ReactChildren = _dereq_(37); +var ReactFragment = _dereq_(69); + +var ReactTransitionChildMapping = { + /** + * Given `this.props.children`, return an object mapping key to child. Just + * simple syntactic sugar around ReactChildren.map(). + * + * @param {*} children `this.props.children` + * @return {object} Mapping of key to child + */ + getChildMapping: function(children) { + if (!children) { + return children; + } + return ReactFragment.extract(ReactChildren.map(children, function(child) { + return child; + })); + }, + + /** + * When you're adding or removing children some may be added or removed in the + * same render pass. We want to show *both* since we want to simultaneously + * animate elements in and out. This function takes a previous set of keys + * and a new set of keys and merges them with its best guess of the correct + * ordering. In the future we may expose some of the utilities in + * ReactMultiChild to make this easy, but for now React itself does not + * directly have this concept of the union of prevChildren and nextChildren + * so we implement it here. + * + * @param {object} prev prev children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @param {object} next next children as returned from + * `ReactTransitionChildMapping.getChildMapping()`. + * @return {object} a key set that contains all keys in `prev` and all keys + * in `next` in a reasonable order. + */ + mergeChildMappings: function(prev, next) { + prev = prev || {}; + next = next || {}; + + function getValueForKey(key) { + if (next.hasOwnProperty(key)) { + return next[key]; + } else { + return prev[key]; + } + } + + // For each key of `next`, the list of keys to insert before that key in + // the combined list + var nextKeysPending = {}; + + var pendingKeys = []; + for (var prevKey in prev) { + if (next.hasOwnProperty(prevKey)) { + if (pendingKeys.length) { + nextKeysPending[prevKey] = pendingKeys; + pendingKeys = []; + } + } else { + pendingKeys.push(prevKey); + } + } + + var i; + var childMapping = {}; + for (var nextKey in next) { + if (nextKeysPending.hasOwnProperty(nextKey)) { + for (i = 0; i < nextKeysPending[nextKey].length; i++) { + var pendingNextKey = nextKeysPending[nextKey][i]; + childMapping[nextKeysPending[nextKey][i]] = getValueForKey( + pendingNextKey + ); + } + } + childMapping[nextKey] = getValueForKey(nextKey); + } + + // Finally, add the keys which didn't appear before any key in `next` + for (i = 0; i < pendingKeys.length; i++) { + childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]); + } + + return childMapping; + } +}; + +module.exports = ReactTransitionChildMapping; + +},{"37":37,"69":69}],97:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactTransitionEvents + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +/** + * EVENT_NAME_MAP is used to determine which event fired when a + * transition/animation ends, based on the style property used to + * define that event. + */ +var EVENT_NAME_MAP = { + transitionend: { + 'transition': 'transitionend', + 'WebkitTransition': 'webkitTransitionEnd', + 'MozTransition': 'mozTransitionEnd', + 'OTransition': 'oTransitionEnd', + 'msTransition': 'MSTransitionEnd' + }, + + animationend: { + 'animation': 'animationend', + 'WebkitAnimation': 'webkitAnimationEnd', + 'MozAnimation': 'mozAnimationEnd', + 'OAnimation': 'oAnimationEnd', + 'msAnimation': 'MSAnimationEnd' + } +}; + +var endEvents = []; + +function detectEvents() { + var testEl = document.createElement('div'); + var style = testEl.style; + + // On some platforms, in particular some releases of Android 4.x, + // the un-prefixed "animation" and "transition" properties are defined on the + // style object but the events that fire will still be prefixed, so we need + // to check if the un-prefixed events are useable, and if not remove them + // from the map + if (!('AnimationEvent' in window)) { + delete EVENT_NAME_MAP.animationend.animation; + } + + if (!('TransitionEvent' in window)) { + delete EVENT_NAME_MAP.transitionend.transition; + } + + for (var baseEventName in EVENT_NAME_MAP) { + var baseEvents = EVENT_NAME_MAP[baseEventName]; + for (var styleName in baseEvents) { + if (styleName in style) { + endEvents.push(baseEvents[styleName]); + break; + } + } + } +} + +if (ExecutionEnvironment.canUseDOM) { + detectEvents(); +} + +// We use the raw {add|remove}EventListener() call because EventListener +// does not know how to remove event listeners and we really should +// clean up. Also, these events are not triggered in older browsers +// so we should be A-OK here. + +function addEventListener(node, eventName, eventListener) { + node.addEventListener(eventName, eventListener, false); +} + +function removeEventListener(node, eventName, eventListener) { + node.removeEventListener(eventName, eventListener, false); +} + +var ReactTransitionEvents = { + addEndEventListener: function(node, eventListener) { + if (endEvents.length === 0) { + // If CSS transitions are not supported, trigger an "end animation" + // event immediately. + window.setTimeout(eventListener, 0); + return; + } + endEvents.forEach(function(endEvent) { + addEventListener(node, endEvent, eventListener); + }); + }, + + removeEndEventListener: function(node, eventListener) { + if (endEvents.length === 0) { + return; + } + endEvents.forEach(function(endEvent) { + removeEventListener(node, endEvent, eventListener); + }); + } +}; + +module.exports = ReactTransitionEvents; + +},{"22":22}],98:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactTransitionGroup + */ + +'use strict'; + +var React = _dereq_(31); +var ReactTransitionChildMapping = _dereq_(96); + +var assign = _dereq_(29); +var cloneWithProps = _dereq_(122); +var emptyFunction = _dereq_(129); + +var ReactTransitionGroup = React.createClass({ + displayName: 'ReactTransitionGroup', + + propTypes: { + component: React.PropTypes.any, + childFactory: React.PropTypes.func + }, + + getDefaultProps: function() { + return { + component: 'span', + childFactory: emptyFunction.thatReturnsArgument + }; + }, + + getInitialState: function() { + return { + children: ReactTransitionChildMapping.getChildMapping(this.props.children) + }; + }, + + componentWillMount: function() { + this.currentlyTransitioningKeys = {}; + this.keysToEnter = []; + this.keysToLeave = []; + }, + + componentDidMount: function() { + var initialChildMapping = this.state.children; + for (var key in initialChildMapping) { + if (initialChildMapping[key]) { + this.performAppear(key); + } + } + }, + + componentWillReceiveProps: function(nextProps) { + var nextChildMapping = ReactTransitionChildMapping.getChildMapping( + nextProps.children + ); + var prevChildMapping = this.state.children; + + this.setState({ + children: ReactTransitionChildMapping.mergeChildMappings( + prevChildMapping, + nextChildMapping + ) + }); + + var key; + + for (key in nextChildMapping) { + var hasPrev = prevChildMapping && prevChildMapping.hasOwnProperty(key); + if (nextChildMapping[key] && !hasPrev && + !this.currentlyTransitioningKeys[key]) { + this.keysToEnter.push(key); + } + } + + for (key in prevChildMapping) { + var hasNext = nextChildMapping && nextChildMapping.hasOwnProperty(key); + if (prevChildMapping[key] && !hasNext && + !this.currentlyTransitioningKeys[key]) { + this.keysToLeave.push(key); + } + } + + // If we want to someday check for reordering, we could do it here. + }, + + componentDidUpdate: function() { + var keysToEnter = this.keysToEnter; + this.keysToEnter = []; + keysToEnter.forEach(this.performEnter); + + var keysToLeave = this.keysToLeave; + this.keysToLeave = []; + keysToLeave.forEach(this.performLeave); + }, + + performAppear: function(key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + + if (component.componentWillAppear) { + component.componentWillAppear( + this._handleDoneAppearing.bind(this, key) + ); + } else { + this._handleDoneAppearing(key); + } + }, + + _handleDoneAppearing: function(key) { + var component = this.refs[key]; + if (component.componentDidAppear) { + component.componentDidAppear(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping( + this.props.children + ); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully appeared. Remove it. + this.performLeave(key); + } + }, + + performEnter: function(key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + + if (component.componentWillEnter) { + component.componentWillEnter( + this._handleDoneEntering.bind(this, key) + ); + } else { + this._handleDoneEntering(key); + } + }, + + _handleDoneEntering: function(key) { + var component = this.refs[key]; + if (component.componentDidEnter) { + component.componentDidEnter(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping( + this.props.children + ); + + if (!currentChildMapping || !currentChildMapping.hasOwnProperty(key)) { + // This was removed before it had fully entered. Remove it. + this.performLeave(key); + } + }, + + performLeave: function(key) { + this.currentlyTransitioningKeys[key] = true; + + var component = this.refs[key]; + if (component.componentWillLeave) { + component.componentWillLeave(this._handleDoneLeaving.bind(this, key)); + } else { + // Note that this is somewhat dangerous b/c it calls setState() + // again, effectively mutating the component before all the work + // is done. + this._handleDoneLeaving(key); + } + }, + + _handleDoneLeaving: function(key) { + var component = this.refs[key]; + + if (component.componentDidLeave) { + component.componentDidLeave(); + } + + delete this.currentlyTransitioningKeys[key]; + + var currentChildMapping = ReactTransitionChildMapping.getChildMapping( + this.props.children + ); + + if (currentChildMapping && currentChildMapping.hasOwnProperty(key)) { + // This entered again before it fully left. Add it again. + this.performEnter(key); + } else { + var newChildren = assign({}, this.state.children); + delete newChildren[key]; + this.setState({children: newChildren}); + } + }, + + render: function() { + // TODO: we could get rid of the need for the wrapper node + // by cloning a single child + var childrenToRender = []; + for (var key in this.state.children) { + var child = this.state.children[key]; + if (child) { + // You may need to apply reactive updates to a child as it is leaving. + // The normal React way to do it won't work since the child will have + // already been removed. In case you need this behavior you can provide + // a childFactory function to wrap every child, even the ones that are + // leaving. + childrenToRender.push(cloneWithProps( + this.props.childFactory(child), + {ref: key, key: key} + )); + } + } + return React.createElement( + this.props.component, + this.props, + childrenToRender + ); + } +}); + +module.exports = ReactTransitionGroup; + +},{"122":122,"129":129,"29":29,"31":31,"96":96}],99:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactUpdateQueue + */ + +'use strict'; + +var ReactLifeCycle = _dereq_(74); +var ReactCurrentOwner = _dereq_(45); +var ReactElement = _dereq_(63); +var ReactInstanceMap = _dereq_(73); +var ReactUpdates = _dereq_(100); + +var assign = _dereq_(29); +var invariant = _dereq_(150); +var warning = _dereq_(171); + +function enqueueUpdate(internalInstance) { + if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) { + // If we're in a componentWillMount handler, don't enqueue a rerender + // because ReactUpdates assumes we're in a browser context (which is + // wrong for server rendering) and we're about to do a render anyway. + // See bug in #1740. + ReactUpdates.enqueueUpdate(internalInstance); + } +} + +function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + ("production" !== "development" ? invariant( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition ' + + '(such as within `render`). Render methods should be a pure function ' + + 'of props and state.', + callerName + ) : invariant(ReactCurrentOwner.current == null)); + + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if ("production" !== "development") { + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + ("production" !== "development" ? warning( + !callerName, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted ' + + 'component. This is a no-op.', + callerName, + callerName + ) : null); + } + return null; + } + + if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) { + return null; + } + + return internalInstance; +} + +/** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ +var ReactUpdateQueue = { + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function(publicInstance, callback) { + ("production" !== "development" ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance || + internalInstance === ReactLifeCycle.currentlyMountingInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function(internalInstance, callback) { + ("production" !== "development" ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldUpdateComponent`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function(publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'forceUpdate' + ); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function(publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceState' + ); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function(publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setState' + ); + + if (!internalInstance) { + return; + } + + var queue = + internalInstance._pendingStateQueue || + (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialProps Subset of the next props. + * @internal + */ + enqueueSetProps: function(publicInstance, partialProps) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setProps' + ); + + if (!internalInstance) { + return; + } + + ("production" !== "development" ? invariant( + internalInstance._isTopLevel, + 'setProps(...): You called `setProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); + + // Merge with the pending element if it exists, otherwise with existing + // element props. + var element = internalInstance._pendingElement || + internalInstance._currentElement; + var props = assign({}, element.props, partialProps); + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} props New props. + * @internal + */ + enqueueReplaceProps: function(publicInstance, props) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceProps' + ); + + if (!internalInstance) { + return; + } + + ("production" !== "development" ? invariant( + internalInstance._isTopLevel, + 'replaceProps(...): You called `replaceProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); + + // Merge with the pending element if it exists, otherwise with existing + // element props. + var element = internalInstance._pendingElement || + internalInstance._currentElement; + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function(internalInstance, newElement) { + internalInstance._pendingElement = newElement; + enqueueUpdate(internalInstance); + } + +}; + +module.exports = ReactUpdateQueue; + +},{"100":100,"150":150,"171":171,"29":29,"45":45,"63":63,"73":73,"74":74}],100:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactUpdates + */ + +'use strict'; + +var CallbackQueue = _dereq_(7); +var PooledClass = _dereq_(30); +var ReactCurrentOwner = _dereq_(45); +var ReactPerf = _dereq_(82); +var ReactReconciler = _dereq_(89); +var Transaction = _dereq_(116); + +var assign = _dereq_(29); +var invariant = _dereq_(150); +var warning = _dereq_(171); + +var dirtyComponents = []; +var asapCallbackQueue = CallbackQueue.getPooled(); +var asapEnqueued = false; + +var batchingStrategy = null; + +function ensureInjected() { + ("production" !== "development" ? invariant( + ReactUpdates.ReactReconcileTransaction && batchingStrategy, + 'ReactUpdates: must inject a reconcile transaction class and batching ' + + 'strategy' + ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy)); +} + +var NESTED_UPDATES = { + initialize: function() { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function() { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } +}; + +var UPDATE_QUEUEING = { + initialize: function() { + this.callbackQueue.reset(); + }, + close: function() { + this.callbackQueue.notifyAll(); + } +}; + +var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + +function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = + ReactUpdates.ReactReconcileTransaction.getPooled(); +} + +assign( + ReactUpdatesFlushTransaction.prototype, + Transaction.Mixin, { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + destructor: function() { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function(method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.Mixin.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a + ); + } +}); + +PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + +function batchedUpdates(callback, a, b, c, d) { + ensureInjected(); + batchingStrategy.batchedUpdates(callback, a, b, c, d); +} + +/** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ +function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; +} + +function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + ("production" !== "development" ? invariant( + len === dirtyComponents.length, + 'Expected flush transaction\'s stored dirty-components length (%s) to ' + + 'match dirty-components array length (%s).', + len, + dirtyComponents.length + ) : invariant(len === dirtyComponents.length)); + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction + ); + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue( + callbacks[j], + component.getPublicInstance() + ); + } + } + } +} + +var flushBatchedUpdates = function() { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } +}; +flushBatchedUpdates = ReactPerf.measure( + 'ReactUpdates', + 'flushBatchedUpdates', + flushBatchedUpdates +); + +/** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ +function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setProps, setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + 'enqueueUpdate(): Render methods should be a pure function of props ' + + 'and state; triggering nested component updates from render is not ' + + 'allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); +} + +/** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ +function asap(callback, context) { + ("production" !== "development" ? invariant( + batchingStrategy.isBatchingUpdates, + 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + + 'updates are not being batched.' + ) : invariant(batchingStrategy.isBatchingUpdates)); + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; +} + +var ReactUpdatesInjection = { + injectReconcileTransaction: function(ReconcileTransaction) { + ("production" !== "development" ? invariant( + ReconcileTransaction, + 'ReactUpdates: must provide a reconcile transaction class' + ) : invariant(ReconcileTransaction)); + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function(_batchingStrategy) { + ("production" !== "development" ? invariant( + _batchingStrategy, + 'ReactUpdates: must provide a batching strategy' + ) : invariant(_batchingStrategy)); + ("production" !== "development" ? invariant( + typeof _batchingStrategy.batchedUpdates === 'function', + 'ReactUpdates: must provide a batchedUpdates() function' + ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function')); + ("production" !== "development" ? invariant( + typeof _batchingStrategy.isBatchingUpdates === 'boolean', + 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' + ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean')); + batchingStrategy = _batchingStrategy; + } +}; + +var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap +}; + +module.exports = ReactUpdates; + +},{"116":116,"150":150,"171":171,"29":29,"30":30,"45":45,"7":7,"82":82,"89":89}],101:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SVGDOMPropertyConfig + */ + +/*jslint bitwise: true*/ + +'use strict'; + +var DOMProperty = _dereq_(11); + +var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; + +var SVGDOMPropertyConfig = { + Properties: { + cx: MUST_USE_ATTRIBUTE, + cy: MUST_USE_ATTRIBUTE, + d: MUST_USE_ATTRIBUTE, + dx: MUST_USE_ATTRIBUTE, + dy: MUST_USE_ATTRIBUTE, + fill: MUST_USE_ATTRIBUTE, + fillOpacity: MUST_USE_ATTRIBUTE, + fontFamily: MUST_USE_ATTRIBUTE, + fontSize: MUST_USE_ATTRIBUTE, + fx: MUST_USE_ATTRIBUTE, + fy: MUST_USE_ATTRIBUTE, + gradientTransform: MUST_USE_ATTRIBUTE, + gradientUnits: MUST_USE_ATTRIBUTE, + markerEnd: MUST_USE_ATTRIBUTE, + markerMid: MUST_USE_ATTRIBUTE, + markerStart: MUST_USE_ATTRIBUTE, + offset: MUST_USE_ATTRIBUTE, + opacity: MUST_USE_ATTRIBUTE, + patternContentUnits: MUST_USE_ATTRIBUTE, + patternUnits: MUST_USE_ATTRIBUTE, + points: MUST_USE_ATTRIBUTE, + preserveAspectRatio: MUST_USE_ATTRIBUTE, + r: MUST_USE_ATTRIBUTE, + rx: MUST_USE_ATTRIBUTE, + ry: MUST_USE_ATTRIBUTE, + spreadMethod: MUST_USE_ATTRIBUTE, + stopColor: MUST_USE_ATTRIBUTE, + stopOpacity: MUST_USE_ATTRIBUTE, + stroke: MUST_USE_ATTRIBUTE, + strokeDasharray: MUST_USE_ATTRIBUTE, + strokeLinecap: MUST_USE_ATTRIBUTE, + strokeOpacity: MUST_USE_ATTRIBUTE, + strokeWidth: MUST_USE_ATTRIBUTE, + textAnchor: MUST_USE_ATTRIBUTE, + transform: MUST_USE_ATTRIBUTE, + version: MUST_USE_ATTRIBUTE, + viewBox: MUST_USE_ATTRIBUTE, + x1: MUST_USE_ATTRIBUTE, + x2: MUST_USE_ATTRIBUTE, + x: MUST_USE_ATTRIBUTE, + y1: MUST_USE_ATTRIBUTE, + y2: MUST_USE_ATTRIBUTE, + y: MUST_USE_ATTRIBUTE + }, + DOMAttributeNames: { + fillOpacity: 'fill-opacity', + fontFamily: 'font-family', + fontSize: 'font-size', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + patternContentUnits: 'patternContentUnits', + patternUnits: 'patternUnits', + preserveAspectRatio: 'preserveAspectRatio', + spreadMethod: 'spreadMethod', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strokeDasharray: 'stroke-dasharray', + strokeLinecap: 'stroke-linecap', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + textAnchor: 'text-anchor', + viewBox: 'viewBox' + } +}; + +module.exports = SVGDOMPropertyConfig; + +},{"11":11}],102:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SelectEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPropagators = _dereq_(21); +var ReactInputSelection = _dereq_(71); +var SyntheticEvent = _dereq_(108); + +var getActiveElement = _dereq_(136); +var isTextInputElement = _dereq_(153); +var keyOf = _dereq_(157); +var shallowEqual = _dereq_(166); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: keyOf({onSelect: null}), + captured: keyOf({onSelectCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topContextMenu, + topLevelTypes.topFocus, + topLevelTypes.topKeyDown, + topLevelTypes.topMouseDown, + topLevelTypes.topMouseUp, + topLevelTypes.topSelectionChange + ] + } +}; + +var activeElement = null; +var activeElementID = null; +var lastSelection = null; +var mouseDown = false; + +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @param {object} + */ +function getSelection(node) { + if ('selectionStart' in node && + ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} + +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || + activeElement == null || + activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes.select, + activeElementID, + nativeEvent + ); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } +} + +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + + switch (topLevelType) { + // Track the input node that has focus. + case topLevelTypes.topFocus: + if (isTextInputElement(topLevelTarget) || + topLevelTarget.contentEditable === 'true') { + activeElement = topLevelTarget; + activeElementID = topLevelTargetID; + lastSelection = null; + } + break; + case topLevelTypes.topBlur: + activeElement = null; + activeElementID = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case topLevelTypes.topMouseDown: + mouseDown = true; + break; + case topLevelTypes.topContextMenu: + case topLevelTypes.topMouseUp: + mouseDown = false; + return constructSelectEvent(nativeEvent); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + case topLevelTypes.topSelectionChange: + case topLevelTypes.topKeyDown: + case topLevelTypes.topKeyUp: + return constructSelectEvent(nativeEvent); + } + } +}; + +module.exports = SelectEventPlugin; + +},{"108":108,"136":136,"153":153,"157":157,"16":16,"166":166,"21":21,"71":71}],103:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ServerReactRootIndex + * @typechecks + */ + +'use strict'; + +/** + * Size of the reactRoot ID space. We generate random numbers for React root + * IDs and if there's a collision the events and DOM update system will + * get confused. In the future we need a way to generate GUIDs but for + * now this will work on a smaller scale. + */ +var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53); + +var ServerReactRootIndex = { + createReactRootIndex: function() { + return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX); + } +}; + +module.exports = ServerReactRootIndex; + +},{}],104:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SimpleEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(16); +var EventPluginUtils = _dereq_(20); +var EventPropagators = _dereq_(21); +var SyntheticClipboardEvent = _dereq_(105); +var SyntheticEvent = _dereq_(108); +var SyntheticFocusEvent = _dereq_(109); +var SyntheticKeyboardEvent = _dereq_(111); +var SyntheticMouseEvent = _dereq_(112); +var SyntheticDragEvent = _dereq_(107); +var SyntheticTouchEvent = _dereq_(113); +var SyntheticUIEvent = _dereq_(114); +var SyntheticWheelEvent = _dereq_(115); + +var getEventCharCode = _dereq_(137); + +var invariant = _dereq_(150); +var keyOf = _dereq_(157); +var warning = _dereq_(171); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + blur: { + phasedRegistrationNames: { + bubbled: keyOf({onBlur: true}), + captured: keyOf({onBlurCapture: true}) + } + }, + click: { + phasedRegistrationNames: { + bubbled: keyOf({onClick: true}), + captured: keyOf({onClickCapture: true}) + } + }, + contextMenu: { + phasedRegistrationNames: { + bubbled: keyOf({onContextMenu: true}), + captured: keyOf({onContextMenuCapture: true}) + } + }, + copy: { + phasedRegistrationNames: { + bubbled: keyOf({onCopy: true}), + captured: keyOf({onCopyCapture: true}) + } + }, + cut: { + phasedRegistrationNames: { + bubbled: keyOf({onCut: true}), + captured: keyOf({onCutCapture: true}) + } + }, + doubleClick: { + phasedRegistrationNames: { + bubbled: keyOf({onDoubleClick: true}), + captured: keyOf({onDoubleClickCapture: true}) + } + }, + drag: { + phasedRegistrationNames: { + bubbled: keyOf({onDrag: true}), + captured: keyOf({onDragCapture: true}) + } + }, + dragEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onDragEnd: true}), + captured: keyOf({onDragEndCapture: true}) + } + }, + dragEnter: { + phasedRegistrationNames: { + bubbled: keyOf({onDragEnter: true}), + captured: keyOf({onDragEnterCapture: true}) + } + }, + dragExit: { + phasedRegistrationNames: { + bubbled: keyOf({onDragExit: true}), + captured: keyOf({onDragExitCapture: true}) + } + }, + dragLeave: { + phasedRegistrationNames: { + bubbled: keyOf({onDragLeave: true}), + captured: keyOf({onDragLeaveCapture: true}) + } + }, + dragOver: { + phasedRegistrationNames: { + bubbled: keyOf({onDragOver: true}), + captured: keyOf({onDragOverCapture: true}) + } + }, + dragStart: { + phasedRegistrationNames: { + bubbled: keyOf({onDragStart: true}), + captured: keyOf({onDragStartCapture: true}) + } + }, + drop: { + phasedRegistrationNames: { + bubbled: keyOf({onDrop: true}), + captured: keyOf({onDropCapture: true}) + } + }, + focus: { + phasedRegistrationNames: { + bubbled: keyOf({onFocus: true}), + captured: keyOf({onFocusCapture: true}) + } + }, + input: { + phasedRegistrationNames: { + bubbled: keyOf({onInput: true}), + captured: keyOf({onInputCapture: true}) + } + }, + keyDown: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyDown: true}), + captured: keyOf({onKeyDownCapture: true}) + } + }, + keyPress: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyPress: true}), + captured: keyOf({onKeyPressCapture: true}) + } + }, + keyUp: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyUp: true}), + captured: keyOf({onKeyUpCapture: true}) + } + }, + load: { + phasedRegistrationNames: { + bubbled: keyOf({onLoad: true}), + captured: keyOf({onLoadCapture: true}) + } + }, + error: { + phasedRegistrationNames: { + bubbled: keyOf({onError: true}), + captured: keyOf({onErrorCapture: true}) + } + }, + // Note: We do not allow listening to mouseOver events. Instead, use the + // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`. + mouseDown: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseDown: true}), + captured: keyOf({onMouseDownCapture: true}) + } + }, + mouseMove: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseMove: true}), + captured: keyOf({onMouseMoveCapture: true}) + } + }, + mouseOut: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseOut: true}), + captured: keyOf({onMouseOutCapture: true}) + } + }, + mouseOver: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseOver: true}), + captured: keyOf({onMouseOverCapture: true}) + } + }, + mouseUp: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseUp: true}), + captured: keyOf({onMouseUpCapture: true}) + } + }, + paste: { + phasedRegistrationNames: { + bubbled: keyOf({onPaste: true}), + captured: keyOf({onPasteCapture: true}) + } + }, + reset: { + phasedRegistrationNames: { + bubbled: keyOf({onReset: true}), + captured: keyOf({onResetCapture: true}) + } + }, + scroll: { + phasedRegistrationNames: { + bubbled: keyOf({onScroll: true}), + captured: keyOf({onScrollCapture: true}) + } + }, + submit: { + phasedRegistrationNames: { + bubbled: keyOf({onSubmit: true}), + captured: keyOf({onSubmitCapture: true}) + } + }, + touchCancel: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchCancel: true}), + captured: keyOf({onTouchCancelCapture: true}) + } + }, + touchEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchEnd: true}), + captured: keyOf({onTouchEndCapture: true}) + } + }, + touchMove: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchMove: true}), + captured: keyOf({onTouchMoveCapture: true}) + } + }, + touchStart: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchStart: true}), + captured: keyOf({onTouchStartCapture: true}) + } + }, + wheel: { + phasedRegistrationNames: { + bubbled: keyOf({onWheel: true}), + captured: keyOf({onWheelCapture: true}) + } + } +}; + +var topLevelEventsToDispatchConfig = { + topBlur: eventTypes.blur, + topClick: eventTypes.click, + topContextMenu: eventTypes.contextMenu, + topCopy: eventTypes.copy, + topCut: eventTypes.cut, + topDoubleClick: eventTypes.doubleClick, + topDrag: eventTypes.drag, + topDragEnd: eventTypes.dragEnd, + topDragEnter: eventTypes.dragEnter, + topDragExit: eventTypes.dragExit, + topDragLeave: eventTypes.dragLeave, + topDragOver: eventTypes.dragOver, + topDragStart: eventTypes.dragStart, + topDrop: eventTypes.drop, + topError: eventTypes.error, + topFocus: eventTypes.focus, + topInput: eventTypes.input, + topKeyDown: eventTypes.keyDown, + topKeyPress: eventTypes.keyPress, + topKeyUp: eventTypes.keyUp, + topLoad: eventTypes.load, + topMouseDown: eventTypes.mouseDown, + topMouseMove: eventTypes.mouseMove, + topMouseOut: eventTypes.mouseOut, + topMouseOver: eventTypes.mouseOver, + topMouseUp: eventTypes.mouseUp, + topPaste: eventTypes.paste, + topReset: eventTypes.reset, + topScroll: eventTypes.scroll, + topSubmit: eventTypes.submit, + topTouchCancel: eventTypes.touchCancel, + topTouchEnd: eventTypes.touchEnd, + topTouchMove: eventTypes.touchMove, + topTouchStart: eventTypes.touchStart, + topWheel: eventTypes.wheel +}; + +for (var type in topLevelEventsToDispatchConfig) { + topLevelEventsToDispatchConfig[type].dependencies = [type]; +} + +var SimpleEventPlugin = { + + eventTypes: eventTypes, + + /** + * Same as the default implementation, except cancels the event when return + * value is false. This behavior will be disabled in a future release. + * + * @param {object} Event to be dispatched. + * @param {function} Application-level callback. + * @param {string} domID DOM ID to pass to the callback. + */ + executeDispatch: function(event, listener, domID) { + var returnValue = EventPluginUtils.executeDispatch(event, listener, domID); + + ("production" !== "development" ? warning( + typeof returnValue !== 'boolean', + 'Returning `false` from an event handler is deprecated and will be ' + + 'ignored in a future release. Instead, manually call ' + + 'e.stopPropagation() or e.preventDefault(), as appropriate.' + ) : null); + + if (returnValue === false) { + event.stopPropagation(); + event.preventDefault(); + } + }, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case topLevelTypes.topInput: + case topLevelTypes.topLoad: + case topLevelTypes.topError: + case topLevelTypes.topReset: + case topLevelTypes.topSubmit: + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case topLevelTypes.topKeyPress: + // FireFox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case topLevelTypes.topKeyDown: + case topLevelTypes.topKeyUp: + EventConstructor = SyntheticKeyboardEvent; + break; + case topLevelTypes.topBlur: + case topLevelTypes.topFocus: + EventConstructor = SyntheticFocusEvent; + break; + case topLevelTypes.topClick: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case topLevelTypes.topContextMenu: + case topLevelTypes.topDoubleClick: + case topLevelTypes.topMouseDown: + case topLevelTypes.topMouseMove: + case topLevelTypes.topMouseOut: + case topLevelTypes.topMouseOver: + case topLevelTypes.topMouseUp: + EventConstructor = SyntheticMouseEvent; + break; + case topLevelTypes.topDrag: + case topLevelTypes.topDragEnd: + case topLevelTypes.topDragEnter: + case topLevelTypes.topDragExit: + case topLevelTypes.topDragLeave: + case topLevelTypes.topDragOver: + case topLevelTypes.topDragStart: + case topLevelTypes.topDrop: + EventConstructor = SyntheticDragEvent; + break; + case topLevelTypes.topTouchCancel: + case topLevelTypes.topTouchEnd: + case topLevelTypes.topTouchMove: + case topLevelTypes.topTouchStart: + EventConstructor = SyntheticTouchEvent; + break; + case topLevelTypes.topScroll: + EventConstructor = SyntheticUIEvent; + break; + case topLevelTypes.topWheel: + EventConstructor = SyntheticWheelEvent; + break; + case topLevelTypes.topCopy: + case topLevelTypes.topCut: + case topLevelTypes.topPaste: + EventConstructor = SyntheticClipboardEvent; + break; + } + ("production" !== "development" ? invariant( + EventConstructor, + 'SimpleEventPlugin: Unhandled event type, `%s`.', + topLevelType + ) : invariant(EventConstructor)); + var event = EventConstructor.getPooled( + dispatchConfig, + topLevelTargetID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + +}; + +module.exports = SimpleEventPlugin; + +},{"105":105,"107":107,"108":108,"109":109,"111":111,"112":112,"113":113,"114":114,"115":115,"137":137,"150":150,"157":157,"16":16,"171":171,"20":20,"21":21}],105:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticClipboardEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(108); + +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function(event) { + return ( + 'clipboardData' in event ? + event.clipboardData : + window.clipboardData + ); + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + +module.exports = SyntheticClipboardEvent; + +},{"108":108}],106:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticCompositionEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(108); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent( + dispatchConfig, + dispatchMarker, + nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass( + SyntheticCompositionEvent, + CompositionEventInterface +); + +module.exports = SyntheticCompositionEvent; + +},{"108":108}],107:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticDragEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticMouseEvent = _dereq_(112); + +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + +module.exports = SyntheticDragEvent; + +},{"112":112}],108:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticEvent + * @typechecks static-only + */ + +'use strict'; + +var PooledClass = _dereq_(30); + +var assign = _dereq_(29); +var emptyFunction = _dereq_(129); +var getEventTarget = _dereq_(140); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var EventInterface = { + type: null, + target: getEventTarget, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function(event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null +}; + +/** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + */ +function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { + this.dispatchConfig = dispatchConfig; + this.dispatchMarker = dispatchMarker; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + this[propName] = nativeEvent[propName]; + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? + nativeEvent.defaultPrevented : + nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; +} + +assign(SyntheticEvent.prototype, { + + preventDefault: function() { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function() { + var event = this.nativeEvent; + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function() { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function() { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + this[propName] = null; + } + this.dispatchConfig = null; + this.dispatchMarker = null; + this.nativeEvent = null; + } + +}); + +SyntheticEvent.Interface = EventInterface; + +/** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ +SyntheticEvent.augmentClass = function(Class, Interface) { + var Super = this; + + var prototype = Object.create(Super.prototype); + assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler); +}; + +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler); + +module.exports = SyntheticEvent; + +},{"129":129,"140":140,"29":29,"30":30}],109:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticFocusEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(114); + +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + +module.exports = SyntheticFocusEvent; + +},{"114":114}],110:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticInputEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(108); + +/** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ +var InputEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent( + dispatchConfig, + dispatchMarker, + nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass( + SyntheticInputEvent, + InputEventInterface +); + +module.exports = SyntheticInputEvent; + +},{"108":108}],111:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticKeyboardEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(114); + +var getEventCharCode = _dereq_(137); +var getEventKey = _dereq_(138); +var getEventModifierState = _dereq_(139); + +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function(event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function(event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function(event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; + +},{"114":114,"137":137,"138":138,"139":139}],112:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticMouseEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(114); +var ViewportMetrics = _dereq_(117); + +var getEventModifierState = _dereq_(139); + +/** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function(event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function(event) { + return event.relatedTarget || ( + ((event.fromElement === event.srcElement ? event.toElement : event.fromElement)) + ); + }, + // "Proprietary" Interface. + pageX: function(event) { + return 'pageX' in event ? + event.pageX : + event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function(event) { + return 'pageY' in event ? + event.pageY : + event.clientY + ViewportMetrics.currentScrollTop; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + +module.exports = SyntheticMouseEvent; + +},{"114":114,"117":117,"139":139}],113:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticTouchEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(114); + +var getEventModifierState = _dereq_(139); + +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + +module.exports = SyntheticTouchEvent; + +},{"114":114,"139":139}],114:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticUIEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(108); + +var getEventTarget = _dereq_(140); + +/** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var UIEventInterface = { + view: function(event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target != null && target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function(event) { + return event.detail || 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + +module.exports = SyntheticUIEvent; + +},{"108":108,"140":140}],115:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticWheelEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticMouseEvent = _dereq_(112); + +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function(event) { + return ( + 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0 + ); + }, + deltaY: function(event) { + return ( + 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0 + ); + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + +module.exports = SyntheticWheelEvent; + +},{"112":112}],116:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Transaction + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + * <pre> + * wrappers (injected at creation time) + * + + + * | | + * +-----------------|--------|--------------+ + * | v | | + * | +---------------+ | | + * | +--| wrapper1 |---|----+ | + * | | +---------------+ v | | + * | | +-------------+ | | + * | | +----| wrapper2 |--------+ | + * | | | +-------------+ | | | + * | | | | | | + * | v v v v | wrapper + * | +---+ +---+ +---------+ +---+ +---+ | invariants + * perform(anyMethod) | | | | | | | | | | | | maintained + * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | +---+ +---+ +---------+ +---+ +---+ | + * | initialize close | + * +-----------------------------------------+ + * </pre> + * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ +var Mixin = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function() { + this.transactionWrappers = this.getTransactionWrappers(); + if (!this.wrapperInitData) { + this.wrapperInitData = []; + } else { + this.wrapperInitData.length = 0; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array<TransactionWrapper>} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function() { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} args... Arguments to pass to the method (optional). + * Helps prevent need to bind in many cases. + * @return Return value from `method`. + */ + perform: function(method, scope, a, b, c, d, e, f) { + ("production" !== "development" ? invariant( + !this.isInTransaction(), + 'Transaction.perform(...): Cannot initialize a transaction when there ' + + 'is already an outstanding transaction.' + ) : invariant(!this.isInTransaction())); + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) { + } + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function(startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? + wrapper.initialize.call(this) : + null; + } finally { + if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) { + } + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function(startIndex) { + ("production" !== "development" ? invariant( + this.isInTransaction(), + 'Transaction.closeAll(): Cannot close transaction when none are open.' + ) : invariant(this.isInTransaction())); + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) { + } + } + } + } + this.wrapperInitData.length = 0; + } +}; + +var Transaction = { + + Mixin: Mixin, + + /** + * Token to look for to determine if an error occured. + */ + OBSERVED_ERROR: {} + +}; + +module.exports = Transaction; + +},{"150":150}],117:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ViewportMetrics + */ + +'use strict'; + +var ViewportMetrics = { + + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function(scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + } + +}; + +module.exports = ViewportMetrics; + +},{}],118:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule accumulateInto + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + +function accumulateInto(current, next) { + ("production" !== "development" ? invariant( + next != null, + 'accumulateInto(...): Accumulated items must not be null or undefined.' + ) : invariant(next != null)); + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + var currentIsArray = Array.isArray(current); + var nextIsArray = Array.isArray(next); + + if (currentIsArray && nextIsArray) { + current.push.apply(current, next); + return current; + } + + if (currentIsArray) { + current.push(next); + return current; + } + + if (nextIsArray) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; +} + +module.exports = accumulateInto; + +},{"150":150}],119:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule adler32 + */ + +/* jslint bitwise:true */ + +'use strict'; + +var MOD = 65521; + +// This is a clean-room implementation of adler32 designed for detecting +// if markup is not what we expect it to be. It does not need to be +// cryptographically strong, only reasonably good at detecting if markup +// generated on the server is different than that on the client. +function adler32(data) { + var a = 1; + var b = 0; + for (var i = 0; i < data.length; i++) { + a = (a + data.charCodeAt(i)) % MOD; + b = (b + a) % MOD; + } + return a | (b << 16); +} + +module.exports = adler32; + +},{}],120:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelize + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function(_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +},{}],121:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelizeStyleName + * @typechecks + */ + +"use strict"; + +var camelize = _dereq_(120); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; + +},{"120":120}],122:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks static-only + * @providesModule cloneWithProps + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactPropTransferer = _dereq_(83); + +var keyOf = _dereq_(157); +var warning = _dereq_(171); + +var CHILDREN_PROP = keyOf({children: null}); + +/** + * Sometimes you want to change the props of a child passed to you. Usually + * this is to add a CSS class. + * + * @param {ReactElement} child child element you'd like to clone + * @param {object} props props you'd like to modify. className and style will be + * merged automatically. + * @return {ReactElement} a clone of child with props merged in. + */ +function cloneWithProps(child, props) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + !child.ref, + 'You are calling cloneWithProps() on a child with a ref. This is ' + + 'dangerous because you\'re creating a new child which will not be ' + + 'added as a ref to its parent.' + ) : null); + } + + var newProps = ReactPropTransferer.mergeProps(props, child.props); + + // Use `child.props.children` if it is provided. + if (!newProps.hasOwnProperty(CHILDREN_PROP) && + child.props.hasOwnProperty(CHILDREN_PROP)) { + newProps.children = child.props.children; + } + + // The current API doesn't retain _owner and _context, which is why this + // doesn't use ReactElement.cloneAndReplaceProps. + return ReactElement.createElement(child.type, newProps); +} + +module.exports = cloneWithProps; + +},{"157":157,"171":171,"63":63,"83":83}],123:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule containsNode + * @typechecks + */ + +var isTextNode = _dereq_(154); + +/*jslint bitwise:true */ + +/** + * Checks if a given DOM node contains or is another DOM node. + * + * @param {?DOMNode} outerNode Outer DOM node. + * @param {?DOMNode} innerNode Inner DOM node. + * @return {boolean} True if `outerNode` contains or is `innerNode`. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if (outerNode.contains) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +},{"154":154}],124:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createArrayFromMixed + * @typechecks + */ + +var toArray = _dereq_(168); + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && + // arrays are objects, NodeLists are functions in Safari + (typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + ('length' in obj) && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + (typeof obj.nodeType != 'number') && + ( + // a real array + (// HTMLCollection/NodeList + (Array.isArray(obj) || + // arguments + ('callee' in obj) || 'item' in obj)) + ) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; + +},{"168":168}],125:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createFullPageComponent + * @typechecks + */ + +'use strict'; + +// Defeat circular references by requiring this directly. +var ReactClass = _dereq_(38); +var ReactElement = _dereq_(63); + +var invariant = _dereq_(150); + +/** + * Create a component that will throw an exception when unmounted. + * + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + * + * @param {string} tag The tag to wrap + * @return {function} convenience constructor of new component + */ +function createFullPageComponent(tag) { + var elementFactory = ReactElement.createFactory(tag); + + var FullPageComponent = ReactClass.createClass({ + displayName: 'ReactFullPageComponent' + tag, + + componentWillUnmount: function() { + ("production" !== "development" ? invariant( + false, + '%s tried to unmount. Because of cross-browser quirks it is ' + + 'impossible to unmount some top-level components (eg <html>, <head>, ' + + 'and <body>) reliably and efficiently. To fix this, have a single ' + + 'top-level component that never unmounts render these elements.', + this.constructor.displayName + ) : invariant(false)); + }, + + render: function() { + return elementFactory(this.props); + } + }); + + return FullPageComponent; +} + +module.exports = createFullPageComponent; + +},{"150":150,"38":38,"63":63}],126:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createNodesFromMarkup + * @typechecks + */ + +/*jslint evil: true, sub: true */ + +var ExecutionEnvironment = _dereq_(22); + +var createArrayFromMixed = _dereq_(124); +var getMarkupWrap = _dereq_(142); +var invariant = _dereq_(150); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = + ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode)); + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + ("production" !== "development" ? invariant( + handleScript, + 'createNodesFromMarkup(...): Unexpected <script> element rendered.' + ) : invariant(handleScript)); + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = createArrayFromMixed(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; + +},{"124":124,"142":142,"150":150,"22":22}],127:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule cx + */ + +/** + * This function is used to mark string literals representing CSS class names + * so that they can be transformed statically. This allows for modularization + * and minification of CSS class names. + * + * In static_upstream, this function is actually implemented, but it should + * eventually be replaced with something more descriptive, and the transform + * that is used in the main stack should be ported for use elsewhere. + * + * @param string|object className to modularize, or an object of key/values. + * In the object case, the values are conditions that + * determine if the className keys should be included. + * @param [string ...] Variable list of classNames in the string case. + * @return string Renderable space-separated CSS className. + */ + +'use strict'; +var warning = _dereq_(171); + +var warned = false; + +function cx(classNames) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + warned, + 'React.addons.classSet will be deprecated in a future version. See ' + + 'http://fb.me/react-addons-classset' + ) : null); + warned = true; + } + + if (typeof classNames == 'object') { + return Object.keys(classNames).filter(function(className) { + return classNames[className]; + }).join(' '); + } else { + return Array.prototype.join.call(arguments, ' '); + } +} + +module.exports = cx; + +},{"171":171}],128:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule dangerousStyleValue + * @typechecks static-only + */ + +'use strict'; + +var CSSProperty = _dereq_(5); + +var isUnitlessNumber = CSSProperty.isUnitlessNumber; + +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if (isNonNumeric || value === 0 || + isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + value = value.trim(); + } + return value + 'px'; +} + +module.exports = dangerousStyleValue; + +},{"5":5}],129:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + */ + +function makeEmptyFunction(arg) { + return function() { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +function emptyFunction() {} + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function() { return this; }; +emptyFunction.thatReturnsArgument = function(arg) { return arg; }; + +module.exports = emptyFunction; + +},{}],130:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyObject + */ + +"use strict"; + +var emptyObject = {}; + +if ("production" !== "development") { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; + +},{}],131:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule escapeTextContentForBrowser + */ + +'use strict'; + +var ESCAPE_LOOKUP = { + '&': '&', + '>': '>', + '<': '<', + '"': '"', + '\'': ''' +}; + +var ESCAPE_REGEX = /[&><"']/g; + +function escaper(match) { + return ESCAPE_LOOKUP[match]; +} + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ +function escapeTextContentForBrowser(text) { + return ('' + text).replace(ESCAPE_REGEX, escaper); +} + +module.exports = escapeTextContentForBrowser; + +},{}],132:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule findDOMNode + * @typechecks static-only + */ + +'use strict'; + +var ReactCurrentOwner = _dereq_(45); +var ReactInstanceMap = _dereq_(73); +var ReactMount = _dereq_(77); + +var invariant = _dereq_(150); +var isNode = _dereq_(152); +var warning = _dereq_(171); + +/** + * Returns the DOM node rendered by this element. + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if ("production" !== "development") { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + ("production" !== "development" ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing getDOMNode or findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (isNode(componentOrElement)) { + return componentOrElement; + } + if (ReactInstanceMap.has(componentOrElement)) { + return ReactMount.getNodeFromInstance(componentOrElement); + } + ("production" !== "development" ? invariant( + componentOrElement.render == null || + typeof componentOrElement.render !== 'function', + 'Component (with keys: %s) contains `render` method ' + + 'but is not mounted in the DOM', + Object.keys(componentOrElement) + ) : invariant(componentOrElement.render == null || + typeof componentOrElement.render !== 'function')); + ("production" !== "development" ? invariant( + false, + 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', + Object.keys(componentOrElement) + ) : invariant(false)); +} + +module.exports = findDOMNode; + +},{"150":150,"152":152,"171":171,"45":45,"73":73,"77":77}],133:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule flattenChildren + */ + +'use strict'; + +var traverseAllChildren = _dereq_(169); +var warning = _dereq_(171); + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + */ +function flattenSingleChildIntoContext(traverseContext, child, name) { + // We found a component instance. + var result = traverseContext; + var keyUnique = !result.hasOwnProperty(name); + if ("production" !== "development") { + ("production" !== "development" ? warning( + keyUnique, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.', + name + ) : null); + } + if (keyUnique && child != null) { + result[name] = child; + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children) { + if (children == null) { + return children; + } + var result = {}; + traverseAllChildren(children, flattenSingleChildIntoContext, result); + return result; +} + +module.exports = flattenChildren; + +},{"169":169,"171":171}],134:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule focusNode + */ + +"use strict"; + +/** + * @param {DOMElement} node input/textarea to focus + */ +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch(e) { + } +} + +module.exports = focusNode; + +},{}],135:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule forEachAccumulated + */ + +'use strict'; + +/** + * @param {array} an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ +var forEachAccumulated = function(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } +}; + +module.exports = forEachAccumulated; + +},{}],136:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getActiveElement + * @typechecks + */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document body is not yet defined. + */ +function getActiveElement() /*?DOMElement*/ { + try { + return document.activeElement || document.body; + } catch (e) { + return document.body; + } +} + +module.exports = getActiveElement; + +},{}],137:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventCharCode + * @typechecks static-only + */ + +'use strict'; + +/** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `charCode` property. + */ +function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; +} + +module.exports = getEventCharCode; + +},{}],138:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventKey + * @typechecks static-only + */ + +'use strict'; + +var getEventCharCode = _dereq_(137); + +/** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var normalizeKey = { + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' +}; + +/** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; + +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; +} + +module.exports = getEventKey; + +},{"137":137}],139:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventModifierState + * @typechecks static-only + */ + +'use strict'; + +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + +var modifierKeyToProp = { + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' +}; + +// IE8 does not implement getModifierState so we simply map it to the only +// modifier keys exposed by the event itself, does not support Lock-keys. +// Currently, all major browsers except Chrome seems to support Lock-keys. +function modifierStateGetter(keyArg) { + /*jshint validthis:true */ + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; +} + +function getEventModifierState(nativeEvent) { + return modifierStateGetter; +} + +module.exports = getEventModifierState; + +},{}],140:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventTarget + * @typechecks static-only + */ + +'use strict'; + +/** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ +function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; +} + +module.exports = getEventTarget; + +},{}],141:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getIteratorFn + * @typechecks static-only + */ + +'use strict'; + +/* global Symbol */ +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && ( + (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]) + ); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +},{}],142:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getMarkupWrap + */ + +var ExecutionEnvironment = _dereq_(22); + +var invariant = _dereq_(150); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = + ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ +var shouldWrap = { + // Force wrapping for SVG elements because if they get created inside a <div>, + // they will be initialized in the wrong namespace (and will not display). + 'circle': true, + 'defs': true, + 'ellipse': true, + 'g': true, + 'line': true, + 'linearGradient': true, + 'path': true, + 'polygon': true, + 'polyline': true, + 'radialGradient': true, + 'rect': true, + 'stop': true, + 'text': true +}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg>', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap, + + 'circle': svgWrap, + 'defs': svgWrap, + 'ellipse': svgWrap, + 'g': svgWrap, + 'line': svgWrap, + 'linearGradient': svgWrap, + 'path': svgWrap, + 'polygon': svgWrap, + 'polyline': svgWrap, + 'radialGradient': svgWrap, + 'rect': svgWrap, + 'stop': svgWrap, + 'text': svgWrap +}; + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode)); + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} + + +module.exports = getMarkupWrap; + +},{"150":150,"22":22}],143:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getNodeForCharacterOffset + */ + +'use strict'; + +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} + +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } +} + +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } +} + +module.exports = getNodeForCharacterOffset; + +},{}],144:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getReactRootElementInContainer + */ + +'use strict'; + +var DOC_NODE_TYPE = 9; + +/** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +module.exports = getReactRootElementInContainer; + +},{}],145:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getTextContentAccessor + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +var contentKey = null; + +/** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ +function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? + 'textContent' : + 'innerText'; + } + return contentKey; +} + +module.exports = getTextContentAccessor; + +},{"22":22}],146:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getUnboundedScrollPosition + * @typechecks + */ + +"use strict"; + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ +function getUnboundedScrollPosition(scrollable) { + if (scrollable === window) { + return { + x: window.pageXOffset || document.documentElement.scrollLeft, + y: window.pageYOffset || document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +},{}],147:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenate + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +},{}],148:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenateStyleName + * @typechecks + */ + +"use strict"; + +var hyphenate = _dereq_(147); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +},{"147":147}],149:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule instantiateReactComponent + * @typechecks static-only + */ + +'use strict'; + +var ReactCompositeComponent = _dereq_(43); +var ReactEmptyComponent = _dereq_(65); +var ReactNativeComponent = _dereq_(80); + +var assign = _dereq_(29); +var invariant = _dereq_(150); +var warning = _dereq_(171); + +// To avoid a cyclic dependency, we create the final class in this module +var ReactCompositeComponentWrapper = function() { }; +assign( + ReactCompositeComponentWrapper.prototype, + ReactCompositeComponent.Mixin, + { + _instantiateReactComponent: instantiateReactComponent + } +); + +/** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ +function isInternalComponentType(type) { + return ( + typeof type === 'function' && + typeof type.prototype.mountComponent === 'function' && + typeof type.prototype.receiveComponent === 'function' + ); +} + +/** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {*} parentCompositeType The composite type that resolved this. + * @return {object} A new instance of the element's constructor. + * @protected + */ +function instantiateReactComponent(node, parentCompositeType) { + var instance; + + if (node === null || node === false) { + node = ReactEmptyComponent.emptyElement; + } + + if (typeof node === 'object') { + var element = node; + if ("production" !== "development") { + ("production" !== "development" ? warning( + element && (typeof element.type === 'function' || + typeof element.type === 'string'), + 'Only functions or strings can be mounted as React components.' + ) : null); + } + + // Special case string values + if (parentCompositeType === element.type && + typeof element.type === 'string') { + // Avoid recursion if the wrapper renders itself. + instance = ReactNativeComponent.createInternalComponent(element); + // All native components are currently wrapped in a composite so we're + // safe to assume that this is what we should instantiate. + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // represenations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + } else { + instance = new ReactCompositeComponentWrapper(); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactNativeComponent.createInstanceForText(node); + } else { + ("production" !== "development" ? invariant( + false, + 'Encountered invalid React node of type %s', + typeof node + ) : invariant(false)); + } + + if ("production" !== "development") { + ("production" !== "development" ? warning( + typeof instance.construct === 'function' && + typeof instance.mountComponent === 'function' && + typeof instance.receiveComponent === 'function' && + typeof instance.unmountComponent === 'function', + 'Only React Components can be mounted.' + ) : null); + } + + // Sets up the instance. This can probably just move into the constructor now. + instance.construct(node); + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if ("production" !== "development") { + instance._isOwnerNecessary = false; + instance._warnedAboutRefsInRender = false; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if ("production" !== "development") { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; +} + +module.exports = instantiateReactComponent; + +},{"150":150,"171":171,"29":29,"43":43,"65":65,"80":80}],150:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + +"use strict"; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if ("production" !== "development") { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + +},{}],151:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isEventSupported + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +var useHasFeature; +if (ExecutionEnvironment.canUseDOM) { + useHasFeature = + document.implementation && + document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; +} + +/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || + capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; +} + +module.exports = isEventSupported; + +},{"22":22}],152:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isNode + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + return !!(object && ( + ((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && + typeof object.nodeType === 'number' && + typeof object.nodeName === 'string')) + )); +} + +module.exports = isNode; + +},{}],153:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextInputElement + */ + +'use strict'; + +/** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ +var supportedInputTypes = { + 'color': true, + 'date': true, + 'datetime': true, + 'datetime-local': true, + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true +}; + +function isTextInputElement(elem) { + return elem && ( + (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA') + ); +} + +module.exports = isTextInputElement; + +},{}],154:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextNode + * @typechecks + */ + +var isNode = _dereq_(152); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +},{"152":152}],155:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule joinClasses + * @typechecks static-only + */ + +'use strict'; + +/** + * Combines multiple className strings into one. + * http://jsperf.com/joinclasses-args-vs-array + * + * @param {...?string} classes + * @return {string} + */ +function joinClasses(className/*, ... */) { + if (!className) { + className = ''; + } + var nextClass; + var argLength = arguments.length; + if (argLength > 1) { + for (var ii = 1; ii < argLength; ii++) { + nextClass = arguments[ii]; + if (nextClass) { + className = (className ? className + ' ' : '') + nextClass; + } + } + } + return className; +} + +module.exports = joinClasses; + +},{}],156:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyMirror + * @typechecks static-only + */ + +'use strict'; + +var invariant = _dereq_(150); + +/** + * Constructs an enumeration with keys equal to their value. + * + * For example: + * + * var COLORS = keyMirror({blue: null, red: null}); + * var myColor = COLORS.blue; + * var isColorValid = !!COLORS[myColor]; + * + * The last line could not be performed if the values of the generated enum were + * not equal to their keys. + * + * Input: {key1: val1, key2: val2} + * Output: {key1: key1, key2: key2} + * + * @param {object} obj + * @return {object} + */ +var keyMirror = function(obj) { + var ret = {}; + var key; + ("production" !== "development" ? invariant( + obj instanceof Object && !Array.isArray(obj), + 'keyMirror(...): Argument must be an object.' + ) : invariant(obj instanceof Object && !Array.isArray(obj))); + for (key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + ret[key] = key; + } + return ret; +}; + +module.exports = keyMirror; + +},{"150":150}],157:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyOf + */ + +/** + * Allows extraction of a minified key. Let's the build system minify keys + * without loosing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ +var keyOf = function(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; +}; + + +module.exports = keyOf; + +},{}],158:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule mapObject + */ + +'use strict'; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Executes the provided `callback` once for each enumerable own property in the + * object and constructs a new object from the results. The `callback` is + * invoked with three arguments: + * + * - the property value + * - the property name + * - the object being traversed + * + * Properties that are added after the call to `mapObject` will not be visited + * by `callback`. If the values of existing properties are changed, the value + * passed to `callback` will be the value at the time `mapObject` visits them. + * Properties that are deleted before being visited are not visited. + * + * @grep function objectMap() + * @grep function objMap() + * + * @param {?object} object + * @param {function} callback + * @param {*} context + * @return {?object} + */ +function mapObject(object, callback, context) { + if (!object) { + return null; + } + var result = {}; + for (var name in object) { + if (hasOwnProperty.call(object, name)) { + result[name] = callback.call(context, object[name], name, object); + } + } + return result; +} + +module.exports = mapObject; + +},{}],159:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule memoizeStringOnly + * @typechecks static-only + */ + +'use strict'; + +/** + * Memoizes the return value of a function that accepts one string argument. + * + * @param {function} callback + * @return {function} + */ +function memoizeStringOnly(callback) { + var cache = {}; + return function(string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +},{}],160:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule onlyChild + */ +'use strict'; + +var ReactElement = _dereq_(63); + +var invariant = _dereq_(150); + +/** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. The current implementation of this + * function assumes that a single child gets passed without a wrapper, but the + * purpose of this helper function is to abstract away the particular structure + * of children. + * + * @param {?object} children Child collection structure. + * @return {ReactComponent} The first and only `ReactComponent` contained in the + * structure. + */ +function onlyChild(children) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(children), + 'onlyChild must be passed a children with exactly one child.' + ) : invariant(ReactElement.isValidElement(children))); + return children; +} + +module.exports = onlyChild; + +},{"150":150,"63":63}],161:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performance + * @typechecks + */ + +"use strict"; + +var ExecutionEnvironment = _dereq_(22); + +var performance; + +if (ExecutionEnvironment.canUseDOM) { + performance = + window.performance || + window.msPerformance || + window.webkitPerformance; +} + +module.exports = performance || {}; + +},{"22":22}],162:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performanceNow + * @typechecks + */ + +var performance = _dereq_(161); + +/** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ +if (!performance || !performance.now) { + performance = Date; +} + +var performanceNow = performance.now.bind(performance); + +module.exports = performanceNow; + +},{"161":161}],163:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule quoteAttributeValueForBrowser + */ + +'use strict'; + +var escapeTextContentForBrowser = _dereq_(131); + +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} + +module.exports = quoteAttributeValueForBrowser; + +},{"131":131}],164:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setInnerHTML + */ + +/* globals MSApp */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); + +var WHITESPACE_TEST = /^[ \r\n\t\f]/; +var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + +/** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ +var setInnerHTML = function(node, html) { + node.innerHTML = html; +}; + +// Win8 apps: Allow all html to be inserted +if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + setInnerHTML = function(node, html) { + MSApp.execUnsafeLocalFunction(function() { + node.innerHTML = html; + }); + }; +} + +if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function(node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || + html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + node.innerHTML = '\uFEFF' + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } +} + +module.exports = setInnerHTML; + +},{"22":22}],165:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setTextContent + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(22); +var escapeTextContentForBrowser = _dereq_(131); +var setInnerHTML = _dereq_(164); + +/** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ +var setTextContent = function(node, text) { + node.textContent = text; +}; + +if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function(node, text) { + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } +} + +module.exports = setTextContent; + +},{"131":131,"164":164,"22":22}],166:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shallowEqual + */ + +'use strict'; + +/** + * Performs equality by iterating through keys on an object and returning + * false when any key has values which are not strictly equal between + * objA and objB. Returns true when the values of all keys are strictly equal. + * + * @return {boolean} + */ +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + var key; + // Test for A's keys different from B. + for (key in objA) { + if (objA.hasOwnProperty(key) && + (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) { + return false; + } + } + // Test for B's keys missing from A. + for (key in objB) { + if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) { + return false; + } + } + return true; +} + +module.exports = shallowEqual; + +},{}],167:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shouldUpdateReactComponent + * @typechecks static-only + */ + +'use strict'; + +var warning = _dereq_(171); + +/** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ +function shouldUpdateReactComponent(prevElement, nextElement) { + if (prevElement != null && nextElement != null) { + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return (nextType === 'string' || nextType === 'number'); + } else { + if (nextType === 'object' && + prevElement.type === nextElement.type && + prevElement.key === nextElement.key) { + var ownersMatch = prevElement._owner === nextElement._owner; + var prevName = null; + var nextName = null; + var nextDisplayName = null; + if ("production" !== "development") { + if (!ownersMatch) { + if (prevElement._owner != null && + prevElement._owner.getPublicInstance() != null && + prevElement._owner.getPublicInstance().constructor != null) { + prevName = + prevElement._owner.getPublicInstance().constructor.displayName; + } + if (nextElement._owner != null && + nextElement._owner.getPublicInstance() != null && + nextElement._owner.getPublicInstance().constructor != null) { + nextName = + nextElement._owner.getPublicInstance().constructor.displayName; + } + if (nextElement.type != null && + nextElement.type.displayName != null) { + nextDisplayName = nextElement.type.displayName; + } + if (nextElement.type != null && typeof nextElement.type === 'string') { + nextDisplayName = nextElement.type; + } + if (typeof nextElement.type !== 'string' || + nextElement.type === 'input' || + nextElement.type === 'textarea') { + if ((prevElement._owner != null && + prevElement._owner._isOwnerNecessary === false) || + (nextElement._owner != null && + nextElement._owner._isOwnerNecessary === false)) { + if (prevElement._owner != null) { + prevElement._owner._isOwnerNecessary = true; + } + if (nextElement._owner != null) { + nextElement._owner._isOwnerNecessary = true; + } + ("production" !== "development" ? warning( + false, + '<%s /> is being rendered by both %s and %s using the same ' + + 'key (%s) in the same place. Currently, this means that ' + + 'they don\'t preserve state. This behavior should be very ' + + 'rare so we\'re considering deprecating it. Please contact ' + + 'the React team and explain your use case so that we can ' + + 'take that into consideration.', + nextDisplayName || 'Unknown Component', + prevName || '[Unknown]', + nextName || '[Unknown]', + prevElement.key + ) : null); + } + } + } + } + return ownersMatch; + } + } + } + return false; +} + +module.exports = shouldUpdateReactComponent; + +},{"171":171}],168:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule toArray + * @typechecks + */ + +var invariant = _dereq_(150); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browse builtin objects can report typeof 'function' (e.g. NodeList in + // old versions of Safari). + ("production" !== "development" ? invariant( + !Array.isArray(obj) && + (typeof obj === 'object' || typeof obj === 'function'), + 'toArray: Array-like object expected' + ) : invariant(!Array.isArray(obj) && + (typeof obj === 'object' || typeof obj === 'function'))); + + ("production" !== "development" ? invariant( + typeof length === 'number', + 'toArray: Object needs a length property' + ) : invariant(typeof length === 'number')); + + ("production" !== "development" ? invariant( + length === 0 || + (length - 1) in obj, + 'toArray: Object should have keys for indices' + ) : invariant(length === 0 || + (length - 1) in obj)); + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +module.exports = toArray; + +},{"150":150}],169:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule traverseAllChildren + */ + +'use strict'; + +var ReactElement = _dereq_(63); +var ReactFragment = _dereq_(69); +var ReactInstanceHandles = _dereq_(72); + +var getIteratorFn = _dereq_(141); +var invariant = _dereq_(150); +var warning = _dereq_(171); + +var SEPARATOR = ReactInstanceHandles.SEPARATOR; +var SUBSEPARATOR = ':'; + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var userProvidedKeyEscaperLookup = { + '=': '=0', + '.': '=1', + ':': '=2' +}; + +var userProvidedKeyEscapeRegex = /[=.:]/g; + +var didWarnAboutMaps = false; + +function userProvidedKeyEscaper(match) { + return userProvidedKeyEscaperLookup[match]; +} + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + if (component && component.key != null) { + // Explicit key + return wrapUserProvidedKey(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * Escape a component key so that it is safe to use in a reactid. + * + * @param {*} key Component key to be escaped. + * @return {string} An escaped string. + */ +function escapeUserProvidedKey(text) { + return ('' + text).replace( + userProvidedKeyEscapeRegex, + userProvidedKeyEscaper + ); +} + +/** + * Wrap a `key` value explicitly provided by the user to distinguish it from + * implicitly-generated keys generated by a component's index in its parent. + * + * @param {string} key Value of a user-provided `key` attribute + * @return {string} + */ +function wrapUserProvidedKey(key) { + return '$' + escapeUserProvidedKey(key); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!number} indexSoFar Number of children encountered until this point. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl( + children, + nameSoFar, + indexSoFar, + callback, + traverseContext +) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || + type === 'string' || + type === 'number' || + ReactElement.isValidElement(children)) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + indexSoFar + ); + return 1; + } + + var child, nextName, nextIndex; + var subtreeCount = 0; // Count of children found in the current subtree. + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, i) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, ii++) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } else { + if ("production" !== "development") { + ("production" !== "development" ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.' + ) : null); + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + + getComponentKey(child, 0) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } + } + } else if (type === 'object') { + ("production" !== "development" ? invariant( + children.nodeType !== 1, + 'traverseAllChildren(...): Encountered an invalid child; DOM ' + + 'elements are not valid children of React components.' + ) : invariant(children.nodeType !== 1)); + var fragment = ReactFragment.extract(children); + for (var key in fragment) { + if (fragment.hasOwnProperty(key)) { + child = fragment[key]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(key) + SUBSEPARATOR + + getComponentKey(child, 0) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', 0, callback, traverseContext); +} + +module.exports = traverseAllChildren; + +},{"141":141,"150":150,"171":171,"63":63,"69":69,"72":72}],170:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule update + */ + +'use strict'; + +var assign = _dereq_(29); +var keyOf = _dereq_(157); +var invariant = _dereq_(150); + +function shallowCopy(x) { + if (Array.isArray(x)) { + return x.concat(); + } else if (x && typeof x === 'object') { + return assign(new x.constructor(), x); + } else { + return x; + } +} + +var COMMAND_PUSH = keyOf({$push: null}); +var COMMAND_UNSHIFT = keyOf({$unshift: null}); +var COMMAND_SPLICE = keyOf({$splice: null}); +var COMMAND_SET = keyOf({$set: null}); +var COMMAND_MERGE = keyOf({$merge: null}); +var COMMAND_APPLY = keyOf({$apply: null}); + +var ALL_COMMANDS_LIST = [ + COMMAND_PUSH, + COMMAND_UNSHIFT, + COMMAND_SPLICE, + COMMAND_SET, + COMMAND_MERGE, + COMMAND_APPLY +]; + +var ALL_COMMANDS_SET = {}; + +ALL_COMMANDS_LIST.forEach(function(command) { + ALL_COMMANDS_SET[command] = true; +}); + +function invariantArrayCase(value, spec, command) { + ("production" !== "development" ? invariant( + Array.isArray(value), + 'update(): expected target of %s to be an array; got %s.', + command, + value + ) : invariant(Array.isArray(value))); + var specValue = spec[command]; + ("production" !== "development" ? invariant( + Array.isArray(specValue), + 'update(): expected spec of %s to be an array; got %s. ' + + 'Did you forget to wrap your parameter in an array?', + command, + specValue + ) : invariant(Array.isArray(specValue))); +} + +function update(value, spec) { + ("production" !== "development" ? invariant( + typeof spec === 'object', + 'update(): You provided a key path to update() that did not contain one ' + + 'of %s. Did you forget to include {%s: ...}?', + ALL_COMMANDS_LIST.join(', '), + COMMAND_SET + ) : invariant(typeof spec === 'object')); + + if (spec.hasOwnProperty(COMMAND_SET)) { + ("production" !== "development" ? invariant( + Object.keys(spec).length === 1, + 'Cannot have more than one key in an object with %s', + COMMAND_SET + ) : invariant(Object.keys(spec).length === 1)); + + return spec[COMMAND_SET]; + } + + var nextValue = shallowCopy(value); + + if (spec.hasOwnProperty(COMMAND_MERGE)) { + var mergeObj = spec[COMMAND_MERGE]; + ("production" !== "development" ? invariant( + mergeObj && typeof mergeObj === 'object', + 'update(): %s expects a spec of type \'object\'; got %s', + COMMAND_MERGE, + mergeObj + ) : invariant(mergeObj && typeof mergeObj === 'object')); + ("production" !== "development" ? invariant( + nextValue && typeof nextValue === 'object', + 'update(): %s expects a target of type \'object\'; got %s', + COMMAND_MERGE, + nextValue + ) : invariant(nextValue && typeof nextValue === 'object')); + assign(nextValue, spec[COMMAND_MERGE]); + } + + if (spec.hasOwnProperty(COMMAND_PUSH)) { + invariantArrayCase(value, spec, COMMAND_PUSH); + spec[COMMAND_PUSH].forEach(function(item) { + nextValue.push(item); + }); + } + + if (spec.hasOwnProperty(COMMAND_UNSHIFT)) { + invariantArrayCase(value, spec, COMMAND_UNSHIFT); + spec[COMMAND_UNSHIFT].forEach(function(item) { + nextValue.unshift(item); + }); + } + + if (spec.hasOwnProperty(COMMAND_SPLICE)) { + ("production" !== "development" ? invariant( + Array.isArray(value), + 'Expected %s target to be an array; got %s', + COMMAND_SPLICE, + value + ) : invariant(Array.isArray(value))); + ("production" !== "development" ? invariant( + Array.isArray(spec[COMMAND_SPLICE]), + 'update(): expected spec of %s to be an array of arrays; got %s. ' + + 'Did you forget to wrap your parameters in an array?', + COMMAND_SPLICE, + spec[COMMAND_SPLICE] + ) : invariant(Array.isArray(spec[COMMAND_SPLICE]))); + spec[COMMAND_SPLICE].forEach(function(args) { + ("production" !== "development" ? invariant( + Array.isArray(args), + 'update(): expected spec of %s to be an array of arrays; got %s. ' + + 'Did you forget to wrap your parameters in an array?', + COMMAND_SPLICE, + spec[COMMAND_SPLICE] + ) : invariant(Array.isArray(args))); + nextValue.splice.apply(nextValue, args); + }); + } + + if (spec.hasOwnProperty(COMMAND_APPLY)) { + ("production" !== "development" ? invariant( + typeof spec[COMMAND_APPLY] === 'function', + 'update(): expected spec of %s to be a function; got %s.', + COMMAND_APPLY, + spec[COMMAND_APPLY] + ) : invariant(typeof spec[COMMAND_APPLY] === 'function')); + nextValue = spec[COMMAND_APPLY](nextValue); + } + + for (var k in spec) { + if (!(ALL_COMMANDS_SET.hasOwnProperty(k) && ALL_COMMANDS_SET[k])) { + nextValue[k] = update(value[k], spec[k]); + } + } + + return nextValue; +} + +module.exports = update; + +},{"150":150,"157":157,"29":29}],171:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule warning + */ + +"use strict"; + +var emptyFunction = _dereq_(129); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if ("production" !== "development") { + warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); + console.warn(message); + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} + +module.exports = warning; + +},{"129":129}]},{},[1])(1) +}); \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/react-with-addons.min.js b/assets/js/react-0.13.0/build/react-with-addons.min.js new file mode 100755 index 0000000000000000000000000000000000000000..682007f12943fa6d7eff60da4be8502524906d8a --- /dev/null +++ b/assets/js/react-0.13.0/build/react-with-addons.min.js @@ -0,0 +1,16 @@ +/** + * React (with addons) v0.13.0 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t){"use strict";var n=e(25),r=e(31),o=e(42),i=e(34),a=e(67),s=e(95),u=e(97),l=e(124),c=e(119),p=e(165);r.addons={CSSTransitionGroup:i,LinkedStateMixin:n,PureRenderMixin:o,TransitionGroup:s,batchedUpdates:u.batchedUpdates,classSet:l,cloneWithProps:c,createFragment:a.create,update:p},t.exports=r},{119:119,124:124,165:165,25:25,31:31,34:34,42:42,67:67,95:95,97:97}],2:[function(e,t){"use strict";var n=e(131),r={componentDidMount:function(){this.props.autoFocus&&n(this.getDOMNode())}};t.exports=r},{131:131}],3:[function(e,t){"use strict";function n(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case N.topCompositionStart:return P.compositionStart;case N.topCompositionEnd:return P.compositionEnd;case N.topCompositionUpdate:return P.compositionUpdate}}function i(e,t){return e===N.topKeyDown&&t.keyCode===E}function a(e,t){switch(e){case N.topKeyUp:return-1!==C.indexOf(t.keyCode);case N.topKeyDown:return t.keyCode!==E;case N.topKeyPress:case N.topMouseDown:case N.topBlur:return!0;default:return!1}}function s(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function u(e,t,n,r){var u,l;if(b?u=o(e):R?a(e,r)&&(u=P.compositionEnd):i(e,r)&&(u=P.compositionStart),!u)return null;D&&(R||u!==P.compositionStart?u===P.compositionEnd&&R&&(l=R.getData()):R=m.getPooled(t));var c=v.getPooled(u,n,r);if(l)c.data=l;else{var p=s(r);null!==p&&(c.data=p)}return f.accumulateTwoPhaseDispatches(c),c}function l(e,t){switch(e){case N.topCompositionEnd:return s(t);case N.topKeyPress:var n=t.which;return n!==M?null:(I=!0,T);case N.topTextInput:var r=t.data;return r===T&&I?null:r;default:return null}}function c(e,t){if(R){if(e===N.topCompositionEnd||a(e,t)){var n=R.getData();return m.release(R),R=null,n}return null}switch(e){case N.topPaste:return null;case N.topKeyPress:return t.which&&!r(t)?String.fromCharCode(t.which):null;case N.topCompositionEnd:return D?null:t.data;default:return null}}function p(e,t,n,r){var o;if(o=x?l(e,r):c(e,r),!o)return null;var i=g.getPooled(P.beforeInput,n,r);return i.data=o,f.accumulateTwoPhaseDispatches(i),i}var d=e(16),f=e(21),h=e(22),m=e(23),v=e(103),g=e(107),y=e(154),C=[9,13,27,32],E=229,b=h.canUseDOM&&"CompositionEvent"in window,_=null;h.canUseDOM&&"documentMode"in document&&(_=document.documentMode);var x=h.canUseDOM&&"TextEvent"in window&&!_&&!n(),D=h.canUseDOM&&(!b||_&&_>8&&11>=_),M=32,T=String.fromCharCode(M),N=d.topLevelTypes,P={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[N.topCompositionEnd,N.topKeyPress,N.topTextInput,N.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[N.topBlur,N.topCompositionEnd,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[N.topBlur,N.topCompositionStart,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[N.topBlur,N.topCompositionUpdate,N.topKeyDown,N.topKeyPress,N.topKeyUp,N.topMouseDown]}},I=!1,R=null,w={eventTypes:P,extractEvents:function(e,t,n,r){return[u(e,t,n,r),p(e,t,n,r)]}};t.exports=w},{103:103,107:107,154:154,16:16,21:21,22:22,23:23}],4:[function(e,t){var n=e(147),r={addClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.add(t):r.hasClass(e,t)||(e.className=e.className+" "+t)),e},removeClass:function(e,t){return n(!/\s/.test(t)),t&&(e.classList?e.classList.remove(t):r.hasClass(e,t)&&(e.className=e.className.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,""))),e},conditionClass:function(e,t,n){return(n?r.addClass:r.removeClass)(e,t)},hasClass:function(e,t){return n(!/\s/.test(t)),e.classList?!!t&&e.classList.contains(t):(" "+e.className+" ").indexOf(" "+t+" ")>-1}};t.exports=r},{147:147}],5:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],6:[function(e,t){"use strict";var n=e(5),r=e(22),o=(e(118),e(125)),i=e(145),a=e(156),s=(e(166),a(function(e){return i(e)})),u="cssFloat";r.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(u="styleFloat");var l={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=s(n)+":",t+=o(n,r)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=o(i,t[i]);if("float"===i&&(i=u),a)r[i]=a;else{var s=n.shorthandPropertyExpansions[i];if(s)for(var l in s)r[l]="";else r[i]=""}}}};t.exports=l},{118:118,125:125,145:145,156:156,166:166,22:22,5:5}],7:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e(30),o=e(29),i=e(147);o(n.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){i(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{147:147,29:29,30:30}],8:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=_.getPooled(N.change,I,e);C.accumulateTwoPhaseDispatches(t),b.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){P=e,I=t,P.attachEvent("onchange",r)}function a(){P&&(P.detachEvent("onchange",r),P=null,I=null)}function s(e,t,n){return e===T.topChange?n:void 0}function u(e,t,n){e===T.topFocus?(a(),i(t,n)):e===T.topBlur&&a()}function l(e,t){P=e,I=t,R=e.value,w=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(P,"value",A),P.attachEvent("onpropertychange",p)}function c(){P&&(delete P.value,P.detachEvent("onpropertychange",p),P=null,I=null,R=null,w=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==R&&(R=t,r(e))}}function d(e,t,n){return e===T.topInput?n:void 0}function f(e,t,n){e===T.topFocus?(c(),l(t,n)):e===T.topBlur&&c()}function h(e){return e!==T.topSelectionChange&&e!==T.topKeyUp&&e!==T.topKeyDown||!P||P.value===R?void 0:(R=P.value,I)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===T.topClick?n:void 0}var g=e(16),y=e(18),C=e(21),E=e(22),b=e(97),_=e(105),x=e(148),D=e(150),M=e(154),T=g.topLevelTypes,N={change:{phasedRegistrationNames:{bubbled:M({onChange:null}),captured:M({onChangeCapture:null})},dependencies:[T.topBlur,T.topChange,T.topClick,T.topFocus,T.topInput,T.topKeyDown,T.topKeyUp,T.topSelectionChange]}},P=null,I=null,R=null,w=null,O=!1;E.canUseDOM&&(O=x("change")&&(!("documentMode"in document)||document.documentMode>8));var S=!1;E.canUseDOM&&(S=x("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return w.get.call(this)},set:function(e){R=""+e,w.set.call(this,e)}},k={eventTypes:N,extractEvents:function(e,t,r,o){var i,a;if(n(t)?O?i=s:a=u:D(t)?S?i=d:(i=h,a=f):m(t)&&(i=v),i){var l=i(e,t,r);if(l){var c=_.getPooled(N.change,l,o);return C.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,r)}};t.exports=k},{105:105,148:148,150:150,154:154,16:16,18:18,21:21,22:22,97:97}],9:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],10:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r=e(13),o=e(77),i=e(160),a=e(147),s={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:i,processUpdates:function(e,t){for(var s,u=null,l=null,c=0;c<e.length;c++)if(s=e[c],s.type===o.MOVE_EXISTING||s.type===o.REMOVE_NODE){var p=s.fromIndex,d=s.parentNode.childNodes[p],f=s.parentID;a(d),u=u||{},u[f]=u[f]||[],u[f][p]=d,l=l||[],l.push(d)}var h=r.dangerouslyRenderMarkup(t);if(l)for(var m=0;m<l.length;m++)l[m].parentNode.removeChild(l[m]);for(var v=0;v<e.length;v++)switch(s=e[v],s.type){case o.INSERT_MARKUP:n(s.parentNode,h[s.markupIndex],s.toIndex);break;case o.MOVE_EXISTING:n(s.parentNode,u[s.parentID][s.fromIndex],s.toIndex);break;case o.TEXT_CONTENT:i(s.parentNode,s.textContent);break;case o.REMOVE_NODE:}}};t.exports=s},{13:13,147:147,160:160,77:77}],11:[function(e,t){"use strict";function n(e,t){return(e&t)===t}var r=e(147),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},i=e.DOMAttributeNames||{},s=e.DOMPropertyNames||{},u=e.DOMMutationMethods||{};e.isCustomAttribute&&a._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var l in t){r(!a.isStandardName.hasOwnProperty(l)),a.isStandardName[l]=!0;var c=l.toLowerCase();if(a.getPossibleStandardName[c]=l,i.hasOwnProperty(l)){var p=i[l];a.getPossibleStandardName[p]=l,a.getAttributeName[l]=p}else a.getAttributeName[l]=c;a.getPropertyName[l]=s.hasOwnProperty(l)?s[l]:l,a.getMutationMethod[l]=u.hasOwnProperty(l)?u[l]:null;var d=t[l];a.mustUseAttribute[l]=n(d,o.MUST_USE_ATTRIBUTE),a.mustUseProperty[l]=n(d,o.MUST_USE_PROPERTY),a.hasSideEffects[l]=n(d,o.HAS_SIDE_EFFECTS),a.hasBooleanValue[l]=n(d,o.HAS_BOOLEAN_VALUE),a.hasNumericValue[l]=n(d,o.HAS_NUMERIC_VALUE),a.hasPositiveNumericValue[l]=n(d,o.HAS_POSITIVE_NUMERIC_VALUE),a.hasOverloadedBooleanValue[l]=n(d,o.HAS_OVERLOADED_BOOLEAN_VALUE),r(!a.mustUseAttribute[l]||!a.mustUseProperty[l]),r(a.mustUseProperty[l]||!a.hasSideEffects[l]),r(!!a.hasBooleanValue[l]+!!a.hasNumericValue[l]+!!a.hasOverloadedBooleanValue[l]<=1)}}},i={},a={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<a._isCustomAttributeFunctions.length;t++){var n=a._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:o};t.exports=a},{147:147}],12:[function(e,t){"use strict";function n(e,t){return null==t||r.hasBooleanValue[e]&&!t||r.hasNumericValue[e]&&isNaN(t)||r.hasPositiveNumericValue[e]&&1>t||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e(11),o=e(158),i=(e(166),{createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+o(e)},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?i:i+"="+o(t)}return r.isCustomAttribute(e)?null==t?"":e+"="+o(t):null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&""+e[a]==""+o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&""+e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}});t.exports=i},{11:11,158:158,166:166}],13:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e(22),o=e(123),i=e(126),a=e(139),s=e(147),u=/^(<[^ \/>]+)/,l="data-danger-index",c={dangerouslyRenderMarkup:function(e){s(r.canUseDOM);for(var t,c={},p=0;p<e.length;p++)s(e[p]),t=n(e[p]),t=a(t)?t:"*",c[t]=c[t]||[],c[t][p]=e[p];var d=[],f=0;for(t in c)if(c.hasOwnProperty(t)){var h,m=c[t];for(h in m)if(m.hasOwnProperty(h)){var v=m[h];m[h]=v.replace(u,"$1 "+l+'="'+h+'" ')}for(var g=o(m.join(""),i),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(l)&&(h=+C.getAttribute(l),C.removeAttribute(l),s(!d.hasOwnProperty(h)),d[h]=C,f+=1)}}return s(f===d.length),s(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){s(r.canUseDOM),s(t),s("html"!==e.tagName.toLowerCase());var n=o(t,i)[0];e.parentNode.replaceChild(n,e)}};t.exports=c},{123:123,126:126,139:139,147:147,22:22}],14:[function(e,t){"use strict";var n=e(154),r=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({ChangeEventPlugin:null}),n({SelectEventPlugin:null}),n({BeforeInputEventPlugin:null}),n({AnalyticsEventPlugin:null}),n({MobileSafariClickEventPlugin:null})];t.exports=r},{154:154}],15:[function(e,t){"use strict";var n=e(16),r=e(21),o=e(109),i=e(75),a=e(154),s=n.topLevelTypes,u=i.getFirstReactDOM,l={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[s.topMouseOut,s.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[s.topMouseOut,s.topMouseOver]}},c=[null,null],p={eventTypes:l,extractEvents:function(e,t,n,a){if(e===s.topMouseOver&&(a.relatedTarget||a.fromElement))return null;if(e!==s.topMouseOut&&e!==s.topMouseOver)return null;var p;if(t.window===t)p=t;else{var d=t.ownerDocument;p=d?d.defaultView||d.parentWindow:window}var f,h;if(e===s.topMouseOut?(f=t,h=u(a.relatedTarget||a.toElement)||p):(f=p,h=t),f===h)return null;var m=f?i.getID(f):"",v=h?i.getID(h):"",g=o.getPooled(l.mouseLeave,m,a);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=o.getPooled(l.mouseEnter,v,a);return y.type="mouseenter",y.target=h,y.relatedTarget=f,r.accumulateEnterLeaveDispatches(g,y,m,v),c[0]=g,c[1]=y,c}};t.exports=p},{109:109,154:154,16:16,21:21,75:75}],16:[function(e,t){"use strict";var n=e(153),r=n({bubbled:null,captured:null}),o=n({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),i={topLevelTypes:o,PropagationPhases:r};t.exports=i},{153:153}],17:[function(e,t){var n=e(126),r={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,r){return e.addEventListener?(e.addEventListener(t,r,!0),{remove:function(){e.removeEventListener(t,r,!0)}}):{remove:n}},registerDefault:function(){}};t.exports=r},{126:126}],18:[function(e,t){"use strict";var n=e(19),r=e(20),o=e(115),i=e(132),a=e(147),s={},u=null,l=function(e){if(e){var t=r.executeDispatch,o=n.getPluginModuleForEvent(e);o&&o.executeDispatch&&(t=o.executeDispatch),r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},c=null,p={injection:{injectMount:r.injection.injectMount,injectInstanceHandle:function(e){c=e},getInstanceHandle:function(){return c},injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(e,t,n){a(!n||"function"==typeof n);var r=s[t]||(s[t]={});r[e]=n},getListener:function(e,t){var n=s[t];return n&&n[e]},deleteListener:function(e,t){var n=s[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in s)delete s[t][e]},extractEvents:function(e,t,r,i){for(var a,s=n.plugins,u=0,l=s.length;l>u;u++){var c=s[u];if(c){var p=c.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(u=o(u,e))},processEventQueue:function(){var e=u;u=null,i(e,l),a(!u)},__purge:function(){s={}},__getListenerBank:function(){return s}};t.exports=p},{115:115,132:132,147:147,19:19,20:20}],19:[function(e,t){"use strict";function n(){if(a)for(var e in s){var t=s[e],n=a.indexOf(e);if(i(n>-1),!u.plugins[n]){i(t.extractEvents),u.plugins[n]=t;var o=t.eventTypes;for(var l in o)i(r(o[l],t,l))}}}function r(e,t,n){i(!u.eventNameDispatchConfigs.hasOwnProperty(n)),u.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var s=r[a];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!u.registrationNameModules[e]),u.registrationNameModules[e]=t,u.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(147),a=null,s={},u={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];s.hasOwnProperty(r)&&s[r]===o||(i(!s[r]),s[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return u.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=u.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in s)s.hasOwnProperty(e)&&delete s[e];u.plugins.length=0;var t=u.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=u.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=u},{147:147}],20:[function(e,t){"use strict";function n(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function r(e){return e===m.topMouseMove||e===m.topTouchMove}function o(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function a(e,t,n){e.currentTarget=h.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function s(e,t){i(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function u(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=u(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;f(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e(16),f=e(147),h={Mount:null,injectMount:function(e){h.Mount=e}},m=d.topLevelTypes,v={isEndish:n,isMoveish:r,isStartish:o,executeDirectDispatch:c,executeDispatch:a,executeDispatchesInOrder:s,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,injection:h,useTouchEvents:!1};t.exports=v},{147:147,16:16}],21:[function(e,t){"use strict";function n(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return m(e,r)}function r(e,t,r){var o=t?h.bubbled:h.captured,i=n(e,r,o);i&&(r._dispatchListeners=d(r._dispatchListeners,i),r._dispatchIDs=d(r._dispatchIDs,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,r,e)}function i(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(e,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.dispatchConfig.registrationName&&i(e.dispatchMarker,null,e)}function s(e){f(e,o)}function u(e,t,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,i,e,t)}function l(e){f(e,a)}var c=e(16),p=e(18),d=e(115),f=e(132),h=c.PropagationPhases,m=p.getListener,v={accumulateTwoPhaseDispatches:s,accumulateDirectDispatches:l,accumulateEnterLeaveDispatches:u};t.exports=v},{115:115,132:132,16:16,18:18}],22:[function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},{}],23:[function(e,t){"use strict";function n(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var r=e(30),o=e(29),i=e(142);o(n.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var s=t>1?1-t:void 0;return this._fallbackText=o.slice(e,s),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},{142:142,29:29,30:30}],24:[function(e,t){"use strict";var n,r=e(11),o=e(22),i=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,s=r.injection.HAS_BOOLEAN_VALUE,u=r.injection.HAS_SIDE_EFFECTS,l=r.injection.HAS_NUMERIC_VALUE,c=r.injection.HAS_POSITIVE_NUMERIC_VALUE,p=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var d=document.implementation;n=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|s,allowTransparency:i,alt:null,async:s,autoComplete:null,autoPlay:s,cellPadding:null,cellSpacing:null,charSet:i,checked:a|s,classID:i,className:n?i:a,cols:i|c,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:a|s,coords:null,crossOrigin:null,data:null,dateTime:i,defer:s,dir:null,disabled:i|s,download:p,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:s,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|s,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,label:null,lang:null,list:i,loop:a|s,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,multiple:a|s,muted:a|s,name:null,noValidate:s,open:s,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|s,rel:null,required:s,role:i,rows:i|c,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:i|s,selected:a|s,shape:null,size:i|c,sizes:i,span:c,spellCheck:null,src:null,srcDoc:a,srcSet:i,start:l,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|u,width:i,wmode:i,autoCapitalize:null,autoCorrect:null,itemProp:i,itemScope:i|s,itemType:i,itemID:i,itemRef:i,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{11:11,22:22}],25:[function(e,t){"use strict";var n=e(73),r=e(92),o={linkState:function(e){return new n(this.state[e],r.createStateKeySetter(this,e))}};t.exports=o},{73:73,92:92}],26:[function(e,t){"use strict";function n(e){u(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){n(e),u(null==e.props.value&&null==e.props.onChange)}function o(e){n(e),u(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var s=e(84),u=e(147),l={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},c={Mixin:{propTypes:{value:function(e,t){return!e[t]||l[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:s.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(o(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),i):e.props.checkedLink?(o(e),a):e.props.onChange}};t.exports=c},{147:147,84:84}],27:[function(e,t){"use strict";function n(e){e.remove()}var r=e(33),o=e(115),i=e(132),a=e(147),s={trapBubbledEvent:function(e,t){a(this.isMounted());var n=this.getDOMNode();a(n);var i=r.trapBubbledEvent(e,t,n);this._localEventListeners=o(this._localEventListeners,i)},componentWillUnmount:function(){this._localEventListeners&&i(this._localEventListeners,n)}};t.exports=s},{115:115,132:132,147:147,33:33}],28:[function(e,t){"use strict";var n=e(16),r=e(126),o=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===o.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=r)}}};t.exports=i},{126:126,16:16}],29:[function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o){var i=Object(o);for(var a in i)n.call(i,a)&&(t[a]=i[a])}}return t}t.exports=n},{}],30:[function(e,t){"use strict";var n=e(147),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},a=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},s=function(e){var t=this;n(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},u=10,l=r,c=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=u),n.release=s,n},p={addPoolingTo:c,oneArgumentPooler:r,twoArgumentPooler:o,threeArgumentPooler:i,fiveArgumentPooler:a};t.exports=p},{147:147}],31:[function(e,t){"use strict";var n=e(20),r=e(37),o=e(39),i=e(38),a=e(44),s=e(45),u=e(61),l=(e(62),e(46)),c=e(57),p=e(60),d=e(70),f=e(75),h=e(80),m=e(84),v=e(87),g=e(90),y=e(29),C=e(129),E=e(157);p.inject();var b=u.createElement,_=u.createFactory,x=u.cloneElement,D=h.measure("React","render",f.render),M={Children:{map:r.map,forEach:r.forEach,count:r.count,only:E},Component:o,DOM:l,PropTypes:m,initializeTouchEvents:function(e){n.useTouchEvents=e},createClass:i.createClass,createElement:b,cloneElement:x,createFactory:_,createMixin:function(e){return e},constructAndRenderComponent:f.constructAndRenderComponent,constructAndRenderComponentByID:f.constructAndRenderComponentByID,findDOMNode:C,render:D,renderToString:g.renderToString,renderToStaticMarkup:g.renderToStaticMarkup,unmountComponentAtNode:f.unmountComponentAtNode,isValidElement:u.isValidElement,withContext:a.withContext,__spread:y};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:s,InstanceHandles:d,Mount:f,Reconciler:v,TextComponent:c});M.version="0.13.0",t.exports=M},{129:129,157:157,20:20,29:29,37:37,38:38,39:39,44:44,45:45,46:46,57:57,60:60,61:61,62:62,70:70,75:75,80:80,84:84,87:87,90:90}],32:[function(e,t){"use strict";var n=e(129),r={getDOMNode:function(){return n(this)}};t.exports=r},{129:129}],33:[function(e,t){"use strict";function n(e){return Object.prototype.hasOwnProperty.call(e,h)||(e[h]=d++,c[e[h]]={}),c[e[h]]}var r=e(16),o=e(18),i=e(19),a=e(65),s=e(114),u=e(29),l=e(148),c={},p=!1,d=0,f={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},h="_reactListenersID"+String(Math.random()).slice(2),m=u({},a,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var o=t,a=n(o),s=i.registrationNameDependencies[e],u=r.topLevelTypes,c=0,p=s.length;p>c;c++){var d=s[c]; +a.hasOwnProperty(d)&&a[d]||(d===u.topWheel?l("wheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"wheel",o):l("mousewheel")?m.ReactEventListener.trapBubbledEvent(u.topWheel,"mousewheel",o):m.ReactEventListener.trapBubbledEvent(u.topWheel,"DOMMouseScroll",o):d===u.topScroll?l("scroll",!0)?m.ReactEventListener.trapCapturedEvent(u.topScroll,"scroll",o):m.ReactEventListener.trapBubbledEvent(u.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===u.topFocus||d===u.topBlur?(l("focus",!0)?(m.ReactEventListener.trapCapturedEvent(u.topFocus,"focus",o),m.ReactEventListener.trapCapturedEvent(u.topBlur,"blur",o)):l("focusin")&&(m.ReactEventListener.trapBubbledEvent(u.topFocus,"focusin",o),m.ReactEventListener.trapBubbledEvent(u.topBlur,"focusout",o)),a[u.topBlur]=!0,a[u.topFocus]=!0):f.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=s.refreshScrollValues;m.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=m},{114:114,148:148,16:16,18:18,19:19,29:29,65:65}],34:[function(e,t){"use strict";var n=e(31),r=e(29),o=n.createFactory(e(95)),i=n.createFactory(e(35)),a=n.createClass({displayName:"ReactCSSTransitionGroup",propTypes:{transitionName:n.PropTypes.string.isRequired,transitionAppear:n.PropTypes.bool,transitionEnter:n.PropTypes.bool,transitionLeave:n.PropTypes.bool},getDefaultProps:function(){return{transitionAppear:!1,transitionEnter:!0,transitionLeave:!0}},_wrapChild:function(e){return i({name:this.props.transitionName,appear:this.props.transitionAppear,enter:this.props.transitionEnter,leave:this.props.transitionLeave},e)},render:function(){return o(r({},this.props,{childFactory:this._wrapChild}))}});t.exports=a},{29:29,31:31,35:35,95:95}],35:[function(e,t){"use strict";var n=e(31),r=e(4),o=e(94),i=e(157),a=(e(166),17),s=n.createClass({displayName:"ReactCSSTransitionGroupChild",transition:function(e,t){var n=this.getDOMNode(),i=this.props.name+"-"+e,a=i+"-active",s=function(e){e&&e.target!==n||(r.removeClass(n,i),r.removeClass(n,a),o.removeEndEventListener(n,s),t&&t())};o.addEndEventListener(n,s),r.addClass(n,i),this.queueClass(a)},queueClass:function(e){this.classNameQueue.push(e),this.timeout||(this.timeout=setTimeout(this.flushClassNameQueue,a))},flushClassNameQueue:function(){this.isMounted()&&this.classNameQueue.forEach(r.addClass.bind(r,this.getDOMNode())),this.classNameQueue.length=0,this.timeout=null},componentWillMount:function(){this.classNameQueue=[]},componentWillUnmount:function(){this.timeout&&clearTimeout(this.timeout)},componentWillAppear:function(e){this.props.appear?this.transition("appear",e):e()},componentWillEnter:function(e){this.props.enter?this.transition("enter",e):e()},componentWillLeave:function(e){this.props.leave?this.transition("leave",e):e()},render:function(){return i(this.props.children)}});t.exports=s},{157:157,166:166,31:31,4:4,94:94}],36:[function(e,t){"use strict";var n=e(87),r=e(130),o=e(146),i=e(162),a={instantiateChildren:function(e){var t=r(e);for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=o(i,null);t[n]=a}return t},updateChildren:function(e,t,a,s){var u=r(t);if(!u&&!e)return null;var l;for(l in u)if(u.hasOwnProperty(l)){var c=e&&e[l],p=c&&c._currentElement,d=u[l];if(i(p,d))n.receiveComponent(c,d,a,s),u[l]=c;else{c&&n.unmountComponent(c,l);var f=o(d,null);u[l]=f}}for(l in e)!e.hasOwnProperty(l)||u&&u.hasOwnProperty(l)||n.unmountComponent(e[l]);return u},unmountChildren:function(e){for(var t in e){var r=e[t];n.unmountComponent(r)}}};t.exports=a},{130:130,146:146,162:162,87:87}],37:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);d(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var s=o.mapFunction.call(o.mapContext,t,r);i[n]=s}}function s(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return d(e,a,o),i.release(o),p.create(r)}function u(){return null}function l(e){return d(e,u,null)}var c=e(30),p=e(67),d=e(164),f=(e(166),c.twoArgumentPooler),h=c.threeArgumentPooler;c.addPoolingTo(n,f),c.addPoolingTo(i,h);var m={forEach:o,map:s,count:l};t.exports=m},{164:164,166:166,30:30,67:67}],38:[function(e,t){"use strict";function n(e,t){var n=x.hasOwnProperty(t)?x[t]:null;M.hasOwnProperty(t)&&g(n===b.OVERRIDE_BASE),e.hasOwnProperty(t)&&g(n===b.DEFINE_MANY||n===b.DEFINE_MANY_MERGED)}function r(e,t){if(t){g("function"!=typeof t),g(!p.isValidElement(t));var r=e.prototype;t.hasOwnProperty(E)&&D.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==E){var i=t[o];if(n(r,o),D.hasOwnProperty(o))D[o](e,i);else{var u=x.hasOwnProperty(o),l=r.hasOwnProperty(o),c=i&&i.__reactDontBind,d="function"==typeof i,f=d&&!u&&!l&&!c;if(f)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=i,r[o]=i;else if(l){var h=x[o];g(u&&(h===b.DEFINE_MANY_MERGED||h===b.DEFINE_MANY)),h===b.DEFINE_MANY_MERGED?r[o]=a(r[o],i):h===b.DEFINE_MANY&&(r[o]=s(r[o],i))}else r[o]=i}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in D;g(!o);var i=n in e;g(!i),e[n]=r}}}function i(e,t){g(e&&t&&"object"==typeof e&&"object"==typeof t);for(var n in t)t.hasOwnProperty(n)&&(g(void 0===e[n]),e[n]=t[n]);return e}function a(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function s(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function u(e,t){var n=t.bind(e);return n}function l(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=u(e,d.guard(n,e.constructor.displayName+"."+t))}}var c=e(39),p=(e(45),e(61)),d=e(64),f=e(71),h=e(72),m=(e(83),e(82),e(96)),v=e(29),g=e(147),y=e(153),C=e(154),E=(e(166),C({mixins:null})),b=y({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],x={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},D={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)r(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=v({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=v({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps=e.getDefaultProps?a(e.getDefaultProps,t):t},propTypes:function(e,t){e.propTypes=v({},e.propTypes,t)},statics:function(e,t){o(e,t)}},M={replaceState:function(e,t){m.enqueueReplaceState(this,e),t&&m.enqueueCallback(this,t)},isMounted:function(){var e=f.get(this);return e&&e!==h.currentlyMountingInstance},setProps:function(e,t){m.enqueueSetProps(this,e),t&&m.enqueueCallback(this,t)},replaceProps:function(e,t){m.enqueueReplaceProps(this,e),t&&m.enqueueCallback(this,t)}},T=function(){};v(T.prototype,c.prototype,M);var N={createClass:function(e){var t=function(e,t){this.__reactAutoBindMap&&l(this),this.props=e,this.context=t,this.state=null;var n=this.getInitialState?this.getInitialState():null;g("object"==typeof n&&!Array.isArray(n)),this.state=n};t.prototype=new T,t.prototype.constructor=t,_.forEach(r.bind(null,t)),r(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),g(t.prototype.render);for(var n in x)t.prototype[n]||(t.prototype[n]=null);return t.type=t,t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=N},{147:147,153:153,154:154,166:166,29:29,39:39,45:45,61:61,64:64,71:71,72:72,82:82,83:83,96:96}],39:[function(e,t){"use strict";function n(e,t){this.props=e,this.context=t}{var r=e(96),o=e(147);e(166)}n.prototype.setState=function(e,t){o("object"==typeof e||"function"==typeof e||null==e),r.enqueueSetState(this,e),t&&r.enqueueCallback(this,t)},n.prototype.forceUpdate=function(e){r.enqueueForceUpdate(this),e&&r.enqueueCallback(this,e)};t.exports=n},{147:147,166:166,96:96}],40:[function(e,t){"use strict";var n=e(50),r=e(75),o={processChildrenUpdates:n.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:n.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){r.purgeID(e)}};t.exports=o},{50:50,75:75}],41:[function(e,t){"use strict";var n=e(147),r=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){n(!r),o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,r=!0}}};t.exports=o},{147:147}],42:[function(e,t){"use strict";var n=e(161),r={shouldComponentUpdate:function(e,t){return!n(this.props,e)||!n(this.state,t)}};t.exports=r},{161:161}],43:[function(e,t){"use strict";function n(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var r=e(41),o=e(44),i=e(45),a=e(61),s=(e(62),e(71)),u=e(72),l=e(78),c=e(80),p=e(83),d=(e(82),e(87)),f=e(97),h=e(29),m=e(127),v=e(147),g=e(162),y=(e(166),1),C={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=y++,this._rootNodeID=e;var r=this._processProps(this._currentElement.props),o=this._processContext(this._currentElement._context),i=l.getComponentClassForElement(this._currentElement),a=new i(r,o);a.props=r,a.context=o,a.refs=m,this._instance=a,s.set(a,this);var c=a.state;void 0===c&&(a.state=c=null),v("object"==typeof c&&!Array.isArray(c)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var p,f=u.currentlyMountingInstance;u.currentlyMountingInstance=this;try{a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),p=this._renderValidatedComponent()}finally{u.currentlyMountingInstance=f}this._renderedComponent=this._instantiateReactComponent(p,this._currentElement.type);var h=d.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return a.componentDidMount&&t.getReactMountReady().enqueue(a.componentDidMount,a),h},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=u.currentlyUnmountingInstance;u.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{u.currentlyUnmountingInstance=t}}d.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,s.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=a.cloneAndReplaceProps(n,h({},n.props,e)),f.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return m;var n=this._currentElement.type.contextTypes;if(!n)return m;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._instance,n=t.getChildContext&&t.getChildContext();if(n){v("object"==typeof t.constructor.childContextTypes);for(var r in n)v(r in t.constructor.childContextTypes);return h({},e,n)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,r){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var a;try{v("function"==typeof e[i]),a=e[i](t,i,o,r)}catch(s){a=s}a instanceof Error&&(n(this),r===p.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&d.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(e,t){e=this._maskContext(e),t=this._maskContext(t);for(var n=Object.keys(t).sort(),r=(this.getName()||"ReactCompositeComponent",0);r<n.length;r++)n[r]},updateComponent:function(e,t,n,r,o){var i=this._instance,a=i.context,s=i.props;t!==n&&(a=this._processContext(n._context),s=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(s,a));var u=this._processPendingState(s,a),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(s,u,a);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,s,u,a,e,o)):(this._currentElement=n,this._context=o,i.props=s,i.state=u,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;for(var i=h({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var s=r[a];h(i,"function"==typeof s?s.call(n,i,e,t):s)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a=this._instance,s=a.props,u=a.state,l=a.context;a.componentWillUpdate&&a.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,a.props=t,a.state=n,a.context=r,this._updateRenderedComponent(o,i),a.componentDidUpdate&&o.getReactMountReady().enqueue(a.componentDidUpdate.bind(a,s,u,l),a)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(g(r,o))d.receiveComponent(n,o,e,this._processChildContext(t));else{var i=this._rootNodeID,a=n._rootNodeID;d.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o,this._currentElement.type);var s=d.mountComponent(this._renderedComponent,i,e,t);this._replaceNodeWithMarkupByID(a,s)}},_replaceNodeWithMarkupByID:function(e,t){r.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e,t=o.current;o.current=this._processChildContext(this._currentElement._context),i.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{o.current=t,i.current=null}return v(null===e||e===!1||a.isValidElement(e)),e},attachRef:function(e,t){var n=this.getPublicInstance(),r=n.refs===m?n.refs={}:n.refs;r[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};c.measureMethods(C,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var E={Mixin:C};t.exports=E},{127:127,147:147,162:162,166:166,29:29,41:41,44:44,45:45,61:61,62:62,71:71,72:72,78:78,80:80,82:82,83:83,87:87,97:97}],44:[function(e,t){"use strict";var n=e(29),r=e(127),o=(e(166),{current:r,withContext:function(e,t){var r,i=o.current;o.current=n({},i,e);try{r=t()}finally{o.current=i}return r}});t.exports=o},{127:127,166:166,29:29}],45:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],46:[function(e,t){"use strict";function n(e){return r.createFactory(e)}var r=e(61),o=(e(62),e(155)),i=o({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},n);t.exports=i},{155:155,61:61,62:62}],47:[function(e,t){"use strict";var n=e(2),r=e(32),o=e(38),i=e(61),a=e(153),s=i.createFactory("button"),u=a({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),l=o.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[n,r],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&u[t]||(e[t]=this.props[t]);return s(e,this.props.children)}});t.exports=l},{153:153,2:2,32:32,38:38,61:61}],48:[function(e,t){"use strict";function n(e){e&&(null!=e.dangerouslySetInnerHTML&&(v(null==e.children),v(null!=e.dangerouslySetInnerHTML.__html)),v(null==e.style||"object"==typeof e.style))}function r(e,t,n,r){var o=p.findReactContainerForID(e);if(o){var i=o.nodeType===x?o.ownerDocument:o;C(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function o(e){P.call(N,e)||(v(T.test(e)),N[e]=!0)}function i(e){o(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var a=e(6),s=e(11),u=e(12),l=e(33),c=e(40),p=e(75),d=e(76),f=e(80),h=e(29),m=e(128),v=e(147),g=(e(148),e(154)),y=(e(166),l.deleteListener),C=l.listenTo,E=l.registrationNameModules,b={string:!0,number:!0},_=g({style:null}),x=1,D=null,M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},T=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,N={},P={}.hasOwnProperty;i.displayName="ReactDOMComponent",i.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,r){this._rootNodeID=e,n(this._currentElement.props);var o=M[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,r)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(E.hasOwnProperty(o))r(this._rootNodeID,o,i,e);else{o===_&&(i&&(i=this._previousStyleCopy=h({},t.style)),i=a.createMarkupForStyles(i));var s=u.createMarkupForProperty(o,i);s&&(n+=" "+s)}}if(e.renderToStaticMarkup)return n+">";var l=u.createMarkupForID(this._rootNodeID);return n+" "+l+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=b[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var s=this.mountChildren(a,e,t);return n+s.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,r,o){n(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,o,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===_){var u=this._previousStyleCopy;for(o in u)u.hasOwnProperty(o)&&(i=i||{},i[o]="")}else E.hasOwnProperty(n)?y(this._rootNodeID,n):(s.isStandardName[n]||s.isCustomAttribute(n))&&D.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===_?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===_)if(l&&(l=this._previousStyleCopy=h({},l)),c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(i=i||{},i[o]=l[o])}else i=l;else E.hasOwnProperty(n)?r(this._rootNodeID,n,l,t):(s.isStandardName[n]||s.isCustomAttribute(n))&&D.updatePropertyByID(this._rootNodeID,n,l)}i&&D.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=b[typeof e.children]?e.children:null,i=b[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,s=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,u=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=s;null!=u&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=s?a!==s&&D.updateInnerHTMLByID(this._rootNodeID,s):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),l.deleteAllListeners(this._rootNodeID),c.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},f.measureMethods(i,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),h(i.prototype,i.Mixin,d.Mixin),i.injection={injectIDOperations:function(e){i.BackendIDOperations=D=e}},t.exports=i},{11:11,12:12,128:128,147:147,148:148,154:154,166:166,29:29,33:33,40:40,6:6,75:75,76:76,80:80}],49:[function(e,t){"use strict";var n=e(16),r=e(27),o=e(32),i=e(38),a=e(61),s=a.createFactory("form"),u=i.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[o,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=u},{16:16,27:27,32:32,38:38,61:61}],50:[function(e,t){"use strict";var n=e(6),r=e(10),o=e(12),i=e(75),a=e(80),s=e(147),u=e(159),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(e,t,n){var r=i.getNode(e);s(!l.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=i.getNode(e);s(!l.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)},updateInnerHTMLByID:function(e,t){var n=i.getNode(e);u(n,t)},updateTextContentByID:function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=i.getNode(e[n].parentID);r.processUpdates(e,t)}};a.measureMethods(c,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=c},{10:10,12:12,147:147,159:159,6:6,75:75,80:80}],51:[function(e,t){"use strict";var n=e(16),r=e(27),o=e(32),i=e(38),a=e(61),s=a.createFactory("iframe"),u=i.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[o,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load")}});t.exports=u},{16:16,27:27,32:32,38:38,61:61}],52:[function(e,t){"use strict";var n=e(16),r=e(27),o=e(32),i=e(38),a=e(61),s=a.createFactory("img"),u=i.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[o,r],render:function(){return s(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(n.topLevelTypes.topError,"error")}});t.exports=u},{16:16,27:27,32:32,38:38,61:61}],53:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e(2),o=e(12),i=e(26),a=e(32),s=e(38),u=e(61),l=e(75),c=e(97),p=e(29),d=e(147),f=u.createFactory("input"),h={},m=s.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=p({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=i.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=i.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,f(e,this.props.children)},componentDidMount:function(){var e=l.getID(this.getDOMNode());h[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=l.getID(e);delete h[t]},componentDidUpdate:function(){var e=this.getDOMNode();null!=this.props.checked&&o.setValueForProperty(e,"checked",this.props.checked||!1);var t=i.getValue(this);null!=t&&o.setValueForProperty(e,"value",""+t)},_handleChange:function(e){var t,r=i.getOnChange(this);r&&(t=r.call(this,e)),c.asap(n,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var a=this.getDOMNode(),s=a;s.parentNode;)s=s.parentNode;for(var u=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),p=0,f=u.length;f>p;p++){var m=u[p];if(m!==a&&m.form===a.form){var v=l.getID(m);d(v);var g=h[v];d(g),c.asap(n,g)}}}return t}});t.exports=m},{12:12,147:147,2:2,26:26,29:29,32:32,38:38,61:61,75:75,97:97}],54:[function(e,t){"use strict";var n=e(32),r=e(38),o=e(61),i=(e(166),o.createFactory("option")),a=r.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[n],componentWillMount:function(){},render:function(){return i(this.props,this.props.children)}});t.exports=a},{166:166,32:32,38:38,61:61}],55:[function(e,t){"use strict";function n(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=a.getValue(this);null!=e&&this.isMounted()&&o(this,e)}}function r(e,t){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function o(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i[0].selected=!0}}var i=e(2),a=e(26),s=e(32),u=e(38),l=e(61),c=e(97),p=e(29),d=l.createFactory("select"),f=u.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[i,a.Mixin,s],propTypes:{defaultValue:r,value:r},render:function(){var e=p({},this.props);return e.onChange=this._handleChange,e.value=null,d(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=a.getValue(this);null!=e?o(this,e):null!=this.props.defaultValue&&o(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=a.getValue(this);null!=t?(this._pendingUpdate=!1,o(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?o(this,this.props.defaultValue):o(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,r=a.getOnChange(this);return r&&(t=r.call(this,e)),this._pendingUpdate=!0,c.asap(n,this),t}});t.exports=f},{2:2,26:26,29:29,32:32,38:38,61:61,97:97}],56:[function(e,t){"use strict";function n(e,t,n,r){return e===n&&t===r}function r(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=t.getRangeAt(0),u=n(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=u?0:s.toString().length,c=s.cloneRange();c.selectNodeContents(e),c.setEnd(s.startContainer,s.startOffset);var p=n(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(r,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var s=u(e,o),c=u(e,i);if(s&&c){var p=document.createRange();p.setStart(s.node,s.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(c.node,c.offset)):(p.setEnd(c.node,c.offset),n.addRange(p))}}}var s=e(22),u=e(140),l=e(142),c=s.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:c?r:o,setOffsets:c?i:a};t.exports=p},{140:140,142:142,22:22}],57:[function(e,t){"use strict";var n=e(12),r=e(40),o=e(48),i=e(29),a=e(128),s=function(){};i(s.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t){this._rootNodeID=e;var r=a(this._stringText);return t.renderToStaticMarkup?r:"<span "+n.createMarkupForID(e)+">"+r+"</span>"},receiveComponent:function(e){if(e!==this._currentElement){this._currentElement=e;var t=""+e;t!==this._stringText&&(this._stringText=t,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}},unmountComponent:function(){r.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=s},{12:12,128:128,29:29,40:40,48:48}],58:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e(2),o=e(12),i=e(26),a=e(32),s=e(38),u=e(61),l=e(97),c=e(29),p=e(147),d=(e(166),u.createFactory("textarea")),f=s.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(p(null==e),Array.isArray(t)&&(p(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=i.getValue(this);return{initialValue:""+(null!=n?n:e)} +},render:function(){var e=c({},this.props);return p(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,d(e,this.state.initialValue)},componentDidUpdate:function(){var e=i.getValue(this);if(null!=e){var t=this.getDOMNode();o.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,r=i.getOnChange(this);return r&&(t=r.call(this,e)),l.asap(n,this),t}});t.exports=f},{12:12,147:147,166:166,2:2,26:26,29:29,32:32,38:38,61:61,97:97}],59:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var r=e(97),o=e(113),i=e(29),a=e(126),s={initialize:a,close:function(){p.isBatchingUpdates=!1}},u={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[u,s];i(n.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var c=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=p.isBatchingUpdates;p.isBatchingUpdates=!0,i?e(t,n,r,o):c.perform(e,null,t,n,r,o)}};t.exports=p},{113:113,126:126,29:29,97:97}],60:[function(e,t){"use strict";function n(e){return f.createClass({tagName:e.toUpperCase(),render:function(){return new N(e,null,null,null,null,this.props)}})}function r(){I.EventEmitter.injectReactEventListener(P),I.EventPluginHub.injectEventPluginOrder(s),I.EventPluginHub.injectInstanceHandle(R),I.EventPluginHub.injectMount(w),I.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:k,EnterLeaveEventPlugin:u,ChangeEventPlugin:i,MobileSafariClickEventPlugin:p,SelectEventPlugin:S,BeforeInputEventPlugin:o}),I.NativeComponent.injectGenericComponentClass(v),I.NativeComponent.injectTextComponentClass(T),I.NativeComponent.injectAutoWrapper(n),I.Class.injectMixin(d),I.NativeComponent.injectComponentClasses({button:g,form:y,iframe:b,img:C,input:_,option:x,select:D,textarea:M,html:U("html"),head:U("head"),body:U("body")}),I.DOMProperty.injectDOMPropertyConfig(c),I.DOMProperty.injectDOMPropertyConfig(L),I.EmptyComponent.injectEmptyComponent("noscript"),I.Updates.injectReconcileTransaction(O),I.Updates.injectBatchingStrategy(m),I.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:A.createReactRootIndex),I.Component.injectEnvironment(h),I.DOMComponent.injectIDOperations(E)}var o=e(3),i=e(8),a=e(9),s=e(14),u=e(15),l=e(22),c=e(24),p=e(28),d=e(32),f=e(38),h=e(40),m=e(59),v=e(48),g=e(47),y=e(49),C=e(52),E=e(50),b=e(51),_=e(53),x=e(54),D=e(55),M=e(58),T=e(57),N=e(61),P=e(66),I=e(68),R=e(70),w=e(75),O=e(86),S=e(99),A=e(100),k=e(101),L=e(98),U=e(122);t.exports={inject:r}},{100:100,101:101,122:122,14:14,15:15,22:22,24:24,28:28,3:3,32:32,38:38,40:40,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,57:57,58:58,59:59,61:61,66:66,68:68,70:70,75:75,8:8,86:86,9:9,98:98,99:99}],61:[function(e,t){"use strict";var n=e(44),r=e(45),o=e(29),i=(e(166),{key:!0,ref:!0}),a=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};a.prototype={_isReactElement:!0},a.createElement=function(e,t,o){var s,u={},l=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key;for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(u[s]=t[s])}var p=arguments.length-2;if(1===p)u.children=o;else if(p>1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];u.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(s in h)"undefined"==typeof u[s]&&(u[s]=h[s])}return new a(e,l,c,r.current,n.current,u)},a.createFactory=function(e){var t=a.createElement.bind(null,e);return t.type=e,t},a.cloneAndReplaceProps=function(e,t){var n=new a(e.type,e.key,e.ref,e._owner,e._context,t);return n},a.cloneElement=function(e,t,n){var s,u=o({},e.props),l=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(l=""+t.key);for(s in t)t.hasOwnProperty(s)&&!i.hasOwnProperty(s)&&(u[s]=t[s])}var d=arguments.length-2;if(1===d)u.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];u.children=f}return new a(e.type,l,c,p,e._context,u)},a.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=a},{166:166,29:29,44:44,45:45}],62:[function(e,t){"use strict";function n(){if(g.current){var e=g.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function o(){var e=g.current;return e&&r(e)||void 0}function i(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,s('Each child in an array or iterator should have a unique "key" prop.',e,t))}function a(e,t,n){x.test(e)&&s("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function s(e,t,n){var i=o(),a="string"==typeof n?n:n.displayName||n.name,s=i||a,u=b[e]||(b[e]={});if(!u.hasOwnProperty(s)){u[s]=!0;var l="";if(t&&t._owner&&t._owner!==g.current){var c=r(t._owner);l=" It was passed a child from "+c+"."}}}function u(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];h.isValidElement(r)&&i(r,t)}else if(h.isValidElement(e))e._store.validated=!0;else if(e){var o=C(e);if(o){if(o!==e.entries)for(var s,u=o.call(e);!(s=u.next()).done;)h.isValidElement(s.value)&&i(s.value,t)}else if("object"==typeof e){var l=m.extractIfFragment(e);for(var c in l)l.hasOwnProperty(c)&&a(c,l[c],t)}}}function l(e,t,r,o){for(var i in t)if(t.hasOwnProperty(i)){var a;try{E("function"==typeof t[i]),a=t[i](r,i,e,o)}catch(s){a=s}a instanceof Error&&!(a.message in _)&&(_[a.message]=!0,n(this))}}function c(e,t){var n=t.type,r="string"==typeof n?n:n.displayName,o=t._owner?t._owner.getPublicInstance().constructor.displayName:null,i=e+"|"+r+"|"+o;if(!D.hasOwnProperty(i)){D[i]=!0;var a="";r&&(a=" <"+r+" />");var s="";o&&(s=" The element was created by "+o+".")}}function p(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function d(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&p(t[r],n[r])||(c(r,e),t[r]=n[r]))}}function f(e){if(null!=e.type){var t=y.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&l(n,t.propTypes,e.props,v.prop),"function"==typeof t.getDefaultProps}}var h=e(61),m=e(67),v=e(83),g=(e(82),e(45)),y=e(78),C=e(138),E=e(147),b=(e(166),{}),_={},x=/^\d+$/,D={},M={checkAndWarnForMutatedProps:d,createElement:function(e){var t=h.createElement.apply(this,arguments);if(null==t)return t;for(var n=2;n<arguments.length;n++)u(arguments[n],e);return f(t),t},createFactory:function(e){var t=M.createElement.bind(null,e);return t.type=e,t},cloneElement:function(){for(var e=h.cloneElement.apply(this,arguments),t=2;t<arguments.length;t++)u(arguments[t],e.type);return f(e),e}};t.exports=M},{138:138,147:147,166:166,45:45,61:61,67:67,78:78,82:82,83:83}],63:[function(e,t){"use strict";function n(e){l[e]=!0}function r(e){delete l[e]}function o(e){return!!l[e]}var i,a=e(61),s=e(71),u=e(147),l={},c={injectEmptyComponent:function(e){i=a.createFactory(e)}},p=function(){};p.prototype.componentDidMount=function(){var e=s.get(this);e&&n(e._rootNodeID)},p.prototype.componentWillUnmount=function(){var e=s.get(this);e&&r(e._rootNodeID)},p.prototype.render=function(){return u(i),i()};var d=a.createElement(p),f={emptyElement:d,injection:c,isNullComponentID:o};t.exports=f},{147:147,61:61,71:71}],64:[function(e,t){"use strict";var n={guard:function(e){return e}};t.exports=n},{}],65:[function(e,t){"use strict";function n(e){r.enqueueEvents(e),r.processEventQueue()}var r=e(18),o={handleTopLevel:function(e,t,o,i){var a=r.extractEvents(e,t,o,i);n(a)}};t.exports=o},{18:18}],66:[function(e,t){"use strict";function n(e){var t=c.getID(e),n=l.getReactRootIDFromNodeID(t),r=c.findReactContainerForID(n),o=c.getFirstReactDOM(r);return o}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){for(var t=c.getFirstReactDOM(f(e.nativeEvent))||window,r=t;r;)e.ancestors.push(r),r=n(r);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=c.getID(t)||"";m._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function i(e){var t=h(window);e(t)}var a=e(17),s=e(22),u=e(30),l=e(70),c=e(75),p=e(97),d=e(29),f=e(137),h=e(143);d(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),u.addPoolingTo(r,u.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:s.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?a.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?a.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=i.bind(null,e);a.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=r.getPooled(e,t);try{p.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=m},{137:137,143:143,17:17,22:22,29:29,30:30,70:70,75:75,97:97}],67:[function(e,t){"use strict";var n=(e(61),e(166),{create:function(e){return e},extract:function(e){return e},extractIfFragment:function(e){return e}});t.exports=n},{166:166,61:61}],68:[function(e,t){"use strict";var n=e(11),r=e(18),o=e(41),i=e(38),a=e(63),s=e(33),u=e(78),l=e(48),c=e(80),p=e(89),d=e(97),f={Component:o.injection,Class:i.injection,DOMComponent:l.injection,DOMProperty:n.injection,EmptyComponent:a.injection,EventPluginHub:r.injection,EventEmitter:s.injection,NativeComponent:u.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{11:11,18:18,33:33,38:38,41:41,48:48,63:63,78:78,80:80,89:89,97:97}],69:[function(e,t){"use strict";function n(e){return o(document.documentElement,e)}var r=e(56),o=e(120),i=e(131),a=e(133),s={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:s.hasSelectionCapabilities(e)?s.getSelection(e):null}},restoreSelection:function(e){var t=a(),r=e.focusedElem,o=e.selectionRange;t!==r&&n(r)&&(s.hasSelectionCapabilities(r)&&s.setSelection(r,o),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};t.exports=s},{120:120,131:131,133:133,56:56}],70:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function r(e,t){return e.charAt(t)===d||t===e.length}function o(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function s(e,t){if(p(o(e)&&o(t)),p(i(e,t)),e===t)return e;var n,a=e.length+f;for(n=a;n<t.length&&!r(t,n);n++);return t.substr(0,n)}function u(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var i=0,a=0;n>=a;a++)if(r(e,a)&&r(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,i);return p(o(s)),s}function l(e,t,n,r,o,u){e=e||"",t=t||"",p(e!==t);var l=i(t,e);p(l||i(e,t));for(var c=0,d=l?a:s,f=e;;f=d(f,t)){var m;if(o&&f===e||u&&f===t||(m=n(f,l,r)),m===!1||f===t)break;p(c++<h)}}var c=e(89),p=e(147),d=".",f=d.length,h=100,m={createReactRootID:function(){return n(c.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===d&&e.length>1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=u(e,t);i!==e&&l(e,i,n,r,!1,!0),i!==t&&l(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},_getFirstCommonAncestorID:u,_getNextDescendantID:s,isAncestorIDOf:i,SEPARATOR:d};t.exports=m},{147:147,89:89}],71:[function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=n},{}],72:[function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=n},{}],73:[function(e,t){"use strict";function n(e,t){this.value=e,this.requestChange=t}function r(e){var t={value:"undefined"==typeof e?o.PropTypes.any.isRequired:e.isRequired,requestChange:o.PropTypes.func.isRequired};return o.PropTypes.shape(t)}var o=e(31);n.PropTypes={link:r},t.exports=n},{31:31}],74:[function(e,t){"use strict";var n=e(116),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var o=t.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(e);return i===o}};t.exports=r},{116:116}],75:[function(e,t){"use strict";function n(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function r(e){var t=P(e);return t&&W.getID(t)}function o(e){var t=i(e);if(t)if(k.hasOwnProperty(t)){var n=k[t];n!==e&&(R(!l(n,t)),k[t]=e)}else k[t]=e;return t}function i(e){return e&&e.getAttribute&&e.getAttribute(A)||""}function a(e,t){var n=i(e);n!==t&&delete k[n],e.setAttribute(A,t),k[t]=e}function s(e){return k.hasOwnProperty(e)&&l(k[e],e)||(k[e]=W.findReactNodeByID(e)),k[e]}function u(e){var t=E.get(e)._rootNodeID;return y.isNullComponentID(t)?null:(k.hasOwnProperty(t)&&l(k[t],t)||(k[t]=W.findReactNodeByID(t)),k[t])}function l(e,t){if(e){R(i(e)===t);var n=W.findReactContainerForID(t);if(n&&N(n,e))return!0}return!1}function c(e){delete k[e]}function p(e){var t=k[e];return t&&l(t,e)?void(V=t):!1}function d(e){V=null,C.traverseAncestors(e,p);var t=V;return V=null,t}function f(e,t,n,r,o){var i=x.mountComponent(e,t,r,T);e._isTopLevel=!0,W._mountImageIntoNode(i,n,o)}function h(e,t,n,r){var o=M.ReactReconcileTransaction.getPooled();o.perform(f,null,e,t,n,o,r),M.ReactReconcileTransaction.release(o)}var m=e(11),v=e(33),g=(e(45),e(61)),y=(e(62),e(63)),C=e(70),E=e(71),b=e(74),_=e(80),x=e(87),D=e(96),M=e(97),T=e(127),N=e(120),P=e(141),I=e(146),R=e(147),w=e(159),O=e(162),S=(e(166),C.SEPARATOR),A=m.ID_ATTRIBUTE_NAME,k={},L=1,U=9,F={},B={},j=[],V=null,W={_instancesByReactRootID:F,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return W.scrollMonitor(n,function(){D.enqueueElementInternal(e,t),r&&D.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){R(t&&(t.nodeType===L||t.nodeType===U)),v.ensureScrollValueMonitoring();var n=W.registerContainer(t);return F[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=I(e,null),o=W._registerComponent(r,t);return M.batchedUpdates(h,r,o,t,n),r},render:function(e,t,n){R(g.isValidElement(e));var o=F[r(t)];if(o){var i=o._currentElement;if(O(i,e))return W._updateRootComponent(o,e,t,n).getPublicInstance();W.unmountComponentAtNode(t)}var a=P(t),s=a&&W.isRenderedByReact(a),u=s&&!o,l=W._renderNewRootComponent(e,t,u).getPublicInstance();return n&&n.call(l),l},constructAndRenderComponent:function(e,t,n){var r=g.createElement(e,t);return W.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return R(r),W.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=r(e);return t&&(t=C.getReactRootIDFromNodeID(t)),t||(t=C.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){R(e&&(e.nodeType===L||e.nodeType===U));var t=r(e),n=F[t];return n?(W.unmountComponentFromNode(n,e),delete F[t],delete B[t],!0):!1},unmountComponentFromNode:function(e,t){for(x.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=C.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=W.findReactContainerForID(e);return W.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=W.getID(e);return t?t.charAt(0)===S:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(W.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=j,r=0,o=d(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var i,a=n[r++];a;){var s=W.getID(a);s?t===s?i=a:C.isAncestorIDOf(s,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,R(!1)},_mountImageIntoNode:function(e,t,r){if(R(t&&(t.nodeType===L||t.nodeType===U)),r){var o=P(t);if(b.canReuseMarkup(e,o))return;var i=o.getAttribute(b.CHECKSUM_ATTR_NAME);o.removeAttribute(b.CHECKSUM_ATTR_NAME);var a=o.outerHTML;o.setAttribute(b.CHECKSUM_ATTR_NAME,i);var s=n(e,a);" (client) "+e.substring(s-20,s+20)+"\n (server) "+a.substring(s-20,s+20),R(t.nodeType!==U)}R(t.nodeType!==U),w(t,e)},getReactRootID:r,getID:o,setID:a,getNode:s,getNodeFromInstance:u,purgeID:c};_.measureMethods(W,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=W},{11:11,120:120,127:127,141:141,146:146,147:147,159:159,162:162,166:166,33:33,45:45,61:61,62:62,63:63,70:70,71:71,74:74,80:80,87:87,96:96,97:97}],76:[function(e,t){"use strict";function n(e,t,n){f.push({parentID:e,parentNode:null,type:l.INSERT_MARKUP,markupIndex:h.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function r(e,t,n){f.push({parentID:e,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function o(e,t){f.push({parentID:e,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function i(e,t){f.push({parentID:e,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function a(){f.length&&(u.processChildrenUpdates(f,h),s())}function s(){f.length=0,h.length=0}var u=e(41),l=e(77),c=e(87),p=e(36),d=0,f=[],h=[],m={Mixin:{mountChildren:function(e,t,n){var r=p.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var s=r[a],u=this._rootNodeID+a,l=c.mountComponent(s,u,t,n);s._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){d++;var t=!0;try{var n=this._renderedChildren;p.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{d--,d||(t?s():a())}},updateChildren:function(e,t,n){d++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{d--,d||(r?s():a())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=p.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,s=0;for(i in o)if(o.hasOwnProperty(i)){var u=r&&r[i],l=o[i];u===l?(this.moveChild(u,s,a),a=Math.max(u._mountIndex,a),u._mountIndex=s):(u&&(a=Math.max(u._mountIndex,a),this._unmountChildByName(u,i)),this._mountChildByNameAtIndex(l,i,s,t,n)),s++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;p.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&r(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){n(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){o(this._rootNodeID,e._mountIndex)},setTextContent:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,a=c.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,a)},_unmountChildByName:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=m},{36:36,41:41,77:77,87:87}],77:[function(e,t){"use strict";var n=e(153),r=n({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=r},{153:153}],78:[function(e,t){"use strict";function n(e){if("function"==typeof e.type)return e.type;var t=e.type,n=c[t];return null==n&&(c[t]=n=u(t)),n}function r(e){return s(l),new l(e.type,e.props)}function o(e){return new p(e)}function i(e){return e instanceof p}var a=e(29),s=e(147),u=null,l=null,c={},p=null,d={injectGenericComponentClass:function(e){l=e},injectTextComponentClass:function(e){p=e},injectComponentClasses:function(e){a(c,e)},injectAutoWrapper:function(e){u=e}},f={getComponentClassForElement:n,createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:d};t.exports=f},{147:147,29:29}],79:[function(e,t){"use strict";var n=e(147),r={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,o){n(r.isValidOwner(o)),o.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,o){n(r.isValidOwner(o)),o.getPublicInstance().refs[t]===e.getPublicInstance()&&o.detachRef(t)}};t.exports=r},{147:147}],80:[function(e,t){"use strict";function n(e,t,n){return n}var r={enableMeasure:!1,storedMeasure:n,measureMethods:function(){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){r.storedMeasure=e}}};t.exports=r},{}],81:[function(e,t){"use strict";function n(e){return function(t,n,r){t[n]=t.hasOwnProperty(n)?e(t[n],r):r}}function r(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=u[n];r&&u.hasOwnProperty(n)?r(e,n,t[n]):e.hasOwnProperty(n)||(e[n]=t[n])}return e}var o=e(29),i=e(126),a=e(152),s=n(function(e,t){return o({},t,e)}),u={children:i,className:n(a),style:s},l={mergeProps:function(e,t){return r(o({},e),t)}};t.exports=l},{126:126,152:152,29:29}],82:[function(e,t){"use strict";var n={};t.exports=n},{}],83:[function(e,t){"use strict";var n=e(153),r=n({prop:null,context:null,childContext:null});t.exports=r},{153:153}],84:[function(e,t){"use strict";function n(e){function t(t,n,r,o,i){if(o=o||E,null==n[r]){var a=y[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function r(e){function t(t,n,r,o){var i=t[n],a=h(i);if(a!==e){var s=y[o],u=m(i);return new Error("Invalid "+s+" `"+n+"` of type `"+u+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return n(t)}function o(){return n(C.thatReturns(null))}function i(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=y[o],s=h(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+s+"` supplied to `"+r+"`, expected an array."))}for(var u=0;u<i.length;u++){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return n(t)}function a(){function e(e,t,n,r){if(!v.isValidElement(e[t])){var o=y[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return n(e)}function s(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=y[o],a=e.name||E;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}return null}return n(t)}function u(e){function t(t,n,r,o){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return null;var s=y[o],u=JSON.stringify(e);return new Error("Invalid "+s+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+u+"."))}return n(t)}function l(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var s=y[o];return new Error("Invalid "+s+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var u in i)if(i.hasOwnProperty(u)){var l=e(i,u,r,o);if(l instanceof Error)return l}return null}return n(t)}function c(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,r,o))return null}var s=y[o];return new Error("Invalid "+s+" `"+n+"` supplied to "+("`"+r+"`."))}return n(t)}function p(){function e(e,t,n,r){if(!f(e[t])){var o=y[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return n(e)}function d(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var s=y[o];return new Error("Invalid "+s+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var u in e){var l=e[u];if(l){var c=l(i,u,r,o);if(c)return c}}return null}return n(t)}function f(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(null===e||v.isValidElement(e))return!0;e=g.extractIfFragment(e);for(var t in e)if(!f(e[t]))return!1;return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var v=e(61),g=e(67),y=e(82),C=e(126),E="<<anonymous>>",b=a(),_=p(),x={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:o(),arrayOf:i,element:b,instanceOf:s,node:_,objectOf:l,oneOf:u,oneOfType:c,shape:d};t.exports=x},{126:126,61:61,67:67,82:82}],85:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var r=e(30),o=e(33),i=e(29);i(n.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];o.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{29:29,30:30,33:33}],86:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=r.getPooled(null),this.putListenerQueue=s.getPooled()}var r=e(7),o=e(30),i=e(33),a=e(69),s=e(85),u=e(113),l=e(29),c={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},h=[f,c,p,d],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){r.release(this.reactMountReady),this.reactMountReady=null,s.release(this.putListenerQueue),this.putListenerQueue=null}};l(n.prototype,u.Mixin,m),o.addPoolingTo(n),t.exports=n},{113:113,29:29,30:30,33:33,69:69,7:7,85:85}],87:[function(e,t){"use strict";function n(){r.attachRefs(this,this._currentElement)}var r=e(88),o=(e(62),{mountComponent:function(e,t,r,o){var i=e.mountComponent(t,r,o);return r.getReactMountReady().enqueue(n,e),i},unmountComponent:function(e){r.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,o,i){var a=e._currentElement;if(t!==a||null==t._owner){var s=r.shouldUpdateRefs(a,t);s&&r.detachRefs(e,a),e.receiveComponent(t,o,i),s&&o.getReactMountReady().enqueue(n,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});t.exports=o},{62:62,88:88}],88:[function(e,t){"use strict";function n(e,t,n){"function"==typeof e?e(t.getPublicInstance()):o.addComponentAsRefTo(t,e,n)}function r(e,t,n){"function"==typeof e?e(null):o.removeComponentAsRefFrom(t,e,n)}var o=e(79),i={};i.attachRefs=function(e,t){var r=t.ref;null!=r&&n(r,e,t._owner)},i.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},t.exports=i},{79:79}],89:[function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};t.exports=r},{}],90:[function(e,t){"use strict";function n(e){c(o.isValidElement(e));var t;try{var n=i.createReactRootID();return t=s.getPooled(!1),t.perform(function(){var r=l(e,null),o=r.mountComponent(n,t,u);return a.addChecksumToMarkup(o)},null)}finally{s.release(t)}}function r(e){c(o.isValidElement(e));var t;try{var n=i.createReactRootID();return t=s.getPooled(!0),t.perform(function(){var r=l(e,null);return r.mountComponent(n,t,u)},null)}finally{s.release(t)}}var o=e(61),i=e(70),a=e(74),s=e(91),u=e(127),l=e(146),c=e(147);t.exports={renderToString:n,renderToStaticMarkup:r}},{127:127,146:146,147:147,61:61,70:70,74:74,91:91}],91:[function(e,t){"use strict";function n(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=o.getPooled(null),this.putListenerQueue=i.getPooled()}var r=e(30),o=e(7),i=e(85),a=e(113),s=e(29),u=e(126),l={initialize:function(){this.reactMountReady.reset()},close:u},c={initialize:function(){this.putListenerQueue.reset()},close:u},p=[c,l],d={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,i.release(this.putListenerQueue),this.putListenerQueue=null}};s(n.prototype,a.Mixin,d),r.addPoolingTo(n),t.exports=n},{113:113,126:126,29:29,30:30,7:7,85:85}],92:[function(e,t){"use strict";function n(e,t){var n={};return function(r){n[t]=r,e.setState(n)}}var r={createStateSetter:function(e,t){return function(n,r,o,i,a,s){var u=t.call(e,n,r,o,i,a,s);u&&e.setState(u)}},createStateKeySetter:function(e,t){var r=e.__keySetters||(e.__keySetters={});return r[t]||(r[t]=n(e,t))}};r.Mixin={createStateSetter:function(e){return r.createStateSetter(this,e)},createStateKeySetter:function(e){return r.createStateKeySetter(this,e)}},t.exports=r},{}],93:[function(e,t){"use strict";var n=e(37),r=e(67),o={getChildMapping:function(e){return e?r.extract(n.map(e,function(e){return e})):e},mergeChildMappings:function(e,t){function n(n){return t.hasOwnProperty(n)?t[n]:e[n]}e=e||{},t=t||{};var r={},o=[];for(var i in e)t.hasOwnProperty(i)?o.length&&(r[i]=o,o=[]):o.push(i);var a,s={};for(var u in t){if(r.hasOwnProperty(u))for(a=0;a<r[u].length;a++){var l=r[u][a];s[r[u][a]]=n(l)}s[u]=n(u)}for(a=0;a<o.length;a++)s[o[a]]=n(o[a]);return s}};t.exports=o},{37:37,67:67}],94:[function(e,t){"use strict";function n(){var e=document.createElement("div"),t=e.style;"AnimationEvent"in window||delete a.animationend.animation,"TransitionEvent"in window||delete a.transitionend.transition;for(var n in a){var r=a[n];for(var o in r)if(o in t){s.push(r[o]);break}}}function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}var i=e(22),a={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},s=[];i.canUseDOM&&n();var u={addEndEventListener:function(e,t){return 0===s.length?void window.setTimeout(t,0):void s.forEach(function(n){r(e,n,t)})},removeEndEventListener:function(e,t){0!==s.length&&s.forEach(function(n){o(e,n,t)})}};t.exports=u},{22:22}],95:[function(e,t){"use strict";var n=e(31),r=e(93),o=e(29),i=e(119),a=e(126),s=n.createClass({displayName:"ReactTransitionGroup",propTypes:{component:n.PropTypes.any,childFactory:n.PropTypes.func},getDefaultProps:function(){return{component:"span",childFactory:a.thatReturnsArgument}},getInitialState:function(){return{children:r.getChildMapping(this.props.children)}},componentWillMount:function(){this.currentlyTransitioningKeys={},this.keysToEnter=[],this.keysToLeave=[]},componentDidMount:function(){var e=this.state.children;for(var t in e)e[t]&&this.performAppear(t)},componentWillReceiveProps:function(e){var t=r.getChildMapping(e.children),n=this.state.children; +this.setState({children:r.mergeChildMappings(n,t)});var o;for(o in t){var i=n&&n.hasOwnProperty(o);!t[o]||i||this.currentlyTransitioningKeys[o]||this.keysToEnter.push(o)}for(o in n){var a=t&&t.hasOwnProperty(o);!n[o]||a||this.currentlyTransitioningKeys[o]||this.keysToLeave.push(o)}},componentDidUpdate:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)},performAppear:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillAppear?t.componentWillAppear(this._handleDoneAppearing.bind(this,e)):this._handleDoneAppearing(e)},_handleDoneAppearing:function(e){var t=this.refs[e];t.componentDidAppear&&t.componentDidAppear(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performEnter:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillEnter?t.componentWillEnter(this._handleDoneEntering.bind(this,e)):this._handleDoneEntering(e)},_handleDoneEntering:function(e){var t=this.refs[e];t.componentDidEnter&&t.componentDidEnter(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);n&&n.hasOwnProperty(e)||this.performLeave(e)},performLeave:function(e){this.currentlyTransitioningKeys[e]=!0;var t=this.refs[e];t.componentWillLeave?t.componentWillLeave(this._handleDoneLeaving.bind(this,e)):this._handleDoneLeaving(e)},_handleDoneLeaving:function(e){var t=this.refs[e];t.componentDidLeave&&t.componentDidLeave(),delete this.currentlyTransitioningKeys[e];var n=r.getChildMapping(this.props.children);if(n&&n.hasOwnProperty(e))this.performEnter(e);else{var i=o({},this.state.children);delete i[e],this.setState({children:i})}},render:function(){var e=[];for(var t in this.state.children){var r=this.state.children[t];r&&e.push(i(this.props.childFactory(r),{ref:t,key:t}))}return n.createElement(this.props.component,this.props,e)}});t.exports=s},{119:119,126:126,29:29,31:31,93:93}],96:[function(e,t){"use strict";function n(e){e!==o.currentlyMountingInstance&&u.enqueueUpdate(e)}function r(e){c(null==i.current);var t=s.get(e);return t?t===o.currentlyUnmountingInstance?null:t:null}var o=e(72),i=e(45),a=e(61),s=e(71),u=e(97),l=e(29),c=e(147),p=(e(166),{enqueueCallback:function(e,t){c("function"==typeof t);var i=r(e);return i&&i!==o.currentlyMountingInstance?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void n(i)):null},enqueueCallbackInternal:function(e,t){c("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],n(e)},enqueueForceUpdate:function(e){var t=r(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,n(t))},enqueueReplaceState:function(e,t){var o=r(e,"replaceState");o&&(o._pendingStateQueue=[t],o._pendingReplaceState=!0,n(o))},enqueueSetState:function(e,t){var o=r(e,"setState");if(o){var i=o._pendingStateQueue||(o._pendingStateQueue=[]);i.push(t),n(o)}},enqueueSetProps:function(e,t){var o=r(e,"setProps");if(o){c(o._isTopLevel);var i=o._pendingElement||o._currentElement,s=l({},i.props,t);o._pendingElement=a.cloneAndReplaceProps(i,s),n(o)}},enqueueReplaceProps:function(e,t){var o=r(e,"replaceProps");if(o){c(o._isTopLevel);var i=o._pendingElement||o._currentElement;o._pendingElement=a.cloneAndReplaceProps(i,t),n(o)}},enqueueElementInternal:function(e,t){e._pendingElement=t,n(e)}});t.exports=p},{147:147,166:166,29:29,45:45,61:61,71:71,72:72,97:97}],97:[function(e,t){"use strict";function n(){m(M.ReactReconcileTransaction&&C)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=M.ReactReconcileTransaction.getPooled()}function o(e,t,r,o,i){n(),C.batchedUpdates(e,t,r,o,i)}function i(e,t){return e._mountOrder-t._mountOrder}function a(e){var t=e.dirtyComponentsLength;m(t===v.length),v.sort(i);for(var n=0;t>n;n++){var r=v[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function s(e){return n(),C.isBatchingUpdates?void v.push(e):void C.batchedUpdates(s,e)}function u(e,t){m(C.isBatchingUpdates),g.enqueue(e,t),y=!0}var l=e(7),c=e(30),p=(e(45),e(80)),d=e(87),f=e(113),h=e(29),m=e(147),v=(e(166),[]),g=l.getPooled(),y=!1,C=null,E={initialize:function(){this.dirtyComponentsLength=v.length},close:function(){this.dirtyComponentsLength!==v.length?(v.splice(0,this.dirtyComponentsLength),x()):v.length=0}},b={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},_=[E,b];h(r.prototype,f.Mixin,{getTransactionWrappers:function(){return _},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,M.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return f.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),c.addPoolingTo(r);var x=function(){for(;v.length||y;){if(v.length){var e=r.getPooled();e.perform(a,null,e),r.release(e)}if(y){y=!1;var t=g;g=l.getPooled(),t.notifyAll(),l.release(t)}}};x=p.measure("ReactUpdates","flushBatchedUpdates",x);var D={injectReconcileTransaction:function(e){m(e),M.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){m(e),m("function"==typeof e.batchedUpdates),m("boolean"==typeof e.isBatchingUpdates),C=e}},M={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:s,flushBatchedUpdates:x,injection:D,asap:u};t.exports=M},{113:113,147:147,166:166,29:29,30:30,45:45,7:7,80:80,87:87}],98:[function(e,t){"use strict";var n=e(11),r=n.injection.MUST_USE_ATTRIBUTE,o={Properties:{cx:r,cy:r,d:r,dx:r,dy:r,fill:r,fillOpacity:r,fontFamily:r,fontSize:r,fx:r,fy:r,gradientTransform:r,gradientUnits:r,markerEnd:r,markerMid:r,markerStart:r,offset:r,opacity:r,patternContentUnits:r,patternUnits:r,points:r,preserveAspectRatio:r,r:r,rx:r,ry:r,spreadMethod:r,stopColor:r,stopOpacity:r,stroke:r,strokeDasharray:r,strokeLinecap:r,strokeOpacity:r,strokeWidth:r,textAnchor:r,transform:r,version:r,viewBox:r,x1:r,x2:r,x:r,y1:r,y2:r,y:r},DOMAttributeNames:{fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=o},{11:11}],99:[function(e,t){"use strict";function n(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e){if(g||null==h||h!==u())return null;var t=n(h);if(!v||!p(v,t)){v=t;var r=s.getPooled(f.select,m,e);return r.type="select",r.target=h,i.accumulateTwoPhaseDispatches(r),r}}var o=e(16),i=e(21),a=e(69),s=e(105),u=e(133),l=e(150),c=e(154),p=e(161),d=o.topLevelTypes,f={select:{phasedRegistrationNames:{bubbled:c({onSelect:null}),captured:c({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},h=null,m=null,v=null,g=!1,y={eventTypes:f,extractEvents:function(e,t,n,o){switch(e){case d.topFocus:(l(t)||"true"===t.contentEditable)&&(h=t,m=n,v=null);break;case d.topBlur:h=null,m=null,v=null;break;case d.topMouseDown:g=!0;break;case d.topContextMenu:case d.topMouseUp:return g=!1,r(o);case d.topSelectionChange:case d.topKeyDown:case d.topKeyUp:return r(o)}}};t.exports=y},{105:105,133:133,150:150,154:154,16:16,161:161,21:21,69:69}],100:[function(e,t){"use strict";var n=Math.pow(2,53),r={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};t.exports=r},{}],101:[function(e,t){"use strict";var n=e(16),r=e(20),o=e(21),i=e(102),a=e(105),s=e(106),u=e(108),l=e(109),c=e(104),p=e(110),d=e(111),f=e(112),h=e(134),m=e(147),v=e(154),g=(e(166),n.topLevelTypes),y={blur:{phasedRegistrationNames:{bubbled:v({onBlur:!0}),captured:v({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:v({onClick:!0}),captured:v({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:v({onContextMenu:!0}),captured:v({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:v({onCopy:!0}),captured:v({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:v({onCut:!0}),captured:v({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:v({onDoubleClick:!0}),captured:v({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:v({onDrag:!0}),captured:v({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:v({onDragEnd:!0}),captured:v({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:v({onDragEnter:!0}),captured:v({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:v({onDragExit:!0}),captured:v({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:v({onDragLeave:!0}),captured:v({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:v({onDragOver:!0}),captured:v({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:v({onDragStart:!0}),captured:v({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:v({onDrop:!0}),captured:v({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:v({onFocus:!0}),captured:v({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:v({onInput:!0}),captured:v({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:v({onKeyDown:!0}),captured:v({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:v({onKeyPress:!0}),captured:v({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:v({onKeyUp:!0}),captured:v({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:v({onLoad:!0}),captured:v({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:v({onError:!0}),captured:v({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:v({onMouseDown:!0}),captured:v({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:v({onMouseMove:!0}),captured:v({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:v({onMouseOut:!0}),captured:v({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:v({onMouseOver:!0}),captured:v({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:v({onMouseUp:!0}),captured:v({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:v({onPaste:!0}),captured:v({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:v({onReset:!0}),captured:v({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:v({onScroll:!0}),captured:v({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:v({onSubmit:!0}),captured:v({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:v({onTouchCancel:!0}),captured:v({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:v({onTouchEnd:!0}),captured:v({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:v({onTouchMove:!0}),captured:v({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:v({onTouchStart:!0}),captured:v({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:v({onWheel:!0}),captured:v({onWheelCapture:!0})}}},C={topBlur:y.blur,topClick:y.click,topContextMenu:y.contextMenu,topCopy:y.copy,topCut:y.cut,topDoubleClick:y.doubleClick,topDrag:y.drag,topDragEnd:y.dragEnd,topDragEnter:y.dragEnter,topDragExit:y.dragExit,topDragLeave:y.dragLeave,topDragOver:y.dragOver,topDragStart:y.dragStart,topDrop:y.drop,topError:y.error,topFocus:y.focus,topInput:y.input,topKeyDown:y.keyDown,topKeyPress:y.keyPress,topKeyUp:y.keyUp,topLoad:y.load,topMouseDown:y.mouseDown,topMouseMove:y.mouseMove,topMouseOut:y.mouseOut,topMouseOver:y.mouseOver,topMouseUp:y.mouseUp,topPaste:y.paste,topReset:y.reset,topScroll:y.scroll,topSubmit:y.submit,topTouchCancel:y.touchCancel,topTouchEnd:y.touchEnd,topTouchMove:y.touchMove,topTouchStart:y.touchStart,topWheel:y.wheel};for(var E in C)C[E].dependencies=[E];var b={eventTypes:y,executeDispatch:function(e,t,n){var o=r.executeDispatch(e,t,n);o===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,r){var v=C[e];if(!v)return null;var y;switch(e){case g.topInput:case g.topLoad:case g.topError:case g.topReset:case g.topSubmit:y=a;break;case g.topKeyPress:if(0===h(r))return null;case g.topKeyDown:case g.topKeyUp:y=u;break;case g.topBlur:case g.topFocus:y=s;break;case g.topClick:if(2===r.button)return null;case g.topContextMenu:case g.topDoubleClick:case g.topMouseDown:case g.topMouseMove:case g.topMouseOut:case g.topMouseOver:case g.topMouseUp:y=l;break;case g.topDrag:case g.topDragEnd:case g.topDragEnter:case g.topDragExit:case g.topDragLeave:case g.topDragOver:case g.topDragStart:case g.topDrop:y=c;break;case g.topTouchCancel:case g.topTouchEnd:case g.topTouchMove:case g.topTouchStart:y=p;break;case g.topScroll:y=d;break;case g.topWheel:y=f;break;case g.topCopy:case g.topCut:case g.topPaste:y=i}m(y);var E=y.getPooled(v,n,r);return o.accumulateTwoPhaseDispatches(E),E}};t.exports=b},{102:102,104:104,105:105,106:106,108:108,109:109,110:110,111:111,112:112,134:134,147:147,154:154,16:16,166:166,20:20,21:21}],102:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(105),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(n,o),t.exports=n},{105:105}],103:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(105),o={data:null};r.augmentClass(n,o),t.exports=n},{105:105}],104:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(109),o={dataTransfer:null};r.augmentClass(n,o),t.exports=n},{109:109}],105:[function(e,t){"use strict";function n(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];this[o]=a?a(n):n[o]}var s=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;this.isDefaultPrevented=s?i.thatReturnsTrue:i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var r=e(30),o=e(29),i=e(126),a=e(137),s={type:null,target:a,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),n.Interface=s,n.augmentClass=function(e,t){var n=this,i=Object.create(n.prototype);o(i,e.prototype),e.prototype=i,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,r.addPoolingTo(e,r.threeArgumentPooler)},r.addPoolingTo(n,r.threeArgumentPooler),t.exports=n},{126:126,137:137,29:29,30:30}],106:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(111),o={relatedTarget:null};r.augmentClass(n,o),t.exports=n},{111:111}],107:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(105),o={data:null};r.augmentClass(n,o),t.exports=n},{105:105}],108:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(111),o=e(134),i=e(135),a=e(136),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(n,s),t.exports=n},{111:111,134:134,135:135,136:136}],109:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(111),o=e(114),i=e(136),a={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};r.augmentClass(n,a),t.exports=n},{111:111,114:114,136:136}],110:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(111),o=e(136),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};r.augmentClass(n,i),t.exports=n},{111:111,136:136}],111:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(105),o=e(137),i={view:function(e){if(e.view)return e.view;var t=o(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(n,i),t.exports=n},{105:105,137:137}],112:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(109),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(n,o),t.exports=n},{109:109}],113:[function(e,t){"use strict";var n=e(147),r={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,r,o,i,a,s,u){n(!this.isInTransaction());var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,r,o,i,a,s,u),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(e){n(this.isInTransaction());for(var t=this.transactionWrappers,r=e;r<t.length;r++){var i,a=t[r],s=this.wrapperInitData[r];try{i=!0,s!==o.OBSERVED_ERROR&&a.close&&a.close.call(this,s),i=!1}finally{if(i)try{this.closeAll(r+1)}catch(u){}}}this.wrapperInitData.length=0}},o={Mixin:r,OBSERVED_ERROR:{}};t.exports=o},{147:147}],114:[function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};t.exports=n},{}],115:[function(e,t){"use strict";function n(e,t){if(r(null!=t),null==e)return t;var n=Array.isArray(e),o=Array.isArray(t);return n&&o?(e.push.apply(e,t),e):n?(e.push(t),e):o?[e].concat(t):[e,t]}var r=e(147);t.exports=n},{147:147}],116:[function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o<e.length;o++)t=(t+e.charCodeAt(o))%r,n=(n+t)%r;return t|n<<16}var r=65521;t.exports=n},{}],117:[function(e,t){function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;t.exports=n},{}],118:[function(e,t){"use strict";function n(e){return r(e.replace(o,"ms-"))}var r=e(117),o=/^-ms-/;t.exports=n},{117:117}],119:[function(e,t){"use strict";function n(e,t){var n=o.mergeProps(t,e.props);return!n.hasOwnProperty(a)&&e.props.hasOwnProperty(a)&&(n.children=e.props.children),r.createElement(e.type,n)}var r=e(61),o=e(81),i=e(154),a=(e(166),i({children:null}));t.exports=n},{154:154,166:166,61:61,81:81}],120:[function(e,t){function n(e,t){return e&&t?e===t?!0:r(e)?!1:r(t)?n(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var r=e(151);t.exports=n},{151:151}],121:[function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function r(e){return n(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=e(163);t.exports=r},{163:163}],122:[function(e,t){"use strict";function n(e){var t=o.createFactory(e),n=r.createClass({displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){i(!1)},render:function(){return t(this.props)}});return n}var r=e(38),o=e(61),i=e(147);t.exports=n},{147:147,38:38,61:61}],123:[function(e,t){function n(e){var t=e.match(l);return t&&t[1].toLowerCase()}function r(e,t){var r=u;s(!!u);var o=n(e),l=o&&a(o);if(l){r.innerHTML=l[1]+e+l[2];for(var c=l[0];c--;)r=r.lastChild}else r.innerHTML=e;var p=r.getElementsByTagName("script");p.length&&(s(t),i(p).forEach(t));for(var d=i(r.childNodes);r.lastChild;)r.removeChild(r.lastChild);return d}var o=e(22),i=e(121),a=e(139),s=e(147),u=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=r},{121:121,139:139,147:147,22:22}],124:[function(e,t){"use strict";function n(e){return"object"==typeof e?Object.keys(e).filter(function(t){return e[t]}).join(" "):Array.prototype.join.call(arguments," ")}e(166);t.exports=n},{166:166}],125:[function(e,t){"use strict";function n(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var r=e(5),o=r.isUnitlessNumber;t.exports=n},{5:5}],126:[function(e,t){function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},t.exports=r},{}],127:[function(e,t){"use strict";var n={};t.exports=n},{}],128:[function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=r},{}],129:[function(e,t){"use strict";function n(e){return null==e?null:a(e)?e:r.has(e)?o.getNodeFromInstance(e):(i(null==e.render||"function"!=typeof e.render),void i(!1))}{var r=(e(45),e(71)),o=e(75),i=e(147),a=e(149);e(166)}t.exports=n},{147:147,149:149,166:166,45:45,71:71,75:75}],130:[function(e,t){"use strict";function n(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function r(e){if(null==e)return e;var t={};return o(e,n,t),t}{var o=e(164);e(166)}t.exports=r},{164:164,166:166}],131:[function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}t.exports=n},{}],132:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],133:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],134:[function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=n},{}],135:[function(e,t){"use strict";function n(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var r=e(134),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{134:134}],136:[function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=r},{}],137:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],138:[function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";t.exports=n},{}],139:[function(e,t){function n(e){return o(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var r=e(22),o=e(147),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},s=[1,'<select multiple="true">',"</select>"],u=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],c=[1,"<svg>","</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:s,option:s,caption:u,colgroup:u,tbody:u,tfoot:u,thead:u,td:l,th:l,circle:c,defs:c,ellipse:c,g:c,line:c,linearGradient:c,path:c,polygon:c,polyline:c,radialGradient:c,rect:c,stop:c,text:c};t.exports=n},{147:147,22:22}],140:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}t.exports=o},{}],141:[function(e,t){"use strict";function n(e){return e?e.nodeType===r?e.documentElement:e.firstChild:null}var r=9;t.exports=n},{}],142:[function(e,t){"use strict";function n(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=e(22),o=null;t.exports=n},{22:22}],143:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],144:[function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;t.exports=n},{}],145:[function(e,t){"use strict";function n(e){return r(e).replace(o,"-ms-")}var r=e(144),o=/^ms-/;t.exports=n},{144:144}],146:[function(e,t){"use strict";function n(e){return"function"==typeof e&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function r(e,t){var r;if((null===e||e===!1)&&(e=i.emptyElement),"object"==typeof e){var o=e;r=t===o.type&&"string"==typeof o.type?a.createInternalComponent(o):n(o.type)?new o.type(o):new l}else"string"==typeof e||"number"==typeof e?r=a.createInstanceForText(e):u(!1);return r.construct(e),r._mountIndex=0,r._mountImage=null,r}var o=e(43),i=e(63),a=e(78),s=e(29),u=e(147),l=(e(166),function(){});s(l.prototype,o.Mixin,{_instantiateReactComponent:r}),t.exports=r},{147:147,166:166,29:29,43:43,63:63,78:78}],147:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,s){if(!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,s],c=0;u=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw u.framesToPop=1,u}};t.exports=n},{}],148:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e(22);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{22:22}],149:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],150:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],151:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e(149);t.exports=n},{149:149}],152:[function(e,t){"use strict";function n(e){e||(e="");var t,n=arguments.length;if(n>1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}t.exports=n},{}],153:[function(e,t){"use strict";var n=e(147),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{147:147}],154:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],155:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o={};for(var i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o}var r=Object.prototype.hasOwnProperty;t.exports=n},{}],156:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=n},{}],157:[function(e,t){"use strict";function n(e){return o(r.isValidElement(e)),e}var r=e(61),o=e(147);t.exports=n},{147:147,61:61}],158:[function(e,t){"use strict";function n(e){return'"'+r(e)+'"'}var r=e(128);t.exports=n},{128:128}],159:[function(e,t){"use strict";var n=e(22),r=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),n.canUseDOM){var a=document.createElement("div");a.innerHTML=" ",""===a.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{22:22}],160:[function(e,t){"use strict";var n=e(22),r=e(128),o=e(159),i=function(e,t){e.textContent=t};n.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){o(e,r(t))})),t.exports=i},{128:128,159:159,22:22}],161:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],162:[function(e,t){"use strict";function n(e,t){if(null!=e&&null!=t){var n=typeof e,r=typeof t;if("string"===n||"number"===n)return"string"===r||"number"===r;if("object"===r&&e.type===t.type&&e.key===t.key){var o=e._owner===t._owner; +return o}}return!1}e(166);t.exports=n},{166:166}],163:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e(147);t.exports=n},{147:147}],164:[function(e,t){"use strict";function n(e){return m[e]}function r(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function o(e){return(""+e).replace(v,n)}function i(e){return"$"+o(e)}function a(e,t,n,o,s){var c=typeof e;if(("undefined"===c||"boolean"===c)&&(e=null),null===e||"string"===c||"number"===c||u.isValidElement(e))return o(s,e,""===t?f+r(e,0):t,n),1;var m,v,g,y=0;if(Array.isArray(e))for(var C=0;C<e.length;C++)m=e[C],v=(""!==t?t+h:f)+r(m,C),g=n+y,y+=a(m,v,g,o,s);else{var E=p(e);if(E){var b,_=E.call(e);if(E!==e.entries)for(var x=0;!(b=_.next()).done;)m=b.value,v=(""!==t?t+h:f)+r(m,x++),g=n+y,y+=a(m,v,g,o,s);else for(;!(b=_.next()).done;){var D=b.value;D&&(m=D[1],v=(""!==t?t+h:f)+i(D[0])+h+r(m,0),g=n+y,y+=a(m,v,g,o,s))}}else if("object"===c){d(1!==e.nodeType);var M=l.extract(e);for(var T in M)M.hasOwnProperty(T)&&(m=M[T],v=(""!==t?t+h:f)+i(T)+h+r(m,0),g=n+y,y+=a(m,v,g,o,s))}}return y}function s(e,t,n){return null==e?0:a(e,"",0,t,n)}var u=e(61),l=e(67),c=e(70),p=e(138),d=e(147),f=(e(166),c.SEPARATOR),h=":",m={"=":"=0",".":"=1",":":"=2"},v=/[=.:]/g;t.exports=s},{138:138,147:147,166:166,61:61,67:67,70:70}],165:[function(e,t){"use strict";function n(e){return Array.isArray(e)?e.concat():e&&"object"==typeof e?i(new e.constructor,e):e}function r(e,t,n){s(Array.isArray(e));var r=t[n];s(Array.isArray(r))}function o(e,t){if(s("object"==typeof t),t.hasOwnProperty(p))return s(1===Object.keys(t).length),t[p];var a=n(e);if(t.hasOwnProperty(d)){var h=t[d];s(h&&"object"==typeof h),s(a&&"object"==typeof a),i(a,t[d])}t.hasOwnProperty(u)&&(r(e,t,u),t[u].forEach(function(e){a.push(e)})),t.hasOwnProperty(l)&&(r(e,t,l),t[l].forEach(function(e){a.unshift(e)})),t.hasOwnProperty(c)&&(s(Array.isArray(e)),s(Array.isArray(t[c])),t[c].forEach(function(e){s(Array.isArray(e)),a.splice.apply(a,e)})),t.hasOwnProperty(f)&&(s("function"==typeof t[f]),a=t[f](a));for(var v in t)m.hasOwnProperty(v)&&m[v]||(a[v]=o(e[v],t[v]));return a}var i=e(29),a=e(154),s=e(147),u=a({$push:null}),l=a({$unshift:null}),c=a({$splice:null}),p=a({$set:null}),d=a({$merge:null}),f=a({$apply:null}),h=[u,l,c,p,d,f],m={};h.forEach(function(e){m[e]=!0}),t.exports=o},{147:147,154:154,29:29}],166:[function(e,t){"use strict";var n=e(126),r=n;t.exports=r},{126:126}]},{},[1])(1)}); \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/react.js b/assets/js/react-0.13.0/build/react.js new file mode 100755 index 0000000000000000000000000000000000000000..3d8ed01a241fd759404ec18536a6ce921fa6c57c --- /dev/null +++ b/assets/js/react-0.13.0/build/react.js @@ -0,0 +1,19535 @@ +/** + * React v0.13.0 + */ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.React = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule React + */ + +/* globals __REACT_DEVTOOLS_GLOBAL_HOOK__*/ + +'use strict'; + +var EventPluginUtils = _dereq_(19); +var ReactChildren = _dereq_(32); +var ReactComponent = _dereq_(34); +var ReactClass = _dereq_(33); +var ReactContext = _dereq_(38); +var ReactCurrentOwner = _dereq_(39); +var ReactElement = _dereq_(57); +var ReactElementValidator = _dereq_(58); +var ReactDOM = _dereq_(40); +var ReactDOMTextComponent = _dereq_(51); +var ReactDefaultInjection = _dereq_(54); +var ReactInstanceHandles = _dereq_(66); +var ReactMount = _dereq_(70); +var ReactPerf = _dereq_(75); +var ReactPropTypes = _dereq_(78); +var ReactReconciler = _dereq_(81); +var ReactServerRendering = _dereq_(84); + +var assign = _dereq_(27); +var findDOMNode = _dereq_(117); +var onlyChild = _dereq_(144); + +ReactDefaultInjection.inject(); + +var createElement = ReactElement.createElement; +var createFactory = ReactElement.createFactory; +var cloneElement = ReactElement.cloneElement; + +if ("production" !== "development") { + createElement = ReactElementValidator.createElement; + createFactory = ReactElementValidator.createFactory; + cloneElement = ReactElementValidator.cloneElement; +} + +var render = ReactPerf.measure('React', 'render', ReactMount.render); + +var React = { + Children: { + map: ReactChildren.map, + forEach: ReactChildren.forEach, + count: ReactChildren.count, + only: onlyChild + }, + Component: ReactComponent, + DOM: ReactDOM, + PropTypes: ReactPropTypes, + initializeTouchEvents: function(shouldUseTouch) { + EventPluginUtils.useTouchEvents = shouldUseTouch; + }, + createClass: ReactClass.createClass, + createElement: createElement, + cloneElement: cloneElement, + createFactory: createFactory, + createMixin: function(mixin) { + // Currently a noop. Will be used to validate and trace mixins. + return mixin; + }, + constructAndRenderComponent: ReactMount.constructAndRenderComponent, + constructAndRenderComponentByID: ReactMount.constructAndRenderComponentByID, + findDOMNode: findDOMNode, + render: render, + renderToString: ReactServerRendering.renderToString, + renderToStaticMarkup: ReactServerRendering.renderToStaticMarkup, + unmountComponentAtNode: ReactMount.unmountComponentAtNode, + isValidElement: ReactElement.isValidElement, + withContext: ReactContext.withContext, + + // Hook for JSX spread, don't use this for anything else. + __spread: assign +}; + +// Inject the runtime into a devtools global hook regardless of browser. +// Allows for debugging when the hook is injected on the page. +if ( + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' && + typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject === 'function') { + __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ + CurrentOwner: ReactCurrentOwner, + InstanceHandles: ReactInstanceHandles, + Mount: ReactMount, + Reconciler: ReactReconciler, + TextComponent: ReactDOMTextComponent + }); +} + +if ("production" !== "development") { + var ExecutionEnvironment = _dereq_(21); + if (ExecutionEnvironment.canUseDOM && window.top === window.self) { + + // If we're in Chrome, look for the devtools marker and provide a download + // link if not installed. + if (navigator.userAgent.indexOf('Chrome') > -1) { + if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') { + console.debug( + 'Download the React DevTools for a better development experience: ' + + 'http://fb.me/react-devtools' + ); + } + } + + var expectedFeatures = [ + // shims + Array.isArray, + Array.prototype.every, + Array.prototype.forEach, + Array.prototype.indexOf, + Array.prototype.map, + Date.now, + Function.prototype.bind, + Object.keys, + String.prototype.split, + String.prototype.trim, + + // shams + Object.create, + Object.freeze + ]; + + for (var i = 0; i < expectedFeatures.length; i++) { + if (!expectedFeatures[i]) { + console.error( + 'One or more ES5 shim/shams expected by React are not available: ' + + 'http://fb.me/react-warning-polyfills' + ); + break; + } + } + } +} + +React.version = '0.13.0'; + +module.exports = React; + +},{"117":117,"144":144,"19":19,"21":21,"27":27,"32":32,"33":33,"34":34,"38":38,"39":39,"40":40,"51":51,"54":54,"57":57,"58":58,"66":66,"70":70,"75":75,"78":78,"81":81,"84":84}],2:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule AutoFocusMixin + * @typechecks static-only + */ + +'use strict'; + +var focusNode = _dereq_(119); + +var AutoFocusMixin = { + componentDidMount: function() { + if (this.props.autoFocus) { + focusNode(this.getDOMNode()); + } + } +}; + +module.exports = AutoFocusMixin; + +},{"119":119}],3:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015 Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule BeforeInputEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(20); +var ExecutionEnvironment = _dereq_(21); +var FallbackCompositionState = _dereq_(22); +var SyntheticCompositionEvent = _dereq_(93); +var SyntheticInputEvent = _dereq_(97); + +var keyOf = _dereq_(141); + +var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space +var START_KEYCODE = 229; + +var canUseCompositionEvent = ( + ExecutionEnvironment.canUseDOM && + 'CompositionEvent' in window +); + +var documentMode = null; +if (ExecutionEnvironment.canUseDOM && 'documentMode' in document) { + documentMode = document.documentMode; +} + +// Webkit offers a very useful `textInput` event that can be used to +// directly represent `beforeInput`. The IE `textinput` event is not as +// useful, so we don't use it. +var canUseTextInputEvent = ( + ExecutionEnvironment.canUseDOM && + 'TextEvent' in window && + !documentMode && + !isPresto() +); + +// In IE9+, we have access to composition events, but the data supplied +// by the native compositionend event may be incorrect. Japanese ideographic +// spaces, for instance (\u3000) are not recorded correctly. +var useFallbackCompositionData = ( + ExecutionEnvironment.canUseDOM && + ( + (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11) + ) +); + +/** + * Opera <= 12 includes TextEvent in window, but does not fire + * text input events. Rely on keypress instead. + */ +function isPresto() { + var opera = window.opera; + return ( + typeof opera === 'object' && + typeof opera.version === 'function' && + parseInt(opera.version(), 10) <= 12 + ); +} + +var SPACEBAR_CODE = 32; +var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE); + +var topLevelTypes = EventConstants.topLevelTypes; + +// Events and their corresponding property names. +var eventTypes = { + beforeInput: { + phasedRegistrationNames: { + bubbled: keyOf({onBeforeInput: null}), + captured: keyOf({onBeforeInputCapture: null}) + }, + dependencies: [ + topLevelTypes.topCompositionEnd, + topLevelTypes.topKeyPress, + topLevelTypes.topTextInput, + topLevelTypes.topPaste + ] + }, + compositionEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionEnd: null}), + captured: keyOf({onCompositionEndCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionEnd, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + }, + compositionStart: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionStart: null}), + captured: keyOf({onCompositionStartCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionStart, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + }, + compositionUpdate: { + phasedRegistrationNames: { + bubbled: keyOf({onCompositionUpdate: null}), + captured: keyOf({onCompositionUpdateCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topCompositionUpdate, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyPress, + topLevelTypes.topKeyUp, + topLevelTypes.topMouseDown + ] + } +}; + +// Track whether we've ever handled a keypress on the space key. +var hasSpaceKeypress = false; + +/** + * Return whether a native keypress event is assumed to be a command. + * This is required because Firefox fires `keypress` events for key commands + * (cut, copy, select-all, etc.) even though no character is inserted. + */ +function isKeypressCommand(nativeEvent) { + return ( + (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && + // ctrlKey && altKey is equivalent to AltGr, and is not a command. + !(nativeEvent.ctrlKey && nativeEvent.altKey) + ); +} + + +/** + * Translate native top level events into event types. + * + * @param {string} topLevelType + * @return {object} + */ +function getCompositionEventType(topLevelType) { + switch (topLevelType) { + case topLevelTypes.topCompositionStart: + return eventTypes.compositionStart; + case topLevelTypes.topCompositionEnd: + return eventTypes.compositionEnd; + case topLevelTypes.topCompositionUpdate: + return eventTypes.compositionUpdate; + } +} + +/** + * Does our fallback best-guess model think this event signifies that + * composition has begun? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionStart(topLevelType, nativeEvent) { + return ( + topLevelType === topLevelTypes.topKeyDown && + nativeEvent.keyCode === START_KEYCODE + ); +} + +/** + * Does our fallback mode think that this event is the end of composition? + * + * @param {string} topLevelType + * @param {object} nativeEvent + * @return {boolean} + */ +function isFallbackCompositionEnd(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topKeyUp: + // Command keys insert or clear IME input. + return (END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1); + case topLevelTypes.topKeyDown: + // Expect IME keyCode on each keydown. If we get any other + // code we must have exited earlier. + return (nativeEvent.keyCode !== START_KEYCODE); + case topLevelTypes.topKeyPress: + case topLevelTypes.topMouseDown: + case topLevelTypes.topBlur: + // Events are not possible without cancelling IME. + return true; + default: + return false; + } +} + +/** + * Google Input Tools provides composition data via a CustomEvent, + * with the `data` property populated in the `detail` object. If this + * is available on the event object, use it. If not, this is a plain + * composition event and we have nothing special to extract. + * + * @param {object} nativeEvent + * @return {?string} + */ +function getDataFromCustomEvent(nativeEvent) { + var detail = nativeEvent.detail; + if (typeof detail === 'object' && 'data' in detail) { + return detail.data; + } + return null; +} + +// Track the current IME composition fallback object, if any. +var currentComposition = null; + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {?object} A SyntheticCompositionEvent. + */ +function extractCompositionEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent +) { + var eventType; + var fallbackData; + + if (canUseCompositionEvent) { + eventType = getCompositionEventType(topLevelType); + } else if (!currentComposition) { + if (isFallbackCompositionStart(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionStart; + } + } else if (isFallbackCompositionEnd(topLevelType, nativeEvent)) { + eventType = eventTypes.compositionEnd; + } + + if (!eventType) { + return null; + } + + if (useFallbackCompositionData) { + // The current composition is stored statically and must not be + // overwritten while composition continues. + if (!currentComposition && eventType === eventTypes.compositionStart) { + currentComposition = FallbackCompositionState.getPooled(topLevelTarget); + } else if (eventType === eventTypes.compositionEnd) { + if (currentComposition) { + fallbackData = currentComposition.getData(); + } + } + } + + var event = SyntheticCompositionEvent.getPooled( + eventType, + topLevelTargetID, + nativeEvent + ); + + if (fallbackData) { + // Inject data generated from fallback path into the synthetic event. + // This matches the property of native CompositionEventInterface. + event.data = fallbackData; + } else { + var customData = getDataFromCustomEvent(nativeEvent); + if (customData !== null) { + event.data = customData; + } + } + + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The string corresponding to this `beforeInput` event. + */ +function getNativeBeforeInputChars(topLevelType, nativeEvent) { + switch (topLevelType) { + case topLevelTypes.topCompositionEnd: + return getDataFromCustomEvent(nativeEvent); + case topLevelTypes.topKeyPress: + /** + * If native `textInput` events are available, our goal is to make + * use of them. However, there is a special case: the spacebar key. + * In Webkit, preventing default on a spacebar `textInput` event + * cancels character insertion, but it *also* causes the browser + * to fall back to its default spacebar behavior of scrolling the + * page. + * + * Tracking at: + * https://code.google.com/p/chromium/issues/detail?id=355103 + * + * To avoid this issue, use the keypress event as if no `textInput` + * event is available. + */ + var which = nativeEvent.which; + if (which !== SPACEBAR_CODE) { + return null; + } + + hasSpaceKeypress = true; + return SPACEBAR_CHAR; + + case topLevelTypes.topTextInput: + // Record the characters to be added to the DOM. + var chars = nativeEvent.data; + + // If it's a spacebar character, assume that we have already handled + // it at the keypress level and bail immediately. Android Chrome + // doesn't give us keycodes, so we need to blacklist it. + if (chars === SPACEBAR_CHAR && hasSpaceKeypress) { + return null; + } + + return chars; + + default: + // For other native event types, do nothing. + return null; + } +} + +/** + * For browsers that do not provide the `textInput` event, extract the + * appropriate string to use for SyntheticInputEvent. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} nativeEvent Native browser event. + * @return {?string} The fallback string for this `beforeInput` event. + */ +function getFallbackBeforeInputChars(topLevelType, nativeEvent) { + // If we are currently composing (IME) and using a fallback to do so, + // try to extract the composed characters from the fallback object. + if (currentComposition) { + if ( + topLevelType === topLevelTypes.topCompositionEnd || + isFallbackCompositionEnd(topLevelType, nativeEvent) + ) { + var chars = currentComposition.getData(); + FallbackCompositionState.release(currentComposition); + currentComposition = null; + return chars; + } + return null; + } + + switch (topLevelType) { + case topLevelTypes.topPaste: + // If a paste event occurs after a keypress, throw out the input + // chars. Paste events should not lead to BeforeInput events. + return null; + case topLevelTypes.topKeyPress: + /** + * As of v27, Firefox may fire keypress events even when no character + * will be inserted. A few possibilities: + * + * - `which` is `0`. Arrow keys, Esc key, etc. + * + * - `which` is the pressed key code, but no char is available. + * Ex: 'AltGr + d` in Polish. There is no modified character for + * this key combination and no character is inserted into the + * document, but FF fires the keypress for char code `100` anyway. + * No `input` event will occur. + * + * - `which` is the pressed key code, but a command combination is + * being used. Ex: `Cmd+C`. No character is inserted, and no + * `input` event will occur. + */ + if (nativeEvent.which && !isKeypressCommand(nativeEvent)) { + return String.fromCharCode(nativeEvent.which); + } + return null; + case topLevelTypes.topCompositionEnd: + return useFallbackCompositionData ? null : nativeEvent.data; + default: + return null; + } +} + +/** + * Extract a SyntheticInputEvent for `beforeInput`, based on either native + * `textInput` or fallback behavior. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {?object} A SyntheticInputEvent. + */ +function extractBeforeInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent +) { + var chars; + + if (canUseTextInputEvent) { + chars = getNativeBeforeInputChars(topLevelType, nativeEvent); + } else { + chars = getFallbackBeforeInputChars(topLevelType, nativeEvent); + } + + // If no characters are being inserted, no BeforeInput event should + // be fired. + if (!chars) { + return null; + } + + var event = SyntheticInputEvent.getPooled( + eventTypes.beforeInput, + topLevelTargetID, + nativeEvent + ); + + event.data = chars; + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; +} + +/** + * Create an `onBeforeInput` event to match + * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents. + * + * This event plugin is based on the native `textInput` event + * available in Chrome, Safari, Opera, and IE. This event fires after + * `onKeyPress` and `onCompositionEnd`, but before `onInput`. + * + * `beforeInput` is spec'd but not implemented in any browsers, and + * the `input` event does not provide any useful information about what has + * actually been added, contrary to the spec. Thus, `textInput` is the best + * available event to identify the characters that have actually been inserted + * into the target node. + * + * This plugin is also responsible for emitting `composition` events, thus + * allowing us to share composition fallback code for both `beforeInput` and + * `composition` event types. + */ +var BeforeInputEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ) { + return [ + extractCompositionEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ), + extractBeforeInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ) + ]; + } +}; + +module.exports = BeforeInputEventPlugin; + +},{"141":141,"15":15,"20":20,"21":21,"22":22,"93":93,"97":97}],4:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSProperty + */ + +'use strict'; + +/** + * CSS properties which accept numbers but are not in units of "px". + */ +var isUnitlessNumber = { + boxFlex: true, + boxFlexGroup: true, + columnCount: true, + flex: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + lineClamp: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related properties + fillOpacity: true, + strokeOpacity: true +}; + +/** + * @param {string} prefix vendor-specific prefix, eg: Webkit + * @param {string} key style name, eg: transitionDuration + * @return {string} style name prefixed with `prefix`, properly camelCased, eg: + * WebkitTransitionDuration + */ +function prefixKey(prefix, key) { + return prefix + key.charAt(0).toUpperCase() + key.substring(1); +} + +/** + * Support style names that may come passed in prefixed by adding permutations + * of vendor prefixes. + */ +var prefixes = ['Webkit', 'ms', 'Moz', 'O']; + +// Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an +// infinite loop, because it iterates over the newly added props too. +Object.keys(isUnitlessNumber).forEach(function(prop) { + prefixes.forEach(function(prefix) { + isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop]; + }); +}); + +/** + * Most style properties can be unset by doing .style[prop] = '' but IE8 + * doesn't like doing that with shorthand properties so for the properties that + * IE8 breaks on, which are listed here, we instead unset each of the + * individual properties. See http://bugs.jquery.com/ticket/12385. + * The 4-value 'clock' properties like margin, padding, border-width seem to + * behave without any problems. Curiously, list-style works too without any + * special prodding. + */ +var shorthandPropertyExpansions = { + background: { + backgroundImage: true, + backgroundPosition: true, + backgroundRepeat: true, + backgroundColor: true + }, + border: { + borderWidth: true, + borderStyle: true, + borderColor: true + }, + borderBottom: { + borderBottomWidth: true, + borderBottomStyle: true, + borderBottomColor: true + }, + borderLeft: { + borderLeftWidth: true, + borderLeftStyle: true, + borderLeftColor: true + }, + borderRight: { + borderRightWidth: true, + borderRightStyle: true, + borderRightColor: true + }, + borderTop: { + borderTopWidth: true, + borderTopStyle: true, + borderTopColor: true + }, + font: { + fontStyle: true, + fontVariant: true, + fontWeight: true, + fontSize: true, + lineHeight: true, + fontFamily: true + } +}; + +var CSSProperty = { + isUnitlessNumber: isUnitlessNumber, + shorthandPropertyExpansions: shorthandPropertyExpansions +}; + +module.exports = CSSProperty; + +},{}],5:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CSSPropertyOperations + * @typechecks static-only + */ + +'use strict'; + +var CSSProperty = _dereq_(4); +var ExecutionEnvironment = _dereq_(21); + +var camelizeStyleName = _dereq_(108); +var dangerousStyleValue = _dereq_(113); +var hyphenateStyleName = _dereq_(133); +var memoizeStringOnly = _dereq_(143); +var warning = _dereq_(154); + +var processStyleName = memoizeStringOnly(function(styleName) { + return hyphenateStyleName(styleName); +}); + +var styleFloatAccessor = 'cssFloat'; +if (ExecutionEnvironment.canUseDOM) { + // IE8 only supports accessing cssFloat (standard) as styleFloat + if (document.documentElement.style.cssFloat === undefined) { + styleFloatAccessor = 'styleFloat'; + } +} + +if ("production" !== "development") { + // 'msTransform' is correct, but the other prefixes should be capitalized + var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/; + + // style values shouldn't contain a semicolon + var badStyleValueWithSemicolonPattern = /;\s*$/; + + var warnedStyleNames = {}; + var warnedStyleValues = {}; + + var warnHyphenatedStyleName = function(name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + ("production" !== "development" ? warning( + false, + 'Unsupported style property %s. Did you mean %s?', + name, + camelizeStyleName(name) + ) : null); + }; + + var warnBadVendoredStyleName = function(name) { + if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) { + return; + } + + warnedStyleNames[name] = true; + ("production" !== "development" ? warning( + false, + 'Unsupported vendor-prefixed style property %s. Did you mean %s?', + name, + name.charAt(0).toUpperCase() + name.slice(1) + ) : null); + }; + + var warnStyleValueWithSemicolon = function(name, value) { + if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) { + return; + } + + warnedStyleValues[value] = true; + ("production" !== "development" ? warning( + false, + 'Style property values shouldn\'t contain a semicolon. ' + + 'Try "%s: %s" instead.', + name, + value.replace(badStyleValueWithSemicolonPattern, '') + ) : null); + }; + + /** + * @param {string} name + * @param {*} value + */ + var warnValidStyle = function(name, value) { + if (name.indexOf('-') > -1) { + warnHyphenatedStyleName(name); + } else if (badVendoredStyleNamePattern.test(name)) { + warnBadVendoredStyleName(name); + } else if (badStyleValueWithSemicolonPattern.test(value)) { + warnStyleValueWithSemicolon(name, value); + } + }; +} + +/** + * Operations for dealing with CSS properties. + */ +var CSSPropertyOperations = { + + /** + * Serializes a mapping of style properties for use as inline styles: + * + * > createMarkupForStyles({width: '200px', height: 0}) + * "width:200px;height:0;" + * + * Undefined values are ignored so that declarative programming is easier. + * The result should be HTML-escaped before insertion into the DOM. + * + * @param {object} styles + * @return {?string} + */ + createMarkupForStyles: function(styles) { + var serialized = ''; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + var styleValue = styles[styleName]; + if ("production" !== "development") { + warnValidStyle(styleName, styleValue); + } + if (styleValue != null) { + serialized += processStyleName(styleName) + ':'; + serialized += dangerousStyleValue(styleName, styleValue) + ';'; + } + } + return serialized || null; + }, + + /** + * Sets the value for multiple styles on a node. If a value is specified as + * '' (empty string), the corresponding style property will be unset. + * + * @param {DOMElement} node + * @param {object} styles + */ + setValueForStyles: function(node, styles) { + var style = node.style; + for (var styleName in styles) { + if (!styles.hasOwnProperty(styleName)) { + continue; + } + if ("production" !== "development") { + warnValidStyle(styleName, styles[styleName]); + } + var styleValue = dangerousStyleValue(styleName, styles[styleName]); + if (styleName === 'float') { + styleName = styleFloatAccessor; + } + if (styleValue) { + style[styleName] = styleValue; + } else { + var expansion = CSSProperty.shorthandPropertyExpansions[styleName]; + if (expansion) { + // Shorthand property that IE8 won't like unsetting, so unset each + // component to placate it + for (var individualStyleName in expansion) { + style[individualStyleName] = ''; + } + } else { + style[styleName] = ''; + } + } + } + } + +}; + +module.exports = CSSPropertyOperations; + +},{"108":108,"113":113,"133":133,"143":143,"154":154,"21":21,"4":4}],6:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule CallbackQueue + */ + +'use strict'; + +var PooledClass = _dereq_(28); + +var assign = _dereq_(27); +var invariant = _dereq_(135); + +/** + * A specialized pseudo-event module to help keep track of components waiting to + * be notified when their DOM representations are available for use. + * + * This implements `PooledClass`, so you should never need to instantiate this. + * Instead, use `CallbackQueue.getPooled()`. + * + * @class ReactMountReady + * @implements PooledClass + * @internal + */ +function CallbackQueue() { + this._callbacks = null; + this._contexts = null; +} + +assign(CallbackQueue.prototype, { + + /** + * Enqueues a callback to be invoked when `notifyAll` is invoked. + * + * @param {function} callback Invoked when `notifyAll` is invoked. + * @param {?object} context Context to call `callback` with. + * @internal + */ + enqueue: function(callback, context) { + this._callbacks = this._callbacks || []; + this._contexts = this._contexts || []; + this._callbacks.push(callback); + this._contexts.push(context); + }, + + /** + * Invokes all enqueued callbacks and clears the queue. This is invoked after + * the DOM representation of a component has been created or updated. + * + * @internal + */ + notifyAll: function() { + var callbacks = this._callbacks; + var contexts = this._contexts; + if (callbacks) { + ("production" !== "development" ? invariant( + callbacks.length === contexts.length, + 'Mismatched list of contexts in callback queue' + ) : invariant(callbacks.length === contexts.length)); + this._callbacks = null; + this._contexts = null; + for (var i = 0, l = callbacks.length; i < l; i++) { + callbacks[i].call(contexts[i]); + } + callbacks.length = 0; + contexts.length = 0; + } + }, + + /** + * Resets the internal queue. + * + * @internal + */ + reset: function() { + this._callbacks = null; + this._contexts = null; + }, + + /** + * `PooledClass` looks for this. + */ + destructor: function() { + this.reset(); + } + +}); + +PooledClass.addPoolingTo(CallbackQueue); + +module.exports = CallbackQueue; + +},{"135":135,"27":27,"28":28}],7:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ChangeEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(17); +var EventPropagators = _dereq_(20); +var ExecutionEnvironment = _dereq_(21); +var ReactUpdates = _dereq_(87); +var SyntheticEvent = _dereq_(95); + +var isEventSupported = _dereq_(136); +var isTextInputElement = _dereq_(138); +var keyOf = _dereq_(141); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + change: { + phasedRegistrationNames: { + bubbled: keyOf({onChange: null}), + captured: keyOf({onChangeCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topChange, + topLevelTypes.topClick, + topLevelTypes.topFocus, + topLevelTypes.topInput, + topLevelTypes.topKeyDown, + topLevelTypes.topKeyUp, + topLevelTypes.topSelectionChange + ] + } +}; + +/** + * For IE shims + */ +var activeElement = null; +var activeElementID = null; +var activeElementValue = null; +var activeElementValueProp = null; + +/** + * SECTION: handle `change` event + */ +function shouldUseChangeEvent(elem) { + return ( + elem.nodeName === 'SELECT' || + (elem.nodeName === 'INPUT' && elem.type === 'file') + ); +} + +var doesChangeEventBubble = false; +if (ExecutionEnvironment.canUseDOM) { + // See `handleChange` comment below + doesChangeEventBubble = isEventSupported('change') && ( + (!('documentMode' in document) || document.documentMode > 8) + ); +} + +function manualDispatchChangeEvent(nativeEvent) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + activeElementID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + + // If change and propertychange bubbled, we'd just bind to it like all the + // other events and have it go through ReactBrowserEventEmitter. Since it + // doesn't, we manually listen for the events and so we have to enqueue and + // process the abstract event manually. + // + // Batching is necessary here in order to ensure that all event handlers run + // before the next rerender (including event handlers attached to ancestor + // elements instead of directly on the input). Without this, controlled + // components don't work properly in conjunction with event bubbling because + // the component is rerendered and the value reverted before all the event + // handlers can run. See https://github.com/facebook/react/issues/708. + ReactUpdates.batchedUpdates(runEventInBatch, event); +} + +function runEventInBatch(event) { + EventPluginHub.enqueueEvents(event); + EventPluginHub.processEventQueue(); +} + +function startWatchingForChangeEventIE8(target, targetID) { + activeElement = target; + activeElementID = targetID; + activeElement.attachEvent('onchange', manualDispatchChangeEvent); +} + +function stopWatchingForChangeEventIE8() { + if (!activeElement) { + return; + } + activeElement.detachEvent('onchange', manualDispatchChangeEvent); + activeElement = null; + activeElementID = null; +} + +function getTargetIDForChangeEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topChange) { + return topLevelTargetID; + } +} +function handleEventsForChangeEventIE8( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topFocus) { + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForChangeEventIE8(); + startWatchingForChangeEventIE8(topLevelTarget, topLevelTargetID); + } else if (topLevelType === topLevelTypes.topBlur) { + stopWatchingForChangeEventIE8(); + } +} + + +/** + * SECTION: handle `input` event + */ +var isInputEventSupported = false; +if (ExecutionEnvironment.canUseDOM) { + // IE9 claims to support the input event but fails to trigger it when + // deleting text, so we ignore its input events + isInputEventSupported = isEventSupported('input') && ( + (!('documentMode' in document) || document.documentMode > 9) + ); +} + +/** + * (For old IE.) Replacement getter/setter for the `value` property that gets + * set on the active element. + */ +var newValueProp = { + get: function() { + return activeElementValueProp.get.call(this); + }, + set: function(val) { + // Cast to a string so we can do equality checks. + activeElementValue = '' + val; + activeElementValueProp.set.call(this, val); + } +}; + +/** + * (For old IE.) Starts tracking propertychange events on the passed-in element + * and override the value property so that we can distinguish user events from + * value changes in JS. + */ +function startWatchingForValueChange(target, targetID) { + activeElement = target; + activeElementID = targetID; + activeElementValue = target.value; + activeElementValueProp = Object.getOwnPropertyDescriptor( + target.constructor.prototype, + 'value' + ); + + Object.defineProperty(activeElement, 'value', newValueProp); + activeElement.attachEvent('onpropertychange', handlePropertyChange); +} + +/** + * (For old IE.) Removes the event listeners from the currently-tracked element, + * if any exists. + */ +function stopWatchingForValueChange() { + if (!activeElement) { + return; + } + + // delete restores the original property definition + delete activeElement.value; + activeElement.detachEvent('onpropertychange', handlePropertyChange); + + activeElement = null; + activeElementID = null; + activeElementValue = null; + activeElementValueProp = null; +} + +/** + * (For old IE.) Handles a propertychange event, sending a `change` event if + * the value of the active element has changed. + */ +function handlePropertyChange(nativeEvent) { + if (nativeEvent.propertyName !== 'value') { + return; + } + var value = nativeEvent.srcElement.value; + if (value === activeElementValue) { + return; + } + activeElementValue = value; + + manualDispatchChangeEvent(nativeEvent); +} + +/** + * If a `change` event should be fired, returns the target's ID. + */ +function getTargetIDForInputEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topInput) { + // In modern browsers (i.e., not IE8 or IE9), the input event is exactly + // what we want so fall through here and trigger an abstract event + return topLevelTargetID; + } +} + +// For IE8 and IE9. +function handleEventsForInputEventIE( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topFocus) { + // In IE8, we can capture almost all .value changes by adding a + // propertychange handler and looking for events with propertyName + // equal to 'value' + // In IE9, propertychange fires for most input events but is buggy and + // doesn't fire when text is deleted, but conveniently, selectionchange + // appears to fire in all of the remaining cases so we catch those and + // forward the event if the value has changed + // In either case, we don't want to call the event handler if the value + // is changed from JS so we redefine a setter for `.value` that updates + // our activeElementValue variable, allowing us to ignore those changes + // + // stopWatching() should be a noop here but we call it just in case we + // missed a blur event somehow. + stopWatchingForValueChange(); + startWatchingForValueChange(topLevelTarget, topLevelTargetID); + } else if (topLevelType === topLevelTypes.topBlur) { + stopWatchingForValueChange(); + } +} + +// For IE8 and IE9. +function getTargetIDForInputEventIE( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topSelectionChange || + topLevelType === topLevelTypes.topKeyUp || + topLevelType === topLevelTypes.topKeyDown) { + // On the selectionchange event, the target is just document which isn't + // helpful for us so just check activeElement instead. + // + // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire + // propertychange on the first input event after setting `value` from a + // script and fires only keydown, keypress, keyup. Catching keyup usually + // gets it and catching keydown lets us fire an event for the first + // keystroke if user does a key repeat (it'll be a little delayed: right + // before the second keystroke). Other input methods (e.g., paste) seem to + // fire selectionchange normally. + if (activeElement && activeElement.value !== activeElementValue) { + activeElementValue = activeElement.value; + return activeElementID; + } + } +} + + +/** + * SECTION: handle `click` event + */ +function shouldUseClickEvent(elem) { + // Use the `click` event to detect changes to checkbox and radio inputs. + // This approach works across all browsers, whereas `change` does not fire + // until `blur` in IE8. + return ( + elem.nodeName === 'INPUT' && + (elem.type === 'checkbox' || elem.type === 'radio') + ); +} + +function getTargetIDForClickEvent( + topLevelType, + topLevelTarget, + topLevelTargetID) { + if (topLevelType === topLevelTypes.topClick) { + return topLevelTargetID; + } +} + +/** + * This plugin creates an `onChange` event that normalizes change events + * across form elements. This event fires at a time when it's possible to + * change the element's value without seeing a flicker. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - select + */ +var ChangeEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + + var getTargetIDFunc, handleEventFunc; + if (shouldUseChangeEvent(topLevelTarget)) { + if (doesChangeEventBubble) { + getTargetIDFunc = getTargetIDForChangeEvent; + } else { + handleEventFunc = handleEventsForChangeEventIE8; + } + } else if (isTextInputElement(topLevelTarget)) { + if (isInputEventSupported) { + getTargetIDFunc = getTargetIDForInputEvent; + } else { + getTargetIDFunc = getTargetIDForInputEventIE; + handleEventFunc = handleEventsForInputEventIE; + } + } else if (shouldUseClickEvent(topLevelTarget)) { + getTargetIDFunc = getTargetIDForClickEvent; + } + + if (getTargetIDFunc) { + var targetID = getTargetIDFunc( + topLevelType, + topLevelTarget, + topLevelTargetID + ); + if (targetID) { + var event = SyntheticEvent.getPooled( + eventTypes.change, + targetID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + } + + if (handleEventFunc) { + handleEventFunc( + topLevelType, + topLevelTarget, + topLevelTargetID + ); + } + } + +}; + +module.exports = ChangeEventPlugin; + +},{"136":136,"138":138,"141":141,"15":15,"17":17,"20":20,"21":21,"87":87,"95":95}],8:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ClientReactRootIndex + * @typechecks + */ + +'use strict'; + +var nextReactRootIndex = 0; + +var ClientReactRootIndex = { + createReactRootIndex: function() { + return nextReactRootIndex++; + } +}; + +module.exports = ClientReactRootIndex; + +},{}],9:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMChildrenOperations + * @typechecks static-only + */ + +'use strict'; + +var Danger = _dereq_(12); +var ReactMultiChildUpdateTypes = _dereq_(72); + +var setTextContent = _dereq_(149); +var invariant = _dereq_(135); + +/** + * Inserts `childNode` as a child of `parentNode` at the `index`. + * + * @param {DOMElement} parentNode Parent node in which to insert. + * @param {DOMElement} childNode Child node to insert. + * @param {number} index Index at which to insert the child. + * @internal + */ +function insertChildAt(parentNode, childNode, index) { + // By exploiting arrays returning `undefined` for an undefined index, we can + // rely exclusively on `insertBefore(node, null)` instead of also using + // `appendChild(node)`. However, using `undefined` is not allowed by all + // browsers so we must replace it with `null`. + parentNode.insertBefore( + childNode, + parentNode.childNodes[index] || null + ); +} + +/** + * Operations for updating with DOM children. + */ +var DOMChildrenOperations = { + + dangerouslyReplaceNodeWithMarkup: Danger.dangerouslyReplaceNodeWithMarkup, + + updateTextContent: setTextContent, + + /** + * Updates a component's children by processing a series of updates. The + * update configurations are each expected to have a `parentNode` property. + * + * @param {array<object>} updates List of update configurations. + * @param {array<string>} markupList List of markup strings. + * @internal + */ + processUpdates: function(updates, markupList) { + var update; + // Mapping from parent IDs to initial child orderings. + var initialChildren = null; + // List of children that will be moved or removed. + var updatedChildren = null; + + for (var i = 0; i < updates.length; i++) { + update = updates[i]; + if (update.type === ReactMultiChildUpdateTypes.MOVE_EXISTING || + update.type === ReactMultiChildUpdateTypes.REMOVE_NODE) { + var updatedIndex = update.fromIndex; + var updatedChild = update.parentNode.childNodes[updatedIndex]; + var parentID = update.parentID; + + ("production" !== "development" ? invariant( + updatedChild, + 'processUpdates(): Unable to find child %s of element. This ' + + 'probably means the DOM was unexpectedly mutated (e.g., by the ' + + 'browser), usually due to forgetting a <tbody> when using tables, ' + + 'nesting tags like <form>, <p>, or <a>, or using non-SVG elements ' + + 'in an <svg> parent. Try inspecting the child nodes of the element ' + + 'with React ID `%s`.', + updatedIndex, + parentID + ) : invariant(updatedChild)); + + initialChildren = initialChildren || {}; + initialChildren[parentID] = initialChildren[parentID] || []; + initialChildren[parentID][updatedIndex] = updatedChild; + + updatedChildren = updatedChildren || []; + updatedChildren.push(updatedChild); + } + } + + var renderedMarkup = Danger.dangerouslyRenderMarkup(markupList); + + // Remove updated children first so that `toIndex` is consistent. + if (updatedChildren) { + for (var j = 0; j < updatedChildren.length; j++) { + updatedChildren[j].parentNode.removeChild(updatedChildren[j]); + } + } + + for (var k = 0; k < updates.length; k++) { + update = updates[k]; + switch (update.type) { + case ReactMultiChildUpdateTypes.INSERT_MARKUP: + insertChildAt( + update.parentNode, + renderedMarkup[update.markupIndex], + update.toIndex + ); + break; + case ReactMultiChildUpdateTypes.MOVE_EXISTING: + insertChildAt( + update.parentNode, + initialChildren[update.parentID][update.fromIndex], + update.toIndex + ); + break; + case ReactMultiChildUpdateTypes.TEXT_CONTENT: + setTextContent( + update.parentNode, + update.textContent + ); + break; + case ReactMultiChildUpdateTypes.REMOVE_NODE: + // Already removed by the for-loop above. + break; + } + } + } + +}; + +module.exports = DOMChildrenOperations; + +},{"12":12,"135":135,"149":149,"72":72}],10:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMProperty + * @typechecks static-only + */ + +/*jslint bitwise: true */ + +'use strict'; + +var invariant = _dereq_(135); + +function checkMask(value, bitmask) { + return (value & bitmask) === bitmask; +} + +var DOMPropertyInjection = { + /** + * Mapping from normalized, camelcased property names to a configuration that + * specifies how the associated DOM property should be accessed or rendered. + */ + MUST_USE_ATTRIBUTE: 0x1, + MUST_USE_PROPERTY: 0x2, + HAS_SIDE_EFFECTS: 0x4, + HAS_BOOLEAN_VALUE: 0x8, + HAS_NUMERIC_VALUE: 0x10, + HAS_POSITIVE_NUMERIC_VALUE: 0x20 | 0x10, + HAS_OVERLOADED_BOOLEAN_VALUE: 0x40, + + /** + * Inject some specialized knowledge about the DOM. This takes a config object + * with the following properties: + * + * isCustomAttribute: function that given an attribute name will return true + * if it can be inserted into the DOM verbatim. Useful for data-* or aria-* + * attributes where it's impossible to enumerate all of the possible + * attribute names, + * + * Properties: object mapping DOM property name to one of the + * DOMPropertyInjection constants or null. If your attribute isn't in here, + * it won't get written to the DOM. + * + * DOMAttributeNames: object mapping React attribute name to the DOM + * attribute name. Attribute names not specified use the **lowercase** + * normalized name. + * + * DOMPropertyNames: similar to DOMAttributeNames but for DOM properties. + * Property names not specified use the normalized name. + * + * DOMMutationMethods: Properties that require special mutation methods. If + * `value` is undefined, the mutation method should unset the property. + * + * @param {object} domPropertyConfig the config as described above. + */ + injectDOMPropertyConfig: function(domPropertyConfig) { + var Properties = domPropertyConfig.Properties || {}; + var DOMAttributeNames = domPropertyConfig.DOMAttributeNames || {}; + var DOMPropertyNames = domPropertyConfig.DOMPropertyNames || {}; + var DOMMutationMethods = domPropertyConfig.DOMMutationMethods || {}; + + if (domPropertyConfig.isCustomAttribute) { + DOMProperty._isCustomAttributeFunctions.push( + domPropertyConfig.isCustomAttribute + ); + } + + for (var propName in Properties) { + ("production" !== "development" ? invariant( + !DOMProperty.isStandardName.hasOwnProperty(propName), + 'injectDOMPropertyConfig(...): You\'re trying to inject DOM property ' + + '\'%s\' which has already been injected. You may be accidentally ' + + 'injecting the same DOM property config twice, or you may be ' + + 'injecting two configs that have conflicting property names.', + propName + ) : invariant(!DOMProperty.isStandardName.hasOwnProperty(propName))); + + DOMProperty.isStandardName[propName] = true; + + var lowerCased = propName.toLowerCase(); + DOMProperty.getPossibleStandardName[lowerCased] = propName; + + if (DOMAttributeNames.hasOwnProperty(propName)) { + var attributeName = DOMAttributeNames[propName]; + DOMProperty.getPossibleStandardName[attributeName] = propName; + DOMProperty.getAttributeName[propName] = attributeName; + } else { + DOMProperty.getAttributeName[propName] = lowerCased; + } + + DOMProperty.getPropertyName[propName] = + DOMPropertyNames.hasOwnProperty(propName) ? + DOMPropertyNames[propName] : + propName; + + if (DOMMutationMethods.hasOwnProperty(propName)) { + DOMProperty.getMutationMethod[propName] = DOMMutationMethods[propName]; + } else { + DOMProperty.getMutationMethod[propName] = null; + } + + var propConfig = Properties[propName]; + DOMProperty.mustUseAttribute[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_ATTRIBUTE); + DOMProperty.mustUseProperty[propName] = + checkMask(propConfig, DOMPropertyInjection.MUST_USE_PROPERTY); + DOMProperty.hasSideEffects[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_SIDE_EFFECTS); + DOMProperty.hasBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_BOOLEAN_VALUE); + DOMProperty.hasNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_NUMERIC_VALUE); + DOMProperty.hasPositiveNumericValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_POSITIVE_NUMERIC_VALUE); + DOMProperty.hasOverloadedBooleanValue[propName] = + checkMask(propConfig, DOMPropertyInjection.HAS_OVERLOADED_BOOLEAN_VALUE); + + ("production" !== "development" ? invariant( + !DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName], + 'DOMProperty: Cannot require using both attribute and property: %s', + propName + ) : invariant(!DOMProperty.mustUseAttribute[propName] || + !DOMProperty.mustUseProperty[propName])); + ("production" !== "development" ? invariant( + DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName], + 'DOMProperty: Properties that have side effects must use property: %s', + propName + ) : invariant(DOMProperty.mustUseProperty[propName] || + !DOMProperty.hasSideEffects[propName])); + ("production" !== "development" ? invariant( + !!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1, + 'DOMProperty: Value can be one of boolean, overloaded boolean, or ' + + 'numeric value, but not a combination: %s', + propName + ) : invariant(!!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasOverloadedBooleanValue[propName] <= 1)); + } + } +}; +var defaultValueCache = {}; + +/** + * DOMProperty exports lookup objects that can be used like functions: + * + * > DOMProperty.isValid['id'] + * true + * > DOMProperty.isValid['foobar'] + * undefined + * + * Although this may be confusing, it performs better in general. + * + * @see http://jsperf.com/key-exists + * @see http://jsperf.com/key-missing + */ +var DOMProperty = { + + ID_ATTRIBUTE_NAME: 'data-reactid', + + /** + * Checks whether a property name is a standard property. + * @type {Object} + */ + isStandardName: {}, + + /** + * Mapping from lowercase property names to the properly cased version, used + * to warn in the case of missing properties. + * @type {Object} + */ + getPossibleStandardName: {}, + + /** + * Mapping from normalized names to attribute names that differ. Attribute + * names are used when rendering markup or with `*Attribute()`. + * @type {Object} + */ + getAttributeName: {}, + + /** + * Mapping from normalized names to properties on DOM node instances. + * (This includes properties that mutate due to external factors.) + * @type {Object} + */ + getPropertyName: {}, + + /** + * Mapping from normalized names to mutation methods. This will only exist if + * mutation cannot be set simply by the property or `setAttribute()`. + * @type {Object} + */ + getMutationMethod: {}, + + /** + * Whether the property must be accessed and mutated as an object property. + * @type {Object} + */ + mustUseAttribute: {}, + + /** + * Whether the property must be accessed and mutated using `*Attribute()`. + * (This includes anything that fails `<propName> in <element>`.) + * @type {Object} + */ + mustUseProperty: {}, + + /** + * Whether or not setting a value causes side effects such as triggering + * resources to be loaded or text selection changes. We must ensure that + * the value is only set if it has changed. + * @type {Object} + */ + hasSideEffects: {}, + + /** + * Whether the property should be removed when set to a falsey value. + * @type {Object} + */ + hasBooleanValue: {}, + + /** + * Whether the property must be numeric or parse as a + * numeric and should be removed when set to a falsey value. + * @type {Object} + */ + hasNumericValue: {}, + + /** + * Whether the property must be positive numeric or parse as a positive + * numeric and should be removed when set to a falsey value. + * @type {Object} + */ + hasPositiveNumericValue: {}, + + /** + * Whether the property can be used as a flag as well as with a value. Removed + * when strictly equal to false; present without a value when strictly equal + * to true; present with a value otherwise. + * @type {Object} + */ + hasOverloadedBooleanValue: {}, + + /** + * All of the isCustomAttribute() functions that have been injected. + */ + _isCustomAttributeFunctions: [], + + /** + * Checks whether a property name is a custom attribute. + * @method + */ + isCustomAttribute: function(attributeName) { + for (var i = 0; i < DOMProperty._isCustomAttributeFunctions.length; i++) { + var isCustomAttributeFn = DOMProperty._isCustomAttributeFunctions[i]; + if (isCustomAttributeFn(attributeName)) { + return true; + } + } + return false; + }, + + /** + * Returns the default property value for a DOM property (i.e., not an + * attribute). Most default values are '' or false, but not all. Worse yet, + * some (in particular, `type`) vary depending on the type of element. + * + * TODO: Is it better to grab all the possible properties when creating an + * element to avoid having to create the same element twice? + */ + getDefaultValueForProperty: function(nodeName, prop) { + var nodeDefaults = defaultValueCache[nodeName]; + var testElement; + if (!nodeDefaults) { + defaultValueCache[nodeName] = nodeDefaults = {}; + } + if (!(prop in nodeDefaults)) { + testElement = document.createElement(nodeName); + nodeDefaults[prop] = testElement[prop]; + } + return nodeDefaults[prop]; + }, + + injection: DOMPropertyInjection +}; + +module.exports = DOMProperty; + +},{"135":135}],11:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DOMPropertyOperations + * @typechecks static-only + */ + +'use strict'; + +var DOMProperty = _dereq_(10); + +var quoteAttributeValueForBrowser = _dereq_(147); +var warning = _dereq_(154); + +function shouldIgnoreValue(name, value) { + return value == null || + (DOMProperty.hasBooleanValue[name] && !value) || + (DOMProperty.hasNumericValue[name] && isNaN(value)) || + (DOMProperty.hasPositiveNumericValue[name] && (value < 1)) || + (DOMProperty.hasOverloadedBooleanValue[name] && value === false); +} + +if ("production" !== "development") { + var reactProps = { + children: true, + dangerouslySetInnerHTML: true, + key: true, + ref: true + }; + var warnedProperties = {}; + + var warnUnknownProperty = function(name) { + if (reactProps.hasOwnProperty(name) && reactProps[name] || + warnedProperties.hasOwnProperty(name) && warnedProperties[name]) { + return; + } + + warnedProperties[name] = true; + var lowerCasedName = name.toLowerCase(); + + // data-* attributes should be lowercase; suggest the lowercase version + var standardName = ( + DOMProperty.isCustomAttribute(lowerCasedName) ? + lowerCasedName : + DOMProperty.getPossibleStandardName.hasOwnProperty(lowerCasedName) ? + DOMProperty.getPossibleStandardName[lowerCasedName] : + null + ); + + // For now, only warn when we have a suggested correction. This prevents + // logging too much when using transferPropsTo. + ("production" !== "development" ? warning( + standardName == null, + 'Unknown DOM property %s. Did you mean %s?', + name, + standardName + ) : null); + + }; +} + +/** + * Operations for dealing with DOM properties. + */ +var DOMPropertyOperations = { + + /** + * Creates markup for the ID property. + * + * @param {string} id Unescaped ID. + * @return {string} Markup string. + */ + createMarkupForID: function(id) { + return DOMProperty.ID_ATTRIBUTE_NAME + '=' + + quoteAttributeValueForBrowser(id); + }, + + /** + * Creates markup for a property. + * + * @param {string} name + * @param {*} value + * @return {?string} Markup string, or null if the property was invalid. + */ + createMarkupForProperty: function(name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + if (shouldIgnoreValue(name, value)) { + return ''; + } + var attributeName = DOMProperty.getAttributeName[name]; + if (DOMProperty.hasBooleanValue[name] || + (DOMProperty.hasOverloadedBooleanValue[name] && value === true)) { + return attributeName; + } + return attributeName + '=' + quoteAttributeValueForBrowser(value); + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + return ''; + } + return name + '=' + quoteAttributeValueForBrowser(value); + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + return null; + }, + + /** + * Sets the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + * @param {*} value + */ + setValueForProperty: function(node, name, value) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + var mutationMethod = DOMProperty.getMutationMethod[name]; + if (mutationMethod) { + mutationMethod(node, value); + } else if (shouldIgnoreValue(name, value)) { + this.deleteValueForProperty(node, name); + } else if (DOMProperty.mustUseAttribute[name]) { + // `setAttribute` with objects becomes only `[object]` in IE8/9, + // ('' + value) makes it output the correct toString()-value. + node.setAttribute(DOMProperty.getAttributeName[name], '' + value); + } else { + var propName = DOMProperty.getPropertyName[name]; + // Must explicitly cast values for HAS_SIDE_EFFECTS-properties to the + // property type before comparing; only `value` does and is string. + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== ('' + value)) { + // Contrary to `setAttribute`, object properties are properly + // `toString`ed by IE8/9. + node[propName] = value; + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + if (value == null) { + node.removeAttribute(name); + } else { + node.setAttribute(name, '' + value); + } + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + }, + + /** + * Deletes the value for a property on a node. + * + * @param {DOMElement} node + * @param {string} name + */ + deleteValueForProperty: function(node, name) { + if (DOMProperty.isStandardName.hasOwnProperty(name) && + DOMProperty.isStandardName[name]) { + var mutationMethod = DOMProperty.getMutationMethod[name]; + if (mutationMethod) { + mutationMethod(node, undefined); + } else if (DOMProperty.mustUseAttribute[name]) { + node.removeAttribute(DOMProperty.getAttributeName[name]); + } else { + var propName = DOMProperty.getPropertyName[name]; + var defaultValue = DOMProperty.getDefaultValueForProperty( + node.nodeName, + propName + ); + if (!DOMProperty.hasSideEffects[name] || + ('' + node[propName]) !== defaultValue) { + node[propName] = defaultValue; + } + } + } else if (DOMProperty.isCustomAttribute(name)) { + node.removeAttribute(name); + } else if ("production" !== "development") { + warnUnknownProperty(name); + } + } + +}; + +module.exports = DOMPropertyOperations; + +},{"10":10,"147":147,"154":154}],12:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Danger + * @typechecks static-only + */ + +/*jslint evil: true, sub: true */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); + +var createNodesFromMarkup = _dereq_(112); +var emptyFunction = _dereq_(114); +var getMarkupWrap = _dereq_(127); +var invariant = _dereq_(135); + +var OPEN_TAG_NAME_EXP = /^(<[^ \/>]+)/; +var RESULT_INDEX_ATTR = 'data-danger-index'; + +/** + * Extracts the `nodeName` from a string of markup. + * + * NOTE: Extracting the `nodeName` does not require a regular expression match + * because we make assumptions about React-generated markup (i.e. there are no + * spaces surrounding the opening tag and there is at least one attribute). + * + * @param {string} markup String of markup. + * @return {string} Node name of the supplied markup. + * @see http://jsperf.com/extract-nodename + */ +function getNodeName(markup) { + return markup.substring(1, markup.indexOf(' ')); +} + +var Danger = { + + /** + * Renders markup into an array of nodes. The markup is expected to render + * into a list of root nodes. Also, the length of `resultList` and + * `markupList` should be the same. + * + * @param {array<string>} markupList List of markup strings to render. + * @return {array<DOMElement>} List of rendered nodes. + * @internal + */ + dangerouslyRenderMarkup: function(markupList) { + ("production" !== "development" ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyRenderMarkup(...): Cannot render markup in a worker ' + + 'thread. Make sure `window` and `document` are available globally ' + + 'before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); + var nodeName; + var markupByNodeName = {}; + // Group markup by `nodeName` if a wrap is necessary, else by '*'. + for (var i = 0; i < markupList.length; i++) { + ("production" !== "development" ? invariant( + markupList[i], + 'dangerouslyRenderMarkup(...): Missing markup.' + ) : invariant(markupList[i])); + nodeName = getNodeName(markupList[i]); + nodeName = getMarkupWrap(nodeName) ? nodeName : '*'; + markupByNodeName[nodeName] = markupByNodeName[nodeName] || []; + markupByNodeName[nodeName][i] = markupList[i]; + } + var resultList = []; + var resultListAssignmentCount = 0; + for (nodeName in markupByNodeName) { + if (!markupByNodeName.hasOwnProperty(nodeName)) { + continue; + } + var markupListByNodeName = markupByNodeName[nodeName]; + + // This for-in loop skips the holes of the sparse array. The order of + // iteration should follow the order of assignment, which happens to match + // numerical index order, but we don't rely on that. + var resultIndex; + for (resultIndex in markupListByNodeName) { + if (markupListByNodeName.hasOwnProperty(resultIndex)) { + var markup = markupListByNodeName[resultIndex]; + + // Push the requested markup with an additional RESULT_INDEX_ATTR + // attribute. If the markup does not start with a < character, it + // will be discarded below (with an appropriate console.error). + markupListByNodeName[resultIndex] = markup.replace( + OPEN_TAG_NAME_EXP, + // This index will be parsed back out below. + '$1 ' + RESULT_INDEX_ATTR + '="' + resultIndex + '" ' + ); + } + } + + // Render each group of markup with similar wrapping `nodeName`. + var renderNodes = createNodesFromMarkup( + markupListByNodeName.join(''), + emptyFunction // Do nothing special with <script> tags. + ); + + for (var j = 0; j < renderNodes.length; ++j) { + var renderNode = renderNodes[j]; + if (renderNode.hasAttribute && + renderNode.hasAttribute(RESULT_INDEX_ATTR)) { + + resultIndex = +renderNode.getAttribute(RESULT_INDEX_ATTR); + renderNode.removeAttribute(RESULT_INDEX_ATTR); + + ("production" !== "development" ? invariant( + !resultList.hasOwnProperty(resultIndex), + 'Danger: Assigning to an already-occupied result index.' + ) : invariant(!resultList.hasOwnProperty(resultIndex))); + + resultList[resultIndex] = renderNode; + + // This should match resultList.length and markupList.length when + // we're done. + resultListAssignmentCount += 1; + + } else if ("production" !== "development") { + console.error( + 'Danger: Discarding unexpected node:', + renderNode + ); + } + } + } + + // Although resultList was populated out of order, it should now be a dense + // array. + ("production" !== "development" ? invariant( + resultListAssignmentCount === resultList.length, + 'Danger: Did not assign to every index of resultList.' + ) : invariant(resultListAssignmentCount === resultList.length)); + + ("production" !== "development" ? invariant( + resultList.length === markupList.length, + 'Danger: Expected markup to render %s nodes, but rendered %s.', + markupList.length, + resultList.length + ) : invariant(resultList.length === markupList.length)); + + return resultList; + }, + + /** + * Replaces a node with a string of markup at its current position within its + * parent. The markup must render into a single root node. + * + * @param {DOMElement} oldChild Child node to replace. + * @param {string} markup Markup to render in place of the child node. + * @internal + */ + dangerouslyReplaceNodeWithMarkup: function(oldChild, markup) { + ("production" !== "development" ? invariant( + ExecutionEnvironment.canUseDOM, + 'dangerouslyReplaceNodeWithMarkup(...): Cannot render markup in a ' + + 'worker thread. Make sure `window` and `document` are available ' + + 'globally before requiring React when unit testing or use ' + + 'React.renderToString for server rendering.' + ) : invariant(ExecutionEnvironment.canUseDOM)); + ("production" !== "development" ? invariant(markup, 'dangerouslyReplaceNodeWithMarkup(...): Missing markup.') : invariant(markup)); + ("production" !== "development" ? invariant( + oldChild.tagName.toLowerCase() !== 'html', + 'dangerouslyReplaceNodeWithMarkup(...): Cannot replace markup of the ' + + '<html> node. This is because browser quirks make this unreliable ' + + 'and/or slow. If you want to render to the root you must use ' + + 'server rendering. See React.renderToString().' + ) : invariant(oldChild.tagName.toLowerCase() !== 'html')); + + var newChild = createNodesFromMarkup(markup, emptyFunction)[0]; + oldChild.parentNode.replaceChild(newChild, oldChild); + } + +}; + +module.exports = Danger; + +},{"112":112,"114":114,"127":127,"135":135,"21":21}],13:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule DefaultEventPluginOrder + */ + +'use strict'; + +var keyOf = _dereq_(141); + +/** + * Module that is injectable into `EventPluginHub`, that specifies a + * deterministic ordering of `EventPlugin`s. A convenient way to reason about + * plugins, without having to package every one of them. This is better than + * having plugins be ordered in the same order that they are injected because + * that ordering would be influenced by the packaging order. + * `ResponderEventPlugin` must occur before `SimpleEventPlugin` so that + * preventing default on events is convenient in `SimpleEventPlugin` handlers. + */ +var DefaultEventPluginOrder = [ + keyOf({ResponderEventPlugin: null}), + keyOf({SimpleEventPlugin: null}), + keyOf({TapEventPlugin: null}), + keyOf({EnterLeaveEventPlugin: null}), + keyOf({ChangeEventPlugin: null}), + keyOf({SelectEventPlugin: null}), + keyOf({BeforeInputEventPlugin: null}), + keyOf({AnalyticsEventPlugin: null}), + keyOf({MobileSafariClickEventPlugin: null}) +]; + +module.exports = DefaultEventPluginOrder; + +},{"141":141}],14:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EnterLeaveEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(20); +var SyntheticMouseEvent = _dereq_(99); + +var ReactMount = _dereq_(70); +var keyOf = _dereq_(141); + +var topLevelTypes = EventConstants.topLevelTypes; +var getFirstReactDOM = ReactMount.getFirstReactDOM; + +var eventTypes = { + mouseEnter: { + registrationName: keyOf({onMouseEnter: null}), + dependencies: [ + topLevelTypes.topMouseOut, + topLevelTypes.topMouseOver + ] + }, + mouseLeave: { + registrationName: keyOf({onMouseLeave: null}), + dependencies: [ + topLevelTypes.topMouseOut, + topLevelTypes.topMouseOver + ] + } +}; + +var extractedEvents = [null, null]; + +var EnterLeaveEventPlugin = { + + eventTypes: eventTypes, + + /** + * For almost every interaction we care about, there will be both a top-level + * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that + * we do not extract duplicate events. However, moving the mouse into the + * browser from outside will not fire a `mouseout` event. In this case, we use + * the `mouseover` top-level event. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + if (topLevelType === topLevelTypes.topMouseOver && + (nativeEvent.relatedTarget || nativeEvent.fromElement)) { + return null; + } + if (topLevelType !== topLevelTypes.topMouseOut && + topLevelType !== topLevelTypes.topMouseOver) { + // Must not be a mouse in or mouse out - ignoring. + return null; + } + + var win; + if (topLevelTarget.window === topLevelTarget) { + // `topLevelTarget` is probably a window object. + win = topLevelTarget; + } else { + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + var doc = topLevelTarget.ownerDocument; + if (doc) { + win = doc.defaultView || doc.parentWindow; + } else { + win = window; + } + } + + var from, to; + if (topLevelType === topLevelTypes.topMouseOut) { + from = topLevelTarget; + to = + getFirstReactDOM(nativeEvent.relatedTarget || nativeEvent.toElement) || + win; + } else { + from = win; + to = topLevelTarget; + } + + if (from === to) { + // Nothing pertains to our managed components. + return null; + } + + var fromID = from ? ReactMount.getID(from) : ''; + var toID = to ? ReactMount.getID(to) : ''; + + var leave = SyntheticMouseEvent.getPooled( + eventTypes.mouseLeave, + fromID, + nativeEvent + ); + leave.type = 'mouseleave'; + leave.target = from; + leave.relatedTarget = to; + + var enter = SyntheticMouseEvent.getPooled( + eventTypes.mouseEnter, + toID, + nativeEvent + ); + enter.type = 'mouseenter'; + enter.target = to; + enter.relatedTarget = from; + + EventPropagators.accumulateEnterLeaveDispatches(leave, enter, fromID, toID); + + extractedEvents[0] = leave; + extractedEvents[1] = enter; + + return extractedEvents; + } + +}; + +module.exports = EnterLeaveEventPlugin; + +},{"141":141,"15":15,"20":20,"70":70,"99":99}],15:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventConstants + */ + +'use strict'; + +var keyMirror = _dereq_(140); + +var PropagationPhases = keyMirror({bubbled: null, captured: null}); + +/** + * Types of raw signals from the browser caught at the top level. + */ +var topLevelTypes = keyMirror({ + topBlur: null, + topChange: null, + topClick: null, + topCompositionEnd: null, + topCompositionStart: null, + topCompositionUpdate: null, + topContextMenu: null, + topCopy: null, + topCut: null, + topDoubleClick: null, + topDrag: null, + topDragEnd: null, + topDragEnter: null, + topDragExit: null, + topDragLeave: null, + topDragOver: null, + topDragStart: null, + topDrop: null, + topError: null, + topFocus: null, + topInput: null, + topKeyDown: null, + topKeyPress: null, + topKeyUp: null, + topLoad: null, + topMouseDown: null, + topMouseMove: null, + topMouseOut: null, + topMouseOver: null, + topMouseUp: null, + topPaste: null, + topReset: null, + topScroll: null, + topSelectionChange: null, + topSubmit: null, + topTextInput: null, + topTouchCancel: null, + topTouchEnd: null, + topTouchMove: null, + topTouchStart: null, + topWheel: null +}); + +var EventConstants = { + topLevelTypes: topLevelTypes, + PropagationPhases: PropagationPhases +}; + +module.exports = EventConstants; + +},{"140":140}],16:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @providesModule EventListener + * @typechecks + */ + +var emptyFunction = _dereq_(114); + +/** + * Upstream version of event listener. Does not take into account specific + * nature of platform. + */ +var EventListener = { + /** + * Listen to DOM events during the bubble phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + listen: function(target, eventType, callback) { + if (target.addEventListener) { + target.addEventListener(eventType, callback, false); + return { + remove: function() { + target.removeEventListener(eventType, callback, false); + } + }; + } else if (target.attachEvent) { + target.attachEvent('on' + eventType, callback); + return { + remove: function() { + target.detachEvent('on' + eventType, callback); + } + }; + } + }, + + /** + * Listen to DOM events during the capture phase. + * + * @param {DOMEventTarget} target DOM element to register listener on. + * @param {string} eventType Event type, e.g. 'click' or 'mouseover'. + * @param {function} callback Callback function. + * @return {object} Object with a `remove` method. + */ + capture: function(target, eventType, callback) { + if (!target.addEventListener) { + if ("production" !== "development") { + console.error( + 'Attempted to listen to events during the capture phase on a ' + + 'browser that does not support the capture phase. Your application ' + + 'will not receive some events.' + ); + } + return { + remove: emptyFunction + }; + } else { + target.addEventListener(eventType, callback, true); + return { + remove: function() { + target.removeEventListener(eventType, callback, true); + } + }; + } + }, + + registerDefault: function() {} +}; + +module.exports = EventListener; + +},{"114":114}],17:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginHub + */ + +'use strict'; + +var EventPluginRegistry = _dereq_(18); +var EventPluginUtils = _dereq_(19); + +var accumulateInto = _dereq_(105); +var forEachAccumulated = _dereq_(120); +var invariant = _dereq_(135); + +/** + * Internal store for event listeners + */ +var listenerBank = {}; + +/** + * Internal queue of events that have accumulated their dispatches and are + * waiting to have their dispatches executed. + */ +var eventQueue = null; + +/** + * Dispatches an event and releases it back into the pool, unless persistent. + * + * @param {?object} event Synthetic event to be dispatched. + * @private + */ +var executeDispatchesAndRelease = function(event) { + if (event) { + var executeDispatch = EventPluginUtils.executeDispatch; + // Plugins can provide custom behavior when dispatching events. + var PluginModule = EventPluginRegistry.getPluginModuleForEvent(event); + if (PluginModule && PluginModule.executeDispatch) { + executeDispatch = PluginModule.executeDispatch; + } + EventPluginUtils.executeDispatchesInOrder(event, executeDispatch); + + if (!event.isPersistent()) { + event.constructor.release(event); + } + } +}; + +/** + * - `InstanceHandle`: [required] Module that performs logical traversals of DOM + * hierarchy given ids of the logical DOM elements involved. + */ +var InstanceHandle = null; + +function validateInstanceHandle() { + var valid = + InstanceHandle && + InstanceHandle.traverseTwoPhase && + InstanceHandle.traverseEnterLeave; + ("production" !== "development" ? invariant( + valid, + 'InstanceHandle not injected before use!' + ) : invariant(valid)); +} + +/** + * This is a unified interface for event plugins to be installed and configured. + * + * Event plugins can implement the following properties: + * + * `extractEvents` {function(string, DOMEventTarget, string, object): *} + * Required. When a top-level event is fired, this method is expected to + * extract synthetic events that will in turn be queued and dispatched. + * + * `eventTypes` {object} + * Optional, plugins that fire events must publish a mapping of registration + * names that are used to register listeners. Values of this mapping must + * be objects that contain `registrationName` or `phasedRegistrationNames`. + * + * `executeDispatch` {function(object, function, string)} + * Optional, allows plugins to override how an event gets dispatched. By + * default, the listener is simply invoked. + * + * Each plugin that is injected into `EventsPluginHub` is immediately operable. + * + * @public + */ +var EventPluginHub = { + + /** + * Methods for injecting dependencies. + */ + injection: { + + /** + * @param {object} InjectedMount + * @public + */ + injectMount: EventPluginUtils.injection.injectMount, + + /** + * @param {object} InjectedInstanceHandle + * @public + */ + injectInstanceHandle: function(InjectedInstanceHandle) { + InstanceHandle = InjectedInstanceHandle; + if ("production" !== "development") { + validateInstanceHandle(); + } + }, + + getInstanceHandle: function() { + if ("production" !== "development") { + validateInstanceHandle(); + } + return InstanceHandle; + }, + + /** + * @param {array} InjectedEventPluginOrder + * @public + */ + injectEventPluginOrder: EventPluginRegistry.injectEventPluginOrder, + + /** + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + */ + injectEventPluginsByName: EventPluginRegistry.injectEventPluginsByName + + }, + + eventNameDispatchConfigs: EventPluginRegistry.eventNameDispatchConfigs, + + registrationNameModules: EventPluginRegistry.registrationNameModules, + + /** + * Stores `listener` at `listenerBank[registrationName][id]`. Is idempotent. + * + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {?function} listener The callback to store. + */ + putListener: function(id, registrationName, listener) { + ("production" !== "development" ? invariant( + !listener || typeof listener === 'function', + 'Expected %s listener to be a function, instead got type %s', + registrationName, typeof listener + ) : invariant(!listener || typeof listener === 'function')); + + var bankForRegistrationName = + listenerBank[registrationName] || (listenerBank[registrationName] = {}); + bankForRegistrationName[id] = listener; + }, + + /** + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @return {?function} The stored callback. + */ + getListener: function(id, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + return bankForRegistrationName && bankForRegistrationName[id]; + }, + + /** + * Deletes a listener from the registration bank. + * + * @param {string} id ID of the DOM element. + * @param {string} registrationName Name of listener (e.g. `onClick`). + */ + deleteListener: function(id, registrationName) { + var bankForRegistrationName = listenerBank[registrationName]; + if (bankForRegistrationName) { + delete bankForRegistrationName[id]; + } + }, + + /** + * Deletes all listeners for the DOM element with the supplied ID. + * + * @param {string} id ID of the DOM element. + */ + deleteAllListeners: function(id) { + for (var registrationName in listenerBank) { + delete listenerBank[registrationName][id]; + } + }, + + /** + * Allows registered plugins an opportunity to extract events from top-level + * native browser events. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @internal + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var events; + var plugins = EventPluginRegistry.plugins; + for (var i = 0, l = plugins.length; i < l; i++) { + // Not every plugin in the ordering may be loaded at runtime. + var possiblePlugin = plugins[i]; + if (possiblePlugin) { + var extractedEvents = possiblePlugin.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); + if (extractedEvents) { + events = accumulateInto(events, extractedEvents); + } + } + } + return events; + }, + + /** + * Enqueues a synthetic event that should be dispatched when + * `processEventQueue` is invoked. + * + * @param {*} events An accumulation of synthetic events. + * @internal + */ + enqueueEvents: function(events) { + if (events) { + eventQueue = accumulateInto(eventQueue, events); + } + }, + + /** + * Dispatches all synthetic events on the event queue. + * + * @internal + */ + processEventQueue: function() { + // Set `eventQueue` to null before processing it so that we can tell if more + // events get enqueued while processing. + var processingEventQueue = eventQueue; + eventQueue = null; + forEachAccumulated(processingEventQueue, executeDispatchesAndRelease); + ("production" !== "development" ? invariant( + !eventQueue, + 'processEventQueue(): Additional events were enqueued while processing ' + + 'an event queue. Support for this has not yet been implemented.' + ) : invariant(!eventQueue)); + }, + + /** + * These are needed for tests only. Do not use! + */ + __purge: function() { + listenerBank = {}; + }, + + __getListenerBank: function() { + return listenerBank; + } + +}; + +module.exports = EventPluginHub; + +},{"105":105,"120":120,"135":135,"18":18,"19":19}],18:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginRegistry + * @typechecks static-only + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * Injectable ordering of event plugins. + */ +var EventPluginOrder = null; + +/** + * Injectable mapping from names to event plugin modules. + */ +var namesToPlugins = {}; + +/** + * Recomputes the plugin list using the injected plugins and plugin ordering. + * + * @private + */ +function recomputePluginOrdering() { + if (!EventPluginOrder) { + // Wait until an `EventPluginOrder` is injected. + return; + } + for (var pluginName in namesToPlugins) { + var PluginModule = namesToPlugins[pluginName]; + var pluginIndex = EventPluginOrder.indexOf(pluginName); + ("production" !== "development" ? invariant( + pluginIndex > -1, + 'EventPluginRegistry: Cannot inject event plugins that do not exist in ' + + 'the plugin ordering, `%s`.', + pluginName + ) : invariant(pluginIndex > -1)); + if (EventPluginRegistry.plugins[pluginIndex]) { + continue; + } + ("production" !== "development" ? invariant( + PluginModule.extractEvents, + 'EventPluginRegistry: Event plugins must implement an `extractEvents` ' + + 'method, but `%s` does not.', + pluginName + ) : invariant(PluginModule.extractEvents)); + EventPluginRegistry.plugins[pluginIndex] = PluginModule; + var publishedEvents = PluginModule.eventTypes; + for (var eventName in publishedEvents) { + ("production" !== "development" ? invariant( + publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ), + 'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.', + eventName, + pluginName + ) : invariant(publishEventForPlugin( + publishedEvents[eventName], + PluginModule, + eventName + ))); + } + } +} + +/** + * Publishes an event so that it can be dispatched by the supplied plugin. + * + * @param {object} dispatchConfig Dispatch configuration for the event. + * @param {object} PluginModule Plugin publishing the event. + * @return {boolean} True if the event was successfully published. + * @private + */ +function publishEventForPlugin(dispatchConfig, PluginModule, eventName) { + ("production" !== "development" ? invariant( + !EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName), + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'event name, `%s`.', + eventName + ) : invariant(!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName))); + EventPluginRegistry.eventNameDispatchConfigs[eventName] = dispatchConfig; + + var phasedRegistrationNames = dispatchConfig.phasedRegistrationNames; + if (phasedRegistrationNames) { + for (var phaseName in phasedRegistrationNames) { + if (phasedRegistrationNames.hasOwnProperty(phaseName)) { + var phasedRegistrationName = phasedRegistrationNames[phaseName]; + publishRegistrationName( + phasedRegistrationName, + PluginModule, + eventName + ); + } + } + return true; + } else if (dispatchConfig.registrationName) { + publishRegistrationName( + dispatchConfig.registrationName, + PluginModule, + eventName + ); + return true; + } + return false; +} + +/** + * Publishes a registration name that is used to identify dispatched events and + * can be used with `EventPluginHub.putListener` to register listeners. + * + * @param {string} registrationName Registration name to add. + * @param {object} PluginModule Plugin publishing the event. + * @private + */ +function publishRegistrationName(registrationName, PluginModule, eventName) { + ("production" !== "development" ? invariant( + !EventPluginRegistry.registrationNameModules[registrationName], + 'EventPluginHub: More than one plugin attempted to publish the same ' + + 'registration name, `%s`.', + registrationName + ) : invariant(!EventPluginRegistry.registrationNameModules[registrationName])); + EventPluginRegistry.registrationNameModules[registrationName] = PluginModule; + EventPluginRegistry.registrationNameDependencies[registrationName] = + PluginModule.eventTypes[eventName].dependencies; +} + +/** + * Registers plugins so that they can extract and dispatch events. + * + * @see {EventPluginHub} + */ +var EventPluginRegistry = { + + /** + * Ordered list of injected plugins. + */ + plugins: [], + + /** + * Mapping from event name to dispatch config + */ + eventNameDispatchConfigs: {}, + + /** + * Mapping from registration name to plugin module + */ + registrationNameModules: {}, + + /** + * Mapping from registration name to event name + */ + registrationNameDependencies: {}, + + /** + * Injects an ordering of plugins (by plugin name). This allows the ordering + * to be decoupled from injection of the actual plugins so that ordering is + * always deterministic regardless of packaging, on-the-fly injection, etc. + * + * @param {array} InjectedEventPluginOrder + * @internal + * @see {EventPluginHub.injection.injectEventPluginOrder} + */ + injectEventPluginOrder: function(InjectedEventPluginOrder) { + ("production" !== "development" ? invariant( + !EventPluginOrder, + 'EventPluginRegistry: Cannot inject event plugin ordering more than ' + + 'once. You are likely trying to load more than one copy of React.' + ) : invariant(!EventPluginOrder)); + // Clone the ordering so it cannot be dynamically mutated. + EventPluginOrder = Array.prototype.slice.call(InjectedEventPluginOrder); + recomputePluginOrdering(); + }, + + /** + * Injects plugins to be used by `EventPluginHub`. The plugin names must be + * in the ordering injected by `injectEventPluginOrder`. + * + * Plugins can be injected as part of page initialization or on-the-fly. + * + * @param {object} injectedNamesToPlugins Map from names to plugin modules. + * @internal + * @see {EventPluginHub.injection.injectEventPluginsByName} + */ + injectEventPluginsByName: function(injectedNamesToPlugins) { + var isOrderingDirty = false; + for (var pluginName in injectedNamesToPlugins) { + if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) { + continue; + } + var PluginModule = injectedNamesToPlugins[pluginName]; + if (!namesToPlugins.hasOwnProperty(pluginName) || + namesToPlugins[pluginName] !== PluginModule) { + ("production" !== "development" ? invariant( + !namesToPlugins[pluginName], + 'EventPluginRegistry: Cannot inject two different event plugins ' + + 'using the same name, `%s`.', + pluginName + ) : invariant(!namesToPlugins[pluginName])); + namesToPlugins[pluginName] = PluginModule; + isOrderingDirty = true; + } + } + if (isOrderingDirty) { + recomputePluginOrdering(); + } + }, + + /** + * Looks up the plugin for the supplied event. + * + * @param {object} event A synthetic event. + * @return {?object} The plugin that created the supplied event. + * @internal + */ + getPluginModuleForEvent: function(event) { + var dispatchConfig = event.dispatchConfig; + if (dispatchConfig.registrationName) { + return EventPluginRegistry.registrationNameModules[ + dispatchConfig.registrationName + ] || null; + } + for (var phase in dispatchConfig.phasedRegistrationNames) { + if (!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)) { + continue; + } + var PluginModule = EventPluginRegistry.registrationNameModules[ + dispatchConfig.phasedRegistrationNames[phase] + ]; + if (PluginModule) { + return PluginModule; + } + } + return null; + }, + + /** + * Exposed for unit testing. + * @private + */ + _resetEventPlugins: function() { + EventPluginOrder = null; + for (var pluginName in namesToPlugins) { + if (namesToPlugins.hasOwnProperty(pluginName)) { + delete namesToPlugins[pluginName]; + } + } + EventPluginRegistry.plugins.length = 0; + + var eventNameDispatchConfigs = EventPluginRegistry.eventNameDispatchConfigs; + for (var eventName in eventNameDispatchConfigs) { + if (eventNameDispatchConfigs.hasOwnProperty(eventName)) { + delete eventNameDispatchConfigs[eventName]; + } + } + + var registrationNameModules = EventPluginRegistry.registrationNameModules; + for (var registrationName in registrationNameModules) { + if (registrationNameModules.hasOwnProperty(registrationName)) { + delete registrationNameModules[registrationName]; + } + } + } + +}; + +module.exports = EventPluginRegistry; + +},{"135":135}],19:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPluginUtils + */ + +'use strict'; + +var EventConstants = _dereq_(15); + +var invariant = _dereq_(135); + +/** + * Injected dependencies: + */ + +/** + * - `Mount`: [required] Module that can convert between React dom IDs and + * actual node references. + */ +var injection = { + Mount: null, + injectMount: function(InjectedMount) { + injection.Mount = InjectedMount; + if ("production" !== "development") { + ("production" !== "development" ? invariant( + InjectedMount && InjectedMount.getNode, + 'EventPluginUtils.injection.injectMount(...): Injected Mount module ' + + 'is missing getNode.' + ) : invariant(InjectedMount && InjectedMount.getNode)); + } + } +}; + +var topLevelTypes = EventConstants.topLevelTypes; + +function isEndish(topLevelType) { + return topLevelType === topLevelTypes.topMouseUp || + topLevelType === topLevelTypes.topTouchEnd || + topLevelType === topLevelTypes.topTouchCancel; +} + +function isMoveish(topLevelType) { + return topLevelType === topLevelTypes.topMouseMove || + topLevelType === topLevelTypes.topTouchMove; +} +function isStartish(topLevelType) { + return topLevelType === topLevelTypes.topMouseDown || + topLevelType === topLevelTypes.topTouchStart; +} + + +var validateEventDispatches; +if ("production" !== "development") { + validateEventDispatches = function(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + + var listenersIsArr = Array.isArray(dispatchListeners); + var idsIsArr = Array.isArray(dispatchIDs); + var IDsLen = idsIsArr ? dispatchIDs.length : dispatchIDs ? 1 : 0; + var listenersLen = listenersIsArr ? + dispatchListeners.length : + dispatchListeners ? 1 : 0; + + ("production" !== "development" ? invariant( + idsIsArr === listenersIsArr && IDsLen === listenersLen, + 'EventPluginUtils: Invalid `event`.' + ) : invariant(idsIsArr === listenersIsArr && IDsLen === listenersLen)); + }; +} + +/** + * Invokes `cb(event, listener, id)`. Avoids using call if no scope is + * provided. The `(listener,id)` pair effectively forms the "dispatch" but are + * kept separate to conserve memory. + */ +function forEachEventDispatch(event, cb) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + if ("production" !== "development") { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and IDs are two parallel arrays that are always in sync. + cb(event, dispatchListeners[i], dispatchIDs[i]); + } + } else if (dispatchListeners) { + cb(event, dispatchListeners, dispatchIDs); + } +} + +/** + * Default implementation of PluginModule.executeDispatch(). + * @param {SyntheticEvent} SyntheticEvent to handle + * @param {function} Application-level callback + * @param {string} domID DOM id to pass to the callback. + */ +function executeDispatch(event, listener, domID) { + event.currentTarget = injection.Mount.getNode(domID); + var returnValue = listener(event, domID); + event.currentTarget = null; + return returnValue; +} + +/** + * Standard/simple iteration through an event's collected dispatches. + */ +function executeDispatchesInOrder(event, cb) { + forEachEventDispatch(event, cb); + event._dispatchListeners = null; + event._dispatchIDs = null; +} + +/** + * Standard/simple iteration through an event's collected dispatches, but stops + * at the first dispatch execution returning true, and returns that id. + * + * @return id of the first dispatch execution who's listener returns true, or + * null if no listener returned true. + */ +function executeDispatchesInOrderStopAtTrueImpl(event) { + var dispatchListeners = event._dispatchListeners; + var dispatchIDs = event._dispatchIDs; + if ("production" !== "development") { + validateEventDispatches(event); + } + if (Array.isArray(dispatchListeners)) { + for (var i = 0; i < dispatchListeners.length; i++) { + if (event.isPropagationStopped()) { + break; + } + // Listeners and IDs are two parallel arrays that are always in sync. + if (dispatchListeners[i](event, dispatchIDs[i])) { + return dispatchIDs[i]; + } + } + } else if (dispatchListeners) { + if (dispatchListeners(event, dispatchIDs)) { + return dispatchIDs; + } + } + return null; +} + +/** + * @see executeDispatchesInOrderStopAtTrueImpl + */ +function executeDispatchesInOrderStopAtTrue(event) { + var ret = executeDispatchesInOrderStopAtTrueImpl(event); + event._dispatchIDs = null; + event._dispatchListeners = null; + return ret; +} + +/** + * Execution of a "direct" dispatch - there must be at most one dispatch + * accumulated on the event or it is considered an error. It doesn't really make + * sense for an event with multiple dispatches (bubbled) to keep track of the + * return values at each dispatch execution, but it does tend to make sense when + * dealing with "direct" dispatches. + * + * @return The return value of executing the single dispatch. + */ +function executeDirectDispatch(event) { + if ("production" !== "development") { + validateEventDispatches(event); + } + var dispatchListener = event._dispatchListeners; + var dispatchID = event._dispatchIDs; + ("production" !== "development" ? invariant( + !Array.isArray(dispatchListener), + 'executeDirectDispatch(...): Invalid `event`.' + ) : invariant(!Array.isArray(dispatchListener))); + var res = dispatchListener ? + dispatchListener(event, dispatchID) : + null; + event._dispatchListeners = null; + event._dispatchIDs = null; + return res; +} + +/** + * @param {SyntheticEvent} event + * @return {bool} True iff number of dispatches accumulated is greater than 0. + */ +function hasDispatches(event) { + return !!event._dispatchListeners; +} + +/** + * General utilities that are useful in creating custom Event Plugins. + */ +var EventPluginUtils = { + isEndish: isEndish, + isMoveish: isMoveish, + isStartish: isStartish, + + executeDirectDispatch: executeDirectDispatch, + executeDispatch: executeDispatch, + executeDispatchesInOrder: executeDispatchesInOrder, + executeDispatchesInOrderStopAtTrue: executeDispatchesInOrderStopAtTrue, + hasDispatches: hasDispatches, + injection: injection, + useTouchEvents: false +}; + +module.exports = EventPluginUtils; + +},{"135":135,"15":15}],20:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule EventPropagators + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(17); + +var accumulateInto = _dereq_(105); +var forEachAccumulated = _dereq_(120); + +var PropagationPhases = EventConstants.PropagationPhases; +var getListener = EventPluginHub.getListener; + +/** + * Some event types have a notion of different registration names for different + * "phases" of propagation. This finds listeners by a given phase. + */ +function listenerAtPhase(id, event, propagationPhase) { + var registrationName = + event.dispatchConfig.phasedRegistrationNames[propagationPhase]; + return getListener(id, registrationName); +} + +/** + * Tags a `SyntheticEvent` with dispatched listeners. Creating this function + * here, allows us to not have to bind or create functions for each event. + * Mutating the event's members allows us to not have to create a wrapping + * "dispatch" object that pairs the event with the listener. + */ +function accumulateDirectionalDispatches(domID, upwards, event) { + if ("production" !== "development") { + if (!domID) { + throw new Error('Dispatching id must not be null'); + } + } + var phase = upwards ? PropagationPhases.bubbled : PropagationPhases.captured; + var listener = listenerAtPhase(domID, event, phase); + if (listener) { + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, domID); + } +} + +/** + * Collect dispatches (must be entirely collected before dispatching - see unit + * tests). Lazily allocate the array to conserve memory. We must loop through + * each event and perform the traversal for each one. We can not perform a + * single traversal for the entire collection of events because each event may + * have a different target. + */ +function accumulateTwoPhaseDispatchesSingle(event) { + if (event && event.dispatchConfig.phasedRegistrationNames) { + EventPluginHub.injection.getInstanceHandle().traverseTwoPhase( + event.dispatchMarker, + accumulateDirectionalDispatches, + event + ); + } +} + + +/** + * Accumulates without regard to direction, does not look for phased + * registration names. Same as `accumulateDirectDispatchesSingle` but without + * requiring that the `dispatchMarker` be the same as the dispatched ID. + */ +function accumulateDispatches(id, ignoredDirection, event) { + if (event && event.dispatchConfig.registrationName) { + var registrationName = event.dispatchConfig.registrationName; + var listener = getListener(id, registrationName); + if (listener) { + event._dispatchListeners = + accumulateInto(event._dispatchListeners, listener); + event._dispatchIDs = accumulateInto(event._dispatchIDs, id); + } + } +} + +/** + * Accumulates dispatches on an `SyntheticEvent`, but only for the + * `dispatchMarker`. + * @param {SyntheticEvent} event + */ +function accumulateDirectDispatchesSingle(event) { + if (event && event.dispatchConfig.registrationName) { + accumulateDispatches(event.dispatchMarker, null, event); + } +} + +function accumulateTwoPhaseDispatches(events) { + forEachAccumulated(events, accumulateTwoPhaseDispatchesSingle); +} + +function accumulateEnterLeaveDispatches(leave, enter, fromID, toID) { + EventPluginHub.injection.getInstanceHandle().traverseEnterLeave( + fromID, + toID, + accumulateDispatches, + leave, + enter + ); +} + + +function accumulateDirectDispatches(events) { + forEachAccumulated(events, accumulateDirectDispatchesSingle); +} + + + +/** + * A small set of propagation patterns, each of which will accept a small amount + * of information, and generate a set of "dispatch ready event objects" - which + * are sets of events that have already been annotated with a set of dispatched + * listener functions/ids. The API is designed this way to discourage these + * propagation strategies from actually executing the dispatches, since we + * always want to collect the entire set of dispatches before executing event a + * single one. + * + * @constructor EventPropagators + */ +var EventPropagators = { + accumulateTwoPhaseDispatches: accumulateTwoPhaseDispatches, + accumulateDirectDispatches: accumulateDirectDispatches, + accumulateEnterLeaveDispatches: accumulateEnterLeaveDispatches +}; + +module.exports = EventPropagators; + +},{"105":105,"120":120,"15":15,"17":17}],21:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ExecutionEnvironment + */ + +/*jslint evil: true */ + +"use strict"; + +var canUseDOM = !!( + (typeof window !== 'undefined' && + window.document && window.document.createElement) +); + +/** + * Simple, lightweight module assisting with the detection and context of + * Worker. Helps avoid circular dependencies and allows code to reason about + * whether or not they are in a Worker, even if they never include the main + * `ReactWorker` dependency. + */ +var ExecutionEnvironment = { + + canUseDOM: canUseDOM, + + canUseWorkers: typeof Worker !== 'undefined', + + canUseEventListeners: + canUseDOM && !!(window.addEventListener || window.attachEvent), + + canUseViewport: canUseDOM && !!window.screen, + + isInWorker: !canUseDOM // For now, this is true - might change in the future. + +}; + +module.exports = ExecutionEnvironment; + +},{}],22:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule FallbackCompositionState + * @typechecks static-only + */ + +'use strict'; + +var PooledClass = _dereq_(28); + +var assign = _dereq_(27); +var getTextContentAccessor = _dereq_(130); + +/** + * This helper class stores information about text content of a target node, + * allowing comparison of content before and after a given event. + * + * Identify the node where selection currently begins, then observe + * both its text content and its current position in the DOM. Since the + * browser may natively replace the target node during composition, we can + * use its position to find its replacement. + * + * @param {DOMEventTarget} root + */ +function FallbackCompositionState(root) { + this._root = root; + this._startText = this.getText(); + this._fallbackText = null; +} + +assign(FallbackCompositionState.prototype, { + /** + * Get current text of input. + * + * @return {string} + */ + getText: function() { + if ('value' in this._root) { + return this._root.value; + } + return this._root[getTextContentAccessor()]; + }, + + /** + * Determine the differing substring between the initially stored + * text content and the current content. + * + * @return {string} + */ + getData: function() { + if (this._fallbackText) { + return this._fallbackText; + } + + var start; + var startValue = this._startText; + var startLength = startValue.length; + var end; + var endValue = this.getText(); + var endLength = endValue.length; + + for (start = 0; start < startLength; start++) { + if (startValue[start] !== endValue[start]) { + break; + } + } + + var minEnd = startLength - start; + for (end = 1; end <= minEnd; end++) { + if (startValue[startLength - end] !== endValue[endLength - end]) { + break; + } + } + + var sliceTail = end > 1 ? 1 - end : undefined; + this._fallbackText = endValue.slice(start, sliceTail); + return this._fallbackText; + } +}); + +PooledClass.addPoolingTo(FallbackCompositionState); + +module.exports = FallbackCompositionState; + +},{"130":130,"27":27,"28":28}],23:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule HTMLDOMPropertyConfig + */ + +/*jslint bitwise: true*/ + +'use strict'; + +var DOMProperty = _dereq_(10); +var ExecutionEnvironment = _dereq_(21); + +var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; +var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; +var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; +var HAS_SIDE_EFFECTS = DOMProperty.injection.HAS_SIDE_EFFECTS; +var HAS_NUMERIC_VALUE = DOMProperty.injection.HAS_NUMERIC_VALUE; +var HAS_POSITIVE_NUMERIC_VALUE = + DOMProperty.injection.HAS_POSITIVE_NUMERIC_VALUE; +var HAS_OVERLOADED_BOOLEAN_VALUE = + DOMProperty.injection.HAS_OVERLOADED_BOOLEAN_VALUE; + +var hasSVG; +if (ExecutionEnvironment.canUseDOM) { + var implementation = document.implementation; + hasSVG = ( + implementation && + implementation.hasFeature && + implementation.hasFeature( + 'http://www.w3.org/TR/SVG11/feature#BasicStructure', + '1.1' + ) + ); +} + + +var HTMLDOMPropertyConfig = { + isCustomAttribute: RegExp.prototype.test.bind( + /^(data|aria)-[a-z_][a-z\d_.\-]*$/ + ), + Properties: { + /** + * Standard Properties + */ + accept: null, + acceptCharset: null, + accessKey: null, + action: null, + allowFullScreen: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + allowTransparency: MUST_USE_ATTRIBUTE, + alt: null, + async: HAS_BOOLEAN_VALUE, + autoComplete: null, + // autoFocus is polyfilled/normalized by AutoFocusMixin + // autoFocus: HAS_BOOLEAN_VALUE, + autoPlay: HAS_BOOLEAN_VALUE, + cellPadding: null, + cellSpacing: null, + charSet: MUST_USE_ATTRIBUTE, + checked: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + classID: MUST_USE_ATTRIBUTE, + // To set className on SVG elements, it's necessary to use .setAttribute; + // this works on HTML elements too in all browsers except IE8. Conveniently, + // IE8 doesn't support SVG and so we can simply use the attribute in + // browsers that support SVG and the property in browsers that don't, + // regardless of whether the element is HTML or SVG. + className: hasSVG ? MUST_USE_ATTRIBUTE : MUST_USE_PROPERTY, + cols: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + colSpan: null, + content: null, + contentEditable: null, + contextMenu: MUST_USE_ATTRIBUTE, + controls: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + coords: null, + crossOrigin: null, + data: null, // For `<object />` acts as `src`. + dateTime: MUST_USE_ATTRIBUTE, + defer: HAS_BOOLEAN_VALUE, + dir: null, + disabled: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + download: HAS_OVERLOADED_BOOLEAN_VALUE, + draggable: null, + encType: null, + form: MUST_USE_ATTRIBUTE, + formAction: MUST_USE_ATTRIBUTE, + formEncType: MUST_USE_ATTRIBUTE, + formMethod: MUST_USE_ATTRIBUTE, + formNoValidate: HAS_BOOLEAN_VALUE, + formTarget: MUST_USE_ATTRIBUTE, + frameBorder: MUST_USE_ATTRIBUTE, + headers: null, + height: MUST_USE_ATTRIBUTE, + hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + href: null, + hrefLang: null, + htmlFor: null, + httpEquiv: null, + icon: null, + id: MUST_USE_PROPERTY, + label: null, + lang: null, + list: MUST_USE_ATTRIBUTE, + loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + manifest: MUST_USE_ATTRIBUTE, + marginHeight: null, + marginWidth: null, + max: null, + maxLength: MUST_USE_ATTRIBUTE, + media: MUST_USE_ATTRIBUTE, + mediaGroup: null, + method: null, + min: null, + multiple: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + muted: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + name: null, + noValidate: HAS_BOOLEAN_VALUE, + open: HAS_BOOLEAN_VALUE, + pattern: null, + placeholder: null, + poster: null, + preload: null, + radioGroup: null, + readOnly: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + rel: null, + required: HAS_BOOLEAN_VALUE, + role: MUST_USE_ATTRIBUTE, + rows: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + rowSpan: null, + sandbox: null, + scope: null, + scrolling: null, + seamless: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + selected: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE, + shape: null, + size: MUST_USE_ATTRIBUTE | HAS_POSITIVE_NUMERIC_VALUE, + sizes: MUST_USE_ATTRIBUTE, + span: HAS_POSITIVE_NUMERIC_VALUE, + spellCheck: null, + src: null, + srcDoc: MUST_USE_PROPERTY, + srcSet: MUST_USE_ATTRIBUTE, + start: HAS_NUMERIC_VALUE, + step: null, + style: null, + tabIndex: null, + target: null, + title: null, + type: null, + useMap: null, + value: MUST_USE_PROPERTY | HAS_SIDE_EFFECTS, + width: MUST_USE_ATTRIBUTE, + wmode: MUST_USE_ATTRIBUTE, + + /** + * Non-standard Properties + */ + // autoCapitalize and autoCorrect are supported in Mobile Safari for + // keyboard hints. + autoCapitalize: null, + autoCorrect: null, + // itemProp, itemScope, itemType are for + // Microdata support. See http://schema.org/docs/gs.html + itemProp: MUST_USE_ATTRIBUTE, + itemScope: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE, + itemType: MUST_USE_ATTRIBUTE, + // itemID and itemRef are for Microdata support as well but + // only specified in the the WHATWG spec document. See + // https://html.spec.whatwg.org/multipage/microdata.html#microdata-dom-api + itemID: MUST_USE_ATTRIBUTE, + itemRef: MUST_USE_ATTRIBUTE, + // property is supported for OpenGraph in meta tags. + property: null + }, + DOMAttributeNames: { + acceptCharset: 'accept-charset', + className: 'class', + htmlFor: 'for', + httpEquiv: 'http-equiv' + }, + DOMPropertyNames: { + autoCapitalize: 'autocapitalize', + autoComplete: 'autocomplete', + autoCorrect: 'autocorrect', + autoFocus: 'autofocus', + autoPlay: 'autoplay', + // `encoding` is equivalent to `enctype`, IE8 lacks an `enctype` setter. + // http://www.w3.org/TR/html5/forms.html#dom-fs-encoding + encType: 'encoding', + hrefLang: 'hreflang', + radioGroup: 'radiogroup', + spellCheck: 'spellcheck', + srcDoc: 'srcdoc', + srcSet: 'srcset' + } +}; + +module.exports = HTMLDOMPropertyConfig; + +},{"10":10,"21":21}],24:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule LinkedValueUtils + * @typechecks static-only + */ + +'use strict'; + +var ReactPropTypes = _dereq_(78); + +var invariant = _dereq_(135); + +var hasReadOnlyValue = { + 'button': true, + 'checkbox': true, + 'image': true, + 'hidden': true, + 'radio': true, + 'reset': true, + 'submit': true +}; + +function _assertSingleLink(input) { + ("production" !== "development" ? invariant( + input.props.checkedLink == null || input.props.valueLink == null, + 'Cannot provide a checkedLink and a valueLink. If you want to use ' + + 'checkedLink, you probably don\'t want to use valueLink and vice versa.' + ) : invariant(input.props.checkedLink == null || input.props.valueLink == null)); +} +function _assertValueLink(input) { + _assertSingleLink(input); + ("production" !== "development" ? invariant( + input.props.value == null && input.props.onChange == null, + 'Cannot provide a valueLink and a value or onChange event. If you want ' + + 'to use value or onChange, you probably don\'t want to use valueLink.' + ) : invariant(input.props.value == null && input.props.onChange == null)); +} + +function _assertCheckedLink(input) { + _assertSingleLink(input); + ("production" !== "development" ? invariant( + input.props.checked == null && input.props.onChange == null, + 'Cannot provide a checkedLink and a checked property or onChange event. ' + + 'If you want to use checked or onChange, you probably don\'t want to ' + + 'use checkedLink' + ) : invariant(input.props.checked == null && input.props.onChange == null)); +} + +/** + * @param {SyntheticEvent} e change event to handle + */ +function _handleLinkedValueChange(e) { + /*jshint validthis:true */ + this.props.valueLink.requestChange(e.target.value); +} + +/** + * @param {SyntheticEvent} e change event to handle + */ +function _handleLinkedCheckChange(e) { + /*jshint validthis:true */ + this.props.checkedLink.requestChange(e.target.checked); +} + +/** + * Provide a linked `value` attribute for controlled forms. You should not use + * this outside of the ReactDOM controlled form components. + */ +var LinkedValueUtils = { + Mixin: { + propTypes: { + value: function(props, propName, componentName) { + if (!props[propName] || + hasReadOnlyValue[props.type] || + props.onChange || + props.readOnly || + props.disabled) { + return null; + } + return new Error( + 'You provided a `value` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultValue`. Otherwise, ' + + 'set either `onChange` or `readOnly`.' + ); + }, + checked: function(props, propName, componentName) { + if (!props[propName] || + props.onChange || + props.readOnly || + props.disabled) { + return null; + } + return new Error( + 'You provided a `checked` prop to a form field without an ' + + '`onChange` handler. This will render a read-only field. If ' + + 'the field should be mutable use `defaultChecked`. Otherwise, ' + + 'set either `onChange` or `readOnly`.' + ); + }, + onChange: ReactPropTypes.func + } + }, + + /** + * @param {ReactComponent} input Form component + * @return {*} current value of the input either from value prop or link. + */ + getValue: function(input) { + if (input.props.valueLink) { + _assertValueLink(input); + return input.props.valueLink.value; + } + return input.props.value; + }, + + /** + * @param {ReactComponent} input Form component + * @return {*} current checked status of the input either from checked prop + * or link. + */ + getChecked: function(input) { + if (input.props.checkedLink) { + _assertCheckedLink(input); + return input.props.checkedLink.value; + } + return input.props.checked; + }, + + /** + * @param {ReactComponent} input Form component + * @return {function} change callback either from onChange prop or link. + */ + getOnChange: function(input) { + if (input.props.valueLink) { + _assertValueLink(input); + return _handleLinkedValueChange; + } else if (input.props.checkedLink) { + _assertCheckedLink(input); + return _handleLinkedCheckChange; + } + return input.props.onChange; + } +}; + +module.exports = LinkedValueUtils; + +},{"135":135,"78":78}],25:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule LocalEventTrapMixin + */ + +'use strict'; + +var ReactBrowserEventEmitter = _dereq_(30); + +var accumulateInto = _dereq_(105); +var forEachAccumulated = _dereq_(120); +var invariant = _dereq_(135); + +function remove(event) { + event.remove(); +} + +var LocalEventTrapMixin = { + trapBubbledEvent:function(topLevelType, handlerBaseName) { + ("production" !== "development" ? invariant(this.isMounted(), 'Must be mounted to trap events') : invariant(this.isMounted())); + // If a component renders to null or if another component fatals and causes + // the state of the tree to be corrupted, `node` here can be null. + var node = this.getDOMNode(); + ("production" !== "development" ? invariant( + node, + 'LocalEventTrapMixin.trapBubbledEvent(...): Requires node to be rendered.' + ) : invariant(node)); + var listener = ReactBrowserEventEmitter.trapBubbledEvent( + topLevelType, + handlerBaseName, + node + ); + this._localEventListeners = + accumulateInto(this._localEventListeners, listener); + }, + + // trapCapturedEvent would look nearly identical. We don't implement that + // method because it isn't currently needed. + + componentWillUnmount:function() { + if (this._localEventListeners) { + forEachAccumulated(this._localEventListeners, remove); + } + } +}; + +module.exports = LocalEventTrapMixin; + +},{"105":105,"120":120,"135":135,"30":30}],26:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule MobileSafariClickEventPlugin + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(15); + +var emptyFunction = _dereq_(114); + +var topLevelTypes = EventConstants.topLevelTypes; + +/** + * Mobile Safari does not fire properly bubble click events on non-interactive + * elements, which means delegated click listeners do not fire. The workaround + * for this bug involves attaching an empty click listener on the target node. + * + * This particular plugin works around the bug by attaching an empty click + * listener on `touchstart` (which does fire on every element). + */ +var MobileSafariClickEventPlugin = { + + eventTypes: null, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + if (topLevelType === topLevelTypes.topTouchStart) { + var target = nativeEvent.target; + if (target && !target.onclick) { + target.onclick = emptyFunction; + } + } + } + +}; + +module.exports = MobileSafariClickEventPlugin; + +},{"114":114,"15":15}],27:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Object.assign + */ + +// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign + +'use strict'; + +function assign(target, sources) { + if (target == null) { + throw new TypeError('Object.assign target cannot be null or undefined'); + } + + var to = Object(target); + var hasOwnProperty = Object.prototype.hasOwnProperty; + + for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) { + var nextSource = arguments[nextIndex]; + if (nextSource == null) { + continue; + } + + var from = Object(nextSource); + + // We don't currently support accessors nor proxies. Therefore this + // copy cannot throw. If we ever supported this then we must handle + // exceptions and side-effects. We don't support symbols so they won't + // be transferred. + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + } + + return to; +} + +module.exports = assign; + +},{}],28:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule PooledClass + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * Static poolers. Several custom versions for each potential number of + * arguments. A completely generic pooler is easy to implement, but would + * require accessing the `arguments` object. In each of these, `this` refers to + * the Class itself, not an instance. If any others are needed, simply add them + * here, or in their own files. + */ +var oneArgumentPooler = function(copyFieldsFrom) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, copyFieldsFrom); + return instance; + } else { + return new Klass(copyFieldsFrom); + } +}; + +var twoArgumentPooler = function(a1, a2) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2); + return instance; + } else { + return new Klass(a1, a2); + } +}; + +var threeArgumentPooler = function(a1, a2, a3) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3); + return instance; + } else { + return new Klass(a1, a2, a3); + } +}; + +var fiveArgumentPooler = function(a1, a2, a3, a4, a5) { + var Klass = this; + if (Klass.instancePool.length) { + var instance = Klass.instancePool.pop(); + Klass.call(instance, a1, a2, a3, a4, a5); + return instance; + } else { + return new Klass(a1, a2, a3, a4, a5); + } +}; + +var standardReleaser = function(instance) { + var Klass = this; + ("production" !== "development" ? invariant( + instance instanceof Klass, + 'Trying to release an instance into a pool of a different type.' + ) : invariant(instance instanceof Klass)); + if (instance.destructor) { + instance.destructor(); + } + if (Klass.instancePool.length < Klass.poolSize) { + Klass.instancePool.push(instance); + } +}; + +var DEFAULT_POOL_SIZE = 10; +var DEFAULT_POOLER = oneArgumentPooler; + +/** + * Augments `CopyConstructor` to be a poolable class, augmenting only the class + * itself (statically) not adding any prototypical fields. Any CopyConstructor + * you give this may have a `poolSize` property, and will look for a + * prototypical `destructor` on instances (optional). + * + * @param {Function} CopyConstructor Constructor that can be used to reset. + * @param {Function} pooler Customizable pooler. + */ +var addPoolingTo = function(CopyConstructor, pooler) { + var NewKlass = CopyConstructor; + NewKlass.instancePool = []; + NewKlass.getPooled = pooler || DEFAULT_POOLER; + if (!NewKlass.poolSize) { + NewKlass.poolSize = DEFAULT_POOL_SIZE; + } + NewKlass.release = standardReleaser; + return NewKlass; +}; + +var PooledClass = { + addPoolingTo: addPoolingTo, + oneArgumentPooler: oneArgumentPooler, + twoArgumentPooler: twoArgumentPooler, + threeArgumentPooler: threeArgumentPooler, + fiveArgumentPooler: fiveArgumentPooler +}; + +module.exports = PooledClass; + +},{"135":135}],29:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactBrowserComponentMixin + */ + +'use strict'; + +var findDOMNode = _dereq_(117); + +var ReactBrowserComponentMixin = { + /** + * Returns the DOM node rendered by this component. + * + * @return {DOMElement} The root node of this component. + * @final + * @protected + */ + getDOMNode: function() { + return findDOMNode(this); + } +}; + +module.exports = ReactBrowserComponentMixin; + +},{"117":117}],30:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactBrowserEventEmitter + * @typechecks static-only + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPluginHub = _dereq_(17); +var EventPluginRegistry = _dereq_(18); +var ReactEventEmitterMixin = _dereq_(61); +var ViewportMetrics = _dereq_(104); + +var assign = _dereq_(27); +var isEventSupported = _dereq_(136); + +/** + * Summary of `ReactBrowserEventEmitter` event handling: + * + * - Top-level delegation is used to trap most native browser events. This + * may only occur in the main thread and is the responsibility of + * ReactEventListener, which is injected and can therefore support pluggable + * event sources. This is the only work that occurs in the main thread. + * + * - We normalize and de-duplicate events to account for browser quirks. This + * may be done in the worker thread. + * + * - Forward these native events (with the associated top-level type used to + * trap it) to `EventPluginHub`, which in turn will ask plugins if they want + * to extract any synthetic events. + * + * - The `EventPluginHub` will then process each event by annotating them with + * "dispatches", a sequence of listeners and IDs that care about that event. + * + * - The `EventPluginHub` then dispatches the events. + * + * Overview of React and the event system: + * + * +------------+ . + * | DOM | . + * +------------+ . + * | . + * v . + * +------------+ . + * | ReactEvent | . + * | Listener | . + * +------------+ . +-----------+ + * | . +--------+|SimpleEvent| + * | . | |Plugin | + * +-----|------+ . v +-----------+ + * | | | . +--------------+ +------------+ + * | +-----------.--->|EventPluginHub| | Event | + * | | . | | +-----------+ | Propagators| + * | ReactEvent | . | | |TapEvent | |------------| + * | Emitter | . | |<---+|Plugin | |other plugin| + * | | . | | +-----------+ | utilities | + * | +-----------.--->| | +------------+ + * | | | . +--------------+ + * +-----|------+ . ^ +-----------+ + * | . | |Enter/Leave| + * + . +-------+|Plugin | + * +-------------+ . +-----------+ + * | application | . + * |-------------| . + * | | . + * | | . + * +-------------+ . + * . + * React Core . General Purpose Event Plugin System + */ + +var alreadyListeningTo = {}; +var isMonitoringScrollValue = false; +var reactTopListenersCounter = 0; + +// For events like 'submit' which don't consistently bubble (which we trap at a +// lower node than `document`), binding at `document` would cause duplicate +// events so we don't include them here +var topEventMapping = { + topBlur: 'blur', + topChange: 'change', + topClick: 'click', + topCompositionEnd: 'compositionend', + topCompositionStart: 'compositionstart', + topCompositionUpdate: 'compositionupdate', + topContextMenu: 'contextmenu', + topCopy: 'copy', + topCut: 'cut', + topDoubleClick: 'dblclick', + topDrag: 'drag', + topDragEnd: 'dragend', + topDragEnter: 'dragenter', + topDragExit: 'dragexit', + topDragLeave: 'dragleave', + topDragOver: 'dragover', + topDragStart: 'dragstart', + topDrop: 'drop', + topFocus: 'focus', + topInput: 'input', + topKeyDown: 'keydown', + topKeyPress: 'keypress', + topKeyUp: 'keyup', + topMouseDown: 'mousedown', + topMouseMove: 'mousemove', + topMouseOut: 'mouseout', + topMouseOver: 'mouseover', + topMouseUp: 'mouseup', + topPaste: 'paste', + topScroll: 'scroll', + topSelectionChange: 'selectionchange', + topTextInput: 'textInput', + topTouchCancel: 'touchcancel', + topTouchEnd: 'touchend', + topTouchMove: 'touchmove', + topTouchStart: 'touchstart', + topWheel: 'wheel' +}; + +/** + * To ensure no conflicts with other potential React instances on the page + */ +var topListenersIDKey = '_reactListenersID' + String(Math.random()).slice(2); + +function getListeningForDocument(mountAt) { + // In IE8, `mountAt` is a host object and doesn't have `hasOwnProperty` + // directly. + if (!Object.prototype.hasOwnProperty.call(mountAt, topListenersIDKey)) { + mountAt[topListenersIDKey] = reactTopListenersCounter++; + alreadyListeningTo[mountAt[topListenersIDKey]] = {}; + } + return alreadyListeningTo[mountAt[topListenersIDKey]]; +} + +/** + * `ReactBrowserEventEmitter` is used to attach top-level event listeners. For + * example: + * + * ReactBrowserEventEmitter.putListener('myID', 'onClick', myFunction); + * + * This would allocate a "registration" of `('onClick', myFunction)` on 'myID'. + * + * @internal + */ +var ReactBrowserEventEmitter = assign({}, ReactEventEmitterMixin, { + + /** + * Injectable event backend + */ + ReactEventListener: null, + + injection: { + /** + * @param {object} ReactEventListener + */ + injectReactEventListener: function(ReactEventListener) { + ReactEventListener.setHandleTopLevel( + ReactBrowserEventEmitter.handleTopLevel + ); + ReactBrowserEventEmitter.ReactEventListener = ReactEventListener; + } + }, + + /** + * Sets whether or not any created callbacks should be enabled. + * + * @param {boolean} enabled True if callbacks should be enabled. + */ + setEnabled: function(enabled) { + if (ReactBrowserEventEmitter.ReactEventListener) { + ReactBrowserEventEmitter.ReactEventListener.setEnabled(enabled); + } + }, + + /** + * @return {boolean} True if callbacks are enabled. + */ + isEnabled: function() { + return !!( + (ReactBrowserEventEmitter.ReactEventListener && ReactBrowserEventEmitter.ReactEventListener.isEnabled()) + ); + }, + + /** + * We listen for bubbled touch events on the document object. + * + * Firefox v8.01 (and possibly others) exhibited strange behavior when + * mounting `onmousemove` events at some node that was not the document + * element. The symptoms were that if your mouse is not moving over something + * contained within that mount point (for example on the background) the + * top-level listeners for `onmousemove` won't be called. However, if you + * register the `mousemove` on the document object, then it will of course + * catch all `mousemove`s. This along with iOS quirks, justifies restricting + * top-level listeners to the document object only, at least for these + * movement types of events and possibly all events. + * + * @see http://www.quirksmode.org/blog/archives/2010/09/click_event_del.html + * + * Also, `keyup`/`keypress`/`keydown` do not bubble to the window on IE, but + * they bubble to document. + * + * @param {string} registrationName Name of listener (e.g. `onClick`). + * @param {object} contentDocumentHandle Document which owns the container + */ + listenTo: function(registrationName, contentDocumentHandle) { + var mountAt = contentDocumentHandle; + var isListening = getListeningForDocument(mountAt); + var dependencies = EventPluginRegistry. + registrationNameDependencies[registrationName]; + + var topLevelTypes = EventConstants.topLevelTypes; + for (var i = 0, l = dependencies.length; i < l; i++) { + var dependency = dependencies[i]; + if (!( + (isListening.hasOwnProperty(dependency) && isListening[dependency]) + )) { + if (dependency === topLevelTypes.topWheel) { + if (isEventSupported('wheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'wheel', + mountAt + ); + } else if (isEventSupported('mousewheel')) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'mousewheel', + mountAt + ); + } else { + // Firefox needs to capture a different mouse scroll event. + // @see http://www.quirksmode.org/dom/events/tests/scroll.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topWheel, + 'DOMMouseScroll', + mountAt + ); + } + } else if (dependency === topLevelTypes.topScroll) { + + if (isEventSupported('scroll', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topScroll, + 'scroll', + mountAt + ); + } else { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topScroll, + 'scroll', + ReactBrowserEventEmitter.ReactEventListener.WINDOW_HANDLE + ); + } + } else if (dependency === topLevelTypes.topFocus || + dependency === topLevelTypes.topBlur) { + + if (isEventSupported('focus', true)) { + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topFocus, + 'focus', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelTypes.topBlur, + 'blur', + mountAt + ); + } else if (isEventSupported('focusin')) { + // IE has `focusin` and `focusout` events which bubble. + // @see http://www.quirksmode.org/blog/archives/2008/04/delegating_the.html + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topFocus, + 'focusin', + mountAt + ); + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelTypes.topBlur, + 'focusout', + mountAt + ); + } + + // to make sure blur and focus event listeners are only attached once + isListening[topLevelTypes.topBlur] = true; + isListening[topLevelTypes.topFocus] = true; + } else if (topEventMapping.hasOwnProperty(dependency)) { + ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + dependency, + topEventMapping[dependency], + mountAt + ); + } + + isListening[dependency] = true; + } + } + }, + + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapBubbledEvent( + topLevelType, + handlerBaseName, + handle + ); + }, + + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + return ReactBrowserEventEmitter.ReactEventListener.trapCapturedEvent( + topLevelType, + handlerBaseName, + handle + ); + }, + + /** + * Listens to window scroll and resize events. We cache scroll values so that + * application code can access them without triggering reflows. + * + * NOTE: Scroll events do not bubble. + * + * @see http://www.quirksmode.org/dom/events/scroll.html + */ + ensureScrollValueMonitoring: function() { + if (!isMonitoringScrollValue) { + var refresh = ViewportMetrics.refreshScrollValues; + ReactBrowserEventEmitter.ReactEventListener.monitorScrollValue(refresh); + isMonitoringScrollValue = true; + } + }, + + eventNameDispatchConfigs: EventPluginHub.eventNameDispatchConfigs, + + registrationNameModules: EventPluginHub.registrationNameModules, + + putListener: EventPluginHub.putListener, + + getListener: EventPluginHub.getListener, + + deleteListener: EventPluginHub.deleteListener, + + deleteAllListeners: EventPluginHub.deleteAllListeners + +}); + +module.exports = ReactBrowserEventEmitter; + +},{"104":104,"136":136,"15":15,"17":17,"18":18,"27":27,"61":61}],31:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactChildReconciler + * @typechecks static-only + */ + +'use strict'; + +var ReactReconciler = _dereq_(81); + +var flattenChildren = _dereq_(118); +var instantiateReactComponent = _dereq_(134); +var shouldUpdateReactComponent = _dereq_(151); + +/** + * ReactChildReconciler provides helpers for initializing or updating a set of + * children. Its output is suitable for passing it onto ReactMultiChild which + * does diffed reordering and insertion. + */ +var ReactChildReconciler = { + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildNodes Nested child maps. + * @return {?object} A set of child instances. + * @internal + */ + instantiateChildren: function(nestedChildNodes, transaction, context) { + var children = flattenChildren(nestedChildNodes); + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + // The rendered children must be turned into instances as they're + // mounted. + var childInstance = instantiateReactComponent(child, null); + children[name] = childInstance; + } + } + return children; + }, + + /** + * Updates the rendered children and returns a new set of children. + * + * @param {?object} prevChildren Previously initialized set of children. + * @param {?object} nextNestedChildNodes Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @return {?object} A new set of child instances. + * @internal + */ + updateChildren: function( + prevChildren, + nextNestedChildNodes, + transaction, + context) { + // We currently don't have a way to track moves here but if we use iterators + // instead of for..in we can zip the iterators and check if an item has + // moved. + // TODO: If nothing has changed, return the prevChildren object so that we + // can quickly bailout if nothing has changed. + var nextChildren = flattenChildren(nextNestedChildNodes); + if (!nextChildren && !prevChildren) { + return null; + } + var name; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var prevElement = prevChild && prevChild._currentElement; + var nextElement = nextChildren[name]; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + ReactReconciler.receiveComponent( + prevChild, nextElement, transaction, context + ); + nextChildren[name] = prevChild; + } else { + if (prevChild) { + ReactReconciler.unmountComponent(prevChild, name); + } + // The child must be instantiated before it's mounted. + var nextChildInstance = instantiateReactComponent( + nextElement, + null + ); + nextChildren[name] = nextChildInstance; + } + } + // Unmount children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && + !(nextChildren && nextChildren.hasOwnProperty(name))) { + ReactReconciler.unmountComponent(prevChildren[name]); + } + } + return nextChildren; + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @param {?object} renderedChildren Previously initialized set of children. + * @internal + */ + unmountChildren: function(renderedChildren) { + for (var name in renderedChildren) { + var renderedChild = renderedChildren[name]; + ReactReconciler.unmountComponent(renderedChild); + } + } + +}; + +module.exports = ReactChildReconciler; + +},{"118":118,"134":134,"151":151,"81":81}],32:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactChildren + */ + +'use strict'; + +var PooledClass = _dereq_(28); +var ReactFragment = _dereq_(63); + +var traverseAllChildren = _dereq_(153); +var warning = _dereq_(154); + +var twoArgumentPooler = PooledClass.twoArgumentPooler; +var threeArgumentPooler = PooledClass.threeArgumentPooler; + +/** + * PooledClass representing the bookkeeping associated with performing a child + * traversal. Allows avoiding binding callbacks. + * + * @constructor ForEachBookKeeping + * @param {!function} forEachFunction Function to perform traversal with. + * @param {?*} forEachContext Context to perform context with. + */ +function ForEachBookKeeping(forEachFunction, forEachContext) { + this.forEachFunction = forEachFunction; + this.forEachContext = forEachContext; +} +PooledClass.addPoolingTo(ForEachBookKeeping, twoArgumentPooler); + +function forEachSingleChild(traverseContext, child, name, i) { + var forEachBookKeeping = traverseContext; + forEachBookKeeping.forEachFunction.call( + forEachBookKeeping.forEachContext, child, i); +} + +/** + * Iterates through children that are typically specified as `props.children`. + * + * The provided forEachFunc(child, index) will be called for each + * leaf child. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} forEachFunc. + * @param {*} forEachContext Context for forEachContext. + */ +function forEachChildren(children, forEachFunc, forEachContext) { + if (children == null) { + return children; + } + + var traverseContext = + ForEachBookKeeping.getPooled(forEachFunc, forEachContext); + traverseAllChildren(children, forEachSingleChild, traverseContext); + ForEachBookKeeping.release(traverseContext); +} + +/** + * PooledClass representing the bookkeeping associated with performing a child + * mapping. Allows avoiding binding callbacks. + * + * @constructor MapBookKeeping + * @param {!*} mapResult Object containing the ordered map of results. + * @param {!function} mapFunction Function to perform mapping with. + * @param {?*} mapContext Context to perform mapping with. + */ +function MapBookKeeping(mapResult, mapFunction, mapContext) { + this.mapResult = mapResult; + this.mapFunction = mapFunction; + this.mapContext = mapContext; +} +PooledClass.addPoolingTo(MapBookKeeping, threeArgumentPooler); + +function mapSingleChildIntoContext(traverseContext, child, name, i) { + var mapBookKeeping = traverseContext; + var mapResult = mapBookKeeping.mapResult; + + var keyUnique = !mapResult.hasOwnProperty(name); + if ("production" !== "development") { + ("production" !== "development" ? warning( + keyUnique, + 'ReactChildren.map(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.', + name + ) : null); + } + + if (keyUnique) { + var mappedChild = + mapBookKeeping.mapFunction.call(mapBookKeeping.mapContext, child, i); + mapResult[name] = mappedChild; + } +} + +/** + * Maps children that are typically specified as `props.children`. + * + * The provided mapFunction(child, key, index) will be called for each + * leaf child. + * + * TODO: This may likely break any calls to `ReactChildren.map` that were + * previously relying on the fact that we guarded against null children. + * + * @param {?*} children Children tree container. + * @param {function(*, int)} mapFunction. + * @param {*} mapContext Context for mapFunction. + * @return {object} Object containing the ordered map of results. + */ +function mapChildren(children, func, context) { + if (children == null) { + return children; + } + + var mapResult = {}; + var traverseContext = MapBookKeeping.getPooled(mapResult, func, context); + traverseAllChildren(children, mapSingleChildIntoContext, traverseContext); + MapBookKeeping.release(traverseContext); + return ReactFragment.create(mapResult); +} + +function forEachSingleChildDummy(traverseContext, child, name, i) { + return null; +} + +/** + * Count the number of children that are typically specified as + * `props.children`. + * + * @param {?*} children Children tree container. + * @return {number} The number of children. + */ +function countChildren(children, context) { + return traverseAllChildren(children, forEachSingleChildDummy, null); +} + +var ReactChildren = { + forEach: forEachChildren, + map: mapChildren, + count: countChildren +}; + +module.exports = ReactChildren; + +},{"153":153,"154":154,"28":28,"63":63}],33:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactClass + */ + +'use strict'; + +var ReactComponent = _dereq_(34); +var ReactCurrentOwner = _dereq_(39); +var ReactElement = _dereq_(57); +var ReactErrorUtils = _dereq_(60); +var ReactInstanceMap = _dereq_(67); +var ReactLifeCycle = _dereq_(68); +var ReactPropTypeLocations = _dereq_(77); +var ReactPropTypeLocationNames = _dereq_(76); +var ReactUpdateQueue = _dereq_(86); + +var assign = _dereq_(27); +var invariant = _dereq_(135); +var keyMirror = _dereq_(140); +var keyOf = _dereq_(141); +var warning = _dereq_(154); + +var MIXINS_KEY = keyOf({mixins: null}); + +/** + * Policies that describe methods in `ReactClassInterface`. + */ +var SpecPolicy = keyMirror({ + /** + * These methods may be defined only once by the class specification or mixin. + */ + DEFINE_ONCE: null, + /** + * These methods may be defined by both the class specification and mixins. + * Subsequent definitions will be chained. These methods must return void. + */ + DEFINE_MANY: null, + /** + * These methods are overriding the base class. + */ + OVERRIDE_BASE: null, + /** + * These methods are similar to DEFINE_MANY, except we assume they return + * objects. We try to merge the keys of the return values of all the mixed in + * functions. If there is a key conflict we throw. + */ + DEFINE_MANY_MERGED: null +}); + + +var injectedMixins = []; + +/** + * Composite components are higher-level components that compose other composite + * or native components. + * + * To create a new type of `ReactClass`, pass a specification of + * your new class to `React.createClass`. The only requirement of your class + * specification is that you implement a `render` method. + * + * var MyComponent = React.createClass({ + * render: function() { + * return <div>Hello World</div>; + * } + * }); + * + * The class specification supports a specific protocol of methods that have + * special meaning (e.g. `render`). See `ReactClassInterface` for + * more the comprehensive protocol. Any other properties and methods in the + * class specification will available on the prototype. + * + * @interface ReactClassInterface + * @internal + */ +var ReactClassInterface = { + + /** + * An array of Mixin objects to include when defining your component. + * + * @type {array} + * @optional + */ + mixins: SpecPolicy.DEFINE_MANY, + + /** + * An object containing properties and methods that should be defined on + * the component's constructor instead of its prototype (static methods). + * + * @type {object} + * @optional + */ + statics: SpecPolicy.DEFINE_MANY, + + /** + * Definition of prop types for this component. + * + * @type {object} + * @optional + */ + propTypes: SpecPolicy.DEFINE_MANY, + + /** + * Definition of context types for this component. + * + * @type {object} + * @optional + */ + contextTypes: SpecPolicy.DEFINE_MANY, + + /** + * Definition of context types this component sets for its children. + * + * @type {object} + * @optional + */ + childContextTypes: SpecPolicy.DEFINE_MANY, + + // ==== Definition methods ==== + + /** + * Invoked when the component is mounted. Values in the mapping will be set on + * `this.props` if that prop is not specified (i.e. using an `in` check). + * + * This method is invoked before `getInitialState` and therefore cannot rely + * on `this.state` or use `this.setState`. + * + * @return {object} + * @optional + */ + getDefaultProps: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * Invoked once before the component is mounted. The return value will be used + * as the initial value of `this.state`. + * + * getInitialState: function() { + * return { + * isOn: false, + * fooBaz: new BazFoo() + * } + * } + * + * @return {object} + * @optional + */ + getInitialState: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * @return {object} + * @optional + */ + getChildContext: SpecPolicy.DEFINE_MANY_MERGED, + + /** + * Uses props from `this.props` and state from `this.state` to render the + * structure of the component. + * + * No guarantees are made about when or how often this method is invoked, so + * it must not have side effects. + * + * render: function() { + * var name = this.props.name; + * return <div>Hello, {name}!</div>; + * } + * + * @return {ReactComponent} + * @nosideeffects + * @required + */ + render: SpecPolicy.DEFINE_ONCE, + + + + // ==== Delegate methods ==== + + /** + * Invoked when the component is initially created and about to be mounted. + * This may have side effects, but any external subscriptions or data created + * by this method must be cleaned up in `componentWillUnmount`. + * + * @optional + */ + componentWillMount: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component has been mounted and has a DOM representation. + * However, there is no guarantee that the DOM node is in the document. + * + * Use this as an opportunity to operate on the DOM when the component has + * been mounted (initialized and rendered) for the first time. + * + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidMount: SpecPolicy.DEFINE_MANY, + + /** + * Invoked before the component receives new props. + * + * Use this as an opportunity to react to a prop transition by updating the + * state using `this.setState`. Current props are accessed via `this.props`. + * + * componentWillReceiveProps: function(nextProps, nextContext) { + * this.setState({ + * likesIncreasing: nextProps.likeCount > this.props.likeCount + * }); + * } + * + * NOTE: There is no equivalent `componentWillReceiveState`. An incoming prop + * transition may cause a state change, but the opposite is not true. If you + * need it, you are probably looking for `componentWillUpdate`. + * + * @param {object} nextProps + * @optional + */ + componentWillReceiveProps: SpecPolicy.DEFINE_MANY, + + /** + * Invoked while deciding if the component should be updated as a result of + * receiving new props, state and/or context. + * + * Use this as an opportunity to `return false` when you're certain that the + * transition to the new props/state/context will not require a component + * update. + * + * shouldComponentUpdate: function(nextProps, nextState, nextContext) { + * return !equal(nextProps, this.props) || + * !equal(nextState, this.state) || + * !equal(nextContext, this.context); + * } + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @return {boolean} True if the component should update. + * @optional + */ + shouldComponentUpdate: SpecPolicy.DEFINE_ONCE, + + /** + * Invoked when the component is about to update due to a transition from + * `this.props`, `this.state` and `this.context` to `nextProps`, `nextState` + * and `nextContext`. + * + * Use this as an opportunity to perform preparation before an update occurs. + * + * NOTE: You **cannot** use `this.setState()` in this method. + * + * @param {object} nextProps + * @param {?object} nextState + * @param {?object} nextContext + * @param {ReactReconcileTransaction} transaction + * @optional + */ + componentWillUpdate: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component's DOM representation has been updated. + * + * Use this as an opportunity to operate on the DOM when the component has + * been updated. + * + * @param {object} prevProps + * @param {?object} prevState + * @param {?object} prevContext + * @param {DOMElement} rootNode DOM element representing the component. + * @optional + */ + componentDidUpdate: SpecPolicy.DEFINE_MANY, + + /** + * Invoked when the component is about to be removed from its parent and have + * its DOM representation destroyed. + * + * Use this as an opportunity to deallocate any external resources. + * + * NOTE: There is no `componentDidUnmount` since your component will have been + * destroyed by that point. + * + * @optional + */ + componentWillUnmount: SpecPolicy.DEFINE_MANY, + + + + // ==== Advanced methods ==== + + /** + * Updates the component's currently mounted DOM representation. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @internal + * @overridable + */ + updateComponent: SpecPolicy.OVERRIDE_BASE + +}; + +/** + * Mapping from class specification keys to special processing functions. + * + * Although these are declared like instance properties in the specification + * when defining classes using `React.createClass`, they are actually static + * and are accessible on the constructor instead of the prototype. Despite + * being static, they must be defined outside of the "statics" key under + * which all other static methods are defined. + */ +var RESERVED_SPEC_KEYS = { + displayName: function(Constructor, displayName) { + Constructor.displayName = displayName; + }, + mixins: function(Constructor, mixins) { + if (mixins) { + for (var i = 0; i < mixins.length; i++) { + mixSpecIntoComponent(Constructor, mixins[i]); + } + } + }, + childContextTypes: function(Constructor, childContextTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + childContextTypes, + ReactPropTypeLocations.childContext + ); + } + Constructor.childContextTypes = assign( + {}, + Constructor.childContextTypes, + childContextTypes + ); + }, + contextTypes: function(Constructor, contextTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + contextTypes, + ReactPropTypeLocations.context + ); + } + Constructor.contextTypes = assign( + {}, + Constructor.contextTypes, + contextTypes + ); + }, + /** + * Special case getDefaultProps which should move into statics but requires + * automatic merging. + */ + getDefaultProps: function(Constructor, getDefaultProps) { + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps = createMergedResultFunction( + Constructor.getDefaultProps, + getDefaultProps + ); + } else { + Constructor.getDefaultProps = getDefaultProps; + } + }, + propTypes: function(Constructor, propTypes) { + if ("production" !== "development") { + validateTypeDef( + Constructor, + propTypes, + ReactPropTypeLocations.prop + ); + } + Constructor.propTypes = assign( + {}, + Constructor.propTypes, + propTypes + ); + }, + statics: function(Constructor, statics) { + mixStaticSpecIntoComponent(Constructor, statics); + } +}; + +function validateTypeDef(Constructor, typeDef, location) { + for (var propName in typeDef) { + if (typeDef.hasOwnProperty(propName)) { + // use a warning instead of an invariant so components + // don't show up in prod but not in __DEV__ + ("production" !== "development" ? warning( + typeof typeDef[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + Constructor.displayName || 'ReactClass', + ReactPropTypeLocationNames[location], + propName + ) : null); + } + } +} + +function validateMethodOverride(proto, name) { + var specPolicy = ReactClassInterface.hasOwnProperty(name) ? + ReactClassInterface[name] : + null; + + // Disallow overriding of base class methods unless explicitly allowed. + if (ReactClassMixin.hasOwnProperty(name)) { + ("production" !== "development" ? invariant( + specPolicy === SpecPolicy.OVERRIDE_BASE, + 'ReactClassInterface: You are attempting to override ' + + '`%s` from your class specification. Ensure that your method names ' + + 'do not overlap with React methods.', + name + ) : invariant(specPolicy === SpecPolicy.OVERRIDE_BASE)); + } + + // Disallow defining methods more than once unless explicitly allowed. + if (proto.hasOwnProperty(name)) { + ("production" !== "development" ? invariant( + specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED, + 'ReactClassInterface: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be due ' + + 'to a mixin.', + name + ) : invariant(specPolicy === SpecPolicy.DEFINE_MANY || + specPolicy === SpecPolicy.DEFINE_MANY_MERGED)); + } +} + +/** + * Mixin helper which handles policy validation and reserved + * specification keys when building React classses. + */ +function mixSpecIntoComponent(Constructor, spec) { + if (!spec) { + return; + } + + ("production" !== "development" ? invariant( + typeof spec !== 'function', + 'ReactClass: You\'re attempting to ' + + 'use a component class as a mixin. Instead, just use a regular object.' + ) : invariant(typeof spec !== 'function')); + ("production" !== "development" ? invariant( + !ReactElement.isValidElement(spec), + 'ReactClass: You\'re attempting to ' + + 'use a component as a mixin. Instead, just use a regular object.' + ) : invariant(!ReactElement.isValidElement(spec))); + + var proto = Constructor.prototype; + + // By handling mixins before any other properties, we ensure the same + // chaining order is applied to methods with DEFINE_MANY policy, whether + // mixins are listed before or after these methods in the spec. + if (spec.hasOwnProperty(MIXINS_KEY)) { + RESERVED_SPEC_KEYS.mixins(Constructor, spec.mixins); + } + + for (var name in spec) { + if (!spec.hasOwnProperty(name)) { + continue; + } + + if (name === MIXINS_KEY) { + // We have already handled mixins in a special case above + continue; + } + + var property = spec[name]; + validateMethodOverride(proto, name); + + if (RESERVED_SPEC_KEYS.hasOwnProperty(name)) { + RESERVED_SPEC_KEYS[name](Constructor, property); + } else { + // Setup methods on prototype: + // The following member methods should not be automatically bound: + // 1. Expected ReactClass methods (in the "interface"). + // 2. Overridden methods (that were mixed in). + var isReactClassMethod = + ReactClassInterface.hasOwnProperty(name); + var isAlreadyDefined = proto.hasOwnProperty(name); + var markedDontBind = property && property.__reactDontBind; + var isFunction = typeof property === 'function'; + var shouldAutoBind = + isFunction && + !isReactClassMethod && + !isAlreadyDefined && + !markedDontBind; + + if (shouldAutoBind) { + if (!proto.__reactAutoBindMap) { + proto.__reactAutoBindMap = {}; + } + proto.__reactAutoBindMap[name] = property; + proto[name] = property; + } else { + if (isAlreadyDefined) { + var specPolicy = ReactClassInterface[name]; + + // These cases should already be caught by validateMethodOverride + ("production" !== "development" ? invariant( + isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ), + 'ReactClass: Unexpected spec policy %s for key %s ' + + 'when mixing in component specs.', + specPolicy, + name + ) : invariant(isReactClassMethod && ( + (specPolicy === SpecPolicy.DEFINE_MANY_MERGED || specPolicy === SpecPolicy.DEFINE_MANY) + ))); + + // For methods which are defined more than once, call the existing + // methods before calling the new property, merging if appropriate. + if (specPolicy === SpecPolicy.DEFINE_MANY_MERGED) { + proto[name] = createMergedResultFunction(proto[name], property); + } else if (specPolicy === SpecPolicy.DEFINE_MANY) { + proto[name] = createChainedFunction(proto[name], property); + } + } else { + proto[name] = property; + if ("production" !== "development") { + // Add verbose displayName to the function, which helps when looking + // at profiling tools. + if (typeof property === 'function' && spec.displayName) { + proto[name].displayName = spec.displayName + '_' + name; + } + } + } + } + } + } +} + +function mixStaticSpecIntoComponent(Constructor, statics) { + if (!statics) { + return; + } + for (var name in statics) { + var property = statics[name]; + if (!statics.hasOwnProperty(name)) { + continue; + } + + var isReserved = name in RESERVED_SPEC_KEYS; + ("production" !== "development" ? invariant( + !isReserved, + 'ReactClass: You are attempting to define a reserved ' + + 'property, `%s`, that shouldn\'t be on the "statics" key. Define it ' + + 'as an instance property instead; it will still be accessible on the ' + + 'constructor.', + name + ) : invariant(!isReserved)); + + var isInherited = name in Constructor; + ("production" !== "development" ? invariant( + !isInherited, + 'ReactClass: You are attempting to define ' + + '`%s` on your component more than once. This conflict may be ' + + 'due to a mixin.', + name + ) : invariant(!isInherited)); + Constructor[name] = property; + } +} + +/** + * Merge two objects, but throw if both contain the same key. + * + * @param {object} one The first object, which is mutated. + * @param {object} two The second object + * @return {object} one after it has been mutated to contain everything in two. + */ +function mergeIntoWithNoDuplicateKeys(one, two) { + ("production" !== "development" ? invariant( + one && two && typeof one === 'object' && typeof two === 'object', + 'mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.' + ) : invariant(one && two && typeof one === 'object' && typeof two === 'object')); + + for (var key in two) { + if (two.hasOwnProperty(key)) { + ("production" !== "development" ? invariant( + one[key] === undefined, + 'mergeIntoWithNoDuplicateKeys(): ' + + 'Tried to merge two objects with the same key: `%s`. This conflict ' + + 'may be due to a mixin; in particular, this may be caused by two ' + + 'getInitialState() or getDefaultProps() methods returning objects ' + + 'with clashing keys.', + key + ) : invariant(one[key] === undefined)); + one[key] = two[key]; + } + } + return one; +} + +/** + * Creates a function that invokes two functions and merges their return values. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createMergedResultFunction(one, two) { + return function mergedResult() { + var a = one.apply(this, arguments); + var b = two.apply(this, arguments); + if (a == null) { + return b; + } else if (b == null) { + return a; + } + var c = {}; + mergeIntoWithNoDuplicateKeys(c, a); + mergeIntoWithNoDuplicateKeys(c, b); + return c; + }; +} + +/** + * Creates a function that invokes two functions and ignores their return vales. + * + * @param {function} one Function to invoke first. + * @param {function} two Function to invoke second. + * @return {function} Function that invokes the two argument functions. + * @private + */ +function createChainedFunction(one, two) { + return function chainedFunction() { + one.apply(this, arguments); + two.apply(this, arguments); + }; +} + +/** + * Binds a method to the component. + * + * @param {object} component Component whose method is going to be bound. + * @param {function} method Method to be bound. + * @return {function} The bound method. + */ +function bindAutoBindMethod(component, method) { + var boundMethod = method.bind(component); + if ("production" !== "development") { + boundMethod.__reactBoundContext = component; + boundMethod.__reactBoundMethod = method; + boundMethod.__reactBoundArguments = null; + var componentName = component.constructor.displayName; + var _bind = boundMethod.bind; + /* eslint-disable block-scoped-var, no-undef */ + boundMethod.bind = function(newThis ) {for (var args=[],$__0=1,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + // User is trying to bind() an autobound method; we effectively will + // ignore the value of "this" that the user is trying to use, so + // let's warn. + if (newThis !== component && newThis !== null) { + ("production" !== "development" ? warning( + false, + 'bind(): React component methods may only be bound to the ' + + 'component instance. See %s', + componentName + ) : null); + } else if (!args.length) { + ("production" !== "development" ? warning( + false, + 'bind(): You are binding a component method to the component. ' + + 'React does this for you automatically in a high-performance ' + + 'way, so you can safely remove this call. See %s', + componentName + ) : null); + return boundMethod; + } + var reboundMethod = _bind.apply(boundMethod, arguments); + reboundMethod.__reactBoundContext = component; + reboundMethod.__reactBoundMethod = method; + reboundMethod.__reactBoundArguments = args; + return reboundMethod; + /* eslint-enable */ + }; + } + return boundMethod; +} + +/** + * Binds all auto-bound methods in a component. + * + * @param {object} component Component whose method is going to be bound. + */ +function bindAutoBindMethods(component) { + for (var autoBindKey in component.__reactAutoBindMap) { + if (component.__reactAutoBindMap.hasOwnProperty(autoBindKey)) { + var method = component.__reactAutoBindMap[autoBindKey]; + component[autoBindKey] = bindAutoBindMethod( + component, + ReactErrorUtils.guard( + method, + component.constructor.displayName + '.' + autoBindKey + ) + ); + } + } +} + +var typeDeprecationDescriptor = { + enumerable: false, + get: function() { + var displayName = this.displayName || this.name || 'Component'; + ("production" !== "development" ? warning( + false, + '%s.type is deprecated. Use %s directly to access the class.', + displayName, + displayName + ) : null); + Object.defineProperty(this, 'type', { + value: this + }); + return this; + } +}; + +/** + * Add more to the ReactClass base class. These are all legacy features and + * therefore not already part of the modern ReactComponent. + */ +var ReactClassMixin = { + + /** + * TODO: This will be deprecated because state should always keep a consistent + * type signature and the only use case for this, is to avoid that. + */ + replaceState: function(newState, callback) { + ReactUpdateQueue.enqueueReplaceState(this, newState); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + }, + + /** + * Checks whether or not this composite component is mounted. + * @return {boolean} True if mounted, false otherwise. + * @protected + * @final + */ + isMounted: function() { + if ("production" !== "development") { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + ("production" !== "development" ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing isMounted inside its render() function. ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); + owner._warnedAboutRefsInRender = true; + } + } + var internalInstance = ReactInstanceMap.get(this); + return ( + internalInstance && + internalInstance !== ReactLifeCycle.currentlyMountingInstance + ); + }, + + /** + * Sets a subset of the props. + * + * @param {object} partialProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @public + * @deprecated + */ + setProps: function(partialProps, callback) { + ReactUpdateQueue.enqueueSetProps(this, partialProps); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + }, + + /** + * Replace all the props. + * + * @param {object} newProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @public + * @deprecated + */ + replaceProps: function(newProps, callback) { + ReactUpdateQueue.enqueueReplaceProps(this, newProps); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } + } +}; + +var ReactClassComponent = function() {}; +assign( + ReactClassComponent.prototype, + ReactComponent.prototype, + ReactClassMixin +); + +/** + * Module for creating composite components. + * + * @class ReactClass + */ +var ReactClass = { + + /** + * Creates a composite component class given a class specification. + * + * @param {object} spec Class specification (which must define `render`). + * @return {function} Component constructor function. + * @public + */ + createClass: function(spec) { + var Constructor = function(props, context) { + // This constructor is overridden by mocks. The argument is used + // by mocks to assert on what gets mounted. + + if ("production" !== "development") { + ("production" !== "development" ? warning( + this instanceof Constructor, + 'Something is calling a React component directly. Use a factory or ' + + 'JSX instead. See: http://fb.me/react-legacyfactory' + ) : null); + } + + // Wire up auto-binding + if (this.__reactAutoBindMap) { + bindAutoBindMethods(this); + } + + this.props = props; + this.context = context; + this.state = null; + + // ReactClasses doesn't have constructors. Instead, they use the + // getInitialState and componentWillMount methods for initialization. + + var initialState = this.getInitialState ? this.getInitialState() : null; + if ("production" !== "development") { + // We allow auto-mocks to proceed as if they're returning null. + if (typeof initialState === 'undefined' && + this.getInitialState._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + initialState = null; + } + } + ("production" !== "development" ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.getInitialState(): must return an object or null', + Constructor.displayName || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + + this.state = initialState; + }; + Constructor.prototype = new ReactClassComponent(); + Constructor.prototype.constructor = Constructor; + + injectedMixins.forEach( + mixSpecIntoComponent.bind(null, Constructor) + ); + + mixSpecIntoComponent(Constructor, spec); + + // Initialize the defaultProps property after all mixins have been merged + if (Constructor.getDefaultProps) { + Constructor.defaultProps = Constructor.getDefaultProps(); + } + + if ("production" !== "development") { + // This is a tag to indicate that the use of these method names is ok, + // since it's used with createClass. If it's not, then it's likely a + // mistake so we'll warn you to use the static property, property + // initializer or constructor respectively. + if (Constructor.getDefaultProps) { + Constructor.getDefaultProps.isReactClassApproved = {}; + } + if (Constructor.prototype.getInitialState) { + Constructor.prototype.getInitialState.isReactClassApproved = {}; + } + } + + ("production" !== "development" ? invariant( + Constructor.prototype.render, + 'createClass(...): Class specification must implement a `render` method.' + ) : invariant(Constructor.prototype.render)); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + !Constructor.prototype.componentShouldUpdate, + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + spec.displayName || 'A component' + ) : null); + } + + // Reduce time spent doing lookups by setting these on the prototype. + for (var methodName in ReactClassInterface) { + if (!Constructor.prototype[methodName]) { + Constructor.prototype[methodName] = null; + } + } + + // Legacy hook + Constructor.type = Constructor; + if ("production" !== "development") { + try { + Object.defineProperty(Constructor, 'type', typeDeprecationDescriptor); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + } + + return Constructor; + }, + + injection: { + injectMixin: function(mixin) { + injectedMixins.push(mixin); + } + } + +}; + +module.exports = ReactClass; + +},{"135":135,"140":140,"141":141,"154":154,"27":27,"34":34,"39":39,"57":57,"60":60,"67":67,"68":68,"76":76,"77":77,"86":86}],34:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponent + */ + +'use strict'; + +var ReactUpdateQueue = _dereq_(86); + +var invariant = _dereq_(135); +var warning = _dereq_(154); + +/** + * Base class helpers for the updating state of a component. + */ +function ReactComponent(props, context) { + this.props = props; + this.context = context; +} + +/** + * Sets a subset of the state. Always use this to mutate + * state. You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * There is no guarantee that calls to `setState` will run synchronously, + * as they may eventually be batched together. You can provide an optional + * callback that will be executed when the call to setState is actually + * completed. + * + * When a function is provided to setState, it will be called at some point in + * the future (not synchronously). It will be called with the up to date + * component arguments (state, props, context). These values can be different + * from this.* because your function may be called after receiveProps but before + * shouldComponentUpdate, and this new state, props, and context will not yet be + * assigned to this. + * + * @param {object|function} partialState Next partial state or function to + * produce next partial state to be merged with current state. + * @param {?function} callback Called after state is updated. + * @final + * @protected + */ +ReactComponent.prototype.setState = function(partialState, callback) { + ("production" !== "development" ? invariant( + typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null, + 'setState(...): takes an object of state variables to update or a ' + + 'function which returns an object of state variables.' + ) : invariant(typeof partialState === 'object' || + typeof partialState === 'function' || + partialState == null)); + if ("production" !== "development") { + ("production" !== "development" ? warning( + partialState != null, + 'setState(...): You passed an undefined or null state object; ' + + 'instead, use forceUpdate().' + ) : null); + } + ReactUpdateQueue.enqueueSetState(this, partialState); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } +}; + +/** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldComponentUpdate`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {?function} callback Called after update is complete. + * @final + * @protected + */ +ReactComponent.prototype.forceUpdate = function(callback) { + ReactUpdateQueue.enqueueForceUpdate(this); + if (callback) { + ReactUpdateQueue.enqueueCallback(this, callback); + } +}; + +/** + * Deprecated APIs. These APIs used to exist on classic React classes but since + * we would like to deprecate them, we're not going to move them over to this + * modern base class. Instead, we define a getter that warns if it's accessed. + */ +if ("production" !== "development") { + var deprecatedAPIs = { + getDOMNode: 'getDOMNode', + isMounted: 'isMounted', + replaceProps: 'replaceProps', + replaceState: 'replaceState', + setProps: 'setProps' + }; + var defineDeprecationWarning = function(methodName, displayName) { + try { + Object.defineProperty(ReactComponent.prototype, methodName, { + get: function() { + ("production" !== "development" ? warning( + false, + '%s(...) is deprecated in plain JavaScript React classes.', + displayName + ) : null); + return undefined; + } + }); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + }; + for (var fnName in deprecatedAPIs) { + if (deprecatedAPIs.hasOwnProperty(fnName)) { + defineDeprecationWarning(fnName, deprecatedAPIs[fnName]); + } + } +} + +module.exports = ReactComponent; + +},{"135":135,"154":154,"86":86}],35:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentBrowserEnvironment + */ + +/*jslint evil: true */ + +'use strict'; + +var ReactDOMIDOperations = _dereq_(44); +var ReactMount = _dereq_(70); + +/** + * Abstracts away all functionality of the reconciler that requires knowledge of + * the browser context. TODO: These callers should be refactored to avoid the + * need for this injection. + */ +var ReactComponentBrowserEnvironment = { + + processChildrenUpdates: + ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, + + replaceNodeWithMarkupByID: + ReactDOMIDOperations.dangerouslyReplaceNodeWithMarkupByID, + + /** + * If a particular environment requires that some resources be cleaned up, + * specify this in the injected Mixin. In the DOM, we would likely want to + * purge any cached node ID lookups. + * + * @private + */ + unmountIDFromEnvironment: function(rootNodeID) { + ReactMount.purgeID(rootNodeID); + } + +}; + +module.exports = ReactComponentBrowserEnvironment; + +},{"44":44,"70":70}],36:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentEnvironment + */ + +'use strict'; + +var invariant = _dereq_(135); + +var injected = false; + +var ReactComponentEnvironment = { + + /** + * Optionally injectable environment dependent cleanup hook. (server vs. + * browser etc). Example: A browser system caches DOM nodes based on component + * ID and must remove that cache entry when this instance is unmounted. + */ + unmountIDFromEnvironment: null, + + /** + * Optionally injectable hook for swapping out mount images in the middle of + * the tree. + */ + replaceNodeWithMarkupByID: null, + + /** + * Optionally injectable hook for processing a queue of child updates. Will + * later move into MultiChildComponents. + */ + processChildrenUpdates: null, + + injection: { + injectEnvironment: function(environment) { + ("production" !== "development" ? invariant( + !injected, + 'ReactCompositeComponent: injectEnvironment() can only be called once.' + ) : invariant(!injected)); + ReactComponentEnvironment.unmountIDFromEnvironment = + environment.unmountIDFromEnvironment; + ReactComponentEnvironment.replaceNodeWithMarkupByID = + environment.replaceNodeWithMarkupByID; + ReactComponentEnvironment.processChildrenUpdates = + environment.processChildrenUpdates; + injected = true; + } + } + +}; + +module.exports = ReactComponentEnvironment; + +},{"135":135}],37:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactCompositeComponent + */ + +'use strict'; + +var ReactComponentEnvironment = _dereq_(36); +var ReactContext = _dereq_(38); +var ReactCurrentOwner = _dereq_(39); +var ReactElement = _dereq_(57); +var ReactElementValidator = _dereq_(58); +var ReactInstanceMap = _dereq_(67); +var ReactLifeCycle = _dereq_(68); +var ReactNativeComponent = _dereq_(73); +var ReactPerf = _dereq_(75); +var ReactPropTypeLocations = _dereq_(77); +var ReactPropTypeLocationNames = _dereq_(76); +var ReactReconciler = _dereq_(81); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); +var emptyObject = _dereq_(115); +var invariant = _dereq_(135); +var shouldUpdateReactComponent = _dereq_(151); +var warning = _dereq_(154); + +function getDeclarationErrorAddendum(component) { + var owner = component._currentElement._owner || null; + if (owner) { + var name = owner.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * ------------------ The Life-Cycle of a Composite Component ------------------ + * + * - constructor: Initialization of state. The instance is now retained. + * - componentWillMount + * - render + * - [children's constructors] + * - [children's componentWillMount and render] + * - [children's componentDidMount] + * - componentDidMount + * + * Update Phases: + * - componentWillReceiveProps (only called if parent updated) + * - shouldComponentUpdate + * - componentWillUpdate + * - render + * - [children's constructors or receive props phases] + * - componentDidUpdate + * + * - componentWillUnmount + * - [children's componentWillUnmount] + * - [children destroyed] + * - (destroyed): The instance is now blank, released by React and ready for GC. + * + * ----------------------------------------------------------------------------- + */ + +/** + * An incrementing ID assigned to each component when it is mounted. This is + * used to enforce the order in which `ReactUpdates` updates dirty components. + * + * @private + */ +var nextMountID = 1; + +/** + * @lends {ReactCompositeComponent.prototype} + */ +var ReactCompositeComponentMixin = { + + /** + * Base constructor for all composite component. + * + * @param {ReactElement} element + * @final + * @internal + */ + construct: function(element) { + this._currentElement = element; + this._rootNodeID = null; + this._instance = null; + + // See ReactUpdateQueue + this._pendingElement = null; + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + this._renderedComponent = null; + + this._context = null; + this._mountOrder = 0; + this._isTopLevel = false; + + // See ReactUpdates and ReactUpdateQueue. + this._pendingCallbacks = null; + }, + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function(rootID, transaction, context) { + this._context = context; + this._mountOrder = nextMountID++; + this._rootNodeID = rootID; + + var publicProps = this._processProps(this._currentElement.props); + var publicContext = this._processContext(this._currentElement._context); + + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + + // Initialize the public class + var inst = new Component(publicProps, publicContext); + + if ("production" !== "development") { + // This will throw later in _renderValidatedComponent, but add an early + // warning now to help debugging + ("production" !== "development" ? warning( + inst.render != null, + '%s(...): No `render` method found on the returned component ' + + 'instance: you may have forgotten to define `render` in your ' + + 'component or you may have accidentally tried to render an element ' + + 'whose type is a function that isn\'t a React component.', + Component.displayName || Component.name || 'Component' + ) : null); + } + + // These should be set up in the constructor, but as a convenience for + // simpler class abstractions, we set them up after the fact. + inst.props = publicProps; + inst.context = publicContext; + inst.refs = emptyObject; + + this._instance = inst; + + // Store a reference from the instance back to the internal representation + ReactInstanceMap.set(inst, this); + + if ("production" !== "development") { + this._warnIfContextsDiffer(this._currentElement._context, context); + } + + if ("production" !== "development") { + // Since plain JS classes are defined without any special initialization + // logic, we can not catch common errors early. Therefore, we have to + // catch them here, at initialization time, instead. + ("production" !== "development" ? warning( + !inst.getInitialState || + inst.getInitialState.isReactClassApproved, + 'getInitialState was defined on %s, a plain JavaScript class. ' + + 'This is only supported for classes created using React.createClass. ' + + 'Did you mean to define a state property instead?', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + !inst.propTypes, + 'propTypes was defined as an instance property on %s. Use a static ' + + 'property to define propTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + !inst.contextTypes, + 'contextTypes was defined as an instance property on %s. Use a ' + + 'static property to define contextTypes instead.', + this.getName() || 'a component' + ) : null); + ("production" !== "development" ? warning( + typeof inst.componentShouldUpdate !== 'function', + '%s has a method called ' + + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + + 'The name is phrased as a question because the function is ' + + 'expected to return a value.', + (this.getName() || 'A component') + ) : null); + } + + var initialState = inst.state; + if (initialState === undefined) { + inst.state = initialState = null; + } + ("production" !== "development" ? invariant( + typeof initialState === 'object' && !Array.isArray(initialState), + '%s.state: must be set to an object or null', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof initialState === 'object' && !Array.isArray(initialState))); + + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + + var renderedElement; + + var previouslyMounting = ReactLifeCycle.currentlyMountingInstance; + ReactLifeCycle.currentlyMountingInstance = this; + try { + if (inst.componentWillMount) { + inst.componentWillMount(); + // When mounting, calls to `setState` by `componentWillMount` will set + // `this._pendingStateQueue` without triggering a re-render. + if (this._pendingStateQueue) { + inst.state = this._processPendingState(inst.props, inst.context); + } + } + + renderedElement = this._renderValidatedComponent(); + } finally { + ReactLifeCycle.currentlyMountingInstance = previouslyMounting; + } + + this._renderedComponent = this._instantiateReactComponent( + renderedElement, + this._currentElement.type // The wrapping type + ); + + var markup = ReactReconciler.mountComponent( + this._renderedComponent, + rootID, + transaction, + this._processChildContext(context) + ); + if (inst.componentDidMount) { + transaction.getReactMountReady().enqueue(inst.componentDidMount, inst); + } + + return markup; + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function() { + var inst = this._instance; + + if (inst.componentWillUnmount) { + var previouslyUnmounting = ReactLifeCycle.currentlyUnmountingInstance; + ReactLifeCycle.currentlyUnmountingInstance = this; + try { + inst.componentWillUnmount(); + } finally { + ReactLifeCycle.currentlyUnmountingInstance = previouslyUnmounting; + } + } + + ReactReconciler.unmountComponent(this._renderedComponent); + this._renderedComponent = null; + + // Reset pending fields + this._pendingStateQueue = null; + this._pendingReplaceState = false; + this._pendingForceUpdate = false; + this._pendingCallbacks = null; + this._pendingElement = null; + + // These fields do not really need to be reset since this object is no + // longer accessible. + this._context = null; + this._rootNodeID = null; + + // Delete the reference from the instance to this internal representation + // which allow the internals to be properly cleaned up even if the user + // leaks a reference to the public instance. + ReactInstanceMap.remove(inst); + + // Some existing components rely on inst.props even after they've been + // destroyed (in event handlers). + // TODO: inst.props = null; + // TODO: inst.state = null; + // TODO: inst.context = null; + }, + + /** + * Schedule a partial update to the props. Only used for internal testing. + * + * @param {object} partialProps Subset of the next props. + * @param {?function} callback Called after props are updated. + * @final + * @internal + */ + _setPropsInternal: function(partialProps, callback) { + // This is a deoptimized path. We optimize for always having an element. + // This creates an extra internal element. + var element = this._pendingElement || this._currentElement; + this._pendingElement = ReactElement.cloneAndReplaceProps( + element, + assign({}, element.props, partialProps) + ); + ReactUpdates.enqueueUpdate(this, callback); + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes` + * + * @param {object} context + * @return {?object} + * @private + */ + _maskContext: function(context) { + var maskedContext = null; + // This really should be getting the component class for the element, + // but we know that we're not going to need it for built-ins. + if (typeof this._currentElement.type === 'string') { + return emptyObject; + } + var contextTypes = this._currentElement.type.contextTypes; + if (!contextTypes) { + return emptyObject; + } + maskedContext = {}; + for (var contextName in contextTypes) { + maskedContext[contextName] = context[contextName]; + } + return maskedContext; + }, + + /** + * Filters the context object to only contain keys specified in + * `contextTypes`, and asserts that they are valid. + * + * @param {object} context + * @return {?object} + * @private + */ + _processContext: function(context) { + var maskedContext = this._maskContext(context); + if ("production" !== "development") { + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + if (Component.contextTypes) { + this._checkPropTypes( + Component.contextTypes, + maskedContext, + ReactPropTypeLocations.context + ); + } + } + return maskedContext; + }, + + /** + * @param {object} currentContext + * @return {object} + * @private + */ + _processChildContext: function(currentContext) { + var inst = this._instance; + var childContext = inst.getChildContext && inst.getChildContext(); + if (childContext) { + ("production" !== "development" ? invariant( + typeof inst.constructor.childContextTypes === 'object', + '%s.getChildContext(): childContextTypes must be defined in order to ' + + 'use getChildContext().', + this.getName() || 'ReactCompositeComponent' + ) : invariant(typeof inst.constructor.childContextTypes === 'object')); + if ("production" !== "development") { + this._checkPropTypes( + inst.constructor.childContextTypes, + childContext, + ReactPropTypeLocations.childContext + ); + } + for (var name in childContext) { + ("production" !== "development" ? invariant( + name in inst.constructor.childContextTypes, + '%s.getChildContext(): key "%s" is not defined in childContextTypes.', + this.getName() || 'ReactCompositeComponent', + name + ) : invariant(name in inst.constructor.childContextTypes)); + } + return assign({}, currentContext, childContext); + } + return currentContext; + }, + + /** + * Processes props by setting default values for unspecified props and + * asserting that the props are valid. Does not mutate its argument; returns + * a new props object with defaults merged in. + * + * @param {object} newProps + * @return {object} + * @private + */ + _processProps: function(newProps) { + if ("production" !== "development") { + var Component = ReactNativeComponent.getComponentClassForElement( + this._currentElement + ); + if (Component.propTypes) { + this._checkPropTypes( + Component.propTypes, + newProps, + ReactPropTypeLocations.prop + ); + } + } + return newProps; + }, + + /** + * Assert that the props are valid + * + * @param {object} propTypes Map of prop name to a ReactPropType + * @param {object} props + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ + _checkPropTypes: function(propTypes, props, location) { + // TODO: Stop validating prop types here and only use the element + // validation. + var componentName = this.getName(); + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error; + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + ("production" !== "development" ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually ' + + 'from React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); + error = propTypes[propName](props, propName, componentName, location); + } catch (ex) { + error = ex; + } + if (error instanceof Error) { + // We may want to extend this logic for similar errors in + // React.render calls, so I'm abstracting it away into + // a function to minimize refactoring in the future + var addendum = getDeclarationErrorAddendum(this); + + if (location === ReactPropTypeLocations.prop) { + // Preface gives us something to blacklist in warning module + ("production" !== "development" ? warning( + false, + 'Failed Composite propType: %s%s', + error.message, + addendum + ) : null); + } else { + ("production" !== "development" ? warning( + false, + 'Failed Context Types: %s%s', + error.message, + addendum + ) : null); + } + } + } + } + }, + + receiveComponent: function(nextElement, transaction, nextContext) { + var prevElement = this._currentElement; + var prevContext = this._context; + + this._pendingElement = null; + + this.updateComponent( + transaction, + prevElement, + nextElement, + prevContext, + nextContext + ); + }, + + /** + * If any of `_pendingElement`, `_pendingStateQueue`, or `_pendingForceUpdate` + * is set, update the component. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function(transaction) { + if (this._pendingElement != null) { + ReactReconciler.receiveComponent( + this, + this._pendingElement || this._currentElement, + transaction, + this._context + ); + } + + if (this._pendingStateQueue !== null || this._pendingForceUpdate) { + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps( + this._currentElement + ); + } + + this.updateComponent( + transaction, + this._currentElement, + this._currentElement, + this._context, + this._context + ); + } + }, + + /** + * Compare two contexts, warning if they are different + * TODO: Remove this check when owner-context is removed + */ + _warnIfContextsDiffer: function(ownerBasedContext, parentBasedContext) { + ownerBasedContext = this._maskContext(ownerBasedContext); + parentBasedContext = this._maskContext(parentBasedContext); + var parentKeys = Object.keys(parentBasedContext).sort(); + var displayName = this.getName() || 'ReactCompositeComponent'; + for (var i = 0; i < parentKeys.length; i++) { + var key = parentKeys[i]; + ("production" !== "development" ? warning( + ownerBasedContext[key] === parentBasedContext[key], + 'owner-based and parent-based contexts differ ' + + '(values: `%s` vs `%s`) for key (%s) while mounting %s ' + + '(see: http://fb.me/react-context-by-parent)', + ownerBasedContext[key], + parentBasedContext[key], + key, + displayName + ) : null); + } + }, + + /** + * Perform an update to a mounted component. The componentWillReceiveProps and + * shouldComponentUpdate methods are called, then (assuming the update isn't + * skipped) the remaining update lifecycle methods are called and the DOM + * representation is updated. + * + * By default, this implements React's rendering and reconciliation algorithm. + * Sophisticated clients may wish to override this. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevParentElement + * @param {ReactElement} nextParentElement + * @internal + * @overridable + */ + updateComponent: function( + transaction, + prevParentElement, + nextParentElement, + prevUnmaskedContext, + nextUnmaskedContext + ) { + var inst = this._instance; + + var nextContext = inst.context; + var nextProps = inst.props; + + // Distinguish between a props update versus a simple state update + if (prevParentElement !== nextParentElement) { + nextContext = this._processContext(nextParentElement._context); + nextProps = this._processProps(nextParentElement.props); + + if ("production" !== "development") { + if (nextUnmaskedContext != null) { + this._warnIfContextsDiffer( + nextParentElement._context, + nextUnmaskedContext + ); + } + } + + // An update here will schedule an update but immediately set + // _pendingStateQueue which will ensure that any state updates gets + // immediately reconciled instead of waiting for the next batch. + + if (inst.componentWillReceiveProps) { + inst.componentWillReceiveProps(nextProps, nextContext); + } + } + + var nextState = this._processPendingState(nextProps, nextContext); + + var shouldUpdate = + this._pendingForceUpdate || + !inst.shouldComponentUpdate || + inst.shouldComponentUpdate(nextProps, nextState, nextContext); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + typeof shouldUpdate !== 'undefined', + '%s.shouldComponentUpdate(): Returned undefined instead of a ' + + 'boolean value. Make sure to return true or false.', + this.getName() || 'ReactCompositeComponent' + ) : null); + } + + if (shouldUpdate) { + this._pendingForceUpdate = false; + // Will set `this.props`, `this.state` and `this.context`. + this._performComponentUpdate( + nextParentElement, + nextProps, + nextState, + nextContext, + transaction, + nextUnmaskedContext + ); + } else { + // If it's determined that a component should not update, we still want + // to set props and state but we shortcut the rest of the update. + this._currentElement = nextParentElement; + this._context = nextUnmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + } + }, + + _processPendingState: function(props, context) { + var inst = this._instance; + var queue = this._pendingStateQueue; + var replace = this._pendingReplaceState; + this._pendingReplaceState = false; + this._pendingStateQueue = null; + + if (!queue) { + return inst.state; + } + + var nextState = assign({}, replace ? queue[0] : inst.state); + for (var i = replace ? 1 : 0; i < queue.length; i++) { + var partial = queue[i]; + assign( + nextState, + typeof partial === 'function' ? + partial.call(inst, nextState, props, context) : + partial + ); + } + + return nextState; + }, + + /** + * Merges new props and state, notifies delegate methods of update and + * performs update. + * + * @param {ReactElement} nextElement Next element + * @param {object} nextProps Next public object to set as properties. + * @param {?object} nextState Next object to set as state. + * @param {?object} nextContext Next public object to set as context. + * @param {ReactReconcileTransaction} transaction + * @param {?object} unmaskedContext + * @private + */ + _performComponentUpdate: function( + nextElement, + nextProps, + nextState, + nextContext, + transaction, + unmaskedContext + ) { + var inst = this._instance; + + var prevProps = inst.props; + var prevState = inst.state; + var prevContext = inst.context; + + if (inst.componentWillUpdate) { + inst.componentWillUpdate(nextProps, nextState, nextContext); + } + + this._currentElement = nextElement; + this._context = unmaskedContext; + inst.props = nextProps; + inst.state = nextState; + inst.context = nextContext; + + this._updateRenderedComponent(transaction, unmaskedContext); + + if (inst.componentDidUpdate) { + transaction.getReactMountReady().enqueue( + inst.componentDidUpdate.bind(inst, prevProps, prevState, prevContext), + inst + ); + } + }, + + /** + * Call the component's `render` method and update the DOM accordingly. + * + * @param {ReactReconcileTransaction} transaction + * @internal + */ + _updateRenderedComponent: function(transaction, context) { + var prevComponentInstance = this._renderedComponent; + var prevRenderedElement = prevComponentInstance._currentElement; + var nextRenderedElement = this._renderValidatedComponent(); + if (shouldUpdateReactComponent(prevRenderedElement, nextRenderedElement)) { + ReactReconciler.receiveComponent( + prevComponentInstance, + nextRenderedElement, + transaction, + this._processChildContext(context) + ); + } else { + // These two IDs are actually the same! But nothing should rely on that. + var thisID = this._rootNodeID; + var prevComponentID = prevComponentInstance._rootNodeID; + ReactReconciler.unmountComponent(prevComponentInstance); + + this._renderedComponent = this._instantiateReactComponent( + nextRenderedElement, + this._currentElement.type + ); + var nextMarkup = ReactReconciler.mountComponent( + this._renderedComponent, + thisID, + transaction, + context + ); + this._replaceNodeWithMarkupByID(prevComponentID, nextMarkup); + } + }, + + /** + * @protected + */ + _replaceNodeWithMarkupByID: function(prevComponentID, nextMarkup) { + ReactComponentEnvironment.replaceNodeWithMarkupByID( + prevComponentID, + nextMarkup + ); + }, + + /** + * @protected + */ + _renderValidatedComponentWithoutOwnerOrContext: function() { + var inst = this._instance; + var renderedComponent = inst.render(); + if ("production" !== "development") { + // We allow auto-mocks to proceed as if they're returning null. + if (typeof renderedComponent === 'undefined' && + inst.render._isMockFunction) { + // This is probably bad practice. Consider warning here and + // deprecating this convenience. + renderedComponent = null; + } + } + + return renderedComponent; + }, + + /** + * @private + */ + _renderValidatedComponent: function() { + var renderedComponent; + var previousContext = ReactContext.current; + ReactContext.current = this._processChildContext( + this._currentElement._context + ); + ReactCurrentOwner.current = this; + try { + renderedComponent = + this._renderValidatedComponentWithoutOwnerOrContext(); + } finally { + ReactContext.current = previousContext; + ReactCurrentOwner.current = null; + } + ("production" !== "development" ? invariant( + // TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent), + '%s.render(): A valid ReactComponent must be returned. You may have ' + + 'returned undefined, an array or some other invalid object.', + this.getName() || 'ReactCompositeComponent' + ) : invariant(// TODO: An `isValidNode` function would probably be more appropriate + renderedComponent === null || renderedComponent === false || + ReactElement.isValidElement(renderedComponent))); + return renderedComponent; + }, + + /** + * Lazily allocates the refs object and stores `component` as `ref`. + * + * @param {string} ref Reference name. + * @param {component} component Component to store as `ref`. + * @final + * @private + */ + attachRef: function(ref, component) { + var inst = this.getPublicInstance(); + var refs = inst.refs === emptyObject ? (inst.refs = {}) : inst.refs; + refs[ref] = component.getPublicInstance(); + }, + + /** + * Detaches a reference name. + * + * @param {string} ref Name to dereference. + * @final + * @private + */ + detachRef: function(ref) { + var refs = this.getPublicInstance().refs; + delete refs[ref]; + }, + + /** + * Get a text description of the component that can be used to identify it + * in error messages. + * @return {string} The name or null. + * @internal + */ + getName: function() { + var type = this._currentElement.type; + var constructor = this._instance && this._instance.constructor; + return ( + type.displayName || (constructor && constructor.displayName) || + type.name || (constructor && constructor.name) || + null + ); + }, + + /** + * Get the publicly accessible representation of this component - i.e. what + * is exposed by refs and returned by React.render. Can be null for stateless + * components. + * + * @return {ReactComponent} the public component instance. + * @internal + */ + getPublicInstance: function() { + return this._instance; + }, + + // Stub + _instantiateReactComponent: null + +}; + +ReactPerf.measureMethods( + ReactCompositeComponentMixin, + 'ReactCompositeComponent', + { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent', + _renderValidatedComponent: '_renderValidatedComponent' + } +); + +var ReactCompositeComponent = { + + Mixin: ReactCompositeComponentMixin + +}; + +module.exports = ReactCompositeComponent; + +},{"115":115,"135":135,"151":151,"154":154,"27":27,"36":36,"38":38,"39":39,"57":57,"58":58,"67":67,"68":68,"73":73,"75":75,"76":76,"77":77,"81":81,"87":87}],38:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactContext + */ + +'use strict'; + +var assign = _dereq_(27); +var emptyObject = _dereq_(115); +var warning = _dereq_(154); + +var didWarn = false; + +/** + * Keeps track of the current context. + * + * The context is automatically passed down the component ownership hierarchy + * and is accessible via `this.context` on ReactCompositeComponents. + */ +var ReactContext = { + + /** + * @internal + * @type {object} + */ + current: emptyObject, + + /** + * Temporarily extends the current context while executing scopedCallback. + * + * A typical use case might look like + * + * render: function() { + * var children = ReactContext.withContext({foo: 'foo'}, () => ( + * + * )); + * return <div>{children}</div>; + * } + * + * @param {object} newContext New context to merge into the existing context + * @param {function} scopedCallback Callback to run with the new context + * @return {ReactComponent|array<ReactComponent>} + */ + withContext: function(newContext, scopedCallback) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + didWarn, + 'withContext is deprecated and will be removed in a future version. ' + + 'Use a wrapper component with getChildContext instead.' + ) : null); + + didWarn = true; + } + + var result; + var previousContext = ReactContext.current; + ReactContext.current = assign({}, previousContext, newContext); + try { + result = scopedCallback(); + } finally { + ReactContext.current = previousContext; + } + return result; + } + +}; + +module.exports = ReactContext; + +},{"115":115,"154":154,"27":27}],39:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactCurrentOwner + */ + +'use strict'; + +/** + * Keeps track of the current owner. + * + * The current owner is the component who should own any components that are + * currently being constructed. + * + * The depth indicate how many composite components are above this render level. + */ +var ReactCurrentOwner = { + + /** + * @internal + * @type {ReactComponent} + */ + current: null + +}; + +module.exports = ReactCurrentOwner; + +},{}],40:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOM + * @typechecks static-only + */ + +'use strict'; + +var ReactElement = _dereq_(57); +var ReactElementValidator = _dereq_(58); + +var mapObject = _dereq_(142); + +/** + * Create a factory that creates HTML tag elements. + * + * @param {string} tag Tag name (e.g. `div`). + * @private + */ +function createDOMFactory(tag) { + if ("production" !== "development") { + return ReactElementValidator.createFactory(tag); + } + return ReactElement.createFactory(tag); +} + +/** + * Creates a mapping from supported HTML tags to `ReactDOMComponent` classes. + * This is also accessible via `React.DOM`. + * + * @public + */ +var ReactDOM = mapObject({ + a: 'a', + abbr: 'abbr', + address: 'address', + area: 'area', + article: 'article', + aside: 'aside', + audio: 'audio', + b: 'b', + base: 'base', + bdi: 'bdi', + bdo: 'bdo', + big: 'big', + blockquote: 'blockquote', + body: 'body', + br: 'br', + button: 'button', + canvas: 'canvas', + caption: 'caption', + cite: 'cite', + code: 'code', + col: 'col', + colgroup: 'colgroup', + data: 'data', + datalist: 'datalist', + dd: 'dd', + del: 'del', + details: 'details', + dfn: 'dfn', + dialog: 'dialog', + div: 'div', + dl: 'dl', + dt: 'dt', + em: 'em', + embed: 'embed', + fieldset: 'fieldset', + figcaption: 'figcaption', + figure: 'figure', + footer: 'footer', + form: 'form', + h1: 'h1', + h2: 'h2', + h3: 'h3', + h4: 'h4', + h5: 'h5', + h6: 'h6', + head: 'head', + header: 'header', + hr: 'hr', + html: 'html', + i: 'i', + iframe: 'iframe', + img: 'img', + input: 'input', + ins: 'ins', + kbd: 'kbd', + keygen: 'keygen', + label: 'label', + legend: 'legend', + li: 'li', + link: 'link', + main: 'main', + map: 'map', + mark: 'mark', + menu: 'menu', + menuitem: 'menuitem', + meta: 'meta', + meter: 'meter', + nav: 'nav', + noscript: 'noscript', + object: 'object', + ol: 'ol', + optgroup: 'optgroup', + option: 'option', + output: 'output', + p: 'p', + param: 'param', + picture: 'picture', + pre: 'pre', + progress: 'progress', + q: 'q', + rp: 'rp', + rt: 'rt', + ruby: 'ruby', + s: 's', + samp: 'samp', + script: 'script', + section: 'section', + select: 'select', + small: 'small', + source: 'source', + span: 'span', + strong: 'strong', + style: 'style', + sub: 'sub', + summary: 'summary', + sup: 'sup', + table: 'table', + tbody: 'tbody', + td: 'td', + textarea: 'textarea', + tfoot: 'tfoot', + th: 'th', + thead: 'thead', + time: 'time', + title: 'title', + tr: 'tr', + track: 'track', + u: 'u', + ul: 'ul', + 'var': 'var', + video: 'video', + wbr: 'wbr', + + // SVG + circle: 'circle', + defs: 'defs', + ellipse: 'ellipse', + g: 'g', + line: 'line', + linearGradient: 'linearGradient', + mask: 'mask', + path: 'path', + pattern: 'pattern', + polygon: 'polygon', + polyline: 'polyline', + radialGradient: 'radialGradient', + rect: 'rect', + stop: 'stop', + svg: 'svg', + text: 'text', + tspan: 'tspan' + +}, createDOMFactory); + +module.exports = ReactDOM; + +},{"142":142,"57":57,"58":58}],41:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMButton + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var keyMirror = _dereq_(140); + +var button = ReactElement.createFactory('button'); + +var mouseListenerNames = keyMirror({ + onClick: true, + onDoubleClick: true, + onMouseDown: true, + onMouseMove: true, + onMouseUp: true, + onClickCapture: true, + onDoubleClickCapture: true, + onMouseDownCapture: true, + onMouseMoveCapture: true, + onMouseUpCapture: true +}); + +/** + * Implements a <button> native component that does not receive mouse events + * when `disabled` is set. + */ +var ReactDOMButton = ReactClass.createClass({ + displayName: 'ReactDOMButton', + tagName: 'BUTTON', + + mixins: [AutoFocusMixin, ReactBrowserComponentMixin], + + render: function() { + var props = {}; + + // Copy the props; except the mouse listeners if we're disabled + for (var key in this.props) { + if (this.props.hasOwnProperty(key) && + (!this.props.disabled || !mouseListenerNames[key])) { + props[key] = this.props[key]; + } + } + + return button(props, this.props.children); + } + +}); + +module.exports = ReactDOMButton; + +},{"140":140,"2":2,"29":29,"33":33,"57":57}],42:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMComponent + * @typechecks static-only + */ + +/* global hasOwnProperty:true */ + +'use strict'; + +var CSSPropertyOperations = _dereq_(5); +var DOMProperty = _dereq_(10); +var DOMPropertyOperations = _dereq_(11); +var ReactBrowserEventEmitter = _dereq_(30); +var ReactComponentBrowserEnvironment = + _dereq_(35); +var ReactMount = _dereq_(70); +var ReactMultiChild = _dereq_(71); +var ReactPerf = _dereq_(75); + +var assign = _dereq_(27); +var escapeTextContentForBrowser = _dereq_(116); +var invariant = _dereq_(135); +var isEventSupported = _dereq_(136); +var keyOf = _dereq_(141); +var warning = _dereq_(154); + +var deleteListener = ReactBrowserEventEmitter.deleteListener; +var listenTo = ReactBrowserEventEmitter.listenTo; +var registrationNameModules = ReactBrowserEventEmitter.registrationNameModules; + +// For quickly matching children type, to test if can be treated as content. +var CONTENT_TYPES = {'string': true, 'number': true}; + +var STYLE = keyOf({style: null}); + +var ELEMENT_NODE_TYPE = 1; + +/** + * Optionally injectable operations for mutating the DOM + */ +var BackendIDOperations = null; + +/** + * @param {?object} props + */ +function assertValidProps(props) { + if (!props) { + return; + } + // Note the use of `==` which checks for null or undefined. + if (props.dangerouslySetInnerHTML != null) { + ("production" !== "development" ? invariant( + props.children == null, + 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.' + ) : invariant(props.children == null)); + ("production" !== "development" ? invariant( + props.dangerouslySetInnerHTML.__html != null, + '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + + 'Please visit http://fb.me/react-invariant-dangerously-set-inner-html ' + + 'for more information.' + ) : invariant(props.dangerouslySetInnerHTML.__html != null)); + } + if ("production" !== "development") { + ("production" !== "development" ? warning( + props.innerHTML == null, + 'Directly setting property `innerHTML` is not permitted. ' + + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.' + ) : null); + ("production" !== "development" ? warning( + !props.contentEditable || props.children == null, + 'A component is `contentEditable` and contains `children` managed by ' + + 'React. It is now your responsibility to guarantee that none of ' + + 'those nodes are unexpectedly modified or duplicated. This is ' + + 'probably not intentional.' + ) : null); + } + ("production" !== "development" ? invariant( + props.style == null || typeof props.style === 'object', + 'The `style` prop expects a mapping from style properties to values, ' + + 'not a string. For example, style={{marginRight: spacing + \'em\'}} when ' + + 'using JSX.' + ) : invariant(props.style == null || typeof props.style === 'object')); +} + +function putListener(id, registrationName, listener, transaction) { + if ("production" !== "development") { + // IE8 has no API for event capturing and the `onScroll` event doesn't + // bubble. + ("production" !== "development" ? warning( + registrationName !== 'onScroll' || isEventSupported('scroll', true), + 'This browser doesn\'t support the `onScroll` event' + ) : null); + } + var container = ReactMount.findReactContainerForID(id); + if (container) { + var doc = container.nodeType === ELEMENT_NODE_TYPE ? + container.ownerDocument : + container; + listenTo(registrationName, doc); + } + transaction.getPutListenerQueue().enqueuePutListener( + id, + registrationName, + listener + ); +} + +// For HTML, certain tags should omit their close tag. We keep a whitelist for +// those special cased tags. + +var omittedCloseTags = { + 'area': true, + 'base': true, + 'br': true, + 'col': true, + 'embed': true, + 'hr': true, + 'img': true, + 'input': true, + 'keygen': true, + 'link': true, + 'meta': true, + 'param': true, + 'source': true, + 'track': true, + 'wbr': true + // NOTE: menuitem's close tag should be omitted, but that causes problems. +}; + +// We accept any tag to be rendered but since this gets injected into abitrary +// HTML, we want to make sure that it's a safe tag. +// http://www.w3.org/TR/REC-xml/#NT-Name + +var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset +var validatedTagCache = {}; +var hasOwnProperty = {}.hasOwnProperty; + +function validateDangerousTag(tag) { + if (!hasOwnProperty.call(validatedTagCache, tag)) { + ("production" !== "development" ? invariant(VALID_TAG_REGEX.test(tag), 'Invalid tag: %s', tag) : invariant(VALID_TAG_REGEX.test(tag))); + validatedTagCache[tag] = true; + } +} + +/** + * Creates a new React class that is idempotent and capable of containing other + * React components. It accepts event listeners and DOM properties that are + * valid according to `DOMProperty`. + * + * - Event listeners: `onClick`, `onMouseDown`, etc. + * - DOM properties: `className`, `name`, `title`, etc. + * + * The `style` property functions differently from the DOM API. It accepts an + * object mapping of style properties to values. + * + * @constructor ReactDOMComponent + * @extends ReactMultiChild + */ +function ReactDOMComponent(tag) { + validateDangerousTag(tag); + this._tag = tag; + this._renderedChildren = null; + this._previousStyleCopy = null; + this._rootNodeID = null; +} + +ReactDOMComponent.displayName = 'ReactDOMComponent'; + +ReactDOMComponent.Mixin = { + + construct: function(element) { + this._currentElement = element; + }, + + /** + * Generates root tag markup then recurses. This method has side effects and + * is not idempotent. + * + * @internal + * @param {string} rootID The root DOM ID for this node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} The computed markup. + */ + mountComponent: function(rootID, transaction, context) { + this._rootNodeID = rootID; + assertValidProps(this._currentElement.props); + var closeTag = omittedCloseTags[this._tag] ? '' : '</' + this._tag + '>'; + return ( + this._createOpenTagMarkupAndPutListeners(transaction) + + this._createContentMarkup(transaction, context) + + closeTag + ); + }, + + /** + * Creates markup for the open tag and all attributes. + * + * This method has side effects because events get registered. + * + * Iterating over object properties is faster than iterating over arrays. + * @see http://jsperf.com/obj-vs-arr-iteration + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup of opening tag. + */ + _createOpenTagMarkupAndPutListeners: function(transaction) { + var props = this._currentElement.props; + var ret = '<' + this._tag; + + for (var propKey in props) { + if (!props.hasOwnProperty(propKey)) { + continue; + } + var propValue = props[propKey]; + if (propValue == null) { + continue; + } + if (registrationNameModules.hasOwnProperty(propKey)) { + putListener(this._rootNodeID, propKey, propValue, transaction); + } else { + if (propKey === STYLE) { + if (propValue) { + propValue = this._previousStyleCopy = assign({}, props.style); + } + propValue = CSSPropertyOperations.createMarkupForStyles(propValue); + } + var markup = + DOMPropertyOperations.createMarkupForProperty(propKey, propValue); + if (markup) { + ret += ' ' + markup; + } + } + } + + // For static pages, no need to put React ID and checksum. Saves lots of + // bytes. + if (transaction.renderToStaticMarkup) { + return ret + '>'; + } + + var markupForID = DOMPropertyOperations.createMarkupForID(this._rootNodeID); + return ret + ' ' + markupForID + '>'; + }, + + /** + * Creates markup for the content between the tags. + * + * @private + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @param {object} context + * @return {string} Content markup. + */ + _createContentMarkup: function(transaction, context) { + var prefix = ''; + if (this._tag === 'listing' || + this._tag === 'pre' || + this._tag === 'textarea') { + // Add an initial newline because browsers ignore the first newline in + // a <listing>, <pre>, or <textarea> as an "authoring convenience" -- see + // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody. + prefix = '\n'; + } + + var props = this._currentElement.props; + + // Intentional use of != to avoid catching zero/false. + var innerHTML = props.dangerouslySetInnerHTML; + if (innerHTML != null) { + if (innerHTML.__html != null) { + return prefix + innerHTML.__html; + } + } else { + var contentToUse = + CONTENT_TYPES[typeof props.children] ? props.children : null; + var childrenToUse = contentToUse != null ? null : props.children; + if (contentToUse != null) { + return prefix + escapeTextContentForBrowser(contentToUse); + } else if (childrenToUse != null) { + var mountImages = this.mountChildren( + childrenToUse, + transaction, + context + ); + return prefix + mountImages.join(''); + } + } + return prefix; + }, + + receiveComponent: function(nextElement, transaction, context) { + var prevElement = this._currentElement; + this._currentElement = nextElement; + this.updateComponent(transaction, prevElement, nextElement, context); + }, + + /** + * Updates a native DOM component after it has already been allocated and + * attached to the DOM. Reconciles the root DOM node, then recurses. + * + * @param {ReactReconcileTransaction} transaction + * @param {ReactElement} prevElement + * @param {ReactElement} nextElement + * @internal + * @overridable + */ + updateComponent: function(transaction, prevElement, nextElement, context) { + assertValidProps(this._currentElement.props); + this._updateDOMProperties(prevElement.props, transaction); + this._updateDOMChildren(prevElement.props, transaction, context); + }, + + /** + * Reconciles the properties by detecting differences in property values and + * updating the DOM as necessary. This function is probably the single most + * critical path for performance optimization. + * + * TODO: Benchmark whether checking for changed values in memory actually + * improves performance (especially statically positioned elements). + * TODO: Benchmark the effects of putting this at the top since 99% of props + * do not change for a given reconciliation. + * TODO: Benchmark areas that can be improved with caching. + * + * @private + * @param {object} lastProps + * @param {ReactReconcileTransaction} transaction + */ + _updateDOMProperties: function(lastProps, transaction) { + var nextProps = this._currentElement.props; + var propKey; + var styleName; + var styleUpdates; + for (propKey in lastProps) { + if (nextProps.hasOwnProperty(propKey) || + !lastProps.hasOwnProperty(propKey)) { + continue; + } + if (propKey === STYLE) { + var lastStyle = this._previousStyleCopy; + for (styleName in lastStyle) { + if (lastStyle.hasOwnProperty(styleName)) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + deleteListener(this._rootNodeID, propKey); + } else if ( + DOMProperty.isStandardName[propKey] || + DOMProperty.isCustomAttribute(propKey)) { + BackendIDOperations.deletePropertyByID( + this._rootNodeID, + propKey + ); + } + } + for (propKey in nextProps) { + var nextProp = nextProps[propKey]; + var lastProp = propKey === STYLE ? + this._previousStyleCopy : + lastProps[propKey]; + if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp) { + continue; + } + if (propKey === STYLE) { + if (nextProp) { + nextProp = this._previousStyleCopy = assign({}, nextProp); + } + if (lastProp) { + // Unset styles on `lastProp` but not on `nextProp`. + for (styleName in lastProp) { + if (lastProp.hasOwnProperty(styleName) && + (!nextProp || !nextProp.hasOwnProperty(styleName))) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = ''; + } + } + // Update styles that changed since `lastProp`. + for (styleName in nextProp) { + if (nextProp.hasOwnProperty(styleName) && + lastProp[styleName] !== nextProp[styleName]) { + styleUpdates = styleUpdates || {}; + styleUpdates[styleName] = nextProp[styleName]; + } + } + } else { + // Relies on `updateStylesByID` not mutating `styleUpdates`. + styleUpdates = nextProp; + } + } else if (registrationNameModules.hasOwnProperty(propKey)) { + putListener(this._rootNodeID, propKey, nextProp, transaction); + } else if ( + DOMProperty.isStandardName[propKey] || + DOMProperty.isCustomAttribute(propKey)) { + BackendIDOperations.updatePropertyByID( + this._rootNodeID, + propKey, + nextProp + ); + } + } + if (styleUpdates) { + BackendIDOperations.updateStylesByID( + this._rootNodeID, + styleUpdates + ); + } + }, + + /** + * Reconciles the children with the various properties that affect the + * children content. + * + * @param {object} lastProps + * @param {ReactReconcileTransaction} transaction + */ + _updateDOMChildren: function(lastProps, transaction, context) { + var nextProps = this._currentElement.props; + + var lastContent = + CONTENT_TYPES[typeof lastProps.children] ? lastProps.children : null; + var nextContent = + CONTENT_TYPES[typeof nextProps.children] ? nextProps.children : null; + + var lastHtml = + lastProps.dangerouslySetInnerHTML && + lastProps.dangerouslySetInnerHTML.__html; + var nextHtml = + nextProps.dangerouslySetInnerHTML && + nextProps.dangerouslySetInnerHTML.__html; + + // Note the use of `!=` which checks for null or undefined. + var lastChildren = lastContent != null ? null : lastProps.children; + var nextChildren = nextContent != null ? null : nextProps.children; + + // If we're switching from children to content/html or vice versa, remove + // the old content + var lastHasContentOrHtml = lastContent != null || lastHtml != null; + var nextHasContentOrHtml = nextContent != null || nextHtml != null; + if (lastChildren != null && nextChildren == null) { + this.updateChildren(null, transaction, context); + } else if (lastHasContentOrHtml && !nextHasContentOrHtml) { + this.updateTextContent(''); + } + + if (nextContent != null) { + if (lastContent !== nextContent) { + this.updateTextContent('' + nextContent); + } + } else if (nextHtml != null) { + if (lastHtml !== nextHtml) { + BackendIDOperations.updateInnerHTMLByID( + this._rootNodeID, + nextHtml + ); + } + } else if (nextChildren != null) { + this.updateChildren(nextChildren, transaction, context); + } + }, + + /** + * Destroys all event registrations for this instance. Does not remove from + * the DOM. That must be done by the parent. + * + * @internal + */ + unmountComponent: function() { + this.unmountChildren(); + ReactBrowserEventEmitter.deleteAllListeners(this._rootNodeID); + ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); + this._rootNodeID = null; + } + +}; + +ReactPerf.measureMethods(ReactDOMComponent, 'ReactDOMComponent', { + mountComponent: 'mountComponent', + updateComponent: 'updateComponent' +}); + +assign( + ReactDOMComponent.prototype, + ReactDOMComponent.Mixin, + ReactMultiChild.Mixin +); + +ReactDOMComponent.injection = { + injectIDOperations: function(IDOperations) { + ReactDOMComponent.BackendIDOperations = BackendIDOperations = IDOperations; + } +}; + +module.exports = ReactDOMComponent; + +},{"10":10,"11":11,"116":116,"135":135,"136":136,"141":141,"154":154,"27":27,"30":30,"35":35,"5":5,"70":70,"71":71,"75":75}],43:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMForm + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var LocalEventTrapMixin = _dereq_(25); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var form = ReactElement.createFactory('form'); + +/** + * Since onSubmit doesn't bubble OR capture on the top level in IE8, we need + * to capture it on the <form> element itself. There are lots of hacks we could + * do to accomplish this, but the most reliable is to make <form> a + * composite component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMForm = ReactClass.createClass({ + displayName: 'ReactDOMForm', + tagName: 'FORM', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + // TODO: Instead of using `ReactDOM` directly, we should use JSX. However, + // `jshint` fails to parse JSX so in order for linting to work in the open + // source repo, we need to just use `ReactDOM.form`. + return form(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topReset, 'reset'); + this.trapBubbledEvent(EventConstants.topLevelTypes.topSubmit, 'submit'); + } +}); + +module.exports = ReactDOMForm; + +},{"15":15,"25":25,"29":29,"33":33,"57":57}],44:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMIDOperations + * @typechecks static-only + */ + +/*jslint evil: true */ + +'use strict'; + +var CSSPropertyOperations = _dereq_(5); +var DOMChildrenOperations = _dereq_(9); +var DOMPropertyOperations = _dereq_(11); +var ReactMount = _dereq_(70); +var ReactPerf = _dereq_(75); + +var invariant = _dereq_(135); +var setInnerHTML = _dereq_(148); + +/** + * Errors for properties that should not be updated with `updatePropertyById()`. + * + * @type {object} + * @private + */ +var INVALID_PROPERTY_ERRORS = { + dangerouslySetInnerHTML: + '`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.', + style: '`style` must be set using `updateStylesByID()`.' +}; + +/** + * Operations used to process updates to DOM nodes. This is made injectable via + * `ReactDOMComponent.BackendIDOperations`. + */ +var ReactDOMIDOperations = { + + /** + * Updates a DOM node with new property values. This should only be used to + * update DOM properties in `DOMProperty`. + * + * @param {string} id ID of the node to update. + * @param {string} name A valid property name, see `DOMProperty`. + * @param {*} value New value of the property. + * @internal + */ + updatePropertyByID: function(id, name, value) { + var node = ReactMount.getNode(id); + ("production" !== "development" ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); + + // If we're updating to null or undefined, we should remove the property + // from the DOM node instead of inadvertantly setting to a string. This + // brings us in line with the same behavior we have on initial render. + if (value != null) { + DOMPropertyOperations.setValueForProperty(node, name, value); + } else { + DOMPropertyOperations.deleteValueForProperty(node, name); + } + }, + + /** + * Updates a DOM node to remove a property. This should only be used to remove + * DOM properties in `DOMProperty`. + * + * @param {string} id ID of the node to update. + * @param {string} name A property name to remove, see `DOMProperty`. + * @internal + */ + deletePropertyByID: function(id, name, value) { + var node = ReactMount.getNode(id); + ("production" !== "development" ? invariant( + !INVALID_PROPERTY_ERRORS.hasOwnProperty(name), + 'updatePropertyByID(...): %s', + INVALID_PROPERTY_ERRORS[name] + ) : invariant(!INVALID_PROPERTY_ERRORS.hasOwnProperty(name))); + DOMPropertyOperations.deleteValueForProperty(node, name, value); + }, + + /** + * Updates a DOM node with new style values. If a value is specified as '', + * the corresponding style property will be unset. + * + * @param {string} id ID of the node to update. + * @param {object} styles Mapping from styles to values. + * @internal + */ + updateStylesByID: function(id, styles) { + var node = ReactMount.getNode(id); + CSSPropertyOperations.setValueForStyles(node, styles); + }, + + /** + * Updates a DOM node's innerHTML. + * + * @param {string} id ID of the node to update. + * @param {string} html An HTML string. + * @internal + */ + updateInnerHTMLByID: function(id, html) { + var node = ReactMount.getNode(id); + setInnerHTML(node, html); + }, + + /** + * Updates a DOM node's text content set by `props.content`. + * + * @param {string} id ID of the node to update. + * @param {string} content Text content. + * @internal + */ + updateTextContentByID: function(id, content) { + var node = ReactMount.getNode(id); + DOMChildrenOperations.updateTextContent(node, content); + }, + + /** + * Replaces a DOM node that exists in the document with markup. + * + * @param {string} id ID of child to be replaced. + * @param {string} markup Dangerous markup to inject in place of child. + * @internal + * @see {Danger.dangerouslyReplaceNodeWithMarkup} + */ + dangerouslyReplaceNodeWithMarkupByID: function(id, markup) { + var node = ReactMount.getNode(id); + DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup(node, markup); + }, + + /** + * Updates a component's children by processing a series of updates. + * + * @param {array<object>} updates List of update configurations. + * @param {array<string>} markup List of markup strings. + * @internal + */ + dangerouslyProcessChildrenUpdates: function(updates, markup) { + for (var i = 0; i < updates.length; i++) { + updates[i].parentNode = ReactMount.getNode(updates[i].parentID); + } + DOMChildrenOperations.processUpdates(updates, markup); + } +}; + +ReactPerf.measureMethods(ReactDOMIDOperations, 'ReactDOMIDOperations', { + updatePropertyByID: 'updatePropertyByID', + deletePropertyByID: 'deletePropertyByID', + updateStylesByID: 'updateStylesByID', + updateInnerHTMLByID: 'updateInnerHTMLByID', + updateTextContentByID: 'updateTextContentByID', + dangerouslyReplaceNodeWithMarkupByID: 'dangerouslyReplaceNodeWithMarkupByID', + dangerouslyProcessChildrenUpdates: 'dangerouslyProcessChildrenUpdates' +}); + +module.exports = ReactDOMIDOperations; + +},{"11":11,"135":135,"148":148,"5":5,"70":70,"75":75,"9":9}],45:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMIframe + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var LocalEventTrapMixin = _dereq_(25); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var iframe = ReactElement.createFactory('iframe'); + +/** + * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to + * capture it on the <iframe> element itself. There are lots of hacks we could + * do to accomplish this, but the most reliable is to make <iframe> a composite + * component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMIframe = ReactClass.createClass({ + displayName: 'ReactDOMIframe', + tagName: 'IFRAME', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + return iframe(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); + } +}); + +module.exports = ReactDOMIframe; + +},{"15":15,"25":25,"29":29,"33":33,"57":57}],46:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMImg + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var LocalEventTrapMixin = _dereq_(25); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var img = ReactElement.createFactory('img'); + +/** + * Since onLoad doesn't bubble OR capture on the top level in IE8, we need to + * capture it on the <img> element itself. There are lots of hacks we could do + * to accomplish this, but the most reliable is to make <img> a composite + * component and use `componentDidMount` to attach the event handlers. + */ +var ReactDOMImg = ReactClass.createClass({ + displayName: 'ReactDOMImg', + tagName: 'IMG', + + mixins: [ReactBrowserComponentMixin, LocalEventTrapMixin], + + render: function() { + return img(this.props); + }, + + componentDidMount: function() { + this.trapBubbledEvent(EventConstants.topLevelTypes.topLoad, 'load'); + this.trapBubbledEvent(EventConstants.topLevelTypes.topError, 'error'); + } +}); + +module.exports = ReactDOMImg; + +},{"15":15,"25":25,"29":29,"33":33,"57":57}],47:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMInput + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var DOMPropertyOperations = _dereq_(11); +var LinkedValueUtils = _dereq_(24); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); +var ReactMount = _dereq_(70); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); +var invariant = _dereq_(135); + +var input = ReactElement.createFactory('input'); + +var instancesByReactID = {}; + +function forceUpdateIfMounted() { + /*jshint validthis:true */ + if (this.isMounted()) { + this.forceUpdate(); + } +} + +/** + * Implements an <input> native component that allows setting these optional + * props: `checked`, `value`, `defaultChecked`, and `defaultValue`. + * + * If `checked` or `value` are not supplied (or null/undefined), user actions + * that affect the checked state or value will trigger updates to the element. + * + * If they are supplied (and not null/undefined), the rendered element will not + * trigger updates to the element. Instead, the props must change in order for + * the rendered element to be updated. + * + * The rendered element will be initialized as unchecked (or `defaultChecked`) + * with an empty value (or `defaultValue`). + * + * @see http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html + */ +var ReactDOMInput = ReactClass.createClass({ + displayName: 'ReactDOMInput', + tagName: 'INPUT', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + getInitialState: function() { + var defaultValue = this.props.defaultValue; + return { + initialChecked: this.props.defaultChecked || false, + initialValue: defaultValue != null ? defaultValue : null + }; + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + props.defaultChecked = null; + props.defaultValue = null; + + var value = LinkedValueUtils.getValue(this); + props.value = value != null ? value : this.state.initialValue; + + var checked = LinkedValueUtils.getChecked(this); + props.checked = checked != null ? checked : this.state.initialChecked; + + props.onChange = this._handleChange; + + return input(props, this.props.children); + }, + + componentDidMount: function() { + var id = ReactMount.getID(this.getDOMNode()); + instancesByReactID[id] = this; + }, + + componentWillUnmount: function() { + var rootNode = this.getDOMNode(); + var id = ReactMount.getID(rootNode); + delete instancesByReactID[id]; + }, + + componentDidUpdate: function(prevProps, prevState, prevContext) { + var rootNode = this.getDOMNode(); + if (this.props.checked != null) { + DOMPropertyOperations.setValueForProperty( + rootNode, + 'checked', + this.props.checked || false + ); + } + + var value = LinkedValueUtils.getValue(this); + if (value != null) { + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + // Here we use asap to wait until all updates have propagated, which + // is important when using controlled components within layers: + // https://github.com/facebook/react/issues/1698 + ReactUpdates.asap(forceUpdateIfMounted, this); + + var name = this.props.name; + if (this.props.type === 'radio' && name != null) { + var rootNode = this.getDOMNode(); + var queryRoot = rootNode; + + while (queryRoot.parentNode) { + queryRoot = queryRoot.parentNode; + } + + // If `rootNode.form` was non-null, then we could try `form.elements`, + // but that sometimes behaves strangely in IE8. We could also try using + // `form.getElementsByName`, but that will only return direct children + // and won't include inputs that use the HTML5 `form=` attribute. Since + // the input might not even be in a form, let's just use the global + // `querySelectorAll` to ensure we don't miss anything. + var group = queryRoot.querySelectorAll( + 'input[name=' + JSON.stringify('' + name) + '][type="radio"]'); + + for (var i = 0, groupLen = group.length; i < groupLen; i++) { + var otherNode = group[i]; + if (otherNode === rootNode || + otherNode.form !== rootNode.form) { + continue; + } + var otherID = ReactMount.getID(otherNode); + ("production" !== "development" ? invariant( + otherID, + 'ReactDOMInput: Mixing React and non-React radio inputs with the ' + + 'same `name` is not supported.' + ) : invariant(otherID)); + var otherInstance = instancesByReactID[otherID]; + ("production" !== "development" ? invariant( + otherInstance, + 'ReactDOMInput: Unknown radio button ID %s.', + otherID + ) : invariant(otherInstance)); + // If this is a controlled radio button group, forcing the input that + // was previously checked to update will cause it to be come re-checked + // as appropriate. + ReactUpdates.asap(forceUpdateIfMounted, otherInstance); + } + } + + return returnValue; + } + +}); + +module.exports = ReactDOMInput; + +},{"11":11,"135":135,"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"70":70,"87":87}],48:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMOption + */ + +'use strict'; + +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var warning = _dereq_(154); + +var option = ReactElement.createFactory('option'); + +/** + * Implements an <option> native component that warns when `selected` is set. + */ +var ReactDOMOption = ReactClass.createClass({ + displayName: 'ReactDOMOption', + tagName: 'OPTION', + + mixins: [ReactBrowserComponentMixin], + + componentWillMount: function() { + // TODO (yungsters): Remove support for `selected` in <option>. + if ("production" !== "development") { + ("production" !== "development" ? warning( + this.props.selected == null, + 'Use the `defaultValue` or `value` props on <select> instead of ' + + 'setting `selected` on <option>.' + ) : null); + } + }, + + render: function() { + return option(this.props, this.props.children); + } + +}); + +module.exports = ReactDOMOption; + +},{"154":154,"29":29,"33":33,"57":57}],49:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMSelect + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var LinkedValueUtils = _dereq_(24); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); + +var select = ReactElement.createFactory('select'); + +function updateOptionsIfPendingUpdateAndMounted() { + /*jshint validthis:true */ + if (this._pendingUpdate) { + this._pendingUpdate = false; + var value = LinkedValueUtils.getValue(this); + if (value != null && this.isMounted()) { + updateOptions(this, value); + } + } +} + +/** + * Validation function for `value` and `defaultValue`. + * @private + */ +function selectValueType(props, propName, componentName) { + if (props[propName] == null) { + return null; + } + if (props.multiple) { + if (!Array.isArray(props[propName])) { + return new Error( + ("The `" + propName + "` prop supplied to <select> must be an array if ") + + ("`multiple` is true.") + ); + } + } else { + if (Array.isArray(props[propName])) { + return new Error( + ("The `" + propName + "` prop supplied to <select> must be a scalar ") + + ("value if `multiple` is false.") + ); + } + } +} + +/** + * @param {ReactComponent} component Instance of ReactDOMSelect + * @param {*} propValue A stringable (with `multiple`, a list of stringables). + * @private + */ +function updateOptions(component, propValue) { + var selectedValue, i, l; + var options = component.getDOMNode().options; + + if (component.props.multiple) { + selectedValue = {}; + for (i = 0, l = propValue.length; i < l; i++) { + selectedValue['' + propValue[i]] = true; + } + for (i = 0, l = options.length; i < l; i++) { + var selected = selectedValue.hasOwnProperty(options[i].value); + if (options[i].selected !== selected) { + options[i].selected = selected; + } + } + } else { + // Do not set `select.value` as exact behavior isn't consistent across all + // browsers for all cases. + selectedValue = '' + propValue; + for (i = 0, l = options.length; i < l; i++) { + if (options[i].value === selectedValue) { + options[i].selected = true; + return; + } + } + options[0].selected = true; + } +} + +/** + * Implements a <select> native component that allows optionally setting the + * props `value` and `defaultValue`. If `multiple` is false, the prop must be a + * stringable. If `multiple` is true, the prop must be an array of stringables. + * + * If `value` is not supplied (or null/undefined), user actions that change the + * selected option will trigger updates to the rendered options. + * + * If it is supplied (and not null/undefined), the rendered options will not + * update in response to user actions. Instead, the `value` prop must change in + * order for the rendered options to update. + * + * If `defaultValue` is provided, any options with the supplied values will be + * selected. + */ +var ReactDOMSelect = ReactClass.createClass({ + displayName: 'ReactDOMSelect', + tagName: 'SELECT', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + propTypes: { + defaultValue: selectValueType, + value: selectValueType + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + props.onChange = this._handleChange; + props.value = null; + + return select(props, this.props.children); + }, + + componentWillMount: function() { + this._pendingUpdate = false; + }, + + componentDidMount: function() { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + updateOptions(this, value); + } else if (this.props.defaultValue != null) { + updateOptions(this, this.props.defaultValue); + } + }, + + componentDidUpdate: function(prevProps) { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + this._pendingUpdate = false; + updateOptions(this, value); + } else if (!prevProps.multiple !== !this.props.multiple) { + // For simplicity, reapply `defaultValue` if `multiple` is toggled. + if (this.props.defaultValue != null) { + updateOptions(this, this.props.defaultValue); + } else { + // Revert the select back to its default unselected state. + updateOptions(this, this.props.multiple ? [] : ''); + } + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + + this._pendingUpdate = true; + ReactUpdates.asap(updateOptionsIfPendingUpdateAndMounted, this); + return returnValue; + } + +}); + +module.exports = ReactDOMSelect; + +},{"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"87":87}],50:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMSelection + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); + +var getNodeForCharacterOffset = _dereq_(128); +var getTextContentAccessor = _dereq_(130); + +/** + * While `isCollapsed` is available on the Selection object and `collapsed` + * is available on the Range object, IE11 sometimes gets them wrong. + * If the anchor/focus nodes and offsets are the same, the range is collapsed. + */ +function isCollapsed(anchorNode, anchorOffset, focusNode, focusOffset) { + return anchorNode === focusNode && anchorOffset === focusOffset; +} + +/** + * Get the appropriate anchor and focus node/offset pairs for IE. + * + * The catch here is that IE's selection API doesn't provide information + * about whether the selection is forward or backward, so we have to + * behave as though it's always forward. + * + * IE text differs from modern selection in that it behaves as though + * block elements end with a new line. This means character offsets will + * differ between the two APIs. + * + * @param {DOMElement} node + * @return {object} + */ +function getIEOffsets(node) { + var selection = document.selection; + var selectedRange = selection.createRange(); + var selectedLength = selectedRange.text.length; + + // Duplicate selection so we can move range without breaking user selection. + var fromStart = selectedRange.duplicate(); + fromStart.moveToElementText(node); + fromStart.setEndPoint('EndToStart', selectedRange); + + var startOffset = fromStart.text.length; + var endOffset = startOffset + selectedLength; + + return { + start: startOffset, + end: endOffset + }; +} + +/** + * @param {DOMElement} node + * @return {?object} + */ +function getModernOffsets(node) { + var selection = window.getSelection && window.getSelection(); + + if (!selection || selection.rangeCount === 0) { + return null; + } + + var anchorNode = selection.anchorNode; + var anchorOffset = selection.anchorOffset; + var focusNode = selection.focusNode; + var focusOffset = selection.focusOffset; + + var currentRange = selection.getRangeAt(0); + + // If the node and offset values are the same, the selection is collapsed. + // `Selection.isCollapsed` is available natively, but IE sometimes gets + // this value wrong. + var isSelectionCollapsed = isCollapsed( + selection.anchorNode, + selection.anchorOffset, + selection.focusNode, + selection.focusOffset + ); + + var rangeLength = isSelectionCollapsed ? 0 : currentRange.toString().length; + + var tempRange = currentRange.cloneRange(); + tempRange.selectNodeContents(node); + tempRange.setEnd(currentRange.startContainer, currentRange.startOffset); + + var isTempRangeCollapsed = isCollapsed( + tempRange.startContainer, + tempRange.startOffset, + tempRange.endContainer, + tempRange.endOffset + ); + + var start = isTempRangeCollapsed ? 0 : tempRange.toString().length; + var end = start + rangeLength; + + // Detect whether the selection is backward. + var detectionRange = document.createRange(); + detectionRange.setStart(anchorNode, anchorOffset); + detectionRange.setEnd(focusNode, focusOffset); + var isBackward = detectionRange.collapsed; + + return { + start: isBackward ? end : start, + end: isBackward ? start : end + }; +} + +/** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setIEOffsets(node, offsets) { + var range = document.selection.createRange().duplicate(); + var start, end; + + if (typeof offsets.end === 'undefined') { + start = offsets.start; + end = start; + } else if (offsets.start > offsets.end) { + start = offsets.end; + end = offsets.start; + } else { + start = offsets.start; + end = offsets.end; + } + + range.moveToElementText(node); + range.moveStart('character', start); + range.setEndPoint('EndToStart', range); + range.moveEnd('character', end - start); + range.select(); +} + +/** + * In modern non-IE browsers, we can support both forward and backward + * selections. + * + * Note: IE10+ supports the Selection object, but it does not support + * the `extend` method, which means that even in modern IE, it's not possible + * to programatically create a backward selection. Thus, for all IE + * versions, we use the old IE API to create our selections. + * + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ +function setModernOffsets(node, offsets) { + if (!window.getSelection) { + return; + } + + var selection = window.getSelection(); + var length = node[getTextContentAccessor()].length; + var start = Math.min(offsets.start, length); + var end = typeof offsets.end === 'undefined' ? + start : Math.min(offsets.end, length); + + // IE 11 uses modern selection, but doesn't support the extend method. + // Flip backward selections, so we can set with a single range. + if (!selection.extend && start > end) { + var temp = end; + end = start; + start = temp; + } + + var startMarker = getNodeForCharacterOffset(node, start); + var endMarker = getNodeForCharacterOffset(node, end); + + if (startMarker && endMarker) { + var range = document.createRange(); + range.setStart(startMarker.node, startMarker.offset); + selection.removeAllRanges(); + + if (start > end) { + selection.addRange(range); + selection.extend(endMarker.node, endMarker.offset); + } else { + range.setEnd(endMarker.node, endMarker.offset); + selection.addRange(range); + } + } +} + +var useIEOffsets = ( + ExecutionEnvironment.canUseDOM && + 'selection' in document && + !('getSelection' in window) +); + +var ReactDOMSelection = { + /** + * @param {DOMElement} node + */ + getOffsets: useIEOffsets ? getIEOffsets : getModernOffsets, + + /** + * @param {DOMElement|DOMTextNode} node + * @param {object} offsets + */ + setOffsets: useIEOffsets ? setIEOffsets : setModernOffsets +}; + +module.exports = ReactDOMSelection; + +},{"128":128,"130":130,"21":21}],51:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMTextComponent + * @typechecks static-only + */ + +'use strict'; + +var DOMPropertyOperations = _dereq_(11); +var ReactComponentBrowserEnvironment = + _dereq_(35); +var ReactDOMComponent = _dereq_(42); + +var assign = _dereq_(27); +var escapeTextContentForBrowser = _dereq_(116); + +/** + * Text nodes violate a couple assumptions that React makes about components: + * + * - When mounting text into the DOM, adjacent text nodes are merged. + * - Text nodes cannot be assigned a React root ID. + * + * This component is used to wrap strings in elements so that they can undergo + * the same reconciliation that is applied to elements. + * + * TODO: Investigate representing React components in the DOM with text nodes. + * + * @class ReactDOMTextComponent + * @extends ReactComponent + * @internal + */ +var ReactDOMTextComponent = function(props) { + // This constructor and its argument is currently used by mocks. +}; + +assign(ReactDOMTextComponent.prototype, { + + /** + * @param {ReactText} text + * @internal + */ + construct: function(text) { + // TODO: This is really a ReactText (ReactNode), not a ReactElement + this._currentElement = text; + this._stringText = '' + text; + + // Properties + this._rootNodeID = null; + this._mountIndex = 0; + }, + + /** + * Creates the markup for this text node. This node is not intended to have + * any features besides containing text content. + * + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {string} Markup for this text node. + * @internal + */ + mountComponent: function(rootID, transaction, context) { + this._rootNodeID = rootID; + var escapedText = escapeTextContentForBrowser(this._stringText); + + if (transaction.renderToStaticMarkup) { + // Normally we'd wrap this in a `span` for the reasons stated above, but + // since this is a situation where React won't take over (static pages), + // we can simply return the text as it is. + return escapedText; + } + + return ( + '<span ' + DOMPropertyOperations.createMarkupForID(rootID) + '>' + + escapedText + + '</span>' + ); + }, + + /** + * Updates this component by updating the text content. + * + * @param {ReactText} nextText The next text content + * @param {ReactReconcileTransaction} transaction + * @internal + */ + receiveComponent: function(nextText, transaction) { + if (nextText !== this._currentElement) { + this._currentElement = nextText; + var nextStringText = '' + nextText; + if (nextStringText !== this._stringText) { + // TODO: Save this as pending props and use performUpdateIfNecessary + // and/or updateComponent to do the actual update for consistency with + // other component types? + this._stringText = nextStringText; + ReactDOMComponent.BackendIDOperations.updateTextContentByID( + this._rootNodeID, + nextStringText + ); + } + } + }, + + unmountComponent: function() { + ReactComponentBrowserEnvironment.unmountIDFromEnvironment(this._rootNodeID); + } + +}); + +module.exports = ReactDOMTextComponent; + +},{"11":11,"116":116,"27":27,"35":35,"42":42}],52:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDOMTextarea + */ + +'use strict'; + +var AutoFocusMixin = _dereq_(2); +var DOMPropertyOperations = _dereq_(11); +var LinkedValueUtils = _dereq_(24); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); +var invariant = _dereq_(135); + +var warning = _dereq_(154); + +var textarea = ReactElement.createFactory('textarea'); + +function forceUpdateIfMounted() { + /*jshint validthis:true */ + if (this.isMounted()) { + this.forceUpdate(); + } +} + +/** + * Implements a <textarea> native component that allows setting `value`, and + * `defaultValue`. This differs from the traditional DOM API because value is + * usually set as PCDATA children. + * + * If `value` is not supplied (or null/undefined), user actions that affect the + * value will trigger updates to the element. + * + * If `value` is supplied (and not null/undefined), the rendered element will + * not trigger updates to the element. Instead, the `value` prop must change in + * order for the rendered element to be updated. + * + * The rendered element will be initialized with an empty value, the prop + * `defaultValue` if specified, or the children content (deprecated). + */ +var ReactDOMTextarea = ReactClass.createClass({ + displayName: 'ReactDOMTextarea', + tagName: 'TEXTAREA', + + mixins: [AutoFocusMixin, LinkedValueUtils.Mixin, ReactBrowserComponentMixin], + + getInitialState: function() { + var defaultValue = this.props.defaultValue; + // TODO (yungsters): Remove support for children content in <textarea>. + var children = this.props.children; + if (children != null) { + if ("production" !== "development") { + ("production" !== "development" ? warning( + false, + 'Use the `defaultValue` or `value` props instead of setting ' + + 'children on <textarea>.' + ) : null); + } + ("production" !== "development" ? invariant( + defaultValue == null, + 'If you supply `defaultValue` on a <textarea>, do not pass children.' + ) : invariant(defaultValue == null)); + if (Array.isArray(children)) { + ("production" !== "development" ? invariant( + children.length <= 1, + '<textarea> can only have at most one child.' + ) : invariant(children.length <= 1)); + children = children[0]; + } + + defaultValue = '' + children; + } + if (defaultValue == null) { + defaultValue = ''; + } + var value = LinkedValueUtils.getValue(this); + return { + // We save the initial value so that `ReactDOMComponent` doesn't update + // `textContent` (unnecessary since we update value). + // The initial value can be a boolean or object so that's why it's + // forced to be a string. + initialValue: '' + (value != null ? value : defaultValue) + }; + }, + + render: function() { + // Clone `this.props` so we don't mutate the input. + var props = assign({}, this.props); + + ("production" !== "development" ? invariant( + props.dangerouslySetInnerHTML == null, + '`dangerouslySetInnerHTML` does not make sense on <textarea>.' + ) : invariant(props.dangerouslySetInnerHTML == null)); + + props.defaultValue = null; + props.value = null; + props.onChange = this._handleChange; + + // Always set children to the same thing. In IE9, the selection range will + // get reset if `textContent` is mutated. + return textarea(props, this.state.initialValue); + }, + + componentDidUpdate: function(prevProps, prevState, prevContext) { + var value = LinkedValueUtils.getValue(this); + if (value != null) { + var rootNode = this.getDOMNode(); + // Cast `value` to a string to ensure the value is set correctly. While + // browsers typically do this as necessary, jsdom doesn't. + DOMPropertyOperations.setValueForProperty(rootNode, 'value', '' + value); + } + }, + + _handleChange: function(event) { + var returnValue; + var onChange = LinkedValueUtils.getOnChange(this); + if (onChange) { + returnValue = onChange.call(this, event); + } + ReactUpdates.asap(forceUpdateIfMounted, this); + return returnValue; + } + +}); + +module.exports = ReactDOMTextarea; + +},{"11":11,"135":135,"154":154,"2":2,"24":24,"27":27,"29":29,"33":33,"57":57,"87":87}],53:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultBatchingStrategy + */ + +'use strict'; + +var ReactUpdates = _dereq_(87); +var Transaction = _dereq_(103); + +var assign = _dereq_(27); +var emptyFunction = _dereq_(114); + +var RESET_BATCHED_UPDATES = { + initialize: emptyFunction, + close: function() { + ReactDefaultBatchingStrategy.isBatchingUpdates = false; + } +}; + +var FLUSH_BATCHED_UPDATES = { + initialize: emptyFunction, + close: ReactUpdates.flushBatchedUpdates.bind(ReactUpdates) +}; + +var TRANSACTION_WRAPPERS = [FLUSH_BATCHED_UPDATES, RESET_BATCHED_UPDATES]; + +function ReactDefaultBatchingStrategyTransaction() { + this.reinitializeTransaction(); +} + +assign( + ReactDefaultBatchingStrategyTransaction.prototype, + Transaction.Mixin, + { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + } + } +); + +var transaction = new ReactDefaultBatchingStrategyTransaction(); + +var ReactDefaultBatchingStrategy = { + isBatchingUpdates: false, + + /** + * Call the provided function in a context within which calls to `setState` + * and friends are batched such that components aren't updated unnecessarily. + */ + batchedUpdates: function(callback, a, b, c, d) { + var alreadyBatchingUpdates = ReactDefaultBatchingStrategy.isBatchingUpdates; + + ReactDefaultBatchingStrategy.isBatchingUpdates = true; + + // The code is written this way to avoid extra allocations + if (alreadyBatchingUpdates) { + callback(a, b, c, d); + } else { + transaction.perform(callback, null, a, b, c, d); + } + } +}; + +module.exports = ReactDefaultBatchingStrategy; + +},{"103":103,"114":114,"27":27,"87":87}],54:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultInjection + */ + +'use strict'; + +var BeforeInputEventPlugin = _dereq_(3); +var ChangeEventPlugin = _dereq_(7); +var ClientReactRootIndex = _dereq_(8); +var DefaultEventPluginOrder = _dereq_(13); +var EnterLeaveEventPlugin = _dereq_(14); +var ExecutionEnvironment = _dereq_(21); +var HTMLDOMPropertyConfig = _dereq_(23); +var MobileSafariClickEventPlugin = _dereq_(26); +var ReactBrowserComponentMixin = _dereq_(29); +var ReactClass = _dereq_(33); +var ReactComponentBrowserEnvironment = + _dereq_(35); +var ReactDefaultBatchingStrategy = _dereq_(53); +var ReactDOMComponent = _dereq_(42); +var ReactDOMButton = _dereq_(41); +var ReactDOMForm = _dereq_(43); +var ReactDOMImg = _dereq_(46); +var ReactDOMIDOperations = _dereq_(44); +var ReactDOMIframe = _dereq_(45); +var ReactDOMInput = _dereq_(47); +var ReactDOMOption = _dereq_(48); +var ReactDOMSelect = _dereq_(49); +var ReactDOMTextarea = _dereq_(52); +var ReactDOMTextComponent = _dereq_(51); +var ReactElement = _dereq_(57); +var ReactEventListener = _dereq_(62); +var ReactInjection = _dereq_(64); +var ReactInstanceHandles = _dereq_(66); +var ReactMount = _dereq_(70); +var ReactReconcileTransaction = _dereq_(80); +var SelectEventPlugin = _dereq_(89); +var ServerReactRootIndex = _dereq_(90); +var SimpleEventPlugin = _dereq_(91); +var SVGDOMPropertyConfig = _dereq_(88); + +var createFullPageComponent = _dereq_(111); + +function autoGenerateWrapperClass(type) { + return ReactClass.createClass({ + tagName: type.toUpperCase(), + render: function() { + return new ReactElement( + type, + null, + null, + null, + null, + this.props + ); + } + }); +} + +function inject() { + ReactInjection.EventEmitter.injectReactEventListener( + ReactEventListener + ); + + /** + * Inject modules for resolving DOM hierarchy and plugin ordering. + */ + ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); + ReactInjection.EventPluginHub.injectInstanceHandle(ReactInstanceHandles); + ReactInjection.EventPluginHub.injectMount(ReactMount); + + /** + * Some important event plugins included by default (without having to require + * them). + */ + ReactInjection.EventPluginHub.injectEventPluginsByName({ + SimpleEventPlugin: SimpleEventPlugin, + EnterLeaveEventPlugin: EnterLeaveEventPlugin, + ChangeEventPlugin: ChangeEventPlugin, + MobileSafariClickEventPlugin: MobileSafariClickEventPlugin, + SelectEventPlugin: SelectEventPlugin, + BeforeInputEventPlugin: BeforeInputEventPlugin + }); + + ReactInjection.NativeComponent.injectGenericComponentClass( + ReactDOMComponent + ); + + ReactInjection.NativeComponent.injectTextComponentClass( + ReactDOMTextComponent + ); + + ReactInjection.NativeComponent.injectAutoWrapper( + autoGenerateWrapperClass + ); + + // This needs to happen before createFullPageComponent() otherwise the mixin + // won't be included. + ReactInjection.Class.injectMixin(ReactBrowserComponentMixin); + + ReactInjection.NativeComponent.injectComponentClasses({ + 'button': ReactDOMButton, + 'form': ReactDOMForm, + 'iframe': ReactDOMIframe, + 'img': ReactDOMImg, + 'input': ReactDOMInput, + 'option': ReactDOMOption, + 'select': ReactDOMSelect, + 'textarea': ReactDOMTextarea, + + 'html': createFullPageComponent('html'), + 'head': createFullPageComponent('head'), + 'body': createFullPageComponent('body') + }); + + ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); + ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); + + ReactInjection.EmptyComponent.injectEmptyComponent('noscript'); + + ReactInjection.Updates.injectReconcileTransaction( + ReactReconcileTransaction + ); + ReactInjection.Updates.injectBatchingStrategy( + ReactDefaultBatchingStrategy + ); + + ReactInjection.RootIndex.injectCreateReactRootIndex( + ExecutionEnvironment.canUseDOM ? + ClientReactRootIndex.createReactRootIndex : + ServerReactRootIndex.createReactRootIndex + ); + + ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); + ReactInjection.DOMComponent.injectIDOperations(ReactDOMIDOperations); + + if ("production" !== "development") { + var url = (ExecutionEnvironment.canUseDOM && window.location.href) || ''; + if ((/[?&]react_perf\b/).test(url)) { + var ReactDefaultPerf = _dereq_(55); + ReactDefaultPerf.start(); + } + } +} + +module.exports = { + inject: inject +}; + +},{"111":111,"13":13,"14":14,"21":21,"23":23,"26":26,"29":29,"3":3,"33":33,"35":35,"41":41,"42":42,"43":43,"44":44,"45":45,"46":46,"47":47,"48":48,"49":49,"51":51,"52":52,"53":53,"55":55,"57":57,"62":62,"64":64,"66":66,"7":7,"70":70,"8":8,"80":80,"88":88,"89":89,"90":90,"91":91}],55:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultPerf + * @typechecks static-only + */ + +'use strict'; + +var DOMProperty = _dereq_(10); +var ReactDefaultPerfAnalysis = _dereq_(56); +var ReactMount = _dereq_(70); +var ReactPerf = _dereq_(75); + +var performanceNow = _dereq_(146); + +function roundFloat(val) { + return Math.floor(val * 100) / 100; +} + +function addValue(obj, key, val) { + obj[key] = (obj[key] || 0) + val; +} + +var ReactDefaultPerf = { + _allMeasurements: [], // last item in the list is the current one + _mountStack: [0], + _injected: false, + + start: function() { + if (!ReactDefaultPerf._injected) { + ReactPerf.injection.injectMeasure(ReactDefaultPerf.measure); + } + + ReactDefaultPerf._allMeasurements.length = 0; + ReactPerf.enableMeasure = true; + }, + + stop: function() { + ReactPerf.enableMeasure = false; + }, + + getLastMeasurements: function() { + return ReactDefaultPerf._allMeasurements; + }, + + printExclusive: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getExclusiveSummary(measurements); + console.table(summary.map(function(item) { + return { + 'Component class name': item.componentName, + 'Total inclusive time (ms)': roundFloat(item.inclusive), + 'Exclusive mount time (ms)': roundFloat(item.exclusive), + 'Exclusive render time (ms)': roundFloat(item.render), + 'Mount time per instance (ms)': roundFloat(item.exclusive / item.count), + 'Render time per instance (ms)': roundFloat(item.render / item.count), + 'Instances': item.count + }; + })); + // TODO: ReactDefaultPerfAnalysis.getTotalTime() does not return the correct + // number. + }, + + printInclusive: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getInclusiveSummary(measurements); + console.table(summary.map(function(item) { + return { + 'Owner > component': item.componentName, + 'Inclusive time (ms)': roundFloat(item.time), + 'Instances': item.count + }; + })); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + getMeasurementsSummaryMap: function(measurements) { + var summary = ReactDefaultPerfAnalysis.getInclusiveSummary( + measurements, + true + ); + return summary.map(function(item) { + return { + 'Owner > component': item.componentName, + 'Wasted time (ms)': item.time, + 'Instances': item.count + }; + }); + }, + + printWasted: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + console.table(ReactDefaultPerf.getMeasurementsSummaryMap(measurements)); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + printDOM: function(measurements) { + measurements = measurements || ReactDefaultPerf._allMeasurements; + var summary = ReactDefaultPerfAnalysis.getDOMSummary(measurements); + console.table(summary.map(function(item) { + var result = {}; + result[DOMProperty.ID_ATTRIBUTE_NAME] = item.id; + result['type'] = item.type; + result['args'] = JSON.stringify(item.args); + return result; + })); + console.log( + 'Total time:', + ReactDefaultPerfAnalysis.getTotalTime(measurements).toFixed(2) + ' ms' + ); + }, + + _recordWrite: function(id, fnName, totalTime, args) { + // TODO: totalTime isn't that useful since it doesn't count paints/reflows + var writes = + ReactDefaultPerf + ._allMeasurements[ReactDefaultPerf._allMeasurements.length - 1] + .writes; + writes[id] = writes[id] || []; + writes[id].push({ + type: fnName, + time: totalTime, + args: args + }); + }, + + measure: function(moduleName, fnName, func) { + return function() {for (var args=[],$__0=0,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + var totalTime; + var rv; + var start; + + if (fnName === '_renderNewRootComponent' || + fnName === 'flushBatchedUpdates') { + // A "measurement" is a set of metrics recorded for each flush. We want + // to group the metrics for a given flush together so we can look at the + // components that rendered and the DOM operations that actually + // happened to determine the amount of "wasted work" performed. + ReactDefaultPerf._allMeasurements.push({ + exclusive: {}, + inclusive: {}, + render: {}, + counts: {}, + writes: {}, + displayNames: {}, + totalTime: 0 + }); + start = performanceNow(); + rv = func.apply(this, args); + ReactDefaultPerf._allMeasurements[ + ReactDefaultPerf._allMeasurements.length - 1 + ].totalTime = performanceNow() - start; + return rv; + } else if (moduleName === 'ReactDOMIDOperations' || + moduleName === 'ReactComponentBrowserEnvironment') { + start = performanceNow(); + rv = func.apply(this, args); + totalTime = performanceNow() - start; + + if (fnName === '_mountImageIntoNode') { + var mountID = ReactMount.getID(args[1]); + ReactDefaultPerf._recordWrite(mountID, fnName, totalTime, args[0]); + } else if (fnName === 'dangerouslyProcessChildrenUpdates') { + // special format + args[0].forEach(function(update) { + var writeArgs = {}; + if (update.fromIndex !== null) { + writeArgs.fromIndex = update.fromIndex; + } + if (update.toIndex !== null) { + writeArgs.toIndex = update.toIndex; + } + if (update.textContent !== null) { + writeArgs.textContent = update.textContent; + } + if (update.markupIndex !== null) { + writeArgs.markup = args[1][update.markupIndex]; + } + ReactDefaultPerf._recordWrite( + update.parentID, + update.type, + totalTime, + writeArgs + ); + }); + } else { + // basic format + ReactDefaultPerf._recordWrite( + args[0], + fnName, + totalTime, + Array.prototype.slice.call(args, 1) + ); + } + return rv; + } else if (moduleName === 'ReactCompositeComponent' && ( + (// TODO: receiveComponent()? + (fnName === 'mountComponent' || + fnName === 'updateComponent' || fnName === '_renderValidatedComponent')))) { + + var rootNodeID = fnName === 'mountComponent' ? + args[0] : + this._rootNodeID; + var isRender = fnName === '_renderValidatedComponent'; + var isMount = fnName === 'mountComponent'; + + var mountStack = ReactDefaultPerf._mountStack; + var entry = ReactDefaultPerf._allMeasurements[ + ReactDefaultPerf._allMeasurements.length - 1 + ]; + + if (isRender) { + addValue(entry.counts, rootNodeID, 1); + } else if (isMount) { + mountStack.push(0); + } + + start = performanceNow(); + rv = func.apply(this, args); + totalTime = performanceNow() - start; + + if (isRender) { + addValue(entry.render, rootNodeID, totalTime); + } else if (isMount) { + var subMountTime = mountStack.pop(); + mountStack[mountStack.length - 1] += totalTime; + addValue(entry.exclusive, rootNodeID, totalTime - subMountTime); + addValue(entry.inclusive, rootNodeID, totalTime); + } else { + addValue(entry.inclusive, rootNodeID, totalTime); + } + + entry.displayNames[rootNodeID] = { + current: typeof this._currentElement.type === 'string' ? + this._currentElement.type : + this.getName(), + owner: this._currentElement._owner ? + this._currentElement._owner.getName() : + '<root>' + }; + + return rv; + } else { + return func.apply(this, args); + } + }; + } +}; + +module.exports = ReactDefaultPerf; + +},{"10":10,"146":146,"56":56,"70":70,"75":75}],56:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactDefaultPerfAnalysis + */ + +var assign = _dereq_(27); + +// Don't try to save users less than 1.2ms (a number I made up) +var DONT_CARE_THRESHOLD = 1.2; +var DOM_OPERATION_TYPES = { + '_mountImageIntoNode': 'set innerHTML', + INSERT_MARKUP: 'set innerHTML', + MOVE_EXISTING: 'move', + REMOVE_NODE: 'remove', + TEXT_CONTENT: 'set textContent', + 'updatePropertyByID': 'update attribute', + 'deletePropertyByID': 'delete attribute', + 'updateStylesByID': 'update styles', + 'updateInnerHTMLByID': 'set innerHTML', + 'dangerouslyReplaceNodeWithMarkupByID': 'replace' +}; + +function getTotalTime(measurements) { + // TODO: return number of DOM ops? could be misleading. + // TODO: measure dropped frames after reconcile? + // TODO: log total time of each reconcile and the top-level component + // class that triggered it. + var totalTime = 0; + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + totalTime += measurement.totalTime; + } + return totalTime; +} + +function getDOMSummary(measurements) { + var items = []; + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var id; + + for (id in measurement.writes) { + measurement.writes[id].forEach(function(write) { + items.push({ + id: id, + type: DOM_OPERATION_TYPES[write.type] || write.type, + args: write.args + }); + }); + } + } + return items; +} + +function getExclusiveSummary(measurements) { + var candidates = {}; + var displayName; + + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var allIDs = assign( + {}, + measurement.exclusive, + measurement.inclusive + ); + + for (var id in allIDs) { + displayName = measurement.displayNames[id].current; + + candidates[displayName] = candidates[displayName] || { + componentName: displayName, + inclusive: 0, + exclusive: 0, + render: 0, + count: 0 + }; + if (measurement.render[id]) { + candidates[displayName].render += measurement.render[id]; + } + if (measurement.exclusive[id]) { + candidates[displayName].exclusive += measurement.exclusive[id]; + } + if (measurement.inclusive[id]) { + candidates[displayName].inclusive += measurement.inclusive[id]; + } + if (measurement.counts[id]) { + candidates[displayName].count += measurement.counts[id]; + } + } + } + + // Now make a sorted array with the results. + var arr = []; + for (displayName in candidates) { + if (candidates[displayName].exclusive >= DONT_CARE_THRESHOLD) { + arr.push(candidates[displayName]); + } + } + + arr.sort(function(a, b) { + return b.exclusive - a.exclusive; + }); + + return arr; +} + +function getInclusiveSummary(measurements, onlyClean) { + var candidates = {}; + var inclusiveKey; + + for (var i = 0; i < measurements.length; i++) { + var measurement = measurements[i]; + var allIDs = assign( + {}, + measurement.exclusive, + measurement.inclusive + ); + var cleanComponents; + + if (onlyClean) { + cleanComponents = getUnchangedComponents(measurement); + } + + for (var id in allIDs) { + if (onlyClean && !cleanComponents[id]) { + continue; + } + + var displayName = measurement.displayNames[id]; + + // Inclusive time is not useful for many components without knowing where + // they are instantiated. So we aggregate inclusive time with both the + // owner and current displayName as the key. + inclusiveKey = displayName.owner + ' > ' + displayName.current; + + candidates[inclusiveKey] = candidates[inclusiveKey] || { + componentName: inclusiveKey, + time: 0, + count: 0 + }; + + if (measurement.inclusive[id]) { + candidates[inclusiveKey].time += measurement.inclusive[id]; + } + if (measurement.counts[id]) { + candidates[inclusiveKey].count += measurement.counts[id]; + } + } + } + + // Now make a sorted array with the results. + var arr = []; + for (inclusiveKey in candidates) { + if (candidates[inclusiveKey].time >= DONT_CARE_THRESHOLD) { + arr.push(candidates[inclusiveKey]); + } + } + + arr.sort(function(a, b) { + return b.time - a.time; + }); + + return arr; +} + +function getUnchangedComponents(measurement) { + // For a given reconcile, look at which components did not actually + // render anything to the DOM and return a mapping of their ID to + // the amount of time it took to render the entire subtree. + var cleanComponents = {}; + var dirtyLeafIDs = Object.keys(measurement.writes); + var allIDs = assign({}, measurement.exclusive, measurement.inclusive); + + for (var id in allIDs) { + var isDirty = false; + // For each component that rendered, see if a component that triggered + // a DOM op is in its subtree. + for (var i = 0; i < dirtyLeafIDs.length; i++) { + if (dirtyLeafIDs[i].indexOf(id) === 0) { + isDirty = true; + break; + } + } + if (!isDirty && measurement.counts[id] > 0) { + cleanComponents[id] = true; + } + } + return cleanComponents; +} + +var ReactDefaultPerfAnalysis = { + getExclusiveSummary: getExclusiveSummary, + getInclusiveSummary: getInclusiveSummary, + getDOMSummary: getDOMSummary, + getTotalTime: getTotalTime +}; + +module.exports = ReactDefaultPerfAnalysis; + +},{"27":27}],57:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElement + */ + +'use strict'; + +var ReactContext = _dereq_(38); +var ReactCurrentOwner = _dereq_(39); + +var assign = _dereq_(27); +var warning = _dereq_(154); + +var RESERVED_PROPS = { + key: true, + ref: true +}; + +/** + * Warn for mutations. + * + * @internal + * @param {object} object + * @param {string} key + */ +function defineWarningProperty(object, key) { + Object.defineProperty(object, key, { + + configurable: false, + enumerable: true, + + get: function() { + if (!this._store) { + return null; + } + return this._store[key]; + }, + + set: function(value) { + ("production" !== "development" ? warning( + false, + 'Don\'t set the %s property of the React element. Instead, ' + + 'specify the correct value when initially creating the element.', + key + ) : null); + this._store[key] = value; + } + + }); +} + +/** + * This is updated to true if the membrane is successfully created. + */ +var useMutationMembrane = false; + +/** + * Warn for mutations. + * + * @internal + * @param {object} element + */ +function defineMutationMembrane(prototype) { + try { + var pseudoFrozenProperties = { + props: true + }; + for (var key in pseudoFrozenProperties) { + defineWarningProperty(prototype, key); + } + useMutationMembrane = true; + } catch (x) { + // IE will fail on defineProperty + } +} + +/** + * Base constructor for all React elements. This is only used to make this + * work with a dynamic instanceof check. Nothing should live on this prototype. + * + * @param {*} type + * @param {string|object} ref + * @param {*} key + * @param {*} props + * @internal + */ +var ReactElement = function(type, key, ref, owner, context, props) { + // Built-in properties that belong on the element + this.type = type; + this.key = key; + this.ref = ref; + + // Record the component responsible for creating this element. + this._owner = owner; + + // TODO: Deprecate withContext, and then the context becomes accessible + // through the owner. + this._context = context; + + if ("production" !== "development") { + // The validation flag and props are currently mutative. We put them on + // an external backing store so that we can freeze the whole object. + // This can be replaced with a WeakMap once they are implemented in + // commonly used development environments. + this._store = {props: props, originalProps: assign({}, props)}; + + // To make comparing ReactElements easier for testing purposes, we make + // the validation flag non-enumerable (where possible, which should + // include every environment we run tests in), so the test framework + // ignores it. + try { + Object.defineProperty(this._store, 'validated', { + configurable: false, + enumerable: false, + writable: true + }); + } catch (x) { + } + this._store.validated = false; + + // We're not allowed to set props directly on the object so we early + // return and rely on the prototype membrane to forward to the backing + // store. + if (useMutationMembrane) { + Object.freeze(this); + return; + } + } + + this.props = props; +}; + +// We intentionally don't expose the function on the constructor property. +// ReactElement should be indistinguishable from a plain object. +ReactElement.prototype = { + _isReactElement: true +}; + +if ("production" !== "development") { + defineMutationMembrane(ReactElement.prototype); +} + +ReactElement.createElement = function(type, config, children) { + var propName; + + // Reserved names are extracted + var props = {}; + + var key = null; + var ref = null; + + if (config != null) { + ref = config.ref === undefined ? null : config.ref; + key = config.key === undefined ? null : '' + config.key; + // Remaining properties are added to a new props object + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + // Resolve default props + if (type && type.defaultProps) { + var defaultProps = type.defaultProps; + for (propName in defaultProps) { + if (typeof props[propName] === 'undefined') { + props[propName] = defaultProps[propName]; + } + } + } + + return new ReactElement( + type, + key, + ref, + ReactCurrentOwner.current, + ReactContext.current, + props + ); +}; + +ReactElement.createFactory = function(type) { + var factory = ReactElement.createElement.bind(null, type); + // Expose the type on the factory and the prototype so that it can be + // easily accessed on elements. E.g. <Foo />.type === Foo.type. + // This should not be named `constructor` since this may not be the function + // that created the element, and it may not even be a constructor. + // Legacy hook TODO: Warn if this is accessed + factory.type = type; + return factory; +}; + +ReactElement.cloneAndReplaceProps = function(oldElement, newProps) { + var newElement = new ReactElement( + oldElement.type, + oldElement.key, + oldElement.ref, + oldElement._owner, + oldElement._context, + newProps + ); + + if ("production" !== "development") { + // If the key on the original is valid, then the clone is valid + newElement._store.validated = oldElement._store.validated; + } + return newElement; +}; + +ReactElement.cloneElement = function(element, config, children) { + var propName; + + // Original props are copied + var props = assign({}, element.props); + + // Reserved names are extracted + var key = element.key; + var ref = element.ref; + + // Owner will be preserved, unless ref is overridden + var owner = element._owner; + + if (config != null) { + if (config.ref !== undefined) { + // Silently steal the ref from the parent. + ref = config.ref; + owner = ReactCurrentOwner.current; + } + if (config.key !== undefined) { + key = '' + config.key; + } + // Remaining properties override existing props + for (propName in config) { + if (config.hasOwnProperty(propName) && + !RESERVED_PROPS.hasOwnProperty(propName)) { + props[propName] = config[propName]; + } + } + } + + // Children can be more than one argument, and those are transferred onto + // the newly allocated props object. + var childrenLength = arguments.length - 2; + if (childrenLength === 1) { + props.children = children; + } else if (childrenLength > 1) { + var childArray = Array(childrenLength); + for (var i = 0; i < childrenLength; i++) { + childArray[i] = arguments[i + 2]; + } + props.children = childArray; + } + + return new ReactElement( + element.type, + key, + ref, + owner, + element._context, + props + ); +}; + +/** + * @param {?object} object + * @return {boolean} True if `object` is a valid component. + * @final + */ +ReactElement.isValidElement = function(object) { + // ReactTestUtils is often used outside of beforeEach where as React is + // within it. This leads to two different instances of React on the same + // page. To identify a element from a different React instance we use + // a flag instead of an instanceof check. + var isElement = !!(object && object._isReactElement); + // if (isElement && !(object instanceof ReactElement)) { + // This is an indicator that you're using multiple versions of React at the + // same time. This will screw with ownership and stuff. Fix it, please. + // TODO: We could possibly warn here. + // } + return isElement; +}; + +module.exports = ReactElement; + +},{"154":154,"27":27,"38":38,"39":39}],58:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactElementValidator + */ + +/** + * ReactElementValidator provides a wrapper around a element factory + * which validates the props passed to the element. This is intended to be + * used only in DEV and could be replaced by a static type checker for languages + * that support it. + */ + +'use strict'; + +var ReactElement = _dereq_(57); +var ReactFragment = _dereq_(63); +var ReactPropTypeLocations = _dereq_(77); +var ReactPropTypeLocationNames = _dereq_(76); +var ReactCurrentOwner = _dereq_(39); +var ReactNativeComponent = _dereq_(73); + +var getIteratorFn = _dereq_(126); +var invariant = _dereq_(135); +var warning = _dereq_(154); + +function getDeclarationErrorAddendum() { + if (ReactCurrentOwner.current) { + var name = ReactCurrentOwner.current.getName(); + if (name) { + return ' Check the render method of `' + name + '`.'; + } + } + return ''; +} + +/** + * Warn if there's no key explicitly set on dynamic arrays of children or + * object keys are not valid. This allows us to keep track of children between + * updates. + */ +var ownerHasKeyUseWarning = {}; + +var loggedTypeFailures = {}; + +var NUMERIC_PROPERTY_REGEX = /^\d+$/; + +/** + * Gets the instance's name for use in warnings. + * + * @internal + * @return {?string} Display name or undefined + */ +function getName(instance) { + var publicInstance = instance && instance.getPublicInstance(); + if (!publicInstance) { + return undefined; + } + var constructor = publicInstance.constructor; + if (!constructor) { + return undefined; + } + return constructor.displayName || constructor.name || undefined; +} + +/** + * Gets the current owner's displayName for use in warnings. + * + * @internal + * @return {?string} Display name or undefined + */ +function getCurrentOwnerDisplayName() { + var current = ReactCurrentOwner.current; + return ( + current && getName(current) || undefined + ); +} + +/** + * Warn if the element doesn't have an explicit key assigned to it. + * This element is in an array. The array could grow and shrink or be + * reordered. All children that haven't already been validated are required to + * have a "key" property assigned to it. + * + * @internal + * @param {ReactElement} element Element that requires a key. + * @param {*} parentType element's parent's type. + */ +function validateExplicitKey(element, parentType) { + if (element._store.validated || element.key != null) { + return; + } + element._store.validated = true; + + warnAndMonitorForKeyUse( + 'Each child in an array or iterator should have a unique "key" prop.', + element, + parentType + ); +} + +/** + * Warn if the key is being defined as an object property but has an incorrect + * value. + * + * @internal + * @param {string} name Property name of the key. + * @param {ReactElement} element Component that requires a key. + * @param {*} parentType element's parent's type. + */ +function validatePropertyKey(name, element, parentType) { + if (!NUMERIC_PROPERTY_REGEX.test(name)) { + return; + } + warnAndMonitorForKeyUse( + 'Child objects should have non-numeric keys so ordering is preserved.', + element, + parentType + ); +} + +/** + * Shared warning and monitoring code for the key warnings. + * + * @internal + * @param {string} message The base warning that gets output. + * @param {ReactElement} element Component that requires a key. + * @param {*} parentType element's parent's type. + */ +function warnAndMonitorForKeyUse(message, element, parentType) { + var ownerName = getCurrentOwnerDisplayName(); + var parentName = typeof parentType === 'string' ? + parentType : parentType.displayName || parentType.name; + + var useName = ownerName || parentName; + var memoizer = ownerHasKeyUseWarning[message] || ( + (ownerHasKeyUseWarning[message] = {}) + ); + if (memoizer.hasOwnProperty(useName)) { + return; + } + memoizer[useName] = true; + + var parentOrOwnerAddendum = + ownerName ? (" Check the render method of " + ownerName + ".") : + parentName ? (" Check the React.render call using <" + parentName + ">.") : + ''; + + // Usually the current owner is the offender, but if it accepts children as a + // property, it may be the creator of the child that's responsible for + // assigning it a key. + var childOwnerAddendum = ''; + if (element && + element._owner && + element._owner !== ReactCurrentOwner.current) { + // Name of the component that originally created this child. + var childOwnerName = getName(element._owner); + + childOwnerAddendum = (" It was passed a child from " + childOwnerName + "."); + } + + ("production" !== "development" ? warning( + false, + message + '%s%s See http://fb.me/react-warning-keys for more information.', + parentOrOwnerAddendum, + childOwnerAddendum + ) : null); +} + +/** + * Ensure that every element either is passed in a static location, in an + * array with an explicit keys property defined, or in an object literal + * with valid key property. + * + * @internal + * @param {ReactNode} node Statically passed child of any type. + * @param {*} parentType node's parent's type. + */ +function validateChildKeys(node, parentType) { + if (Array.isArray(node)) { + for (var i = 0; i < node.length; i++) { + var child = node[i]; + if (ReactElement.isValidElement(child)) { + validateExplicitKey(child, parentType); + } + } + } else if (ReactElement.isValidElement(node)) { + // This element was passed in a valid location. + node._store.validated = true; + } else if (node) { + var iteratorFn = getIteratorFn(node); + // Entry iterators provide implicit keys. + if (iteratorFn) { + if (iteratorFn !== node.entries) { + var iterator = iteratorFn.call(node); + var step; + while (!(step = iterator.next()).done) { + if (ReactElement.isValidElement(step.value)) { + validateExplicitKey(step.value, parentType); + } + } + } + } else if (typeof node === 'object') { + var fragment = ReactFragment.extractIfFragment(node); + for (var key in fragment) { + if (fragment.hasOwnProperty(key)) { + validatePropertyKey(key, fragment[key], parentType); + } + } + } + } +} + +/** + * Assert that the props are valid + * + * @param {string} componentName Name of the component for error messages. + * @param {object} propTypes Map of prop name to a ReactPropType + * @param {object} props + * @param {string} location e.g. "prop", "context", "child context" + * @private + */ +function checkPropTypes(componentName, propTypes, props, location) { + for (var propName in propTypes) { + if (propTypes.hasOwnProperty(propName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + ("production" !== "development" ? invariant( + typeof propTypes[propName] === 'function', + '%s: %s type `%s` is invalid; it must be a function, usually from ' + + 'React.PropTypes.', + componentName || 'React class', + ReactPropTypeLocationNames[location], + propName + ) : invariant(typeof propTypes[propName] === 'function')); + error = propTypes[propName](props, propName, componentName, location); + } catch (ex) { + error = ex; + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + + var addendum = getDeclarationErrorAddendum(this); + ("production" !== "development" ? warning(false, 'Failed propType: %s%s', error.message, addendum) : null); + } + } + } +} + +var warnedPropsMutations = {}; + +/** + * Warn about mutating props when setting `propName` on `element`. + * + * @param {string} propName The string key within props that was set + * @param {ReactElement} element + */ +function warnForPropsMutation(propName, element) { + var type = element.type; + var elementName = typeof type === 'string' ? type : type.displayName; + var ownerName = element._owner ? + element._owner.getPublicInstance().constructor.displayName : null; + + var warningKey = propName + '|' + elementName + '|' + ownerName; + if (warnedPropsMutations.hasOwnProperty(warningKey)) { + return; + } + warnedPropsMutations[warningKey] = true; + + var elementInfo = ''; + if (elementName) { + elementInfo = ' <' + elementName + ' />'; + } + var ownerInfo = ''; + if (ownerName) { + ownerInfo = ' The element was created by ' + ownerName + '.'; + } + + ("production" !== "development" ? warning( + false, + 'Don\'t set .props.%s of the React component%s. ' + + 'Instead, specify the correct value when ' + + 'initially creating the element.%s', + propName, + elementInfo, + ownerInfo + ) : null); +} + +// Inline Object.is polyfill +function is(a, b) { + if (a !== a) { + // NaN + return b !== b; + } + if (a === 0 && b === 0) { + // +-0 + return 1 / a === 1 / b; + } + return a === b; +} + +/** + * Given an element, check if its props have been mutated since element + * creation (or the last call to this function). In particular, check if any + * new props have been added, which we can't directly catch by defining warning + * properties on the props object. + * + * @param {ReactElement} element + */ +function checkAndWarnForMutatedProps(element) { + if (!element._store) { + // Element was created using `new ReactElement` directly or with + // `ReactElement.createElement`; skip mutation checking + return; + } + + var originalProps = element._store.originalProps; + var props = element.props; + + for (var propName in props) { + if (props.hasOwnProperty(propName)) { + if (!originalProps.hasOwnProperty(propName) || + !is(originalProps[propName], props[propName])) { + warnForPropsMutation(propName, element); + + // Copy over the new value so that the two props objects match again + originalProps[propName] = props[propName]; + } + } + } +} + +/** + * Given an element, validate that its props follow the propTypes definition, + * provided by the type. + * + * @param {ReactElement} element + */ +function validatePropTypes(element) { + if (element.type == null) { + // This has already warned. Don't throw. + return; + } + // Extract the component class from the element. Converts string types + // to a composite class which may have propTypes. + // TODO: Validating a string's propTypes is not decoupled from the + // rendering target which is problematic. + var componentClass = ReactNativeComponent.getComponentClassForElement( + element + ); + var name = componentClass.displayName || componentClass.name; + if (componentClass.propTypes) { + checkPropTypes( + name, + componentClass.propTypes, + element.props, + ReactPropTypeLocations.prop + ); + } + if (typeof componentClass.getDefaultProps === 'function') { + ("production" !== "development" ? warning( + componentClass.getDefaultProps.isReactClassApproved, + 'getDefaultProps is only used on classic React.createClass ' + + 'definitions. Use a static property named `defaultProps` instead.' + ) : null); + } +} + +var ReactElementValidator = { + + checkAndWarnForMutatedProps: checkAndWarnForMutatedProps, + + createElement: function(type, props, children) { + // We warn in this case but don't throw. We expect the element creation to + // succeed and there will likely be errors in render. + ("production" !== "development" ? warning( + type != null, + 'React.createElement: type should not be null or undefined. It should ' + + 'be a string (for DOM elements) or a ReactClass (for composite ' + + 'components).' + ) : null); + + var element = ReactElement.createElement.apply(this, arguments); + + // The result can be nullish if a mock or a custom function is used. + // TODO: Drop this when these are no longer allowed as the type argument. + if (element == null) { + return element; + } + + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], type); + } + + validatePropTypes(element); + + return element; + }, + + createFactory: function(type) { + var validatedFactory = ReactElementValidator.createElement.bind( + null, + type + ); + // Legacy hook TODO: Warn if this is accessed + validatedFactory.type = type; + + if ("production" !== "development") { + try { + Object.defineProperty( + validatedFactory, + 'type', + { + enumerable: false, + get: function() { + ("production" !== "development" ? warning( + false, + 'Factory.type is deprecated. Access the class directly ' + + 'before passing it to createFactory.' + ) : null); + Object.defineProperty(this, 'type', { + value: type + }); + return type; + } + } + ); + } catch (x) { + // IE will fail on defineProperty (es5-shim/sham too) + } + } + + + return validatedFactory; + }, + + cloneElement: function(element, props, children) { + var newElement = ReactElement.cloneElement.apply(this, arguments); + for (var i = 2; i < arguments.length; i++) { + validateChildKeys(arguments[i], newElement.type); + } + validatePropTypes(newElement); + return newElement; + } + +}; + +module.exports = ReactElementValidator; + +},{"126":126,"135":135,"154":154,"39":39,"57":57,"63":63,"73":73,"76":76,"77":77}],59:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEmptyComponent + */ + +'use strict'; + +var ReactElement = _dereq_(57); +var ReactInstanceMap = _dereq_(67); + +var invariant = _dereq_(135); + +var component; +// This registry keeps track of the React IDs of the components that rendered to +// `null` (in reality a placeholder such as `noscript`) +var nullComponentIDsRegistry = {}; + +var ReactEmptyComponentInjection = { + injectEmptyComponent: function(emptyComponent) { + component = ReactElement.createFactory(emptyComponent); + } +}; + +var ReactEmptyComponentType = function() {}; +ReactEmptyComponentType.prototype.componentDidMount = function() { + var internalInstance = ReactInstanceMap.get(this); + // TODO: Make sure we run these methods in the correct order, we shouldn't + // need this check. We're going to assume if we're here it means we ran + // componentWillUnmount already so there is no internal instance (it gets + // removed as part of the unmounting process). + if (!internalInstance) { + return; + } + registerNullComponentID(internalInstance._rootNodeID); +}; +ReactEmptyComponentType.prototype.componentWillUnmount = function() { + var internalInstance = ReactInstanceMap.get(this); + // TODO: Get rid of this check. See TODO in componentDidMount. + if (!internalInstance) { + return; + } + deregisterNullComponentID(internalInstance._rootNodeID); +}; +ReactEmptyComponentType.prototype.render = function() { + ("production" !== "development" ? invariant( + component, + 'Trying to return null from a render, but no null placeholder component ' + + 'was injected.' + ) : invariant(component)); + return component(); +}; + +var emptyElement = ReactElement.createElement(ReactEmptyComponentType); + +/** + * Mark the component as having rendered to null. + * @param {string} id Component's `_rootNodeID`. + */ +function registerNullComponentID(id) { + nullComponentIDsRegistry[id] = true; +} + +/** + * Unmark the component as having rendered to null: it renders to something now. + * @param {string} id Component's `_rootNodeID`. + */ +function deregisterNullComponentID(id) { + delete nullComponentIDsRegistry[id]; +} + +/** + * @param {string} id Component's `_rootNodeID`. + * @return {boolean} True if the component is rendered to null. + */ +function isNullComponentID(id) { + return !!nullComponentIDsRegistry[id]; +} + +var ReactEmptyComponent = { + emptyElement: emptyElement, + injection: ReactEmptyComponentInjection, + isNullComponentID: isNullComponentID +}; + +module.exports = ReactEmptyComponent; + +},{"135":135,"57":57,"67":67}],60:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactErrorUtils + * @typechecks + */ + +"use strict"; + +var ReactErrorUtils = { + /** + * Creates a guarded version of a function. This is supposed to make debugging + * of event handlers easier. To aid debugging with the browser's debugger, + * this currently simply returns the original function. + * + * @param {function} func Function to be executed + * @param {string} name The name of the guard + * @return {function} + */ + guard: function(func, name) { + return func; + } +}; + +module.exports = ReactErrorUtils; + +},{}],61:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEventEmitterMixin + */ + +'use strict'; + +var EventPluginHub = _dereq_(17); + +function runEventQueueInBatch(events) { + EventPluginHub.enqueueEvents(events); + EventPluginHub.processEventQueue(); +} + +var ReactEventEmitterMixin = { + + /** + * Streams a fired top-level event to `EventPluginHub` where plugins have the + * opportunity to create `ReactEvent`s to be dispatched. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {object} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native environment event. + */ + handleTopLevel: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var events = EventPluginHub.extractEvents( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent + ); + + runEventQueueInBatch(events); + } +}; + +module.exports = ReactEventEmitterMixin; + +},{"17":17}],62:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactEventListener + * @typechecks static-only + */ + +'use strict'; + +var EventListener = _dereq_(16); +var ExecutionEnvironment = _dereq_(21); +var PooledClass = _dereq_(28); +var ReactInstanceHandles = _dereq_(66); +var ReactMount = _dereq_(70); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); +var getEventTarget = _dereq_(125); +var getUnboundedScrollPosition = _dereq_(131); + +/** + * Finds the parent React component of `node`. + * + * @param {*} node + * @return {?DOMEventTarget} Parent container, or `null` if the specified node + * is not nested. + */ +function findParent(node) { + // TODO: It may be a good idea to cache this to prevent unnecessary DOM + // traversal, but caching is difficult to do correctly without using a + // mutation observer to listen for all DOM changes. + var nodeID = ReactMount.getID(node); + var rootID = ReactInstanceHandles.getReactRootIDFromNodeID(nodeID); + var container = ReactMount.findReactContainerForID(rootID); + var parent = ReactMount.getFirstReactDOM(container); + return parent; +} + +// Used to store ancestor hierarchy in top level callback +function TopLevelCallbackBookKeeping(topLevelType, nativeEvent) { + this.topLevelType = topLevelType; + this.nativeEvent = nativeEvent; + this.ancestors = []; +} +assign(TopLevelCallbackBookKeeping.prototype, { + destructor: function() { + this.topLevelType = null; + this.nativeEvent = null; + this.ancestors.length = 0; + } +}); +PooledClass.addPoolingTo( + TopLevelCallbackBookKeeping, + PooledClass.twoArgumentPooler +); + +function handleTopLevelImpl(bookKeeping) { + var topLevelTarget = ReactMount.getFirstReactDOM( + getEventTarget(bookKeeping.nativeEvent) + ) || window; + + // Loop through the hierarchy, in case there's any nested components. + // It's important that we build the array of ancestors before calling any + // event handlers, because event handlers can modify the DOM, leading to + // inconsistencies with ReactMount's node cache. See #1105. + var ancestor = topLevelTarget; + while (ancestor) { + bookKeeping.ancestors.push(ancestor); + ancestor = findParent(ancestor); + } + + for (var i = 0, l = bookKeeping.ancestors.length; i < l; i++) { + topLevelTarget = bookKeeping.ancestors[i]; + var topLevelTargetID = ReactMount.getID(topLevelTarget) || ''; + ReactEventListener._handleTopLevel( + bookKeeping.topLevelType, + topLevelTarget, + topLevelTargetID, + bookKeeping.nativeEvent + ); + } +} + +function scrollValueMonitor(cb) { + var scrollPosition = getUnboundedScrollPosition(window); + cb(scrollPosition); +} + +var ReactEventListener = { + _enabled: true, + _handleTopLevel: null, + + WINDOW_HANDLE: ExecutionEnvironment.canUseDOM ? window : null, + + setHandleTopLevel: function(handleTopLevel) { + ReactEventListener._handleTopLevel = handleTopLevel; + }, + + setEnabled: function(enabled) { + ReactEventListener._enabled = !!enabled; + }, + + isEnabled: function() { + return ReactEventListener._enabled; + }, + + + /** + * Traps top-level events by using event bubbling. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} handle Element on which to attach listener. + * @return {object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapBubbledEvent: function(topLevelType, handlerBaseName, handle) { + var element = handle; + if (!element) { + return null; + } + return EventListener.listen( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType) + ); + }, + + /** + * Traps a top-level event by using event capturing. + * + * @param {string} topLevelType Record from `EventConstants`. + * @param {string} handlerBaseName Event name (e.g. "click"). + * @param {object} handle Element on which to attach listener. + * @return {object} An object with a remove function which will forcefully + * remove the listener. + * @internal + */ + trapCapturedEvent: function(topLevelType, handlerBaseName, handle) { + var element = handle; + if (!element) { + return null; + } + return EventListener.capture( + element, + handlerBaseName, + ReactEventListener.dispatchEvent.bind(null, topLevelType) + ); + }, + + monitorScrollValue: function(refresh) { + var callback = scrollValueMonitor.bind(null, refresh); + EventListener.listen(window, 'scroll', callback); + }, + + dispatchEvent: function(topLevelType, nativeEvent) { + if (!ReactEventListener._enabled) { + return; + } + + var bookKeeping = TopLevelCallbackBookKeeping.getPooled( + topLevelType, + nativeEvent + ); + try { + // Event queue being processed in the same cycle allows + // `preventDefault`. + ReactUpdates.batchedUpdates(handleTopLevelImpl, bookKeeping); + } finally { + TopLevelCallbackBookKeeping.release(bookKeeping); + } + } +}; + +module.exports = ReactEventListener; + +},{"125":125,"131":131,"16":16,"21":21,"27":27,"28":28,"66":66,"70":70,"87":87}],63:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * +* @providesModule ReactFragment +*/ + +'use strict'; + +var ReactElement = _dereq_(57); + +var warning = _dereq_(154); + +/** + * We used to allow keyed objects to serve as a collection of ReactElements, + * or nested sets. This allowed us a way to explicitly key a set a fragment of + * components. This is now being replaced with an opaque data structure. + * The upgrade path is to call React.addons.createFragment({ key: value }) to + * create a keyed fragment. The resulting data structure is opaque, for now. + */ + +if ("production" !== "development") { + var fragmentKey = '_reactFragment'; + var didWarnKey = '_reactDidWarn'; + var canWarnForReactFragment = false; + + try { + // Feature test. Don't even try to issue this warning if we can't use + // enumerable: false. + + var dummy = function() { + return 1; + }; + + Object.defineProperty( + {}, + fragmentKey, + {enumerable: false, value: true} + ); + + Object.defineProperty( + {}, + 'key', + {enumerable: true, get: dummy} + ); + + canWarnForReactFragment = true; + } catch (x) { } + + var proxyPropertyAccessWithWarning = function(obj, key) { + Object.defineProperty(obj, key, { + enumerable: true, + get: function() { + ("production" !== "development" ? warning( + this[didWarnKey], + 'A ReactFragment is an opaque type. Accessing any of its ' + + 'properties is deprecated. Pass it to one of the React.Children ' + + 'helpers.' + ) : null); + this[didWarnKey] = true; + return this[fragmentKey][key]; + }, + set: function(value) { + ("production" !== "development" ? warning( + this[didWarnKey], + 'A ReactFragment is an immutable opaque type. Mutating its ' + + 'properties is deprecated.' + ) : null); + this[didWarnKey] = true; + this[fragmentKey][key] = value; + } + }); + }; + + var issuedWarnings = {}; + + var didWarnForFragment = function(fragment) { + // We use the keys and the type of the value as a heuristic to dedupe the + // warning to avoid spamming too much. + var fragmentCacheKey = ''; + for (var key in fragment) { + fragmentCacheKey += key + ':' + (typeof fragment[key]) + ','; + } + var alreadyWarnedOnce = !!issuedWarnings[fragmentCacheKey]; + issuedWarnings[fragmentCacheKey] = true; + return alreadyWarnedOnce; + }; +} + +var ReactFragment = { + // Wrap a keyed object in an opaque proxy that warns you if you access any + // of its properties. + create: function(object) { + if ("production" !== "development") { + if (typeof object !== 'object' || !object || Array.isArray(object)) { + ("production" !== "development" ? warning( + false, + 'React.addons.createFragment only accepts a single object.', + object + ) : null); + return object; + } + if (ReactElement.isValidElement(object)) { + ("production" !== "development" ? warning( + false, + 'React.addons.createFragment does not accept a ReactElement ' + + 'without a wrapper object.' + ) : null); + return object; + } + if (canWarnForReactFragment) { + var proxy = {}; + Object.defineProperty(proxy, fragmentKey, { + enumerable: false, + value: object + }); + Object.defineProperty(proxy, didWarnKey, { + writable: true, + enumerable: false, + value: false + }); + for (var key in object) { + proxyPropertyAccessWithWarning(proxy, key); + } + Object.preventExtensions(proxy); + return proxy; + } + } + return object; + }, + // Extract the original keyed object from the fragment opaque type. Warn if + // a plain object is passed here. + extract: function(fragment) { + if ("production" !== "development") { + if (canWarnForReactFragment) { + if (!fragment[fragmentKey]) { + ("production" !== "development" ? warning( + didWarnForFragment(fragment), + 'Any use of a keyed object should be wrapped in ' + + 'React.addons.createFragment(object) before being passed as a ' + + 'child.' + ) : null); + return fragment; + } + return fragment[fragmentKey]; + } + } + return fragment; + }, + // Check if this is a fragment and if so, extract the keyed object. If it + // is a fragment-like object, warn that it should be wrapped. Ignore if we + // can't determine what kind of object this is. + extractIfFragment: function(fragment) { + if ("production" !== "development") { + if (canWarnForReactFragment) { + // If it is the opaque type, return the keyed object. + if (fragment[fragmentKey]) { + return fragment[fragmentKey]; + } + // Otherwise, check each property if it has an element, if it does + // it is probably meant as a fragment, so we can warn early. Defer, + // the warning to extract. + for (var key in fragment) { + if (fragment.hasOwnProperty(key) && + ReactElement.isValidElement(fragment[key])) { + // This looks like a fragment object, we should provide an + // early warning. + return ReactFragment.extract(fragment); + } + } + } + } + return fragment; + } +}; + +module.exports = ReactFragment; + +},{"154":154,"57":57}],64:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInjection + */ + +'use strict'; + +var DOMProperty = _dereq_(10); +var EventPluginHub = _dereq_(17); +var ReactComponentEnvironment = _dereq_(36); +var ReactClass = _dereq_(33); +var ReactEmptyComponent = _dereq_(59); +var ReactBrowserEventEmitter = _dereq_(30); +var ReactNativeComponent = _dereq_(73); +var ReactDOMComponent = _dereq_(42); +var ReactPerf = _dereq_(75); +var ReactRootIndex = _dereq_(83); +var ReactUpdates = _dereq_(87); + +var ReactInjection = { + Component: ReactComponentEnvironment.injection, + Class: ReactClass.injection, + DOMComponent: ReactDOMComponent.injection, + DOMProperty: DOMProperty.injection, + EmptyComponent: ReactEmptyComponent.injection, + EventPluginHub: EventPluginHub.injection, + EventEmitter: ReactBrowserEventEmitter.injection, + NativeComponent: ReactNativeComponent.injection, + Perf: ReactPerf.injection, + RootIndex: ReactRootIndex.injection, + Updates: ReactUpdates.injection +}; + +module.exports = ReactInjection; + +},{"10":10,"17":17,"30":30,"33":33,"36":36,"42":42,"59":59,"73":73,"75":75,"83":83,"87":87}],65:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInputSelection + */ + +'use strict'; + +var ReactDOMSelection = _dereq_(50); + +var containsNode = _dereq_(109); +var focusNode = _dereq_(119); +var getActiveElement = _dereq_(121); + +function isInDocument(node) { + return containsNode(document.documentElement, node); +} + +/** + * @ReactInputSelection: React input selection module. Based on Selection.js, + * but modified to be suitable for react and has a couple of bug fixes (doesn't + * assume buttons have range selections allowed). + * Input selection module for React. + */ +var ReactInputSelection = { + + hasSelectionCapabilities: function(elem) { + return elem && ( + ((elem.nodeName === 'INPUT' && elem.type === 'text') || + elem.nodeName === 'TEXTAREA' || elem.contentEditable === 'true') + ); + }, + + getSelectionInformation: function() { + var focusedElem = getActiveElement(); + return { + focusedElem: focusedElem, + selectionRange: + ReactInputSelection.hasSelectionCapabilities(focusedElem) ? + ReactInputSelection.getSelection(focusedElem) : + null + }; + }, + + /** + * @restoreSelection: If any selection information was potentially lost, + * restore it. This is useful when performing operations that could remove dom + * nodes and place them back in, resulting in focus being lost. + */ + restoreSelection: function(priorSelectionInformation) { + var curFocusedElem = getActiveElement(); + var priorFocusedElem = priorSelectionInformation.focusedElem; + var priorSelectionRange = priorSelectionInformation.selectionRange; + if (curFocusedElem !== priorFocusedElem && + isInDocument(priorFocusedElem)) { + if (ReactInputSelection.hasSelectionCapabilities(priorFocusedElem)) { + ReactInputSelection.setSelection( + priorFocusedElem, + priorSelectionRange + ); + } + focusNode(priorFocusedElem); + } + }, + + /** + * @getSelection: Gets the selection bounds of a focused textarea, input or + * contentEditable node. + * -@input: Look up selection bounds of this input + * -@return {start: selectionStart, end: selectionEnd} + */ + getSelection: function(input) { + var selection; + + if ('selectionStart' in input) { + // Modern browser with input or textarea. + selection = { + start: input.selectionStart, + end: input.selectionEnd + }; + } else if (document.selection && input.nodeName === 'INPUT') { + // IE8 input. + var range = document.selection.createRange(); + // There can only be one selection per document in IE, so it must + // be in our element. + if (range.parentElement() === input) { + selection = { + start: -range.moveStart('character', -input.value.length), + end: -range.moveEnd('character', -input.value.length) + }; + } + } else { + // Content editable or old IE textarea. + selection = ReactDOMSelection.getOffsets(input); + } + + return selection || {start: 0, end: 0}; + }, + + /** + * @setSelection: Sets the selection bounds of a textarea or input and focuses + * the input. + * -@input Set selection bounds of this input or textarea + * -@offsets Object of same form that is returned from get* + */ + setSelection: function(input, offsets) { + var start = offsets.start; + var end = offsets.end; + if (typeof end === 'undefined') { + end = start; + } + + if ('selectionStart' in input) { + input.selectionStart = start; + input.selectionEnd = Math.min(end, input.value.length); + } else if (document.selection && input.nodeName === 'INPUT') { + var range = input.createTextRange(); + range.collapse(true); + range.moveStart('character', start); + range.moveEnd('character', end - start); + range.select(); + } else { + ReactDOMSelection.setOffsets(input, offsets); + } + } +}; + +module.exports = ReactInputSelection; + +},{"109":109,"119":119,"121":121,"50":50}],66:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInstanceHandles + * @typechecks static-only + */ + +'use strict'; + +var ReactRootIndex = _dereq_(83); + +var invariant = _dereq_(135); + +var SEPARATOR = '.'; +var SEPARATOR_LENGTH = SEPARATOR.length; + +/** + * Maximum depth of traversals before we consider the possibility of a bad ID. + */ +var MAX_TREE_DEPTH = 100; + +/** + * Creates a DOM ID prefix to use when mounting React components. + * + * @param {number} index A unique integer + * @return {string} React root ID. + * @internal + */ +function getReactRootIDString(index) { + return SEPARATOR + index.toString(36); +} + +/** + * Checks if a character in the supplied ID is a separator or the end. + * + * @param {string} id A React DOM ID. + * @param {number} index Index of the character to check. + * @return {boolean} True if the character is a separator or end of the ID. + * @private + */ +function isBoundary(id, index) { + return id.charAt(index) === SEPARATOR || index === id.length; +} + +/** + * Checks if the supplied string is a valid React DOM ID. + * + * @param {string} id A React DOM ID, maybe. + * @return {boolean} True if the string is a valid React DOM ID. + * @private + */ +function isValidID(id) { + return id === '' || ( + id.charAt(0) === SEPARATOR && id.charAt(id.length - 1) !== SEPARATOR + ); +} + +/** + * Checks if the first ID is an ancestor of or equal to the second ID. + * + * @param {string} ancestorID + * @param {string} descendantID + * @return {boolean} True if `ancestorID` is an ancestor of `descendantID`. + * @internal + */ +function isAncestorIDOf(ancestorID, descendantID) { + return ( + descendantID.indexOf(ancestorID) === 0 && + isBoundary(descendantID, ancestorID.length) + ); +} + +/** + * Gets the parent ID of the supplied React DOM ID, `id`. + * + * @param {string} id ID of a component. + * @return {string} ID of the parent, or an empty string. + * @private + */ +function getParentID(id) { + return id ? id.substr(0, id.lastIndexOf(SEPARATOR)) : ''; +} + +/** + * Gets the next DOM ID on the tree path from the supplied `ancestorID` to the + * supplied `destinationID`. If they are equal, the ID is returned. + * + * @param {string} ancestorID ID of an ancestor node of `destinationID`. + * @param {string} destinationID ID of the destination node. + * @return {string} Next ID on the path from `ancestorID` to `destinationID`. + * @private + */ +function getNextDescendantID(ancestorID, destinationID) { + ("production" !== "development" ? invariant( + isValidID(ancestorID) && isValidID(destinationID), + 'getNextDescendantID(%s, %s): Received an invalid React DOM ID.', + ancestorID, + destinationID + ) : invariant(isValidID(ancestorID) && isValidID(destinationID))); + ("production" !== "development" ? invariant( + isAncestorIDOf(ancestorID, destinationID), + 'getNextDescendantID(...): React has made an invalid assumption about ' + + 'the DOM hierarchy. Expected `%s` to be an ancestor of `%s`.', + ancestorID, + destinationID + ) : invariant(isAncestorIDOf(ancestorID, destinationID))); + if (ancestorID === destinationID) { + return ancestorID; + } + // Skip over the ancestor and the immediate separator. Traverse until we hit + // another separator or we reach the end of `destinationID`. + var start = ancestorID.length + SEPARATOR_LENGTH; + var i; + for (i = start; i < destinationID.length; i++) { + if (isBoundary(destinationID, i)) { + break; + } + } + return destinationID.substr(0, i); +} + +/** + * Gets the nearest common ancestor ID of two IDs. + * + * Using this ID scheme, the nearest common ancestor ID is the longest common + * prefix of the two IDs that immediately preceded a "marker" in both strings. + * + * @param {string} oneID + * @param {string} twoID + * @return {string} Nearest common ancestor ID, or the empty string if none. + * @private + */ +function getFirstCommonAncestorID(oneID, twoID) { + var minLength = Math.min(oneID.length, twoID.length); + if (minLength === 0) { + return ''; + } + var lastCommonMarkerIndex = 0; + // Use `<=` to traverse until the "EOL" of the shorter string. + for (var i = 0; i <= minLength; i++) { + if (isBoundary(oneID, i) && isBoundary(twoID, i)) { + lastCommonMarkerIndex = i; + } else if (oneID.charAt(i) !== twoID.charAt(i)) { + break; + } + } + var longestCommonID = oneID.substr(0, lastCommonMarkerIndex); + ("production" !== "development" ? invariant( + isValidID(longestCommonID), + 'getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s', + oneID, + twoID, + longestCommonID + ) : invariant(isValidID(longestCommonID))); + return longestCommonID; +} + +/** + * Traverses the parent path between two IDs (either up or down). The IDs must + * not be the same, and there must exist a parent path between them. If the + * callback returns `false`, traversal is stopped. + * + * @param {?string} start ID at which to start traversal. + * @param {?string} stop ID at which to end traversal. + * @param {function} cb Callback to invoke each ID with. + * @param {?boolean} skipFirst Whether or not to skip the first node. + * @param {?boolean} skipLast Whether or not to skip the last node. + * @private + */ +function traverseParentPath(start, stop, cb, arg, skipFirst, skipLast) { + start = start || ''; + stop = stop || ''; + ("production" !== "development" ? invariant( + start !== stop, + 'traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.', + start + ) : invariant(start !== stop)); + var traverseUp = isAncestorIDOf(stop, start); + ("production" !== "development" ? invariant( + traverseUp || isAncestorIDOf(start, stop), + 'traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do ' + + 'not have a parent path.', + start, + stop + ) : invariant(traverseUp || isAncestorIDOf(start, stop))); + // Traverse from `start` to `stop` one depth at a time. + var depth = 0; + var traverse = traverseUp ? getParentID : getNextDescendantID; + for (var id = start; /* until break */; id = traverse(id, stop)) { + var ret; + if ((!skipFirst || id !== start) && (!skipLast || id !== stop)) { + ret = cb(id, traverseUp, arg); + } + if (ret === false || id === stop) { + // Only break //after// visiting `stop`. + break; + } + ("production" !== "development" ? invariant( + depth++ < MAX_TREE_DEPTH, + 'traverseParentPath(%s, %s, ...): Detected an infinite loop while ' + + 'traversing the React DOM ID tree. This may be due to malformed IDs: %s', + start, stop + ) : invariant(depth++ < MAX_TREE_DEPTH)); + } +} + +/** + * Manages the IDs assigned to DOM representations of React components. This + * uses a specific scheme in order to traverse the DOM efficiently (e.g. in + * order to simulate events). + * + * @internal + */ +var ReactInstanceHandles = { + + /** + * Constructs a React root ID + * @return {string} A React root ID. + */ + createReactRootID: function() { + return getReactRootIDString(ReactRootIndex.createReactRootIndex()); + }, + + /** + * Constructs a React ID by joining a root ID with a name. + * + * @param {string} rootID Root ID of a parent component. + * @param {string} name A component's name (as flattened children). + * @return {string} A React ID. + * @internal + */ + createReactID: function(rootID, name) { + return rootID + name; + }, + + /** + * Gets the DOM ID of the React component that is the root of the tree that + * contains the React component with the supplied DOM ID. + * + * @param {string} id DOM ID of a React component. + * @return {?string} DOM ID of the React component that is the root. + * @internal + */ + getReactRootIDFromNodeID: function(id) { + if (id && id.charAt(0) === SEPARATOR && id.length > 1) { + var index = id.indexOf(SEPARATOR, 1); + return index > -1 ? id.substr(0, index) : id; + } + return null; + }, + + /** + * Traverses the ID hierarchy and invokes the supplied `cb` on any IDs that + * should would receive a `mouseEnter` or `mouseLeave` event. + * + * NOTE: Does not invoke the callback on the nearest common ancestor because + * nothing "entered" or "left" that element. + * + * @param {string} leaveID ID being left. + * @param {string} enterID ID being entered. + * @param {function} cb Callback to invoke on each entered/left ID. + * @param {*} upArg Argument to invoke the callback with on left IDs. + * @param {*} downArg Argument to invoke the callback with on entered IDs. + * @internal + */ + traverseEnterLeave: function(leaveID, enterID, cb, upArg, downArg) { + var ancestorID = getFirstCommonAncestorID(leaveID, enterID); + if (ancestorID !== leaveID) { + traverseParentPath(leaveID, ancestorID, cb, upArg, false, true); + } + if (ancestorID !== enterID) { + traverseParentPath(ancestorID, enterID, cb, downArg, true, false); + } + }, + + /** + * Simulates the traversal of a two-phase, capture/bubble event dispatch. + * + * NOTE: This traversal happens on IDs without touching the DOM. + * + * @param {string} targetID ID of the target node. + * @param {function} cb Callback to invoke. + * @param {*} arg Argument to invoke the callback with. + * @internal + */ + traverseTwoPhase: function(targetID, cb, arg) { + if (targetID) { + traverseParentPath('', targetID, cb, arg, true, false); + traverseParentPath(targetID, '', cb, arg, false, true); + } + }, + + /** + * Traverse a node ID, calling the supplied `cb` for each ancestor ID. For + * example, passing `.0.$row-0.1` would result in `cb` getting called + * with `.0`, `.0.$row-0`, and `.0.$row-0.1`. + * + * NOTE: This traversal happens on IDs without touching the DOM. + * + * @param {string} targetID ID of the target node. + * @param {function} cb Callback to invoke. + * @param {*} arg Argument to invoke the callback with. + * @internal + */ + traverseAncestors: function(targetID, cb, arg) { + traverseParentPath('', targetID, cb, arg, true, false); + }, + + /** + * Exposed for unit testing. + * @private + */ + _getFirstCommonAncestorID: getFirstCommonAncestorID, + + /** + * Exposed for unit testing. + * @private + */ + _getNextDescendantID: getNextDescendantID, + + isAncestorIDOf: isAncestorIDOf, + + SEPARATOR: SEPARATOR + +}; + +module.exports = ReactInstanceHandles; + +},{"135":135,"83":83}],67:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactInstanceMap + */ + +'use strict'; + +/** + * `ReactInstanceMap` maintains a mapping from a public facing stateful + * instance (key) and the internal representation (value). This allows public + * methods to accept the user facing instance as an argument and map them back + * to internal methods. + */ + +// TODO: Replace this with ES6: var ReactInstanceMap = new Map(); +var ReactInstanceMap = { + + /** + * This API should be called `delete` but we'd have to make sure to always + * transform these to strings for IE support. When this transform is fully + * supported we can rename it. + */ + remove: function(key) { + key._reactInternalInstance = undefined; + }, + + get: function(key) { + return key._reactInternalInstance; + }, + + has: function(key) { + return key._reactInternalInstance !== undefined; + }, + + set: function(key, value) { + key._reactInternalInstance = value; + } + +}; + +module.exports = ReactInstanceMap; + +},{}],68:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactLifeCycle + */ + +'use strict'; + +/** + * This module manages the bookkeeping when a component is in the process + * of being mounted or being unmounted. This is used as a way to enforce + * invariants (or warnings) when it is not recommended to call + * setState/forceUpdate. + * + * currentlyMountingInstance: During the construction phase, it is not possible + * to trigger an update since the instance is not fully mounted yet. However, we + * currently allow this as a convenience for mutating the initial state. + * + * currentlyUnmountingInstance: During the unmounting phase, the instance is + * still mounted and can therefore schedule an update. However, this is not + * recommended and probably an error since it's about to be unmounted. + * Therefore we still want to trigger in an error for that case. + */ + +var ReactLifeCycle = { + currentlyMountingInstance: null, + currentlyUnmountingInstance: null +}; + +module.exports = ReactLifeCycle; + +},{}],69:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMarkupChecksum + */ + +'use strict'; + +var adler32 = _dereq_(106); + +var ReactMarkupChecksum = { + CHECKSUM_ATTR_NAME: 'data-react-checksum', + + /** + * @param {string} markup Markup string + * @return {string} Markup string with checksum attribute attached + */ + addChecksumToMarkup: function(markup) { + var checksum = adler32(markup); + return markup.replace( + '>', + ' ' + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + '="' + checksum + '">' + ); + }, + + /** + * @param {string} markup to use + * @param {DOMElement} element root React element + * @returns {boolean} whether or not the markup is the same + */ + canReuseMarkup: function(markup, element) { + var existingChecksum = element.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); + existingChecksum = existingChecksum && parseInt(existingChecksum, 10); + var markupChecksum = adler32(markup); + return markupChecksum === existingChecksum; + } +}; + +module.exports = ReactMarkupChecksum; + +},{"106":106}],70:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMount + */ + +'use strict'; + +var DOMProperty = _dereq_(10); +var ReactBrowserEventEmitter = _dereq_(30); +var ReactCurrentOwner = _dereq_(39); +var ReactElement = _dereq_(57); +var ReactElementValidator = _dereq_(58); +var ReactEmptyComponent = _dereq_(59); +var ReactInstanceHandles = _dereq_(66); +var ReactInstanceMap = _dereq_(67); +var ReactMarkupChecksum = _dereq_(69); +var ReactPerf = _dereq_(75); +var ReactReconciler = _dereq_(81); +var ReactUpdateQueue = _dereq_(86); +var ReactUpdates = _dereq_(87); + +var emptyObject = _dereq_(115); +var containsNode = _dereq_(109); +var getReactRootElementInContainer = _dereq_(129); +var instantiateReactComponent = _dereq_(134); +var invariant = _dereq_(135); +var setInnerHTML = _dereq_(148); +var shouldUpdateReactComponent = _dereq_(151); +var warning = _dereq_(154); + +var SEPARATOR = ReactInstanceHandles.SEPARATOR; + +var ATTR_NAME = DOMProperty.ID_ATTRIBUTE_NAME; +var nodeCache = {}; + +var ELEMENT_NODE_TYPE = 1; +var DOC_NODE_TYPE = 9; + +/** Mapping from reactRootID to React component instance. */ +var instancesByReactRootID = {}; + +/** Mapping from reactRootID to `container` nodes. */ +var containersByReactRootID = {}; + +if ("production" !== "development") { + /** __DEV__-only mapping from reactRootID to root elements. */ + var rootElementsByReactRootID = {}; +} + +// Used to store breadth-first search state in findComponentRoot. +var findComponentRootReusableArray = []; + +/** + * Finds the index of the first character + * that's not common between the two given strings. + * + * @return {number} the index of the character where the strings diverge + */ +function firstDifferenceIndex(string1, string2) { + var minLen = Math.min(string1.length, string2.length); + for (var i = 0; i < minLen; i++) { + if (string1.charAt(i) !== string2.charAt(i)) { + return i; + } + } + return string1.length === string2.length ? -1 : minLen; +} + +/** + * @param {DOMElement} container DOM element that may contain a React component. + * @return {?string} A "reactRoot" ID, if a React component is rendered. + */ +function getReactRootID(container) { + var rootElement = getReactRootElementInContainer(container); + return rootElement && ReactMount.getID(rootElement); +} + +/** + * Accessing node[ATTR_NAME] or calling getAttribute(ATTR_NAME) on a form + * element can return its control whose name or ID equals ATTR_NAME. All + * DOM nodes support `getAttributeNode` but this can also get called on + * other objects so just return '' if we're given something other than a + * DOM node (such as window). + * + * @param {?DOMElement|DOMWindow|DOMDocument|DOMTextNode} node DOM node. + * @return {string} ID of the supplied `domNode`. + */ +function getID(node) { + var id = internalGetID(node); + if (id) { + if (nodeCache.hasOwnProperty(id)) { + var cached = nodeCache[id]; + if (cached !== node) { + ("production" !== "development" ? invariant( + !isValid(cached, id), + 'ReactMount: Two valid but unequal nodes with the same `%s`: %s', + ATTR_NAME, id + ) : invariant(!isValid(cached, id))); + + nodeCache[id] = node; + } + } else { + nodeCache[id] = node; + } + } + + return id; +} + +function internalGetID(node) { + // If node is something like a window, document, or text node, none of + // which support attributes or a .getAttribute method, gracefully return + // the empty string, as if the attribute were missing. + return node && node.getAttribute && node.getAttribute(ATTR_NAME) || ''; +} + +/** + * Sets the React-specific ID of the given node. + * + * @param {DOMElement} node The DOM node whose ID will be set. + * @param {string} id The value of the ID attribute. + */ +function setID(node, id) { + var oldID = internalGetID(node); + if (oldID !== id) { + delete nodeCache[oldID]; + } + node.setAttribute(ATTR_NAME, id); + nodeCache[id] = node; +} + +/** + * Finds the node with the supplied React-generated DOM ID. + * + * @param {string} id A React-generated DOM ID. + * @return {DOMElement} DOM node with the suppled `id`. + * @internal + */ +function getNode(id) { + if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { + nodeCache[id] = ReactMount.findReactNodeByID(id); + } + return nodeCache[id]; +} + +/** + * Finds the node with the supplied public React instance. + * + * @param {*} instance A public React instance. + * @return {?DOMElement} DOM node with the suppled `id`. + * @internal + */ +function getNodeFromInstance(instance) { + var id = ReactInstanceMap.get(instance)._rootNodeID; + if (ReactEmptyComponent.isNullComponentID(id)) { + return null; + } + if (!nodeCache.hasOwnProperty(id) || !isValid(nodeCache[id], id)) { + nodeCache[id] = ReactMount.findReactNodeByID(id); + } + return nodeCache[id]; +} + +/** + * A node is "valid" if it is contained by a currently mounted container. + * + * This means that the node does not have to be contained by a document in + * order to be considered valid. + * + * @param {?DOMElement} node The candidate DOM node. + * @param {string} id The expected ID of the node. + * @return {boolean} Whether the node is contained by a mounted container. + */ +function isValid(node, id) { + if (node) { + ("production" !== "development" ? invariant( + internalGetID(node) === id, + 'ReactMount: Unexpected modification of `%s`', + ATTR_NAME + ) : invariant(internalGetID(node) === id)); + + var container = ReactMount.findReactContainerForID(id); + if (container && containsNode(container, node)) { + return true; + } + } + + return false; +} + +/** + * Causes the cache to forget about one React-specific ID. + * + * @param {string} id The ID to forget. + */ +function purgeID(id) { + delete nodeCache[id]; +} + +var deepestNodeSoFar = null; +function findDeepestCachedAncestorImpl(ancestorID) { + var ancestor = nodeCache[ancestorID]; + if (ancestor && isValid(ancestor, ancestorID)) { + deepestNodeSoFar = ancestor; + } else { + // This node isn't populated in the cache, so presumably none of its + // descendants are. Break out of the loop. + return false; + } +} + +/** + * Return the deepest cached node whose ID is a prefix of `targetID`. + */ +function findDeepestCachedAncestor(targetID) { + deepestNodeSoFar = null; + ReactInstanceHandles.traverseAncestors( + targetID, + findDeepestCachedAncestorImpl + ); + + var foundNode = deepestNodeSoFar; + deepestNodeSoFar = null; + return foundNode; +} + +/** + * Mounts this component and inserts it into the DOM. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {string} rootID DOM ID of the root node. + * @param {DOMElement} container DOM element to mount into. + * @param {ReactReconcileTransaction} transaction + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function mountComponentIntoNode( + componentInstance, + rootID, + container, + transaction, + shouldReuseMarkup) { + var markup = ReactReconciler.mountComponent( + componentInstance, rootID, transaction, emptyObject + ); + componentInstance._isTopLevel = true; + ReactMount._mountImageIntoNode(markup, container, shouldReuseMarkup); +} + +/** + * Batched mount. + * + * @param {ReactComponent} componentInstance The instance to mount. + * @param {string} rootID DOM ID of the root node. + * @param {DOMElement} container DOM element to mount into. + * @param {boolean} shouldReuseMarkup If true, do not insert markup + */ +function batchedMountComponentIntoNode( + componentInstance, + rootID, + container, + shouldReuseMarkup) { + var transaction = ReactUpdates.ReactReconcileTransaction.getPooled(); + transaction.perform( + mountComponentIntoNode, + null, + componentInstance, + rootID, + container, + transaction, + shouldReuseMarkup + ); + ReactUpdates.ReactReconcileTransaction.release(transaction); +} + +/** + * Mounting is the process of initializing a React component by creating its + * representative DOM elements and inserting them into a supplied `container`. + * Any prior content inside `container` is destroyed in the process. + * + * ReactMount.render( + * component, + * document.getElementById('container') + * ); + * + * <div id="container"> <-- Supplied `container`. + * <div data-reactid=".3"> <-- Rendered reactRoot of React + * // ... component. + * </div> + * </div> + * + * Inside of `container`, the first element rendered is the "reactRoot". + */ +var ReactMount = { + /** Exposed for debugging purposes **/ + _instancesByReactRootID: instancesByReactRootID, + + /** + * This is a hook provided to support rendering React components while + * ensuring that the apparent scroll position of its `container` does not + * change. + * + * @param {DOMElement} container The `container` being rendered into. + * @param {function} renderCallback This must be called once to do the render. + */ + scrollMonitor: function(container, renderCallback) { + renderCallback(); + }, + + /** + * Take a component that's already mounted into the DOM and replace its props + * @param {ReactComponent} prevComponent component instance already in the DOM + * @param {ReactElement} nextElement component instance to render + * @param {DOMElement} container container to render into + * @param {?function} callback function triggered on completion + */ + _updateRootComponent: function( + prevComponent, + nextElement, + container, + callback) { + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps(nextElement); + } + + ReactMount.scrollMonitor(container, function() { + ReactUpdateQueue.enqueueElementInternal(prevComponent, nextElement); + if (callback) { + ReactUpdateQueue.enqueueCallbackInternal(prevComponent, callback); + } + }); + + if ("production" !== "development") { + // Record the root element in case it later gets transplanted. + rootElementsByReactRootID[getReactRootID(container)] = + getReactRootElementInContainer(container); + } + + return prevComponent; + }, + + /** + * Register a component into the instance map and starts scroll value + * monitoring + * @param {ReactComponent} nextComponent component instance to render + * @param {DOMElement} container container to render into + * @return {string} reactRoot ID prefix + */ + _registerComponent: function(nextComponent, container) { + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + '_registerComponent(...): Target container is not a DOM element.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + ReactBrowserEventEmitter.ensureScrollValueMonitoring(); + + var reactRootID = ReactMount.registerContainer(container); + instancesByReactRootID[reactRootID] = nextComponent; + return reactRootID; + }, + + /** + * Render a new component into the DOM. + * @param {ReactElement} nextElement element to render + * @param {DOMElement} container container to render into + * @param {boolean} shouldReuseMarkup if we should skip the markup insertion + * @return {ReactComponent} nextComponent + */ + _renderNewRootComponent: function( + nextElement, + container, + shouldReuseMarkup + ) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + '_renderNewRootComponent(): Render methods should be a pure function ' + + 'of props and state; triggering nested component updates from ' + + 'render is not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + var componentInstance = instantiateReactComponent(nextElement, null); + var reactRootID = ReactMount._registerComponent( + componentInstance, + container + ); + + // The initial render is synchronous but any updates that happen during + // rendering, in componentWillMount or componentDidMount, will be batched + // according to the current batching strategy. + + ReactUpdates.batchedUpdates( + batchedMountComponentIntoNode, + componentInstance, + reactRootID, + container, + shouldReuseMarkup + ); + + if ("production" !== "development") { + // Record the root element in case it later gets transplanted. + rootElementsByReactRootID[reactRootID] = + getReactRootElementInContainer(container); + } + + return componentInstance; + }, + + /** + * Renders a React component into the DOM in the supplied `container`. + * + * If the React component was previously rendered into `container`, this will + * perform an update on it and only mutate the DOM as necessary to reflect the + * latest React component. + * + * @param {ReactElement} nextElement Component element to render. + * @param {DOMElement} container DOM element to render into. + * @param {?function} callback function triggered on completion + * @return {ReactComponent} Component instance rendered in `container`. + */ + render: function(nextElement, container, callback) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(nextElement), + 'React.render(): Invalid component element.%s', + ( + typeof nextElement === 'string' ? + ' Instead of passing an element string, make sure to instantiate ' + + 'it by passing it to React.createElement.' : + typeof nextElement === 'function' ? + ' Instead of passing a component class, make sure to instantiate ' + + 'it by passing it to React.createElement.' : + // Check if it quacks like an element + nextElement != null && nextElement.props !== undefined ? + ' This may be caused by unintentionally loading two independent ' + + 'copies of React.' : + '' + ) + ) : invariant(ReactElement.isValidElement(nextElement))); + + var prevComponent = instancesByReactRootID[getReactRootID(container)]; + + if (prevComponent) { + var prevElement = prevComponent._currentElement; + if (shouldUpdateReactComponent(prevElement, nextElement)) { + return ReactMount._updateRootComponent( + prevComponent, + nextElement, + container, + callback + ).getPublicInstance(); + } else { + ReactMount.unmountComponentAtNode(container); + } + } + + var reactRootElement = getReactRootElementInContainer(container); + var containerHasReactMarkup = + reactRootElement && ReactMount.isRenderedByReact(reactRootElement); + + if ("production" !== "development") { + if (!containerHasReactMarkup || reactRootElement.nextSibling) { + var rootElementSibling = reactRootElement; + while (rootElementSibling) { + if (ReactMount.isRenderedByReact(rootElementSibling)) { + ("production" !== "development" ? warning( + false, + 'render(): Target node has markup rendered by React, but there ' + + 'are unrelated nodes as well. This is most commonly caused by ' + + 'white-space inserted around server-rendered markup.' + ) : null); + break; + } + + rootElementSibling = rootElementSibling.nextSibling; + } + } + } + + var shouldReuseMarkup = containerHasReactMarkup && !prevComponent; + + var component = ReactMount._renderNewRootComponent( + nextElement, + container, + shouldReuseMarkup + ).getPublicInstance(); + if (callback) { + callback.call(component); + } + return component; + }, + + /** + * Constructs a component instance of `constructor` with `initialProps` and + * renders it into the supplied `container`. + * + * @param {function} constructor React component constructor. + * @param {?object} props Initial props of the component instance. + * @param {DOMElement} container DOM element to render into. + * @return {ReactComponent} Component instance rendered in `container`. + */ + constructAndRenderComponent: function(constructor, props, container) { + var element = ReactElement.createElement(constructor, props); + return ReactMount.render(element, container); + }, + + /** + * Constructs a component instance of `constructor` with `initialProps` and + * renders it into a container node identified by supplied `id`. + * + * @param {function} componentConstructor React component constructor + * @param {?object} props Initial props of the component instance. + * @param {string} id ID of the DOM element to render into. + * @return {ReactComponent} Component instance rendered in the container node. + */ + constructAndRenderComponentByID: function(constructor, props, id) { + var domNode = document.getElementById(id); + ("production" !== "development" ? invariant( + domNode, + 'Tried to get element with id of "%s" but it is not present on the page.', + id + ) : invariant(domNode)); + return ReactMount.constructAndRenderComponent(constructor, props, domNode); + }, + + /** + * Registers a container node into which React components will be rendered. + * This also creates the "reactRoot" ID that will be assigned to the element + * rendered within. + * + * @param {DOMElement} container DOM element to register as a container. + * @return {string} The "reactRoot" ID of elements rendered within. + */ + registerContainer: function(container) { + var reactRootID = getReactRootID(container); + if (reactRootID) { + // If one exists, make sure it is a valid "reactRoot" ID. + reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(reactRootID); + } + if (!reactRootID) { + // No valid "reactRoot" ID found, create one. + reactRootID = ReactInstanceHandles.createReactRootID(); + } + containersByReactRootID[reactRootID] = container; + return reactRootID; + }, + + /** + * Unmounts and destroys the React component rendered in the `container`. + * + * @param {DOMElement} container DOM element containing a React component. + * @return {boolean} True if a component was found in and unmounted from + * `container` + */ + unmountComponentAtNode: function(container) { + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (Strictly speaking, unmounting won't cause a + // render but we still don't expect to be in a render call here.) + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + 'unmountComponentAtNode(): Render methods should be a pure function of ' + + 'props and state; triggering nested component updates from render is ' + + 'not allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + 'unmountComponentAtNode(...): Target container is not a DOM element.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + var reactRootID = getReactRootID(container); + var component = instancesByReactRootID[reactRootID]; + if (!component) { + return false; + } + ReactMount.unmountComponentFromNode(component, container); + delete instancesByReactRootID[reactRootID]; + delete containersByReactRootID[reactRootID]; + if ("production" !== "development") { + delete rootElementsByReactRootID[reactRootID]; + } + return true; + }, + + /** + * Unmounts a component and removes it from the DOM. + * + * @param {ReactComponent} instance React component instance. + * @param {DOMElement} container DOM element to unmount from. + * @final + * @internal + * @see {ReactMount.unmountComponentAtNode} + */ + unmountComponentFromNode: function(instance, container) { + ReactReconciler.unmountComponent(instance); + + if (container.nodeType === DOC_NODE_TYPE) { + container = container.documentElement; + } + + // http://jsperf.com/emptying-a-node + while (container.lastChild) { + container.removeChild(container.lastChild); + } + }, + + /** + * Finds the container DOM element that contains React component to which the + * supplied DOM `id` belongs. + * + * @param {string} id The ID of an element rendered by a React component. + * @return {?DOMElement} DOM element that contains the `id`. + */ + findReactContainerForID: function(id) { + var reactRootID = ReactInstanceHandles.getReactRootIDFromNodeID(id); + var container = containersByReactRootID[reactRootID]; + + if ("production" !== "development") { + var rootElement = rootElementsByReactRootID[reactRootID]; + if (rootElement && rootElement.parentNode !== container) { + ("production" !== "development" ? invariant( + // Call internalGetID here because getID calls isValid which calls + // findReactContainerForID (this function). + internalGetID(rootElement) === reactRootID, + 'ReactMount: Root element ID differed from reactRootID.' + ) : invariant(// Call internalGetID here because getID calls isValid which calls + // findReactContainerForID (this function). + internalGetID(rootElement) === reactRootID)); + + var containerChild = container.firstChild; + if (containerChild && + reactRootID === internalGetID(containerChild)) { + // If the container has a new child with the same ID as the old + // root element, then rootElementsByReactRootID[reactRootID] is + // just stale and needs to be updated. The case that deserves a + // warning is when the container is empty. + rootElementsByReactRootID[reactRootID] = containerChild; + } else { + ("production" !== "development" ? warning( + false, + 'ReactMount: Root element has been removed from its original ' + + 'container. New container:', rootElement.parentNode + ) : null); + } + } + } + + return container; + }, + + /** + * Finds an element rendered by React with the supplied ID. + * + * @param {string} id ID of a DOM node in the React component. + * @return {DOMElement} Root DOM node of the React component. + */ + findReactNodeByID: function(id) { + var reactRoot = ReactMount.findReactContainerForID(id); + return ReactMount.findComponentRoot(reactRoot, id); + }, + + /** + * True if the supplied `node` is rendered by React. + * + * @param {*} node DOM Element to check. + * @return {boolean} True if the DOM Element appears to be rendered by React. + * @internal + */ + isRenderedByReact: function(node) { + if (node.nodeType !== 1) { + // Not a DOMElement, therefore not a React component + return false; + } + var id = ReactMount.getID(node); + return id ? id.charAt(0) === SEPARATOR : false; + }, + + /** + * Traverses up the ancestors of the supplied node to find a node that is a + * DOM representation of a React component. + * + * @param {*} node + * @return {?DOMEventTarget} + * @internal + */ + getFirstReactDOM: function(node) { + var current = node; + while (current && current.parentNode !== current) { + if (ReactMount.isRenderedByReact(current)) { + return current; + } + current = current.parentNode; + } + return null; + }, + + /** + * Finds a node with the supplied `targetID` inside of the supplied + * `ancestorNode`. Exploits the ID naming scheme to perform the search + * quickly. + * + * @param {DOMEventTarget} ancestorNode Search from this root. + * @pararm {string} targetID ID of the DOM representation of the component. + * @return {DOMEventTarget} DOM node with the supplied `targetID`. + * @internal + */ + findComponentRoot: function(ancestorNode, targetID) { + var firstChildren = findComponentRootReusableArray; + var childIndex = 0; + + var deepestAncestor = findDeepestCachedAncestor(targetID) || ancestorNode; + + firstChildren[0] = deepestAncestor.firstChild; + firstChildren.length = 1; + + while (childIndex < firstChildren.length) { + var child = firstChildren[childIndex++]; + var targetChild; + + while (child) { + var childID = ReactMount.getID(child); + if (childID) { + // Even if we find the node we're looking for, we finish looping + // through its siblings to ensure they're cached so that we don't have + // to revisit this node again. Otherwise, we make n^2 calls to getID + // when visiting the many children of a single node in order. + + if (targetID === childID) { + targetChild = child; + } else if (ReactInstanceHandles.isAncestorIDOf(childID, targetID)) { + // If we find a child whose ID is an ancestor of the given ID, + // then we can be sure that we only want to search the subtree + // rooted at this child, so we can throw out the rest of the + // search state. + firstChildren.length = childIndex = 0; + firstChildren.push(child.firstChild); + } + + } else { + // If this child had no ID, then there's a chance that it was + // injected automatically by the browser, as when a `<table>` + // element sprouts an extra `<tbody>` child as a side effect of + // `.innerHTML` parsing. Optimistically continue down this + // branch, but not before examining the other siblings. + firstChildren.push(child.firstChild); + } + + child = child.nextSibling; + } + + if (targetChild) { + // Emptying firstChildren/findComponentRootReusableArray is + // not necessary for correctness, but it helps the GC reclaim + // any nodes that were left at the end of the search. + firstChildren.length = 0; + + return targetChild; + } + } + + firstChildren.length = 0; + + ("production" !== "development" ? invariant( + false, + 'findComponentRoot(..., %s): Unable to find element. This probably ' + + 'means the DOM was unexpectedly mutated (e.g., by the browser), ' + + 'usually due to forgetting a <tbody> when using tables, nesting tags ' + + 'like <form>, <p>, or <a>, or using non-SVG elements in an <svg> ' + + 'parent. ' + + 'Try inspecting the child nodes of the element with React ID `%s`.', + targetID, + ReactMount.getID(ancestorNode) + ) : invariant(false)); + }, + + _mountImageIntoNode: function(markup, container, shouldReuseMarkup) { + ("production" !== "development" ? invariant( + container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ), + 'mountComponentIntoNode(...): Target container is not valid.' + ) : invariant(container && ( + (container.nodeType === ELEMENT_NODE_TYPE || container.nodeType === DOC_NODE_TYPE) + ))); + + if (shouldReuseMarkup) { + var rootElement = getReactRootElementInContainer(container); + if (ReactMarkupChecksum.canReuseMarkup(markup, rootElement)) { + return; + } else { + var checksum = rootElement.getAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME + ); + rootElement.removeAttribute(ReactMarkupChecksum.CHECKSUM_ATTR_NAME); + + var rootMarkup = rootElement.outerHTML; + rootElement.setAttribute( + ReactMarkupChecksum.CHECKSUM_ATTR_NAME, + checksum + ); + + var diffIndex = firstDifferenceIndex(markup, rootMarkup); + var difference = ' (client) ' + + markup.substring(diffIndex - 20, diffIndex + 20) + + '\n (server) ' + rootMarkup.substring(diffIndex - 20, diffIndex + 20); + + ("production" !== "development" ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document using ' + + 'server rendering but the checksum was invalid. This usually ' + + 'means you rendered a different component type or props on ' + + 'the client from the one on the server, or your render() ' + + 'methods are impure. React cannot handle this case due to ' + + 'cross-browser quirks by rendering at the document root. You ' + + 'should look for environment dependent code in your components ' + + 'and ensure the props are the same client and server side:\n%s', + difference + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); + + if ("production" !== "development") { + ("production" !== "development" ? warning( + false, + 'React attempted to reuse markup in a container but the ' + + 'checksum was invalid. This generally means that you are ' + + 'using server rendering and the markup generated on the ' + + 'server was not what the client was expecting. React injected ' + + 'new markup to compensate which works but you have lost many ' + + 'of the benefits of server rendering. Instead, figure out ' + + 'why the markup being generated is different on the client ' + + 'or server:\n%s', + difference + ) : null); + } + } + } + + ("production" !== "development" ? invariant( + container.nodeType !== DOC_NODE_TYPE, + 'You\'re trying to render a component to the document but ' + + 'you didn\'t use server rendering. We can\'t do this ' + + 'without using server rendering due to cross-browser quirks. ' + + 'See React.renderToString() for server rendering.' + ) : invariant(container.nodeType !== DOC_NODE_TYPE)); + + setInnerHTML(container, markup); + }, + + /** + * React ID utilities. + */ + + getReactRootID: getReactRootID, + + getID: getID, + + setID: setID, + + getNode: getNode, + + getNodeFromInstance: getNodeFromInstance, + + purgeID: purgeID +}; + +ReactPerf.measureMethods(ReactMount, 'ReactMount', { + _renderNewRootComponent: '_renderNewRootComponent', + _mountImageIntoNode: '_mountImageIntoNode' +}); + +module.exports = ReactMount; + +},{"10":10,"109":109,"115":115,"129":129,"134":134,"135":135,"148":148,"151":151,"154":154,"30":30,"39":39,"57":57,"58":58,"59":59,"66":66,"67":67,"69":69,"75":75,"81":81,"86":86,"87":87}],71:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMultiChild + * @typechecks static-only + */ + +'use strict'; + +var ReactComponentEnvironment = _dereq_(36); +var ReactMultiChildUpdateTypes = _dereq_(72); + +var ReactReconciler = _dereq_(81); +var ReactChildReconciler = _dereq_(31); + +/** + * Updating children of a component may trigger recursive updates. The depth is + * used to batch recursive updates to render markup more efficiently. + * + * @type {number} + * @private + */ +var updateDepth = 0; + +/** + * Queue of update configuration objects. + * + * Each object has a `type` property that is in `ReactMultiChildUpdateTypes`. + * + * @type {array<object>} + * @private + */ +var updateQueue = []; + +/** + * Queue of markup to be rendered. + * + * @type {array<string>} + * @private + */ +var markupQueue = []; + +/** + * Enqueues markup to be rendered and inserted at a supplied index. + * + * @param {string} parentID ID of the parent component. + * @param {string} markup Markup that renders into an element. + * @param {number} toIndex Destination index. + * @private + */ +function enqueueMarkup(parentID, markup, toIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.INSERT_MARKUP, + markupIndex: markupQueue.push(markup) - 1, + textContent: null, + fromIndex: null, + toIndex: toIndex + }); +} + +/** + * Enqueues moving an existing element to another index. + * + * @param {string} parentID ID of the parent component. + * @param {number} fromIndex Source index of the existing element. + * @param {number} toIndex Destination index of the element. + * @private + */ +function enqueueMove(parentID, fromIndex, toIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.MOVE_EXISTING, + markupIndex: null, + textContent: null, + fromIndex: fromIndex, + toIndex: toIndex + }); +} + +/** + * Enqueues removing an element at an index. + * + * @param {string} parentID ID of the parent component. + * @param {number} fromIndex Index of the element to remove. + * @private + */ +function enqueueRemove(parentID, fromIndex) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.REMOVE_NODE, + markupIndex: null, + textContent: null, + fromIndex: fromIndex, + toIndex: null + }); +} + +/** + * Enqueues setting the text content. + * + * @param {string} parentID ID of the parent component. + * @param {string} textContent Text content to set. + * @private + */ +function enqueueTextContent(parentID, textContent) { + // NOTE: Null values reduce hidden classes. + updateQueue.push({ + parentID: parentID, + parentNode: null, + type: ReactMultiChildUpdateTypes.TEXT_CONTENT, + markupIndex: null, + textContent: textContent, + fromIndex: null, + toIndex: null + }); +} + +/** + * Processes any enqueued updates. + * + * @private + */ +function processQueue() { + if (updateQueue.length) { + ReactComponentEnvironment.processChildrenUpdates( + updateQueue, + markupQueue + ); + clearQueue(); + } +} + +/** + * Clears any enqueued updates. + * + * @private + */ +function clearQueue() { + updateQueue.length = 0; + markupQueue.length = 0; +} + +/** + * ReactMultiChild are capable of reconciling multiple children. + * + * @class ReactMultiChild + * @internal + */ +var ReactMultiChild = { + + /** + * Provides common functionality for components that must reconcile multiple + * children. This is used by `ReactDOMComponent` to mount, update, and + * unmount child components. + * + * @lends {ReactMultiChild.prototype} + */ + Mixin: { + + /** + * Generates a "mount image" for each of the supplied children. In the case + * of `ReactDOMComponent`, a mount image is a string of markup. + * + * @param {?object} nestedChildren Nested child maps. + * @return {array} An array of mounted representations. + * @internal + */ + mountChildren: function(nestedChildren, transaction, context) { + var children = ReactChildReconciler.instantiateChildren( + nestedChildren, transaction, context + ); + this._renderedChildren = children; + var mountImages = []; + var index = 0; + for (var name in children) { + if (children.hasOwnProperty(name)) { + var child = children[name]; + // Inlined for performance, see `ReactInstanceHandles.createReactID`. + var rootID = this._rootNodeID + name; + var mountImage = ReactReconciler.mountComponent( + child, + rootID, + transaction, + context + ); + child._mountIndex = index; + mountImages.push(mountImage); + index++; + } + } + return mountImages; + }, + + /** + * Replaces any rendered children with a text content string. + * + * @param {string} nextContent String of content. + * @internal + */ + updateTextContent: function(nextContent) { + updateDepth++; + var errorThrown = true; + try { + var prevChildren = this._renderedChildren; + // Remove any rendered children. + ReactChildReconciler.unmountChildren(prevChildren); + // TODO: The setTextContent operation should be enough + for (var name in prevChildren) { + if (prevChildren.hasOwnProperty(name)) { + this._unmountChildByName(prevChildren[name], name); + } + } + // Set new text content. + this.setTextContent(nextContent); + errorThrown = false; + } finally { + updateDepth--; + if (!updateDepth) { + if (errorThrown) { + clearQueue(); + } else { + processQueue(); + } + } + } + }, + + /** + * Updates the rendered children with new children. + * + * @param {?object} nextNestedChildren Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @internal + */ + updateChildren: function(nextNestedChildren, transaction, context) { + updateDepth++; + var errorThrown = true; + try { + this._updateChildren(nextNestedChildren, transaction, context); + errorThrown = false; + } finally { + updateDepth--; + if (!updateDepth) { + if (errorThrown) { + clearQueue(); + } else { + processQueue(); + } + } + + } + }, + + /** + * Improve performance by isolating this hot code path from the try/catch + * block in `updateChildren`. + * + * @param {?object} nextNestedChildren Nested child maps. + * @param {ReactReconcileTransaction} transaction + * @final + * @protected + */ + _updateChildren: function(nextNestedChildren, transaction, context) { + var prevChildren = this._renderedChildren; + var nextChildren = ReactChildReconciler.updateChildren( + prevChildren, nextNestedChildren, transaction, context + ); + this._renderedChildren = nextChildren; + if (!nextChildren && !prevChildren) { + return; + } + var name; + // `nextIndex` will increment for each child in `nextChildren`, but + // `lastIndex` will be the last index visited in `prevChildren`. + var lastIndex = 0; + var nextIndex = 0; + for (name in nextChildren) { + if (!nextChildren.hasOwnProperty(name)) { + continue; + } + var prevChild = prevChildren && prevChildren[name]; + var nextChild = nextChildren[name]; + if (prevChild === nextChild) { + this.moveChild(prevChild, nextIndex, lastIndex); + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + prevChild._mountIndex = nextIndex; + } else { + if (prevChild) { + // Update `lastIndex` before `_mountIndex` gets unset by unmounting. + lastIndex = Math.max(prevChild._mountIndex, lastIndex); + this._unmountChildByName(prevChild, name); + } + // The child must be instantiated before it's mounted. + this._mountChildByNameAtIndex( + nextChild, name, nextIndex, transaction, context + ); + } + nextIndex++; + } + // Remove children that are no longer present. + for (name in prevChildren) { + if (prevChildren.hasOwnProperty(name) && + !(nextChildren && nextChildren.hasOwnProperty(name))) { + this._unmountChildByName(prevChildren[name], name); + } + } + }, + + /** + * Unmounts all rendered children. This should be used to clean up children + * when this component is unmounted. + * + * @internal + */ + unmountChildren: function() { + var renderedChildren = this._renderedChildren; + ReactChildReconciler.unmountChildren(renderedChildren); + this._renderedChildren = null; + }, + + /** + * Moves a child component to the supplied index. + * + * @param {ReactComponent} child Component to move. + * @param {number} toIndex Destination index of the element. + * @param {number} lastIndex Last index visited of the siblings of `child`. + * @protected + */ + moveChild: function(child, toIndex, lastIndex) { + // If the index of `child` is less than `lastIndex`, then it needs to + // be moved. Otherwise, we do not need to move it because a child will be + // inserted or moved before `child`. + if (child._mountIndex < lastIndex) { + enqueueMove(this._rootNodeID, child._mountIndex, toIndex); + } + }, + + /** + * Creates a child component. + * + * @param {ReactComponent} child Component to create. + * @param {string} mountImage Markup to insert. + * @protected + */ + createChild: function(child, mountImage) { + enqueueMarkup(this._rootNodeID, mountImage, child._mountIndex); + }, + + /** + * Removes a child component. + * + * @param {ReactComponent} child Child to remove. + * @protected + */ + removeChild: function(child) { + enqueueRemove(this._rootNodeID, child._mountIndex); + }, + + /** + * Sets this text content string. + * + * @param {string} textContent Text content to set. + * @protected + */ + setTextContent: function(textContent) { + enqueueTextContent(this._rootNodeID, textContent); + }, + + /** + * Mounts a child with the supplied name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to mount. + * @param {string} name Name of the child. + * @param {number} index Index at which to insert the child. + * @param {ReactReconcileTransaction} transaction + * @private + */ + _mountChildByNameAtIndex: function( + child, + name, + index, + transaction, + context) { + // Inlined for performance, see `ReactInstanceHandles.createReactID`. + var rootID = this._rootNodeID + name; + var mountImage = ReactReconciler.mountComponent( + child, + rootID, + transaction, + context + ); + child._mountIndex = index; + this.createChild(child, mountImage); + }, + + /** + * Unmounts a rendered child by name. + * + * NOTE: This is part of `updateChildren` and is here for readability. + * + * @param {ReactComponent} child Component to unmount. + * @param {string} name Name of the child in `this._renderedChildren`. + * @private + */ + _unmountChildByName: function(child, name) { + this.removeChild(child); + child._mountIndex = null; + } + + } + +}; + +module.exports = ReactMultiChild; + +},{"31":31,"36":36,"72":72,"81":81}],72:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactMultiChildUpdateTypes + */ + +'use strict'; + +var keyMirror = _dereq_(140); + +/** + * When a component's children are updated, a series of update configuration + * objects are created in order to batch and serialize the required changes. + * + * Enumerates all the possible types of update configurations. + * + * @internal + */ +var ReactMultiChildUpdateTypes = keyMirror({ + INSERT_MARKUP: null, + MOVE_EXISTING: null, + REMOVE_NODE: null, + TEXT_CONTENT: null +}); + +module.exports = ReactMultiChildUpdateTypes; + +},{"140":140}],73:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactNativeComponent + */ + +'use strict'; + +var assign = _dereq_(27); +var invariant = _dereq_(135); + +var autoGenerateWrapperClass = null; +var genericComponentClass = null; +// This registry keeps track of wrapper classes around native tags +var tagToComponentClass = {}; +var textComponentClass = null; + +var ReactNativeComponentInjection = { + // This accepts a class that receives the tag string. This is a catch all + // that can render any kind of tag. + injectGenericComponentClass: function(componentClass) { + genericComponentClass = componentClass; + }, + // This accepts a text component class that takes the text string to be + // rendered as props. + injectTextComponentClass: function(componentClass) { + textComponentClass = componentClass; + }, + // This accepts a keyed object with classes as values. Each key represents a + // tag. That particular tag will use this class instead of the generic one. + injectComponentClasses: function(componentClasses) { + assign(tagToComponentClass, componentClasses); + }, + // Temporary hack since we expect DOM refs to behave like composites, + // for this release. + injectAutoWrapper: function(wrapperFactory) { + autoGenerateWrapperClass = wrapperFactory; + } +}; + +/** + * Get a composite component wrapper class for a specific tag. + * + * @param {ReactElement} element The tag for which to get the class. + * @return {function} The React class constructor function. + */ +function getComponentClassForElement(element) { + if (typeof element.type === 'function') { + return element.type; + } + var tag = element.type; + var componentClass = tagToComponentClass[tag]; + if (componentClass == null) { + tagToComponentClass[tag] = componentClass = autoGenerateWrapperClass(tag); + } + return componentClass; +} + +/** + * Get a native internal component class for a specific tag. + * + * @param {ReactElement} element The element to create. + * @return {function} The internal class constructor function. + */ +function createInternalComponent(element) { + ("production" !== "development" ? invariant( + genericComponentClass, + 'There is no registered component for the tag %s', + element.type + ) : invariant(genericComponentClass)); + return new genericComponentClass(element.type, element.props); +} + +/** + * @param {ReactText} text + * @return {ReactComponent} + */ +function createInstanceForText(text) { + return new textComponentClass(text); +} + +/** + * @param {ReactComponent} component + * @return {boolean} + */ +function isTextComponent(component) { + return component instanceof textComponentClass; +} + +var ReactNativeComponent = { + getComponentClassForElement: getComponentClassForElement, + createInternalComponent: createInternalComponent, + createInstanceForText: createInstanceForText, + isTextComponent: isTextComponent, + injection: ReactNativeComponentInjection +}; + +module.exports = ReactNativeComponent; + +},{"135":135,"27":27}],74:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactOwner + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * ReactOwners are capable of storing references to owned components. + * + * All components are capable of //being// referenced by owner components, but + * only ReactOwner components are capable of //referencing// owned components. + * The named reference is known as a "ref". + * + * Refs are available when mounted and updated during reconciliation. + * + * var MyComponent = React.createClass({ + * render: function() { + * return ( + * <div onClick={this.handleClick}> + * <CustomComponent ref="custom" /> + * </div> + * ); + * }, + * handleClick: function() { + * this.refs.custom.handleClick(); + * }, + * componentDidMount: function() { + * this.refs.custom.initialize(); + * } + * }); + * + * Refs should rarely be used. When refs are used, they should only be done to + * control data that is not handled by React's data flow. + * + * @class ReactOwner + */ +var ReactOwner = { + + /** + * @param {?object} object + * @return {boolean} True if `object` is a valid owner. + * @final + */ + isValidOwner: function(object) { + return !!( + (object && + typeof object.attachRef === 'function' && typeof object.detachRef === 'function') + ); + }, + + /** + * Adds a component by ref to an owner component. + * + * @param {ReactComponent} component Component to reference. + * @param {string} ref Name by which to refer to the component. + * @param {ReactOwner} owner Component on which to record the ref. + * @final + * @internal + */ + addComponentAsRefTo: function(component, ref, owner) { + ("production" !== "development" ? invariant( + ReactOwner.isValidOwner(owner), + 'addComponentAsRefTo(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to add a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); + owner.attachRef(ref, component); + }, + + /** + * Removes a component by ref from an owner component. + * + * @param {ReactComponent} component Component to dereference. + * @param {string} ref Name of the ref to remove. + * @param {ReactOwner} owner Component on which the ref is recorded. + * @final + * @internal + */ + removeComponentAsRefFrom: function(component, ref, owner) { + ("production" !== "development" ? invariant( + ReactOwner.isValidOwner(owner), + 'removeComponentAsRefFrom(...): Only a ReactOwner can have refs. This ' + + 'usually means that you\'re trying to remove a ref to a component that ' + + 'doesn\'t have an owner (that is, was not created inside of another ' + + 'component\'s `render` method). Try rendering this component inside of ' + + 'a new top-level component which will hold the ref.' + ) : invariant(ReactOwner.isValidOwner(owner))); + // Check that `component` is still the current ref because we do not want to + // detach the ref if another component stole it. + if (owner.getPublicInstance().refs[ref] === component.getPublicInstance()) { + owner.detachRef(ref); + } + } + +}; + +module.exports = ReactOwner; + +},{"135":135}],75:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPerf + * @typechecks static-only + */ + +'use strict'; + +/** + * ReactPerf is a general AOP system designed to measure performance. This + * module only has the hooks: see ReactDefaultPerf for the analysis tool. + */ +var ReactPerf = { + /** + * Boolean to enable/disable measurement. Set to false by default to prevent + * accidental logging and perf loss. + */ + enableMeasure: false, + + /** + * Holds onto the measure function in use. By default, don't measure + * anything, but we'll override this if we inject a measure function. + */ + storedMeasure: _noMeasure, + + /** + * @param {object} object + * @param {string} objectName + * @param {object<string>} methodNames + */ + measureMethods: function(object, objectName, methodNames) { + if ("production" !== "development") { + for (var key in methodNames) { + if (!methodNames.hasOwnProperty(key)) { + continue; + } + object[key] = ReactPerf.measure( + objectName, + methodNames[key], + object[key] + ); + } + } + }, + + /** + * Use this to wrap methods you want to measure. Zero overhead in production. + * + * @param {string} objName + * @param {string} fnName + * @param {function} func + * @return {function} + */ + measure: function(objName, fnName, func) { + if ("production" !== "development") { + var measuredFunc = null; + var wrapper = function() { + if (ReactPerf.enableMeasure) { + if (!measuredFunc) { + measuredFunc = ReactPerf.storedMeasure(objName, fnName, func); + } + return measuredFunc.apply(this, arguments); + } + return func.apply(this, arguments); + }; + wrapper.displayName = objName + '_' + fnName; + return wrapper; + } + return func; + }, + + injection: { + /** + * @param {function} measure + */ + injectMeasure: function(measure) { + ReactPerf.storedMeasure = measure; + } + } +}; + +/** + * Simply passes through the measured function, without measuring it. + * + * @param {string} objName + * @param {string} fnName + * @param {function} func + * @return {function} + */ +function _noMeasure(objName, fnName, func) { + return func; +} + +module.exports = ReactPerf; + +},{}],76:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypeLocationNames + */ + +'use strict'; + +var ReactPropTypeLocationNames = {}; + +if ("production" !== "development") { + ReactPropTypeLocationNames = { + prop: 'prop', + context: 'context', + childContext: 'child context' + }; +} + +module.exports = ReactPropTypeLocationNames; + +},{}],77:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypeLocations + */ + +'use strict'; + +var keyMirror = _dereq_(140); + +var ReactPropTypeLocations = keyMirror({ + prop: null, + context: null, + childContext: null +}); + +module.exports = ReactPropTypeLocations; + +},{"140":140}],78:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPropTypes + */ + +'use strict'; + +var ReactElement = _dereq_(57); +var ReactFragment = _dereq_(63); +var ReactPropTypeLocationNames = _dereq_(76); + +var emptyFunction = _dereq_(114); + +/** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + +var ANONYMOUS = '<<anonymous>>'; + +var elementTypeChecker = createElementTypeChecker(); +var nodeTypeChecker = createNodeChecker(); + +var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: elementTypeChecker, + instanceOf: createInstanceTypeChecker, + node: nodeTypeChecker, + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker +}; + +function createChainableTypeChecker(validate) { + function checkType(isRequired, props, propName, componentName, location) { + componentName = componentName || ANONYMOUS; + if (props[propName] == null) { + var locationName = ReactPropTypeLocationNames[location]; + if (isRequired) { + return new Error( + ("Required " + locationName + " `" + propName + "` was not specified in ") + + ("`" + componentName + "`.") + ); + } + return null; + } else { + return validate(props, propName, componentName, location); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; +} + +function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + var locationName = ReactPropTypeLocationNames[location]; + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type `" + preciseType + "` ") + + ("supplied to `" + componentName + "`, expected `" + expectedType + "`.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunction.thatReturns(null)); +} + +function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var locationName = ReactPropTypeLocationNames[location]; + var propType = getPropType(propValue); + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type ") + + ("`" + propType + "` supplied to `" + componentName + "`, expected an array.") + ); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createElementTypeChecker() { + function validate(props, propName, componentName, location) { + if (!ReactElement.isValidElement(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected a ReactElement.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location) { + if (!(props[propName] instanceof expectedClass)) { + var locationName = ReactPropTypeLocationNames[location]; + var expectedClassName = expectedClass.name || ANONYMOUS; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected instance of `" + expectedClassName + "`.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createEnumTypeChecker(expectedValues) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (propValue === expectedValues[i]) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + var valuesString = JSON.stringify(expectedValues); + return new Error( + ("Invalid " + locationName + " `" + propName + "` of value `" + propValue + "` ") + + ("supplied to `" + componentName + "`, expected one of " + valuesString + ".") + ); + } + return createChainableTypeChecker(validate); +} + +function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type ") + + ("`" + propType + "` supplied to `" + componentName + "`, expected an object.") + ); + } + for (var key in propValue) { + if (propValue.hasOwnProperty(key)) { + var error = typeChecker(propValue, key, componentName, location); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createUnionTypeChecker(arrayOfTypeCheckers) { + function validate(props, propName, componentName, location) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location) == null) { + return null; + } + } + + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`.") + ); + } + return createChainableTypeChecker(validate); +} + +function createNodeChecker() { + function validate(props, propName, componentName, location) { + if (!isNode(props[propName])) { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` supplied to ") + + ("`" + componentName + "`, expected a ReactNode.") + ); + } + return null; + } + return createChainableTypeChecker(validate); +} + +function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + var locationName = ReactPropTypeLocationNames[location]; + return new Error( + ("Invalid " + locationName + " `" + propName + "` of type `" + propType + "` ") + + ("supplied to `" + componentName + "`, expected `object`.") + ); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); +} + +function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || ReactElement.isValidElement(propValue)) { + return true; + } + propValue = ReactFragment.extractIfFragment(propValue); + for (var k in propValue) { + if (!isNode(propValue[k])) { + return false; + } + } + return true; + default: + return false; + } +} + +// Equivalent of `typeof` but with special handling for array and regexp. +function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + return propType; +} + +// This handles more types than `getPropType`. Only used for error messages. +// See `createPrimitiveTypeChecker`. +function getPreciseType(propValue) { + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; +} + +module.exports = ReactPropTypes; + +},{"114":114,"57":57,"63":63,"76":76}],79:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactPutListenerQueue + */ + +'use strict'; + +var PooledClass = _dereq_(28); +var ReactBrowserEventEmitter = _dereq_(30); + +var assign = _dereq_(27); + +function ReactPutListenerQueue() { + this.listenersToPut = []; +} + +assign(ReactPutListenerQueue.prototype, { + enqueuePutListener: function(rootNodeID, propKey, propValue) { + this.listenersToPut.push({ + rootNodeID: rootNodeID, + propKey: propKey, + propValue: propValue + }); + }, + + putListeners: function() { + for (var i = 0; i < this.listenersToPut.length; i++) { + var listenerToPut = this.listenersToPut[i]; + ReactBrowserEventEmitter.putListener( + listenerToPut.rootNodeID, + listenerToPut.propKey, + listenerToPut.propValue + ); + } + }, + + reset: function() { + this.listenersToPut.length = 0; + }, + + destructor: function() { + this.reset(); + } +}); + +PooledClass.addPoolingTo(ReactPutListenerQueue); + +module.exports = ReactPutListenerQueue; + +},{"27":27,"28":28,"30":30}],80:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactReconcileTransaction + * @typechecks static-only + */ + +'use strict'; + +var CallbackQueue = _dereq_(6); +var PooledClass = _dereq_(28); +var ReactBrowserEventEmitter = _dereq_(30); +var ReactInputSelection = _dereq_(65); +var ReactPutListenerQueue = _dereq_(79); +var Transaction = _dereq_(103); + +var assign = _dereq_(27); + +/** + * Ensures that, when possible, the selection range (currently selected text + * input) is not disturbed by performing the transaction. + */ +var SELECTION_RESTORATION = { + /** + * @return {Selection} Selection information. + */ + initialize: ReactInputSelection.getSelectionInformation, + /** + * @param {Selection} sel Selection information returned from `initialize`. + */ + close: ReactInputSelection.restoreSelection +}; + +/** + * Suppresses events (blur/focus) that could be inadvertently dispatched due to + * high level DOM manipulations (like temporarily removing a text input from the + * DOM). + */ +var EVENT_SUPPRESSION = { + /** + * @return {boolean} The enabled status of `ReactBrowserEventEmitter` before + * the reconciliation. + */ + initialize: function() { + var currentlyEnabled = ReactBrowserEventEmitter.isEnabled(); + ReactBrowserEventEmitter.setEnabled(false); + return currentlyEnabled; + }, + + /** + * @param {boolean} previouslyEnabled Enabled status of + * `ReactBrowserEventEmitter` before the reconciliation occured. `close` + * restores the previous value. + */ + close: function(previouslyEnabled) { + ReactBrowserEventEmitter.setEnabled(previouslyEnabled); + } +}; + +/** + * Provides a queue for collecting `componentDidMount` and + * `componentDidUpdate` callbacks during the the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function() { + this.reactMountReady.reset(); + }, + + /** + * After DOM is flushed, invoke all registered `onDOMReady` callbacks. + */ + close: function() { + this.reactMountReady.notifyAll(); + } +}; + +var PUT_LISTENER_QUEUEING = { + initialize: function() { + this.putListenerQueue.reset(); + }, + + close: function() { + this.putListenerQueue.putListeners(); + } +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [ + PUT_LISTENER_QUEUEING, + SELECTION_RESTORATION, + EVENT_SUPPRESSION, + ON_DOM_READY_QUEUEING +]; + +/** + * Currently: + * - The order that these are listed in the transaction is critical: + * - Suppresses events. + * - Restores selection range. + * + * Future: + * - Restore document/overflow scroll positions that were unintentionally + * modified via DOM insertions above the top viewport boundary. + * - Implement/integrate with customized constraint based layout system and keep + * track of which dimensions must be remeasured. + * + * @class ReactReconcileTransaction + */ +function ReactReconcileTransaction() { + this.reinitializeTransaction(); + // Only server-side rendering really needs this option (see + // `ReactServerRendering`), but server-side uses + // `ReactServerRenderingTransaction` instead. This option is here so that it's + // accessible and defaults to false when `ReactDOMComponent` and + // `ReactTextComponent` checks it in `mountComponent`.` + this.renderToStaticMarkup = false; + this.reactMountReady = CallbackQueue.getPooled(null); + this.putListenerQueue = ReactPutListenerQueue.getPooled(); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array<object>} List of operation wrap proceedures. + * TODO: convert to array<TransactionWrapper> + */ + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function() { + return this.reactMountReady; + }, + + getPutListenerQueue: function() { + return this.putListenerQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be resused. + */ + destructor: function() { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + + ReactPutListenerQueue.release(this.putListenerQueue); + this.putListenerQueue = null; + } +}; + + +assign(ReactReconcileTransaction.prototype, Transaction.Mixin, Mixin); + +PooledClass.addPoolingTo(ReactReconcileTransaction); + +module.exports = ReactReconcileTransaction; + +},{"103":103,"27":27,"28":28,"30":30,"6":6,"65":65,"79":79}],81:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactReconciler + */ + +'use strict'; + +var ReactRef = _dereq_(82); +var ReactElementValidator = _dereq_(58); + +/** + * Helper to call ReactRef.attachRefs with this composite component, split out + * to avoid allocations in the transaction mount-ready queue. + */ +function attachRefs() { + ReactRef.attachRefs(this, this._currentElement); +} + +var ReactReconciler = { + + /** + * Initializes the component, renders markup, and registers event listeners. + * + * @param {ReactComponent} internalInstance + * @param {string} rootID DOM ID of the root node. + * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction + * @return {?string} Rendered markup to be inserted into the DOM. + * @final + * @internal + */ + mountComponent: function(internalInstance, rootID, transaction, context) { + var markup = internalInstance.mountComponent(rootID, transaction, context); + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps( + internalInstance._currentElement + ); + } + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + return markup; + }, + + /** + * Releases any resources allocated by `mountComponent`. + * + * @final + * @internal + */ + unmountComponent: function(internalInstance) { + ReactRef.detachRefs(internalInstance, internalInstance._currentElement); + internalInstance.unmountComponent(); + }, + + /** + * Update a component using a new element. + * + * @param {ReactComponent} internalInstance + * @param {ReactElement} nextElement + * @param {ReactReconcileTransaction} transaction + * @param {object} context + * @internal + */ + receiveComponent: function( + internalInstance, nextElement, transaction, context + ) { + var prevElement = internalInstance._currentElement; + + if (nextElement === prevElement && nextElement._owner != null) { + // Since elements are immutable after the owner is rendered, + // we can do a cheap identity compare here to determine if this is a + // superfluous reconcile. It's possible for state to be mutable but such + // change should trigger an update of the owner which would recreate + // the element. We explicitly check for the existence of an owner since + // it's possible for an element created outside a composite to be + // deeply mutated and reused. + return; + } + + if ("production" !== "development") { + ReactElementValidator.checkAndWarnForMutatedProps(nextElement); + } + + var refsChanged = ReactRef.shouldUpdateRefs( + prevElement, + nextElement + ); + + if (refsChanged) { + ReactRef.detachRefs(internalInstance, prevElement); + } + + internalInstance.receiveComponent(nextElement, transaction, context); + + if (refsChanged) { + transaction.getReactMountReady().enqueue(attachRefs, internalInstance); + } + }, + + /** + * Flush any dirty changes in a component. + * + * @param {ReactComponent} internalInstance + * @param {ReactReconcileTransaction} transaction + * @internal + */ + performUpdateIfNecessary: function( + internalInstance, + transaction + ) { + internalInstance.performUpdateIfNecessary(transaction); + } + +}; + +module.exports = ReactReconciler; + +},{"58":58,"82":82}],82:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactRef + */ + +'use strict'; + +var ReactOwner = _dereq_(74); + +var ReactRef = {}; + +function attachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(component.getPublicInstance()); + } else { + // Legacy ref + ReactOwner.addComponentAsRefTo(component, ref, owner); + } +} + +function detachRef(ref, component, owner) { + if (typeof ref === 'function') { + ref(null); + } else { + // Legacy ref + ReactOwner.removeComponentAsRefFrom(component, ref, owner); + } +} + +ReactRef.attachRefs = function(instance, element) { + var ref = element.ref; + if (ref != null) { + attachRef(ref, instance, element._owner); + } +}; + +ReactRef.shouldUpdateRefs = function(prevElement, nextElement) { + // If either the owner or a `ref` has changed, make sure the newest owner + // has stored a reference to `this`, and the previous owner (if different) + // has forgotten the reference to `this`. We use the element instead + // of the public this.props because the post processing cannot determine + // a ref. The ref conceptually lives on the element. + + // TODO: Should this even be possible? The owner cannot change because + // it's forbidden by shouldUpdateReactComponent. The ref can change + // if you swap the keys of but not the refs. Reconsider where this check + // is made. It probably belongs where the key checking and + // instantiateReactComponent is done. + + return ( + nextElement._owner !== prevElement._owner || + nextElement.ref !== prevElement.ref + ); +}; + +ReactRef.detachRefs = function(instance, element) { + var ref = element.ref; + if (ref != null) { + detachRef(ref, instance, element._owner); + } +}; + +module.exports = ReactRef; + +},{"74":74}],83:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactRootIndex + * @typechecks + */ + +'use strict'; + +var ReactRootIndexInjection = { + /** + * @param {function} _createReactRootIndex + */ + injectCreateReactRootIndex: function(_createReactRootIndex) { + ReactRootIndex.createReactRootIndex = _createReactRootIndex; + } +}; + +var ReactRootIndex = { + createReactRootIndex: null, + injection: ReactRootIndexInjection +}; + +module.exports = ReactRootIndex; + +},{}],84:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @typechecks static-only + * @providesModule ReactServerRendering + */ +'use strict'; + +var ReactElement = _dereq_(57); +var ReactInstanceHandles = _dereq_(66); +var ReactMarkupChecksum = _dereq_(69); +var ReactServerRenderingTransaction = + _dereq_(85); + +var emptyObject = _dereq_(115); +var instantiateReactComponent = _dereq_(134); +var invariant = _dereq_(135); + +/** + * @param {ReactElement} element + * @return {string} the HTML markup + */ +function renderToString(element) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(element), + 'renderToString(): You must pass a valid ReactElement.' + ) : invariant(ReactElement.isValidElement(element))); + + var transaction; + try { + var id = ReactInstanceHandles.createReactRootID(); + transaction = ReactServerRenderingTransaction.getPooled(false); + + return transaction.perform(function() { + var componentInstance = instantiateReactComponent(element, null); + var markup = + componentInstance.mountComponent(id, transaction, emptyObject); + return ReactMarkupChecksum.addChecksumToMarkup(markup); + }, null); + } finally { + ReactServerRenderingTransaction.release(transaction); + } +} + +/** + * @param {ReactElement} element + * @return {string} the HTML markup, without the extra React ID and checksum + * (for generating static pages) + */ +function renderToStaticMarkup(element) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(element), + 'renderToStaticMarkup(): You must pass a valid ReactElement.' + ) : invariant(ReactElement.isValidElement(element))); + + var transaction; + try { + var id = ReactInstanceHandles.createReactRootID(); + transaction = ReactServerRenderingTransaction.getPooled(true); + + return transaction.perform(function() { + var componentInstance = instantiateReactComponent(element, null); + return componentInstance.mountComponent(id, transaction, emptyObject); + }, null); + } finally { + ReactServerRenderingTransaction.release(transaction); + } +} + +module.exports = { + renderToString: renderToString, + renderToStaticMarkup: renderToStaticMarkup +}; + +},{"115":115,"134":134,"135":135,"57":57,"66":66,"69":69,"85":85}],85:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactServerRenderingTransaction + * @typechecks + */ + +'use strict'; + +var PooledClass = _dereq_(28); +var CallbackQueue = _dereq_(6); +var ReactPutListenerQueue = _dereq_(79); +var Transaction = _dereq_(103); + +var assign = _dereq_(27); +var emptyFunction = _dereq_(114); + +/** + * Provides a `CallbackQueue` queue for collecting `onDOMReady` callbacks + * during the performing of the transaction. + */ +var ON_DOM_READY_QUEUEING = { + /** + * Initializes the internal `onDOMReady` queue. + */ + initialize: function() { + this.reactMountReady.reset(); + }, + + close: emptyFunction +}; + +var PUT_LISTENER_QUEUEING = { + initialize: function() { + this.putListenerQueue.reset(); + }, + + close: emptyFunction +}; + +/** + * Executed within the scope of the `Transaction` instance. Consider these as + * being member methods, but with an implied ordering while being isolated from + * each other. + */ +var TRANSACTION_WRAPPERS = [ + PUT_LISTENER_QUEUEING, + ON_DOM_READY_QUEUEING +]; + +/** + * @class ReactServerRenderingTransaction + * @param {boolean} renderToStaticMarkup + */ +function ReactServerRenderingTransaction(renderToStaticMarkup) { + this.reinitializeTransaction(); + this.renderToStaticMarkup = renderToStaticMarkup; + this.reactMountReady = CallbackQueue.getPooled(null); + this.putListenerQueue = ReactPutListenerQueue.getPooled(); +} + +var Mixin = { + /** + * @see Transaction + * @abstract + * @final + * @return {array} Empty list of operation wrap proceedures. + */ + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + /** + * @return {object} The queue to collect `onDOMReady` callbacks with. + */ + getReactMountReady: function() { + return this.reactMountReady; + }, + + getPutListenerQueue: function() { + return this.putListenerQueue; + }, + + /** + * `PooledClass` looks for this, and will invoke this before allowing this + * instance to be resused. + */ + destructor: function() { + CallbackQueue.release(this.reactMountReady); + this.reactMountReady = null; + + ReactPutListenerQueue.release(this.putListenerQueue); + this.putListenerQueue = null; + } +}; + + +assign( + ReactServerRenderingTransaction.prototype, + Transaction.Mixin, + Mixin +); + +PooledClass.addPoolingTo(ReactServerRenderingTransaction); + +module.exports = ReactServerRenderingTransaction; + +},{"103":103,"114":114,"27":27,"28":28,"6":6,"79":79}],86:[function(_dereq_,module,exports){ +/** + * Copyright 2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactUpdateQueue + */ + +'use strict'; + +var ReactLifeCycle = _dereq_(68); +var ReactCurrentOwner = _dereq_(39); +var ReactElement = _dereq_(57); +var ReactInstanceMap = _dereq_(67); +var ReactUpdates = _dereq_(87); + +var assign = _dereq_(27); +var invariant = _dereq_(135); +var warning = _dereq_(154); + +function enqueueUpdate(internalInstance) { + if (internalInstance !== ReactLifeCycle.currentlyMountingInstance) { + // If we're in a componentWillMount handler, don't enqueue a rerender + // because ReactUpdates assumes we're in a browser context (which is + // wrong for server rendering) and we're about to do a render anyway. + // See bug in #1740. + ReactUpdates.enqueueUpdate(internalInstance); + } +} + +function getInternalInstanceReadyForUpdate(publicInstance, callerName) { + ("production" !== "development" ? invariant( + ReactCurrentOwner.current == null, + '%s(...): Cannot update during an existing state transition ' + + '(such as within `render`). Render methods should be a pure function ' + + 'of props and state.', + callerName + ) : invariant(ReactCurrentOwner.current == null)); + + var internalInstance = ReactInstanceMap.get(publicInstance); + if (!internalInstance) { + if ("production" !== "development") { + // Only warn when we have a callerName. Otherwise we should be silent. + // We're probably calling from enqueueCallback. We don't want to warn + // there because we already warned for the corresponding lifecycle method. + ("production" !== "development" ? warning( + !callerName, + '%s(...): Can only update a mounted or mounting component. ' + + 'This usually means you called %s() on an unmounted ' + + 'component. This is a no-op.', + callerName, + callerName + ) : null); + } + return null; + } + + if (internalInstance === ReactLifeCycle.currentlyUnmountingInstance) { + return null; + } + + return internalInstance; +} + +/** + * ReactUpdateQueue allows for state updates to be scheduled into a later + * reconciliation step. + */ +var ReactUpdateQueue = { + + /** + * Enqueue a callback that will be executed after all the pending updates + * have processed. + * + * @param {ReactClass} publicInstance The instance to use as `this` context. + * @param {?function} callback Called after state is updated. + * @internal + */ + enqueueCallback: function(publicInstance, callback) { + ("production" !== "development" ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); + var internalInstance = getInternalInstanceReadyForUpdate(publicInstance); + + // Previously we would throw an error if we didn't have an internal + // instance. Since we want to make it a no-op instead, we mirror the same + // behavior we have in other enqueue* methods. + // We also need to ignore callbacks in componentWillMount. See + // enqueueUpdates. + if (!internalInstance || + internalInstance === ReactLifeCycle.currentlyMountingInstance) { + return null; + } + + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + // TODO: The callback here is ignored when setState is called from + // componentWillMount. Either fix it or disallow doing so completely in + // favor of getInitialState. Alternatively, we can disallow + // componentWillMount during server-side rendering. + enqueueUpdate(internalInstance); + }, + + enqueueCallbackInternal: function(internalInstance, callback) { + ("production" !== "development" ? invariant( + typeof callback === 'function', + 'enqueueCallback(...): You called `setProps`, `replaceProps`, ' + + '`setState`, `replaceState`, or `forceUpdate` with a callback that ' + + 'isn\'t callable.' + ) : invariant(typeof callback === 'function')); + if (internalInstance._pendingCallbacks) { + internalInstance._pendingCallbacks.push(callback); + } else { + internalInstance._pendingCallbacks = [callback]; + } + enqueueUpdate(internalInstance); + }, + + /** + * Forces an update. This should only be invoked when it is known with + * certainty that we are **not** in a DOM transaction. + * + * You may want to call this when you know that some deeper aspect of the + * component's state has changed but `setState` was not called. + * + * This will not invoke `shouldUpdateComponent`, but it will invoke + * `componentWillUpdate` and `componentDidUpdate`. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @internal + */ + enqueueForceUpdate: function(publicInstance) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'forceUpdate' + ); + + if (!internalInstance) { + return; + } + + internalInstance._pendingForceUpdate = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the state. Always use this or `setState` to mutate state. + * You should treat `this.state` as immutable. + * + * There is no guarantee that `this.state` will be immediately updated, so + * accessing `this.state` after calling this method may return the old value. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} completeState Next state. + * @internal + */ + enqueueReplaceState: function(publicInstance, completeState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceState' + ); + + if (!internalInstance) { + return; + } + + internalInstance._pendingStateQueue = [completeState]; + internalInstance._pendingReplaceState = true; + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the state. This only exists because _pendingState is + * internal. This provides a merging strategy that is not available to deep + * properties which is confusing. TODO: Expose pendingState or don't use it + * during the merge. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialState Next partial state to be merged with state. + * @internal + */ + enqueueSetState: function(publicInstance, partialState) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setState' + ); + + if (!internalInstance) { + return; + } + + var queue = + internalInstance._pendingStateQueue || + (internalInstance._pendingStateQueue = []); + queue.push(partialState); + + enqueueUpdate(internalInstance); + }, + + /** + * Sets a subset of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} partialProps Subset of the next props. + * @internal + */ + enqueueSetProps: function(publicInstance, partialProps) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'setProps' + ); + + if (!internalInstance) { + return; + } + + ("production" !== "development" ? invariant( + internalInstance._isTopLevel, + 'setProps(...): You called `setProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); + + // Merge with the pending element if it exists, otherwise with existing + // element props. + var element = internalInstance._pendingElement || + internalInstance._currentElement; + var props = assign({}, element.props, partialProps); + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); + + enqueueUpdate(internalInstance); + }, + + /** + * Replaces all of the props. + * + * @param {ReactClass} publicInstance The instance that should rerender. + * @param {object} props New props. + * @internal + */ + enqueueReplaceProps: function(publicInstance, props) { + var internalInstance = getInternalInstanceReadyForUpdate( + publicInstance, + 'replaceProps' + ); + + if (!internalInstance) { + return; + } + + ("production" !== "development" ? invariant( + internalInstance._isTopLevel, + 'replaceProps(...): You called `replaceProps` on a ' + + 'component with a parent. This is an anti-pattern since props will ' + + 'get reactively updated when rendered. Instead, change the owner\'s ' + + '`render` method to pass the correct value as props to the component ' + + 'where it is created.' + ) : invariant(internalInstance._isTopLevel)); + + // Merge with the pending element if it exists, otherwise with existing + // element props. + var element = internalInstance._pendingElement || + internalInstance._currentElement; + internalInstance._pendingElement = ReactElement.cloneAndReplaceProps( + element, + props + ); + + enqueueUpdate(internalInstance); + }, + + enqueueElementInternal: function(internalInstance, newElement) { + internalInstance._pendingElement = newElement; + enqueueUpdate(internalInstance); + } + +}; + +module.exports = ReactUpdateQueue; + +},{"135":135,"154":154,"27":27,"39":39,"57":57,"67":67,"68":68,"87":87}],87:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactUpdates + */ + +'use strict'; + +var CallbackQueue = _dereq_(6); +var PooledClass = _dereq_(28); +var ReactCurrentOwner = _dereq_(39); +var ReactPerf = _dereq_(75); +var ReactReconciler = _dereq_(81); +var Transaction = _dereq_(103); + +var assign = _dereq_(27); +var invariant = _dereq_(135); +var warning = _dereq_(154); + +var dirtyComponents = []; +var asapCallbackQueue = CallbackQueue.getPooled(); +var asapEnqueued = false; + +var batchingStrategy = null; + +function ensureInjected() { + ("production" !== "development" ? invariant( + ReactUpdates.ReactReconcileTransaction && batchingStrategy, + 'ReactUpdates: must inject a reconcile transaction class and batching ' + + 'strategy' + ) : invariant(ReactUpdates.ReactReconcileTransaction && batchingStrategy)); +} + +var NESTED_UPDATES = { + initialize: function() { + this.dirtyComponentsLength = dirtyComponents.length; + }, + close: function() { + if (this.dirtyComponentsLength !== dirtyComponents.length) { + // Additional updates were enqueued by componentDidUpdate handlers or + // similar; before our own UPDATE_QUEUEING wrapper closes, we want to run + // these new updates so that if A's componentDidUpdate calls setState on + // B, B will update before the callback A's updater provided when calling + // setState. + dirtyComponents.splice(0, this.dirtyComponentsLength); + flushBatchedUpdates(); + } else { + dirtyComponents.length = 0; + } + } +}; + +var UPDATE_QUEUEING = { + initialize: function() { + this.callbackQueue.reset(); + }, + close: function() { + this.callbackQueue.notifyAll(); + } +}; + +var TRANSACTION_WRAPPERS = [NESTED_UPDATES, UPDATE_QUEUEING]; + +function ReactUpdatesFlushTransaction() { + this.reinitializeTransaction(); + this.dirtyComponentsLength = null; + this.callbackQueue = CallbackQueue.getPooled(); + this.reconcileTransaction = + ReactUpdates.ReactReconcileTransaction.getPooled(); +} + +assign( + ReactUpdatesFlushTransaction.prototype, + Transaction.Mixin, { + getTransactionWrappers: function() { + return TRANSACTION_WRAPPERS; + }, + + destructor: function() { + this.dirtyComponentsLength = null; + CallbackQueue.release(this.callbackQueue); + this.callbackQueue = null; + ReactUpdates.ReactReconcileTransaction.release(this.reconcileTransaction); + this.reconcileTransaction = null; + }, + + perform: function(method, scope, a) { + // Essentially calls `this.reconcileTransaction.perform(method, scope, a)` + // with this transaction's wrappers around it. + return Transaction.Mixin.perform.call( + this, + this.reconcileTransaction.perform, + this.reconcileTransaction, + method, + scope, + a + ); + } +}); + +PooledClass.addPoolingTo(ReactUpdatesFlushTransaction); + +function batchedUpdates(callback, a, b, c, d) { + ensureInjected(); + batchingStrategy.batchedUpdates(callback, a, b, c, d); +} + +/** + * Array comparator for ReactComponents by mount ordering. + * + * @param {ReactComponent} c1 first component you're comparing + * @param {ReactComponent} c2 second component you're comparing + * @return {number} Return value usable by Array.prototype.sort(). + */ +function mountOrderComparator(c1, c2) { + return c1._mountOrder - c2._mountOrder; +} + +function runBatchedUpdates(transaction) { + var len = transaction.dirtyComponentsLength; + ("production" !== "development" ? invariant( + len === dirtyComponents.length, + 'Expected flush transaction\'s stored dirty-components length (%s) to ' + + 'match dirty-components array length (%s).', + len, + dirtyComponents.length + ) : invariant(len === dirtyComponents.length)); + + // Since reconciling a component higher in the owner hierarchy usually (not + // always -- see shouldComponentUpdate()) will reconcile children, reconcile + // them before their children by sorting the array. + dirtyComponents.sort(mountOrderComparator); + + for (var i = 0; i < len; i++) { + // If a component is unmounted before pending changes apply, it will still + // be here, but we assume that it has cleared its _pendingCallbacks and + // that performUpdateIfNecessary is a noop. + var component = dirtyComponents[i]; + + // If performUpdateIfNecessary happens to enqueue any new updates, we + // shouldn't execute the callbacks until the next render happens, so + // stash the callbacks first + var callbacks = component._pendingCallbacks; + component._pendingCallbacks = null; + + ReactReconciler.performUpdateIfNecessary( + component, + transaction.reconcileTransaction + ); + + if (callbacks) { + for (var j = 0; j < callbacks.length; j++) { + transaction.callbackQueue.enqueue( + callbacks[j], + component.getPublicInstance() + ); + } + } + } +} + +var flushBatchedUpdates = function() { + // ReactUpdatesFlushTransaction's wrappers will clear the dirtyComponents + // array and perform any updates enqueued by mount-ready handlers (i.e., + // componentDidUpdate) but we need to check here too in order to catch + // updates enqueued by setState callbacks and asap calls. + while (dirtyComponents.length || asapEnqueued) { + if (dirtyComponents.length) { + var transaction = ReactUpdatesFlushTransaction.getPooled(); + transaction.perform(runBatchedUpdates, null, transaction); + ReactUpdatesFlushTransaction.release(transaction); + } + + if (asapEnqueued) { + asapEnqueued = false; + var queue = asapCallbackQueue; + asapCallbackQueue = CallbackQueue.getPooled(); + queue.notifyAll(); + CallbackQueue.release(queue); + } + } +}; +flushBatchedUpdates = ReactPerf.measure( + 'ReactUpdates', + 'flushBatchedUpdates', + flushBatchedUpdates +); + +/** + * Mark a component as needing a rerender, adding an optional callback to a + * list of functions which will be executed once the rerender occurs. + */ +function enqueueUpdate(component) { + ensureInjected(); + + // Various parts of our code (such as ReactCompositeComponent's + // _renderValidatedComponent) assume that calls to render aren't nested; + // verify that that's the case. (This is called by each top-level update + // function, like setProps, setState, forceUpdate, etc.; creation and + // destruction of top-level components is guarded in ReactMount.) + ("production" !== "development" ? warning( + ReactCurrentOwner.current == null, + 'enqueueUpdate(): Render methods should be a pure function of props ' + + 'and state; triggering nested component updates from render is not ' + + 'allowed. If necessary, trigger nested updates in ' + + 'componentDidUpdate.' + ) : null); + + if (!batchingStrategy.isBatchingUpdates) { + batchingStrategy.batchedUpdates(enqueueUpdate, component); + return; + } + + dirtyComponents.push(component); +} + +/** + * Enqueue a callback to be run at the end of the current batching cycle. Throws + * if no updates are currently being performed. + */ +function asap(callback, context) { + ("production" !== "development" ? invariant( + batchingStrategy.isBatchingUpdates, + 'ReactUpdates.asap: Can\'t enqueue an asap callback in a context where' + + 'updates are not being batched.' + ) : invariant(batchingStrategy.isBatchingUpdates)); + asapCallbackQueue.enqueue(callback, context); + asapEnqueued = true; +} + +var ReactUpdatesInjection = { + injectReconcileTransaction: function(ReconcileTransaction) { + ("production" !== "development" ? invariant( + ReconcileTransaction, + 'ReactUpdates: must provide a reconcile transaction class' + ) : invariant(ReconcileTransaction)); + ReactUpdates.ReactReconcileTransaction = ReconcileTransaction; + }, + + injectBatchingStrategy: function(_batchingStrategy) { + ("production" !== "development" ? invariant( + _batchingStrategy, + 'ReactUpdates: must provide a batching strategy' + ) : invariant(_batchingStrategy)); + ("production" !== "development" ? invariant( + typeof _batchingStrategy.batchedUpdates === 'function', + 'ReactUpdates: must provide a batchedUpdates() function' + ) : invariant(typeof _batchingStrategy.batchedUpdates === 'function')); + ("production" !== "development" ? invariant( + typeof _batchingStrategy.isBatchingUpdates === 'boolean', + 'ReactUpdates: must provide an isBatchingUpdates boolean attribute' + ) : invariant(typeof _batchingStrategy.isBatchingUpdates === 'boolean')); + batchingStrategy = _batchingStrategy; + } +}; + +var ReactUpdates = { + /** + * React references `ReactReconcileTransaction` using this property in order + * to allow dependency injection. + * + * @internal + */ + ReactReconcileTransaction: null, + + batchedUpdates: batchedUpdates, + enqueueUpdate: enqueueUpdate, + flushBatchedUpdates: flushBatchedUpdates, + injection: ReactUpdatesInjection, + asap: asap +}; + +module.exports = ReactUpdates; + +},{"103":103,"135":135,"154":154,"27":27,"28":28,"39":39,"6":6,"75":75,"81":81}],88:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SVGDOMPropertyConfig + */ + +/*jslint bitwise: true*/ + +'use strict'; + +var DOMProperty = _dereq_(10); + +var MUST_USE_ATTRIBUTE = DOMProperty.injection.MUST_USE_ATTRIBUTE; + +var SVGDOMPropertyConfig = { + Properties: { + cx: MUST_USE_ATTRIBUTE, + cy: MUST_USE_ATTRIBUTE, + d: MUST_USE_ATTRIBUTE, + dx: MUST_USE_ATTRIBUTE, + dy: MUST_USE_ATTRIBUTE, + fill: MUST_USE_ATTRIBUTE, + fillOpacity: MUST_USE_ATTRIBUTE, + fontFamily: MUST_USE_ATTRIBUTE, + fontSize: MUST_USE_ATTRIBUTE, + fx: MUST_USE_ATTRIBUTE, + fy: MUST_USE_ATTRIBUTE, + gradientTransform: MUST_USE_ATTRIBUTE, + gradientUnits: MUST_USE_ATTRIBUTE, + markerEnd: MUST_USE_ATTRIBUTE, + markerMid: MUST_USE_ATTRIBUTE, + markerStart: MUST_USE_ATTRIBUTE, + offset: MUST_USE_ATTRIBUTE, + opacity: MUST_USE_ATTRIBUTE, + patternContentUnits: MUST_USE_ATTRIBUTE, + patternUnits: MUST_USE_ATTRIBUTE, + points: MUST_USE_ATTRIBUTE, + preserveAspectRatio: MUST_USE_ATTRIBUTE, + r: MUST_USE_ATTRIBUTE, + rx: MUST_USE_ATTRIBUTE, + ry: MUST_USE_ATTRIBUTE, + spreadMethod: MUST_USE_ATTRIBUTE, + stopColor: MUST_USE_ATTRIBUTE, + stopOpacity: MUST_USE_ATTRIBUTE, + stroke: MUST_USE_ATTRIBUTE, + strokeDasharray: MUST_USE_ATTRIBUTE, + strokeLinecap: MUST_USE_ATTRIBUTE, + strokeOpacity: MUST_USE_ATTRIBUTE, + strokeWidth: MUST_USE_ATTRIBUTE, + textAnchor: MUST_USE_ATTRIBUTE, + transform: MUST_USE_ATTRIBUTE, + version: MUST_USE_ATTRIBUTE, + viewBox: MUST_USE_ATTRIBUTE, + x1: MUST_USE_ATTRIBUTE, + x2: MUST_USE_ATTRIBUTE, + x: MUST_USE_ATTRIBUTE, + y1: MUST_USE_ATTRIBUTE, + y2: MUST_USE_ATTRIBUTE, + y: MUST_USE_ATTRIBUTE + }, + DOMAttributeNames: { + fillOpacity: 'fill-opacity', + fontFamily: 'font-family', + fontSize: 'font-size', + gradientTransform: 'gradientTransform', + gradientUnits: 'gradientUnits', + markerEnd: 'marker-end', + markerMid: 'marker-mid', + markerStart: 'marker-start', + patternContentUnits: 'patternContentUnits', + patternUnits: 'patternUnits', + preserveAspectRatio: 'preserveAspectRatio', + spreadMethod: 'spreadMethod', + stopColor: 'stop-color', + stopOpacity: 'stop-opacity', + strokeDasharray: 'stroke-dasharray', + strokeLinecap: 'stroke-linecap', + strokeOpacity: 'stroke-opacity', + strokeWidth: 'stroke-width', + textAnchor: 'text-anchor', + viewBox: 'viewBox' + } +}; + +module.exports = SVGDOMPropertyConfig; + +},{"10":10}],89:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SelectEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPropagators = _dereq_(20); +var ReactInputSelection = _dereq_(65); +var SyntheticEvent = _dereq_(95); + +var getActiveElement = _dereq_(121); +var isTextInputElement = _dereq_(138); +var keyOf = _dereq_(141); +var shallowEqual = _dereq_(150); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + select: { + phasedRegistrationNames: { + bubbled: keyOf({onSelect: null}), + captured: keyOf({onSelectCapture: null}) + }, + dependencies: [ + topLevelTypes.topBlur, + topLevelTypes.topContextMenu, + topLevelTypes.topFocus, + topLevelTypes.topKeyDown, + topLevelTypes.topMouseDown, + topLevelTypes.topMouseUp, + topLevelTypes.topSelectionChange + ] + } +}; + +var activeElement = null; +var activeElementID = null; +var lastSelection = null; +var mouseDown = false; + +/** + * Get an object which is a unique representation of the current selection. + * + * The return value will not be consistent across nodes or browsers, but + * two identical selections on the same node will return identical objects. + * + * @param {DOMElement} node + * @param {object} + */ +function getSelection(node) { + if ('selectionStart' in node && + ReactInputSelection.hasSelectionCapabilities(node)) { + return { + start: node.selectionStart, + end: node.selectionEnd + }; + } else if (window.getSelection) { + var selection = window.getSelection(); + return { + anchorNode: selection.anchorNode, + anchorOffset: selection.anchorOffset, + focusNode: selection.focusNode, + focusOffset: selection.focusOffset + }; + } else if (document.selection) { + var range = document.selection.createRange(); + return { + parentElement: range.parentElement(), + text: range.text, + top: range.boundingTop, + left: range.boundingLeft + }; + } +} + +/** + * Poll selection to see whether it's changed. + * + * @param {object} nativeEvent + * @return {?SyntheticEvent} + */ +function constructSelectEvent(nativeEvent) { + // Ensure we have the right element, and that the user is not dragging a + // selection (this matches native `select` event behavior). In HTML5, select + // fires only on input and textarea thus if there's no focused element we + // won't dispatch. + if (mouseDown || + activeElement == null || + activeElement !== getActiveElement()) { + return null; + } + + // Only fire when selection has actually changed. + var currentSelection = getSelection(activeElement); + if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) { + lastSelection = currentSelection; + + var syntheticEvent = SyntheticEvent.getPooled( + eventTypes.select, + activeElementID, + nativeEvent + ); + + syntheticEvent.type = 'select'; + syntheticEvent.target = activeElement; + + EventPropagators.accumulateTwoPhaseDispatches(syntheticEvent); + + return syntheticEvent; + } +} + +/** + * This plugin creates an `onSelect` event that normalizes select events + * across form elements. + * + * Supported elements are: + * - input (see `isTextInputElement`) + * - textarea + * - contentEditable + * + * This differs from native browser implementations in the following ways: + * - Fires on contentEditable fields as well as inputs. + * - Fires for collapsed selection. + * - Fires after user input. + */ +var SelectEventPlugin = { + + eventTypes: eventTypes, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + + switch (topLevelType) { + // Track the input node that has focus. + case topLevelTypes.topFocus: + if (isTextInputElement(topLevelTarget) || + topLevelTarget.contentEditable === 'true') { + activeElement = topLevelTarget; + activeElementID = topLevelTargetID; + lastSelection = null; + } + break; + case topLevelTypes.topBlur: + activeElement = null; + activeElementID = null; + lastSelection = null; + break; + + // Don't fire the event while the user is dragging. This matches the + // semantics of the native select event. + case topLevelTypes.topMouseDown: + mouseDown = true; + break; + case topLevelTypes.topContextMenu: + case topLevelTypes.topMouseUp: + mouseDown = false; + return constructSelectEvent(nativeEvent); + + // Chrome and IE fire non-standard event when selection is changed (and + // sometimes when it hasn't). + // Firefox doesn't support selectionchange, so check selection status + // after each key entry. The selection changes after keydown and before + // keyup, but we check on keydown as well in the case of holding down a + // key, when multiple keydown events are fired but only one keyup is. + case topLevelTypes.topSelectionChange: + case topLevelTypes.topKeyDown: + case topLevelTypes.topKeyUp: + return constructSelectEvent(nativeEvent); + } + } +}; + +module.exports = SelectEventPlugin; + +},{"121":121,"138":138,"141":141,"15":15,"150":150,"20":20,"65":65,"95":95}],90:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ServerReactRootIndex + * @typechecks + */ + +'use strict'; + +/** + * Size of the reactRoot ID space. We generate random numbers for React root + * IDs and if there's a collision the events and DOM update system will + * get confused. In the future we need a way to generate GUIDs but for + * now this will work on a smaller scale. + */ +var GLOBAL_MOUNT_POINT_MAX = Math.pow(2, 53); + +var ServerReactRootIndex = { + createReactRootIndex: function() { + return Math.ceil(Math.random() * GLOBAL_MOUNT_POINT_MAX); + } +}; + +module.exports = ServerReactRootIndex; + +},{}],91:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SimpleEventPlugin + */ + +'use strict'; + +var EventConstants = _dereq_(15); +var EventPluginUtils = _dereq_(19); +var EventPropagators = _dereq_(20); +var SyntheticClipboardEvent = _dereq_(92); +var SyntheticEvent = _dereq_(95); +var SyntheticFocusEvent = _dereq_(96); +var SyntheticKeyboardEvent = _dereq_(98); +var SyntheticMouseEvent = _dereq_(99); +var SyntheticDragEvent = _dereq_(94); +var SyntheticTouchEvent = _dereq_(100); +var SyntheticUIEvent = _dereq_(101); +var SyntheticWheelEvent = _dereq_(102); + +var getEventCharCode = _dereq_(122); + +var invariant = _dereq_(135); +var keyOf = _dereq_(141); +var warning = _dereq_(154); + +var topLevelTypes = EventConstants.topLevelTypes; + +var eventTypes = { + blur: { + phasedRegistrationNames: { + bubbled: keyOf({onBlur: true}), + captured: keyOf({onBlurCapture: true}) + } + }, + click: { + phasedRegistrationNames: { + bubbled: keyOf({onClick: true}), + captured: keyOf({onClickCapture: true}) + } + }, + contextMenu: { + phasedRegistrationNames: { + bubbled: keyOf({onContextMenu: true}), + captured: keyOf({onContextMenuCapture: true}) + } + }, + copy: { + phasedRegistrationNames: { + bubbled: keyOf({onCopy: true}), + captured: keyOf({onCopyCapture: true}) + } + }, + cut: { + phasedRegistrationNames: { + bubbled: keyOf({onCut: true}), + captured: keyOf({onCutCapture: true}) + } + }, + doubleClick: { + phasedRegistrationNames: { + bubbled: keyOf({onDoubleClick: true}), + captured: keyOf({onDoubleClickCapture: true}) + } + }, + drag: { + phasedRegistrationNames: { + bubbled: keyOf({onDrag: true}), + captured: keyOf({onDragCapture: true}) + } + }, + dragEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onDragEnd: true}), + captured: keyOf({onDragEndCapture: true}) + } + }, + dragEnter: { + phasedRegistrationNames: { + bubbled: keyOf({onDragEnter: true}), + captured: keyOf({onDragEnterCapture: true}) + } + }, + dragExit: { + phasedRegistrationNames: { + bubbled: keyOf({onDragExit: true}), + captured: keyOf({onDragExitCapture: true}) + } + }, + dragLeave: { + phasedRegistrationNames: { + bubbled: keyOf({onDragLeave: true}), + captured: keyOf({onDragLeaveCapture: true}) + } + }, + dragOver: { + phasedRegistrationNames: { + bubbled: keyOf({onDragOver: true}), + captured: keyOf({onDragOverCapture: true}) + } + }, + dragStart: { + phasedRegistrationNames: { + bubbled: keyOf({onDragStart: true}), + captured: keyOf({onDragStartCapture: true}) + } + }, + drop: { + phasedRegistrationNames: { + bubbled: keyOf({onDrop: true}), + captured: keyOf({onDropCapture: true}) + } + }, + focus: { + phasedRegistrationNames: { + bubbled: keyOf({onFocus: true}), + captured: keyOf({onFocusCapture: true}) + } + }, + input: { + phasedRegistrationNames: { + bubbled: keyOf({onInput: true}), + captured: keyOf({onInputCapture: true}) + } + }, + keyDown: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyDown: true}), + captured: keyOf({onKeyDownCapture: true}) + } + }, + keyPress: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyPress: true}), + captured: keyOf({onKeyPressCapture: true}) + } + }, + keyUp: { + phasedRegistrationNames: { + bubbled: keyOf({onKeyUp: true}), + captured: keyOf({onKeyUpCapture: true}) + } + }, + load: { + phasedRegistrationNames: { + bubbled: keyOf({onLoad: true}), + captured: keyOf({onLoadCapture: true}) + } + }, + error: { + phasedRegistrationNames: { + bubbled: keyOf({onError: true}), + captured: keyOf({onErrorCapture: true}) + } + }, + // Note: We do not allow listening to mouseOver events. Instead, use the + // onMouseEnter/onMouseLeave created by `EnterLeaveEventPlugin`. + mouseDown: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseDown: true}), + captured: keyOf({onMouseDownCapture: true}) + } + }, + mouseMove: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseMove: true}), + captured: keyOf({onMouseMoveCapture: true}) + } + }, + mouseOut: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseOut: true}), + captured: keyOf({onMouseOutCapture: true}) + } + }, + mouseOver: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseOver: true}), + captured: keyOf({onMouseOverCapture: true}) + } + }, + mouseUp: { + phasedRegistrationNames: { + bubbled: keyOf({onMouseUp: true}), + captured: keyOf({onMouseUpCapture: true}) + } + }, + paste: { + phasedRegistrationNames: { + bubbled: keyOf({onPaste: true}), + captured: keyOf({onPasteCapture: true}) + } + }, + reset: { + phasedRegistrationNames: { + bubbled: keyOf({onReset: true}), + captured: keyOf({onResetCapture: true}) + } + }, + scroll: { + phasedRegistrationNames: { + bubbled: keyOf({onScroll: true}), + captured: keyOf({onScrollCapture: true}) + } + }, + submit: { + phasedRegistrationNames: { + bubbled: keyOf({onSubmit: true}), + captured: keyOf({onSubmitCapture: true}) + } + }, + touchCancel: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchCancel: true}), + captured: keyOf({onTouchCancelCapture: true}) + } + }, + touchEnd: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchEnd: true}), + captured: keyOf({onTouchEndCapture: true}) + } + }, + touchMove: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchMove: true}), + captured: keyOf({onTouchMoveCapture: true}) + } + }, + touchStart: { + phasedRegistrationNames: { + bubbled: keyOf({onTouchStart: true}), + captured: keyOf({onTouchStartCapture: true}) + } + }, + wheel: { + phasedRegistrationNames: { + bubbled: keyOf({onWheel: true}), + captured: keyOf({onWheelCapture: true}) + } + } +}; + +var topLevelEventsToDispatchConfig = { + topBlur: eventTypes.blur, + topClick: eventTypes.click, + topContextMenu: eventTypes.contextMenu, + topCopy: eventTypes.copy, + topCut: eventTypes.cut, + topDoubleClick: eventTypes.doubleClick, + topDrag: eventTypes.drag, + topDragEnd: eventTypes.dragEnd, + topDragEnter: eventTypes.dragEnter, + topDragExit: eventTypes.dragExit, + topDragLeave: eventTypes.dragLeave, + topDragOver: eventTypes.dragOver, + topDragStart: eventTypes.dragStart, + topDrop: eventTypes.drop, + topError: eventTypes.error, + topFocus: eventTypes.focus, + topInput: eventTypes.input, + topKeyDown: eventTypes.keyDown, + topKeyPress: eventTypes.keyPress, + topKeyUp: eventTypes.keyUp, + topLoad: eventTypes.load, + topMouseDown: eventTypes.mouseDown, + topMouseMove: eventTypes.mouseMove, + topMouseOut: eventTypes.mouseOut, + topMouseOver: eventTypes.mouseOver, + topMouseUp: eventTypes.mouseUp, + topPaste: eventTypes.paste, + topReset: eventTypes.reset, + topScroll: eventTypes.scroll, + topSubmit: eventTypes.submit, + topTouchCancel: eventTypes.touchCancel, + topTouchEnd: eventTypes.touchEnd, + topTouchMove: eventTypes.touchMove, + topTouchStart: eventTypes.touchStart, + topWheel: eventTypes.wheel +}; + +for (var type in topLevelEventsToDispatchConfig) { + topLevelEventsToDispatchConfig[type].dependencies = [type]; +} + +var SimpleEventPlugin = { + + eventTypes: eventTypes, + + /** + * Same as the default implementation, except cancels the event when return + * value is false. This behavior will be disabled in a future release. + * + * @param {object} Event to be dispatched. + * @param {function} Application-level callback. + * @param {string} domID DOM ID to pass to the callback. + */ + executeDispatch: function(event, listener, domID) { + var returnValue = EventPluginUtils.executeDispatch(event, listener, domID); + + ("production" !== "development" ? warning( + typeof returnValue !== 'boolean', + 'Returning `false` from an event handler is deprecated and will be ' + + 'ignored in a future release. Instead, manually call ' + + 'e.stopPropagation() or e.preventDefault(), as appropriate.' + ) : null); + + if (returnValue === false) { + event.stopPropagation(); + event.preventDefault(); + } + }, + + /** + * @param {string} topLevelType Record from `EventConstants`. + * @param {DOMEventTarget} topLevelTarget The listening component root node. + * @param {string} topLevelTargetID ID of `topLevelTarget`. + * @param {object} nativeEvent Native browser event. + * @return {*} An accumulation of synthetic events. + * @see {EventPluginHub.extractEvents} + */ + extractEvents: function( + topLevelType, + topLevelTarget, + topLevelTargetID, + nativeEvent) { + var dispatchConfig = topLevelEventsToDispatchConfig[topLevelType]; + if (!dispatchConfig) { + return null; + } + var EventConstructor; + switch (topLevelType) { + case topLevelTypes.topInput: + case topLevelTypes.topLoad: + case topLevelTypes.topError: + case topLevelTypes.topReset: + case topLevelTypes.topSubmit: + // HTML Events + // @see http://www.w3.org/TR/html5/index.html#events-0 + EventConstructor = SyntheticEvent; + break; + case topLevelTypes.topKeyPress: + // FireFox creates a keypress event for function keys too. This removes + // the unwanted keypress events. Enter is however both printable and + // non-printable. One would expect Tab to be as well (but it isn't). + if (getEventCharCode(nativeEvent) === 0) { + return null; + } + /* falls through */ + case topLevelTypes.topKeyDown: + case topLevelTypes.topKeyUp: + EventConstructor = SyntheticKeyboardEvent; + break; + case topLevelTypes.topBlur: + case topLevelTypes.topFocus: + EventConstructor = SyntheticFocusEvent; + break; + case topLevelTypes.topClick: + // Firefox creates a click event on right mouse clicks. This removes the + // unwanted click events. + if (nativeEvent.button === 2) { + return null; + } + /* falls through */ + case topLevelTypes.topContextMenu: + case topLevelTypes.topDoubleClick: + case topLevelTypes.topMouseDown: + case topLevelTypes.topMouseMove: + case topLevelTypes.topMouseOut: + case topLevelTypes.topMouseOver: + case topLevelTypes.topMouseUp: + EventConstructor = SyntheticMouseEvent; + break; + case topLevelTypes.topDrag: + case topLevelTypes.topDragEnd: + case topLevelTypes.topDragEnter: + case topLevelTypes.topDragExit: + case topLevelTypes.topDragLeave: + case topLevelTypes.topDragOver: + case topLevelTypes.topDragStart: + case topLevelTypes.topDrop: + EventConstructor = SyntheticDragEvent; + break; + case topLevelTypes.topTouchCancel: + case topLevelTypes.topTouchEnd: + case topLevelTypes.topTouchMove: + case topLevelTypes.topTouchStart: + EventConstructor = SyntheticTouchEvent; + break; + case topLevelTypes.topScroll: + EventConstructor = SyntheticUIEvent; + break; + case topLevelTypes.topWheel: + EventConstructor = SyntheticWheelEvent; + break; + case topLevelTypes.topCopy: + case topLevelTypes.topCut: + case topLevelTypes.topPaste: + EventConstructor = SyntheticClipboardEvent; + break; + } + ("production" !== "development" ? invariant( + EventConstructor, + 'SimpleEventPlugin: Unhandled event type, `%s`.', + topLevelType + ) : invariant(EventConstructor)); + var event = EventConstructor.getPooled( + dispatchConfig, + topLevelTargetID, + nativeEvent + ); + EventPropagators.accumulateTwoPhaseDispatches(event); + return event; + } + +}; + +module.exports = SimpleEventPlugin; + +},{"100":100,"101":101,"102":102,"122":122,"135":135,"141":141,"15":15,"154":154,"19":19,"20":20,"92":92,"94":94,"95":95,"96":96,"98":98,"99":99}],92:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticClipboardEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(95); + +/** + * @interface Event + * @see http://www.w3.org/TR/clipboard-apis/ + */ +var ClipboardEventInterface = { + clipboardData: function(event) { + return ( + 'clipboardData' in event ? + event.clipboardData : + window.clipboardData + ); + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticClipboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass(SyntheticClipboardEvent, ClipboardEventInterface); + +module.exports = SyntheticClipboardEvent; + +},{"95":95}],93:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticCompositionEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(95); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents + */ +var CompositionEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticCompositionEvent( + dispatchConfig, + dispatchMarker, + nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass( + SyntheticCompositionEvent, + CompositionEventInterface +); + +module.exports = SyntheticCompositionEvent; + +},{"95":95}],94:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticDragEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticMouseEvent = _dereq_(99); + +/** + * @interface DragEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var DragEventInterface = { + dataTransfer: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticDragEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticMouseEvent.augmentClass(SyntheticDragEvent, DragEventInterface); + +module.exports = SyntheticDragEvent; + +},{"99":99}],95:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticEvent + * @typechecks static-only + */ + +'use strict'; + +var PooledClass = _dereq_(28); + +var assign = _dereq_(27); +var emptyFunction = _dereq_(114); +var getEventTarget = _dereq_(125); + +/** + * @interface Event + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var EventInterface = { + type: null, + target: getEventTarget, + // currentTarget is set when dispatching; no use in copying it here + currentTarget: emptyFunction.thatReturnsNull, + eventPhase: null, + bubbles: null, + cancelable: null, + timeStamp: function(event) { + return event.timeStamp || Date.now(); + }, + defaultPrevented: null, + isTrusted: null +}; + +/** + * Synthetic events are dispatched by event plugins, typically in response to a + * top-level event delegation handler. + * + * These systems should generally use pooling to reduce the frequency of garbage + * collection. The system should check `isPersistent` to determine whether the + * event should be released into the pool after being dispatched. Users that + * need a persisted event should invoke `persist`. + * + * Synthetic events (and subclasses) implement the DOM Level 3 Events API by + * normalizing browser quirks. Subclasses do not necessarily have to implement a + * DOM interface; custom application-specific events can also subclass this. + * + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + */ +function SyntheticEvent(dispatchConfig, dispatchMarker, nativeEvent) { + this.dispatchConfig = dispatchConfig; + this.dispatchMarker = dispatchMarker; + this.nativeEvent = nativeEvent; + + var Interface = this.constructor.Interface; + for (var propName in Interface) { + if (!Interface.hasOwnProperty(propName)) { + continue; + } + var normalize = Interface[propName]; + if (normalize) { + this[propName] = normalize(nativeEvent); + } else { + this[propName] = nativeEvent[propName]; + } + } + + var defaultPrevented = nativeEvent.defaultPrevented != null ? + nativeEvent.defaultPrevented : + nativeEvent.returnValue === false; + if (defaultPrevented) { + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + } else { + this.isDefaultPrevented = emptyFunction.thatReturnsFalse; + } + this.isPropagationStopped = emptyFunction.thatReturnsFalse; +} + +assign(SyntheticEvent.prototype, { + + preventDefault: function() { + this.defaultPrevented = true; + var event = this.nativeEvent; + if (event.preventDefault) { + event.preventDefault(); + } else { + event.returnValue = false; + } + this.isDefaultPrevented = emptyFunction.thatReturnsTrue; + }, + + stopPropagation: function() { + var event = this.nativeEvent; + if (event.stopPropagation) { + event.stopPropagation(); + } else { + event.cancelBubble = true; + } + this.isPropagationStopped = emptyFunction.thatReturnsTrue; + }, + + /** + * We release all dispatched `SyntheticEvent`s after each event loop, adding + * them back into the pool. This allows a way to hold onto a reference that + * won't be added back into the pool. + */ + persist: function() { + this.isPersistent = emptyFunction.thatReturnsTrue; + }, + + /** + * Checks if this event should be released back into the pool. + * + * @return {boolean} True if this should not be released, false otherwise. + */ + isPersistent: emptyFunction.thatReturnsFalse, + + /** + * `PooledClass` looks for `destructor` on each instance it releases. + */ + destructor: function() { + var Interface = this.constructor.Interface; + for (var propName in Interface) { + this[propName] = null; + } + this.dispatchConfig = null; + this.dispatchMarker = null; + this.nativeEvent = null; + } + +}); + +SyntheticEvent.Interface = EventInterface; + +/** + * Helper to reduce boilerplate when creating subclasses. + * + * @param {function} Class + * @param {?object} Interface + */ +SyntheticEvent.augmentClass = function(Class, Interface) { + var Super = this; + + var prototype = Object.create(Super.prototype); + assign(prototype, Class.prototype); + Class.prototype = prototype; + Class.prototype.constructor = Class; + + Class.Interface = assign({}, Super.Interface, Interface); + Class.augmentClass = Super.augmentClass; + + PooledClass.addPoolingTo(Class, PooledClass.threeArgumentPooler); +}; + +PooledClass.addPoolingTo(SyntheticEvent, PooledClass.threeArgumentPooler); + +module.exports = SyntheticEvent; + +},{"114":114,"125":125,"27":27,"28":28}],96:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticFocusEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(101); + +/** + * @interface FocusEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var FocusEventInterface = { + relatedTarget: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticFocusEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticFocusEvent, FocusEventInterface); + +module.exports = SyntheticFocusEvent; + +},{"101":101}],97:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticInputEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(95); + +/** + * @interface Event + * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105 + * /#events-inputevents + */ +var InputEventInterface = { + data: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticInputEvent( + dispatchConfig, + dispatchMarker, + nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass( + SyntheticInputEvent, + InputEventInterface +); + +module.exports = SyntheticInputEvent; + +},{"95":95}],98:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticKeyboardEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(101); + +var getEventCharCode = _dereq_(122); +var getEventKey = _dereq_(123); +var getEventModifierState = _dereq_(124); + +/** + * @interface KeyboardEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var KeyboardEventInterface = { + key: getEventKey, + location: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + repeat: null, + locale: null, + getModifierState: getEventModifierState, + // Legacy Interface + charCode: function(event) { + // `charCode` is the result of a KeyPress event and represents the value of + // the actual printable character. + + // KeyPress is deprecated, but its replacement is not yet final and not + // implemented in any major browser. Only KeyPress has charCode. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + return 0; + }, + keyCode: function(event) { + // `keyCode` is the result of a KeyDown/Up event and represents the value of + // physical keyboard key. + + // The actual meaning of the value depends on the users' keyboard layout + // which cannot be detected. Assuming that it is a US keyboard layout + // provides a surprisingly accurate mapping for US and European users. + // Due to this, it is left to the user to implement at this time. + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + }, + which: function(event) { + // `which` is an alias for either `keyCode` or `charCode` depending on the + // type of the event. + if (event.type === 'keypress') { + return getEventCharCode(event); + } + if (event.type === 'keydown' || event.type === 'keyup') { + return event.keyCode; + } + return 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticKeyboardEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticKeyboardEvent, KeyboardEventInterface); + +module.exports = SyntheticKeyboardEvent; + +},{"101":101,"122":122,"123":123,"124":124}],99:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticMouseEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(101); +var ViewportMetrics = _dereq_(104); + +var getEventModifierState = _dereq_(124); + +/** + * @interface MouseEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var MouseEventInterface = { + screenX: null, + screenY: null, + clientX: null, + clientY: null, + ctrlKey: null, + shiftKey: null, + altKey: null, + metaKey: null, + getModifierState: getEventModifierState, + button: function(event) { + // Webkit, Firefox, IE9+ + // which: 1 2 3 + // button: 0 1 2 (standard) + var button = event.button; + if ('which' in event) { + return button; + } + // IE<9 + // which: undefined + // button: 0 0 0 + // button: 1 4 2 (onmouseup) + return button === 2 ? 2 : button === 4 ? 1 : 0; + }, + buttons: null, + relatedTarget: function(event) { + return event.relatedTarget || ( + ((event.fromElement === event.srcElement ? event.toElement : event.fromElement)) + ); + }, + // "Proprietary" Interface. + pageX: function(event) { + return 'pageX' in event ? + event.pageX : + event.clientX + ViewportMetrics.currentScrollLeft; + }, + pageY: function(event) { + return 'pageY' in event ? + event.pageY : + event.clientY + ViewportMetrics.currentScrollTop; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticMouseEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticMouseEvent, MouseEventInterface); + +module.exports = SyntheticMouseEvent; + +},{"101":101,"104":104,"124":124}],100:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticTouchEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticUIEvent = _dereq_(101); + +var getEventModifierState = _dereq_(124); + +/** + * @interface TouchEvent + * @see http://www.w3.org/TR/touch-events/ + */ +var TouchEventInterface = { + touches: null, + targetTouches: null, + changedTouches: null, + altKey: null, + metaKey: null, + ctrlKey: null, + shiftKey: null, + getModifierState: getEventModifierState +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticUIEvent} + */ +function SyntheticTouchEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticUIEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticUIEvent.augmentClass(SyntheticTouchEvent, TouchEventInterface); + +module.exports = SyntheticTouchEvent; + +},{"101":101,"124":124}],101:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticUIEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticEvent = _dereq_(95); + +var getEventTarget = _dereq_(125); + +/** + * @interface UIEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var UIEventInterface = { + view: function(event) { + if (event.view) { + return event.view; + } + + var target = getEventTarget(event); + if (target != null && target.window === target) { + // target is a window object + return target; + } + + var doc = target.ownerDocument; + // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8. + if (doc) { + return doc.defaultView || doc.parentWindow; + } else { + return window; + } + }, + detail: function(event) { + return event.detail || 0; + } +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticEvent} + */ +function SyntheticUIEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticEvent.augmentClass(SyntheticUIEvent, UIEventInterface); + +module.exports = SyntheticUIEvent; + +},{"125":125,"95":95}],102:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule SyntheticWheelEvent + * @typechecks static-only + */ + +'use strict'; + +var SyntheticMouseEvent = _dereq_(99); + +/** + * @interface WheelEvent + * @see http://www.w3.org/TR/DOM-Level-3-Events/ + */ +var WheelEventInterface = { + deltaX: function(event) { + return ( + 'deltaX' in event ? event.deltaX : + // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive). + 'wheelDeltaX' in event ? -event.wheelDeltaX : 0 + ); + }, + deltaY: function(event) { + return ( + 'deltaY' in event ? event.deltaY : + // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive). + 'wheelDeltaY' in event ? -event.wheelDeltaY : + // Fallback to `wheelDelta` for IE<9 and normalize (down is positive). + 'wheelDelta' in event ? -event.wheelDelta : 0 + ); + }, + deltaZ: null, + + // Browsers without "deltaMode" is reporting in raw wheel delta where one + // notch on the scroll is always +/- 120, roughly equivalent to pixels. + // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or + // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size. + deltaMode: null +}; + +/** + * @param {object} dispatchConfig Configuration used to dispatch this event. + * @param {string} dispatchMarker Marker identifying the event target. + * @param {object} nativeEvent Native browser event. + * @extends {SyntheticMouseEvent} + */ +function SyntheticWheelEvent(dispatchConfig, dispatchMarker, nativeEvent) { + SyntheticMouseEvent.call(this, dispatchConfig, dispatchMarker, nativeEvent); +} + +SyntheticMouseEvent.augmentClass(SyntheticWheelEvent, WheelEventInterface); + +module.exports = SyntheticWheelEvent; + +},{"99":99}],103:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule Transaction + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * `Transaction` creates a black box that is able to wrap any method such that + * certain invariants are maintained before and after the method is invoked + * (Even if an exception is thrown while invoking the wrapped method). Whoever + * instantiates a transaction can provide enforcers of the invariants at + * creation time. The `Transaction` class itself will supply one additional + * automatic invariant for you - the invariant that any transaction instance + * should not be run while it is already being run. You would typically create a + * single instance of a `Transaction` for reuse multiple times, that potentially + * is used to wrap several different methods. Wrappers are extremely simple - + * they only require implementing two methods. + * + * <pre> + * wrappers (injected at creation time) + * + + + * | | + * +-----------------|--------|--------------+ + * | v | | + * | +---------------+ | | + * | +--| wrapper1 |---|----+ | + * | | +---------------+ v | | + * | | +-------------+ | | + * | | +----| wrapper2 |--------+ | + * | | | +-------------+ | | | + * | | | | | | + * | v v v v | wrapper + * | +---+ +---+ +---------+ +---+ +---+ | invariants + * perform(anyMethod) | | | | | | | | | | | | maintained + * +----------------->|-|---|-|---|-->|anyMethod|---|---|-|---|-|--------> + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | | | | | | | | | | | | + * | +---+ +---+ +---------+ +---+ +---+ | + * | initialize close | + * +-----------------------------------------+ + * </pre> + * + * Use cases: + * - Preserving the input selection ranges before/after reconciliation. + * Restoring selection even in the event of an unexpected error. + * - Deactivating events while rearranging the DOM, preventing blurs/focuses, + * while guaranteeing that afterwards, the event system is reactivated. + * - Flushing a queue of collected DOM mutations to the main UI thread after a + * reconciliation takes place in a worker thread. + * - Invoking any collected `componentDidUpdate` callbacks after rendering new + * content. + * - (Future use case): Wrapping particular flushes of the `ReactWorker` queue + * to preserve the `scrollTop` (an automatic scroll aware DOM). + * - (Future use case): Layout calculations before and after DOM updates. + * + * Transactional plugin API: + * - A module that has an `initialize` method that returns any precomputation. + * - and a `close` method that accepts the precomputation. `close` is invoked + * when the wrapped process is completed, or has failed. + * + * @param {Array<TransactionalWrapper>} transactionWrapper Wrapper modules + * that implement `initialize` and `close`. + * @return {Transaction} Single transaction for reuse in thread. + * + * @class Transaction + */ +var Mixin = { + /** + * Sets up this instance so that it is prepared for collecting metrics. Does + * so such that this setup method may be used on an instance that is already + * initialized, in a way that does not consume additional memory upon reuse. + * That can be useful if you decide to make your subclass of this mixin a + * "PooledClass". + */ + reinitializeTransaction: function() { + this.transactionWrappers = this.getTransactionWrappers(); + if (!this.wrapperInitData) { + this.wrapperInitData = []; + } else { + this.wrapperInitData.length = 0; + } + this._isInTransaction = false; + }, + + _isInTransaction: false, + + /** + * @abstract + * @return {Array<TransactionWrapper>} Array of transaction wrappers. + */ + getTransactionWrappers: null, + + isInTransaction: function() { + return !!this._isInTransaction; + }, + + /** + * Executes the function within a safety window. Use this for the top level + * methods that result in large amounts of computation/mutations that would + * need to be safety checked. + * + * @param {function} method Member of scope to call. + * @param {Object} scope Scope to invoke from. + * @param {Object?=} args... Arguments to pass to the method (optional). + * Helps prevent need to bind in many cases. + * @return Return value from `method`. + */ + perform: function(method, scope, a, b, c, d, e, f) { + ("production" !== "development" ? invariant( + !this.isInTransaction(), + 'Transaction.perform(...): Cannot initialize a transaction when there ' + + 'is already an outstanding transaction.' + ) : invariant(!this.isInTransaction())); + var errorThrown; + var ret; + try { + this._isInTransaction = true; + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // one of these calls threw. + errorThrown = true; + this.initializeAll(0); + ret = method.call(scope, a, b, c, d, e, f); + errorThrown = false; + } finally { + try { + if (errorThrown) { + // If `method` throws, prefer to show that stack trace over any thrown + // by invoking `closeAll`. + try { + this.closeAll(0); + } catch (err) { + } + } else { + // Since `method` didn't throw, we don't want to silence the exception + // here. + this.closeAll(0); + } + } finally { + this._isInTransaction = false; + } + } + return ret; + }, + + initializeAll: function(startIndex) { + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + try { + // Catching errors makes debugging more difficult, so we start with the + // OBSERVED_ERROR state before overwriting it with the real return value + // of initialize -- if it's still set to OBSERVED_ERROR in the finally + // block, it means wrapper.initialize threw. + this.wrapperInitData[i] = Transaction.OBSERVED_ERROR; + this.wrapperInitData[i] = wrapper.initialize ? + wrapper.initialize.call(this) : + null; + } finally { + if (this.wrapperInitData[i] === Transaction.OBSERVED_ERROR) { + // The initializer for wrapper i threw an error; initialize the + // remaining wrappers but silence any exceptions from them to ensure + // that the first error is the one to bubble up. + try { + this.initializeAll(i + 1); + } catch (err) { + } + } + } + } + }, + + /** + * Invokes each of `this.transactionWrappers.close[i]` functions, passing into + * them the respective return values of `this.transactionWrappers.init[i]` + * (`close`rs that correspond to initializers that failed will not be + * invoked). + */ + closeAll: function(startIndex) { + ("production" !== "development" ? invariant( + this.isInTransaction(), + 'Transaction.closeAll(): Cannot close transaction when none are open.' + ) : invariant(this.isInTransaction())); + var transactionWrappers = this.transactionWrappers; + for (var i = startIndex; i < transactionWrappers.length; i++) { + var wrapper = transactionWrappers[i]; + var initData = this.wrapperInitData[i]; + var errorThrown; + try { + // Catching errors makes debugging more difficult, so we start with + // errorThrown set to true before setting it to false after calling + // close -- if it's still set to true in the finally block, it means + // wrapper.close threw. + errorThrown = true; + if (initData !== Transaction.OBSERVED_ERROR && wrapper.close) { + wrapper.close.call(this, initData); + } + errorThrown = false; + } finally { + if (errorThrown) { + // The closer for wrapper i threw an error; close the remaining + // wrappers but silence any exceptions from them to ensure that the + // first error is the one to bubble up. + try { + this.closeAll(i + 1); + } catch (e) { + } + } + } + } + this.wrapperInitData.length = 0; + } +}; + +var Transaction = { + + Mixin: Mixin, + + /** + * Token to look for to determine if an error occured. + */ + OBSERVED_ERROR: {} + +}; + +module.exports = Transaction; + +},{"135":135}],104:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ViewportMetrics + */ + +'use strict'; + +var ViewportMetrics = { + + currentScrollLeft: 0, + + currentScrollTop: 0, + + refreshScrollValues: function(scrollPosition) { + ViewportMetrics.currentScrollLeft = scrollPosition.x; + ViewportMetrics.currentScrollTop = scrollPosition.y; + } + +}; + +module.exports = ViewportMetrics; + +},{}],105:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule accumulateInto + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * + * Accumulates items that must not be null or undefined into the first one. This + * is used to conserve memory by avoiding array allocations, and thus sacrifices + * API cleanness. Since `current` can be null before being passed in and not + * null after this function, make sure to assign it back to `current`: + * + * `a = accumulateInto(a, b);` + * + * This API should be sparingly used. Try `accumulate` for something cleaner. + * + * @return {*|array<*>} An accumulation of items. + */ + +function accumulateInto(current, next) { + ("production" !== "development" ? invariant( + next != null, + 'accumulateInto(...): Accumulated items must not be null or undefined.' + ) : invariant(next != null)); + if (current == null) { + return next; + } + + // Both are not empty. Warning: Never call x.concat(y) when you are not + // certain that x is an Array (x could be a string with concat method). + var currentIsArray = Array.isArray(current); + var nextIsArray = Array.isArray(next); + + if (currentIsArray && nextIsArray) { + current.push.apply(current, next); + return current; + } + + if (currentIsArray) { + current.push(next); + return current; + } + + if (nextIsArray) { + // A bit too dangerous to mutate `next`. + return [current].concat(next); + } + + return [current, next]; +} + +module.exports = accumulateInto; + +},{"135":135}],106:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule adler32 + */ + +/* jslint bitwise:true */ + +'use strict'; + +var MOD = 65521; + +// This is a clean-room implementation of adler32 designed for detecting +// if markup is not what we expect it to be. It does not need to be +// cryptographically strong, only reasonably good at detecting if markup +// generated on the server is different than that on the client. +function adler32(data) { + var a = 1; + var b = 0; + for (var i = 0; i < data.length; i++) { + a = (a + data.charCodeAt(i)) % MOD; + b = (b + a) % MOD; + } + return a | (b << 16); +} + +module.exports = adler32; + +},{}],107:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelize + * @typechecks + */ + +var _hyphenPattern = /-(.)/g; + +/** + * Camelcases a hyphenated string, for example: + * + * > camelize('background-color') + * < "backgroundColor" + * + * @param {string} string + * @return {string} + */ +function camelize(string) { + return string.replace(_hyphenPattern, function(_, character) { + return character.toUpperCase(); + }); +} + +module.exports = camelize; + +},{}],108:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule camelizeStyleName + * @typechecks + */ + +"use strict"; + +var camelize = _dereq_(107); + +var msPattern = /^-ms-/; + +/** + * Camelcases a hyphenated CSS property name, for example: + * + * > camelizeStyleName('background-color') + * < "backgroundColor" + * > camelizeStyleName('-moz-transition') + * < "MozTransition" + * > camelizeStyleName('-ms-transition') + * < "msTransition" + * + * As Andi Smith suggests + * (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix + * is converted to lowercase `ms`. + * + * @param {string} string + * @return {string} + */ +function camelizeStyleName(string) { + return camelize(string.replace(msPattern, 'ms-')); +} + +module.exports = camelizeStyleName; + +},{"107":107}],109:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule containsNode + * @typechecks + */ + +var isTextNode = _dereq_(139); + +/*jslint bitwise:true */ + +/** + * Checks if a given DOM node contains or is another DOM node. + * + * @param {?DOMNode} outerNode Outer DOM node. + * @param {?DOMNode} innerNode Inner DOM node. + * @return {boolean} True if `outerNode` contains or is `innerNode`. + */ +function containsNode(outerNode, innerNode) { + if (!outerNode || !innerNode) { + return false; + } else if (outerNode === innerNode) { + return true; + } else if (isTextNode(outerNode)) { + return false; + } else if (isTextNode(innerNode)) { + return containsNode(outerNode, innerNode.parentNode); + } else if (outerNode.contains) { + return outerNode.contains(innerNode); + } else if (outerNode.compareDocumentPosition) { + return !!(outerNode.compareDocumentPosition(innerNode) & 16); + } else { + return false; + } +} + +module.exports = containsNode; + +},{"139":139}],110:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createArrayFromMixed + * @typechecks + */ + +var toArray = _dereq_(152); + +/** + * Perform a heuristic test to determine if an object is "array-like". + * + * A monk asked Joshu, a Zen master, "Has a dog Buddha nature?" + * Joshu replied: "Mu." + * + * This function determines if its argument has "array nature": it returns + * true if the argument is an actual array, an `arguments' object, or an + * HTMLCollection (e.g. node.childNodes or node.getElementsByTagName()). + * + * It will return false for other array-like objects like Filelist. + * + * @param {*} obj + * @return {boolean} + */ +function hasArrayNature(obj) { + return ( + // not null/false + !!obj && + // arrays are objects, NodeLists are functions in Safari + (typeof obj == 'object' || typeof obj == 'function') && + // quacks like an array + ('length' in obj) && + // not window + !('setInterval' in obj) && + // no DOM node should be considered an array-like + // a 'select' element has 'length' and 'item' properties on IE8 + (typeof obj.nodeType != 'number') && + ( + // a real array + (// HTMLCollection/NodeList + (Array.isArray(obj) || + // arguments + ('callee' in obj) || 'item' in obj)) + ) + ); +} + +/** + * Ensure that the argument is an array by wrapping it in an array if it is not. + * Creates a copy of the argument if it is already an array. + * + * This is mostly useful idiomatically: + * + * var createArrayFromMixed = require('createArrayFromMixed'); + * + * function takesOneOrMoreThings(things) { + * things = createArrayFromMixed(things); + * ... + * } + * + * This allows you to treat `things' as an array, but accept scalars in the API. + * + * If you need to convert an array-like object, like `arguments`, into an array + * use toArray instead. + * + * @param {*} obj + * @return {array} + */ +function createArrayFromMixed(obj) { + if (!hasArrayNature(obj)) { + return [obj]; + } else if (Array.isArray(obj)) { + return obj.slice(); + } else { + return toArray(obj); + } +} + +module.exports = createArrayFromMixed; + +},{"152":152}],111:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createFullPageComponent + * @typechecks + */ + +'use strict'; + +// Defeat circular references by requiring this directly. +var ReactClass = _dereq_(33); +var ReactElement = _dereq_(57); + +var invariant = _dereq_(135); + +/** + * Create a component that will throw an exception when unmounted. + * + * Components like <html> <head> and <body> can't be removed or added + * easily in a cross-browser way, however it's valuable to be able to + * take advantage of React's reconciliation for styling and <title> + * management. So we just document it and throw in dangerous cases. + * + * @param {string} tag The tag to wrap + * @return {function} convenience constructor of new component + */ +function createFullPageComponent(tag) { + var elementFactory = ReactElement.createFactory(tag); + + var FullPageComponent = ReactClass.createClass({ + displayName: 'ReactFullPageComponent' + tag, + + componentWillUnmount: function() { + ("production" !== "development" ? invariant( + false, + '%s tried to unmount. Because of cross-browser quirks it is ' + + 'impossible to unmount some top-level components (eg <html>, <head>, ' + + 'and <body>) reliably and efficiently. To fix this, have a single ' + + 'top-level component that never unmounts render these elements.', + this.constructor.displayName + ) : invariant(false)); + }, + + render: function() { + return elementFactory(this.props); + } + }); + + return FullPageComponent; +} + +module.exports = createFullPageComponent; + +},{"135":135,"33":33,"57":57}],112:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule createNodesFromMarkup + * @typechecks + */ + +/*jslint evil: true, sub: true */ + +var ExecutionEnvironment = _dereq_(21); + +var createArrayFromMixed = _dereq_(110); +var getMarkupWrap = _dereq_(127); +var invariant = _dereq_(135); + +/** + * Dummy container used to render all markup. + */ +var dummyNode = + ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Pattern used by `getNodeName`. + */ +var nodeNamePattern = /^\s*<(\w+)/; + +/** + * Extracts the `nodeName` of the first element in a string of markup. + * + * @param {string} markup String of markup. + * @return {?string} Node name of the supplied markup. + */ +function getNodeName(markup) { + var nodeNameMatch = markup.match(nodeNamePattern); + return nodeNameMatch && nodeNameMatch[1].toLowerCase(); +} + +/** + * Creates an array containing the nodes rendered from the supplied markup. The + * optionally supplied `handleScript` function will be invoked once for each + * <script> element that is rendered. If no `handleScript` function is supplied, + * an exception is thrown if any <script> elements are rendered. + * + * @param {string} markup A string of valid HTML markup. + * @param {?function} handleScript Invoked once for each rendered <script>. + * @return {array<DOMElement|DOMTextNode>} An array of rendered nodes. + */ +function createNodesFromMarkup(markup, handleScript) { + var node = dummyNode; + ("production" !== "development" ? invariant(!!dummyNode, 'createNodesFromMarkup dummy not initialized') : invariant(!!dummyNode)); + var nodeName = getNodeName(markup); + + var wrap = nodeName && getMarkupWrap(nodeName); + if (wrap) { + node.innerHTML = wrap[1] + markup + wrap[2]; + + var wrapDepth = wrap[0]; + while (wrapDepth--) { + node = node.lastChild; + } + } else { + node.innerHTML = markup; + } + + var scripts = node.getElementsByTagName('script'); + if (scripts.length) { + ("production" !== "development" ? invariant( + handleScript, + 'createNodesFromMarkup(...): Unexpected <script> element rendered.' + ) : invariant(handleScript)); + createArrayFromMixed(scripts).forEach(handleScript); + } + + var nodes = createArrayFromMixed(node.childNodes); + while (node.lastChild) { + node.removeChild(node.lastChild); + } + return nodes; +} + +module.exports = createNodesFromMarkup; + +},{"110":110,"127":127,"135":135,"21":21}],113:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule dangerousStyleValue + * @typechecks static-only + */ + +'use strict'; + +var CSSProperty = _dereq_(4); + +var isUnitlessNumber = CSSProperty.isUnitlessNumber; + +/** + * Convert a value into the proper css writable value. The style name `name` + * should be logical (no hyphens), as specified + * in `CSSProperty.isUnitlessNumber`. + * + * @param {string} name CSS property name such as `topMargin`. + * @param {*} value CSS property value such as `10px`. + * @return {string} Normalized style value with dimensions applied. + */ +function dangerousStyleValue(name, value) { + // Note that we've removed escapeTextForBrowser() calls here since the + // whole string will be escaped when the attribute is injected into + // the markup. If you provide unsafe user data here they can inject + // arbitrary CSS which may be problematic (I couldn't repro this): + // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet + // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/ + // This is not an XSS hole but instead a potential CSS injection issue + // which has lead to a greater discussion about how we're going to + // trust URLs moving forward. See #2115901 + + var isEmpty = value == null || typeof value === 'boolean' || value === ''; + if (isEmpty) { + return ''; + } + + var isNonNumeric = isNaN(value); + if (isNonNumeric || value === 0 || + isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name]) { + return '' + value; // cast to string + } + + if (typeof value === 'string') { + value = value.trim(); + } + return value + 'px'; +} + +module.exports = dangerousStyleValue; + +},{"4":4}],114:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyFunction + */ + +function makeEmptyFunction(arg) { + return function() { + return arg; + }; +} + +/** + * This function accepts and discards inputs; it has no side effects. This is + * primarily useful idiomatically for overridable function endpoints which + * always need to be callable, since JS lacks a null-call idiom ala Cocoa. + */ +function emptyFunction() {} + +emptyFunction.thatReturns = makeEmptyFunction; +emptyFunction.thatReturnsFalse = makeEmptyFunction(false); +emptyFunction.thatReturnsTrue = makeEmptyFunction(true); +emptyFunction.thatReturnsNull = makeEmptyFunction(null); +emptyFunction.thatReturnsThis = function() { return this; }; +emptyFunction.thatReturnsArgument = function(arg) { return arg; }; + +module.exports = emptyFunction; + +},{}],115:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule emptyObject + */ + +"use strict"; + +var emptyObject = {}; + +if ("production" !== "development") { + Object.freeze(emptyObject); +} + +module.exports = emptyObject; + +},{}],116:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule escapeTextContentForBrowser + */ + +'use strict'; + +var ESCAPE_LOOKUP = { + '&': '&', + '>': '>', + '<': '<', + '"': '"', + '\'': ''' +}; + +var ESCAPE_REGEX = /[&><"']/g; + +function escaper(match) { + return ESCAPE_LOOKUP[match]; +} + +/** + * Escapes text to prevent scripting attacks. + * + * @param {*} text Text value to escape. + * @return {string} An escaped string. + */ +function escapeTextContentForBrowser(text) { + return ('' + text).replace(ESCAPE_REGEX, escaper); +} + +module.exports = escapeTextContentForBrowser; + +},{}],117:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule findDOMNode + * @typechecks static-only + */ + +'use strict'; + +var ReactCurrentOwner = _dereq_(39); +var ReactInstanceMap = _dereq_(67); +var ReactMount = _dereq_(70); + +var invariant = _dereq_(135); +var isNode = _dereq_(137); +var warning = _dereq_(154); + +/** + * Returns the DOM node rendered by this element. + * + * @param {ReactComponent|DOMElement} componentOrElement + * @return {DOMElement} The root node of this element. + */ +function findDOMNode(componentOrElement) { + if ("production" !== "development") { + var owner = ReactCurrentOwner.current; + if (owner !== null) { + ("production" !== "development" ? warning( + owner._warnedAboutRefsInRender, + '%s is accessing getDOMNode or findDOMNode inside its render(). ' + + 'render() should be a pure function of props and state. It should ' + + 'never access something that requires stale data from the previous ' + + 'render, such as refs. Move this logic to componentDidMount and ' + + 'componentDidUpdate instead.', + owner.getName() || 'A component' + ) : null); + owner._warnedAboutRefsInRender = true; + } + } + if (componentOrElement == null) { + return null; + } + if (isNode(componentOrElement)) { + return componentOrElement; + } + if (ReactInstanceMap.has(componentOrElement)) { + return ReactMount.getNodeFromInstance(componentOrElement); + } + ("production" !== "development" ? invariant( + componentOrElement.render == null || + typeof componentOrElement.render !== 'function', + 'Component (with keys: %s) contains `render` method ' + + 'but is not mounted in the DOM', + Object.keys(componentOrElement) + ) : invariant(componentOrElement.render == null || + typeof componentOrElement.render !== 'function')); + ("production" !== "development" ? invariant( + false, + 'Element appears to be neither ReactComponent nor DOMNode (keys: %s)', + Object.keys(componentOrElement) + ) : invariant(false)); +} + +module.exports = findDOMNode; + +},{"135":135,"137":137,"154":154,"39":39,"67":67,"70":70}],118:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule flattenChildren + */ + +'use strict'; + +var traverseAllChildren = _dereq_(153); +var warning = _dereq_(154); + +/** + * @param {function} traverseContext Context passed through traversal. + * @param {?ReactComponent} child React child component. + * @param {!string} name String name of key path to child. + */ +function flattenSingleChildIntoContext(traverseContext, child, name) { + // We found a component instance. + var result = traverseContext; + var keyUnique = !result.hasOwnProperty(name); + if ("production" !== "development") { + ("production" !== "development" ? warning( + keyUnique, + 'flattenChildren(...): Encountered two children with the same key, ' + + '`%s`. Child keys must be unique; when two children share a key, only ' + + 'the first child will be used.', + name + ) : null); + } + if (keyUnique && child != null) { + result[name] = child; + } +} + +/** + * Flattens children that are typically specified as `props.children`. Any null + * children will not be included in the resulting object. + * @return {!object} flattened children keyed by name. + */ +function flattenChildren(children) { + if (children == null) { + return children; + } + var result = {}; + traverseAllChildren(children, flattenSingleChildIntoContext, result); + return result; +} + +module.exports = flattenChildren; + +},{"153":153,"154":154}],119:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule focusNode + */ + +"use strict"; + +/** + * @param {DOMElement} node input/textarea to focus + */ +function focusNode(node) { + // IE8 can throw "Can't move focus to the control because it is invisible, + // not enabled, or of a type that does not accept the focus." for all kinds of + // reasons that are too expensive and fragile to test. + try { + node.focus(); + } catch(e) { + } +} + +module.exports = focusNode; + +},{}],120:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule forEachAccumulated + */ + +'use strict'; + +/** + * @param {array} an "accumulation" of items which is either an Array or + * a single item. Useful when paired with the `accumulate` module. This is a + * simple utility that allows us to reason about a collection of items, but + * handling the case when there is exactly one item (and we do not need to + * allocate an array). + */ +var forEachAccumulated = function(arr, cb, scope) { + if (Array.isArray(arr)) { + arr.forEach(cb, scope); + } else if (arr) { + cb.call(scope, arr); + } +}; + +module.exports = forEachAccumulated; + +},{}],121:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getActiveElement + * @typechecks + */ + +/** + * Same as document.activeElement but wraps in a try-catch block. In IE it is + * not safe to call document.activeElement if there is nothing focused. + * + * The activeElement will be null only if the document body is not yet defined. + */ +function getActiveElement() /*?DOMElement*/ { + try { + return document.activeElement || document.body; + } catch (e) { + return document.body; + } +} + +module.exports = getActiveElement; + +},{}],122:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventCharCode + * @typechecks static-only + */ + +'use strict'; + +/** + * `charCode` represents the actual "character code" and is safe to use with + * `String.fromCharCode`. As such, only keys that correspond to printable + * characters produce a valid `charCode`, the only exception to this is Enter. + * The Tab-key is considered non-printable and does not have a `charCode`, + * presumably because it does not produce a tab-character in browsers. + * + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `charCode` property. + */ +function getEventCharCode(nativeEvent) { + var charCode; + var keyCode = nativeEvent.keyCode; + + if ('charCode' in nativeEvent) { + charCode = nativeEvent.charCode; + + // FF does not set `charCode` for the Enter-key, check against `keyCode`. + if (charCode === 0 && keyCode === 13) { + charCode = 13; + } + } else { + // IE8 does not implement `charCode`, but `keyCode` has the correct value. + charCode = keyCode; + } + + // Some non-printable keys are reported in `charCode`/`keyCode`, discard them. + // Must not discard the (non-)printable Enter-key. + if (charCode >= 32 || charCode === 13) { + return charCode; + } + + return 0; +} + +module.exports = getEventCharCode; + +},{}],123:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventKey + * @typechecks static-only + */ + +'use strict'; + +var getEventCharCode = _dereq_(122); + +/** + * Normalization of deprecated HTML5 `key` values + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var normalizeKey = { + 'Esc': 'Escape', + 'Spacebar': ' ', + 'Left': 'ArrowLeft', + 'Up': 'ArrowUp', + 'Right': 'ArrowRight', + 'Down': 'ArrowDown', + 'Del': 'Delete', + 'Win': 'OS', + 'Menu': 'ContextMenu', + 'Apps': 'ContextMenu', + 'Scroll': 'ScrollLock', + 'MozPrintableKey': 'Unidentified' +}; + +/** + * Translation from legacy `keyCode` to HTML5 `key` + * Only special keys supported, all others depend on keyboard layout or browser + * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names + */ +var translateToKey = { + 8: 'Backspace', + 9: 'Tab', + 12: 'Clear', + 13: 'Enter', + 16: 'Shift', + 17: 'Control', + 18: 'Alt', + 19: 'Pause', + 20: 'CapsLock', + 27: 'Escape', + 32: ' ', + 33: 'PageUp', + 34: 'PageDown', + 35: 'End', + 36: 'Home', + 37: 'ArrowLeft', + 38: 'ArrowUp', + 39: 'ArrowRight', + 40: 'ArrowDown', + 45: 'Insert', + 46: 'Delete', + 112: 'F1', 113: 'F2', 114: 'F3', 115: 'F4', 116: 'F5', 117: 'F6', + 118: 'F7', 119: 'F8', 120: 'F9', 121: 'F10', 122: 'F11', 123: 'F12', + 144: 'NumLock', + 145: 'ScrollLock', + 224: 'Meta' +}; + +/** + * @param {object} nativeEvent Native browser event. + * @return {string} Normalized `key` property. + */ +function getEventKey(nativeEvent) { + if (nativeEvent.key) { + // Normalize inconsistent values reported by browsers due to + // implementations of a working draft specification. + + // FireFox implements `key` but returns `MozPrintableKey` for all + // printable characters (normalized to `Unidentified`), ignore it. + var key = normalizeKey[nativeEvent.key] || nativeEvent.key; + if (key !== 'Unidentified') { + return key; + } + } + + // Browser does not implement `key`, polyfill as much of it as we can. + if (nativeEvent.type === 'keypress') { + var charCode = getEventCharCode(nativeEvent); + + // The enter-key is technically both printable and non-printable and can + // thus be captured by `keypress`, no other non-printable key should. + return charCode === 13 ? 'Enter' : String.fromCharCode(charCode); + } + if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') { + // While user keyboard layout determines the actual meaning of each + // `keyCode` value, almost all function keys have a universal value. + return translateToKey[nativeEvent.keyCode] || 'Unidentified'; + } + return ''; +} + +module.exports = getEventKey; + +},{"122":122}],124:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventModifierState + * @typechecks static-only + */ + +'use strict'; + +/** + * Translation from modifier key to the associated property in the event. + * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers + */ + +var modifierKeyToProp = { + 'Alt': 'altKey', + 'Control': 'ctrlKey', + 'Meta': 'metaKey', + 'Shift': 'shiftKey' +}; + +// IE8 does not implement getModifierState so we simply map it to the only +// modifier keys exposed by the event itself, does not support Lock-keys. +// Currently, all major browsers except Chrome seems to support Lock-keys. +function modifierStateGetter(keyArg) { + /*jshint validthis:true */ + var syntheticEvent = this; + var nativeEvent = syntheticEvent.nativeEvent; + if (nativeEvent.getModifierState) { + return nativeEvent.getModifierState(keyArg); + } + var keyProp = modifierKeyToProp[keyArg]; + return keyProp ? !!nativeEvent[keyProp] : false; +} + +function getEventModifierState(nativeEvent) { + return modifierStateGetter; +} + +module.exports = getEventModifierState; + +},{}],125:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getEventTarget + * @typechecks static-only + */ + +'use strict'; + +/** + * Gets the target node from a native browser event by accounting for + * inconsistencies in browser DOM APIs. + * + * @param {object} nativeEvent Native browser event. + * @return {DOMEventTarget} Target node. + */ +function getEventTarget(nativeEvent) { + var target = nativeEvent.target || nativeEvent.srcElement || window; + // Safari may fire events on text nodes (Node.TEXT_NODE is 3). + // @see http://www.quirksmode.org/js/events_properties.html + return target.nodeType === 3 ? target.parentNode : target; +} + +module.exports = getEventTarget; + +},{}],126:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getIteratorFn + * @typechecks static-only + */ + +'use strict'; + +/* global Symbol */ +var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; +var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + +/** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ +function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && ( + (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]) + ); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } +} + +module.exports = getIteratorFn; + +},{}],127:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getMarkupWrap + */ + +var ExecutionEnvironment = _dereq_(21); + +var invariant = _dereq_(135); + +/** + * Dummy container used to detect which wraps are necessary. + */ +var dummyNode = + ExecutionEnvironment.canUseDOM ? document.createElement('div') : null; + +/** + * Some browsers cannot use `innerHTML` to render certain elements standalone, + * so we wrap them, render the wrapped nodes, then extract the desired node. + * + * In IE8, certain elements cannot render alone, so wrap all elements ('*'). + */ +var shouldWrap = { + // Force wrapping for SVG elements because if they get created inside a <div>, + // they will be initialized in the wrong namespace (and will not display). + 'circle': true, + 'defs': true, + 'ellipse': true, + 'g': true, + 'line': true, + 'linearGradient': true, + 'path': true, + 'polygon': true, + 'polyline': true, + 'radialGradient': true, + 'rect': true, + 'stop': true, + 'text': true +}; + +var selectWrap = [1, '<select multiple="true">', '</select>']; +var tableWrap = [1, '<table>', '</table>']; +var trWrap = [3, '<table><tbody><tr>', '</tr></tbody></table>']; + +var svgWrap = [1, '<svg>', '</svg>']; + +var markupWrap = { + '*': [1, '?<div>', '</div>'], + + 'area': [1, '<map>', '</map>'], + 'col': [2, '<table><tbody></tbody><colgroup>', '</colgroup></table>'], + 'legend': [1, '<fieldset>', '</fieldset>'], + 'param': [1, '<object>', '</object>'], + 'tr': [2, '<table><tbody>', '</tbody></table>'], + + 'optgroup': selectWrap, + 'option': selectWrap, + + 'caption': tableWrap, + 'colgroup': tableWrap, + 'tbody': tableWrap, + 'tfoot': tableWrap, + 'thead': tableWrap, + + 'td': trWrap, + 'th': trWrap, + + 'circle': svgWrap, + 'defs': svgWrap, + 'ellipse': svgWrap, + 'g': svgWrap, + 'line': svgWrap, + 'linearGradient': svgWrap, + 'path': svgWrap, + 'polygon': svgWrap, + 'polyline': svgWrap, + 'radialGradient': svgWrap, + 'rect': svgWrap, + 'stop': svgWrap, + 'text': svgWrap +}; + +/** + * Gets the markup wrap configuration for the supplied `nodeName`. + * + * NOTE: This lazily detects which wraps are necessary for the current browser. + * + * @param {string} nodeName Lowercase `nodeName`. + * @return {?array} Markup wrap configuration, if applicable. + */ +function getMarkupWrap(nodeName) { + ("production" !== "development" ? invariant(!!dummyNode, 'Markup wrapping node not initialized') : invariant(!!dummyNode)); + if (!markupWrap.hasOwnProperty(nodeName)) { + nodeName = '*'; + } + if (!shouldWrap.hasOwnProperty(nodeName)) { + if (nodeName === '*') { + dummyNode.innerHTML = '<link />'; + } else { + dummyNode.innerHTML = '<' + nodeName + '></' + nodeName + '>'; + } + shouldWrap[nodeName] = !dummyNode.firstChild; + } + return shouldWrap[nodeName] ? markupWrap[nodeName] : null; +} + + +module.exports = getMarkupWrap; + +},{"135":135,"21":21}],128:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getNodeForCharacterOffset + */ + +'use strict'; + +/** + * Given any node return the first leaf node without children. + * + * @param {DOMElement|DOMTextNode} node + * @return {DOMElement|DOMTextNode} + */ +function getLeafNode(node) { + while (node && node.firstChild) { + node = node.firstChild; + } + return node; +} + +/** + * Get the next sibling within a container. This will walk up the + * DOM if a node's siblings have been exhausted. + * + * @param {DOMElement|DOMTextNode} node + * @return {?DOMElement|DOMTextNode} + */ +function getSiblingNode(node) { + while (node) { + if (node.nextSibling) { + return node.nextSibling; + } + node = node.parentNode; + } +} + +/** + * Get object describing the nodes which contain characters at offset. + * + * @param {DOMElement|DOMTextNode} root + * @param {number} offset + * @return {?object} + */ +function getNodeForCharacterOffset(root, offset) { + var node = getLeafNode(root); + var nodeStart = 0; + var nodeEnd = 0; + + while (node) { + if (node.nodeType === 3) { + nodeEnd = nodeStart + node.textContent.length; + + if (nodeStart <= offset && nodeEnd >= offset) { + return { + node: node, + offset: offset - nodeStart + }; + } + + nodeStart = nodeEnd; + } + + node = getLeafNode(getSiblingNode(node)); + } +} + +module.exports = getNodeForCharacterOffset; + +},{}],129:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getReactRootElementInContainer + */ + +'use strict'; + +var DOC_NODE_TYPE = 9; + +/** + * @param {DOMElement|DOMDocument} container DOM element that may contain + * a React component + * @return {?*} DOM element that may have the reactRoot ID, or null. + */ +function getReactRootElementInContainer(container) { + if (!container) { + return null; + } + + if (container.nodeType === DOC_NODE_TYPE) { + return container.documentElement; + } else { + return container.firstChild; + } +} + +module.exports = getReactRootElementInContainer; + +},{}],130:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getTextContentAccessor + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); + +var contentKey = null; + +/** + * Gets the key used to access text content on a DOM node. + * + * @return {?string} Key used to access text content. + * @internal + */ +function getTextContentAccessor() { + if (!contentKey && ExecutionEnvironment.canUseDOM) { + // Prefer textContent to innerText because many browsers support both but + // SVG <text> elements don't support innerText even when <div> does. + contentKey = 'textContent' in document.documentElement ? + 'textContent' : + 'innerText'; + } + return contentKey; +} + +module.exports = getTextContentAccessor; + +},{"21":21}],131:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule getUnboundedScrollPosition + * @typechecks + */ + +"use strict"; + +/** + * Gets the scroll position of the supplied element or window. + * + * The return values are unbounded, unlike `getScrollPosition`. This means they + * may be negative or exceed the element boundaries (which is possible using + * inertial scrolling). + * + * @param {DOMWindow|DOMElement} scrollable + * @return {object} Map with `x` and `y` keys. + */ +function getUnboundedScrollPosition(scrollable) { + if (scrollable === window) { + return { + x: window.pageXOffset || document.documentElement.scrollLeft, + y: window.pageYOffset || document.documentElement.scrollTop + }; + } + return { + x: scrollable.scrollLeft, + y: scrollable.scrollTop + }; +} + +module.exports = getUnboundedScrollPosition; + +},{}],132:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenate + * @typechecks + */ + +var _uppercasePattern = /([A-Z])/g; + +/** + * Hyphenates a camelcased string, for example: + * + * > hyphenate('backgroundColor') + * < "background-color" + * + * For CSS style names, use `hyphenateStyleName` instead which works properly + * with all vendor prefixes, including `ms`. + * + * @param {string} string + * @return {string} + */ +function hyphenate(string) { + return string.replace(_uppercasePattern, '-$1').toLowerCase(); +} + +module.exports = hyphenate; + +},{}],133:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule hyphenateStyleName + * @typechecks + */ + +"use strict"; + +var hyphenate = _dereq_(132); + +var msPattern = /^ms-/; + +/** + * Hyphenates a camelcased CSS property name, for example: + * + * > hyphenateStyleName('backgroundColor') + * < "background-color" + * > hyphenateStyleName('MozTransition') + * < "-moz-transition" + * > hyphenateStyleName('msTransition') + * < "-ms-transition" + * + * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix + * is converted to `-ms-`. + * + * @param {string} string + * @return {string} + */ +function hyphenateStyleName(string) { + return hyphenate(string).replace(msPattern, '-ms-'); +} + +module.exports = hyphenateStyleName; + +},{"132":132}],134:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule instantiateReactComponent + * @typechecks static-only + */ + +'use strict'; + +var ReactCompositeComponent = _dereq_(37); +var ReactEmptyComponent = _dereq_(59); +var ReactNativeComponent = _dereq_(73); + +var assign = _dereq_(27); +var invariant = _dereq_(135); +var warning = _dereq_(154); + +// To avoid a cyclic dependency, we create the final class in this module +var ReactCompositeComponentWrapper = function() { }; +assign( + ReactCompositeComponentWrapper.prototype, + ReactCompositeComponent.Mixin, + { + _instantiateReactComponent: instantiateReactComponent + } +); + +/** + * Check if the type reference is a known internal type. I.e. not a user + * provided composite type. + * + * @param {function} type + * @return {boolean} Returns true if this is a valid internal type. + */ +function isInternalComponentType(type) { + return ( + typeof type === 'function' && + typeof type.prototype.mountComponent === 'function' && + typeof type.prototype.receiveComponent === 'function' + ); +} + +/** + * Given a ReactNode, create an instance that will actually be mounted. + * + * @param {ReactNode} node + * @param {*} parentCompositeType The composite type that resolved this. + * @return {object} A new instance of the element's constructor. + * @protected + */ +function instantiateReactComponent(node, parentCompositeType) { + var instance; + + if (node === null || node === false) { + node = ReactEmptyComponent.emptyElement; + } + + if (typeof node === 'object') { + var element = node; + if ("production" !== "development") { + ("production" !== "development" ? warning( + element && (typeof element.type === 'function' || + typeof element.type === 'string'), + 'Only functions or strings can be mounted as React components.' + ) : null); + } + + // Special case string values + if (parentCompositeType === element.type && + typeof element.type === 'string') { + // Avoid recursion if the wrapper renders itself. + instance = ReactNativeComponent.createInternalComponent(element); + // All native components are currently wrapped in a composite so we're + // safe to assume that this is what we should instantiate. + } else if (isInternalComponentType(element.type)) { + // This is temporarily available for custom components that are not string + // represenations. I.e. ART. Once those are updated to use the string + // representation, we can drop this code path. + instance = new element.type(element); + } else { + instance = new ReactCompositeComponentWrapper(); + } + } else if (typeof node === 'string' || typeof node === 'number') { + instance = ReactNativeComponent.createInstanceForText(node); + } else { + ("production" !== "development" ? invariant( + false, + 'Encountered invalid React node of type %s', + typeof node + ) : invariant(false)); + } + + if ("production" !== "development") { + ("production" !== "development" ? warning( + typeof instance.construct === 'function' && + typeof instance.mountComponent === 'function' && + typeof instance.receiveComponent === 'function' && + typeof instance.unmountComponent === 'function', + 'Only React Components can be mounted.' + ) : null); + } + + // Sets up the instance. This can probably just move into the constructor now. + instance.construct(node); + + // These two fields are used by the DOM and ART diffing algorithms + // respectively. Instead of using expandos on components, we should be + // storing the state needed by the diffing algorithms elsewhere. + instance._mountIndex = 0; + instance._mountImage = null; + + if ("production" !== "development") { + instance._isOwnerNecessary = false; + instance._warnedAboutRefsInRender = false; + } + + // Internal instances should fully constructed at this point, so they should + // not get any new fields added to them at this point. + if ("production" !== "development") { + if (Object.preventExtensions) { + Object.preventExtensions(instance); + } + } + + return instance; +} + +module.exports = instantiateReactComponent; + +},{"135":135,"154":154,"27":27,"37":37,"59":59,"73":73}],135:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule invariant + */ + +"use strict"; + +/** + * Use invariant() to assert state which your program assumes to be true. + * + * Provide sprintf-style format (only %s is supported) and arguments + * to provide information about what broke and what you were + * expecting. + * + * The invariant message will be stripped in production, but the invariant + * will remain to ensure logic does not differ in production. + */ + +var invariant = function(condition, format, a, b, c, d, e, f) { + if ("production" !== "development") { + if (format === undefined) { + throw new Error('invariant requires an error message argument'); + } + } + + if (!condition) { + var error; + if (format === undefined) { + error = new Error( + 'Minified exception occurred; use the non-minified dev environment ' + + 'for the full error message and additional helpful warnings.' + ); + } else { + var args = [a, b, c, d, e, f]; + var argIndex = 0; + error = new Error( + 'Invariant Violation: ' + + format.replace(/%s/g, function() { return args[argIndex++]; }) + ); + } + + error.framesToPop = 1; // we don't care about invariant's own frame + throw error; + } +}; + +module.exports = invariant; + +},{}],136:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isEventSupported + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); + +var useHasFeature; +if (ExecutionEnvironment.canUseDOM) { + useHasFeature = + document.implementation && + document.implementation.hasFeature && + // always returns true in newer browsers as per the standard. + // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature + document.implementation.hasFeature('', '') !== true; +} + +/** + * Checks if an event is supported in the current execution environment. + * + * NOTE: This will not work correctly for non-generic events such as `change`, + * `reset`, `load`, `error`, and `select`. + * + * Borrows from Modernizr. + * + * @param {string} eventNameSuffix Event name, e.g. "click". + * @param {?boolean} capture Check if the capture phase is supported. + * @return {boolean} True if the event is supported. + * @internal + * @license Modernizr 3.0.0pre (Custom Build) | MIT + */ +function isEventSupported(eventNameSuffix, capture) { + if (!ExecutionEnvironment.canUseDOM || + capture && !('addEventListener' in document)) { + return false; + } + + var eventName = 'on' + eventNameSuffix; + var isSupported = eventName in document; + + if (!isSupported) { + var element = document.createElement('div'); + element.setAttribute(eventName, 'return;'); + isSupported = typeof element[eventName] === 'function'; + } + + if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') { + // This is the only way to test support for the `wheel` event in IE9+. + isSupported = document.implementation.hasFeature('Events.wheel', '3.0'); + } + + return isSupported; +} + +module.exports = isEventSupported; + +},{"21":21}],137:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isNode + * @typechecks + */ + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM node. + */ +function isNode(object) { + return !!(object && ( + ((typeof Node === 'function' ? object instanceof Node : typeof object === 'object' && + typeof object.nodeType === 'number' && + typeof object.nodeName === 'string')) + )); +} + +module.exports = isNode; + +},{}],138:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextInputElement + */ + +'use strict'; + +/** + * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary + */ +var supportedInputTypes = { + 'color': true, + 'date': true, + 'datetime': true, + 'datetime-local': true, + 'email': true, + 'month': true, + 'number': true, + 'password': true, + 'range': true, + 'search': true, + 'tel': true, + 'text': true, + 'time': true, + 'url': true, + 'week': true +}; + +function isTextInputElement(elem) { + return elem && ( + (elem.nodeName === 'INPUT' && supportedInputTypes[elem.type] || elem.nodeName === 'TEXTAREA') + ); +} + +module.exports = isTextInputElement; + +},{}],139:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule isTextNode + * @typechecks + */ + +var isNode = _dereq_(137); + +/** + * @param {*} object The object to check. + * @return {boolean} Whether or not the object is a DOM text node. + */ +function isTextNode(object) { + return isNode(object) && object.nodeType == 3; +} + +module.exports = isTextNode; + +},{"137":137}],140:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyMirror + * @typechecks static-only + */ + +'use strict'; + +var invariant = _dereq_(135); + +/** + * Constructs an enumeration with keys equal to their value. + * + * For example: + * + * var COLORS = keyMirror({blue: null, red: null}); + * var myColor = COLORS.blue; + * var isColorValid = !!COLORS[myColor]; + * + * The last line could not be performed if the values of the generated enum were + * not equal to their keys. + * + * Input: {key1: val1, key2: val2} + * Output: {key1: key1, key2: key2} + * + * @param {object} obj + * @return {object} + */ +var keyMirror = function(obj) { + var ret = {}; + var key; + ("production" !== "development" ? invariant( + obj instanceof Object && !Array.isArray(obj), + 'keyMirror(...): Argument must be an object.' + ) : invariant(obj instanceof Object && !Array.isArray(obj))); + for (key in obj) { + if (!obj.hasOwnProperty(key)) { + continue; + } + ret[key] = key; + } + return ret; +}; + +module.exports = keyMirror; + +},{"135":135}],141:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule keyOf + */ + +/** + * Allows extraction of a minified key. Let's the build system minify keys + * without loosing the ability to dynamically use key strings as values + * themselves. Pass in an object with a single key/val pair and it will return + * you the string key of that single record. Suppose you want to grab the + * value for a key 'className' inside of an object. Key/val minification may + * have aliased that key to be 'xa12'. keyOf({className: null}) will return + * 'xa12' in that case. Resolve keys you want to use once at startup time, then + * reuse those resolutions. + */ +var keyOf = function(oneKeyObj) { + var key; + for (key in oneKeyObj) { + if (!oneKeyObj.hasOwnProperty(key)) { + continue; + } + return key; + } + return null; +}; + + +module.exports = keyOf; + +},{}],142:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule mapObject + */ + +'use strict'; + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +/** + * Executes the provided `callback` once for each enumerable own property in the + * object and constructs a new object from the results. The `callback` is + * invoked with three arguments: + * + * - the property value + * - the property name + * - the object being traversed + * + * Properties that are added after the call to `mapObject` will not be visited + * by `callback`. If the values of existing properties are changed, the value + * passed to `callback` will be the value at the time `mapObject` visits them. + * Properties that are deleted before being visited are not visited. + * + * @grep function objectMap() + * @grep function objMap() + * + * @param {?object} object + * @param {function} callback + * @param {*} context + * @return {?object} + */ +function mapObject(object, callback, context) { + if (!object) { + return null; + } + var result = {}; + for (var name in object) { + if (hasOwnProperty.call(object, name)) { + result[name] = callback.call(context, object[name], name, object); + } + } + return result; +} + +module.exports = mapObject; + +},{}],143:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule memoizeStringOnly + * @typechecks static-only + */ + +'use strict'; + +/** + * Memoizes the return value of a function that accepts one string argument. + * + * @param {function} callback + * @return {function} + */ +function memoizeStringOnly(callback) { + var cache = {}; + return function(string) { + if (!cache.hasOwnProperty(string)) { + cache[string] = callback.call(this, string); + } + return cache[string]; + }; +} + +module.exports = memoizeStringOnly; + +},{}],144:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule onlyChild + */ +'use strict'; + +var ReactElement = _dereq_(57); + +var invariant = _dereq_(135); + +/** + * Returns the first child in a collection of children and verifies that there + * is only one child in the collection. The current implementation of this + * function assumes that a single child gets passed without a wrapper, but the + * purpose of this helper function is to abstract away the particular structure + * of children. + * + * @param {?object} children Child collection structure. + * @return {ReactComponent} The first and only `ReactComponent` contained in the + * structure. + */ +function onlyChild(children) { + ("production" !== "development" ? invariant( + ReactElement.isValidElement(children), + 'onlyChild must be passed a children with exactly one child.' + ) : invariant(ReactElement.isValidElement(children))); + return children; +} + +module.exports = onlyChild; + +},{"135":135,"57":57}],145:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performance + * @typechecks + */ + +"use strict"; + +var ExecutionEnvironment = _dereq_(21); + +var performance; + +if (ExecutionEnvironment.canUseDOM) { + performance = + window.performance || + window.msPerformance || + window.webkitPerformance; +} + +module.exports = performance || {}; + +},{"21":21}],146:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule performanceNow + * @typechecks + */ + +var performance = _dereq_(145); + +/** + * Detect if we can use `window.performance.now()` and gracefully fallback to + * `Date.now()` if it doesn't exist. We need to support Firefox < 15 for now + * because of Facebook's testing infrastructure. + */ +if (!performance || !performance.now) { + performance = Date; +} + +var performanceNow = performance.now.bind(performance); + +module.exports = performanceNow; + +},{"145":145}],147:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule quoteAttributeValueForBrowser + */ + +'use strict'; + +var escapeTextContentForBrowser = _dereq_(116); + +/** + * Escapes attribute value to prevent scripting attacks. + * + * @param {*} value Value to escape. + * @return {string} An escaped string. + */ +function quoteAttributeValueForBrowser(value) { + return '"' + escapeTextContentForBrowser(value) + '"'; +} + +module.exports = quoteAttributeValueForBrowser; + +},{"116":116}],148:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setInnerHTML + */ + +/* globals MSApp */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); + +var WHITESPACE_TEST = /^[ \r\n\t\f]/; +var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; + +/** + * Set the innerHTML property of a node, ensuring that whitespace is preserved + * even in IE8. + * + * @param {DOMElement} node + * @param {string} html + * @internal + */ +var setInnerHTML = function(node, html) { + node.innerHTML = html; +}; + +// Win8 apps: Allow all html to be inserted +if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) { + setInnerHTML = function(node, html) { + MSApp.execUnsafeLocalFunction(function() { + node.innerHTML = html; + }); + }; +} + +if (ExecutionEnvironment.canUseDOM) { + // IE8: When updating a just created node with innerHTML only leading + // whitespace is removed. When updating an existing node with innerHTML + // whitespace in root TextNodes is also collapsed. + // @see quirksmode.org/bugreports/archives/2004/11/innerhtml_and_t.html + + // Feature detection; only IE8 is known to behave improperly like this. + var testElement = document.createElement('div'); + testElement.innerHTML = ' '; + if (testElement.innerHTML === '') { + setInnerHTML = function(node, html) { + // Magic theory: IE8 supposedly differentiates between added and updated + // nodes when processing innerHTML, innerHTML on updated nodes suffers + // from worse whitespace behavior. Re-adding a node like this triggers + // the initial and more favorable whitespace behavior. + // TODO: What to do on a detached node? + if (node.parentNode) { + node.parentNode.replaceChild(node, node); + } + + // We also implement a workaround for non-visible tags disappearing into + // thin air on IE8, this only happens if there is no visible text + // in-front of the non-visible tags. Piggyback on the whitespace fix + // and simply check if any non-visible tags appear in the source. + if (WHITESPACE_TEST.test(html) || + html[0] === '<' && NONVISIBLE_TEST.test(html)) { + // Recover leading whitespace by temporarily prepending any character. + // \uFEFF has the potential advantage of being zero-width/invisible. + node.innerHTML = '\uFEFF' + html; + + // deleteData leaves an empty `TextNode` which offsets the index of all + // children. Definitely want to avoid this. + var textNode = node.firstChild; + if (textNode.data.length === 1) { + node.removeChild(textNode); + } else { + textNode.deleteData(0, 1); + } + } else { + node.innerHTML = html; + } + }; + } +} + +module.exports = setInnerHTML; + +},{"21":21}],149:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule setTextContent + */ + +'use strict'; + +var ExecutionEnvironment = _dereq_(21); +var escapeTextContentForBrowser = _dereq_(116); +var setInnerHTML = _dereq_(148); + +/** + * Set the textContent property of a node, ensuring that whitespace is preserved + * even in IE8. innerText is a poor substitute for textContent and, among many + * issues, inserts <br> instead of the literal newline chars. innerHTML behaves + * as it should. + * + * @param {DOMElement} node + * @param {string} text + * @internal + */ +var setTextContent = function(node, text) { + node.textContent = text; +}; + +if (ExecutionEnvironment.canUseDOM) { + if (!('textContent' in document.documentElement)) { + setTextContent = function(node, text) { + setInnerHTML(node, escapeTextContentForBrowser(text)); + }; + } +} + +module.exports = setTextContent; + +},{"116":116,"148":148,"21":21}],150:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shallowEqual + */ + +'use strict'; + +/** + * Performs equality by iterating through keys on an object and returning + * false when any key has values which are not strictly equal between + * objA and objB. Returns true when the values of all keys are strictly equal. + * + * @return {boolean} + */ +function shallowEqual(objA, objB) { + if (objA === objB) { + return true; + } + var key; + // Test for A's keys different from B. + for (key in objA) { + if (objA.hasOwnProperty(key) && + (!objB.hasOwnProperty(key) || objA[key] !== objB[key])) { + return false; + } + } + // Test for B's keys missing from A. + for (key in objB) { + if (objB.hasOwnProperty(key) && !objA.hasOwnProperty(key)) { + return false; + } + } + return true; +} + +module.exports = shallowEqual; + +},{}],151:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule shouldUpdateReactComponent + * @typechecks static-only + */ + +'use strict'; + +var warning = _dereq_(154); + +/** + * Given a `prevElement` and `nextElement`, determines if the existing + * instance should be updated as opposed to being destroyed or replaced by a new + * instance. Both arguments are elements. This ensures that this logic can + * operate on stateless trees without any backing instance. + * + * @param {?object} prevElement + * @param {?object} nextElement + * @return {boolean} True if the existing instance should be updated. + * @protected + */ +function shouldUpdateReactComponent(prevElement, nextElement) { + if (prevElement != null && nextElement != null) { + var prevType = typeof prevElement; + var nextType = typeof nextElement; + if (prevType === 'string' || prevType === 'number') { + return (nextType === 'string' || nextType === 'number'); + } else { + if (nextType === 'object' && + prevElement.type === nextElement.type && + prevElement.key === nextElement.key) { + var ownersMatch = prevElement._owner === nextElement._owner; + var prevName = null; + var nextName = null; + var nextDisplayName = null; + if ("production" !== "development") { + if (!ownersMatch) { + if (prevElement._owner != null && + prevElement._owner.getPublicInstance() != null && + prevElement._owner.getPublicInstance().constructor != null) { + prevName = + prevElement._owner.getPublicInstance().constructor.displayName; + } + if (nextElement._owner != null && + nextElement._owner.getPublicInstance() != null && + nextElement._owner.getPublicInstance().constructor != null) { + nextName = + nextElement._owner.getPublicInstance().constructor.displayName; + } + if (nextElement.type != null && + nextElement.type.displayName != null) { + nextDisplayName = nextElement.type.displayName; + } + if (nextElement.type != null && typeof nextElement.type === 'string') { + nextDisplayName = nextElement.type; + } + if (typeof nextElement.type !== 'string' || + nextElement.type === 'input' || + nextElement.type === 'textarea') { + if ((prevElement._owner != null && + prevElement._owner._isOwnerNecessary === false) || + (nextElement._owner != null && + nextElement._owner._isOwnerNecessary === false)) { + if (prevElement._owner != null) { + prevElement._owner._isOwnerNecessary = true; + } + if (nextElement._owner != null) { + nextElement._owner._isOwnerNecessary = true; + } + ("production" !== "development" ? warning( + false, + '<%s /> is being rendered by both %s and %s using the same ' + + 'key (%s) in the same place. Currently, this means that ' + + 'they don\'t preserve state. This behavior should be very ' + + 'rare so we\'re considering deprecating it. Please contact ' + + 'the React team and explain your use case so that we can ' + + 'take that into consideration.', + nextDisplayName || 'Unknown Component', + prevName || '[Unknown]', + nextName || '[Unknown]', + prevElement.key + ) : null); + } + } + } + } + return ownersMatch; + } + } + } + return false; +} + +module.exports = shouldUpdateReactComponent; + +},{"154":154}],152:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule toArray + * @typechecks + */ + +var invariant = _dereq_(135); + +/** + * Convert array-like objects to arrays. + * + * This API assumes the caller knows the contents of the data type. For less + * well defined inputs use createArrayFromMixed. + * + * @param {object|function|filelist} obj + * @return {array} + */ +function toArray(obj) { + var length = obj.length; + + // Some browse builtin objects can report typeof 'function' (e.g. NodeList in + // old versions of Safari). + ("production" !== "development" ? invariant( + !Array.isArray(obj) && + (typeof obj === 'object' || typeof obj === 'function'), + 'toArray: Array-like object expected' + ) : invariant(!Array.isArray(obj) && + (typeof obj === 'object' || typeof obj === 'function'))); + + ("production" !== "development" ? invariant( + typeof length === 'number', + 'toArray: Object needs a length property' + ) : invariant(typeof length === 'number')); + + ("production" !== "development" ? invariant( + length === 0 || + (length - 1) in obj, + 'toArray: Object should have keys for indices' + ) : invariant(length === 0 || + (length - 1) in obj)); + + // Old IE doesn't give collections access to hasOwnProperty. Assume inputs + // without method will throw during the slice call and skip straight to the + // fallback. + if (obj.hasOwnProperty) { + try { + return Array.prototype.slice.call(obj); + } catch (e) { + // IE < 9 does not support Array#slice on collections objects + } + } + + // Fall back to copying key by key. This assumes all keys have a value, + // so will not preserve sparsely populated inputs. + var ret = Array(length); + for (var ii = 0; ii < length; ii++) { + ret[ii] = obj[ii]; + } + return ret; +} + +module.exports = toArray; + +},{"135":135}],153:[function(_dereq_,module,exports){ +/** + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule traverseAllChildren + */ + +'use strict'; + +var ReactElement = _dereq_(57); +var ReactFragment = _dereq_(63); +var ReactInstanceHandles = _dereq_(66); + +var getIteratorFn = _dereq_(126); +var invariant = _dereq_(135); +var warning = _dereq_(154); + +var SEPARATOR = ReactInstanceHandles.SEPARATOR; +var SUBSEPARATOR = ':'; + +/** + * TODO: Test that a single child and an array with one item have the same key + * pattern. + */ + +var userProvidedKeyEscaperLookup = { + '=': '=0', + '.': '=1', + ':': '=2' +}; + +var userProvidedKeyEscapeRegex = /[=.:]/g; + +var didWarnAboutMaps = false; + +function userProvidedKeyEscaper(match) { + return userProvidedKeyEscaperLookup[match]; +} + +/** + * Generate a key string that identifies a component within a set. + * + * @param {*} component A component that could contain a manual key. + * @param {number} index Index that is used if a manual key is not provided. + * @return {string} + */ +function getComponentKey(component, index) { + if (component && component.key != null) { + // Explicit key + return wrapUserProvidedKey(component.key); + } + // Implicit key determined by the index in the set + return index.toString(36); +} + +/** + * Escape a component key so that it is safe to use in a reactid. + * + * @param {*} key Component key to be escaped. + * @return {string} An escaped string. + */ +function escapeUserProvidedKey(text) { + return ('' + text).replace( + userProvidedKeyEscapeRegex, + userProvidedKeyEscaper + ); +} + +/** + * Wrap a `key` value explicitly provided by the user to distinguish it from + * implicitly-generated keys generated by a component's index in its parent. + * + * @param {string} key Value of a user-provided `key` attribute + * @return {string} + */ +function wrapUserProvidedKey(key) { + return '$' + escapeUserProvidedKey(key); +} + +/** + * @param {?*} children Children tree container. + * @param {!string} nameSoFar Name of the key path so far. + * @param {!number} indexSoFar Number of children encountered until this point. + * @param {!function} callback Callback to invoke with each child found. + * @param {?*} traverseContext Used to pass information throughout the traversal + * process. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildrenImpl( + children, + nameSoFar, + indexSoFar, + callback, + traverseContext +) { + var type = typeof children; + + if (type === 'undefined' || type === 'boolean') { + // All of the above are perceived as null. + children = null; + } + + if (children === null || + type === 'string' || + type === 'number' || + ReactElement.isValidElement(children)) { + callback( + traverseContext, + children, + // If it's the only child, treat the name as if it was wrapped in an array + // so that it's consistent if the number of children grows. + nameSoFar === '' ? SEPARATOR + getComponentKey(children, 0) : nameSoFar, + indexSoFar + ); + return 1; + } + + var child, nextName, nextIndex; + var subtreeCount = 0; // Count of children found in the current subtree. + + if (Array.isArray(children)) { + for (var i = 0; i < children.length; i++) { + child = children[i]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, i) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } else { + var iteratorFn = getIteratorFn(children); + if (iteratorFn) { + var iterator = iteratorFn.call(children); + var step; + if (iteratorFn !== children.entries) { + var ii = 0; + while (!(step = iterator.next()).done) { + child = step.value; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + getComponentKey(child, ii++) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } else { + if ("production" !== "development") { + ("production" !== "development" ? warning( + didWarnAboutMaps, + 'Using Maps as children is not yet fully supported. It is an ' + + 'experimental feature that might be removed. Convert it to a ' + + 'sequence / iterable of keyed ReactElements instead.' + ) : null); + didWarnAboutMaps = true; + } + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + child = entry[1]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(entry[0]) + SUBSEPARATOR + + getComponentKey(child, 0) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } + } + } else if (type === 'object') { + ("production" !== "development" ? invariant( + children.nodeType !== 1, + 'traverseAllChildren(...): Encountered an invalid child; DOM ' + + 'elements are not valid children of React components.' + ) : invariant(children.nodeType !== 1)); + var fragment = ReactFragment.extract(children); + for (var key in fragment) { + if (fragment.hasOwnProperty(key)) { + child = fragment[key]; + nextName = ( + (nameSoFar !== '' ? nameSoFar + SUBSEPARATOR : SEPARATOR) + + wrapUserProvidedKey(key) + SUBSEPARATOR + + getComponentKey(child, 0) + ); + nextIndex = indexSoFar + subtreeCount; + subtreeCount += traverseAllChildrenImpl( + child, + nextName, + nextIndex, + callback, + traverseContext + ); + } + } + } + } + + return subtreeCount; +} + +/** + * Traverses children that are typically specified as `props.children`, but + * might also be specified through attributes: + * + * - `traverseAllChildren(this.props.children, ...)` + * - `traverseAllChildren(this.props.leftPanelChildren, ...)` + * + * The `traverseContext` is an optional argument that is passed through the + * entire traversal. It can be used to store accumulations or anything else that + * the callback might find relevant. + * + * @param {?*} children Children tree object. + * @param {!function} callback To invoke upon traversing each child. + * @param {?*} traverseContext Context for traversal. + * @return {!number} The number of children in this subtree. + */ +function traverseAllChildren(children, callback, traverseContext) { + if (children == null) { + return 0; + } + + return traverseAllChildrenImpl(children, '', 0, callback, traverseContext); +} + +module.exports = traverseAllChildren; + +},{"126":126,"135":135,"154":154,"57":57,"63":63,"66":66}],154:[function(_dereq_,module,exports){ +/** + * Copyright 2014-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule warning + */ + +"use strict"; + +var emptyFunction = _dereq_(114); + +/** + * Similar to invariant but only logs a warning if the condition is not met. + * This can be used to log issues in development environments in critical + * paths. Removing the logging code for production environments will keep the + * same logic and follow the same code paths. + */ + +var warning = emptyFunction; + +if ("production" !== "development") { + warning = function(condition, format ) {for (var args=[],$__0=2,$__1=arguments.length;$__0<$__1;$__0++) args.push(arguments[$__0]); + if (format === undefined) { + throw new Error( + '`warning(condition, format, ...args)` requires a warning ' + + 'message argument' + ); + } + + if (format.length < 10 || /^[s\W]*$/.test(format)) { + throw new Error( + 'The warning format should be able to uniquely identify this ' + + 'warning. Please, use a more descriptive format than: ' + format + ); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + var argIndex = 0; + var message = 'Warning: ' + format.replace(/%s/g, function() {return args[argIndex++];}); + console.warn(message); + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch(x) {} + } + }; +} + +module.exports = warning; + +},{"114":114}]},{},[1])(1) +}); \ No newline at end of file diff --git a/assets/js/react-0.13.0/build/react.min.js b/assets/js/react-0.13.0/build/react.min.js new file mode 100755 index 0000000000000000000000000000000000000000..e7b194a2c1f6465757f1567ecf9256feb6e6180c --- /dev/null +++ b/assets/js/react-0.13.0/build/react.min.js @@ -0,0 +1,15 @@ +/** + * React v0.13.0 + * + * Copyright 2013-2015, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + */ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.React=e()}}(function(){return function e(t,n,r){function o(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t){"use strict";var n=e(19),r=e(32),o=e(34),i=e(33),a=e(38),u=e(39),s=e(55),l=(e(56),e(40)),c=e(51),p=e(54),d=e(64),f=e(68),h=e(73),m=e(76),v=e(79),g=e(82),y=e(27),C=e(115),E=e(142);p.inject();var b=s.createElement,_=s.createFactory,x=s.cloneElement,D=h.measure("React","render",f.render),M={Children:{map:r.map,forEach:r.forEach,count:r.count,only:E},Component:o,DOM:l,PropTypes:m,initializeTouchEvents:function(e){n.useTouchEvents=e},createClass:i.createClass,createElement:b,cloneElement:x,createFactory:_,createMixin:function(e){return e},constructAndRenderComponent:f.constructAndRenderComponent,constructAndRenderComponentByID:f.constructAndRenderComponentByID,findDOMNode:C,render:D,renderToString:g.renderToString,renderToStaticMarkup:g.renderToStaticMarkup,unmountComponentAtNode:f.unmountComponentAtNode,isValidElement:s.isValidElement,withContext:a.withContext,__spread:y};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:u,InstanceHandles:d,Mount:f,Reconciler:v,TextComponent:c});M.version="0.13.0",t.exports=M},{115:115,142:142,19:19,27:27,32:32,33:33,34:34,38:38,39:39,40:40,51:51,54:54,55:55,56:56,64:64,68:68,73:73,76:76,79:79,82:82}],2:[function(e,t){"use strict";var n=e(117),r={componentDidMount:function(){this.props.autoFocus&&n(this.getDOMNode())}};t.exports=r},{117:117}],3:[function(e,t){"use strict";function n(){var e=window.opera;return"object"==typeof e&&"function"==typeof e.version&&parseInt(e.version(),10)<=12}function r(e){return(e.ctrlKey||e.altKey||e.metaKey)&&!(e.ctrlKey&&e.altKey)}function o(e){switch(e){case I.topCompositionStart:return T.compositionStart;case I.topCompositionEnd:return T.compositionEnd;case I.topCompositionUpdate:return T.compositionUpdate}}function i(e,t){return e===I.topKeyDown&&t.keyCode===E}function a(e,t){switch(e){case I.topKeyUp:return-1!==C.indexOf(t.keyCode);case I.topKeyDown:return t.keyCode!==E;case I.topKeyPress:case I.topMouseDown:case I.topBlur:return!0;default:return!1}}function u(e){var t=e.detail;return"object"==typeof t&&"data"in t?t.data:null}function s(e,t,n,r){var s,l;if(b?s=o(e):P?a(e,r)&&(s=T.compositionEnd):i(e,r)&&(s=T.compositionStart),!s)return null;D&&(P||s!==T.compositionStart?s===T.compositionEnd&&P&&(l=P.getData()):P=m.getPooled(t));var c=v.getPooled(s,n,r);if(l)c.data=l;else{var p=u(r);null!==p&&(c.data=p)}return f.accumulateTwoPhaseDispatches(c),c}function l(e,t){switch(e){case I.topCompositionEnd:return u(t);case I.topKeyPress:var n=t.which;return n!==M?null:(R=!0,N);case I.topTextInput:var r=t.data;return r===N&&R?null:r;default:return null}}function c(e,t){if(P){if(e===I.topCompositionEnd||a(e,t)){var n=P.getData();return m.release(P),P=null,n}return null}switch(e){case I.topPaste:return null;case I.topKeyPress:return t.which&&!r(t)?String.fromCharCode(t.which):null;case I.topCompositionEnd:return D?null:t.data;default:return null}}function p(e,t,n,r){var o;if(o=x?l(e,r):c(e,r),!o)return null;var i=g.getPooled(T.beforeInput,n,r);return i.data=o,f.accumulateTwoPhaseDispatches(i),i}var d=e(15),f=e(20),h=e(21),m=e(22),v=e(91),g=e(95),y=e(139),C=[9,13,27,32],E=229,b=h.canUseDOM&&"CompositionEvent"in window,_=null;h.canUseDOM&&"documentMode"in document&&(_=document.documentMode);var x=h.canUseDOM&&"TextEvent"in window&&!_&&!n(),D=h.canUseDOM&&(!b||_&&_>8&&11>=_),M=32,N=String.fromCharCode(M),I=d.topLevelTypes,T={beforeInput:{phasedRegistrationNames:{bubbled:y({onBeforeInput:null}),captured:y({onBeforeInputCapture:null})},dependencies:[I.topCompositionEnd,I.topKeyPress,I.topTextInput,I.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:y({onCompositionEnd:null}),captured:y({onCompositionEndCapture:null})},dependencies:[I.topBlur,I.topCompositionEnd,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:y({onCompositionStart:null}),captured:y({onCompositionStartCapture:null})},dependencies:[I.topBlur,I.topCompositionStart,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:y({onCompositionUpdate:null}),captured:y({onCompositionUpdateCapture:null})},dependencies:[I.topBlur,I.topCompositionUpdate,I.topKeyDown,I.topKeyPress,I.topKeyUp,I.topMouseDown]}},R=!1,P=null,w={eventTypes:T,extractEvents:function(e,t,n,r){return[s(e,t,n,r),p(e,t,n,r)]}};t.exports=w},{139:139,15:15,20:20,21:21,22:22,91:91,95:95}],4:[function(e,t){"use strict";function n(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}var r={boxFlex:!0,boxFlexGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,strokeOpacity:!0},o=["Webkit","ms","Moz","O"];Object.keys(r).forEach(function(e){o.forEach(function(t){r[n(t,e)]=r[e]})});var i={background:{backgroundImage:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundColor:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0}},a={isUnitlessNumber:r,shorthandPropertyExpansions:i};t.exports=a},{}],5:[function(e,t){"use strict";var n=e(4),r=e(21),o=(e(106),e(111)),i=e(131),a=e(141),u=(e(150),a(function(e){return i(e)})),s="cssFloat";r.canUseDOM&&void 0===document.documentElement.style.cssFloat&&(s="styleFloat");var l={createMarkupForStyles:function(e){var t="";for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];null!=r&&(t+=u(n)+":",t+=o(n,r)+";")}return t||null},setValueForStyles:function(e,t){var r=e.style;for(var i in t)if(t.hasOwnProperty(i)){var a=o(i,t[i]);if("float"===i&&(i=s),a)r[i]=a;else{var u=n.shorthandPropertyExpansions[i];if(u)for(var l in u)r[l]="";else r[i]=""}}}};t.exports=l},{106:106,111:111,131:131,141:141,150:150,21:21,4:4}],6:[function(e,t){"use strict";function n(){this._callbacks=null,this._contexts=null}var r=e(28),o=e(27),i=e(133);o(n.prototype,{enqueue:function(e,t){this._callbacks=this._callbacks||[],this._contexts=this._contexts||[],this._callbacks.push(e),this._contexts.push(t)},notifyAll:function(){var e=this._callbacks,t=this._contexts;if(e){i(e.length===t.length),this._callbacks=null,this._contexts=null;for(var n=0,r=e.length;r>n;n++)e[n].call(t[n]);e.length=0,t.length=0}},reset:function(){this._callbacks=null,this._contexts=null},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{133:133,27:27,28:28}],7:[function(e,t){"use strict";function n(e){return"SELECT"===e.nodeName||"INPUT"===e.nodeName&&"file"===e.type}function r(e){var t=_.getPooled(I.change,R,e);C.accumulateTwoPhaseDispatches(t),b.batchedUpdates(o,t)}function o(e){y.enqueueEvents(e),y.processEventQueue()}function i(e,t){T=e,R=t,T.attachEvent("onchange",r)}function a(){T&&(T.detachEvent("onchange",r),T=null,R=null)}function u(e,t,n){return e===N.topChange?n:void 0}function s(e,t,n){e===N.topFocus?(a(),i(t,n)):e===N.topBlur&&a()}function l(e,t){T=e,R=t,P=e.value,w=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(T,"value",A),T.attachEvent("onpropertychange",p)}function c(){T&&(delete T.value,T.detachEvent("onpropertychange",p),T=null,R=null,P=null,w=null)}function p(e){if("value"===e.propertyName){var t=e.srcElement.value;t!==P&&(P=t,r(e))}}function d(e,t,n){return e===N.topInput?n:void 0}function f(e,t,n){e===N.topFocus?(c(),l(t,n)):e===N.topBlur&&c()}function h(e){return e!==N.topSelectionChange&&e!==N.topKeyUp&&e!==N.topKeyDown||!T||T.value===P?void 0:(P=T.value,R)}function m(e){return"INPUT"===e.nodeName&&("checkbox"===e.type||"radio"===e.type)}function v(e,t,n){return e===N.topClick?n:void 0}var g=e(15),y=e(17),C=e(20),E=e(21),b=e(85),_=e(93),x=e(134),D=e(136),M=e(139),N=g.topLevelTypes,I={change:{phasedRegistrationNames:{bubbled:M({onChange:null}),captured:M({onChangeCapture:null})},dependencies:[N.topBlur,N.topChange,N.topClick,N.topFocus,N.topInput,N.topKeyDown,N.topKeyUp,N.topSelectionChange]}},T=null,R=null,P=null,w=null,O=!1;E.canUseDOM&&(O=x("change")&&(!("documentMode"in document)||document.documentMode>8));var S=!1;E.canUseDOM&&(S=x("input")&&(!("documentMode"in document)||document.documentMode>9));var A={get:function(){return w.get.call(this)},set:function(e){P=""+e,w.set.call(this,e)}},k={eventTypes:I,extractEvents:function(e,t,r,o){var i,a;if(n(t)?O?i=u:a=s:D(t)?S?i=d:(i=h,a=f):m(t)&&(i=v),i){var l=i(e,t,r);if(l){var c=_.getPooled(I.change,l,o);return C.accumulateTwoPhaseDispatches(c),c}}a&&a(e,t,r)}};t.exports=k},{134:134,136:136,139:139,15:15,17:17,20:20,21:21,85:85,93:93}],8:[function(e,t){"use strict";var n=0,r={createReactRootIndex:function(){return n++}};t.exports=r},{}],9:[function(e,t){"use strict";function n(e,t,n){e.insertBefore(t,e.childNodes[n]||null)}var r=e(12),o=e(70),i=e(145),a=e(133),u={dangerouslyReplaceNodeWithMarkup:r.dangerouslyReplaceNodeWithMarkup,updateTextContent:i,processUpdates:function(e,t){for(var u,s=null,l=null,c=0;c<e.length;c++)if(u=e[c],u.type===o.MOVE_EXISTING||u.type===o.REMOVE_NODE){var p=u.fromIndex,d=u.parentNode.childNodes[p],f=u.parentID;a(d),s=s||{},s[f]=s[f]||[],s[f][p]=d,l=l||[],l.push(d)}var h=r.dangerouslyRenderMarkup(t);if(l)for(var m=0;m<l.length;m++)l[m].parentNode.removeChild(l[m]);for(var v=0;v<e.length;v++)switch(u=e[v],u.type){case o.INSERT_MARKUP:n(u.parentNode,h[u.markupIndex],u.toIndex);break;case o.MOVE_EXISTING:n(u.parentNode,s[u.parentID][u.fromIndex],u.toIndex);break;case o.TEXT_CONTENT:i(u.parentNode,u.textContent);break;case o.REMOVE_NODE:}}};t.exports=u},{12:12,133:133,145:145,70:70}],10:[function(e,t){"use strict";function n(e,t){return(e&t)===t}var r=e(133),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=e.Properties||{},i=e.DOMAttributeNames||{},u=e.DOMPropertyNames||{},s=e.DOMMutationMethods||{};e.isCustomAttribute&&a._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var l in t){r(!a.isStandardName.hasOwnProperty(l)),a.isStandardName[l]=!0;var c=l.toLowerCase();if(a.getPossibleStandardName[c]=l,i.hasOwnProperty(l)){var p=i[l];a.getPossibleStandardName[p]=l,a.getAttributeName[l]=p}else a.getAttributeName[l]=c;a.getPropertyName[l]=u.hasOwnProperty(l)?u[l]:l,a.getMutationMethod[l]=s.hasOwnProperty(l)?s[l]:null;var d=t[l];a.mustUseAttribute[l]=n(d,o.MUST_USE_ATTRIBUTE),a.mustUseProperty[l]=n(d,o.MUST_USE_PROPERTY),a.hasSideEffects[l]=n(d,o.HAS_SIDE_EFFECTS),a.hasBooleanValue[l]=n(d,o.HAS_BOOLEAN_VALUE),a.hasNumericValue[l]=n(d,o.HAS_NUMERIC_VALUE),a.hasPositiveNumericValue[l]=n(d,o.HAS_POSITIVE_NUMERIC_VALUE),a.hasOverloadedBooleanValue[l]=n(d,o.HAS_OVERLOADED_BOOLEAN_VALUE),r(!a.mustUseAttribute[l]||!a.mustUseProperty[l]),r(a.mustUseProperty[l]||!a.hasSideEffects[l]),r(!!a.hasBooleanValue[l]+!!a.hasNumericValue[l]+!!a.hasOverloadedBooleanValue[l]<=1)}}},i={},a={ID_ATTRIBUTE_NAME:"data-reactid",isStandardName:{},getPossibleStandardName:{},getAttributeName:{},getPropertyName:{},getMutationMethod:{},mustUseAttribute:{},mustUseProperty:{},hasSideEffects:{},hasBooleanValue:{},hasNumericValue:{},hasPositiveNumericValue:{},hasOverloadedBooleanValue:{},_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t<a._isCustomAttributeFunctions.length;t++){var n=a._isCustomAttributeFunctions[t];if(n(e))return!0}return!1},getDefaultValueForProperty:function(e,t){var n,r=i[e];return r||(i[e]=r={}),t in r||(n=document.createElement(e),r[t]=n[t]),r[t]},injection:o};t.exports=a},{133:133}],11:[function(e,t){"use strict";function n(e,t){return null==t||r.hasBooleanValue[e]&&!t||r.hasNumericValue[e]&&isNaN(t)||r.hasPositiveNumericValue[e]&&1>t||r.hasOverloadedBooleanValue[e]&&t===!1}var r=e(10),o=e(143),i=(e(150),{createMarkupForID:function(e){return r.ID_ATTRIBUTE_NAME+"="+o(e)},createMarkupForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(e)&&r.isStandardName[e]){if(n(e,t))return"";var i=r.getAttributeName[e];return r.hasBooleanValue[e]||r.hasOverloadedBooleanValue[e]&&t===!0?i:i+"="+o(t)}return r.isCustomAttribute(e)?null==t?"":e+"="+o(t):null},setValueForProperty:function(e,t,o){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var i=r.getMutationMethod[t];if(i)i(e,o);else if(n(t,o))this.deleteValueForProperty(e,t);else if(r.mustUseAttribute[t])e.setAttribute(r.getAttributeName[t],""+o);else{var a=r.getPropertyName[t];r.hasSideEffects[t]&&""+e[a]==""+o||(e[a]=o)}}else r.isCustomAttribute(t)&&(null==o?e.removeAttribute(t):e.setAttribute(t,""+o))},deleteValueForProperty:function(e,t){if(r.isStandardName.hasOwnProperty(t)&&r.isStandardName[t]){var n=r.getMutationMethod[t];if(n)n(e,void 0);else if(r.mustUseAttribute[t])e.removeAttribute(r.getAttributeName[t]);else{var o=r.getPropertyName[t],i=r.getDefaultValueForProperty(e.nodeName,o);r.hasSideEffects[t]&&""+e[o]===i||(e[o]=i)}}else r.isCustomAttribute(t)&&e.removeAttribute(t)}});t.exports=i},{10:10,143:143,150:150}],12:[function(e,t){"use strict";function n(e){return e.substring(1,e.indexOf(" "))}var r=e(21),o=e(110),i=e(112),a=e(125),u=e(133),s=/^(<[^ \/>]+)/,l="data-danger-index",c={dangerouslyRenderMarkup:function(e){u(r.canUseDOM);for(var t,c={},p=0;p<e.length;p++)u(e[p]),t=n(e[p]),t=a(t)?t:"*",c[t]=c[t]||[],c[t][p]=e[p];var d=[],f=0;for(t in c)if(c.hasOwnProperty(t)){var h,m=c[t];for(h in m)if(m.hasOwnProperty(h)){var v=m[h];m[h]=v.replace(s,"$1 "+l+'="'+h+'" ')}for(var g=o(m.join(""),i),y=0;y<g.length;++y){var C=g[y];C.hasAttribute&&C.hasAttribute(l)&&(h=+C.getAttribute(l),C.removeAttribute(l),u(!d.hasOwnProperty(h)),d[h]=C,f+=1)}}return u(f===d.length),u(d.length===e.length),d},dangerouslyReplaceNodeWithMarkup:function(e,t){u(r.canUseDOM),u(t),u("html"!==e.tagName.toLowerCase());var n=o(t,i)[0];e.parentNode.replaceChild(n,e)}};t.exports=c},{110:110,112:112,125:125,133:133,21:21}],13:[function(e,t){"use strict";var n=e(139),r=[n({ResponderEventPlugin:null}),n({SimpleEventPlugin:null}),n({TapEventPlugin:null}),n({EnterLeaveEventPlugin:null}),n({ChangeEventPlugin:null}),n({SelectEventPlugin:null}),n({BeforeInputEventPlugin:null}),n({AnalyticsEventPlugin:null}),n({MobileSafariClickEventPlugin:null})];t.exports=r},{139:139}],14:[function(e,t){"use strict";var n=e(15),r=e(20),o=e(97),i=e(68),a=e(139),u=n.topLevelTypes,s=i.getFirstReactDOM,l={mouseEnter:{registrationName:a({onMouseEnter:null}),dependencies:[u.topMouseOut,u.topMouseOver]},mouseLeave:{registrationName:a({onMouseLeave:null}),dependencies:[u.topMouseOut,u.topMouseOver]}},c=[null,null],p={eventTypes:l,extractEvents:function(e,t,n,a){if(e===u.topMouseOver&&(a.relatedTarget||a.fromElement))return null;if(e!==u.topMouseOut&&e!==u.topMouseOver)return null;var p;if(t.window===t)p=t;else{var d=t.ownerDocument;p=d?d.defaultView||d.parentWindow:window}var f,h;if(e===u.topMouseOut?(f=t,h=s(a.relatedTarget||a.toElement)||p):(f=p,h=t),f===h)return null;var m=f?i.getID(f):"",v=h?i.getID(h):"",g=o.getPooled(l.mouseLeave,m,a);g.type="mouseleave",g.target=f,g.relatedTarget=h;var y=o.getPooled(l.mouseEnter,v,a);return y.type="mouseenter",y.target=h,y.relatedTarget=f,r.accumulateEnterLeaveDispatches(g,y,m,v),c[0]=g,c[1]=y,c}};t.exports=p},{139:139,15:15,20:20,68:68,97:97}],15:[function(e,t){"use strict";var n=e(138),r=n({bubbled:null,captured:null}),o=n({topBlur:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,topMouseOver:null,topMouseUp:null,topPaste:null,topReset:null,topScroll:null,topSelectionChange:null,topSubmit:null,topTextInput:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topWheel:null}),i={topLevelTypes:o,PropagationPhases:r};t.exports=i},{138:138}],16:[function(e,t){var n=e(112),r={listen:function(e,t,n){return e.addEventListener?(e.addEventListener(t,n,!1),{remove:function(){e.removeEventListener(t,n,!1)}}):e.attachEvent?(e.attachEvent("on"+t,n),{remove:function(){e.detachEvent("on"+t,n)}}):void 0},capture:function(e,t,r){return e.addEventListener?(e.addEventListener(t,r,!0),{remove:function(){e.removeEventListener(t,r,!0)}}):{remove:n}},registerDefault:function(){}};t.exports=r},{112:112}],17:[function(e,t){"use strict";var n=e(18),r=e(19),o=e(103),i=e(118),a=e(133),u={},s=null,l=function(e){if(e){var t=r.executeDispatch,o=n.getPluginModuleForEvent(e);o&&o.executeDispatch&&(t=o.executeDispatch),r.executeDispatchesInOrder(e,t),e.isPersistent()||e.constructor.release(e)}},c=null,p={injection:{injectMount:r.injection.injectMount,injectInstanceHandle:function(e){c=e},getInstanceHandle:function(){return c},injectEventPluginOrder:n.injectEventPluginOrder,injectEventPluginsByName:n.injectEventPluginsByName},eventNameDispatchConfigs:n.eventNameDispatchConfigs,registrationNameModules:n.registrationNameModules,putListener:function(e,t,n){a(!n||"function"==typeof n);var r=u[t]||(u[t]={});r[e]=n},getListener:function(e,t){var n=u[t];return n&&n[e]},deleteListener:function(e,t){var n=u[t];n&&delete n[e]},deleteAllListeners:function(e){for(var t in u)delete u[t][e]},extractEvents:function(e,t,r,i){for(var a,u=n.plugins,s=0,l=u.length;l>s;s++){var c=u[s];if(c){var p=c.extractEvents(e,t,r,i);p&&(a=o(a,p))}}return a},enqueueEvents:function(e){e&&(s=o(s,e))},processEventQueue:function(){var e=s;s=null,i(e,l),a(!s)},__purge:function(){u={}},__getListenerBank:function(){return u}};t.exports=p},{103:103,118:118,133:133,18:18,19:19}],18:[function(e,t){"use strict";function n(){if(a)for(var e in u){var t=u[e],n=a.indexOf(e);if(i(n>-1),!s.plugins[n]){i(t.extractEvents),s.plugins[n]=t;var o=t.eventTypes;for(var l in o)i(r(o[l],t,l))}}}function r(e,t,n){i(!s.eventNameDispatchConfigs.hasOwnProperty(n)),s.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var a in r)if(r.hasOwnProperty(a)){var u=r[a];o(u,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){i(!s.registrationNameModules[e]),s.registrationNameModules[e]=t,s.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var i=e(133),a=null,u={},s={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){i(!a),a=Array.prototype.slice.call(e),n()},injectEventPluginsByName:function(e){var t=!1;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];u.hasOwnProperty(r)&&u[r]===o||(i(!u[r]),u[r]=o,t=!0)}t&&n()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return s.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=s.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){a=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];s.plugins.length=0;var t=s.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=s.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=s},{133:133}],19:[function(e,t){"use strict";function n(e){return e===m.topMouseUp||e===m.topTouchEnd||e===m.topTouchCancel}function r(e){return e===m.topMouseMove||e===m.topTouchMove}function o(e){return e===m.topMouseDown||e===m.topTouchStart}function i(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(Array.isArray(n))for(var o=0;o<n.length&&!e.isPropagationStopped();o++)t(e,n[o],r[o]);else n&&t(e,n,r)}function a(e,t,n){e.currentTarget=h.Mount.getNode(n);var r=t(e,n);return e.currentTarget=null,r}function u(e,t){i(e,t),e._dispatchListeners=null,e._dispatchIDs=null}function s(e){var t=e._dispatchListeners,n=e._dispatchIDs;if(Array.isArray(t)){for(var r=0;r<t.length&&!e.isPropagationStopped();r++)if(t[r](e,n[r]))return n[r]}else if(t&&t(e,n))return n;return null}function l(e){var t=s(e);return e._dispatchIDs=null,e._dispatchListeners=null,t}function c(e){var t=e._dispatchListeners,n=e._dispatchIDs;f(!Array.isArray(t));var r=t?t(e,n):null;return e._dispatchListeners=null,e._dispatchIDs=null,r}function p(e){return!!e._dispatchListeners}var d=e(15),f=e(133),h={Mount:null,injectMount:function(e){h.Mount=e}},m=d.topLevelTypes,v={isEndish:n,isMoveish:r,isStartish:o,executeDirectDispatch:c,executeDispatch:a,executeDispatchesInOrder:u,executeDispatchesInOrderStopAtTrue:l,hasDispatches:p,injection:h,useTouchEvents:!1};t.exports=v},{133:133,15:15}],20:[function(e,t){"use strict";function n(e,t,n){var r=t.dispatchConfig.phasedRegistrationNames[n];return m(e,r)}function r(e,t,r){var o=t?h.bubbled:h.captured,i=n(e,r,o);i&&(r._dispatchListeners=d(r._dispatchListeners,i),r._dispatchIDs=d(r._dispatchIDs,e))}function o(e){e&&e.dispatchConfig.phasedRegistrationNames&&p.injection.getInstanceHandle().traverseTwoPhase(e.dispatchMarker,r,e)}function i(e,t,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=m(e,r);o&&(n._dispatchListeners=d(n._dispatchListeners,o),n._dispatchIDs=d(n._dispatchIDs,e))}}function a(e){e&&e.dispatchConfig.registrationName&&i(e.dispatchMarker,null,e)}function u(e){f(e,o)}function s(e,t,n,r){p.injection.getInstanceHandle().traverseEnterLeave(n,r,i,e,t)}function l(e){f(e,a)}var c=e(15),p=e(17),d=e(103),f=e(118),h=c.PropagationPhases,m=p.getListener,v={accumulateTwoPhaseDispatches:u,accumulateDirectDispatches:l,accumulateEnterLeaveDispatches:s};t.exports=v},{103:103,118:118,15:15,17:17}],21:[function(e,t){"use strict";var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:n&&!!window.screen,isInWorker:!n};t.exports=r},{}],22:[function(e,t){"use strict";function n(e){this._root=e,this._startText=this.getText(),this._fallbackText=null}var r=e(28),o=e(27),i=e(128);o(n.prototype,{getText:function(){return"value"in this._root?this._root.value:this._root[i()]},getData:function(){if(this._fallbackText)return this._fallbackText;var e,t,n=this._startText,r=n.length,o=this.getText(),i=o.length;for(e=0;r>e&&n[e]===o[e];e++);var a=r-e;for(t=1;a>=t&&n[r-t]===o[i-t];t++);var u=t>1?1-t:void 0;return this._fallbackText=o.slice(e,u),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},{128:128,27:27,28:28}],23:[function(e,t){"use strict";var n,r=e(10),o=e(21),i=r.injection.MUST_USE_ATTRIBUTE,a=r.injection.MUST_USE_PROPERTY,u=r.injection.HAS_BOOLEAN_VALUE,s=r.injection.HAS_SIDE_EFFECTS,l=r.injection.HAS_NUMERIC_VALUE,c=r.injection.HAS_POSITIVE_NUMERIC_VALUE,p=r.injection.HAS_OVERLOADED_BOOLEAN_VALUE;if(o.canUseDOM){var d=document.implementation;n=d&&d.hasFeature&&d.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")}var f={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:i|u,allowTransparency:i,alt:null,async:u,autoComplete:null,autoPlay:u,cellPadding:null,cellSpacing:null,charSet:i,checked:a|u,classID:i,className:n?i:a,cols:i|c,colSpan:null,content:null,contentEditable:null,contextMenu:i,controls:a|u,coords:null,crossOrigin:null,data:null,dateTime:i,defer:u,dir:null,disabled:i|u,download:p,draggable:null,encType:null,form:i,formAction:i,formEncType:i,formMethod:i,formNoValidate:u,formTarget:i,frameBorder:i,headers:null,height:i,hidden:i|u,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:a,label:null,lang:null,list:i,loop:a|u,manifest:i,marginHeight:null,marginWidth:null,max:null,maxLength:i,media:i,mediaGroup:null,method:null,min:null,multiple:a|u,muted:a|u,name:null,noValidate:u,open:u,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:a|u,rel:null,required:u,role:i,rows:i|c,rowSpan:null,sandbox:null,scope:null,scrolling:null,seamless:i|u,selected:a|u,shape:null,size:i|c,sizes:i,span:c,spellCheck:null,src:null,srcDoc:a,srcSet:i,start:l,step:null,style:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:a|s,width:i,wmode:i,autoCapitalize:null,autoCorrect:null,itemProp:i,itemScope:i|u,itemType:i,itemID:i,itemRef:i,property:null},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoCapitalize:"autocapitalize",autoComplete:"autocomplete",autoCorrect:"autocorrect",autoFocus:"autofocus",autoPlay:"autoplay",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};t.exports=f},{10:10,21:21}],24:[function(e,t){"use strict";function n(e){s(null==e.props.checkedLink||null==e.props.valueLink)}function r(e){n(e),s(null==e.props.value&&null==e.props.onChange)}function o(e){n(e),s(null==e.props.checked&&null==e.props.onChange)}function i(e){this.props.valueLink.requestChange(e.target.value)}function a(e){this.props.checkedLink.requestChange(e.target.checked)}var u=e(76),s=e(133),l={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},c={Mixin:{propTypes:{value:function(e,t){return!e[t]||l[e.type]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(e,t){return!e[t]||e.onChange||e.readOnly||e.disabled?null:new Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},onChange:u.func}},getValue:function(e){return e.props.valueLink?(r(e),e.props.valueLink.value):e.props.value},getChecked:function(e){return e.props.checkedLink?(o(e),e.props.checkedLink.value):e.props.checked},getOnChange:function(e){return e.props.valueLink?(r(e),i):e.props.checkedLink?(o(e),a):e.props.onChange}};t.exports=c},{133:133,76:76}],25:[function(e,t){"use strict";function n(e){e.remove()}var r=e(30),o=e(103),i=e(118),a=e(133),u={trapBubbledEvent:function(e,t){a(this.isMounted());var n=this.getDOMNode();a(n);var i=r.trapBubbledEvent(e,t,n);this._localEventListeners=o(this._localEventListeners,i)},componentWillUnmount:function(){this._localEventListeners&&i(this._localEventListeners,n)}};t.exports=u},{103:103,118:118,133:133,30:30}],26:[function(e,t){"use strict";var n=e(15),r=e(112),o=n.topLevelTypes,i={eventTypes:null,extractEvents:function(e,t,n,i){if(e===o.topTouchStart){var a=i.target;a&&!a.onclick&&(a.onclick=r)}}};t.exports=i},{112:112,15:15}],27:[function(e,t){"use strict";function n(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o){var i=Object(o);for(var a in i)n.call(i,a)&&(t[a]=i[a])}}return t}t.exports=n},{}],28:[function(e,t){"use strict";var n=e(133),r=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},i=function(e,t,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,e,t,n),o}return new r(e,t,n)},a=function(e,t,n,r,o){var i=this;if(i.instancePool.length){var a=i.instancePool.pop();return i.call(a,e,t,n,r,o),a}return new i(e,t,n,r,o)},u=function(e){var t=this;n(e instanceof t),e.destructor&&e.destructor(),t.instancePool.length<t.poolSize&&t.instancePool.push(e)},s=10,l=r,c=function(e,t){var n=e;return n.instancePool=[],n.getPooled=t||l,n.poolSize||(n.poolSize=s),n.release=u,n},p={addPoolingTo:c,oneArgumentPooler:r,twoArgumentPooler:o,threeArgumentPooler:i,fiveArgumentPooler:a};t.exports=p},{133:133}],29:[function(e,t){"use strict";var n=e(115),r={getDOMNode:function(){return n(this)}};t.exports=r},{115:115}],30:[function(e,t){"use strict";function n(e){return Object.prototype.hasOwnProperty.call(e,h)||(e[h]=d++,c[e[h]]={}),c[e[h]]}var r=e(15),o=e(17),i=e(18),a=e(59),u=e(102),s=e(27),l=e(134),c={},p=!1,d=0,f={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},h="_reactListenersID"+String(Math.random()).slice(2),m=s({},a,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(m.handleTopLevel),m.ReactEventListener=e}},setEnabled:function(e){m.ReactEventListener&&m.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!m.ReactEventListener||!m.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var o=t,a=n(o),u=i.registrationNameDependencies[e],s=r.topLevelTypes,c=0,p=u.length;p>c;c++){var d=u[c];a.hasOwnProperty(d)&&a[d]||(d===s.topWheel?l("wheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"wheel",o):l("mousewheel")?m.ReactEventListener.trapBubbledEvent(s.topWheel,"mousewheel",o):m.ReactEventListener.trapBubbledEvent(s.topWheel,"DOMMouseScroll",o):d===s.topScroll?l("scroll",!0)?m.ReactEventListener.trapCapturedEvent(s.topScroll,"scroll",o):m.ReactEventListener.trapBubbledEvent(s.topScroll,"scroll",m.ReactEventListener.WINDOW_HANDLE):d===s.topFocus||d===s.topBlur?(l("focus",!0)?(m.ReactEventListener.trapCapturedEvent(s.topFocus,"focus",o),m.ReactEventListener.trapCapturedEvent(s.topBlur,"blur",o)):l("focusin")&&(m.ReactEventListener.trapBubbledEvent(s.topFocus,"focusin",o),m.ReactEventListener.trapBubbledEvent(s.topBlur,"focusout",o)),a[s.topBlur]=!0,a[s.topFocus]=!0):f.hasOwnProperty(d)&&m.ReactEventListener.trapBubbledEvent(d,f[d],o),a[d]=!0)}},trapBubbledEvent:function(e,t,n){return m.ReactEventListener.trapBubbledEvent(e,t,n)},trapCapturedEvent:function(e,t,n){return m.ReactEventListener.trapCapturedEvent(e,t,n)},ensureScrollValueMonitoring:function(){if(!p){var e=u.refreshScrollValues; +m.ReactEventListener.monitorScrollValue(e),p=!0}},eventNameDispatchConfigs:o.eventNameDispatchConfigs,registrationNameModules:o.registrationNameModules,putListener:o.putListener,getListener:o.getListener,deleteListener:o.deleteListener,deleteAllListeners:o.deleteAllListeners});t.exports=m},{102:102,134:134,15:15,17:17,18:18,27:27,59:59}],31:[function(e,t){"use strict";var n=e(79),r=e(116),o=e(132),i=e(147),a={instantiateChildren:function(e){var t=r(e);for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],a=o(i,null);t[n]=a}return t},updateChildren:function(e,t,a,u){var s=r(t);if(!s&&!e)return null;var l;for(l in s)if(s.hasOwnProperty(l)){var c=e&&e[l],p=c&&c._currentElement,d=s[l];if(i(p,d))n.receiveComponent(c,d,a,u),s[l]=c;else{c&&n.unmountComponent(c,l);var f=o(d,null);s[l]=f}}for(l in e)!e.hasOwnProperty(l)||s&&s.hasOwnProperty(l)||n.unmountComponent(e[l]);return s},unmountChildren:function(e){for(var t in e){var r=e[t];n.unmountComponent(r)}}};t.exports=a},{116:116,132:132,147:147,79:79}],32:[function(e,t){"use strict";function n(e,t){this.forEachFunction=e,this.forEachContext=t}function r(e,t,n,r){var o=e;o.forEachFunction.call(o.forEachContext,t,r)}function o(e,t,o){if(null==e)return e;var i=n.getPooled(t,o);d(e,r,i),n.release(i)}function i(e,t,n){this.mapResult=e,this.mapFunction=t,this.mapContext=n}function a(e,t,n,r){var o=e,i=o.mapResult,a=!i.hasOwnProperty(n);if(a){var u=o.mapFunction.call(o.mapContext,t,r);i[n]=u}}function u(e,t,n){if(null==e)return e;var r={},o=i.getPooled(r,t,n);return d(e,a,o),i.release(o),p.create(r)}function s(){return null}function l(e){return d(e,s,null)}var c=e(28),p=e(61),d=e(149),f=(e(150),c.twoArgumentPooler),h=c.threeArgumentPooler;c.addPoolingTo(n,f),c.addPoolingTo(i,h);var m={forEach:o,map:u,count:l};t.exports=m},{149:149,150:150,28:28,61:61}],33:[function(e,t){"use strict";function n(e,t){var n=x.hasOwnProperty(t)?x[t]:null;M.hasOwnProperty(t)&&g(n===b.OVERRIDE_BASE),e.hasOwnProperty(t)&&g(n===b.DEFINE_MANY||n===b.DEFINE_MANY_MERGED)}function r(e,t){if(t){g("function"!=typeof t),g(!p.isValidElement(t));var r=e.prototype;t.hasOwnProperty(E)&&D.mixins(e,t.mixins);for(var o in t)if(t.hasOwnProperty(o)&&o!==E){var i=t[o];if(n(r,o),D.hasOwnProperty(o))D[o](e,i);else{var s=x.hasOwnProperty(o),l=r.hasOwnProperty(o),c=i&&i.__reactDontBind,d="function"==typeof i,f=d&&!s&&!l&&!c;if(f)r.__reactAutoBindMap||(r.__reactAutoBindMap={}),r.__reactAutoBindMap[o]=i,r[o]=i;else if(l){var h=x[o];g(s&&(h===b.DEFINE_MANY_MERGED||h===b.DEFINE_MANY)),h===b.DEFINE_MANY_MERGED?r[o]=a(r[o],i):h===b.DEFINE_MANY&&(r[o]=u(r[o],i))}else r[o]=i}}}}function o(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in D;g(!o);var i=n in e;g(!i),e[n]=r}}}function i(e,t){g(e&&t&&"object"==typeof e&&"object"==typeof t);for(var n in t)t.hasOwnProperty(n)&&(g(void 0===e[n]),e[n]=t[n]);return e}function a(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return i(o,n),i(o,r),o}}function u(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function s(e,t){var n=t.bind(e);return n}function l(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=s(e,d.guard(n,e.constructor.displayName+"."+t))}}var c=e(34),p=(e(39),e(55)),d=e(58),f=e(65),h=e(66),m=(e(75),e(74),e(84)),v=e(27),g=e(133),y=e(138),C=e(139),E=(e(150),C({mixins:null})),b=y({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),_=[],x={mixins:b.DEFINE_MANY,statics:b.DEFINE_MANY,propTypes:b.DEFINE_MANY,contextTypes:b.DEFINE_MANY,childContextTypes:b.DEFINE_MANY,getDefaultProps:b.DEFINE_MANY_MERGED,getInitialState:b.DEFINE_MANY_MERGED,getChildContext:b.DEFINE_MANY_MERGED,render:b.DEFINE_ONCE,componentWillMount:b.DEFINE_MANY,componentDidMount:b.DEFINE_MANY,componentWillReceiveProps:b.DEFINE_MANY,shouldComponentUpdate:b.DEFINE_ONCE,componentWillUpdate:b.DEFINE_MANY,componentDidUpdate:b.DEFINE_MANY,componentWillUnmount:b.DEFINE_MANY,updateComponent:b.OVERRIDE_BASE},D={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n<t.length;n++)r(e,t[n])},childContextTypes:function(e,t){e.childContextTypes=v({},e.childContextTypes,t)},contextTypes:function(e,t){e.contextTypes=v({},e.contextTypes,t)},getDefaultProps:function(e,t){e.getDefaultProps=e.getDefaultProps?a(e.getDefaultProps,t):t},propTypes:function(e,t){e.propTypes=v({},e.propTypes,t)},statics:function(e,t){o(e,t)}},M={replaceState:function(e,t){m.enqueueReplaceState(this,e),t&&m.enqueueCallback(this,t)},isMounted:function(){var e=f.get(this);return e&&e!==h.currentlyMountingInstance},setProps:function(e,t){m.enqueueSetProps(this,e),t&&m.enqueueCallback(this,t)},replaceProps:function(e,t){m.enqueueReplaceProps(this,e),t&&m.enqueueCallback(this,t)}},N=function(){};v(N.prototype,c.prototype,M);var I={createClass:function(e){var t=function(e,t){this.__reactAutoBindMap&&l(this),this.props=e,this.context=t,this.state=null;var n=this.getInitialState?this.getInitialState():null;g("object"==typeof n&&!Array.isArray(n)),this.state=n};t.prototype=new N,t.prototype.constructor=t,_.forEach(r.bind(null,t)),r(t,e),t.getDefaultProps&&(t.defaultProps=t.getDefaultProps()),g(t.prototype.render);for(var n in x)t.prototype[n]||(t.prototype[n]=null);return t.type=t,t},injection:{injectMixin:function(e){_.push(e)}}};t.exports=I},{133:133,138:138,139:139,150:150,27:27,34:34,39:39,55:55,58:58,65:65,66:66,74:74,75:75,84:84}],34:[function(e,t){"use strict";function n(e,t){this.props=e,this.context=t}{var r=e(84),o=e(133);e(150)}n.prototype.setState=function(e,t){o("object"==typeof e||"function"==typeof e||null==e),r.enqueueSetState(this,e),t&&r.enqueueCallback(this,t)},n.prototype.forceUpdate=function(e){r.enqueueForceUpdate(this),e&&r.enqueueCallback(this,e)};t.exports=n},{133:133,150:150,84:84}],35:[function(e,t){"use strict";var n=e(44),r=e(68),o={processChildrenUpdates:n.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:n.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(e){r.purgeID(e)}};t.exports=o},{44:44,68:68}],36:[function(e,t){"use strict";var n=e(133),r=!1,o={unmountIDFromEnvironment:null,replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(e){n(!r),o.unmountIDFromEnvironment=e.unmountIDFromEnvironment,o.replaceNodeWithMarkupByID=e.replaceNodeWithMarkupByID,o.processChildrenUpdates=e.processChildrenUpdates,r=!0}}};t.exports=o},{133:133}],37:[function(e,t){"use strict";function n(e){var t=e._currentElement._owner||null;if(t){var n=t.getName();if(n)return" Check the render method of `"+n+"`."}return""}var r=e(36),o=e(38),i=e(39),a=e(55),u=(e(56),e(65)),s=e(66),l=e(71),c=e(73),p=e(75),d=(e(74),e(79)),f=e(85),h=e(27),m=e(113),v=e(133),g=e(147),y=(e(150),1),C={construct:function(e){this._currentElement=e,this._rootNodeID=null,this._instance=null,this._pendingElement=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._renderedComponent=null,this._context=null,this._mountOrder=0,this._isTopLevel=!1,this._pendingCallbacks=null},mountComponent:function(e,t,n){this._context=n,this._mountOrder=y++,this._rootNodeID=e;var r=this._processProps(this._currentElement.props),o=this._processContext(this._currentElement._context),i=l.getComponentClassForElement(this._currentElement),a=new i(r,o);a.props=r,a.context=o,a.refs=m,this._instance=a,u.set(a,this);var c=a.state;void 0===c&&(a.state=c=null),v("object"==typeof c&&!Array.isArray(c)),this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1;var p,f=s.currentlyMountingInstance;s.currentlyMountingInstance=this;try{a.componentWillMount&&(a.componentWillMount(),this._pendingStateQueue&&(a.state=this._processPendingState(a.props,a.context))),p=this._renderValidatedComponent()}finally{s.currentlyMountingInstance=f}this._renderedComponent=this._instantiateReactComponent(p,this._currentElement.type);var h=d.mountComponent(this._renderedComponent,e,t,this._processChildContext(n));return a.componentDidMount&&t.getReactMountReady().enqueue(a.componentDidMount,a),h},unmountComponent:function(){var e=this._instance;if(e.componentWillUnmount){var t=s.currentlyUnmountingInstance;s.currentlyUnmountingInstance=this;try{e.componentWillUnmount()}finally{s.currentlyUnmountingInstance=t}}d.unmountComponent(this._renderedComponent),this._renderedComponent=null,this._pendingStateQueue=null,this._pendingReplaceState=!1,this._pendingForceUpdate=!1,this._pendingCallbacks=null,this._pendingElement=null,this._context=null,this._rootNodeID=null,u.remove(e)},_setPropsInternal:function(e,t){var n=this._pendingElement||this._currentElement;this._pendingElement=a.cloneAndReplaceProps(n,h({},n.props,e)),f.enqueueUpdate(this,t)},_maskContext:function(e){var t=null;if("string"==typeof this._currentElement.type)return m;var n=this._currentElement.type.contextTypes;if(!n)return m;t={};for(var r in n)t[r]=e[r];return t},_processContext:function(e){var t=this._maskContext(e);return t},_processChildContext:function(e){var t=this._instance,n=t.getChildContext&&t.getChildContext();if(n){v("object"==typeof t.constructor.childContextTypes);for(var r in n)v(r in t.constructor.childContextTypes);return h({},e,n)}return e},_processProps:function(e){return e},_checkPropTypes:function(e,t,r){var o=this.getName();for(var i in e)if(e.hasOwnProperty(i)){var a;try{v("function"==typeof e[i]),a=e[i](t,i,o,r)}catch(u){a=u}a instanceof Error&&(n(this),r===p.prop)}},receiveComponent:function(e,t,n){var r=this._currentElement,o=this._context;this._pendingElement=null,this.updateComponent(t,r,e,o,n)},performUpdateIfNecessary:function(e){null!=this._pendingElement&&d.receiveComponent(this,this._pendingElement||this._currentElement,e,this._context),(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(e,this._currentElement,this._currentElement,this._context,this._context)},_warnIfContextsDiffer:function(e,t){e=this._maskContext(e),t=this._maskContext(t);for(var n=Object.keys(t).sort(),r=(this.getName()||"ReactCompositeComponent",0);r<n.length;r++)n[r]},updateComponent:function(e,t,n,r,o){var i=this._instance,a=i.context,u=i.props;t!==n&&(a=this._processContext(n._context),u=this._processProps(n.props),i.componentWillReceiveProps&&i.componentWillReceiveProps(u,a));var s=this._processPendingState(u,a),l=this._pendingForceUpdate||!i.shouldComponentUpdate||i.shouldComponentUpdate(u,s,a);l?(this._pendingForceUpdate=!1,this._performComponentUpdate(n,u,s,a,e,o)):(this._currentElement=n,this._context=o,i.props=u,i.state=s,i.context=a)},_processPendingState:function(e,t){var n=this._instance,r=this._pendingStateQueue,o=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!r)return n.state;for(var i=h({},o?r[0]:n.state),a=o?1:0;a<r.length;a++){var u=r[a];h(i,"function"==typeof u?u.call(n,i,e,t):u)}return i},_performComponentUpdate:function(e,t,n,r,o,i){var a=this._instance,u=a.props,s=a.state,l=a.context;a.componentWillUpdate&&a.componentWillUpdate(t,n,r),this._currentElement=e,this._context=i,a.props=t,a.state=n,a.context=r,this._updateRenderedComponent(o,i),a.componentDidUpdate&&o.getReactMountReady().enqueue(a.componentDidUpdate.bind(a,u,s,l),a)},_updateRenderedComponent:function(e,t){var n=this._renderedComponent,r=n._currentElement,o=this._renderValidatedComponent();if(g(r,o))d.receiveComponent(n,o,e,this._processChildContext(t));else{var i=this._rootNodeID,a=n._rootNodeID;d.unmountComponent(n),this._renderedComponent=this._instantiateReactComponent(o,this._currentElement.type);var u=d.mountComponent(this._renderedComponent,i,e,t);this._replaceNodeWithMarkupByID(a,u)}},_replaceNodeWithMarkupByID:function(e,t){r.replaceNodeWithMarkupByID(e,t)},_renderValidatedComponentWithoutOwnerOrContext:function(){var e=this._instance,t=e.render();return t},_renderValidatedComponent:function(){var e,t=o.current;o.current=this._processChildContext(this._currentElement._context),i.current=this;try{e=this._renderValidatedComponentWithoutOwnerOrContext()}finally{o.current=t,i.current=null}return v(null===e||e===!1||a.isValidElement(e)),e},attachRef:function(e,t){var n=this.getPublicInstance(),r=n.refs===m?n.refs={}:n.refs;r[e]=t.getPublicInstance()},detachRef:function(e){var t=this.getPublicInstance().refs;delete t[e]},getName:function(){var e=this._currentElement.type,t=this._instance&&this._instance.constructor;return e.displayName||t&&t.displayName||e.name||t&&t.name||null},getPublicInstance:function(){return this._instance},_instantiateReactComponent:null};c.measureMethods(C,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});var E={Mixin:C};t.exports=E},{113:113,133:133,147:147,150:150,27:27,36:36,38:38,39:39,55:55,56:56,65:65,66:66,71:71,73:73,74:74,75:75,79:79,85:85}],38:[function(e,t){"use strict";var n=e(27),r=e(113),o=(e(150),{current:r,withContext:function(e,t){var r,i=o.current;o.current=n({},i,e);try{r=t()}finally{o.current=i}return r}});t.exports=o},{113:113,150:150,27:27}],39:[function(e,t){"use strict";var n={current:null};t.exports=n},{}],40:[function(e,t){"use strict";function n(e){return r.createFactory(e)}var r=e(55),o=(e(56),e(140)),i=o({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",circle:"circle",defs:"defs",ellipse:"ellipse",g:"g",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},n);t.exports=i},{140:140,55:55,56:56}],41:[function(e,t){"use strict";var n=e(2),r=e(29),o=e(33),i=e(55),a=e(138),u=i.createFactory("button"),s=a({onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0}),l=o.createClass({displayName:"ReactDOMButton",tagName:"BUTTON",mixins:[n,r],render:function(){var e={};for(var t in this.props)!this.props.hasOwnProperty(t)||this.props.disabled&&s[t]||(e[t]=this.props[t]);return u(e,this.props.children)}});t.exports=l},{138:138,2:2,29:29,33:33,55:55}],42:[function(e,t){"use strict";function n(e){e&&(null!=e.dangerouslySetInnerHTML&&(v(null==e.children),v(null!=e.dangerouslySetInnerHTML.__html)),v(null==e.style||"object"==typeof e.style))}function r(e,t,n,r){var o=p.findReactContainerForID(e);if(o){var i=o.nodeType===x?o.ownerDocument:o;C(t,i)}r.getPutListenerQueue().enqueuePutListener(e,t,n)}function o(e){T.call(I,e)||(v(N.test(e)),I[e]=!0)}function i(e){o(e),this._tag=e,this._renderedChildren=null,this._previousStyleCopy=null,this._rootNodeID=null}var a=e(5),u=e(10),s=e(11),l=e(30),c=e(35),p=e(68),d=e(69),f=e(73),h=e(27),m=e(114),v=e(133),g=(e(134),e(139)),y=(e(150),l.deleteListener),C=l.listenTo,E=l.registrationNameModules,b={string:!0,number:!0},_=g({style:null}),x=1,D=null,M={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},N=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,I={},T={}.hasOwnProperty;i.displayName="ReactDOMComponent",i.Mixin={construct:function(e){this._currentElement=e},mountComponent:function(e,t,r){this._rootNodeID=e,n(this._currentElement.props);var o=M[this._tag]?"":"</"+this._tag+">";return this._createOpenTagMarkupAndPutListeners(t)+this._createContentMarkup(t,r)+o},_createOpenTagMarkupAndPutListeners:function(e){var t=this._currentElement.props,n="<"+this._tag;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o];if(null!=i)if(E.hasOwnProperty(o))r(this._rootNodeID,o,i,e);else{o===_&&(i&&(i=this._previousStyleCopy=h({},t.style)),i=a.createMarkupForStyles(i));var u=s.createMarkupForProperty(o,i);u&&(n+=" "+u)}}if(e.renderToStaticMarkup)return n+">";var l=s.createMarkupForID(this._rootNodeID);return n+" "+l+">"},_createContentMarkup:function(e,t){var n="";("listing"===this._tag||"pre"===this._tag||"textarea"===this._tag)&&(n="\n");var r=this._currentElement.props,o=r.dangerouslySetInnerHTML;if(null!=o){if(null!=o.__html)return n+o.__html}else{var i=b[typeof r.children]?r.children:null,a=null!=i?null:r.children;if(null!=i)return n+m(i);if(null!=a){var u=this.mountChildren(a,e,t);return n+u.join("")}}return n},receiveComponent:function(e,t,n){var r=this._currentElement;this._currentElement=e,this.updateComponent(t,r,e,n)},updateComponent:function(e,t,r,o){n(this._currentElement.props),this._updateDOMProperties(t.props,e),this._updateDOMChildren(t.props,e,o)},_updateDOMProperties:function(e,t){var n,o,i,a=this._currentElement.props;for(n in e)if(!a.hasOwnProperty(n)&&e.hasOwnProperty(n))if(n===_){var s=this._previousStyleCopy;for(o in s)s.hasOwnProperty(o)&&(i=i||{},i[o]="")}else E.hasOwnProperty(n)?y(this._rootNodeID,n):(u.isStandardName[n]||u.isCustomAttribute(n))&&D.deletePropertyByID(this._rootNodeID,n);for(n in a){var l=a[n],c=n===_?this._previousStyleCopy:e[n];if(a.hasOwnProperty(n)&&l!==c)if(n===_)if(l&&(l=this._previousStyleCopy=h({},l)),c){for(o in c)!c.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(i=i||{},i[o]="");for(o in l)l.hasOwnProperty(o)&&c[o]!==l[o]&&(i=i||{},i[o]=l[o])}else i=l;else E.hasOwnProperty(n)?r(this._rootNodeID,n,l,t):(u.isStandardName[n]||u.isCustomAttribute(n))&&D.updatePropertyByID(this._rootNodeID,n,l)}i&&D.updateStylesByID(this._rootNodeID,i)},_updateDOMChildren:function(e,t,n){var r=this._currentElement.props,o=b[typeof e.children]?e.children:null,i=b[typeof r.children]?r.children:null,a=e.dangerouslySetInnerHTML&&e.dangerouslySetInnerHTML.__html,u=r.dangerouslySetInnerHTML&&r.dangerouslySetInnerHTML.__html,s=null!=o?null:e.children,l=null!=i?null:r.children,c=null!=o||null!=a,p=null!=i||null!=u;null!=s&&null==l?this.updateChildren(null,t,n):c&&!p&&this.updateTextContent(""),null!=i?o!==i&&this.updateTextContent(""+i):null!=u?a!==u&&D.updateInnerHTMLByID(this._rootNodeID,u):null!=l&&this.updateChildren(l,t,n)},unmountComponent:function(){this.unmountChildren(),l.deleteAllListeners(this._rootNodeID),c.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null}},f.measureMethods(i,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"}),h(i.prototype,i.Mixin,d.Mixin),i.injection={injectIDOperations:function(e){i.BackendIDOperations=D=e}},t.exports=i},{10:10,11:11,114:114,133:133,134:134,139:139,150:150,27:27,30:30,35:35,5:5,68:68,69:69,73:73}],43:[function(e,t){"use strict";var n=e(15),r=e(25),o=e(29),i=e(33),a=e(55),u=a.createFactory("form"),s=i.createClass({displayName:"ReactDOMForm",tagName:"FORM",mixins:[o,r],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topReset,"reset"),this.trapBubbledEvent(n.topLevelTypes.topSubmit,"submit")}});t.exports=s},{15:15,25:25,29:29,33:33,55:55}],44:[function(e,t){"use strict";var n=e(5),r=e(9),o=e(11),i=e(68),a=e(73),u=e(133),s=e(144),l={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."},c={updatePropertyByID:function(e,t,n){var r=i.getNode(e);u(!l.hasOwnProperty(t)),null!=n?o.setValueForProperty(r,t,n):o.deleteValueForProperty(r,t)},deletePropertyByID:function(e,t,n){var r=i.getNode(e);u(!l.hasOwnProperty(t)),o.deleteValueForProperty(r,t,n)},updateStylesByID:function(e,t){var r=i.getNode(e);n.setValueForStyles(r,t)},updateInnerHTMLByID:function(e,t){var n=i.getNode(e);s(n,t)},updateTextContentByID:function(e,t){var n=i.getNode(e);r.updateTextContent(n,t)},dangerouslyReplaceNodeWithMarkupByID:function(e,t){var n=i.getNode(e);r.dangerouslyReplaceNodeWithMarkup(n,t)},dangerouslyProcessChildrenUpdates:function(e,t){for(var n=0;n<e.length;n++)e[n].parentNode=i.getNode(e[n].parentID);r.processUpdates(e,t)}};a.measureMethods(c,"ReactDOMIDOperations",{updatePropertyByID:"updatePropertyByID",deletePropertyByID:"deletePropertyByID",updateStylesByID:"updateStylesByID",updateInnerHTMLByID:"updateInnerHTMLByID",updateTextContentByID:"updateTextContentByID",dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"}),t.exports=c},{11:11,133:133,144:144,5:5,68:68,73:73,9:9}],45:[function(e,t){"use strict";var n=e(15),r=e(25),o=e(29),i=e(33),a=e(55),u=a.createFactory("iframe"),s=i.createClass({displayName:"ReactDOMIframe",tagName:"IFRAME",mixins:[o,r],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load")}});t.exports=s},{15:15,25:25,29:29,33:33,55:55}],46:[function(e,t){"use strict";var n=e(15),r=e(25),o=e(29),i=e(33),a=e(55),u=a.createFactory("img"),s=i.createClass({displayName:"ReactDOMImg",tagName:"IMG",mixins:[o,r],render:function(){return u(this.props)},componentDidMount:function(){this.trapBubbledEvent(n.topLevelTypes.topLoad,"load"),this.trapBubbledEvent(n.topLevelTypes.topError,"error")}});t.exports=s},{15:15,25:25,29:29,33:33,55:55}],47:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e(2),o=e(11),i=e(24),a=e(29),u=e(33),s=e(55),l=e(68),c=e(85),p=e(27),d=e(133),f=s.createFactory("input"),h={},m=u.createClass({displayName:"ReactDOMInput",tagName:"INPUT",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue;return{initialChecked:this.props.defaultChecked||!1,initialValue:null!=e?e:null}},render:function(){var e=p({},this.props);e.defaultChecked=null,e.defaultValue=null;var t=i.getValue(this);e.value=null!=t?t:this.state.initialValue;var n=i.getChecked(this);return e.checked=null!=n?n:this.state.initialChecked,e.onChange=this._handleChange,f(e,this.props.children)},componentDidMount:function(){var e=l.getID(this.getDOMNode());h[e]=this},componentWillUnmount:function(){var e=this.getDOMNode(),t=l.getID(e);delete h[t]},componentDidUpdate:function(){var e=this.getDOMNode();null!=this.props.checked&&o.setValueForProperty(e,"checked",this.props.checked||!1);var t=i.getValue(this);null!=t&&o.setValueForProperty(e,"value",""+t)},_handleChange:function(e){var t,r=i.getOnChange(this);r&&(t=r.call(this,e)),c.asap(n,this);var o=this.props.name;if("radio"===this.props.type&&null!=o){for(var a=this.getDOMNode(),u=a;u.parentNode;)u=u.parentNode;for(var s=u.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),p=0,f=s.length;f>p;p++){var m=s[p];if(m!==a&&m.form===a.form){var v=l.getID(m);d(v);var g=h[v];d(g),c.asap(n,g)}}}return t}});t.exports=m},{11:11,133:133,2:2,24:24,27:27,29:29,33:33,55:55,68:68,85:85}],48:[function(e,t){"use strict";var n=e(29),r=e(33),o=e(55),i=(e(150),o.createFactory("option")),a=r.createClass({displayName:"ReactDOMOption",tagName:"OPTION",mixins:[n],componentWillMount:function(){},render:function(){return i(this.props,this.props.children)}});t.exports=a},{150:150,29:29,33:33,55:55}],49:[function(e,t){"use strict";function n(){if(this._pendingUpdate){this._pendingUpdate=!1;var e=a.getValue(this);null!=e&&this.isMounted()&&o(this,e)}}function r(e,t){if(null==e[t])return null;if(e.multiple){if(!Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be an array if `multiple` is true.")}else if(Array.isArray(e[t]))return new Error("The `"+t+"` prop supplied to <select> must be a scalar value if `multiple` is false.")}function o(e,t){var n,r,o,i=e.getDOMNode().options;if(e.props.multiple){for(n={},r=0,o=t.length;o>r;r++)n[""+t[r]]=!0;for(r=0,o=i.length;o>r;r++){var a=n.hasOwnProperty(i[r].value);i[r].selected!==a&&(i[r].selected=a)}}else{for(n=""+t,r=0,o=i.length;o>r;r++)if(i[r].value===n)return void(i[r].selected=!0);i[0].selected=!0}}var i=e(2),a=e(24),u=e(29),s=e(33),l=e(55),c=e(85),p=e(27),d=l.createFactory("select"),f=s.createClass({displayName:"ReactDOMSelect",tagName:"SELECT",mixins:[i,a.Mixin,u],propTypes:{defaultValue:r,value:r},render:function(){var e=p({},this.props);return e.onChange=this._handleChange,e.value=null,d(e,this.props.children)},componentWillMount:function(){this._pendingUpdate=!1},componentDidMount:function(){var e=a.getValue(this);null!=e?o(this,e):null!=this.props.defaultValue&&o(this,this.props.defaultValue)},componentDidUpdate:function(e){var t=a.getValue(this);null!=t?(this._pendingUpdate=!1,o(this,t)):!e.multiple!=!this.props.multiple&&(null!=this.props.defaultValue?o(this,this.props.defaultValue):o(this,this.props.multiple?[]:""))},_handleChange:function(e){var t,r=a.getOnChange(this);return r&&(t=r.call(this,e)),this._pendingUpdate=!0,c.asap(n,this),t}});t.exports=f},{2:2,24:24,27:27,29:29,33:33,55:55,85:85}],50:[function(e,t){"use strict";function n(e,t,n,r){return e===n&&t===r}function r(e){var t=document.selection,n=t.createRange(),r=n.text.length,o=n.duplicate();o.moveToElementText(e),o.setEndPoint("EndToStart",n);var i=o.text.length,a=i+r;return{start:i,end:a}}function o(e){var t=window.getSelection&&window.getSelection();if(!t||0===t.rangeCount)return null;var r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,u=t.getRangeAt(0),s=n(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset),l=s?0:u.toString().length,c=u.cloneRange();c.selectNodeContents(e),c.setEnd(u.startContainer,u.startOffset);var p=n(c.startContainer,c.startOffset,c.endContainer,c.endOffset),d=p?0:c.toString().length,f=d+l,h=document.createRange();h.setStart(r,o),h.setEnd(i,a);var m=h.collapsed;return{start:m?f:d,end:m?d:f}}function i(e,t){var n,r,o=document.selection.createRange().duplicate();"undefined"==typeof t.end?(n=t.start,r=n):t.start>t.end?(n=t.end,r=t.start):(n=t.start,r=t.end),o.moveToElementText(e),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(e,t){if(window.getSelection){var n=window.getSelection(),r=e[l()].length,o=Math.min(t.start,r),i="undefined"==typeof t.end?o:Math.min(t.end,r);if(!n.extend&&o>i){var a=i;i=o,o=a}var u=s(e,o),c=s(e,i);if(u&&c){var p=document.createRange();p.setStart(u.node,u.offset),n.removeAllRanges(),o>i?(n.addRange(p),n.extend(c.node,c.offset)):(p.setEnd(c.node,c.offset),n.addRange(p))}}}var u=e(21),s=e(126),l=e(128),c=u.canUseDOM&&"selection"in document&&!("getSelection"in window),p={getOffsets:c?r:o,setOffsets:c?i:a};t.exports=p},{126:126,128:128,21:21}],51:[function(e,t){"use strict";var n=e(11),r=e(35),o=e(42),i=e(27),a=e(114),u=function(){};i(u.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null,this._mountIndex=0},mountComponent:function(e,t){this._rootNodeID=e;var r=a(this._stringText);return t.renderToStaticMarkup?r:"<span "+n.createMarkupForID(e)+">"+r+"</span>"},receiveComponent:function(e){if(e!==this._currentElement){this._currentElement=e;var t=""+e;t!==this._stringText&&(this._stringText=t,o.BackendIDOperations.updateTextContentByID(this._rootNodeID,t))}},unmountComponent:function(){r.unmountIDFromEnvironment(this._rootNodeID)}}),t.exports=u},{11:11,114:114,27:27,35:35,42:42}],52:[function(e,t){"use strict";function n(){this.isMounted()&&this.forceUpdate()}var r=e(2),o=e(11),i=e(24),a=e(29),u=e(33),s=e(55),l=e(85),c=e(27),p=e(133),d=(e(150),s.createFactory("textarea")),f=u.createClass({displayName:"ReactDOMTextarea",tagName:"TEXTAREA",mixins:[r,i.Mixin,a],getInitialState:function(){var e=this.props.defaultValue,t=this.props.children;null!=t&&(p(null==e),Array.isArray(t)&&(p(t.length<=1),t=t[0]),e=""+t),null==e&&(e="");var n=i.getValue(this);return{initialValue:""+(null!=n?n:e)}},render:function(){var e=c({},this.props);return p(null==e.dangerouslySetInnerHTML),e.defaultValue=null,e.value=null,e.onChange=this._handleChange,d(e,this.state.initialValue)},componentDidUpdate:function(){var e=i.getValue(this);if(null!=e){var t=this.getDOMNode();o.setValueForProperty(t,"value",""+e)}},_handleChange:function(e){var t,r=i.getOnChange(this);return r&&(t=r.call(this,e)),l.asap(n,this),t}});t.exports=f},{11:11,133:133,150:150,2:2,24:24,27:27,29:29,33:33,55:55,85:85}],53:[function(e,t){"use strict";function n(){this.reinitializeTransaction()}var r=e(85),o=e(101),i=e(27),a=e(112),u={initialize:a,close:function(){p.isBatchingUpdates=!1}},s={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[s,u];i(n.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var c=new n,p={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,o){var i=p.isBatchingUpdates;p.isBatchingUpdates=!0,i?e(t,n,r,o):c.perform(e,null,t,n,r,o)}};t.exports=p},{101:101,112:112,27:27,85:85}],54:[function(e,t){"use strict";function n(e){return f.createClass({tagName:e.toUpperCase(),render:function(){return new I(e,null,null,null,null,this.props)}})}function r(){R.EventEmitter.injectReactEventListener(T),R.EventPluginHub.injectEventPluginOrder(u),R.EventPluginHub.injectInstanceHandle(P),R.EventPluginHub.injectMount(w),R.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:k,EnterLeaveEventPlugin:s,ChangeEventPlugin:i,MobileSafariClickEventPlugin:p,SelectEventPlugin:S,BeforeInputEventPlugin:o}),R.NativeComponent.injectGenericComponentClass(v),R.NativeComponent.injectTextComponentClass(N),R.NativeComponent.injectAutoWrapper(n),R.Class.injectMixin(d),R.NativeComponent.injectComponentClasses({button:g,form:y,iframe:b,img:C,input:_,option:x,select:D,textarea:M,html:U("html"),head:U("head"),body:U("body")}),R.DOMProperty.injectDOMPropertyConfig(c),R.DOMProperty.injectDOMPropertyConfig(L),R.EmptyComponent.injectEmptyComponent("noscript"),R.Updates.injectReconcileTransaction(O),R.Updates.injectBatchingStrategy(m),R.RootIndex.injectCreateReactRootIndex(l.canUseDOM?a.createReactRootIndex:A.createReactRootIndex),R.Component.injectEnvironment(h),R.DOMComponent.injectIDOperations(E)}var o=e(3),i=e(7),a=e(8),u=e(13),s=e(14),l=e(21),c=e(23),p=e(26),d=e(29),f=e(33),h=e(35),m=e(53),v=e(42),g=e(41),y=e(43),C=e(46),E=e(44),b=e(45),_=e(47),x=e(48),D=e(49),M=e(52),N=e(51),I=e(55),T=e(60),R=e(62),P=e(64),w=e(68),O=e(78),S=e(87),A=e(88),k=e(89),L=e(86),U=e(109);t.exports={inject:r}},{109:109,13:13,14:14,21:21,23:23,26:26,29:29,3:3,33:33,35:35,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,51:51,52:52,53:53,55:55,60:60,62:62,64:64,68:68,7:7,78:78,8:8,86:86,87:87,88:88,89:89}],55:[function(e,t){"use strict";var n=e(38),r=e(39),o=e(27),i=(e(150),{key:!0,ref:!0}),a=function(e,t,n,r,o,i){this.type=e,this.key=t,this.ref=n,this._owner=r,this._context=o,this.props=i};a.prototype={_isReactElement:!0},a.createElement=function(e,t,o){var u,s={},l=null,c=null;if(null!=t){c=void 0===t.ref?null:t.ref,l=void 0===t.key?null:""+t.key;for(u in t)t.hasOwnProperty(u)&&!i.hasOwnProperty(u)&&(s[u]=t[u]) +}var p=arguments.length-2;if(1===p)s.children=o;else if(p>1){for(var d=Array(p),f=0;p>f;f++)d[f]=arguments[f+2];s.children=d}if(e&&e.defaultProps){var h=e.defaultProps;for(u in h)"undefined"==typeof s[u]&&(s[u]=h[u])}return new a(e,l,c,r.current,n.current,s)},a.createFactory=function(e){var t=a.createElement.bind(null,e);return t.type=e,t},a.cloneAndReplaceProps=function(e,t){var n=new a(e.type,e.key,e.ref,e._owner,e._context,t);return n},a.cloneElement=function(e,t,n){var u,s=o({},e.props),l=e.key,c=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(c=t.ref,p=r.current),void 0!==t.key&&(l=""+t.key);for(u in t)t.hasOwnProperty(u)&&!i.hasOwnProperty(u)&&(s[u]=t[u])}var d=arguments.length-2;if(1===d)s.children=n;else if(d>1){for(var f=Array(d),h=0;d>h;h++)f[h]=arguments[h+2];s.children=f}return new a(e.type,l,c,p,e._context,s)},a.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},t.exports=a},{150:150,27:27,38:38,39:39}],56:[function(e,t){"use strict";function n(){if(g.current){var e=g.current.getName();if(e)return" Check the render method of `"+e+"`."}return""}function r(e){var t=e&&e.getPublicInstance();if(!t)return void 0;var n=t.constructor;return n?n.displayName||n.name||void 0:void 0}function o(){var e=g.current;return e&&r(e)||void 0}function i(e,t){e._store.validated||null!=e.key||(e._store.validated=!0,u('Each child in an array or iterator should have a unique "key" prop.',e,t))}function a(e,t,n){x.test(e)&&u("Child objects should have non-numeric keys so ordering is preserved.",t,n)}function u(e,t,n){var i=o(),a="string"==typeof n?n:n.displayName||n.name,u=i||a,s=b[e]||(b[e]={});if(!s.hasOwnProperty(u)){s[u]=!0;var l="";if(t&&t._owner&&t._owner!==g.current){var c=r(t._owner);l=" It was passed a child from "+c+"."}}}function s(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];h.isValidElement(r)&&i(r,t)}else if(h.isValidElement(e))e._store.validated=!0;else if(e){var o=C(e);if(o){if(o!==e.entries)for(var u,s=o.call(e);!(u=s.next()).done;)h.isValidElement(u.value)&&i(u.value,t)}else if("object"==typeof e){var l=m.extractIfFragment(e);for(var c in l)l.hasOwnProperty(c)&&a(c,l[c],t)}}}function l(e,t,r,o){for(var i in t)if(t.hasOwnProperty(i)){var a;try{E("function"==typeof t[i]),a=t[i](r,i,e,o)}catch(u){a=u}a instanceof Error&&!(a.message in _)&&(_[a.message]=!0,n(this))}}function c(e,t){var n=t.type,r="string"==typeof n?n:n.displayName,o=t._owner?t._owner.getPublicInstance().constructor.displayName:null,i=e+"|"+r+"|"+o;if(!D.hasOwnProperty(i)){D[i]=!0;var a="";r&&(a=" <"+r+" />");var u="";o&&(u=" The element was created by "+o+".")}}function p(e,t){return e!==e?t!==t:0===e&&0===t?1/e===1/t:e===t}function d(e){if(e._store){var t=e._store.originalProps,n=e.props;for(var r in n)n.hasOwnProperty(r)&&(t.hasOwnProperty(r)&&p(t[r],n[r])||(c(r,e),t[r]=n[r]))}}function f(e){if(null!=e.type){var t=y.getComponentClassForElement(e),n=t.displayName||t.name;t.propTypes&&l(n,t.propTypes,e.props,v.prop),"function"==typeof t.getDefaultProps}}var h=e(55),m=e(61),v=e(75),g=(e(74),e(39)),y=e(71),C=e(124),E=e(133),b=(e(150),{}),_={},x=/^\d+$/,D={},M={checkAndWarnForMutatedProps:d,createElement:function(e){var t=h.createElement.apply(this,arguments);if(null==t)return t;for(var n=2;n<arguments.length;n++)s(arguments[n],e);return f(t),t},createFactory:function(e){var t=M.createElement.bind(null,e);return t.type=e,t},cloneElement:function(){for(var e=h.cloneElement.apply(this,arguments),t=2;t<arguments.length;t++)s(arguments[t],e.type);return f(e),e}};t.exports=M},{124:124,133:133,150:150,39:39,55:55,61:61,71:71,74:74,75:75}],57:[function(e,t){"use strict";function n(e){l[e]=!0}function r(e){delete l[e]}function o(e){return!!l[e]}var i,a=e(55),u=e(65),s=e(133),l={},c={injectEmptyComponent:function(e){i=a.createFactory(e)}},p=function(){};p.prototype.componentDidMount=function(){var e=u.get(this);e&&n(e._rootNodeID)},p.prototype.componentWillUnmount=function(){var e=u.get(this);e&&r(e._rootNodeID)},p.prototype.render=function(){return s(i),i()};var d=a.createElement(p),f={emptyElement:d,injection:c,isNullComponentID:o};t.exports=f},{133:133,55:55,65:65}],58:[function(e,t){"use strict";var n={guard:function(e){return e}};t.exports=n},{}],59:[function(e,t){"use strict";function n(e){r.enqueueEvents(e),r.processEventQueue()}var r=e(17),o={handleTopLevel:function(e,t,o,i){var a=r.extractEvents(e,t,o,i);n(a)}};t.exports=o},{17:17}],60:[function(e,t){"use strict";function n(e){var t=c.getID(e),n=l.getReactRootIDFromNodeID(t),r=c.findReactContainerForID(n),o=c.getFirstReactDOM(r);return o}function r(e,t){this.topLevelType=e,this.nativeEvent=t,this.ancestors=[]}function o(e){for(var t=c.getFirstReactDOM(f(e.nativeEvent))||window,r=t;r;)e.ancestors.push(r),r=n(r);for(var o=0,i=e.ancestors.length;i>o;o++){t=e.ancestors[o];var a=c.getID(t)||"";m._handleTopLevel(e.topLevelType,t,a,e.nativeEvent)}}function i(e){var t=h(window);e(t)}var a=e(16),u=e(21),s=e(28),l=e(64),c=e(68),p=e(85),d=e(27),f=e(123),h=e(129);d(r.prototype,{destructor:function(){this.topLevelType=null,this.nativeEvent=null,this.ancestors.length=0}}),s.addPoolingTo(r,s.twoArgumentPooler);var m={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:u.canUseDOM?window:null,setHandleTopLevel:function(e){m._handleTopLevel=e},setEnabled:function(e){m._enabled=!!e},isEnabled:function(){return m._enabled},trapBubbledEvent:function(e,t,n){var r=n;return r?a.listen(r,t,m.dispatchEvent.bind(null,e)):null},trapCapturedEvent:function(e,t,n){var r=n;return r?a.capture(r,t,m.dispatchEvent.bind(null,e)):null},monitorScrollValue:function(e){var t=i.bind(null,e);a.listen(window,"scroll",t)},dispatchEvent:function(e,t){if(m._enabled){var n=r.getPooled(e,t);try{p.batchedUpdates(o,n)}finally{r.release(n)}}}};t.exports=m},{123:123,129:129,16:16,21:21,27:27,28:28,64:64,68:68,85:85}],61:[function(e,t){"use strict";var n=(e(55),e(150),{create:function(e){return e},extract:function(e){return e},extractIfFragment:function(e){return e}});t.exports=n},{150:150,55:55}],62:[function(e,t){"use strict";var n=e(10),r=e(17),o=e(36),i=e(33),a=e(57),u=e(30),s=e(71),l=e(42),c=e(73),p=e(81),d=e(85),f={Component:o.injection,Class:i.injection,DOMComponent:l.injection,DOMProperty:n.injection,EmptyComponent:a.injection,EventPluginHub:r.injection,EventEmitter:u.injection,NativeComponent:s.injection,Perf:c.injection,RootIndex:p.injection,Updates:d.injection};t.exports=f},{10:10,17:17,30:30,33:33,36:36,42:42,57:57,71:71,73:73,81:81,85:85}],63:[function(e,t){"use strict";function n(e){return o(document.documentElement,e)}var r=e(50),o=e(107),i=e(117),a=e(119),u={hasSelectionCapabilities:function(e){return e&&("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName||"true"===e.contentEditable)},getSelectionInformation:function(){var e=a();return{focusedElem:e,selectionRange:u.hasSelectionCapabilities(e)?u.getSelection(e):null}},restoreSelection:function(e){var t=a(),r=e.focusedElem,o=e.selectionRange;t!==r&&n(r)&&(u.hasSelectionCapabilities(r)&&u.setSelection(r,o),i(r))},getSelection:function(e){var t;if("selectionStart"in e)t={start:e.selectionStart,end:e.selectionEnd};else if(document.selection&&"INPUT"===e.nodeName){var n=document.selection.createRange();n.parentElement()===e&&(t={start:-n.moveStart("character",-e.value.length),end:-n.moveEnd("character",-e.value.length)})}else t=r.getOffsets(e);return t||{start:0,end:0}},setSelection:function(e,t){var n=t.start,o=t.end;if("undefined"==typeof o&&(o=n),"selectionStart"in e)e.selectionStart=n,e.selectionEnd=Math.min(o,e.value.length);else if(document.selection&&"INPUT"===e.nodeName){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",n),i.moveEnd("character",o-n),i.select()}else r.setOffsets(e,t)}};t.exports=u},{107:107,117:117,119:119,50:50}],64:[function(e,t){"use strict";function n(e){return d+e.toString(36)}function r(e,t){return e.charAt(t)===d||t===e.length}function o(e){return""===e||e.charAt(0)===d&&e.charAt(e.length-1)!==d}function i(e,t){return 0===t.indexOf(e)&&r(t,e.length)}function a(e){return e?e.substr(0,e.lastIndexOf(d)):""}function u(e,t){if(p(o(e)&&o(t)),p(i(e,t)),e===t)return e;var n,a=e.length+f;for(n=a;n<t.length&&!r(t,n);n++);return t.substr(0,n)}function s(e,t){var n=Math.min(e.length,t.length);if(0===n)return"";for(var i=0,a=0;n>=a;a++)if(r(e,a)&&r(t,a))i=a;else if(e.charAt(a)!==t.charAt(a))break;var u=e.substr(0,i);return p(o(u)),u}function l(e,t,n,r,o,s){e=e||"",t=t||"",p(e!==t);var l=i(t,e);p(l||i(e,t));for(var c=0,d=l?a:u,f=e;;f=d(f,t)){var m;if(o&&f===e||s&&f===t||(m=n(f,l,r)),m===!1||f===t)break;p(c++<h)}}var c=e(81),p=e(133),d=".",f=d.length,h=100,m={createReactRootID:function(){return n(c.createReactRootIndex())},createReactID:function(e,t){return e+t},getReactRootIDFromNodeID:function(e){if(e&&e.charAt(0)===d&&e.length>1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,o){var i=s(e,t);i!==e&&l(e,i,n,r,!1,!0),i!==t&&l(i,t,n,o,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},_getFirstCommonAncestorID:s,_getNextDescendantID:u,isAncestorIDOf:i,SEPARATOR:d};t.exports=m},{133:133,81:81}],65:[function(e,t){"use strict";var n={remove:function(e){e._reactInternalInstance=void 0},get:function(e){return e._reactInternalInstance},has:function(e){return void 0!==e._reactInternalInstance},set:function(e,t){e._reactInternalInstance=t}};t.exports=n},{}],66:[function(e,t){"use strict";var n={currentlyMountingInstance:null,currentlyUnmountingInstance:null};t.exports=n},{}],67:[function(e,t){"use strict";var n=e(104),r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(e){var t=n(e);return e.replace(">"," "+r.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var o=t.getAttribute(r.CHECKSUM_ATTR_NAME);o=o&&parseInt(o,10);var i=n(e);return i===o}};t.exports=r},{104:104}],68:[function(e,t){"use strict";function n(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function r(e){var t=T(e);return t&&K.getID(t)}function o(e){var t=i(e);if(t)if(k.hasOwnProperty(t)){var n=k[t];n!==e&&(P(!l(n,t)),k[t]=e)}else k[t]=e;return t}function i(e){return e&&e.getAttribute&&e.getAttribute(A)||""}function a(e,t){var n=i(e);n!==t&&delete k[n],e.setAttribute(A,t),k[t]=e}function u(e){return k.hasOwnProperty(e)&&l(k[e],e)||(k[e]=K.findReactNodeByID(e)),k[e]}function s(e){var t=E.get(e)._rootNodeID;return y.isNullComponentID(t)?null:(k.hasOwnProperty(t)&&l(k[t],t)||(k[t]=K.findReactNodeByID(t)),k[t])}function l(e,t){if(e){P(i(e)===t);var n=K.findReactContainerForID(t);if(n&&I(n,e))return!0}return!1}function c(e){delete k[e]}function p(e){var t=k[e];return t&&l(t,e)?void(j=t):!1}function d(e){j=null,C.traverseAncestors(e,p);var t=j;return j=null,t}function f(e,t,n,r,o){var i=x.mountComponent(e,t,r,N);e._isTopLevel=!0,K._mountImageIntoNode(i,n,o)}function h(e,t,n,r){var o=M.ReactReconcileTransaction.getPooled();o.perform(f,null,e,t,n,o,r),M.ReactReconcileTransaction.release(o)}var m=e(10),v=e(30),g=(e(39),e(55)),y=(e(56),e(57)),C=e(64),E=e(65),b=e(67),_=e(73),x=e(79),D=e(84),M=e(85),N=e(113),I=e(107),T=e(127),R=e(132),P=e(133),w=e(144),O=e(147),S=(e(150),C.SEPARATOR),A=m.ID_ATTRIBUTE_NAME,k={},L=1,U=9,F={},B={},V=[],j=null,K={_instancesByReactRootID:F,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return K.scrollMonitor(n,function(){D.enqueueElementInternal(e,t),r&&D.enqueueCallbackInternal(e,r)}),e},_registerComponent:function(e,t){P(t&&(t.nodeType===L||t.nodeType===U)),v.ensureScrollValueMonitoring();var n=K.registerContainer(t);return F[n]=e,n},_renderNewRootComponent:function(e,t,n){var r=R(e,null),o=K._registerComponent(r,t);return M.batchedUpdates(h,r,o,t,n),r},render:function(e,t,n){P(g.isValidElement(e));var o=F[r(t)];if(o){var i=o._currentElement;if(O(i,e))return K._updateRootComponent(o,e,t,n).getPublicInstance();K.unmountComponentAtNode(t)}var a=T(t),u=a&&K.isRenderedByReact(a),s=u&&!o,l=K._renderNewRootComponent(e,t,s).getPublicInstance();return n&&n.call(l),l},constructAndRenderComponent:function(e,t,n){var r=g.createElement(e,t);return K.render(r,n)},constructAndRenderComponentByID:function(e,t,n){var r=document.getElementById(n);return P(r),K.constructAndRenderComponent(e,t,r)},registerContainer:function(e){var t=r(e);return t&&(t=C.getReactRootIDFromNodeID(t)),t||(t=C.createReactRootID()),B[t]=e,t},unmountComponentAtNode:function(e){P(e&&(e.nodeType===L||e.nodeType===U));var t=r(e),n=F[t];return n?(K.unmountComponentFromNode(n,e),delete F[t],delete B[t],!0):!1},unmountComponentFromNode:function(e,t){for(x.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)},findReactContainerForID:function(e){var t=C.getReactRootIDFromNodeID(e),n=B[t];return n},findReactNodeByID:function(e){var t=K.findReactContainerForID(e);return K.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=K.getID(e);return t?t.charAt(0)===S:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(K.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=V,r=0,o=d(t)||e;for(n[0]=o.firstChild,n.length=1;r<n.length;){for(var i,a=n[r++];a;){var u=K.getID(a);u?t===u?i=a:C.isAncestorIDOf(u,t)&&(n.length=r=0,n.push(a.firstChild)):n.push(a.firstChild),a=a.nextSibling}if(i)return n.length=0,i}n.length=0,P(!1)},_mountImageIntoNode:function(e,t,r){if(P(t&&(t.nodeType===L||t.nodeType===U)),r){var o=T(t);if(b.canReuseMarkup(e,o))return;var i=o.getAttribute(b.CHECKSUM_ATTR_NAME);o.removeAttribute(b.CHECKSUM_ATTR_NAME);var a=o.outerHTML;o.setAttribute(b.CHECKSUM_ATTR_NAME,i);var u=n(e,a);" (client) "+e.substring(u-20,u+20)+"\n (server) "+a.substring(u-20,u+20),P(t.nodeType!==U)}P(t.nodeType!==U),w(t,e)},getReactRootID:r,getID:o,setID:a,getNode:u,getNodeFromInstance:s,purgeID:c};_.measureMethods(K,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),t.exports=K},{10:10,107:107,113:113,127:127,132:132,133:133,144:144,147:147,150:150,30:30,39:39,55:55,56:56,57:57,64:64,65:65,67:67,73:73,79:79,84:84,85:85}],69:[function(e,t){"use strict";function n(e,t,n){f.push({parentID:e,parentNode:null,type:l.INSERT_MARKUP,markupIndex:h.push(t)-1,textContent:null,fromIndex:null,toIndex:n})}function r(e,t,n){f.push({parentID:e,parentNode:null,type:l.MOVE_EXISTING,markupIndex:null,textContent:null,fromIndex:t,toIndex:n})}function o(e,t){f.push({parentID:e,parentNode:null,type:l.REMOVE_NODE,markupIndex:null,textContent:null,fromIndex:t,toIndex:null})}function i(e,t){f.push({parentID:e,parentNode:null,type:l.TEXT_CONTENT,markupIndex:null,textContent:t,fromIndex:null,toIndex:null})}function a(){f.length&&(s.processChildrenUpdates(f,h),u())}function u(){f.length=0,h.length=0}var s=e(36),l=e(70),c=e(79),p=e(31),d=0,f=[],h=[],m={Mixin:{mountChildren:function(e,t,n){var r=p.instantiateChildren(e,t,n);this._renderedChildren=r;var o=[],i=0;for(var a in r)if(r.hasOwnProperty(a)){var u=r[a],s=this._rootNodeID+a,l=c.mountComponent(u,s,t,n);u._mountIndex=i,o.push(l),i++}return o},updateTextContent:function(e){d++;var t=!0;try{var n=this._renderedChildren;p.unmountChildren(n);for(var r in n)n.hasOwnProperty(r)&&this._unmountChildByName(n[r],r);this.setTextContent(e),t=!1}finally{d--,d||(t?u():a())}},updateChildren:function(e,t,n){d++;var r=!0;try{this._updateChildren(e,t,n),r=!1}finally{d--,d||(r?u():a())}},_updateChildren:function(e,t,n){var r=this._renderedChildren,o=p.updateChildren(r,e,t,n);if(this._renderedChildren=o,o||r){var i,a=0,u=0;for(i in o)if(o.hasOwnProperty(i)){var s=r&&r[i],l=o[i];s===l?(this.moveChild(s,u,a),a=Math.max(s._mountIndex,a),s._mountIndex=u):(s&&(a=Math.max(s._mountIndex,a),this._unmountChildByName(s,i)),this._mountChildByNameAtIndex(l,i,u,t,n)),u++}for(i in r)!r.hasOwnProperty(i)||o&&o.hasOwnProperty(i)||this._unmountChildByName(r[i],i)}},unmountChildren:function(){var e=this._renderedChildren;p.unmountChildren(e),this._renderedChildren=null},moveChild:function(e,t,n){e._mountIndex<n&&r(this._rootNodeID,e._mountIndex,t)},createChild:function(e,t){n(this._rootNodeID,t,e._mountIndex)},removeChild:function(e){o(this._rootNodeID,e._mountIndex)},setTextContent:function(e){i(this._rootNodeID,e)},_mountChildByNameAtIndex:function(e,t,n,r,o){var i=this._rootNodeID+t,a=c.mountComponent(e,i,r,o);e._mountIndex=n,this.createChild(e,a)},_unmountChildByName:function(e){this.removeChild(e),e._mountIndex=null}}};t.exports=m},{31:31,36:36,70:70,79:79}],70:[function(e,t){"use strict";var n=e(138),r=n({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,TEXT_CONTENT:null});t.exports=r},{138:138}],71:[function(e,t){"use strict";function n(e){if("function"==typeof e.type)return e.type;var t=e.type,n=c[t];return null==n&&(c[t]=n=s(t)),n}function r(e){return u(l),new l(e.type,e.props)}function o(e){return new p(e)}function i(e){return e instanceof p}var a=e(27),u=e(133),s=null,l=null,c={},p=null,d={injectGenericComponentClass:function(e){l=e},injectTextComponentClass:function(e){p=e},injectComponentClasses:function(e){a(c,e)},injectAutoWrapper:function(e){s=e}},f={getComponentClassForElement:n,createInternalComponent:r,createInstanceForText:o,isTextComponent:i,injection:d};t.exports=f},{133:133,27:27}],72:[function(e,t){"use strict";var n=e(133),r={isValidOwner:function(e){return!(!e||"function"!=typeof e.attachRef||"function"!=typeof e.detachRef)},addComponentAsRefTo:function(e,t,o){n(r.isValidOwner(o)),o.attachRef(t,e)},removeComponentAsRefFrom:function(e,t,o){n(r.isValidOwner(o)),o.getPublicInstance().refs[t]===e.getPublicInstance()&&o.detachRef(t)}};t.exports=r},{133:133}],73:[function(e,t){"use strict";function n(e,t,n){return n}var r={enableMeasure:!1,storedMeasure:n,measureMethods:function(){},measure:function(e,t,n){return n},injection:{injectMeasure:function(e){r.storedMeasure=e}}};t.exports=r},{}],74:[function(e,t){"use strict";var n={};t.exports=n},{}],75:[function(e,t){"use strict";var n=e(138),r=n({prop:null,context:null,childContext:null});t.exports=r},{138:138}],76:[function(e,t){"use strict";function n(e){function t(t,n,r,o,i){if(o=o||E,null==n[r]){var a=y[i];return t?new Error("Required "+a+" `"+r+"` was not specified in "+("`"+o+"`.")):null}return e(n,r,o,i)}var n=t.bind(null,!1);return n.isRequired=t.bind(null,!0),n}function r(e){function t(t,n,r,o){var i=t[n],a=h(i);if(a!==e){var u=y[o],s=m(i);return new Error("Invalid "+u+" `"+n+"` of type `"+s+"` "+("supplied to `"+r+"`, expected `"+e+"`."))}return null}return n(t)}function o(){return n(C.thatReturns(null))}function i(e){function t(t,n,r,o){var i=t[n];if(!Array.isArray(i)){var a=y[o],u=h(i);return new Error("Invalid "+a+" `"+n+"` of type "+("`"+u+"` supplied to `"+r+"`, expected an array."))}for(var s=0;s<i.length;s++){var l=e(i,s,r,o);if(l instanceof Error)return l}return null}return n(t)}function a(){function e(e,t,n,r){if(!v.isValidElement(e[t])){var o=y[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactElement."))}return null}return n(e)}function u(e){function t(t,n,r,o){if(!(t[n]instanceof e)){var i=y[o],a=e.name||E;return new Error("Invalid "+i+" `"+n+"` supplied to "+("`"+r+"`, expected instance of `"+a+"`."))}return null}return n(t)}function s(e){function t(t,n,r,o){for(var i=t[n],a=0;a<e.length;a++)if(i===e[a])return null;var u=y[o],s=JSON.stringify(e);return new Error("Invalid "+u+" `"+n+"` of value `"+i+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return n(t)}function l(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var u=y[o];return new Error("Invalid "+u+" `"+n+"` of type "+("`"+a+"` supplied to `"+r+"`, expected an object."))}for(var s in i)if(i.hasOwnProperty(s)){var l=e(i,s,r,o);if(l instanceof Error)return l}return null}return n(t)}function c(e){function t(t,n,r,o){for(var i=0;i<e.length;i++){var a=e[i];if(null==a(t,n,r,o))return null}var u=y[o];return new Error("Invalid "+u+" `"+n+"` supplied to "+("`"+r+"`."))}return n(t)}function p(){function e(e,t,n,r){if(!f(e[t])){var o=y[r];return new Error("Invalid "+o+" `"+t+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return null}return n(e)}function d(e){function t(t,n,r,o){var i=t[n],a=h(i);if("object"!==a){var u=y[o];return new Error("Invalid "+u+" `"+n+"` of type `"+a+"` "+("supplied to `"+r+"`, expected `object`."))}for(var s in e){var l=e[s];if(l){var c=l(i,s,r,o);if(c)return c}}return null}return n(t)}function f(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(f);if(null===e||v.isValidElement(e))return!0;e=g.extractIfFragment(e);for(var t in e)if(!f(e[t]))return!1;return!0;default:return!1}}function h(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":t}function m(e){var t=h(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}var v=e(55),g=e(61),y=e(74),C=e(112),E="<<anonymous>>",b=a(),_=p(),x={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),any:o(),arrayOf:i,element:b,instanceOf:u,node:_,objectOf:l,oneOf:s,oneOfType:c,shape:d};t.exports=x},{112:112,55:55,61:61,74:74}],77:[function(e,t){"use strict";function n(){this.listenersToPut=[]}var r=e(28),o=e(30),i=e(27);i(n.prototype,{enqueuePutListener:function(e,t,n){this.listenersToPut.push({rootNodeID:e,propKey:t,propValue:n})},putListeners:function(){for(var e=0;e<this.listenersToPut.length;e++){var t=this.listenersToPut[e];o.putListener(t.rootNodeID,t.propKey,t.propValue)}},reset:function(){this.listenersToPut.length=0},destructor:function(){this.reset()}}),r.addPoolingTo(n),t.exports=n},{27:27,28:28,30:30}],78:[function(e,t){"use strict";function n(){this.reinitializeTransaction(),this.renderToStaticMarkup=!1,this.reactMountReady=r.getPooled(null),this.putListenerQueue=u.getPooled()}var r=e(6),o=e(28),i=e(30),a=e(63),u=e(77),s=e(101),l=e(27),c={initialize:a.getSelectionInformation,close:a.restoreSelection},p={initialize:function(){var e=i.isEnabled();return i.setEnabled(!1),e},close:function(e){i.setEnabled(e)}},d={initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}},f={initialize:function(){this.putListenerQueue.reset()},close:function(){this.putListenerQueue.putListeners()}},h=[f,c,p,d],m={getTransactionWrappers:function(){return h},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){r.release(this.reactMountReady),this.reactMountReady=null,u.release(this.putListenerQueue),this.putListenerQueue=null}};l(n.prototype,s.Mixin,m),o.addPoolingTo(n),t.exports=n},{101:101,27:27,28:28,30:30,6:6,63:63,77:77}],79:[function(e,t){"use strict";function n(){r.attachRefs(this,this._currentElement)}var r=e(80),o=(e(56),{mountComponent:function(e,t,r,o){var i=e.mountComponent(t,r,o);return r.getReactMountReady().enqueue(n,e),i},unmountComponent:function(e){r.detachRefs(e,e._currentElement),e.unmountComponent()},receiveComponent:function(e,t,o,i){var a=e._currentElement;if(t!==a||null==t._owner){var u=r.shouldUpdateRefs(a,t);u&&r.detachRefs(e,a),e.receiveComponent(t,o,i),u&&o.getReactMountReady().enqueue(n,e)}},performUpdateIfNecessary:function(e,t){e.performUpdateIfNecessary(t)}});t.exports=o},{56:56,80:80}],80:[function(e,t){"use strict";function n(e,t,n){"function"==typeof e?e(t.getPublicInstance()):o.addComponentAsRefTo(t,e,n)}function r(e,t,n){"function"==typeof e?e(null):o.removeComponentAsRefFrom(t,e,n)}var o=e(72),i={};i.attachRefs=function(e,t){var r=t.ref;null!=r&&n(r,e,t._owner)},i.shouldUpdateRefs=function(e,t){return t._owner!==e._owner||t.ref!==e.ref},i.detachRefs=function(e,t){var n=t.ref;null!=n&&r(n,e,t._owner)},t.exports=i},{72:72}],81:[function(e,t){"use strict";var n={injectCreateReactRootIndex:function(e){r.createReactRootIndex=e}},r={createReactRootIndex:null,injection:n};t.exports=r},{}],82:[function(e,t){"use strict";function n(e){c(o.isValidElement(e));var t;try{var n=i.createReactRootID();return t=u.getPooled(!1),t.perform(function(){var r=l(e,null),o=r.mountComponent(n,t,s);return a.addChecksumToMarkup(o)},null)}finally{u.release(t)}}function r(e){c(o.isValidElement(e));var t;try{var n=i.createReactRootID();return t=u.getPooled(!0),t.perform(function(){var r=l(e,null);return r.mountComponent(n,t,s)},null)}finally{u.release(t)}}var o=e(55),i=e(64),a=e(67),u=e(83),s=e(113),l=e(132),c=e(133);t.exports={renderToString:n,renderToStaticMarkup:r}},{113:113,132:132,133:133,55:55,64:64,67:67,83:83}],83:[function(e,t){"use strict";function n(e){this.reinitializeTransaction(),this.renderToStaticMarkup=e,this.reactMountReady=o.getPooled(null),this.putListenerQueue=i.getPooled()}var r=e(28),o=e(6),i=e(77),a=e(101),u=e(27),s=e(112),l={initialize:function(){this.reactMountReady.reset()},close:s},c={initialize:function(){this.putListenerQueue.reset()},close:s},p=[c,l],d={getTransactionWrappers:function(){return p},getReactMountReady:function(){return this.reactMountReady},getPutListenerQueue:function(){return this.putListenerQueue},destructor:function(){o.release(this.reactMountReady),this.reactMountReady=null,i.release(this.putListenerQueue),this.putListenerQueue=null}};u(n.prototype,a.Mixin,d),r.addPoolingTo(n),t.exports=n},{101:101,112:112,27:27,28:28,6:6,77:77}],84:[function(e,t){"use strict";function n(e){e!==o.currentlyMountingInstance&&s.enqueueUpdate(e)}function r(e){c(null==i.current);var t=u.get(e);return t?t===o.currentlyUnmountingInstance?null:t:null}var o=e(66),i=e(39),a=e(55),u=e(65),s=e(85),l=e(27),c=e(133),p=(e(150),{enqueueCallback:function(e,t){c("function"==typeof t);var i=r(e);return i&&i!==o.currentlyMountingInstance?(i._pendingCallbacks?i._pendingCallbacks.push(t):i._pendingCallbacks=[t],void n(i)):null},enqueueCallbackInternal:function(e,t){c("function"==typeof t),e._pendingCallbacks?e._pendingCallbacks.push(t):e._pendingCallbacks=[t],n(e)},enqueueForceUpdate:function(e){var t=r(e,"forceUpdate");t&&(t._pendingForceUpdate=!0,n(t))},enqueueReplaceState:function(e,t){var o=r(e,"replaceState");o&&(o._pendingStateQueue=[t],o._pendingReplaceState=!0,n(o))},enqueueSetState:function(e,t){var o=r(e,"setState");if(o){var i=o._pendingStateQueue||(o._pendingStateQueue=[]);i.push(t),n(o)}},enqueueSetProps:function(e,t){var o=r(e,"setProps");if(o){c(o._isTopLevel);var i=o._pendingElement||o._currentElement,u=l({},i.props,t);o._pendingElement=a.cloneAndReplaceProps(i,u),n(o)}},enqueueReplaceProps:function(e,t){var o=r(e,"replaceProps");if(o){c(o._isTopLevel);var i=o._pendingElement||o._currentElement;o._pendingElement=a.cloneAndReplaceProps(i,t),n(o)}},enqueueElementInternal:function(e,t){e._pendingElement=t,n(e)}});t.exports=p},{133:133,150:150,27:27,39:39,55:55,65:65,66:66,85:85}],85:[function(e,t){"use strict";function n(){m(M.ReactReconcileTransaction&&C)}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=M.ReactReconcileTransaction.getPooled()}function o(e,t,r,o,i){n(),C.batchedUpdates(e,t,r,o,i)}function i(e,t){return e._mountOrder-t._mountOrder}function a(e){var t=e.dirtyComponentsLength;m(t===v.length),v.sort(i);for(var n=0;t>n;n++){var r=v[n],o=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),o)for(var a=0;a<o.length;a++)e.callbackQueue.enqueue(o[a],r.getPublicInstance())}}function u(e){return n(),C.isBatchingUpdates?void v.push(e):void C.batchedUpdates(u,e)}function s(e,t){m(C.isBatchingUpdates),g.enqueue(e,t),y=!0}var l=e(6),c=e(28),p=(e(39),e(73)),d=e(79),f=e(101),h=e(27),m=e(133),v=(e(150),[]),g=l.getPooled(),y=!1,C=null,E={initialize:function(){this.dirtyComponentsLength=v.length},close:function(){this.dirtyComponentsLength!==v.length?(v.splice(0,this.dirtyComponentsLength),x()):v.length=0}},b={initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}},_=[E,b];h(r.prototype,f.Mixin,{getTransactionWrappers:function(){return _},destructor:function(){this.dirtyComponentsLength=null,l.release(this.callbackQueue),this.callbackQueue=null,M.ReactReconcileTransaction.release(this.reconcileTransaction),this.reconcileTransaction=null},perform:function(e,t,n){return f.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,e,t,n)}}),c.addPoolingTo(r);var x=function(){for(;v.length||y;){if(v.length){var e=r.getPooled();e.perform(a,null,e),r.release(e)}if(y){y=!1;var t=g;g=l.getPooled(),t.notifyAll(),l.release(t)}}};x=p.measure("ReactUpdates","flushBatchedUpdates",x);var D={injectReconcileTransaction:function(e){m(e),M.ReactReconcileTransaction=e},injectBatchingStrategy:function(e){m(e),m("function"==typeof e.batchedUpdates),m("boolean"==typeof e.isBatchingUpdates),C=e}},M={ReactReconcileTransaction:null,batchedUpdates:o,enqueueUpdate:u,flushBatchedUpdates:x,injection:D,asap:s};t.exports=M},{101:101,133:133,150:150,27:27,28:28,39:39,6:6,73:73,79:79}],86:[function(e,t){"use strict";var n=e(10),r=n.injection.MUST_USE_ATTRIBUTE,o={Properties:{cx:r,cy:r,d:r,dx:r,dy:r,fill:r,fillOpacity:r,fontFamily:r,fontSize:r,fx:r,fy:r,gradientTransform:r,gradientUnits:r,markerEnd:r,markerMid:r,markerStart:r,offset:r,opacity:r,patternContentUnits:r,patternUnits:r,points:r,preserveAspectRatio:r,r:r,rx:r,ry:r,spreadMethod:r,stopColor:r,stopOpacity:r,stroke:r,strokeDasharray:r,strokeLinecap:r,strokeOpacity:r,strokeWidth:r,textAnchor:r,transform:r,version:r,viewBox:r,x1:r,x2:r,x:r,y1:r,y2:r,y:r},DOMAttributeNames:{fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox"}};t.exports=o},{10:10}],87:[function(e,t){"use strict";function n(e){if("selectionStart"in e&&a.hasSelectionCapabilities(e))return{start:e.selectionStart,end:e.selectionEnd};if(window.getSelection){var t=window.getSelection();return{anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(e){if(g||null==h||h!==s())return null;var t=n(h);if(!v||!p(v,t)){v=t;var r=u.getPooled(f.select,m,e);return r.type="select",r.target=h,i.accumulateTwoPhaseDispatches(r),r}}var o=e(15),i=e(20),a=e(63),u=e(93),s=e(119),l=e(136),c=e(139),p=e(146),d=o.topLevelTypes,f={select:{phasedRegistrationNames:{bubbled:c({onSelect:null}),captured:c({onSelectCapture:null})},dependencies:[d.topBlur,d.topContextMenu,d.topFocus,d.topKeyDown,d.topMouseDown,d.topMouseUp,d.topSelectionChange]}},h=null,m=null,v=null,g=!1,y={eventTypes:f,extractEvents:function(e,t,n,o){switch(e){case d.topFocus:(l(t)||"true"===t.contentEditable)&&(h=t,m=n,v=null);break;case d.topBlur:h=null,m=null,v=null;break;case d.topMouseDown:g=!0;break;case d.topContextMenu:case d.topMouseUp:return g=!1,r(o);case d.topSelectionChange:case d.topKeyDown:case d.topKeyUp:return r(o)}}};t.exports=y},{119:119,136:136,139:139,146:146,15:15,20:20,63:63,93:93}],88:[function(e,t){"use strict";var n=Math.pow(2,53),r={createReactRootIndex:function(){return Math.ceil(Math.random()*n)}};t.exports=r},{}],89:[function(e,t){"use strict";var n=e(15),r=e(19),o=e(20),i=e(90),a=e(93),u=e(94),s=e(96),l=e(97),c=e(92),p=e(98),d=e(99),f=e(100),h=e(120),m=e(133),v=e(139),g=(e(150),n.topLevelTypes),y={blur:{phasedRegistrationNames:{bubbled:v({onBlur:!0}),captured:v({onBlurCapture:!0})}},click:{phasedRegistrationNames:{bubbled:v({onClick:!0}),captured:v({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:v({onContextMenu:!0}),captured:v({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:v({onCopy:!0}),captured:v({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:v({onCut:!0}),captured:v({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:v({onDoubleClick:!0}),captured:v({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:v({onDrag:!0}),captured:v({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:v({onDragEnd:!0}),captured:v({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:v({onDragEnter:!0}),captured:v({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:v({onDragExit:!0}),captured:v({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:v({onDragLeave:!0}),captured:v({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:v({onDragOver:!0}),captured:v({onDragOverCapture:!0})}},dragStart:{phasedRegistrationNames:{bubbled:v({onDragStart:!0}),captured:v({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:v({onDrop:!0}),captured:v({onDropCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:v({onFocus:!0}),captured:v({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:v({onInput:!0}),captured:v({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:v({onKeyDown:!0}),captured:v({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:v({onKeyPress:!0}),captured:v({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:v({onKeyUp:!0}),captured:v({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:v({onLoad:!0}),captured:v({onLoadCapture:!0})}},error:{phasedRegistrationNames:{bubbled:v({onError:!0}),captured:v({onErrorCapture:!0})}},mouseDown:{phasedRegistrationNames:{bubbled:v({onMouseDown:!0}),captured:v({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:v({onMouseMove:!0}),captured:v({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:v({onMouseOut:!0}),captured:v({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:v({onMouseOver:!0}),captured:v({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:v({onMouseUp:!0}),captured:v({onMouseUpCapture:!0})}},paste:{phasedRegistrationNames:{bubbled:v({onPaste:!0}),captured:v({onPasteCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:v({onReset:!0}),captured:v({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:v({onScroll:!0}),captured:v({onScrollCapture:!0})}},submit:{phasedRegistrationNames:{bubbled:v({onSubmit:!0}),captured:v({onSubmitCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:v({onTouchCancel:!0}),captured:v({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:v({onTouchEnd:!0}),captured:v({onTouchEndCapture:!0})}},touchMove:{phasedRegistrationNames:{bubbled:v({onTouchMove:!0}),captured:v({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:v({onTouchStart:!0}),captured:v({onTouchStartCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:v({onWheel:!0}),captured:v({onWheelCapture:!0})}}},C={topBlur:y.blur,topClick:y.click,topContextMenu:y.contextMenu,topCopy:y.copy,topCut:y.cut,topDoubleClick:y.doubleClick,topDrag:y.drag,topDragEnd:y.dragEnd,topDragEnter:y.dragEnter,topDragExit:y.dragExit,topDragLeave:y.dragLeave,topDragOver:y.dragOver,topDragStart:y.dragStart,topDrop:y.drop,topError:y.error,topFocus:y.focus,topInput:y.input,topKeyDown:y.keyDown,topKeyPress:y.keyPress,topKeyUp:y.keyUp,topLoad:y.load,topMouseDown:y.mouseDown,topMouseMove:y.mouseMove,topMouseOut:y.mouseOut,topMouseOver:y.mouseOver,topMouseUp:y.mouseUp,topPaste:y.paste,topReset:y.reset,topScroll:y.scroll,topSubmit:y.submit,topTouchCancel:y.touchCancel,topTouchEnd:y.touchEnd,topTouchMove:y.touchMove,topTouchStart:y.touchStart,topWheel:y.wheel}; +for(var E in C)C[E].dependencies=[E];var b={eventTypes:y,executeDispatch:function(e,t,n){var o=r.executeDispatch(e,t,n);o===!1&&(e.stopPropagation(),e.preventDefault())},extractEvents:function(e,t,n,r){var v=C[e];if(!v)return null;var y;switch(e){case g.topInput:case g.topLoad:case g.topError:case g.topReset:case g.topSubmit:y=a;break;case g.topKeyPress:if(0===h(r))return null;case g.topKeyDown:case g.topKeyUp:y=s;break;case g.topBlur:case g.topFocus:y=u;break;case g.topClick:if(2===r.button)return null;case g.topContextMenu:case g.topDoubleClick:case g.topMouseDown:case g.topMouseMove:case g.topMouseOut:case g.topMouseOver:case g.topMouseUp:y=l;break;case g.topDrag:case g.topDragEnd:case g.topDragEnter:case g.topDragExit:case g.topDragLeave:case g.topDragOver:case g.topDragStart:case g.topDrop:y=c;break;case g.topTouchCancel:case g.topTouchEnd:case g.topTouchMove:case g.topTouchStart:y=p;break;case g.topScroll:y=d;break;case g.topWheel:y=f;break;case g.topCopy:case g.topCut:case g.topPaste:y=i}m(y);var E=y.getPooled(v,n,r);return o.accumulateTwoPhaseDispatches(E),E}};t.exports=b},{100:100,120:120,133:133,139:139,15:15,150:150,19:19,20:20,90:90,92:92,93:93,94:94,96:96,97:97,98:98,99:99}],90:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(93),o={clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}};r.augmentClass(n,o),t.exports=n},{93:93}],91:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(93),o={data:null};r.augmentClass(n,o),t.exports=n},{93:93}],92:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(97),o={dataTransfer:null};r.augmentClass(n,o),t.exports=n},{97:97}],93:[function(e,t){"use strict";function n(e,t,n){this.dispatchConfig=e,this.dispatchMarker=t,this.nativeEvent=n;var r=this.constructor.Interface;for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];this[o]=a?a(n):n[o]}var u=null!=n.defaultPrevented?n.defaultPrevented:n.returnValue===!1;this.isDefaultPrevented=u?i.thatReturnsTrue:i.thatReturnsFalse,this.isPropagationStopped=i.thatReturnsFalse}var r=e(28),o=e(27),i=e(112),a=e(123),u={type:null,target:a,currentTarget:i.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};o(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e.preventDefault?e.preventDefault():e.returnValue=!1,this.isDefaultPrevented=i.thatReturnsTrue},stopPropagation:function(){var e=this.nativeEvent;e.stopPropagation?e.stopPropagation():e.cancelBubble=!0,this.isPropagationStopped=i.thatReturnsTrue},persist:function(){this.isPersistent=i.thatReturnsTrue},isPersistent:i.thatReturnsFalse,destructor:function(){var e=this.constructor.Interface;for(var t in e)this[t]=null;this.dispatchConfig=null,this.dispatchMarker=null,this.nativeEvent=null}}),n.Interface=u,n.augmentClass=function(e,t){var n=this,i=Object.create(n.prototype);o(i,e.prototype),e.prototype=i,e.prototype.constructor=e,e.Interface=o({},n.Interface,t),e.augmentClass=n.augmentClass,r.addPoolingTo(e,r.threeArgumentPooler)},r.addPoolingTo(n,r.threeArgumentPooler),t.exports=n},{112:112,123:123,27:27,28:28}],94:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(99),o={relatedTarget:null};r.augmentClass(n,o),t.exports=n},{99:99}],95:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(93),o={data:null};r.augmentClass(n,o),t.exports=n},{93:93}],96:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(99),o=e(120),i=e(121),a=e(122),u={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(e){return"keypress"===e.type?o(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?o(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}};r.augmentClass(n,u),t.exports=n},{120:120,121:121,122:122,99:99}],97:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(99),o=e(102),i=e(122),a={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:i,button:function(e){var t=e.button;return"which"in e?t:2===t?2:4===t?1:0},buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},pageX:function(e){return"pageX"in e?e.pageX:e.clientX+o.currentScrollLeft},pageY:function(e){return"pageY"in e?e.pageY:e.clientY+o.currentScrollTop}};r.augmentClass(n,a),t.exports=n},{102:102,122:122,99:99}],98:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(99),o=e(122),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:o};r.augmentClass(n,i),t.exports=n},{122:122,99:99}],99:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(93),o=e(123),i={view:function(e){if(e.view)return e.view;var t=o(e);if(null!=t&&t.window===t)return t;var n=t.ownerDocument;return n?n.defaultView||n.parentWindow:window},detail:function(e){return e.detail||0}};r.augmentClass(n,i),t.exports=n},{123:123,93:93}],100:[function(e,t){"use strict";function n(e,t,n){r.call(this,e,t,n)}var r=e(97),o={deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(n,o),t.exports=n},{97:97}],101:[function(e,t){"use strict";var n=e(133),r={reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers(),this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[],this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(e,t,r,o,i,a,u,s){n(!this.isInTransaction());var l,c;try{this._isInTransaction=!0,l=!0,this.initializeAll(0),c=e.call(t,r,o,i,a,u,s),l=!1}finally{try{if(l)try{this.closeAll(0)}catch(p){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return c},initializeAll:function(e){for(var t=this.transactionWrappers,n=e;n<t.length;n++){var r=t[n];try{this.wrapperInitData[n]=o.OBSERVED_ERROR,this.wrapperInitData[n]=r.initialize?r.initialize.call(this):null}finally{if(this.wrapperInitData[n]===o.OBSERVED_ERROR)try{this.initializeAll(n+1)}catch(i){}}}},closeAll:function(e){n(this.isInTransaction());for(var t=this.transactionWrappers,r=e;r<t.length;r++){var i,a=t[r],u=this.wrapperInitData[r];try{i=!0,u!==o.OBSERVED_ERROR&&a.close&&a.close.call(this,u),i=!1}finally{if(i)try{this.closeAll(r+1)}catch(s){}}}this.wrapperInitData.length=0}},o={Mixin:r,OBSERVED_ERROR:{}};t.exports=o},{133:133}],102:[function(e,t){"use strict";var n={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(e){n.currentScrollLeft=e.x,n.currentScrollTop=e.y}};t.exports=n},{}],103:[function(e,t){"use strict";function n(e,t){if(r(null!=t),null==e)return t;var n=Array.isArray(e),o=Array.isArray(t);return n&&o?(e.push.apply(e,t),e):n?(e.push(t),e):o?[e].concat(t):[e,t]}var r=e(133);t.exports=n},{133:133}],104:[function(e,t){"use strict";function n(e){for(var t=1,n=0,o=0;o<e.length;o++)t=(t+e.charCodeAt(o))%r,n=(n+t)%r;return t|n<<16}var r=65521;t.exports=n},{}],105:[function(e,t){function n(e){return e.replace(r,function(e,t){return t.toUpperCase()})}var r=/-(.)/g;t.exports=n},{}],106:[function(e,t){"use strict";function n(e){return r(e.replace(o,"ms-"))}var r=e(105),o=/^-ms-/;t.exports=n},{105:105}],107:[function(e,t){function n(e,t){return e&&t?e===t?!0:r(e)?!1:r(t)?n(e,t.parentNode):e.contains?e.contains(t):e.compareDocumentPosition?!!(16&e.compareDocumentPosition(t)):!1:!1}var r=e(137);t.exports=n},{137:137}],108:[function(e,t){function n(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"length"in e&&!("setInterval"in e)&&"number"!=typeof e.nodeType&&(Array.isArray(e)||"callee"in e||"item"in e)}function r(e){return n(e)?Array.isArray(e)?e.slice():o(e):[e]}var o=e(148);t.exports=r},{148:148}],109:[function(e,t){"use strict";function n(e){var t=o.createFactory(e),n=r.createClass({displayName:"ReactFullPageComponent"+e,componentWillUnmount:function(){i(!1)},render:function(){return t(this.props)}});return n}var r=e(33),o=e(55),i=e(133);t.exports=n},{133:133,33:33,55:55}],110:[function(e,t){function n(e){var t=e.match(l);return t&&t[1].toLowerCase()}function r(e,t){var r=s;u(!!s);var o=n(e),l=o&&a(o);if(l){r.innerHTML=l[1]+e+l[2];for(var c=l[0];c--;)r=r.lastChild}else r.innerHTML=e;var p=r.getElementsByTagName("script");p.length&&(u(t),i(p).forEach(t));for(var d=i(r.childNodes);r.lastChild;)r.removeChild(r.lastChild);return d}var o=e(21),i=e(108),a=e(125),u=e(133),s=o.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=r},{108:108,125:125,133:133,21:21}],111:[function(e,t){"use strict";function n(e,t){var n=null==t||"boolean"==typeof t||""===t;if(n)return"";var r=isNaN(t);return r||0===t||o.hasOwnProperty(e)&&o[e]?""+t:("string"==typeof t&&(t=t.trim()),t+"px")}var r=e(4),o=r.isUnitlessNumber;t.exports=n},{4:4}],112:[function(e,t){function n(e){return function(){return e}}function r(){}r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},t.exports=r},{}],113:[function(e,t){"use strict";var n={};t.exports=n},{}],114:[function(e,t){"use strict";function n(e){return o[e]}function r(e){return(""+e).replace(i,n)}var o={"&":"&",">":">","<":"<",'"':""","'":"'"},i=/[&><"']/g;t.exports=r},{}],115:[function(e,t){"use strict";function n(e){return null==e?null:a(e)?e:r.has(e)?o.getNodeFromInstance(e):(i(null==e.render||"function"!=typeof e.render),void i(!1))}{var r=(e(39),e(65)),o=e(68),i=e(133),a=e(135);e(150)}t.exports=n},{133:133,135:135,150:150,39:39,65:65,68:68}],116:[function(e,t){"use strict";function n(e,t,n){var r=e,o=!r.hasOwnProperty(n);o&&null!=t&&(r[n]=t)}function r(e){if(null==e)return e;var t={};return o(e,n,t),t}{var o=e(149);e(150)}t.exports=r},{149:149,150:150}],117:[function(e,t){"use strict";function n(e){try{e.focus()}catch(t){}}t.exports=n},{}],118:[function(e,t){"use strict";var n=function(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)};t.exports=n},{}],119:[function(e,t){function n(){try{return document.activeElement||document.body}catch(e){return document.body}}t.exports=n},{}],120:[function(e,t){"use strict";function n(e){var t,n=e.keyCode;return"charCode"in e?(t=e.charCode,0===t&&13===n&&(t=13)):t=n,t>=32||13===t?t:0}t.exports=n},{}],121:[function(e,t){"use strict";function n(e){if(e.key){var t=o[e.key]||e.key;if("Unidentified"!==t)return t}if("keypress"===e.type){var n=r(e);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===e.type||"keyup"===e.type?i[e.keyCode]||"Unidentified":""}var r=e(120),o={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},{120:120}],122:[function(e,t){"use strict";function n(e){var t=this,n=t.nativeEvent;if(n.getModifierState)return n.getModifierState(e);var r=o[e];return r?!!n[r]:!1}function r(){return n}var o={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};t.exports=r},{}],123:[function(e,t){"use strict";function n(e){var t=e.target||e.srcElement||window;return 3===t.nodeType?t.parentNode:t}t.exports=n},{}],124:[function(e,t){"use strict";function n(e){var t=e&&(r&&e[r]||e[o]);return"function"==typeof t?t:void 0}var r="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";t.exports=n},{}],125:[function(e,t){function n(e){return o(!!i),p.hasOwnProperty(e)||(e="*"),a.hasOwnProperty(e)||(i.innerHTML="*"===e?"<link />":"<"+e+"></"+e+">",a[e]=!i.firstChild),a[e]?p[e]:null}var r=e(21),o=e(133),i=r.canUseDOM?document.createElement("div"):null,a={circle:!0,defs:!0,ellipse:!0,g:!0,line:!0,linearGradient:!0,path:!0,polygon:!0,polyline:!0,radialGradient:!0,rect:!0,stop:!0,text:!0},u=[1,'<select multiple="true">',"</select>"],s=[1,"<table>","</table>"],l=[3,"<table><tbody><tr>","</tr></tbody></table>"],c=[1,"<svg>","</svg>"],p={"*":[1,"?<div>","</div>"],area:[1,"<map>","</map>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],legend:[1,"<fieldset>","</fieldset>"],param:[1,"<object>","</object>"],tr:[2,"<table><tbody>","</tbody></table>"],optgroup:u,option:u,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:l,th:l,circle:c,defs:c,ellipse:c,g:c,line:c,linearGradient:c,path:c,polygon:c,polyline:c,radialGradient:c,rect:c,stop:c,text:c};t.exports=n},{133:133,21:21}],126:[function(e,t){"use strict";function n(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function r(e){for(;e;){if(e.nextSibling)return e.nextSibling;e=e.parentNode}}function o(e,t){for(var o=n(e),i=0,a=0;o;){if(3===o.nodeType){if(a=i+o.textContent.length,t>=i&&a>=t)return{node:o,offset:t-i};i=a}o=n(r(o))}}t.exports=o},{}],127:[function(e,t){"use strict";function n(e){return e?e.nodeType===r?e.documentElement:e.firstChild:null}var r=9;t.exports=n},{}],128:[function(e,t){"use strict";function n(){return!o&&r.canUseDOM&&(o="textContent"in document.documentElement?"textContent":"innerText"),o}var r=e(21),o=null;t.exports=n},{21:21}],129:[function(e,t){"use strict";function n(e){return e===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:e.scrollLeft,y:e.scrollTop}}t.exports=n},{}],130:[function(e,t){function n(e){return e.replace(r,"-$1").toLowerCase()}var r=/([A-Z])/g;t.exports=n},{}],131:[function(e,t){"use strict";function n(e){return r(e).replace(o,"-ms-")}var r=e(130),o=/^ms-/;t.exports=n},{130:130}],132:[function(e,t){"use strict";function n(e){return"function"==typeof e&&"function"==typeof e.prototype.mountComponent&&"function"==typeof e.prototype.receiveComponent}function r(e,t){var r;if((null===e||e===!1)&&(e=i.emptyElement),"object"==typeof e){var o=e;r=t===o.type&&"string"==typeof o.type?a.createInternalComponent(o):n(o.type)?new o.type(o):new l}else"string"==typeof e||"number"==typeof e?r=a.createInstanceForText(e):s(!1);return r.construct(e),r._mountIndex=0,r._mountImage=null,r}var o=e(37),i=e(57),a=e(71),u=e(27),s=e(133),l=(e(150),function(){});u(l.prototype,o.Mixin,{_instantiateReactComponent:r}),t.exports=r},{133:133,150:150,27:27,37:37,57:57,71:71}],133:[function(e,t){"use strict";var n=function(e,t,n,r,o,i,a,u){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,o,i,a,u],c=0;s=new Error("Invariant Violation: "+t.replace(/%s/g,function(){return l[c++]}))}throw s.framesToPop=1,s}};t.exports=n},{}],134:[function(e,t){"use strict";function n(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var r,o=e(21);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0),t.exports=n},{21:21}],135:[function(e,t){function n(e){return!(!e||!("function"==typeof Node?e instanceof Node:"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName))}t.exports=n},{}],136:[function(e,t){"use strict";function n(e){return e&&("INPUT"===e.nodeName&&r[e.type]||"TEXTAREA"===e.nodeName)}var r={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};t.exports=n},{}],137:[function(e,t){function n(e){return r(e)&&3==e.nodeType}var r=e(135);t.exports=n},{135:135}],138:[function(e,t){"use strict";var n=e(133),r=function(e){var t,r={};n(e instanceof Object&&!Array.isArray(e));for(t in e)e.hasOwnProperty(t)&&(r[t]=t);return r};t.exports=r},{133:133}],139:[function(e,t){var n=function(e){var t;for(t in e)if(e.hasOwnProperty(t))return t;return null};t.exports=n},{}],140:[function(e,t){"use strict";function n(e,t,n){if(!e)return null;var o={};for(var i in e)r.call(e,i)&&(o[i]=t.call(n,e[i],i,e));return o}var r=Object.prototype.hasOwnProperty;t.exports=n},{}],141:[function(e,t){"use strict";function n(e){var t={};return function(n){return t.hasOwnProperty(n)||(t[n]=e.call(this,n)),t[n]}}t.exports=n},{}],142:[function(e,t){"use strict";function n(e){return o(r.isValidElement(e)),e}var r=e(55),o=e(133);t.exports=n},{133:133,55:55}],143:[function(e,t){"use strict";function n(e){return'"'+r(e)+'"'}var r=e(114);t.exports=n},{114:114}],144:[function(e,t){"use strict";var n=e(21),r=/^[ \r\n\t\f]/,o=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/,i=function(e,t){e.innerHTML=t};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(i=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),n.canUseDOM){var a=document.createElement("div");a.innerHTML=" ",""===a.innerHTML&&(i=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),r.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=""+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}t.exports=i},{21:21}],145:[function(e,t){"use strict";var n=e(21),r=e(114),o=e(144),i=function(e,t){e.textContent=t};n.canUseDOM&&("textContent"in document.documentElement||(i=function(e,t){o(e,r(t))})),t.exports=i},{114:114,144:144,21:21}],146:[function(e,t){"use strict";function n(e,t){if(e===t)return!0;var n;for(n in e)if(e.hasOwnProperty(n)&&(!t.hasOwnProperty(n)||e[n]!==t[n]))return!1;for(n in t)if(t.hasOwnProperty(n)&&!e.hasOwnProperty(n))return!1;return!0}t.exports=n},{}],147:[function(e,t){"use strict";function n(e,t){if(null!=e&&null!=t){var n=typeof e,r=typeof t;if("string"===n||"number"===n)return"string"===r||"number"===r;if("object"===r&&e.type===t.type&&e.key===t.key){var o=e._owner===t._owner;return o}}return!1}e(150);t.exports=n},{150:150}],148:[function(e,t){function n(e){var t=e.length;if(r(!Array.isArray(e)&&("object"==typeof e||"function"==typeof e)),r("number"==typeof t),r(0===t||t-1 in e),e.hasOwnProperty)try{return Array.prototype.slice.call(e)}catch(n){}for(var o=Array(t),i=0;t>i;i++)o[i]=e[i];return o}var r=e(133);t.exports=n},{133:133}],149:[function(e,t){"use strict";function n(e){return m[e]}function r(e,t){return e&&null!=e.key?i(e.key):t.toString(36)}function o(e){return(""+e).replace(v,n)}function i(e){return"$"+o(e)}function a(e,t,n,o,u){var c=typeof e;if(("undefined"===c||"boolean"===c)&&(e=null),null===e||"string"===c||"number"===c||s.isValidElement(e))return o(u,e,""===t?f+r(e,0):t,n),1;var m,v,g,y=0;if(Array.isArray(e))for(var C=0;C<e.length;C++)m=e[C],v=(""!==t?t+h:f)+r(m,C),g=n+y,y+=a(m,v,g,o,u);else{var E=p(e);if(E){var b,_=E.call(e);if(E!==e.entries)for(var x=0;!(b=_.next()).done;)m=b.value,v=(""!==t?t+h:f)+r(m,x++),g=n+y,y+=a(m,v,g,o,u);else for(;!(b=_.next()).done;){var D=b.value;D&&(m=D[1],v=(""!==t?t+h:f)+i(D[0])+h+r(m,0),g=n+y,y+=a(m,v,g,o,u))}}else if("object"===c){d(1!==e.nodeType);var M=l.extract(e);for(var N in M)M.hasOwnProperty(N)&&(m=M[N],v=(""!==t?t+h:f)+i(N)+h+r(m,0),g=n+y,y+=a(m,v,g,o,u))}}return y}function u(e,t,n){return null==e?0:a(e,"",0,t,n)}var s=e(55),l=e(61),c=e(64),p=e(124),d=e(133),f=(e(150),c.SEPARATOR),h=":",m={"=":"=0",".":"=1",":":"=2"},v=/[=.:]/g;t.exports=u},{124:124,133:133,150:150,55:55,61:61,64:64}],150:[function(e,t){"use strict";var n=e(112),r=n;t.exports=r},{112:112}]},{},[1])(1)}); \ No newline at end of file diff --git a/assets/js/sig/dvf/copyright.js b/assets/js/sig/dvf/copyright.js new file mode 100755 index 0000000000000000000000000000000000000000..b182b5fbd777c3ce12e9960828c4ef1ef3d543eb --- /dev/null +++ b/assets/js/sig/dvf/copyright.js @@ -0,0 +1,4 @@ +/* + @preserve Leaflet Data Visualization Framework, a JavaScript library for creating thematic maps using Leaflet + (c) 2013-2014, Scott Fairgrieve, HumanGeo +*/ \ No newline at end of file diff --git a/assets/js/sig/dvf/leaflet.dvf.chartmarkers.js b/assets/js/sig/dvf/leaflet.dvf.chartmarkers.js new file mode 100755 index 0000000000000000000000000000000000000000..f74587d22c9aa9857dbbb180528abb2ea43e89aa --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.chartmarkers.js @@ -0,0 +1,929 @@ +/* + * Class for a drawing a bar marker on the map. This is the basis for the BarChartMarker + */ +L.BarMarker = L.Path.extend({ + initialize: function (centerLatLng, options) { + L.Path.prototype.initialize.call(this, options); + + this._latlng = centerLatLng; + }, + + options: { + fill: true, + width: 2, + maxHeight: 10, + position: { + x: 0, + y: 0 + }, + weight: 1, + color: '#000', + opacity: 1.0, + gradient: true, + dropShadow: false, + lineCap: 'square', + lineJoin: 'miter' + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + }, + + getBounds: function () { + var map = this._map, + point = map.project(this._latlng), + halfWidth = this.options.width/2, + swPoint = new L.Point(point.x - halfWidth, point.y), + nePoint = new L.Point(point.x + halfWidth, point.y - this.options.maxHeight), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + this._path.setAttribute('shape-rendering', 'crispEdges'); + return new L.SVGPathBuilder(this._points).build(); + }, + + _getPoints: function () { + + var points = []; + var startX = this._point.x + this.options.position.x; + var startY = this._point.y + this.options.position.y; + var halfWidth = this.options.width / 2; + var sePoint, nePoint, nwPoint, swPoint; + var height = this.options.value / this.options.maxValue * this.options.maxHeight; + + sePoint = new L.Point(startX + halfWidth, startY); + nePoint = new L.Point(startX + halfWidth, startY - height); + nwPoint = new L.Point(startX - halfWidth, startY - height); + swPoint = new L.Point(startX - halfWidth, startY); + + points = [sePoint, nePoint, nwPoint, swPoint]; + + return points; + } + +}); + +L.barMarker = function (centerLatLng, options) { + return new L.BarMarker(centerLatLng, options); +}; + +/* + * Base class for all chart markers. This class should be extended by any chart marker class (e.g. BarChartMarker, PieChartMarker, etc.) + */ +L.ChartMarker = L.FeatureGroup.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + this._layers = {}; + this._latlng = centerLatLng; + + this._loadComponents(); + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + getLatLng: function () { + return this._latlng; + }, + + _loadComponents: function () { + // TODO: Override this in subclasses + }, + + _highlight: function (options) { + if (options.weight) { + options.weight *= 2; + } + + return options; + }, + + _unhighlight: function (options) { + if (options.weight) { + options.weight /= 2; + } + + return options; + }, + + _bindMouseEvents: function (chartElement) { + var self = this; + var tooltipOptions = this.options.tooltipOptions; + + chartElement.on('mouseover', function (e) { + var currentOptions = this.options; + var key = currentOptions.key; + var value = currentOptions.value; + var layerPoint = e.layerPoint; + var x = layerPoint.x - this._point.x; + var y = layerPoint.y - this._point.y; + var iconSize = currentOptions.iconSize; + var newX = x; + var newY = y; + var newPoint; + var offset = 5; + + newX = x < 0 ? iconSize.x - x + offset: -x - offset; + newY = y < 0 ? iconSize.y - y + offset: -y - offset; + + newPoint = new L.Point(newX, newY); + + var legendOptions = {}; + var displayText = currentOptions.displayText ? currentOptions.displayText(value) : value; + + legendOptions[key] = { + name: currentOptions.displayName, + value: displayText + }; + + var icon = new L.LegendIcon(legendOptions, currentOptions, { + className: 'leaflet-div-icon', + iconSize: tooltipOptions ? tooltipOptions.iconSize : iconSize, + iconAnchor: newPoint + }); + + currentOptions.marker = new L.Marker(self._latlng, { + icon: icon + }); + + currentOptions = self._highlight(currentOptions); + + this.initialize(self._latlng, currentOptions); + this.redraw(); + this.setStyle(currentOptions); + + self.addLayer(currentOptions.marker); + }); + + chartElement.on('mouseout', function (e) { + var currentOptions = this.options; + + currentOptions = self._unhighlight(currentOptions); + + this.initialize(self._latlng, currentOptions); + this.redraw(); + this.setStyle(currentOptions); + + self.removeLayer(currentOptions.marker); + }); + }, + + bindPopup: function (content, options) { + this.eachLayer(function (layer) { + layer.bindPopup(content, options); + }); + }, + + openPopup: function (latlng) { + for (var i in this._layers) { + var layer = this._layers[i]; + latlng = latlng || this._latlng; + layer.openPopup(latlng); + break; + } + }, + + closePopup: function () { + for (var i in this._layers) { + var layer = this._layers[i]; + latlng = latlng || this._latlng; + layer.closePopup(); + break; + } + }, + + redraw: function () { + this.clearLayers(); + this._loadComponents(); + }, + + toGeoJSON: function () { + return L.Util.pointToGeoJSON.call(this); + } +}); + +/* + * + */ +L.BarChartMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: '#000', + fill: true, + position: { + x: 0, + y: 0 + }, + width: 10, + offset: 0, + iconSize: new L.Point(150, 140) + }, + + _loadComponents: function () { + var value, minValue, maxValue; + var bar; + var options = this.options; + var x; + var y; + var keys = Object.keys(this.options.data); + var count = keys.length; + var width = this.options.width; + var offset = this.options.offset || 0; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + + x = -((width * count) + (offset * (count - 1))) / 2 + width / 2; + y = 0; + + // Iterate through the data values + for (var key in data) { + value = data[key]; + chartOption = chartOptions[key]; + + minValue = chartOption.minValue || 0; + maxValue = chartOption.maxValue || 100; + + options.fillColor = chartOption.fillColor || this.options.fillColor; + options.value = value; + options.minValue = minValue; + options.maxValue = maxValue; + options.position = { + x: x, + y: y + }; + options.width = width; + options.maxHeight = chartOption.maxHeight || 10; + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.opacity = this.options.opacity || 1.0; + options.fillOpacity = this.options.fillOpacity || 0.7; + options.weight = this.options.weight || 1; + options.color = chartOption.color || this.options.color; + options.displayText = chartOption.displayText; + + bar = new L.BarMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + this.addLayer(bar); + + x += width + offset; + } + } +}); + +/* + * Draws a radial bar on the map. Used by the RadialBarChartMarker, PieChartMarker, and CoxcombChartMarker + * to draw pie slices/radial bars + */ +L.RadialBarMarker = L.Path.extend({ + initialize: function (centerLatLng, options) { + L.Path.prototype.initialize.call(this, options); + + this._latlng = centerLatLng; + }, + + options: { + fill: true, + radius: 10, + rotation: 0, + numberOfSides: 30, + position: { + x: 0, + y: 0 + }, + gradient: true, + dropShadow: false + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + }, + + getBounds: function () { + var map = this._map, + radiusX = this.options.radiusX || this.options.radius, + radiusY = this.options.radiusY || this.options.radius, + deltaX = radiusX * Math.cos(Math.PI / 4), + deltaY = radiusY * Math.sin(Math.PI / 4), + point = map.project(this._latlng), + swPoint = new L.Point(point.x - deltaX, point.y + deltaY), + nePoint = new L.Point(point.x + deltaX, point.y - deltaY), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + + var angle = this.options.endAngle - this.options.startAngle; + var largeArc = angle >= 180 ? '1' : '0'; + var radiusX = this.options.radiusX || this.options.radius; + var radiusY = this.options.radiusY || this.options.radius; + var path = 'M' + this._points[0].x.toFixed(2) + ',' + this._points[0].y.toFixed(2) + 'A' + radiusX.toFixed(2) + ',' + radiusY.toFixed(2) + ' 0 ' + largeArc + ',1 ' + this._points[1].x.toFixed(2) + ',' + this._points[1].y.toFixed(2) + 'L'; + + if (this._innerPoints) { + path = path + this._innerPoints[0].x.toFixed(2) + ',' + this._innerPoints[0].y.toFixed(2); + path = path + 'A' + (radiusX - this.options.barThickness).toFixed(2) + ',' + (radiusY - this.options.barThickness).toFixed(2) + ' 0 ' + largeArc + ',0 ' + this._innerPoints[1].x.toFixed(2) + ',' + this._innerPoints[1].y.toFixed(2) + 'z';; + } + else { + path = path + this._point.x.toFixed(2) + ',' + this._point.y.toFixed(2) + 'z'; + } + + if (L.Browser.vml) { + path = Core.SVG.path(path); + } + + this._path.setAttribute('shape-rendering', 'geometricPrecision'); + + return path; + + }, + + _getPoints: function () { + + var angleDelta = this.options.endAngle - this.options.startAngle; + var degrees = this.options.endAngle + this.options.rotation; + var angle = this.options.startAngle + this.options.rotation; + var points = []; + var radiusX = 'radiusX' in this.options ? this.options.radiusX : this.options.radius; + var radiusY = 'radiusY' in this.options ? this.options.radiusY : this.options.radius; + var toRad = function (number) { + return number * L.LatLng.DEG_TO_RAD; + }; + + if (angleDelta === 360.0) { + degrees = degrees - 0.1; + } + + var startRadians = toRad(angle); + var endRadians = toRad(degrees); + + points.push(this._getPoint(startRadians, radiusX, radiusY)); + points.push(this._getPoint(endRadians, radiusX, radiusY)); + + if (this.options.barThickness) { + this._innerPoints = []; + this._innerPoints.push(this._getPoint(endRadians, radiusX - this.options.barThickness, radiusY - this.options.barThickness)); + this._innerPoints.push(this._getPoint(startRadians, radiusX - this.options.barThickness, radiusY - this.options.barThickness)); + } + + return points; + }, + + _getPoint: function (angle, radiusX, radiusY) { + return new L.Point(this._point.x + this.options.position.x + radiusX * Math.cos(angle), this._point.y + this.options.position.y + radiusY * Math.sin(angle)); + } +}); + +L.radialBarMarker = function (centerLatLng, options) { + return new L.RadialBarMarker(centerLatLng, options); +}; + +/* + * Class for drawing a pie chart marker on the map + */ +L.PieChartMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: '#000', + fill: true, + radius: 10, + rotation: 0, + numberOfSides: 50, + mouseOverExaggeration: 1.2, + maxDegrees: 360.0, + iconSize: new L.Point(150, 140) + }, + + _highlight: function (options) { + var oldRadiusX = options.radiusX; + var oldRadiusY = options.radiusY; + var oldBarThickness = options.barThickness; + options.oldBarThickness = oldBarThickness; + options.oldRadiusX = oldRadiusX; + options.oldRadiusY = oldRadiusY; + options.radiusX *= options.mouseOverExaggeration; + options.radiusY *= options.mouseOverExaggeration; + options.barThickness = options.radiusX - oldRadiusX + oldBarThickness; + return options; + }, + + _unhighlight: function (options) { + options.radiusX = options.oldRadiusX; + options.radiusY = options.oldRadiusY; + options.barThickness = options.oldBarThickness; + return options; + }, + + _loadComponents: function () { + var value; + var sum = 0; + var angle = 0; + var percentage = 0.0; + var maxDegrees = this.options.maxDegrees || 360.0; + var lastAngle = this.options.rotation; + var bar; + var options = this.options; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + var key; + + var getValue = function (data, key) { + var value = 0.0; + if (data[key]) { + value = parseFloat(data[key]); + } + return value; + }; + + // Calculate the sum of the data values + for (key in data) { + value = getValue(data, key); + sum += value; + } + + // Iterate through the data values + if (sum > 0) { + for (key in data) { + value = parseFloat(data[key]); + chartOption = chartOptions[key]; + percentage = value / sum; + + angle = percentage * maxDegrees; + + options.startAngle = lastAngle; + options.endAngle = lastAngle + angle; + options.fillColor = chartOption.fillColor; + options.color = chartOption.color || '#000'; + options.radiusX = this.options.radiusX || this.options.radius; + options.radiusY = this.options.radiusY || this.options.radius; + options.rotation = 0; + + // Set the key and value for use later + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + + bar = new L.RadialBarMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + lastAngle = options.endAngle; + + this.addLayer(bar); + } + } + } +}); + +L.pieChartMarker = function (centerLatLng, options) { + return new L.PieChartMarker(centerLatLng, options); +}; + +/* + * + */ +L.CoxcombChartMarker = L.PieChartMarker.extend({ + statics: { + SIZE_MODE_RADIUS: 'radius', + SIZE_MODE_AREA: 'area' + } +}); + +L.CoxcombChartMarker = L.CoxcombChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.PieChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: '#000', + fill: true, + radius: 10, + rotation: 0, + numberOfSides: 50, + mouseOverExaggeration: 1.2, + maxDegrees: 360.0, + iconSize: new L.Point(150, 140), + sizeMode: L.CoxcombChartMarker.SIZE_MODE_AREA + }, + + _loadComponents: function () { + var value, minValue, maxValue; + var angle = 0; + var maxDegrees = this.options.maxDegrees || 360.0; + var lastAngle = this.options.rotation; + var bar; + var options = this.options; + var radiusX = 'radiusX' in this.options ? this.options.radiusX : this.options.radius; + var radiusY = 'radiusY' in this.options ? this.options.radiusY : this.options.radius; + var keys = Object.keys(this.options.data); + var count = keys.length; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + + angle = maxDegrees / count; + + // Iterate through the data values + for (var key in data) { + value = parseFloat(data[key]); + chartOption = chartOptions[key]; + + var minValue = chartOption.minValue || 0; + var maxValue = chartOption.maxValue; + + // If the size mode is radius, then we'll just vary the radius proportionally to the value + if (this.options.sizeMode === L.CoxcombChartMarker.SIZE_MODE_RADIUS) { + var evalFunctionX = new L.LinearFunction(new L.Point(minValue, 0), new L.Point(maxValue, radiusX)); + var evalFunctionY = new L.LinearFunction(new L.Point(minValue, 0), new L.Point(maxValue, radiusY)); + options.radiusX = evalFunctionX.evaluate(value); + options.radiusY = evalFunctionY.evaluate(value); + } + else { + // Otherwise, we'll vary the area proportionally to the value and calculate the radius from the area value + var radius = Math.max(radiusX, radiusY); + var maxArea = (Math.PI * Math.pow(radius, 2)) / count; + + var evalFunctionArea = new L.LinearFunction(new L.Point(minValue, 0), new L.Point(maxValue, maxArea), { + postProcess: function (value) { + return Math.sqrt(count * value / Math.PI); + } + }); + + options.radiusX = evalFunctionArea.evaluate(value); + options.radiusY = options.radiusX; + } + + options.startAngle = lastAngle; + options.endAngle = lastAngle + angle; + options.fillColor = chartOption.fillColor; + options.color = chartOption.color || '#000'; + options.rotation = 0; + + // Set the key and value for use later + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + + bar = new L.RadialBarMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + lastAngle = options.endAngle; + + this.addLayer(bar); + } + } +}); + +L.coxcombChartMarker = function (centerLatLng, options) { + return new L.CoxcombChartMarker(centerLatLng, options); +}; + +/* + * + */ +L.RadialBarChartMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: '#000', + fill: true, + radius: 10, + rotation: 0, + numberOfSides: 30, + offset: 2, + barThickness: 5, + maxDegrees: 360.0, + iconSize: new L.Point(150, 140) + }, + + _loadComponents: function() { + var value, minValue, maxValue; + var angle = this.options.rotation; + var maxDegrees = this.options.maxDegrees || 360.0; + var bar; + var options = this.options; + var lastRadiusX = this.options.radiusX || this.options.radius; + var lastRadiusY = this.options.radiusY || this.options.radius; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + var barThickness = this.options.barThickness || 4; + var offset = this.options.offset || 2; + + // Iterate through the data values + for (var key in data) { + value = parseFloat(data[key]); + chartOption = chartOptions[key]; + + minValue = chartOption.minValue || 0; + maxValue = chartOption.maxValue || 100; + + var angleFunction = new L.LinearFunction(new L.Point(minValue, 0), new L.Point(maxValue, maxDegrees)); + + angle = angleFunction.evaluate(value); + + options.startAngle = this.options.rotation; + options.endAngle = this.options.rotation + angle; + options.fillColor = chartOption.fillColor; + options.radiusX = lastRadiusX; + options.radiusY = lastRadiusY; + options.barThickness = barThickness; + options.rotation = 0; + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + options.weight = this.options.weight || 1; + + bar = new L.RadialBarMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + this.addLayer(bar); + + lastRadiusX += barThickness + offset; + lastRadiusY += barThickness + offset; + + } + } +}); + +L.radialBarChartMarker = function (centerLatLng, options) { + return new L.RadialBarChartMarker(centerLatLng, options); +}; + +L.StackedRegularPolygonMarker = L.ChartMarker.extend({ + options: { + iconSize: new L.Point(150, 140) + }, + + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + _loadComponents: function () { + var value; + var lastRadiusX = 0; + var lastRadiusY = 0; + var bar; + var options = this.options; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + var key; + + // Iterate through the data values + var bars = []; + + for (key in data) { + value = parseFloat(data[key]); + chartOption = chartOptions[key]; + + minValue = chartOption.minValue || 0; + maxValue = chartOption.maxValue || 100; + + // TODO: Add support for x and y radii + minRadius = chartOption.minRadius || 0; + maxRadius = chartOption.maxRadius || 10; + + options.fillColor = chartOption.fillColor || this.options.fillColor; + options.value = value; + options.minValue = minValue; + options.maxValue = maxValue; + + var evalFunction = new L.LinearFunction(new L.Point(minValue, minRadius), new L.Point(maxValue, maxRadius)); + + var barThickness = evalFunction.evaluate(value); + + options.radiusX = lastRadiusX + barThickness; + options.radiusY = lastRadiusY + barThickness; + options.innerRadiusX = lastRadiusX; + options.innerRadiusY = lastRadiusY; + + options.key = key; + options.displayName = chartOption.displayName; + options.opacity = this.options.opacity || 1.0; + options.fillOpacity = this.options.fillOpacity || 0.7; + options.weight = this.options.weight || 1; + options.color = chartOption.color || this.options.color; + options.displayText = chartOption.displayText; + + bar = new L.RegularPolygonMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + lastRadiusX = options.radiusX; + lastRadiusY = options.radiusY; + + if (this.options.drawReverse) { + bars.push(bar); + } + else { + this.addLayer(bar); + } + } + + if (this.options.drawReverse) { + var item = bars.pop(); + + while (item) { + this.addLayer(item); + item = bars.pop(); + } + } + + } +}); + +/* + * + */ +L.RadialMeterMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: '#000', + fill: true, + radius: 10, + rotation: 180.0, + numberOfSides: 30, + offset: 2, + barThickness: 5, + maxDegrees: 180.0, + iconSize: new L.Point(150, 140), + backgroundStyle: { + fill: true, + fillColor: '#707070', + fillOpacity: 0.2, + opacity: 0.8, + color: '#505050' + } + }, + + _loadComponents: function() { + var value, minValue, maxValue; + var startAngle = this.options.rotation; + var maxDegrees = this.options.maxDegrees || 360.0; + var bar; + var options = this.options; + var radiusX = this.options.radiusX || this.options.radius; + var radiusY = this.options.radiusY || this.options.radius; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + var barThickness = this.options.barThickness || 4; + var lastAngle = startAngle; + var numSegments = this.options.numSegments || 10; + var angleDelta = maxDegrees / numSegments; + var displayOptions; + + // Iterate through the data values + for (var key in data) { + value = parseFloat(data[key]); + chartOption = chartOptions[key]; + displayOptions = this.options.displayOptions ? this.options.displayOptions[key] : {}; + + minValue = chartOption.minValue || 0; + maxValue = chartOption.maxValue || 100; + + var range = maxValue - minValue; + + var angle = (maxDegrees / range) * (value - minValue); + + var endAngle = startAngle + angle; + var maxAngle = startAngle + maxDegrees; + + var evalFunction = new L.LinearFunction(new L.Point(startAngle, minValue), new L.Point(maxAngle, maxValue)); + + while (lastAngle < endAngle) { + options.startAngle = lastAngle; + + var delta = Math.min(angleDelta, endAngle - lastAngle); + + options.endAngle = lastAngle + delta; + options.fillColor = chartOption.fillColor; + options.radiusX = radiusX; + options.radiusY = radiusY; + options.barThickness = barThickness; + options.rotation = 0; + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + + var evalValue = evalFunction.evaluate(lastAngle + delta); + + for (var displayKey in displayOptions) { + options[displayKey] = displayOptions[displayKey].evaluate ? displayOptions[displayKey].evaluate(evalValue) : displayOptions[displayKey]; + } + + bar = new L.RadialBarMarker(this._latlng, options); + + this._bindMouseEvents(bar); + + this.addLayer(bar); + + lastAngle += delta; + } + + // Add a background + if (this.options.backgroundStyle) { + if (lastAngle < maxAngle) { + var delta = maxAngle - lastAngle; + + options.endAngle = lastAngle + delta; + options.radiusX = radiusX; + options.radiusY = radiusY; + options.barThickness = barThickness; + options.rotation = 0; + options.key = key; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + + options.fillColor = null; + options.fill = false; + options.gradient = false; + + for (var property in this.options.backgroundStyle) { + options[property] = this.options.backgroundStyle[property]; + } + + var evalValue = evalFunction.evaluate(lastAngle + delta); + + bar = new L.RadialBarMarker(this._latlng, options); + + this.addLayer(bar); + } + } + } + } +}); \ No newline at end of file diff --git a/assets/js/sig/dvf/leaflet.dvf.controls.js b/assets/js/sig/dvf/leaflet.dvf.controls.js new file mode 100755 index 0000000000000000000000000000000000000000..bb89bcd9e057daa563477086aa27b52065cdfd57 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.controls.js @@ -0,0 +1,96 @@ +L.Control.Legend = L.Control.extend({ + options: { + position: 'bottomright', + autoAdd: true + }, + + onAdd: function (map) { + var className = 'leaflet-control-legend', + container = L.DomUtil.create('div', className); + + var self = this; + + if (this.options.autoAdd) { + map.on('layeradd', function (e) { + var layer = e.layer; + + self.addLayer(layer); + }); + + map.on('layerremove', function (e) { + var layer = e.layer; + + self.removeLayer(layer); + }); + } + + this.toggleSize = L.bind(this.toggleSize, this); + + L.DomEvent + .addListener(container, 'mouseover', this.toggleSize) + .addListener(container, 'mouseout', this.toggleSize) + .addListener(container, 'touchstart', this.toggleSize) + .addListener(container, 'touchend', this.toggleSize) + .addListener(container, 'click', L.DomEvent.stopPropagation) + .addListener(container, 'click', L.DomEvent.preventDefault); + + return container; + }, + + clear: function () { + this._container.innerHTML = ''; + }, + + toggleSize: function () { + if (L.DomUtil.hasClass(this._container, 'larger')) { + L.DomUtil.removeClass(this._container, 'larger'); + } + else { + L.DomUtil.addClass(this._container, 'larger'); + } + }, + + redrawLayer: function (layer) { + this.removeLayer(layer); + this.addLayer(layer); + }, + + addLayer: function (layer) { + var id = L.Util.stamp(layer); + var me = this; + + if (layer.getLegend) { + this.addLegend(id, layer.getLegend()); + + layer.on('legendChanged', function () { + me.redrawLayer(layer); + }); + } + }, + + removeLayer: function (layer) { + var id = L.Util.stamp(layer); + + if (layer.getLegend) { + var element = document.getElementById(id); + element.parentNode.removeChild(element); + + layer.off('legendChanged'); + } + }, + + addLegend: function (id, html) { + var container = this._container, + legend = document.getElementById(id); + + if (!legend) { + legend = L.DomUtil.create('div', '', container); + legend.id = id; + } + legend.innerHTML = html; + } +}); + +L.control.legend = function (options) { + return new L.Control.Legend(options); +}; diff --git a/assets/js/sig/dvf/leaflet.dvf.datalayer.js b/assets/js/sig/dvf/leaflet.dvf.datalayer.js new file mode 100755 index 0000000000000000000000000000000000000000..5aa917cfc60539d1764bb25fea994bf56f96c864 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.datalayer.js @@ -0,0 +1,1707 @@ +/* + * Various modes in which location information can be encoded + */ +L.LocationModes = { + + /* + * Each record contains latitude and longitude fields + */ + LATLNG: function (record, index) { + var getLocation = function (latitudeField, longitudeField) { + var latitude = L.Util.getFieldValue(record, latitudeField); + var longitude = L.Util.getFieldValue(record, longitudeField); + var location = null; + + if (latitude && longitude) { + var latlng = new L.LatLng(latitude, longitude); + location = { + location: latlng, + text: [latlng.lat.toFixed(3),latlng.lng.toFixed(3)].join(', '), + center: latlng + }; + } + + return location; + }; + + var location = getLocation(this.options.latitudeField, this.options.longitudeField); + + if (!location && this.options.fallbackLocationFields) { + var index = 0; + var fallbackLocationFields; + while (!location && index < this.options.fallbackLocationFields.length) { + fallbackLocationFields = this.options.fallbackLocationFields[index]; + location = getLocation(fallbackLocationFields.latitudeField, fallbackLocationFields.longitudeField); + index++; + } + } + + return location; + }, + + /* + * Each record contains a field with a geohash value + */ + GEOHASH: function (record, index) { + var geohash = this.options.geohashField ? L.Util.getFieldValue(record, this.options.geohashField) : index; + var locationInfo = decodeGeoHash(geohash); + var bounds; + + if (locationInfo.latitude[2] && locationInfo.longitude[2]) { + bounds = new L.LatLngBounds(new L.LatLng(locationInfo.latitude[0], locationInfo.longitude[0]), new L.LatLng(locationInfo.latitude[1], locationInfo.longitude[1])); + } + + return { + location: bounds, + text: geohash, + center: bounds.getCenter() + }; + }, + + GWCOUNTRY: function (record, index) { + var code = this.options.codeField ? L.Util.getFieldValue(record, this.options.codeField) : index; + var geoJSON; + var centroid; + var gwNoLookup = L.gwNoLookup || {}; + var countries = L.countries || {}; + var countryCentroids = L.countryCentroids || {}; + var originalCode = code.toUpperCase(); + + code = originalCode; + + // Is this a G & W number? + var gwNo = originalCode in gwNoLookup; + + // If it's a G & W number, then find the associated country, otherwise + // check if it's an ISO 2 or 3 digit code and get the associated 3 digit identifier + // to lookup the polygon associated with the country + if (gwNo) { + code = gwNoLookup[originalCode] || code; + } + + // TODO: Move the below code into a common function, since it's duplicated elsewhere + // If there's a code available, then try to get the associated polygon + if (code) { + geoJSON = countries[code]; + centroid = countryCentroids[code]; + } + else { + console.log('Code not found: ' + originalCode); + } + + // Create a new GeoJSON layer from the polygon definition + var geoJSONLayer = new L.GeoJSON(geoJSON); + + return { + location: geoJSONLayer, + text: L.GeometryUtils.getName(geoJSON) || code, + center: centroid + }; + + }, + + /* + * Each record contains a reference to a country - Lookup by a number of different country code designations + */ + COUNTRY: function (record, index) { + var code = this.options.codeField ? L.Util.getFieldValue(record, this.options.codeField) : index; + var geoJSON; + var centroid; + var codeLookup = L.codeLookup || {}; + var alpha2Lookup = L.alpha2Lookup || {}; + var fips2Lookup = L.fips2Lookup || {}; + var countries = L.countries || {}; + var countryCentroids = L.countryCentroids || {}; + var originalCode = code.toUpperCase(); + + code = originalCode; + + if (code.length === 2) { + code = alpha2Lookup[originalCode] || fips2Lookup[originalCode]; + } + else if (code.length === 3) { + code = codeLookup[originalCode] || code; + } + + // If there's a code available, then try to get the associated polygon + if (code) { + geoJSON = countries[code]; + centroid = countryCentroids[code]; + } + else { + console.log('Code not found: ' + originalCode); + } + + // Create a new GeoJSON layer from the polygon definition + var geoJSONLayer = new L.GeoJSON(geoJSON); + + return { + location: geoJSONLayer, + text: L.GeometryUtils.getName(geoJSON) || code, + center: centroid + }; + + }, + + /* + * Each record contains a reference to a US State - Lookup by 2 digit state code + */ + STATE: function (record, index) { + var code = this.options.codeField ? L.Util.getFieldValue(record, this.options.codeField) : index; + var geoJSON; + var centroid; + var states = L.states || {}; + var stateCentroids = L.stateCentroids || {}; + var originalCode = code.toUpperCase(); + + code = originalCode; + + geoJSON = states[code]; + centroid = stateCentroids[code]; + + var geoJSONLayer = new L.GeoJSON(geoJSON); + + return { + location: geoJSONLayer, + text: L.GeometryUtils.getName(geoJSON) || code, + center: centroid + }; + }, + + /* + * Each record contains a field with a GeoJSON geometry + */ + GEOJSON: function (record, index) { + var locationField = this.options.geoJSONField; + + var geoJSON = locationField ? L.Util.getFieldValue(record, locationField) : record; + var location = null; + + if (geoJSON) { + var me = this; + var recordToLayer = function (location, record) { + return me.recordToLayer(location, record); + }; + + location = L.GeometryUtils.getGeoJSONLocation(geoJSON, record, this.options.locationTextField, recordToLayer); + } + + return location; + }, + + /* + * Each record contains a field with a custom code - Use a custom lookup to find an associated GeoJSON geometry + */ + LOOKUP: function (record, index) { + var code = this.options.codeField ? L.Util.getFieldValue(record, this.options.codeField) : index; + + this._lookupIndex = this._lookupIndex || L.GeometryUtils.indexFeatureCollection(this.options.locationLookup, this.options.locationIndexField || this.options.codeField); + + var geoJSON = this._lookupIndex[code]; + var location = null; + + if (!geoJSON && code.indexOf('0') === 0) { + geoJSON = this._lookupIndex[code.substring(1)]; + } + + if (geoJSON) { + var me = this; + var recordToLayer = function (location, record) { + return me.recordToLayer(location, record); + }; + + location = L.GeometryUtils.getGeoJSONLocation(geoJSON, record, this.options.locationTextField, recordToLayer); + } + + return location; + }, + + /* + * In this case, an optional getLocation method is provided and called in order to determine + * the location associated with a record + */ + CUSTOM: function (record, index) { + var locationField = this.options.codeField; + var fieldValue = L.Util.getFieldValue(record, locationField); + var context = {}; + var location; + + context[fieldValue] = record; + + if (this.options.getLocation) { + + var self = this; + var callback = function (key, location) { + self.locationToLayer(location, context[key]); + }; + + location = this.options.getLocation(context, locationField, [fieldValue], callback); + } + + return location; + } +}; + +/* + * A generic layer class for parsing any JSON based data structure and plotting locations on a map. This is somewhat + * analogous to the L.GeoJSON class, but has been generalized to support JSON structures beyond GeoJSON + */ +L.DataLayer = L.LayerGroup.extend({ + includes: L.Mixin.Events, + + options: { + recordsField: 'features', + locationMode: L.LocationModes.LATLNG, + latitudeField: 'geometry.coordinates.1', + longitudeField: 'geometry.coordinates.0', + displayField: null, + displayOptions: null, + layerOptions: { + numberOfSides: 4, + radius: 10, + weight: 1, + color: '#000' + }, + showLegendTooltips: true, + tooltipOptions: { + iconSize: new L.Point(60, 50), + iconAnchor: new L.Point(-5, 50), + mouseOverExaggeration: 2 + }, + setHighlight: function (layerStyle) { + layerStyle.weight = layerStyle.weight || 1; + layerStyle.fillOpacity = layerStyle.fillOpacity || 0.5; + layerStyle.weight *= 2; + layerStyle.fillOpacity /= 1.5; + + return layerStyle; + }, + unsetHighlight: function (layerStyle) { + layerStyle.weight = layerStyle.weight || 1; + layerStyle.fillOpacity = layerStyle.fillOpacity || 0.25; + layerStyle.weight /= 2; + layerStyle.fillOpacity *= 1.5; + + return layerStyle; + } + }, + + initialize: function (data, options) { + L.Util.setOptions(this, options); + + L.LayerGroup.prototype.initialize.call(this, options); + + data = data || {}; + + this._includeFunction = this.options.filter || this.options.includeLayer; + this._markerFunction = this.options.getMarker || this._getMarker; + + this._addChildLayers(); + + this.addData(data); + }, + + _addChildLayers: function () { + this._boundaryLayer = new L.LayerGroup(); + this.addLayer(this._boundaryLayer); + + this._trackLayer = new L.LayerGroup(); + this.addLayer(this._trackLayer); + }, + + _zoomFunction: function (e) { + var map = this._map; + var self = this; + var zoom = map.getZoom(); + + if (this.options.maxZoom && zoom > this.options.maxZoom) { + this.hiddenLayers = []; + + this.eachLayer(function (layer) { + self.hiddenLayers.push(layer); + + map.removeLayer(layer); + }); + } + else if (this.hiddenLayers) { + while (this.hiddenLayers.length > 0) { + var layer = this.hiddenLayers.pop(); + + map.addLayer(layer); + + if (this.options.backgroundLayer && layer.bringToBack) { + layer.bringToBack(); + } + } + + this.hiddenLayers = null; + } + }, + + onAdd: function (map) { + L.LayerGroup.prototype.onAdd.call(this, map); + + map.on('zoomend', this._zoomFunction, this); + }, + + onRemove: function (map) { + L.LayerGroup.prototype.onRemove.call(this, map); + + map.off('zoomend', this._zoomFunction, this); + }, + + bringToBack: function () { + this.invoke('bringToBack'); + + if (this._trackLayer) { + this._trackLayer.invoke('bringToBack'); + } + + if (this._boundaryLayer) { + this._boundaryLayer.invoke('bringToBack'); + } + }, + + bringToFront: function () { + if (this._boundaryLayer) { + this._boundaryLayer.invoke('bringToFront'); + } + + if (this._trackLayer) { + this._trackLayer.invoke('bringToFront'); + } + + this.invoke('bringToFront'); + }, + + getBounds: function () { + var bounds; + + this.eachLayer(function (layer) { + if (layer.getBounds) { + if (!bounds) { + bounds = layer.getBounds(); + } + else { + bounds.extend(layer.getBounds()); + } + } + }); + + return bounds; + }, + + _getLocation: function (record, index) { + return this.options.locationMode.call(this, record, index); + }, + + _processLocation: function (location) { + var processedLocation = location.center; + + return processedLocation; + }, + + _styleBoundary: function (layer, options, record) { + if (layer.setStyle) { + var style; + + if (this.options.boundaryStyle instanceof Function) { + style = this.options.boundaryStyle.call(this, record, layer); + } + + style = style || this.options.boundaryStyle || L.extend({}, options, { + fillOpacity: 0.2, + clickable: false + }); + + layer.setStyle(style); + } + + return layer; + }, + + _addBoundary: function (location, options, record) { + var layer = location.location; + var boundaryLayer; + + if (this.options.includeBoundary) { + if (layer instanceof L.LatLngBounds) { + layer = new L.Rectangle(layer); + } + + layer = this._styleBoundary(layer, options, record); + + this._boundaryLayer.addLayer(layer); + + boundaryLayer = layer; + } + + return boundaryLayer; + }, + + _getLayer: function (location, options, record) { + var boundaryLayer = this._addBoundary(location, options, record); + + location = this._processLocation(location); + + var markerLayer; + + if (location) { + markerLayer = this._markerFunction.call(this, location, options, record); + markerLayer.boundaryLayer = boundaryLayer; + } + + return markerLayer; + }, + + // Can be overridden by specifying a getMarker option + _getMarker: function (location, options, record) { + var marker; + + if (location) { + if (options.numberOfSides >= 30 && !(options.innerRadius || (options.innerRadiusX && options.innerRadiusY))) { + marker = new L.CircleMarker(location, options); + } + else { + marker = new L.RegularPolygonMarker(location, options); + } + } + + return marker; + }, + + _preProcessRecords: function (records) { + // Implement any necessary preprocessing in inheriting classes + return records; + }, + + _shouldLoadRecord: function (record) { + return this._includeFunction ? this._includeFunction.call(this, record) : true; + }, + + _loadRecords: function (records) { + var location; + + records = this._preProcessRecords(records); + + for (var recordIndex in records) { + if (records.hasOwnProperty(recordIndex)) { + var record = records[recordIndex]; + + record = this.options.deriveProperties ? this.options.deriveProperties(record) : record; + + var includeLayer = this._shouldLoadRecord(record); + + if (includeLayer) { + location = this._getLocation(record, recordIndex); + + this.locationToLayer(location, record); + } + } + } + }, + + _preloadLocations: function (records) { + var locationField = this.options.codeField; + var locationValues = []; + var indexedRecords = {}; + + for (var recordIndex in records) { + if (records.hasOwnProperty(recordIndex)) { + var record = records[recordIndex]; + var fieldValue = L.Util.getFieldValue(record, locationField); + + indexedRecords[fieldValue] = record; + locationValues.push(fieldValue); + } + } + + if (this.options.getLocation) { + var self = this; + var callback = function (key, location) { + self.locationToLayer(location, indexedRecords[key]); + }; + + this.options.getLocation(indexedRecords, locationField, locationValues, callback); + } + }, + + setDisplayOptions: function (displayOptions) { + this.options.displayOptions = displayOptions; + + // Re-load data + this.reloadData(); + + return this; + }, + + setDisplayOption: function (key, options) { + this.options.displayOptions = this.options.displayOptions || {}; + + if (key in this.options.displayOptions) { + var existingOption = this.options.displayOptions[key]; + this.options.displayOptions[key] = L.extend({}, existingOption, options); + } + else { + this.options.displayOptions[key] = options; + } + + // Re-load data + this.reloadData(); + + return this; + }, + + setFilter: function (filterFunction) { + this.options.filter = filterFunction; + + // Re-load data + this.reloadData() + + return this; + }, + + setData: function (data) { + this._data = data; + this.reloadData(); + }, + + reloadData: function () { + if (!this._layerIndex) { + this.clearLayers(); + + this._addChildLayers(); + } + + if (this._data) { + this.addData(this._data); + } + + this.fire('legendChanged', this); + + return this; + }, + + addData: function (data) { + var records = this.options.recordsField !== null && this.options.recordsField.length > 0 ? L.Util.getFieldValue(data, this.options.recordsField) : data; + + if (this.options.getIndexKey && !this._layerIndex) { + this._layerIndex = {}; + this._boundaryIndex = {}; + } + + if (this.options.locationMode === L.LocationModes.CUSTOM && this.options.preload) { + this._preloadLocations(records); + } + else { + this._loadRecords(records); + } + + this._data = data; + }, + + locationToLayer: function (location, record) { + var layer; + + layer = this.recordToLayer(location, record); + + if (layer) { + this.addLayer(layer); + } + }, + + _bindMouseEvents: function (layer, layerOptions, legendDetails) { + var self = this; + var options = this.options; + var setHighlight = options.setHighlight; + var unsetHighlight = options.unsetHighlight; + var tooltipOptions = options.tooltipOptions; + + var highlight = function (e) { + + var target = e.target; + var layerOptions = this.options || target.options; + var icon = new L.LegendIcon(legendDetails, layerOptions, { + className: tooltipOptions.className || 'leaflet-div-icon', + iconSize: tooltipOptions.iconSize, + iconAnchor: tooltipOptions.iconAnchor + }); + + var latlng = e.latlng || e.target._latlng; + + var tooltip = new L.Marker(latlng, { + icon: icon + }); + + self.addLayer(tooltip); + + if (self.tooltip) { + self.removeLayer(self.tooltip); + self.tooltip = null; + } + + self.tooltip = tooltip; + + if (setHighlight) { + layerOptions = setHighlight(layerOptions); + } + + if (target.setStyle) { + target.setStyle(layerOptions); + } + + // Addresses https://github.com/humangeo/leaflet-dvf/issues/30 + target.isHighlighted = true; + }; + + var move = function (e) { + if (self.tooltip) { + self.tooltip.setLatLng(e.latlng); + } + }; + + var unhighlight = function (e) { + + // Addresses https://github.com/humangeo/leaflet-dvf/issues/30 + if(!e.target.isHighlighted) { + return; + } + e.target.isHighlighted = false; + + if (self.tooltip) { + self.removeLayer(self.tooltip); + self.tooltip = null; + } + + var target = e.target; + var layerOptions = this.options || target.options; + + if (unsetHighlight) { + layerOptions = unsetHighlight(layerOptions); + } + + if (target.setStyle) { + target.setStyle(layerOptions); + } + }; + + var bindLayerEvents = function (layer) { + layer.off('mouseover'); + layer.off('mouseout'); + layer.off('mousemove'); + + layer.on({ + mouseover: highlight, + mouseout: unhighlight, + mousemove: move + }); + }; + + var bindEvents = function (layer) { + if (layer.eachLayer) { + layer.eachLayer(function (subLayer) { + bindEvents(subLayer); + }); + } + else { + bindLayerEvents(layer); + } + }; + + bindEvents(layer); + + }, + + _getDynamicOptions: function (record) { + var layerOptions = L.Util.extend({},this.options.layerOptions); + var displayOptions = this.options.displayOptions; + var legendDetails = {}; + + if (displayOptions) { + for (var property in displayOptions) { + + var propertyOptions = displayOptions[property]; + var fieldValue = L.Util.getFieldValue(record, property); + var valueFunction; + var displayText = propertyOptions.displayText ? propertyOptions.displayText(fieldValue) : fieldValue; + + legendDetails[property] = { + name: propertyOptions.displayName, + value: displayText + }; + + if (propertyOptions.styles) { + layerOptions = L.Util.extend(layerOptions, propertyOptions.styles[fieldValue]); + propertyOptions.styles[fieldValue] = layerOptions; + } + else { + for (var layerProperty in propertyOptions) { + valueFunction = propertyOptions[layerProperty]; + + layerOptions[layerProperty] = valueFunction.evaluate ? valueFunction.evaluate(fieldValue) : (valueFunction.call ? valueFunction.call(this, fieldValue) : valueFunction); + } + } + } + } + + return { + layerOptions: layerOptions, + legendDetails: legendDetails + }; + }, + + _getIndexedLayer: function (index, location, layerOptions, record) { + if (this.options.getIndexKey) { + var indexKey = this.options.getIndexKey.call(this, location, record); + + if (indexKey in index) { + // This is an old layer, so let's restyle it + layer = index[indexKey]; + + var updateFunction = function (layer) { + if (layerOptions.radius && layer instanceof L.CircleMarker) { + layer.setRadius(layerOptions.radius); + } + + layer.setStyle(layerOptions); + + if (layer.setLatLng && layer.getLatLng() !== location.center) { + + layer.setLatLng(location.center); + + } + else { + layer.redraw(); + } + }; + + L.Util.updateLayer(layer, updateFunction); + + if (layer.boundaryLayer) { + layer.boundaryLayer = this._styleBoundary(layer.boundaryLayer, layerOptions, record); + } + } + else { + // This is a new layer, so let's add it + layer = this._getLayer(location, layerOptions, record); + index[indexKey] = layer; + } + + if (this.options.getTrack) { + var shouldAdd = !layer.trackLayer; + + layer.trackLayer = this.options.getTrack.call(this, layer, location, layer.trackLayer); + + if (shouldAdd) { + this._trackLayer.addLayer(layer.trackLayer); + } + } + } + else { + layer = this._getLayer(location, layerOptions, record); + } + + return layer; + }, + + recordToLayer: function (location, record) { + var layerOptions = L.Util.extend({},this.options.layerOptions); + var layer; + var legendDetails = {}; + var includeLayer = true; + var me = this; + + if (this._includeFunction) { + includeLayer = this._includeFunction.call(this, record); + } + + if (includeLayer) { + + var dynamicOptions = this._getDynamicOptions(record); + + layerOptions = dynamicOptions.layerOptions; + legendDetails = dynamicOptions.legendDetails; + + if (location && layerOptions) { + layerOptions.title = location.text; + + // If layer indexing is being used, then load the existing layer from the index + layer = this._getIndexedLayer(this._layerIndex, location, layerOptions, record); + + if (layer) { + if (this.options.showLegendTooltips) { + this._bindMouseEvents(layer, layerOptions, legendDetails); + } + + if (this.options.onEachRecord) { + this.options.onEachRecord.call(this, layer, record, location, this); + } + } + } + } + + return layer; + }, + + getLegend: function (legendOptions) { + return this.options.getLegend ? this.options.getLegend.call(this, legendOptions) : this._getLegend(legendOptions); + }, + + _getLegendElement: function (params) { + var displayMin; + var displayMax; + var i = document.createElement('i'); + + var displayProperties = params.displayProperties; + var layerOptions = params.layerOptions; + var ignoreProperties = params.ignoreProperties; + var displayTextFunction = params.displayTextFunction; + var index = params.index; + var numSegments = params.numSegments; + var segmentWidth = params.segmentWidth; + var minValue = params.minValue; + var maxValue = params.maxValue; + + L.StyleConverter.applySVGStyle(i, layerOptions); + + for (var property in displayProperties) { + + if (ignoreProperties.indexOf(property) === -1) { + + valueFunction = displayProperties[property]; + + if (valueFunction && (valueFunction.getBounds || (displayProperties.minValue && displayProperties.maxValue))) { + var bounds = valueFunction.getBounds ? valueFunction.getBounds() : null; + var minX = bounds ? bounds[0].x : displayProperties.minValue; + var maxX = bounds ? bounds[1].x : displayProperties.maxValue; + + var binFunction = new L.LinearFunction(new L.Point(0, minX), new L.Point(numSegments, maxX)); + + displayMin = minX; + displayMax = maxX; + + if (displayTextFunction) { + displayMin = displayTextFunction(minX); + displayMax = displayTextFunction(maxX); + } + + if (index === 0) { + minValue.innerHTML = displayMin; + maxValue.innerHTML = displayMax; + } + + var segmentSize = (maxX - minX) / numSegments; + var x = binFunction.evaluate(index); + var nextX = binFunction.evaluate(index + 1); + var value = valueFunction.evaluate ? valueFunction.evaluate(x) : valueFunction(x); + var nextValue = valueFunction.evaluate ? valueFunction.evaluate(nextX) : valueFunction(nextX); + + L.StyleConverter.setCSSProperty(i, property, value); + + // If this is the fillColor property then setup the legend so that the background is a left-right gradient + // moving from the lowest value of the range to the highest value of the range + if (property === 'fillColor') { + if (params.gradient) { + i.style.cssText += 'background-image:linear-gradient(left , ' + value + ' 0%, ' + nextValue + ' 100%);' + + 'background-image:-ms-linear-gradient(left , ' + value + ' 0%, ' + nextValue + ' 100%);' + + 'background-image:-moz-linear-gradient(left , ' + value + ' 0%, ' + nextValue + ' 100%);' + + 'background-image:-webkit-linear-gradient(left , ' + value + ' 0%, ' + nextValue + ' 100%);'; + } + else { + i.style.cssText += 'background-color:' + nextValue + ';'; + } + } + + if (property === 'color') { + i.style.cssText += 'border-top-color:' + value + ';' + + 'border-bottom-color:' + nextValue + ';' + + 'border-left-color:' + value + ';' + + 'border-right-color:' + nextValue + ';'; + } + + if (property === 'weight') { + i.style.cssText += 'border-top-width:' + value + ';' + + 'border-bottom-width:' + nextValue + ';' + + 'border-left-width:' + value + ';' + + 'border-right-width:' + nextValue + ';'; + } + + var min = (segmentSize * index) + minX; + var max = min + segmentSize; + + if (displayTextFunction && valueFunction) { + min = displayTextFunction(min); + max = displayTextFunction(max); + } + + i.setAttribute('title', min + ' - ' + max); + } + + } + + } + + i.style.width = segmentWidth + 'px'; + + return i; + }, + + _getLegend: function (legendOptions) { + + legendOptions = legendOptions || this.options.legendOptions || {}; + + var className = legendOptions.className; + var container = document.createElement('div'); + var legendElement = L.DomUtil.create('div', 'legend', container); + var numSegments = legendOptions.numSegments || 10; + var legendWidth = legendOptions.width || 100; + var layerOptions = this.options.layerOptions || {}; + var weight = layerOptions.weight || 0; + var segmentWidth = (legendWidth / numSegments) - 2 * weight; + var displayText; + var displayOptions = this.options.displayOptions || {}; + + if (className) { + L.DomUtil.addClass(legendElement, className); + } + + if (legendOptions.title) { + L.DomUtil.create('legend', '', legendElement).innerHTML = legendOptions.title; + } + + var defaultFunction = function (value) { + return value; + }; + + for (var field in displayOptions) { + + var displayProperties = displayOptions[field]; + + if (!displayProperties.excludeFromLegend) { + var displayName = displayProperties.displayName || field; + + displayText = displayProperties.displayText; + + var displayTextFunction = displayText ? displayText : defaultFunction; + + var styles = displayProperties.styles; + + L.DomUtil.create('div', 'legend-title', legendElement).innerHTML = displayName; + + if (styles) { + // Generate category legend + legendElement.innerHTML += new L.CategoryLegend(styles).generate(); + } + else { + // Generate numeric legend + var legendItems = L.DomUtil.create('div', 'data-layer-legend'); + var minValue = L.DomUtil.create('div', 'min-value', legendItems); + var scaleBars = L.DomUtil.create('div', 'scale-bars', legendItems); + var maxValue = L.DomUtil.create('div', 'max-value', legendItems); + var ignoreProperties = ['displayName', 'displayText', 'minValue', 'maxValue']; + + for (var index = 0; index < numSegments; ++index) { + var legendParams = { + displayProperties: displayProperties, + layerOptions: layerOptions, + ignoreProperties: ignoreProperties, + displayTextFunction: displayTextFunction, + index: index, + numSegments: numSegments, + segmentWidth: segmentWidth, + minValue: minValue, + maxValue: maxValue, + gradient: legendOptions.gradient + }; + + var element = this._getLegendElement(legendParams); + + scaleBars.appendChild(element); + + } + legendElement.appendChild(legendItems); + } + } + } + + return container.innerHTML; + } +}); + +L.dataLayer = function (data, options) { + return new L.DataLayer(data, options); +}; + +/* + * + */ +L.MapMarkerDataLayer = L.DataLayer.extend({ + _getMarker: function (latLng, layerOptions, record) { + return new L.MapMarker(latLng, layerOptions); + } +}); + +L.mapMarkerDataLayer = function (data, options) { + return new L.MapMarkerDataLayer(data, options); +}; + +/* + * + */ +L.MarkerDataLayer = L.DataLayer.extend({ + initialize: function (data, options) { + this._markerMap = {}; + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + options: { + recordsField: 'features', + locationMode: L.LocationModes.LATLNG, + latitudeField: 'latitude', + longitudeField: 'longitude', + layerOptions: { + icon: null + }, + showLegendTooltips: false + }, + + _getMarker: function (latLng, layerOptions, record) { + if (this.options.setIcon) { + layerOptions.icon = this.options.setIcon.call(this, record, layerOptions); + } + + return new L.Marker(latLng, layerOptions); + }, + + _getLegendElement: function (params) { + // Call setIcon + // var icon = this.options.setIcon.call(this, record); + // Get the icon's html + // var html = icon.options.iconUrl ? '<img src="' + icon.options.iconUrl + '"/>' : icon.options.html; + // var container = document.createElement('div'); + // container.innerHTML = html; + // return container.children[0]; + }, + + _getLegend: function (options) { + // TODO: Implement this. Get the correct icon for each marker based on iterating over a range + // of values. Remove this and override the _getLegendElement method + return '<span>No legend available</span>'; + } +}); + +/* + * + */ +L.markerDataLayer = function (data, options) { + return new L.MarkerDataLayer(data, options); +}; + +/* + * Displays the top 50 photos for a given area on the map + */ +L.PanoramioLayer = L.MarkerDataLayer.extend({ + statics: { + UPLOAD_DATE_FORMAT: 'DD MMM YYYY', + SIZE_BY_DATE: 'date', + SIZE_BY_POPULARITY: 'popularity', + SIZE_BY_NONE: 'none', + SIZES: { + 'square': [60, 60], + 'mini_square': [32, 32] + }, + NUM_PHOTOS: 50 + } +}); + +L.PanoramioLayer = L.PanoramioLayer.extend({ + initialize: function (options) { + L.MarkerDataLayer.prototype.initialize.call(this, {}, options); + + this._from = 0; + this._to = L.PanoramioLayer.NUM_PHOTOS; + this._calls = []; + }, + + options: { + recordsField: 'photos', + latitudeField: 'latitude', + longitudeField: 'longitude', + locationMode: L.LocationModes.LATLNG, + showLegendTooltips: false, + sizeBy: L.PanoramioLayer.SIZE_BY_DATE, + layerOptions: { + opacity: 1.0 + }, + onEachRecord: function (layer, record) { + var photoUrl = record['photo_file_url']; + var title = record['photo_title']; + var me = this; + var width = record['width']; + var height = record['height']; + var offset = 20000; + + layer.on('click', function (e) { + var container = document.createElement('div'); + var content = L.DomUtil.create('div', '', container); + + var photo = L.DomUtil.create('img', 'photo', content); + photo.setAttribute('onload', 'this.style.opacity=1;'); + photo.setAttribute('src', photoUrl); + photo.style.width = width + 'px'; + + var photoInfo = L.DomUtil.create('div', 'photo-info', content); + photoInfo.style.width = (width - 20) + 'px'; + photoInfo.innerHTML = '<span>' + title + '</span>' + + '<a class="photo-link" target="_blank" href="' + record['photo_url'] + '">' + + '<img src="http://www.panoramio.com/img/glass/components/logo_bar/panoramio.png" style="height: 14px;"/>' + + '</a>'; + + var authorLink = L.DomUtil.create('a', 'author-link', content); + authorLink.setAttribute('target', '_blank'); + authorLink.setAttribute('href', record['owner_url']); + authorLink.innerHTML = 'by ' + record['owner_name']; + + var icon = new L.DivIcon({ + className: 'photo-details', + html: container.innerHTML, + iconAnchor: [width/2, height/2] + }); + + var marker = new L.Marker(e.target._latlng, { + icon: icon, + zIndexOffset: offset + }); + + marker.on('click', function (e) { + me.removeLayer(e.target); + }); + + layer.viewedImage = marker; + me.viewedImage = marker; + + me.addLayer(marker); + }); + + if (this.options.onEachPhoto) { + this.options.onEachPhoto.call(this, layer, record); + } + + }, + setIcon: function (record, options) { + var title = L.Util.getFieldValue(record, 'photo_title'); + + var size = null; + + if (this._sizeFunction) { + size = this._sizeFunction.evaluate(record.index); + } + + var iconSize = size ? new L.Point(size, size) : L.PanoramioLayer.SIZES[this.options.size]; + var url = record['photo_file_url'].replace('/medium/', '/' + this.options.size + '/'); + var icon = new L.DivIcon({ + iconSize: iconSize, + className: '', + html: '<img class="photo" onload="this.style.opacity=1" title="' + title + '" src="' + url + '"/>' + }); + + return icon; + }, + updateInterval: 300000, + size: 'square', + attributionText: 'Photos provided by <a href="http://www.panoramio.com"><img src="http://www.panoramio.com/img/glass/components/logo_bar/panoramio.png" style="height: 10px;"/></a>. Photos provided by <a href="http://www.panoramio.com"><img src="http://www.panoramio.com/img/glass/components/logo_bar/panoramio.png" style="height: 10px;"/></a> are under the copyright of their owners', + refreshEvents: 'moveend', + photoSet: 'public' + }, + + includes: L.Mixin.Events, + + onAdd: function (map) { + L.DataLayer.prototype.onAdd.call(this, map); + + if (map.attributionControl) { + map.attributionControl.addAttribution(this.options.attributionText); + } + + var me = this; + var resetFunction = function (e) { + + me._from = 0; + me._to = L.PanoramioLayer.NUM_PHOTOS; + + me.fire('requestingPhotos'); + + if (me._call) { + clearTimeout(me._call); + } + + var request = function () { + me.requestPhotos(); + } + + me._call = setTimeout(request, 1000); + }; + + this.requestPhotos(); + + this._interval = setInterval(resetFunction, this.options.updateInterval); + + this._resetFunction = resetFunction; + + map.on(this.options.refreshEvents, resetFunction); + }, + + onRemove: function (map) { + L.DataLayer.prototype.onRemove.call(this, map); + + if (map.attributionControl) { + map.attributionControl.removeAttribution(this.options.attributionText); + } + + if (this._interval) { + clearInterval(this._interval); + this._interval = null; + } + + map.off(this.options.refreshEvents, this._resetFunction); + }, + + calculateSizeByDate: function (data) { + var photos = data.photos; + var timestamps = []; + + // Iterate through the photos and calculate the timestamp of the upload date using + // moment js + for (var i = 0; i < photos.length; ++i) { + var photo = photos[i]; + var timestamp = moment(photo['upload_date'], L.PanoramioLayer.UPLOAD_DATE_FORMAT); + + timestamps.push(timestamp); + + photos[i].index = timestamp; + } + + timestamps.sort(function (t1, t2) { + return t1 - t2; + }); + + var size = L.PanoramioLayer.SIZES[this.options.size][0]; + + this._sizeFunction = new L.LinearFunction([timestamps[0], size/2], [timestamps[timestamps.length - 1], size]); + + return data; + }, + + calculateSizeByPopularity: function (data) { + var photos = data.photos; + + for (var i = 0; i < photos.length; ++i) { + photos[i].index = i; + } + + var size = L.PanoramioLayer.SIZES[this.options.size][0]; + + this._sizeFunction = new L.LinearFunction([0, size/2], [photos.length, size]); + + return data; + }, + + next: function () { + this._from = this._to; + this._to = this._from + L.PanoramioLayer.NUM_PHOTOS; + this.requestPhotos(); + }, + + previous: function () { + this._to = this._from; + this._from = this._from - L.PanoramioLayer.NUM_PHOTOS; + this.requestPhotos(); + }, + + requestJsonp: function (url, data, callback) { + var self = this, + key = 'function' + new Date().getTime(), + params = []; + + data.callback = 'window.LeafletDvfJsonpCallbacks.' + key; + + for (property in data) { + if (data.hasOwnProperty(property)) { + params.push(property + '=' + encodeURIComponent(data[property])); + } + } + + url += (url.indexOf('?') > 0 ? '&' : '?') + params.join('&'); + + if (typeof window.LeafletDvfJsonpCallbacks === 'undefined') { + window.LeafletDvfJsonpCallbacks = {}; + } + + window.LeafletDvfJsonpCallbacks[key] = function (data) { + callback.call(self, data); + delete window.LeafletDvfJsonpCallbacks[key]; + }; + + if (this.jsonpScript) { + document.head.removeChild(this.jsonpScript); + this.jsonpScript = null; + } + + this.jsonpScript = document.createElement('script'); + this.jsonpScript.setAttribute('type', 'text/javascript'); + this.jsonpScript.setAttribute('async', 'true'); + this.jsonpScript.setAttribute('src', url); + + document.head.appendChild(this.jsonpScript); + + return { + abort: function () { + if (key in window.LeafletDvfJsonpCallbacks) { + window.LeafletDvfJsonpCallbacks[key] = function () { + delete window.LeafletDvfJsonpCallbacks[key]; + } + } + } + }; + + }, + + requestPhotos: function () { + + var me = this; + var bounds = this._map.getBounds(); + var southWest = bounds.getSouthWest(); + var northEast = bounds.getNorthEast(); + + while (me._calls.length > 0) { + me._calls.pop().abort(); + } + + var request = this.requestJsonp( + 'http://www.panoramio.com/map/get_panoramas.php', + { + set: this.options.photoSet, + from: me._from, + to: me._to, + minx: southWest.lng, + miny: southWest.lat, + maxx: northEast.lng, + maxy: northEast.lat, + size: 'medium', + mapfilter: 'true' + }, + function (data) { + + me._count = data.count; + + if (moment && me.options.sizeBy === L.PanoramioLayer.SIZE_BY_DATE) { + data = me.calculateSizeByDate(data); + } + else if (me.options.sizeBy === L.PanoramioLayer.SIZE_BY_POPULARITY) { + data = me.calculateSizeByPopularity(data); + } + + me.fire('photosAvailable', data); + me.clearLayers(); + me.addData(data); + } + ); + + me._calls.push(request); + } +}); + +L.panoramioLayer = function (options) { + return new L.PanoramioLayer(options); +}; + +/** + * + */ +L.GeohashDataLayer = L.DataLayer.extend({ + initialize: function (data, options) { + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + options: { + recordsField: 'features', + locationMode: L.LocationModes.GEOHASH, + geohashField: 'geohash', + displayField: null, + displayOptions: null, + layerOptions: { + weight: 1, + color: '#000' + }, + getIndexKey: function (location, record) { + return location.text; + } + }, + + _getLayer: function (geohash, layerOptions, record) { + return new L.Rectangle(geohash.location, layerOptions); + } +}); + +L.geohashDataLayer = function (data, options) { + return new L.GeohashDataLayer(data, options); +}; + +/* + * + */ +L.ChoroplethDataLayer = L.DataLayer.extend({ + initialize: function (data, options) { + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + options: { + recordsField: 'features', + locationMode: L.LocationModes.COUNTRY, + codeField: 'ISO', + displayField: null, + displayOptions: null, + layerOptions: { + weight: 1, + color: '#000' + }, + maxZoom: 16, + backgroundLayer: true + }, + + _getLayer: function (location, layerOptions, record) { + + if (location.location instanceof L.LatLng) { + location.location = this._markerFunction.call(this, location.location, layerOptions, record); + } + + if (location.location.setStyle) { + + // Don't apply gradient property to lines, since this will cause the line to be filled + layerOptions.gradient = location.location instanceof L.Polyline ? false : layerOptions.gradient; + + location.location.setStyle(layerOptions); + } + + return location.location; + + } +}); + +L.choroplethDataLayer = function (data, options) { + return new L.ChoroplethDataLayer(data, options); +}; + +/* + * + */ +L.ChartDataLayer = L.DataLayer.extend({ + options: { + showLegendTooltips: false + }, + + initialize: function (data, options) { + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + _getLayer: function (latLng, layerOptions, record) { + var boundaryLayer = this._addBoundary(latLng, layerOptions, record); + + latLng = this._processLocation(latLng); + + var chartOptions = this.options.chartOptions; + var tooltipOptions = this.options.tooltipOptions; + var options = {}; + + options = layerOptions; + options.data = {}; + options.chartOptions = chartOptions; + + // Set data property value to the associated value from the record + for (var key in this.options.chartOptions) { + options.data[key] = this.options.getFieldValue ? this.options.getFieldValue.call(this, record, key) : L.Util.getFieldValue(record, key); + } + + for (var key in tooltipOptions) { + options[key] = tooltipOptions[key]; + } + + var marker; + + if (latLng) { + marker = this._getMarker(latLng, options); + marker.boundaryLayer = boundaryLayer; + } + + return marker; + }, + + _getMarker: function (latLng, options) { + // Override this in inheriting classes + }, + + _getLegend: function (legendOptions) { + var dataLayerLegend = L.DataLayer.prototype._getLegend.call(this, legendOptions); + var legend = new L.CategoryLegend(this.options.chartOptions); + + legendOptions = legendOptions || this.options.legendOptions; + + return legend.generate(legendOptions); + } +}); + +/* + * + */ +L.BarChartDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.BarChartMarker(latLng, options); + } +}); + +L.barChartDataLayer = function (data, options) { + return new L.BarChartDataLayer(data, options); +}; + +/* + * + */ +L.RadialBarChartDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.RadialBarChartMarker(latLng, options); + } +}); + +L.radialBarChartDataLayer = function (data, options) { + return new L.RadialBarChartDataLayer(data, options); +}; + +/* + * + */ +L.PieChartDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.PieChartMarker(latLng, options); + } +}); + +L.pieChartDataLayer = function (data, options) { + return new L.PieChartDataLayer(data, options); +}; + +/* + * + */ +L.CoxcombChartDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.CoxcombChartMarker(latLng, options); + } +}); + +L.coxcombChartDataLayer = function (data, options) { + return new L.CoxcombChartDataLayer(data, options); +}; + +/* + * + */ +L.StackedRegularPolygonDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.StackedRegularPolygonMarker(latLng, options); + } +}); + +L.stackedRegularPolygonDataLayer = function (data, options) { + return new L.StackedRegularPolygonDataLayer(data, options); +}; + +/* + * + */ +L.StackedPieChartDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _getMarker: function (latLng, options) { + return new L.StackedPieChartMarker(latLng, options); + }, +}); + +L.stackedPieChartDataLayer = function (data, options) { + return new L.StackedPieChartDataLayer(data, options); +}; + +/* + * + */ +L.RadialMeterMarkerDataLayer = L.DataLayer.extend({ + options: { + showLegendTooltips: false + }, + + initialize: function (data, options) { + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + _getLayer: function (latLng, layerOptions, record) { + this._addBoundary(latLng, layerOptions); + + latLng = this._processLocation(latLng); + + var chartOptions = this.options.chartOptions; + var tooltipOptions = this.options.tooltipOptions; + var displayOptions = this.options.displayOptions; + var options = {}; + + options = layerOptions; + options.data = {}; + options.chartOptions = chartOptions; + options.displayOptions = displayOptions; + + // Set data property value to the associated value from the record + for (var key in this.options.chartOptions) { + options.data[key] = L.Util.getFieldValue(record, key); + } + + for (var key in tooltipOptions) { + options[key] = tooltipOptions[key]; + } + + var marker; + + if (latLng) { + marker = this._getMarker(latLng, options); + } + + return marker; + }, + + _getMarker: function (latLng, options) { + return new L.RadialMeterMarker(latLng, options); + }, +}); + +L.radialMeterMarkerDataLayer = function (data, options) { + return new L.RadialMeterMarkerDataLayer(data, options); +}; diff --git a/assets/js/sig/dvf/leaflet.dvf.experimental.js b/assets/js/sig/dvf/leaflet.dvf.experimental.js new file mode 100755 index 0000000000000000000000000000000000000000..1f9c45644a42390c11754dc43817d84b58d55993 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.experimental.js @@ -0,0 +1,1163 @@ + +/* + * + */ +L.SeriesMarker = L.Path.extend({ + initialize: function (centerLatLng, options) { + L.Path.prototype.initialize.call(this, options); + + L.Util.setOptions(this, options); + + this._latlng = centerLatLng; + }, + + options: { + fill: false, + size: new L.Point(80, 80), + position: { + x: 0, + y: 0 + }, + weight: 1, + color: '#000', + opacity: 1.0, + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + }, + + getBounds: function () { + var map = this._map, + point = map.project(this._latlng), + swPoint = new L.Point(point.x, point.y), + nePoint = new L.Point(point.x + this.options.size.x, point.y - this.options.size.y), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + return new L.SVGPathBuilder(this._points, null, { + closePath: this.options.fill + }).build(6); + }, + + getDataPoint: function (x) { + return _.find(this._seriesPoints, function (value) { + return value.x === x; + }); + }, + + getClosestPathPoint: function (x) { + var points = this._points; + var closestPoint; + var upperIndex = -1; + + var upperPoint = _.find(points, function (value, index) { + var match = value.x >= x; + + if (match) { + upperIndex = index; + } + + return match; + }); + + if (upperPoint) { + if (upperPoint.x === x) { + closestPoint = upperPoint; + } + else if (upperIndex > 0) { + // Compare the upper point distance to x with the previous point's distance to x + var lowerPoint = points[upperIndex - 1]; + var upperDelta = Math.abs(upperPoint.x - x); + var lowerDelta = Math.abs(lowerPoint.x - x); + + if (upperDelta < lowerDelta) { + closestPoint = upperPoint; + } + else { + closestPoint = lowerPoint; + } + } + } + + return closestPoint; + }, + + getClosestPoint: function (x) { + var points = this._seriesPoints; + var closestPoint; + var upperIndex = -1; + + x = this._reverseXTransform.evaluate(x); + + var upperPoint = _.find(points, function (value, index) { + var match = value.x >= x; + + if (match) { + upperIndex = index; + } + + return match; + }); + + if (upperPoint) { + if (upperPoint.x === x) { + closestPoint = upperPoint; + } + else if (upperIndex > 0) { + // Compare the upper point distance to x with the previous point's distance to x + var lowerPoint = points[upperIndex - 1]; + var upperDelta = Math.abs(upperPoint.x - x); + var lowerDelta = Math.abs(lowerPoint.x - x); + + if (upperDelta < lowerDelta) { + closestPoint = upperPoint; + } + else { + closestPoint = lowerPoint; + } + } + } + + return closestPoint; + }, + + _getPoints: function () { + + var options = this.options; + + var size = options.size; + var minX = options.xRange ? options.xRange[0] : options.minX; + var maxX = options.xRange ? options.xRange[1] : options.maxX; + var minY = options.yRange ? options.yRange[0] : options.minY; + var maxY = options.yRange ? options.yRange[1] : options.maxY; + + var xTransform = new L.LinearFunction([minX, 0], [maxX, size.x]); + var yTransform = new L.LinearFunction([minY, 0], [maxY, size.y]); + + this._reverseXTransform = new L.LinearFunction([0, minX], [size.x, maxX]); + this._reverseYTransform = new L.LinearFunction([0, minY], [size.y, maxY]); + + var seriesPoint; + var x, y; + var xField = options.xField || 'x'; + var yField = options.yField || 'y'; + + var points = []; + + var series = options.value; + + this._seriesPoints = []; + + // Need to sort x's numerically before plotting + for (var index in series) { + if (series.hasOwnProperty(index)) { + seriesPoint = series[index]; + + x = L.Util.getFieldValue(seriesPoint, xField); + y = L.Util.getFieldValue(seriesPoint, yField); + + // If x is a date string, then parse it + if (isNaN(x)) { + x = moment(x).unix(); + } + else { + x = Number(x); + } + + this._seriesPoints.push(new L.Point(x, y)); + + x = xTransform.evaluate(x); + y = yTransform.evaluate(y); + + points.push(new L.Point(this._point.x + options.position.x + x - size.x/2, this._point.y + options.position.y - y)); + } + } + + this._seriesPoints = _.sortBy(this._seriesPoints, function (point) { + return point.x; + }); + + points = _.sortBy(points, function (point) { + return point.x; + }); + + if (options.fill) { + var minYCoord = yTransform.evaluate(minY); + points.unshift(new L.Point(this._point.x + options.position.x + xTransform.evaluate(minX) - size.x/2, this._point.y + options.position.y - minYCoord)); + points.push(new L.Point(this._point.x + options.position.x + xTransform.evaluate(maxX) - size.x/2, this._point.y + options.position.y - minYCoord)); + } + + return points; + } +}); + +L.Line = L.Path.extend({ + initialize: function (points, options) { + L.Path.prototype.initialize.call(this, options); + this._points = points; + }, + + getPathString: function () { + var path = new L.SVGPathBuilder(this._points, null, { + closePath: false + }).build(6); + + return path; + } +}); + +/* + * + */ +L.SparklineMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + dataPointHighlightStyle: { + weight: 1.0, + opacity: 1.0, + color: '#1E90FF', + lineCap: 'square', + dropShadow: false, + dashArray: [5, 2] + } + }, + + _highlight: function (options) { + if (options.weight) { + options.weight *= 2; + } + + return options; + }, + + _unhighlight: function (options) { + if (options.weight) { + options.weight /= 2; + } + + return options; + }, + + _bindMouseEvents: function (chartElement) { + var self = this; + var tooltipOptions = this.options.tooltipOptions; + + chartElement.on('mousemove', function (e) { + var currentOptions = this.options; + var key = currentOptions.key; + var value = currentOptions.value; + var layerPoint = e.layerPoint; + var x = layerPoint.x - this._point.x; + var y = layerPoint.y - this._point.y; + var iconSize = currentOptions.iconSize; + var newX = x; + var newY = y; + var newPoint; + var offset = 5; + + if (currentOptions.marker) { + self.removeLayer(currentOptions.marker); + } + + if (currentOptions.lines) { + _.each(currentOptions.lines, function (line) { + self.removeLayer(line); + }); + } + + var closestPoint = chartElement.getClosestPoint(x + currentOptions.position.x + self.options.size.x / 2); + var closestPathPoint = chartElement.getClosestPathPoint(layerPoint.x); + var bounds = chartElement.getBounds(); + + if (closestPoint) { + value = { + x: closestPoint.x, + y: closestPoint.y + } + + newPoint = new L.Point(-offset, iconSize.y + offset); + + var legendOptions = {}; + var defaultDisplayText = function (value) { + return '<div><div><span class="xvalue">' + value.x + '</span><span class="separator">:</span><span class="yvalue">' + value.y + '</span></div></div>'; + }; + + var displayText = currentOptions.displayText ? currentOptions.displayText(value) : defaultDisplayText(value); + + legendOptions[key] = { + name: currentOptions.displayName, + value: displayText + }; + + var icon = new L.LegendIcon(legendOptions, currentOptions, { + className: 'leaflet-div-icon', + iconSize: tooltipOptions ? tooltipOptions.iconSize : iconSize, + iconAnchor: newPoint + }); + + var latlng = self._map.layerPointToLatLng(closestPathPoint); + + currentOptions.marker = new L.Marker(latlng, { + icon: icon + }); + + currentOptions.lines = [ + new L.Line([new L.Point(closestPathPoint.x, chartElement._point.y), new L.Point(closestPathPoint.x, closestPathPoint.y)], self.options.dataPointHighlightStyle), + new L.Line([new L.Point(closestPathPoint.x, closestPathPoint.y), new L.Point(chartElement._point.x + currentOptions.position.x - self.options.size.x / 2, closestPathPoint.y)], self.options.dataPointHighlightStyle) + ]; + + self.addLayer(currentOptions.marker); + + _.each(currentOptions.lines, function (line) { + self.addLayer(line); + }); + } + }); + + chartElement.on('mouseover', function (e) { + var currentOptions = this.options; + + currentOptions = self._highlight(currentOptions); + + this.initialize(self._latlng, currentOptions); + this.redraw(); + this.setStyle(currentOptions); + }); + + chartElement.on('mouseout', function (e) { + var currentOptions = this.options; + + currentOptions = self._unhighlight(currentOptions); + + this.initialize(self._latlng, currentOptions); + this.redraw(); + this.setStyle(currentOptions); + + if (currentOptions.lines) { + _.each(currentOptions.lines, function (line) { + self.removeLayer(line); + }); + } + + self.removeLayer(currentOptions.marker); + }); + }, + + _loadComponents: function () { + var chartOptions = this.options.chartOptions; + var data = this.options.data; + var series; + var size = this.options.size; + var chartOption; + + // Series is an array or object of arrays of points + for (var key in data) { + if (data.hasOwnProperty(key)) { + series = data[key]; + chartOption = chartOptions[key]; + + chartOption = L.Util.extend({}, this.options, chartOption); + + chartOption.xField = "0"; + chartOption.yField = "1"; + chartOption.key = key; + chartOption.value = series; + + var seriesLayer = new L.SeriesMarker(this._latlng, chartOption); + + this._bindMouseEvents(seriesLayer); + + this.addLayer(seriesLayer); + } + } + } +}); + +/* + * + */ +L.SparklineDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _preProcessRecords: function (records) { + var record; + var series; + var xRange = [Number.MAX_VALUE, Number.MIN_VALUE]; + var yRange = [Number.MAX_VALUE, Number.MIN_VALUE]; + var xValues = {}; + var seriesObjects = []; + var xField = this.options.xField || 'x'; + var yField = this.options.yField || 'y'; + var seriesField = this.options.seriesField; + var includeFunction = this.options.filter || this.options.includeLayer; + + for (var index in records) { + if (records.hasOwnProperty(index)) { + + record = records[index]; + + var includeLayer = includeFunction ? includeFunction.call(this, record) : true; + + if (includeLayer) { + + // If there's a seriesField option specified, then navigate to the property specified by the seriesField + if (seriesField) { + + // Get the seriesField property + series = L.Util.getFieldValue(record, seriesField); + + // If the seriesField is an object then break it into pairs + // [[1, 2], [2, 3], ... [9, 10]] + if (_.isObject(series)) { + series = _.pairs(series); + } + + var seriesPoint; + + // Iterate through keys in chartOptions + for (var key in this.options.chartOptions) { + var points = {}; + var chartOptions = this.options.chartOptions[key]; + + // Need to sort x's numerically before plotting + for (var pointIndex in series) { + if (series.hasOwnProperty(pointIndex)) { + seriesPoint = series[pointIndex]; + + x = L.Util.getFieldValue(seriesPoint, chartOptions.xField || xField); + y = L.Util.getFieldValue(seriesPoint, chartOptions.yField || yField); + + // If x is a date string, then parse it + if (isNaN(x)) { + x = moment(x).unix(); + } + + x = Number(x); + + xValues[x] = x; + xRange[0] = Math.min(xRange[0], x); + xRange[1] = Math.max(xRange[1], x); + yRange[0] = Math.min(yRange[0], y); + yRange[1] = Math.max(yRange[1], y); + + points[x] = y; + } + } + + seriesObjects[index] = seriesObjects[index] || record; + + // Add the key and points to the record. + // TODO: make sure this doesn't overwrite existing record properties + L.Util.setFieldValue(seriesObjects[index], key, points); + } + } + else { + // Iterate through the keys in chartOptions + for (var key in this.options.chartOptions) { + + // Get the key property from the record + series = L.Util.getFieldValue(record, key); + + if (_.isObject(series)) { + series = _.pairs(series); + } + + var seriesPoint; + var points = {}; + var chartOption = this.options.chartOptions[key]; + + // Need to sort x's numerically before plotting + for (var pointIndex in series) { + if (series.hasOwnProperty(pointIndex)) { + seriesPoint = series[pointIndex]; + + x = L.Util.getFieldValue(seriesPoint, chartOption.xField || xField); + y = L.Util.getFieldValue(seriesPoint, chartOption.yField || yField); + + // TODO: This may be unnecessary, since it's handled + // by the lines above + if (seriesPoint.x) { + x = seriesPoint.x; + y = seriesPoint.y; + } + else if (_.isArray(seriesPoint)) { + x = seriesPoint[0]; + y = seriesPoint[1]; + } + else { + x = index; + y = seriesPoint; + } + + // If x is a date string, then parse it + if (isNaN(x)) { + x = moment(x).unix(); + } + + x = Number(x); + + xValues[x] = x; + xRange[0] = Math.min(xRange[0], x); + xRange[1] = Math.max(xRange[1], x); + yRange[0] = Math.min(yRange[0], y); + yRange[1] = Math.max(yRange[1], y); + + points[x] = y; + } + } + + seriesObjects[index] = seriesObjects[index] || record; + + L.Util.setFieldValue(seriesObjects[index], key, points); + } + } + } + } + } + + xValues = _.sortBy(_.keys(xValues), function (value) { + return value; + }); + + for (var index in seriesObjects) { + + var seriesObject = seriesObjects[index]; + + for (var key in this.options.chartOptions) { + + var seriesData = L.Util.getFieldValue(seriesObject, key); + + for (var j = 0; j < xValues.length; ++j) { + var x = xValues[j]; + + if (!(x in seriesData)) { + seriesData[x] = 0; + } + } + + L.Util.setFieldValue(seriesObjects[index], key, _.chain(seriesData).pairs().sortBy(function(value) { + return value + }).value()); + + } + + } + + this.options.layerOptions.minX = xRange[0]; + this.options.layerOptions.maxX = xRange[1]; + this.options.layerOptions.minY = Math.min(0, yRange[0]); + this.options.layerOptions.maxY = yRange[1]; + this.options.xField = "0"; + this.options.yField = "1"; + + return seriesObjects; + }, + + _getMarker: function (latLng, options) { + return new L.SparklineMarker(latLng, options); + } +}); + +L.sparklineDataLayer = function (data, options) { + return new L.SparklineDataLayer(data, options); +}; + +/* + * + */ +L.WordCloudMarker = L.ChartMarker.extend({ + initialize: function (centerLatLng, options) { + L.Util.setOptions(this, options); + + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + + }, + + _loadComponents: function () { + // Add an L.DivIcon for each term, sized by count, and colored by count or by word + } +}); + +L.wordCloudMarker = function (centerLatLng, options) { + return new L.WordCloudMarker(centerLatLng, options); +}; + +/* + * + */ +L.WordCloudDataLayer = L.ChartDataLayer.extend({ + initialize: function (data, options) { + L.ChartDataLayer.prototype.initialize.call(this, data, options); + }, + + _preProcessRecords: function (records) { + // If coloring by word, grab the set of all unique words and map colors to those words + return records; + }, + + _getMarker: function (latLng, options) { + return new L.WordCloudMarker(latLng, options); + } +}); + +L.wordCloudDataLayer = function (data, options) { + return new L.WordCloudDataDataLayer(data, options); +}; + +/* + * A DataLayer for visualizing data as a graph of edges, where the vertices are locations + */ +L.Graph = L.DataLayer.extend({ + statics: { + EDGESTYLE: { + STRAIGHT: function (latlng1, latlng2) { + return new L.Polyline([latlng1, latlng2]); + }, + ARC: function (latlng1, latlng2) { + return new L.ArcedPolyline([latlng1, latlng2]); + } + } + } +}); + +L.Graph = L.Graph.extend({ + options: { + getEdge: L.Graph.EDGESTYLE.STRAIGHT + }, + _getLayer: function (location, layerOptions, record) { + location.location.setStyle(layerOptions); + return location.location; + }, + _getLocation: function (record, index) { + var fromField = this.options.fromField; + var toField = this.options.toField; + var location; + + var fromValue = L.Util.getFieldValue(record, fromField); + var toValue = L.Util.getFieldValue(record, toField); + + var fromLocation = this.options.locationMode.call(this, fromValue, fromValue); + var toLocation = this.options.locationMode.call(this, toValue, toValue); + + // Get from location + // Get to location + // Create a line (arced or straight) connecting the two locations + if (fromLocation && toLocation) { + var latlng1 = fromLocation.center; + var latlng2 = toLocation.center; + + if (latlng1 && latlng2) { + var line = this.options.getEdge.call(this, latlng1, latlng2); + var bounds = new L.LatLngBounds(new L.LatLng(Math.min(latlng1.lat, latlng2.lat), Math.min(latlng1.lng, latlng2.lng)), new L.LatLng(Math.max(latlng1.lat, latlng2.lat), Math.max(latlng1.lng, latlng2.lng))); + + location = { + center: bounds.getCenter(), + location: line, + text: fromValue + ' - ' + toValue + }; + } + } + + return location; + } +}); + +/* + * Incomplete. A WORK IN PROGRESS + * Needs two points with associated weights and the next point with weight in order to determine the join angles. May need to + * include angles as well... + */ +L.WeightedLineSegment = L.Path.extend({ + initialize: function (weightedPoint1, weightedPoint2, options) { + L.Path.prototype.initialize.call(this, options); + + L.Util.setOptions(this, options); + + this._weightedPoint1 = weightedPoint1; + this._weightedPoint2 = weightedPoint2; + this._latlngs = []; + }, + + projectLatlngs: function () { + this._points = this._getPoints(); + + if (typeof this.options.fill !== 'undefined' && this.options.fill && this.options.gradient) { + this._setGradient(); + } + }, + + _setGradient: function () { + var p1 = this._points[1]; + var p2 = this._points[4]; + + var deltaX = p2.x - p1.x; + var deltaY = p2.y - p1.y; + + if (deltaX != 0 || deltaY != 0) { + var angle = Math.atan(deltaY/deltaX); + var directionX = deltaX/Math.abs(deltaX); + var directionY = deltaY/Math.abs(deltaY); + + var p1 = new L.Point(50 + 50 * Math.cos(angle + Math.PI), 50 + 50 * Math.sin(angle + Math.PI)); + var p2 = new L.Point(50 + 50 * Math.cos(angle), 50 + 50 * Math.sin(angle)); + + if (directionX < 0) { + var temp = p1; + p1 = p2; + p2 = temp; + } + + var color1 = this.options.weightToColor ? this.options.weightToColor.evaluate(this._weightedPoint1.weight) : null; + var color2 = this.options.weightToColor ? this.options.weightToColor.evaluate(this._weightedPoint2.weight) : null; + var opacity1 = this.options.weightToOpacity ? this.options.weightToOpacity.evaluate(this._weightedPoint1.weight) : 1; + var opacity2 = this.options.weightToOpacity ? this.options.weightToOpacity.evaluate(this._weightedPoint2.weight) : 1; + + this.options.gradient = { + vector: [[p1.x.toFixed(2) + '%', p1.y.toFixed(2) + '%'],[p2.x.toFixed(2) + '%', p2.y.toFixed(2) + '%']], + stops: [ + { + offset: '0%', + style: { + color: color1, + opacity: opacity1 + } + }, + { + offset: '100%', + style: { + color: color2, + opacity: opacity2 + } + } + ] + } + + this.setStyle(this.options); + } + }, + + _weightedPointToPoint: function (weightedPoint) { + var points = []; + + this._latlngs.push(weightedPoint.latlng); + + var point1 = this._map.latLngToLayerPoint(weightedPoint.latlng); + + var weight = weightedPoint.weight; + var angle1 = weightedPoint.angle; + var angle2 = angle1 + Math.PI; + var coord1 = new L.Point(point1.x + Math.cos(angle1) * weight, point1.y + Math.sin(angle1) * weight); + var coord2 = new L.Point(point1.x + Math.cos(angle2) * weight, point1.y + Math.sin(angle2) * weight); + + points = [coord1, point1, coord2]; + + return points; + }, + + _getPoints: function () { + var points = []; + var points1 = this._weightedPointToPoint(this._weightedPoint1); + var points2 = this._weightedPointToPoint(this._weightedPoint2); + + var line0 = new L.LinearFunction(points1[0], points2[0]); + var line1 = new L.LinearFunction(points1[1], points2[1]); + var line2 = new L.LinearFunction(points1[2], points2[2]); + + // TODO: Make this an angled or curved polygon if the angle difference is greater than some value + // Interpolate the weight and get the mid point angle + var intersectionPoint = line2.getIntersectionPoint(line0); + var bounds = new L.Bounds([].concat(points1, points2)); + + if (intersectionPoint) { + if (!bounds.contains(intersectionPoint)) { + points2 = points2.reverse(); + } + } + else if (line0._slope === line2._slope) { + points2 = points2.reverse(); + } + + points = points.concat(points1, points2); + + line0 = null; + line1 = null; + line2 = null; + intersectionPoint = null; + + return points; + }, + + getBounds: function () { + var bounds = new L.LatLngBounds(); + var point; + + for (var i = 0; i < this._latlngs.length; ++i) { + bounds.extend(this._latlngs[i]); + } + + return bounds; + }, + + getPathString: function () { + return new L.SVGPathBuilder(this._points, []).build(6); + } +}); + +/* + * Incomplete - A WORK IN PROGRESS + * Takes a set of weighted points as input. Iterates through those points, creating WeightedLineSegment + * objects. + */ +L.WeightedPolyline = L.FeatureGroup.extend({ + initialize: function (latlngs, options) { + L.FeatureGroup.prototype.initialize.call(this, options); + L.Util.setOptions(this, options); + this._latlngs = latlngs; + }, + + onAdd: function (map) { + L.LayerGroup.prototype.onAdd.call(this, map); + this._loadComponents(); + }, + + getBounds: function () { + var bounds = new L.LatLngBounds(); + + this.eachLayer(function (layer) { + bounds.extend(layer.getBounds ? layer.getBounds() : layer.getLatLng()); + }); + + return bounds; + }, + + setLatLngs: function (latlngs) { + this._latlngs = latlngs; + this._loadComponents(); + this.redraw(); + }, + + getLatLngs: function () { + return this._latlngs; + }, + + options: { + weightToColor: new L.HSLHueFunction([0, 120], [20, -30]) + }, + + _getAngle: function (p1, p2) { + var point1 = this._map.latLngToLayerPoint(p1); + var point2 = this._map.latLngToLayerPoint(p2); + var deltaX = point2.x - point1.x; + var deltaY = point2.y - point1.y; + var angleRadians = Math.atan(deltaY/deltaX); + + return angleRadians; + }, + + _getAngles: function (p1, p2) { + var angleRadians = this._getAngle(p1, p2); + + if (isNaN(angleRadians)) { + angleRadians = 0; //Math.PI/2; + } + + var angle1 = angleRadians + Math.PI/2; + var angle2 = angle1 + Math.PI; + + return [angle1, angle2]; + }, + + // TODO: Move some of these calculations to the WeightedLineSegment class - specifically angle calculation + _loadComponents: function () { + var angles = []; + var p1 = this._latlngs[0]; + var p2 = this._latlngs[1]; + var angleValues = this._getAngles(p1, p2); + + if (angleValues.length > 0) { + angles.push({ + latlng: p1, + angle: angleValues[0], + weight: p1.weight + }); + + for (var i = 1; i < this._latlngs.length - 1; ++i) { + p1 = this._latlngs[i]; + p2 = this._latlngs[i + 1]; + + // LatLngs to layer coords + angleValues = this._getAngles(p1, p2); + + angles.push({ + latlng: p1, + angle: angleValues[0], + weight: p1.weight + }); + + this.addLayer(new L.WeightedLineSegment(angles[0], angles[1], this.options)); + + angles = angles.slice(1); + } + + p1 = L.extend({}, p2); + p2 = this._latlngs[this._latlngs.length - 1]; + + angles.push({ + latlng: p1, + angle: angles[0].angle, + weight: p2.weight + }); + + this.addLayer(new L.WeightedLineSegment(angles[0], angles[1], this.options)); + } + } +}); + +L.weightedPolyline = function (latlngs, options) { + return new L.WeightedPolyline(latlngs, options); +}; + +/* + * Incomplete - A WORK IN PROGRESS + * Takes an array of of values (degrees for each slice), an array of fillColors (color for each level of the stack), and an array for each one of the options.data (must have the same length for each) + */ +L.StackedPieChartMarker = L.ChartMarker.extend({ + initialize: function(centerLatLng, options) { + L.Util.setOptions(this, options); + L.ChartMarker.prototype.initialize.call(this, centerLatLng, options); + }, + + options: { + weight: 1, + opacity: 1, + color: "#000", + fill: true, + radius: 10, + rotation: 0, + numberOfSides: 50, + mouseOverExaggeration: 1.2, + maxDegrees: 360, + iconSize: new L.Point(50, 40) + }, + + _loadComponents: function() { + var value; + var allValueMax = 0; + var scale = 1; + var sum = 0; + var angle = 0; + var percentage = 0; + var radius = this.options.radius; + var barThickness = this.options.barThickness; + var maxDegrees = this.options.maxDegrees || 360; + var lastAngle = 0;//this.options.rotation; + var bar; + var options = this.options; + var dataPoint; + var data = this.options.data; + var chartOptions = this.options.chartOptions; + var chartOption; + var key; + var getValue = function(data, key) { + var value = 0; + if (data[key]) { + value = parseFloat(data[key]); + } + return value; + }; + var j = 0; + var dataValueSum = []; + var dataScale = []; + for (key in data) { + value = getValue(data, key); + //sum += value; + var valueSum = 0; + for(var i = 0; i < data[key].length; ++i){ + value = parseFloat(data[key][i]); + valueSum += value; + } + dataValueSum.push(valueSum); + dataScale.push(options.barThickness / valueSum); + allValueMax = (allValueMax > valueSum) ? allValueMax : valueSum; + sum += options.values[j]; + ++j; + } + scale = options.barThickness / allValueMax; + if (sum > 0) { + circle = new L.CircleMarker(this._latlng, { + color: options.color, + radius: barThickness, + fillColor: options.fillColor, + fill:true, + iconSize: new L.Point(50, 40) + }); + this._bindMouseEvents(circle); + this.addLayer(circle); + + var j = 0; + for (key in data) { + var valueSum = 0.0; + percentage = options.values[j]/sum; + angle = percentage * maxDegrees; + options.startAngle = lastAngle; + options.endAngle = lastAngle + angle; + for(var i = 0; i < data[key].length; ++i){ + value = parseFloat(data[key][i]); + + valueSum += value; + options.radius = valueSum * dataScale[j]; + options.barThickness = value * dataScale[j]; + + chartOption = chartOptions[key]; + options.fillColor = this.options.fillColors[i]; + if(options.fillColor == 'transparent') + options.fillOpacity = 0.0; + else + options.fillOpacity = 1.0; + options.color = chartOption.color || "#000"; + options.radiusX = options.radius; + options.radiusY = options.radius; + options.rotation = 0; + options.key = key + ' ' + i; + options.value = value; + options.displayName = chartOption.displayName; + options.displayText = chartOption.displayText; + bar = new L.RadialBarMarker(this._latlng, options); + this._bindMouseEvents(bar); + this.addLayer(bar); + } + lastAngle = options.endAngle; + j++; + } + for(var i = 0.2; i < 1.0; i+=0.2){ + circle = new L.CircleMarker(this._latlng, { + value: i, + color: options.color, + radius: barThickness*i, + weight: 1, + dashArray: [5,5], + fill:false, + iconSize: new L.Point(50, 40), + displayName: "percent", + displayText: function(v){ return parseInt(100*v)+"%";} + }); + this._bindMouseEvents(circle); + this.addLayer(circle); + } + } + } +}); + +L.stackedPieChartMarker = function(centerLatLng, options) { + return new L.StackedPieChartMarker(centerLatLng, options); +}; + +/** + * + */ +L.LayeredRegularPolygonMarker = L.MarkerGroup.extend({ + options: { + levels: 2, + numberOfSides: 50 + }, + + setStyle: function (options) { + // TODO: Implement this + options.levels = options.levels || 2; + var markers = []; + var radiusX = options.radiusX || options.radius; + var radiusY = options.radiusY || options.radius; + var radiusXOffset = radiusX / (0.75 * options.levels); + var radiusYOffset = radiusY / (0.75 * options.levels); + var markerOptions = L.extend({}, options); + + radiusX = radiusX + (options.levels - 1) * radiusXOffset; + radiusY = radiusY + (options.levels - 1) * radiusYOffset; + + var fillOpacity = options.fillOpacity || 0.5; + var fillOpacityOffset = options.fillOpacity / (1.5 * options.levels); + + fillOpacity = fillOpacity - options.levels * fillOpacityOffset; + + for (var i = 0; i < options.levels; ++i) { + markerOptions.radius = 0; + markerOptions.radiusX = radiusX; + markerOptions.radiusY = radiusY; + markerOptions.fillOpacity = fillOpacity; + + this._markers[i].setStyle(markerOptions); + + radiusX -= radiusXOffset; + radiusY -= radiusYOffset; + fillOpacity += fillOpacityOffset; + } + + return this; + }, + + initialize: function (latlng, options) { + L.Util.setOptions(this, options); + + options.levels = options.levels || 2; + var markers = []; + var radiusX = options.radiusX || options.radius; + var radiusY = options.radiusY || options.radius; + var radiusXOffset = radiusX / (0.75 * options.levels); + var radiusYOffset = radiusY / (0.75 * options.levels); + var markerOptions = L.extend({}, options); + + radiusX = radiusX + (options.levels - 1) * radiusXOffset; + radiusY = radiusY + (options.levels - 1) * radiusYOffset; + + var fillOpacity = options.fillOpacity || 0.5; + var fillOpacityOffset = options.fillOpacity / (1.5 * options.levels); + + fillOpacity = fillOpacity - options.levels * fillOpacityOffset; + + for (var i = 0; i < options.levels; ++i) { + markerOptions.radius = 0; + markerOptions.radiusX = radiusX; + markerOptions.radiusY = radiusY; + markerOptions.fillOpacity = fillOpacity; + + markers.push(new L.RegularPolygonMarker(latlng, markerOptions)); + + radiusX -= radiusXOffset; + radiusY -= radiusYOffset; + fillOpacity += fillOpacityOffset; + } + + this._markers = markers; + + L.MarkerGroup.prototype.initialize.call(this, latlng, markers); + } +}); + + diff --git a/assets/js/sig/dvf/leaflet.dvf.linearfunctions.js b/assets/js/sig/dvf/leaflet.dvf.linearfunctions.js new file mode 100755 index 0000000000000000000000000000000000000000..3cf9a4fe039f766dd6e350911cd50f0cb29b05f2 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.linearfunctions.js @@ -0,0 +1,565 @@ +/* + * Class for interpolating values along a line using a linear equation + */ +L.LinearFunction = L.Class.extend({ + initialize: function (minPoint, maxPoint, options) { + this.setOptions(options); + this.setRange(minPoint, maxPoint); + }, + + _calculateParameters: function (minPoint, maxPoint) { + if (this._xRange === 0) { + this._slope = 0; + this._b = minPoint.y; + } + else { + this._slope = (maxPoint.y - minPoint.y) / this._xRange; + this._b = minPoint.y - this._slope * minPoint.x; + } + }, + + _arrayToPoint: function (array) { + return { + x: array[0], + y: array[1] + } + }, + + setOptions: function (options) { + L.Util.setOptions(this, options); + + this._preProcess = this.options.preProcess; + this._postProcess = this.options.postProcess; + }, + + getBounds: function () { + var minX = Math.min(this._minPoint.x, this._maxPoint.x); + var maxX = Math.max(this._minPoint.x, this._maxPoint.x); + var minY = Math.min(this._minPoint.y, this._maxPoint.y); + var maxY = Math.max(this._minPoint.y, this._maxPoint.y); + + return [new L.Point(minX, minY), new L.Point(maxX, maxY)]; + }, + + setRange: function (minPoint, maxPoint) { + minPoint = minPoint instanceof Array ? this._arrayToPoint(minPoint) : minPoint; + maxPoint = maxPoint instanceof Array ? this._arrayToPoint(maxPoint) : maxPoint; + + this._minPoint = minPoint; + this._maxPoint = maxPoint; + this._xRange = maxPoint.x - minPoint.x; + + this._calculateParameters(minPoint, maxPoint); + + return this; + }, + + setMin: function (point) { + this.setRange(point, this._maxPoint); + + return this; + }, + + setMax: function (point) { + this.setRange(this._minPoint, point); + + return this; + }, + + setPreProcess: function (preProcess) { + this._preProcess = preProcess; + + return this; + }, + + setPostProcess: function (postProcess) { + this._postProcess = postProcess; + + return this; + }, + + evaluate: function (x) { + var y; + + if (this._preProcess) { + x = this._preProcess(x); + } + + // Call toFixed to ensure that both numbers being added are using the same precision + y = Number((this._slope * x).toFixed(6)) + Number(this._b.toFixed(6)); + + if (this._postProcess) { + y = this._postProcess(y); + } + + return y; + }, + + random: function () { + var randomX = Math.random() * this._xRange + this._minPoint.x; + + return this.evaluate(randomX); + }, + + sample: function (count) { + count = Math.max(count, 2); + + var segmentCount = count - 1; + var segmentSize = this._xRange / segmentCount; + var x = this._minPoint.x; + var yValues = []; + + while (x <= this._maxPoint.x) { + yValues.push(this.evaluate(x)); + + x += segmentSize; + } + + return yValues; + }, + + samplePoints: function (count) { + count = Math.max(count, 2); + + var segmentCount = count - 1; + var segmentSize = this._xRange / segmentCount; + var x = this._minPoint.x; + var points = [] + + while (x <= this._maxPoint.x) { + points.push(new L.Point(x, this.evaluate(x))); + + x += segmentSize; + } + + return points; + }, + + getIntersectionPoint: function (otherFunction) { + var point = null; + + if (this._slope !== otherFunction._slope) { + var x = (this._b - otherFunction._b)/(otherFunction._slope - this._slope) + var y = this.evaluate(x); + + point = new L.Point(x, y); + } + + return point; + } + +}); + +/* + * A linear function that outputs a color value - used to vary color proportionally to some data property value + */ +L.ColorFunction = L.LinearFunction.extend({ + options: { + alpha: 1.0, + includeAlpha: false + }, + + initialize: function (minPoint, maxPoint, options) { + L.Util.setOptions(this, options); + + // Order of output parts (e.g., ['r','g','b']) + this._parts = []; + + // Part of the output that's dynamic (e.g. 'r') + this._dynamicPart = null; + this._outputPrecision = 0; + + // Output prefix (e.g. rgb, hsl, etc.) + this._prefix = null; + + // Override this as necessary + this._formatOutput = function (y) { + return y.toFixed(this._outputPrecision); + }, + + this._mapOutput = function (parts) { + var outputParts = []; + + for (var i = 0; i < this._parts.length; ++i) { + var part = this._parts[i]; + outputParts.push(parts[part]); + } + + if (this.options.includeAlpha) { + outputParts.push(this.options.alpha); + } + + return outputParts; + }; + + this._getColorString = function (y) { + y = this._formatOutput(y); + + this.options[this._dynamicPart] = y; + + var parts = this._mapOutput(this.options); + + return this._writeColor(this._prefix, parts); + }; + + this._writeColor = function (prefix, parts) { + if (this.options.includeAlpha) { + prefix += 'a'; + } + + return prefix + '(' + parts.join(',') + ')'; + }; + + options = this.options; + + var postProcess = function (y) { + if (options && options.postProcess) { + y = options.postProcess.call(this, y); + } + + var colorString = this._getColorString(y); + + if (((L.Browser.ie) && colorString.indexOf('hsl') > -1) || options.rgb) { + colorString = L.hslColor(colorString).toRGBString(); + } + + return colorString; + }; + + L.LinearFunction.prototype.initialize.call(this, minPoint, maxPoint, { + preProcess: this.options.preProcess, + postProcess: postProcess + }); + } +}); + +L.HSLColorFunction = L.ColorFunction.extend({ + initialize: function (minPoint, maxPoint, options) { + L.ColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._parts = ['outputHue', 'outputSaturation', 'outputLuminosity']; + this._prefix = 'hsl'; + this._outputPrecision = 2; + } +}); + +L.RGBColorFunction = L.ColorFunction.extend({ + initialize: function (minPoint, maxPoint, options) { + L.ColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._parts = ['outputRed', 'outputBlue', 'outputGreen']; + this._prefix = 'rgb'; + this._outputPrecision = 0; + } +}); + +L.RGBRedFunction = L.LinearFunction.extend({ + + options: { + outputGreen: 0, + outputBlue: 0 + }, + + initialize: function (minPoint, maxPoint, options) { + L.RGBColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._dynamicPart = 'outputRed'; + } +}); + +/* + * + */ +L.RGBBlueFunction = L.LinearFunction.extend({ + + options: { + outputRed: 0, + outputGreen: 0 + }, + + initialize: function (minPoint, maxPoint, options) { + L.RGBColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._dynamicPart = 'outputBlue'; + } +}); + +/* + * + */ +L.RGBGreenFunction = L.LinearFunction.extend({ + + options: { + outputRed: 0, + outputBlue: 0 + }, + + initialize: function (minPoint, maxPoint, options) { + L.RGBColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._dynamicPart = 'outputGreen'; + } +}); + +/* + * Produces a gradient between two RGB colors. The colors are specified as rgb arrays (e.g. [255, 0, 255]) or rgb strings + */ +L.RGBColorBlendFunction = L.LinearFunction.extend({ + initialize: function (minX, maxX, rgbMinColor, rgbMaxColor) { + rgbMinColor = new L.RGBColor(rgbMinColor); + rgbMaxColor = new L.RGBColor(rgbMaxColor); + var red1 = rgbMinColor.r(); + var red2 = rgbMaxColor.r(); + var green1 = rgbMinColor.g(); + var green2 = rgbMaxColor.g(); + var blue1 = rgbMinColor.b(); + var blue2 = rgbMaxColor.b(); + + this._minX = minX; + this._maxX = maxX; + + this._redFunction = new L.LinearFunction(new L.Point(minX, red1), new L.Point(maxX, red2)); + this._greenFunction = new L.LinearFunction(new L.Point(minX, green1), new L.Point(maxX, green2)); + this._blueFunction = new L.LinearFunction(new L.Point(minX, blue1), new L.Point(maxX, blue2)); + }, + + getBounds: function () { + var redBounds = this._redFunction.getBounds(); + var greenBounds = this._greenFunction.getBounds(); + var blueBounds = this._blueFunction.getBounds(); + + var minY = Math.min(redBounds[0].y, greenBounds[0].y, blueBounds[0].y); + var maxY = Math.max(redBounds[0].y, greenBounds[0].y, blueBounds[0].y); + + return [new L.Point(redBounds[0].x, minY), new L.Point(redBounds[1].x, maxY)]; + }, + + evaluate: function (x) { + return new L.RGBColor([this._redFunction.evaluate(x), this._greenFunction.evaluate(x), this._blueFunction.evaluate(x)]).toRGBString(); + } +}); + + + +/* + * Class for varying the hue linearly and producing an HSL color value + */ +L.HSLHueFunction = L.HSLColorFunction.extend({ + + options: { + outputSaturation: '100%', + outputLuminosity: '50%' + }, + + initialize: function (minPoint, maxPoint, options) { + L.HSLColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._dynamicPart = 'outputHue'; + } +}); + +/* + * Class for varying the saturation linearly and producing an HSL color value + */ +L.HSLSaturationFunction = L.LinearFunction.extend({ + + options: { + outputHue: 0, + outputLuminosity: '50%' + }, + + initialize: function (minPoint, maxPoint, options) { + L.HSLColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._formatOutput = function (y) { + return (y * 100).toFixed(this._outputPrecision) + '%'; + }; + + this._dynamicPart = 'outputSaturation'; + } +}); + +/* + * Class for varying the luminosity linearly and producing an HSL color value + */ +L.HSLLuminosityFunction = L.LinearFunction.extend({ + + options: { + outputHue: 0, + outputSaturation: '100%' + }, + + initialize: function (minPoint, maxPoint, options) { + L.HSLColorFunction.prototype.initialize.call(this, minPoint, maxPoint, options); + + this._formatOutput = function (y) { + return (y * 100).toFixed(this._outputPrecision) + '%'; + }; + + this._dynamicPart = 'outputLuminosity'; + } +}); + +/* + * Produces a gradient between two HSL colors + */ +L.HSLColorBlendFunction = L.LinearFunction.extend({ + initialize: function (minX, maxX, hslMinColor, hslMaxColor) { + hslMinColor = new L.HSLColor(hslMinColor); + hslMaxColor = new L.HSLColor(hslMaxColor); + var h1 = hslMinColor.h(); + var h2 = hslMaxColor.h(); + var s1 = hslMinColor.s(); + var s2 = hslMaxColor.s(); + var l1 = hslMinColor.l(); + var l2 = hslMaxColor.l(); + + this._minX = minX; + this._maxX = maxX; + + this._hueFunction = new L.LinearFunction(new L.Point(minX, h1), new L.Point(maxX, h2)); + this._saturationFunction = new L.LinearFunction(new L.Point(minX, s1), new L.Point(maxX, s2)); + this._luminosityFunction = new L.LinearFunction(new L.Point(minX, l1), new L.Point(maxX, l2)); + }, + + getBounds: function () { + var hBounds = this._hueFunction.getBounds(); + var sBounds = this._saturationFunction.getBounds(); + var lBounds = this._luminosityFunction.getBounds(); + + var minY = Math.min(hBounds[0].y, sBounds[0].y, lBounds[0].y); + var maxY = Math.max(hBounds[0].y, sBounds[0].y, lBounds[0].y); + + return [new L.Point(hBounds[0].x, minY), new L.Point(hBounds[1].x, maxY)]; + }, + + evaluate: function (x) { + return new L.HSLColor([this._hueFunction.evaluate(x), this._saturationFunction.evaluate(x), this._luminosityFunction.evaluate(x)]).toHSLString(); + } +}); + +/* + * Allows you to combine multiple linear functions into a single linear function + */ +L.PiecewiseFunction = L.LinearFunction.extend({ + initialize: function (functions, options) { + + L.Util.setOptions(this, options); + + this._functions = functions; + + var startPoint; + var endPoint; + + startPoint = functions[0].getBounds()[0]; + endPoint = functions[functions.length - 1].getBounds()[1]; + + L.LinearFunction.prototype.initialize.call(this, startPoint, endPoint, { + preProcess: this.options.preProcess, + postProcess: this.options.postProcess + }); + }, + + _getFunction: function (x) { + var bounds; + var startPoint; + var endPoint; + var found = false; + var currentFunction; + + for (var index = 0; index < this._functions.length; ++index) { + currentFunction = this._functions[index]; + bounds = currentFunction.getBounds(); + + startPoint = bounds[0]; + endPoint = bounds[1]; + + if (x >= startPoint.x && x < endPoint.x) { + found = true; + break; + } + } + + // If found return the found function; otherwise return the last function + return found ? currentFunction : this._functions[this._functions.length - 1]; + }, + + evaluate: function (x) { + var currentFunction; + var y = null; + + if (this._preProcess) { + x = this._preProcess(x); + } + + currentFunction = this._getFunction(x); + + if (currentFunction) { + y = currentFunction.evaluate(x); + + if (this._postProcess) { + y = this._postProcess(y); + } + } + + return y; + } +}); + +L.CustomColorFunction = L.PiecewiseFunction.extend({ + options: { + interpolate: true + }, + + initialize: function (minX, maxX, colors, options) { + var range = maxX - minX; + var xRange = range/(colors.length - 1); + var functions = []; + var colorFunction; + + L.Util.setOptions(this, options); + + for (var i = 0; i < colors.length; ++i) { + var next = Math.min(i + 1, colors.length - 1); + colorFunction = this.options.interpolate ? new L.RGBColorBlendFunction(minX + xRange * i, minX + xRange * next, colors[i], colors[next]) : new L.RGBColorBlendFunction(minX + xRange * i, minX + xRange * next, colors[i], colors[i]); + + functions.push(colorFunction); + } + + L.PiecewiseFunction.prototype.initialize.call(this, functions); + } +}); + + +L.CategoryFunction = L.Class.extend({ + initialize: function (categoryMap, options) { + + L.Util.setOptions(this, options); + + this._categoryKeys = Object.keys(categoryMap); + this._categoryMap = categoryMap; + + this._preProcess = this.options.preProcess; + this._postProcess = this.options.postProcess; + }, + + evaluate: function (x) { + var y; + + if (this._preProcess) { + x = this._preProcess(x); + } + + y = this._categoryMap[x]; + + if (this._postProcess) { + y = this._postProcess(y); + } + + return y; + }, + + getCategories: function () { + return this._categoryKeys; + } +}); \ No newline at end of file diff --git a/assets/js/sig/dvf/leaflet.dvf.lines.js b/assets/js/sig/dvf/leaflet.dvf.lines.js new file mode 100755 index 0000000000000000000000000000000000000000..1798b3afa2a21c049ae04a4f4150e8546b708524 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.lines.js @@ -0,0 +1,513 @@ +/* + * + */ +L.CalloutLine = L.Path.extend({ + statics: { + LINESTYLE: { + ARC: 'arc', + ANGLE: 'angle', + STRAIGHT: 'straight' + }, + DIRECTION: { + NE: 'ne', + NW: 'nw', + SE: 'se', + SW: 'sw' + } + } +}); + +L.CalloutLine = L.CalloutLine.extend({ + initialize: function (latlng, options) { + L.Util.setOptions(this, options); + L.Path.prototype.initialize.call(this, options); + this._latlng = latlng; + }, + + options: { + size: new L.Point(60, 30), + position: new L.Point(0, 0), + color: '#FFFFFF', + opacity: 1, + weight: 2, + fillColor: '#000000', + fill: false, + gradient: false, + dropShadow: false, + direction: L.CalloutLine.DIRECTION.NE, + lineStyle: L.CalloutLine.LINESTYLE.ANGLE, + lineCap: 'butt', + lineJoin: 'miter', + arrow: false + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + }, + + getEndPoint: function () { + this.projectLatlngs(); + + return this._points[this._points.length - 1]; + }, + + _getPathAngle: function () { + return new L.SVGPathBuilder(this._points, [], { + closePath: false + }).build(6); + }, + + _getPathArc: function () { + var direction = (this.options.direction || L.CalloutLine.DIRECTION.NE).toLowerCase(); + var yDirection = direction[0]; + var yMultiplier = yDirection === 'n' ? -1 : 1; + var point1 = this._points[0]; + var point2 = this._points[this._points.length - 1]; + + var parts = ['M', point1.x, ',', point1.y, ' Q', point1.x, ',', point1.y + yMultiplier * this.options.size.y, ' ', point2.x, ',', point2.y]; + + return parts.join(' '); + }, + + _getPoints: function () { + var x = this._point.x + this.options.position.x; + var y = this._point.y + this.options.position.y; + var width = this.options.size.x; + var height = this.options.size.y; + var direction = (this.options.direction || L.CalloutLine.DIRECTION.NE).toLowerCase(); + + var points = []; + var xDirection = direction[1]; + var yDirection = direction[0]; + + var xMultiplier = xDirection === 'w' ? -1 : 1; + var yMultiplier = yDirection === 'n' ? -1 : 1; + + points.push(new L.Point(x, y)); + + var yEnd = y + yMultiplier * height; + var halfWidth = width / 2; + + var angle = Math.atan(height / halfWidth); + + if (this.options.lineStyle === L.CalloutLine.LINESTYLE.ARC) { + angle = Math.atan(Math.pow(height, 2) / halfWidth); + } + else if (this.options.lineStyle === L.CalloutLine.LINESTYLE.STRAIGHT) { + angle = Math.atan(height/ width); + } + + this._angle = angle; + + if (this.options.lineStyle !== L.CalloutLine.LINESTYLE.STRAIGHT) { + var elbowPoint = new L.Point(x + xMultiplier * halfWidth, yEnd); + + points.push(elbowPoint); + } + + var endPoint = new L.Point(x + xMultiplier * width, yEnd); + + points.push(endPoint); + + return points; + }, + + getBounds: function () { + var map = this._map, + point = map.project(this._latlng), + swPoint = new L.Point(point.x + this.options.position.x, point.y + this.options.position.y), + nePoint = new L.Point(swPoint.x + this.options.size.x, swPoint.y - this.options.size.y), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + this.redraw(); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + this._path.setAttribute('shape-rendering', 'geometricPrecision'); + + var lineStyle = this.options.lineStyle || L.CalloutLine.LINESTYLE.ANGLE; + var path = ''; + + if (lineStyle === L.CalloutLine.LINESTYLE.ANGLE || lineStyle === L.CalloutLine.LINESTYLE.STRAIGHT) { + path += this._getPathAngle(); + } + else { + path += this._getPathArc(); + } + + return path; + } +}); + +L.calloutLine = function (latlng, options) { + return new L.CalloutLine(latlng, options); +}; + +/* + * + */ +L.Callout = L.LayerGroup.extend({ + options: { + color: '#FFFFFF', + fillColor: '#FFFFFF' + }, + + initialize: function (latlng, options) { + L.Util.setOptions(this, options); + + L.LayerGroup.prototype.initialize.call(this, options); + + this._latlng = latlng; + }, + + onAdd: function (map) { + L.LayerGroup.prototype.onAdd.call(this, map); + + this.addLayers(); + }, + + onRemove: function (map) { + L.LayerGroup.prototype.onRemove.call(this, map); + + this.clearLayers(); + }, + + addArrow: function (angle, direction, position) { + if (this.options.arrow) { + var angle = L.LatLng.RAD_TO_DEG * angle; + var numberOfSides = this.options.numberOfSides || 3; + var radius = this.options.radius || 6; + + var startRotation = 180 / numberOfSides; + + var offsets = { + se: startRotation + angle, + sw: 180 + startRotation - angle, + nw: 180 + startRotation + angle, + ne: startRotation - angle + }; + + var rotation = offsets[direction]; + + var arrow = new L.RegularPolygonMarker(this._latlng, { + position: position, + numberOfSides: numberOfSides, + rotation: rotation, + fillColor: this.options.fillColor, + color: this.options.color, + gradient: this.options.gradient, + weight: this.options.weight, + opacity: this.options.opacity, + fillOpacity: this.options.fillOpacity, + radius: radius, + lineCap: 'butt', + lineJoin: 'miter' + }); + + this.addLayer(arrow); + } + }, + + addLine: function () { + var lineOptions = {}; + + for (var key in this.options) { + if (key !== 'icon') { + lineOptions[key] = this.options[key]; + } + } + + var calloutLine = new L.CalloutLine(this._latlng, lineOptions); + + this.addLayer(calloutLine); + + return calloutLine; + }, + + addIcon: function (direction, position) { + var size = this.options.size; + var icon = this.options.icon; + var iconSize = icon.options.iconSize; + + var yDirection = direction[0]; + var xDirection = direction[1]; + + var xAnchor = xDirection === 'w' ? iconSize.x + size.x - position.x : -1 * (size.x + position.x); + var yAnchor = yDirection === 'n' ? iconSize.y/2 + size.y - position.y : -1 * (-iconSize.y/2 + size.y + position.y); + + icon.options.iconAnchor = new L.Point(xAnchor, yAnchor); + + var iconMarker = new L.Marker(this._latlng, { + icon: icon + }); + + this.addLayer(iconMarker); + }, + + addLayers: function () { + var direction = (this.options.direction || 'ne').toLowerCase(); + var position = this.options.position || new L.Point(0, 0); + var calloutLine; + + calloutLine = this.addLine(); + + this.addIcon(direction, position); + + this.addArrow(calloutLine._angle, direction, position); + } +}); + +L.callout = function (latlng, options) { + return new L.Callout(latlng, options); +}; + + +L.FlowLine = L.DataLayer.extend({ + statics: { + LINE_FUNCTION: function (latlng1, latlng2, options) { + return new L.Polyline([latlng1, latlng2], options); + }, + LINE_FUNCTION_INTERPOLATED: function (latlng1, latlng2, options) { + var point1 = this._map.latlngToLayerPoint(latlng1); + var point2 = this._map.latlngToLayerPoint(latlng2); + var lineFunction = new L.LinearFunction(point1, point2); + + var numPoints = Math.ceil(point1.distanceTo(point2)/options.interpolationOptions.segmentLength); + var points = lineFunction.samplePoints(numPoints); + + // Need the passed in records in order to interpolate record field values + // TODO: Implement this + } + } +}); + +/* + * + */ +L.FlowLine = L.FlowLine.extend({ + initialize: function (data, options) { + L.Util.setOptions(this, options); + L.DataLayer.prototype.initialize.call(this, data, options); + }, + + options: { + getLine: L.FlowLine.LINE_FUNCTION + }, + + onEachSegment: function (record1, record2, line) { + var deltas = {}; + + if (this.options.timeField) { + var timeValue1 = L.Util.getFieldValue(record1, this.options.timeField); + var timeValue2 = L.Util.getFieldValue(record2, this.options.timeField); + var format = this.options.timeFormat; + + var moment1 = format ? moment(timeValue1, format) : moment(timeValue1); + var moment2 = format ? moment(timeValue2, format) : moment(timeValue2); + var deltaTime = moment2.valueOf() - moment1.valueOf(); // in milliseconds + + deltas.time = deltaTime; + } + + for (var key in this.options.displayOptions) { + var value1 = L.Util.getFieldValue(record1, key); + var value2 = L.Util.getFieldValue(record2, key); + var change = value2 - value1; + var percentChange = (change / value1) * 100; + + deltas[key] = { + from: value1, + to: value2, + change: change, + percentChange: percentChange + }; + + if (deltas.time) { + deltas[key].changeOverTime = change/deltas.time; + } + } + + var latlngs = line.getLatLngs(); + var distance = latlngs[0].distanceTo(latlngs[1]); + var velocity; + + if (deltas.time) { + velocity = distance/(deltas.time * 1000); + } + + if (this.options.onEachSegment) { + this.options.onEachSegment.call(this, record1, record2, line, deltas, distance, velocity); + } + }, + + _loadRecords: function (records) { + var markers = []; + + this._lastRecord = null; + + for (var recordIndex in records) { + if (records.hasOwnProperty(recordIndex)) { + var record = records[recordIndex]; + + markers = this._addRecord(record, recordIndex, markers); + } + } + + while (markers.length > 0) { + this.addLayer(markers.pop()); + } + }, + + addRecord: function (record) { + this._addRecord(record); + + return this; + }, + + _addRecord: function (record, recordIndex, markers) { + var location = this._getLocation(record, recordIndex); + var options = this.options.layerOptions; + + if (location) { + var marker = this._getLayer(location, options, record); + var line; + + var includeLayer = true; + + if (this.options.includeLayer) { + includeLayer = this.options.includeLayer(record); + } + + if (this._lastRecord && includeLayer) { + + var options = this._getDynamicOptions(this._lastRecord); + + line = this.options.getLine.call(this, this._lastMarker.getLatLng(), marker.getLatLng(), options.layerOptions); + + this.addLayer(line); + + this.onEachSegment(this._lastRecord, record, line); + + }; + + if (includeLayer) { + this._lastRecord = record; + this._lastMarker = marker; + } + } + + return markers; + } +}); + +L.flowLine = function (data, options) { + return new L.FlowLine(data, options); +}; + +/* + * + */ +L.ArcedFlowLine = L.FlowLine.extend({ + options: { + getLine: function (latlng1, latlng2, options) { + return new L.ArcedPolyline([latlng1, latlng2], options); + } + }, + + initialize: function (data, options) { + L.FlowLine.prototype.initialize.call(this, data, options); + } +}); + +L.arcedFlowLine = function (data, options) { + return new L.ArcedFlowLine(data, options); +}; + +/* + * Custom arced polyline implementation. Draws segments as arcs rather than straight lines. + */ +L.ArcedPolyline = L.Path.extend({ + includes: TextFunctions, + + initialize: function (latlngs, options) { + L.Path.prototype.initialize.call(this, options); + this._latlngs = latlngs; + }, + + options: { + distanceToHeight: new L.LinearFunction([0, 5], [1000, 200]), + color: '#FFFFFF', + opacity: 1, + weight: 1, + fillColor: '#000000', + fill: false, + gradient: false, + dropShadow: false, + optimizeSpeed: false + }, + + projectLatlngs: function () { + this._points = []; + + for (var i = 0; i < this._latlngs.length; ++i) { + this._points.push(this._map.latLngToLayerPoint(this._latlngs[i])); + } + }, + + getBounds: function () { + var bounds = new L.LatLngBounds(); + + for (var i = 0; i < this._latlngs.length; ++i) { + bounds.extend(this._latlngs[i]); + } + + return bounds; + }, + + setLatLngs: function (latlngs) { + this._latlngs = latlngs; + this.redraw(); + }, + + getLatLngs: function () { + return this._latlngs; + }, + + drawSegment: function (point1, point2) { + var distance = Math.sqrt(Math.pow(point2.x - point1.x, 2) + Math.pow(point2.y - point1.y, 2)); + var heightOffset = this.options.distanceToHeight.evaluate(distance); + + var parts = ['M', point1.x, ',', point1.y, ' C', point1.x, ',', point1.y - heightOffset, ' ', point2.x, ',', point2.y - heightOffset, ' ', point2.x, ',', point2.y ]; + + return parts.join(' '); + }, + + getPathString: function () { + if (this.options.optimizeSpeed) { + this._path.setAttribute('shape-rendering', 'optimizeSpeed'); + } + + var parts = []; + + for (var i = 0; i < this._points.length - 1; ++i) { + parts.push(this.drawSegment(this._points[i], this._points[i + 1])); + } + + return parts.join('') ; + } +}); + +L.arcedPolyline = function (latlngs, options) { + return new L.ArcedPolyline(latlngs, options); +}; \ No newline at end of file diff --git a/assets/js/sig/dvf/leaflet.dvf.markers.js b/assets/js/sig/dvf/leaflet.dvf.markers.js new file mode 100755 index 0000000000000000000000000000000000000000..d499ffd974446777b332d891ff3a6bc3e3970f59 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.markers.js @@ -0,0 +1,1242 @@ +L.Path.XLINK_NS = 'http://www.w3.org/1999/xlink'; + +/* + * Functions that support displaying text on an SVG path + */ +var TextFunctions = TextFunctions || { + __updatePath: L.Path.prototype._updatePath, + + _updatePath: function () { + this.__updatePath.call(this); + + if (this.options.text) { + this._createText(this.options.text); + } + }, + + _initText: function () { + if (this.options.text) { + this._createText(this.options.text); + } + }, + + getTextAnchor: function () { + if (this._point) { + return this._point; + } + }, + + setTextAnchor: function (anchorPoint) { + if (this._text) { + this._text.setAttribute('x', anchorPoint.x); + this._text.setAttribute('y', anchorPoint.y); + } + }, + + _createText: function (options) { + if (this._text) { + this._container.removeChild(this._text); + } + + if (this._pathDef) { + this._defs.removeChild(this._pathDef); + } + + // Set element style + var setStyle = function (element, style) { + var styleString = ''; + + for (var key in style) { + styleString += key + ': ' + style[key] + ';'; + } + + element.setAttribute('style', styleString); + + return element; + }; + + // Set attributes for an element + var setAttr = function (element, attr) { + for (var key in attr) { + element.setAttribute(key, attr[key]); + } + + return element; + }; + + this._text = this._createElement('text'); + + var textNode = document.createTextNode(options.text); + + // If path is true, then create a textPath element and append it + // to the text element; otherwise, populate the text element with a text node + if (options.path) { + + var pathOptions = options.path; + + // Generate and set an id for the path - the textPath element will reference this id + var pathID = L.Util.guid(); + + var clonedPath = this._createElement('path'); + clonedPath.setAttribute('d', this._path.getAttribute('d')); + clonedPath.setAttribute('id', pathID); + + if (!this._defs) { + this._defs = this._createElement('defs'); + this._container.appendChild(this._defs); + } + + this._defs.appendChild(clonedPath); + this._pathDef = clonedPath; + + // Create the textPath element and add attributes to reference this path + var textPath = this._createElement('textPath'); + + if (pathOptions.startOffset) { + textPath.setAttribute('startOffset', pathOptions.startOffset); + } + + if (pathOptions.attr) { + setAttr(textPath, pathOptions.attr); + } + + if (pathOptions.style) { + setStyle(textPath, pathOptions.style); + } + + textPath.setAttributeNS(L.Path.XLINK_NS, 'xlink:href', '#' + pathID); + textPath.appendChild(textNode); + + // Add the textPath element to the text element + this._text.appendChild(textPath); + } + else { + this._text.appendChild(textNode); + var anchorPoint = this.getTextAnchor(); + this.setTextAnchor(anchorPoint); + } + + //className + if (options.className) { + this._text.setAttribute('class', options.className); + } + else { + this._text.setAttribute('class', 'leaflet-svg-text'); + } + + //attributes + if (options.attr) { + setAttr(this._text, options.attr); + } + + //style + if (options.style) { + setStyle(this._text, options.style); + } + + this._container.appendChild(this._text); + } +}; + +/* + * Functions that support additions to the basic SVG Path features provided by Leaflet + */ +var PathFunctions = PathFunctions || { + __updateStyle: L.Path.prototype._updateStyle, + + _createDefs: function () { + this._defs = this._createElement('defs'); + this._container.appendChild(this._defs); + }, + + _createGradient: function (options) { + if (!this._defs) { + this._createDefs(); + }; + + if (this._gradient) { + this._defs.removeChild(this._gradient); + } + + options = options !== true ? L.extend({}, options) : {}; + var gradientGuid = L.Util.guid(); + this._gradientGuid = gradientGuid; + + var gradient; + var gradientOptions; + if (options.gradientType == "radial") { + gradient = this._createElement("radialGradient"); + var gradientOptions = options.radial || { cx: '50%', cy: '50%', r: '50%', fx: '50%', fy: '50%' }; + } else { + gradient = this._createElement("linearGradient"); + var vector = options.vector || [ [ "0%", "0%" ], [ "100%", "100%" ] ]; + var gradientOptions = { + x1: vector[0][0], + x2: vector[1][0], + y1: vector[0][1], + y2: vector[1][1] + }; + } + gradientOptions.id = "grad" + gradientGuid; + + var stops = options.stops || [ + { + offset: '0%', + style: { + color: 'rgb(255, 255, 255)', + opacity: 1 + } + }, + { + offset: '60%', + style: { + color: this.options.fillColor || this.options.color, + opacity: 1 + } + } + ]; + + for (var key in gradientOptions) { + gradient.setAttribute(key, gradientOptions[key]); + } + + for (var i = 0; i < stops.length; ++i) { + var stop = stops[i]; + var stopElement = this._createElement('stop'); + + stop.style = stop.style || {}; + + for (var key in stop) { + var stopProperty = stop[key]; + + if (key === 'style') { + var styleProperty = ''; + + stopProperty.color = stopProperty.color || (this.options.fillColor || this.options.color); + stopProperty.opacity = typeof stopProperty.opacity === 'undefined' ? 1 : stopProperty.opacity; + + for (var propKey in stopProperty) { + styleProperty += 'stop-' + propKey + ':' + stopProperty[propKey] + ';'; + } + + stopProperty = styleProperty; + } + + stopElement.setAttribute(key, stopProperty); + } + + gradient.appendChild(stopElement); + } + + this._gradient = gradient; + this._defs.appendChild(gradient); + }, + + _createDropShadow: function (options) { + + if (!this._defs) { + this._createDefs(); + }; + + if (this._dropShadow) { + this._defs.removeChild(this._dropShadow); + } + + var filterGuid = L.Util.guid(); + var filter = this._createElement('filter'); + var feOffset = this._createElement('feOffset'); + var feGaussianBlur = this._createElement('feGaussianBlur'); + var feBlend = this._createElement('feBlend'); + + options = options || { + width: '200%', + height: '200%' + }; + + options.id = 'filter' + filterGuid; + + for (var key in options) { + filter.setAttribute(key, options[key]); + } + + var offsetOptions = { + result: 'offOut', + 'in': 'SourceAlpha', + dx: '2', + dy: '2' + }; + + var blurOptions = { + result: 'blurOut', + 'in': 'offOut', + stdDeviation: '2' + }; + + var blendOptions = { + 'in': 'SourceGraphic', + in2: 'blurOut', + mode: 'lighten' + }; + + for (var key in offsetOptions) { + feOffset.setAttribute(key, offsetOptions[key]); + } + + for (var key in blurOptions) { + feGaussianBlur.setAttribute(key, blurOptions[key]); + } + + for (var key in blendOptions) { + feBlend.setAttribute(key, blendOptions[key]); + } + + filter.appendChild(feOffset); + filter.appendChild(feGaussianBlur); + filter.appendChild(feBlend); + + this._dropShadow = filter; + this._defs.appendChild(filter); + }, + + _createCustomElement: function (tag, attributes) { + var element = this._createElement(tag); + + for (var key in attributes) { + if (attributes.hasOwnProperty(key)) { + element.setAttribute(key, attributes[key]); + } + } + + return element; + }, + + _createImage: function (imageOptions) { + var image = this._createElement('image'); + image.setAttribute('width', imageOptions.width); + image.setAttribute('height', imageOptions.height); + image.setAttribute('x', imageOptions.x || 0); + image.setAttribute('y', imageOptions.y || 0); + image.setAttributeNS(L.Path.XLINK_NS, 'xlink:href', imageOptions.url); + + return image; + }, + + _createPattern: function (patternOptions) { + + if (this._pattern) { + this._defs.removeChild(this._pattern); + } + + var pattern = this._createCustomElement('pattern', patternOptions); + + this._pattern = pattern; + + return pattern; + }, + + _createShape: function (type, shapeOptions) { + if (this._shape) { + this._container.removeChild(this._shape); + } + + var shape = this._createCustomElement(type, shapeOptions); + + return shape; + }, + + // Override this in inheriting classes + _applyCustomStyles: function () { + }, + + _createFillPattern: function (imageOptions) { + var patternGuid = L.Util.guid(); + var patternOptions = imageOptions.pattern; + + patternOptions.id = patternGuid; + patternOptions.patternUnits = patternOptions.patternUnits || 'objectBoundingBox'; + + var pattern = this._createPattern(patternOptions); + var image = this._createImage(imageOptions.image); + + image.setAttributeNS(L.Path.XLINK_NS, 'xlink:href', imageOptions.url); + + pattern.appendChild(image); + + if (!this._defs) { + this._createDefs(); + }; + + this._defs.appendChild(pattern); + this._path.setAttribute('fill', 'url(#' + patternGuid + ')'); + }, + + _getDefaultDiameter: function (radius) { + return 1.75 * radius; + }, + + // Added for image circle + _createShapeImage: function (imageOptions) { + + imageOptions = imageOptions || {}; + + var patternGuid = L.Util.guid(); + + var radius = this.options.radius || Math.max(this.options.radiusX, this.options.radiusY); + var diameter = this._getDefaultDiameter(radius); + var imageSize = imageOptions.imageSize || new L.Point(diameter, diameter); + + var circleSize = imageOptions.radius || diameter/2; + + var shapeOptions = imageOptions.shape || { + circle: { + r: circleSize, + cx: 0, + cy: 0 + } + }; + + var patternOptions = imageOptions.pattern || { + width: imageSize.x, + height: imageSize.y, + x: 0, + y: 0 + }; + + var shapeKeys = Object.keys(shapeOptions); + var shapeType = shapeKeys.length > 0 ? shapeKeys[0] : 'circle'; + + shapeOptions[shapeType].fill = 'url(#' + patternGuid + ')'; + + var shape = this._createShape(shapeType, shapeOptions[shapeType]); + + if (this.options.clickable) { + shape.setAttribute('class', 'leaflet-clickable'); + } + + patternOptions.id = patternGuid; + patternOptions.patternUnits = patternOptions.patternUnits || 'objectBoundingBox'; + + var pattern = this._createPattern(patternOptions); + + var imageOptions = imageOptions.image || { + width: imageSize.x, + height: imageSize.y, + x: 0, + y: 0, + url: this.options.imageCircleUrl + }; + + var image = this._createImage(imageOptions); + image.setAttributeNS(L.Path.XLINK_NS, 'xlink:href', imageOptions.url); + + pattern.appendChild(image); + this._defs.appendChild(pattern); + this._container.insertBefore(shape, this._defs); + + this._shape = shape; + + var me = this; + + this._shape.addEventListener('mouseover', function () { + me.fire('mouseover'); + }); + + this._shape.addEventListener('mouseout', function () { + me.fire('mouseout'); + }); + + this._shape.addEventListener('mousemove', function () { + me.fire('mousemove'); + }); + + var anchorPoint = this.getTextAnchor(); + + if (this._shape && anchorPoint) { + if (this._shape.tagName === 'circle' || this._shape.tagName === 'ellipse') { + this._shape.setAttribute('cx', anchorPoint.x); + this._shape.setAttribute('cy', anchorPoint.y); + } + else { + var width = this._shape.getAttribute('width'); + var height = this._shape.getAttribute('height'); + this._shape.setAttribute('x', anchorPoint.x - Number(width)/2); + this._shape.setAttribute('y', anchorPoint.y - Number(height)/2); + } + } + }, + + _updateStyle: function (layer) { + this.__updateStyle.call(this, layer); + + var context = layer ? layer : this; + + if (context.options.stroke) { + if (context.options.lineCap) { + context._path.setAttribute('stroke-linecap', context.options.lineCap); + } + + if (context.options.lineJoin) { + context._path.setAttribute('stroke-linejoin', context.options.lineJoin); + } + } + + if (context.options.gradient) { + context._createGradient(context.options.gradient); + + context._path.setAttribute('fill', 'url(#' + context._gradient.getAttribute('id') + ')'); + } + else if (!context.options.fill) { + context._path.setAttribute('fill', 'none'); + } + + if (context.options.dropShadow) { + context._createDropShadow(); + + context._path.setAttribute('filter', 'url(#' + context._dropShadow.getAttribute('id') + ')'); + } + else { + context._path.removeAttribute('filter'); + } + + if (context.options.fillPattern) { + context._createFillPattern(context.options.fillPattern); + } + + context._applyCustomStyles(); + + } + +}; + +if (L.SVG) { + // Potential fix for working with 0.8 + var SVGStyleFunctions = L.Util.extend(PathFunctions, { + __updateStyle: L.SVG.prototype._updateStyle + }); + + var SVGTextFunctions = L.Util.extend(TextFunctions, { + __updatePath: L.SVG.prototype._updatePath + }); + + L.SVG.include(SVGStyleFunctions); + L.SVG.include(SVGTextFunctions); +} + +// Extend the TextFunctions above and change the __updatePath reference, since +// _updatePath for a line/polygon is different than for a regular path +var LineTextFunctions = L.extend({}, TextFunctions); +LineTextFunctions.__updatePath = L.Polyline.prototype._updatePath; + +// Pulled from the Leaflet discussion here: https://github.com/Leaflet/Leaflet/pull/1586 +// This is useful for getting a centroid/anchor point for centering text or other SVG markup +LineTextFunctions.getCenter = function () { + var latlngs = this._latlngs, + len = latlngs.length, + i, j, p1, p2, f, center; + + for (i = 0, j = len - 1, area = 0, lat = 0, lng = 0; i < len; j = i++) { + p1 = latlngs[i]; + p2 = latlngs[j]; + f = p1.lat * p2.lng - p2.lat * p1.lng; + lat += (p1.lat + p2.lat) * f; + lng += (p1.lng + p2.lng) * f; + area += f / 2; + } + + center = area ? new L.LatLng(lat / (6 * area), lng / (6 * area)) : latlngs[0]; + center.area = area; + + return center; +}; + +// Sets the text anchor to the centroid of a line/polygon +LineTextFunctions.getTextAnchor = function () { + var center = this.getCenter(); + + return this._map.latLngToLayerPoint(center); +}; + +L.Polyline.include(LineTextFunctions); +L.CircleMarker.include(TextFunctions); + +L.Path.include(PathFunctions); +L.Polygon.include(PathFunctions); +L.Polyline.include(PathFunctions); +L.CircleMarker.include(PathFunctions); + +L.CircleMarker = L.CircleMarker.extend({ + _applyCustomStyles: function () { + // Added for image circle + if (this.options.shapeImage || this.options.imageCircleUrl) { + this._createShapeImage(this.options.shapeImage); + } + }, + + getTextAnchor: function () { + var point = null; + + if (this._point) { + point = new L.Point(this._point.x, this._point.y); + } + + return point; + } +}); + +/* + * Rotates a point the provided number of degrees about another point. Code inspired/borrowed from OpenLayers + */ +L.Point.prototype.rotate = function(angle, point) { + var radius = this.distanceTo(point); + var theta = (angle * L.LatLng.DEG_TO_RAD) + Math.atan2(this.y - point.y, this.x - point.x); + this.x = point.x + (radius * Math.cos(theta)); + this.y = point.y + (radius * Math.sin(theta)); +}; + +/* + * Draws a Leaflet map marker using SVG rather than an icon, allowing the marker to be dynamically styled + */ +L.MapMarker = L.Path.extend({ + + includes: TextFunctions, + + initialize: function (centerLatLng, options) { + L.Path.prototype.initialize.call(this, options); + this._latlng = centerLatLng; + }, + + options: { + fill: true, + fillOpacity: 1, + opacity: 1, + radius: 15, + innerRadius: 5, + position: { + x: 0, + y: 0 + }, + rotation: 0, + numberOfSides: 50, + color: '#000000', + fillColor: '#0000FF', + weight: 1, + gradient: true, + dropShadow: true, + clickable: true + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + + if (this.options.innerRadius > 0) { + this._innerPoints = this._getPoints(true).reverse(); + } + }, + + getBounds: function () { + var map = this._map, + height = this.options.radius * 3, + point = map.project(this._latlng), + swPoint = new L.Point(point.x - this.options.radius, point.y), + nePoint = new L.Point(point.x + this.options.radius, point.y - height), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + getLatLng: function () { + return this._latlng; + }, + + setRadius: function (radius) { + this.options.radius = radius; + return this.redraw(); + }, + + setInnerRadius: function (innerRadius) { + this.options.innerRadius = innerRadius; + return this.redraw(); + }, + + setRotation: function (rotation) { + this.options.rotation = rotation; + return this.redraw(); + }, + + setNumberOfSides: function (numberOfSides) { + this.options.numberOfSides = numberOfSides; + return this.redraw(); + }, + + getPathString: function () { + var anchorPoint = this.getTextAnchor(); + + if (this._shape) { + if (this._shape.tagName === 'circle' || this._shape.tagName === 'ellipse') { + this._shape.setAttribute('cx', anchorPoint.x); + this._shape.setAttribute('cy', anchorPoint.y); + } + else { + var width = this._shape.getAttribute('width'); + var height = this._shape.getAttribute('height'); + this._shape.setAttribute('x', anchorPoint.x - Number(width)/2); + this._shape.setAttribute('y', anchorPoint.y - Number(height)/2); + } + } + + this._path.setAttribute('shape-rendering', 'geometricPrecision'); + return new L.SVGPathBuilder(this._points, this._innerPoints).build(6); + }, + + getTextAnchor: function () { + var point = null; + + if (this._point) { + point = new L.Point(this._point.x, this._point.y - 2 * this.options.radius); + } + + return point; + }, + + _getPoints: function (inner) { + var maxDegrees = !inner ? 210 : 360; + var angleSize = !inner ? maxDegrees / 50 : maxDegrees / Math.max(this.options.numberOfSides, 3); + var degrees = !inner ? maxDegrees : maxDegrees + this.options.rotation; + var angle = !inner ? -30 : this.options.rotation; + var points = []; + var newPoint; + var angleRadians; + var radius = this.options.radius; + var multiplier = Math.sqrt(0.75); + + var toRad = function (number) { + return number * L.LatLng.DEG_TO_RAD; + }; + + var startPoint = this._point; + + if (!inner) { + points.push(startPoint); + points.push(new L.Point(startPoint.x + multiplier * radius, startPoint.y - 1.5 * radius)); + } + + while (angle < degrees) { + + angleRadians = toRad(angle); + + // Calculate the point the radius pixels away from the center point at the + // given angle; + newPoint = this._getPoint(angleRadians, radius, inner); + + // Add the point to the latlngs array + points.push(newPoint); + + // Increment the angle + angle += angleSize; + } + + if (!inner) { + points.push(new L.Point(startPoint.x - multiplier * radius, startPoint.y - 1.5 * radius)); + } + + return points; + }, + + _getPoint: function (angle, radius, inner) { + var markerRadius = radius; + + radius = !inner ? radius : this.options.innerRadius; + + return new L.Point(this._point.x + this.options.position.x + radius * Math.cos(angle), this._point.y - 2 * markerRadius + this.options.position.y - radius * Math.sin(angle)); + }, + + _applyCustomStyles: function () { + // Added for image circle + if (this.options.shapeImage || this.options.imageCircleUrl) { + this._createShapeImage(this.options.shapeImage); + } + }, + + toGeoJSON: function () { + return L.Util.pointToGeoJSON.call(this); + } +}); + +L.mapMarker = function (centerLatLng, options) { + return new L.MapMarker(centerLatLng, options); +}; + +/* + * Draws a regular polygon marker on the map given a radius (or x and y radii) in pixels + */ +L.RegularPolygonMarker = L.Path.extend({ + includes: TextFunctions, + + initialize: function (centerLatLng, options) { + L.Path.prototype.initialize ? L.Path.prototype.initialize.call(this, options) : L.setOptions(this, options); + + this._latlng = centerLatLng; + + this.options.numberOfSides = Math.max(this.options.numberOfSides, 3); + }, + + options: { + fill: true, + radiusX: 10, + radiusY: 10, + rotation: 0, + numberOfSides: 3, + position: { + x: 0, + y: 0 + }, + maxDegrees: 360, + gradient: true, + dropShadow: false, + clickable: true + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + return this.redraw(); + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + this._points = this._getPoints(); + + if (this.options.innerRadius || (this.options.innerRadiusX && this.options.innerRadiusY)) { + this._innerPoints = this._getPoints(true).reverse(); + } + }, + + getBounds: function () { + var map = this._map, + radiusX = this.options.radius || this.options.radiusX, + radiusY = this.options.radius || this.options.radiusY, + deltaX = radiusX * Math.cos(Math.PI / 4), + deltaY = radiusY * Math.sin(Math.PI / 4), + point = map.project(this._latlng), + swPoint = new L.Point(point.x - deltaX, point.y + deltaY), + nePoint = new L.Point(point.x + deltaX, point.y - deltaY), + sw = map.unproject(swPoint), + ne = map.unproject(nePoint); + + return new L.LatLngBounds(sw, ne); + }, + + setRadius: function (radius) { + this.options.radius = radius; + return this.redraw(); + }, + + setRadiusXY: function (radiusX, radiusY) { + this.options.radius = null; + this.options.radiusX = radiusX; + this.options.radiusY = radiusY; + return this.redraw(); + }, + + setInnerRadius: function (innerRadius) { + this.options.innerRadius = innerRadius; + return this.redraw(); + }, + + setInnerRadiusXY: function (innerRadiusX, innerRadiusY) { + this.options.innerRadius = null; + this.options.innerRadiusX = innerRadiusX; + this.options.innerRadiusY = innerRadiusY; + return this.redraw(); + }, + + setRotation: function (rotation) { + this.options.rotation = rotation; + return this.redraw(); + }, + + setNumberOfSides: function (numberOfSides) { + this.options.numberOfSides = numberOfSides; + return this.redraw(); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + var anchorPoint = this.getTextAnchor(); + + if (this._shape) { + if (this._shape.tagName === 'circle' || this._shape.tagName === 'ellipse') { + this._shape.setAttribute('cx', anchorPoint.x); + this._shape.setAttribute('cy', anchorPoint.y); + } + else { + var width = this._shape.getAttribute('width'); + var height = this._shape.getAttribute('height'); + this._shape.setAttribute('x', anchorPoint.x - Number(width)/2); + this._shape.setAttribute('y', anchorPoint.y - Number(height)/2); + } + } + + this._path.setAttribute('shape-rendering', 'geometricPrecision'); + return new L.SVGPathBuilder(this._points, this._innerPoints).build(6); + }, + + _getPoints: function (inner) { + var maxDegrees = this.options.maxDegrees || 360; + var angleSize = maxDegrees / Math.max(this.options.numberOfSides, 3); + var degrees = maxDegrees; //+ this.options.rotation; + var angle = 0; //this.options.rotation; + var points = []; + var newPoint; + var angleRadians; + var radiusX = !inner ? this.options.radius || this.options.radiusX : this.options.innerRadius || this.options.innerRadiusX; + var radiusY = !inner ? this.options.radius || this.options.radiusY : this.options.innerRadius || this.options.innerRadiusY; + + var toRad = function (number) { + return number * L.LatLng.DEG_TO_RAD; + }; + + while (angle < degrees) { + + angleRadians = toRad(angle); + + // Calculate the point the radius pixels away from the center point at the + // given angle; + newPoint = this._getPoint(angleRadians, radiusX, radiusY); + + // Add the point to the latlngs array + points.push(newPoint); + + // Increment the angle + angle += angleSize; + } + + return points; + }, + + _getPoint: function (angle, radiusX, radiusY) { + var startPoint = this.options.position ? this._point.add(new L.Point(this.options.position.x, this.options.position.y)) : this._point; + var point = new L.Point(startPoint.x + radiusX * Math.cos(angle), startPoint.y + radiusY * Math.sin(angle)); + + point.rotate(this.options.rotation, startPoint); + + return point; + }, + + _getDefaultDiameter: function (radius) { + var angle = Math.PI/this.options.numberOfSides; + var minLength = radius * Math.cos(angle) + + return 1.75 * minLength; + }, + + _applyCustomStyles: function () { + // Added for image circle + if (this.options.shapeImage || this.options.imageCircleUrl) { + this._createShapeImage(this.options.shapeImage); + } + }, + + toGeoJSON: function () { + return L.Util.pointToGeoJSON.call(this); + } +}); + +L.regularPolygonMarker = function (centerLatLng, options) { + return new L.RegularPolygonMarker(centerLatLng, options); +}; + +// Displays a star on the map +L.StarMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfPoints: 5, + rotation: -15.0, + maxDegrees: 360, + gradient: true, + dropShadow: true + }, + + setNumberOfPoints: function (numberOfPoints) { + this.options.numberOfPoints = numberOfPoints; + return this.redraw(); + }, + + _getPoints: function (inner) { + var maxDegrees = this.options.maxDegrees || 360; + var angleSize = maxDegrees / this.options.numberOfPoints; + var degrees = maxDegrees; // + this.options.rotation; + var angle = 0; //this.options.rotation; + var points = []; + var newPoint, newPointInner; + var angleRadians; + var radiusX = !inner ? this.options.radius || this.options.radiusX : this.options.innerRadius || this.options.innerRadiusX; + var radiusY = !inner ? this.options.radius || this.options.radiusY : this.options.innerRadius || this.options.innerRadiusY; + + var toRad = function (number) { + return number * L.LatLng.DEG_TO_RAD; + }; + + while (angle < degrees) { + + angleRadians = toRad(angle); + + // Calculate the point the radius meters away from the center point at the + // given angle; + newPoint = this._getPoint(angleRadians, radiusX, radiusY); + newPointInner = this._getPoint(angleRadians + toRad(angleSize) / 2, radiusX / 2, radiusY / 2); + + // Add the point to the latlngs array + points.push(newPoint); + points.push(newPointInner); + + // Increment the angle + angle += angleSize; + } + + return points; + } +}); + +L.starMarker = function (centerLatLng, options) { + return new L.StarMarker(centerLatLng, options); +}; + +L.TriangleMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 3, + rotation: 30.0, + radius: 5 + } +}); + +L.triangleMarker = function (centerLatLng, options) { + return new L.TriangleMarker(centerLatLng, options); +}; + +L.DiamondMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 4, + radiusX: 5, + radiusY: 10 + } +}); + +L.diamondMarker = function (centerLatLng, options) { + return new L.DiamondMarker(centerLatLng, options); +}; + +L.SquareMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 4, + rotation: 45.0, + radius: 5 + } +}); + +L.squareMarker = function (centerLatLng, options) { + return new L.SquareMarker(centerLatLng, options); +}; + +L.PentagonMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 5, + rotation: -18.0, + radius: 5 + } +}); + +L.pentagonMarker = function (centerLatLng, options) { + return new L.PentagonMarker(centerLatLng, options); +}; + +L.HexagonMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 6, + rotation: 30.0, + radius: 5 + } +}); + +L.hexagonMarker = function (centerLatLng, options) { + return new L.HexagonMarker(centerLatLng, options); +}; + +L.OctagonMarker = L.RegularPolygonMarker.extend({ + options: { + numberOfSides: 8, + rotation: 22.5, + radius: 5 + } +}); + +L.octagonMarker = function (centerLatLng, options) { + return new L.OctagonMarker(centerLatLng, options); +}; + +/* + * Class for putting custom SVG on the map. This is experimental and a little bit of a hack + */ +L.SVGMarker = L.Path.extend({ + + initialize: function (latlng, options) { + L.Path.prototype.initialize.call(this, options); + + this._svg = options.svg; + + if (this._svg.indexOf('<') === 0) { + this._data = this._svg; + } + + this._latlng = latlng; + }, + + projectLatlngs: function () { + this._point = this._map.latLngToLayerPoint(this._latlng); + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + this.redraw(); + }, + + getLatLng: function () { + return this._latlng; + }, + + getPathString: function () { + var me = this; + + var addSVG = function () { + var g = me._path.parentNode; + while (g.nodeName.toLowerCase() !== 'g') { + g = g.parentNode; + } + + if (me.options.clickable) { + g.setAttribute('class','leaflet-clickable'); + } + + var data = me._data; + var svg = data.nodeName.toLowerCase() === 'svg' ? data.cloneNode(true) : data.querySelector('svg').cloneNode(true); + + if (me.options.setStyle) { + me.options.setStyle.call(me, svg); + } + + var elementWidth = svg.getAttribute('width'); + var elementHeight = svg.getAttribute('height'); + + var width = elementWidth ? elementWidth.replace('px','') : '100%'; + var height = elementHeight ? elementHeight.replace('px','') : '100%'; + + // If the width is 100% (meaning that no width is provided), then set the width and height to the size specified in the options + if (width === '100%') { + width = me.options.size.x; + height = me.options.size.y; + + svg.setAttribute('width', width + (String(width).indexOf('%') !== -1 ? '' : 'px')); + svg.setAttribute('height', height + (String(height).indexOf('%') !== -1 ? '' : 'px')); + } + + var size = me.options.size || new L.Point(width, height); + + var scaleSize = new L.Point(size.x/width, size.y/height); + + var old = g.getElementsByTagName('svg'); + if (old.length > 0) { + old[0].parentNode.removeChild(old[0]); + } + g.appendChild(svg); + + var transforms = []; + var anchor = me.options.anchor || new L.Point(-size.x/2, -size.y/2); + var x = me._point.x + anchor.x; + var y = me._point.y + anchor.y; + + transforms.push('translate(' + x + ' ' + y + ')'); + transforms.push('scale(' + scaleSize.x + ' ' + scaleSize.y + ')'); + + if (me.options.rotation) { + transforms.push('rotate(' + me.options.rotation + ' ' + (width/2) + ' ' + (height/2) + ')'); //' ' + -1 * anchor.x + ' ' + -1 * anchor.y + ')'); + } + + g.setAttribute('transform', transforms.join(' ')); + }; + + if (!this._data) { + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + me._data = this.responseXML; + addSVG(); + } + } + xhr.open('GET', this._svg, true); + xhr.send(null); + } + else { + addSVG(); + } + }, + + toGeoJSON: function () { + return pointToGeoJSON.call(this); + } + +}); + +/* + * A FeatureGroup with setLatLng and getLatLng methods + */ +L.MarkerGroup = L.FeatureGroup.extend({ + initialize: function (latlng, markers) { + L.FeatureGroup.prototype.initialize.call(this, markers); + + this.setLatLng(latlng); + }, + + setStyle: function (style) { + return this; + }, + + setLatLng: function (latlng) { + this._latlng = latlng; + this.eachLayer(function (layer) { + if (layer.setLatLng) { + layer.setLatLng(latlng); + } + }); + + return this; + }, + + getLatLng: function (latlng) { + return this._latlng; + }, + + toGeoJSON: function () { + var featureCollection = { + type: 'FeatureCollection', + features: [] + }; + + var eachLayerFunction = function (featureCollection) { + return function (layer) { + featureCollection.features.push(L.Util.pointToGeoJSON.call(layer)); + } + }; + + this.eachLayer(eachLayerFunction(featureCollection)); + + return featureCollection; + } +}); diff --git a/assets/js/sig/dvf/leaflet.dvf.palettes.js b/assets/js/sig/dvf/leaflet.dvf.palettes.js new file mode 100755 index 0000000000000000000000000000000000000000..0f931c48fe161d2b20824a1a4c79114174b86a3f --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.palettes.js @@ -0,0 +1,559 @@ +// @preserve This product includes color specifications and designs developed by Cynthia Brewer (http://colorbrewer.org/). +// Adapted from: https://raw.github.com/mbostock/d3/master/lib/colorbrewer/colorbrewer.js +L.ColorBrewer = { + Sequential: { + YlGn: { + 3: ["#f7fcb9","#addd8e","#31a354"], + 4: ["#ffffcc","#c2e699","#78c679","#238443"], + 5: ["#ffffcc","#c2e699","#78c679","#31a354","#006837"], + 6: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#31a354","#006837"], + 7: ["#ffffcc","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"], + 8: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#005a32"], + 9: ["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"] + }, + YlGnBu: { + 3: ["#edf8b1","#7fcdbb","#2c7fb8"], + 4: ["#ffffcc","#a1dab4","#41b6c4","#225ea8"], + 5: ["#ffffcc","#a1dab4","#41b6c4","#2c7fb8","#253494"], + 6: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#2c7fb8","#253494"], + 7: ["#ffffcc","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"], + 8: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#0c2c84"], + 9: ["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"] + }, + GnBu: { + 3: ["#e0f3db","#a8ddb5","#43a2ca"], + 4: ["#f0f9e8","#bae4bc","#7bccc4","#2b8cbe"], + 5: ["#f0f9e8","#bae4bc","#7bccc4","#43a2ca","#0868ac"], + 6: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#43a2ca","#0868ac"], + 7: ["#f0f9e8","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"], + 8: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#08589e"], + 9: ["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"] + }, + BuGn: { + 3: ["#e5f5f9","#99d8c9","#2ca25f"], + 4: ["#edf8fb","#b2e2e2","#66c2a4","#238b45"], + 5: ["#edf8fb","#b2e2e2","#66c2a4","#2ca25f","#006d2c"], + 6: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#2ca25f","#006d2c"], + 7: ["#edf8fb","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"], + 8: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#005824"], + 9: ["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"] + }, + PuBuGn: { + 3: ["#ece2f0","#a6bddb","#1c9099"], + 4: ["#f6eff7","#bdc9e1","#67a9cf","#02818a"], + 5: ["#f6eff7","#bdc9e1","#67a9cf","#1c9099","#016c59"], + 6: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#1c9099","#016c59"], + 7: ["#f6eff7","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"], + 8: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016450"], + 9: ["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"] + }, + PuBu: { + 3: ["#ece7f2","#a6bddb","#2b8cbe"], + 4: ["#f1eef6","#bdc9e1","#74a9cf","#0570b0"], + 5: ["#f1eef6","#bdc9e1","#74a9cf","#2b8cbe","#045a8d"], + 6: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#2b8cbe","#045a8d"], + 7: ["#f1eef6","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"], + 8: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#034e7b"], + 9: ["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"] + }, + BuPu: { + 3: ["#e0ecf4","#9ebcda","#8856a7"], + 4: ["#edf8fb","#b3cde3","#8c96c6","#88419d"], + 5: ["#edf8fb","#b3cde3","#8c96c6","#8856a7","#810f7c"], + 6: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8856a7","#810f7c"], + 7: ["#edf8fb","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"], + 8: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#6e016b"], + 9: ["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"] + }, + RdPu: { + 3: ["#fde0dd","#fa9fb5","#c51b8a"], + 4: ["#feebe2","#fbb4b9","#f768a1","#ae017e"], + 5: ["#feebe2","#fbb4b9","#f768a1","#c51b8a","#7a0177"], + 6: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#c51b8a","#7a0177"], + 7: ["#feebe2","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"], + 8: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177"], + 9: ["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"] + }, + PuRd: { + 3: ["#e7e1ef","#c994c7","#dd1c77"], + 4: ["#f1eef6","#d7b5d8","#df65b0","#ce1256"], + 5: ["#f1eef6","#d7b5d8","#df65b0","#dd1c77","#980043"], + 6: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#dd1c77","#980043"], + 7: ["#f1eef6","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"], + 8: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#91003f"], + 9: ["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"] + }, + OrRd: { + 3: ["#fee8c8","#fdbb84","#e34a33"], + 4: ["#fef0d9","#fdcc8a","#fc8d59","#d7301f"], + 5: ["#fef0d9","#fdcc8a","#fc8d59","#e34a33","#b30000"], + 6: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#e34a33","#b30000"], + 7: ["#fef0d9","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"], + 8: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#990000"], + 9: ["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"] + }, + YlOrRd: { + 3: ["#ffeda0","#feb24c","#f03b20"], + 4: ["#ffffb2","#fecc5c","#fd8d3c","#e31a1c"], + 5: ["#ffffb2","#fecc5c","#fd8d3c","#f03b20","#bd0026"], + 6: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#f03b20","#bd0026"], + 7: ["#ffffb2","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"], + 8: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026"], + 9: ["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"] + }, + YlOrBr: { + 3: ["#fff7bc","#fec44f","#d95f0e"], + 4: ["#ffffd4","#fed98e","#fe9929","#cc4c02"], + 5: ["#ffffd4","#fed98e","#fe9929","#d95f0e","#993404"], + 6: ["#ffffd4","#fee391","#fec44f","#fe9929","#d95f0e","#993404"], + 7: ["#ffffd4","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"], + 8: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#8c2d04"], + 9: ["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"] + }, + Purples: { + 3: ["#efedf5","#bcbddc","#756bb1"], + 4: ["#f2f0f7","#cbc9e2","#9e9ac8","#6a51a3"], + 5: ["#f2f0f7","#cbc9e2","#9e9ac8","#756bb1","#54278f"], + 6: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#756bb1","#54278f"], + 7: ["#f2f0f7","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"], + 8: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#4a1486"], + 9: ["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"] + }, + Blues: { + 3: ["#deebf7","#9ecae1","#3182bd"], + 4: ["#eff3ff","#bdd7e7","#6baed6","#2171b5"], + 5: ["#eff3ff","#bdd7e7","#6baed6","#3182bd","#08519c"], + 6: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#3182bd","#08519c"], + 7: ["#eff3ff","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"], + 8: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#084594"], + 9: ["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"] + }, + Greens: { + 3: ["#e5f5e0","#a1d99b","#31a354"], + 4: ["#edf8e9","#bae4b3","#74c476","#238b45"], + 5: ["#edf8e9","#bae4b3","#74c476","#31a354","#006d2c"], + 6: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#31a354","#006d2c"], + 7: ["#edf8e9","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"], + 8: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#005a32"], + 9: ["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"] + }, + Oranges: { + 3: ["#fee6ce","#fdae6b","#e6550d"], + 4: ["#feedde","#fdbe85","#fd8d3c","#d94701"], + 5: ["#feedde","#fdbe85","#fd8d3c","#e6550d","#a63603"], + 6: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#e6550d","#a63603"], + 7: ["#feedde","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"], + 8: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#8c2d04"], + 9: ["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"] + }, + Reds: { + 3: ["#fee0d2","#fc9272","#de2d26"], + 4: ["#fee5d9","#fcae91","#fb6a4a","#cb181d"], + 5: ["#fee5d9","#fcae91","#fb6a4a","#de2d26","#a50f15"], + 6: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#de2d26","#a50f15"], + 7: ["#fee5d9","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"], + 8: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#99000d"], + 9: ["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"] + }, + Greys: { + 3: ["#f0f0f0","#bdbdbd","#636363"], + 4: ["#f7f7f7","#cccccc","#969696","#525252"], + 5: ["#f7f7f7","#cccccc","#969696","#636363","#252525"], + 6: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#636363","#252525"], + 7: ["#f7f7f7","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"], + 8: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525"], + 9: ["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"] + } + }, + Diverging: { + PuOr: { + 3: ["#f1a340","#f7f7f7","#998ec3"], + 4: ["#e66101","#fdb863","#b2abd2","#5e3c99"], + 5: ["#e66101","#fdb863","#f7f7f7","#b2abd2","#5e3c99"], + 6: ["#b35806","#f1a340","#fee0b6","#d8daeb","#998ec3","#542788"], + 7: ["#b35806","#f1a340","#fee0b6","#f7f7f7","#d8daeb","#998ec3","#542788"], + 8: ["#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788"], + 9: ["#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788"], + 10: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"], + 11: ["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"] + }, + BrBG: { + 3: ["#d8b365","#f5f5f5","#5ab4ac"], + 4: ["#a6611a","#dfc27d","#80cdc1","#018571"], + 5: ["#a6611a","#dfc27d","#f5f5f5","#80cdc1","#018571"], + 6: ["#8c510a","#d8b365","#f6e8c3","#c7eae5","#5ab4ac","#01665e"], + 7: ["#8c510a","#d8b365","#f6e8c3","#f5f5f5","#c7eae5","#5ab4ac","#01665e"], + 8: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e"], + 9: ["#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e"], + 10: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"], + 11: ["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"] + }, + PRGn: { + 3: ["#af8dc3","#f7f7f7","#7fbf7b"], + 4: ["#7b3294","#c2a5cf","#a6dba0","#008837"], + 5: ["#7b3294","#c2a5cf","#f7f7f7","#a6dba0","#008837"], + 6: ["#762a83","#af8dc3","#e7d4e8","#d9f0d3","#7fbf7b","#1b7837"], + 7: ["#762a83","#af8dc3","#e7d4e8","#f7f7f7","#d9f0d3","#7fbf7b","#1b7837"], + 8: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837"], + 9: ["#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837"], + 10: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"], + 11: ["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"] + }, + PiYG: { + 3: ["#e9a3c9","#f7f7f7","#a1d76a"], + 4: ["#d01c8b","#f1b6da","#b8e186","#4dac26"], + 5: ["#d01c8b","#f1b6da","#f7f7f7","#b8e186","#4dac26"], + 6: ["#c51b7d","#e9a3c9","#fde0ef","#e6f5d0","#a1d76a","#4d9221"], + 7: ["#c51b7d","#e9a3c9","#fde0ef","#f7f7f7","#e6f5d0","#a1d76a","#4d9221"], + 8: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221"], + 9: ["#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221"], + 10: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"], + 11: ["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"] + }, + RdBu: { + 3: ["#ef8a62","#f7f7f7","#67a9cf"], + 4: ["#ca0020","#f4a582","#92c5de","#0571b0"], + 5: ["#ca0020","#f4a582","#f7f7f7","#92c5de","#0571b0"], + 6: ["#b2182b","#ef8a62","#fddbc7","#d1e5f0","#67a9cf","#2166ac"], + 7: ["#b2182b","#ef8a62","#fddbc7","#f7f7f7","#d1e5f0","#67a9cf","#2166ac"], + 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac"], + 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac"], + 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"], + 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"] + }, + RdGy: { + 3: ["#ef8a62","#ffffff","#999999"], + 4: ["#ca0020","#f4a582","#bababa","#404040"], + 5: ["#ca0020","#f4a582","#ffffff","#bababa","#404040"], + 6: ["#b2182b","#ef8a62","#fddbc7","#e0e0e0","#999999","#4d4d4d"], + 7: ["#b2182b","#ef8a62","#fddbc7","#ffffff","#e0e0e0","#999999","#4d4d4d"], + 8: ["#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d"], + 9: ["#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d"], + 10: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"], + 11: ["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"] + }, + RdYlBu: { + 3: ["#fc8d59","#ffffbf","#91bfdb"], + 4: ["#d7191c","#fdae61","#abd9e9","#2c7bb6"], + 5: ["#d7191c","#fdae61","#ffffbf","#abd9e9","#2c7bb6"], + 6: ["#d73027","#fc8d59","#fee090","#e0f3f8","#91bfdb","#4575b4"], + 7: ["#d73027","#fc8d59","#fee090","#ffffbf","#e0f3f8","#91bfdb","#4575b4"], + 8: ["#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4"], + 9: ["#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4"], + 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"], + 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"] + }, + Spectral: { + 3: ["#fc8d59","#ffffbf","#99d594"], + 4: ["#d7191c","#fdae61","#abdda4","#2b83ba"], + 5: ["#d7191c","#fdae61","#ffffbf","#abdda4","#2b83ba"], + 6: ["#d53e4f","#fc8d59","#fee08b","#e6f598","#99d594","#3288bd"], + 7: ["#d53e4f","#fc8d59","#fee08b","#ffffbf","#e6f598","#99d594","#3288bd"], + 8: ["#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd"], + 9: ["#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd"], + 10: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"], + 11: ["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"] + }, + RdYlGn: { + 3: ["#fc8d59","#ffffbf","#91cf60"], + 4: ["#d7191c","#fdae61","#a6d96a","#1a9641"], + 5: ["#d7191c","#fdae61","#ffffbf","#a6d96a","#1a9641"], + 6: ["#d73027","#fc8d59","#fee08b","#d9ef8b","#91cf60","#1a9850"], + 7: ["#d73027","#fc8d59","#fee08b","#ffffbf","#d9ef8b","#91cf60","#1a9850"], + 8: ["#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850"], + 9: ["#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850"], + 10: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"], + 11: ["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"] + } + }, + Qualitative: { + Accent: { + 3: ["#7fc97f","#beaed4","#fdc086"], + 4: ["#7fc97f","#beaed4","#fdc086","#ffff99"], + 5: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0"], + 6: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f"], + 7: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17"], + 8: ["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"] + }, + Dark2: { + 3: ["#1b9e77","#d95f02","#7570b3"], + 4: ["#1b9e77","#d95f02","#7570b3","#e7298a"], + 5: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e"], + 6: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02"], + 7: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d"], + 8: ["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"] + }, + Paired: { + 3: ["#a6cee3","#1f78b4","#b2df8a"], + 4: ["#a6cee3","#1f78b4","#b2df8a","#33a02c"], + 5: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99"], + 6: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c"], + 7: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f"], + 8: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00"], + 9: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6"], + 10: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a"], + 11: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99"], + 12: ["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"] + }, + Pastel1: { + 3: ["#fbb4ae","#b3cde3","#ccebc5"], + 4: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4"], + 5: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6"], + 6: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc"], + 7: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd"], + 8: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec"], + 9: ["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"] + }, + Pastel2: { + 3: ["#b3e2cd","#fdcdac","#cbd5e8"], + 4: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4"], + 5: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9"], + 6: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae"], + 7: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc"], + 8: ["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"] + }, + Set1: { + 3: ["#e41a1c","#377eb8","#4daf4a"], + 4: ["#e41a1c","#377eb8","#4daf4a","#984ea3"], + 5: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00"], + 6: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33"], + 7: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628"], + 8: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf"], + 9: ["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"] + }, + Set2: { + 3: ["#66c2a5","#fc8d62","#8da0cb"], + 4: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3"], + 5: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854"], + 6: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f"], + 7: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494"], + 8: ["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"] + }, + Set3: { + 3: ["#8dd3c7","#ffffb3","#bebada"], + 4: ["#8dd3c7","#ffffb3","#bebada","#fb8072"], + 5: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3"], + 6: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462"], + 7: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69"], + 8: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5"], + 9: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9"], + 10: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd"], + 11: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5"], + 12: ["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"] + } + } +}; + +/* + * Convenience functions for generating a color scale between a min X and a max X value + */ +L.Palettes = { + huePalette: function (min, max, minH, maxH, options) { + return new L.HSLHueFunction(new L.Point(min, minH), new L.Point(max, maxH), options); + }, + luminosityPalette: function (min, max, minL, maxL, options) { + return new L.HSLLuminosityFunction(new L.Point(min, minL), new L.Point(max, maxL), options); + }, + saturationPalette: function (min, max, minS, maxS, options) { + return new L.HSLSaturationFunction(new L.Point(min, minS), new L.Point(max, maxS), options); + }, + rgbBlendPalette: function (min, max, minColor, maxColor, options) { + return new L.RGBColorBlendFunction(min, max, minColor, maxColor, options); + }, + hslBlendPalette: function (min, max, minColor, maxColor, options) { + return new L.HSLColorBlendFunction(min, max, minColor, maxColor, options); + }, + customColorPalette: function (min, max, colors, options) { + return new L.CustomColorFunction(min, max, colors, options); + } +}; + +/* + * Pre-defined color palettes for easy use. Call getPalette passing a min and max value get a pre-defined LinearFunction + */ +L.DynamicColorPalettes = { + rainbow: { + text: 'Rainbow', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 0, 300, options); + } + }, + greentored: { + text: 'Green - Red', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 120, 0, options); + } + }, + yellowtored: { + text: 'Yellow - Red', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 60, 0, options); + } + }, + orangetored: { + text: 'Orange - Red', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 30, 0, options); + } + }, + redtopurple: { + text: 'Red - Purple', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 360, 270, options); + } + }, + bluetored: { + text: 'Blue - Red', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 210, 360, options); + } + }, + bluetored2: { + text: 'Blue - Red 2', + getPalette: function (min, max, options) { + return L.Palettes.huePalette(min, max, 180, 0, options); + } + }, + whitetored: { + text: 'White - Red', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 0})); + } + }, + whitetoorange: { + text: 'White - Orange', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 30})); + } + }, + whitetoyellow: { + text: 'White - Yellow', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 60})); + } + }, + whitetogreen: { + text: 'White - Green', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 120})); + } + }, + whitetoltblue: { + text: 'White - Lt. Blue', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 180})); + } + }, + whitetoblue: { + text: 'White - Blue', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 240})); + } + }, + whitetopurple: { + text: 'White - Purple', + getPalette: function (min, max, options) { + return L.Palettes.luminosityPalette(min, max, 1, 0.5, L.Util.extend(option, {outputHue: 270})); + } + }, + graytored: { + text: 'Gray - Red', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 0})); + } + }, + graytoorange: { + text: 'Gray - Orange', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 30})); + } + }, + graytoyellow: { + text: 'Gray - Yellow', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 60})); + } + }, + graytogreen: { + text: 'Gray - Green', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 120})); + } + }, + graytoltblue: { + text: 'Gray - Lt. Blue', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 180})); + } + }, + graytoblue: { + text: 'Gray - Blue', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 240})); + } + }, + graytopurple: { + text: 'Gray - Purple', + getPalette: function (min, max, options) { + return L.Palettes.saturationPalette(min, max, 0, 1, L.Util.extend(option, {outputHue: 270})); + } + } +}; + +/* + * + */ +L.DynamicPaletteElement = L.Class.extend({ + initialize: function (key, dynamicPalette) { + this._key = key; + this._dynamicPalette = dynamicPalette; + }, + + generate: function (options) { + var paletteElement = L.DomUtil.create('div', 'palette'); + var count = options.count; + var palette = this._dynamicPalette.getPalette(0, count - 1); + var width = options.width; + + var showText = true; + + if (options.showText != undefined) { + showText = options.showText; + } + + // Store the palette key in the element via HTML5 custom "data-" attribute. + // Doing this will make it possible use a CSS selector to "find" this element + // based on the palette key value later. + paletteElement.setAttribute('data-palette-key', this._key); + + if (this._dynamicPalette.text && showText) { + L.DomUtil.create('div', 'palette-text', paletteElement).innerHTML = '<i class="icon-ok hidden"></i>' + this._dynamicPalette.text; + } + + var elementWidth = width/count; + + if (options.className) { + L.DomUtil.addClass(paletteElement, options.className); + } + + for (var i = 0; i < count; ++i) { + var i = L.DomUtil.create('i', 'palette-element'); + + for (var styleKey in palette) { + + var styleValue = palette[styleKey]; + var style = styleValue.evaluate ? styleValue.evaluate(i) : styleValue; + + L.StyleConverter.setCSSProperty(i, styleKey, style); + + } + + i.style.width = elementWidth + 'px'; + + paletteElement.appendChild(i); + + } + return paletteElement; + } + +}); diff --git a/assets/js/sig/dvf/leaflet.dvf.regularpolygon.js b/assets/js/sig/dvf/leaflet.dvf.regularpolygon.js new file mode 100755 index 0000000000000000000000000000000000000000..ab2b12a727ed416aeb17db1856425a45b9062255 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.regularpolygon.js @@ -0,0 +1,106 @@ +/* + * Draws a regular polygon on the map given a radius in meters + */ +L.RegularPolygon = L.Polygon.extend({ + statics: { + R: 6378.137, + M_PER_KM: 1000 + }, + + initialize: function (centerLatLng, options) { + this._centerLatLng = centerLatLng; + + L.Util.setOptions(this, options); + L.Polygon.prototype.initialize.call(this, this._getLatLngs(), options); + }, + + options: { + fill: true, + radius: 1000.0, + numberOfSides: 4, + rotation: 0.0, + maxDegrees: 360 + }, + + getLatLng: function () { + return this._centerLatLng; + }, + + setRadius: function (radius) { + this.options.radius = radius; + this._latlngs = this._getLatLngs(); + this.redraw(); + }, + + _getLatLngs: function () { + + var maxDegrees = this.options.maxDegrees || 360; + var angleSize = maxDegrees / Math.max(this.options.numberOfSides, 3); + var degrees = maxDegrees + this.options.rotation; + var angle = this.options.rotation; + var latlngs = []; + var newLatLng; + + while (angle < degrees) { + // Calculate the point the radius meters away from the center point at the + // given angle; + newLatLng = this._getPoint(angle); + + // Add the point to the latlngs array + latlngs.push(newLatLng); + + // Increment the angle + angle += angleSize; + } + + return latlngs; + }, + + // Get an end point that is the specified radius (in m) from the center point at the specified + // angle + _getPoint: function (angle) { + + var toRad = function (number) { + return number * L.LatLng.DEG_TO_RAD; + }; + + var toDeg = function (number) { + return number * L.LatLng.RAD_TO_DEG; + }; + + var angleRadians = toRad(angle); + var angularDistance = this.options.radius / L.RegularPolygon.M_PER_KM / L.RegularPolygon.R; + var lat1 = toRad(this._centerLatLng.lat); + var lon1 = toRad(this._centerLatLng.lng); + var lat2 = Math.asin(Math.sin(lat1) * Math.cos(angularDistance) + Math.cos(lat1) * Math.sin(angularDistance) * Math.cos(angleRadians)); + var lon2 = lon1 + Math.atan2(Math.sin(angleRadians) * Math.sin(angularDistance) * Math.cos(lat1), Math.cos(angularDistance) - Math.sin(lat1) * Math.sin(lat2)); + + lat2 = toDeg(lat2); + lon2 = toDeg(lon2); + + return new L.LatLng(lat2, lon2); + }, + + toGeoJSON: function () { + var feature = { + type: 'Feature', + geometry: { + type: 'Polygon', + coordinates: [[],[]] + }, + properties: this.options + }; + + for (var i = 0; i < this._latlngs.length; ++i) { + var latlng = this._latlngs[i]; + + feature.coordinates[0].push([latlng[1], latlng[0]]); + } + + return feature; + } +}); + +L.regularPolygon = function (centerLatLng, options) { + return new L.RegularPolygon(centerLatLng, options); +}; \ No newline at end of file diff --git a/assets/js/sig/dvf/leaflet.dvf.utils.js b/assets/js/sig/dvf/leaflet.dvf.utils.js new file mode 100755 index 0000000000000000000000000000000000000000..2fdf472f45298ce5c13bb1e2c42014f814670714 --- /dev/null +++ b/assets/js/sig/dvf/leaflet.dvf.utils.js @@ -0,0 +1,1149 @@ +// indexOf doesn't work in IE 8 and below, so add this method if it doesn't exist +// Copied from: http://stackoverflow.com/questions/1744310/how-to-fix-array-indexof-in-javascript-for-ie-browsers +if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function(obj, start) { + for (var i = (start || 0), j = this.length; i < j; i++) { + if (this[i] === obj) { return i; } + } + return -1; + } +} + +// Add the keys method to the Object class if it doesn't exist +// Object.keys is supported in newer browsers IE9+, etc. +if (!Object.keys) { + Object.keys = (function () { + var hasOwnProperty = Object.prototype.hasOwnProperty, + hasDontEnumBug = !({toString: null}).propertyIsEnumerable('toString'), + dontEnums = ['toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor'], + dontEnumsLength = dontEnums.length; + + return function (obj) { + var result, prop, i; + + if ((typeof obj !== 'object' && typeof obj !== 'function') || obj === null) { + throw new TypeError('Object.keys called on non-object'); + } + + result = []; + + for (prop in obj) { + if (hasOwnProperty.call(obj, prop)) { + result.push(prop); + } + } + + if (hasDontEnumBug) { + for (i = 0; i < dontEnumsLength; i++) { + if (hasOwnProperty.call(obj, dontEnums[i])) { + result.push(dontEnums[i]); + } + } + } + return result; + }; + })(); +} + +L.Util.guid = function () { + var s4 = function() { + return Math.floor((1 + Math.random()) * 0x10000) + .toString(16) + .substring(1); + }; + + return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4(); +}; + +L.Util.getProperty = function (obj, property, defaultValue) { + return (property in obj) ? obj[property] : defaultValue; +}; + +L.Util.setFieldValue = function (record, fieldName, value) { + var keyParts = fieldName.split('.'); + var pointer = record; + var part; + + for (var i = 0; i < keyParts.length - 1; ++i) { + part = keyParts[i]; + pointer[part] = pointer[part] || {}; + pointer = pointer[part]; + } + + pointer[keyParts[keyParts.length - 1]] = value; +}; + +L.Util.getFieldValue = function (record, fieldName) { + + var value = null; + + if (fieldName) { + var parts = fieldName.split('.'); + var valueField = record; + var part; + var searchParts; + var searchKey; + var searchValue; + var testObject; + var searchPart; + var bracketIndex = -1; + var testValue; + + for (var partIndex = 0; partIndex < parts.length; ++partIndex) { + part = parts[partIndex]; + + bracketIndex = part.indexOf('['); + + if (bracketIndex > -1) { + + searchPart = part.substring(bracketIndex); + part = part.substring(0, bracketIndex); + + searchPart = searchPart.replace('[', '').replace(']', ''); + + searchParts = searchPart.split('='); + searchKey = searchParts[0]; + searchValue = searchParts[1]; + + valueField = valueField[part]; + + for (var valueIndex = 0; valueIndex < valueField.length; ++valueIndex) { + testObject = valueField[valueIndex]; + + testValue = testObject[searchKey]; + + if (testValue && testValue === searchValue) { + valueField = testObject; + } + } + } + else if (valueField && valueField.hasOwnProperty(part)) { + valueField = valueField[part]; + } + else { + valueField = null; + break; + } + } + + value = valueField; + } + else { + value = record; + } + + return value; +}; + +L.Util.getNumericRange = function (records, fieldName) { + var min = Number.MAX_VALUE; + var max = Number.MIN_VALUE; + + for (var index in records) { + if (records.hasOwnProperty(index)) { + var record = records[index]; + var value = L.Util.getFieldValue(record, fieldName); + min = Math.min(min, value); + max = Math.max(max, value); + } + } + + return [min, max]; +}; + +L.Util.pointToGeoJSON = function () { + var feature = { + type: 'Feature', + geometry: { + type: 'Point', + coordinates: [this._latlng[1], this._latlng[0]] + }, + properties: {} + } + + for (var key in this.options) { + if (this.options.hasOwnProperty(key)) { + var value = this.options[key]; + + if (typeof(value) !== 'function') { + feature.properties[key] = value; + } + } + } + + return feature; +}; + +L.Util.updateLayer = function (layer, updateFunction) { + if (layer.eachLayer && !layer instanceof L.FeatureGroup) { + layer.eachLayer(function (layer) { + L.Util.updateLayer(layer, updateFunction); + }); + } + else { + updateFunction.call(this, layer); + } +}; + +L.CategoryLegend = L.Class.extend({ + initialize: function (options) { + L.Util.setOptions(this, options); + }, + + generate: function (options) { + options = options || {}; + + var container = document.createElement('div'); + var legend = L.DomUtil.create('div', 'legend', container); + var className = options.className; + var legendOptions = this.options; + + if (className) { + L.DomUtil.addClass(legend, className); + } + + if (options.title) { + L.DomUtil.create('div', 'legend-title', legend).innerHTML = options.title; + } + + for (var key in legendOptions) { + categoryOptions = legendOptions[key]; + + var displayName = categoryOptions.displayName || key; + + var legendElement = L.DomUtil.create('div', 'data-layer-legend', legend); + var legendBox = L.DomUtil.create('div', 'legend-box', legendElement); + + L.DomUtil.create('div', 'key', legendElement).innerHTML = displayName; + L.StyleConverter.applySVGStyle(legendBox, categoryOptions); + } + + return container.innerHTML; + } +}); + +/* + * Uses Leaflet's DivIcon class for adding a legend popup to data markers + */ +L.LegendIcon = L.DivIcon.extend({ + initialize: function (fields, layerOptions, options) { + var container = document.createElement('div'); + var legendContent = L.DomUtil.create('div', 'legend', container); + var legendTitle = L.DomUtil.create('div', 'title', legendContent); + var legendBox = L.DomUtil.create('div', 'legend-box', legendContent); + var legendValues = L.DomUtil.create('div', 'legend-values', legendContent); + var field; + var title = layerOptions.title || layerOptions.name; + + if (title) { + legendTitle.innerHTML = title; + } + + for (var key in fields) { + field = fields[key]; + L.DomUtil.create('div', 'key', legendValues).innerHTML = field.name || key; + L.DomUtil.create('div', 'value', legendValues).innerHTML = field.value; + } + + L.StyleConverter.applySVGStyle(legendBox, layerOptions); + + legendBox.style.height = '5px'; + + options.html = container.innerHTML; + options.className = options.className || 'legend-icon'; + + L.DivIcon.prototype.initialize.call(this, options); + } +}); + +L.legendIcon = function (fields, layerOptions, options) { + return new L.LegendIcon(fields, layerOptions, options); +}; + +L.GeometryUtils = { + + getName: function (geoJSON) { + var name = null; + + if (geoJSON && geoJSON.features) { + for (var index = 0; index < geoJSON.features.length; ++index) { + var feature = geoJSON.features[index]; + if (feature.properties && feature.properties.name) { + name = feature.properties.name; + break; + } + } + } + + return name; + }, + + getGeoJSONLocation: function (geoJSON, record, locationTextField, recordToLayer) { + var geoJSONLayer = new L.GeoJSON(geoJSON, { + pointToLayer: function (feature, latlng) { + var location = { + location: latlng, + text: locationTextField ? L.Util.getFieldValue(record, locationTextField) : [latlng.lat.toFixed(3),latlng.lng.toFixed(3)].join(', '), + center: latlng + }; + + return recordToLayer(location, record); + } + }); + + var center = null; + + try { + center = L.GeometryUtils.loadCentroid(geoJSON); + } + catch (ex) { + console.log('Error loading centroid for ' + JSON.stringify(geoJSON)); + } + + return { + location: geoJSONLayer, + text: locationTextField ? L.Util.getFieldValue(record, locationTextField) : null, + center: center + }; + }, + + // Merges a set of properties into the properties of each feature of a GeoJSON FeatureCollection + mergeProperties: function (properties, featureCollection, mergeKey) { + var features = featureCollection['features']; + var featureIndex = L.GeometryUtils.indexFeatureCollection(features, mergeKey); + var property; + var mergeValue; + var newFeatureCollection = { + type: 'FeatureCollection', + features: [] + }; + + for (var key in properties) { + if (properties.hasOwnProperty(key)) { + property = properties[key]; + + mergeValue = property[mergeKey]; + + if (mergeValue) { + var feature = featureIndex[mergeValue]; + + for (var prop in property) { + feature.properties[prop] = property[prop]; + } + + newFeatureCollection.features.push(feature); + } + } + } + + return newFeatureCollection; + }, + + // Indexes a GeoJSON FeatureCollection using the provided key + indexFeatureCollection: function (featureCollection, indexKey) { + var features = featureCollection.features; + var feature; + var properties; + var featureIndex = {}; + var value; + + for (var index = 0; index < features.length; ++index) { + feature = features[index]; + + properties = feature.properties; + + value = properties[indexKey]; + + // If the value already exists in the index, then either create a GeometryCollection or append the + // feature's geometry to the existing GeometryCollection + if (value in featureIndex) { + var existingFeature = featureIndex[value]; + + if (existingFeature.geometry.type !== 'GeometryCollection') { + featureIndex[value] = { + type: 'Feature', + geometry: { + type: 'GeometryCollection', + geometries: [feature.geometry, existingFeature.geometry] + } + } + } + else { + existingFeature.geometry.geometries.push(feature.geometry); + } + } + else { + featureIndex[value] = feature; + } + } + + return featureIndex; + }, + + arrayToMap: function (array, fromKey, toKey) { + var map = {}; + var item; + var from; + var to; + + for (var index = 0; index < array.length; ++index) { + item = array[index]; + + from = item[fromKey]; + + to = toKey ? item[toKey] : item; + + map[from] = to; + + } + + return map; + }, + + arrayToMaps: function (array, mapLinks) { + var map; + var item; + var from; + var to; + var maps = []; + var mapLink; + var fromKey; + var toKey; + + for (var i = 0; i < mapLinks.length; ++i) { + maps.push({}); + } + + for (var index = 0; index < array.length; ++index) { + item = array[index]; + + for (var keyIndex = 0; keyIndex < mapLinks.length; ++keyIndex) { + map = maps[keyIndex]; + mapLink = mapLinks[keyIndex]; + + fromKey = mapLink.from; + toKey = mapLink.to; + + from = item[fromKey]; + to = toKey ? item[toKey] : item; + + map[from] = to; + } + } + + return maps; + }, + + loadCentroid: function (feature) { + var centroidLatLng = null; + var centroid; + var x,y; + + if (feature.geometry && feature.geometry.type === 'Point') { + centroidLatLng = new L.LatLng(feature.geometry.coordinates[1], feature.geometry.coordinates[0]); + } + else if (typeof jsts !== 'undefined') { + + var parser = new jsts.io.GeoJSONParser(); + var jstsFeature = parser.read(feature); + + if (jstsFeature.getCentroid) { + centroid = jstsFeature.getCentroid(); + x = centroid.coordinate.x; + y = centroid.coordinate.y; + } + else if (jstsFeature.features) { + var totalCentroidX = 0; + var totalCentroidY = 0; + + for (var i=0;i < jstsFeature.features.length;++i) { + centroid = jstsFeature.features[i].geometry.getCentroid(); + + totalCentroidX += centroid.coordinate.x; + totalCentroidY += centroid.coordinate.y; + } + + x = totalCentroidX/jstsFeature.features.length; + y = totalCentroidY/jstsFeature.features.length; + } + else { + centroid = jstsFeature.geometry.getCentroid(); + x = centroid.coordinate.x; + y = centroid.coordinate.y; + } + + centroidLatLng = new L.LatLng(y, x); + + } + + return centroidLatLng; + }, + + loadCentroids: function (dictionary) { + var centroids = {}; + var feature; + + for (var key in dictionary) { + feature = dictionary[key]; + centroids[key] = L.GeometryUtils.loadCentroid(feature); + } + + return centroids; + } +}; + +L.SVGPathBuilder = L.Class.extend({ + initialize: function (points, innerPoints, options) { + this._points = points || []; + this._innerPoints = innerPoints || []; + + L.Util.setOptions(this, options); + }, + + options: { + closePath: true + }, + + _getPathString: function (points, digits) { + var pathString = ''; + + if (points.length > 0) { + + var point = points[0]; + var digits = digits !== null ? digits : 2; + var startChar = 'M'; + var lineToChar = 'L'; + var closePath = 'Z'; + + if (L.Browser.vml) { + digits = 0; + startChar = 'm'; + lineToChar = 'l'; + closePath = 'xe'; + } + + pathString = startChar + point.x.toFixed(digits) + ',' + point.y.toFixed(digits); + + for (var index = 1;index < points.length;index++) { + point = points[index]; + pathString += lineToChar + point.x.toFixed(digits) + ',' + point.y.toFixed(digits); + } + + if (this.options.closePath) { + pathString += closePath; + } + + } + + return pathString; + }, + + addPoint: function (point, inner) { + inner ? this._innerPoints.push(point) : this._points.push(point); + }, + + build: function (digits) { + digits = digits || this.options.digits; + + var pathString = this._getPathString(this._points, digits); + + if (this._innerPoints) { + pathString += this._getPathString(this._innerPoints, digits); + } + + return pathString; + } +}); + +L.StyleConverter = { + keyMap: { + fillColor: { + property: ['background-color'], + valueFunction: function (value) { + return value; + } + }, + color: { + property: ['color', 'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color'], //border + valueFunction: function (value) { + return value; + } + }, + weight: { + property: ['border-width'], + valueFunction: function (value) { + return Math.ceil(value) + 'px'; + } + }, + stroke: { + property: ['border-style'], + valueFunction: function (value) { + return value === true ? 'solid' : 'none'; + } + }, + dashArray: { + property: ['border-style'], + valueFunction: function (value) { + var style = 'solid'; + + if (value) { + style = 'dashed'; + } + + return style; + } + }, + barThickness: { + property: ['height'], + valueFunction: function (value) { + return value + 'px'; + } + }, + radius: { + property: ['height'], + valueFunction: function (value) { + return 2 * value + 'px'; + } + }, + fillOpacity: { + property: ['opacity'], + valueFunction: function (value) { + return value; + } + } + }, + + applySVGStyle: function (element, svgStyle, additionalKeys) { + var keyMap = L.StyleConverter.keyMap; + + if (additionalKeys) { + keyMap = L.Util.extend(keyMap, additionalKeys); + } + + element.style.borderStyle = 'solid'; + + for (var property in svgStyle) { + L.StyleConverter.setCSSProperty(element, property, svgStyle[property], keyMap); + } + + return element; + }, + + setCSSProperty: function (element, key, value, keyMap) { + var keyMap = keyMap || L.StyleConverter.keyMap; + var cssProperty = keyMap[key]; + var cssText = ''; + + if (cssProperty) { + var propertyKey = cssProperty.property; + for (var propertyIndex = 0, propertyLength = propertyKey.length; propertyIndex < propertyLength; ++propertyIndex) { + cssText += propertyKey[propertyIndex] + ':' + cssProperty.valueFunction(value) + ';'; + } + } + element.style.cssText += cssText; + + return element; + } +}; + +L.StylesBuilder = L.Class.extend({ + initialize: function (categories, styleFunctionMap) { + this._categories = categories; + this._styleFunctionMap = styleFunctionMap; + + this._buildStyles(); + }, + + _buildStyles: function () { + var map = {}; + var category; + var styleFunction; + var styleValue; + + for (var index = 0; index < this._categories.length; ++index) { + category = this._categories[index]; + + map[category] = {}; + + for (var property in this._styleFunctionMap) { + styleFunction = this._styleFunctionMap[property]; + + styleValue = styleFunction.evaluate ? styleFunction.evaluate(index) : (typeof styleFunction === 'function' ? styleFunction(index) : styleFunction); + + map[category][property] = styleValue; + } + } + + this._styleMap = map; + }, + + getStyles: function () { + return this._styleMap; + } + + +}); + +L.PaletteBuilder = L.Class.extend({ + initialize: function (styleFunctionMap) { + this._styleFunctionMap = styleFunctionMap; + }, + + generate: function (options) { + options = options || {}; + + var container = document.createElement('div'); + var paletteElement = L.DomUtil.create('div', 'palette', container); + var count = options.count || 10; + var categories = (function (count) { + var categoryArray = []; + + for (var i = 0; i < count; ++i) { + categoryArray.push(i); + } + + return categoryArray; + })(count); + + var styleBuilder = new L.StylesBuilder(categories, this._styleFunctionMap); + var styles = styleBuilder.getStyles(); + + if (options.className) { + L.DomUtil.addClass(paletteElement, options.className); + } + + for (var styleKey in styles) { + var i = L.DomUtil.create('i', 'palette-element', paletteElement); + var style = styles[styleKey]; + + L.StyleConverter.applySVGStyle(i, style); + } + + return container.innerHTML; + + } +}); + +L.HTMLUtils = { + buildTable: function (obj, className, ignoreFields) { + className = className || 'table table-condensed table-striped table-bordered'; + + var table = L.DomUtil.create('table', className); + var thead = L.DomUtil.create('thead', '', table); + var tbody = L.DomUtil.create('tbody', '', table); + thead.innerHTML = '<tr><th>Name</th><th>Value</th></tr>'; + + ignoreFields = ignoreFields || []; + + function inArray(arrayObj, value) { + for (var i = 0, l = arrayObj.length; i < l; i++) { + if (arrayObj[i] === value) { + return true; + } + } + return false; + } + + for (var property in obj) { + if (obj.hasOwnProperty(property) && !inArray(ignoreFields, property)) { + var value = obj[property]; + if (typeof value === 'object') { + var container = document.createElement('div'); + container.appendChild(L.HTMLUtils.buildTable(value, ignoreFields)); + value = container.innerHTML; + } + tbody.innerHTML += '<tr><td>' + property + '</td><td>' + value + '</td></tr>'; + } + } + + return table; + } +}; + +/* + * Provides basic animation of numeric properties. TODO: Change this to use L.Util.requestAnimFrame + */ +L.AnimationUtils = { + animate: function (layer, from, to, options) { + var delay = options.delay || 0; + var frames = options.frames || 30; + var duration = options.duration || 500; + var linearFunctions = {}; + var easeFunction = options.easeFunction || function (step) { return step }; + var complete = options.complete; + var step = duration / frames; + + for (var key in from) { + if (key != 'color' && key != 'fillColor' && to[key]) { + linearFunctions[key] = new L.LinearFunction([0, from[key]], [frames - 1, to[key]]); + } + else if (key == 'color' || key == 'fillColor') { + linearFunctions[key] = new L.RGBColorBlendFunction(0, frames - 1, from[key], to[key]); + } + } + + var layerOptions = {}; + + var frame = 0; + + var updateLayer = function () { + for (var key in linearFunctions) { + layerOptions[key] = linearFunctions[key].evaluate(frame); + } + + layer.options = L.extend({}, layer.options, layerOptions); + layer.setStyle(layer.options).redraw(); + + frame++; + + step = easeFunction(step); + + if (frame < frames) { + setTimeout(updateLayer, step); + } + else { + complete(); + } + }; + + setTimeout(updateLayer, delay); + } +}; + +/** + * Adapted from: http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript + * These functions will be used to provide backwards compatibility with browsers that don't support hsl + */ +L.Color = L.Class.extend({ + initialize: function (colorDef) { + this._rgb = [0, 0, 0]; + this._hsl = [0, 1, 0.5]; + this._a = 1.0; + + if (colorDef) { + this.parseColorDef(colorDef); + } + }, + + parseColorDef: function (colorDef) { + // Override in inheriting classes + }, + + /** + * Converts an RGB color value to HSL. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes r, g, and b are contained in the set [0, 255] and + * returns h, s, and l in the set [0, 1]. + * + * @param Number r The red color value + * @param Number g The green color value + * @param Number b The blue color value + * @return Array The HSL representation + */ + rgbToHSL: function(r, g, b){ + r /= 255, g /= 255, b /= 255; + var max = Math.max(r, g, b), min = Math.min(r, g, b); + var h, s, l = (max + min) / 2; + + if(max == min){ + h = s = 0; // achromatic + }else{ + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch(max){ + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + } + h /= 6; + } + + return [h, s, l]; + }, + + /** + * Converts an HSL color value to RGB. Conversion formula + * adapted from http://en.wikipedia.org/wiki/HSL_color_space. + * Assumes h, s, and l are contained in the set [0, 1] and + * returns r, g, and b in the set [0, 255]. + * + * @param Number h The hue + * @param Number s The saturation + * @param Number l The lightness + * @return Array The RGB representation + */ + hslToRGB: function(h, s, l){ + var r, g, b; + + if(s == 0){ + r = g = b = l; // achromatic + }else{ + function hue2rgb(p, q, t){ + if(t < 0) t += 1; + if(t > 1) t -= 1; + if(t < 1/6) return p + (q - p) * 6 * t; + if(t < 1/2) return q; + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6; + return p; + } + + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1/3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1/3); + } + + return [Math.floor(r * 255), Math.floor(g * 255), Math.floor(b * 255)]; + }, + + setRGB: function (r, g, b) { + this._rgb = [r, g, b]; + + this._hsl = this.rgbToHSL(r, g, b); + + return this; + }, + + setHSL: function (h, s, l) { + this._hsl = [h, s, l]; + + this._rgb = this.hslToRGB(h, s, l); + + return this; + }, + + toHSL: function () { + // Return HSL components + return this._hsl; + }, + + toHSLString: function () { + // Return HSL string + var prefix = 'hsl'; + + if (this._a < 1.0) { + prefix += 'a'; + } + + return prefix + '(' + (this._hsl[0] * 360).toFixed(1) + ',' + (this._hsl[1] * 100).toFixed(0) + '%,' + (this._hsl[2] * 100).toFixed(0) + '%)'; + }, + + toRGB: function () { + // Return RGB components + return this._rgb; + }, + + toRGBString: function () { + // Return RGB string + var rgbString; + + if (this._a < 1.0) { + rgbString = 'rgba(' + this._rgb[0].toFixed(0) + ',' + this._rgb[1].toFixed(0) + ',' + this._rgb[2].toFixed(0) + ',' + this._a.toFixed(1) + ')'; + } + else { + var parts = [this._rgb[0].toString(16), this._rgb[1].toString(16), this._rgb[2].toString(16)]; + + for (var i = 0; i < parts.length; ++i) { + if (parts[i].length === 1) { + parts[i] = '0' + parts[i]; + } + } + + rgbString = '#' + parts.join(''); + } + + return rgbString; + }, + + r: function (newR) { + if (!arguments.length) return this._rgb[0]; + return this.setRGB(newR, this._rgb[1], this._rgb[2]); + }, + + g: function (newG) { + if (!arguments.length) return this._rgb[1]; + return this.setRGB(this._rgb[0], newG, this._rgb[2]); + }, + + b: function (newB) { + if (!arguments.length) return this._rgb[2]; + return this.setRGB(this._rgb[0], this._rgb[1], newB); + }, + + h: function (newH) { + if (!arguments.length) return this._hsl[0]; + return this.setHSL(newH, this._hsl[1], this._hsl[2]); + }, + + s: function (newS) { + if (!arguments.length) return this._hsl[1]; + return this.setHSL(this._hsl[0], newS, this._hsl[2]); + }, + + l: function (newL) { + if (!arguments.length) return this._hsl[2]; + return this.setHSL(this._hsl[0], this._hsl[1], newL); + }, + + a: function (newA) { + if (!arguments.length) return this._a; + this._a = newA; + return this; + } +}); + +/* + * A class representing an RGB color - extends L.Color + */ +L.RGBColor = L.Color.extend({ + initialize: function (colorDef) { + L.Color.prototype.initialize.call(this, colorDef); + }, + + parseColorDef: function (colorDef) { + var isArray = colorDef instanceof Array; + var isHex = colorDef.indexOf('#') === 0; + var parts = []; + var r, g, b, a; + + if (isArray) { + r = Math.floor(colorDef[0]); + g = Math.floor(colorDef[1]); + b = Math.floor(colorDef[2]); + + a = colorDef.length === 4 ? colorDef[3] : 1.0; + } + else if (isHex) { + colorDef = colorDef.replace('#',''); + + r = parseInt(colorDef.substring(0, 2), 16); + g = parseInt(colorDef.substring(2, 4), 16); + b = parseInt(colorDef.substring(4, 6), 16); + + a = colorDef.length === 8 ? parseInt(colorDef.substring(6, 8), 16) : 1.0; + } + else { + parts = colorDef.replace('rgb','').replace('a','').replace(/\s+/g,'').replace('(','').replace(')','').split(','); + + r = parseInt(parts[0]); + g = parseInt(parts[1]); + b = parseInt(parts[2]); + + a = parts.length === 4 ? parseInt(parts[3]) : 1.0; + } + + this.setRGB(r, g, b); + this._a = a; + } +}); + +L.rgbColor = function (colorDef) { + return new L.RGBColor(colorDef); +}; + +L.HSLColor = L.Color.extend({ + initialize: function (colorDef) { + L.Color.prototype.initialize.call(this, colorDef); + }, + + parseColorDef: function (colorDef) { + // Could be a string or an array + var isArray = colorDef instanceof Array; + var h, s, l, a; + + if (isArray) { + h = colorDef[0]; + s = colorDef[1]; + l = colorDef[2]; + + a = colorDef.length === 4 ? colorDef[3] : 1.0; + } + else { + var parts = colorDef.replace('hsl','').replace('a','').replace('(','').replace(/\s+/g,'').replace(/%/g,'').replace(')','').split(','); + + h = Number(parts[0])/360; + s = Number(parts[1])/100; + l = Number(parts[2])/100; + + a = parts.length === 4 ? parseInt(parts[3]) : 1.0; + } + + this.setHSL(h, s, l); + this._a = a; + } +}); + +L.hslColor = function (colorDef) { + return new L.HSLColor(colorDef); +}; + +/* + * A generic animation class based on the L.PosAnimation code from Leaflet + */ +L.Animation = L.Class.extend({ + + initialize: function (easeFunction, animateFrame) { + this._easeFunction = easeFunction; // Function that takes time as an input parameter + this._animateFrame = animateFrame; + }, + + run: function (el, options) { // (HTMLElement, Point[, Number, Number]) + this.stop(); + + this._el = el; + this._inProgress = true; + this._duration = options.duration || 0.25; + + this._animationOptions = options; + this._startTime = +new Date(); + + this.fire('start'); + + this._animate(); + }, + + stop: function () { + if (!this._inProgress) { return; } + + this._step(); + this._complete(); + }, + + _animate: function () { + // animation loop + this._animId = L.Util.requestAnimFrame(this._animate, this); + this._step(); + }, + + _step: function () { + var elapsed = (+new Date()) - this._startTime, + duration = this._duration * 1000; + + if (elapsed < duration) { + this._runFrame(this._easeFunction(elapsed / duration)); + } else { + this._runFrame(1); + this._complete(); + } + }, + + _runFrame: function (progress) { + this._animateFrame(progress); + + this.fire('step'); + }, + + _complete: function () { + L.Util.cancelAnimFrame(this._animId); + + this._inProgress = false; + this.fire('end'); + } +}); \ No newline at end of file diff --git a/assets/js/sig/findAddressGeoPos.js b/assets/js/sig/findAddressGeoPos.js new file mode 100755 index 0000000000000000000000000000000000000000..d12fa6ed2b4ddc537f51ad6f0eeaabf3512ce735 --- /dev/null +++ b/assets/js/sig/findAddressGeoPos.js @@ -0,0 +1,447 @@ + +/* return { id, cityName, postalCode, street, coordinates } + PROCESS GENERAL +*/ +function getGeoPosInternational(requestPart, countryCode){ + + var countryCodes = new Array("FR", "GP", "GF", "MQ", "YT", "NC", "RE", "PM"); + showMsgListRes("<i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+" ..."); + + if($.inArray(countryCode, countryCodes) >= 0) callCommunecter(requestPart, countryCode); + else + callNominatim(requestPart, countryCode); +} + +function callCommunecter(requestPart, countryCode){ /*countryCode=="FR"*/ + mylog.log('callCommunecter'); + showMsgListRes("<i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+" <small>Communecter</small>"); + callGeoWebService("communecter", requestPart, countryCode, + function(objs){ /*success nominatim*/ + mylog.log("SUCCESS Communecter"); + + if(objs.length != 0){ + mylog.log('Résultat trouvé chez Communecter !'); mylog.dir(objs); + var commonGeoObj = getCommonGeoObject(objs, "communecter"); + var res = addResultsInForm(commonGeoObj, countryCode); + if(res == 0) + callDataGouv(requestPart, countryCode); + }else{ + mylog.log('Aucun résultat chez Communecter'); + callDataGouv(requestPart, countryCode); + } + }, + function(thisError){ /*error nominatim*/ + mylog.log("ERROR communecter"); + mylog.dir(thisError); + } + ); +} + +function callDataGouv(requestPart, countryCode){ /*countryCode=="FR"*/ + mylog.log('callDataGouv'); + showMsgListRes("<i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+" <small>Data Gouv</small>"); + callGeoWebService("data.gouv", requestPart, countryCode, + function(objDataGouv){ /*success nominatim*/ + mylog.log("SUCCESS DataGouv"); + + if(objDataGouv.features.length != 0){ + mylog.log('Résultat trouvé chez DataGouv !'); mylog.dir(objDataGouv); + var commonGeoObj = getCommonGeoObject(objDataGouv.features, "data.gouv"); + var res = addResultsInForm(commonGeoObj, countryCode); + if(res == 0) + callNominatim(requestPart, countryCode); + }else{ + mylog.log('Aucun résultat chez DataGouv'); + callNominatim(requestPart, countryCode); + } + }, + function(thisError){ /*error nominatim*/ + mylog.log("ERROR DataGouv"); + mylog.dir(thisError); + } + ); +} + +function callNominatim(requestPart, countryCode){ + mylog.log('callNominatim'); + showMsgListRes("<i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+" <small>Nominatim</small>"); + callGeoWebService("nominatim", requestPart, countryCode, + function(objNomi){ /*success nominatim*/ + mylog.log("SUCCESS nominatim"); + + if(objNomi.length != 0){ + mylog.log('Résultat trouvé chez Nominatim !'); mylog.dir(objNomi); + + var commonGeoObj = getCommonGeoObject(objNomi, "nominatim"); + var res = addResultsInForm(commonGeoObj, countryCode); + + if(res == 0) + callGoogle(requestPart, countryCode); + }else{ + mylog.log('Aucun résultat chez Nominatim'); + callGoogle(requestPart, countryCode); + } + }, + function(thisError){ /*error nominatim*/ + mylog.log("ERROR nominatim"); + mylog.dir(thisError); + } + ); +} + +function callGoogle(requestPart, countryCode){ + mylog.log('callGoogle'); + showMsgListRes("<i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+" <small>GoogleMap</small>"); + callGeoWebService("google", requestPart, countryCode, + function(objGoo){ /*success google*/ + mylog.log("SUCCESS GOOGLE"); + if(objGoo.results.length != 0){ + mylog.log('Résultat trouvé chez Google !'); mylog.dir(objGoo); + var commonGeoObj = getCommonGeoObject(objGoo.results, "google"); + var res = addResultsInForm(commonGeoObj, countryCode); + if(res == 0) + showMsgListRes("<i class='fa fa-ban'></i> "+trad.noresult+". Précisez votre recherche."); + + }else{ + mylog.log('Aucun résultat chez Google'); + showMsgListRes("<i class='fa fa-ban'></i> "+trad.noresult+". Précisez votre recherche."); + } + + }, + function(thisError){ /*error google*/ + showMsgListRes("<i class='fa fa-ban'></i> "+trad.noresult+". Précisez votre recherche."); + mylog.log("ERROR GOOGLE"); mylog.dir(thisError); + } + ); +} + +/* fonction pour appeler le web service de géoloc de sont choix */ +function callGeoWebService(providerName, requestPart, countryCode, success, error){ + var url = ""; + var data = {}; + + if(providerName == "nominatim") { + if(formInMap.typeSearchInternational == "address") + url = "//nominatim.openstreetmap.org/search?q=" + requestPart + "," + countryCode + "&format=json&polygon=0&addressdetails=1"; + else if(formInMap.typeSearchInternational == "city") + url = "//nominatim.openstreetmap.org/search?city=" + requestPart + "&country=" + countryCode + "&format=json&polygon=0&addressdetails=1"; + } + + if(providerName == "google") { + if(formInMap.typeSearchInternational == "address") + url = "//maps.googleapis.com/maps/api/geocode/json?address=" + requestPart + "," + countryCode; + else if(formInMap.typeSearchInternational == "city") + url = "//maps.googleapis.com/maps/api/geocode/json?locality=" + requestPart + "&country=" + countryCode; + } + if(providerName == "data.gouv") { + if(formInMap.typeSearchInternational == "address") + url = "//api-adresse.data.gouv.fr/search/?q=" + requestPart; + else if(formInMap.typeSearchInternational == "city") + url = "//api-adresse.data.gouv.fr/search/?q=" + requestPart + "&type=city"; + } + if(providerName == "communecter") { + url = baseUrl+"/"+moduleId+"/search/globalautocomplete"; + data = {"name" : requestPart, "country" : countryCode, "searchType" : [ "cities" ], "searchBy" : "ALL" }; + } + + mylog.log("calling : " + url); + if(url != ""){ + if(providerName != "communecter"){ + $.ajax({ + url: url, + type: 'GET', + dataType: 'json', + async:false, + crossDomain:true, + complete: function () {}, + success: function (obj){ + success(obj); + }, + error: function (thisError) { + error(thisError); + } + }); + }else{ + $.ajax({ + url: url, + type: 'POST', + dataType: 'json', + data:data, + complete: function () {}, + success: function (obj){ + success(obj); + }, + error: function (thisError) { + error(thisError); + } + }); + } + }else{ + toastr.error('provider inconnu', providerName); + return false; + } +} + + +function showMsgListRes(msg){ mylog.log("showMsgListRes", msg); + msg = msg != "" ? "<li class='padding-5'>" + msg + "</li>" : ""; + + if($("#dropdown-newElement_streetAddress-found").length){ //si on a cet id = on est dans formInMap + $("#dropdown-newElement_streetAddress-found").html(msg); + }else{ + $("#liste_map_element").html(msg); + } +} + + +/* retourne un obj address commun à partir des données des différents webservices */ +function getCommonGeoObject(objs, providerName){ + + var commonObjs = new Array(); + var multiCpName = new Array(); + $.each(objs, function(key, obj){ + console.log("obj result", providerName, obj); + var commonObj = {}; + if(providerName == "nominatim"){ + var address = typeof obj["address"] != "undefined" ? obj["address"] : obj["address_components"]; + commonObj = addAttObjNominatim(commonObj, address, "streetNumber", "house_number"); + + commonObj = addAttObjNominatim(commonObj, address, "street", "road"); + if(typeof commonObj["street"] == "undefined") + commonObj = addAttObjNominatim(commonObj, address, "street", "locality"); + + commonObj = addAttObjNominatim(commonObj, address, "cityName", "county"); + commonObj = addAttObjNominatim(commonObj, address, "cityName", "city"); + commonObj = addAttObjNominatim(commonObj, address, "cityName", "village"); + commonObj = addAttObjNominatim(commonObj, address, "cityName", "town"); + commonObj = addAttObjNominatim(commonObj, address, "suburb", "suburb"); + commonObj = addAttObjNominatim(commonObj, address, "country", "country"); + commonObj = addAttObjNominatim(commonObj, address, "state", "state"); + commonObj = addAttObjNominatim(commonObj, address, "countryCode", "country_code"); + commonObj = addAttObjNominatim(commonObj, address, "postalCode", "postcode"); + commonObj = addAttObjNominatim(commonObj, obj, "placeId", "place_id"); + + }else + if(providerName == "google"){ + $.each(obj.address_components, function(addressKey, component){ + commonObj = addAttObjGoogle(commonObj, component, "streetNumber", "street_number", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "street", "route", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "cityName", "locality", "short_name"); + commonObj = addAttObjGoogle(commonObj, component, "country", "country", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "countryCode", "country", "short_name"); + commonObj = addAttObjGoogle(commonObj, component, "postalCode", "postal_code", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "POI", "point_of_interest", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "AAL1", "administrative_area_level_1", "long_name"); + commonObj = addAttObjGoogle(commonObj, component, "AAL2", "administrative_area_level_2", "long_name"); + }); + commonObj = addAttObjNominatim(commonObj, obj, "placeId", "place_id"); + }else + if(providerName == "data.gouv"){ + mylog.log("details result data.gouv"); + mylog.dir(obj); + var address = obj["properties"]; + commonObj = addAttObjNominatim(commonObj, address, "street", "name"); + commonObj = addAttObjNominatim(commonObj, address, "cityName", "city"); + commonObj = addAttObjNominatim(commonObj, address, "country", "country"); + commonObj = addAttObjNominatim(commonObj, address, "postalCode", "postcode"); + commonObj = addAttObjNominatim(commonObj, address, "insee", "citycode"); + commonObj["countryCode"] = "FR"; + commonObj = addAttObjNominatim(commonObj, address, "placeId", "id"); + + }else + if(providerName == "communecter"){ + mylog.log("details result communecter"); + mylog.dir(obj); + commonObj = addAttObjNominatim(commonObj, obj, "cityName", "name"); + commonObj = addAttObjNominatim(commonObj, obj, "countryCode", "country"); + commonObj = addAttObjNominatim(commonObj, obj, "postalCode", "cp"); + commonObj = addAttObjNominatim(commonObj, obj, "insee", "insee"); + commonObj = addAttObjNominatim(commonObj, obj, "geoShape", "geoShape"); + commonObj["placeId"] = obj["country"]+"_"+obj["insee"]+"-" + obj["cp"]; + + } + + commonObj = addCoordinates(commonObj, obj, providerName); + commonObj["type"] = "addressEntity"; + commonObj["typeSig"] = formInMap.formType; + commonObj["name"] = getFullAddress(commonObj); + + if(typeof commonObj["postalCode"] != "undefined" && commonObj["postalCode"].indexOf(";") >= 0){ + var CPS = commonObj["postalCode"].split(";"); + $.each(CPS, function(index, value){ + var oneCity = commonObj; + oneCity["postalCode"] = value; + oneCity["name"] = oneCity["cityName"] + ", " + value + ", " + oneCity["country"]; + + if($.inArray(oneCity["name"], multiCpName) < 0){ + multiCpName.push(oneCity["name"]); + commonObjs.push(oneCity); + } + }); + }else{ + commonObjs.push(commonObj); + } + }); + + + + return commonObjs; +} + + +//ajoute les attribut s'ils existent +function addAttObjNominatim(obj1, obj2, att1, att2){ + if(typeof obj2[att2] != "undefined") obj1[att1] = obj2[att2]; + return obj1; +} + +function addAttObjGoogle(obj1, obj2, att1, att2, nameLength){ + + if($.inArray(att2, obj2.types) >= 0){ + obj1[att1] = obj2[nameLength]; + } + return obj1; +} + +//récupère les coordonnées et transforme la data dans notre format geo +function addCoordinates(commonObj, obj, providerName){ + + var lat = null; var lng = null; var geoShape = null; + + if(providerName == "nominatim"){ + lat = (typeof obj["lat"] != "undefined") ? obj["lat"] : null; + lng = (typeof obj["lon"] != "undefined") ? obj["lon"] : null; + geoShape = (typeof obj["boundingbox"] != "undefined") ? obj["boundingbox"] : null; + }else + if(providerName == "google"){ mylog.log("coordinates google"); mylog.dir(obj); + if(typeof obj["geometry"] != "undefined" && typeof obj["geometry"]["location"] != "undefined"){ + lat = (typeof obj["geometry"]["location"]["lat"] != "undefined") ? obj["geometry"]["location"]["lat"] : null; + lng = (typeof obj["geometry"]["location"]["lng"] != "undefined") ? obj["geometry"]["location"]["lng"] : null; + //geoShape = (typeof obj["boundingbox"] != "undefined") ? obj["boundingbox"] : null; + //TODO : rajouter le boundingbox (transfoormer format google to leaflet polygon) + } + }else + if(providerName == "data.gouv"){ + if(typeof obj["geometry"] != "undefined" && typeof obj["geometry"]["coordinates"] != "undefined"){ + lat = (typeof obj["geometry"]["coordinates"][1] != "undefined") ? obj["geometry"]["coordinates"][1] : null; + lng = (typeof obj["geometry"]["coordinates"][0] != "undefined") ? obj["geometry"]["coordinates"][0] : null; + //TODO : geoshape + } + } + else + if(providerName == "communecter"){ + if(typeof obj["geo"] != "undefined") commonObj["geo"] = obj["geo"]; + if(typeof obj["geoPosition"] != "undefined") commonObj["geoPosition"] = obj["geoPosition"]; + return commonObj; + } + + if(lat != null && lng != null){ + commonObj["geo"] = { "@type" : "GeoCoordinates", + "latitude" : lat, "longitude" : lng }; + + commonObj["geoPosition"] = { "type" : "Point", "float" : true, + "coordinates" : new Array(lat, lng) }; + } + + if(geoShape != null){ + commonObj["geoShape"] = { "type" : "Polygon", + "coordinates" : geoShape }; + } + + return commonObj; +} + + + +/* affiche les résultat de la recherche dans la div #result (à placer dans l'interface au préalable) */ +var markerListEntity = null; +function addResultsInForm(commonGeoObj, countryCode){ + //success + mylog.log("success callGeoWebService"); + //mylog.dir(objs); + var res = commonGeoObj; //getCommonGeoObject(objs, providerName); + mylog.dir(res); + var html = ""; + $.each(res, function(key, value){ //mylog.log(allCities); + if(notEmpty(value.countryCode)){ + mylog.log("Country Code",value.countryCode.toLowerCase(), countryCode.toLowerCase()); + if(value.countryCode.toLowerCase() == countryCode.toLowerCase()){ + html += "<li><a href='javascript:' class='item-street-found' data-lat='"+value.geo.latitude+"' data-lng='"+value.geo.longitude+"'><i class='fa fa-marker-map'></i> "+value.name+"</a></li>"; + } + } + }); + if(html == "") html = "<i class='fa fa-ban'></i> "+trad.noresult; + $("#dropdown-newElement_streetAddress-found").html(html); + $("#dropdown-newElement_streetAddress-found").show(); + + $(".item-street-found").click(function(){ + Sig.markerFindPlace.setLatLng([$(this).data("lat"), $(this).data("lng")]); + Sig.map.panTo([$(this).data("lat"), $(this).data("lng")]); + Sig.map.setZoom(16); + mylog.log("lat lon", $(this).data("lat"), $(this).data("lng")); + $("#dropdown-newElement_streetAddress-found").hide(); + $('[name="newElement_lat"]').val($(this).data("lat")); + $('[name="newElement_lng"]').val($(this).data("lng")); + formInMap.NE_lat = $(this).data("lat"); + formInMap.NE_lng = $(this).data("lng"); + formInMap.showWarningGeo(false); + formInMap.initHtml(); + + }); +} + +function getFullAddress(obj){ + var strResult = ""; + if(typeof obj.street != "undefined") strResult += obj.street; + if(typeof obj.cityName != "undefined") strResult += (strResult != "") ? ", " + obj.cityName : obj.cityName; + //if(typeof obj.village != "undefined") strResult += (strResult != "") ? ", " + obj.village : obj.village; + if(typeof obj.postalCode != "undefined") strResult += (strResult != "") ? ", " + obj.postalCode : obj.postalCode; + if(typeof obj.country != "undefined") strResult += (strResult != "") ? ", " + obj.country : obj.country; + return strResult; +} + + +function checkCityExists(addressData, btn){ + var data = ""; + if(typeof addressData.placeId != "undefined") + data = "insee=" + addressData.placeId; + if(typeof addressData.postalCode != "undefined"){ if(data != "") data += "&"; + data += "postalCode=" + addressData.postalCode; + } + if(typeof addressData.cityName != "undefined"){ if(data != "") data += "&"; + data += "cityName=" + addressData.cityName; + } + if(typeof addressData.country != "undefined"){ if(data != "") data += "&"; + data += "country=" + addressData.countryCode; + } + + mylog.log("start verify city exists : " + data); + + $.ajax({ + url: baseUrl+"/"+moduleId+"/city/cityExists", + type: 'POST', + data: data, + async:false, + dataType: "json", + complete: function () {}, + success: function (thisSuccess){ + if(thisSuccess.res == true){ + mylog.log("cityExists : TRUE"); + mylog.dir(thisSuccess.obj); + $(".item_map_list").removeClass("bg-success text-white"); + $(".item_map_list").removeClass("bg-red text-white"); + $(btn).addClass("bg-success text-white"); + }else{ + mylog.log("cityExists : FLASE"); + $(".item_map_list").removeClass("btn-success text-white"); + $(".item_map_list").removeClass("bg-red text-white"); + $(btn).addClass("bg-red text-white"); + } + }, + error: function (thisError) { + mylog.log("cityExists : ERROR"); + mylog.dir(thisError); + $(btn).addClass("bg-red text-white"); + } + }); +} \ No newline at end of file diff --git a/assets/js/sig/geoloc.js b/assets/js/sig/geoloc.js new file mode 100755 index 0000000000000000000000000000000000000000..cc7d857a2a9e66202a70e9a26d0d02f82d49d9ea --- /dev/null +++ b/assets/js/sig/geoloc.js @@ -0,0 +1,289 @@ + + /* + function findGeoPosByAddress(){ + //si la streetAdress n'est pas renseignée + if($("#streetAddress").html() == $("#streetAddress").attr("data-emptytext")){ + //on récupère la valeur du code insee s'il existe + var insee = ($("#entity-insee-value").attr("insee-val") != "") ? + $("#entity-insee-value").attr("insee-val") : ""; + //si on a un codeInsee, on lance la recherche de position par codeInsee + if(insee != "") findGeoposByInsee(insee); + //si on a une streetAddress + }else{ + var request = ""; + + //recuperation des données de l'addresse + var street = ($("#streetAddress").html() != $("#streetAddress").attr("data-emptytext")) ? $("#streetAddress").html() : ""; + var address = ($("#address").html() != $("#address").attr("data-emptytext")) ? $("#address").html() : ""; + var addressCountry = ($("#addressCountry").html() != $("#addressCountry").attr("data-emptytext")) ? $("#addressCountry").html() : ""; + + //construction de la requete + request = addToRequest(request, street); + request = addToRequest(request, address); + request = addToRequest(request, addressCountry); + + request = transformNominatimUrl(request); + request = "?q=" + request; + + findGeoposByNominatim(request); + } + + } + + //quand la recherche nominatim a fonctionné + function callbackNominatimSuccess(obj){ + mylog.log("callbackNominatimSuccess"); + //si nominatim a trouvé un/des resultats + if (obj.length > 0) { + //on utilise les coordonnées du premier resultat + var coords = L.latLng(obj[0].lat, obj[0].lon); + //et on affiche le marker sur la carte à cette position + showGeoposFound(coords, contextId, "organizations", contextData); + } + //si nominatim n'a pas trouvé de résultat + else { + //on récupère la valeur du code insee s'il existe + var insee = ($("#entity-insee-value").attr("insee-val") != "") ? + $("#entity-insee-value").attr("insee-val") : ""; + //si on a un codeInsee, on lance la recherche de position par codeInsee + if(insee != "") findGeoposByInsee(insee); + } + } + + //en cas d'erreur nominatim + function callbackNominatimError(error){ + mylog.log("callbackNominatimError"); + } + + //quand la recherche par code insee a fonctionné + function callbackFindByInseeSuccess(obj){ + mylog.log("callbackFindByInseeSuccess"); + //si on a bien un résultat + if (typeof obj != "undefined" && obj != "") { + //récupère les coordonnées + var coords = Sig.getCoordinates(obj, "markerSingle"); + //si on a une geoShape on l'affiche + if(typeof obj.geoShape != "undefined") Sig.showPolygon(obj.geoShape); + //on affiche le marker sur la carte + showGeoposFound(coords, contextId, "organizations", contextData); + } + else { + mylog.log("Erreur getlatlngbyinsee vide"); + } + } + + //quand la recherche par code insee n'a pas fonctionné + function callbackFindByInseeError(){ + mylog.log("erreur getlatlngbyinsee"); + } + + */ + + //fonctions callback à surcharger + //nominatim + function callbackNominatimSuccess(obj){} + function callbackNominatimError(error){} + + //insee + function callbackFindByInseeSuccess(obj){} + function callbackFindByInseeError(error){} + //DataGouv + function callbackDataGouvSuccess(obj){} + function callbackDataGouvError(error){} + + //ajoute un élément de l'addresse à la requete + function addToRequest(request, dataStr){ + if(dataStr == "") return request; + if(request != "") dataStr = " " + dataStr; + return transformNominatimUrl(request + dataStr); + } + + //remplace les espaces par des + + function transformNominatimUrl(str){ + var res = ""; + for(var i = 0; i<str.length; i++){ + res += (str.charAt(i) == " ") ? "+" : str.charAt(i); + } + return res; + }; + + //execute la requete nominatim + //et appel les fonction callback en cas de success/error + //il faut définir les callback en fonction du context + function findGeoposByNominatim(requestPart){ + mylog.log('findGeoposByNominatim'); + showLoadingMsg("Recherche de la position en cours"); + $("#iconeChargement").css("display", "inline-block"); + + $.ajax({ + url: "//nominatim.openstreetmap.org/search?q=" + requestPart + "&format=json&polygon=0&addressdetails=1", + type: 'POST', + dataType: 'json', + async:false, + crossDomain:true, + complete: function () {}, + success: function (obj){ + hideLoadingMsg(); + callbackNominatimSuccess(obj); + // if(result.length > 0){ + // callbackNominatimSuccess(obj); + // }else{ + // findGeoposByGoogleMaps(requestPart); + // } + }, + error: function (error) { + callbackNominatimError(error); + $("#iconeChargement").hide(); + } + }); + } + + + //execute la requete nominatim + //et appel les fonction callback en cas de success/error + //il faut définir les callback en fonction du context + function findGeoposByInsee(codeInsee, callbackSuccess, postalCode){ + //toastr.info('<i class="fa fa-spin fa-refresh"></i> Recherche de la position en cours...'); + mylog.log("codeInsee", codeInsee); + showLoadingMsg("Recherche de la position en cours"); + $("#iconeChargement").css("display", "inline-block"); + + $.ajax({ + url: baseUrl+"/"+moduleId+"/sig/getlatlngbyinsee", + type: 'POST', + data: "insee="+codeInsee+"&postalCode="+postalCode, + async:false, + dataType: "json", + complete: function () {}, + success: function (obj){ + mylog.log("success findGeoposByInsee", typeof callbackSuccess); + obj.insee = codeInsee; + if(typeof callbackSuccess != "undefined" && callbackSuccess != null){ + callbackSuccess(obj); + } + else{ + callbackFindByInseeSuccess(obj); + } + }, + error: function (error) { + mylog.log("error findGeoposByInsee"); + callbackFindByInseeError(error); + $("#iconeChargement").hide(); + } + }); + } + + + //recupere les citoyen, orga, events, projets de la city par son code insee + //et affiche les résultat sur la carte + function showDataByInsee(insee){ + //toastr.success('recherche des éléments de la ville'); + + $.ajax({ + url: baseUrl+"/"+moduleId+"/city/getcityjsondata", + type: 'POST', + data: "insee="+insee, + async:false, + dataType: "json", + complete: function () {}, + success: function (obj){ + mylog.log("success showDataByInsee"); + mylog.dir(obj); + hideLoadingMsg(); + Sig.showMapElements(Sig.map, obj); + setTimeout(function() { Sig.map.panBy[10,10]; },2000); + }, + error: function (error) { + $("#loader-city").html(""); + mylog.log("error showDataByInsee"); + } + }); + } + + //affiche le marker à déplacer sur la carte (ne pas utiliser pour créer une nouvelle donnée) + function showGeoposFound(coords, contextId, contextType, contextData){ + showMap(true); + toastr.success('position trouvée'); + Sig.startModifyGeoposition(contextId, contextType, contextData); + Sig.map.setZoom(17); + // Sig.markerModifyPosition.setLatLng(coords); + + setTimeout(function() { + Sig.map.panTo(coords); + Sig.map.setZoom(15); + Sig.map.invalidateSize(false); + //toastr.success('mise à jour de la carte ok'); + + },2000); + Sig.markerModifyPosition.dragging.enable(); + } + + + function updateCitiesGeoFormat(){ + showLoadingMsg("Mise à jour de la bdd en cours"); + $.ajax({ + url: baseUrl+"/"+moduleId+"/city/updatecitiesgeoformat", + type: 'POST', + async:false, + dataType: "json", + complete: function () {}, + success: function (obj){ + mylog.log("success updatecitiesgeoformat"); + mylog.dir(obj); + showLoadingMsg("<span class='text-dark'>Votre base de donnée est à jour</span>"); + setTimeout( "hideLoadingMsg()", 3000); + }, + error: function (error) { + mylog.log("error updatecitiesgeoformat"); + showLoadingMsg("<span class='text-green'>Une erreur s'est produite pendant la MAJ</span>"); + setTimeout( "hideLoadingMsg()", 3000); + } + }); + } + + + function findGeoposByGoogleMaps(requestPart, keyApp){ + //var keyApp = ""; + var objnominatim = {} ; + mylog.log('findGeoposByGoogleMaps',"https://maps.googleapis.com/maps/api/geocode/json?address=" + requestPart); // + "&key="+keyApp); + showLoadingMsg("Recherche de la position en cours"); + $.ajax({ + url: "//maps.googleapis.com/maps/api/geocode/json?address=" + requestPart,// + "&key="+keyApp, + type: 'POST', + dataType: 'json', + async:false, + crossDomain:true, + complete: function () {}, + success: function (obj){ + hideLoadingMsg(); + callbackGoogleMapsSuccess(obj); + }, + error: function (error) { + callbackGoogleMapsError(error); + } + }); + return objnominatim ; + } + + + function findGeoposByDataGouv(requestPart){ + var objDataGouv = {} ; + $.ajax({ + url: "//api-adresse.data.gouv.fr/search/?q=" + requestPart , + dataType: 'json', + async:false, + complete: function () {}, + success: function (obj){ + hideLoadingMsg(); + callbackDataGouvSuccess(obj); + }, + error: function (error) { + callbackDataGouvError(error); + } + }); + + return objDataGouv ; + + } + + diff --git a/assets/js/sig/leaflet/leaflet-7.3-dev.js b/assets/js/sig/leaflet/leaflet-7.3-dev.js new file mode 100755 index 0000000000000000000000000000000000000000..12a31a7dcf2e519692c913d0f166c60ddac4c016 --- /dev/null +++ b/assets/js/sig/leaflet/leaflet-7.3-dev.js @@ -0,0 +1,9 @@ +/* + Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com + (c) 2010-2013, Vladimir Agafonkin + (c) 2010-2011, CloudMade +*/ +!function(t,e,i){var n=t.L,o={};o.version="0.7-dev","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?(o=!0,void 0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),t.apply(i,a),void 0)}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?(e(),void 0):s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],i?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=i&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context||this,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context||this,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n=!!t.ActiveXObject,s=n&&!t.XMLHttpRequest,a=n&&!e.querySelector,r=n&&!e.addEventListener,h=navigator.userAgent.toLowerCase(),l=-1!==h.indexOf("webkit"),u=-1!==h.indexOf("chrome"),c=-1!==h.indexOf("phantom"),d=-1!==h.indexOf("android"),p=-1!==h.search("android [23]"),_=typeof orientation!=i+"",m=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix,L="MozPerspective"in g.style,P="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||L||P)&&!c,w=!t.L_NO_TOUCH&&!c&&function(){var t="ontouchstart";if(m||t in g)return!0;var i=e.createElement("div"),n=!1;return i.setAttribute?(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n):!1}();o.Browser={ie:n,ie6:s,ie7:a,ielt9:r,webkit:l,android:d,android23:p,chrome:u,ie3d:v,webkit3d:y,gecko3d:L,opera3d:P,any3d:x,mobile:_,mobileWebkit:_&&l,mobileWebkit3d:_&&y,mobileOpera:_&&t.opera,touch:w,msTouch:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement,l=o.Browser.ie7;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var u=o.DomUtil.getStyle(a,"width"),c=o.DomUtil.getStyle(a,"max-width"),d=a.getBoundingClientRect();("none"!==u||"none"!==c)&&(s+=d.left+a.clientLeft),n+=d.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,o.DomUtil.documentIsLtr()||!o.Browser.webkit&&!l||(s+=a.scrollWidth-a.clientWidth,l&&"hidden"!==o.DomUtil.getStyle(a,"overflow-y")&&"hidden"!==o.DomUtil.getStyle(a,"overflow")&&(s+=17)),a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){return t.className.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className)},addClass:function(t,e){o.DomUtil.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(t,e){t.className=o.Util.trim((" "+t.className+" ").replace(" "+e+" "," "))},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?(t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden")):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault),i){var n=e.documentElement.style;this._userSelect=n[i],n[i]="none"}},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault),i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)},disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e){var i=parseFloat(t),n=parseFloat(e);if(isNaN(i)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=i,this.lng=n},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?new o.LatLng(t[0],t[1]):t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){return t?(t="number"==typeof t[0]||"string"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this):this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this.setView(this.getCenter(),t,{zoom:e})},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n)),a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t,e){if(t=o.latLngBounds(t),this.options.maxBounds=t,!t)return this._boundsMinZoom=null,this.off("moveend",this._panInsideMaxBounds,this),this;var i=this.getBoundsZoom(t,!0);return this._boundsMinZoom=i,this._loaded&&(this._zoom<i?this.setView(t.getCenter(),i,e):this.panInsideBounds(t)),this.on("moveend",this._panInsideMaxBounds,this),this},panInsideBounds:function(t){t=o.latLngBounds(t);var e=this.getPixelBounds(),i=e.getBottomLeft(),n=e.getTopRight(),s=this.project(t.getSouthWest()),a=this.project(t.getNorthEast()),r=0,h=0;return n.y<a.y&&(h=Math.ceil(a.y-n.y)),n.x>a.x&&(r=Math.floor(a.x-n.x)),i.y>s.y&&(h=Math.floor(s.y-i.y)),i.x<s.x&&(r=Math.ceil(s.x-i.x)),r||h?this.panBy([r,h]):this},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);if(this._layers[e])return this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();if(this._sizeChanged=!0,this.options.maxBounds&&this.setMaxBounds(this.options.maxBounds),!this._loaded)return this;var i=this.getSize(),n=e.subtract(i).divideBy(2).round();return n.x||n.y?(t.animate&&t.pan?this.panBy(n):(t.pan&&this._rawPanBy(n),this.fire("move"),clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(e){var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this}},remove:function(){return this._loaded&&this.fire("unload"),this._initEvents("off"),delete this._container._leaflet,this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._moved()?this.layerPointToLatLng(this._getCenterLayerPoint()):this._initialCenter},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){var t=this._layersMinZoom===i?0:this._layersMinZoom,e=this._boundsMinZoom===i?0:this._boundsMinZoom;return this.options.minZoom===i?Math.max(t,e):this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("viewreset",{hard:!i}),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(this.invalidateSize,this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&this.dragging&&this.dragging.moved()||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_;return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=t.R_MINOR;return new o.Transformation(.5/(Math.PI*e),.5,-.5/(Math.PI*i),.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update() +},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container leaflet-zoom-animated";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom(),i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i)||t.y<0||t.y>=i)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome||o.Browser.android23),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){return Math.pow(2,this._getZoomForUrl())},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e+e)%e),this.options.tms&&(t.y=e-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e)},_tileLoaded:function(){this._tilesToLoad--,this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;i.width=i.height=e.detectRetina&&o.Browser.retina?2*n:n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs;var e=parseFloat(this.wmsParams.version)>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i="shadow"===e?o.point(n.shadowAnchor||n.iconAnchor):o.point(n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return o.Browser.ie6?(i||(i=e.createElement("div")),i.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+t+'")'):(i||(i=e.createElement("img")),i.src=t),i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return i.innerHTML=n.html!==!1?n.html:"",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,maxHeight:null,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout(),this._updateContent();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this._update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},setLatLng:function(t){return this._latlng=o.latLng(t),this._update(),this},setContent:function(t){return this._content=t,this._update(),this},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="×",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.on(this._contentNode,"mousewheel",o.DomEvent.stopPropagation),o.DomEvent.on(this._contentNode,"MozMousePixelScroll",o.DomEvent.stopPropagation),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=t.getSize(),h=0,l=0;s.x+i>r.x&&(h=s.x+i-r.x+a.x),s.x-h<0&&(h=s.x-a.x),s.y+e>r.y&&(l=s.y+e-r.y+a.y),s.y-l<0&&(l=s.y-a.y),(h||l)&&t.fire("autopanstart").panBy([h,l])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popup||this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup).off("remove",this.closePopup).off("move",this._movePopup)),this},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:(t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t.layer||(t.layer=t.target),t.target=this,this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&this._path.setAttribute("class","leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(this._pathRoot.setAttribute("class"," leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):this._pathRoot.setAttribute("class"," leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport())},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">') +}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?i.dashArray instanceof Array?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return this._parts=[n],void 0;this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){var i,n,s;if(o.Polyline.prototype.initialize.call(this,t,e),t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),i=0,n=this._holes.length;n>i;i++)s=this._holes[i]=this._convertLatLngs(this._holes[i]),s[0].equals(s[s.length-1])&&s.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=360*(this._mRadius/40075017),i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,"+23592600)},getRadius:function(){return this._mRadius},_getLatRadius:function(){return 360*(this._mRadius/40075017)},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t)},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i){var n,s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return n=i(u),e?e(t,n):new o.Marker(n);case"MultiPoint":for(a=0,r=u.length;r>a;a++)n=i(u[a]),h=e?e(t,n):new o.Marker(n),c.push(h);return new o.FeatureGroup(c);case"LineString":return s=this.coordsToLatLngs(u,0,i),new o.Polyline(s);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return s=this.coordsToLatLngs(u,1,i),new o.Polygon(s);case"MultiLineString":return s=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(s);case"MultiPolygon":return s=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(s);case"GeometryCollection":for(a=0,r=l.geometries.length;r>a;a++)h=this.geometryToLayer({geometry:l.geometries[a],type:"Feature",properties:t.properties},e,i),c.push(h);return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){return[t.lng,t.lat]},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t,e){t.include({toGeoJSON:function(){var t=[];return this.eachLayer(function(e){t.push(e.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:e,coordinates:t})}})}t(o.MultiPolyline,"MultiLineString"),t(o.MultiPolygon,"MultiPolygon")}(),o.LayerGroup.include({toGeoJSON:function(){var t=[];return this.eachLayer(function(e){e.toGeoJSON&&t.push(o.GeoJSON.asFeature(e.toGeoJSON()))}),{type:"FeatureCollection",features:t}}}),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.msTouch&&0===e.indexOf("touch")?this.addMsTouchListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.msTouch&&0===e.indexOf("touch")?this.removeMsTouchListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.addListener(t,o.Draggable.START[i],e);return o.DomEvent.addListener(t,"click",o.DomEvent._fakeStop).addListener(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,i){var n=o.Browser.ie7,s=e.body,a=e.documentElement,r=t.pageX?t.pageX-s.scrollLeft-a.scrollLeft:t.clientX,h=t.pageY?t.pageY-s.scrollTop-a.scrollTop:t.clientY,l=new o.Point(r,h);if(!i)return l;var u=i.getBoundingClientRect(),c=u.left-i.clientLeft,d=u.top-i.clientTop;return o.DomUtil.documentIsLtr()||!o.Browser.webkit&&!n||(c+=i.scrollWidth-i.clientWidth,n&&"hidden"!==o.DomUtil.getStyle(i,"overflow-y")&&"hidden"!==o.DomUtil.getStyle(i,"overflow")&&(c+=17)),l._subtract(new o.Point(c,d))},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&1e3>n||t.target._simulatedClick&&!t._simulated?(o.DomEvent.stop(t),void 0):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(o.DomEvent.stopPropagation(t),!o.Draggable._disabled)){o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection();var i=t.touches?t.touches[0]:t,n=i.target;o.Browser.touch&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._moved=!1,this._moving||(this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this))}},_onMove:function(t){if(!(t.touches&&t.touches.length>1)){var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.Browser.touch||o.DomUtil.addClass(e.body,"leaflet-dragging")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget))}},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.Browser.touch||o.DomUtil.removeClass(e.body,"leaflet-dragging");for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend")),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),this._onViewReset())}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(){var t=this._map,e=t.options,i=+new Date-this._lastTime,n=!e.inertia||i>e.inertiaThreshold||!this._positions[0];if(t.fire("dragend"),n)t.fire("moveend");else{var s=this._lastPos.subtract(this._positions[0]),a=(this._lastTime+i-this._times[0])/1e3,r=e.easeLinearity,h=s.multiplyBy(r/a),l=h.distanceTo([0,0]),u=Math.min(e.inertiaMaxSpeed,l),c=h.multiplyBy(u/l),d=u/(e.inertiaDeceleration*r),p=c.multiplyBy(-d/2).round();p.x&&p.y?o.Util.requestAnimFrame(function(){t.panBy(p,{duration:d,easeLinearity:r,noMoveStart:!0})}):t.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick)},_onDoubleClick:function(t){this.setZoomAround(t.containerPoint,this._zoom+1)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&t.setZoomAround(this._lastMousePos,i+e)}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msTouch?"MSPointerDown":"touchstart",_touchend:o.Browser.msTouch?"MSPointerUp":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.msTouch?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.msTouch){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.msTouch){var n,s={};for(var a in h)n=h[a],s[a]="function"==typeof n?n.bind(h):n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.msTouch?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.msTouch&&m.addEventListener("MSPointerCancel",a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.msTouch?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.msTouch&&e.documentElement.removeEventListener("MSPointerCancel",t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{_msTouches:[],_msDocumentListener:!1,addMsTouchListener:function(t,e,i,n){switch(e){case"touchstart":return this.addMsTouchListenerStart(t,e,i,n);case"touchend":return this.addMsTouchListenerEnd(t,e,i,n);case"touchmove":return this.addMsTouchListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addMsTouchListenerStart:function(t,i,n,o){var s="_leaflet_",a=this._msTouches,r=function(t){for(var e=!1,i=0;i<a.length;i++)if(a[i].pointerId===t.pointerId){e=!0;break}e||a.push(t),t.touches=a.slice(),t.changedTouches=[t],n(t)};if(t[s+"touchstart"+o]=r,t.addEventListener("MSPointerDown",r,!1),!this._msDocumentListener){var h=function(t){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a.splice(e,1);break}};e.documentElement.addEventListener("MSPointerUp",h,!1),e.documentElement.addEventListener("MSPointerCancel",h,!1),this._msDocumentListener=!0}return this},addMsTouchListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._msTouches;return t[s+"touchmove"+n]=o,t.addEventListener("MSPointerMove",o,!1),this},addMsTouchListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._msTouches,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener("MSPointerUp",a,!1),t.addEventListener("MSPointerCancel",a,!1),this},removeMsTouchListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener("MSPointerDown",o,!1);break;case"touchmove":t.removeEventListener("MSPointerMove",o,!1);break;case"touchend":t.removeEventListener("MSPointerUp",o,!1),t.removeEventListener("MSPointerCancel",o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return this._zooming=!1,void 0;var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd); +var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,clearTimeout(this._holdTimeout),void 0;var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.msTouch&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown)},_onMouseDown:function(t){return!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this),this._map.fire("boxzoomstart"),void 0)},_onMouseMove:function(t){var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._pane.removeChild(this._box),this._container.style.cursor="",o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart"),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-dragging")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(){this._marker.fire("moveend").fire("dragend"),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-dragging")}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton("+","Zoom in",e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton("-","Zoom out",e+"-out",i,this._zoomOut,this),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){return this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container),t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange).off("layerremove",this._onLayerChange)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):(o.DomEvent.disableClickPropagation(e),o.DomEvent.on(e,"mousewheel",o.DomEvent.stopPropagation));var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,this.fire("step"),void 0):(this._onTransitionEnd(),void 0)},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=this._limitZoom(e),t=o.latLng(t),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(){this._animatingZoom&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a){this._animatingZoom=!0,o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a})},_onZoomTransitionEnd:function(){this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",this._stopLoadingImages(t),void 0):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),clearTimeout(this._clearBgBufferTimer),void 0)},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document); \ No newline at end of file diff --git a/assets/js/sig/leaflet/leaflet.awesome-markers.min.js b/assets/js/sig/leaflet/leaflet.awesome-markers.min.js new file mode 100755 index 0000000000000000000000000000000000000000..376e57e68d6f93c56f4d683bee3cc150926e710b --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.awesome-markers.min.js @@ -0,0 +1,7 @@ +/* + Leaflet.AwesomeMarkers, a plugin that adds colorful iconic markers for Leaflet, based on the Font Awesome icons + (c) 2012-2013, Lennard Voogdt + + http://leafletjs.com + https://github.com/lvoogdt +*//*global L*/(function(e,t,n){"use strict";L.AwesomeMarkers={};L.AwesomeMarkers.version="2.0.1";L.AwesomeMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"awesome-marker",prefix:"glyphicon",spinClass:"fa-spin",icon:"home",markerColor:"blue",iconColor:"white"},initialize:function(e){e=L.Util.setOptions(this,e)},createIcon:function(){var e=t.createElement("div"),n=this.options;n.icon&&(e.innerHTML=this._createInner());n.bgPos&&(e.style.backgroundPosition=-n.bgPos.x+"px "+ -n.bgPos.y+"px");this._setIconStyles(e,"icon-"+n.markerColor);return e},_createInner:function(){var e,t="",n="",r="",i=this.options;i.icon.slice(0,i.prefix.length+1)===i.prefix+"-"?e=i.icon:e=i.prefix+"-"+i.icon;i.spin&&typeof i.spinClass=="string"&&(t=i.spinClass);i.iconColor&&(i.iconColor==="white"||i.iconColor==="black"?n="icon-"+i.iconColor:r="style='color: "+i.iconColor+"' ");return"<i "+r+"class='"+i.prefix+" "+e+" "+t+" "+n+"'></i>"},_setIconStyles:function(e,t){var n=this.options,r=L.point(n[t==="shadow"?"shadowSize":"iconSize"]),i;t==="shadow"?i=L.point(n.shadowAnchor||n.iconAnchor):i=L.point(n.iconAnchor);!i&&r&&(i=r.divideBy(2,!0));e.className="awesome-marker-"+t+" "+n.className;if(i){e.style.marginLeft=-i.x+"px";e.style.marginTop=-i.y+"px"}if(r){e.style.width=r.x+"px";e.style.height=r.y+"px"}},createShadow:function(){var e=t.createElement("div");this._setIconStyles(e,"shadow");return e}});L.AwesomeMarkers.icon=function(e){return new L.AwesomeMarkers.Icon(e)}})(this,document); diff --git a/assets/js/sig/leaflet/leaflet.bouncemarker.js b/assets/js/sig/leaflet/leaflet.bouncemarker.js new file mode 100755 index 0000000000000000000000000000000000000000..19c46d2353d8a78bc94bfcde2fb01b9f08b1b019 --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.bouncemarker.js @@ -0,0 +1,189 @@ +/** + * Copyright (C) 2013 Maxime Hadjinlian <maxime.hadjinlian@gmail.com> + * All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +(function () { + + // Retain the value of the original onAdd and onRemove functions + var originalOnAdd = L.Marker.prototype.onAdd; + var originalOnRemove = L.Marker.prototype.onRemove; + + // Add bounceonAdd options + L.Marker.mergeOptions({ + bounceOnAdd: false, + bounceOnAddOptions: { + duration: 1000, + height: -1 + }, + bounceOnAddCallback: function() {} + }); + + L.Marker.include({ + + _toPoint: function (latlng) { + return this._map.latLngToContainerPoint(latlng); + }, + _toLatLng: function (point) { + return this._map.containerPointToLatLng(point); + }, + + _motionStep: function (opts) { + var self = this; + + var start = new Date(); + self._intervalId = setInterval(function () { + var timePassed = new Date() - start; + var progress = timePassed / opts.duration; + if (progress > 1) { + progress = 1; + } + var delta = opts.delta(progress); + opts.step(delta); + if (progress === 1) { + opts.end(); + clearInterval(self._intervalId); + } + }, opts.delay || 10); + }, + + _bounceMotion: function (delta, duration, callback) { + var original = L.latLng(this._origLatlng), + start_y = this._dropPoint.y, + start_x = this._dropPoint.x, + distance = this._point.y - start_y; + var self = this; + + this._motionStep({ + delay: 10, + duration: duration || 1000, // 1 sec by default + delta: delta, + step: function (delta) { + self._dropPoint.y = + start_y + + (distance * delta) + - (self._map.project(self._map.getCenter()).y - self._origMapCenter.y); + self._dropPoint.x = + start_x + - (self._map.project(self._map.getCenter()).x - self._origMapCenter.x); + self.setLatLng(self._toLatLng(self._dropPoint)); + }, + end: function () { + self.setLatLng(original); + if (typeof callback === "function") callback(); + } + }); + }, + + // Many thanks to Robert Penner for this function + _easeOutBounce: function (pos) { + if ((pos) < (1 / 2.75)) { + return (7.5625 * pos * pos); + } else if (pos < (2 / 2.75)) { + return (7.5625 * (pos -= (1.5 / 2.75)) * pos + 0.75); + } else if (pos < (2.5 / 2.75)) { + return (7.5625 * (pos -= (2.25 / 2.75)) * pos + 0.9375); + } else { + return (7.5625 * (pos -= (2.625 / 2.75)) * pos + 0.984375); + } + }, + + // Bounce : if options.height in pixels is not specified, drop from top. + // If options.duration is not specified animation is 1s long. + bounce: function(options, endCallback) { + this._origLatlng = this.getLatLng(); + this._bounce(options, endCallback); + }, + + _bounce: function (options, endCallback) { + if (typeof options === "function") { + endCallback = options; + options = null; + } + options = options || {duration: 1000, height: -1}; + + //backward compatibility + if (typeof options === "number") { + options.duration = arguments[0]; + options.height = arguments[1]; + } + + // Keep original map center + this._origMapCenter = this._map.project(this._map.getCenter()); + this._dropPoint = this._getDropPoint(options.height); + this._bounceMotion(this._easeOutBounce, options.duration, endCallback); + }, + + // This will get you a drop point given a height. + // If no height is given, the top y will be used. + _getDropPoint: function (height) { + // Get current coordidates in pixel + this._point = this._toPoint(this._origLatlng); + var top_y; + if (height === undefined || height < 0) { + top_y = this._toPoint(this._map.getBounds()._northEast).y; + } else { + top_y = this._point.y - height; + } + return new L.Point(this._point.x, top_y); + }, + + onAdd: function (map) { + this._map = map; + // Keep original latitude and longitude + this._origLatlng = this._latlng; + + // We need to have our drop point BEFORE adding the marker to the map + // otherwise, it would create a flicker. (The marker would appear at final + // location then move to its drop location, and you may be able to see it.) + if (this.options.bounceOnAdd === true) { + // backward compatibility + if (typeof this.options.bounceOnAddDuration !== 'undefined') { + this.options.bounceOnAddOptions.duration = this.options.bounceOnAddDuration; + } + + // backward compatibility + if (typeof this.options.bounceOnAddHeight !== 'undefined') { + this.options.bounceOnAddOptions.height = this.options.bounceOnAddHeight; + } + + this._dropPoint = this._getDropPoint(this.options.bounceOnAddOptions.height); + this.setLatLng(this._toLatLng(this._dropPoint)); + } + + // Call leaflet original method to add the Marker to the map. + originalOnAdd.call(this, map); + + if (this.options.bounceOnAdd === true) { + this._bounce(this.options.bounceOnAddOptions, this.options.bounceOnAddCallback); + } + }, + + onRemove: function (map) { + clearInterval(this._intervalId); + originalOnRemove.call(this, map); + } + }); +})(); diff --git a/assets/js/sig/leaflet/leaflet.draw-src.js b/assets/js/sig/leaflet/leaflet.draw-src.js new file mode 100755 index 0000000000000000000000000000000000000000..61444a4c7114b670da4eb15539edd7f90da4018a --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.draw-src.js @@ -0,0 +1,2780 @@ +/* + Leaflet.draw, a plugin that adds drawing and editing tools to Leaflet powered maps. + (c) 2012-2013, Jacob Toye, Smartrak + + https://github.com/Leaflet/Leaflet.draw + http://leafletjs.com + https://github.com/jacobtoye +*/ +(function (window, document, undefined) { +/* + * Leaflet.draw assumes that you have already included the Leaflet library. + */ + +L.drawVersion = '0.2.3-dev'; + +L.drawLocal = { + draw: { + toolbar: { + actions: { + title: 'Cancel drawing', + text: 'Cancel' + }, + buttons: { + polyline: 'Draw a polyline', + polygon: 'Draw a polygon', + rectangle: 'Draw a rectangle', + circle: 'Draw a circle', + marker: 'Draw a marker' + } + }, + handlers: { + circle: { + tooltip: { + start: 'Click and drag to draw circle.' + } + }, + marker: { + tooltip: { + start: 'Click map to place marker.' + } + }, + polygon: { + tooltip: { + start: 'Click to start drawing shape.', + cont: 'Click to continue drawing shape.', + end: 'Click first point to close this shape.' + } + }, + polyline: { + error: '<strong>Error:</strong> shape edges cannot cross!', + tooltip: { + start: 'Click to start drawing line.', + cont: 'Click to continue drawing line.', + end: 'Click last point to finish line.' + } + }, + rectangle: { + tooltip: { + start: 'Click and drag to draw rectangle.' + } + }, + simpleshape: { + tooltip: { + end: 'Release mouse to finish drawing.' + } + } + } + }, + edit: { + toolbar: { + actions: { + save: { + title: 'Save changes.', + text: 'Save' + }, + cancel: { + title: 'Cancel editing, discards all changes.', + text: 'Cancel' + } + }, + buttons: { + edit: 'Edit layers.', + editDisabled: 'No layers to edit.', + remove: 'Delete layers.', + removeDisabled: 'No layers to delete.' + } + }, + handlers: { + edit: { + tooltip: { + text: 'Drag handles, or marker to edit feature.', + subtext: 'Click cancel to undo changes.' + } + }, + remove: { + tooltip: { + text: 'Click on a feature to remove' + } + } + } + } +}; + +L.Draw = {}; + +L.Draw.Feature = L.Handler.extend({ + includes: L.Mixin.Events, + + initialize: function (map, options) { + this._map = map; + this._container = map._container; + this._overlayPane = map._panes.overlayPane; + this._popupPane = map._panes.popupPane; + + // Merge default shapeOptions options with custom shapeOptions + if (options && options.shapeOptions) { + options.shapeOptions = L.Util.extend({}, this.options.shapeOptions, options.shapeOptions); + } + L.Util.extend(this.options, options); + }, + + enable: function () { + if (this._enabled) { return; } + + L.Handler.prototype.enable.call(this); + + this.fire('enabled', { handler: this.type }); + + this._map.fire('draw:drawstart', { layerType: this.type }); + }, + + disable: function () { + if (!this._enabled) { return; } + + L.Handler.prototype.disable.call(this); + + this.fire('disabled', { handler: this.type }); + + this._map.fire('draw:drawstop', { layerType: this.type }); + }, + + addHooks: function () { + var map = this._map; + + if (map) { + L.DomUtil.disableTextSelection(); + + map.getContainer().focus(); + + this._tooltip = new L.Tooltip(this._map); + + L.DomEvent.addListener(this._container, 'keyup', this._cancelDrawing, this); + } + }, + + removeHooks: function () { + if (this._map) { + L.DomUtil.enableTextSelection(); + + this._tooltip.dispose(); + this._tooltip = null; + + L.DomEvent.removeListener(this._container, 'keyup', this._cancelDrawing); + } + }, + + setOptions: function (options) { + L.setOptions(this, options); + }, + + _fireCreatedEvent: function (layer) { + this._map.fire('draw:created', { layer: layer, layerType: this.type }); + }, + + // Cancel drawing when the escape key is pressed + _cancelDrawing: function (e) { + if (e.keyCode === 27) { + this.disable(); + } + } +}); + +L.Draw.Polyline = L.Draw.Feature.extend({ + statics: { + TYPE: 'polyline' + }, + + Poly: L.Polyline, + + options: { + allowIntersection: true, + repeatMode: false, + drawError: { + color: '#b00b00', + timeout: 2500 + }, + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }), + guidelineDistance: 20, + shapeOptions: { + stroke: true, + color: '#f06eaa', + weight: 4, + opacity: 0.5, + fill: false, + clickable: true + }, + metric: true, // Whether to use the metric meaurement system or imperial + showLength: true, // Whether to display distance in the tooltip + zIndexOffset: 2000 // This should be > than the highest z-index any map layers + }, + + initialize: function (map, options) { + // Need to set this here to ensure the correct message is used. + this.options.drawError.message = L.drawLocal.draw.handlers.polyline.error; + + // Merge default drawError options with custom options + if (options && options.drawError) { + options.drawError = L.Util.extend({}, this.options.drawError, options.drawError); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polyline.TYPE; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._markers = []; + + this._markerGroup = new L.LayerGroup(); + this._map.addLayer(this._markerGroup); + + this._poly = new L.Polyline([], this.options.shapeOptions); + + this._tooltip.updateContent(this._getTooltipText()); + + // Make a transparent marker that will used to catch click events. These click + // events will create the vertices. We need to do this so we can ensure that + // we can create vertices over other map layers (markers, vector layers). We + // also do not want to trigger any click handlers of objects we are clicking on + // while drawing. + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('click', this._onClick, this) + .addTo(this._map); + + this._map + .on('mousemove', this._onMouseMove, this) + .on('zoomend', this._onZoomEnd, this); + } + }, + + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + this._clearHideErrorTimeout(); + + this._cleanUpShape(); + + // remove markers from map + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + + this._map.removeLayer(this._poly); + delete this._poly; + + this._mouseMarker.off('click', this._onClick, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + // clean up DOM + this._clearGuides(); + + this._map + .off('mousemove', this._onMouseMove, this) + .off('zoomend', this._onZoomEnd, this); + }, + + _finishShape: function () { + var intersects = this._poly.newLatLngIntersects(this._poly.getLatLngs()[0], true); + + if ((!this.options.allowIntersection && intersects) || !this._shapeIsValid()) { + this._showErrorTooltip(); + return; + } + + this._fireCreatedEvent(); + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + //Called to verify the shape is valid when the user tries to finish it + //Return false if the shape is not valid + _shapeIsValid: function () { + return true; + }, + + _onZoomEnd: function () { + this._updateGuide(); + }, + + _onMouseMove: function (e) { + var newPos = e.layerPoint, + latlng = e.latlng; + + // Save latlng + // should this be moved to _updateGuide() ? + this._currentLatLng = latlng; + + this._updateTooltip(latlng); + + // Update the guide line + this._updateGuide(newPos); + + // Update the mouse marker position + this._mouseMarker.setLatLng(latlng); + + L.DomEvent.preventDefault(e.originalEvent); + }, + + _onClick: function (e) { + var latlng = e.target.getLatLng(), + markerCount = this._markers.length; + + if (markerCount > 0 && !this.options.allowIntersection && this._poly.newLatLngIntersects(latlng)) { + this._showErrorTooltip(); + return; + } + else if (this._errorShown) { + this._hideErrorTooltip(); + } + + this._markers.push(this._createMarker(latlng)); + + this._poly.addLatLng(latlng); + + if (this._poly.getLatLngs().length === 2) { + this._map.addLayer(this._poly); + } + + this._updateFinishHandler(); + + this._vertexAdded(latlng); + + this._clearGuides(); + + this._updateTooltip(); + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + // The last marker should have a click handler to close the polyline + if (markerCount > 1) { + this._markers[markerCount - 1].on('click', this._finishShape, this); + } + + // Remove the old marker click handler (as only the last point should close the polyline) + if (markerCount > 2) { + this._markers[markerCount - 2].off('click', this._finishShape, this); + } + }, + + _createMarker: function (latlng) { + var marker = new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset * 2 + }); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _updateGuide: function (newPos) { + var markerCount = this._markers.length; + + if (markerCount > 0) { + newPos = newPos || this._map.latLngToLayerPoint(this._currentLatLng); + + // draw the guide line + this._clearGuides(); + this._drawGuide( + this._map.latLngToLayerPoint(this._markers[markerCount - 1].getLatLng()), + newPos + ); + } + }, + + _updateTooltip: function (latLng) { + var text = this._getTooltipText(); + + if (latLng) { + this._tooltip.updatePosition(latLng); + } + + if (!this._errorShown) { + this._tooltip.updateContent(text); + } + }, + + _drawGuide: function (pointA, pointB) { + var length = Math.floor(Math.sqrt(Math.pow((pointB.x - pointA.x), 2) + Math.pow((pointB.y - pointA.y), 2))), + i, + fraction, + dashPoint, + dash; + + //create the guides container if we haven't yet + if (!this._guidesContainer) { + this._guidesContainer = L.DomUtil.create('div', 'leaflet-draw-guides', this._overlayPane); + } + + //draw a dash every GuildeLineDistance + for (i = this.options.guidelineDistance; i < length; i += this.options.guidelineDistance) { + //work out fraction along line we are + fraction = i / length; + + //calculate new x,y point + dashPoint = { + x: Math.floor((pointA.x * (1 - fraction)) + (fraction * pointB.x)), + y: Math.floor((pointA.y * (1 - fraction)) + (fraction * pointB.y)) + }; + + //add guide dash to guide container + dash = L.DomUtil.create('div', 'leaflet-draw-guide-dash', this._guidesContainer); + dash.style.backgroundColor = + !this._errorShown ? this.options.shapeOptions.color : this.options.drawError.color; + + L.DomUtil.setPosition(dash, dashPoint); + } + }, + + _updateGuideColor: function (color) { + if (this._guidesContainer) { + for (var i = 0, l = this._guidesContainer.childNodes.length; i < l; i++) { + this._guidesContainer.childNodes[i].style.backgroundColor = color; + } + } + }, + + // removes all child elements (guide dashes) from the guides container + _clearGuides: function () { + if (this._guidesContainer) { + while (this._guidesContainer.firstChild) { + this._guidesContainer.removeChild(this._guidesContainer.firstChild); + } + } + }, + + _getTooltipText: function () { + var showLength = this.options.showLength, + labelText, distance, distanceStr; + + if (this._markers.length === 0) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.start + }; + } else { + distanceStr = showLength ? this._getMeasurementString() : ''; + + if (this._markers.length === 1) { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.cont, + subtext: distanceStr + }; + } else { + labelText = { + text: L.drawLocal.draw.handlers.polyline.tooltip.end, + subtext: distanceStr + }; + } + } + return labelText; + }, + + _getMeasurementString: function () { + var currentLatLng = this._currentLatLng, + previousLatLng = this._markers[this._markers.length - 1].getLatLng(), + distance; + + // calculate the distance from the last fixed point to the mouse position + distance = this._measurementRunningTotal + currentLatLng.distanceTo(previousLatLng); + + return L.GeometryUtil.readableDistance(distance, this.options.metric); + }, + + _showErrorTooltip: function () { + this._errorShown = true; + + // Update tooltip + this._tooltip + .showAsError() + .updateContent({ text: this.options.drawError.message }); + + // Update shape + this._updateGuideColor(this.options.drawError.color); + this._poly.setStyle({ color: this.options.drawError.color }); + + // Hide the error after 2 seconds + this._clearHideErrorTimeout(); + this._hideErrorTimeout = setTimeout(L.Util.bind(this._hideErrorTooltip, this), this.options.drawError.timeout); + }, + + _hideErrorTooltip: function () { + this._errorShown = false; + + this._clearHideErrorTimeout(); + + // Revert tooltip + this._tooltip + .removeError() + .updateContent(this._getTooltipText()); + + // Revert shape + this._updateGuideColor(this.options.shapeOptions.color); + this._poly.setStyle({ color: this.options.shapeOptions.color }); + }, + + _clearHideErrorTimeout: function () { + if (this._hideErrorTimeout) { + clearTimeout(this._hideErrorTimeout); + this._hideErrorTimeout = null; + } + }, + + _vertexAdded: function (latlng) { + if (this._markers.length === 1) { + this._measurementRunningTotal = 0; + } + else { + this._measurementRunningTotal += + latlng.distanceTo(this._markers[this._markers.length - 2].getLatLng()); + } + }, + + _cleanUpShape: function () { + if (this._markers.length > 1) { + this._markers[this._markers.length - 1].off('click', this._finishShape, this); + } + }, + + _fireCreatedEvent: function () { + var poly = new this.Poly(this._poly.getLatLngs(), this.options.shapeOptions); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, poly); + } +}); + + +L.Draw.Polygon = L.Draw.Polyline.extend({ + statics: { + TYPE: 'polygon' + }, + + Poly: L.Polygon, + + options: { + showArea: false, + shapeOptions: { + stroke: true, + color: '#f06eaa', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + } + }, + + initialize: function (map, options) { + L.Draw.Polyline.prototype.initialize.call(this, map, options); + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Polygon.TYPE; + }, + + _updateFinishHandler: function () { + var markerCount = this._markers.length; + + // The first marker shold have a click handler to close the polygon + if (markerCount === 1) { + this._markers[0].on('click', this._finishShape, this); + } + + // Add and update the double click handler + if (markerCount > 2) { + this._markers[markerCount - 1].on('dblclick', this._finishShape, this); + // Only need to remove handler if has been added before + if (markerCount > 3) { + this._markers[markerCount - 2].off('dblclick', this._finishShape, this); + } + } + }, + + _getTooltipText: function () { + var text, subtext; + + if (this._markers.length === 0) { + text = L.drawLocal.draw.handlers.polygon.tooltip.start; + } else if (this._markers.length < 3) { + text = L.drawLocal.draw.handlers.polygon.tooltip.cont; + } else { + text = L.drawLocal.draw.handlers.polygon.tooltip.end; + subtext = this._getMeasurementString(); + } + + return { + text: text, + subtext: subtext + }; + }, + + _getMeasurementString: function () { + var area = this._area; + + if (!area) { + return null; + } + + return L.GeometryUtil.readableArea(area, this.options.metric); + }, + + _shapeIsValid: function () { + return this._markers.length >= 3; + }, + + _vertexAdded: function () { + // Check to see if we should show the area + if (this.options.allowIntersection || !this.options.showArea) { + return; + } + + var latLngs = this._poly.getLatLngs(); + + this._area = L.GeometryUtil.geodesicArea(latLngs); + }, + + _cleanUpShape: function () { + var markerCount = this._markers.length; + + if (markerCount > 0) { + this._markers[0].off('click', this._finishShape, this); + + if (markerCount > 2) { + this._markers[markerCount - 1].off('dblclick', this._finishShape, this); + } + } + } +}); + + +L.SimpleShape = {}; + +L.Draw.SimpleShape = L.Draw.Feature.extend({ + options: { + repeatMode: false + }, + + initialize: function (map, options) { + this._endLabelText = L.drawLocal.draw.handlers.simpleshape.tooltip.end; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + if (this._map) { + this._map.dragging.disable(); + //TODO refactor: move cursor to styles + this._container.style.cursor = 'crosshair'; + + this._tooltip.updateContent({ text: this._initialLabelText }); + + this._map + .on('mousedown', this._onMouseDown, this) + .on('mousemove', this._onMouseMove, this); + } + }, + + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + if (this._map) { + this._map.dragging.enable(); + //TODO refactor: move cursor to styles + this._container.style.cursor = ''; + + this._map + .off('mousedown', this._onMouseDown, this) + .off('mousemove', this._onMouseMove, this); + + L.DomEvent.off(document, 'mouseup', this._onMouseUp); + + // If the box element doesn't exist they must not have moved the mouse, so don't need to destroy//return + if (this._shape) { + this._map.removeLayer(this._shape); + delete this._shape; + } + } + this._isDrawing = false; + }, + + _onMouseDown: function (e) { + this._isDrawing = true; + this._startLatLng = e.latlng; + + L.DomEvent + .on(document, 'mouseup', this._onMouseUp, this) + .preventDefault(e.originalEvent); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._tooltip.updateContent({ text: this._endLabelText }); + this._drawShape(latlng); + } + }, + + _onMouseUp: function () { + if (this._shape) { + this._fireCreatedEvent(); + } + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + } +}); + +L.Draw.Rectangle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'rectangle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#f06eaa', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + } + }, + + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Rectangle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.rectangle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + _drawShape: function (latlng) { + if (!this._shape) { + this._shape = new L.Rectangle(new L.LatLngBounds(this._startLatLng, latlng), this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setBounds(new L.LatLngBounds(this._startLatLng, latlng)); + } + }, + + _fireCreatedEvent: function () { + var rectangle = new L.Rectangle(this._shape.getBounds(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, rectangle); + } +}); + + +L.Draw.Circle = L.Draw.SimpleShape.extend({ + statics: { + TYPE: 'circle' + }, + + options: { + shapeOptions: { + stroke: true, + color: '#f06eaa', + weight: 4, + opacity: 0.5, + fill: true, + fillColor: null, //same as color by default + fillOpacity: 0.2, + clickable: true + }, + showRadius: true, + metric: true // Whether to use the metric meaurement system or imperial + }, + + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Circle.TYPE; + + this._initialLabelText = L.drawLocal.draw.handlers.circle.tooltip.start; + + L.Draw.SimpleShape.prototype.initialize.call(this, map, options); + }, + + _drawShape: function (latlng) { + if (!this._shape) { + this._shape = new L.Circle(this._startLatLng, this._startLatLng.distanceTo(latlng), this.options.shapeOptions); + this._map.addLayer(this._shape); + } else { + this._shape.setRadius(this._startLatLng.distanceTo(latlng)); + } + }, + + _fireCreatedEvent: function () { + var circle = new L.Circle(this._startLatLng, this._shape.getRadius(), this.options.shapeOptions); + L.Draw.SimpleShape.prototype._fireCreatedEvent.call(this, circle); + }, + + _onMouseMove: function (e) { + var latlng = e.latlng, + metric = this.options.metric, + showRadius = this.options.showRadius, + useMetric = this.options.metric, + radius; + + this._tooltip.updatePosition(latlng); + if (this._isDrawing) { + this._drawShape(latlng); + + // Get the new radius (rouded to 1 dp) + radius = this._shape.getRadius().toFixed(1); + + this._tooltip.updateContent({ + text: this._endLabelText, + subtext: showRadius ? 'Radius: ' + L.GeometryUtil.readableDistance(radius, useMetric) : '' + }); + } + } +}); + + +L.Draw.Marker = L.Draw.Feature.extend({ + statics: { + TYPE: 'marker' + }, + + options: { + icon: new L.Icon.Default(), + repeatMode: false, + zIndexOffset: 2000 // This should be > than the highest z-index any markers + }, + + initialize: function (map, options) { + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.Draw.Marker.TYPE; + + L.Draw.Feature.prototype.initialize.call(this, map, options); + }, + + addHooks: function () { + L.Draw.Feature.prototype.addHooks.call(this); + + if (this._map) { + this._tooltip.updateContent({ text: L.drawLocal.draw.handlers.marker.tooltip.start }); + + // Same mouseMarker as in Draw.Polyline + if (!this._mouseMarker) { + this._mouseMarker = L.marker(this._map.getCenter(), { + icon: L.divIcon({ + className: 'leaflet-mouse-marker', + iconAnchor: [20, 20], + iconSize: [40, 40] + }), + opacity: 0, + zIndexOffset: this.options.zIndexOffset + }); + } + + this._mouseMarker + .on('click', this._onClick, this) + .addTo(this._map); + + this._map.on('mousemove', this._onMouseMove, this); + } + }, + + removeHooks: function () { + L.Draw.Feature.prototype.removeHooks.call(this); + + if (this._map) { + if (this._marker) { + this._marker.off('click', this._onClick, this); + this._map + .off('click', this._onClick, this) + .removeLayer(this._marker); + delete this._marker; + } + + this._mouseMarker.off('click', this._onClick, this); + this._map.removeLayer(this._mouseMarker); + delete this._mouseMarker; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + _onMouseMove: function (e) { + var latlng = e.latlng; + + this._tooltip.updatePosition(latlng); + this._mouseMarker.setLatLng(latlng); + + if (!this._marker) { + this._marker = new L.Marker(latlng, { + icon: this.options.icon, + zIndexOffset: this.options.zIndexOffset + }); + // Bind to both marker and map to make sure we get the click event. + this._marker.on('click', this._onClick, this); + this._map + .on('click', this._onClick, this) + .addLayer(this._marker); + } + else { + this._marker.setLatLng(latlng); + } + }, + + _onClick: function () { + this._fireCreatedEvent(); + + this.disable(); + if (this.options.repeatMode) { + this.enable(); + } + }, + + _fireCreatedEvent: function () { + var marker = new L.Marker(this._marker.getLatLng(), { icon: this.options.icon }); + L.Draw.Feature.prototype._fireCreatedEvent.call(this, marker); + } +}); + +L.Edit = L.Edit || {}; + +/* + * L.Edit.Poly is an editing handler for polylines and polygons. + */ + +L.Edit.Poly = L.Handler.extend({ + options: { + icon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon' + }) + }, + + initialize: function (poly, options) { + this._poly = poly; + L.setOptions(this, options); + }, + + addHooks: function () { + if (this._poly._map) { + if (!this._markerGroup) { + this._initMarkers(); + } + this._poly._map.addLayer(this._markerGroup); + } + }, + + removeHooks: function () { + if (this._poly._map) { + this._poly._map.removeLayer(this._markerGroup); + delete this._markerGroup; + delete this._markers; + } + }, + + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + this._markers = []; + + var latlngs = this._poly._latlngs, + i, j, len, marker; + + // TODO refactor holes implementation in Polygon to support it here + + for (i = 0, len = latlngs.length; i < len; i++) { + + marker = this._createMarker(latlngs[i], i); + marker.on('click', this._onMarkerClick, this); + this._markers.push(marker); + } + + var markerLeft, markerRight; + + for (i = 0, j = len - 1; i < len; j = i++) { + if (i === 0 && !(L.Polygon && (this._poly instanceof L.Polygon))) { + continue; + } + + markerLeft = this._markers[j]; + markerRight = this._markers[i]; + + this._createMiddleMarker(markerLeft, markerRight); + this._updatePrevNext(markerLeft, markerRight); + } + }, + + _createMarker: function (latlng, index) { + var marker = new L.Marker(latlng, { + draggable: true, + icon: this.options.icon + }); + + marker._origLatLng = latlng; + marker._index = index; + + marker.on('drag', this._onMarkerDrag, this); + marker.on('dragend', this._fireEdit, this); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _removeMarker: function (marker) { + var i = marker._index; + + this._markerGroup.removeLayer(marker); + this._markers.splice(i, 1); + this._poly.spliceLatLngs(i, 1); + this._updateIndexes(i, -1); + + marker + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._fireEdit, this) + .off('click', this._onMarkerClick, this); + }, + + _fireEdit: function () { + this._poly.edited = true; + this._poly.fire('edit'); + }, + + _onMarkerDrag: function (e) { + var marker = e.target; + + L.extend(marker._origLatLng, marker._latlng); + + if (marker._middleLeft) { + marker._middleLeft.setLatLng(this._getMiddleLatLng(marker._prev, marker)); + } + if (marker._middleRight) { + marker._middleRight.setLatLng(this._getMiddleLatLng(marker, marker._next)); + } + + this._poly.redraw(); + }, + + _onMarkerClick: function (e) { + var minPoints = L.Polygon && (this._poly instanceof L.Polygon) ? 4 : 3, + marker = e.target; + + // If removing this point would create an invalid polyline/polygon don't remove + if (this._poly._latlngs.length < minPoints) { + return; + } + + // remove the marker + this._removeMarker(marker); + + // update prev/next links of adjacent markers + this._updatePrevNext(marker._prev, marker._next); + + // remove ghost markers near the removed marker + if (marker._middleLeft) { + this._markerGroup.removeLayer(marker._middleLeft); + } + if (marker._middleRight) { + this._markerGroup.removeLayer(marker._middleRight); + } + + // create a ghost marker in place of the removed one + if (marker._prev && marker._next) { + this._createMiddleMarker(marker._prev, marker._next); + + } else if (!marker._prev) { + marker._next._middleLeft = null; + + } else if (!marker._next) { + marker._prev._middleRight = null; + } + + this._fireEdit(); + }, + + _updateIndexes: function (index, delta) { + this._markerGroup.eachLayer(function (marker) { + if (marker._index > index) { + marker._index += delta; + } + }); + }, + + _createMiddleMarker: function (marker1, marker2) { + var latlng = this._getMiddleLatLng(marker1, marker2), + marker = this._createMarker(latlng), + onClick, + onDragStart, + onDragEnd; + + marker.setOpacity(0.6); + + marker1._middleRight = marker2._middleLeft = marker; + + onDragStart = function () { + var i = marker2._index; + + marker._index = i; + + marker + .off('click', onClick, this) + .on('click', this._onMarkerClick, this); + + latlng.lat = marker.getLatLng().lat; + latlng.lng = marker.getLatLng().lng; + this._poly.spliceLatLngs(i, 0, latlng); + this._markers.splice(i, 0, marker); + + marker.setOpacity(1); + + this._updateIndexes(i, 1); + marker2._index++; + this._updatePrevNext(marker1, marker); + this._updatePrevNext(marker, marker2); + }; + + onDragEnd = function () { + marker.off('dragstart', onDragStart, this); + marker.off('dragend', onDragEnd, this); + + this._createMiddleMarker(marker1, marker); + this._createMiddleMarker(marker, marker2); + }; + + onClick = function () { + onDragStart.call(this); + onDragEnd.call(this); + this._fireEdit(); + }; + + marker + .on('click', onClick, this) + .on('dragstart', onDragStart, this) + .on('dragend', onDragEnd, this); + + this._markerGroup.addLayer(marker); + }, + + _updatePrevNext: function (marker1, marker2) { + if (marker1) { + marker1._next = marker2; + } + if (marker2) { + marker2._prev = marker1; + } + }, + + _getMiddleLatLng: function (marker1, marker2) { + var map = this._poly._map, + p1 = map.project(marker1.getLatLng()), + p2 = map.project(marker2.getLatLng()); + + return map.unproject(p1._add(p2)._divideBy(2)); + } +}); + +L.Polyline.addInitHook(function () { + + // Check to see if handler has already been initialized. This is to support versions of Leaflet that still have L.Handler.PolyEdit + if (this.editing) { + return; + } + + if (L.Edit.Poly) { + this.editing = new L.Edit.Poly(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); + + +L.Edit = L.Edit || {}; + +L.Edit.SimpleShape = L.Handler.extend({ + options: { + moveIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-move' + }), + resizeIcon: new L.DivIcon({ + iconSize: new L.Point(8, 8), + className: 'leaflet-div-icon leaflet-editing-icon leaflet-edit-resize' + }) + }, + + initialize: function (shape, options) { + this._shape = shape; + L.Util.setOptions(this, options); + }, + + addHooks: function () { + if (this._shape._map) { + this._map = this._shape._map; + + if (!this._markerGroup) { + this._initMarkers(); + } + this._map.addLayer(this._markerGroup); + } + }, + + removeHooks: function () { + if (this._shape._map) { + this._unbindMarker(this._moveMarker); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._unbindMarker(this._resizeMarkers[i]); + } + this._resizeMarkers = null; + + this._map.removeLayer(this._markerGroup); + delete this._markerGroup; + } + + this._map = null; + }, + + updateMarkers: function () { + this._markerGroup.clearLayers(); + this._initMarkers(); + }, + + _initMarkers: function () { + if (!this._markerGroup) { + this._markerGroup = new L.LayerGroup(); + } + + // Create center marker + this._createMoveMarker(); + + // Create edge marker + this._createResizeMarker(); + }, + + _createMoveMarker: function () { + // Children override + }, + + _createResizeMarker: function () { + // Children override + }, + + _createMarker: function (latlng, icon) { + var marker = new L.Marker(latlng, { + draggable: true, + icon: icon, + zIndexOffset: 10 + }); + + this._bindMarker(marker); + + this._markerGroup.addLayer(marker); + + return marker; + }, + + _bindMarker: function (marker) { + marker + .on('dragstart', this._onMarkerDragStart, this) + .on('drag', this._onMarkerDrag, this) + .on('dragend', this._onMarkerDragEnd, this); + }, + + _unbindMarker: function (marker) { + marker + .off('dragstart', this._onMarkerDragStart, this) + .off('drag', this._onMarkerDrag, this) + .off('dragend', this._onMarkerDragEnd, this); + }, + + _onMarkerDragStart: function (e) { + var marker = e.target; + marker.setOpacity(0); + }, + + _fireEdit: function () { + this._shape.edited = true; + this._shape.fire('edit'); + }, + + _onMarkerDrag: function (e) { + var marker = e.target, + latlng = marker.getLatLng(); + + if (marker === this._moveMarker) { + this._move(latlng); + } else { + this._resize(latlng); + } + + this._shape.redraw(); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target; + marker.setOpacity(1); + + this._fireEdit(); + }, + + _move: function () { + // Children override + }, + + _resize: function () { + // Children override + } +}); + + +L.Edit = L.Edit || {}; + +L.Edit.Rectangle = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var bounds = this._shape.getBounds(), + center = bounds.getCenter(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + var corners = this._getCorners(); + + this._resizeMarkers = []; + + for (var i = 0, l = corners.length; i < l; i++) { + this._resizeMarkers.push(this._createMarker(corners[i], this.options.resizeIcon)); + // Monkey in the corner index as we will need to know this for dragging + this._resizeMarkers[i]._cornerIndex = i; + } + }, + + _onMarkerDragStart: function (e) { + L.Edit.SimpleShape.prototype._onMarkerDragStart.call(this, e); + + // Save a reference to the opposite point + var corners = this._getCorners(), + marker = e.target, + currentCornerIndex = marker._cornerIndex; + + this._oppositeCorner = corners[(currentCornerIndex + 2) % 4]; + + this._toggleCornerMarkers(0, currentCornerIndex); + }, + + _onMarkerDragEnd: function (e) { + var marker = e.target, + bounds, center; + + // Reset move marker position to the center + if (marker === this._moveMarker) { + bounds = this._shape.getBounds(); + center = bounds.getCenter(); + + marker.setLatLng(center); + } + + this._toggleCornerMarkers(1); + + this._repositionCornerMarkers(); + + L.Edit.SimpleShape.prototype._onMarkerDragEnd.call(this, e); + }, + + _move: function (newCenter) { + var latlngs = this._shape.getLatLngs(), + bounds = this._shape.getBounds(), + center = bounds.getCenter(), + offset, newLatLngs = []; + + // Offset the latlngs to the new center + for (var i = 0, l = latlngs.length; i < l; i++) { + offset = [latlngs[i].lat - center.lat, latlngs[i].lng - center.lng]; + newLatLngs.push([newCenter.lat + offset[0], newCenter.lng + offset[1]]); + } + + this._shape.setLatLngs(newLatLngs); + + // Respoition the resize markers + this._repositionCornerMarkers(); + }, + + _resize: function (latlng) { + var bounds; + + // Update the shape based on the current position of this corner and the opposite point + this._shape.setBounds(L.latLngBounds(latlng, this._oppositeCorner)); + + // Respoition the move marker + bounds = this._shape.getBounds(); + this._moveMarker.setLatLng(bounds.getCenter()); + }, + + _getCorners: function () { + var bounds = this._shape.getBounds(), + nw = bounds.getNorthWest(), + ne = bounds.getNorthEast(), + se = bounds.getSouthEast(), + sw = bounds.getSouthWest(); + + return [nw, ne, se, sw]; + }, + + _toggleCornerMarkers: function (opacity) { + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setOpacity(opacity); + } + }, + + _repositionCornerMarkers: function () { + var corners = this._getCorners(); + + for (var i = 0, l = this._resizeMarkers.length; i < l; i++) { + this._resizeMarkers[i].setLatLng(corners[i]); + } + } +}); + +L.Rectangle.addInitHook(function () { + if (L.Edit.Rectangle) { + this.editing = new L.Edit.Rectangle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } +}); + +L.Edit = L.Edit || {}; + +L.Edit.Circle = L.Edit.SimpleShape.extend({ + _createMoveMarker: function () { + var center = this._shape.getLatLng(); + + this._moveMarker = this._createMarker(center, this.options.moveIcon); + }, + + _createResizeMarker: function () { + var center = this._shape.getLatLng(), + resizemarkerPoint = this._getResizeMarkerPoint(center); + + this._resizeMarkers = []; + this._resizeMarkers.push(this._createMarker(resizemarkerPoint, this.options.resizeIcon)); + }, + + _getResizeMarkerPoint: function (latlng) { + // From L.shape.getBounds() + var delta = this._shape._radius * Math.cos(Math.PI / 4), + point = this._map.project(latlng); + return this._map.unproject([point.x + delta, point.y - delta]); + }, + + _move: function (latlng) { + var resizemarkerPoint = this._getResizeMarkerPoint(latlng); + + // Move the resize marker + this._resizeMarkers[0].setLatLng(resizemarkerPoint); + + // Move the circle + this._shape.setLatLng(latlng); + }, + + _resize: function (latlng) { + var moveLatLng = this._moveMarker.getLatLng(), + radius = moveLatLng.distanceTo(latlng); + + this._shape.setRadius(radius); + } +}); + +L.Circle.addInitHook(function () { + if (L.Edit.Circle) { + this.editing = new L.Edit.Circle(this); + + if (this.options.editable) { + this.editing.enable(); + } + } + + this.on('add', function () { + if (this.editing && this.editing.enabled()) { + this.editing.addHooks(); + } + }); + + this.on('remove', function () { + if (this.editing && this.editing.enabled()) { + this.editing.removeHooks(); + } + }); +}); + +/* + * L.LatLngUtil contains different utility functions for LatLngs. + */ + +L.LatLngUtil = { + // Clones a LatLngs[], returns [][] + cloneLatLngs: function (latlngs) { + var clone = []; + for (var i = 0, l = latlngs.length; i < l; i++) { + clone.push(this.cloneLatLng(latlngs[i])); + } + return clone; + }, + + cloneLatLng: function (latlng) { + return L.latLng(latlng.lat, latlng.lng); + } +}; + +L.GeometryUtil = { + // Ported from the OpenLayers implementation. See https://github.com/openlayers/openlayers/blob/master/lib/OpenLayers/Geometry/LinearRing.js#L270 + geodesicArea: function (latLngs) { + var pointsCount = latLngs.length, + area = 0.0, + d2r = L.LatLng.DEG_TO_RAD, + p1, p2; + + if (pointsCount > 2) { + for (var i = 0; i < pointsCount; i++) { + p1 = latLngs[i]; + p2 = latLngs[(i + 1) % pointsCount]; + area += ((p2.lng - p1.lng) * d2r) * + (2 + Math.sin(p1.lat * d2r) + Math.sin(p2.lat * d2r)); + } + area = area * 6378137.0 * 6378137.0 / 2.0; + } + + return Math.abs(area); + }, + + readableArea: function (area, isMetric) { + var areaStr; + + if (isMetric) { + if (area >= 10000) { + areaStr = (area * 0.0001).toFixed(2) + ' ha'; + } else { + areaStr = area.toFixed(2) + ' m²'; + } + } else { + area *= 0.836127; // Square yards in 1 meter + + if (area >= 3097600) { //3097600 square yards in 1 square mile + areaStr = (area / 3097600).toFixed(2) + ' mi²'; + } else if (area >= 4840) {//48040 square yards in 1 acre + areaStr = (area / 4840).toFixed(2) + ' acres'; + } else { + areaStr = Math.ceil(area) + ' yd²'; + } + } + + return areaStr; + }, + + readableDistance: function (distance, isMetric) { + var distanceStr; + + if (isMetric) { + // show metres when distance is < 1km, then show km + if (distance > 1000) { + distanceStr = (distance / 1000).toFixed(2) + ' km'; + } else { + distanceStr = Math.ceil(distance) + ' m'; + } + } else { + distance *= 1.09361; + + if (distance > 1760) { + distanceStr = (distance / 1760).toFixed(2) + ' miles'; + } else { + distanceStr = Math.ceil(distance) + ' yd'; + } + } + + return distanceStr; + } +}; + +L.Util.extend(L.LineUtil, { + // Checks to see if two line segments intersect. Does not handle degenerate cases. + // http://compgeom.cs.uiuc.edu/~jeffe/teaching/373/notes/x06-sweepline.pdf + segmentsIntersect: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2, /*Point*/ p3) { + return this._checkCounterclockwise(p, p2, p3) !== + this._checkCounterclockwise(p1, p2, p3) && + this._checkCounterclockwise(p, p1, p2) !== + this._checkCounterclockwise(p, p1, p3); + }, + + // check to see if points are in counterclockwise order + _checkCounterclockwise: function (/*Point*/ p, /*Point*/ p1, /*Point*/ p2) { + return (p2.y - p.y) * (p1.x - p.x) > (p1.y - p.y) * (p2.x - p.x); + } +}); + +L.Polyline.include({ + // Check to see if this polyline has any linesegments that intersect. + // NOTE: does not support detecting intersection for degenerate cases. + intersects: function () { + var points = this._originalPoints, + len = points ? points.length : 0, + i, p, p1; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + for (i = len - 1; i >= 3; i--) { + p = points[i - 1]; + p1 = points[i]; + + + if (this._lineSegmentsIntersectsRange(p, p1, i - 2)) { + return true; + } + } + + return false; + }, + + // Check for intersection if new latlng was added to this polyline. + // NOTE: does not support detecting intersection for degenerate cases. + newLatLngIntersects: function (latlng, skipFirst) { + // Cannot check a polyline for intersecting lats/lngs when not added to the map + if (!this._map) { + return false; + } + + return this.newPointIntersects(this._map.latLngToLayerPoint(latlng), skipFirst); + }, + + // Check for intersection if new point was added to this polyline. + // newPoint must be a layer point. + // NOTE: does not support detecting intersection for degenerate cases. + newPointIntersects: function (newPoint, skipFirst) { + var points = this._originalPoints, + len = points ? points.length : 0, + lastPoint = points ? points[len - 1] : null, + // The previous previous line segment. Previous line segement doesn't need testing. + maxIndex = len - 2; + + if (this._tooFewPointsForIntersection(1)) { + return false; + } + + return this._lineSegmentsIntersectsRange(lastPoint, newPoint, maxIndex, skipFirst ? 1 : 0); + }, + + // Polylines with 2 sides can only intersect in cases where points are collinear (we don't support detecting these). + // Cannot have intersection when < 3 line segments (< 4 points) + _tooFewPointsForIntersection: function (extraPoints) { + var points = this._originalPoints, + len = points ? points.length : 0; + // Increment length by extraPoints if present + len += extraPoints || 0; + + return !this._originalPoints || len <= 3; + }, + + // Checks a line segment intersections with any line segements before its predecessor. + // Don't need to check the predecessor as will never intersect. + _lineSegmentsIntersectsRange: function (p, p1, maxIndex, minIndex) { + var points = this._originalPoints, + p2, p3; + + minIndex = minIndex || 0; + + // Check all previous line segments (beside the immediately previous) for intersections + for (var j = maxIndex; j > minIndex; j--) { + p2 = points[j - 1]; + p3 = points[j]; + + if (L.LineUtil.segmentsIntersect(p, p1, p2, p3)) { + return true; + } + } + + return false; + } +}); + +L.Polygon.include({ + // Checks a polygon for any intersecting line segments. Ignores holes. + intersects: function () { + var polylineIntersects, + points = this._originalPoints, + len, firstPoint, lastPoint, maxIndex; + + if (this._tooFewPointsForIntersection()) { + return false; + } + + polylineIntersects = L.Polyline.prototype.intersects.call(this); + + // If already found an intersection don't need to check for any more. + if (polylineIntersects) { + return true; + } + + len = points.length; + firstPoint = points[0]; + lastPoint = points[len - 1]; + maxIndex = len - 2; + + // Check the line segment between last and first point. Don't need to check the first line segment (minIndex = 1) + return this._lineSegmentsIntersectsRange(lastPoint, firstPoint, maxIndex, 1); + } +}); + +L.Control.Draw = L.Control.extend({ + + options: { + position: 'topleft', + draw: {}, + edit: false + }, + + initialize: function (options) { + if (L.version <= "0.5.1") { + throw new Error('Leaflet.draw 0.2.0+ requires Leaflet 0.6.0+. Download latest from https://github.com/Leaflet/Leaflet/'); + } + + L.Control.prototype.initialize.call(this, options); + + var id, toolbar; + + this._toolbars = {}; + + // Initialize toolbars + if (L.DrawToolbar && this.options.draw) { + toolbar = new L.DrawToolbar(this.options.draw); + id = L.stamp(toolbar); + this._toolbars[id] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[id].on('enable', this._toolbarEnabled, this); + } + + if (L.EditToolbar && this.options.edit) { + toolbar = new L.EditToolbar(this.options.edit); + id = L.stamp(toolbar); + this._toolbars[id] = toolbar; + + // Listen for when toolbar is enabled + this._toolbars[id].on('enable', this._toolbarEnabled, this); + } + }, + + onAdd: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw'), + addedTopClass = false, + topClassName = 'leaflet-draw-toolbar-top', + toolbarContainer; + + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + toolbarContainer = this._toolbars[toolbarId].addToolbar(map); + + // Add class to the first toolbar to remove the margin + if (!addedTopClass) { + if (!L.DomUtil.hasClass(toolbarContainer, topClassName)) { + L.DomUtil.addClass(toolbarContainer.childNodes[0], topClassName); + } + addedTopClass = true; + } + + container.appendChild(toolbarContainer); + } + } + + return container; + }, + + onRemove: function () { + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId)) { + this._toolbars[toolbarId].removeToolbar(); + } + } + }, + + setDrawingOptions: function (options) { + for (var toolbarId in this._toolbars) { + if (this._toolbars[toolbarId] instanceof L.DrawToolbar) { + this._toolbars[toolbarId].setOptions(options); + } + } + }, + + _toolbarEnabled: function (e) { + var id = '' + L.stamp(e.target); + + for (var toolbarId in this._toolbars) { + if (this._toolbars.hasOwnProperty(toolbarId) && toolbarId !== id) { + this._toolbars[toolbarId].disable(); + } + } + } +}); + +L.Map.mergeOptions({ + drawControlTooltips: true, + drawControl: false +}); + +L.Map.addInitHook(function () { + if (this.options.drawControl) { + this.drawControl = new L.Control.Draw(); + this.addControl(this.drawControl); + } +}); + +L.Toolbar = L.Class.extend({ + includes: [L.Mixin.Events], + + initialize: function (options) { + L.setOptions(this, options); + + this._modes = {}; + this._actionButtons = []; + this._activeMode = null; + }, + + enabled: function () { + return this._activeMode !== null; + }, + + disable: function () { + if (!this.enabled()) { return; } + + this._activeMode.handler.disable(); + }, + + removeToolbar: function () { + // Dispose each handler + for (var handlerId in this._modes) { + if (this._modes.hasOwnProperty(handlerId)) { + // Unbind handler button + this._disposeButton(this._modes[handlerId].button, this._modes[handlerId].handler.enable); + + // Make sure is disabled + this._modes[handlerId].handler.disable(); + + // Unbind handler + this._modes[handlerId].handler + .off('enabled', this._handlerActivated, this) + .off('disabled', this._handlerDeactivated, this); + } + } + this._modes = {}; + + // Dispose the actions toolbar + for (var i = 0, l = this._actionButtons.length; i < l; i++) { + this._disposeButton(this._actionButtons[i].button, this._actionButtons[i].callback); + } + this._actionButtons = []; + this._actionsContainer = null; + }, + + _initModeHandler: function (handler, container, buttonIndex, classNamePredix, buttonTitle) { + var type = handler.type; + + this._modes[type] = {}; + + this._modes[type].handler = handler; + + this._modes[type].button = this._createButton({ + title: buttonTitle, + className: classNamePredix + '-' + type, + container: container, + callback: this._modes[type].handler.enable, + context: this._modes[type].handler + }); + + this._modes[type].buttonIndex = buttonIndex; + + this._modes[type].handler + .on('enabled', this._handlerActivated, this) + .on('disabled', this._handlerDeactivated, this); + }, + + _createButton: function (options) { + var link = L.DomUtil.create('a', options.className || '', options.container); + link.href = '#'; + + if (options.text) { + link.innerHTML = options.text; + } + + if (options.title) { + link.title = options.title; + } + + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'mousedown', L.DomEvent.stopPropagation) + .on(link, 'dblclick', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, 'click', options.callback, options.context); + + return link; + }, + + _disposeButton: function (button, callback) { + L.DomEvent + .off(button, 'click', L.DomEvent.stopPropagation) + .off(button, 'mousedown', L.DomEvent.stopPropagation) + .off(button, 'dblclick', L.DomEvent.stopPropagation) + .off(button, 'click', L.DomEvent.preventDefault) + .off(button, 'click', callback); + }, + + _handlerActivated: function (e) { + // Disable active mode (if present) + if (this._activeMode && this._activeMode.handler.enabled()) { + this._activeMode.handler.disable(); + } + + // Cache new active feature + this._activeMode = this._modes[e.handler]; + + L.DomUtil.addClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._showActionsToolbar(); + + this.fire('enable'); + }, + + _handlerDeactivated: function () { + this._hideActionsToolbar(); + + L.DomUtil.removeClass(this._activeMode.button, 'leaflet-draw-toolbar-button-enabled'); + + this._activeMode = null; + + this.fire('disable'); + }, + + _createActions: function (buttons) { + var container = L.DomUtil.create('ul', 'leaflet-draw-actions'), + l = buttons.length, + li, button; + + for (var i = 0; i < l; i++) { + li = L.DomUtil.create('li', '', container); + + button = this._createButton({ + title: buttons[i].title, + text: buttons[i].text, + container: li, + callback: buttons[i].callback, + context: buttons[i].context + }); + + this._actionButtons.push({ + button: button, + callback: buttons[i].callback + }); + } + + return container; + }, + + _showActionsToolbar: function () { + var buttonIndex = this._activeMode.buttonIndex, + lastButtonIndex = this._lastButtonIndex, + buttonHeight = 26, // TODO: this should be calculated + borderHeight = 1, // TODO: this should also be calculated + toolbarPosition = (buttonIndex * buttonHeight) + (buttonIndex * borderHeight) - 1; + + // Correctly position the cancel button + this._actionsContainer.style.top = toolbarPosition + 'px'; + + if (buttonIndex === 0) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-top'); + } + + if (buttonIndex === lastButtonIndex) { + L.DomUtil.addClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.addClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + } + + this._actionsContainer.style.display = 'block'; + }, + + _hideActionsToolbar: function () { + this._actionsContainer.style.display = 'none'; + + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-notop'); + L.DomUtil.removeClass(this._toolbarContainer, 'leaflet-draw-toolbar-nobottom'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-top'); + L.DomUtil.removeClass(this._actionsContainer, 'leaflet-draw-actions-bottom'); + } +}); + +L.Tooltip = L.Class.extend({ + initialize: function (map) { + this._map = map; + this._popupPane = map._panes.popupPane; + + this._container = map.options.drawControlTooltips ? L.DomUtil.create('div', 'leaflet-draw-tooltip', this._popupPane) : null; + this._singleLineLabel = false; + }, + + dispose: function () { + if (this._container) { + this._popupPane.removeChild(this._container); + this._container = null; + } + }, + + updateContent: function (labelText) { + if (!this._container) { + return this; + } + labelText.subtext = labelText.subtext || ''; + + // update the vertical position (only if changed) + if (labelText.subtext.length === 0 && !this._singleLineLabel) { + L.DomUtil.addClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = true; + } + else if (labelText.subtext.length > 0 && this._singleLineLabel) { + L.DomUtil.removeClass(this._container, 'leaflet-draw-tooltip-single'); + this._singleLineLabel = false; + } + + this._container.innerHTML = + (labelText.subtext.length > 0 ? '<span class="leaflet-draw-tooltip-subtext">' + labelText.subtext + '</span>' + '<br />' : '') + + '<span>' + labelText.text + '</span>'; + + return this; + }, + + updatePosition: function (latlng) { + var pos = this._map.latLngToLayerPoint(latlng), + tooltipContainer = this._container; + + if (this._container) { + tooltipContainer.style.visibility = 'inherit'; + L.DomUtil.setPosition(tooltipContainer, pos); + } + + return this; + }, + + showAsError: function () { + if (this._container) { + L.DomUtil.addClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + }, + + removeError: function () { + if (this._container) { + L.DomUtil.removeClass(this._container, 'leaflet-error-draw-tooltip'); + } + return this; + } +}); + +L.DrawToolbar = L.Toolbar.extend({ + + options: { + polyline: {}, + polygon: {}, + rectangle: {}, + circle: {}, + marker: {} + }, + + initialize: function (options) { + // Ensure that the options are merged correctly since L.extend is only shallow + for (var type in this.options) { + if (this.options.hasOwnProperty(type)) { + if (options[type]) { + options[type] = L.extend({}, this.options[type], options[type]); + } + } + } + + L.Toolbar.prototype.initialize.call(this, options); + }, + + addToolbar: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw-section'), + buttonIndex = 0, + buttonClassPrefix = 'leaflet-draw-draw'; + + this._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar'); + + + if (this.options.polyline) { + this._initModeHandler( + new L.Draw.Polyline(map, this.options.polyline), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.draw.toolbar.buttons.polyline + ); + } + + if (this.options.polygon) { + this._initModeHandler( + new L.Draw.Polygon(map, this.options.polygon), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.draw.toolbar.buttons.polygon + ); + } + + if (this.options.rectangle) { + this._initModeHandler( + new L.Draw.Rectangle(map, this.options.rectangle), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.draw.toolbar.buttons.rectangle + ); + } + + if (this.options.circle) { + this._initModeHandler( + new L.Draw.Circle(map, this.options.circle), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.draw.toolbar.buttons.circle + ); + } + + if (this.options.marker) { + this._initModeHandler( + new L.Draw.Marker(map, this.options.marker), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.draw.toolbar.buttons.marker + ); + } + + // Save button index of the last button, -1 as we would have ++ after the last button + this._lastButtonIndex = --buttonIndex; + + // Create the actions part of the toolbar + this._actionsContainer = this._createActions([ + { + title: L.drawLocal.draw.toolbar.actions.title, + text: L.drawLocal.draw.toolbar.actions.text, + callback: this.disable, + context: this + } + ]); + + // Add draw and cancel containers to the control container + container.appendChild(this._toolbarContainer); + container.appendChild(this._actionsContainer); + + return container; + }, + + setOptions: function (options) { + L.setOptions(this, options); + + for (var type in this._modes) { + if (this._modes.hasOwnProperty(type) && options.hasOwnProperty(type)) { + this._modes[type].handler.setOptions(options[type]); + } + } + } +}); + +/*L.Map.mergeOptions({ + editControl: true +});*/ + +L.EditToolbar = L.Toolbar.extend({ + options: { + edit: { + selectedPathOptions: { + color: '#fe57a1', /* Hot pink all the things! */ + opacity: 0.6, + dashArray: '10, 10', + + fill: true, + fillColor: '#fe57a1', + fillOpacity: 0.1 + } + }, + remove: {}, + featureGroup: null /* REQUIRED! TODO: perhaps if not set then all layers on the map are selectable? */ + }, + + initialize: function (options) { + // Need to set this manually since null is an acceptable value here + if (options.edit) { + if (typeof options.edit.selectedPathOptions === 'undefined') { + options.edit.selectedPathOptions = this.options.edit.selectedPathOptions; + } + options.edit = L.extend({}, this.options.edit, options.edit); + } + + if (options.remove) { + options.remove = L.extend({}, this.options.remove, options.remove); + } + + L.Toolbar.prototype.initialize.call(this, options); + + this._selectedFeatureCount = 0; + }, + + addToolbar: function (map) { + var container = L.DomUtil.create('div', 'leaflet-draw-section'), + buttonIndex = 0, + buttonClassPrefix = 'leaflet-draw-edit', + featureGroup = this.options.featureGroup; + + this._toolbarContainer = L.DomUtil.create('div', 'leaflet-draw-toolbar leaflet-bar'); + + this._map = map; + + if (this.options.edit) { + this._initModeHandler( + new L.EditToolbar.Edit(map, { + featureGroup: featureGroup, + selectedPathOptions: this.options.edit.selectedPathOptions + }), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.edit.toolbar.buttons.edit + ); + } + + if (this.options.remove) { + this._initModeHandler( + new L.EditToolbar.Delete(map, { + featureGroup: featureGroup + }), + this._toolbarContainer, + buttonIndex++, + buttonClassPrefix, + L.drawLocal.edit.toolbar.buttons.remove + ); + } + + // Save button index of the last button, -1 as we would have ++ after the last button + this._lastButtonIndex = --buttonIndex; + + // Create the actions part of the toolbar + this._actionsContainer = this._createActions([ + { + title: L.drawLocal.edit.toolbar.actions.save.title, + text: L.drawLocal.edit.toolbar.actions.save.text, + callback: this._save, + context: this + }, + { + title: L.drawLocal.edit.toolbar.actions.cancel.title, + text: L.drawLocal.edit.toolbar.actions.cancel.text, + callback: this.disable, + context: this + } + ]); + + // Add draw and cancel containers to the control container + container.appendChild(this._toolbarContainer); + container.appendChild(this._actionsContainer); + + this._checkDisabled(); + + featureGroup.on('layeradd layerremove', this._checkDisabled, this); + + return container; + }, + + removeToolbar: function () { + L.Toolbar.prototype.removeToolbar.call(this); + + this.options.featureGroup.off('layeradd layerremove', this._checkDisabled, this); + }, + + disable: function () { + if (!this.enabled()) { return; } + + this._activeMode.handler.revertLayers(); + + L.Toolbar.prototype.disable.call(this); + }, + + _save: function () { + this._activeMode.handler.save(); + this._activeMode.handler.disable(); + }, + + _checkDisabled: function () { + var featureGroup = this.options.featureGroup, + hasLayers = featureGroup.getLayers().length !== 0, + button; + + if (this.options.edit) { + button = this._modes[L.EditToolbar.Edit.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.edit + : L.drawLocal.edit.toolbar.buttons.editDisabled + ); + } + + if (this.options.remove) { + button = this._modes[L.EditToolbar.Delete.TYPE].button; + + if (hasLayers) { + L.DomUtil.removeClass(button, 'leaflet-disabled'); + } else { + L.DomUtil.addClass(button, 'leaflet-disabled'); + } + + button.setAttribute( + 'title', + hasLayers ? + L.drawLocal.edit.toolbar.buttons.remove + : L.drawLocal.edit.toolbar.buttons.removeDisabled + ); + } + } +}); + + +L.EditToolbar.Edit = L.Handler.extend({ + statics: { + TYPE: 'edit' + }, + + includes: L.Mixin.Events, + + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + // Set options to the default unless already set + this._selectedPathOptions = options.selectedPathOptions; + + // Store the selectable layer group for ease of access + this._featureGroup = options.featureGroup; + + if (!(this._featureGroup instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + this._uneditedLayerProps = {}; + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Edit.TYPE; + }, + + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + + L.Handler.prototype.enable.call(this); + + this._featureGroup + .on('layeradd', this._enableLayerEdit, this) + .on('layerremove', this._disableLayerEdit, this); + + this.fire('enabled', {handler: this.type}); + this._map.fire('draw:editstart', { handler: this.type }); + }, + + disable: function () { + if (!this._enabled) { return; } + + this.fire('disabled', {handler: this.type}); + this._map.fire('draw:editstop', { handler: this.type }); + + this._featureGroup + .off('layeradd', this._enableLayerEdit, this) + .off('layerremove', this._disableLayerEdit, this); + + L.Handler.prototype.disable.call(this); + }, + + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._featureGroup.eachLayer(this._enableLayerEdit, this); + + this._tooltip = new L.Tooltip(this._map); + this._tooltip.updateContent({ + text: L.drawLocal.edit.handlers.edit.tooltip.text, + subtext: L.drawLocal.edit.handlers.edit.tooltip.subtext + }); + + this._map.on('mousemove', this._onMouseMove, this); + } + }, + + removeHooks: function () { + if (this._map) { + // Clean up selected layers. + this._featureGroup.eachLayer(this._disableLayerEdit, this); + + // Clear the backups of the original layers + this._uneditedLayerProps = {}; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + revertLayers: function () { + this._featureGroup.eachLayer(function (layer) { + this._revertLayer(layer); + }, this); + }, + + save: function () { + var editedLayers = new L.LayerGroup(); + this._featureGroup.eachLayer(function (layer) { + if (layer.edited) { + editedLayers.addLayer(layer); + layer.edited = false; + } + }); + this._map.fire('draw:edited', {layers: editedLayers}); + }, + + _backupLayer: function (layer) { + var id = L.Util.stamp(layer); + + if (!this._uneditedLayerProps[id]) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + this._uneditedLayerProps[id] = { + latlngs: L.LatLngUtil.cloneLatLngs(layer.getLatLngs()) + }; + } else if (layer instanceof L.Circle) { + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()), + radius: layer.getRadius() + }; + } else { // Marker + this._uneditedLayerProps[id] = { + latlng: L.LatLngUtil.cloneLatLng(layer.getLatLng()) + }; + } + } + }, + + _revertLayer: function (layer) { + var id = L.Util.stamp(layer); + layer.edited = false; + if (this._uneditedLayerProps.hasOwnProperty(id)) { + // Polyline, Polygon or Rectangle + if (layer instanceof L.Polyline || layer instanceof L.Polygon || layer instanceof L.Rectangle) { + layer.setLatLngs(this._uneditedLayerProps[id].latlngs); + } else if (layer instanceof L.Circle) { + layer.setLatLng(this._uneditedLayerProps[id].latlng); + layer.setRadius(this._uneditedLayerProps[id].radius); + } else { // Marker + layer.setLatLng(this._uneditedLayerProps[id].latlng); + } + } + }, + + _toggleMarkerHighlight: function (marker) { + if (!marker._icon) { + return; + } + // This is quite naughty, but I don't see another way of doing it. (short of setting a new icon) + var icon = marker._icon; + + icon.style.display = 'none'; + + if (L.DomUtil.hasClass(icon, 'leaflet-edit-marker-selected')) { + L.DomUtil.removeClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, -4); + + } else { + L.DomUtil.addClass(icon, 'leaflet-edit-marker-selected'); + // Offset as the border will make the icon move. + this._offsetMarker(icon, 4); + } + + icon.style.display = ''; + }, + + _offsetMarker: function (icon, offset) { + var iconMarginTop = parseInt(icon.style.marginTop, 10) - offset, + iconMarginLeft = parseInt(icon.style.marginLeft, 10) - offset; + + icon.style.marginTop = iconMarginTop + 'px'; + icon.style.marginLeft = iconMarginLeft + 'px'; + }, + + _enableLayerEdit: function (e) { + var layer = e.layer || e.target || e, + isMarker = layer instanceof L.Marker, + pathOptions; + + // Don't do anything if this layer is a marker but doesn't have an icon. Markers + // should usually have icons. If using Leaflet.draw with Leafler.markercluster there + // is a chance that a marker doesn't. + if (isMarker && !layer._icon) { + return; + } + + // Back up this layer (if haven't before) + this._backupLayer(layer); + + // Update layer style so appears editable + if (this._selectedPathOptions) { + pathOptions = L.Util.extend({}, this._selectedPathOptions); + + if (isMarker) { + this._toggleMarkerHighlight(layer); + } else { + layer.options.previousOptions = layer.options; + + // Make sure that Polylines are not filled + if (!(layer instanceof L.Circle) && !(layer instanceof L.Polygon) && !(layer instanceof L.Rectangle)) { + pathOptions.fill = false; + } + + layer.setStyle(pathOptions); + } + } + + if (isMarker) { + layer.dragging.enable(); + layer.on('dragend', this._onMarkerDragEnd); + } else { + layer.editing.enable(); + } + }, + + _disableLayerEdit: function (e) { + var layer = e.layer || e.target || e; + layer.edited = false; + + // Reset layer styles to that of before select + if (this._selectedPathOptions) { + if (layer instanceof L.Marker) { + this._toggleMarkerHighlight(layer); + } else { + // reset the layer style to what is was before being selected + layer.setStyle(layer.options.previousOptions); + // remove the cached options for the layer object + delete layer.options.previousOptions; + } + } + + if (layer instanceof L.Marker) { + layer.dragging.disable(); + layer.off('dragend', this._onMarkerDragEnd, this); + } else { + layer.editing.disable(); + } + }, + + _onMarkerDragEnd: function (e) { + var layer = e.target; + layer.edited = true; + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _hasAvailableLayers: function () { + return this._featureGroup.getLayers().length !== 0; + } +}); + + +L.EditToolbar.Delete = L.Handler.extend({ + statics: { + TYPE: 'remove' // not delete as delete is reserved in js + }, + + includes: L.Mixin.Events, + + initialize: function (map, options) { + L.Handler.prototype.initialize.call(this, map); + + L.Util.setOptions(this, options); + + // Store the selectable layer group for ease of access + this._deletableLayers = this.options.featureGroup; + + if (!(this._deletableLayers instanceof L.FeatureGroup)) { + throw new Error('options.featureGroup must be a L.FeatureGroup'); + } + + // Save the type so super can fire, need to do this as cannot do this.TYPE :( + this.type = L.EditToolbar.Delete.TYPE; + }, + + enable: function () { + if (this._enabled || !this._hasAvailableLayers()) { + return; + } + + L.Handler.prototype.enable.call(this); + + this._deletableLayers + .on('layeradd', this._enableLayerDelete, this) + .on('layerremove', this._disableLayerDelete, this); + + this.fire('enabled', { handler: this.type}); + this._map.fire('draw:editstart', { handler: this.type }); + }, + + disable: function () { + if (!this._enabled) { return; } + + L.Handler.prototype.disable.call(this); + + this._deletableLayers + .off('layeradd', this._enableLayerDelete, this) + .off('layerremove', this._disableLayerDelete, this); + + this.fire('disabled', { handler: this.type}); + this._map.fire('draw:editstop', { handler: this.type }); + }, + + addHooks: function () { + var map = this._map; + + if (map) { + map.getContainer().focus(); + + this._deletableLayers.eachLayer(this._enableLayerDelete, this); + this._deletedLayers = new L.layerGroup(); + + this._tooltip = new L.Tooltip(this._map); + this._tooltip.updateContent({ text: L.drawLocal.edit.handlers.remove.tooltip.text }); + + this._map.on('mousemove', this._onMouseMove, this); + } + }, + + removeHooks: function () { + if (this._map) { + this._deletableLayers.eachLayer(this._disableLayerDelete, this); + this._deletedLayers = null; + + this._tooltip.dispose(); + this._tooltip = null; + + this._map.off('mousemove', this._onMouseMove, this); + } + }, + + revertLayers: function () { + // Iterate of the deleted layers and add them back into the featureGroup + this._deletedLayers.eachLayer(function (layer) { + this._deletableLayers.addLayer(layer); + }, this); + }, + + save: function () { + this._map.fire('draw:deleted', { layers: this._deletedLayers }); + }, + + _enableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.on('click', this._removeLayer, this); + }, + + _disableLayerDelete: function (e) { + var layer = e.layer || e.target || e; + + layer.off('click', this._removeLayer, this); + + // Remove from the deleted layers so we can't accidently revert if the user presses cancel + this._deletedLayers.removeLayer(layer); + }, + + _removeLayer: function (e) { + var layer = e.layer || e.target || e; + + this._deletableLayers.removeLayer(layer); + + this._deletedLayers.addLayer(layer); + }, + + _onMouseMove: function (e) { + this._tooltip.updatePosition(e.latlng); + }, + + _hasAvailableLayers: function () { + return this._deletableLayers.getLayers().length !== 0; + } +}); + + +}(this, document)); \ No newline at end of file diff --git a/assets/js/sig/leaflet/leaflet.draw.js b/assets/js/sig/leaflet/leaflet.draw.js new file mode 100755 index 0000000000000000000000000000000000000000..58f25f3238ea22904e234ca40f069888a0c72565 --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.draw.js @@ -0,0 +1,97 @@ +/* +* Leaflet.draw assumes that you have already included the Leaflet library. +*/ + +L.drawVersion = '0.2.3-dev'; + +L.drawLocal = { + draw: { + toolbar: { + actions: { + title: 'Cancel drawing', + text: 'Cancel' + }, + undo: { + title: 'Delete last point drawn', + text: 'Delete last point' + }, + buttons: { + polyline: 'Draw a polyline', + polygon: 'Draw a polygon', + rectangle: 'Draw a rectangle', + circle: 'Draw a circle', + marker: 'Draw a marker' + } + }, + handlers: { + circle: { + tooltip: { + start: 'Click and drag to draw circle.' + } + }, + marker: { + tooltip: { + start: 'Click map to place marker.' + } + }, + polygon: { + tooltip: { + start: 'Click to start drawing shape.', + cont: 'Click to continue drawing shape.', + end: 'Click first point to close this shape.' + } + }, + polyline: { + error: '<strong>Error:</strong> shape edges cannot cross!', + tooltip: { + start: 'Click to start drawing line.', + cont: 'Click to continue drawing line.', + end: 'Click last point to finish line.' + } + }, + rectangle: { + tooltip: { + start: 'Click and drag to draw rectangle.' + } + }, + simpleshape: { + tooltip: { + end: 'Release mouse to finish drawing.' + } + } + } + }, + edit: { + toolbar: { + actions: { + save: { + title: 'Save changes.', + text: 'Save' + }, + cancel: { + title: 'Cancel editing, discards all changes.', + text: 'Cancel' + } + }, + buttons: { + edit: 'Edit layers.', + editDisabled: 'No layers to edit.', + remove: 'Delete layers.', + removeDisabled: 'No layers to delete.' + } + }, + handlers: { + edit: { + tooltip: { + text: 'Drag handles, or marker to edit feature.', + subtext: 'Click cancel to undo changes.' + } + }, + remove: { + tooltip: { + text: 'Click on a feature to remove' + } + } + } + } +}; diff --git a/assets/js/sig/leaflet/leaflet.js b/assets/js/sig/leaflet/leaflet.js new file mode 100755 index 0000000000000000000000000000000000000000..03434b77db782fc44004ad77d160f2f17edf99ff --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.js @@ -0,0 +1,9 @@ +/* + Leaflet, a JavaScript library for mobile-friendly interactive maps. http://leafletjs.com + (c) 2010-2013, Vladimir Agafonkin + (c) 2010-2011, CloudMade +*/ +!function(t,e,i){var n=t.L,o={};o.version="0.7.3","object"==typeof module&&"object"==typeof module.exports?module.exports=o:"function"==typeof define&&define.amd&&define(o),o.noConflict=function(){return t.L=n,this},t.L=o,o.Util={extend:function(t){var e,i,n,o,s=Array.prototype.slice.call(arguments,1);for(i=0,n=s.length;n>i;i++){o=s[i]||{};for(e in o)o.hasOwnProperty(e)&&(t[e]=o[e])}return t},bind:function(t,e){var i=arguments.length>2?Array.prototype.slice.call(arguments,2):null;return function(){return t.apply(e,i||arguments)}},stamp:function(){var t=0,e="_leaflet_id";return function(i){return i[e]=i[e]||++t,i[e]}}(),invokeEach:function(t,e,i){var n,o;if("object"==typeof t){o=Array.prototype.slice.call(arguments,3);for(n in t)e.apply(i,[n,t[n]].concat(o));return!0}return!1},limitExecByInterval:function(t,e,i){var n,o;return function s(){var a=arguments;return n?void(o=!0):(n=!0,setTimeout(function(){n=!1,o&&(s.apply(i,a),o=!1)},e),void t.apply(i,a))}},falseFn:function(){return!1},formatNum:function(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},splitWords:function(t){return o.Util.trim(t).split(/\s+/)},setOptions:function(t,e){return t.options=o.extend({},t.options,e),t.options},getParamString:function(t,e,i){var n=[];for(var o in t)n.push(encodeURIComponent(i?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")},template:function(t,e){return t.replace(/\{ *([\w_]+) *\}/g,function(t,n){var o=e[n];if(o===i)throw new Error("No value provided for variable "+t);return"function"==typeof o&&(o=o(e)),o})},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},emptyImageUrl:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},function(){function e(e){var i,n,o=["webkit","moz","o","ms"];for(i=0;i<o.length&&!n;i++)n=t[o[i]+e];return n}function i(e){var i=+new Date,o=Math.max(0,16-(i-n));return n=i+o,t.setTimeout(e,o)}var n=0,s=t.requestAnimationFrame||e("RequestAnimationFrame")||i,a=t.cancelAnimationFrame||e("CancelAnimationFrame")||e("CancelRequestAnimationFrame")||function(e){t.clearTimeout(e)};o.Util.requestAnimFrame=function(e,n,a,r){return e=o.bind(e,n),a&&s===i?void e():s.call(t,e,r)},o.Util.cancelAnimFrame=function(e){e&&a.call(t,e)}}(),o.extend=o.Util.extend,o.bind=o.Util.bind,o.stamp=o.Util.stamp,o.setOptions=o.Util.setOptions,o.Class=function(){},o.Class.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this._initHooks&&this.callInitHooks()},i=function(){};i.prototype=this.prototype;var n=new i;n.constructor=e,e.prototype=n;for(var s in this)this.hasOwnProperty(s)&&"prototype"!==s&&(e[s]=this[s]);t.statics&&(o.extend(e,t.statics),delete t.statics),t.includes&&(o.Util.extend.apply(null,[n].concat(t.includes)),delete t.includes),t.options&&n.options&&(t.options=o.extend({},n.options,t.options)),o.extend(n,t),n._initHooks=[];var a=this;return e.__super__=a.prototype,n.callInitHooks=function(){if(!this._initHooksCalled){a.prototype.callInitHooks&&a.prototype.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=n._initHooks.length;e>t;t++)n._initHooks[t].call(this)}},e},o.Class.include=function(t){o.extend(this.prototype,t)},o.Class.mergeOptions=function(t){o.extend(this.prototype.options,t)},o.Class.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i)};var s="_leaflet_events";o.Mixin={},o.Mixin.Events={addEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d=this[s]=this[s]||{},p=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)r={action:e,context:i||this},h=t[n],p?(l=h+"_idx",u=l+"_len",c=d[l]=d[l]||{},c[p]||(c[p]=[],d[u]=(d[u]||0)+1),c[p].push(r)):(d[h]=d[h]||[],d[h].push(r));return this},hasEventListeners:function(t){var e=this[s];return!!e&&(t in e&&e[t].length>0||t+"_idx"in e&&e[t+"_idx_len"]>0)},removeEventListener:function(t,e,i){if(!this[s])return this;if(!t)return this.clearAllEventListeners();if(o.Util.invokeEach(t,this.removeEventListener,this,e,i))return this;var n,a,r,h,l,u,c,d,p,_=this[s],m=i&&i!==this&&o.stamp(i);for(t=o.Util.splitWords(t),n=0,a=t.length;a>n;n++)if(r=t[n],u=r+"_idx",c=u+"_len",d=_[u],e){if(h=m&&d?d[m]:_[r]){for(l=h.length-1;l>=0;l--)h[l].action!==e||i&&h[l].context!==i||(p=h.splice(l,1),p[0].action=o.Util.falseFn);i&&d&&0===h.length&&(delete d[m],_[c]--)}}else delete _[r],delete _[u],delete _[c];return this},clearAllEventListeners:function(){return delete this[s],this},fireEvent:function(t,e){if(!this.hasEventListeners(t))return this;var i,n,a,r,h,l=o.Util.extend({},e,{type:t,target:this}),u=this[s];if(u[t])for(i=u[t].slice(),n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);r=u[t+"_idx"];for(h in r)if(i=r[h].slice())for(n=0,a=i.length;a>n;n++)i[n].action.call(i[n].context,l);return this},addOneTimeEventListener:function(t,e,i){if(o.Util.invokeEach(t,this.addOneTimeEventListener,this,e,i))return this;var n=o.bind(function(){this.removeEventListener(t,e,i).removeEventListener(t,n,i)},this);return this.addEventListener(t,e,i).addEventListener(t,n,i)}},o.Mixin.Events.on=o.Mixin.Events.addEventListener,o.Mixin.Events.off=o.Mixin.Events.removeEventListener,o.Mixin.Events.once=o.Mixin.Events.addOneTimeEventListener,o.Mixin.Events.fire=o.Mixin.Events.fireEvent,function(){var n="ActiveXObject"in t,s=n&&!e.addEventListener,a=navigator.userAgent.toLowerCase(),r=-1!==a.indexOf("webkit"),h=-1!==a.indexOf("chrome"),l=-1!==a.indexOf("phantom"),u=-1!==a.indexOf("android"),c=-1!==a.search("android [23]"),d=-1!==a.indexOf("gecko"),p=typeof orientation!=i+"",_=t.navigator&&t.navigator.msPointerEnabled&&t.navigator.msMaxTouchPoints&&!t.PointerEvent,m=t.PointerEvent&&t.navigator.pointerEnabled&&t.navigator.maxTouchPoints||_,f="devicePixelRatio"in t&&t.devicePixelRatio>1||"matchMedia"in t&&t.matchMedia("(min-resolution:144dpi)")&&t.matchMedia("(min-resolution:144dpi)").matches,g=e.documentElement,v=n&&"transition"in g.style,y="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix&&!c,P="MozPerspective"in g.style,L="OTransition"in g.style,x=!t.L_DISABLE_3D&&(v||y||P||L)&&!l,w=!t.L_NO_TOUCH&&!l&&function(){var t="ontouchstart";if(m||t in g)return!0;var i=e.createElement("div"),n=!1;return i.setAttribute?(i.setAttribute(t,"return;"),"function"==typeof i[t]&&(n=!0),i.removeAttribute(t),i=null,n):!1}();o.Browser={ie:n,ielt9:s,webkit:r,gecko:d&&!r&&!t.opera&&!n,android:u,android23:c,chrome:h,ie3d:v,webkit3d:y,gecko3d:P,opera3d:L,any3d:x,mobile:p,mobileWebkit:p&&r,mobileWebkit3d:p&&y,mobileOpera:p&&t.opera,touch:w,msPointer:_,pointer:m,retina:f}}(),o.Point=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e},o.Point.prototype={clone:function(){return new o.Point(this.x,this.y)},add:function(t){return this.clone()._add(o.point(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(o.point(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},distanceTo:function(t){t=o.point(t);var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return t=o.point(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=o.point(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+o.Util.formatNum(this.x)+", "+o.Util.formatNum(this.y)+")"}},o.point=function(t,e,n){return t instanceof o.Point?t:o.Util.isArray(t)?new o.Point(t[0],t[1]):t===i||null===t?t:new o.Point(t,e,n)},o.Bounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.Bounds.prototype={extend:function(t){return t=o.point(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new o.Point((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new o.Point(this.min.x,this.max.y)},getTopRight:function(){return new o.Point(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,i;return t="number"==typeof t[0]||t instanceof o.Point?o.point(t):o.bounds(t),t instanceof o.Bounds?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=o.bounds(t);var e=this.min,i=this.max,n=t.min,s=t.max,a=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return a&&r},isValid:function(){return!(!this.min||!this.max)}},o.bounds=function(t,e){return!t||t instanceof o.Bounds?t:new o.Bounds(t,e)},o.Transformation=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n},o.Transformation.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new o.Point((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}},o.DomUtil={get:function(t){return"string"==typeof t?e.getElementById(t):t},getStyle:function(t,i){var n=t.style[i];if(!n&&t.currentStyle&&(n=t.currentStyle[i]),(!n||"auto"===n)&&e.defaultView){var o=e.defaultView.getComputedStyle(t,null);n=o?o[i]:null}return"auto"===n?null:n},getViewportOffset:function(t){var i,n=0,s=0,a=t,r=e.body,h=e.documentElement;do{if(n+=a.offsetTop||0,s+=a.offsetLeft||0,n+=parseInt(o.DomUtil.getStyle(a,"borderTopWidth"),10)||0,s+=parseInt(o.DomUtil.getStyle(a,"borderLeftWidth"),10)||0,i=o.DomUtil.getStyle(a,"position"),a.offsetParent===r&&"absolute"===i)break;if("fixed"===i){n+=r.scrollTop||h.scrollTop||0,s+=r.scrollLeft||h.scrollLeft||0;break}if("relative"===i&&!a.offsetLeft){var l=o.DomUtil.getStyle(a,"width"),u=o.DomUtil.getStyle(a,"max-width"),c=a.getBoundingClientRect();("none"!==l||"none"!==u)&&(s+=c.left+a.clientLeft),n+=c.top+(r.scrollTop||h.scrollTop||0);break}a=a.offsetParent}while(a);a=t;do{if(a===r)break;n-=a.scrollTop||0,s-=a.scrollLeft||0,a=a.parentNode}while(a);return new o.Point(s,n)},documentIsLtr:function(){return o.DomUtil._docIsLtrCached||(o.DomUtil._docIsLtrCached=!0,o.DomUtil._docIsLtr="ltr"===o.DomUtil.getStyle(e.body,"direction")),o.DomUtil._docIsLtr},create:function(t,i,n){var o=e.createElement(t);return o.className=i,n&&n.appendChild(o),o},hasClass:function(t,e){if(t.classList!==i)return t.classList.contains(e);var n=o.DomUtil._getClass(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)},addClass:function(t,e){if(t.classList!==i)for(var n=o.Util.splitWords(e),s=0,a=n.length;a>s;s++)t.classList.add(n[s]);else if(!o.DomUtil.hasClass(t,e)){var r=o.DomUtil._getClass(t);o.DomUtil._setClass(t,(r?r+" ":"")+e)}},removeClass:function(t,e){t.classList!==i?t.classList.remove(e):o.DomUtil._setClass(t,o.Util.trim((" "+o.DomUtil._getClass(t)+" ").replace(" "+e+" "," ")))},_setClass:function(t,e){t.className.baseVal===i?t.className=e:t.className.baseVal=e},_getClass:function(t){return t.className.baseVal===i?t.className:t.className.baseVal},setOpacity:function(t,e){if("opacity"in t.style)t.style.opacity=e;else if("filter"in t.style){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(o){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}},testProp:function(t){for(var i=e.documentElement.style,n=0;n<t.length;n++)if(t[n]in i)return t[n];return!1},getTranslateString:function(t){var e=o.Browser.webkit3d,i="translate"+(e?"3d":"")+"(",n=(e?",0":"")+")";return i+t.x+"px,"+t.y+"px"+n},getScaleString:function(t,e){var i=o.DomUtil.getTranslateString(e.add(e.multiplyBy(-1*t))),n=" scale("+t+") ";return i+n},setPosition:function(t,e,i){t._leaflet_pos=e,!i&&o.Browser.any3d?t.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos}},o.DomUtil.TRANSFORM=o.DomUtil.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),o.DomUtil.TRANSITION=o.DomUtil.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),o.DomUtil.TRANSITION_END="webkitTransition"===o.DomUtil.TRANSITION||"OTransition"===o.DomUtil.TRANSITION?o.DomUtil.TRANSITION+"End":"transitionend",function(){if("onselectstart"in e)o.extend(o.DomUtil,{disableTextSelection:function(){o.DomEvent.on(t,"selectstart",o.DomEvent.preventDefault)},enableTextSelection:function(){o.DomEvent.off(t,"selectstart",o.DomEvent.preventDefault)}});else{var i=o.DomUtil.testProp(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);o.extend(o.DomUtil,{disableTextSelection:function(){if(i){var t=e.documentElement.style;this._userSelect=t[i],t[i]="none"}},enableTextSelection:function(){i&&(e.documentElement.style[i]=this._userSelect,delete this._userSelect)}})}o.extend(o.DomUtil,{disableImageDrag:function(){o.DomEvent.on(t,"dragstart",o.DomEvent.preventDefault)},enableImageDrag:function(){o.DomEvent.off(t,"dragstart",o.DomEvent.preventDefault)}})}(),o.LatLng=function(t,e,n){if(t=parseFloat(t),e=parseFloat(e),isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=t,this.lng=e,n!==i&&(this.alt=parseFloat(n))},o.extend(o.LatLng,{DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,MAX_MARGIN:1e-9}),o.LatLng.prototype={equals:function(t){if(!t)return!1;t=o.latLng(t);var e=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return e<=o.LatLng.MAX_MARGIN},toString:function(t){return"LatLng("+o.Util.formatNum(this.lat,t)+", "+o.Util.formatNum(this.lng,t)+")"},distanceTo:function(t){t=o.latLng(t);var e=6378137,i=o.LatLng.DEG_TO_RAD,n=(t.lat-this.lat)*i,s=(t.lng-this.lng)*i,a=this.lat*i,r=t.lat*i,h=Math.sin(n/2),l=Math.sin(s/2),u=h*h+l*l*Math.cos(a)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(u),Math.sqrt(1-u))},wrap:function(t,e){var i=this.lng;return t=t||-180,e=e||180,i=(i+e)%(e-t)+(t>i||i===e?e:t),new o.LatLng(this.lat,i)}},o.latLng=function(t,e){return t instanceof o.LatLng?t:o.Util.isArray(t)?"number"==typeof t[0]||"string"==typeof t[0]?new o.LatLng(t[0],t[1],t[2]):null:t===i||null===t?t:"object"==typeof t&&"lat"in t?new o.LatLng(t.lat,"lng"in t?t.lng:t.lon):e===i?null:new o.LatLng(t,e)},o.LatLngBounds=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,o=i.length;o>n;n++)this.extend(i[n])},o.LatLngBounds.prototype={extend:function(t){if(!t)return this;var e=o.latLng(t);return t=null!==e?e:o.latLngBounds(t),t instanceof o.LatLng?this._southWest||this._northEast?(this._southWest.lat=Math.min(t.lat,this._southWest.lat),this._southWest.lng=Math.min(t.lng,this._southWest.lng),this._northEast.lat=Math.max(t.lat,this._northEast.lat),this._northEast.lng=Math.max(t.lng,this._northEast.lng)):(this._southWest=new o.LatLng(t.lat,t.lng),this._northEast=new o.LatLng(t.lat,t.lng)):t instanceof o.LatLngBounds&&(this.extend(t._southWest),this.extend(t._northEast)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new o.LatLngBounds(new o.LatLng(e.lat-n,e.lng-s),new o.LatLng(i.lat+n,i.lng+s))},getCenter:function(){return new o.LatLng((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new o.LatLng(this.getNorth(),this.getWest())},getSouthEast:function(){return new o.LatLng(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof o.LatLng?o.latLng(t):o.latLngBounds(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof o.LatLngBounds?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=o.latLngBounds(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),a=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return a&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=o.latLngBounds(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},o.latLngBounds=function(t,e){return!t||t instanceof o.LatLngBounds?t:new o.LatLngBounds(t,e)},o.Projection={},o.Projection.SphericalMercator={MAX_LATITUDE:85.0511287798,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=t.lng*e,a=n*e;return a=Math.log(Math.tan(Math.PI/4+a/2)),new o.Point(s,a)},unproject:function(t){var e=o.LatLng.RAD_TO_DEG,i=t.x*e,n=(2*Math.atan(Math.exp(t.y))-Math.PI/2)*e;return new o.LatLng(n,i)}},o.Projection.LonLat={project:function(t){return new o.Point(t.lng,t.lat)},unproject:function(t){return new o.LatLng(t.y,t.x)}},o.CRS={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},scale:function(t){return 256*Math.pow(2,t)},getSize:function(t){var e=this.scale(t);return o.point(e,e)}},o.CRS.Simple=o.extend({},o.CRS,{projection:o.Projection.LonLat,transformation:new o.Transformation(1,0,-1,0),scale:function(t){return Math.pow(2,t)}}),o.CRS.EPSG3857=o.extend({},o.CRS,{code:"EPSG:3857",projection:o.Projection.SphericalMercator,transformation:new o.Transformation(.5/Math.PI,.5,-.5/Math.PI,.5),project:function(t){var e=this.projection.project(t),i=6378137;return e.multiplyBy(i)}}),o.CRS.EPSG900913=o.extend({},o.CRS.EPSG3857,{code:"EPSG:900913"}),o.CRS.EPSG4326=o.extend({},o.CRS,{code:"EPSG:4326",projection:o.Projection.LonLat,transformation:new o.Transformation(1/360,.5,-1/360,.5)}),o.Map=o.Class.extend({includes:o.Mixin.Events,options:{crs:o.CRS.EPSG3857,fadeAnimation:o.DomUtil.TRANSITION&&!o.Browser.android23,trackResize:!0,markerZoomAnimation:o.DomUtil.TRANSITION&&o.Browser.any3d},initialize:function(t,e){e=o.setOptions(this,e),this._initContainer(t),this._initLayout(),this._onResize=o.bind(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),e.center&&e.zoom!==i&&this.setView(o.latLng(e.center),e.zoom,{reset:!0}),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._tileLayersNum=0,this.callInitHooks(),this._addLayers(e.layers)},setView:function(t,e){return e=e===i?this.getZoom():e,this._resetView(o.latLng(t),this._limitZoom(e)),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=this._limitZoom(t),this)},zoomIn:function(t,e){return this.setZoom(this._zoom+(t||1),e)},zoomOut:function(t,e){return this.setZoom(this._zoom-(t||1),e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),a=t instanceof o.Point?t:this.latLngToContainerPoint(t),r=a.subtract(s).multiplyBy(1-1/n),h=this.containerPointToLatLng(s.add(r));return this.setView(h,e,{zoom:i})},fitBounds:function(t,e){e=e||{},t=t.getBounds?t.getBounds():o.latLngBounds(t);var i=o.point(e.paddingTopLeft||e.padding||[0,0]),n=o.point(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n)),a=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),h=this.project(t.getNorthEast(),s),l=this.unproject(r.add(h).divideBy(2).add(a),s);return s=e&&e.maxZoom?Math.min(e.maxZoom,s):s,this.setView(l,s,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t){return this.fire("movestart"),this._rawPanBy(o.point(t)),this.fire("move"),this.fire("moveend")},setMaxBounds:function(t){return t=o.latLngBounds(t),this.options.maxBounds=t,t?(this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds,this)):this.off("moveend",this._panInsideMaxBounds,this)},panInsideBounds:function(t,e){var i=this.getCenter(),n=this._limitCenter(i,this._zoom,t);return i.equals(n)?this:this.panTo(n,e)},addLayer:function(t){var e=o.stamp(t);return this._layers[e]?this:(this._layers[e]=t,!t.options||isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[e]=t,this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum++,this._tileLayersToLoad++,t.on("load",this._onTileLayerLoad,this)),this._loaded&&this._layerAdd(t),this)},removeLayer:function(t){var e=o.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&this.fire("layerremove",{layer:t}),this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels()),this.options.zoomAnimation&&o.TileLayer&&t instanceof o.TileLayer&&(this._tileLayersNum--,this._tileLayersToLoad--,t.off("load",this._onTileLayerLoad,this)),this):this},hasLayer:function(t){return t?o.stamp(t)in this._layers:!1},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},invalidateSize:function(t){if(!this._loaded)return this;t=o.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._initialCenter=null;var i=this.getSize(),n=e.divideBy(2).round(),s=i.divideBy(2).round(),a=n.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){this._loaded&&this.fire("unload"),this._initEvents("off");try{delete this._container._leaflet}catch(t){this._container._leaflet=i}return this._clearPanes(),this._clearControlPos&&this._clearControlPos(),this._clearHandlers(),this},getCenter:function(){return this._checkIfLoaded(),this._initialCenter&&!this._moved()?this._initialCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new o.LatLngBounds(e,i)},getMinZoom:function(){return this.options.minZoom===i?this._layersMinZoom===i?0:this._layersMinZoom:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===i?this._layersMaxZoom===i?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=o.latLngBounds(t);var n,s=this.getMinZoom()-(e?1:0),a=this.getMaxZoom(),r=this.getSize(),h=t.getNorthWest(),l=t.getSouthEast(),u=!0;i=o.point(i||[0,0]);do s++,n=this.project(l,s).subtract(this.project(h,s)).add(i),u=e?n.x<r.x||n.y<r.y:r.contains(n);while(u&&a>=s);return u&&e?null:e?s:s-1},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new o.Point(this._container.clientWidth,this._container.clientHeight),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(){var t=this._getTopLeftPoint();return new o.Bounds(t,t.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._initialTopLeftPoint},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t){var e=this.options.crs;return e.scale(t)/e.scale(this._zoom)},getScaleZoom:function(t){return this._zoom+Math.log(t)/Math.LN2},project:function(t,e){return e=e===i?this._zoom:e,this.options.crs.latLngToPoint(o.latLng(t),e)},unproject:function(t,e){return e=e===i?this._zoom:e,this.options.crs.pointToLatLng(o.point(t),e)},layerPointToLatLng:function(t){var e=o.point(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(o.latLng(t))._round();return e._subtract(this.getPixelOrigin())},containerPointToLayerPoint:function(t){return o.point(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return o.point(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(o.point(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(o.latLng(t)))},mouseEventToContainerPoint:function(t){return o.DomEvent.getMousePosition(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=o.DomUtil.get(t);if(!e)throw new Error("Map container not found.");if(e._leaflet)throw new Error("Map container is already initialized.");e._leaflet=!0},_initLayout:function(){var t=this._container;o.DomUtil.addClass(t,"leaflet-container"+(o.Browser.touch?" leaflet-touch":"")+(o.Browser.retina?" leaflet-retina":"")+(o.Browser.ielt9?" leaflet-oldie":"")+(this.options.fadeAnimation?" leaflet-fade-anim":""));var e=o.DomUtil.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=t.mapPane=this._createPane("leaflet-map-pane",this._container),this._tilePane=t.tilePane=this._createPane("leaflet-tile-pane",this._mapPane),t.objectsPane=this._createPane("leaflet-objects-pane",this._mapPane),t.shadowPane=this._createPane("leaflet-shadow-pane"),t.overlayPane=this._createPane("leaflet-overlay-pane"),t.markerPane=this._createPane("leaflet-marker-pane"),t.popupPane=this._createPane("leaflet-popup-pane");var e=" leaflet-zoom-hide";this.options.markerZoomAnimation||(o.DomUtil.addClass(t.markerPane,e),o.DomUtil.addClass(t.shadowPane,e),o.DomUtil.addClass(t.popupPane,e))},_createPane:function(t,e){return o.DomUtil.create("div",t,e||this._panes.objectsPane)},_clearPanes:function(){this._container.removeChild(this._mapPane)},_addLayers:function(t){t=t?o.Util.isArray(t)?t:[t]:[];for(var e=0,i=t.length;i>e;e++)this.addLayer(t[e])},_resetView:function(t,e,i,n){var s=this._zoom!==e;n||(this.fire("movestart"),s&&this.fire("zoomstart")),this._zoom=e,this._initialCenter=t,this._initialTopLeftPoint=this._getNewTopLeftPoint(t),i?this._initialTopLeftPoint._add(this._getMapPanePos()):o.DomUtil.setPosition(this._mapPane,new o.Point(0,0)),this._tileLayersToLoad=this._tileLayersNum;var a=!this._loaded;this._loaded=!0,this.fire("viewreset",{hard:!i}),a&&(this.fire("load"),this.eachLayer(this._layerAdd,this)),this.fire("move"),(s||n)&&this.fire("zoomend"),this.fire("moveend",{hard:!i})},_rawPanBy:function(t){o.DomUtil.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_updateZoomLevels:function(){var t,e=1/0,n=-1/0,o=this._getZoomSpan();for(t in this._zoomBoundLayers){var s=this._zoomBoundLayers[t];isNaN(s.options.minZoom)||(e=Math.min(e,s.options.minZoom)),isNaN(s.options.maxZoom)||(n=Math.max(n,s.options.maxZoom))}t===i?this._layersMaxZoom=this._layersMinZoom=i:(this._layersMaxZoom=n,this._layersMinZoom=e),o!==this._getZoomSpan()&&this.fire("zoomlevelschange")},_panInsideMaxBounds:function(){this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(e){if(o.DomEvent){e=e||"on",o.DomEvent[e](this._container,"click",this._onMouseClick,this);var i,n,s=["dblclick","mousedown","mouseup","mouseenter","mouseleave","mousemove","contextmenu"];for(i=0,n=s.length;n>i;i++)o.DomEvent[e](this._container,s[i],this._fireMouseEvent,this);this.options.trackResize&&o.DomEvent[e](t,"resize",this._onResize,this)}},_onResize:function(){o.Util.cancelAnimFrame(this._resizeRequest),this._resizeRequest=o.Util.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this,!1,this._container)},_onMouseClick:function(t){!this._loaded||!t._simulated&&(this.dragging&&this.dragging.moved()||this.boxZoom&&this.boxZoom.moved())||o.DomEvent._skipped(t)||(this.fire("preclick"),this._fireMouseEvent(t))},_fireMouseEvent:function(t){if(this._loaded&&!o.DomEvent._skipped(t)){var e=t.type;if(e="mouseenter"===e?"mouseover":"mouseleave"===e?"mouseout":e,this.hasEventListeners(e)){"contextmenu"===e&&o.DomEvent.preventDefault(t);var i=this.mouseEventToContainerPoint(t),n=this.containerPointToLayerPoint(i),s=this.layerPointToLatLng(n);this.fire(e,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t})}}},_onTileLayerLoad:function(){this._tileLayersToLoad--,this._tileLayersNum&&!this._tileLayersToLoad&&this.fire("tilelayersload")},_clearHandlers:function(){for(var t=0,e=this._handlers.length;e>t;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,this):this.on("load",t,e),this},_layerAdd:function(t){t.onAdd(this),this.fire("layeradd",{layer:t})},_getMapPanePos:function(){return o.DomUtil.getPosition(this._mapPane)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(){return this.getPixelOrigin().subtract(this._getMapPanePos())},_getNewTopLeftPoint:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewTopLeftPoint(i,e).add(this._getMapPanePos());return this.project(t,e)._subtract(n)},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),a=new o.Bounds(n.subtract(s),n.add(s)),r=this._getBoundsOffset(a,i,e);return this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o.Bounds(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=this.project(e.getNorthWest(),i).subtract(t.min),s=this.project(e.getSouthEast(),i).subtract(t.max),a=this._rebound(n.x,-s.x),r=this._rebound(n.y,-s.y);return new o.Point(a,r)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom();return Math.max(e,Math.min(i,t))}}),o.map=function(t,e){return new o.Map(t,e)},o.Projection.Mercator={MAX_LATITUDE:85.0840591556,R_MINOR:6356752.314245179,R_MAJOR:6378137,project:function(t){var e=o.LatLng.DEG_TO_RAD,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=this.R_MAJOR,a=this.R_MINOR,r=t.lng*e*s,h=n*e,l=a/s,u=Math.sqrt(1-l*l),c=u*Math.sin(h);c=Math.pow((1-c)/(1+c),.5*u);var d=Math.tan(.5*(.5*Math.PI-h))/c;return h=-s*Math.log(d),new o.Point(r,h)},unproject:function(t){for(var e,i=o.LatLng.RAD_TO_DEG,n=this.R_MAJOR,s=this.R_MINOR,a=t.x*i/n,r=s/n,h=Math.sqrt(1-r*r),l=Math.exp(-t.y/n),u=Math.PI/2-2*Math.atan(l),c=15,d=1e-7,p=c,_=.1;Math.abs(_)>d&&--p>0;)e=h*Math.sin(u),_=Math.PI/2-2*Math.atan(l*Math.pow((1-e)/(1+e),.5*h))-u,u+=_; +return new o.LatLng(u*i,a)}},o.CRS.EPSG3395=o.extend({},o.CRS,{code:"EPSG:3395",projection:o.Projection.Mercator,transformation:function(){var t=o.Projection.Mercator,e=t.R_MAJOR,i=.5/(Math.PI*e);return new o.Transformation(i,.5,-i,.5)}()}),o.TileLayer=o.Class.extend({includes:o.Mixin.Events,options:{minZoom:0,maxZoom:18,tileSize:256,subdomains:"abc",errorTileUrl:"",attribution:"",zoomOffset:0,opacity:1,unloadInvisibleTiles:o.Browser.mobile,updateWhenIdle:o.Browser.mobile},initialize:function(t,e){e=o.setOptions(this,e),e.detectRetina&&o.Browser.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomOffset++,e.minZoom>0&&e.minZoom--,this.options.maxZoom--),e.bounds&&(e.bounds=o.latLngBounds(e.bounds)),this._url=t;var i=this.options.subdomains;"string"==typeof i&&(this.options.subdomains=i.split(""))},onAdd:function(t){this._map=t,this._animated=t._zoomAnimated,this._initContainer(),t.on({viewreset:this._reset,moveend:this._update},this),this._animated&&t.on({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||(this._limitedUpdate=o.Util.limitExecByInterval(this._update,150,this),t.on("move",this._limitedUpdate,this)),this._reset(),this._update()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this._container.parentNode.removeChild(this._container),t.off({viewreset:this._reset,moveend:this._update},this),this._animated&&t.off({zoomanim:this._animateZoom,zoomend:this._endZoomAnim},this),this.options.updateWhenIdle||t.off("move",this._limitedUpdate,this),this._container=null,this._map=null},bringToFront:function(){var t=this._map._panes.tilePane;return this._container&&(t.appendChild(this._container),this._setAutoZIndex(t,Math.max)),this},bringToBack:function(){var t=this._map._panes.tilePane;return this._container&&(t.insertBefore(this._container,t.firstChild),this._setAutoZIndex(t,Math.min)),this},getAttribution:function(){return this.options.attribution},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},redraw:function(){return this._map&&(this._reset({hard:!0}),this._update()),this},_updateZIndex:function(){this._container&&this.options.zIndex!==i&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t,e){var i,n,o,s=t.children,a=-e(1/0,-1/0);for(n=0,o=s.length;o>n;n++)s[n]!==this._container&&(i=parseInt(s[n].style.zIndex,10),isNaN(i)||(a=e(a,i)));this.options.zIndex=this._container.style.zIndex=(isFinite(a)?a:0)+e(1,-1)},_updateOpacity:function(){var t,e=this._tiles;if(o.Browser.ielt9)for(t in e)o.DomUtil.setOpacity(e[t],this.options.opacity);else o.DomUtil.setOpacity(this._container,this.options.opacity)},_initContainer:function(){var t=this._map._panes.tilePane;if(!this._container){if(this._container=o.DomUtil.create("div","leaflet-layer"),this._updateZIndex(),this._animated){var e="leaflet-tile-container";this._bgBuffer=o.DomUtil.create("div",e,this._container),this._tileContainer=o.DomUtil.create("div",e,this._container)}else this._tileContainer=this._container;t.appendChild(this._container),this.options.opacity<1&&this._updateOpacity()}},_reset:function(t){for(var e in this._tiles)this.fire("tileunload",{tile:this._tiles[e]});this._tiles={},this._tilesToLoad=0,this.options.reuseTiles&&(this._unusedTiles=[]),this._tileContainer.innerHTML="",this._animated&&t&&t.hard&&this._clearBgBuffer(),this._initContainer()},_getTileSize:function(){var t=this._map,e=t.getZoom()+this.options.zoomOffset,i=this.options.maxNativeZoom,n=this.options.tileSize;return i&&e>i&&(n=Math.round(t.getZoomScale(e)/t.getZoomScale(i)*n)),n},_update:function(){if(this._map){var t=this._map,e=t.getPixelBounds(),i=t.getZoom(),n=this._getTileSize();if(!(i>this.options.maxZoom||i<this.options.minZoom)){var s=o.bounds(e.min.divideBy(n)._floor(),e.max.divideBy(n)._floor());this._addTilesFromCenterOut(s),(this.options.unloadInvisibleTiles||this.options.reuseTiles)&&this._removeOtherTiles(s)}}},_addTilesFromCenterOut:function(t){var i,n,s,a=[],r=t.getCenter();for(i=t.min.y;i<=t.max.y;i++)for(n=t.min.x;n<=t.max.x;n++)s=new o.Point(n,i),this._tileShouldBeLoaded(s)&&a.push(s);var h=a.length;if(0!==h){a.sort(function(t,e){return t.distanceTo(r)-e.distanceTo(r)});var l=e.createDocumentFragment();for(this._tilesToLoad||this.fire("loading"),this._tilesToLoad+=h,n=0;h>n;n++)this._addTile(a[n],l);this._tileContainer.appendChild(l)}},_tileShouldBeLoaded:function(t){if(t.x+":"+t.y in this._tiles)return!1;var e=this.options;if(!e.continuousWorld){var i=this._getWrapTileNum();if(e.noWrap&&(t.x<0||t.x>=i.x)||t.y<0||t.y>=i.y)return!1}if(e.bounds){var n=e.tileSize,o=t.multiplyBy(n),s=o.add([n,n]),a=this._map.unproject(o),r=this._map.unproject(s);if(e.continuousWorld||e.noWrap||(a=a.wrap(),r=r.wrap()),!e.bounds.intersects([a,r]))return!1}return!0},_removeOtherTiles:function(t){var e,i,n,o;for(o in this._tiles)e=o.split(":"),i=parseInt(e[0],10),n=parseInt(e[1],10),(i<t.min.x||i>t.max.x||n<t.min.y||n>t.max.y)&&this._removeTile(o)},_removeTile:function(t){var e=this._tiles[t];this.fire("tileunload",{tile:e,url:e.src}),this.options.reuseTiles?(o.DomUtil.removeClass(e,"leaflet-tile-loaded"),this._unusedTiles.push(e)):e.parentNode===this._tileContainer&&this._tileContainer.removeChild(e),o.Browser.android||(e.onload=null,e.src=o.Util.emptyImageUrl),delete this._tiles[t]},_addTile:function(t,e){var i=this._getTilePos(t),n=this._getTile();o.DomUtil.setPosition(n,i,o.Browser.chrome),this._tiles[t.x+":"+t.y]=n,this._loadTile(n,t),n.parentNode!==this._tileContainer&&e.appendChild(n)},_getZoomForUrl:function(){var t=this.options,e=this._map.getZoom();return t.zoomReverse&&(e=t.maxZoom-e),e+=t.zoomOffset,t.maxNativeZoom?Math.min(e,t.maxNativeZoom):e},_getTilePos:function(t){var e=this._map.getPixelOrigin(),i=this._getTileSize();return t.multiplyBy(i).subtract(e)},getTileUrl:function(t){return o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},_getWrapTileNum:function(){var t=this._map.options.crs,e=t.getSize(this._map.getZoom());return e.divideBy(this._getTileSize())._floor()},_adjustTilePoint:function(t){var e=this._getWrapTileNum();this.options.continuousWorld||this.options.noWrap||(t.x=(t.x%e.x+e.x)%e.x),this.options.tms&&(t.y=e.y-t.y-1),t.z=this._getZoomForUrl()},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_getTile:function(){if(this.options.reuseTiles&&this._unusedTiles.length>0){var t=this._unusedTiles.pop();return this._resetTile(t),t}return this._createTile()},_resetTile:function(){},_createTile:function(){var t=o.DomUtil.create("img","leaflet-tile");return t.style.width=t.style.height=this._getTileSize()+"px",t.galleryimg="no",t.onselectstart=t.onmousemove=o.Util.falseFn,o.Browser.ielt9&&this.options.opacity!==i&&o.DomUtil.setOpacity(t,this.options.opacity),o.Browser.mobileWebkit3d&&(t.style.WebkitBackfaceVisibility="hidden"),t},_loadTile:function(t,e){t._layer=this,t.onload=this._tileOnLoad,t.onerror=this._tileOnError,this._adjustTilePoint(e),t.src=this.getTileUrl(e),this.fire("tileloadstart",{tile:t,url:t.src})},_tileLoaded:function(){this._tilesToLoad--,this._animated&&o.DomUtil.addClass(this._tileContainer,"leaflet-zoom-animated"),this._tilesToLoad||(this.fire("load"),this._animated&&(clearTimeout(this._clearBgBufferTimer),this._clearBgBufferTimer=setTimeout(o.bind(this._clearBgBuffer,this),500)))},_tileOnLoad:function(){var t=this._layer;this.src!==o.Util.emptyImageUrl&&(o.DomUtil.addClass(this,"leaflet-tile-loaded"),t.fire("tileload",{tile:this,url:this.src})),t._tileLoaded()},_tileOnError:function(){var t=this._layer;t.fire("tileerror",{tile:this,url:this.src});var e=t.options.errorTileUrl;e&&(this.src=e),t._tileLoaded()}}),o.tileLayer=function(t,e){return new o.TileLayer(t,e)},o.TileLayer.WMS=o.TileLayer.extend({defaultWmsParams:{service:"WMS",request:"GetMap",version:"1.1.1",layers:"",styles:"",format:"image/jpeg",transparent:!1},initialize:function(t,e){this._url=t;var i=o.extend({},this.defaultWmsParams),n=e.tileSize||this.options.tileSize;i.width=i.height=e.detectRetina&&o.Browser.retina?2*n:n;for(var s in e)this.options.hasOwnProperty(s)||"crs"===s||(i[s]=e[s]);this.wmsParams=i,o.setOptions(this,e)},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,o.TileLayer.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._map,i=this.options.tileSize,n=t.multiplyBy(i),s=n.add([i,i]),a=this._crs.project(e.unproject(n,t.z)),r=this._crs.project(e.unproject(s,t.z)),h=this._wmsVersion>=1.3&&this._crs===o.CRS.EPSG4326?[r.y,a.x,a.y,r.x].join(","):[a.x,r.y,r.x,a.y].join(","),l=o.Util.template(this._url,{s:this._getSubdomain(t)});return l+o.Util.getParamString(this.wmsParams,l,!0)+"&BBOX="+h},setParams:function(t,e){return o.extend(this.wmsParams,t),e||this.redraw(),this}}),o.tileLayer.wms=function(t,e){return new o.TileLayer.WMS(t,e)},o.TileLayer.Canvas=o.TileLayer.extend({options:{async:!1},initialize:function(t){o.setOptions(this,t)},redraw:function(){this._map&&(this._reset({hard:!0}),this._update());for(var t in this._tiles)this._redrawTile(this._tiles[t]);return this},_redrawTile:function(t){this.drawTile(t,t._tilePoint,this._map._zoom)},_createTile:function(){var t=o.DomUtil.create("canvas","leaflet-tile");return t.width=t.height=this.options.tileSize,t.onselectstart=t.onmousemove=o.Util.falseFn,t},_loadTile:function(t,e){t._layer=this,t._tilePoint=e,this._redrawTile(t),this.options.async||this.tileDrawn(t)},drawTile:function(){},tileDrawn:function(t){this._tileOnLoad.call(t)}}),o.tileLayer.canvas=function(t){return new o.TileLayer.Canvas(t)},o.ImageOverlay=o.Class.extend({includes:o.Mixin.Events,options:{opacity:1},initialize:function(t,e,i){this._url=t,this._bounds=o.latLngBounds(e),o.setOptions(this,i)},onAdd:function(t){this._map=t,this._image||this._initImage(),t._panes.overlayPane.appendChild(this._image),t.on("viewreset",this._reset,this),t.options.zoomAnimation&&o.Browser.any3d&&t.on("zoomanim",this._animateZoom,this),this._reset()},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._image),t.off("viewreset",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},bringToFront:function(){return this._image&&this._map._panes.overlayPane.appendChild(this._image),this},bringToBack:function(){var t=this._map._panes.overlayPane;return this._image&&t.insertBefore(this._image,t.firstChild),this},setUrl:function(t){this._url=t,this._image.src=this._url},getAttribution:function(){return this.options.attribution},_initImage:function(){this._image=o.DomUtil.create("img","leaflet-image-layer"),this._map.options.zoomAnimation&&o.Browser.any3d?o.DomUtil.addClass(this._image,"leaflet-zoom-animated"):o.DomUtil.addClass(this._image,"leaflet-zoom-hide"),this._updateOpacity(),o.extend(this._image,{galleryimg:"no",onselectstart:o.Util.falseFn,onmousemove:o.Util.falseFn,onload:o.bind(this._onImageLoad,this),src:this._url})},_animateZoom:function(t){var e=this._map,i=this._image,n=e.getZoomScale(t.zoom),s=this._bounds.getNorthWest(),a=this._bounds.getSouthEast(),r=e._latLngToNewLayerPoint(s,t.zoom,t.center),h=e._latLngToNewLayerPoint(a,t.zoom,t.center)._subtract(r),l=r._add(h._multiplyBy(.5*(1-1/n)));i.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(l)+" scale("+n+") "},_reset:function(){var t=this._image,e=this._map.latLngToLayerPoint(this._bounds.getNorthWest()),i=this._map.latLngToLayerPoint(this._bounds.getSouthEast())._subtract(e);o.DomUtil.setPosition(t,e),t.style.width=i.x+"px",t.style.height=i.y+"px"},_onImageLoad:function(){this.fire("load")},_updateOpacity:function(){o.DomUtil.setOpacity(this._image,this.options.opacity)}}),o.imageOverlay=function(t,e,i){return new o.ImageOverlay(t,e,i)},o.Icon=o.Class.extend({options:{className:""},initialize:function(t){o.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n;return n=e&&"IMG"===e.tagName?this._createImg(i,e):this._createImg(i),this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i,n=this.options,s=o.point(n[e+"Size"]);i=o.point("shadow"===e?n.shadowAnchor||n.iconAnchor:n.iconAnchor),!i&&s&&(i=s.divideBy(2,!0)),t.className="leaflet-marker-"+e+" "+n.className,i&&(t.style.marginLeft=-i.x+"px",t.style.marginTop=-i.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,i){return i=i||e.createElement("img"),i.src=t,i},_getIconUrl:function(t){return o.Browser.retina&&this.options[t+"RetinaUrl"]?this.options[t+"RetinaUrl"]:this.options[t+"Url"]}}),o.icon=function(t){return new o.Icon(t)},o.Icon.Default=o.Icon.extend({options:{iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],shadowSize:[41,41]},_getIconUrl:function(t){var e=t+"Url";if(this.options[e])return this.options[e];o.Browser.retina&&"icon"===t&&(t+="-2x");var i=o.Icon.Default.imagePath;if(!i)throw new Error("Couldn't autodetect L.Icon.Default.imagePath, set it manually.");return i+"/marker-"+t+".png"}}),o.Icon.Default.imagePath=function(){var t,i,n,o,s,a=e.getElementsByTagName("script"),r=/[\/^]leaflet[\-\._]?([\w\-\._]*)\.js\??/;for(t=0,i=a.length;i>t;t++)if(n=a[t].src,o=n.match(r))return s=n.split(r)[0],(s?s+"/":"")+"images"}(),o.Marker=o.Class.extend({includes:o.Mixin.Events,options:{icon:new o.Icon.Default,title:"",alt:"",clickable:!0,draggable:!1,keyboard:!0,zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250},initialize:function(t,e){o.setOptions(this,e),this._latlng=o.latLng(t)},onAdd:function(t){this._map=t,t.on("viewreset",this.update,this),this._initIcon(),this.update(),this.fire("add"),t.options.zoomAnimation&&t.options.markerZoomAnimation&&t.on("zoomanim",this._animateZoom,this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){this.dragging&&this.dragging.disable(),this._removeIcon(),this._removeShadow(),this.fire("remove"),t.off({viewreset:this.update,zoomanim:this._animateZoom},this),this._map=null},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this.update(),this.fire("move",{latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update(),this},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup),this},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e=this._map,i=e.options.zoomAnimation&&e.options.markerZoomAnimation,n=i?"leaflet-zoom-animated":"leaflet-zoom-hide",s=t.icon.createIcon(this._icon),a=!1;s!==this._icon&&(this._icon&&this._removeIcon(),a=!0,t.title&&(s.title=t.title),t.alt&&(s.alt=t.alt)),o.DomUtil.addClass(s,n),t.keyboard&&(s.tabIndex="0"),this._icon=s,this._initInteraction(),t.riseOnHover&&o.DomEvent.on(s,"mouseover",this._bringToFront,this).on(s,"mouseout",this._resetZIndex,this);var r=t.icon.createShadow(this._shadow),h=!1;r!==this._shadow&&(this._removeShadow(),h=!0),r&&o.DomUtil.addClass(r,n),this._shadow=r,t.opacity<1&&this._updateOpacity();var l=this._map._panes;a&&l.markerPane.appendChild(this._icon),r&&h&&l.shadowPane.appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&o.DomEvent.off(this._icon,"mouseover",this._bringToFront).off(this._icon,"mouseout",this._resetZIndex),this._map._panes.markerPane.removeChild(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&this._map._panes.shadowPane.removeChild(this._shadow),this._shadow=null},_setPos:function(t){o.DomUtil.setPosition(this._icon,t),this._shadow&&o.DomUtil.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.clickable){var t=this._icon,e=["dblclick","mousedown","mouseover","mouseout","contextmenu"];o.DomUtil.addClass(t,"leaflet-clickable"),o.DomEvent.on(t,"click",this._onMouseClick,this),o.DomEvent.on(t,"keypress",this._onKeyPress,this);for(var i=0;i<e.length;i++)o.DomEvent.on(t,e[i],this._fireMouseEvent,this);o.Handler.MarkerDrag&&(this.dragging=new o.Handler.MarkerDrag(this),this.options.draggable&&this.dragging.enable())}},_onMouseClick:function(t){var e=this.dragging&&this.dragging.moved();(this.hasEventListeners(t.type)||e)&&o.DomEvent.stopPropagation(t),e||(this.dragging&&this.dragging._enabled||!this._map.dragging||!this._map.dragging.moved())&&this.fire(t.type,{originalEvent:t,latlng:this._latlng})},_onKeyPress:function(t){13===t.keyCode&&this.fire("click",{originalEvent:t,latlng:this._latlng})},_fireMouseEvent:function(t){this.fire(t.type,{originalEvent:t,latlng:this._latlng}),"contextmenu"===t.type&&this.hasEventListeners(t.type)&&o.DomEvent.preventDefault(t),"mousedown"!==t.type?o.DomEvent.stopPropagation(t):o.DomEvent.preventDefault(t)},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){o.DomUtil.setOpacity(this._icon,this.options.opacity),this._shadow&&o.DomUtil.setOpacity(this._shadow,this.options.opacity)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)}}),o.marker=function(t,e){return new o.Marker(t,e)},o.DivIcon=o.Icon.extend({options:{iconSize:[12,12],className:"leaflet-div-icon",html:!1},createIcon:function(t){var i=t&&"DIV"===t.tagName?t:e.createElement("div"),n=this.options;return i.innerHTML=n.html!==!1?n.html:"",n.bgPos&&(i.style.backgroundPosition=-n.bgPos.x+"px "+-n.bgPos.y+"px"),this._setIconStyles(i,"icon"),i},createShadow:function(){return null}}),o.divIcon=function(t){return new o.DivIcon(t)},o.Map.mergeOptions({closePopupOnClick:!0}),o.Popup=o.Class.extend({includes:o.Mixin.Events,options:{minWidth:50,maxWidth:300,autoPan:!0,closeButton:!0,offset:[0,7],autoPanPadding:[5,5],keepInView:!1,className:"",zoomAnimation:!0},initialize:function(t,e){o.setOptions(this,t),this._source=e,this._animated=o.Browser.any3d&&this.options.zoomAnimation,this._isOpen=!1},onAdd:function(t){this._map=t,this._container||this._initLayout();var e=t.options.fadeAnimation;e&&o.DomUtil.setOpacity(this._container,0),t._panes.popupPane.appendChild(this._container),t.on(this._getEvents(),this),this.update(),e&&o.DomUtil.setOpacity(this._container,1),this.fire("open"),t.fire("popupopen",{popup:this}),this._source&&this._source.fire("popupopen",{popup:this})},addTo:function(t){return t.addLayer(this),this},openOn:function(t){return t.openPopup(this),this},onRemove:function(t){t._panes.popupPane.removeChild(this._container),o.Util.falseFn(this._container.offsetWidth),t.off(this._getEvents(),this),t.options.fadeAnimation&&o.DomUtil.setOpacity(this._container,0),this._map=null,this.fire("close"),t.fire("popupclose",{popup:this}),this._source&&this._source.fire("popupclose",{popup:this})},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=o.latLng(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},_getEvents:function(){var t={viewreset:this._updatePosition};return this._animated&&(t.zoomanim=this._zoomAnimation),("closeOnClick"in this.options?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this._close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_close:function(){this._map&&this._map.closePopup(this)},_initLayout:function(){var t,e="leaflet-popup",i=e+" "+this.options.className+" leaflet-zoom-"+(this._animated?"animated":"hide"),n=this._container=o.DomUtil.create("div",i);this.options.closeButton&&(t=this._closeButton=o.DomUtil.create("a",e+"-close-button",n),t.href="#close",t.innerHTML="×",o.DomEvent.disableClickPropagation(t),o.DomEvent.on(t,"click",this._onCloseButtonClick,this));var s=this._wrapper=o.DomUtil.create("div",e+"-content-wrapper",n);o.DomEvent.disableClickPropagation(s),this._contentNode=o.DomUtil.create("div",e+"-content",s),o.DomEvent.disableScrollPropagation(this._contentNode),o.DomEvent.on(s,"contextmenu",o.DomEvent.stopPropagation),this._tipContainer=o.DomUtil.create("div",e+"-tip-container",n),this._tip=o.DomUtil.create("div",e+"-tip",this._tipContainer)},_updateContent:function(){if(this._content){if("string"==typeof this._content)this._contentNode.innerHTML=this._content;else{for(;this._contentNode.hasChildNodes();)this._contentNode.removeChild(this._contentNode.firstChild);this._contentNode.appendChild(this._content)}this.fire("contentupdate")}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,a="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",o.DomUtil.addClass(t,a)):o.DomUtil.removeClass(t,a),this._containerWidth=this._container.offsetWidth},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=this._animated,i=o.point(this.options.offset);e&&o.DomUtil.setPosition(this._container,t),this._containerBottom=-i.y-(e?0:t.y),this._containerLeft=-Math.round(this._containerWidth/2)+i.x+(e?0:t.x),this._container.style.bottom=this._containerBottom+"px",this._container.style.left=this._containerLeft+"px"}},_zoomAnimation:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);o.DomUtil.setPosition(this._container,e)},_adjustPan:function(){if(this.options.autoPan){var t=this._map,e=this._container.offsetHeight,i=this._containerWidth,n=new o.Point(this._containerLeft,-e-this._containerBottom);this._animated&&n._add(o.DomUtil.getPosition(this._container));var s=t.layerPointToContainerPoint(n),a=o.point(this.options.autoPanPadding),r=o.point(this.options.autoPanPaddingTopLeft||a),h=o.point(this.options.autoPanPaddingBottomRight||a),l=t.getSize(),u=0,c=0;s.x+i+h.x>l.x&&(u=s.x+i-l.x+h.x),s.x-u-r.x<0&&(u=s.x-r.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-r.y<0&&(c=s.y-r.y),(u||c)&&t.fire("autopanstart").panBy([u,c])}},_onCloseButtonClick:function(t){this._close(),o.DomEvent.stop(t)}}),o.popup=function(t,e){return new o.Popup(t,e)},o.Map.include({openPopup:function(t,e,i){if(this.closePopup(),!(t instanceof o.Popup)){var n=t;t=new o.Popup(i).setLatLng(e).setContent(n)}return t._isOpen=!0,this._popup=t,this.addLayer(t)},closePopup:function(t){return t&&t!==this._popup||(t=this._popup,this._popup=null),t&&(this.removeLayer(t),t._isOpen=!1),this}}),o.Marker.include({openPopup:function(){return this._popup&&this._map&&!this._map.hasLayer(this._popup)&&(this._popup.setLatLng(this._latlng),this._map.openPopup(this._popup)),this},closePopup:function(){return this._popup&&this._popup._close(),this},togglePopup:function(){return this._popup&&(this._popup._isOpen?this.closePopup():this.openPopup()),this},bindPopup:function(t,e){var i=o.point(this.options.icon.options.popupAnchor||[0,0]);return i=i.add(o.Popup.prototype.options.offset),e&&e.offset&&(i=i.add(e.offset)),e=o.extend({offset:i},e),this._popupHandlersAdded||(this.on("click",this.togglePopup,this).on("remove",this.closePopup,this).on("move",this._movePopup,this),this._popupHandlersAdded=!0),t instanceof o.Popup?(o.setOptions(t,e),this._popup=t):this._popup=new o.Popup(e,this).setContent(t),this},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this.togglePopup,this).off("remove",this.closePopup,this).off("move",this._movePopup,this),this._popupHandlersAdded=!1),this},getPopup:function(){return this._popup},_movePopup:function(t){this._popup.setLatLng(t.latlng)}}),o.LayerGroup=o.Class.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return t?t in this._layers||this.getLayerId(t)in this._layers:!1},clearLayers:function(){return this.eachLayer(this.removeLayer,this),this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){this._map=t,this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t),this._map=null},addTo:function(t){return t.addLayer(this),this},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return o.stamp(t)}}),o.layerGroup=function(t){return new o.LayerGroup(t)},o.FeatureGroup=o.LayerGroup.extend({includes:o.Mixin.Events,statics:{EVENTS:"click dblclick mouseover mouseout mousemove contextmenu popupopen popupclose"},addLayer:function(t){return this.hasLayer(t)?this:("on"in t&&t.on(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.addLayer.call(this,t),this._popupContent&&t.bindPopup&&t.bindPopup(this._popupContent,this._popupOptions),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.off(o.FeatureGroup.EVENTS,this._propagateEvent,this),o.LayerGroup.prototype.removeLayer.call(this,t),this._popupContent&&this.invoke("unbindPopup"),this.fire("layerremove",{layer:t})):this},bindPopup:function(t,e){return this._popupContent=t,this._popupOptions=e,this.invoke("bindPopup",t,e)},openPopup:function(t){for(var e in this._layers){this._layers[e].openPopup(t);break}return this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new o.LatLngBounds;return this.eachLayer(function(e){t.extend(e instanceof o.Marker?e.getLatLng():e.getBounds())}),t},_propagateEvent:function(t){t=o.extend({layer:t.target,target:this},t),this.fire(t.type,t)}}),o.featureGroup=function(t){return new o.FeatureGroup(t)},o.Path=o.Class.extend({includes:[o.Mixin.Events],statics:{CLIP_PADDING:function(){var e=o.Browser.mobile?1280:2e3,i=(e/Math.max(t.outerWidth,t.outerHeight)-1)/2;return Math.max(0,Math.min(.5,i))}()},options:{stroke:!0,color:"#0033ff",dashArray:null,lineCap:null,lineJoin:null,weight:5,opacity:.5,fill:!1,fillColor:null,fillOpacity:.2,clickable:!0},initialize:function(t){o.setOptions(this,t)},onAdd:function(t){this._map=t,this._container||(this._initElements(),this._initEvents()),this.projectLatlngs(),this._updatePath(),this._container&&this._map._pathRoot.appendChild(this._container),this.fire("add"),t.on({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t._pathRoot.removeChild(this._container),this.fire("remove"),this._map=null,o.Browser.vml&&(this._container=null,this._stroke=null,this._fill=null),t.off({viewreset:this.projectLatlngs,moveend:this._updatePath},this)},projectLatlngs:function(){},setStyle:function(t){return o.setOptions(this,t),this._container&&this._updateStyle(),this},redraw:function(){return this._map&&(this.projectLatlngs(),this._updatePath()),this}}),o.Map.include({_updatePathViewport:function(){var t=o.Path.CLIP_PADDING,e=this.getSize(),i=o.DomUtil.getPosition(this._mapPane),n=i.multiplyBy(-1)._subtract(e.multiplyBy(t)._round()),s=n.add(e.multiplyBy(1+2*t)._round());this._pathViewport=new o.Bounds(n,s)}}),o.Path.SVG_NS="http://www.w3.org/2000/svg",o.Browser.svg=!(!e.createElementNS||!e.createElementNS(o.Path.SVG_NS,"svg").createSVGRect),o.Path=o.Path.extend({statics:{SVG:o.Browser.svg},bringToFront:function(){var t=this._map._pathRoot,e=this._container;return e&&t.lastChild!==e&&t.appendChild(e),this},bringToBack:function(){var t=this._map._pathRoot,e=this._container,i=t.firstChild;return e&&i!==e&&t.insertBefore(e,i),this},getPathString:function(){},_createElement:function(t){return e.createElementNS(o.Path.SVG_NS,t)},_initElements:function(){this._map._initPathRoot(),this._initPath(),this._initStyle()},_initPath:function(){this._container=this._createElement("g"),this._path=this._createElement("path"),this.options.className&&o.DomUtil.addClass(this._path,this.options.className),this._container.appendChild(this._path)},_initStyle:function(){this.options.stroke&&(this._path.setAttribute("stroke-linejoin","round"),this._path.setAttribute("stroke-linecap","round")),this.options.fill&&this._path.setAttribute("fill-rule","evenodd"),this.options.pointerEvents&&this._path.setAttribute("pointer-events",this.options.pointerEvents),this.options.clickable||this.options.pointerEvents||this._path.setAttribute("pointer-events","none"),this._updateStyle()},_updateStyle:function(){this.options.stroke?(this._path.setAttribute("stroke",this.options.color),this._path.setAttribute("stroke-opacity",this.options.opacity),this._path.setAttribute("stroke-width",this.options.weight),this.options.dashArray?this._path.setAttribute("stroke-dasharray",this.options.dashArray):this._path.removeAttribute("stroke-dasharray"),this.options.lineCap&&this._path.setAttribute("stroke-linecap",this.options.lineCap),this.options.lineJoin&&this._path.setAttribute("stroke-linejoin",this.options.lineJoin)):this._path.setAttribute("stroke","none"),this.options.fill?(this._path.setAttribute("fill",this.options.fillColor||this.options.color),this._path.setAttribute("fill-opacity",this.options.fillOpacity)):this._path.setAttribute("fill","none")},_updatePath:function(){var t=this.getPathString();t||(t="M0 0"),this._path.setAttribute("d",t)},_initEvents:function(){if(this.options.clickable){(o.Browser.svg||!o.Browser.vml)&&o.DomUtil.addClass(this._path,"leaflet-clickable"),o.DomEvent.on(this._container,"click",this._onMouseClick,this);for(var t=["dblclick","mousedown","mouseover","mouseout","mousemove","contextmenu"],e=0;e<t.length;e++)o.DomEvent.on(this._container,t[e],this._fireMouseEvent,this)}},_onMouseClick:function(t){this._map.dragging&&this._map.dragging.moved()||this._fireMouseEvent(t)},_fireMouseEvent:function(t){if(this.hasEventListeners(t.type)){var e=this._map,i=e.mouseEventToContainerPoint(t),n=e.containerPointToLayerPoint(i),s=e.layerPointToLatLng(n);this.fire(t.type,{latlng:s,layerPoint:n,containerPoint:i,originalEvent:t}),"contextmenu"===t.type&&o.DomEvent.preventDefault(t),"mousemove"!==t.type&&o.DomEvent.stopPropagation(t)}}}),o.Map.include({_initPathRoot:function(){this._pathRoot||(this._pathRoot=o.Path.prototype._createElement("svg"),this._panes.overlayPane.appendChild(this._pathRoot),this.options.zoomAnimation&&o.Browser.any3d?(o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-animated"),this.on({zoomanim:this._animatePathZoom,zoomend:this._endPathZoom})):o.DomUtil.addClass(this._pathRoot,"leaflet-zoom-hide"),this.on("moveend",this._updateSvgViewport),this._updateSvgViewport()) +},_animatePathZoom:function(t){var e=this.getZoomScale(t.zoom),i=this._getCenterOffset(t.center)._multiplyBy(-e)._add(this._pathViewport.min);this._pathRoot.style[o.DomUtil.TRANSFORM]=o.DomUtil.getTranslateString(i)+" scale("+e+") ",this._pathZooming=!0},_endPathZoom:function(){this._pathZooming=!1},_updateSvgViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max,n=i.x-e.x,s=i.y-e.y,a=this._pathRoot,r=this._panes.overlayPane;o.Browser.mobileWebkit&&r.removeChild(a),o.DomUtil.setPosition(a,e),a.setAttribute("width",n),a.setAttribute("height",s),a.setAttribute("viewBox",[e.x,e.y,n,s].join(" ")),o.Browser.mobileWebkit&&r.appendChild(a)}}}),o.Path.include({bindPopup:function(t,e){return t instanceof o.Popup?this._popup=t:((!this._popup||e)&&(this._popup=new o.Popup(e,this)),this._popup.setContent(t)),this._popupHandlersAdded||(this.on("click",this._openPopup,this).on("remove",this.closePopup,this),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this._popup=null,this.off("click",this._openPopup).off("remove",this.closePopup),this._popupHandlersAdded=!1),this},openPopup:function(t){return this._popup&&(t=t||this._latlng||this._latlngs[Math.floor(this._latlngs.length/2)],this._openPopup({latlng:t})),this},closePopup:function(){return this._popup&&this._popup._close(),this},_openPopup:function(t){this._popup.setLatLng(t.latlng),this._map.openPopup(this._popup)}}),o.Browser.vml=!o.Browser.svg&&function(){try{var t=e.createElement("div");t.innerHTML='<v:shape adj="1"/>';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(n){return!1}}(),o.Path=o.Browser.svg||!o.Browser.vml?o.Path:o.Path.extend({statics:{VML:!0,CLIP_PADDING:.02},_createElement:function(){try{return e.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return e.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),_initPath:function(){var t=this._container=this._createElement("shape");o.DomUtil.addClass(t,"leaflet-vml-shape"+(this.options.className?" "+this.options.className:"")),this.options.clickable&&o.DomUtil.addClass(t,"leaflet-clickable"),t.coordsize="1 1",this._path=this._createElement("path"),t.appendChild(this._path),this._map._pathRoot.appendChild(t)},_initStyle:function(){this._updateStyle()},_updateStyle:function(){var t=this._stroke,e=this._fill,i=this.options,n=this._container;n.stroked=i.stroke,n.filled=i.fill,i.stroke?(t||(t=this._stroke=this._createElement("stroke"),t.endcap="round",n.appendChild(t)),t.weight=i.weight+"px",t.color=i.color,t.opacity=i.opacity,t.dashStyle=i.dashArray?o.Util.isArray(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):"",i.lineCap&&(t.endcap=i.lineCap.replace("butt","flat")),i.lineJoin&&(t.joinstyle=i.lineJoin)):t&&(n.removeChild(t),this._stroke=null),i.fill?(e||(e=this._fill=this._createElement("fill"),n.appendChild(e)),e.color=i.fillColor||i.color,e.opacity=i.fillOpacity):e&&(n.removeChild(e),this._fill=null)},_updatePath:function(){var t=this._container.style;t.display="none",this._path.v=this.getPathString()+" ",t.display=""}}),o.Map.include(o.Browser.svg||!o.Browser.vml?{}:{_initPathRoot:function(){if(!this._pathRoot){var t=this._pathRoot=e.createElement("div");t.className="leaflet-vml-container",this._panes.overlayPane.appendChild(t),this.on("moveend",this._updatePathViewport),this._updatePathViewport()}}}),o.Browser.canvas=function(){return!!e.createElement("canvas").getContext}(),o.Path=o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?o.Path:o.Path.extend({statics:{CANVAS:!0,SVG:!1},redraw:function(){return this._map&&(this.projectLatlngs(),this._requestUpdate()),this},setStyle:function(t){return o.setOptions(this,t),this._map&&(this._updateStyle(),this._requestUpdate()),this},onRemove:function(t){t.off("viewreset",this.projectLatlngs,this).off("moveend",this._updatePath,this),this.options.clickable&&(this._map.off("click",this._onClick,this),this._map.off("mousemove",this._onMouseMove,this)),this._requestUpdate(),this.fire("remove"),this._map=null},_requestUpdate:function(){this._map&&!o.Path._updateRequest&&(o.Path._updateRequest=o.Util.requestAnimFrame(this._fireMapMoveEnd,this._map))},_fireMapMoveEnd:function(){o.Path._updateRequest=null,this.fire("moveend")},_initElements:function(){this._map._initPathRoot(),this._ctx=this._map._canvasCtx},_updateStyle:function(){var t=this.options;t.stroke&&(this._ctx.lineWidth=t.weight,this._ctx.strokeStyle=t.color),t.fill&&(this._ctx.fillStyle=t.fillColor||t.color)},_drawPath:function(){var t,e,i,n,s,a;for(this._ctx.beginPath(),t=0,i=this._parts.length;i>t;t++){for(e=0,n=this._parts[t].length;n>e;e++)s=this._parts[t][e],a=(0===e?"move":"line")+"To",this._ctx[a](s.x,s.y);this instanceof o.Polygon&&this._ctx.closePath()}},_checkIfEmpty:function(){return!this._parts.length},_updatePath:function(){if(!this._checkIfEmpty()){var t=this._ctx,e=this.options;this._drawPath(),t.save(),this._updateStyle(),e.fill&&(t.globalAlpha=e.fillOpacity,t.fill()),e.stroke&&(t.globalAlpha=e.opacity,t.stroke()),t.restore()}},_initEvents:function(){this.options.clickable&&(this._map.on("mousemove",this._onMouseMove,this),this._map.on("click",this._onClick,this))},_onClick:function(t){this._containsPoint(t.layerPoint)&&this.fire("click",t)},_onMouseMove:function(t){this._map&&!this._map._animatingZoom&&(this._containsPoint(t.layerPoint)?(this._ctx.canvas.style.cursor="pointer",this._mouseInside=!0,this.fire("mouseover",t)):this._mouseInside&&(this._ctx.canvas.style.cursor="",this._mouseInside=!1,this.fire("mouseout",t)))}}),o.Map.include(o.Path.SVG&&!t.L_PREFER_CANVAS||!o.Browser.canvas?{}:{_initPathRoot:function(){var t,i=this._pathRoot;i||(i=this._pathRoot=e.createElement("canvas"),i.style.position="absolute",t=this._canvasCtx=i.getContext("2d"),t.lineCap="round",t.lineJoin="round",this._panes.overlayPane.appendChild(i),this.options.zoomAnimation&&(this._pathRoot.className="leaflet-zoom-animated",this.on("zoomanim",this._animatePathZoom),this.on("zoomend",this._endPathZoom)),this.on("moveend",this._updateCanvasViewport),this._updateCanvasViewport())},_updateCanvasViewport:function(){if(!this._pathZooming){this._updatePathViewport();var t=this._pathViewport,e=t.min,i=t.max.subtract(e),n=this._pathRoot;o.DomUtil.setPosition(n,e),n.width=i.x,n.height=i.y,n.getContext("2d").translate(-e.x,-e.y)}}}),o.LineUtil={simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var n=t.length,o=typeof Uint8Array!=i+""?Uint8Array:Array,s=new o(n);s[0]=s[n-1]=1,this._simplifyDPStep(t,s,e,0,n-1);var a,r=[];for(a=0;n>a;a++)s[a]&&r.push(t[a]);return r},_simplifyDPStep:function(t,e,i,n,o){var s,a,r,h=0;for(a=n+1;o-1>=a;a++)r=this._sqClosestPointOnSegment(t[a],t[n],t[o],!0),r>h&&(s=a,h=r);h>i&&(e[s]=1,this._simplifyDPStep(t,e,i,n,s),this._simplifyDPStep(t,e,i,s,o))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,o=0,s=t.length;s>n;n++)this._sqDist(t[n],t[o])>e&&(i.push(t[n]),o=n);return s-1>o&&i.push(t[s-1]),i},clipSegment:function(t,e,i,n){var o,s,a,r=n?this._lastCode:this._getBitCode(t,i),h=this._getBitCode(e,i);for(this._lastCode=h;;){if(!(r|h))return[t,e];if(r&h)return!1;o=r||h,s=this._getEdgeIntersection(t,e,o,i),a=this._getBitCode(s,i),o===r?(t=s,r=a):(e=s,h=a)}},_getEdgeIntersection:function(t,e,i,n){var s=e.x-t.x,a=e.y-t.y,r=n.min,h=n.max;return 8&i?new o.Point(t.x+s*(h.y-t.y)/a,h.y):4&i?new o.Point(t.x+s*(r.y-t.y)/a,r.y):2&i?new o.Point(h.x,t.y+a*(h.x-t.x)/s):1&i?new o.Point(r.x,t.y+a*(r.x-t.x)/s):void 0},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,e,i,n){var s,a=e.x,r=e.y,h=i.x-a,l=i.y-r,u=h*h+l*l;return u>0&&(s=((t.x-a)*h+(t.y-r)*l)/u,s>1?(a=i.x,r=i.y):s>0&&(a+=h*s,r+=l*s)),h=t.x-a,l=t.y-r,n?h*h+l*l:new o.Point(a,r)}},o.Polyline=o.Path.extend({initialize:function(t,e){o.Path.prototype.initialize.call(this,e),this._latlngs=this._convertLatLngs(t)},options:{smoothFactor:1,noClip:!1},projectLatlngs:function(){this._originalPoints=[];for(var t=0,e=this._latlngs.length;e>t;t++)this._originalPoints[t]=this._map.latLngToLayerPoint(this._latlngs[t])},getPathString:function(){for(var t=0,e=this._parts.length,i="";e>t;t++)i+=this._getPathPartStr(this._parts[t]);return i},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._latlngs=this._convertLatLngs(t),this.redraw()},addLatLng:function(t){return this._latlngs.push(o.latLng(t)),this.redraw()},spliceLatLngs:function(){var t=[].splice.apply(this._latlngs,arguments);return this._convertLatLngs(this._latlngs,!0),this.redraw(),t},closestLayerPoint:function(t){for(var e,i,n=1/0,s=this._parts,a=null,r=0,h=s.length;h>r;r++)for(var l=s[r],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=o.LineUtil._sqClosestPointOnSegment(t,e,i,!0);n>d&&(n=d,a=o.LineUtil._sqClosestPointOnSegment(t,e,i))}return a&&(a.distance=Math.sqrt(n)),a},getBounds:function(){return new o.LatLngBounds(this.getLatLngs())},_convertLatLngs:function(t,e){var i,n,s=e?t:[];for(i=0,n=t.length;n>i;i++){if(o.Util.isArray(t[i])&&"number"!=typeof t[i][0])return;s[i]=o.latLng(t[i])}return s},_initEvents:function(){o.Path.prototype._initEvents.call(this)},_getPathPartStr:function(t){for(var e,i=o.Path.VML,n=0,s=t.length,a="";s>n;n++)e=t[n],i&&e._round(),a+=(n?"L":"M")+e.x+" "+e.y;return a},_clipPoints:function(){var t,e,i,n=this._originalPoints,s=n.length;if(this.options.noClip)return void(this._parts=[n]);this._parts=[];var a=this._parts,r=this._map._pathViewport,h=o.LineUtil;for(t=0,e=0;s-1>t;t++)i=h.clipSegment(n[t],n[t+1],r,t),i&&(a[e]=a[e]||[],a[e].push(i[0]),(i[1]!==n[t+1]||t===s-2)&&(a[e].push(i[1]),e++))},_simplifyPoints:function(){for(var t=this._parts,e=o.LineUtil,i=0,n=t.length;n>i;i++)t[i]=e.simplify(t[i],this.options.smoothFactor)},_updatePath:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),o.Path.prototype._updatePath.call(this))}}),o.polyline=function(t,e){return new o.Polyline(t,e)},o.PolyUtil={},o.PolyUtil.clipPolygon=function(t,e){var i,n,s,a,r,h,l,u,c,d=[1,4,2,8],p=o.LineUtil;for(n=0,l=t.length;l>n;n++)t[n]._code=p._getBitCode(t[n],e);for(a=0;4>a;a++){for(u=d[a],i=[],n=0,l=t.length,s=l-1;l>n;s=n++)r=t[n],h=t[s],r._code&u?h._code&u||(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)):(h._code&u&&(c=p._getEdgeIntersection(h,r,u,e),c._code=p._getBitCode(c,e),i.push(c)),i.push(r));t=i}return t},o.Polygon=o.Polyline.extend({options:{fill:!0},initialize:function(t,e){o.Polyline.prototype.initialize.call(this,t,e),this._initWithHoles(t)},_initWithHoles:function(t){var e,i,n;if(t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0])for(this._latlngs=this._convertLatLngs(t[0]),this._holes=t.slice(1),e=0,i=this._holes.length;i>e;e++)n=this._holes[e]=this._convertLatLngs(this._holes[e]),n[0].equals(n[n.length-1])&&n.pop();t=this._latlngs,t.length>=2&&t[0].equals(t[t.length-1])&&t.pop()},projectLatlngs:function(){if(o.Polyline.prototype.projectLatlngs.call(this),this._holePoints=[],this._holes){var t,e,i,n;for(t=0,i=this._holes.length;i>t;t++)for(this._holePoints[t]=[],e=0,n=this._holes[t].length;n>e;e++)this._holePoints[t][e]=this._map.latLngToLayerPoint(this._holes[t][e])}},setLatLngs:function(t){return t&&o.Util.isArray(t[0])&&"number"!=typeof t[0][0]?(this._initWithHoles(t),this.redraw()):o.Polyline.prototype.setLatLngs.call(this,t)},_clipPoints:function(){var t=this._originalPoints,e=[];if(this._parts=[t].concat(this._holePoints),!this.options.noClip){for(var i=0,n=this._parts.length;n>i;i++){var s=o.PolyUtil.clipPolygon(this._parts[i],this._map._pathViewport);s.length&&e.push(s)}this._parts=e}},_getPathPartStr:function(t){var e=o.Polyline.prototype._getPathPartStr.call(this,t);return e+(o.Browser.svg?"z":"x")}}),o.polygon=function(t,e){return new o.Polygon(t,e)},function(){function t(t){return o.FeatureGroup.extend({initialize:function(t,e){this._layers={},this._options=e,this.setLatLngs(t)},setLatLngs:function(e){var i=0,n=e.length;for(this.eachLayer(function(t){n>i?t.setLatLngs(e[i++]):this.removeLayer(t)},this);n>i;)this.addLayer(new t(e[i++],this._options));return this},getLatLngs:function(){var t=[];return this.eachLayer(function(e){t.push(e.getLatLngs())}),t}})}o.MultiPolyline=t(o.Polyline),o.MultiPolygon=t(o.Polygon),o.multiPolyline=function(t,e){return new o.MultiPolyline(t,e)},o.multiPolygon=function(t,e){return new o.MultiPolygon(t,e)}}(),o.Rectangle=o.Polygon.extend({initialize:function(t,e){o.Polygon.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=o.latLngBounds(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}}),o.rectangle=function(t,e){return new o.Rectangle(t,e)},o.Circle=o.Path.extend({initialize:function(t,e,i){o.Path.prototype.initialize.call(this,i),this._latlng=o.latLng(t),this._mRadius=e},options:{fill:!0},setLatLng:function(t){return this._latlng=o.latLng(t),this.redraw()},setRadius:function(t){return this._mRadius=t,this.redraw()},projectLatlngs:function(){var t=this._getLngRadius(),e=this._latlng,i=this._map.latLngToLayerPoint([e.lat,e.lng-t]);this._point=this._map.latLngToLayerPoint(e),this._radius=Math.max(this._point.x-i.x,1)},getBounds:function(){var t=this._getLngRadius(),e=this._mRadius/40075017*360,i=this._latlng;return new o.LatLngBounds([i.lat-e,i.lng-t],[i.lat+e,i.lng+t])},getLatLng:function(){return this._latlng},getPathString:function(){var t=this._point,e=this._radius;return this._checkIfEmpty()?"":o.Browser.svg?"M"+t.x+","+(t.y-e)+"A"+e+","+e+",0,1,1,"+(t.x-.1)+","+(t.y-e)+" z":(t._round(),e=Math.round(e),"AL "+t.x+","+t.y+" "+e+","+e+" 0,23592600")},getRadius:function(){return this._mRadius},_getLatRadius:function(){return this._mRadius/40075017*360},_getLngRadius:function(){return this._getLatRadius()/Math.cos(o.LatLng.DEG_TO_RAD*this._latlng.lat)},_checkIfEmpty:function(){if(!this._map)return!1;var t=this._map._pathViewport,e=this._radius,i=this._point;return i.x-e>t.max.x||i.y-e>t.max.y||i.x+e<t.min.x||i.y+e<t.min.y}}),o.circle=function(t,e,i){return new o.Circle(t,e,i)},o.CircleMarker=o.Circle.extend({options:{radius:10,weight:2},initialize:function(t,e){o.Circle.prototype.initialize.call(this,t,null,e),this._radius=this.options.radius},projectLatlngs:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_updateStyle:function(){o.Circle.prototype._updateStyle.call(this),this.setRadius(this.options.radius)},setLatLng:function(t){return o.Circle.prototype.setLatLng.call(this,t),this._popup&&this._popup._isOpen&&this._popup.setLatLng(t),this},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius}}),o.circleMarker=function(t,e){return new o.CircleMarker(t,e)},o.Polyline.include(o.Path.CANVAS?{_containsPoint:function(t,e){var i,n,s,a,r,h,l,u=this.options.weight/2;for(o.Browser.touch&&(u+=10),i=0,a=this._parts.length;a>i;i++)for(l=this._parts[i],n=0,r=l.length,s=r-1;r>n;s=n++)if((e||0!==n)&&(h=o.LineUtil.pointToSegmentDistance(t,l[s],l[n]),u>=h))return!0;return!1}}:{}),o.Polygon.include(o.Path.CANVAS?{_containsPoint:function(t){var e,i,n,s,a,r,h,l,u=!1;if(o.Polyline.prototype._containsPoint.call(this,t,!0))return!0;for(s=0,h=this._parts.length;h>s;s++)for(e=this._parts[s],a=0,l=e.length,r=l-1;l>a;r=a++)i=e[a],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(u=!u);return u}}:{}),o.Circle.include(o.Path.CANVAS?{_drawPath:function(){var t=this._point;this._ctx.beginPath(),this._ctx.arc(t.x,t.y,this._radius,0,2*Math.PI,!1)},_containsPoint:function(t){var e=this._point,i=this.options.stroke?this.options.weight/2:0;return t.distanceTo(e)<=this._radius+i}}:{}),o.CircleMarker.include(o.Path.CANVAS?{_updateStyle:function(){o.Path.prototype._updateStyle.call(this)}}:{}),o.GeoJSON=o.FeatureGroup.extend({initialize:function(t,e){o.setOptions(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=o.Util.isArray(t)?t:t.features;if(s){for(e=0,i=s.length;i>e;e++)n=s[e],(n.geometries||n.geometry||n.features||n.coordinates)&&this.addData(s[e]);return this}var a=this.options;if(!a.filter||a.filter(t)){var r=o.GeoJSON.geometryToLayer(t,a.pointToLayer,a.coordsToLatLng,a);return r.feature=o.GeoJSON.asFeature(t),r.defaultOptions=r.options,this.resetStyle(r),a.onEachFeature&&a.onEachFeature(t,r),this.addLayer(r)}},resetStyle:function(t){var e=this.options.style;e&&(o.Util.extend(t.options,t.defaultOptions),this._setLayerStyle(t,e))},setStyle:function(t){this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){"function"==typeof e&&(e=e(t.feature)),t.setStyle&&t.setStyle(e)}}),o.extend(o.GeoJSON,{geometryToLayer:function(t,e,i,n){var s,a,r,h,l="Feature"===t.type?t.geometry:t,u=l.coordinates,c=[];switch(i=i||this.coordsToLatLng,l.type){case"Point":return s=i(u),e?e(t,s):new o.Marker(s);case"MultiPoint":for(r=0,h=u.length;h>r;r++)s=i(u[r]),c.push(e?e(t,s):new o.Marker(s));return new o.FeatureGroup(c);case"LineString":return a=this.coordsToLatLngs(u,0,i),new o.Polyline(a,n);case"Polygon":if(2===u.length&&!u[1].length)throw new Error("Invalid GeoJSON object.");return a=this.coordsToLatLngs(u,1,i),new o.Polygon(a,n);case"MultiLineString":return a=this.coordsToLatLngs(u,1,i),new o.MultiPolyline(a,n);case"MultiPolygon":return a=this.coordsToLatLngs(u,2,i),new o.MultiPolygon(a,n);case"GeometryCollection":for(r=0,h=l.geometries.length;h>r;r++)c.push(this.geometryToLayer({geometry:l.geometries[r],type:"Feature",properties:t.properties},e,i,n));return new o.FeatureGroup(c);default:throw new Error("Invalid GeoJSON object.")}},coordsToLatLng:function(t){return new o.LatLng(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){var n,o,s,a=[];for(o=0,s=t.length;s>o;o++)n=e?this.coordsToLatLngs(t[o],e-1,i):(i||this.coordsToLatLng)(t[o]),a.push(n);return a},latLngToCoords:function(t){var e=[t.lng,t.lat];return t.alt!==i&&e.push(t.alt),e},latLngsToCoords:function(t){for(var e=[],i=0,n=t.length;n>i;i++)e.push(o.GeoJSON.latLngToCoords(t[i]));return e},getFeature:function(t,e){return t.feature?o.extend({},t.feature,{geometry:e}):o.GeoJSON.asFeature(e)},asFeature:function(t){return"Feature"===t.type?t:{type:"Feature",properties:{},geometry:t}}});var a={toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"Point",coordinates:o.GeoJSON.latLngToCoords(this.getLatLng())})}};o.Marker.include(a),o.Circle.include(a),o.CircleMarker.include(a),o.Polyline.include({toGeoJSON:function(){return o.GeoJSON.getFeature(this,{type:"LineString",coordinates:o.GeoJSON.latLngsToCoords(this.getLatLngs())})}}),o.Polygon.include({toGeoJSON:function(){var t,e,i,n=[o.GeoJSON.latLngsToCoords(this.getLatLngs())];if(n[0].push(n[0][0]),this._holes)for(t=0,e=this._holes.length;e>t;t++)i=o.GeoJSON.latLngsToCoords(this._holes[t]),i.push(i[0]),n.push(i);return o.GeoJSON.getFeature(this,{type:"Polygon",coordinates:n})}}),function(){function t(t){return function(){var e=[];return this.eachLayer(function(t){e.push(t.toGeoJSON().geometry.coordinates)}),o.GeoJSON.getFeature(this,{type:t,coordinates:e})}}o.MultiPolyline.include({toGeoJSON:t("MultiLineString")}),o.MultiPolygon.include({toGeoJSON:t("MultiPolygon")}),o.LayerGroup.include({toGeoJSON:function(){var e,i=this.feature&&this.feature.geometry,n=[];if(i&&"MultiPoint"===i.type)return t("MultiPoint").call(this);var s=i&&"GeometryCollection"===i.type;return this.eachLayer(function(t){t.toGeoJSON&&(e=t.toGeoJSON(),n.push(s?e.geometry:o.GeoJSON.asFeature(e)))}),s?o.GeoJSON.getFeature(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}})}(),o.geoJson=function(t,e){return new o.GeoJSON(t,e)},o.DomEvent={addListener:function(t,e,i,n){var s,a,r,h=o.stamp(i),l="_leaflet_"+e+h;return t[l]?this:(s=function(e){return i.call(n||t,e||o.DomEvent._getEvent())},o.Browser.pointer&&0===e.indexOf("touch")?this.addPointerListener(t,e,s,h):(o.Browser.touch&&"dblclick"===e&&this.addDoubleTapListener&&this.addDoubleTapListener(t,s,h),"addEventListener"in t?"mousewheel"===e?(t.addEventListener("DOMMouseScroll",s,!1),t.addEventListener(e,s,!1)):"mouseenter"===e||"mouseleave"===e?(a=s,r="mouseenter"===e?"mouseover":"mouseout",s=function(e){return o.DomEvent._checkMouse(t,e)?a(e):void 0},t.addEventListener(r,s,!1)):"click"===e&&o.Browser.android?(a=s,s=function(t){return o.DomEvent._filterClick(t,a)},t.addEventListener(e,s,!1)):t.addEventListener(e,s,!1):"attachEvent"in t&&t.attachEvent("on"+e,s),t[l]=s,this))},removeListener:function(t,e,i){var n=o.stamp(i),s="_leaflet_"+e+n,a=t[s];return a?(o.Browser.pointer&&0===e.indexOf("touch")?this.removePointerListener(t,e,n):o.Browser.touch&&"dblclick"===e&&this.removeDoubleTapListener?this.removeDoubleTapListener(t,n):"removeEventListener"in t?"mousewheel"===e?(t.removeEventListener("DOMMouseScroll",a,!1),t.removeEventListener(e,a,!1)):"mouseenter"===e||"mouseleave"===e?t.removeEventListener("mouseenter"===e?"mouseover":"mouseout",a,!1):t.removeEventListener(e,a,!1):"detachEvent"in t&&t.detachEvent("on"+e,a),t[s]=null,this):this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,o.DomEvent._skipped(t),this},disableScrollPropagation:function(t){var e=o.DomEvent.stopPropagation;return o.DomEvent.on(t,"mousewheel",e).on(t,"MozMousePixelScroll",e)},disableClickPropagation:function(t){for(var e=o.DomEvent.stopPropagation,i=o.Draggable.START.length-1;i>=0;i--)o.DomEvent.on(t,o.Draggable.START[i],e);return o.DomEvent.on(t,"click",o.DomEvent._fakeStop).on(t,"dblclick",e)},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stop:function(t){return o.DomEvent.preventDefault(t).stopPropagation(t)},getMousePosition:function(t,e){if(!e)return new o.Point(t.clientX,t.clientY);var i=e.getBoundingClientRect();return new o.Point(t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop)},getWheelDelta:function(t){var e=0;return t.wheelDelta&&(e=t.wheelDelta/120),t.detail&&(e=-t.detail/3),e},_skipEvents:{},_fakeStop:function(t){o.DomEvent._skipEvents[t.type]=!0},_skipped:function(t){var e=this._skipEvents[t.type];return this._skipEvents[t.type]=!1,e},_checkMouse:function(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(n){return!1}return i!==t},_getEvent:function(){var e=t.event;if(!e)for(var i=arguments.callee.caller;i&&(e=i.arguments[0],!e||t.Event!==e.constructor);)i=i.caller;return e},_filterClick:function(t,e){var i=t.timeStamp||t.originalEvent.timeStamp,n=o.DomEvent._lastClick&&i-o.DomEvent._lastClick;return n&&n>100&&500>n||t.target._simulatedClick&&!t._simulated?void o.DomEvent.stop(t):(o.DomEvent._lastClick=i,e(t))}},o.DomEvent.on=o.DomEvent.addListener,o.DomEvent.off=o.DomEvent.removeListener,o.Draggable=o.Class.extend({includes:o.Mixin.Events,statics:{START:o.Browser.touch?["touchstart","mousedown"]:["mousedown"],END:{mousedown:"mouseup",touchstart:"touchend",pointerdown:"touchend",MSPointerDown:"touchend"},MOVE:{mousedown:"mousemove",touchstart:"touchmove",pointerdown:"touchmove",MSPointerDown:"touchmove"}},initialize:function(t,e){this._element=t,this._dragStartTarget=e||t},enable:function(){if(!this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.on(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!0}},disable:function(){if(this._enabled){for(var t=o.Draggable.START.length-1;t>=0;t--)o.DomEvent.off(this._dragStartTarget,o.Draggable.START[t],this._onDown,this);this._enabled=!1,this._moved=!1}},_onDown:function(t){if(this._moved=!1,!(t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(o.DomEvent.stopPropagation(t),o.Draggable._disabled||(o.DomUtil.disableImageDrag(),o.DomUtil.disableTextSelection(),this._moving)))){var i=t.touches?t.touches[0]:t;this._startPoint=new o.Point(i.clientX,i.clientY),this._startPos=this._newPos=o.DomUtil.getPosition(this._element),o.DomEvent.on(e,o.Draggable.MOVE[t.type],this._onMove,this).on(e,o.Draggable.END[t.type],this._onUp,this)}},_onMove:function(t){if(t.touches&&t.touches.length>1)return void(this._moved=!0);var i=t.touches&&1===t.touches.length?t.touches[0]:t,n=new o.Point(i.clientX,i.clientY),s=n.subtract(this._startPoint);(s.x||s.y)&&(o.Browser.touch&&Math.abs(s.x)+Math.abs(s.y)<3||(o.DomEvent.preventDefault(t),this._moved||(this.fire("dragstart"),this._moved=!0,this._startPos=o.DomUtil.getPosition(this._element).subtract(s),o.DomUtil.addClass(e.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,o.DomUtil.addClass(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(s),this._moving=!0,o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updatePosition,this,!0,this._dragStartTarget)))},_updatePosition:function(){this.fire("predrag"),o.DomUtil.setPosition(this._element,this._newPos),this.fire("drag")},_onUp:function(){o.DomUtil.removeClass(e.body,"leaflet-dragging"),this._lastTarget&&(o.DomUtil.removeClass(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null);for(var t in o.Draggable.MOVE)o.DomEvent.off(e,o.Draggable.MOVE[t],this._onMove).off(e,o.Draggable.END[t],this._onUp);o.DomUtil.enableImageDrag(),o.DomUtil.enableTextSelection(),this._moved&&this._moving&&(o.Util.cancelAnimFrame(this._animRequest),this.fire("dragend",{distance:this._newPos.distanceTo(this._startPos)})),this._moving=!1}}),o.Handler=o.Class.extend({initialize:function(t){this._map=t},enable:function(){this._enabled||(this._enabled=!0,this.addHooks())},disable:function(){this._enabled&&(this._enabled=!1,this.removeHooks())},enabled:function(){return!!this._enabled}}),o.Map.mergeOptions({dragging:!0,inertia:!o.Browser.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,inertiaThreshold:o.Browser.touch?32:18,easeLinearity:.25,worldCopyJump:!1}),o.Map.Drag=o.Handler.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new o.Draggable(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDrag,this),t.on("viewreset",this._onViewReset,this),t.whenReady(this._onViewReset,this))}this._draggable.enable()},removeHooks:function(){this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){var t=this._map;t._panAnim&&t._panAnim.stop(),t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(){if(this._map.options.inertia){var t=this._lastTime=+new Date,e=this._lastPos=this._draggable._newPos;this._positions.push(e),this._times.push(t),t-this._times[0]>200&&(this._positions.shift(),this._times.shift())}this._map.fire("move").fire("drag")},_onViewReset:function(){var t=this._map.getSize()._divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.project([0,180]).x},_onPreDrag:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-e+i)%t+e-i,s=(n+e+i)%t-e-i,a=Math.abs(o+i)<Math.abs(s+i)?o:s;this._draggable._newPos.x=a},_onDragEnd:function(t){var e=this._map,i=e.options,n=+new Date-this._lastTime,s=!i.inertia||n>i.inertiaThreshold||!this._positions[0];if(e.fire("dragend",t),s)e.fire("moveend");else{var a=this._lastPos.subtract(this._positions[0]),r=(this._lastTime+n-this._times[0])/1e3,h=i.easeLinearity,l=a.multiplyBy(h/r),u=l.distanceTo([0,0]),c=Math.min(i.inertiaMaxSpeed,u),d=l.multiplyBy(c/u),p=c/(i.inertiaDeceleration*h),_=d.multiplyBy(-p/2).round();_.x&&_.y?(_=e._limitOffset(_,e.options.maxBounds),o.Util.requestAnimFrame(function(){e.panBy(_,{duration:p,easeLinearity:h,noMoveStart:!0})})):e.fire("moveend")}}}),o.Map.addInitHook("addHandler","dragging",o.Map.Drag),o.Map.mergeOptions({doubleClickZoom:!0}),o.Map.DoubleClickZoom=o.Handler.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom()+(t.originalEvent.shiftKey?-1:1);"center"===e.options.doubleClickZoom?e.setZoom(i):e.setZoomAround(t.containerPoint,i)}}),o.Map.addInitHook("addHandler","doubleClickZoom",o.Map.DoubleClickZoom),o.Map.mergeOptions({scrollWheelZoom:!0}),o.Map.ScrollWheelZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"mousewheel",this._onWheelScroll,this),o.DomEvent.on(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault),this._delta=0},removeHooks:function(){o.DomEvent.off(this._map._container,"mousewheel",this._onWheelScroll),o.DomEvent.off(this._map._container,"MozMousePixelScroll",o.DomEvent.preventDefault)},_onWheelScroll:function(t){var e=o.DomEvent.getWheelDelta(t);this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(40-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o.bind(this._performZoom,this),i),o.DomEvent.preventDefault(t),o.DomEvent.stopPropagation(t)},_performZoom:function(){var t=this._map,e=this._delta,i=t.getZoom();e=e>0?Math.ceil(e):Math.floor(e),e=Math.max(Math.min(e,4),-4),e=t._limitZoom(i+e)-i,this._delta=0,this._startTime=null,e&&("center"===t.options.scrollWheelZoom?t.setZoom(i+e):t.setZoomAround(this._lastMousePos,i+e))}}),o.Map.addInitHook("addHandler","scrollWheelZoom",o.Map.ScrollWheelZoom),o.extend(o.DomEvent,{_touchstart:o.Browser.msPointer?"MSPointerDown":o.Browser.pointer?"pointerdown":"touchstart",_touchend:o.Browser.msPointer?"MSPointerUp":o.Browser.pointer?"pointerup":"touchend",addDoubleTapListener:function(t,i,n){function s(t){var e;if(o.Browser.pointer?(_.push(t.pointerId),e=_.length):e=t.touches.length,!(e>1)){var i=Date.now(),n=i-(r||i);h=t.touches?t.touches[0]:t,l=n>0&&u>=n,r=i}}function a(t){if(o.Browser.pointer){var e=_.indexOf(t.pointerId);if(-1===e)return;_.splice(e,1)}if(l){if(o.Browser.pointer){var n,s={};for(var a in h)n=h[a],s[a]="function"==typeof n?n.bind(h):n;h=s}h.type="dblclick",i(h),r=null}}var r,h,l=!1,u=250,c="_leaflet_",d=this._touchstart,p=this._touchend,_=[];t[c+d+n]=s,t[c+p+n]=a;var m=o.Browser.pointer?e.documentElement:t;return t.addEventListener(d,s,!1),m.addEventListener(p,a,!1),o.Browser.pointer&&m.addEventListener(o.DomEvent.POINTER_CANCEL,a,!1),this},removeDoubleTapListener:function(t,i){var n="_leaflet_";return t.removeEventListener(this._touchstart,t[n+this._touchstart+i],!1),(o.Browser.pointer?e.documentElement:t).removeEventListener(this._touchend,t[n+this._touchend+i],!1),o.Browser.pointer&&e.documentElement.removeEventListener(o.DomEvent.POINTER_CANCEL,t[n+this._touchend+i],!1),this}}),o.extend(o.DomEvent,{POINTER_DOWN:o.Browser.msPointer?"MSPointerDown":"pointerdown",POINTER_MOVE:o.Browser.msPointer?"MSPointerMove":"pointermove",POINTER_UP:o.Browser.msPointer?"MSPointerUp":"pointerup",POINTER_CANCEL:o.Browser.msPointer?"MSPointerCancel":"pointercancel",_pointers:[],_pointerDocumentListener:!1,addPointerListener:function(t,e,i,n){switch(e){case"touchstart":return this.addPointerListenerStart(t,e,i,n);case"touchend":return this.addPointerListenerEnd(t,e,i,n);case"touchmove":return this.addPointerListenerMove(t,e,i,n);default:throw"Unknown touch event type"}},addPointerListenerStart:function(t,i,n,s){var a="_leaflet_",r=this._pointers,h=function(t){o.DomEvent.preventDefault(t);for(var e=!1,i=0;i<r.length;i++)if(r[i].pointerId===t.pointerId){e=!0; +break}e||r.push(t),t.touches=r.slice(),t.changedTouches=[t],n(t)};if(t[a+"touchstart"+s]=h,t.addEventListener(this.POINTER_DOWN,h,!1),!this._pointerDocumentListener){var l=function(t){for(var e=0;e<r.length;e++)if(r[e].pointerId===t.pointerId){r.splice(e,1);break}};e.documentElement.addEventListener(this.POINTER_UP,l,!1),e.documentElement.addEventListener(this.POINTER_CANCEL,l,!1),this._pointerDocumentListener=!0}return this},addPointerListenerMove:function(t,e,i,n){function o(t){if(t.pointerType!==t.MSPOINTER_TYPE_MOUSE&&"mouse"!==t.pointerType||0!==t.buttons){for(var e=0;e<a.length;e++)if(a[e].pointerId===t.pointerId){a[e]=t;break}t.touches=a.slice(),t.changedTouches=[t],i(t)}}var s="_leaflet_",a=this._pointers;return t[s+"touchmove"+n]=o,t.addEventListener(this.POINTER_MOVE,o,!1),this},addPointerListenerEnd:function(t,e,i,n){var o="_leaflet_",s=this._pointers,a=function(t){for(var e=0;e<s.length;e++)if(s[e].pointerId===t.pointerId){s.splice(e,1);break}t.touches=s.slice(),t.changedTouches=[t],i(t)};return t[o+"touchend"+n]=a,t.addEventListener(this.POINTER_UP,a,!1),t.addEventListener(this.POINTER_CANCEL,a,!1),this},removePointerListener:function(t,e,i){var n="_leaflet_",o=t[n+e+i];switch(e){case"touchstart":t.removeEventListener(this.POINTER_DOWN,o,!1);break;case"touchmove":t.removeEventListener(this.POINTER_MOVE,o,!1);break;case"touchend":t.removeEventListener(this.POINTER_UP,o,!1),t.removeEventListener(this.POINTER_CANCEL,o,!1)}return this}}),o.Map.mergeOptions({touchZoom:o.Browser.touch&&!o.Browser.android23,bounceAtZoomLimits:!0}),o.Map.TouchZoom=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var n=i.mouseEventToLayerPoint(t.touches[0]),s=i.mouseEventToLayerPoint(t.touches[1]),a=i._getCenterLayerPoint();this._startCenter=n.add(s)._divideBy(2),this._startDist=n.distanceTo(s),this._moved=!1,this._zooming=!0,this._centerOffset=a.subtract(this._startCenter),i._panAnim&&i._panAnim.stop(),o.DomEvent.on(e,"touchmove",this._onTouchMove,this).on(e,"touchend",this._onTouchEnd,this),o.DomEvent.preventDefault(t)}},_onTouchMove:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&this._zooming){var i=e.mouseEventToLayerPoint(t.touches[0]),n=e.mouseEventToLayerPoint(t.touches[1]);this._scale=i.distanceTo(n)/this._startDist,this._delta=i._add(n)._divideBy(2)._subtract(this._startCenter),1!==this._scale&&(e.options.bounceAtZoomLimits||!(e.getZoom()===e.getMinZoom()&&this._scale<1||e.getZoom()===e.getMaxZoom()&&this._scale>1))&&(this._moved||(o.DomUtil.addClass(e._mapPane,"leaflet-touching"),e.fire("movestart").fire("zoomstart"),this._moved=!0),o.Util.cancelAnimFrame(this._animRequest),this._animRequest=o.Util.requestAnimFrame(this._updateOnMove,this,!0,this._map._container),o.DomEvent.preventDefault(t))}},_updateOnMove:function(){var t=this._map,e=this._getScaleOrigin(),i=t.layerPointToLatLng(e),n=t.getScaleZoom(this._scale);t._animateZoom(i,n,this._startCenter,this._scale,this._delta,!1,!0)},_onTouchEnd:function(){if(!this._moved||!this._zooming)return void(this._zooming=!1);var t=this._map;this._zooming=!1,o.DomUtil.removeClass(t._mapPane,"leaflet-touching"),o.Util.cancelAnimFrame(this._animRequest),o.DomEvent.off(e,"touchmove",this._onTouchMove).off(e,"touchend",this._onTouchEnd);var i=this._getScaleOrigin(),n=t.layerPointToLatLng(i),s=t.getZoom(),a=t.getScaleZoom(this._scale)-s,r=a>0?Math.ceil(a):Math.floor(a),h=t._limitZoom(s+r),l=t.getZoomScale(h)/this._scale;t._animateZoom(n,h,i,l)},_getScaleOrigin:function(){var t=this._centerOffset.subtract(this._delta).divideBy(this._scale);return this._startCenter.add(t)}}),o.Map.addInitHook("addHandler","touchZoom",o.Map.TouchZoom),o.Map.mergeOptions({tap:!0,tapTolerance:15}),o.Map.Tap=o.Handler.extend({addHooks:function(){o.DomEvent.on(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){o.DomEvent.off(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(t.touches){if(o.DomEvent.preventDefault(t),this._fireClick=!0,t.touches.length>1)return this._fireClick=!1,void clearTimeout(this._holdTimeout);var i=t.touches[0],n=i.target;this._startPos=this._newPos=new o.Point(i.clientX,i.clientY),n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.addClass(n,"leaflet-active"),this._holdTimeout=setTimeout(o.bind(function(){this._isTapValid()&&(this._fireClick=!1,this._onUp(),this._simulateEvent("contextmenu",i))},this),1e3),o.DomEvent.on(e,"touchmove",this._onMove,this).on(e,"touchend",this._onUp,this)}},_onUp:function(t){if(clearTimeout(this._holdTimeout),o.DomEvent.off(e,"touchmove",this._onMove,this).off(e,"touchend",this._onUp,this),this._fireClick&&t&&t.changedTouches){var i=t.changedTouches[0],n=i.target;n&&n.tagName&&"a"===n.tagName.toLowerCase()&&o.DomUtil.removeClass(n,"leaflet-active"),this._isTapValid()&&this._simulateEvent("click",i)}},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_onMove:function(t){var e=t.touches[0];this._newPos=new o.Point(e.clientX,e.clientY)},_simulateEvent:function(i,n){var o=e.createEvent("MouseEvents");o._simulated=!0,n.target._simulatedClick=!0,o.initMouseEvent(i,!0,!0,t,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(o)}}),o.Browser.touch&&!o.Browser.pointer&&o.Map.addInitHook("addHandler","tap",o.Map.Tap),o.Map.mergeOptions({boxZoom:!0}),o.Map.BoxZoom=o.Handler.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._moved=!1},addHooks:function(){o.DomEvent.on(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){o.DomEvent.off(this._container,"mousedown",this._onMouseDown),this._moved=!1},moved:function(){return this._moved},_onMouseDown:function(t){return this._moved=!1,!t.shiftKey||1!==t.which&&1!==t.button?!1:(o.DomUtil.disableTextSelection(),o.DomUtil.disableImageDrag(),this._startLayerPoint=this._map.mouseEventToLayerPoint(t),void o.DomEvent.on(e,"mousemove",this._onMouseMove,this).on(e,"mouseup",this._onMouseUp,this).on(e,"keydown",this._onKeyDown,this))},_onMouseMove:function(t){this._moved||(this._box=o.DomUtil.create("div","leaflet-zoom-box",this._pane),o.DomUtil.setPosition(this._box,this._startLayerPoint),this._container.style.cursor="crosshair",this._map.fire("boxzoomstart"));var e=this._startLayerPoint,i=this._box,n=this._map.mouseEventToLayerPoint(t),s=n.subtract(e),a=new o.Point(Math.min(n.x,e.x),Math.min(n.y,e.y));o.DomUtil.setPosition(i,a),this._moved=!0,i.style.width=Math.max(0,Math.abs(s.x)-4)+"px",i.style.height=Math.max(0,Math.abs(s.y)-4)+"px"},_finish:function(){this._moved&&(this._pane.removeChild(this._box),this._container.style.cursor=""),o.DomUtil.enableTextSelection(),o.DomUtil.enableImageDrag(),o.DomEvent.off(e,"mousemove",this._onMouseMove).off(e,"mouseup",this._onMouseUp).off(e,"keydown",this._onKeyDown)},_onMouseUp:function(t){this._finish();var e=this._map,i=e.mouseEventToLayerPoint(t);if(!this._startLayerPoint.equals(i)){var n=new o.LatLngBounds(e.layerPointToLatLng(this._startLayerPoint),e.layerPointToLatLng(i));e.fitBounds(n),e.fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){27===t.keyCode&&this._finish()}}),o.Map.addInitHook("addHandler","boxZoom",o.Map.BoxZoom),o.Map.mergeOptions({keyboard:!0,keyboardPanOffset:80,keyboardZoomOffset:1}),o.Map.Keyboard=o.Handler.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,173]},initialize:function(t){this._map=t,this._setPanOffset(t.options.keyboardPanOffset),this._setZoomOffset(t.options.keyboardZoomOffset)},addHooks:function(){var t=this._map._container;-1===t.tabIndex&&(t.tabIndex="0"),o.DomEvent.on(t,"focus",this._onFocus,this).on(t,"blur",this._onBlur,this).on(t,"mousedown",this._onMouseDown,this),this._map.on("focus",this._addHooks,this).on("blur",this._removeHooks,this)},removeHooks:function(){this._removeHooks();var t=this._map._container;o.DomEvent.off(t,"focus",this._onFocus,this).off(t,"blur",this._onBlur,this).off(t,"mousedown",this._onMouseDown,this),this._map.off("focus",this._addHooks,this).off("blur",this._removeHooks,this)},_onMouseDown:function(){if(!this._focused){var i=e.body,n=e.documentElement,o=i.scrollTop||n.scrollTop,s=i.scrollLeft||n.scrollLeft;this._map._container.focus(),t.scrollTo(s,o)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanOffset:function(t){var e,i,n=this._panKeys={},o=this.keyCodes;for(e=0,i=o.left.length;i>e;e++)n[o.left[e]]=[-1*t,0];for(e=0,i=o.right.length;i>e;e++)n[o.right[e]]=[t,0];for(e=0,i=o.down.length;i>e;e++)n[o.down[e]]=[0,t];for(e=0,i=o.up.length;i>e;e++)n[o.up[e]]=[0,-1*t]},_setZoomOffset:function(t){var e,i,n=this._zoomKeys={},o=this.keyCodes;for(e=0,i=o.zoomIn.length;i>e;e++)n[o.zoomIn[e]]=t;for(e=0,i=o.zoomOut.length;i>e;e++)n[o.zoomOut[e]]=-t},_addHooks:function(){o.DomEvent.on(e,"keydown",this._onKeyDown,this)},_removeHooks:function(){o.DomEvent.off(e,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){var e=t.keyCode,i=this._map;if(e in this._panKeys){if(i._panAnim&&i._panAnim._inProgress)return;i.panBy(this._panKeys[e]),i.options.maxBounds&&i.panInsideBounds(i.options.maxBounds)}else{if(!(e in this._zoomKeys))return;i.setZoom(i.getZoom()+this._zoomKeys[e])}o.DomEvent.stop(t)}}),o.Map.addInitHook("addHandler","keyboard",o.Map.Keyboard),o.Handler.MarkerDrag=o.Handler.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new o.Draggable(t,t)),this._draggable.on("dragstart",this._onDragStart,this).on("drag",this._onDrag,this).on("dragend",this._onDragEnd,this),this._draggable.enable(),o.DomUtil.addClass(this._marker._icon,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off("dragstart",this._onDragStart,this).off("drag",this._onDrag,this).off("dragend",this._onDragEnd,this),this._draggable.disable(),o.DomUtil.removeClass(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_onDragStart:function(){this._marker.closePopup().fire("movestart").fire("dragstart")},_onDrag:function(){var t=this._marker,e=t._shadow,i=o.DomUtil.getPosition(t._icon),n=t._map.layerPointToLatLng(i);e&&o.DomUtil.setPosition(e,i),t._latlng=n,t.fire("move",{latlng:n}).fire("drag")},_onDragEnd:function(t){this._marker.fire("moveend").fire("dragend",t)}}),o.Control=o.Class.extend({options:{position:"topright"},initialize:function(t){o.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return o.DomUtil.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this},removeFrom:function(t){var e=this.getPosition(),i=t._controlCorners[e];return i.removeChild(this._container),this._map=null,this.onRemove&&this.onRemove(t),this},_refocusOnMap:function(){this._map&&this._map.getContainer().focus()}}),o.control=function(t){return new o.Control(t)},o.Map.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.removeFrom(this),this},_initControlPos:function(){function t(t,s){var a=i+t+" "+i+s;e[t+s]=o.DomUtil.create("div",a,n)}var e=this._controlCorners={},i="leaflet-",n=this._controlContainer=o.DomUtil.create("div",i+"control-container",this._container);t("top","left"),t("top","right"),t("bottom","left"),t("bottom","right")},_clearControlPos:function(){this._container.removeChild(this._controlContainer)}}),o.Control.Zoom=o.Control.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=o.DomUtil.create("div",e+" leaflet-bar");return this._map=t,this._zoomInButton=this._createButton(this.options.zoomInText,this.options.zoomInTitle,e+"-in",i,this._zoomIn,this),this._zoomOutButton=this._createButton(this.options.zoomOutText,this.options.zoomOutTitle,e+"-out",i,this._zoomOut,this),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},_zoomIn:function(t){this._map.zoomIn(t.shiftKey?3:1)},_zoomOut:function(t){this._map.zoomOut(t.shiftKey?3:1)},_createButton:function(t,e,i,n,s,a){var r=o.DomUtil.create("a",i,n);r.innerHTML=t,r.href="#",r.title=e;var h=o.DomEvent.stopPropagation;return o.DomEvent.on(r,"click",h).on(r,"mousedown",h).on(r,"dblclick",h).on(r,"click",o.DomEvent.preventDefault).on(r,"click",s,a).on(r,"click",this._refocusOnMap,a),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";o.DomUtil.removeClass(this._zoomInButton,e),o.DomUtil.removeClass(this._zoomOutButton,e),t._zoom===t.getMinZoom()&&o.DomUtil.addClass(this._zoomOutButton,e),t._zoom===t.getMaxZoom()&&o.DomUtil.addClass(this._zoomInButton,e)}}),o.Map.mergeOptions({zoomControl:!0}),o.Map.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new o.Control.Zoom,this.addControl(this.zoomControl))}),o.control.zoom=function(t){return new o.Control.Zoom(t)},o.Control.Attribution=o.Control.extend({options:{position:"bottomright",prefix:'<a href="http://leafletjs.com" title="A JS library for interactive maps">Leaflet</a>'},initialize:function(t){o.setOptions(this,t),this._attributions={}},onAdd:function(t){this._container=o.DomUtil.create("div","leaflet-control-attribution"),o.DomEvent.disableClickPropagation(this._container);for(var e in t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return t.on("layeradd",this._onLayerAdd,this).on("layerremove",this._onLayerRemove,this),this._update(),this._container},onRemove:function(t){t.off("layeradd",this._onLayerAdd).off("layerremove",this._onLayerRemove)},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):void 0},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):void 0},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}},_onLayerAdd:function(t){t.layer.getAttribution&&this.addAttribution(t.layer.getAttribution())},_onLayerRemove:function(t){t.layer.getAttribution&&this.removeAttribution(t.layer.getAttribution())}}),o.Map.mergeOptions({attributionControl:!0}),o.Map.addInitHook(function(){this.options.attributionControl&&(this.attributionControl=(new o.Control.Attribution).addTo(this))}),o.control.attribution=function(t){return new o.Control.Attribution(t)},o.Control.Scale=o.Control.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0,updateWhenIdle:!1},onAdd:function(t){this._map=t;var e="leaflet-control-scale",i=o.DomUtil.create("div",e),n=this.options;return this._addScales(n,e,i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=o.DomUtil.create("div",e+"-line",i)),t.imperial&&(this._iScale=o.DomUtil.create("div",e+"-line",i))},_update:function(){var t=this._map.getBounds(),e=t.getCenter().lat,i=6378137*Math.PI*Math.cos(e*Math.PI/180),n=i*(t.getNorthEast().lng-t.getSouthWest().lng)/180,o=this._map.getSize(),s=this.options,a=0;o.x>0&&(a=n*(s.maxWidth/o.x)),this._updateScales(s,a)},_updateScales:function(t,e){t.metric&&e&&this._updateMetric(e),t.imperial&&e&&this._updateImperial(e)},_updateMetric:function(t){var e=this._getRoundNum(t);this._mScale.style.width=this._getScaleWidth(e/t)+"px",this._mScale.innerHTML=1e3>e?e+" m":e/1e3+" km"},_updateImperial:function(t){var e,i,n,o=3.2808399*t,s=this._iScale;o>5280?(e=o/5280,i=this._getRoundNum(e),s.style.width=this._getScaleWidth(i/e)+"px",s.innerHTML=i+" mi"):(n=this._getRoundNum(o),s.style.width=this._getScaleWidth(n/o)+"px",s.innerHTML=n+" ft")},_getScaleWidth:function(t){return Math.round(this.options.maxWidth*t)-10},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,e*i}}),o.control.scale=function(t){return new o.Control.Scale(t)},o.Control.Layers=o.Control.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0},initialize:function(t,e,i){o.setOptions(this,i),this._layers={},this._lastZIndex=0,this._handlingClick=!1;for(var n in t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){return this._initLayout(),this._update(),t.on("layeradd",this._onLayerChange,this).on("layerremove",this._onLayerChange,this),this._container},onRemove:function(t){t.off("layeradd",this._onLayerChange,this).off("layerremove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._update(),this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._update(),this},removeLayer:function(t){var e=o.stamp(t);return delete this._layers[e],this._update(),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=o.DomUtil.create("div",t);e.setAttribute("aria-haspopup",!0),o.Browser.touch?o.DomEvent.on(e,"click",o.DomEvent.stopPropagation):o.DomEvent.disableClickPropagation(e).disableScrollPropagation(e);var i=this._form=o.DomUtil.create("form",t+"-list");if(this.options.collapsed){o.Browser.android||o.DomEvent.on(e,"mouseover",this._expand,this).on(e,"mouseout",this._collapse,this);var n=this._layersLink=o.DomUtil.create("a",t+"-toggle",e);n.href="#",n.title="Layers",o.Browser.touch?o.DomEvent.on(n,"click",o.DomEvent.stop).on(n,"click",this._expand,this):o.DomEvent.on(n,"focus",this._expand,this),o.DomEvent.on(i,"click",function(){setTimeout(o.bind(this._onInputClick,this),0)},this),this._map.on("click",this._collapse,this)}else this._expand();this._baseLayersList=o.DomUtil.create("div",t+"-base",i),this._separator=o.DomUtil.create("div",t+"-separator",i),this._overlaysList=o.DomUtil.create("div",t+"-overlays",i),e.appendChild(i)},_addLayer:function(t,e,i){var n=o.stamp(t);this._layers[n]={layer:t,name:e,overlay:i},this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex))},_update:function(){if(this._container){this._baseLayersList.innerHTML="",this._overlaysList.innerHTML="";var t,e,i=!1,n=!1;for(t in this._layers)e=this._layers[t],this._addItem(e),n=n||e.overlay,i=i||!e.overlay;this._separator.style.display=n&&i?"":"none"}},_onLayerChange:function(t){var e=this._layers[o.stamp(t.layer)];if(e){this._handlingClick||this._update();var i=e.overlay?"layeradd"===t.type?"overlayadd":"overlayremove":"layeradd"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)}},_createRadioElement:function(t,i){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"';i&&(n+=' checked="checked"'),n+="/>";var o=e.createElement("div");return o.innerHTML=n,o.firstChild},_addItem:function(t){var i,n=e.createElement("label"),s=this._map.hasLayer(t.layer);t.overlay?(i=e.createElement("input"),i.type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=s):i=this._createRadioElement("leaflet-base-layers",s),i.layerId=o.stamp(t.layer),o.DomEvent.on(i,"click",this._onInputClick,this);var a=e.createElement("span");a.innerHTML=" "+t.name,n.appendChild(i),n.appendChild(a);var r=t.overlay?this._overlaysList:this._baseLayersList;return r.appendChild(n),n},_onInputClick:function(){var t,e,i,n=this._form.getElementsByTagName("input"),o=n.length;for(this._handlingClick=!0,t=0;o>t;t++)e=n[t],i=this._layers[e.layerId],e.checked&&!this._map.hasLayer(i.layer)?this._map.addLayer(i.layer):!e.checked&&this._map.hasLayer(i.layer)&&this._map.removeLayer(i.layer);this._handlingClick=!1,this._refocusOnMap()},_expand:function(){o.DomUtil.addClass(this._container,"leaflet-control-layers-expanded")},_collapse:function(){this._container.className=this._container.className.replace(" leaflet-control-layers-expanded","")}}),o.control.layers=function(t,e,i){return new o.Control.Layers(t,e,i)},o.PosAnimation=o.Class.extend({includes:o.Mixin.Events,run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._newPos=e,this.fire("start"),t.style[o.DomUtil.TRANSITION]="all "+(i||.25)+"s cubic-bezier(0,0,"+(n||.5)+",1)",o.DomEvent.on(t,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),o.DomUtil.setPosition(t,e),o.Util.falseFn(t.offsetWidth),this._stepTimer=setInterval(o.bind(this._onStep,this),50)},stop:function(){this._inProgress&&(o.DomUtil.setPosition(this._el,this._getPos()),this._onTransitionEnd(),o.Util.falseFn(this._el.offsetWidth))},_onStep:function(){var t=this._getPos();return t?(this._el._leaflet_pos=t,void this.fire("step")):void this._onTransitionEnd()},_transformRe:/([-+]?(?:\d*\.)?\d+)\D*, ([-+]?(?:\d*\.)?\d+)\D*\)/,_getPos:function(){var e,i,n,s=this._el,a=t.getComputedStyle(s);if(o.Browser.any3d){if(n=a[o.DomUtil.TRANSFORM].match(this._transformRe),!n)return;e=parseFloat(n[1]),i=parseFloat(n[2])}else e=parseFloat(a.left),i=parseFloat(a.top);return new o.Point(e,i,!0)},_onTransitionEnd:function(){o.DomEvent.off(this._el,o.DomUtil.TRANSITION_END,this._onTransitionEnd,this),this._inProgress&&(this._inProgress=!1,this._el.style[o.DomUtil.TRANSITION]="",this._el._leaflet_pos=this._newPos,clearInterval(this._stepTimer),this.fire("step").fire("end"))}}),o.Map.include({setView:function(t,e,n){if(e=e===i?this._zoom:this._limitZoom(e),t=this._limitCenter(o.latLng(t),e,this.options.maxBounds),n=n||{},this._panAnim&&this._panAnim.stop(),this._loaded&&!n.reset&&n!==!0){n.animate!==i&&(n.zoom=o.extend({animate:n.animate},n.zoom),n.pan=o.extend({animate:n.animate},n.pan));var s=this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(s)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},panBy:function(t,e){if(t=o.point(t).round(),e=e||{},!t.x&&!t.y)return this;if(this._panAnim||(this._panAnim=new o.PosAnimation,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){o.DomUtil.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t);this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){o.DomUtil.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1}}),o.PosAnimation=o.DomUtil.TRANSITION?o.PosAnimation:o.PosAnimation.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=o.DomUtil.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(),this._complete())},_animate:function(){this._animId=o.Util.requestAnimFrame(this._animate,this),this._step()},_step:function(){var t=+new Date-this._startTime,e=1e3*this._duration;e>t?this._runFrame(this._easeOut(t/e)):(this._runFrame(1),this._complete())},_runFrame:function(t){var e=this._startPos.add(this._offset.multiplyBy(t));o.DomUtil.setPosition(this._el,e),this.fire("step")},_complete:function(){o.Util.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),o.Map.mergeOptions({zoomAnimation:!0,zoomAnimationThreshold:4}),o.DomUtil.TRANSITION&&o.Map.addInitHook(function(){this._zoomAnimated=this.options.zoomAnimation&&o.DomUtil.TRANSITION&&o.Browser.any3d&&!o.Browser.android23&&!o.Browser.mobileOpera,this._zoomAnimated&&o.DomEvent.on(this._mapPane,o.DomUtil.TRANSITION_END,this._catchTransitionEnd,this)}),o.Map.include(o.DomUtil.TRANSITION?{_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/n),s=this._getCenterLayerPoint()._add(o);return i.animate===!0||this.getSize().contains(o)?(this.fire("movestart").fire("zoomstart"),this._animateZoom(t,e,s,n,null,!0),!0):!1},_animateZoom:function(t,e,i,n,s,a,r){r||(this._animatingZoom=!0),o.DomUtil.addClass(this._mapPane,"leaflet-zoom-anim"),this._animateToCenter=t,this._animateToZoom=e,o.Draggable&&(o.Draggable._disabled=!0),o.Util.requestAnimFrame(function(){this.fire("zoomanim",{center:t,zoom:e,origin:i,scale:n,delta:s,backwards:a})},this)},_onZoomTransitionEnd:function(){this._animatingZoom=!1,o.DomUtil.removeClass(this._mapPane,"leaflet-zoom-anim"),this._resetView(this._animateToCenter,this._animateToZoom,!0,!0),o.Draggable&&(o.Draggable._disabled=!1)}}:{}),o.TileLayer.include({_animateZoom:function(t){this._animating||(this._animating=!0,this._prepareBgBuffer());var e=this._bgBuffer,i=o.DomUtil.TRANSFORM,n=t.delta?o.DomUtil.getTranslateString(t.delta):e.style[i],s=o.DomUtil.getScaleString(t.scale,t.origin);e.style[i]=t.backwards?s+" "+n:n+" "+s},_endZoomAnim:function(){var t=this._tileContainer,e=this._bgBuffer;t.style.visibility="",t.parentNode.appendChild(t),o.Util.falseFn(e.offsetWidth),this._animating=!1},_clearBgBuffer:function(){var t=this._map;!t||t._animatingZoom||t.touchZoom._zooming||(this._bgBuffer.innerHTML="",this._bgBuffer.style[o.DomUtil.TRANSFORM]="")},_prepareBgBuffer:function(){var t=this._tileContainer,e=this._bgBuffer,i=this._getLoadedTilesPercentage(e),n=this._getLoadedTilesPercentage(t);return e&&i>.5&&.5>n?(t.style.visibility="hidden",void this._stopLoadingImages(t)):(e.style.visibility="hidden",e.style[o.DomUtil.TRANSFORM]="",this._tileContainer=e,e=this._bgBuffer=t,this._stopLoadingImages(e),void clearTimeout(this._clearBgBufferTimer))},_getLoadedTilesPercentage:function(t){var e,i,n=t.getElementsByTagName("img"),o=0;for(e=0,i=n.length;i>e;e++)n[e].complete&&o++;return o/i},_stopLoadingImages:function(t){var e,i,n,s=Array.prototype.slice.call(t.getElementsByTagName("img"));for(e=0,i=s.length;i>e;e++)n=s[e],n.complete||(n.onload=o.Util.falseFn,n.onerror=o.Util.falseFn,n.src=o.Util.emptyImageUrl,n.parentNode.removeChild(n))}}),o.Map.include({_defaultLocateOptions:{watch:!1,setView:!1,maxZoom:1/0,timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(t){if(t=this._locateOptions=o.extend(this._defaultLocateOptions,t),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o.bind(this._handleGeolocationResponse,this),i=o.bind(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})},_handleGeolocationResponse:function(t){var e=t.coords.latitude,i=t.coords.longitude,n=new o.LatLng(e,i),s=180*t.coords.accuracy/40075017,a=s/Math.cos(o.LatLng.DEG_TO_RAD*e),r=o.latLngBounds([e-s,i-a],[e+s,i+a]),h=this._locateOptions;if(h.setView){var l=Math.min(this.getBoundsZoom(r),h.maxZoom);this.setView(n,l)}var u={latlng:n,bounds:r,timestamp:t.timestamp};for(var c in t.coords)"number"==typeof t.coords[c]&&(u[c]=t.coords[c]);this.fire("locationfound",u)}})}(window,document); \ No newline at end of file diff --git a/assets/js/sig/leaflet/leaflet.markercluster-src.js b/assets/js/sig/leaflet/leaflet.markercluster-src.js new file mode 100755 index 0000000000000000000000000000000000000000..7f147120b69ad16e434b810d75ab81f687cede19 --- /dev/null +++ b/assets/js/sig/leaflet/leaflet.markercluster-src.js @@ -0,0 +1,2006 @@ +/* +Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps. +https://github.com/Leaflet/Leaflet.markercluster +(c) 2012-2013, Dave Leaver, smartrak +*/ +(function (window, document, undefined) { +/* +* L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within +*/ + +L.MarkerClusterGroup = L.FeatureGroup.extend({ + +options: { +maxClusterRadius: 80, //A cluster will cover at most this many pixels from its center +iconCreateFunction: null, + +spiderfyOnMaxZoom: true, +showCoverageOnHover: true, +zoomToBoundsOnClick: true, +singleMarkerMode: false, + +disableClusteringAtZoom: null, + +// Setting this to false prevents the removal of any clusters outside of the viewpoint, which +// is the default behaviour for performance reasons. +removeOutsideVisibleBounds: true, + +//Whether to animate adding markers after adding the MarkerClusterGroup to the map +// If you are adding individual markers set to true, if adding bulk markers leave false for massive performance gains. +animateAddingMarkers: false, + +//Increase to increase the distance away that spiderfied markers appear from the center +spiderfyDistanceMultiplier: 1, + +//Options to pass to the L.Polygon constructor +polygonOptions: {} +}, + +initialize: function (options) { +L.Util.setOptions(this, options); +if (!this.options.iconCreateFunction) { +this.options.iconCreateFunction = this._defaultIconCreateFunction; +} + +this._featureGroup = L.featureGroup(); +this._featureGroup.on(L.FeatureGroup.EVENTS, this._propagateEvent, this); + +this._nonPointGroup = L.featureGroup(); +this._nonPointGroup.on(L.FeatureGroup.EVENTS, this._propagateEvent, this); + +this._inZoomAnimation = 0; +this._needsClustering = []; +this._needsRemoving = []; //Markers removed while we aren't on the map need to be kept track of +//The bounds of the currently shown area (from _getExpandedVisibleBounds) Updated on zoom/move +this._currentShownBounds = null; +}, + +addLayer: function (layer) { + +if (layer instanceof L.LayerGroup) { +var array = []; +for (var i in layer._layers) { +array.push(layer._layers[i]); +} +return this.addLayers(array); +} + +//Don't cluster non point data +if (!layer.getLatLng) { +this._nonPointGroup.addLayer(layer); +return this; +} + +if (!this._map) { +this._needsClustering.push(layer); +return this; +} + +if (this.hasLayer(layer)) { +return this; +} + + +//If we have already clustered we'll need to add this one to a cluster + +if (this._unspiderfy) { +this._unspiderfy(); +} + +this._addLayer(layer, this._maxZoom); + +//Work out what is visible +var visibleLayer = layer, +currentZoom = this._map.getZoom(); +if (layer.__parent) { +while (visibleLayer.__parent._zoom >= currentZoom) { +visibleLayer = visibleLayer.__parent; +} +} + +if (this._currentShownBounds.contains(visibleLayer.getLatLng())) { +if (this.options.animateAddingMarkers) { +this._animationAddLayer(layer, visibleLayer); +} else { +this._animationAddLayerNonAnimated(layer, visibleLayer); +} +} +return this; +}, + +removeLayer: function (layer) { + +//Non point layers +if (!layer.getLatLng) { +this._nonPointGroup.removeLayer(layer); +return this; +} + +if (!this._map) { +if (!this._arraySplice(this._needsClustering, layer) && this.hasLayer(layer)) { +this._needsRemoving.push(layer); +} +return this; +} + +if (!layer.__parent) { +return this; +} + +if (this._unspiderfy) { +this._unspiderfy(); +this._unspiderfyLayer(layer); +} + +//Remove the marker from clusters +this._removeLayer(layer, true); + +if (this._featureGroup.hasLayer(layer)) { +this._featureGroup.removeLayer(layer); +if (layer.setOpacity) { +layer.setOpacity(1); +} +} + +return this; +}, + +//Takes an array of markers and adds them in bulk +addLayers: function (layersArray) { +var i, l, m, +onMap = this._map, +fg = this._featureGroup, +npg = this._nonPointGroup; + +for (i = 0, l = layersArray.length; i < l; i++) { +m = layersArray[i]; + +//Not point data, can't be clustered +if (!m.getLatLng) { +npg.addLayer(m); +continue; +} + +if (this.hasLayer(m)) { +continue; +} + +if (!onMap) { +this._needsClustering.push(m); +continue; +} + +this._addLayer(m, this._maxZoom); + +//If we just made a cluster of size 2 then we need to remove the other marker from the map (if it is) or we never will +if (m.__parent) { +if (m.__parent.getChildCount() === 2) { +var markers = m.__parent.getAllChildMarkers(), +otherMarker = markers[0] === m ? markers[1] : markers[0]; +fg.removeLayer(otherMarker); +} +} +} + +if (onMap) { +//Update the icons of all those visible clusters that were affected +fg.eachLayer(function (c) { +if (c instanceof L.MarkerCluster && c._iconNeedsUpdate) { +c._updateIcon(); +} +}); + +this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); +} + +return this; +}, + +//Takes an array of markers and removes them in bulk +removeLayers: function (layersArray) { +var i, l, m, +fg = this._featureGroup, +npg = this._nonPointGroup; + +if (!this._map) { +for (i = 0, l = layersArray.length; i < l; i++) { +m = layersArray[i]; +this._arraySplice(this._needsClustering, m); +npg.removeLayer(m); +} +return this; +} + +for (i = 0, l = layersArray.length; i < l; i++) { +m = layersArray[i]; + +if (!m.__parent) { +npg.removeLayer(m); +continue; +} + +this._removeLayer(m, true, true); + +if (fg.hasLayer(m)) { +fg.removeLayer(m); +if (m.setOpacity) { +m.setOpacity(1); +} +} +} + +//Fix up the clusters and markers on the map +this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); + +fg.eachLayer(function (c) { +if (c instanceof L.MarkerCluster) { +c._updateIcon(); +} +}); + +return this; +}, + +//Removes all layers from the MarkerClusterGroup +clearLayers: function () { +//Need our own special implementation as the LayerGroup one doesn't work for us + +//If we aren't on the map (yet), blow away the markers we know of +if (!this._map) { +this._needsClustering = []; +delete this._gridClusters; +delete this._gridUnclustered; +} + +if (this._noanimationUnspiderfy) { +this._noanimationUnspiderfy(); +} + +//Remove all the visible layers +this._featureGroup.clearLayers(); +this._nonPointGroup.clearLayers(); + +this.eachLayer(function (marker) { +delete marker.__parent; +}); + +if (this._map) { +//Reset _topClusterLevel and the DistanceGrids +this._generateInitialClusters(); +} + +return this; +}, + +//Override FeatureGroup.getBounds as it doesn't work +getBounds: function () { +var bounds = new L.LatLngBounds(); +if (this._topClusterLevel) { +bounds.extend(this._topClusterLevel._bounds); +} else { +for (var i = this._needsClustering.length - 1; i >= 0; i--) { +bounds.extend(this._needsClustering[i].getLatLng()); +} +} + +//TODO: Can remove this isValid test when leaflet 0.6 is released +var nonPointBounds = this._nonPointGroup.getBounds(); +if (nonPointBounds.isValid()) { +bounds.extend(nonPointBounds); +} + +return bounds; +}, + +//Overrides LayerGroup.eachLayer +eachLayer: function (method, context) { +var markers = this._needsClustering.slice(), +i; + +if (this._topClusterLevel) { +this._topClusterLevel.getAllChildMarkers(markers); +} + +for (i = markers.length - 1; i >= 0; i--) { +method.call(context, markers[i]); +} + +this._nonPointGroup.eachLayer(method, context); +}, + +//Returns true if the given layer is in this MarkerClusterGroup +hasLayer: function (layer) { +if (!layer) { +return false; +} + +var i, anArray = this._needsClustering; + +for (i = anArray.length - 1; i >= 0; i--) { +if (anArray[i] === layer) { +return true; +} +} + +anArray = this._needsRemoving; +for (i = anArray.length - 1; i >= 0; i--) { +if (anArray[i] === layer) { +return false; +} +} + +return !!(layer.__parent && layer.__parent._group === this) || this._nonPointGroup.hasLayer(layer); +}, + +//Zoom down to show the given layer (spiderfying if necessary) then calls the callback +zoomToShowLayer: function (layer, callback) { + +var showMarker = function () { +if ((layer._icon || layer.__parent._icon) && !this._inZoomAnimation) { +this._map.off('moveend', showMarker, this); +this.off('animationend', showMarker, this); + +if (layer._icon) { +callback(); +} else if (layer.__parent._icon) { +var afterSpiderfy = function () { +this.off('spiderfied', afterSpiderfy, this); +callback(); +}; + +this.on('spiderfied', afterSpiderfy, this); +layer.__parent.spiderfy(); +} +} +}; + +if (layer._icon) { +callback(); +} else if (layer.__parent._zoom < this._map.getZoom()) { +//Layer should be visible now but isn't on screen, just pan over to it +this._map.on('moveend', showMarker, this); +if (!layer._icon) { +this._map.panTo(layer.getLatLng()); +} +} else { +this._map.on('moveend', showMarker, this); +this.on('animationend', showMarker, this); +this._map.setView(layer.getLatLng(), layer.__parent._zoom + 1); +layer.__parent.zoomToBounds(); +} +}, + +//Overrides FeatureGroup.onAdd +onAdd: function (map) { +this._map = map; +var i, l, layer; + +if (!isFinite(this._map.getMaxZoom())) { +throw "Map has no maxZoom specified"; +} + +this._featureGroup.onAdd(map); +this._nonPointGroup.onAdd(map); + +if (!this._gridClusters) { +this._generateInitialClusters(); +} + +for (i = 0, l = this._needsRemoving.length; i < l; i++) { +layer = this._needsRemoving[i]; +this._removeLayer(layer, true); +} +this._needsRemoving = []; + +for (i = 0, l = this._needsClustering.length; i < l; i++) { +layer = this._needsClustering[i]; + +//If the layer doesn't have a getLatLng then we can't cluster it, so add it to our child featureGroup +if (!layer.getLatLng) { +this._featureGroup.addLayer(layer); +continue; +} + + +if (layer.__parent) { +continue; +} +this._addLayer(layer, this._maxZoom); +} +this._needsClustering = []; + + +this._map.on('zoomend', this._zoomEnd, this); +this._map.on('moveend', this._moveEnd, this); + +if (this._spiderfierOnAdd) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely +this._spiderfierOnAdd(); +} + +this._bindEvents(); + + +//Actually add our markers to the map: + +//Remember the current zoom level and bounds +this._zoom = this._map.getZoom(); +this._currentShownBounds = this._getExpandedVisibleBounds(); + +//Make things appear on the map +this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds); +}, + +//Overrides FeatureGroup.onRemove +onRemove: function (map) { +map.off('zoomend', this._zoomEnd, this); +map.off('moveend', this._moveEnd, this); + +this._unbindEvents(); + +//In case we are in a cluster animation +this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); + +if (this._spiderfierOnRemove) { //TODO FIXME: Not sure how to have spiderfier add something on here nicely +this._spiderfierOnRemove(); +} + +//Clean up all the layers we added to the map +this._featureGroup.onRemove(map); +this._nonPointGroup.onRemove(map); + +this._featureGroup.clearLayers(); + +this._map = null; +}, + +getVisibleParent: function (marker) { +var vMarker = marker; +while (vMarker !== null && !vMarker._icon) { +vMarker = vMarker.__parent; +} +return vMarker; +}, + +//Remove the given object from the given array +_arraySplice: function (anArray, obj) { +for (var i = anArray.length - 1; i >= 0; i--) { +if (anArray[i] === obj) { +anArray.splice(i, 1); +return true; +} +} +}, + +//Internal function for removing a marker from everything. +//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions) +_removeLayer: function (marker, removeFromDistanceGrid, dontUpdateMap) { +var gridClusters = this._gridClusters, +gridUnclustered = this._gridUnclustered, +fg = this._featureGroup, +map = this._map; + +//Remove the marker from distance clusters it might be in +if (removeFromDistanceGrid) { +for (var z = this._maxZoom; z >= 0; z--) { +if (!gridUnclustered[z].removeObject(marker, map.project(marker.getLatLng(), z))) { +break; +} +} +} + +//Work our way up the clusters removing them as we go if required +var cluster = marker.__parent, +markers = cluster._markers, +otherMarker; + +//Remove the marker from the immediate parents marker list +this._arraySplice(markers, marker); + +while (cluster) { +cluster._childCount--; + +if (cluster._zoom < 0) { +//Top level, do nothing +break; +} else if (removeFromDistanceGrid && cluster._childCount <= 1) { //Cluster no longer required +//We need to push the other marker up to the parent +otherMarker = cluster._markers[0] === marker ? cluster._markers[1] : cluster._markers[0]; + +//Update distance grid +gridClusters[cluster._zoom].removeObject(cluster, map.project(cluster._cLatLng, cluster._zoom)); +gridUnclustered[cluster._zoom].addObject(otherMarker, map.project(otherMarker.getLatLng(), cluster._zoom)); + +//Move otherMarker up to parent +this._arraySplice(cluster.__parent._childClusters, cluster); +cluster.__parent._markers.push(otherMarker); +otherMarker.__parent = cluster.__parent; + +if (cluster._icon) { +//Cluster is currently on the map, need to put the marker on the map instead +fg.removeLayer(cluster); +if (!dontUpdateMap) { +fg.addLayer(otherMarker); +} +} +} else { +cluster._recalculateBounds(); +if (!dontUpdateMap || !cluster._icon) { +cluster._updateIcon(); +} +} + +cluster = cluster.__parent; +} + +delete marker.__parent; +}, + +_propagateEvent: function (e) { +if (e.layer instanceof L.MarkerCluster) { +e.type = 'cluster' + e.type; +} + +this.fire(e.type, e); +}, + +//Default functionality +_defaultIconCreateFunction: function (cluster) { +var childCount = cluster.getChildCount(); + +var c = ' marker-cluster-'; +if (childCount < 10) { +c += 'small'; +} else if (childCount < 100) { +c += 'medium'; +} else { +c += 'large'; +} + +return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) }); +}, + +_bindEvents: function () { +var map = this._map, +spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, +showCoverageOnHover = this.options.showCoverageOnHover, +zoomToBoundsOnClick = this.options.zoomToBoundsOnClick; + +//Zoom on cluster click or spiderfy if we are at the lowest level +if (spiderfyOnMaxZoom || zoomToBoundsOnClick) { +this.on('clusterclick', this._zoomOrSpiderfy, this); +} + +//Show convex hull (boundary) polygon on mouse over +if (showCoverageOnHover) { +this.on('clustermouseover', this._showCoverage, this); +this.on('clustermouseout', this._hideCoverage, this); +map.on('zoomend', this._hideCoverage, this); +map.on('layerremove', this._hideCoverageOnRemove, this); +} +}, + +_zoomOrSpiderfy: function (e) { +var map = this._map; +if (map.getMaxZoom() === map.getZoom()) { +if (this.options.spiderfyOnMaxZoom) { +e.layer.spiderfy(); +} +} else if (this.options.zoomToBoundsOnClick) { +e.layer.zoomToBounds(); +} +}, + +_showCoverage: function (e) { +var map = this._map; +if (this._inZoomAnimation) { +return; +} +if (this._shownPolygon) { +map.removeLayer(this._shownPolygon); +} +if (e.layer.getChildCount() > 2 && e.layer !== this._spiderfied) { +this._shownPolygon = new L.Polygon(e.layer.getConvexHull(), this.options.polygonOptions); +map.addLayer(this._shownPolygon); +} +}, + +_hideCoverage: function () { +if (this._shownPolygon) { +this._map.removeLayer(this._shownPolygon); +this._shownPolygon = null; +} +}, + +_hideCoverageOnRemove: function (e) { +if (e.layer === this) { +this._hideCoverage(); +} +}, + +_unbindEvents: function () { +var spiderfyOnMaxZoom = this.options.spiderfyOnMaxZoom, +showCoverageOnHover = this.options.showCoverageOnHover, +zoomToBoundsOnClick = this.options.zoomToBoundsOnClick, +map = this._map; + +if (spiderfyOnMaxZoom || zoomToBoundsOnClick) { +this.off('clusterclick', this._zoomOrSpiderfy, this); +} +if (showCoverageOnHover) { +this.off('clustermouseover', this._showCoverage, this); +this.off('clustermouseout', this._hideCoverage, this); +map.off('zoomend', this._hideCoverage, this); +map.off('layerremove', this._hideCoverageOnRemove, this); +} +}, + +_zoomEnd: function () { +if (!this._map) { //May have been removed from the map by a zoomEnd handler +return; +} +this._mergeSplitClusters(); + +this._zoom = this._map._zoom; +this._currentShownBounds = this._getExpandedVisibleBounds(); +}, + +_moveEnd: function () { +if (this._inZoomAnimation) { +return; +} + +var newBounds = this._getExpandedVisibleBounds(); + +this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, newBounds); +this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, newBounds); + +this._currentShownBounds = newBounds; +return; +}, + +_generateInitialClusters: function () { +var maxZoom = this._map.getMaxZoom(), +radius = this.options.maxClusterRadius; + +if (this.options.disableClusteringAtZoom) { +maxZoom = this.options.disableClusteringAtZoom - 1; +} +this._maxZoom = maxZoom; +this._gridClusters = {}; +this._gridUnclustered = {}; + +//Set up DistanceGrids for each zoom +for (var zoom = maxZoom; zoom >= 0; zoom--) { +this._gridClusters[zoom] = new L.DistanceGrid(radius); +this._gridUnclustered[zoom] = new L.DistanceGrid(radius); +} + +this._topClusterLevel = new L.MarkerCluster(this, -1); +}, + +//Zoom: Zoom to start adding at (Pass this._maxZoom to start at the bottom) +_addLayer: function (layer, zoom) { +var gridClusters = this._gridClusters, +gridUnclustered = this._gridUnclustered, +markerPoint, z; + +if (this.options.singleMarkerMode) { +layer.options.icon = this.options.iconCreateFunction({ +getChildCount: function () { +return 1; +}, +getAllChildMarkers: function () { +return [layer]; +} +}); +} + +//Find the lowest zoom level to slot this one in +for (; zoom >= 0; zoom--) { +markerPoint = this._map.project(layer.getLatLng(), zoom); // calculate pixel position + +//Try find a cluster close by +var closest = gridClusters[zoom].getNearObject(markerPoint); +if (closest) { +closest._addChild(layer); +layer.__parent = closest; +return; +} + +//Try find a marker close by to form a new cluster with +closest = gridUnclustered[zoom].getNearObject(markerPoint); +if (closest) { +var parent = closest.__parent; +if (parent) { +this._removeLayer(closest, false); +} + +//Create new cluster with these 2 in it + +var newCluster = new L.MarkerCluster(this, zoom, closest, layer); +gridClusters[zoom].addObject(newCluster, this._map.project(newCluster._cLatLng, zoom)); +closest.__parent = newCluster; +layer.__parent = newCluster; + +//First create any new intermediate parent clusters that don't exist +var lastParent = newCluster; +for (z = zoom - 1; z > parent._zoom; z--) { +lastParent = new L.MarkerCluster(this, z, lastParent); +gridClusters[z].addObject(lastParent, this._map.project(closest.getLatLng(), z)); +} +parent._addChild(lastParent); + +//Remove closest from this zoom level and any above that it is in, replace with newCluster +for (z = zoom; z >= 0; z--) { +if (!gridUnclustered[z].removeObject(closest, this._map.project(closest.getLatLng(), z))) { +break; +} +} + +return; +} + +//Didn't manage to cluster in at this zoom, record us as a marker here and continue upwards +gridUnclustered[zoom].addObject(layer, markerPoint); +} + +//Didn't get in anything, add us to the top +this._topClusterLevel._addChild(layer); +layer.__parent = this._topClusterLevel; +return; +}, + +//Merge and split any existing clusters that are too big or small +_mergeSplitClusters: function () { +if (this._zoom < this._map._zoom) { //Zoom in, split +this._animationStart(); +//Remove clusters now off screen +this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, this._zoom, this._getExpandedVisibleBounds()); + +this._animationZoomIn(this._zoom, this._map._zoom); + +} else if (this._zoom > this._map._zoom) { //Zoom out, merge +this._animationStart(); + +this._animationZoomOut(this._zoom, this._map._zoom); +} else { +this._moveEnd(); +} +}, + +//Gets the maps visible bounds expanded in each direction by the size of the screen (so the user cannot see an area we do not cover in one pan) +_getExpandedVisibleBounds: function () { +if (!this.options.removeOutsideVisibleBounds) { +return this.getBounds(); +} + +var map = this._map, +bounds = map.getBounds(), +sw = bounds._southWest, +ne = bounds._northEast, +latDiff = L.Browser.mobile ? 0 : Math.abs(sw.lat - ne.lat), +lngDiff = L.Browser.mobile ? 0 : Math.abs(sw.lng - ne.lng); + +return new L.LatLngBounds( +new L.LatLng(sw.lat - latDiff, sw.lng - lngDiff, true), +new L.LatLng(ne.lat + latDiff, ne.lng + lngDiff, true)); +}, + +//Shared animation code +_animationAddLayerNonAnimated: function (layer, newCluster) { +if (newCluster === layer) { +this._featureGroup.addLayer(layer); +} else if (newCluster._childCount === 2) { +newCluster._addToMap(); + +var markers = newCluster.getAllChildMarkers(); +this._featureGroup.removeLayer(markers[0]); +this._featureGroup.removeLayer(markers[1]); +} else { +newCluster._updateIcon(); +} +} +}); + +L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? { + +//Non Animated versions of everything +_animationStart: function () { +//Do nothing... +}, +_animationZoomIn: function (previousZoomLevel, newZoomLevel) { +this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); +this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); +}, +_animationZoomOut: function (previousZoomLevel, newZoomLevel) { +this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel); +this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); +}, +_animationAddLayer: function (layer, newCluster) { +this._animationAddLayerNonAnimated(layer, newCluster); +} +} : { + +//Animated versions here +_animationStart: function () { +this._map._mapPane.className += ' leaflet-cluster-anim'; +this._inZoomAnimation++; +}, +_animationEnd: function () { +if (this._map) { +this._map._mapPane.className = this._map._mapPane.className.replace(' leaflet-cluster-anim', ''); +} +this._inZoomAnimation--; +this.fire('animationend'); +}, +_animationZoomIn: function (previousZoomLevel, newZoomLevel) { +var me = this, +bounds = this._getExpandedVisibleBounds(), +fg = this._featureGroup, +i; + +//Add all children of current clusters to map and remove those clusters from map +this._topClusterLevel._recursively(bounds, previousZoomLevel, 0, function (c) { +var startPos = c._latlng, +markers = c._markers, +m; + +if (!bounds.contains(startPos)) { +startPos = null; +} + +if (c._isSingleParent() && previousZoomLevel + 1 === newZoomLevel) { //Immediately add the new child and remove us +fg.removeLayer(c); +c._recursivelyAddChildrenToMap(null, newZoomLevel, bounds); +} else { +//Fade out old cluster +c.setOpacity(0); +c._recursivelyAddChildrenToMap(startPos, newZoomLevel, bounds); +} + +//Remove all markers that aren't visible any more +//TODO: Do we actually need to do this on the higher levels too? +for (i = markers.length - 1; i >= 0; i--) { +m = markers[i]; +if (!bounds.contains(m._latlng)) { +fg.removeLayer(m); +} +} + +}); + +this._forceLayout(); + +//Update opacities +me._topClusterLevel._recursivelyBecomeVisible(bounds, newZoomLevel); +//TODO Maybe? Update markers in _recursivelyBecomeVisible +fg.eachLayer(function (n) { +if (!(n instanceof L.MarkerCluster) && n._icon) { +n.setOpacity(1); +} +}); + +//update the positions of the just added clusters/markers +me._topClusterLevel._recursively(bounds, previousZoomLevel, newZoomLevel, function (c) { +c._recursivelyRestoreChildPositions(newZoomLevel); +}); + +//Remove the old clusters and close the zoom animation + +setTimeout(function () { +//update the positions of the just added clusters/markers +me._topClusterLevel._recursively(bounds, previousZoomLevel, 0, function (c) { +fg.removeLayer(c); +c.setOpacity(1); +}); + +me._animationEnd(); +}, 200); +}, + +_animationZoomOut: function (previousZoomLevel, newZoomLevel) { +this._animationZoomOutSingle(this._topClusterLevel, previousZoomLevel - 1, newZoomLevel); + +//Need to add markers for those that weren't on the map before but are now +this._topClusterLevel._recursivelyAddChildrenToMap(null, newZoomLevel, this._getExpandedVisibleBounds()); +//Remove markers that were on the map before but won't be now +this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds, previousZoomLevel, this._getExpandedVisibleBounds()); +}, +_animationZoomOutSingle: function (cluster, previousZoomLevel, newZoomLevel) { +var bounds = this._getExpandedVisibleBounds(); + +//Animate all of the markers in the clusters to move to their cluster center point +cluster._recursivelyAnimateChildrenInAndAddSelfToMap(bounds, previousZoomLevel + 1, newZoomLevel); + +var me = this; + +//Update the opacity (If we immediately set it they won't animate) +this._forceLayout(); +cluster._recursivelyBecomeVisible(bounds, newZoomLevel); + +//TODO: Maybe use the transition timing stuff to make this more reliable +//When the animations are done, tidy up +setTimeout(function () { + +//This cluster stopped being a cluster before the timeout fired +if (cluster._childCount === 1) { +var m = cluster._markers[0]; +//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it +m.setLatLng(m.getLatLng()); +m.setOpacity(1); +} else { +cluster._recursively(bounds, newZoomLevel, 0, function (c) { +c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel + 1); +}); +} +me._animationEnd(); +}, 200); +}, +_animationAddLayer: function (layer, newCluster) { +var me = this, +fg = this._featureGroup; + +fg.addLayer(layer); +if (newCluster !== layer) { +if (newCluster._childCount > 2) { //Was already a cluster + +newCluster._updateIcon(); +this._forceLayout(); +this._animationStart(); + +layer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng())); +layer.setOpacity(0); + +setTimeout(function () { +fg.removeLayer(layer); +layer.setOpacity(1); + +me._animationEnd(); +}, 200); + +} else { //Just became a cluster +this._forceLayout(); + +me._animationStart(); +me._animationZoomOutSingle(newCluster, this._map.getMaxZoom(), this._map.getZoom()); +} +} +}, + +//Force a browser layout of stuff in the map +// Should apply the current opacity and location to all elements so we can update them again for an animation +_forceLayout: function () { +//In my testing this works, infact offsetWidth of any element seems to work. +//Could loop all this._layers and do this for each _icon if it stops working + +L.Util.falseFn(document.body.offsetWidth); +} +}); + +L.markerClusterGroup = function (options) { +return new L.MarkerClusterGroup(options); +}; + + +L.MarkerCluster = L.Marker.extend({ +initialize: function (group, zoom, a, b) { + +L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), { icon: this }); + + +this._group = group; +this._zoom = zoom; + +this._markers = []; +this._childClusters = []; +this._childCount = 0; +this._iconNeedsUpdate = true; + +this._bounds = new L.LatLngBounds(); + +if (a) { +this._addChild(a); +} +if (b) { +this._addChild(b); +} +}, + +//Recursively retrieve all child markers of this cluster +getAllChildMarkers: function (storageArray) { +storageArray = storageArray || []; + +for (var i = this._childClusters.length - 1; i >= 0; i--) { +this._childClusters[i].getAllChildMarkers(storageArray); +} + +for (var j = this._markers.length - 1; j >= 0; j--) { +storageArray.push(this._markers[j]); +} + +return storageArray; +}, + +//Returns the count of how many child markers we have +getChildCount: function () { +return this._childCount; +}, + +//Zoom to the extents of this cluster +zoomToBounds: function () { +this._group._map.fitBounds(this._bounds); +}, + +getBounds: function () { +var bounds = new L.LatLngBounds(); +bounds.extend(this._bounds); +return bounds; +}, + +_updateIcon: function () { +this._iconNeedsUpdate = true; +if (this._icon) { +this.setIcon(this); +} +}, + +//Cludge for Icon, we pretend to be an icon for performance +createIcon: function () { +if (this._iconNeedsUpdate) { +this._iconObj = this._group.options.iconCreateFunction(this); +this._iconNeedsUpdate = false; +} +return this._iconObj.createIcon(); +}, +createShadow: function () { +return this._iconObj.createShadow(); +}, + + +_addChild: function (new1, isNotificationFromChild) { + +this._iconNeedsUpdate = true; +this._expandBounds(new1); + +if (new1 instanceof L.MarkerCluster) { +if (!isNotificationFromChild) { +this._childClusters.push(new1); +new1.__parent = this; +} +this._childCount += new1._childCount; +} else { +if (!isNotificationFromChild) { +this._markers.push(new1); +} +this._childCount++; +} + +if (this.__parent) { +this.__parent._addChild(new1, true); +} +}, + +//Expand our bounds and tell our parent to +_expandBounds: function (marker) { +var addedCount, +addedLatLng = marker._wLatLng || marker._latlng; + +if (marker instanceof L.MarkerCluster) { +this._bounds.extend(marker._bounds); +addedCount = marker._childCount; +} else { +this._bounds.extend(addedLatLng); +addedCount = 1; +} + +if (!this._cLatLng) { +// when clustering, take position of the first point as the cluster center +this._cLatLng = marker._cLatLng || addedLatLng; +} + +// when showing clusters, take weighted average of all points as cluster center +var totalCount = this._childCount + addedCount; + +//Calculate weighted latlng for display +if (!this._wLatLng) { +this._latlng = this._wLatLng = new L.LatLng(addedLatLng.lat, addedLatLng.lng); +} else { +this._wLatLng.lat = (addedLatLng.lat * addedCount + this._wLatLng.lat * this._childCount) / totalCount; +this._wLatLng.lng = (addedLatLng.lng * addedCount + this._wLatLng.lng * this._childCount) / totalCount; +} +}, + +//Set our markers position as given and add it to the map +_addToMap: function (startPos) { +if (startPos) { +this._backupLatlng = this._latlng; +this.setLatLng(startPos); +} +this._group._featureGroup.addLayer(this); +}, + +_recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) { +this._recursively(bounds, 0, maxZoom - 1, +function (c) { +var markers = c._markers, +i, m; +for (i = markers.length - 1; i >= 0; i--) { +m = markers[i]; + +//Only do it if the icon is still on the map +if (m._icon) { +m._setPos(center); +m.setOpacity(0); +} +} +}, +function (c) { +var childClusters = c._childClusters, +j, cm; +for (j = childClusters.length - 1; j >= 0; j--) { +cm = childClusters[j]; +if (cm._icon) { +cm._setPos(center); +cm.setOpacity(0); +} +} +} +); +}, + +_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, previousZoomLevel, newZoomLevel) { +this._recursively(bounds, newZoomLevel, 0, +function (c) { +c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel); + +//TODO: depthToAnimateIn affects _isSingleParent, if there is a multizoom we may/may not be. +//As a hack we only do a animation free zoom on a single level zoom, if someone does multiple levels then we always animate +if (c._isSingleParent() && previousZoomLevel - 1 === newZoomLevel) { +c.setOpacity(1); +c._recursivelyRemoveChildrenFromMap(bounds, previousZoomLevel); //Immediately remove our children as we are replacing them. TODO previousBounds not bounds +} else { +c.setOpacity(0); +} + +c._addToMap(); +} +); +}, + +_recursivelyBecomeVisible: function (bounds, zoomLevel) { +this._recursively(bounds, 0, zoomLevel, null, function (c) { +c.setOpacity(1); +}); +}, + +_recursivelyAddChildrenToMap: function (startPos, zoomLevel, bounds) { +this._recursively(bounds, -1, zoomLevel, +function (c) { +if (zoomLevel === c._zoom) { +return; +} + +//Add our child markers at startPos (so they can be animated out) +for (var i = c._markers.length - 1; i >= 0; i--) { +var nm = c._markers[i]; + +if (!bounds.contains(nm._latlng)) { +continue; +} + +if (startPos) { +nm._backupLatlng = nm.getLatLng(); + +nm.setLatLng(startPos); +if (nm.setOpacity) { +nm.setOpacity(0); +} +} + +c._group._featureGroup.addLayer(nm); +} +}, +function (c) { +c._addToMap(startPos); +} +); +}, + +_recursivelyRestoreChildPositions: function (zoomLevel) { +//Fix positions of child markers +for (var i = this._markers.length - 1; i >= 0; i--) { +var nm = this._markers[i]; +if (nm._backupLatlng) { +nm.setLatLng(nm._backupLatlng); +delete nm._backupLatlng; +} +} + +if (zoomLevel - 1 === this._zoom) { +//Reposition child clusters +for (var j = this._childClusters.length - 1; j >= 0; j--) { +this._childClusters[j]._restorePosition(); +} +} else { +for (var k = this._childClusters.length - 1; k >= 0; k--) { +this._childClusters[k]._recursivelyRestoreChildPositions(zoomLevel); +} +} +}, + +_restorePosition: function () { +if (this._backupLatlng) { +this.setLatLng(this._backupLatlng); +delete this._backupLatlng; +} +}, + +//exceptBounds: If set, don't remove any markers/clusters in it +_recursivelyRemoveChildrenFromMap: function (previousBounds, zoomLevel, exceptBounds) { +var m, i; +this._recursively(previousBounds, -1, zoomLevel - 1, +function (c) { +//Remove markers at every level +for (i = c._markers.length - 1; i >= 0; i--) { +m = c._markers[i]; +if (!exceptBounds || !exceptBounds.contains(m._latlng)) { +c._group._featureGroup.removeLayer(m); +if (m.setOpacity) { +m.setOpacity(1); +} +} +} +}, +function (c) { +//Remove child clusters at just the bottom level +for (i = c._childClusters.length - 1; i >= 0; i--) { +m = c._childClusters[i]; +if (!exceptBounds || !exceptBounds.contains(m._latlng)) { +c._group._featureGroup.removeLayer(m); +if (m.setOpacity) { +m.setOpacity(1); +} +} +} +} +); +}, + +//Run the given functions recursively to this and child clusters +// boundsToApplyTo: a L.LatLngBounds representing the bounds of what clusters to recurse in to +// zoomLevelToStart: zoom level to start running functions (inclusive) +// zoomLevelToStop: zoom level to stop running functions (inclusive) +// runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level +// runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level +_recursively: function (boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) { +var childClusters = this._childClusters, +zoom = this._zoom, +i, c; + +if (zoomLevelToStart > zoom) { //Still going down to required depth, just recurse to child clusters +for (i = childClusters.length - 1; i >= 0; i--) { +c = childClusters[i]; +if (boundsToApplyTo.intersects(c._bounds)) { +c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel); +} +} +} else { //In required depth + +if (runAtEveryLevel) { +runAtEveryLevel(this); +} +if (runAtBottomLevel && this._zoom === zoomLevelToStop) { +runAtBottomLevel(this); +} + +//TODO: This loop is almost the same as above +if (zoomLevelToStop > zoom) { +for (i = childClusters.length - 1; i >= 0; i--) { +c = childClusters[i]; +if (boundsToApplyTo.intersects(c._bounds)) { +c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel); +} +} +} +} +}, + +_recalculateBounds: function () { +var markers = this._markers, +childClusters = this._childClusters, +i; + +this._bounds = new L.LatLngBounds(); +delete this._wLatLng; + +for (i = markers.length - 1; i >= 0; i--) { +this._expandBounds(markers[i]); +} +for (i = childClusters.length - 1; i >= 0; i--) { +this._expandBounds(childClusters[i]); +} +}, + + +//Returns true if we are the parent of only one cluster and that cluster is the same as us +_isSingleParent: function () { +//Don't need to check this._markers as the rest won't work if there are any +return this._childClusters.length > 0 && this._childClusters[0]._childCount === this._childCount; +} +}); + + + +L.DistanceGrid = function (cellSize) { +this._cellSize = cellSize; +this._sqCellSize = cellSize * cellSize; +this._grid = {}; +this._objectPoint = { }; +}; + +L.DistanceGrid.prototype = { + +addObject: function (obj, point) { +var x = this._getCoord(point.x), +y = this._getCoord(point.y), +grid = this._grid, +row = grid[y] = grid[y] || {}, +cell = row[x] = row[x] || [], +stamp = L.Util.stamp(obj); + +this._objectPoint[stamp] = point; + +cell.push(obj); +}, + +updateObject: function (obj, point) { +this.removeObject(obj); +this.addObject(obj, point); +}, + +//Returns true if the object was found +removeObject: function (obj, point) { +var x = this._getCoord(point.x), +y = this._getCoord(point.y), +grid = this._grid, +row = grid[y] = grid[y] || {}, +cell = row[x] = row[x] || [], +i, len; + +delete this._objectPoint[L.Util.stamp(obj)]; + +for (i = 0, len = cell.length; i < len; i++) { +if (cell[i] === obj) { + +cell.splice(i, 1); + +if (len === 1) { +delete row[x]; +} + +return true; +} +} + +}, + +eachObject: function (fn, context) { +var i, j, k, len, row, cell, removed, +grid = this._grid; + +for (i in grid) { +row = grid[i]; + +for (j in row) { +cell = row[j]; + +for (k = 0, len = cell.length; k < len; k++) { +removed = fn.call(context, cell[k]); +if (removed) { +k--; +len--; +} +} +} +} +}, + +getNearObject: function (point) { +var x = this._getCoord(point.x), +y = this._getCoord(point.y), +i, j, k, row, cell, len, obj, dist, +objectPoint = this._objectPoint, +closestDistSq = this._sqCellSize, +closest = null; + +for (i = y - 1; i <= y + 1; i++) { +row = this._grid[i]; +if (row) { + +for (j = x - 1; j <= x + 1; j++) { +cell = row[j]; +if (cell) { + +for (k = 0, len = cell.length; k < len; k++) { +obj = cell[k]; +dist = this._sqDist(objectPoint[L.Util.stamp(obj)], point); +if (dist < closestDistSq) { +closestDistSq = dist; +closest = obj; +} +} +} +} +} +} +return closest; +}, + +_getCoord: function (x) { +return Math.floor(x / this._cellSize); +}, + +_sqDist: function (p, p2) { +var dx = p2.x - p.x, +dy = p2.y - p.y; +return dx * dx + dy * dy; +} +}; + + +/* Copyright (c) 2012 the authors listed at the following URL, and/or +the authors of referenced articles or incorporated external code: +http://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256 + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Retrieved from: http://en.literateprograms.org/Quickhull_(Javascript)?oldid=18434 +*/ + +(function () { +L.QuickHull = { +getDistant: function (cpt, bl) { +var vY = bl[1].lat - bl[0].lat, +vX = bl[0].lng - bl[1].lng; +return (vX * (cpt.lat - bl[0].lat) + vY * (cpt.lng - bl[0].lng)); +}, + + +findMostDistantPointFromBaseLine: function (baseLine, latLngs) { +var maxD = 0, +maxPt = null, +newPoints = [], +i, pt, d; + +for (i = latLngs.length - 1; i >= 0; i--) { +pt = latLngs[i]; +d = this.getDistant(pt, baseLine); + +if (d > 0) { +newPoints.push(pt); +} else { +continue; +} + +if (d > maxD) { +maxD = d; +maxPt = pt; +} + +} +return { 'maxPoint': maxPt, 'newPoints': newPoints }; +}, + +buildConvexHull: function (baseLine, latLngs) { +var convexHullBaseLines = [], +t = this.findMostDistantPointFromBaseLine(baseLine, latLngs); + +if (t.maxPoint) { // if there is still a point "outside" the base line +convexHullBaseLines = +convexHullBaseLines.concat( +this.buildConvexHull([baseLine[0], t.maxPoint], t.newPoints) +); +convexHullBaseLines = +convexHullBaseLines.concat( +this.buildConvexHull([t.maxPoint, baseLine[1]], t.newPoints) +); +return convexHullBaseLines; +} else { // if there is no more point "outside" the base line, the current base line is part of the convex hull +return [baseLine]; +} +}, + +getConvexHull: function (latLngs) { +//find first baseline +var maxLat = false, minLat = false, +maxPt = null, minPt = null, +i; + +for (i = latLngs.length - 1; i >= 0; i--) { +var pt = latLngs[i]; +if (maxLat === false || pt.lat > maxLat) { +maxPt = pt; +maxLat = pt.lat; +} +if (minLat === false || pt.lat < minLat) { +minPt = pt; +minLat = pt.lat; +} +} +var ch = [].concat(this.buildConvexHull([minPt, maxPt], latLngs), +this.buildConvexHull([maxPt, minPt], latLngs)); +return ch; +} +}; +}()); + +L.MarkerCluster.include({ +getConvexHull: function () { +var childMarkers = this.getAllChildMarkers(), +points = [], +hullLatLng = [], +hull, p, i; + +for (i = childMarkers.length - 1; i >= 0; i--) { +p = childMarkers[i].getLatLng(); +points.push(p); +} + +hull = L.QuickHull.getConvexHull(points); + +for (i = hull.length - 1; i >= 0; i--) { +hullLatLng.push(hull[i][0]); +} + +return hullLatLng; +} +}); + +//This code is 100% based on https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet +//Huge thanks to jawj for implementing it first to make my job easy :-) + +L.MarkerCluster.include({ + +_2PI: Math.PI * 2, +_circleFootSeparation: 25, //related to circumference of circle +_circleStartAngle: Math.PI / 6, + +_spiralFootSeparation: 28, //related to size of spiral (experiment!) +_spiralLengthStart: 11, +_spiralLengthFactor: 5, + +_circleSpiralSwitchover: 9, //show spiral instead of circle from this marker count upwards. +// 0 -> always spiral; Infinity -> always circle + +spiderfy: function () { +if (this._group._spiderfied === this || this._group._inZoomAnimation) { +return; +} + +var childMarkers = this.getAllChildMarkers(), +group = this._group, +map = group._map, +center = map.latLngToLayerPoint(this._latlng), +positions; + +this._group._unspiderfy(); +this._group._spiderfied = this; + +//TODO Maybe: childMarkers order by distance to center + +if (childMarkers.length >= this._circleSpiralSwitchover) { +positions = this._generatePointsSpiral(childMarkers.length, center); +} else { +center.y += 10; //Otherwise circles look wrong +positions = this._generatePointsCircle(childMarkers.length, center); +} + +this._animationSpiderfy(childMarkers, positions); +}, + +unspiderfy: function (zoomDetails) { +/// <param Name="zoomDetails">Argument from zoomanim if being called in a zoom animation or null otherwise</param> +if (this._group._inZoomAnimation) { +return; +} +this._animationUnspiderfy(zoomDetails); + +this._group._spiderfied = null; +}, + +_generatePointsCircle: function (count, centerPt) { +var circumference = this._group.options.spiderfyDistanceMultiplier * this._circleFootSeparation * (2 + count), +legLength = circumference / this._2PI, //radius from circumference +angleStep = this._2PI / count, +res = [], +i, angle; + +res.length = count; + +for (i = count - 1; i >= 0; i--) { +angle = this._circleStartAngle + i * angleStep; +res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round(); +} + +return res; +}, + +_generatePointsSpiral: function (count, centerPt) { +var legLength = this._group.options.spiderfyDistanceMultiplier * this._spiralLengthStart, +separation = this._group.options.spiderfyDistanceMultiplier * this._spiralFootSeparation, +lengthFactor = this._group.options.spiderfyDistanceMultiplier * this._spiralLengthFactor, +angle = 0, +res = [], +i; + +res.length = count; + +for (i = count - 1; i >= 0; i--) { +angle += separation / legLength + i * 0.0005; +res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round(); +legLength += this._2PI * lengthFactor / angle; +} +return res; +}, + +_noanimationUnspiderfy: function () { +var group = this._group, +map = group._map, +fg = group._featureGroup, +childMarkers = this.getAllChildMarkers(), +m, i; + +this.setOpacity(1); +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]; + +fg.removeLayer(m); + +if (m._preSpiderfyLatlng) { +m.setLatLng(m._preSpiderfyLatlng); +delete m._preSpiderfyLatlng; +} +if (m.setZIndexOffset) { +m.setZIndexOffset(0); +} + +if (m._spiderLeg) { +map.removeLayer(m._spiderLeg); +delete m._spiderLeg; +} +} +} +}); + +L.MarkerCluster.include(!L.DomUtil.TRANSITION ? { +//Non Animated versions of everything +_animationSpiderfy: function (childMarkers, positions) { +var group = this._group, +map = group._map, +fg = group._featureGroup, +i, m, leg, newPos; + +for (i = childMarkers.length - 1; i >= 0; i--) { +newPos = map.layerPointToLatLng(positions[i]); +m = childMarkers[i]; + +m._preSpiderfyLatlng = m._latlng; +m.setLatLng(newPos); +if (m.setZIndexOffset) { +m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING +} + +fg.addLayer(m); + + +leg = new L.Polyline([this._latlng, newPos], { weight: 1.5, color: '#222' }); +map.addLayer(leg); +m._spiderLeg = leg; +} +this.setOpacity(0.3); +group.fire('spiderfied'); +}, + +_animationUnspiderfy: function () { +this._noanimationUnspiderfy(); +} +} : { +//Animated versions here +SVG_ANIMATION: (function () { +return document.createElementNS('http://www.w3.org/2000/svg', 'animate').toString().indexOf('SVGAnimate') > -1; +}()), + +_animationSpiderfy: function (childMarkers, positions) { +var me = this, +group = this._group, +map = group._map, +fg = group._featureGroup, +thisLayerPos = map.latLngToLayerPoint(this._latlng), +i, m, leg, newPos; + +//Add markers to map hidden at our center point +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]; + +//If it is a marker, add it now and we'll animate it out +if (m.setOpacity) { +m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING +m.setOpacity(0); + +fg.addLayer(m); + +m._setPos(thisLayerPos); +} else { +//Vectors just get immediately added +fg.addLayer(m); +} +} + +group._forceLayout(); +group._animationStart(); + +var initialLegOpacity = L.Path.SVG ? 0 : 0.3, +xmlns = L.Path.SVG_NS; + + +for (i = childMarkers.length - 1; i >= 0; i--) { +newPos = map.layerPointToLatLng(positions[i]); +m = childMarkers[i]; + +//Move marker to new position +m._preSpiderfyLatlng = m._latlng; +m.setLatLng(newPos); + +if (m.setOpacity) { +m.setOpacity(1); +} + + +//Add Legs. +leg = new L.Polyline([me._latlng, newPos], { weight: 1.5, color: '#222', opacity: initialLegOpacity }); +map.addLayer(leg); +m._spiderLeg = leg; + +//Following animations don't work for canvas +if (!L.Path.SVG || !this.SVG_ANIMATION) { +continue; +} + +//How this works: +//http://stackoverflow.com/questions/5924238/how-do-you-animate-an-svg-path-in-ios +//http://dev.opera.com/articles/view/advanced-svg-animation-techniques/ + +//Animate length +var length = leg._path.getTotalLength(); +leg._path.setAttribute("stroke-dasharray", length + "," + length); + +var anim = document.createElementNS(xmlns, "animate"); +anim.setAttribute("attributeName", "stroke-dashoffset"); +anim.setAttribute("begin", "indefinite"); +anim.setAttribute("from", length); +anim.setAttribute("to", 0); +anim.setAttribute("dur", 0.25); +leg._path.appendChild(anim); +anim.beginElement(); + +//Animate opacity +anim = document.createElementNS(xmlns, "animate"); +anim.setAttribute("attributeName", "stroke-opacity"); +anim.setAttribute("attributeName", "stroke-opacity"); +anim.setAttribute("begin", "indefinite"); +anim.setAttribute("from", 0); +anim.setAttribute("to", 0.5); +anim.setAttribute("dur", 0.25); +leg._path.appendChild(anim); +anim.beginElement(); +} +me.setOpacity(0.3); + +//Set the opacity of the spiderLegs back to their correct value +// The animations above override this until they complete. +// If the initial opacity of the spiderlegs isn't 0 then they appear before the animation starts. +if (L.Path.SVG) { +this._group._forceLayout(); + +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]._spiderLeg; + +m.options.opacity = 0.5; +m._path.setAttribute('stroke-opacity', 0.5); +} +} + +setTimeout(function () { +group._animationEnd(); +group.fire('spiderfied'); +}, 200); +}, + +_animationUnspiderfy: function (zoomDetails) { +var group = this._group, +map = group._map, +fg = group._featureGroup, +thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng), +childMarkers = this.getAllChildMarkers(), +svg = L.Path.SVG && this.SVG_ANIMATION, +m, i, a; + +group._animationStart(); + +//Make us visible and bring the child markers back in +this.setOpacity(1); +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]; + +//Marker was added to us after we were spidified +if (!m._preSpiderfyLatlng) { +continue; +} + +//Fix up the location to the real one +m.setLatLng(m._preSpiderfyLatlng); +delete m._preSpiderfyLatlng; +//Hack override the location to be our center +if (m.setOpacity) { +m._setPos(thisLayerPos); +m.setOpacity(0); +} else { +fg.removeLayer(m); +} + +//Animate the spider legs back in +if (svg) { +a = m._spiderLeg._path.childNodes[0]; +a.setAttribute('to', a.getAttribute('from')); +a.setAttribute('from', 0); +a.beginElement(); + +a = m._spiderLeg._path.childNodes[1]; +a.setAttribute('from', 0.5); +a.setAttribute('to', 0); +a.setAttribute('stroke-opacity', 0); +a.beginElement(); + +m._spiderLeg._path.setAttribute('stroke-opacity', 0); +} +} + +setTimeout(function () { +//If we have only <= one child left then that marker will be shown on the map so don't remove it! +var stillThereChildCount = 0; +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]; +if (m._spiderLeg) { +stillThereChildCount++; +} +} + + +for (i = childMarkers.length - 1; i >= 0; i--) { +m = childMarkers[i]; + +if (!m._spiderLeg) { //Has already been unspiderfied +continue; +} + + +if (m.setOpacity) { +m.setOpacity(1); +m.setZIndexOffset(0); +} + +if (stillThereChildCount > 1) { +fg.removeLayer(m); +} + +map.removeLayer(m._spiderLeg); +delete m._spiderLeg; +} +group._animationEnd(); +}, 200); +} +}); + + +L.MarkerClusterGroup.include({ +//The MarkerCluster currently spiderfied (if any) +_spiderfied: null, + +_spiderfierOnAdd: function () { +this._map.on('click', this._unspiderfyWrapper, this); + +if (this._map.options.zoomAnimation) { +this._map.on('zoomstart', this._unspiderfyZoomStart, this); +} else { +//Browsers without zoomAnimation don't fire zoomstart +this._map.on('zoomend', this._unspiderfyWrapper, this); +} + +if (L.Path.SVG && !L.Browser.touch) { +this._map._initPathRoot(); +//Needs to happen in the pageload, not after, or animations don't work in webkit +// http://stackoverflow.com/questions/8455200/svg-animate-with-dynamically-added-elements +//Disable on touch browsers as the animation messes up on a touch zoom and isn't very noticable +} +}, + +_spiderfierOnRemove: function () { +this._map.off('click', this._unspiderfyWrapper, this); +this._map.off('zoomstart', this._unspiderfyZoomStart, this); +this._map.off('zoomanim', this._unspiderfyZoomAnim, this); + +this._unspiderfy(); //Ensure that markers are back where they should be +}, + + +//On zoom start we add a zoomanim handler so that we are guaranteed to be last (after markers are animated) +//This means we can define the animation they do rather than Markers doing an animation to their actual location +_unspiderfyZoomStart: function () { +if (!this._map) { //May have been removed from the map by a zoomEnd handler +return; +} + +this._map.on('zoomanim', this._unspiderfyZoomAnim, this); +}, +_unspiderfyZoomAnim: function (zoomDetails) { +//Wait until the first zoomanim after the user has finished touch-zooming before running the animation +if (L.DomUtil.hasClass(this._map._mapPane, 'leaflet-touching')) { +return; +} + +this._map.off('zoomanim', this._unspiderfyZoomAnim, this); +this._unspiderfy(zoomDetails); +}, + + +_unspiderfyWrapper: function () { +/// <summary>_unspiderfy but passes no arguments</summary> +this._unspiderfy(); +}, + +_unspiderfy: function (zoomDetails) { +if (this._spiderfied) { +this._spiderfied.unspiderfy(zoomDetails); +} +}, + +_noanimationUnspiderfy: function () { +if (this._spiderfied) { +this._spiderfied._noanimationUnspiderfy(); +} +}, + +//If the given layer is currently being spiderfied then we unspiderfy it so it isn't on the map anymore etc +_unspiderfyLayer: function (layer) { +if (layer._spiderLeg) { +this._featureGroup.removeLayer(layer); + +layer.setOpacity(1); +//Position will be fixed up immediately in _animationUnspiderfy +layer.setZIndexOffset(0); + +this._map.removeLayer(layer._spiderLeg); +delete layer._spiderLeg; +} +} +}); + + +}(window, document)); diff --git a/assets/js/sig/localisationHtml5.js b/assets/js/sig/localisationHtml5.js new file mode 100755 index 0000000000000000000000000000000000000000..7b7d3e5253950a603b6549ff769c01e9e34ea8c0 --- /dev/null +++ b/assets/js/sig/localisationHtml5.js @@ -0,0 +1,256 @@ + +/* géolocalisation HTML5 */ +var currentRoleLoc = ""; +var locationHTML5Found = false; +var positionFound = false; + +function initHTML5Localisation(role){ return; + + if(!locationHTML5Found) + $.blockUI({ + message : "<h1 class='homestead text-dark padding-20'><i class='fa fa-hand-pointer-o'></i> Merci d'autoriser le partage de localisation</span></h1>" + + "<button class='btn btn-info margin-bottom-15' onclick='$.unblockUI();showMap(false);'>Annuler</button>" + }); + + + if (navigator.geolocation) + { + if(!locationHTML5Found) + { + navigator.geolocation.getCurrentPosition( + function(position){ //success + //toastr.success('<i class="fa fa-refresh fa-spin"></i> Recherche de votre position... Merci de patienter...'); + //$("#main-title-public1").html("<i class='fa fa-refresh fa-spin'></i> Recherche de votre position. Merci de patienter"); + //$("#main-title-public1").show(400); + positionFound = position; + // var position = { + // coords : { + // latitude : -20.9190923, + // longitude : 55.4859363 + // } + // }; + mylog.log(position.coords); + + }, + function (error){ //error + var info = "Erreur lors de la géolocalisation : "; + switch(error.code) { + case error.TIMEOUT: + info += "Timeout !"; + break; + case error.PERMISSION_DENIED: + info += "Vous n’avez pas donné la permission, ou votre navigateur ne permet pas la géolocalisation."; + break; + case error.POSITION_UNAVAILABLE: + info += "La position n’a pu être déterminée"; + break; + case error.UNKNOWN_ERROR: + info += "Erreur inconnue"; + break; + } + toastr.error(info); + $.unblockUI(); + showMap(false); + }); + } + else + { + $.blockUI({ + message : "<h1 class='homestead text-dark'><i class='fa fa-spin fa-circle-o-notch'></i> Recherche de votre position ...</span></h1>" + }); + + $(".search-loader").html("<i class='fa fa-spin fa-circle-o-notch'></i> Géolocalisation en cours ..."); + $(".box-discover").hide(400); + $(".box-menu").hide(400); + // var position = { + // coords : { + // latitude : -20.9190923, + // longitude : 55.4859363 + // } + // }; + // mylog.log(position.coords); + mapBg.panTo([positionFound.coords.latitude, positionFound.coords.longitude], {animate:false}); + mapBg.setZoom(13, {animate:false}); + + //toastr.info("Votre position géographique a été trouvée"); + currentRoleLoc = role; + getCityInseeByGeoPos(positionFound.coords); + } + } + else{ + toastr.error("Votre navigateur ne prend pas en compte la géolocalisation HTML5"); + } +} + + +function getCityInseeByGeoPos(coords){ + //toastr.info("<i class='fa fa-circle-o-notch fa-spin'></i> Recherche des données de votre commune"); + //showLoadingMsg("Identification de votre commune"); + // coords = { latitude : -20.9190923, + // longitude : 55.4859363 + // }; + // mylog.log("getCityInseeByGeoPos !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); + // mylog.log(coords); + $.ajax({ + url: baseUrl + "/" + moduleId+"/sig/getinseebylatlng", + type: 'POST', + dataType: 'json', + data:{"latitude" : coords.latitude, "longitude" : coords.longitude }, + complete: function () {}, + success: function (obj) { + if (obj != null) { + + + if(currentRoleLoc == "showCityMap" && typeof obj.insee != "undefined"){ + mylog.log("donne city : "); + mylog.dir(obj); + //toastr.success("Mapping des acteurs par code insee : " + obj.insee); + if($("#main-title-public1").length){ + showLoadingMsg("Chargement des données en cours"); + var onclick = "showAjaxPanel( '/city/detail/insee/"+obj.insee+"?isNotSV=1', '"+obj.name+"','university' )"; + $("#main-title-public2").html('<a href="javascript:" onclick="'+onclick+'">'+"<i class='fa fa-university'></i> "+obj.name+"</a>"); + $("#main-title-public2").show(400); + if(typeof obj.cp != "undefined") + $(".form-group #cp").val(obj.cp); + } + + $("#mapCanvasBg").show(400); + setTimeout(function() { showDataByInsee(obj.insee) }, 1000); + } + else if(currentRoleLoc == "showCity" && typeof obj.insee != "undefined"){ + toastr.success("Vous allez être redirigé vers la page de votre commune ..."); + showAjaxPanel("/city/detail/insee/" + obj.insee + "?isNotSV=1", 'Details', 'university'); + + } + else if(currentRoleLoc == "prefill" && typeof obj.cp != "undefined"){ + toastr.success("Nous avons trouvé votre code postal : "+obj.cp); + $(".form-group #cp").val(obj.cp); + searchCity(); + } + else if(currentRoleLoc == "prefillSearch"){ // && typeof obj.name != "undefined"){ + //toastr.success("Nous avons trouvé votre position actuelle : "+obj.name); + //$("#searchBarPostalCode").val(obj.name); + //$.cookie("HTML5CityName", obj.name, { path : '/ph/' }); + //startSearch(); + //searchCity(); + showModalSelectScope(obj); + } + else if(currentRoleLoc == "communexion"){ // && typeof obj.name != "undefined"){ + //toastr.success("Nous avons trouvé votre position actuelle : "+obj.name); + //$("#searchBarPostalCode").val(obj.name); + //$.cookie("HTML5CityName", obj.name, { path : '/ph/' }); + //startSearch(); + //searchCity(); + //showModalSelectScope(obj); + $.each(obj, function(key, value){ obj[key]["typeSig"] = "city"; }); + mylog.log("cities found : "); + mylog.dir(obj); + + $(".search-loader").html("<i class='fa fa-crosshairs'></i> Sélectionnez une commune en cliquant sur <b>Communecter</b> ..."); + Sig.showMapElements(Sig.map, obj); + } + else if(currentRoleLoc == "communexion_tsr"){ // && typeof obj.name != "undefined"){ + $.each(obj, function(key, value){ obj[key]["typeSig"] = "city"; }); + mylog.log("cities found : "); + mylog.dir(obj); + showMap(true); + //$(".search-loader").html("<i class='fa fa-crosshairs'></i> Sélectionnez une commune ..."); + showMapLegende("crosshairs", "Sélectionnez votre commune en cliquant sur <b>Communecter</b> ..."); + + Sig.showMapElements(Sig.map, obj); + } + }else{ + toastr.info("Nous n'avons pas trouvé votre code postal");// : merci de vous localiser manuellement en remplissant le formulaire."); + //getCityByLatLngNominatim(coords.latitude, coords.longitude); + } + + $.unblockUI(); + + }, + error: function (error) { + mylog.dir(error); + toastr.error(error.responseText); + } + }); +} + +//reverse geocoding +function getCityByLatLngNominatim(latitude, longitude){ + mylog.log(latitude, longitude); + toastr.info("<i class='fa fa-circle-o-notch fa-spin'></i> Recherche approfondie"); + $.ajax({ + url: "//nominatim.openstreetmap.org/reverse?lat=" + latitude + "&lon=" + longitude + "&format=json&addressdetails=1", + type: 'POST', + dataType: 'json', + complete: function () { }, + success: function (obj) + { + if(typeof obj.address.city != "undefined") { getInseeByCityName(obj.address.city); + }else if(typeof obj.address.town != "undefined"){ getInseeByCityName(obj.address.town); + }else{ toastr.error("Impossible de trouver le nom de votre commune"); } + }, + error: function(error){ + mylog.dir("error", error); + } + }); +} + +function getInseeByCityName(cityName){ + toastr.info("<i class='fa fa-circle-o-notch fa-spin'></i> Merci de patienter ..."); + $.ajax({ + url: baseUrl + "/" + moduleId+"/sig/getcodeinseebycityname", + type: 'POST', + dataType: 'json', + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + data:{ "cityName" : cityName }, + complete: function () { }, + success: function (obj) + { + mylog.log("getInseeByCityName ok"); + mylog.dir(obj); + + if (typeof obj != "undefined"){ + if (currentRoleLoc == "showCity"){ + if(typeof obj.insee != "undefined") { + toastr.success("<i class='fa fa-circle-o-notch fa-spin'></i> Vous allez être redirigé vers la page de votre commune ... "); + showAjaxPanel("/city/detail/insee/" + obj.insee + "?isNotSV=1", 'Details', 'university'); + }else{ + toastr.error("Impossible d'identifier votre commune ... "); + } + } + else if (currentRoleLoc == "prefill"){ + if(typeof obj.cp != "undefined") { + toastr.success("Nous avons trouvé votre code postal à partir de notre bdd+nominatim name (getcodeinseebycityname) : "+obj.cp); + $(".form-group #cp").val(obj.cp); + searchCity(); + }else{ + toastr.error("Impossible d'identifier votre commune ... "); + } + } + } + }, + error: function(error){ + toastr.error("Erreur : Impossible d'identifier votre commune ... "); + } + }); +} + +var geolocHTML5Done = false; +function showModalSelectScope(obj){ + var HTML = ""; + + if(typeof obj["@type"] != "undefined"){ + HTML += "<button class='btn bg-red btn-scope-list' val='"+obj.cp+"' data-dismiss='modal' style='margin: 0px 4px 4px 0px; border-radius:30px;'>"+obj.cp+ " " +obj.name+"</button>"; + }else{ + $.each(obj, function(key, value){ + HTML += "<button class='btn bg-red btn-scope-list' val='"+value.cp+"' data-dismiss='modal' style='margin: 0px 4px 4px 0px; border-radius:30px;'>"+value.cp+ " " +value.name+"</button>"; + }); + } + $("#main-title-modal-scope").html('<i class="fa fa-angle-right"></i> Dans quelle commune vous situez-vous en ce moment ?'); + $("#modal-select-scope #list-scope").html(HTML); initBtnScopeList(); + $("#modal-select-scope").modal("show"); + $(".search-loader").html("Communection : <span style='font-weight:300;'>un code postal et c'est parti !</span>"); + geolocHTML5Done = true; +} + +/* géolocalisation HTML5 */ \ No newline at end of file diff --git a/assets/js/sig/map.js b/assets/js/sig/map.js new file mode 100755 index 0000000000000000000000000000000000000000..966c216879226fe57f630d9ebc84d2de7e3b7cd1 --- /dev/null +++ b/assets/js/sig/map.js @@ -0,0 +1,1042 @@ + + //variable qui permet de charger une instance Sig différente à chaque éxecution + var SigLoader = new Array(); + + SigLoader.getSig = function (){ + + this.Sig = new Array(); + + this.Sig.map = null; + this.Sig.markersLayer = ""; + this.Sig.tileLayer = null; + this.Sig.roadTileLayer = null; + this.Sig.geoJsonCollection = ""; + + this.Sig.initParameters = ""; + + this.Sig.cssModuleName = ""; + + this.Sig.currentFilter = "none"; + + this.Sig.icoMarkersTypes = {}; //definition dans map_initializar.js + this.Sig.icoMarkersTags = {}; //definition dans map_initializar.js + + //mémorise les identifiants des éléments de chaque carte + this.Sig.listId = new Array(); + this.Sig.listPanel = new Array(); + this.Sig.listPanel.tags = new Array(); + this.Sig.listPanel.types = new Array(); + + this.Sig.panelFilter = "all"; + this.Sig.panelFilterType = "all"; + this.Sig.dataMap = {}; + + //mémorise les éléments + this.Sig.elementsMap = new Array(); + this.Sig.preloadElementsMap = {}; + this.Sig.preloadIconLegende = ""; + this.Sig.preloadTextLegende = ""; + + //## + //créer un marker sur la carte, en fonction de sa position géographique + this.Sig.markerSingleList = new Array(); + this.Sig.popupOpen = false; + this.Sig.currentMarkerPopupOpen = null; + + this.Sig.mapPolygon = null; + this.Sig.markerFindPlace = null; + + this.Sig.circleAroundMe = null; + + //## + //créé une donnée GeoJson (pour les cluster) + this.Sig.getGeoJsonMarker = function (properties/*json*/, coordinates/*array[lat, lng]*/) + { + //mylog.warn("--------------- getGeoJsonMarker ---------------------"); + properties.visible = false; + //alert(JSON.stringify(properties)); + return { "type": 'Feature', + "properties": properties, + "geometry": { type: 'Point', + coordinates: coordinates } }; + }; + + + //## + //créé un objet L.Marker (sans cluster) + this.Sig.getMarkerSingle = function(thisMap, options, coordinates) + { + mylog.warn("--------------- getMarkerSingle ---------------------"); + var thisSig = this; + var contentString = options.content; + if(options.content == null) contentString = ""; + + var markerOptions = { icon : options.icon }; + if(typeof options.zIndexOffset != "undefined") + markerOptions["zIndexOffset"] = options.zIndexOffset; + + //mylog.log("POPUP CONTENT : " + contentString); + var marker = L.marker(coordinates, markerOptions) + .addTo(thisMap) + .bindPopup(contentString); + + this.markerSingleList.push(marker); + + marker.on('click', function(e) { + marker.openPopup(); + //Sig.markerToBounce = marker; + //Sig.bounceMarker(0); + //https://github.com/hosuaby/Leaflet.SmoothMarkerBouncing : bounce pluggin + thisSig.currentMarkerPopupOpen = this; + }); + marker.on('mouseover', function(e) { + if(thisSig.map.getZoom() != thisSig.map.getMaxZoom()){ + marker.openPopup(); + + //Sig.markerToBounce = marker; + //Sig.bounceMarker(0); + //https://github.com/hosuaby/Leaflet.SmoothMarkerBouncing : bounce pluggin + thisSig.currentMarkerPopupOpen = this; + } + });//mylog.log("MARKER OK"); + + return marker; + }; + + this.Sig.timerbounce = null; + // EXEMPLE : + // Sig.bounceMarker(0, { duration: 500, //va effectuer un saut pendant 500 miliemes de secondes + // height: 15, //d'une hauteur de 15px + // interval: 2000, //toutes les 2 secondes + // occurence:5 }); //5 fois de suite + this.Sig.bounceMarker = function(i, options){ + //Sig.markerToBounce.bounce({duration: 500, height: 30}); + if(typeof Sig.markerToBounce === "undefined" || Sig.markerToBounce === null) { + if(typeof this.timerbounce != "undefined") + clearTimeout(this.timerbounce); + return; + } + + i++; + //mylog.log(i); + if(i < options.occurence){ + this.timerbounce = setTimeout(function(){ + if(typeof Sig.markerToBounce != "undefined" && Sig.markerToBounce != null){ + Sig.markerToBounce.bounce({duration: options.duration, height: options.height}); + Sig.bounceMarker(i, options); + } + }, options.interval); + }else{ + clearTimeout(this.timerbounce); + } + }; + + //## + //récupère le nom de l'icon en fonction du type de marker souhaité + this.Sig.getIcoMarkerMap = function(thisData) + { + //mylog.warn("--------------- getIcoMarker *** ---------------------"); + //mylog.log(thisData); + if(typeof thisData.author != "undefined") thisData = thisData.author; + + this.allowMouseoverMaker = true; + //mylog.log("thisData", thisData); + var markerName = this.getIcoNameByType(thisData); + //mylog.log("markerName", markerName); + var iconUrl = assetPath+'/images/sig/markers/icons_carto/'+markerName+'.png'; + + //if(typeof thisData.profilMarkerImageUrl !== "undefined" && thisData.profilMarkerImageUrl != ""){ + // iconUrl = baseUrl + thisData.profilMarkerImageUrl; + //} + + if (thisData.typeSig && thisData.typeSig.substr(0,11) == "poi.interop") { + var iconUrl = getimgProfilPathForInteropDataOnMap(thisData.typeSig); + } + + return L.icon({ + iconUrl: iconUrl, + iconSize: [33, 44], //38, 95], + iconAnchor: [16, 37],//22, 94], + popupAnchor: [0, -40]//-3, -76] + + /* CO2 + iconSize: [53, 60], //38, 95], + iconAnchor: [27, 57],//22, 94], + popupAnchor: [0, -55]//-3, -76] + */ + }); + }; + + this.Sig.getIcoMarker = function(thisData) + { + //mylog.warn("--------------- getIcoMarker ---------------------"); + var ico = this.getIcoNameByType(thisData); + var color = this.getIcoColorByType(thisData); + + return L.AwesomeMarkers.icon({icon: ico + " fa-" + color, iconColor:color, prefix: 'fa' }); + }; + + + //## + //supprime tous les marker de la carte + this.Sig.clearMap = function(thisMap, showMe) + { + if(typeof showMe == "undefined") showMe = true; + + mylog.warn("--------------- clearMap ---------------------"); + if(this.markersLayer != "") + this.markersLayer.clearLayers(); + + if(typeof this.myMarker != "undefined") + this.map.removeLayer(this.myMarker); + + if(this.markerModifyPosition != null) + this.map.removeLayer(this.markerModifyPosition); + + if(notEmpty(this.circleAroundMe)) + this.map.removeLayer(this.circleAroundMe); + + var thisSig = this; + if(this.markerSingleList != null) + $.each(this.markerSingleList, function(){ + thisSig.map.removeLayer(this); + }); + + this.clearPolygon(); + + this.listId = new Array(); + this.elementsMap = new Array(); + this.changePagination(1); + + $( this.cssModuleName + " #liste_map_element").html(""); + + //showMe = false; + if(showMe) + this.showMyPosition(); + + }; + + //## + //supprime tous les marker de la carte et prépare pour recharger de nouvelles données + this.Sig.restartMap = function(thisMap) + { + //supprime les item panel (sauf all) + $.each($(this.cssModuleName + " .item_panel_map"), function(){ + if($(this).attr("id") != "item_panel_map_all" && $(this).attr("id") != "item_panel_filter_all") + $(this).remove(); + }); + $(this.cssModuleName + " #liste_map_element").html(); + + this.listPanel.tags = new Array(); + this.listPanel.types = new Array(); + this.panelFilter = "all"; + this.panelFilterType = "all"; + this.clearMap(thisMap); + this.currentMarkerPopupOpen = null; + hideMapLegende(); + }; + + this.Sig.showMyPosition = function(){ + var thisSig = this; + if(thisSig.myPosition != null){ + if(thisSig.myPosition.position.latitude != 0 && thisSig.myPosition.position.longitude != 0){ + //mylog.log("MYPOSITION !!"); + //mylog.dir(thisSig.myPosition); + var center = [thisSig.myPosition.position.latitude, + thisSig.myPosition.position.longitude]; + + var popup = Sig.getPopupSimple(Sig.userData); + var properties = { id : "0", + icon : thisSig.getIcoMarkerMap(thisSig.myPosition), + type : thisSig.myPosition["type"], + typeSig : thisSig.myPosition["typeSig"], + faIcon : this.getIcoByType(thisSig.myPosition), + zIndexOffset: 10000, + content: popup }; + + if(typeof thisSig.myMarker != "undefined") thisSig.map.removeLayer(thisSig.myMarker); + thisSig.myMarker = thisSig.getMarkerSingle(thisSig.map, properties, center); + thisSig.createItemRigthListMap(thisSig.userData, thisSig.myMarker, thisSig.map); + + var objectId = thisSig.getObjectId(thisSig.userData); + this.listId = new Array(objectId); + + $(this.cssModuleName + " .item_map_list_" + objectId).click(function() + { thisSig.map.panTo(center, {"animate" : true }); + thisSig.checkListElementMap(thisSig.map); + thisSig.myMarker.openPopup(); + }); + + $( "#btn-home" ).off().click(function (){ + thisSig.map.setView(center, thisSig.map.getMaxZoom()-1); + }); + // $( ".btn-home" ).off().click(function (){ + // thisSig.centerSimple(center, thisSig.maxZoom-1); + // }); + } + } + } + //gère les dimensions des différentes parties de la carte (carte, panel, etc) en mode full screen + this.Sig.setFullScreen = function() + { + ////mylog.warn("--------------- setFullScreen ---------------------"); + //full screen map + var mapHeight = $(".subviews.subviews-top").height();// - $(".toolbar").height(); + var rightListHeight = mapHeight - 110; + + $("#mapCanvas" + this.sigKey).css({"height":mapHeight}); + //alert(mapHeight); + $("#mapCanvas" + this.sigKey).css({"margin-bottom":mapHeight*(-1)}); + $(this.cssModuleName + " #right_tool_map").css({"height":rightListHeight+25}); + + $(this.cssModuleName + " #liste_map_element").css({"height":rightListHeight - $(this.cssModuleName + " #map_pseudo_filters").height() - 8*2 /*padding*/ - $(this.cssModuleName + " #chk-scope").height() - 33 }); + $(this.cssModuleName + " #liste_map_element").css({"max-height":rightListHeight - $(this.cssModuleName + " #map_pseudo_filters").height() - 8*2 /*padding*/ - $(this.cssModuleName + " #chk-scope").height() - 33 }); + + $(this.cssModuleName + " #right_tool_map").css( {"left":$("#mapCanvas" + this.sigKey).width() - $("#right_tool_map").width() - 20 });// - $(this.cssModuleName + " #right_tool_map").width()}); + $(this.cssModuleName + " .input-search-place").css( {"left":$("#mapCanvas" + this.sigKey).width() - $("#right_tool_map").width() - $(this.cssModuleName + " #right_tool_map").width() - 20});// - $(this.cssModuleName + " #right_tool_map").width()}); + + $(this.cssModuleName + " .panel_map").css({"max-height":rightListHeight - 8*2 /*padding*/ - 33 }); + + }; + + //gère les dimensions des différentes parties de la carte (carte, panel, etc) en mode normal + this.Sig.setNoFullScreen = function() + { + var mapHeight = this.initParameters.mapHeight; + var rightListHeight = mapHeight - 100; + + var left = $(this.cssModuleName + " #right_tool_map").position().left - $(this.cssModuleName + " .input-search-place").width() - 20; + $(this.cssModuleName + " .input-search-place") .css({"left": left});// - $(this.cssModuleName + " #right_tool_map").width()}); + }; + + //gère les dimensions des différentes parties de la carte (carte, panel, etc) en mode normal + this.Sig.setFullPage = function() + { + var mapHeight = $("#mapCanvasBg").height(); + var menuTopHeight = $(".main-top-menu").height();// - $(".toolbar").height(); + var rightPanelHeight = mapHeight - menuTopHeight - 110; + + $(this.cssModuleName + " #right_tool_map").css({"height":rightPanelHeight}); + $(this.cssModuleName + " #liste_map_element").css({"height":rightPanelHeight-100}); + $(this.cssModuleName + " #liste_map_element").css({"maxHeight":rightPanelHeight-100}); + + $(this.cssModuleName + " .panel_map").css({"max-height":rightPanelHeight - 8*2 /*padding*/ - 45 }); + + var RTM_width = ($("#right_tool_map").css('display') != 'none') ? $("#right_tool_map").width()+30 : 30; + var GAM_width = ($("#right_tool_map").css('display') != 'none') ? RTM_width+30 : RTM_width+30; + $(this.cssModuleName + " .tools-btn").css({"right": RTM_width }); + $(this.cssModuleName + " .btn-groupe-around-me-km").css({"right": GAM_width }); + + $(this.cssModuleName + " .input-search-place").css( {"left":90} ); + + //var left = $(this.cssModuleName + " .tools-btn").position().left; + //var top = $(this.cssModuleName + " .btn-group-map").position().top + $(this.cssModuleName + " #btn-filter").height(); + + }; + + //modifie la position et la forme des éléments de l'interface de facon dynamique + this.Sig.constructUI = function() + { + + if(this.initParameters.useFullScreen){ + this.setFullScreen(); + } + else{ + this.setNoFullScreen(); + } + + if(this.initParameters.useFullPage){ this.setFullPage(); } + + } + + this.Sig.verifyPanelFilter = function (thisData){ + //mylog.warn("--------------- verifyPanelFilter ---------------------"); + + if(this.panelFilter == "all") return true; + + var thisSig = this; + //mylog.log("PANELFILTER" + this.panelFilterType); + if(this.panelFilterType == "tags" || this.panelFilterType == "all"){ + if(this.usePanel == false) return true; + //mylog.log(thisData["tags"] +"=="+ thisSig.panelFilter); + + //si thisData n'a pas de tags + if("undefined" == typeof thisData["tags"]){ + return (this.panelFilter == "all"); + } + + + var inArray = false; + if(typeof thisData["tags"] != "undefined" && thisData["tags"] != null) + $.each(thisData["tags"], function(index, value){ + if(value == thisSig.panelFilter) inArray = true; + }); + + if( inArray //$.inArray(this.panelFilter, thisData["tags"]) > -1 //ne fonctionne pas + || this.panelFilter == "all") { + return true; + } + else{ return false; } + + } + + if(this.panelFilterType == "types" || this.panelFilterType == "all"){ + if(this.useFilterType == false) return true; + + //si thisData n'a pas de tags + if("undefined" == typeof thisData["type"] && "undefined" == typeof thisData["typeSig"]){ + return (this.panelFilter == "all"); + } + if( thisData["type"] == thisSig.panelFilter + || thisData["typeSig"] == thisSig.panelFilter + || this.panelFilter == "all") { + return true; + } + else{ return false; } + + } + }; + + this.Sig.polygonsCollection = new Array(); + + this.Sig.addPolygon = function(polygonPoints, options) + { + //mylog.log("addPolygon"); + var poly = L.polygon(polygonPoints, { + color: '#FFF', + opacity:0.7, + fillColor: '#71A4B4', + fillOpacity:0.3, + weight:'2px', + smoothFactor:0.5}).addTo(this.map); + + this.polygonsCollection.push(poly); + }; + + this.Sig.showCircle = function(center, radius, options) + { + mylog.log("showCircle", notEmpty(this.circleAroundMe), radius); + if(notEmpty(this.circleAroundMe)) this.map.removeLayer(this.circleAroundMe); + this.circleAroundMe = L.circle(center, radius, { + color: '#FFF', + opacity:0.7, + fillColor: '#71A4B4', + fillOpacity:0.3, + weight:'2px', + smoothFactor:0.5}).addTo(this.map); + + + }; + + this.Sig.clearPolygon = function() + { + var thisSig = this; + $.each(this.polygonsCollection, function(key, poly){ + thisSig.map.removeLayer(poly); + }); + this.polygonsCollection = new Array(); + }; + + this.Sig.showPolygon = function(polygonPoints, options) + { + //mylog.log("showPolygon"); + //mylog.dir(polygonPoints); + //si le polygone existe déjà on le supprime + if(this.mapPolygon != null) this.map.removeLayer(this.mapPolygon); + //puis on charge le nouveau polygone + this.mapPolygon = L.polygon(polygonPoints, { + color: '#FFF', + opacity:0.7, + fillColor: '#71A4B4', + fillOpacity:0.3, + weight:'2px', + smoothFactor:0.5}).addTo(this.map); + }; + + this.Sig.inversePolygon = function(polygon){ + var inversedPoly = new Array(); + mylog.log("inversePolygon"); + if(typeof polygon != "undefined" && polygon != null){ + $.each(polygon, function(key, value){ + var lat = value[0]; + var lng = value[1]; + inversedPoly.push(new Array(lng, lat)); + }); + } + mylog.dir(inversedPoly); + return inversedPoly; + }; + + this.Sig.getCoordinates = function(thisData, type) + { + //mylog.warn("--------------- getCoordinates ---------------------"); + //mylog.dir("getCoordinates" , thisData); + //si la donnée est une news, on doit afficher la position de l'auteur + if( typeof thisData.typeSig !== "undefined"){ + if(thisData.typeSig == "news" && typeof thisData.author !== "undefined"){ + thisData = thisData.author; + } + } + + if( typeof thisData.geo !== "undefined" && thisData.geo != null && typeof thisData.geo.longitude !== "undefined"){ + + if(typeof thisData['geo'].latitude == "undefined" || + thisData['geo'].latitude == null || + thisData['geo'].latitude == "") return false; + + if(typeof thisData['geo'].longitude == "undefined" || + thisData['geo'].longitude == null || + thisData['geo'].longitude == "") return null; + + if(type == "markerSingle"){ + return new Array (thisData['geo'].latitude, thisData['geo'].longitude); + } + else if(type == "markerGeoJson"){ + return new Array (thisData['geo'].longitude, thisData['geo'].latitude); + } + } + else if(typeof thisData.geoPosition != "undefined"){ + + if(typeof thisData.geoPosition.coordinates == "undefined" || thisData.geoPosition.coordinates == null) return false; + if(typeof thisData.geoPosition.coordinates[0] == "undefined" || thisData.geoPosition.coordinates[0] == null) return false; + if(typeof thisData.geoPosition.coordinates[1] == "undefined" || thisData.geoPosition.coordinates[1] == null) return false; + + if(type == "markerSingle"){ + var lat = thisData.geoPosition.coordinates[1]; + var lng = thisData.geoPosition.coordinates[0]; + return new Array (lat, lng); + } else if(type == "markerGeoJson"){ + return thisData.geoPosition.coordinates; + } + } + else if(typeof thisData.geometry != "undefined"){ //resultat search street on google map + //mylog.log("thisData.geometry ?"); + //mylog.dir(thisData); + if(typeof thisData.geometry.location == "undefined" || thisData.geometry.location == null) return false; + if(typeof thisData.geometry.location.lat == "undefined" || thisData.geometry.location.lat == null) return false; + if(typeof thisData.geometry.location.lng == "undefined" || thisData.geometry.location.lng == null) return false; + + if(type == "markerSingle"){ + var lat = thisData.geometry.location.lat; + var lng = thisData.geometry.location.lng; + mylog.dir(new Array (lat, lng)); + return new Array (lat, lng); + } else if(type == "markerGeoJson"){ + var lat = thisData.geometry.location.lat; + var lng = thisData.geometry.location.lng; + return new Array (lng, lat); + } + + } + else{ + return null; + } + }; + + + this.Sig.showOneElementOnMap = function(thisData, thisMap){ + //mylog.warn("--------------- showOneElementOnMap ---------------------"); + //mylog.dir(thisData); + //mylog.log("showOneElementOnMap ---------------------", thisData); + //var objectId = thisData._id ? thisData._id.$id.toString() : null; + var objectId = this.getObjectId(thisData); + + //mylog.log("verify id : ", objectId); + //if(thisData != null && thisData["type"] == "meeting") alert("trouvé !"); + //mylog.log(thisData); + if(objectId != null) + { + if($.inArray(objectId, this.listId) == -1 || thisData.typeSig == "city") + { + if( ("undefined" != typeof thisData['geo'] && thisData['geo'] != null) || + ("undefined" != typeof thisData['geoPosition'] && thisData['geoPosition'] != null) || + + ("undefined" != typeof thisData['author'] && + (("undefined" != typeof thisData['author']['geo'] && thisData['author']['geo'] != null) || + ("undefined" != typeof thisData['author']['geoPosition'] && thisData['author']['geoPosition'] != null) ))) + { + + if(this.verifyPanelFilter(thisData)) + { + var type = (typeof thisData["typeSig"] !== "undefined") ? thisData["typeSig"] : thisData["type"]; + //préparation du contenu de la bulle + //mylog.log("!!!!!!!!!!!!!!!!!!!!!!showOneElementOnMap", thisData); + var content = this.getPopup(thisData); + //création de l'icon sur la carte + var theIcon = this.getIcoMarkerMap(thisData); + var properties = { id : objectId, + icon : theIcon, + type : thisData["type"], + typeSig : type, + name : thisData["name"], + faIcon : this.getIcoByType(thisData), + content: content }; + + var marker; + var coordinates; + var thisSig = this; + + //si le tag de l'élément est dans la liste des éléments à ne pas mettre dans les clusters + //on créé un marker simple + //TODO : refactor notClusteredTag > notClusteredType + //mylog.log("getCoordinates"); + //mylog.dir(thisData); + if($.inArray(type, this.notClusteredTag) > -1){ + coordinates = this.getCoordinates(thisData, "markerSingle"); + if(coordinates !== false) + marker = this.getMarkerSingle(thisMap, properties, coordinates); + } + //sinon on crée un nouveau marker pour cluster + else { + coordinates = this.getCoordinates(thisData, "markerGeoJson"); + if(coordinates !== false){ + marker = this.getGeoJsonMarker(properties, coordinates); + this.geoJsonCollection['features'].push(marker); + } + } + //mylog.log("content POPUT thisAddr : ", thisData); + + + if(notEmpty(thisData["addresses"])){ + $.each(thisData["addresses"], function(key, addr){ + var thisAddr = JSON.parse(JSON.stringify(thisData)); //duplicate value, prevent modifying thisData after this line DO NOT REMOVE IT CAN KILL THE WORLLLLLD ! ARE YOU CRAZY ? + thisAddr["address"] = addr["address"]; + thisAddr["geo"] = addr["geo"]; + thisAddr["geoPosition"] = addr["geoPosition"]; + var popup = thisSig.getPopup(thisAddr); + properties.content = popup; + coordinates = thisSig.getCoordinates(thisAddr, "markerSingle"); + if(coordinates !== false) + var multimarker = thisSig.getMarkerSingle(thisMap, properties, coordinates); + }); + properties.content = content; + } + + + if(thisData["type"] == "city"){ + //mylog.log("geoshapes ?"); + //mylog.dir(thisData); + + if(typeof thisData["geoShape"] != "undefined" && typeof thisData["geoShape"]["coordinates"] != "undefined"){ + var geoShape = Sig.inversePolygon(thisData["geoShape"]["coordinates"][0]); + this.addPolygon(geoShape); + } + } + + if(coordinates !== false){ + this.elementsMap.push(thisData); + this.listId.push(objectId); + this.populatePanel(thisData, objectId); //["tags"] + this.createItemRigthListMap(thisData, marker, thisMap); + }else thisSig.addToPanelWithoutGeopos(thisData, objectId); + + //ajoute l'événement click sur l'élément de la liste, pour ouvrir la bulle du marker correspondant + //si le marker n'est pas dans un cluster (sinon le click est géré dans le .geoJson.onEachFeature) + if($.inArray(type, this.notClusteredTag) > -1) + $(this.cssModuleName + " .item_map_list_" + objectId).click(function() + { thisMap.panTo(coordinates, {"animate" : true }); + thisSig.checkListElementMap(thisMap); + marker.openPopup(); + }); + //mylog.log("ok888"); + + + } + } + else{ + this.addToPanelWithoutGeopos(thisData, objectId); + } + } + + //affiche les MEMBERS + var thisSig = this; + if(thisData.links != null){ + if(thisData.links.members != null){ + $.each(thisData.links.members, function(i, thisMember) { + thisMember._id = { $id : i }; + thisSig.showOneElementOnMap(thisMember, thisMap); + }); + } + } + + }else { + if(thisData == null) return false; + + //mylog.warn("--------------- PAS D'ID ---------------------"); + //mylog.dir(thisData); + + if("undefined" != typeof thisData["chartOptions"]){ + //mylog.warn("--------------- LOAD CHART ---------------------"); + this.addChart(thisData) + } + return false; + } + + }; + + this.Sig.addToPanelWithoutGeopos = function(thisData, objectId){ + if(this.verifyPanelFilter(thisData) && typeof thisData.name != "undefined"){ + this.elementsMap.push(thisData); + this.listId.push(objectId); + this.populatePanel(thisData, objectId); //["tags"] + this.createItemRigthListMap(thisData); + var thisSig = this; + $(this.cssModuleName + " .item_map_list_" + objectId).click(function(){ + //toastr.success('click on element not in map'); + //mylog.dir(thisData); + thisSig.showModalItemNotLocated(thisData); + }); + } + }; + + this.Sig.showFilterOnMap = function(data, thisFilter, thisMap){ + //mylog.warn("--------------- showFilterOnMap ***%%% ---------------------"); + var thisSig = this; + //mylog.dir(data); + //mylog.dir(thisFilter); + var dataFilter = data; //(data != null) ? data[thisFilter] : thisFilter; alert(JSON.stringify(dataFilter)); + + if($.isArray(dataFilter)){ + $.each(dataFilter, function(i, thisData) { + ////mylog.warn("--------------- show each thisData ---------------------"); + ////mylog.dir(thisData); + thisSig.showOneElementOnMap(thisData, thisMap); + }); + } + else{ + thisSig.showOneElementOnMap(dataFilter, thisMap); + } + }; + + + this.Sig.showMapElements = function(thisMap, data, iconLegende, textLegende) + { + //mylog.warn("--------------- showMapElements ---------------------"); + if(typeof textLegende != "undefined" && textLegende != null && textLegende != ""){ + this.listPanel.tags = new Array(); + this.listPanel.types = new Array(); + this.panelFilter = "all"; + this.panelFilterType = "all"; + } + + //si la carte n'est pas chargée + //on mémorise les données et on les affichera avec le prochain showMap + if(CoSigAllReadyLoad != true) { + console.log("showMapElements CoSigAllReadyLoad false -> save data", data); + Sig.preloadElementsMap = data; + Sig.preloadIconLegende = iconLegende; + Sig.preloadTextLegende = textLegende; + return; + } + + mylog.log("--------------- showMapElements ---------------------", data); + //mylog.log(data); + if(data == null) return; + + showMapLegende(iconLegende, textLegende); + showIsLoading(false); + + var filterPanelValue = "citoyens"; + //enregistre les dernières données dans une variable locale + this.dataMap = data; + //alert("datas : " + JSON.stringify(this.dataMap)); + //efface les elements de la carte si elle n'est pas vide + if(this.markersLayer != "") this.clearMap(thisMap, false); + + //conteneur de marker cluster + this.markersLayer = new L.MarkerClusterGroup({"maxClusterRadius" : 40}); + thisMap.addLayer(this.markersLayer); + + //collection de marker geojson + this.geoJsonCollection = { type: 'FeatureCollection', features: new Array() }; + + //this.showIcoLoading(true); + + //on affiche les data filtre par filtre + var thisSig = this; + //var array = new Array(); + + var len = 0; + + $.each(data, function (key, value){ len++; });//alert("len : " + len); + if(len >= 1){ + $.each(data, function (key, value){ //mylog.log("type SIG ?"); mylog.dir(value); + var oneData = value; + if( notEmpty(value) && + (value.typeSig == "news" || + value.typeSig == "idea" || + value.typeSig == "question" || + value.typeSig == "announce" || + value.typeSig == "information" || + value.type == "activityStream" + ) && typeof value.author !== "undefined") { + oneData = value.author; + } + // if(value.type == "activityStream" && typeof value.target !== "undefined") { //mylog.log("newsStream"); + // oneData = value.target; + // } + thisSig.showFilterOnMap(oneData, key, thisMap); + }); + + }else{ + //mylog.log("showOneElementOnMap"); + thisSig.showOneElementOnMap(data, thisMap); + } + + //mylog.log("before onEachFeature"); + //mylog.dir(this.geoJsonCollection); + var points = L.geoJson(this.geoJsonCollection, { //Pour les clusters seulement : + onEachFeature: function (feature, layer) { //sur chaque marker + //mylog.log("onEachFeature"); + layer.bindPopup(feature["properties"]["content"]); //ajoute la bulle d'info avec les données + layer.setIcon(feature["properties"]["icon"]); //affiche l'icon demandé + layer.on('mouseover', function(e) { + //si le mouseover n'est pas autorisé + //ou si le zoom de la carte est = au zoom maximum (== ouverture cluster spiral) + if(thisSig.allowMouseoverMaker == false || + thisSig.map.getZoom() == thisSig.map.getMaxZoom()) return; + + layer.openPopup(); + thisSig.currentMarkerPopupOpen = layer; + }); + layer.on('click', function(e) { + thisSig.currentMarkerPopupOpen = layer; + thisMap.panTo(layer.getLatLng()); + layer.openPopup(); + }); + + //au click sur un element de la liste de droite, on zoom pour déclusturiser, et on ouvre la bulle + $(thisSig.cssModuleName + " .item_map_list_" + feature.properties.id).click(function(){ + thisSig.allowMouseoverMaker = false; + var coordinates = [feature.geometry.coordinates[1], + feature.geometry.coordinates[0]]; + thisMap.panTo(coordinates, {"animate" : false }); + + var visibleOne = null; + if(typeof layer != "undefined") + visibleOne = Sig.markersLayer.getVisibleParent(layer); + + if(typeof visibleOne != "undefined"){ + if(typeof visibleOne._childCount != "undefined"){ + var i = 0; + while(typeof visibleOne._childCount != "undefined" && i<5){ + coordinates = visibleOne.getLatLng(); + thisMap.panTo(coordinates, {"animate" : false }); + visibleOne.fire("click"); + if(typeof layer != "undefined") + visibleOne = Sig.markersLayer.getVisibleParent(layer); + thisSig.currentParentToOpen = visibleOne; + i++; + } + } + else{ + if(typeof visibleOne._spiderLeg == "undefined") { + thisMap.fire("click"); + thisMap.setZoom(15, {"animate" : false }); + thisMap.panTo(coordinates, {"animate" : false }); + thisSig.currentParentToOpen = null; + + } + } + } + thisSig.checkListElementMap(thisMap); + thisSig.currentMarkerToOpen = layer; + thisSig.currentMarkerPopupOpen = layer; + setTimeout("Sig.openCurrentMarker()", 700); + }); + } + + }); + //mylog.warn("--------------- showMapElements onEachFeature OK ---------------------"); + + this.markersLayer.addLayer(points); // add it to the cluster group + thisMap.addLayer(this.markersLayer); // add it to the map + + $('#ico_reload').removeClass("fa-spin"); + $('#ico_reload').css({"display":"none"}); + + if(this.initParameters.usePanel) + this.updatePanel(thisMap); + + this.checkListElementMap(thisMap); + + mylog.log("fitBounds", typeof noFitBoundAroundMe); + //mylog.dir(this.markersLayer.getBounds()); + if( typeof noFitBoundAroundMe == "undefined" || noFitBoundAroundMe != true){ + if("undefined" != typeof this.markersLayer.getBounds() && + "undefined" != typeof this.markersLayer.getBounds()._northEast ){ + thisMap.fitBounds(this.markersLayer.getBounds(), { 'maxZoom' : 15, 'animate':false }); + thisMap.zoomOut(); + } + } + + /* + thisMap.setZoom(17, {"animate" : false }); + thisMap.fitBounds(thisSig.markersLayer.getBounds(), { 'maxZoom' : 14, 'animate':false }); + // setTimeout(function(){ + // thisMap.fitBounds(thisSig.markersLayer.getBounds(), { 'maxZoom' : 14, 'animate':false }); + // }, 1500); + */ + + thisSig.constructUI(); + + this.showIcoLoading(false); + + }; + + //## + this.Sig.openCurrentMarker = function(){ + if(typeof this.currentParentToOpen != "undefined" && this.currentParentToOpen != null) + this.currentParentToOpen.fire("click"); + + if(typeof this.currentMarkerToOpen != "undefined" && this.currentMarkerToOpen != null) + this.currentMarkerToOpen.openPopup(); + + this.allowMouseoverMaker = true; + }; + + + //## + //## LOAD MAP ## + //## + + //## + //chargement de la carte + this.Sig.loadMap = function(canvasId, initParams) + { + + mylog.warn("--------------- loadMap ---------------------"); + canvasId += initParams.sigKey; + if(this.map == null){ + $("#"+canvasId).html(""); + $("#"+canvasId).css({"background-color": this.mapColor}); + + mylog.log("initParams", initParams); + //initialisation des variables de départ de la carte + //TODO not show accessToken here => use conf file or db + if(canvasId != ""){ + + var options = { "zoomControl" : false, + "scrollWheelZoom":true, + "center" : [51.505, -0.09], + "zoom" : 4, + "maxZoom" : 17, + "minZoom" : 3, + "worldCopyJump" : false }; + + if(notEmpty(initParams["mapProvider"]) && initParams.mapProvider == "mapbox"){ + L.mapbox.accessToken = initParams["mapboxToken"]; + var map = L.mapbox.map(canvasId, 'mapbox.streets', options); + //.setView([51.505, -0.09], 9); + }else if(notEmpty(initParams["mapProvider"]) && initParams.mapProvider == "OSM"){ + var map = L.map(canvasId, options); + Sig.tileLayer = L.tileLayer(initParams.mapTileLayer, { //'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', { + //attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>', + attribution: 'Map tiles by ' + initParams.mapAttributions, //'Map tiles by <a href="http://stamen.com">Stamen Design</a>', + //subdomains: 'abc', + zIndex:1, + minZoom: 3, + maxZoom: 17 + }); + + Sig.tileLayer.addTo(map).setOpacity(initParams.mapOpacity); + } + } + }else{ + var map = this.map; + } + //initialisation de l'interface + Sig.initEnvironnement(map, initParams); + if(canvasId == "") return; + + Sig.map.minZoom = 3; + Sig.map.maxZoom = 17; + + + + //rafraichi les tiles après le redimentionnement du mapCanvas + map.invalidateSize(false); + CoSigAllReadyLoad = true; + return map; + }; + + //show a modal when an item in the right list has no geoLocation on the map + this.Sig.showModalItemNotLocated = function(data){ + mylog.log("showModalItemNotLocated", data) + $("#modalItemNotLocated").modal('show'); + $("#modalItemNotLocated .modal-body").html("<i class='fa fa-spin fa-reload'></i>"); + + var objectId = this.getObjectId(data); + var popup = this.getPopupSimple(data); + $("#modalItemNotLocated .modal-body").html(popup); + $("#modalItemNotLocated #btn-open-details").click(function(){ + $("#popup"+objectId).click(); + }); + + $("#modalItemNotLocated #popup"+objectId).click(function(){ + $("#modalItemNotLocated").modal('hide'); + }); + } + + //## addContextMap ## + //Ajouter un élément au contextMap + this.Sig.addContextMap = function(contextMap, element, type) + { + + mylog.warn("--------------- addContextMap ---------------------", contextMap, element, type); + var elementMap = { + name : element.name , + username : element.username , + address : element.address , + geo : element.geo , + email : element.email , + id : element.id , + pending : element.pending , + profilImageUrl : element.profilImageUrl , + profilMarkerImageUrl : element.profilMarkerImageUrl , + profilMediumImageUrl : element.profilMediumImageUrl , + profilThumbImageUrl : element.profilThumbImageUrl , + tags : element.tags , + tobeactivated : element.tobeactivated , + type : element.type , + } + + if(typeof contextMap[type] == "undefined") + contextMap[type] = []; + + contextMap[type].push(elementMap); + + return contextMap; + }; + + this.Sig.modifLocalityContextMap = function(contextMap, element, type) + { + + mylog.log("--------------- modifLocalityContextMap ---------------------", contextMap, element, type); + + if(typeof contextMap[type] == "undefined") + contextMap[type] = []; + + $.each(contextMap[type], function(key, elt){ + if(elt.id == contextData.id){ + contextMap[type][key]["address"] = element.address; + contextMap[type][key]["geo"] = element.geo; + } + }); + return contextMap; + }; + + + + this.Sig = this.getSigInitializer(this.Sig); + + //mylog.log("load"); + + this.Sig = this.getSigPanel(this.Sig); + this.Sig = this.getSigRightList(this.Sig); + this.Sig = this.getSigPopupContent(this.Sig); + this.Sig = this.getSigFindPlace(this.Sig); + this.Sig = this.getSigCharts(this.Sig); + + return this.Sig; + }; diff --git a/assets/js/sig/map_charts.js b/assets/js/sig/map_charts.js new file mode 100755 index 0000000000000000000000000000000000000000..9f7fbe450f881c5cd5d2677a71765f38c586433b --- /dev/null +++ b/assets/js/sig/map_charts.js @@ -0,0 +1,150 @@ + +/** +*** CHARTS +***/ + +SigLoader.getSigCharts = function (Sig){ + + Sig.markersLayer = ""; + Sig.chartsList = new Array(); + + //Permet de pré-charger une Chart + Sig.addChart = function(thisData){ + + var name = thisData["name"]; + var name_txt = thisData["name_text"]; + var FeatureCollection = thisData["chart"]; + var chartOptions = thisData["chartOptions"]; + + mylog.log(">>>> BEFORE ADD CHART <<<<< "+name); + mylog.dir(FeatureCollection); + mylog.dir(chartOptions); + + this.chartsList[name] = new Array(); + this.chartsList[name]["FeatureCollection"] = FeatureCollection; + this.chartsList[name]["chartOptions"] = chartOptions; + + var thisSig = this; + //var btn = '<button type="button" class="btn btn-map" name="' + name + '" id="btn-chart-'+ name +'"><i class="fa fa-bar-chart-o"></i> '+ name +'</button>'; + + + var btn = '<div class="element-right-list">' + + '<button name="' + name + '" id="btn-chart-'+ name +'" class="item_map_list">' + + "<div class='left-col'>" + + "<div class='thumbnail-profil'></div>" + + "<div class='ico-type-account'><i class='fa fa-bar-chart-o'></i></div>" + + "</div>" + + "<div class='right-col'>" + + "<div class='info_item pseudo_item_map_list'>" + name_txt + "</div>" + + "</div>" + + "<div class='separation'></div>" + +"</button>" + + "</div>"; + + //$("#btn-group-charts-map").append(btn); + $(this.cssModuleName + " #liste_map_element").append(btn); + + $("#btn-chart-"+ name).click(function(){ mylog.log("click on btn chart"); + var name = $(this).attr("name"); + thisSig.loadChart(name); + }); + } + //*** + // Permet d'afficher les éléments d'une + /* >>>>>>>>>>>>>> LOAD CHART <<<<<<<<<<<<<<< */ + Sig.loadChart = function (name){ + if(this.initParameters.useChartsMarkers != true) return; + + var FeatureCollection = this.chartsList[name]["FeatureCollection"]; + var chartOptions = this.chartsList[name]["chartOptions"]; + + mylog.log(">>>> LOAD CHART <<<<<"); + mylog.dir(FeatureCollection); + mylog.dir(chartOptions); + + //réinitialise le groupLayer + if(this.markersLayer != ""){ + this.map.removeLayer(this.markersLayer); + this.markersLayer = ""; + } + + var thisSig = this; + + function getToolTip(feature, value, options, chartOptions){//unity, color){ + mylog.log(">>> tooltip chartOptions : "); mylog.dir(chartOptions); + + var tooltip = ""; //"<div class='twh-tooltip-value' style='color:" + options.color + ";'> " + value + " " + options.unity + "</div>"; + $.each(chartOptions, function(i, element) { mylog.log("element"); mylog.warn(element); + tooltip += + "<div class='twh-tooltip-element'>" + + "<span class='label label-info' style='font-size:25px; background-color:" + element.fillColor + " !important;'>" + + element.title + " " + + feature[i] + " " + + element.unity + + "</span>" + + "</div>"; + + }); + return tooltip; + //"<div class='twh-tooltip-element'><span class='label label-info' style='font-size:25px;'><i class='fa fa-umbrella'></i> " + feature.précipitations + " mm</span></div>" + + //""; + } + + + //$.getJSON(url, function(data) { //pour charger des données json depuis un fichier) + var geojsonLayer = L.geoJson(FeatureCollection, { + pointToLayer: function (feature, latlng) { + + var completeChartOption = new Array(); + var data = new Array(); + $.each(chartOptions.options, function(i, options) { + //construit le format valide des options à partir des options données en param + completeChartOption[i] = { + fillColor: options.fillColor, + minValue: options.minValue, + maxValue: options.maxValue, + maxHeight: chartOptions.maxHeight, + displayText: function (value) { + return getToolTip(feature, value, options, chartOptions.options); + } + }; + //construit le format valide pour les valeurs des données + data[i] = feature[i]; + }); + + //compile les options correctement + var options = { + data: data, + chartOptions: completeChartOption, + weight: 1, + opacity: 1, + fill:false, + radius:chartOptions.radius, + rotation:0.0, + iconSize: new L.Point(300, 0) + } + + var chartMaker = thisSig.getChartMarker(chartOptions.type, latlng, options, chartOptions.options); + return chartMaker; + } + }); + + this.markersLayer = new L.MarkerClusterGroup({"maxClusterRadius" : 100}); + this.markersLayer.addLayer(geojsonLayer); + this.map.addLayer(this.markersLayer); + this.map.fitBounds(this.markersLayer.getBounds(), { 'maxZoom' : 14 }); + mylog.warn(">>>> CHART LOADED <<<<<") + + }; + + Sig.getChartMarker = function (chartType, latlng, options){ //alert(chartType); + if(chartType == "BarChartMarker") return new L.BarChartMarker(latlng, options); + if(chartType == "RadialBarChartMarker") return new L.RadialBarChartMarker(latlng, options); + if(chartType == "PieChartMarker") return new L.PieChartMarker(latlng, options); + if(chartType == "CoxcombChartMarker") return new L.CoxcombChartMarker(latlng, options); + if(chartType == "StackedRegularPolygonMarker") return new L.StackedRegularPolygonMarker(latlng, options); + if(chartType == "RadialMeterMarker") return new L.RadialMeterMarker(latlng, options); + }; + + return Sig; +}; diff --git a/assets/js/sig/map_findPlace.js b/assets/js/sig/map_findPlace.js new file mode 100755 index 0000000000000000000000000000000000000000..94f6df1821a5c458c7a085855a3d4dc023e91801 --- /dev/null +++ b/assets/js/sig/map_findPlace.js @@ -0,0 +1,701 @@ + +/** +*** FIND PLACE +***/ + +SigLoader.getSigFindPlace = function (Sig){ + + Sig.currentResultResearch = ""; + Sig.nbMaxTentative = 4; + Sig.fullTextResearch = true; + //pour effectuer des recherches nominatim à partir d'un form externe (différent de la recherche intégrée) + Sig.useExternalSearchPlace = false; + Sig.markerNewData = ""; + + //*** + //initialisation de l'interface et des événements (click, etc) + /* >>>>>>>>>>>>>> MAP <<<<<<<<<<<<<<< */ + Sig.initFindPlace = function (){ + mylog.warn("--------------- initFindPlace ---------------------"); + var thisSig = this; + + //## + //BTN FIND PLACE + $(thisSig.cssModuleName + " .btn-find-place").click(function (){ //alert("find place"); + var address = $(thisSig.cssModuleName + " #txt-find-place").val(); + thisSig.findPlace(1); + }); + + //## + //ON FOCUS TXT FIND PLACE + //efface la dropDown qui contient le résultat de recheche + //lorsque l'on click sur le champ de texte, + //si le champs de texte est vide + $(thisSig.cssModuleName + ' .txt-find-place').focus(function(event) { + if($(thisSig.cssModuleName + ' #txt-find-place').val() != "") + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'block'}); + else + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'none'}); + }); + + //## + //ON KEY UP TXT FIND PLACE + //lance un timeout de 1 seconde + //après 1 seconde sans nouvelle lettre, on lance la recherche + var timeoutFindPlace; + $(thisSig.cssModuleName + ' .txt-find-place').keyup(function(event) { + clearTimeout(timeoutFindPlace); + var action = "Sig.findPlace(1)";//"+$(thisSig.cssModuleName + " #txt-find-place").val()+"')"; + timeoutFindPlace = setTimeout(action, 1000); + //} + }); + + $(thisSig.cssModuleName + ' #btn-find-more').click(function(event) { + //mylog.warn("--------------- findMORE ---------------------"); + if($(thisSig.cssModuleName + ' #full-research').hasClass("hidden")){ + $(thisSig.cssModuleName + ' #full-research').removeClass("hidden"); + $(thisSig.cssModuleName + ' #txt-find-place').addClass("hidden"); + thisSig.fullTextResearch = false; + } + else{ + $(thisSig.cssModuleName + ' #full-research').addClass("hidden"); + $(thisSig.cssModuleName + ' #txt-find-place').removeClass("hidden"); + this.fullTextResearch = true; + } + //mylog.log("fullTextResearch = " + this.fullTextResearch); + //$(thisSig.cssModuleName + ' #full-research').toggle(); + }); + + //## + //ON FOCUS MAP + //lorsqu'on click sur la carte, la dropdown disparait + $(thisSig.cssModuleName + ' #mapCanvas' + this.sigKey).focus(function(event) { + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'none'}); + }); + + }; + + //## + //recherche un lieu par nominatim + Sig.findPlace = function (nbTentative){ //alert(address); + mylog.warn("--------------- findPlace ---------------------"); + var thisSig = this; + + //affiche le message "recherche en cours" + if(!thisSig.useExternalSearchPlace){ + $(thisSig.cssModuleName + " #list-dropdown-find-place").html('<li style="width:100%;"><a href="#"><i class="fa fa-refresh fa-spin"></i> ('+ nbTentative +') '+trad.currentlyresearching+' ...</a></li>'); + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'block'}); + } + var urlRequest = this.getNominatimRequest(nbTentative); + //mylog.log(urlRequest); + $.ajax({ + //url: "http://nominatim.openstreetmap.org/search?q=" + address + "&format=json&polygon=0&addressdetails=1", + url: "//nominatim.openstreetmap.org/search" + urlRequest + "&format=json&polygon=1&addressdetails=1", + type: 'POST', + dataType: 'json', + //crossDomain: true, + complete: function () { }, + success: function (obj) + { + if (obj.length > 0) { + + if(thisSig.useExternalSearchPlace) return obj; + + $(thisSig.cssModuleName + " #list-dropdown-find-place").html(""); + + thisSig.currentResultResearch = obj; + var i = 0; + + mylog.log("reponse nominatim : "); + mylog.dir(obj); + + //affichage des résultats de la recherche + $.each(obj, function (){ + + var itemDropbox = thisSig.getItemDropBox(this); //""; + if(itemDropbox != ""){ + itemDropbox = '<li style="width:100%;"><a id="btn-show-place-'+i+'" num="'+i+'" href="#"><i class="fa fa-map-marker"></i> ' + itemDropbox + '</a></li>'; + $(thisSig.cssModuleName + " #list-dropdown-find-place").append(itemDropbox); + $(thisSig.cssModuleName + ' #btn-show-place-'+i).click(function(){ + var num = $(this).attr('num'); + thisSig.showPlace(num); + }); + } + i++; + }); + //$('#btn-dropdown-find-place').dropdown('toggle'); + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'block'}); + $(thisSig.cssModuleName + ' #btn-dropdown-find-place').dropdown('toggle'); + } + else { + //alert('no such address.'); + if(nbTentative <= thisSig.nbMaxTentative) + { + thisSig.findPlace(nbTentative+1); + } + else{ + var itemDropbox = '<li style="width:100%;"><a href="#"><i class="fa fa-exclamation-circle"></i> '+trad.noresult+'</a></li>'; + $(thisSig.cssModuleName + " #list-dropdown-find-place").html(itemDropbox); + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'block'}); + } + } + }, + error: function (error) { + var itemDropbox = '<li style="width:100%;"><a href="#"><i class="fa fa-exclamation-circle"></i> Erreur nominatim ajax jquery</a></li>'; + $(thisSig.cssModuleName + " #list-dropdown-find-place").html(itemDropbox); + + //alert('erreur nominatim ajax jquery (map_findPlace.js)'); + } + }); + }; + + if(typeof getCountries != "undefined") + Sig.countryName = getCountries("select2"); + + Sig.getNominatimRequest = function(nbTentative){ + + if(this.fullTextResearch == true){ + if(this.useExternalSearchPlace){ + var str = ""; + + //recupere le nom de la rue + if(nbTentative < 1 && nbTentative < 2) + if($("#fullStreet").length>0 && $("#fullStreet").val() != null){ + str += $("#fullStreet").val(); + } + + //recupere le code postal + if($("#postalCode").length>0 && $("#postalCode").val() != null){ + if(str != "") str += ","; + str += $("#postalCode").val(); + } + else if($("#cp").length>0 && $("#cp").val() != null){ + if(str != "") str += ","; + str += $("#cp").val(); + } + + //recupere le nom de la ville + if($("#city").length>0 && nbTentative < 3){ + var textVal = $("#city option:selected").text(); + //toastr.info(textVal); + if(typeof textVal != "undefined" && textVal != ""){ + if(textVal != null){ + if(str != "") str += " "; + str += textVal; + } + } + } + if(nbTentative < 4){ + var textVal = ""; + if($("#organizationCountry").length) textVal = $("#organizationCountry").attr("value"); + if($("#projectCountry").length) textVal = $("#projectCountry").attr("value"); + if($("#eventCountry").length) textVal = $("#eventCountry").attr("value"); + + if(typeof textVal != "undefined" && textVal != ""){ + if(textVal != null){ + if(str != "") str += " "; + //transforme l'id du pays en string pour nominatim + if(typeof this.countryName != "undefined"){ + $.each(this.countryName, function(key, value){ + if(value.id == textVal) textVal = value.text; + }); + } + str += textVal; + } + } + } + mylog.log("nominatim external research : " + "?q=" + transform(str)); + return "?q=" + transform(str); + } + else{ + return "?q=" + $(this.cssModuleName + " #txt-find-place").val(); + } + } + + + function transform(str){ //alert(newValue); + var res = ""; + //remplace les espaces par des + + for(var i = 0; i<str.length; i++){ + res += (str.charAt(i) == " ") ? "+" : str.charAt(i); + } + return res; + }; + + var num = transform($(this.cssModuleName + " #txt-num-place").val());//.replace(" ", "+"); + var street = transform($(this.cssModuleName + " #txt-street-place").val());//.replace(" ", "+"); + var city = transform($(this.cssModuleName + " #txt-city-place").val());//.replace(" ", "+"); + var cp = transform($(this.cssModuleName + " #txt-cp-place").val());//.replace(" ", "+"); + var state = transform($(this.cssModuleName + " #txt-state-place").val());//.replace(" ", "+"); + + if(num != "") street = num + "+" + street; + + var request = "?"; + + //on utilise la street pour la tentative 1 ou 2 (mais pas à la 3) + if(street != "" && (nbTentative < 3)) request += "street=" + street; + //on utilise toujours la ville et le cp + if(city != "") request += "&city=" + city; + if(cp != "") request += "&postalcode=" + cp; + //on utilise country pour la tentative 1 + if(state != "" && nbTentative == 1) request += "&country=" + state; //"&state=" + state + + //on utilise country pour la tentative 2 + if(state != "" && nbTentative == 2) request += "&state=" + state; //"&state=" + state + + //pas de state pour la 3 + + if(nbTentative == 3){ + request = "?q="; + if(street != "") request += street; + if(city != "") request += ",+" + city; + if(cp != "") request += ",+" + cp; + if(state != "") request += ",+" + state; + } + + mylog.warn("--------------- request nominatim ("+nbTentative+") : " + request); + + return request; + }; + + Sig.getItemDropBox = function(thisResult){ + //rajoute une valeur à la string str pour construire l'adresse complète du lieu + function concat(str, newValue){ //alert(newValue); + if(str == "" && newValue != undefined) return newValue; + if(str != "" && newValue != undefined) return str+=", "+newValue; + return str; + }; + + mylog.warn("-------" + JSON.stringify(thisResult.address)); + + var itemDropbox = ""; + if(thisResult.address !== undefined){ + var city = $(this.cssModuleName + " #txt-city-place").val();//.replace(" ", "+"); + var cp = $(this.cssModuleName + " #txt-cp-place").val();//.replace(" ", "+"); + var state = $(this.cssModuleName + " #txt-state-place").val();//.replace(" ", "+"); + + itemDropbox = concat(itemDropbox, thisResult.address.house_number); + itemDropbox = concat(itemDropbox, thisResult.address.road); + + //ajoute la ville si elle existe + itemDropbox = concat(itemDropbox, thisResult.address.city); + + //ajoute le code postal s'il existe + itemDropbox = concat(itemDropbox, thisResult.address.postcode); + + //ajoute le pays s'il existe + if("undefined" != typeof thisResult.address.state){ + //if(state.toLowerCase() == thisResult.address.state.toLowerCase()) + itemDropbox = concat(itemDropbox, thisResult.address.state); + }else{ + if("undefined" != typeof thisResult.address.country){ + //if(state.toLowerCase() == thisResult.address.country.toLowerCase()) + itemDropbox = concat(itemDropbox, thisResult.address.country); + } + } + } + return itemDropbox; + } + + Sig.panMapTo = function (lat, lng){ + var latLng = [lat, lon]; + this.map.panTo(latLng); + this.map.setZoom(10); + }; + + Sig.showPlace = function (id){ + var thisSig = this; + var bounds = this.currentResultResearch[id].boundingbox; + var southWest = L.latLng(bounds[0], bounds[2]), + northEast = L.latLng(bounds[1], bounds[3]), + LBounds = L.latLngBounds(southWest, northEast); + + //this.map.fitBounds(LBounds); + + var options = { id : 0, + icon : this.getIcoMarker({'type' : 'markerPlace'}), + content : thisSig.getPopupSearchPlace($(thisSig.cssModuleName + ' #btn-show-place-'+id).html()) + }; + + var coordinates = new Array(this.currentResultResearch[id].lat, this.currentResultResearch[id].lon); + + //efface le marker s'il existe + if(this.markerFindPlace != null) this.map.removeLayer(this.markerFindPlace); + + this.markerFindPlace = this.getMarkerSingle(this.map, options, coordinates); + this.markerFindPlace.openPopup(); + + //efface le polygone s'il existe + if(this.mapPolygon != null) this.map.removeLayer(this.mapPolygon); + + //si l'élément à afficher est une ville et qu'il y a un polygone dans les données + //on l'affiche + if( (this.currentResultResearch[id].type == "city" || + this.currentResultResearch[id].type == "town") && + "undefined" != typeof this.currentResultResearch[id].polygonpoints){ + + var allPolygonpoints = this.currentResultResearch[id].polygonpoints; + + var polygonpoints = new Array(); + $.each(allPolygonpoints, function(index, value){ + polygonpoints.push(new Array(parseFloat(value[1]), parseFloat(value[0]))); + }); + + this.showPolygon(polygonpoints); + } + + //on ferme la dropdown + $(thisSig.cssModuleName + ' #list-dropdown-find-place').css({'display':'none'}); + $(thisSig.cssModuleName + ' #btn-dropdown-find-place').dropdown('toggle'); + + this.map.panTo(coordinates); + }; + + + Sig.execFullSearchNominatim = function (nbTentative, geoShape){ + /* var oldFullText = this.fullTextResearch; + this.fullTextResearch = true; + this.useExternalSearchPlace = true; + var res = this.findPlace(0); + this.fullTextResearch = oldFullText; + this.useExternalSearchPlace = false; + return res; + */ + mylog.warn("--------------- execFullSearchNominatim ---------------------"); + var thisSig = this; + + $("#alert-city-found").addClass("hidden"); + + this.useExternalSearchPlace = true; + var urlRequest = this.getNominatimRequest(nbTentative); + if(geoShape != null){ + //viewbox=<left>,<top>,<right>,<bottom> + //http://wiki.openstreetmap.org/wiki/Nominatim#Parameters + urlRequest += "&viewbox="+geoShape.getWest()+","+geoShape.getNorth()+"," + +geoShape.getEast()+","+geoShape.getSouth(); + } + mylog.log("urlRequest", urlRequest); + $.ajax({ + url: "//nominatim.openstreetmap.org/search" + urlRequest + "&format=json&polygon=1&addressdetails=1", + type: 'POST', + dataType: 'json', + complete: function () { }, + success: function (obj) + { + if (obj.length > 0) { + //mylog.log("search success"); + //déclarer cette fonction avant d'executer Sig.execFullSearchNominatim + callBackFullSearch(obj); + //return obj; + } + else { + if(nbTentative <= thisSig.nbMaxTentative){ + thisSig.execFullSearchNominatim(nbTentative+1); + } + } + }, + error: function (error) { + + } + }); + }; + + Sig.showCityOnMap = function(geoPosition, isNotSV, type){ + mylog.log(geoPosition); + var thisSig = this; + + var cp = $("#postalCode").val(); + if(typeof cp == "undefined") cp = $("#cp").val(); + + mylog.dir(geoPosition); + var position = null; + mylog.log("typof geoPosition.geo", typeof geoPosition.geo); + if(typeof geoPosition.lat != "undefined"){ + var lat=geoPosition.lat; + var lon=geoPosition.lon; + var latlon = {"latitude":lat,"longitude":lon}; + geoPosition["geo"]=latlon; + + } + if(typeof geoPosition.geo == "undefined"){ + $.each(geoPosition, function (key, value){ + + var addressCp = typeof value.address.postcode != "undefined" ? value.address.postcode : ""; + + //mylog.log((citiesByPostalCode)); + //$.each(citiesByPostalCode, function (key2, value2){ + + var city = typeof value.address.city != "undefined" ? value.address.city : + typeof value.address.village != "undefined" ? value.address.village : ""; + var countryCode = typeof value.address.country_code != "undefined" ? value.address.country_code : ""; + + mylog.log("cp", cp, "addressCp", addressCp); + if(cp == addressCp && countryCode == "fr" && position == null) position = value; + // if(city != "" && value2.text != null){ + // //mylog.log(value2.text); mylog.log(value.address.city); + // if(//thisSig.clearStr(value2.text) == thisSig.clearStr(city) + // //|| + // cp == addressCp + // && position == null) + // position = value; + // } + //}); + }); + }else{ + mylog.log("pos geo found"); + position = { "lat" : geoPosition.geo.latitude, + "lon" : geoPosition.geo.longitude + }; + } + + mylog.log('position found ? ', position); + if(position == null) { + $("#iconeChargement").hide(); + return false; //position = geoPosition.geo; + } + + //mylog.log("position"); mylog.dir(position); + + $("#geoPosLongitude").attr("value", position["lon"]); + $("#geoPosLatitude").attr("value", position["lat"]); + + var latlng = [position["lat"], position["lon"]]; + //thisSig.map.setView(latlng, 15); + + thisSig.centerSimple(latlng, 15); + //mylog.log("center ok"); + + var content = thisSig.getPopupNewData(); + mylog.log("this type", type); + if(type=="person") content = thisSig.getPopupNewPerson(); + + var properties = { id : "0", + icon : thisSig.getIcoMarkerMap({"type" : type}), + content: content }; + + //mylog.dir(properties); + //mylog.log("before getMarkerSingle"); + thisSig.clearMap(thisSig.map, false); + var markerNewData = thisSig.getMarkerSingle(thisSig.map, properties, latlng); + //mylog.dir(markerNewData); + thisSig.map.panTo(markerNewData.getLatLng(), {animate:false}); + thisSig.map.setZoom(15, {animate:false}); + Sig.centerSimple(markerNewData.getLatLng(), 15); + + thisSig.markerNewData = markerNewData; + markerNewData.openPopup(); + markerNewData.dragging.enable(); + + if(typeof geoPosition.geoShape != "undefined"){ + var geoShape = Sig.inversePolygon(geoPosition.geoShape.coordinates[0]); + thisSig.showPolygon(geoShape); + thisSig.map.fitBounds(geoShape); + } + + var timeout = setTimeout(function() { + Sig.map.panBy([260, 0]); + }, 1000); + + $("#btn-validate-geopos").click(function(){ + btnValidateClick(isNotSV); + }); + + thisSig.markerNewData.on('popupopen', function(e){ + $("#btn-validate-geopos").click(function(){ + btnValidateClick(isNotSV); + }); + }); + + thisSig.markerNewData.on('dragend', function(e){ + thisSig.markerNewData.openPopup(); + }); + + thisSig.markerNewData.on('dragstart', function(e){ + if(isNotSV) $("#ajaxSV").hide(400); + else { + $(".noteWrap").hide(400); + $(".main-login").hide(400); + } + + }); + + $('#btn-show-city').click(function(){ + if(isNotSV) $("#ajaxSV").hide(400); + else { + $(".noteWrap").hide(400); + $(".main-login").hide(400); + } + thisSig.map.panTo(thisSig.markerNewData.getLatLng(), {animate:false}); + thisSig.map.setZoom(15, {animate:false}); + + }); + + if(!isNotSV) $(".form-add-data").css("top" , "200px"); + + function btnValidateClick(isNotSV){ //alert("yepaé"); + mylog.log("btnValidateClick"); + Sig.markerNewData.closePopup(); + Sig.map.panTo(Sig.markerNewData.getLatLng()); + Sig.map.panBy([260, 0]); + + if(isNotSV) $("#ajaxSV").show(400); + else { + $(".noteWrap").show(400); + $(".main-login").show(400); + } + + $("#geoPosLongitude").attr("value", Sig.markerNewData.getLatLng().lng); + $("#geoPosLatitude").attr("value", Sig.markerNewData.getLatLng().lat); + Sig.map.invalidateSize(false); + Sig.markerNewData.openPopup(); + + showMap(false); + + } + $("#alert-city-found").removeClass("hidden"); + $("#iconeChargement").hide(); + + + return true; + }; + + + Sig.markerModifyPosition = null; + Sig.entityTypeModifyPosition = null; + Sig.entityIdModifyPosition = null; + + + Sig.startModifyGeoposition = function (entityId, entityType, entity){ + + //vérifie si l'entité donné à bien une position geo + var coordinates = this.getCoordinates(entity, "markerSingle"); + //si elle n'en a pas on sort + mylog.log("startModifyGeoposition coordinates", coordinates); + mylog.dir(entity); + + if(typeof coordinates == "undefined" || coordinates == null) { + //findGeoPosByAddress(); + return; + } + + + //vide la carte + this.clearMap(); + //supprime myMarker + this.map.removeLayer(this.myMarker); + + this.entityIdModifyPosition = entityId; + this.entityTypeModifyPosition = entityType; + + //recupere toutes les info pour construire le marker à déplacer + var profilMarkerImageUrl = typeof entity.profilMarkerImageUrl != "undefined" ? entity.profilMarkerImageUrl : ""; + var popupContent = this.getPopupModifyPosition(entity); + var properties = { id : "0", + icon : this.getIcoMarkerMap({type:entityType, profilMarkerImageUrl:profilMarkerImageUrl}), + type : entityType, + typeSig : entityType, + faIcon : this.getIcoByType(entityType), + content: popupContent//"<h1>Modify the position of this entity in the map</h1><br/>" + }; + + //creation du nouveau marker que l'on va pouvoir déplacer + this.markerModifyPosition = this.getMarkerSingle(this.map, properties, coordinates); + //activation du déplacement du marker par la souris + this.markerModifyPosition.dragging.enable(); + this.markerModifyPosition.openPopup(); + //effet bounce + this.markerToBounce = this.markerModifyPosition; + this.bounceMarker(0, { duration: 500, //va effectuer un saut pendant 500 miliemes de secondes + height: 15, //d'une hauteur de 15px + interval: 5000, //toutes les 2 secondes + occurence:5 }); //5 fois de suite + + //zoom sur le nouveau marker + //this.map.panTo(coordinates); + this.map.setView(coordinates, 13); + + //désactive le bounce quand on click sur la marker + this.markerToBounce.on("click", function(){ + Sig.markerToBounce = null; + if(typeof Sig.timerbounce != "undefined") clearTimeout(Sig.timerbounce); + }); + //désactive le bounce quand on le déplace + this.markerToBounce.on("dragstart", function(){ + Sig.markerToBounce = null; + if(typeof Sig.timerbounce != "undefined") clearTimeout(Sig.timerbounce); + }); + //lorsqu'on vient de déplacer le marker, on ré-ouvre la popup + this.markerToBounce.on("dragend", function(){ + if(Sig.markerModifyPosition != null) + Sig.markerModifyPosition.openPopup(); + //et on enregistre les coordonnées + $("#geoPosLongitude").attr("value", Sig.markerModifyPosition.getLatLng().lng); + $("#geoPosLatitude").attr("value", Sig.markerModifyPosition.getLatLng().lat); + }); + //lorsqu'on vient de déplacer la map, on ré-ouvre la popup + this.map.on("dragend", function(){ + if(Sig.markerModifyPosition != null) + Sig.markerModifyPosition.openPopup(); + }); + + //lorsque la popup s'ouvre, on ajoute l'event click sur le bouton de validation + this.markerToBounce.on("popupopen", function(){ + $("#btn-validate-new-position").click(function(){ + var position = Sig.markerModifyPosition.getLatLng(); + Sig.saveNewGeoposition( Sig.entityIdModifyPosition, + Sig.entityTypeModifyPosition, + position.lat, + position.lng); + }); + }); + + $("#btn-validate-new-position").click(function(){ + var position = Sig.markerModifyPosition.getLatLng(); + Sig.saveNewGeoposition( Sig.entityIdModifyPosition, + Sig.entityTypeModifyPosition, + position.lat, + position.lng); + + }); + + + }; + + Sig.saveNewGeoposition = function (entityId, entityType, latitude, longitude){ + mylog.log("start save geopos"); + clearTimeout(Sig.timerbounce); + $("#lbl-loading-saving").removeClass("hidden"); + $("#lbl-loading-saving").html("<center><i class='fa fa-refresh fa-2x center fa-spin'></i></br>Enregistrement de la nouvelle position...<br>Merci de patienter...</center>"); + $.ajax({ + url: baseUrl+"/"+moduleId+"/sig/updateentitygeoposition", + type: 'POST', + data: "entityType="+entityType+"&entityId="+entityId+"&latitude="+latitude+"&longitude="+longitude, + success: function (obj){ + //alert(entityType); + if( (entityType == "citoyens" || entityType == "person") && userId == entityId){ + //actualise myPosition pour que le bouton "home" de la carto centre sur la nouvelle position + Sig.myPosition.position.latitude = latitude; + Sig.myPosition.position.longitude = longitude; + if(location.hash != "#default.twostepregister"){ + urlCtrl.loadByHash(location.hash); + }else{ + achiveTSRAddress(); + } + } + else{ + //recharge la fiche info ouverte + urlCtrl.loadByHash(location.hash); + } + + Sig.map.removeLayer(Sig.markerModifyPosition); + Sig.markerModifyPosition = null; + + toastr.success("La position a été mise à jour avec succès"); + }, + error: function(error){ + mylog.log("Une erreur est survenue pendant l'enregistrement de la nouvelle position"); + mylog.log("entityType="+entityType+"&entityId="+entityId+"&latitude="+latitude+"&longitude="+longitude); + } + }); + }; + + return Sig; +}; diff --git a/assets/js/sig/map_initializer.js b/assets/js/sig/map_initializer.js new file mode 100755 index 0000000000000000000000000000000000000000..a52c1eb776118c2cbc5222371c092a400b4a045d --- /dev/null +++ b/assets/js/sig/map_initializer.js @@ -0,0 +1,681 @@ + + /** + *** INITIALIZER + ***/ + + SigLoader.getSigInitializer = function (Sig){ + + //*** + //initialisation de l'interface et des événements (click, etc) + Sig.initEnvironnement = function (thisMap, params){ + + ////mylog.log("initParams"); + ////mylog.dir(params); + + var thisSig = this; + thisSig.userData = null; + + //memorise les paramètres dans une variable globale de l'instance SIG + if(params != "restart") + thisSig.initParameters = params; + + //memorise la carte + thisSig.map = thisMap; + + //mémorise le nom (identifiant css classe) utilisé pour cette instance + thisSig.cssModuleName = ".sigModule" + params.sigKey; + + //mémorise la clé utilisé pour cette instance + thisSig.sigKey = params.sigKey; + + //mémorise le nom (identifiant css classe) utilisé pour cette instance + thisSig.mapColor = params.mapColor; + + //mémorise la liste des éléments non clusturisés + thisSig.notClusteredTag = params.notClusteredTag; + + thisSig.tileMode = "terrain"; + + //initialise la position de la carte + thisMap.setView(params.firstView.coordinates, params.firstView.zoom); + + thisSig.maxZoom = 20; + thisSig.minZoom = 3; + + this.loadIcoParams(); + + + if(params.useRightList){ + //lorsque la vue de la carte change, on actualise la liste d'élément (rightList) + //thisMap.on('moveend', function(e) { thisSig.checkListElementMap(thisMap); }); + //losque on effectue une recherche dans le champs de texte + $(this.cssModuleName + " #input_name_filter" ).keyup(function (){ + mylog.log("input_name_filter", thisMap, $(this).val()); + if(typeof $(this).val() != "undefined" && typeof networkJson != "undefined"){ + mylog.log("ici", $(this).val()); + searchValNetwork = $(this).val() ; + updateMap(); + } + thisSig.checkListElementMap(thisMap); + }); + //lorsqu'on active/désactive le filtre par zone + $(this.cssModuleName + " #chk-scope").click(function (){ thisSig.checkListElementMap(thisMap); }); + + $(".btn-open-right-list").click(function(){ + if($("#right_tool_map").hasClass("min")){ + $("#right_tool_map").removeClass("min"); + $(this).html("<i class='fa fa-angle-right'></i>"); + }else{ + $("#right_tool_map").addClass("min"); + $(this).html("<i class='fa fa-angle-left'></i>"); + } + thisSig.constructUI(); + + }); + } + + //initialise les boutons zoom-in et zoom-out + if(params.useZoomButton){ + $( this.cssModuleName + " #btn-zoom-in" ) .click(function (){ mylog.log(thisMap.getZoom(), "max : ", thisMap.getMaxZoom(), "min : ", thisSig.map.getMinZoom()); + if(thisMap.getZoom() < thisSig.maxZoom) thisMap.zoomIn(); + }); + $( this.cssModuleName + " #btn-zoom-out" ) .click(function (){ mylog.log(thisMap.getZoom(), "max : ", thisMap.getMaxZoom(), "min : ", thisSig.map.getMinZoom()); + if(thisMap.getZoom() > thisSig.minZoom) thisMap.zoomOut(); + }); + } + + //initialise les boutons zoom-in et zoom-out + if(params.useHomeButton){ + this.initHomeBtn(); + } + + $("#btn-back").click(function(){ + showMap(false); + }) + //if(params.useFullScreen){ + //$( this.cssModuleName + " #btn-full-screen" ).click(function (){ thisMap.setFullScreen(); }); + $( window ).resize(function() { + thisSig.constructUI(); + }); + thisSig.constructUI(); + //} + + + + //affiche les coordonnées d'un click , dans une zone sous la carte (utile pour récupérer des coordonnées rapidement) + if(params.useHelpCoordinates){ + thisMap.on('click', function(e) { + var pos = e.latlng; + if(typeof pos != "undefined") + $("#help-coordinates").html('lat lng : ' + pos.lat + ", " + pos.lng); + }); + } + + if(params.usePanel){ + + this.currentFilter = "all"; + + $(this.cssModuleName + ' #item_panel_map_all').click(function(){ + thisSig.changeFilter('all', thisMap, "tags"); + }); + + $(thisSig.cssModuleName + " #btn-panel").click(function(){ + thisSig.switchDropDown("panel_map"); + }); + + $(thisSig.cssModuleName + ' #mapCanvas' + this.sigKey).focus(function(event) { + $(thisSig.cssModuleName + ' #panel_map').css({'display':'none'}); + }); + $(thisSig.cssModuleName + ' #right_tool_map').focus(function(event) { + $(thisSig.cssModuleName + ' #panel_map').css({'display':'none'}); + }); + + $(thisSig.cssModuleName + ' .item_map_list').focus(function(event) { + $(thisSig.cssModuleName + ' #panel_map').css({'display':'none'}); + }); + + $(thisSig.cssModuleName + ' #right_tool_map').mouseleave(function(event) { + $(thisSig.cssModuleName + ' #panel_map').hide(200); + }); + + $(thisSig.cssModuleName + ' .dropdown-menu.panel_map').mouseleave(function(event) { + $(thisSig.cssModuleName + ' #panel_map').hide(200); + }); + + } + + if(params.useFilterType){ + + this.currentFilterType = "all"; + + $(this.cssModuleName + ' #item_panel_filter_all').click(function(){ + thisSig.changeFilter('all', thisMap, "types"); + }); + + $("#btn-filters").click(function(){ + thisSig.switchDropDown("panel_filter"); + }); + + $(thisSig.cssModuleName + ' #mapCanvas' + this.sigKey).focus(function(event) { + $(thisSig.cssModuleName + ' #panel_filter').css({'display':'none'}); + }); + + $(thisSig.cssModuleName + ' #right_tool_map').focus(function(event) { + $(thisSig.cssModuleName + ' #panel_filter').css({'display':'none'}); + }); + + $(thisSig.cssModuleName + ' .item_map_list').focus(function(event) { + $(thisSig.cssModuleName + ' #panel_filter').css({'display':'none'}); + }); + + $(thisSig.cssModuleName + ' #right_tool_map').mouseleave(function(event) { + $(thisSig.cssModuleName + ' #panel_filter').hide(200); + }); + $(thisSig.cssModuleName + ' .dropdown-menu.panel_map').mouseleave(function(event) { + $(thisSig.cssModuleName + ' #panel_filter').hide(200); + }); + } + + if(params.useResearchTools){ + this.initFindPlace(); + } + + if(params.useSatelliteTiles){ + $(this.cssModuleName + " #btn-satellite").click(function(){ + if(thisSig.tileMode == "terrain"){ + thisSig.tileMode = "satellite"; + + if(thisSig.tileLayer != null) thisSig.map.removeLayer(thisSig.tileLayer); + + /* chargement fond de carte SATELLITE */ + if(params.mapProvider == "OSM"){ + thisSig.tileLayer = L.tileLayer('http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', //http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}', + {maxZoom:17, minZoom:3}).addTo(Sig.map); + }else if(params.mapProvider == "mapbox"){ + thisSig.tileLayer = L.mapbox.tileLayer('mapbox.satellite',{maxZoom:17, minZoom:3}).addTo(thisSig.map); + } + + /* chargement des routes */ + thisSig.roadTileLayer = L.tileLayer('//stamen-tiles-{s}.a.ssl.fastly.net/toner-lines/{z}/{x}/{y}.{ext}', { + ext: 'png', + attribution: 'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', + subdomains: 'abcd', + zIndex:2, + opacity: 0.7, + minZoom:3, + maxZoom: 17 + }); + thisSig.roadTileLayer.addTo(thisSig.map); + + /* chargement des noms */ + thisSig.StamenTonerLabels = L.tileLayer('http://stamen-tiles-{s}.a.ssl.fastly.net/toner-labels/{z}/{x}/{y}.{ext}', { + attribution: 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data © <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', + subdomains: 'abcd', + opacity: 0.7, + zIndex:3, + minZoom: 3, + maxZoom: 17, + ext: 'png' + }); + thisSig.StamenTonerLabels.addTo(thisSig.map); + + + }else if(thisSig.tileMode == "satellite"){ + thisSig.tileMode = "terrain"; + + if(thisSig.tileLayer != null) thisSig.map.removeLayer(thisSig.tileLayer); + + /* chargement fond de carte TERRAIN */ + if(params.mapProvider == "OSM"){ + thisSig.tileLayer = L.tileLayer(thisSig.initParameters.mapTileLayer, + {maxZoom:17, + minZoom:3}).setOpacity(thisSig.initParameters.mapOpacity).addTo(thisSig.map); + }else if(params.mapProvider == "mapbox"){ + /* mapBox fourni le fond de carte, les rues et les noms en même temps */ + thisSig.tileLayer = L.mapbox.tileLayer('mapbox.streets',{maxZoom:17, minZoom:3}).addTo(thisSig.map); + } + + /* efface les routes */ + if(thisSig.roadTileLayer != null) { + if(thisSig.roadTileLayer != null) thisSig.map.removeLayer(thisSig.roadTileLayer); + } + + /* efface les noms */ + if(thisSig.StamenTonerLabels != null) { + if(thisSig.StamenTonerLabels != null) thisSig.map.removeLayer(thisSig.StamenTonerLabels); + } + } + mylog.log("maxZoom", thisSig.map.getZoom(), 17); + if(thisSig.map.getZoom() > thisSig.map.maxZoom ) + thisSig.map.setZoom(thisSig.tileLayer.maxZoom); + }); + } + + + }; + + Sig.showIframeSig = function(){ + + var hash = "?tpl=iframesig"+location.hash+"?tpl=iframesig"; + $("#ajax-modal").removeClass("bgEvent bgOrga bgProject bgPerson bgDDA"); + $("#ajax-modal-modal-title").html("<i class='fa fa-share-square-o'></i> Partager cette carte."); + //$(".modal-header").removeClass("bg-purple bg-green bg-orange bg-yellow bg-lightblue "); + $("#ajax-modal-modal-body").html( "<div class='row'>"+ + "<div class='col-md-3'>"+ + "<div class='form-group'>"+ + "<label>Largeur</label>"+ + "<input class='form-control' type='text' name='width' value='500'>"+ + "</div>"+ + "</div>"+ + "<div class='col-md-3'>"+ + "<div class='form-group'>"+ + "<label>Hauteur</label>"+ + "<input class='form-control' type='text' name='height' value='500'>"+ + "</div>"+ + "</div>"+ + "<div class='col-md-6'>"+ + "<h4 class='text-left no-margin padding-5'>Forme :</h4>"+ + "<div class='radio-inline'>"+ + "<label><input type='radio' name='forme' value='square' checked> Carré</label>"+ + "</div>"+ + "<div class='radio-inline'>"+ + "<label><input type='radio' name='forme' value='circle'> Cercle</label>"+ + "</div>"+ + "</div>"+ + "<div class='col-md-12'>"+ + "<h2 class='text-left text-dark'><i class='fa fa-angle-down'></i> Copiez / collez ce code dans la page de votre site web :</h2>" + + "<textarea class='form-control' rows='3' id='txtarea_iframe'>"+ + "<iframe height='500' width='500'"+ + " src='https://www.communecter.org"+hash+"'></iframe>"+ + "</textarea>"+ + "</div>" + + + "</div>"); + $('#ajax-modal').modal("show"); + + $("input[name='forme'], input[name='width'], input[name='height']").change(function(){ + var height=$("input[name='height']").val(); + var width=$("input[name='width']").val(); + var forme=$("input[name='forme']:checked").val(); + var radius = (forme == "circle") ? "style='border-radius:50%'" : ""; + + $("#txtarea_iframe").html("<iframe height='"+height+"' width='"+width+"' "+radius+ + " src='https://www.communecter.org"+hash+"'></iframe>") + }); + }; + Sig.loadIcoParams = function(){ + //TODO : définir les icons et couleurs de chaque type disponoble + this.icoMarkersMap = { "default" : "", + + "city" : "city-marker-default", + + "news" : "NEWS_A", + "idea" : "NEWS_A", + "question" : "NEWS_A", + "announce" : "NEWS_A", + "information" : "NEWS_A", + + "citoyen" : "citizen-marker-default", + "citoyens" : "citizen-marker-default", + "people" : "citizen-marker-default", + + "NGO" : "ngo-marker-default", + "organizations" : "ngo-marker-default", + "organization" : "ngo-marker-default", + + "event" : "event-marker-default", + "events" : "event-marker-default", + "meeting" : "event-marker-default", + + "project" : "project-marker-default", + "projects" : "project-marker-default", + + "markerPlace" : "map-marker", + + "poi" : "poi-marker-default", + "poi.video" : "poi-video-marker-default", + "poi.link" : "poi-marker-default", + "poi.geoJson" : "poi-marker-default", + "poi.compostPickup" : "poi-marker-default", + "poi.sharedLibrary" : "poi-marker-default", + "poi.artPiece" : "poi-marker-default", + "poi.recoveryCenter": "poi-marker-default", + "poi.trash" : "poi-marker-default", + "poi.history" : "poi-marker-default", + "poi.something2See" : "poi-marker-default", + "poi.funPlace" : "poi-marker-default", + "poi.place" : "poi-marker-default", + "poi.streetArt" : "poi-marker-default", + "poi.openScene" : "poi-marker-default", + "poi.stand" : "poi-marker-default", + "poi.parking" : "poi-marker-default", + + "entry" : "entry-marker-default", + "action" : "action-marker-default", + + "url" : "url-marker-default", + + "address" : "MARKER", + + "classified" : "classified-marker-default", + "service" : "services/medical", + "product" : "services/medical", + "products" : "services/shopping", + + "services.sleeping" : "services/real-estate", + "services.restaurant":"services/restaurants", + "services.funnytime":"services/entertainment", + "services.transport":"services/automotive", + "services.siteToSee":"services/photography", + "services.artisants":"services/employment", + "services.guideAccom":"services/professional" + + }; + + this.icoMarkersTypes = { "default" : { ico : "circle", color : "yellow" }, + + "news" : { ico : "rss", color : "blue" }, + "idea" : { ico : "info-circle", color : "white" }, + "question" : { ico : "question-circle", color : "white" }, + "announce" : { ico : "ticket", color : "white" }, + "information" : { ico : "newspaper-o", color : "white" }, + + "city" : { ico : "university", color : "red" }, + + "citoyen" : { ico : "user", color : "yellow" }, + "citoyens" : { ico : "user", color : "yellow" }, + "people" : { ico : "user", color : "yellow" }, + "person" : { ico : "user", color : "yellow" }, + + "NGO" : { ico : "group", color : "green" }, + "organizations" : { ico : "group", color : "green" }, + "organization" : { ico : "group", color : "green" }, + + "event" : { ico : "calendar", color : "orange" }, + "events" : { ico : "calendar", color : "orange" }, + "meeting" : { ico : "calendar", color : "orange" }, + + "project" : { ico : "lightbulb-o", color : "purple" }, + "projects" : { ico : "lightbulb-o", color : "purple" }, + + "need" : { ico : "cubes", color : "white" }, + "needs" : { ico : "cubes", color : "white" }, + + "markerPlace" : { ico : "map-marker", color : "red" }, + "me" : { ico : "map-marker", color : "blue" }, + + "poi" : { ico : "info-circle", color : "dark" }, + "poi.video" : { ico : "video-camera", color : "dark" }, + "poi.interop.wiki" : { ico : "folder-open", color : "yellow" }, + "poi.interop.datagouv" : { ico : "folder-open", color : "yellow" }, + "poi.interop.osm" : { ico : "folder-open", color : "yellow" }, + "poi.interop.ods" : { ico : "folder-open", color : "yellow" }, + "poi.interop.datanova" : { ico : "folder-open", color : "yellow" }, + "poi.interop.poleemploi" : { ico : "folder-open", color : "yellow" }, + "poi.interop.educ_etab" : { ico : "folder-open", color : "yellow" }, + "poi.interop.educ_struct" : { ico : "folder-open", color : "yellow" }, + "poi.interop.educ_membre" : { ico : "folder-open", color : "yellow" }, + "poi.interop.educ_ecole" : { ico : "folder-open", color : "yellow" }, + + "entry" : { ico : "gavel", color : "azure" }, + "action" : { ico : "cogs", color : "lightblue2" }, + + "url" : { ico : "desktop", color : "blue" }, + + "address" : { ico : "map-marker", color : "red" }, + + "classified" : { ico : "bullhorn", color : "azure" }, + + "services" : { ico : "handshake-o", color : "orange" }, + + }; + + //TODO : définir les icons et couleurs de chaque tag + this.icoMarkersTags = { "default" : { ico : "tag", color : "grey" } };/*, + "citoyens" : { ico : "square", color : "green" }, + "organization" : { ico : "square", color : "blue" }, + "citoyen" : { ico : "square", color : "yellow" }, + };*/ + } + + Sig.switchDropDown = function(panelId){ + $(".panel_map").hide(); + $("#"+panelId).show(100); + } + + Sig.vMarker = 1; + Sig.initHomeBtn = function(){ + //initialise le bouton home + var thisSig = this; + if(this.initParameters.useHomeButton){ //mylog.log("init btn home " + baseUrl + "/" + moduleId); + $.ajax({ + url: baseUrl+"/"+moduleId+"/sig/getmyposition", + type: "POST", + dataType : "json", + success: function(data){ + + if(data != null){ + if(data.profilMarkerExists == true) + data.profilMarkerImageUrl = "/upload/communecter" + data.profilMarkerImageUrl;// + "?v="+thisSig.vMarker; + thisSig.vMarker++; + var lng = parseFloat(data.position.longitude); + //mylog.log("MYPOSITION", data, lng); + lng += 0.0004; + data.position.longitude = new String(lng); + thisSig.myPosition = data; + //mylog.log("MYPOSITION", data, lng); + thisSig.showMyPosition(); + } + else{ + toastr.error("Impossible de trouver la position de l'utilisateur connecté"); + } + } + }) + + } + }; + + Sig.getTypeSigOfData = function (data){ + var type = data["typeSig"] ? data["typeSig"] : data["type"]; + return type; + }; + + Sig.getIcoNameByType = function (data){ + //mylog.log("getIcoNameByType",this.icoMarkersMap, data); + var type = this.getTypeSigOfData(data); + mylog.log("getIcoNameByType",this.icoMarkersMap[type], data); + if(this.icoMarkersMap[type] != null){ + return this.icoMarkersMap[type]; + }else{ return this.icoMarkersMap['default']; } + }; + + Sig.getIcoByType = function (data){ //console.log("erzer", data); + var type = this.getTypeSigOfData(data); + if(this.icoMarkersTypes[type] != null){ + return this.icoMarkersTypes[type].ico; + }else{ return this.icoMarkersTypes['default'].ico; } + }; + + Sig.getIcoColorByType = function (data){ //console.log("erzer", data); + var type = this.getTypeSigOfData(data); + if(this.icoMarkersTypes[type] != null){ + return this.icoMarkersTypes[type].color; + }else{ return this.icoMarkersTypes['default'].color; } + }; + + Sig.getIcoNameByTag = function (tag){ + if(this.icoMarkersTags[tag] != null){ + return this.icoMarkersTags[tag].ico; + }else{ return this.icoMarkersTags['default'].ico; } + }; + + Sig.getIcoColorByTag = function (tag){ + if(this.icoMarkersTags[tag] != null){ + return this.icoMarkersTags[tag].color; + }else{ return this.icoMarkersTags['default'].color; } + }; + Sig.getObjectId = function (object){ //mylog.dir(object); //alert(object.$id); + if(object === null) return null; //if(object["type"] == "meeting") alert("trouvé !"); + if(typeof object == "undefined") return null; //if(object["type"] == "meeting") alert("trouvé !"); + + var objectName = (typeof object.name != "undefined") ? this.clearStr(object.name) : ""; + + if(object.type == "city") { return object.cp + object.insee + objectName; } + if(object["@type"] == "city") { return object.cp + object.insee + objectName; } + if(object.typeSig == "city") { return object.cp + object.insee + objectName; } + if("undefined" != typeof object._id) return object._id.$id.toString(); + if("undefined" != typeof object.$id) return object.$id; + if("undefined" != typeof object.id) return object.id; + return null; + }; + + Sig.getThumbProfil = function (element){ + defaultType=this.getTypeSigOfData(element); + if(element['typeSig']=="people") + defaultType="citoyens"; + else if(notEmpty(element['typeSig']) && element['typeSig'].indexOf("poi.") >= 0){ + defaultType=element['typeSig'].split("."); + defaultType=defaultType[1]; + } + + if (element.typeSig.substr(0,11) == "poi.interop") { + var imgProfilPath = getimgProfilPathForInteropDataOnMap(element.typeSig); + } else { + var imgProfilPath = assetPath + "/images/thumb/default_"+defaultType+".png"; + } + if(typeof element.author !== "undefined" && typeof element.author.profilImageUrl !== "undefined" && element.author.profilImageUrl != "") + imgProfilPath = baseUrl + element.author.profilImageUrl; + if(typeof element.profilThumbImageUrl !== "undefined" && element.profilThumbImageUrl != "") + imgProfilPath = baseUrl + element.profilThumbImageUrl; + if(typeof element.profilExternImageUrl !== "undefined" && element.profilExternImageUrl != "") + imgProfilPath = element.profilExternImageUrl; + if( typeof element.typeSig !== "undefined" && element.typeSig == "city") + imgProfilPath = assetPath + "/images/city/city_default_l.png"; + return imgProfilPath; + }; + + Sig.centerSimple = function(center, zoom){ + this.map.panTo(center, {"animate" : false }); + //this.map.setZoom(zoom); + var height = $("#mapCanvasBg").height(); + //mylog.log("height" + height); + var center = height / 2; + var pan = center - 160; + //mylog.log("pan" + pan); + //alert("yo"); + //this.map.panBy([0, pan], {"animate" : false }); + this.map.invalidateSize(false); + }; + + Sig.centerPopupMarker = function(coordinates, zoom){ + var thisSig = this; + thisSig.map.panTo(coordinates, {"animate" : false }); + setTimeout(function(){ thisSig.map.setZoom(zoom); //Sig.map.panBy([0, -50]); + setTimeout(function(){ + thisSig.map.panTo(coordinates, {"animate" : false }); + setTimeout(function(){ thisSig.map.panBy([0, -200]);}, 500); + mylog.log("panBy 200"); + }, 700); + }, 2000); + }; + + Sig.showRightToolMap = function(bool){ + if(bool){ + $("#right_tool_map").show(); + }else{ + $("#right_tool_map").hide(); + } + }; + + //***chargement + //afficher / masquer l'icone de + Sig.showIcoLoading = function (loading){ + if(this.cssModuleName == "") return; + if(loading == true) { $( this.cssModuleName + " #ico_reload").css({"display":"block"}); } + if(loading == false){ $( this.cssModuleName + " #ico_reload").css({"display":"none"}); } + }; + + Sig.clearStr = function(str) { if(str == "" || str == null) return ""; + str = str.toLowerCase(); + str = str.replace(/^\s+|\s+$/g, ''); // trim + str = str.toLowerCase(); + + // remove accents, swap ñ for n, etc + var from = "à áäâèéëêìÃïîòóöôùúüûñç·/_,:;"; + var to = "aaaaeeeeiiiioooouuuunc------"; + for (var i=0, l=from.length ; i<l ; i++) { + str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); + } + + str = str.replace(/[^a-z0-9 -]/g, '') // remove invalid chars + .replace(/\s+/g, '-') // collapse whitespace and replace by - + .replace(/-+/g, '-'); // collapse dashes + + return str; + }; + + Sig.hideTools = function(){ + $(".sigModuleBg .tools-btn").hide(); + $(".sigModuleBg #right_tool_map").hide(); + + }; + + Sig.hidePopupContent = function(id){ + $("#popup"+id+" .city_item_map_list").hide(100); + $("#popup"+id+" .country_item_map_list").hide(100); + $("#popup"+id+" .btn-more").hide(100); + $("#popup"+id+" .title_news_item_map_list").hide(100); + $("#popup"+id+" .text_news_item_map_list").hide(100); + } + + Sig.translation = { + "people" : "Citoyens", + "People" : "Citoyens", + "Citoyen" : "Citoyen", + "Citoyens" : "Citoyens", + "citoyen" : "Citoyen", + "citoyens" : "Citoyens", + "CITOYEN" : "Citoyen", + "CITOYENS" : "Citoyens", + + "organization" : "Organisation", + "organizations" : "Organisations", + "Organization" : "Organisation", + "Organizations" : "Organisations", + "ORGANIZATION" : "Organisation", + "ORGANIZATIONS" : "Organisations", + + "event" : "Événement", + "events" : "Événements", + "Event" : "Événement", + "Events" : "Événements", + "EVENT" : "Événement", + "EVENTS" : "ÉvénementS", + + "project" : "Projet", + "projects" : "Projets", + "Project" : "Projet", + "Projects" : "Projets", + "PROJECT" : "Projet", + "PROJECTS" : "Projets", + + "news" : "Actualités", + "News" : "Actualités", + "NEWS" : "Actualités", + + "classified" : "Annonces", + "poi" : "Points d'intérêt", + "city" : "Commune", + + } + + //translation + Sig.t = function(string){ + return typeof this.translation[string] != "undefined" ? this.translation[string] : string; + }; + + + + + return Sig; + }; diff --git a/assets/js/sig/map_panel.js b/assets/js/sig/map_panel.js new file mode 100755 index 0000000000000000000000000000000000000000..f3c777e6b91995ce900e8d036ee7c0be69c5d2f9 --- /dev/null +++ b/assets/js/sig/map_panel.js @@ -0,0 +1,148 @@ + + /** + *** PANEL + ***/ + + SigLoader.getSigPanel = function (Sig){ + + //*** + //evenement click sur un item du panel + this.Sig.changeFilter = function (val, thisMap, filterType) + { + //mylog.dir(this.panelFilter); + var tagSelected = ""; //this.panelFilter.replace(/\s/g,""); + + this.panelFilterType = filterType; + + if(filterType == "tags"){ + if(this.panelFilter != "") + $(this.cssModuleName + ' .item_panel_map').removeClass("selected"); + + this.panelFilter = val; + tagSelected = this.panelFilter.replace(/[^A-Za-z0-9]/g,""); + + $(this.cssModuleName + ' #item_panel_map_' + tagSelected).addClass("selected"); + } + + if(filterType == "types"){ + if(this.panelFilter != "") + $(this.cssModuleName + ' .item_panel_map').removeClass("selected"); + + this.panelFilter = val; + tagSelected = this.panelFilter.replace(/[^A-Za-z0-9]/g,""); + + $(this.cssModuleName + ' #item_panel_filter_' + tagSelected).addClass("selected"); + } + this.showMapElements(thisMap, this.dataMap, "", ""); + this.zoomOnAllElements(thisMap); + }; + + //*** + //dé-zoom la carte pour afficher tous les éléments visibles + this.Sig.zoomOnAllElements = function(thisMap){ + ////mylog.dir(this.markersLayer.getBounds()); + if(this.markersLayer.getBounds() != null){ + thisMap.fitBounds(this.markersLayer.getBounds(), { 'maxZoom' : 14 }); + thisMap.zoomOut(); + thisMap.invalidateSize(false); + } + }; + //*** + //memorise la liste de tags de tous les éléments affiché sur la carte (à partir des tags qu'on lui passe en paramètre) + this.Sig.populatePanel = function(data, objectId){ + var thisSig = this; + + var tags = new Array(); + var types = new Array(); + var typeSig = new Array(); + + if("undefined" != typeof data["tags"]) tags = data["tags"]; + //if("undefined" != typeof data["type"]) types = new Array(data["type"]); + if("undefined" != typeof data["typeSig"]) typeSig = new Array(data["typeSig"]); + else typeSig = new Array(data["type"]); + + + if("undefined" != typeof tags && tags != null) + $.each(tags, function(index, value){ + //mylog.log(value); + thisSig.listPanel["tags"].push(value); //new Array(objectId); + }); + + //if("undefined" != typeof typeSig) + $.each(typeSig, function(index, value){ + mylog.log("add to listPanel", value); + thisSig.listPanel["types"].push(value); //new Array(objectId); + }); + + //thisSig.listPanel["types"].push(typeSig); + //mylog.dir(thisSig.listPanel); + + }; + + + //*** + //affiche la liste des items dans le panel + //et initialise l'événement click pour chaque item + this.Sig.updatePanel = function(thisMap){ //alert("updatePanel : " + JSON.stringify(this.listPanel)); + mylog.warn("--------------- updatePanel ---------------------", this.listPanel); + ////mylog.log(this.listPanel); + var thisSig = this; + + $.each($(this.cssModuleName + " .item_panel_map"), function(){ + if($(this).attr("id") != "item_panel_map_all" && $(this).attr("id") != "item_panel_filter_all") + $(this).remove(); + }); + + ////mylog.log(thisSig.listPanel["tags"].length); + if("undefined" != typeof thisSig.listPanel["tags"] && thisSig.listPanel["tags"] != null) + $.each(thisSig.listPanel["tags"], function(key, value){ + ////mylog.warn("--------------- each tags ---------------------" + value); + + var valueId = value.replace(/[^A-Za-z0-9]/g,""); + var ico = thisSig.getIcoNameByTag(value); + var color = thisSig.getIcoColorByTag(value); + + //si l'item n'existe pas deja + if(!$(thisSig.cssModuleName + ' #item_panel_map_' + valueId).length){ //on le rajoute... + var newItem = "<button class='item_panel_map' id='item_panel_map_" + valueId + "'>" + + "<i class='fa fa-"+ ico + ' fa-'+ color + "'></i> " + value + //hidden-xs + "</button>"; + + $(thisSig.cssModuleName + ' #panel_map').append(newItem); + + $(thisSig.cssModuleName + ' #item_panel_map_' + valueId).click(function(){ + thisSig.changeFilter(value, thisMap, "tags"); + }); + + } + + }); + + + $.each(thisSig.listPanel["types"], function(key, value){ + + //mylog.warn("--------------- each types ---------------------" + value); + var valueId = value;//.replace(/\s/g,""); + var ico = thisSig.getIcoByType({typeSig:value}); + var color = "white"; //thisSig.getIcoColorByType({typeSig:value}); + + //si l'item n'existe pas deja + if(!$(thisSig.cssModuleName + ' #item_panel_filter_' + valueId).length){ //on le rajoute... + var newItem = "<button class='item_panel_map' id='item_panel_filter_" + valueId + "'>" + + "<i class='fa fa-"+ ico + ' fa-'+ color + "'></i> " + Sig.t(value) + //hidden-xs + "</button>"; + + $(thisSig.cssModuleName + ' #panel_filter').append(newItem); + + $(thisSig.cssModuleName + ' #item_panel_filter_' + valueId).click(function(){ + thisSig.changeFilter(value, thisMap, "types"); + }); + + } + + }); + }; + + + return this.Sig; + }; diff --git a/assets/js/sig/map_popupContent.js b/assets/js/sig/map_popupContent.js new file mode 100755 index 0000000000000000000000000000000000000000..5e00137cc994f02d549428547b9822f7c779fe2a --- /dev/null +++ b/assets/js/sig/map_popupContent.js @@ -0,0 +1,698 @@ + + /** + *** POPUP CONTENT + ***/ + + SigLoader.getSigPopupContent = function (Sig){ + + //## + //création du contenu de la popup d'un data + Sig.getPopup = function(data){ + //mylog.log("getPopup", data) + if(typeof(data.typeSig) != "undefined" && data.typeSig == "news"){ + return this.getPopupSimpleNews(data); + }else if(typeof(data.typeSig) != "undefined" && data.typeSig == "city"){ + return this.getPopupSimpleCity(data); + }else if(typeof(data.typeSig) != "undefined" && data.typeSig == "url"){ + return this.getPopupSiteUrl(data); + }else if(typeof(data.typeSig) != "undefined" && data.typeSig == "address"){ + return this.getPopupAddress(data); + }else{ + return this.getPopupSimple(data); + } + }; + + //## + //création du contenu de la popup d'un data + Sig.getPopupSimple = function(data){ + + var type = typeof data['typeSig'] != "undefined" ? data['typeSig'] : data['type']; + var id = this.getObjectId(data); + var popupContent = "<div class='popup-marker'>"; + + var ico = this.getIcoByType(data); + var color = this.getIcoColorByType(data); + var imgProfilPath = Sig.getThumbProfil(data); + var icons = '<i class="fa fa-'+ ico + ' text-'+ color +'"></i>'; + + var typeElement = type; + if(type == "people") typeElement = "citoyens"; + if(type == "citoyens") typeElement = "citoyens"; + if(type == "organization") typeElement = "organizations"; + if(type == "event") typeElement = "events"; + if(type == "project") typeElement = "projects"; + //mylog.log("type", type, "typeElement", typeElement); + + var icon = 'fa-'+ this.getIcoByType(data); + + var onclick = ""; + var url = '#page.type.'+typeElement+'.id.'+id; + //mylog.log("url", url); + //mylog.log("------"); + + if(type == "entry") url = "#survey.entry.id."+id; + if(type == "action") url = "#rooms.action.id."+id; + + onclick = 'urlCtrl.loadByHash("'+url+'");'; + + if (type.substr(0,11) == "poi.interop") { + url = data.url; + popupContent += "<a href='"+url+"' target='_blank' class='item_map_list popup-marker' id='popup"+id+"'>"; + }else if (typeof TPL_IFRAME != "undefined" && TPL_IFRAME==true){ + url = "https://www.communecter.org/"+url; + popupContent += "<a href='"+url+"' target='_blank' class='item_map_list popup-marker' id='popup"+id+"'>"; + }else{ + popupContent += "<a href='"+url+"' onclick='"+onclick+"' class='item_map_list popup-marker lbh' id='popup"+id+"'>"; + } + popupContent += "<div class='main-panel'>" + + "<div class='left-col'>" + + "<div class='thumbnail-profil'><img src='" + imgProfilPath + "' height=50 width=50 class='popup-info-profil-thumb'></div>" + + "<div class='ico-type-account'>"+icons+"</div>" + + "</div>" + + "<div class='right-col'>"; + + if("undefined" != typeof data['name']) + popupContent += "<div class='info_item pseudo_item_map_list'>" + data['name'] + "</div>"; + + if("undefined" != typeof data['tags'] && data['tags'] != null){ + popupContent += "<div class='info_item items_map_list'>"; + var totalTags = 0; + if(data['tags'].length > 0){ + $.each(data['tags'], function(index, value){ + totalTags++; + if(totalTags<4) + popupContent += "<div class='tag_item_map_list'>#" + value + " </div>"; + }); + } + popupContent += "</div>"; + } + popupContent += "</div>"; + //Short description + if ("undefined" != typeof data['shortDescription'] && data['shortDescription'] != "" && data['shortDescription'] != null) { + popupContent += "<div id='pop-description' class='popup-section'>" + + "<div class='popup-subtitle'>Description</div>" + + "<div class='popup-info-profil'>" + data['shortDescription'] + "</div>" + + "</div>"; + } + //Contacts information + popupContent += this.getPopupContactsInformation(data); + //address + popupContent += this.getPopupAddressInformation(data); + + popupContent += '</div>'; + + var dataType = ("undefined" != typeof data['typeSig']) ? data['typeSig'] : ""; + + if(dataType == "event" || dataType == "events"){ + popupContent += displayStartAndEndDate(data); + } + + popupContent += '<div class="btn btn-sm btn-more col-md-12"><i class="fa fa-hand-pointer-o"></i> en savoir +</div>'; + popupContent += '</a>'; + + return popupContent; + }; + + //## + //création du contenu de la popup d'un site web + Sig.getPopupSiteUrl = function(data){ + //console.log("POPUP SITEURL", data); + var type = typeof data['typeSig'] != "undefined" ? data['typeSig'] : data['type']; + var id = this.getObjectId(data); //typeof data["_id"]["$id"] != "undefined" ? data['_id']['$id'] : null; + var popupContent = "<div class='popup-marker'>"; + + var ico = this.getIcoByType(data); + var color = this.getIcoColorByType(data); + var imgProfilPath = Sig.getThumbProfil(data); + var icons = '<i class="fa fa-'+ ico + ' fa-'+ color +'"></i>'; + //mylog.log("type de donnée sig : ",type); + + var typeElement = type; + + var icon = 'fa-'+ this.getIcoByType(data); + + var onclick = ""; + var url = data["url"]; //'#'+typeElement+'.detail.id.'+id; + + var address = ""; + if("undefined" != typeof data['address']){ + if("undefined" != typeof data['address']['streetAddress'] || "undefined" != typeof data['address']['addressLocality']) + address = "<i class='fa fa-map-marker'></i> "; + + address += typeof data['address']['streetAddress'] != "" ? data['address']['streetAddress'] : ""; + + if(typeof data['address']['streetAddress'] != "undefined" && + data['address']['streetAddress'] != "" && + "undefined" != typeof data['address']['addressLocality']) + address+=", "; + + address += data['address']['addressLocality'] ? data['address']['addressLocality'] : ""; + } + + popupContent += "<a href='"+url+"' target='_blank' class='item_map_list popup-marker siteurl lbh' id='popup"+id+"'>"; + + popupContent += + // "<div class='left-col'>" + //+ "<div class='thumbnail-profil'><img src='" + imgProfilPath + "' height=50 width=50 class='popup-info-profil-thumb'></div>" + //+ "<div class='ico-type-account'>"+icons+"</div>" + //+ "</div>" + + "<div class='right-col'>"; + + if("undefined" != typeof data['title']) + popupContent += "<div class='info_item pseudo_item_map_list letter-blue'>" + data['title'] + "</div>"; + if("undefined" != typeof data['url']) + popupContent += "<div class='info_item pseudo_item_map_list letter-green'>" + data['url'] + "</div>"; + if("undefined" != typeof data['description']) + popupContent += "<div class='info_item siteurl_desc'>" + data['description'] + "</div>"; + + if("undefined" != typeof data['tags']){ + popupContent += "<div class='info_item items_map_list'>"; + var totalTags = 0; + if(data.length > 0){ + $.each(data['tags'], function(index, value){ totalTags++; + if(totalTags<4) + popupContent += "<div class='tag_item_map_list'>#" + value + " </div>"; + }); + } + popupContent += "</div>"; + } + + popupContent += "<div class='col-md-12 no-padding'><hr></div>"; + + if(address!="") + popupContent += "<div class='info_item siteurl_desc text-dark'>"+address+"</div>"; + + // if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['streetAddress'] ) + // popupContent += "<div class='info_item city_item_map_list'>" + data['address']['streetAddress'] + ",</div>"; + + // if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['addressLocality'] ) + // popupContent += "<div class='info_item city_item_map_list'>" + data['address']['addressLocality'] + "</div>"; + + //if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['addressCountry'] ) + //popupContent += "<div class='info_item country_item_map_list'>" + data['address']['addressCountry'] + "</div>"; + + + popupContent += '</div>'; + + var dataType = ("undefined" != typeof data['typeSig']) ? data['typeSig'] : ""; + + popupContent += '<div class="btn btn-sm btn-more col-md-12"><i class="fa fa-hand-pointer-o"></i> Aller sur le site</div>'; + popupContent += '</a>'; + + + + return popupContent; + }; + + //## + //création du contenu de la popup d'un data de type News + Sig.getPopupSimpleNews = function(data){ + + var allData = data; + data = data.author; + //mylog.log("typeSig : " + allData['typeSig']); + var type = allData['typeSig'] ? allData['typeSig'] : allData['type']; + var id = this.getObjectId(allData); + var popupContent = "<div class='popup-marker'>"; + + var ico = this.getIcoByType(allData); + var color = this.getIcoColorByType(allData); + var imgProfilPath = Sig.getThumbProfil(data); + + var icons = '<i class="fa fa-'+ ico + ' fa-'+ color +'"></i>'; + + //var prop = feature.properties; + //mylog.log("PROPRIETES : "); + + //showMap(false); + + //var type = data.typeSig; + var typeElement = ""; + if(type == "people") { typeElement = "person"; people = "citoyens"; }; + if(type == "citoyens") typeElement = "person"; + if(type == "organizations") typeElement = "organization"; + if(type == "events") typeElement = "event"; + if(type == "projects") typeElement = "project"; + if(type == "news") typeElement = "news"; + + var url = '/'+type+'/detail/id/'+id; + if(typeElement == "news") url = '/'+typeElement+'/latest/id/'+id; + + var title = data.typeSig + ' : ' + data.name; + title = title.replace("'", ""); + title = title.replace('"', ""); + + var icon = 'fa-'+ this.getIcoByType(data); + popupContent += "<button class='item_map_list popup-marker lbh' id='popup"+id+"' data-hash='#news.detail.id."+id+"'>"; + + popupContent += + "<div class='left-col'>" + + "<div class='thumbnail-profil'><img src='" + imgProfilPath + "' height=50 width=50 class='popup-info-profil-thumb'></div>" + + "<div class='ico-type-account'>"+icons+"</div>" + + "</div>" + + + "<div class='right-col'>"; + + if("undefined" != typeof data['name']) + popupContent += "<div class='info_item pseudo_item_map_list'>" + data['name'] + "</div>"; + + if("undefined" != typeof allData['tags']){ + popupContent += "<div class='info_item items_map_list'>"; + var totalTags = 0; + $.each(allData['tags'], function(index, value){ totalTags++; + if(totalTags < 4) + popupContent += "<div class='tag_item_map_list'>#" + value + " </div>"; + }); + popupContent += "</div>"; + } + + if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['addressLocality'] ) + popupContent += "<div class='info_item city_item_map_list inline'>" + data['address']['addressLocality'] + "</div>"; + + if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['addressCountry'] ) + popupContent += "<div class='info_item country_item_map_list inline'>" + data['address']['addressCountry'] + "</div>"; + + popupContent += this.getPopupContactsInformation(data); + popupContent += '</div>'; + + if("undefined" != typeof allData['text']){ + if("undefined" != typeof allData['name']){ + popupContent += "<div class='info_item title_news_item_map_list'>" + allData['name'] + "</div>"; + } + popupContent += "<div class='info_item text_item_map_list'>" + allData['text'] + "</div>"; + } + + + popupContent += '<button class="btn btn-sm btn-info btn-more col-md-12" onclick="' + "urlCtrl.loadByHash('#')"+"><i class='fa fa-hand-pointer-o'></i> en savoir +"; + popupContent += '</button>'; + + return popupContent; + }; + + Sig.getPopupNewData = function(){ + + var popupContent = //'<img style="width:100%" class="pull-right" src="'+assetPath+'/images/logoL.jpg"/>' + + "<h1>Cette position est-elle exacte ?</h1>" + + "<h2><i class='fa fa-hand-pointer-o fa-2x'></i><br/>Déplacez l'icône<br>pour un placement plus précis</h2>" + + "<button class='btn btn-success center-block' id='btn-validate-geopos'><i class='fa fa-check'></i> Valider</button>"; + + return popupContent; + }; + + Sig.getPopupNewPerson = function(){ + + var popupContent = //'<img style="width:100%" class="pull-right" src="'+assetPath+'/images/logoL.jpg"/>' + + "<h1>Vous habitez ici ?</h1>" + + "<h2><i class='fa fa-hand-pointer-o fa-2x'></i><br/>Déplacez l'icône<br>pour un placement plus précis</h2>" + + "<button class='btn btn-success center-block' id='btn-validate-geopos'><i class='fa fa-check'></i> Valider</button>"; + + return popupContent; + }; + + Sig.getPopupSearchPlace = function(dataTxt){ + + var popupContent = "<h1>"+dataTxt+"</h1></br>"; + return popupContent; + }; + + + Sig.getPopupCity = function(dataTxt, insee){ + var localActors = ""; + if($("#local-actors-popup-sig").length > 0){ //mylog.log("try to catch local actors"); + localActors = $("#local-actors-popup-sig").html(); + } + var showAjaxPanel = 'showAjaxPanel("/city/detail?insee='+insee+'", "Commune : '+dataTxt+'", "fa-university");'; + var popupContent = '<div class="pod-local-actors" style="display:inline-block; width:100%;">' + + "<h4 class='panel-title text-blue'>"+ + "<i class='fa fa-university'></i> "+dataTxt+ + "</h4>" + + localActors + + "<button class='no-margin btn btn-default btn-more btn-sm col-md-12' onclick='javascript:"+showAjaxPanel+"'>"+ + "<i class='fa fa-plus'></i> En savoir plus"+ + "</button>" + + '</div>'; + return popupContent; + + }; + + Sig.getPopupSimpleCity = function(data){ + //mylog.log("getPopupSimpleCity", data); + var city = data["name"].replace("'", "\'");; + var insee = data["insee"]; + var cp = data["cp"]; + var reg = data["regionName"]; + var cntry = data["country"]; + var lat = data["geo"]["latitude"]; + var lng = data["geo"]["longitude"]; + if(typeof(data["countCpByInsee"]) != "undefined"){ + var nbCpByInsee = data["countCpByInsee"]; + var cityInsee = data["cityInsee"]; + } + + var popupContent = '<div class="pod-local-actors" style="display:inline-block; width:100%;">' + + "<h4 class='panel-title text-red homestead'>"+ + "<i class='fa fa-university'></i> "+city+ + "</h4>" + + "<h4 class='panel-title text-red homestead'>"+ cp + "</h4>"; + + var citykey = data.country + "_" + data.insee + "-" + data.cp; + if(location.hash != "#default.twostepregister") + popupContent += "<button class='no-margin btn btn-default text-red btn-more btn-sm col-md-12 start-new-communexion' "+ + "onclick='javascript:Sig.startNewCommunexion($(this))'"+ + "data-scope-value='" + citykey + "' " + + "data-scope-name='" + data.name + "' " + + "data-scope-type='city' " + + "data-insee-communexion='" + data.insee + "' "+ + "data-name-communexion='" + data.name + "' "+ + "data-cp-communexion='" + data.cp + "' "+ + "data-region-communexion='" + data.regionName + "' "+ + "data-dep-communexion='" + data.depName + "' "+ + "data-country-communexion='" + data.country + "' "+ + ">"+ + "<i class='fa fa-angle-right'></i> Communecter"+ + "</button>"; + + popupContent += '</div>'; + return popupContent; + }; + + + Sig.startNewCommunexion = function(thisButton){ + $("#main-search-bar, #second-search-bar, #input-search-map").val(""); + setGlobalScope( thisButton.data("scope-value"), thisButton.data("scope-name"), thisButton.data("scope-type"), "city", + thisButton.data("insee-communexion"), thisButton.data("name-communexion"), thisButton.data("cp-communexion"), + thisButton.data("region-communexion"), thisButton.data("dep-communexion"), thisButton.data("country-communexion") ) ; + + if($("#communexionNameHome").length){ + $("#communexionNameHome").html('Vous êtes <span class="text-dark">communecté à <span class="text-red">'+thisButton.data("name-communexion")+'</span></span>'); + $("#liveNowCoName").html("<span class='text-red'> à "+thisButton.data("name-communexion")+"</span>"); + $("#main-search-bar").val(""); + $(".info_co, .input_co").addClass("hidden"); + $("#change_co").removeClass("hidden"); + $("#dropdown_search").html(""); + } + + startSearch(0, indexStepInit, searchCallback); + }; + + + Sig.getPopupAddress = function(data, label){ + mylog.log(data); + var city = data["name"].replace("'", "\'");; + var cp = data["postalCode"]; + if(typeof(data["countCpByInsee"]) != "undefined"){ + var nbCpByInsee = data["countCpByInsee"]; + var cityInsee = data["cityInsee"]; + } + + //rassemble le nom de la ville au CP + var place = ""; + if(data['streetNumber'] != null) place += "<span class='letter-blue'>"+data['streetNumber']+"</span>"; + + if(data['street'] != null) { + if(place!="") place += " "; + place += '<b>'+ data['street']+'</b>'; + } + + if(data['cityName'] != null) { + if(place=="") //place += " "; + place += "<span class='letter-red'>"+data['cityName']+"</span>"; + } + + if(data['postalCode'] != null) { + //if(place!="") place += " "; + //place += "<span class='letter-'>"+data['postalCode']+"</span>"; + } + + + var popupContent = '<div class="pod-local-actors" style="display:inline-block; width:100%;">' + + "<div class='panel-title text-dark text-center'>"+ + //"<i class='fa fa-map-marker fa-2x text-red'></i> "+ + place+ + "</div>"; + + popupContent += '</div>'; + return popupContent; + }; + + Sig.getPopupContactsInformation = function(data){ + //mylog.log("getPopupContactsInformation data", data); + var popupContent = ""; + //Website URL + if (typeof data["url"] != "undefined" && data["url"] != null) + popupContent += "<div class='popup-info-profil'><i class='fa fa fa-desktop fa_url'></i>" + data["url"] + "</div>"; + + //email + if (typeof data["email"] != "undefined" && data["email"] != null) + popupContent += "<div class='popup-info-profil'><i class='fa fa-envelope fa_email'></i>" + data["email"] + "</div>"; + + if(typeof data["telephone"] != "undefined" && data["telephone"] != null){ + var telephone = "" ; + if(typeof data["telephone"] == "object"){ + if(typeof data["telephone"]["fixe"] != "undefined") { + $.each(data["telephone"]["fixe"], function(key, value){ + popupContent += "<div class='popup-info-profil'><i class='fa fa-phone fa_telephone'></i>" + value + "</div>"; + }); + } + if(typeof data["telephone"]["mobile"] != "undefined") { + $.each(data["telephone"]["mobile"], function(key, value){ + popupContent += "<div class='popup-info-profil'><i class='fa fa-mobile fa_telephone_mobile'></i>" + value + "</div>"; + }); + } + if(typeof data["telephone"]["fax"] != "undefined") { + $.each(data["telephone"]["fax"], function(key, value){ + popupContent += "<div class='popup-info-profil'><i class='fa fa-fax fa_telephone_fax'></i>" + value + "</div>"; + }); + } + } else { + if(typeof data["telephone"] == "string"){ + popupContent += "<div class='popup-info-profil'>" + data["telephone"] + "</div>"; + } + } + } + + if (popupContent != "") { + popupContent = "<div id='pop-contacts' class='popup-section'>" + + "<div class='popup-subtitle'>Contacts</div>" + +popupContent + +"</div>"; + } + + return popupContent; + } + + Sig.getPopupAddressInformation = function(data){ + mylog.log("getPopupAddressInformation", data); + var popupContent = ""; + if(null != data['address'] && "undefined" != typeof data['address'] ) { + if ("undefined" != typeof data['address']['streetAddress'] ) + popupContent += "<div class='popup-info-profil'>" + data['address']['streetAddress'] + "</div>"; + + if("undefined" != typeof data['address']['addressLocality'] ) { + var cpAndLocality = ""; + if("undefined" != typeof data['address']['postalCode'] ) + cpAndLocality += data['address']['postalCode'] + " "; + cpAndLocality += data['address']['addressLocality']; + popupContent += "<div class='popup-info-profil'>" + cpAndLocality + "</div>"; + } + if("undefined" != typeof data['address']['addressCountry'] ) { + var country = data['address']['addressCountry']; + if ("undefined" != typeof tradCountry[country]) country = tradCountry[country]; + popupContent += "<div class='popup-info-profil'>" + country + "</div>"; + } + } + if (popupContent != "") { + popupContent = "<div id='pop-address' class='popup-section'>" + + "<div class='popup-subtitle'>" + trad["address"] + "</div>" + +popupContent + + "</div>"; + } + return popupContent; + } + + Sig.getPopupModifyPosition = function(data){ + //mylog.dir(data); + var type = typeof data['typeSig'] != "undefined" ? data['typeSig'] : data['type']; + var id = data["_id"]["$id"]; + var popupContent = "<div class='popup-marker'>"; + + var ico = this.getIcoByType(data); + var color = this.getIcoColorByType(data); + var imgProfilPath = Sig.getThumbProfil(data); + var icons = '<i class="fa fa-'+ ico + ' fa-'+ color +'"></i>'; + + var typeElement = ""; + if(type == "people") typeElement = "person"; + if(type == "organizations") typeElement = "organization"; + if(type == "events") typeElement = "event"; + if(type == "projects") typeElement = "project"; + //mylog.log("type", type); + + var icon = 'fa-'+ this.getIcoByType(data); + + var onclick = ""; + var url = '/'+typeElement+'/detail/id/'+id; + var title = data.typeSig + ' : ' + data.name; + title = title.replace("'", ""); + title = title.replace('"', ""); + + popupContent += "<div class='item_map_list popup-marker padding-5'>"; + + popupContent += "<div class='left-col'>" + + "<div class='thumbnail-profil'><img src='" + imgProfilPath + "' height=50 width=50 class='popup-info-profil-thumb'></div>" + + "<div class='ico-type-account'>"+icons+"</div>" + + "</div>" + + + "<div class='right-col'>"; + + if("undefined" != typeof data['name']) + popupContent += "<div class='info_item pseudo_item_map_list'>" + data['name'] + "</div>"; + + if("undefined" != typeof data['tags']){ + popupContent += "<div class='info_item items_map_list'>"; + var totalTags = 0; + $.each(data['tags'], function(index, value){ totalTags++; + if(totalTags<4) + popupContent += "<div class='tag_item_map_list'>#" + value + " </div>"; + }); + popupContent += "</div>"; + } + + //if("undefined" != typeof data['address'] && "undefined" != typeof data['address']['addressLocality'] ) + //popupContent += "<div class='info_item city_item_map_list'>" + data['address']['addressLocality'] + "</div>"; + + popupContent += '</div>'; //right-col + + var hStyle = "margin-bottom: 5px !important; width:100%; font-weight: 500; border:0px solid rgba(0, 0, 0, 0.2); border-top-width:1px; border-radius:0px; margin-top:5px !important;"; + popupContent += "<div id='btn-bounce-marker-modify' class='alert pull-left no-margin padding-10' style='"+hStyle+"'><i class='fa fa-question-circle'></i> Déplacez l'icône sur sa nouvelle position</div>"; + + popupContent += '<div id="btn-validate-new-position" class="btn btn-sm btn-success center col-md-12" style="width:100% !important;">'+ + '<i class="fa fa-check" style="float:none !important;"></i> Valider'+ + '</div>'; + + popupContent += '</div>' + + '<div id="lbl-loading-saving" class="alert alert-success hidden" style="margin:10px;"></div>'; + + + return popupContent; + }; + + Sig.getPopupConfigAddress = function(){ + var allCountries = getCountries("select2"); + countries =""; + $.each(allCountries, function(key, country){ + mylog.log(country.id, country.text); + countries += "<option value='"+country.id+"'>"+country.text+"</option>"; + }); + var popupContent = "<style>@media screen and (min-width: 768px) {.leaflet-popup-content{width:400px!important;}}" + + "</style>"+ + "<div class='form-group inline-block padding-15 form-in-map'>"+ + "<h3 class='margin-top-5'><i class='fa fa-angle-down'></i> <i class='fa fa-home'></i> Adresse</h3>"+ + "<div class='text-dark margin-top-5 hidden-xs'><i class='fa fa-circle'></i> Indiquez une adresse pour un placement automatique</div>"+ + "<div class='text-dark margin-top-5 hidden-xs'><i class='fa fa-circle'></i> Déplacez l'icône avec la souris pour un placement plus précis</div>"+ + "<hr class='col-md-12'>"+ + "<select class='form-group col-md-12 col-xs-12' name='newElement_country' id='newElement_country'>"+ + "<option value=''>"+trad.chooseCountry+"</option>"+countries+ + "</select>"+ + "<div id='divCity' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newElement_city' placeholder='Ville, village, commune'>"+ + "<ul class='dropdown-menu col-md-12 col-xs-12' id='dropdown-newElement_city-found'>"+ + "<li><a href='javascript:' class='disabled'>Rechercher une ville, un village, une commune</a></li>"+ + "</ul>"+ + "</div>" + + "<div id='divPostalCode' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newElement_cp' placeholder='Code postal'>"+ + "<ul class='dropdown-menu' id='dropdown-newElement_cp-found'>"+ + "<li><a href='javascript:' class='disabled'>Rechercher un code postal</a></li>"+ + "</ul>"+ + "</div>" + + "<div id='divStreetAddress' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-9 col-xs-9' type='text' style='margin-right:-3px;' name='newElement_streetAddress' placeholder='(n° rue) + Adresse'>"+ + "<button class='col-md-3 col-xs-3 btn btn-default' style='padding:3px;border-radius:0 4px 4px 0;' type='text' id='newElement_btnSearchAddress'><i class='fa fa-search'></i></button>"+ + "</div>" + + "<div class='dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<ul class='dropdown-menu' id='dropdown-newElement_streetAddress-found'></ul>"+ + "</div>" + + "<div id='info_insee_latlng' class='text-dark col-md-12 no-padding'></div>"+ + "<input type='hidden' name='newElement_insee'>"+ + "<input type='hidden' name='newElement_lat'>"+ + "<input type='hidden' name='newElement_lng'>"+ + "<input type='hidden' name='newElement_dep'>"+ + "<input type='hidden' name='newElement_region'>"+ + "<hr class='col-md-12 col-xs-12'>"+ + //"<hr style='margin: 5px 0px;padding: 0px;' class='col-md-12'>"+ + "<button class='col-md-8 btn btn-success pull-right' type='text' id='newElement_btnValidateAddress' disabled='disabled'><i class='fa fa-check'></i> Valider <span class='hidden-xs'>l'adresse et la position</span></button>"+ + "<button class='col-md-3 btn btn-danger pull-right' type='text' id='newElement_btnCancelAddress' style='margin-right:5px;'><i class='fa fa-times'></i> Annuler</button>"+ + + "</div>"; + popupContent = "" ; + return popupContent; + }; + + + Sig.getPopupConfigPostalCode = function(){ + var allCountries = getCountries("select2"); + countries =""; + $.each(allCountries, function(key, country){ + mylog.log(country.id, country.text); + countries += "<option value='"+country.id+"'>"+country.text+"</option>"; + }); + var popupContent = "<style>@media screen and (min-width: 768px) {.leaflet-popup-content{width:400px!important;}}" + + "</style>"+ + "<div class='form-group inline-block padding-15 form-in-map'>"+ + "<h3 class='margin-top-5'><i class='fa fa-angle-down'></i> <i class='fa fa-home'></i> Postal Code</h3>"+ + "<div class='text-dark margin-top-5 hidden-xs'><i class='fa fa-circle'></i> Indiquez un code postal pour une commune</div>"+ + "<div class='text-dark margin-top-5 hidden-xs'><i class='fa fa-circle'></i> Déplacez l'icône avec la souris pour un placement plus précis</div>"+ + "<hr class='col-md-12'>"+ + "<div id='divPostalCode' class=' dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newPC_postalCode' placeholder='Code postal'>"+ + "</div>" + + "<div id='divCity' class=' dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newPC_name' placeholder='Ville, village, commune, quartier'>"+ + "</div>" + + "<div id='divLat' class=' dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newPC_lat' placeholder='Latitude du code postal'>"+ + "</div>" + + "<div id='divLat' class=' dropdown pull-left col-md-12 col-xs-12 no-padding'> " + + "<input class='form-group col-md-12 col-xs-12' type='text' name='newPC_lon' placeholder='Longitude du code postal'>"+ + "</div>" + + "<hr class='col-md-12 col-xs-12'>"+ + "<button class='col-md-8 btn btn-success pull-right' type='text' id='newPC_btnValidatePC' disabled='disabled'><i class='fa fa-check'></i> Valider <span class='hidden-xs'>le code postal et la position</span></button>"+ + "<button class='col-md-3 btn btn-danger pull-right' type='text' id='newPC_btnCancelPC' style='margin-right:5px;'><i class='fa fa-times'></i> Annuler</button>"+ + "</div>"; + + return popupContent; + }; + + + Sig.getPopupInfoAddress = function(){ + var popupContent = "<style>@media screen and (min-width: 768px) {.leaflet-popup-content{width:400px!important;}}" + + "</style>"+ + "<div class='form-group inline-block padding-15 form-in-map'>"+ + "<div class='col-xs-12'>"+ + "<h4>"+trad['City Informations']+"</h4>"+ + "</div>"+ + "<div id='insee_sumery' class='col-xs-12'>"+ + "<span>"+trad['Insee']+" :</span> "+ + "<span id='insee_sumery_value'></span>"+ + "</div>"+ + "<div id='dep_sumery' class='col-xs-12'>"+ + "<span>"+trad['level4']+" :</span> "+ + "<span id='dep_sumery_value'></span>"+ + "</div>"+ + "<div id='region_sumery' class='col-xs-12'>"+ + "<span>"+trad['level3']+" :</span> "+ + "<span id='region_sumery_value'></span>"+ + "</div>"+ + "<div id='lat_sumery' class='col-xs-12'>"+ + "<span>"+trad['latlng']+" :</span> "+ + "<span id='lat_sumery_value'></span> / "+ + "<span id='lng_sumery_value'></span>"+ + "</div>"+ + "</div>"; + return popupContent; + }; + + return Sig; + }; diff --git a/assets/js/sig/map_rightList.js b/assets/js/sig/map_rightList.js new file mode 100755 index 0000000000000000000000000000000000000000..f1188bd18da462e14c7ed6273bceea91fa70cfe4 --- /dev/null +++ b/assets/js/sig/map_rightList.js @@ -0,0 +1,471 @@ + + /** + *** RIGHT LIST MAP ELEMENT + ***/ + + SigLoader.getSigRightList = function (Sig){ + + Sig.paginationNumPage = 1; + Sig.paginationBy = 15; + Sig.paginationNumPageMax = 0; + + Sig.changePagination = function (numPage){ + this.paginationNumPage = parseInt(numPage); + this.paginationMin = (this.paginationNumPage - 1) * this.paginationBy; + this.paginationMax = this.paginationMin + this.paginationBy; + this.checkListElementMap(this.map); + //mylog.log("change pagination : " + this.paginationMin + " - " + this.paginationMax + " - by : " + this.paginationBy + " - max : " + this.paginationNumPageMax); + //alert("stop"); + }; + Sig.previousPagination = function (){ + if(this.paginationNumPage > 1) + this.changePagination(this.paginationNumPage-1); + }; + Sig.nextPagination = function (){ //alert(this.paginationNumPage); + if(this.paginationNumPage < this.paginationNumPageMax) + this.changePagination(this.paginationNumPage+1); + }; + //permet de savoir si un element doit être affiché ou non dans la liste + //en fonction de la pagination courante. + Sig.inPagination = function(nbElement){ + return (nbElement >= this.paginationMin && nbElement < this.paginationMax); + }; + + //*** + //affiche dans la liste de droite seulement les éléments visibles sur la carte + Sig.checkListElementMap = function (thisMap){ + + var thisSig = this; + //rend invisible tous les éléments de la liste (mais ne les supprime pas) + $.each(this.elementsMap, function() { + var objectId = thisSig.getObjectId(this);//mylog.log(objectId); + $(thisSig.cssModuleName + " #element-right-list-" + objectId).css({ "display" : "none" }); + }); + + var showElementOutOfMapView = true; // !$(this.cssModuleName + " #chk-scope").is(':checked'); + + //var paginationIndex = this.paginationMin; + var nbElement = 0; + var nbVisible = 0; + //rend visible tous les éléments qui se trouve dans le bound visible de la carte + $.each(thisSig.elementsMap, + function() { + var bounds = thisMap.getBounds(); + + if( //(this.geo.longitude > bounds.getSouthWest().lng && this.geo.longitude < bounds.getNorthEast().lng && + //this.geo.latitude > bounds.getSouthWest().lat && this.geo.latitude < bounds.getNorthEast().lat) + //|| + showElementOutOfMapView) + { + var showThis = false; + //si le champ de recherche par userName est rempli (n'est pas vide) + if(this.name != null && $(thisSig.cssModuleName + ' #input_name_filter').val() != "") { + //on affiche l'élément seulement s'il correspond à la recherche + + //mylog.log("SEARCH IN RIGHT LIST", nbVisible, nbElement); + //mylog.dir(this); + + if(this.name.search(new RegExp($(thisSig.cssModuleName + ' #input_name_filter').val(), "i")) >= 0){ + showThis = true; + } + + if(typeof this.address != "undefined" && this.address != null) + if(typeof this.address.addressLocality != "undefined") + if(this.address.addressLocality.search(new RegExp($(thisSig.cssModuleName + ' #input_name_filter').val(), "i")) >= 0){ + showThis = true; + } + + if(typeof this.tags != "undefined" && this.tags != null){ + $.each(this.tags, function() { + var tag = this; + if(tag.search(new RegExp($(thisSig.cssModuleName + ' #input_name_filter').val(), "i")) >= 0){ + showThis = true; + } + }); + } + + //mylog.log("showThis", showThis); + + if(showThis == true){ + if(thisSig.inPagination(nbElement)){ + $(thisSig.cssModuleName + " #element-right-list-" + Sig.getObjectId(this)).css({ "display" : "inline" }); + nbVisible++; + } + nbElement++; + } + + } + else //si le champs de recherche est vide, on affiche l'élément + { + if(thisSig.inPagination(nbElement)){ + $(thisSig.cssModuleName + " #element-right-list-" + thisSig.getObjectId(this)).css({"display" : "inline" }); + nbVisible++; + } + nbElement++; + } + } + + + }); + + var maxPaginationBtn = 5; + var nbTotal = nbElement; //thisSig.elementsMap.length; + $(".right_tool_map_header_info").html(nbVisible + " / " + nbTotal); + //mylog.log("nbTotalEment : " + nbTotal); + if(nbTotal > this.paginationBy){ + + var nbPage = nbTotal / this.paginationBy; + this.paginationNumPageMax = nbPage; + + $("#pagination").html( + "<li>"+ + "<a href='javascript:' id='btn_pagination_previous' aria-label='Previous'>"+ + "<span aria-hidden='true'>«</span>"+ + "</a>"+ + "</li>" + ); + + var dep = this.paginationNumPage - maxPaginationBtn; + if(dep < 0) dep = 0; + for(var i=dep; i<nbPage && i < dep+maxPaginationBtn; i++){ + + var classe=""; + if(i+1 == this.paginationNumPage) classe="active"; + + $("#pagination").append( + '<li class="'+classe+'"><a href="javascript:" id="btn_pagination_'+i+'" page="'+(i+1)+'">'+(i+1)+'</a></li>' + ); + + $("#btn_pagination_"+i).click(function(){ + thisSig.changePagination($(this).attr("page")); + }); + } + + if(nbPage > maxPaginationBtn){ + $("#pagination").append('<li><a href="javascript:" class="'+classe+'">...</a></li>'); + } + + $("#pagination").append( + "<li>"+ + "<a href='javascript:' id='btn_pagination_next' aria-label='Next'>"+ + "<span aria-hidden='true'>»</span>"+ + "</a>"+ + "</li>" + ); + + $("#btn_pagination_previous").click(function(){ thisSig.previousPagination(); }); + $("#btn_pagination_next").click(function(){ thisSig.nextPagination(); }); + + //$("#lbl-chk-scope").removeClass("hidden"); + + }else{ + $("#pagination").html(""); + this.paginationNumPage = 1; + //$("#lbl-chk-scope").addClass("hidden"); + } + }; + + + //*** + //renvoi un item (html) pour la liste de droite + Sig.createItemRigthListMap = function(element, thisMarker, thisMap){ + + var elemType = ("undefined" != typeof element['typeSig']) ? element['typeSig'] : ""; + + if(elemType == "url") return this.createItemRigthListMapSiteurl(element, thisMarker, thisMap); + if(elemType == "address") return this.createItemRigthListMapAddress(element, thisMarker, thisMap); + //mylog.dir(element); + + var thisSig = this; + var objectId = thisSig.getObjectId(this); + var allElement = element; + var element = (typeof element.author != "undefined") ? element.author : element; + + //rassemble le nom de la ville au CP + var place = ""; + if(element['city'] != null) place += element['city']; + if(element['city'] != null && element['cp'] != null) place += ", "; + if(element['cp'] != null) place += element['cp']; + + //prépare le nom (ou "anonyme") + var name = (element['name'] != null) ? element['name'] : (element['title'] != null) ? element['title'] : "Anonyme"; + + //récupère l'url de l'icon a afficher + var ico = thisSig.getIcoByType(allElement); + var color = thisSig.getIcoColorByType(allElement); + //console.log("icon sig", allElement, "ico", ico, "color", color); + + var icons = '<i class="fa fa-'+ ico + ' text-'+ color +'"></i>'; + + + //recuperation de l'image de profil (ou image par defaut) + var imgProfilPath = Sig.getThumbProfil(element); + + + //return l'élément html + var button = '<div class="element-right-list" id="element-right-list-'+thisSig.getObjectId(allElement)+'">' + + '<button class="item_map_list item_map_list_'+ thisSig.getObjectId(allElement) +'">' + + "<div class='left-col'>" + + "<div class='thumbnail-profil'><img height=50 width=50 src='" + imgProfilPath + "'></div>" + + "<div class='ico-type-account'>"+icons+"</div>" + + + "</div>" + + "<div class='right-col'>"; + + if("undefined" != typeof name) + button += "<div class='info_item pseudo_item_map_list'>" + name + "</div>"; + + + if("undefined" != typeof allElement['tags'] && allElement['tags'] != null){ + button += "<div class='info_item items_map_list'>"; + var totalTags = 0; + if(typeof allElement['tags'] != "undefined" && allElement['tags'] != null){ + $.each(allElement['tags'], function(index, value){ totalTags++; + if(totalTags<4) + button += "<a href='javascript:' class='tag_item_map_list'>#" + value + " </a>"; + }); + } + button += "</div>"; + } + + if("undefined" != typeof element['address'] && element['address'] != null){ + + button += "<div class='info_item city_item_map_list inline'>"; + + if("undefined" != typeof element['address']['addressLocality'] ) + button += element['address']['addressLocality']+" "; + + + if("undefined" != typeof element['address']['postalCode'] ) + button += element['address']['postalCode']+" "; + + if("undefined" != typeof element['address']['addressCountry'] ) + button += element['address']['addressCountry']+" "; + + button += "</div>"; + + } + //if("undefined" != typeof element['telephone']) + //button += "<div class='info_item telephone_item_map_list inline'>" + element['telephone'] + "</div>"; + + + button += '</div>'; + + + if(elemType == "event" || elemType == "events"){ + button += displayStartAndEndDate(element); + } + + if("undefined" != typeof allElement['text']){ + if("undefined" != typeof allElement['name']){ + button += "<div class='info_item title_news_item_map_list'>" + allElement['name'] + "</div>"; + } + button += "<div class='info_item text_item_map_list'>" + allElement['text'] + "</div>"; + } + + button += '<div class="separation"></div>'; + + + button += '</button>' + + '<div>'; + + $(this.cssModuleName + " #liste_map_element").append(button); + + + //toastr.success(JSON.stringify(name + " " + markerPosition)); + }; + + //*** + //renvoi un item (html) pour la liste de droite + Sig.createItemRigthListMapSiteurl = function(element, thisMarker, thisMap){ + + var elemType = ("undefined" != typeof element['typeSig']) ? element['typeSig'] : ""; + + //mylog.dir(element); + + var thisSig = this; + var objectId = thisSig.getObjectId(this); + var allElement = element; + var element = (typeof element.author != "undefined") ? element.author : element; + + //rassemble le nom de la ville au CP + var place = ""; + if(element['city'] != null) place += element['city']; + if(element['city'] != null && element['cp'] != null) place += ", "; + if(element['cp'] != null) place += element['cp']; + + //prépare le nom (ou "anonyme") + var name = (element['name'] != null) ? element['name'] : (element['title'] != null) ? element['title'] : "Anonyme"; + + //prépare l'url + var url = (element['url'] != null) ? element['url'] : ""; + + //prépare l'url + var description = (element['description'] != null) ? element['description'] : ""; + + //récupère l'url de l'icon a afficher + var ico = thisSig.getIcoByType(allElement); + var color = thisSig.getIcoColorByType(allElement); + + var icons = '<i class="fa fa-'+ ico + ' fa-'+ color +'"></i>'; + + + //recuperation de l'image de profil (ou image par defaut) + var imgProfilPath = Sig.getThumbProfil(element); + + //return l'élément html + var button = '<div class="element-right-list siteurl" id="element-right-list-'+thisSig.getObjectId(allElement)+'">' + + '<button class="item_map_list item_map_list_'+ thisSig.getObjectId(allElement) +'">' + + + "<div class='right-col'>"; + + if("" != name) + button += "<div class='info_item siteurl_title letter-blue'>" + name + "</div>"; + if("" != url) + button += "<div class='info_item siteurl_url letter-green'>" + url + "</div>"; + if("" != description) + button += "<div class='info_item siteurl_desc'>" + description + "</div>"; + + var address = ""; + if("undefined" != typeof element['address']){ + if("undefined" != typeof element['address']['streetAddress'] || "undefined" != typeof element['address']['addressLocality']) + address = "<i class='fa fa-map-marker' style='margin-left:-6px;'></i> "; + + address += element['address']['streetAddress'] ? element['address']['streetAddress'] : ""; + + if(typeof element['address']['streetAddress'] != "undefined" && + element['address']['streetAddress'] != "" && + "undefined" != typeof element['address']['addressLocality']) + address+=", "; + + address += element['address']['addressLocality'] ? element['address']['addressLocality'] : ""; + } + + if(address!="") + button += "<div class='info_item siteurl_desc pull-left text-dark'>" + address + "</div>"; + + + + button += '</div>'; + + + button += '<div class="separation"></div>'; + + + button += '</button>' + + '<div>'; + + $(this.cssModuleName + " #liste_map_element").append(button); + //toastr.success(JSON.stringify(name + " " + markerPosition)); + }; + + //*** + //renvoi un item (html) pour la liste de droite + Sig.createItemRigthListMapAddress = function(element, thisMarker, thisMap){ + + var elemType = ("undefined" != typeof element['typeSig']) ? element['typeSig'] : ""; + + mylog.dir('createItemRigthListMapAddress', element); + + var thisSig = this; + var objectId = thisSig.getObjectId(this); + var allElement = element; + var element = (typeof element.author != "undefined") ? element.author : element; + + //rassemble le nom de la ville au CP + var place = ""; + if(element['streetNumber'] != null) place += "<span class='letter-blue'>"+element['streetNumber']+"</span>"; + + if(element['street'] != null) { + if(place!="") place += " "; + place += '<b>'+ element['street']+'</b>'; + } + + if(element['cityName'] != null) { + if(place!="") place += " "; + place += "<span class='letter-red'><b>"+element['cityName']+"</b></span>"; + } + + if(element['suburb'] != null) { + if(place!="") place += "<span class='letter-red'>, </span>"; + place += "<span class='letter-red'>"+element['suburb']+"</span>"; + } + + if(element['POI'] != null) { + if(place!="") place += "<br>"; + place += "<span class='letter-green'><b>"+element['POI']+"</b></span>"; + } + + if(element['AAL1'] != null) { + if(place!="") place += ", "; + place += "<span class='letter-green'>"+element['AAL1']+"</span>"; + } + + if(element['AAL2'] != null) { + if(place!="") place += ", "; + place += "<span class='letter-dark'>"+element['AAL2']+"</span>"; + } + + if(element['postalCode'] != null) { + //if(place!="") place += " "; + //place += "<span class='letter-'>"+element['postalCode']+"</span>"; + } + + + //récupère l'url de l'icon a afficher + var ico = thisSig.getIcoByType(allElement); + var color = thisSig.getIcoColorByType(allElement); + + var icons = '<i class="fa fa-'+ ico + ' fa-'+ color +'"></i>'; + + //recuperation de l'image de profil (ou image par defaut) + var imgProfilPath = Sig.getThumbProfil(element); + + //return l'élément html + var button = '<div class="element-right-list siteurl" id="element-right-list-'+thisSig.getObjectId(allElement)+'">' + + '<button class="item_map_list item_map_list_'+ thisSig.getObjectId(allElement) +'">' + + "<div class='padding-10 text-left'>"; + + if(place != "") + button += "<div class='info_item text-dark' style='font-size:14px;'>"+ + "<i class='fa fa-map-marker fa-2x letter-red' style='margin-left:-6px;'></i> " + + place + + "</div>"; + + //if("" != description) + //button += "<div class='info_item siteurl_desc'>" + description + "</div>"; + + // var address = ""; + // if("undefined" != typeof element['address']){ + // if("undefined" != typeof element['address']['streetAddress'] || "undefined" != typeof element['address']['addressLocality']) + // address = "<i class='fa fa-map-marker' style='margin-left:-6px;'></i> "; + + // address += element['address']['streetAddress'] ? element['address']['streetAddress'] : ""; + + // if(typeof element['address']['streetAddress'] != "undefined" && "undefined" != typeof element['address']['addressLocality']) + // address+=", "; + + // address += element['address']['addressLocality'] ? element['address']['addressLocality'] : ""; + // } + + // if(address!="") + // button += "<div class='info_item siteurl_desc pull-left text-dark'>" + address + "</div>"; + + + button += '</div>'; + + + button += '<div class="separation"></div>'; + + button += '</button>' + + '<div>'; + + $(this.cssModuleName + " #liste_map_element").append(button); + //toastr.success(JSON.stringify(name + " " + markerPosition)); + }; + + + Sig.changePagination(1); + + return Sig; + }; diff --git a/assets/js/sigCommunecter.js b/assets/js/sigCommunecter.js new file mode 100755 index 0000000000000000000000000000000000000000..501a6bbaf1e2cec78ba2c39f1bd551a43638094b --- /dev/null +++ b/assets/js/sigCommunecter.js @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/smartconso/smartSig.js b/assets/js/smartconso/smartSig.js new file mode 100644 index 0000000000000000000000000000000000000000..7e2f82ee26b7a474421ad57d415e05439c77b9dd --- /dev/null +++ b/assets/js/smartconso/smartSig.js @@ -0,0 +1,44 @@ +var smartSig = { + + initSmartInterface : function(){ + $(".btn-smart").click(function(){ + var dataKey = $(this).data("key"); + smartSig.loadData(dataKey); + }); + }, + + showData : function(dataKey){ + + }, + + loadData : function(dataKey){ + + var data = { + "name" : "", + "searchTag" : [dataKey], + "searchType" : ["poi"], + "searchBy" : "ALL", + "indexMin" : 0, + "indexMax" : 200, + //"locality" : "", + }; + + console.log("smartSig.loadData", data); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); mylog.dir(data); + }, + success: function(data){ + console.log("success", data); + Sig.showMapElements(Sig.map, data, "recycle", "SmartData"); + }, + }); + } + +}; + diff --git a/assets/js/smartconso/smartconso.js b/assets/js/smartconso/smartconso.js new file mode 100644 index 0000000000000000000000000000000000000000..2de15edf904a7cd4133525bc7e5a2aa51abf8eaa --- /dev/null +++ b/assets/js/smartconso/smartconso.js @@ -0,0 +1,78 @@ +var chartValues = { + "down" : { + "bg-color":"red", + "percent":"30", + "votant":"3", + "voteValue":"down", + }, + "up" : { + "bg-color":"green", + "percent":"50", + "votant":"5", + "voteValue":"up", + }, + "uncomplet" : { + "bg-color":"orange", + "percent":"10", + "votant":"1", + "voteValue":"uncomplet", + }, + "white" : { + "bg-color":"white", + "percent":"20", + "votant":"2", + "voteValue":"white", + } +}; + +function smartChartInit(idCanvas, datas, chartType){ //alert("start loadchart"); + var voteValues = new Array(); + console.log("smart datas chart", datas); + $.each(datas, function(key, val){ + console.log("val.percent", val); + voteValues.push(val.percent); + }); + + var data = { + datasets: [{ + data: voteValues, + + // These labels appear in the legend and in the tooltips when hovering different arcs + backgroundColor: [ + '#34a853', + '#E33551', + '#FFF', + '#FFA200', + ], + borderColor: [ + '#34a853', + '#E33551', + '#aba9a9', + '#FFA200', + ], + borderWidth: 1 + }], + labels: [ + trad.Agree, + trad.Disagree, + trad.Abstain, + trad.Uncomplet + ], + + }; + var ctx = $("#"+idCanvas).get(0).getContext("2d"); + var options; + myPieChart = new Chart(ctx,{ + type: chartType, + data: data, + options: { + legend: { + display: false + }, + animation: { + duration: 300 + } + }, + //options: options + }); + } \ No newline at end of file diff --git a/assets/survey/css/mixitup/reset.css b/assets/survey/css/mixitup/reset.css new file mode 100755 index 0000000000000000000000000000000000000000..3b2627d63a1bdddbfab59e2da499427c41e5ef63 --- /dev/null +++ b/assets/survey/css/mixitup/reset.css @@ -0,0 +1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0} diff --git a/assets/survey/css/mixitup/style.css b/assets/survey/css/mixitup/style.css new file mode 100755 index 0000000000000000000000000000000000000000..3f3a5155a94df5300f9dc7a28ae2690936512503 --- /dev/null +++ b/assets/survey/css/mixitup/style.css @@ -0,0 +1,128 @@ +*{ + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + + + +body, button{ + font-family: 'Helvetica Neue', arial, sans-serif; +} + +.controls{ + padding: 10px; + background: #182129; + opacity: 0.9; + color: #eee; + margin-bottom: 5px; + border: 1px solid #3399FF; + border-radius: 4px; +} + +label{ + font-weight: 300; + margin: 0 .4em 0 0; +} + +button{ + display: inline-block; + margin-bottom: 2px; + margin-right: 2px; + padding: .2em .4em; + background: #3399FF; + border: 0; + color: #000; + font-size: 16px; + font-weight: 300; + border-radius: 4px; + cursor: pointer; +} + +button.active{ + background: #68b8c4; +} + +button:focus{ + outline: 0 none; +} + +button + label{ + margin-left: 1em; +} + +.mixcontainer .mix { + display: none; + border: 1px solid #3399FF; + background-color: #182129; + opacity: 0.9; + padding:10px; + margin-bottom:5px; + color: white; + z-index: 1; +} + +.mixcontainer .boxColor1 { background-color: #333} +.mixcontainer .boxColor2 { background-color: #182129} + + +.mixcontainer .mix a,.mixcontainer .mix span{ + background-color: #3399FF; + color:#000; + padding:3px; + border:1px solid #3399FF; + text-decoration: none; +} +.mixcontainer .mix a.titleMix{ + color:white; + border-color: transparent; + background-color: transparent; + word-wrap:break-word; + font-weight: bold; + } +.mixcontainer .mix span.info{ + color:white; + font-size: xx-small; + background-color: transparent; + border: none; + margin:0px; + display: inline; +} + +.mixcontainer .mix span{ + display: block; + margin:3px; +} +.mixcontainer .mix a:hover{ + background-color: transparent; + color: #3399FF; +} +.mixcontainer .mix a.active,.mixcontainer .mix span.active{ + background-color: transparent; + color: #3399FF; +} + +@media all and (min-width: 420px){ + .mixcontainer .mix, + .mixcontainer .gap{ + width: 100%; + } +} + +@media all and (min-width: 640px){ + .mixcontainer .mix, + .mixcontainer .gap{ + width: 33%; + } +} +/** + * List Styles + */ + +.mixcontainer.list .mix{ + width: 100%; +} + +.mixcontainer.list .mix:before{ + padding-top: 40px; +} \ No newline at end of file diff --git a/assets/survey/js/exporting.js b/assets/survey/js/exporting.js new file mode 100755 index 0000000000000000000000000000000000000000..df946eca130ee0113f62992735c9970fa725d3d7 --- /dev/null +++ b/assets/survey/js/exporting.js @@ -0,0 +1,22 @@ +/* + Highcharts JS v4.0.1 (2014-04-24) + Exporting module + + (c) 2010-2014 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(f){var A=f.Chart,t=f.addEvent,B=f.removeEvent,l=f.createElement,o=f.discardElement,v=f.css,k=f.merge,r=f.each,p=f.extend,D=Math.max,j=document,C=window,E=f.isTouchDevice,F=f.Renderer.prototype.symbols,s=f.getOptions(),y;p(s.lang,{printChart:"Print chart",downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",contextButtonTitle:"Chart context menu"});s.navigation={menuStyle:{border:"1px solid #A0A0A0", +background:"#FFFFFF",padding:"5px 0"},menuItemStyle:{padding:"0 10px",background:"none",color:"#303030",fontSize:E?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{symbolFill:"#E0E0E0",symbolSize:14,symbolStroke:"#666",symbolStrokeWidth:3,symbolX:12.5,symbolY:10.5,align:"right",buttonSpacing:3,height:22,theme:{fill:"white",stroke:"none"},verticalAlign:"top",width:24}};s.exporting={type:"image/png",url:"http://export.highcharts.com/",buttons:{contextButton:{menuClassName:"highcharts-contextmenu", +symbol:"menu",_titleKey:"contextButtonTitle",menuItems:[{textKey:"printChart",onclick:function(){this.print()}},{separator:!0},{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]}}};f.post=function(b,a,d){var c,b=l("form",k({method:"post", +action:b,enctype:"multipart/form-data"},d),{display:"none"},j.body);for(c in a)l("input",{type:"hidden",name:c,value:a[c]},null,b);b.submit();o(b)};p(A.prototype,{getSVG:function(b){var a=this,d,c,z,h,g=k(a.options,b);if(!j.createElementNS)j.createElementNS=function(a,b){return j.createElement(b)};b=l("div",null,{position:"absolute",top:"-9999em",width:a.chartWidth+"px",height:a.chartHeight+"px"},j.body);c=a.renderTo.style.width;h=a.renderTo.style.height;c=g.exporting.sourceWidth||g.chart.width|| +/px$/.test(c)&&parseInt(c,10)||600;h=g.exporting.sourceHeight||g.chart.height||/px$/.test(h)&&parseInt(h,10)||400;p(g.chart,{animation:!1,renderTo:b,forExport:!0,width:c,height:h});g.exporting.enabled=!1;g.series=[];r(a.series,function(a){z=k(a.options,{animation:!1,showCheckbox:!1,visible:a.visible});z.isInternal||g.series.push(z)});d=new f.Chart(g,a.callback);r(["xAxis","yAxis"],function(b){r(a[b],function(a,c){var g=d[b][c],f=a.getExtremes(),h=f.userMin,f=f.userMax;g&&(h!==void 0||f!==void 0)&& +g.setExtremes(h,f,!0,!1)})});c=d.container.innerHTML;g=null;d.destroy();o(b);c=c.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g," xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/ /g," ").replace(/­/g,"Â").replace(/<IMG /g,"<image ").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g, +'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" >]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});return c=c.replace(/(url\(#highcharts-[0-9]+)"/g,"$1").replace(/"/g,"'")},exportChart:function(b,a){var b=b||{},d=this.options.exporting,d=this.getSVG(k({chart:{borderRadius:0}},d.chartOptions,a,{exporting:{sourceWidth:b.sourceWidth|| +d.sourceWidth,sourceHeight:b.sourceHeight||d.sourceHeight}})),b=k(this.options.exporting,b);f.post(b.url,{filename:b.filename||"chart",type:b.type,width:b.width||0,scale:b.scale||2,svg:d},b.formAttributes)},print:function(){var b=this,a=b.container,d=[],c=a.parentNode,f=j.body,h=f.childNodes;if(!b.isPrinting)b.isPrinting=!0,r(h,function(a,b){if(a.nodeType===1)d[b]=a.style.display,a.style.display="none"}),f.appendChild(a),C.focus(),C.print(),setTimeout(function(){c.appendChild(a);r(h,function(a,b){if(a.nodeType=== +1)a.style.display=d[b]});b.isPrinting=!1},1E3)},contextMenu:function(b,a,d,c,f,h,g){var e=this,k=e.options.navigation,q=k.menuItemStyle,m=e.chartWidth,n=e.chartHeight,j="cache-"+b,i=e[j],u=D(f,h),w,x,o,s=function(a){e.pointer.inClass(a.target,b)||x()};if(!i)e[j]=i=l("div",{className:b},{position:"absolute",zIndex:1E3,padding:u+"px"},e.container),w=l("div",null,p({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},k.menuStyle),i),x=function(){v(i,{display:"none"}); +g&&g.setState(0);e.openMenu=!1},t(i,"mouseleave",function(){o=setTimeout(x,500)}),t(i,"mouseenter",function(){clearTimeout(o)}),t(document,"mouseup",s),t(e,"destroy",function(){B(document,"mouseup",s)}),r(a,function(a){if(a){var b=a.separator?l("hr",null,null,w):l("div",{onmouseover:function(){v(this,k.menuItemHoverStyle)},onmouseout:function(){v(this,q)},onclick:function(){x();a.onclick.apply(e,arguments)},innerHTML:a.text||e.options.lang[a.textKey]},p({cursor:"pointer"},q),w);e.exportDivElements.push(b)}}), +e.exportDivElements.push(w,i),e.exportMenuWidth=i.offsetWidth,e.exportMenuHeight=i.offsetHeight;a={display:"block"};d+e.exportMenuWidth>m?a.right=m-d-f-u+"px":a.left=d-u+"px";c+h+e.exportMenuHeight>n&&g.alignOptions.verticalAlign!=="top"?a.bottom=n-c-u+"px":a.top=c+h-u+"px";v(i,a);e.openMenu=!0},addButton:function(b){var a=this,d=a.renderer,c=k(a.options.navigation.buttonOptions,b),j=c.onclick,h=c.menuItems,g,e,l={stroke:c.symbolStroke,fill:c.symbolFill},q=c.symbolSize||12;if(!a.btnCount)a.btnCount= +0;if(!a.exportDivElements)a.exportDivElements=[],a.exportSVGElements=[];if(c.enabled!==!1){var m=c.theme,n=m.states,o=n&&n.hover,n=n&&n.select,i;delete m.states;j?i=function(){j.apply(a,arguments)}:h&&(i=function(){a.contextMenu(e.menuClassName,h,e.translateX,e.translateY,e.width,e.height,e);e.setState(2)});c.text&&c.symbol?m.paddingLeft=f.pick(m.paddingLeft,25):c.text||p(m,{width:c.width,height:c.height,padding:0});e=d.button(c.text,0,0,i,m,o,n).attr({title:a.options.lang[c._titleKey],"stroke-linecap":"round"}); +e.menuClassName=b.menuClassName||"highcharts-menu-"+a.btnCount++;c.symbol&&(g=d.symbol(c.symbol,c.symbolX-q/2,c.symbolY-q/2,q,q).attr(p(l,{"stroke-width":c.symbolStrokeWidth||1,zIndex:1})).add(e));e.add().align(p(c,{width:e.width,x:f.pick(c.x,y)}),!0,"spacingBox");y+=(e.width+c.buttonSpacing)*(c.align==="right"?-1:1);a.exportSVGElements.push(e,g)}},destroyExport:function(b){var b=b.target,a,d;for(a=0;a<b.exportSVGElements.length;a++)if(d=b.exportSVGElements[a])d.onclick=d.ontouchstart=null,b.exportSVGElements[a]= +d.destroy();for(a=0;a<b.exportDivElements.length;a++)d=b.exportDivElements[a],B(d,"mouseleave"),b.exportDivElements[a]=d.onmouseout=d.onmouseover=d.ontouchstart=d.onclick=null,o(d)}});F.menu=function(b,a,d,c){return["M",b,a+2.5,"L",b+d,a+2.5,"M",b,a+c/2+0.5,"L",b+d,a+c/2+0.5,"M",b,a+c-1.5,"L",b+d,a+c-1.5]};A.prototype.callbacks.push(function(b){var a,d=b.options.exporting,c=d.buttons;y=0;if(d.enabled!==!1){for(a in c)b.addButton(c[a]);t(b,"destroy",b.destroyExport)}})})(Highcharts); diff --git a/assets/survey/js/highcharts.js b/assets/survey/js/highcharts.js new file mode 100755 index 0000000000000000000000000000000000000000..06e464031b937185df6e92518a69c950aa5adfb7 --- /dev/null +++ b/assets/survey/js/highcharts.js @@ -0,0 +1,305 @@ +/* + Highcharts JS v4.0.1 (2014-04-24) + + (c) 2009-2014 Torstein Honsi + + License: www.highcharts.com/license +*/ +(function(){function q(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function w(){var a,b=arguments,c,d={},e=function(a,b){var c,d;typeof a!=="object"&&(a={});for(d in b)b.hasOwnProperty(d)&&(c=b[d],a[d]=c&&typeof c==="object"&&Object.prototype.toString.call(c)!=="[object Array]"&&d!=="renderTo"&&typeof c.nodeType!=="number"?e(a[d]||{},c):b[d]);return a};b[0]===!0&&(d=b[1],b=Array.prototype.slice.call(b,2));c=b.length;for(a=0;a<c;a++)d=e(d,b[a]);return d}function z(a,b){return parseInt(a,b|| +10)}function Fa(a){return typeof a==="string"}function ca(a){return typeof a==="object"}function La(a){return Object.prototype.toString.call(a)==="[object Array]"}function ha(a){return typeof a==="number"}function za(a){return U.log(a)/U.LN10}function ia(a){return U.pow(10,a)}function ja(a,b){for(var c=a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function r(a){return a!==t&&a!==null}function H(a,b,c){var d,e;if(Fa(b))r(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(r(b)&& +ca(b))for(d in b)a.setAttribute(d,b[d]);return e}function qa(a){return La(a)?a:[a]}function m(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],typeof c!=="undefined"&&c!==null)return c}function G(a,b){if(Aa&&!aa&&b&&b.opacity!==t)b.filter="alpha(opacity="+b.opacity*100+")";q(a.style,b)}function Y(a,b,c,d,e){a=y.createElement(a);b&&q(a,b);e&&G(a,{padding:0,border:Q,margin:0});c&&G(a,c);d&&d.appendChild(a);return a}function ka(a,b){var c=function(){};c.prototype=new a;q(c.prototype,b);return c} +function Ga(a,b,c,d){var e=E.lang,a=+a||0,f=b===-1?(a.toString().split(".")[1]||"").length:isNaN(b=M(b))?2:b,b=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=a<0?"-":"",c=String(z(a=M(a).toFixed(f))),g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+M(a-c).toFixed(f).slice(2):"")}function Ha(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function Ma(a,b,c){var d=a[b];a[b]=function(){var a=Array.prototype.slice.call(arguments); +a.unshift(d);return c.apply(this,a)}}function Ia(a,b){for(var c="{",d=!1,e,f,g,h,i,j=[];(c=a.indexOf(c))!==-1;){e=a.slice(0,c);if(d){f=e.split(":");g=f.shift().split(".");i=g.length;e=b;for(h=0;h<i;h++)e=e[g[h]];if(f.length)f=f.join(":"),g=/\.([0-9])/,h=E.lang,i=void 0,/f$/.test(f)?(i=(i=f.match(g))?i[1]:-1,e!==null&&(e=Ga(e,i,h.decimalPoint,f.indexOf(",")>-1?h.thousandsSep:""))):e=cb(f,e)}j.push(e);a=a.slice(c+1);c=(d=!d)?"}":"{"}j.push(a);return j.join("")}function mb(a){return U.pow(10,T(U.log(a)/ +U.LN10))}function nb(a,b,c,d){var e,c=m(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d<b.length;d++)if(a=b[d],e<=(b[d]+(b[d+1]||b[d]))/2)break;a*=c;return a}function Bb(){this.symbol=this.color=0}function ob(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c);return d===0?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Na(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function Ba(a){for(var b= +a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Oa(a,b){for(var c in a)a[c]&&a[c]!==b&&a[c].destroy&&a[c].destroy(),delete a[c]}function Pa(a){db||(db=Y(Ja));a&&db.appendChild(a);db.innerHTML=""}function ra(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else I.console&&console.log(c)}function da(a){return parseFloat(a.toPrecision(14))}function Qa(a,b){va=m(a,b.animation)}function Cb(){var a=E.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";Ra=(a&&E.global.timezoneOffset|| +0)*6E4;eb=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,m(c,1),m(g,0),m(h,0),m(i,0))).getTime()};pb=b+"Minutes";qb=b+"Hours";rb=b+"Day";Xa=b+"Date";fb=b+"Month";gb=b+"FullYear";Db=c+"Minutes";Eb=c+"Hours";sb=c+"Date";Fb=c+"Month";Gb=c+"FullYear"}function P(){}function Sa(a,b,c,d){this.axis=a;this.pos=b;this.type=c||"";this.isNew=!0;!c&&!d&&this.addLabel()}function la(){this.init.apply(this,arguments)}function Ya(){this.init.apply(this,arguments)}function Hb(a,b,c,d,e){var f=a.chart.inverted; +this.axis=a;this.isNegative=c;this.options=b;this.x=d;this.total=null;this.points={};this.stack=e;this.alignOptions={align:b.align||(f?c?"left":"right":"center"),verticalAlign:b.verticalAlign||(f?"middle":c?"bottom":"top"),y:m(b.y,f?4:c?14:-6),x:m(b.x,f?c?-6:6:0)};this.textAlign=b.textAlign||(f?c?"right":"left":"center")}var t,y=document,I=window,U=Math,u=U.round,T=U.floor,Ka=U.ceil,v=U.max,C=U.min,M=U.abs,Z=U.cos,ea=U.sin,ma=U.PI,Ca=ma*2/360,wa=navigator.userAgent,Ib=I.opera,Aa=/msie/i.test(wa)&& +!Ib,hb=y.documentMode===8,ib=/AppleWebKit/.test(wa),Ta=/Firefox/.test(wa),Jb=/(Mobile|Android|Windows Phone)/.test(wa),xa="http://www.w3.org/2000/svg",aa=!!y.createElementNS&&!!y.createElementNS(xa,"svg").createSVGRect,Nb=Ta&&parseInt(wa.split("Firefox/")[1],10)<4,fa=!aa&&!Aa&&!!y.createElement("canvas").getContext,Za,$a,Kb={},tb=0,db,E,cb,va,ub,A,sa=function(){},V=[],ab=0,Ja="div",Q="none",Ob=/^[0-9]+$/,Pb="stroke-width",eb,Ra,pb,qb,rb,Xa,fb,gb,Db,Eb,sb,Fb,Gb,F={},R=I.Highcharts=I.Highcharts?ra(16, +!0):{};cb=function(a,b,c){if(!r(b)||isNaN(b))return"Invalid date";var a=m(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b-Ra),e,f=d[qb](),g=d[rb](),h=d[Xa](),i=d[fb](),j=d[gb](),k=E.lang,l=k.weekdays,d=q({a:l[g].substr(0,3),A:l[g],d:Ha(h),e:h,b:k.shortMonths[i],B:k.months[i],m:Ha(i+1),y:j.toString().substr(2,2),Y:j,H:Ha(f),I:Ha(f%12||12),l:f%12||12,M:Ha(d[pb]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Ha(d.getSeconds()),L:Ha(u(b%1E3),3)},R.dateFormats);for(e in d)for(;a.indexOf("%"+e)!==-1;)a=a.replace("%"+e,typeof d[e]=== +"function"?d[e](b):d[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};Bb.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};A=function(){for(var a=0,b=arguments,c=b.length,d={};a<c;a++)d[b[a++]]=b[a];return d}("millisecond",1,"second",1E3,"minute",6E4,"hour",36E5,"day",864E5,"week",6048E5,"month",26784E5,"year",31556952E3);ub={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "),c=[].concat(c), +h,i,j=function(a){for(g=a.length;g--;)a[g]==="M"&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(j(b),j(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));if(d<=c.length/f&&b.length===c.length)for(;d--;)c=[].concat(c).splice(0,f).concat(c);a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f=== +b.length&&c<1)for(;f--;)d=parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};(function(a){I.HighchartsAdapter=I.HighchartsAdapter||a&&{init:function(b){var c=a.fx,d=c.step,e,f=a.Tween,g=f&&f.propHooks;e=a.cssHooks.opacity;a.extend(a.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});a.each(["cur","_default","width","height","opacity"],function(a,b){var e=d,k;b==="cur"?e=c.prototype:b==="_default"&&f&&(e=g[b],b="set");(k=e[b])&&(e[b]=function(c){var d,c= +a?c:this;if(c.prop!=="align")return d=c.elem,d.attr?d.attr(c.prop,b==="cur"?t:c.now):k.apply(this,arguments)})});Ma(e,"get",function(a,b,c){return b.attr?b.opacity||0:a.call(this,b,c)});e=function(a){var c=a.elem,d;if(!a.started)d=b.init(c,c.d,c.toD),a.start=d[0],a.end=d[1],a.started=!0;c.attr("d",b.step(a.start,a.end,a.pos,c.toD))};f?g.d={set:e}:d.d=e;this.each=Array.prototype.forEach?function(a,b){return Array.prototype.forEach.call(a,b)}:function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c], +a[c],c,a)===!1)return c};a.fn.highcharts=function(){var a="Chart",b=arguments,c,d;if(this[0]){Fa(b[0])&&(a=b[0],b=Array.prototype.slice.call(b,1));c=b[0];if(c!==t)c.chart=c.chart||{},c.chart.renderTo=this[0],new R[a](c,b[1]),d=this;c===t&&(d=V[H(this[0],"data-highcharts-chart")])}return d}},getScript:a.getScript,inArray:a.inArray,adapterRun:function(b,c){return a(b)[c]()},grep:a.grep,map:function(a,c){for(var d=[],e=0,f=a.length;e<f;e++)d[e]=c.call(a[e],a[e],e,a);return d},offset:function(b){return a(b).offset()}, +addEvent:function(b,c,d){a(b).bind(c,d)},removeEvent:function(b,c,d){var e=y.removeEventListener?"removeEventListener":"detachEvent";y[e]&&b&&!b[e]&&(b[e]=function(){});a(b).unbind(c,d)},fireEvent:function(b,c,d,e){var f=a.Event(c),g="detached"+c,h;!Aa&&d&&(delete d.layerX,delete d.layerY,delete d.returnValue);q(f,d);b[c]&&(b[g]=b[c],b[c]=null);a.each(["preventDefault","stopPropagation"],function(a,b){var c=f[b];f[b]=function(){try{c.call(f)}catch(a){b==="preventDefault"&&(h=!0)}}});a(b).trigger(f); +b[g]&&(b[c]=b[g],b[g]=null);e&&!f.isDefaultPrevented()&&!h&&e(f)},washMouseEvent:function(a){var c=a.originalEvent||a;if(c.pageX===t)c.pageX=a.pageX,c.pageY=a.pageY;return c},animate:function(b,c,d){var e=a(b);if(!b.style)b.style={};if(c.d)b.toD=c.d,c.d=1;e.stop();c.opacity!==t&&b.attr&&(c.opacity+="px");e.animate(c,d)},stop:function(b){a(b).stop()}}})(I.jQuery);var S=I.HighchartsAdapter,N=S||{};S&&S.init.call(S,ub);var jb=N.adapterRun,Qb=N.getScript,Da=N.inArray,p=N.each,vb=N.grep,Rb=N.offset,Ua= +N.map,K=N.addEvent,W=N.removeEvent,D=N.fireEvent,Sb=N.washMouseEvent,kb=N.animate,bb=N.stop,N={enabled:!0,x:0,y:15,style:{color:"#606060",cursor:"default",fontSize:"11px"}};E={colors:"#7cb5ec,#434348,#90ed7d,#f7a35c,#8085e9,#f15c80,#e4d354,#8085e8,#8d4653,#91e8e1".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","), +weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),decimalPoint:".",numericSymbols:"k,M,G,T,P,E".split(","),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/4.0.1/modules/canvas-tools.js",VMLRadialGradientURL:"http://code.highcharts.com/4.0.1/gfx/vml-radial-gradient.png"},chart:{borderColor:"#4572A7",borderRadius:0,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacing:[10,10,15, +10],backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0",resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",margin:15,style:{color:"#333333",fontSize:"18px"}},subtitle:{text:"",align:"center",style:{color:"#555555"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,marker:{lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{enabled:!0},select:{fillColor:"#FFFFFF",lineColor:"#000000", +lineWidth:2}}},point:{events:{}},dataLabels:w(N,{align:"center",enabled:!1,formatter:function(){return this.y===null?"":Ga(this.y,-1)},verticalAlign:"bottom",y:0}),cropThreshold:300,pointRange:0,states:{hover:{marker:{},halo:{size:10,opacity:0.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3}},labels:{style:{position:"absolute",color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#909090",borderRadius:0,navigation:{activeColor:"#274b6d", +inactiveColor:"#CCC"},shadow:!1,itemStyle:{color:"#333333",fontSize:"12px",fontWeight:"bold"},itemHoverStyle:{color:"#000"},itemHiddenStyle:{color:"#CCC"},itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"1em"},style:{position:"absolute",backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,animation:aa,backgroundColor:"rgba(249, 249, 249, .85)", +borderWidth:1,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">â—</span> {series.name}: <b>{point.y}</b><br/>',shadow:!0,snap:Jb?25:10,style:{color:"#333333",cursor:"default",fontSize:"12px",padding:"8px", +whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"9px"}}};var ba=E.plotOptions,S=ba.line;Cb();var Tb=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/,Ub=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,Vb=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/,ya=function(a){var b=[],c, +d;(function(a){a&&a.stops?d=Ua(a.stops,function(a){return ya(a[1])}):(c=Tb.exec(a))?b=[z(c[1]),z(c[2]),z(c[3]),parseFloat(c[4],10)]:(c=Ub.exec(a))?b=[z(c[1],16),z(c[2],16),z(c[3],16),1]:(c=Vb.exec(a))&&(b=[z(c[1]),z(c[2]),z(c[3]),1])})(a);return{get:function(c){var f;d?(f=w(a),f.stops=[].concat(f.stops),p(d,function(a,b){f.stops[b]=[f.stops[b][0],a.get(c)]})):f=b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a;return f},brighten:function(a){if(d)p(d, +function(b){b.brighten(a)});else if(ha(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=z(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},rgba:b,setOpacity:function(a){b[3]=a;return this}}};P.prototype={init:function(a,b){this.element=b==="span"?Y(b):y.createElementNS(xa,b);this.renderer=a},opacity:1,animate:function(a,b,c){b=m(b,va,!0);bb(this);if(b){b=w(b,{});if(c)b.complete=c;kb(this,a,b)}else this.attr(a),c&&c()},colorGradient:function(a,b,c){var d=this.renderer,e,f,g,h,i,j,k,l,o,n,s=[];a.linearGradient? +f="linearGradient":a.radialGradient&&(f="radialGradient");if(f){g=a[f];h=d.gradients;j=a.stops;o=c.radialReference;La(g)&&(a[f]=g={x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientUnits:"userSpaceOnUse"});f==="radialGradient"&&o&&!r(g.gradientUnits)&&(g=w(g,{cx:o[0]-o[2]/2+g.cx*o[2],cy:o[1]-o[2]/2+g.cy*o[2],r:g.r*o[2],gradientUnits:"userSpaceOnUse"}));for(n in g)n!=="id"&&s.push(n,g[n]);for(n in j)s.push(j[n]);s=s.join(",");h[s]?a=h[s].attr("id"):(g.id=a="highcharts-"+tb++,h[s]=i=d.createElement(f).attr(g).add(d.defs), +i.stops=[],p(j,function(a){a[1].indexOf("rgba")===0?(e=ya(a[1]),k=e.get("rgb"),l=e.get("a")):(k=a[1],l=1);a=d.createElement("stop").attr({offset:a[0],"stop-color":k,"stop-opacity":l}).add(i);i.stops.push(a)}));c.setAttribute(b,"url("+d.url+"#"+a+")")}},attr:function(a,b){var c,d,e=this.element,f,g=this,h;typeof a==="string"&&b!==t&&(c=a,a={},a[c]=b);if(typeof a==="string")g=(this[a+"Getter"]||this._defaultGetter).call(this,a,e);else{for(c in a){d=a[c];h=!1;this.symbolName&&/^(x|y|width|height|r|start|end|innerR|anchorX|anchorY)/.test(c)&& +(f||(this.symbolAttr(a),f=!0),h=!0);if(this.rotation&&(c==="x"||c==="y"))this.doTransform=!0;h||(this[c+"Setter"]||this._defaultSetter).call(this,d,c,e);this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(c)&&this.updateShadows(c,d)}if(this.doTransform)this.updateTransform(),this.doTransform=!1}return g},updateShadows:function(a,b){for(var c=this.shadows,d=c.length;d--;)c[d].setAttribute(a,a==="height"?v(b-(c[d].cutHeight||0),0):a==="d"?this.d:b)},addClass:function(a){var b=this.element, +c=H(b,"class")||"";c.indexOf(a)===-1&&H(b,"class",c+" "+a);return this},symbolAttr:function(a){var b=this;p("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]=m(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path",a?"url("+this.renderer.url+"#"+a.id+")":Q)},crisp:function(a){var b,c={},d,e=a.strokeWidth||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;d=u(e)%2/2;a.x=T(a.x||this.x|| +0)+d;a.y=T(a.y||this.y||0)+d;a.width=T((a.width||this.width||0)-2*d);a.height=T((a.height||this.height||0)-2*d);a.strokeWidth=e;for(b in a)this[b]!==a[b]&&(this[b]=c[b]=a[b]);return c},css:function(a){var b=this.styles,c={},d=this.element,e,f,g="";e=!b;if(a&&a.color)a.fill=a.color;if(b)for(f in a)a[f]!==b[f]&&(c[f]=a[f],e=!0);if(e){e=this.textWidth=a&&a.width&&d.nodeName.toLowerCase()==="text"&&z(a.width);b&&(a=q(b,c));this.styles=a;e&&(fa||!aa&&this.renderer.forExport)&&delete a.width;if(Aa&&!aa)G(this.element, +a);else{b=function(a,b){return"-"+b.toLowerCase()};for(f in a)g+=f.replace(/([A-Z])/g,b)+":"+a[f]+";";H(d,"style",g)}e&&this.added&&this.renderer.buildText(this)}return this},on:function(a,b){var c=this,d=c.element;$a&&a==="click"?(d.ontouchstart=function(a){c.touchEventFired=Date.now();a.preventDefault();b.call(d,a)},d.onclick=function(a){(wa.indexOf("Android")===-1||Date.now()-(c.touchEventFired||0)>1100)&&b.call(d,a)}):d["on"+a]=b;return this},setRadialReference:function(a){this.element.radialReference= +a;return this},translate:function(a,b){return this.attr({translateX:a,translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.scaleX,d=this.scaleY,e=this.inverted,f=this.rotation,g=this.element;e&&(a+=this.attr("width"),b+=this.attr("height"));a=["translate("+a+","+b+")"];e?a.push("rotate(90) scale(-1,1)"):f&&a.push("rotate("+f+" "+(g.getAttribute("x")||0)+" "+(g.getAttribute("y")||0)+")"); +(r(c)||r(d))&&a.push("scale("+m(c,1)+" "+m(d,1)+")");a.length&&g.setAttribute("transform",a.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a,b,c){var d,e,f,g,h={};e=this.renderer;f=e.alignedObjects;if(a){if(this.alignOptions=a,this.alignByTranslate=b,!c||Fa(c))this.alignTo=d=c||"renderer",ja(f,this),f.push(this),c=null}else a=this.alignOptions,b=this.alignByTranslate,d=this.alignTo;c=m(c,e[d],e);d=a.align;e=a.verticalAlign;f=(c.x||0)+(a.x|| +0);g=(c.y||0)+(a.y||0);if(d==="right"||d==="center")f+=(c.width-(a.width||0))/{right:1,center:2}[d];h[b?"translateX":"x"]=u(f);if(e==="bottom"||e==="middle")g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1);h[b?"translateY":"y"]=u(g);this[this.placed?"animate":"attr"](h);this.placed=!0;this.alignAttr=h;return this},getBBox:function(){var a=this.bBox,b=this.renderer,c,d,e=this.rotation;c=this.element;var f=this.styles,g=e*Ca;d=this.textStr;var h;if(d===""||Ob.test(d))h="num."+d.toString().length+ +(f?"|"+f.fontSize+"|"+f.fontFamily:"");h&&(a=b.cache[h]);if(!a){if(c.namespaceURI===xa||b.forExport){try{a=c.getBBox?q({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(i){}if(!a||a.width<0)a={width:0,height:0}}else a=this.htmlGetBBox();if(b.isSVG){c=a.width;d=a.height;if(Aa&&f&&f.fontSize==="11px"&&d.toPrecision(3)==="16.9")a.height=d=14;if(e)a.width=M(d*ea(g))+M(c*Z(g)),a.height=M(d*Z(g))+M(c*ea(g))}this.bBox=a;h&&(b.cache[h]=a)}return a},show:function(a){return a&&this.element.namespaceURI=== +xa?(this.element.removeAttribute("visibility"),this):this.attr({visibility:a?"inherit":"visible"})},hide:function(){return this.attr({visibility:"hidden"})},fadeOut:function(a){var b=this;b.animate({opacity:0},{duration:a||150,complete:function(){b.hide()}})},add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=this.element,f=this.zIndex,g,h;if(a)this.parentGroup=a;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);if(f)c.handleZ=!0,f=z(f);if(c.handleZ){a=d.childNodes; +for(g=0;g<a.length;g++)if(b=a[g],c=H(b,"zIndex"),b!==e&&(z(c)>f||!r(f)&&r(c))){d.insertBefore(e,b);h=!0;break}}h||d.appendChild(e);this.added=!0;if(this.onAdd)this.onAdd();return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element||{},c=a.shadows,d=a.renderer.isSVG&&b.nodeName==="SPAN"&&a.parentGroup,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=b.point=null;bb(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f= +0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy();a.stops=null}a.safeRemoveChild(b);for(c&&p(c,function(b){a.safeRemoveChild(b)});d&&d.div.childNodes.length===0;)b=d.parentGroup,a.safeRemoveChild(d.div),delete d.div,d=b;a.alignTo&&ja(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},shadow:function(a,b,c){var d=[],e,f,g=this.element,h,i,j,k;if(a){i=m(a.width,3);j=(a.opacity||0.15)/i;k=this.parentInverted?"(-1,-1)":"("+m(a.offsetX,1)+", "+m(a.offsetY,1)+")";for(e=1;e<=i;e++){f= +g.cloneNode(0);h=i*2+1-2*e;H(f,{isShadow:"true",stroke:a.color||"black","stroke-opacity":j*e,"stroke-width":h,transform:"translate"+k,fill:Q});if(c)H(f,"height",v(H(f,"height")-h,0)),f.cutHeight=h;b?b.element.appendChild(f):g.parentNode.insertBefore(f,g);d.push(f)}this.shadows=d}return this},xGetter:function(a){this.element.nodeName==="circle"&&(a={x:"cx",y:"cy"}[a]||a);return this._defaultGetter(a)},_defaultGetter:function(a){a=m(this[a],this.element?this.element.getAttribute(a):null,0);/^[0-9\.]+$/.test(a)&& +(a=parseFloat(a));return a},dSetter:function(a,b,c){a&&a.join&&(a=a.join(" "));/(NaN| {2}|^$)/.test(a)&&(a="M 0 0");c.setAttribute(b,a);this[b]=a},dashstyleSetter:function(a){var b;if(a=a&&a.toLowerCase()){a=a.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(b=a.length;b--;)a[b]=z(a[b])*this.element.getAttribute("stroke-width"); +a=a.join(",");this.element.setAttribute("stroke-dasharray",a)}},alignSetter:function(a){this.element.setAttribute("text-anchor",{left:"start",center:"middle",right:"end"}[a])},opacitySetter:function(a,b,c){this[b]=a;c.setAttribute(b,a)},"stroke-widthSetter":function(a,b,c){a===0&&(a=1.0E-5);this.strokeWidth=a;c.setAttribute(b,a)},titleSetter:function(a){var b=this.element.getElementsByTagName("title")[0];b||(b=y.createElementNS(xa,"title"),this.element.appendChild(b));b.textContent=a},textSetter:function(a){if(a!== +this.textStr)delete this.bBox,this.textStr=a,this.added&&this.renderer.buildText(this)},fillSetter:function(a,b,c){typeof a==="string"?c.setAttribute(b,a):a&&this.colorGradient(a,b,c)},zIndexSetter:function(a,b,c){c.setAttribute(b,a);this[b]=a},_defaultSetter:function(a,b,c){c.setAttribute(b,a)}};P.prototype.yGetter=P.prototype.xGetter;P.prototype.translateXSetter=P.prototype.translateYSetter=P.prototype.rotationSetter=P.prototype.verticalAlignSetter=P.prototype.scaleXSetter=P.prototype.scaleYSetter= +function(a,b){this[b]=a;this.doTransform=!0};P.prototype.strokeSetter=P.prototype.fillSetter;var ta=function(){this.init.apply(this,arguments)};ta.prototype={Element:P,init:function(a,b,c,d,e){var f=location,g,d=this.createElement("svg").attr({version:"1.1"}).css(this.getStyle(d));g=d.element;a.appendChild(g);a.innerHTML.indexOf("xmlns")===-1&&H(g,"xmlns",xa);this.isSVG=!0;this.box=g;this.boxWrapper=d;this.alignedObjects=[];this.url=(Ta||ib)&&y.getElementsByTagName("base").length?f.href.replace(/#.*?$/, +"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20"):"";this.createElement("desc").add().element.appendChild(y.createTextNode("Created with Highcharts 4.0.1"));this.defs=this.createElement("defs").add();this.forExport=e;this.gradients={};this.cache={};this.setSize(b,c,!1);var h;if(Ta&&a.getBoundingClientRect)this.subPixelFix=b=function(){G(a,{left:0,top:0});h=a.getBoundingClientRect();G(a,{left:Ka(h.left)-h.left+"px",top:Ka(h.top)-h.top+"px"})},b(),K(I,"resize",b)},getStyle:function(a){return this.style= +q({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},a)},isHidden:function(){return!this.boxWrapper.getBBox().width},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Oa(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();this.subPixelFix&&W(I,"resize",this.subPixelFix);return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a);return b},draw:function(){}, +buildText:function(a){for(var b=a.element,c=this,d=c.forExport,e=m(a.textStr,"").toString(),f=e.indexOf("<")!==-1,g=b.childNodes,h,i,j=H(b,"x"),k=a.styles,l=a.textWidth,o=k&&k.lineHeight,n=g.length,s=function(a){return o?z(o):c.fontMetrics(/(px|em)$/.test(a&&a.style.fontSize)?a.style.fontSize:k&&k.fontSize||c.style.fontSize||12).h};n--;)b.removeChild(g[n]);!f&&e.indexOf(" ")===-1?b.appendChild(y.createTextNode(e)):(h=/<.*style="([^"]+)".*>/,i=/<.*href="(http[^"]+)".*>/,l&&!a.added&&this.box.appendChild(b), +e=f?e.replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g):[e],e[e.length-1]===""&&e.pop(),p(e,function(e,f){var g,n=0,e=e.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");g=e.split("|||");p(g,function(e){if(e!==""||g.length===1){var o={},m=y.createElementNS(xa,"tspan"),p;h.test(e)&&(p=e.match(h)[1].replace(/(;| |^)color([ :])/,"$1fill$2"), +H(m,"style",p));i.test(e)&&!d&&(H(m,"onclick",'location.href="'+e.match(i)[1]+'"'),G(m,{cursor:"pointer"}));e=(e.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");if(e!==" "){m.appendChild(y.createTextNode(e));if(n)o.dx=0;else if(f&&j!==null)o.x=j;H(m,o);!n&&f&&(!aa&&d&&G(m,{display:"block"}),H(m,"dy",s(m),ib&&m.offsetHeight));b.appendChild(m);n++;if(l)for(var e=e.replace(/([^\^])-/g,"$1- ").split(" "),o=e.length>1&&k.whiteSpace!=="nowrap",$,r,B=a._clipHeight,q=[],v=s(),t= +1;o&&(e.length||q.length);)delete a.bBox,$=a.getBBox(),r=$.width,!aa&&c.forExport&&(r=c.measureSpanWidth(m.firstChild.data,a.styles)),$=r>l,!$||e.length===1?(e=q,q=[],e.length&&(t++,B&&t*v>B?(e=["..."],a.attr("title",a.textStr)):(m=y.createElementNS(xa,"tspan"),H(m,{dy:v,x:j}),p&&H(m,"style",p),b.appendChild(m),r>l&&(l=r)))):(m.removeChild(m.firstChild),q.unshift(e.pop())),e.length&&m.appendChild(y.createTextNode(e.join(" ").replace(/- /g,"-")))}}})}))},button:function(a,b,c,d,e,f,g,h,i){var j=this.label(a, +b,c,i,null,null,null,null,"button"),k=0,l,o,n,s,m,p,a={x1:0,y1:0,x2:0,y2:1},e=w({"stroke-width":1,stroke:"#CCCCCC",fill:{linearGradient:a,stops:[[0,"#FEFEFE"],[1,"#F6F6F6"]]},r:2,padding:5,style:{color:"black"}},e);n=e.style;delete e.style;f=w(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#FFF"],[1,"#ACF"]]}},f);s=f.style;delete f.style;g=w(e,{stroke:"#68A",fill:{linearGradient:a,stops:[[0,"#9BD"],[1,"#CDF"]]}},g);m=g.style;delete g.style;h=w(e,{style:{color:"#CCC"}},h);p=h.style;delete h.style; +K(j.element,Aa?"mouseover":"mouseenter",function(){k!==3&&j.attr(f).css(s)});K(j.element,Aa?"mouseout":"mouseleave",function(){k!==3&&(l=[e,f,g][k],o=[n,s,m][k],j.attr(l).css(o))});j.setState=function(a){(j.state=k=a)?a===2?j.attr(g).css(m):a===3&&j.attr(h).css(p):j.attr(e).css(n)};return j.on("click",function(){k!==3&&d.call(j)}).attr(e).css(q({cursor:"default"},n))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=u(a[1])-b%2/2);a[2]===a[5]&&(a[2]=a[5]=u(a[2])+b%2/2);return a},path:function(a){var b= +{fill:Q};La(a)?b.d=a:ca(a)&&q(b,a);return this.createElement("path").attr(b)},circle:function(a,b,c){a=ca(a)?a:{x:a,y:b,r:c};b=this.createElement("circle");b.xSetter=function(a){this.element.setAttribute("cx",a)};b.ySetter=function(a){this.element.setAttribute("cy",a)};return b.attr(a)},arc:function(a,b,c,d,e,f){if(ca(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;a=this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0});a.r=c;return a},rect:function(a,b,c,d,e,f){var e=ca(a)?a.r: +e,g=this.createElement("rect"),a=ca(a)?a:a===t?{}:{x:a,y:b,width:v(c,0),height:v(d,0)};if(f!==t)a.strokeWidth=f,a=g.crisp(a);if(e)a.r=e;g.rSetter=function(a){H(this.element,{rx:a,ry:a})};return g.attr(a)},setSize:function(a,b,c){var d=this.alignedObjects,e=d.length;this.width=a;this.height=b;for(this.boxWrapper[m(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return r(a)?b.attr({"class":"highcharts-"+a}):b},image:function(a,b,c,d,e){var f= +{preserveAspectRatio:Q};arguments.length>1&&q(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a,b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(u(b),u(c),d,e,f),i=/^url\((.*?)\)$/,j,k;if(h)g=this.path(h),q(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&q(g,f);else if(i.test(a))k=function(a,b){a.element&&(a.attr({width:b[0],height:b[1]}), +a.alignByTranslate||a.translate(u((d-b[0])/2),u((e-b[1])/2)))},j=a.match(i)[1],a=Kb[j],g=this.image(j).attr({x:b,y:c}),g.isImg=!0,a?k(g,a):(g.attr({width:0,height:0}),Y("img",{onload:function(){k(g,Kb[j]=[this.width,this.height])},src:j}));return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return["M",a+c/2,b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return["M",a+c/2,b,"L", +a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return["M",a,b,"L",a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return["M",a+c/2,b,"L",a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-0.001,d=e.innerR,h=e.open,i=Z(f),j=ea(f),k=Z(g),g=ea(g),e=e.end-f<ma?0:1;return["M",a+c*i,b+c*j,"A",c,c,0,e,1,a+c*k,b+c*g,h?"M":"L",a+d*k,b+d*g,"A",d,d,0,e,0,a+d*i,b+d*j,h?"":"Z"]},callout:function(a,b,c,d,e){var f=C(e&&e.r||0,c,d),g=f+6,h=e&&e.anchorX,i=e&&e.anchorY, +e=u(e.strokeWidth||0)%2/2;a+=e;b+=e;e=["M",a+f,b,"L",a+c-f,b,"C",a+c,b,a+c,b,a+c,b+f,"L",a+c,b+d-f,"C",a+c,b+d,a+c,b+d,a+c-f,b+d,"L",a+f,b+d,"C",a,b+d,a,b+d,a,b+d-f,"L",a,b+f,"C",a,b,a,b,a+f,b];h&&h>c&&i>b+g&&i<b+d-g?e.splice(13,3,"L",a+c,i-6,a+c+6,i,a+c,i+6,a+c,b+d-f):h&&h<0&&i>b+g&&i<b+d-g?e.splice(33,3,"L",a,i+6,a-6,i,a,i-6,a,b+f):i&&i>d&&h>a+g&&h<a+c-g?e.splice(23,3,"L",h+6,b+d,h,b+d+6,h-6,b+d,a+f,b+d):i&&i<0&&h>a+g&&h<a+c-g&&e.splice(3,3,"L",h-6,b,h,b-6,h+6,b,c-f,b);return e}},clipRect:function(a, +b,c,d){var e="highcharts-"+tb++,f=this.createElement("clipPath").attr({id:e}).add(this.defs),a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},text:function(a,b,c,d){var e=fa||!aa&&this.forExport,f={};if(d&&!this.forExport)return this.html(a,b,c);f.x=Math.round(b||0);if(c)f.y=Math.round(c);if(a||a===0)f.text=a;a=this.createElement("text").attr(f);e&&a.css({position:"absolute"});if(!d)a.xSetter=function(a,b,c){var d=c.childNodes,e,f;for(f=1;f<d.length;f++)e=d[f],e.getAttribute("x")===c.getAttribute("x")&& +e.setAttribute("x",a);c.setAttribute(b,a)};return a},fontMetrics:function(a){var a=a||this.style.fontSize,a=/px/.test(a)?z(a):/em/.test(a)?parseFloat(a)*12:12,a=a<24?a+4:u(a*1.2),b=u(a*0.8);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h,i){function j(){var a,b;a=s.element.style;J=(Va===void 0||wb===void 0||n.styles.textAlign)&&s.textStr&&s.getBBox();n.width=(Va||J.width||0)+2*x+v;n.height=(wb||J.height||0)+2*x;na=x+o.fontMetrics(a&&a.fontSize).b;if(z){if(!m)a=u(-L*x),b=h?-na:0,n.box=m=d?o.symbol(d, +a,b,n.width,n.height,B):o.rect(a,b,n.width,n.height,0,B[Pb]),m.attr("fill",Q).add(n);m.isImg||m.attr(q({width:u(n.width),height:u(n.height)},B));B=null}}function k(){var a=n.styles,a=a&&a.textAlign,b=v+x*(1-L),c;c=h?0:na;if(r(Va)&&J&&(a==="center"||a==="right"))b+={center:0.5,right:1}[a]*(Va-J.width);if(b!==s.x||c!==s.y)s.attr("x",b),c!==t&&s.attr("y",c);s.x=b;s.y=c}function l(a,b){m?m.attr(a,b):B[a]=b}var o=this,n=o.g(i),s=o.text("",0,0,g).attr({zIndex:1}),m,J,L=0,x=3,v=0,Va,wb,xb,yb,y=0,B={},na, +z;n.onAdd=function(){s.add(n);n.attr({text:a||"",x:b,y:c});m&&r(e)&&n.attr({anchorX:e,anchorY:f})};n.widthSetter=function(a){Va=a};n.heightSetter=function(a){wb=a};n.paddingSetter=function(a){r(a)&&a!==x&&(x=a,k())};n.paddingLeftSetter=function(a){r(a)&&a!==v&&(v=a,k())};n.alignSetter=function(a){L={left:0,center:0.5,right:1}[a]};n.textSetter=function(a){a!==t&&s.textSetter(a);j();k()};n["stroke-widthSetter"]=function(a,b){a&&(z=!0);y=a%2/2;l(b,a)};n.strokeSetter=n.fillSetter=n.rSetter=function(a, +b){b==="fill"&&a&&(z=!0);l(b,a)};n.anchorXSetter=function(a,b){e=a;l(b,a+y-xb)};n.anchorYSetter=function(a,b){f=a;l(b,a-yb)};n.xSetter=function(a){n.x=a;L&&(a-=L*((Va||J.width)+x));xb=u(a);n.attr("translateX",xb)};n.ySetter=function(a){yb=n.y=u(a);n.attr("translateY",yb)};var A=n.css;return q(n,{css:function(a){if(a){var b={},a=w(a);p("fontSize,fontWeight,fontFamily,color,lineHeight,width,textDecoration,textShadow".split(","),function(c){a[c]!==t&&(b[c]=a[c],delete a[c])});s.css(b)}return A.call(n, +a)},getBBox:function(){return{width:J.width+2*x,height:J.height+2*x,x:J.x-x,y:J.y-x}},shadow:function(a){m&&m.shadow(a);return n},destroy:function(){W(n.element,"mouseenter");W(n.element,"mouseleave");s&&(s=s.destroy());m&&(m=m.destroy());P.prototype.destroy.call(n);n=o=j=k=l=null}})}};Za=ta;q(P.prototype,{htmlCss:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width)delete a.width,this.textWidth=b,this.updateTransform();this.styles=q(this.styles,a);G(this.element,a);return this},htmlGetBBox:function(){var a= +this.element,b=this.bBox;if(!b){if(a.nodeName==="text")a.style.position="absolute";b=this.bBox={x:a.offsetLeft,y:a.offsetTop,width:a.offsetWidth,height:a.offsetHeight}}return b},htmlUpdateTransform:function(){if(this.added){var a=this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=this.shadows;G(b,{marginLeft:c,marginTop:d});i&&p(i,function(a){G(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&& +p(b.childNodes,function(c){a.invertChild(c,b)});if(b.tagName==="SPAN"){var j=this.rotation,k,l=z(this.textWidth),o=[j,g,b.innerHTML,this.textWidth].join(",");if(o!==this.cTT){k=a.fontMetrics(b.style.fontSize).b;r(j)&&this.setSpanRotation(j,h,k);i=m(this.elemWidth,b.offsetWidth);if(i>l&&/[ \-]/.test(b.textContent||b.innerText))G(b,{width:l+"px",display:"block",whiteSpace:"normal"}),i=l;this.getSpanCorrection(i,k,h,j,g)}G(b,{left:e+(this.xCorr||0)+"px",top:f+(this.yCorr||0)+"px"});if(ib)k=b.offsetHeight; +this.cTT=o}}else this.alignOnAdd=!0},setSpanRotation:function(a,b,c){var d={},e=Aa?"-ms-transform":ib?"-webkit-transform":Ta?"MozTransform":Ib?"-o-transform":"";d[e]=d.transform="rotate("+a+"deg)";d[e+(Ta?"Origin":"-origin")]=d.transformOrigin=b*100+"% "+c+"px";G(this.element,d)},getSpanCorrection:function(a,b,c){this.xCorr=-a*c;this.yCorr=-b}});q(ta.prototype,{html:function(a,b,c){var d=this.createElement("span"),e=d.element,f=d.renderer;d.textSetter=function(a){a!==e.innerHTML&&delete this.bBox; +e.innerHTML=this.textStr=a};d.xSetter=d.ySetter=d.alignSetter=d.rotationSetter=function(a,b){b==="align"&&(b="textAlign");d[b]=a;d.htmlUpdateTransform()};d.attr({text:a,x:u(b),y:u(c)}).css({position:"absolute",whiteSpace:"nowrap",fontFamily:this.style.fontFamily,fontSize:this.style.fontSize});d.css=d.htmlCss;if(f.isSVG)d.add=function(a){var b,c=f.box.parentNode,j=[];if(this.parentGroup=a){if(b=a.div,!b){for(;a;)j.push(a),a=a.parentGroup;p(j.reverse(),function(a){var d;b=a.div=a.div||Y(Ja,{className:H(a.element, +"class")},{position:"absolute",left:(a.translateX||0)+"px",top:(a.translateY||0)+"px"},b||c);d=b.style;q(a,{translateXSetter:function(b,c){d.left=b+"px";a[c]=b;a.doTransform=!0},translateYSetter:function(b,c){d.top=b+"px";a[c]=b;a.doTransform=!0},visibilitySetter:function(a,b){d[b]=a}})})}}else b=c;b.appendChild(e);d.added=!0;d.alignOnAdd&&d.htmlUpdateTransform();return d};return d}});var X;if(!aa&&!fa){R.VMLElement=X={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ","absolute", +";"],e=b===Ja;(b==="shape"||e)&&d.push("left:0;top:0;width:1px;height:1px;");d.push("visibility: ",e?"hidden":"visible");c.push(' style="',d.join(""),'"/>');if(b)c=e||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=Y(c);this.renderer=a},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();if(this.onAdd)this.onAdd();return this},updateTransform:P.prototype.htmlUpdateTransform, +setSpanRotation:function(){var a=this.rotation,b=Z(a*Ca),c=ea(a*Ca);G(this.element,{filter:a?["progid:DXImageTransform.Microsoft.Matrix(M11=",b,", M12=",-c,", M21=",c,", M22=",b,", sizingMethod='auto expand')"].join(""):Q})},getSpanCorrection:function(a,b,c,d,e){var f=d?Z(d*Ca):1,g=d?ea(d*Ca):0,h=m(this.elemHeight,this.element.offsetHeight),i;this.xCorr=f<0&&-a;this.yCorr=g<0&&-h;i=f*g<0;this.xCorr+=g*b*(i?1-c:c);this.yCorr-=f*b*(d?i?c:1-c:1);e&&e!=="left"&&(this.xCorr-=a*c*(f<0?-1:1),d&&(this.yCorr-= +h*c*(g<0?-1:1)),G(this.element,{textAlign:e}))},pathToVML:function(a){for(var b=a.length,c=[];b--;)if(ha(a[b]))c[b]=u(a[b]*10)-5;else if(a[b]==="Z")c[b]="x";else if(c[b]=a[b],a.isArc&&(a[b]==="wa"||a[b]==="at"))c[b+5]===c[b+7]&&(c[b+7]+=a[b+7]>a[b+5]?1:-1),c[b+6]===c[b+8]&&(c[b+8]+=a[b+8]>a[b+6]?1:-1);return c.join(" ")||"x"},clip:function(a){var b=this,c;a?(c=a.members,ja(c,b),c.push(b),b.destroyClip=function(){ja(c,b)},a=a.getCSS(b)):(b.destroyClip&&b.destroyClip(),a={clip:hb?"inherit":"rect(auto)"}); +return b.css(a)},css:P.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&&Pa(a)},destroy:function(){this.destroyClip&&this.destroyClip();return P.prototype.destroy.apply(this)},on:function(a,b){this.element["on"+a]=function(){var a=I.event;a.target=a.srcElement;b(a)};return this},cutOffPath:function(a,b){var c,a=a.split(/[ ,]/);c=a.length;if(c===9||c===11)a[c-4]=a[c-2]=z(a[c-2])-10*b;return a.join(" ")},shadow:function(a,b,c){var d=[],e,f=this.element,g=this.renderer,h,i=f.style,j,k=f.path, +l,o,n,s;k&&typeof k.value!=="string"&&(k="x");o=k;if(a){n=m(a.width,3);s=(a.opacity||0.15)/n;for(e=1;e<=3;e++){l=n*2+1-2*e;c&&(o=this.cutOffPath(k.value,l+0.5));j=['<shape isShadow="true" strokeweight="',l,'" filled="false" path="',o,'" coordsize="10 10" style="',f.style.cssText,'" />'];h=Y(g.prepVML(j),null,{left:z(i.left)+m(a.offsetX,1),top:z(i.top)+m(a.offsetY,1)});if(c)h.cutOff=l+1;j=['<stroke color="',a.color||"black",'" opacity="',s*e,'"/>'];Y(g.prepVML(j),null,null,h);b?b.element.appendChild(h): +f.parentNode.insertBefore(h,f);d.push(h)}this.shadows=d}return this},updateShadows:sa,setAttr:function(a,b){hb?this.element[a]=b:this.element.setAttribute(a,b)},classSetter:function(a){this.element.className=a},dashstyleSetter:function(a,b,c){(c.getElementsByTagName("stroke")[0]||Y(this.renderer.prepVML(["<stroke/>"]),null,null,c))[b]=a||"solid";this[b]=a},dSetter:function(a,b,c){var d=this.shadows,a=a||[];this.d=a.join(" ");c.path=a=this.pathToVML(a);if(d)for(c=d.length;c--;)d[c].path=d[c].cutOff? +this.cutOffPath(a,d[c].cutOff):a;this.setAttr(b,a)},fillSetter:function(a,b,c){var d=c.nodeName;if(d==="SPAN")c.style.color=a;else if(d!=="IMG")c.filled=a!==Q,this.setAttr("fillcolor",this.renderer.color(a,c,b,this))},opacitySetter:sa,rotationSetter:function(a,b,c){c=c.style;this[b]=c[b]=a;c.left=-u(ea(a*Ca)+1)+"px";c.top=u(Z(a*Ca))+"px"},strokeSetter:function(a,b,c){this.setAttr("strokecolor",this.renderer.color(a,c,b))},"stroke-widthSetter":function(a,b,c){c.stroked=!!a;this[b]=a;ha(a)&&(a+="px"); +this.setAttr("strokeweight",a)},titleSetter:function(a,b){this.setAttr(b,a)},visibilitySetter:function(a,b,c){a==="inherit"&&(a="visible");this.shadows&&p(this.shadows,function(c){c.style[b]=a});c.nodeName==="DIV"&&(a=a==="hidden"?"-999em":0,hb||(c.style[b]=a?"visible":"hidden"),b="top");c.style[b]=a},xSetter:function(a,b,c){this[b]=a;b==="x"?b="left":b==="y"&&(b="top");this.updateClipping?(this[b]=a,this.updateClipping()):c.style[b]=a},zIndexSetter:function(a,b,c){c.style[b]=a}};X=ka(P,X);X.prototype.ySetter= +X.prototype.widthSetter=X.prototype.heightSetter=X.prototype.xSetter;var ga={Element:X,isIE8:wa.indexOf("MSIE 8.0")>-1,init:function(a,b,c,d){var e;this.alignedObjects=[];d=this.createElement(Ja).css(q(this.getStyle(d),{position:"relative"}));e=d.element;a.appendChild(d.element);this.isVML=!0;this.box=e;this.boxWrapper=d;this.cache={};this.setSize(b,c,!1);if(!y.namespaces.hcv){y.namespaces.add("hcv","urn:schemas-microsoft-com:vml");try{y.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}catch(f){y.styleSheets[0].cssText+= +"hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "}}},isHidden:function(){return!this.box.offsetWidth},clipRect:function(a,b,c,d){var e=this.createElement(),f=ca(a);return q(e,{members:[],left:(f?a.x:a)+1,top:(f?a.y:b)+1,width:(f?a.width:c)-1,height:(f?a.height:d)-1,getCSS:function(a){var b=a.element,c=b.nodeName,a=a.inverted,d=this.top-(c==="shape"?b.offsetTop:0),e=this.left,b=e+this.width,f=d+this.height,d={clip:"rect("+u(a?e:d)+"px,"+u(a? +f:b)+"px,"+u(a?b:f)+"px,"+u(a?d:e)+"px)"};!a&&hb&&c==="DIV"&&q(d,{width:b+"px",height:f+"px"});return d},updateClipping:function(){p(e.members,function(a){a.element&&a.css(e.getCSS(a))})}})},color:function(a,b,c,d){var e=this,f,g=/^rgba/,h,i,j=Q;a&&a.linearGradient?i="gradient":a&&a.radialGradient&&(i="pattern");if(i){var k,l,o=a.linearGradient||a.radialGradient,n,s,m,J,L,x="",a=a.stops,r,v=[],q=function(){h=['<fill colors="'+v.join(",")+'" opacity="',m,'" o:opacity2="',s,'" type="',i,'" ',x,'focus="100%" method="any" />']; +Y(e.prepVML(h),null,null,b)};n=a[0];r=a[a.length-1];n[0]>0&&a.unshift([0,n[1]]);r[0]<1&&a.push([1,r[1]]);p(a,function(a,b){g.test(a[1])?(f=ya(a[1]),k=f.get("rgb"),l=f.get("a")):(k=a[1],l=1);v.push(a[0]*100+"% "+k);b?(m=l,J=k):(s=l,L=k)});if(c==="fill")if(i==="gradient")c=o.x1||o[0]||0,a=o.y1||o[1]||0,n=o.x2||o[2]||0,o=o.y2||o[3]||0,x='angle="'+(90-U.atan((o-a)/(n-c))*180/ma)+'"',q();else{var j=o.r,t=j*2,u=j*2,y=o.cx,B=o.cy,na=b.radialReference,w,j=function(){na&&(w=d.getBBox(),y+=(na[0]-w.x)/w.width- +0.5,B+=(na[1]-w.y)/w.height-0.5,t*=na[2]/w.width,u*=na[2]/w.height);x='src="'+E.global.VMLRadialGradientURL+'" size="'+t+","+u+'" origin="0.5,0.5" position="'+y+","+B+'" color2="'+L+'" ';q()};d.added?j():d.onAdd=j;j=J}else j=k}else if(g.test(a)&&b.tagName!=="IMG")f=ya(a),h=["<",c,' opacity="',f.get("a"),'"/>'],Y(this.prepVML(h),null,null,b),j=f.get("rgb");else{j=b.getElementsByTagName(c);if(j.length)j[0].opacity=1,j[0].type="solid";j=a}return j},prepVML:function(a){var b=this.isIE8,a=a.join("");b? +(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')===-1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:");return a},text:ta.prototype.html,path:function(a){var b={coordsize:"10 10"};La(a)?b.d=a:ca(a)&&q(b,a);return this.createElement("shape").attr(b)},circle:function(a,b,c){var d=this.symbol("circle");if(ca(a))c=a.r,b=a.y,a=a.x;d.isCircle= +!0;d.r=c;return d.attr({x:a,y:b})},g:function(a){var b;a&&(b={className:"highcharts-"+a,"class":"highcharts-"+a});return this.createElement(Ja).attr(b)},image:function(a,b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.attr({x:b,y:c,width:d,height:e});return f},createElement:function(a){return a==="rect"?this.symbol(a):ta.prototype.createElement.call(this,a)},invertChild:function(a,b){var c=this,d=b.style,e=a.tagName==="IMG"&&a.style;G(a,{flip:"x",left:z(d.width)-(e?z(e.top): +1),top:z(d.height)-(e?z(e.left):1),rotation:-90});p(a.childNodes,function(b){c.invertChild(b,a)})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,h=e.r||c||d,c=e.innerR,d=Z(f),i=ea(f),j=Z(g),k=ea(g);if(g-f===0)return["x"];f=["wa",a-h,b-h,a+h,b+h,a+h*d,b+h*i,a+h*j,b+h*k];e.open&&!c&&f.push("e","M",a,b);f.push("at",a-c,b-c,a+c,b+c,a+c*j,b+c*k,a+c*d,b+c*i,"x","e");f.isArc=!0;return f},circle:function(a,b,c,d,e){e&&(c=d=2*e.r);e&&e.isCircle&&(a-=c/2,b-=d/2);return["wa",a,b,a+c,b+d,a+c,b+d/2,a+ +c,b+d/2,"e"]},rect:function(a,b,c,d,e){return ta.prototype.symbols[!r(e)||!e.r?"square":"callout"].call(0,a,b,c,d,e)}}};R.VMLRenderer=X=function(){this.init.apply(this,arguments)};X.prototype=w(ta.prototype,ga);Za=X}ta.prototype.measureSpanWidth=function(a,b){var c=y.createElement("span"),d;d=y.createTextNode(a);c.appendChild(d);G(c,b);this.box.appendChild(c);d=c.offsetWidth;Pa(c);return d};var Lb;if(fa)R.CanVGRenderer=X=function(){xa="http://www.w3.org/1999/xhtml"},X.prototype.symbols={},Lb=function(){function a(){var a= +b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){b.length===0&&Qb(d,a);b.push(c)}}}(),Za=X;Sa.prototype={addLabel:function(){var a=this.axis,b=a.options,c=a.chart,d=a.horiz,e=a.categories,f=a.names,g=this.pos,h=b.labels,i=a.tickPositions,d=d&&e&&!h.step&&!h.staggerLines&&!h.rotation&&c.plotWidth/i.length||!d&&(c.margin[3]||c.chartWidth*0.33),j=g===i[0],k=g===i[i.length-1],l,f=e?m(e[g],f[g],g):g,e=this.label,o=i.info;a.isDatetimeAxis&&o&&(l=b.dateTimeLabelFormats[o.higherRanks[g]|| +o.unitName]);this.isFirst=j;this.isLast=k;b=a.labelFormatter.call({axis:a,chart:c,isFirst:j,isLast:k,dateTimeLabelFormat:l,value:a.isLog?da(ia(f)):f});g=d&&{width:v(1,u(d-2*(h.padding||10)))+"px"};g=q(g,h.style);if(r(e))e&&e.attr({text:b}).css(g);else{l={align:a.labelAlign};if(ha(h.rotation))l.rotation=h.rotation;if(d&&h.ellipsis)l._clipHeight=a.len/i.length;this.label=r(b)&&h.enabled?c.renderer.text(b,0,0,h.useHTML).attr(l).css(g).add(a.labelGroup):null}},getLabelSize:function(){var a=this.label, +b=this.axis;return a?a.getBBox()[b.horiz?"height":"width"]:0},getLabelSides:function(){var a=this.label.getBBox(),b=this.axis,c=b.horiz,d=b.options.labels,a=c?a.width:a.height,b=c?d.x-a*{left:0,center:0.5,right:1}[b.labelAlign]:0;return[b,c?a+b:a]},handleOverflow:function(a,b){var c=!0,d=this.axis,e=this.isFirst,f=this.isLast,g=d.horiz?b.x:b.y,h=d.reversed,i=d.tickPositions,j=this.getLabelSides(),k=j[0],j=j[1],l,o,n,s=this.label.line||0;l=d.labelEdge;o=d.justifyLabels&&(e||f);l[s]===t||g+k>l[s]?l[s]= +g+j:o||(c=!1);if(o){l=(o=d.justifyToPlot)?d.pos:0;o=o?l+d.len:d.chart.chartWidth;do a+=e?1:-1,n=d.ticks[i[a]];while(i[a]&&(!n||n.label.line!==s));d=n&&n.label.xy&&n.label.xy.x+n.getLabelSides()[e?0:1];e&&!h||f&&h?g+k<l&&(g=l-k,n&&g+j>d&&(c=!1)):g+j>o&&(g=o-j,n&&g+k<d&&(c=!1));b.x=g}return c},getPosition:function(a,b,c,d){var e=this.axis,f=e.chart,g=d&&f.oldChartHeight||f.chartHeight;return{x:a?e.translate(b+c,null,null,d)+e.transB:e.left+e.offset+(e.opposite?(d&&f.oldChartWidth||f.chartWidth)-e.right- +e.left:0),y:a?g-e.bottom+e.offset-(e.opposite?e.height:0):g-e.translate(b+c,null,null,d)-e.transB}},getLabelPosition:function(a,b,c,d,e,f,g,h){var i=this.axis,j=i.transA,k=i.reversed,l=i.staggerLines,o=i.chart.renderer.fontMetrics(e.style.fontSize).b,n=e.rotation,a=a+e.x-(f&&d?f*j*(k?-1:1):0),b=b+e.y-(f&&!d?f*j*(k?1:-1):0);n&&i.side===2&&(b-=o-o*Z(n*Ca));!r(e.y)&&!n&&(b+=o-c.getBBox().height/2);if(l)c.line=g/(h||1)%l,b+=c.line*(i.labelOffset/l);return{x:a,y:b}},getMarkPath:function(a,b,c,d,e,f){return f.crispLine(["M", +a,b,"L",a+(e?0:-c),b+(e?c:0)],d)},render:function(a,b,c){var d=this.axis,e=d.options,f=d.chart.renderer,g=d.horiz,h=this.type,i=this.label,j=this.pos,k=e.labels,l=this.gridLine,o=h?h+"Grid":"grid",n=h?h+"Tick":"tick",s=e[o+"LineWidth"],p=e[o+"LineColor"],J=e[o+"LineDashStyle"],L=e[n+"Length"],o=e[n+"Width"]||0,x=e[n+"Color"],r=e[n+"Position"],n=this.mark,v=k.step,q=!0,u=d.tickmarkOffset,w=this.getPosition(g,j,u,b),y=w.x,w=w.y,B=g&&y===d.pos+d.len||!g&&w===d.pos?-1:1;this.isActive=!0;if(s){j=d.getPlotLinePath(j+ +u,s*B,b,!0);if(l===t){l={stroke:p,"stroke-width":s};if(J)l.dashstyle=J;if(!h)l.zIndex=1;if(b)l.opacity=0;this.gridLine=l=s?f.path(j).attr(l).add(d.gridGroup):null}if(!b&&l&&j)l[this.isNew?"attr":"animate"]({d:j,opacity:c})}if(o&&L)r==="inside"&&(L=-L),d.opposite&&(L=-L),h=this.getMarkPath(y,w,L,o*B,g,f),n?n.animate({d:h,opacity:c}):this.mark=f.path(h).attr({stroke:x,"stroke-width":o,opacity:c}).add(d.axisGroup);if(i&&!isNaN(y))i.xy=w=this.getLabelPosition(y,w,i,g,k,u,a,v),this.isFirst&&!this.isLast&& +!m(e.showFirstLabel,1)||this.isLast&&!this.isFirst&&!m(e.showLastLabel,1)?q=!1:!d.isRadial&&!k.step&&!k.rotation&&!b&&c!==0&&(q=this.handleOverflow(a,w)),v&&a%v&&(q=!1),q&&!isNaN(w.y)?(w.opacity=c,i[this.isNew?"attr":"animate"](w),this.isNew=!1):i.attr("y",-9999)},destroy:function(){Oa(this,this.axis)}};R.PlotLineOrBand=function(a,b){this.axis=a;if(b)this.options=b,this.id=b.id};R.PlotLineOrBand.prototype={render:function(){var a=this,b=a.axis,c=b.horiz,d=(b.pointRange||0)/2,e=a.options,f=e.label, +g=a.label,h=e.width,i=e.to,j=e.from,k=r(j)&&r(i),l=e.value,o=e.dashStyle,n=a.svgElem,s=[],p,J=e.color,L=e.zIndex,x=e.events,q={},t=b.chart.renderer;b.isLog&&(j=za(j),i=za(i),l=za(l));if(h){if(s=b.getPlotLinePath(l,h),q={stroke:J,"stroke-width":h},o)q.dashstyle=o}else if(k){j=v(j,b.min-d);i=C(i,b.max+d);s=b.getPlotBandPath(j,i,e);if(J)q.fill=J;if(e.borderWidth)q.stroke=e.borderColor,q["stroke-width"]=e.borderWidth}else return;if(r(L))q.zIndex=L;if(n)if(s)n.animate({d:s},null,n.onGetPath);else{if(n.hide(), +n.onGetPath=function(){n.show()},g)a.label=g=g.destroy()}else if(s&&s.length&&(a.svgElem=n=t.path(s).attr(q).add(),x))for(p in d=function(b){n.on(b,function(c){x[b].apply(a,[c])})},x)d(p);if(f&&r(f.text)&&s&&s.length&&b.width>0&&b.height>0){f=w({align:c&&k&&"center",x:c?!k&&4:10,verticalAlign:!c&&k&&"middle",y:c?k?16:10:k?6:-4,rotation:c&&!k&&90},f);if(!g){q={align:f.textAlign||f.align,rotation:f.rotation};if(r(L))q.zIndex=L;a.label=g=t.text(f.text,0,0,f.useHTML).attr(q).css(f.style).add()}b=[s[1], +s[4],m(s[6],s[1])];s=[s[2],s[5],m(s[7],s[2])];c=Na(b);k=Na(s);g.align(f,!1,{x:c,y:k,width:Ba(b)-c,height:Ba(s)-k});g.show()}else g&&g.hide();return a},destroy:function(){ja(this.axis.plotLinesAndBands,this);delete this.axis;Oa(this)}};la.prototype={defaultOptions:{dateTimeLabelFormats:{millisecond:"%H:%M:%S.%L",second:"%H:%M:%S",minute:"%H:%M",hour:"%H:%M",day:"%e. %b",week:"%e. %b",month:"%b '%y",year:"%Y"},endOnTick:!1,gridLineColor:"#C0C0C0",labels:N,lineColor:"#C0D0E0",lineWidth:1,minPadding:0.01, +maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:10,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#707070"}},type:"linear"},defaultYAxisOptions:{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8,y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0, +tickWidth:0,title:{rotation:270,text:"Values"},stackLabels:{enabled:!1,formatter:function(){return Ga(this.total,-1)},style:N.style}},defaultLeftAxisOptions:{labels:{x:-15,y:null},title:{rotation:270}},defaultRightAxisOptions:{labels:{x:15,y:null},title:{rotation:90}},defaultBottomAxisOptions:{labels:{x:0,y:20},title:{rotation:0}},defaultTopAxisOptions:{labels:{x:0,y:-15},title:{rotation:0}},init:function(a,b){var c=b.isX;this.horiz=a.inverted?!c:c;this.coll=(this.isXAxis=c)?"xAxis":"yAxis";this.opposite= +b.opposite;this.side=b.side||(this.horiz?this.opposite?0:2:this.opposite?1:3);this.setOptions(b);var d=this.options,e=d.type;this.labelFormatter=d.labels.formatter||this.defaultLabelFormatter;this.userOptions=b;this.minPixelPadding=0;this.chart=a;this.reversed=d.reversed;this.zoomEnabled=d.zoomEnabled!==!1;this.categories=d.categories||e==="category";this.names=[];this.isLog=e==="logarithmic";this.isDatetimeAxis=e==="datetime";this.isLinked=r(d.linkedTo);this.tickmarkOffset=this.categories&&d.tickmarkPlacement=== +"between"?0.5:0;this.ticks={};this.labelEdge=[];this.minorTicks={};this.plotLinesAndBands=[];this.alternateBands={};this.len=0;this.minRange=this.userMinRange=d.minRange||d.maxZoom;this.range=d.range;this.offset=d.offset||0;this.stacks={};this.oldStacks={};this.min=this.max=null;this.crosshair=m(d.crosshair,qa(a.options.tooltip.crosshairs)[c?0:1],!1);var f,d=this.options.events;Da(this,a.axes)===-1&&(c&&!this.isColorAxis?a.axes.splice(a.xAxis.length,0,this):a.axes.push(this),a[this.coll].push(this)); +this.series=this.series||[];if(a.inverted&&c&&this.reversed===t)this.reversed=!0;this.removePlotLine=this.removePlotBand=this.removePlotBandOrLine;for(f in d)K(this,f,d[f]);if(this.isLog)this.val2lin=za,this.lin2val=ia},setOptions:function(a){this.options=w(this.defaultOptions,this.isXAxis?{}:this.defaultYAxisOptions,[this.defaultTopAxisOptions,this.defaultRightAxisOptions,this.defaultBottomAxisOptions,this.defaultLeftAxisOptions][this.side],w(E[this.coll],a))},defaultLabelFormatter:function(){var a= +this.axis,b=this.value,c=a.categories,d=this.dateTimeLabelFormat,e=E.lang.numericSymbols,f=e&&e.length,g,h=a.options.labels.format,a=a.isLog?b:a.tickInterval;if(h)g=Ia(h,this);else if(c)g=b;else if(d)g=cb(d,b);else if(f&&a>=1E3)for(;f--&&g===t;)c=Math.pow(1E3,f+1),a>=c&&e[f]!==null&&(g=Ga(b/c,-1)+e[f]);g===t&&(g=M(b)>=1E4?Ga(b,0):Ga(b,-1,t,""));return g},getSeriesExtremes:function(){var a=this,b=a.chart;a.hasVisibleSeries=!1;a.dataMin=a.dataMax=null;a.buildStacks&&a.buildStacks();p(a.series,function(c){if(c.visible|| +!b.options.chart.ignoreHiddenSeries){var d;d=c.options.threshold;var e;a.hasVisibleSeries=!0;a.isLog&&d<=0&&(d=null);if(a.isXAxis){if(d=c.xData,d.length)a.dataMin=C(m(a.dataMin,d[0]),Na(d)),a.dataMax=v(m(a.dataMax,d[0]),Ba(d))}else{c.getExtremes();e=c.dataMax;c=c.dataMin;if(r(c)&&r(e))a.dataMin=C(m(a.dataMin,c),c),a.dataMax=v(m(a.dataMax,e),e);if(r(d))if(a.dataMin>=d)a.dataMin=d,a.ignoreMinPadding=!0;else if(a.dataMax<d)a.dataMax=d,a.ignoreMaxPadding=!0}}})},translate:function(a,b,c,d,e,f){var g= +1,h=0,i=d?this.oldTransA:this.transA,d=d?this.oldMin:this.min,j=this.minPixelPadding,e=(this.options.ordinal||this.isLog&&e)&&this.lin2val;if(!i)i=this.transA;if(c)g*=-1,h=this.len;this.reversed&&(g*=-1,h-=g*(this.sector||this.len));b?(a=a*g+h,a-=j,a=a/i+d,e&&(a=this.lin2val(a))):(e&&(a=this.val2lin(a)),f==="between"&&(f=0.5),a=g*(a-d)*i+h+g*j+(ha(f)?i*f*this.pointRange:0));return a},toPixels:function(a,b){return this.translate(a,!1,!this.horiz,null,!0)+(b?0:this.pos)},toValue:function(a,b){return this.translate(a- +(b?0:this.pos),!0,!this.horiz,null,!0)},getPlotLinePath:function(a,b,c,d,e){var f=this.chart,g=this.left,h=this.top,i,j,k=c&&f.oldChartHeight||f.chartHeight,l=c&&f.oldChartWidth||f.chartWidth,o;i=this.transB;e=m(e,this.translate(a,null,null,c));a=c=u(e+i);i=j=u(k-e-i);if(isNaN(e))o=!0;else if(this.horiz){if(i=h,j=k-this.bottom,a<g||a>g+this.width)o=!0}else if(a=g,c=l-this.right,i<h||i>h+this.height)o=!0;return o&&!d?null:f.renderer.crispLine(["M",a,i,"L",c,j],b||1)},getLinearTickPositions:function(a, +b,c){var d,e=da(T(b/a)*a),f=da(Ka(c/a)*a),g=[];if(b===c&&ha(b))return[b];for(b=e;b<=f;){g.push(b);b=da(b+a);if(b===d)break;d=b}return g},getMinorTickPositions:function(){var a=this.options,b=this.tickPositions,c=this.minorTickInterval,d=[],e;if(this.isLog){e=b.length;for(a=1;a<e;a++)d=d.concat(this.getLogTickPositions(c,b[a-1],b[a],!0))}else if(this.isDatetimeAxis&&a.minorTickInterval==="auto")d=d.concat(this.getTimeTicks(this.normalizeTimeTickInterval(c),this.min,this.max,a.startOfWeek)),d[0]<this.min&& +d.shift();else for(b=this.min+(b[0]-this.min)%c;b<=this.max;b+=c)d.push(b);return d},adjustForMinRange:function(){var a=this.options,b=this.min,c=this.max,d,e=this.dataMax-this.dataMin>=this.minRange,f,g,h,i,j;if(this.isXAxis&&this.minRange===t&&!this.isLog)r(a.min)||r(a.max)?this.minRange=null:(p(this.series,function(a){i=a.xData;for(g=j=a.xIncrement?1:i.length-1;g>0;g--)if(h=i[g]-i[g-1],f===t||h<f)f=h}),this.minRange=C(f*5,this.dataMax-this.dataMin));if(c-b<this.minRange){var k=this.minRange;d= +(k-c+b)/2;d=[b-d,m(a.min,b-d)];if(e)d[2]=this.dataMin;b=Ba(d);c=[b+k,m(a.max,b+k)];if(e)c[2]=this.dataMax;c=Na(c);c-b<k&&(d[0]=c-k,d[1]=m(a.min,c-k),b=Ba(d))}this.min=b;this.max=c},setAxisTranslation:function(a){var b=this,c=b.max-b.min,d=b.axisPointRange||0,e,f=0,g=0,h=b.linkedParent,i=!!b.categories,j=b.transA;if(b.isXAxis||i||d)h?(f=h.minPointOffset,g=h.pointRangePadding):p(b.series,function(a){var h=i?1:b.isXAxis?a.pointRange:b.axisPointRange||0,j=a.options.pointPlacement,n=a.closestPointRange; +h>c&&(h=0);d=v(d,h);f=v(f,Fa(j)?0:h/2);g=v(g,j==="on"?0:h);!a.noSharedTooltip&&r(n)&&(e=r(e)?C(e,n):n)}),h=b.ordinalSlope&&e?b.ordinalSlope/e:1,b.minPointOffset=f*=h,b.pointRangePadding=g*=h,b.pointRange=C(d,c),b.closestPointRange=e;if(a)b.oldTransA=j;b.translationSlope=b.transA=j=b.len/(c+g||1);b.transB=b.horiz?b.left:b.bottom;b.minPixelPadding=j*f},setTickPositions:function(a){var b=this,c=b.chart,d=b.options,e=b.isLog,f=b.isDatetimeAxis,g=b.isXAxis,h=b.isLinked,i=b.options.tickPositioner,j=d.maxPadding, +k=d.minPadding,l=d.tickInterval,o=d.minTickInterval,n=d.tickPixelInterval,s,$=b.categories;h?(b.linkedParent=c[b.coll][d.linkedTo],c=b.linkedParent.getExtremes(),b.min=m(c.min,c.dataMin),b.max=m(c.max,c.dataMax),d.type!==b.linkedParent.options.type&&ra(11,1)):(b.min=m(b.userMin,d.min,b.dataMin),b.max=m(b.userMax,d.max,b.dataMax));if(e)!a&&C(b.min,m(b.dataMin,b.min))<=0&&ra(10,1),b.min=da(za(b.min)),b.max=da(za(b.max));if(b.range&&r(b.max))b.userMin=b.min=v(b.min,b.max-b.range),b.userMax=b.max,b.range= +null;b.beforePadding&&b.beforePadding();b.adjustForMinRange();if(!$&&!b.axisPointRange&&!b.usePercentage&&!h&&r(b.min)&&r(b.max)&&(c=b.max-b.min)){if(!r(d.min)&&!r(b.userMin)&&k&&(b.dataMin<0||!b.ignoreMinPadding))b.min-=c*k;if(!r(d.max)&&!r(b.userMax)&&j&&(b.dataMax>0||!b.ignoreMaxPadding))b.max+=c*j}if(ha(d.floor))b.min=v(b.min,d.floor);if(ha(d.ceiling))b.max=C(b.max,d.ceiling);b.min===b.max||b.min===void 0||b.max===void 0?b.tickInterval=1:h&&!l&&n===b.linkedParent.options.tickPixelInterval?b.tickInterval= +b.linkedParent.tickInterval:(b.tickInterval=m(l,$?1:(b.max-b.min)*n/v(b.len,n)),!r(l)&&b.len<n&&!this.isRadial&&!this.isLog&&!$&&d.startOnTick&&d.endOnTick&&(s=!0,b.tickInterval/=4));g&&!a&&p(b.series,function(a){a.processData(b.min!==b.oldMin||b.max!==b.oldMax)});b.setAxisTranslation(!0);b.beforeSetTickPositions&&b.beforeSetTickPositions();if(b.postProcessTickInterval)b.tickInterval=b.postProcessTickInterval(b.tickInterval);if(b.pointRange)b.tickInterval=v(b.pointRange,b.tickInterval);if(!l&&b.tickInterval< +o)b.tickInterval=o;if(!f&&!e&&!l)b.tickInterval=nb(b.tickInterval,null,mb(b.tickInterval),d);b.minorTickInterval=d.minorTickInterval==="auto"&&b.tickInterval?b.tickInterval/5:d.minorTickInterval;b.tickPositions=a=d.tickPositions?[].concat(d.tickPositions):i&&i.apply(b,[b.min,b.max]);if(!a)!b.ordinalPositions&&(b.max-b.min)/b.tickInterval>v(2*b.len,200)&&ra(19,!0),a=f?b.getTimeTicks(b.normalizeTimeTickInterval(b.tickInterval,d.units),b.min,b.max,d.startOfWeek,b.ordinalPositions,b.closestPointRange, +!0):e?b.getLogTickPositions(b.tickInterval,b.min,b.max):b.getLinearTickPositions(b.tickInterval,b.min,b.max),s&&a.splice(1,a.length-2),b.tickPositions=a;if(!h)e=a[0],f=a[a.length-1],h=b.minPointOffset||0,d.startOnTick?b.min=e:b.min-h>e&&a.shift(),d.endOnTick?b.max=f:b.max+h<f&&a.pop(),a.length===1&&(d=M(b.max)>1E13?1:0.001,b.min-=d,b.max+=d)},setMaxTicks:function(){var a=this.chart,b=a.maxTicks||{},c=this.tickPositions,d=this._maxTicksKey=[this.coll,this.pos,this.len].join("-");if(!this.isLinked&& +!this.isDatetimeAxis&&c&&c.length>(b[d]||0)&&this.options.alignTicks!==!1)b[d]=c.length;a.maxTicks=b},adjustTickAmount:function(){var a=this._maxTicksKey,b=this.tickPositions,c=this.chart.maxTicks;if(c&&c[a]&&!this.isDatetimeAxis&&!this.categories&&!this.isLinked&&this.options.alignTicks!==!1&&this.min!==t){var d=this.tickAmount,e=b.length;this.tickAmount=a=c[a];if(e<a){for(;b.length<a;)b.push(da(b[b.length-1]+this.tickInterval));this.transA*=(e-1)/(a-1);this.max=b[b.length-1]}if(r(d)&&a!==d)this.isDirty= +!0}},setScale:function(){var a=this.stacks,b,c,d,e;this.oldMin=this.min;this.oldMax=this.max;this.oldAxisLength=this.len;this.setAxisSize();e=this.len!==this.oldAxisLength;p(this.series,function(a){if(a.isDirtyData||a.isDirty||a.xAxis.isDirty)d=!0});if(e||d||this.isLinked||this.forceRedraw||this.userMin!==this.oldUserMin||this.userMax!==this.oldUserMax){if(!this.isXAxis)for(b in a)for(c in a[b])a[b][c].total=null,a[b][c].cum=0;this.forceRedraw=!1;this.getSeriesExtremes();this.setTickPositions();this.oldUserMin= +this.userMin;this.oldUserMax=this.userMax;if(!this.isDirty)this.isDirty=e||this.min!==this.oldMin||this.max!==this.oldMax}else if(!this.isXAxis){if(this.oldStacks)a=this.stacks=this.oldStacks;for(b in a)for(c in a[b])a[b][c].cum=a[b][c].total}this.setMaxTicks()},setExtremes:function(a,b,c,d,e){var f=this,g=f.chart,c=m(c,!0),e=q(e,{min:a,max:b});D(f,"setExtremes",e,function(){f.userMin=a;f.userMax=b;f.eventArgs=e;f.isDirtyExtremes=!0;c&&g.redraw(d)})},zoom:function(a,b){var c=this.dataMin,d=this.dataMax, +e=this.options;this.allowZoomOutside||(r(c)&&a<=C(c,m(e.min,c))&&(a=t),r(d)&&b>=v(d,m(e.max,d))&&(b=t));this.displayBtn=a!==t||b!==t;this.setExtremes(a,b,!1,t,{trigger:"zoom"});return!0},setAxisSize:function(){var a=this.chart,b=this.options,c=b.offsetLeft||0,d=this.horiz,e=m(b.width,a.plotWidth-c+(b.offsetRight||0)),f=m(b.height,a.plotHeight),g=m(b.top,a.plotTop),b=m(b.left,a.plotLeft+c),c=/%$/;c.test(f)&&(f=parseInt(f,10)/100*a.plotHeight);c.test(g)&&(g=parseInt(g,10)/100*a.plotHeight+a.plotTop); +this.left=b;this.top=g;this.width=e;this.height=f;this.bottom=a.chartHeight-f-g;this.right=a.chartWidth-e-b;this.len=v(d?e:f,0);this.pos=d?b:g},getExtremes:function(){var a=this.isLog;return{min:a?da(ia(this.min)):this.min,max:a?da(ia(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},getThreshold:function(a){var b=this.isLog,c=b?ia(this.min):this.min,b=b?ia(this.max):this.max;c>a||a===null?a=c:b<a&&(a=b);return this.translate(a,0,1,0,1)},autoLabelAlign:function(a){a= +(m(a,0)-this.side*90+720)%360;return a>15&&a<165?"right":a>195&&a<345?"left":"center"},getOffset:function(){var a=this,b=a.chart,c=b.renderer,d=a.options,e=a.tickPositions,f=a.ticks,g=a.horiz,h=a.side,i=b.inverted?[1,0,3,2][h]:h,j,k=0,l,o=0,n=d.title,s=d.labels,$=0,J=b.axisOffset,L=b.clipOffset,x=[-1,1,1,-1][h],q,u=1,w=m(s.maxStaggerLines,5),y,z,A,B,na=h===2?c.fontMetrics(s.style.fontSize).b:0;a.hasData=j=a.hasVisibleSeries||r(a.min)&&r(a.max)&&!!e;a.showAxis=b=j||m(d.showEmpty,!0);a.staggerLines= +a.horiz&&s.staggerLines;if(!a.axisGroup)a.gridGroup=c.g("grid").attr({zIndex:d.gridZIndex||1}).add(),a.axisGroup=c.g("axis").attr({zIndex:d.zIndex||2}).add(),a.labelGroup=c.g("axis-labels").attr({zIndex:s.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels").add();if(j||a.isLinked){a.labelAlign=m(s.align||a.autoLabelAlign(s.rotation));p(e,function(b){f[b]?f[b].addLabel():f[b]=new Sa(a,b)});if(a.horiz&&!a.staggerLines&&w&&!s.rotation){for(q=a.reversed?[].concat(e).reverse():e;u<w;){j= +[];y=!1;for(s=0;s<q.length;s++)z=q[s],A=(A=f[z].label&&f[z].label.getBBox())?A.width:0,B=s%u,A&&(z=a.translate(z),j[B]!==t&&z<j[B]&&(y=!0),j[B]=z+A);if(y)u++;else break}if(u>1)a.staggerLines=u}p(e,function(b){if(h===0||h===2||{1:"left",3:"right"}[h]===a.labelAlign)$=v(f[b].getLabelSize(),$)});if(a.staggerLines)$*=a.staggerLines,a.labelOffset=$}else for(q in f)f[q].destroy(),delete f[q];if(n&&n.text&&n.enabled!==!1){if(!a.axisTitle)a.axisTitle=c.text(n.text,0,0,n.useHTML).attr({zIndex:7,rotation:n.rotation|| +0,align:n.textAlign||{low:"left",middle:"center",high:"right"}[n.align]}).addClass("highcharts-"+this.coll.toLowerCase()+"-title").css(n.style).add(a.axisGroup),a.axisTitle.isNew=!0;if(b)k=a.axisTitle.getBBox()[g?"height":"width"],o=m(n.margin,g?5:10),l=n.offset;a.axisTitle[b?"show":"hide"]()}a.offset=x*m(d.offset,J[h]);a.axisTitleMargin=m(l,$+o+($&&x*d.labels[g?"y":"x"]-na));J[h]=v(J[h],a.axisTitleMargin+k+x*a.offset);L[i]=v(L[i],T(d.lineWidth/2)*2)},getLinePath:function(a){var b=this.chart,c=this.opposite, +d=this.offset,e=this.horiz,f=this.left+(c?this.width:0)+d,d=b.chartHeight-this.bottom-(c?this.height:0)+d;c&&(a*=-1);return b.renderer.crispLine(["M",e?this.left:f,e?d:this.top,"L",e?b.chartWidth-this.right:f,e?d:b.chartHeight-this.bottom],a)},getTitlePosition:function(){var a=this.horiz,b=this.left,c=this.top,d=this.len,e=this.options.title,f=a?b:c,g=this.opposite,h=this.offset,i=z(e.style.fontSize||12),d={low:f+(a?0:d),middle:f+d/2,high:f+(a?d:0)}[e.align],b=(a?c+this.height:b)+(a?1:-1)*(g?-1:1)* +this.axisTitleMargin+(this.side===2?i:0);return{x:a?d:b+(g?this.width:0)+h+(e.x||0),y:a?b-(g?this.height:0)+h:d+(e.y||0)}},render:function(){var a=this,b=a.horiz,c=a.reversed,d=a.chart,e=d.renderer,f=a.options,g=a.isLog,h=a.isLinked,i=a.tickPositions,j,k=a.axisTitle,l=a.ticks,o=a.minorTicks,n=a.alternateBands,s=f.stackLabels,m=f.alternateGridColor,J=a.tickmarkOffset,L=f.lineWidth,x=d.hasRendered&&r(a.oldMin)&&!isNaN(a.oldMin),q=a.hasData,v=a.showAxis,u,w=f.labels.overflow,y=a.justifyLabels=b&&w!== +!1,z;a.labelEdge.length=0;a.justifyToPlot=w==="justify";p([l,o,n],function(a){for(var b in a)a[b].isActive=!1});if(q||h)if(a.minorTickInterval&&!a.categories&&p(a.getMinorTickPositions(),function(b){o[b]||(o[b]=new Sa(a,b,"minor"));x&&o[b].isNew&&o[b].render(null,!0);o[b].render(null,!1,1)}),i.length&&(j=i.slice(),(b&&c||!b&&!c)&&j.reverse(),y&&(j=j.slice(1).concat([j[0]])),p(j,function(b,c){y&&(c=c===j.length-1?0:c+1);if(!h||b>=a.min&&b<=a.max)l[b]||(l[b]=new Sa(a,b)),x&&l[b].isNew&&l[b].render(c, +!0,0.1),l[b].render(c,!1,1)}),J&&a.min===0&&(l[-1]||(l[-1]=new Sa(a,-1,null,!0)),l[-1].render(-1))),m&&p(i,function(b,c){if(c%2===0&&b<a.max)n[b]||(n[b]=new R.PlotLineOrBand(a)),u=b+J,z=i[c+1]!==t?i[c+1]+J:a.max,n[b].options={from:g?ia(u):u,to:g?ia(z):z,color:m},n[b].render(),n[b].isActive=!0}),!a._addedPlotLB)p((f.plotLines||[]).concat(f.plotBands||[]),function(b){a.addPlotBandOrLine(b)}),a._addedPlotLB=!0;p([l,o,n],function(a){var b,c,e=[],f=va?va.duration||500:0,g=function(){for(c=e.length;c--;)a[e[c]]&& +!a[e[c]].isActive&&(a[e[c]].destroy(),delete a[e[c]])};for(b in a)if(!a[b].isActive)a[b].render(b,!1,0),a[b].isActive=!1,e.push(b);a===n||!d.hasRendered||!f?g():f&&setTimeout(g,f)});if(L)b=a.getLinePath(L),a.axisLine?a.axisLine.animate({d:b}):a.axisLine=e.path(b).attr({stroke:f.lineColor,"stroke-width":L,zIndex:7}).add(a.axisGroup),a.axisLine[v?"show":"hide"]();if(k&&v)k[k.isNew?"attr":"animate"](a.getTitlePosition()),k.isNew=!1;s&&s.enabled&&a.renderStackTotals();a.isDirty=!1},redraw:function(){var a= +this.chart.pointer;a&&a.reset(!0);this.render();p(this.plotLinesAndBands,function(a){a.render()});p(this.series,function(a){a.isDirty=!0})},destroy:function(a){var b=this,c=b.stacks,d,e=b.plotLinesAndBands;a||W(b);for(d in c)Oa(c[d]),c[d]=null;p([b.ticks,b.minorTicks,b.alternateBands],function(a){Oa(a)});for(a=e.length;a--;)e[a].destroy();p("stackTotalGroup,axisLine,axisTitle,axisGroup,cross,gridGroup,labelGroup".split(","),function(a){b[a]&&(b[a]=b[a].destroy())});this.cross&&this.cross.destroy()}, +drawCrosshair:function(a,b){if(this.crosshair)if((r(b)||!m(this.crosshair.snap,!0))===!1)this.hideCrosshair();else{var c,d=this.crosshair,e=d.animation;m(d.snap,!0)?r(b)&&(c=this.chart.inverted!=this.horiz?b.plotX:this.len-b.plotY):c=this.horiz?a.chartX-this.pos:this.len-a.chartY+this.pos;c=this.isRadial?this.getPlotLinePath(this.isXAxis?b.x:m(b.stackY,b.y)):this.getPlotLinePath(null,null,null,null,c);if(c===null)this.hideCrosshair();else if(this.cross)this.cross.attr({visibility:"visible"})[e?"animate": +"attr"]({d:c},e);else{e={"stroke-width":d.width||1,stroke:d.color||"#C0C0C0",zIndex:d.zIndex||2};if(d.dashStyle)e.dashstyle=d.dashStyle;this.cross=this.chart.renderer.path(c).attr(e).add()}}},hideCrosshair:function(){this.cross&&this.cross.hide()}};q(la.prototype,{getPlotBandPath:function(a,b){var c=this.getPlotLinePath(b),d=this.getPlotLinePath(a);d&&c?d.push(c[4],c[5],c[1],c[2]):d=null;return d},addPlotBand:function(a){this.addPlotBandOrLine(a,"plotBands")},addPlotLine:function(a){this.addPlotBandOrLine(a, +"plotLines")},addPlotBandOrLine:function(a,b){var c=(new R.PlotLineOrBand(this,a)).render(),d=this.userOptions;c&&(b&&(d[b]=d[b]||[],d[b].push(a)),this.plotLinesAndBands.push(c));return c},removePlotBandOrLine:function(a){for(var b=this.plotLinesAndBands,c=this.options,d=this.userOptions,e=b.length;e--;)b[e].id===a&&b[e].destroy();p([c.plotLines||[],d.plotLines||[],c.plotBands||[],d.plotBands||[]],function(b){for(e=b.length;e--;)b[e].id===a&&ja(b,b[e])})}});la.prototype.getTimeTicks=function(a,b, +c,d){var e=[],f={},g=E.global.useUTC,h,i=new Date(b-Ra),j=a.unitRange,k=a.count;if(r(b)){j>=A.second&&(i.setMilliseconds(0),i.setSeconds(j>=A.minute?0:k*T(i.getSeconds()/k)));if(j>=A.minute)i[Db](j>=A.hour?0:k*T(i[pb]()/k));if(j>=A.hour)i[Eb](j>=A.day?0:k*T(i[qb]()/k));if(j>=A.day)i[sb](j>=A.month?1:k*T(i[Xa]()/k));j>=A.month&&(i[Fb](j>=A.year?0:k*T(i[fb]()/k)),h=i[gb]());j>=A.year&&(h-=h%k,i[Gb](h));if(j===A.week)i[sb](i[Xa]()-i[rb]()+m(d,1));b=1;Ra&&(i=new Date(i.getTime()+Ra));h=i[gb]();for(var d= +i.getTime(),l=i[fb](),o=i[Xa](),n=g?Ra:(864E5+i.getTimezoneOffset()*6E4)%864E5;d<c;)e.push(d),j===A.year?d=eb(h+b*k,0):j===A.month?d=eb(h,l+b*k):!g&&(j===A.day||j===A.week)?d=eb(h,l,o+b*k*(j===A.day?1:7)):d+=j*k,b++;e.push(d);p(vb(e,function(a){return j<=A.hour&&a%A.day===n}),function(a){f[a]="day"})}e.info=q(a,{higherRanks:f,totalRange:j*k});return e};la.prototype.normalizeTimeTickInterval=function(a,b){var c=b||[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute", +[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2]],["week",[1,2]],["month",[1,2,3,4,6]],["year",null]],d=c[c.length-1],e=A[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d=c[g],e=A[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+A[c[g+1][0]])/2)break;e===A.year&&a<5*e&&(f=[1,2,5]);c=nb(a/e,f,d[0]==="year"?v(mb(a/e),1):1);return{unitRange:e,count:c,unitName:d[0]}};la.prototype.getLogTickPositions=function(a,b,c,d){var e=this.options,f=this.len,g=[];if(!d)this._minorAutoInterval=null;if(a>=0.5)a=u(a),g=this.getLinearTickPositions(a, +b,c);else if(a>=0.08)for(var f=T(b),h,i,j,k,l,e=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];f<c+1&&!l;f++){i=e.length;for(h=0;h<i&&!l;h++)j=za(ia(f)*e[h]),j>b&&(!d||k<=c)&&g.push(k),k>c&&(l=!0),k=j}else if(b=ia(b),c=ia(c),a=e[d?"minorTickInterval":"tickInterval"],a=m(a==="auto"?null:a,this._minorAutoInterval,(c-b)*(e.tickPixelInterval/(d?5:1))/((d?f/this.tickPositions.length:f)||1)),a=nb(a,null,mb(a)),g=Ua(this.getLinearTickPositions(a,b,c),za),!d)this._minorAutoInterval=a/5;if(!d)this.tickInterval= +a;return g};var Mb=R.Tooltip=function(){this.init.apply(this,arguments)};Mb.prototype={init:function(a,b){var c=b.borderWidth,d=b.style,e=z(d.padding);this.chart=a;this.options=b;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.label=a.renderer.label("",0,0,b.shape||"callout",null,null,b.useHTML,null,"tooltip").attr({padding:e,fill:b.backgroundColor,"stroke-width":c,r:b.borderRadius,zIndex:8}).css(d).css({padding:0}).add().attr({y:-9999});fa||this.label.shadow(b.shadow);this.shared=b.shared}, +destroy:function(){if(this.label)this.label=this.label.destroy();clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,b,c,d){var e=this,f=e.now,g=e.options.animation!==!1&&!e.isHidden,h=e.followPointer||e.len>1;q(f,{x:g?(2*f.x+a)/3:a,y:g?(f.y+b)/2:b,anchorX:h?t:g?(2*f.anchorX+c)/3:c,anchorY:h?t:g?(f.anchorY+d)/2:d});e.label.attr(f);if(g&&(M(a-f.x)>1||M(b-f.y)>1))clearTimeout(this.tooltipTimeout),this.tooltipTimeout=setTimeout(function(){e&&e.move(a,b,c,d)},32)},hide:function(){var a= +this,b;clearTimeout(this.hideTimer);if(!this.isHidden)b=this.chart.hoverPoints,this.hideTimer=setTimeout(function(){a.label.fadeOut();a.isHidden=!0},m(this.options.hideDelay,500)),b&&p(b,function(a){a.setState()}),this.chart.hoverPoints=null},getAnchor:function(a,b){var c,d=this.chart,e=d.inverted,f=d.plotTop,g=0,h=0,i,a=qa(a);c=a[0].tooltipPos;this.followPointer&&b&&(b.chartX===t&&(b=d.pointer.normalize(b)),c=[b.chartX-d.plotLeft,b.chartY-f]);c||(p(a,function(a){i=a.series.yAxis;g+=a.plotX;h+=(a.plotLow? +(a.plotLow+a.plotHigh)/2:a.plotY)+(!e&&i?i.top-f:0)}),g/=a.length,h/=a.length,c=[e?d.plotWidth-h:g,this.shared&&!e&&a.length>1&&b?b.chartY-f:e?d.plotHeight-g:h]);return Ua(c,u)},getPosition:function(a,b,c){var d=this.chart,e=this.distance,f={},g,h=["y",d.chartHeight,b,c.plotY+d.plotTop],i=["x",d.chartWidth,a,c.plotX+d.plotLeft],j=c.ttBelow||d.inverted&&!c.negative||!d.inverted&&c.negative,k=function(a,b,c,d){var g=c<d-e,b=d+e+c<b,c=d-e-c;d+=e;if(j&&b)f[a]=d;else if(!j&&g)f[a]=c;else if(g)f[a]=c;else if(b)f[a]= +d;else return!1},l=function(a,b,c,d){if(d<e||d>b-e)return!1;else f[a]=d<c/2?1:d>b-c/2?b-c-2:d-c/2},o=function(a){var b=h;h=i;i=b;g=a},n=function(){k.apply(0,h)!==!1?l.apply(0,i)===!1&&!g&&(o(!0),n()):g?f.x=f.y=0:(o(!0),n())};(d.inverted||this.len>1)&&o();n();return f},defaultFormatter:function(a){var b=this.points||qa(this),c=b[0].series,d;d=[a.tooltipHeaderFormatter(b[0])];p(b,function(a){c=a.series;d.push(c.tooltipFormatter&&c.tooltipFormatter(a)||a.point.tooltipFormatter(c.tooltipOptions.pointFormat))}); +d.push(a.options.footerFormat||"");return d.join("")},refresh:function(a,b){var c=this.chart,d=this.label,e=this.options,f,g,h={},i,j=[];i=e.formatter||this.defaultFormatter;var h=c.hoverPoints,k,l=this.shared;clearTimeout(this.hideTimer);this.followPointer=qa(a)[0].series.tooltipOptions.followPointer;g=this.getAnchor(a,b);f=g[0];g=g[1];l&&(!a.series||!a.series.noSharedTooltip)?(c.hoverPoints=a,h&&p(h,function(a){a.setState()}),p(a,function(a){a.setState("hover");j.push(a.getLabelConfig())}),h={x:a[0].category, +y:a[0].y},h.points=j,this.len=j.length,a=a[0]):h=a.getLabelConfig();i=i.call(h,this);h=a.series;this.distance=m(h.tooltipOptions.distance,16);i===!1?this.hide():(this.isHidden&&(bb(d),d.attr("opacity",1).show()),d.attr({text:i}),k=e.borderColor||a.color||h.color||"#606060",d.attr({stroke:k}),this.updatePosition({plotX:f,plotY:g,negative:a.negative,ttBelow:a.ttBelow}),this.isHidden=!1);D(c,"tooltipRefresh",{text:i,x:f+c.plotLeft,y:g+c.plotTop,borderColor:k})},updatePosition:function(a){var b=this.chart, +c=this.label,c=(this.options.positioner||this.getPosition).call(this,c.width,c.height,a);this.move(u(c.x),u(c.y),a.plotX+b.plotLeft,a.plotY+b.plotTop)},tooltipHeaderFormatter:function(a){var b=a.series,c=b.tooltipOptions,d=c.dateTimeLabelFormats,e=c.xDateFormat,f=b.xAxis,g=f&&f.options.type==="datetime"&&ha(a.key),c=c.headerFormat,f=f&&f.closestPointRange,h;if(g&&!e){if(f)for(h in A){if(A[h]>=f||A[h]<=A.day&&a.key%A[h]>0){e=d[h];break}}else e=d.day;e=e||d.year}g&&e&&(c=c.replace("{point.key}","{point.key:"+ +e+"}"));return Ia(c,{point:a,series:b})}};var oa;$a=y.documentElement.ontouchstart!==t;var Wa=R.Pointer=function(a,b){this.init(a,b)};Wa.prototype={init:function(a,b){var c=b.chart,d=c.events,e=fa?"":c.zoomType,c=a.inverted,f;this.options=b;this.chart=a;this.zoomX=f=/x/.test(e);this.zoomY=e=/y/.test(e);this.zoomHor=f&&!c||e&&c;this.zoomVert=e&&!c||f&&c;this.hasZoom=f||e;this.runChartClick=d&&!!d.click;this.pinchDown=[];this.lastValidTouch={};if(R.Tooltip&&b.tooltip.enabled)a.tooltip=new Mb(a,b.tooltip), +this.followTouchMove=b.tooltip.followTouchMove;this.setDOMEvents()},normalize:function(a,b){var c,d,a=a||window.event,a=Sb(a);if(!a.target)a.target=a.srcElement;d=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;if(!b)this.chartPosition=b=Rb(this.chart.container);d.pageX===t?(c=v(a.x,a.clientX-b.left),d=a.y):(c=d.pageX-b.left,d=d.pageY-b.top);return q(a,{chartX:u(c),chartY:u(d)})},getCoordinates:function(a){var b={xAxis:[],yAxis:[]};p(this.chart.axes,function(c){b[c.isXAxis?"xAxis": +"yAxis"].push({axis:c,value:c.toValue(a[c.horiz?"chartX":"chartY"])})});return b},getIndex:function(a){var b=this.chart;return b.inverted?b.plotHeight+b.plotTop-a.chartY:a.chartX-b.plotLeft},runPointActions:function(a){var b=this.chart,c=b.series,d=b.tooltip,e,f,g=b.hoverPoint,h=b.hoverSeries,i,j,k=b.chartWidth,l=this.getIndex(a);if(d&&this.options.tooltip.shared&&(!h||!h.noSharedTooltip)){f=[];i=c.length;for(j=0;j<i;j++)if(c[j].visible&&c[j].options.enableMouseTracking!==!1&&!c[j].noSharedTooltip&& +c[j].singularTooltips!==!0&&c[j].tooltipPoints.length&&(e=c[j].tooltipPoints[l])&&e.series)e._dist=M(l-e.clientX),k=C(k,e._dist),f.push(e);for(i=f.length;i--;)f[i]._dist>k&&f.splice(i,1);if(f.length&&f[0].clientX!==this.hoverX)d.refresh(f,a),this.hoverX=f[0].clientX}c=h&&h.tooltipOptions.followPointer;if(h&&h.tracker&&!c){if((e=h.tooltipPoints[l])&&e!==g)e.onMouseOver(a)}else d&&c&&!d.isHidden&&(h=d.getAnchor([{}],a),d.updatePosition({plotX:h[0],plotY:h[1]}));if(d&&!this._onDocumentMouseMove)this._onDocumentMouseMove= +function(a){if(V[oa])V[oa].pointer.onDocumentMouseMove(a)},K(y,"mousemove",this._onDocumentMouseMove);p(b.axes,function(b){b.drawCrosshair(a,m(e,g))})},reset:function(a){var b=this.chart,c=b.hoverSeries,d=b.hoverPoint,e=b.tooltip,f=e&&e.shared?b.hoverPoints:d;(a=a&&e&&f)&&qa(f)[0].plotX===t&&(a=!1);if(a)e.refresh(f),d&&d.setState(d.state,!0);else{if(d)d.onMouseOut();if(c)c.onMouseOut();e&&e.hide();if(this._onDocumentMouseMove)W(y,"mousemove",this._onDocumentMouseMove),this._onDocumentMouseMove=null; +p(b.axes,function(a){a.hideCrosshair()});this.hoverX=null}},scaleGroups:function(a,b){var c=this.chart,d;p(c.series,function(e){d=a||e.getPlotBox();e.xAxis&&e.xAxis.zoomEnabled&&(e.group.attr(d),e.markerGroup&&(e.markerGroup.attr(d),e.markerGroup.clip(b?c.clipRect:null)),e.dataLabelsGroup&&e.dataLabelsGroup.attr(d))});c.clipRect.attr(b||c.clipBox)},dragStart:function(a){var b=this.chart;b.mouseIsDown=a.type;b.cancelClick=!1;b.mouseDownX=this.mouseDownX=a.chartX;b.mouseDownY=this.mouseDownY=a.chartY}, +drag:function(a){var b=this.chart,c=b.options.chart,d=a.chartX,e=a.chartY,f=this.zoomHor,g=this.zoomVert,h=b.plotLeft,i=b.plotTop,j=b.plotWidth,k=b.plotHeight,l,o=this.mouseDownX,n=this.mouseDownY;d<h?d=h:d>h+j&&(d=h+j);e<i?e=i:e>i+k&&(e=i+k);this.hasDragged=Math.sqrt(Math.pow(o-d,2)+Math.pow(n-e,2));if(this.hasDragged>10){l=b.isInsidePlot(o-h,n-i);if(b.hasCartesianSeries&&(this.zoomX||this.zoomY)&&l&&!this.selectionMarker)this.selectionMarker=b.renderer.rect(h,i,f?1:j,g?1:k,0).attr({fill:c.selectionMarkerFill|| +"rgba(69,114,167,0.25)",zIndex:7}).add();this.selectionMarker&&f&&(d-=o,this.selectionMarker.attr({width:M(d),x:(d>0?0:d)+o}));this.selectionMarker&&g&&(d=e-n,this.selectionMarker.attr({height:M(d),y:(d>0?0:d)+n}));l&&!this.selectionMarker&&c.panning&&b.pan(a,c.panning)}},drop:function(a){var b=this.chart,c=this.hasPinched;if(this.selectionMarker){var d={xAxis:[],yAxis:[],originalEvent:a.originalEvent||a},a=this.selectionMarker,e=a.attr?a.attr("x"):a.x,f=a.attr?a.attr("y"):a.y,g=a.attr?a.attr("width"): +a.width,h=a.attr?a.attr("height"):a.height,i;if(this.hasDragged||c)p(b.axes,function(a){if(a.zoomEnabled){var b=a.horiz,c=a.toValue(b?e:f),b=a.toValue(b?e+g:f+h);!isNaN(c)&&!isNaN(b)&&(d[a.coll].push({axis:a,min:C(c,b),max:v(c,b)}),i=!0)}}),i&&D(b,"selection",d,function(a){b.zoom(q(a,c?{animation:!1}:null))});this.selectionMarker=this.selectionMarker.destroy();c&&this.scaleGroups()}if(b)G(b.container,{cursor:b._cursor}),b.cancelClick=this.hasDragged>10,b.mouseIsDown=this.hasDragged=this.hasPinched= +!1,this.pinchDown=[]},onContainerMouseDown:function(a){a=this.normalize(a);a.preventDefault&&a.preventDefault();this.dragStart(a)},onDocumentMouseUp:function(a){V[oa]&&V[oa].pointer.drop(a)},onDocumentMouseMove:function(a){var b=this.chart,c=this.chartPosition,d=b.hoverSeries,a=this.normalize(a,c);c&&d&&!this.inClass(a.target,"highcharts-tracker")&&!b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)&&this.reset()},onContainerMouseLeave:function(){var a=V[oa];if(a)a.pointer.reset(),a.pointer.chartPosition= +null},onContainerMouseMove:function(a){var b=this.chart;oa=b.index;a=this.normalize(a);b.mouseIsDown==="mousedown"&&this.drag(a);(this.inClass(a.target,"highcharts-tracker")||b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop))&&!b.openMenu&&this.runPointActions(a)},inClass:function(a,b){for(var c;a;){if(c=H(a,"class"))if(c.indexOf(b)!==-1)return!0;else if(c.indexOf("highcharts-container")!==-1)return!1;a=a.parentNode}},onTrackerMouseOut:function(a){var b=this.chart.hoverSeries,c=(a=a.relatedTarget|| +a.toElement)&&a.point&&a.point.series;if(b&&!b.options.stickyTracking&&!this.inClass(a,"highcharts-tooltip")&&c!==b)b.onMouseOut()},onContainerClick:function(a){var b=this.chart,c=b.hoverPoint,d=b.plotLeft,e=b.plotTop,a=this.normalize(a);a.cancelBubble=!0;b.cancelClick||(c&&this.inClass(a.target,"highcharts-tracker")?(D(c.series,"click",q(a,{point:c})),b.hoverPoint&&c.firePointEvent("click",a)):(q(a,this.getCoordinates(a)),b.isInsidePlot(a.chartX-d,a.chartY-e)&&D(b,"click",a)))},setDOMEvents:function(){var a= +this,b=a.chart.container;b.onmousedown=function(b){a.onContainerMouseDown(b)};b.onmousemove=function(b){a.onContainerMouseMove(b)};b.onclick=function(b){a.onContainerClick(b)};K(b,"mouseleave",a.onContainerMouseLeave);ab===1&&K(y,"mouseup",a.onDocumentMouseUp);if($a)b.ontouchstart=function(b){a.onContainerTouchStart(b)},b.ontouchmove=function(b){a.onContainerTouchMove(b)},ab===1&&K(y,"touchend",a.onDocumentTouchEnd)},destroy:function(){var a;W(this.chart.container,"mouseleave",this.onContainerMouseLeave); +ab||(W(y,"mouseup",this.onDocumentMouseUp),W(y,"touchend",this.onDocumentTouchEnd));clearInterval(this.tooltipTimeout);for(a in this)this[a]=null}};q(R.Pointer.prototype,{pinchTranslate:function(a,b,c,d,e,f){(this.zoomHor||this.pinchHor)&&this.pinchTranslateDirection(!0,a,b,c,d,e,f);(this.zoomVert||this.pinchVert)&&this.pinchTranslateDirection(!1,a,b,c,d,e,f)},pinchTranslateDirection:function(a,b,c,d,e,f,g,h){var i=this.chart,j=a?"x":"y",k=a?"X":"Y",l="chart"+k,o=a?"width":"height",n=i["plot"+(a? +"Left":"Top")],s,m,p=h||1,q=i.inverted,x=i.bounds[a?"h":"v"],r=b.length===1,v=b[0][l],u=c[0][l],t=!r&&b[1][l],w=!r&&c[1][l],y,c=function(){!r&&M(v-t)>20&&(p=h||M(u-w)/M(v-t));m=(n-u)/p+v;s=i["plot"+(a?"Width":"Height")]/p};c();b=m;b<x.min?(b=x.min,y=!0):b+s>x.max&&(b=x.max-s,y=!0);y?(u-=0.8*(u-g[j][0]),r||(w-=0.8*(w-g[j][1])),c()):g[j]=[u,w];q||(f[j]=m-n,f[o]=s);f=q?1/p:p;e[o]=s;e[j]=b;d[q?a?"scaleY":"scaleX":"scale"+k]=p;d["translate"+k]=f*n+(u-f*v)},pinch:function(a){var b=this,c=b.chart,d=b.pinchDown, +e=b.followTouchMove,f=a.touches,g=f.length,h=b.lastValidTouch,i=b.hasZoom,j=b.selectionMarker,k={},l=g===1&&(b.inClass(a.target,"highcharts-tracker")&&c.runTrackerClick||c.runChartClick),o={};(i||e)&&!l&&a.preventDefault();Ua(f,function(a){return b.normalize(a)});if(a.type==="touchstart")p(f,function(a,b){d[b]={chartX:a.chartX,chartY:a.chartY}}),h.x=[d[0].chartX,d[1]&&d[1].chartX],h.y=[d[0].chartY,d[1]&&d[1].chartY],p(c.axes,function(a){if(a.zoomEnabled){var b=c.bounds[a.horiz?"h":"v"],d=a.minPixelPadding, +e=a.toPixels(a.dataMin),f=a.toPixels(a.dataMax),g=C(e,f),e=v(e,f);b.min=C(a.pos,g-d);b.max=v(a.pos+a.len,e+d)}});else if(d.length){if(!j)b.selectionMarker=j=q({destroy:sa},c.plotBox);b.pinchTranslate(d,f,k,j,o,h);b.hasPinched=i;b.scaleGroups(k,o);!i&&e&&g===1&&this.runPointActions(b.normalize(a))}},onContainerTouchStart:function(a){var b=this.chart;oa=b.index;a.touches.length===1?(a=this.normalize(a),b.isInsidePlot(a.chartX-b.plotLeft,a.chartY-b.plotTop)?(this.runPointActions(a),this.pinch(a)):this.reset()): +a.touches.length===2&&this.pinch(a)},onContainerTouchMove:function(a){(a.touches.length===1||a.touches.length===2)&&this.pinch(a)},onDocumentTouchEnd:function(a){V[oa]&&V[oa].pointer.drop(a)}});if(I.PointerEvent||I.MSPointerEvent){var ua={},zb=!!I.PointerEvent,Wb=function(){var a,b=[];b.item=function(a){return this[a]};for(a in ua)ua.hasOwnProperty(a)&&b.push({pageX:ua[a].pageX,pageY:ua[a].pageY,target:ua[a].target});return b},Ab=function(a,b,c,d){a=a.originalEvent||a;if((a.pointerType==="touch"|| +a.pointerType===a.MSPOINTER_TYPE_TOUCH)&&V[oa])d(a),d=V[oa].pointer,d[b]({type:c,target:a.currentTarget,preventDefault:sa,touches:Wb()})};q(Wa.prototype,{onContainerPointerDown:function(a){Ab(a,"onContainerTouchStart","touchstart",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY,target:a.currentTarget}})},onContainerPointerMove:function(a){Ab(a,"onContainerTouchMove","touchmove",function(a){ua[a.pointerId]={pageX:a.pageX,pageY:a.pageY};if(!ua[a.pointerId].target)ua[a.pointerId].target=a.currentTarget})}, +onDocumentPointerUp:function(a){Ab(a,"onContainerTouchEnd","touchend",function(a){delete ua[a.pointerId]})},batchMSEvents:function(a){a(this.chart.container,zb?"pointerdown":"MSPointerDown",this.onContainerPointerDown);a(this.chart.container,zb?"pointermove":"MSPointerMove",this.onContainerPointerMove);a(y,zb?"pointerup":"MSPointerUp",this.onDocumentPointerUp)}});Ma(Wa.prototype,"init",function(a,b,c){a.call(this,b,c);(this.hasZoom||this.followTouchMove)&&G(b.container,{"-ms-touch-action":Q,"touch-action":Q})}); +Ma(Wa.prototype,"setDOMEvents",function(a){a.apply(this);(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(K)});Ma(Wa.prototype,"destroy",function(a){this.batchMSEvents(W);a.call(this)})}var lb=R.Legend=function(a,b){this.init(a,b)};lb.prototype={init:function(a,b){var c=this,d=b.itemStyle,e=m(b.padding,8),f=b.itemMarginTop||0;this.options=b;if(b.enabled)c.baseline=z(d.fontSize)+3+f,c.itemStyle=d,c.itemHiddenStyle=w(d,b.itemHiddenStyle),c.itemMarginTop=f,c.padding=e,c.initialItemX=e,c.initialItemY= +e-5,c.maxItemWidth=0,c.chart=a,c.itemHeight=0,c.lastLineHeight=0,c.symbolWidth=m(b.symbolWidth,16),c.pages=[],c.render(),K(c.chart,"endResize",function(){c.positionCheckboxes()})},colorizeItem:function(a,b){var c=this.options,d=a.legendItem,e=a.legendLine,f=a.legendSymbol,g=this.itemHiddenStyle.color,c=b?c.itemStyle.color:g,h=b?a.legendColor||a.color||"#CCC":g,g=a.options&&a.options.marker,i={fill:h},j;d&&d.css({fill:c,color:c});e&&e.attr({stroke:h});if(f){if(g&&f.isMarker)for(j in i.stroke=h,g=a.convertAttribs(g), +g)d=g[j],d!==t&&(i[j]=d);f.attr(i)}},positionItem:function(a){var b=this.options,c=b.symbolPadding,b=!b.rtl,d=a._legendItemPos,e=d[0],d=d[1],f=a.checkbox;a.legendGroup&&a.legendGroup.translate(b?e:this.legendWidth-e-2*c-4,d);if(f)f.x=e,f.y=d},destroyItem:function(a){var b=a.checkbox;p(["legendItem","legendLine","legendSymbol","legendGroup"],function(b){a[b]&&(a[b]=a[b].destroy())});b&&Pa(a.checkbox)},destroy:function(){var a=this.group,b=this.box;if(b)this.box=b.destroy();if(a)this.group=a.destroy()}, +positionCheckboxes:function(a){var b=this.group.alignAttr,c,d=this.clipHeight||this.legendHeight;if(b)c=b.translateY,p(this.allItems,function(e){var f=e.checkbox,g;f&&(g=c+f.y+(a||0)+3,G(f,{left:b.translateX+e.checkboxOffset+f.x-20+"px",top:g+"px",display:g>c-6&&g<c+d-6?"":Q}))})},renderTitle:function(){var a=this.padding,b=this.options.title,c=0;if(b.text){if(!this.title)this.title=this.chart.renderer.label(b.text,a-3,a-4,null,null,null,null,null,"legend-title").attr({zIndex:1}).css(b.style).add(this.group); +a=this.title.getBBox();c=a.height;this.offsetWidth=a.width;this.contentGroup.attr({translateY:c})}this.titleHeight=c},renderItem:function(a){var b=this.chart,c=b.renderer,d=this.options,e=d.layout==="horizontal",f=this.symbolWidth,g=d.symbolPadding,h=this.itemStyle,i=this.itemHiddenStyle,j=this.padding,k=e?m(d.itemDistance,20):0,l=!d.rtl,o=d.width,n=d.itemMarginBottom||0,s=this.itemMarginTop,p=this.initialItemX,q=a.legendItem,r=a.series&&a.series.drawLegendSymbol?a.series:a,x=r.options,x=this.createCheckboxForItem&& +x&&x.showCheckbox,t=d.useHTML;if(!q)a.legendGroup=c.g("legend-item").attr({zIndex:1}).add(this.scrollGroup),r.drawLegendSymbol(this,a),a.legendItem=q=c.text(d.labelFormat?Ia(d.labelFormat,a):d.labelFormatter.call(a),l?f+g:-g,this.baseline,t).css(w(a.visible?h:i)).attr({align:l?"left":"right",zIndex:2}).add(a.legendGroup),this.setItemEvents&&this.setItemEvents(a,q,t,h,i),this.colorizeItem(a,a.visible),x&&this.createCheckboxForItem(a);c=q.getBBox();f=a.checkboxOffset=d.itemWidth||a.legendItemWidth|| +f+g+c.width+k+(x?20:0);this.itemHeight=g=u(a.legendItemHeight||c.height);if(e&&this.itemX-p+f>(o||b.chartWidth-2*j-p-d.x))this.itemX=p,this.itemY+=s+this.lastLineHeight+n,this.lastLineHeight=0;this.maxItemWidth=v(this.maxItemWidth,f);this.lastItemY=s+this.itemY+n;this.lastLineHeight=v(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];e?this.itemX+=f:(this.itemY+=s+g+n,this.lastLineHeight=g);this.offsetWidth=o||v((e?this.itemX-p-k:f)+j,this.offsetWidth)},getAllItems:function(){var a= +[];p(this.chart.series,function(b){var c=b.options;if(m(c.showInLegend,!r(c.linkedTo)?t:!1,!0))a=a.concat(b.legendItems||(c.legendType==="point"?b.data:b))});return a},render:function(){var a=this,b=a.chart,c=b.renderer,d=a.group,e,f,g,h,i=a.box,j=a.options,k=a.padding,l=j.borderWidth,o=j.backgroundColor;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;if(!d)a.group=d=c.g("legend").attr({zIndex:7}).add(),a.contentGroup=c.g().attr({zIndex:1}).add(d),a.scrollGroup=c.g().add(a.contentGroup); +a.renderTitle();e=a.getAllItems();ob(e,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});j.reversed&&e.reverse();a.allItems=e;a.display=f=!!e.length;p(e,function(b){a.renderItem(b)});g=j.width||a.offsetWidth;h=a.lastItemY+a.lastLineHeight+a.titleHeight;h=a.handleOverflow(h);if(l||o){g+=k;h+=k;if(i){if(g>0&&h>0)i[i.isNew?"attr":"animate"](i.crisp({width:g,height:h})),i.isNew=!1}else a.box=i=c.rect(0,0,g,h,j.borderRadius,l||0).attr({stroke:j.borderColor, +"stroke-width":l||0,fill:o||Q}).add(d).shadow(j.shadow),i.isNew=!0;i[f?"show":"hide"]()}a.legendWidth=g;a.legendHeight=h;p(e,function(b){a.positionItem(b)});f&&d.align(q({width:g,height:h},j),!0,"spacingBox");b.isResizing||this.positionCheckboxes()},handleOverflow:function(a){var b=this,c=this.chart,d=c.renderer,e=this.options,f=e.y,f=c.spacingBox.height+(e.verticalAlign==="top"?-f:f)-this.padding,g=e.maxHeight,h,i=this.clipRect,j=e.navigation,k=m(j.animation,!0),l=j.arrowSize||12,o=this.nav,n=this.pages, +s,q=this.allItems;e.layout==="horizontal"&&(f/=2);g&&(f=C(f,g));n.length=0;if(a>f&&!e.useHTML){this.clipHeight=h=f-20-this.titleHeight-this.padding;this.currentPage=m(this.currentPage,1);this.fullHeight=a;p(q,function(a,b){var c=a._legendItemPos[1],d=u(a.legendItem.getBBox().height),e=n.length;if(!e||c-n[e-1]>h&&(s||c)!==n[e-1])n.push(s||c),e++;b===q.length-1&&c+d-n[e-1]>h&&n.push(c);c!==s&&(s=c)});if(!i)i=b.clipRect=d.clipRect(0,this.padding,9999,0),b.contentGroup.clip(i);i.attr({height:h});if(!o)this.nav= +o=d.g().attr({zIndex:1}).add(this.group),this.up=d.symbol("triangle",0,0,l,l).on("click",function(){b.scroll(-1,k)}).add(o),this.pager=d.text("",15,10).css(j.style).add(o),this.down=d.symbol("triangle-down",0,0,l,l).on("click",function(){b.scroll(1,k)}).add(o);b.scroll(0);a=f}else if(o)i.attr({height:c.chartHeight}),o.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0;return a},scroll:function(a,b){var c=this.pages,d=c.length,e=this.currentPage+a,f=this.clipHeight,g=this.options.navigation, +h=g.activeColor,g=g.inactiveColor,i=this.pager,j=this.padding;e>d&&(e=d);if(e>0)b!==t&&Qa(b,this.chart),this.nav.attr({translateX:j,translateY:f+this.padding+7+this.titleHeight,visibility:"visible"}),this.up.attr({fill:e===1?g:h}).css({cursor:e===1?"default":"pointer"}),i.attr({text:e+"/"+d}),this.down.attr({x:18+this.pager.getBBox().width,fill:e===d?g:h}).css({cursor:e===d?"default":"pointer"}),c=-c[e-1]+this.initialItemY,this.scrollGroup.animate({translateY:c}),this.currentPage=e,this.positionCheckboxes(c)}}; +N=R.LegendSymbolMixin={drawRectangle:function(a,b){var c=a.options.symbolHeight||12;b.legendSymbol=this.chart.renderer.rect(0,a.baseline-5-c/2,a.symbolWidth,c,a.options.symbolRadius||0).attr({zIndex:3}).add(b.legendGroup)},drawLineMarker:function(a){var b=this.options,c=b.marker,d;d=a.symbolWidth;var e=this.chart.renderer,f=this.legendGroup,a=a.baseline-u(e.fontMetrics(a.options.itemStyle.fontSize).b*0.3),g;if(b.lineWidth){g={"stroke-width":b.lineWidth};if(b.dashStyle)g.dashstyle=b.dashStyle;this.legendLine= +e.path(["M",0,a,"L",d,a]).attr(g).add(f)}if(c&&c.enabled!==!1)b=c.radius,this.legendSymbol=d=e.symbol(this.symbol,d/2-b,a-b,2*b,2*b).add(f),d.isMarker=!0}};(/Trident\/7\.0/.test(wa)||Ta)&&Ma(lb.prototype,"positionItem",function(a,b){var c=this,d=function(){b._legendItemPos&&a.call(c,b)};d();setTimeout(d)});Ya.prototype={init:function(a,b){var c,d=a.series;a.series=null;c=w(E,a);c.series=a.series=d;this.userOptions=a;d=c.chart;this.margin=this.splashArray("margin",d);this.spacing=this.splashArray("spacing", +d);var e=d.events;this.bounds={h:{},v:{}};this.callback=b;this.isResizing=0;this.options=c;this.axes=[];this.series=[];this.hasCartesianSeries=d.showAxes;var f=this,g;f.index=V.length;V.push(f);ab++;d.reflow!==!1&&K(f,"load",function(){f.initReflow()});if(e)for(g in e)K(f,g,e[g]);f.xAxis=[];f.yAxis=[];f.animation=fa?!1:m(d.animation,!0);f.pointCount=0;f.counters=new Bb;f.firstRender()},initSeries:function(a){var b=this.options.chart;(b=F[a.type||b.type||b.defaultSeriesType])||ra(17,!0);b=new b;b.init(this, +a);return b},isInsidePlot:function(a,b,c){var d=c?b:a,a=c?a:b;return d>=0&&d<=this.plotWidth&&a>=0&&a<=this.plotHeight},adjustTickAmounts:function(){this.options.chart.alignTicks!==!1&&p(this.axes,function(a){a.adjustTickAmount()});this.maxTicks=null},redraw:function(a){var b=this.axes,c=this.series,d=this.pointer,e=this.legend,f=this.isDirtyLegend,g,h,i=this.isDirtyBox,j=c.length,k=j,l=this.renderer,o=l.isHidden(),n=[];Qa(a,this);o&&this.cloneRenderTo();for(this.layOutTitles();k--;)if(a=c[k],a.options.stacking&& +(g=!0,a.isDirty)){h=!0;break}if(h)for(k=j;k--;)if(a=c[k],a.options.stacking)a.isDirty=!0;p(c,function(a){a.isDirty&&a.options.legendType==="point"&&(f=!0)});if(f&&e.options.enabled)e.render(),this.isDirtyLegend=!1;g&&this.getStacks();if(this.hasCartesianSeries){if(!this.isResizing)this.maxTicks=null,p(b,function(a){a.setScale()});this.adjustTickAmounts();this.getMargins();p(b,function(a){a.isDirty&&(i=!0)});p(b,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes=!1,n.push(function(){D(a,"afterSetExtremes", +q(a.eventArgs,a.getExtremes()));delete a.eventArgs});(i||g)&&a.redraw()})}i&&this.drawChartBox();p(c,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});d&&d.reset(!0);l.draw();D(this,"redraw");o&&this.cloneRenderTo(!0);p(n,function(a){a.call()})},get:function(a){var b=this.axes,c=this.series,d,e;for(d=0;d<b.length;d++)if(b[d].options.id===a)return b[d];for(d=0;d<c.length;d++)if(c[d].options.id===a)return c[d];for(d=0;d<c.length;d++){e=c[d].points||[];for(b=0;b<e.length;b++)if(e[b].id=== +a)return e[b]}return null},getAxes:function(){var a=this,b=this.options,c=b.xAxis=qa(b.xAxis||{}),b=b.yAxis=qa(b.yAxis||{});p(c,function(a,b){a.index=b;a.isX=!0});p(b,function(a,b){a.index=b});c=c.concat(b);p(c,function(b){new la(a,b)});a.adjustTickAmounts()},getSelectedPoints:function(){var a=[];p(this.series,function(b){a=a.concat(vb(b.points||[],function(a){return a.selected}))});return a},getSelectedSeries:function(){return vb(this.series,function(a){return a.selected})},getStacks:function(){var a= +this;p(a.yAxis,function(a){if(a.stacks&&a.hasVisibleSeries)a.oldStacks=a.stacks});p(a.series,function(b){if(b.options.stacking&&(b.visible===!0||a.options.chart.ignoreHiddenSeries===!1))b.stackKey=b.type+m(b.options.stack,"")})},setTitle:function(a,b,c){var g;var d=this,e=d.options,f;f=e.title=w(e.title,a);g=e.subtitle=w(e.subtitle,b),e=g;p([["title",a,f],["subtitle",b,e]],function(a){var b=a[0],c=d[b],e=a[1],a=a[2];c&&e&&(d[b]=c=c.destroy());a&&a.text&&!c&&(d[b]=d.renderer.text(a.text,0,0,a.useHTML).attr({align:a.align, +"class":"highcharts-"+b,zIndex:a.zIndex||4}).css(a.style).add())});d.layOutTitles(c)},layOutTitles:function(a){var b=0,c=this.title,d=this.subtitle,e=this.options,f=e.title,e=e.subtitle,g=this.spacingBox.width-44;if(c&&(c.css({width:(f.width||g)+"px"}).align(q({y:15},f),!1,"spacingBox"),!f.floating&&!f.verticalAlign))b=c.getBBox().height;d&&(d.css({width:(e.width||g)+"px"}).align(q({y:b+f.margin},e),!1,"spacingBox"),!e.floating&&!e.verticalAlign&&(b=Ka(b+d.getBBox().height)));c=this.titleOffset!== +b;this.titleOffset=b;if(!this.isDirtyBox&&c)this.isDirtyBox=c,this.hasRendered&&m(a,!0)&&this.isDirtyBox&&this.redraw()},getChartSize:function(){var a=this.options.chart,b=a.width,a=a.height,c=this.renderToClone||this.renderTo;if(!r(b))this.containerWidth=jb(c,"width");if(!r(a))this.containerHeight=jb(c,"height");this.chartWidth=v(0,b||this.containerWidth||600);this.chartHeight=v(0,m(a,this.containerHeight>19?this.containerHeight:400))},cloneRenderTo:function(a){var b=this.renderToClone,c=this.container; +a?b&&(this.renderTo.appendChild(c),Pa(b),delete this.renderToClone):(c&&c.parentNode===this.renderTo&&this.renderTo.removeChild(c),this.renderToClone=b=this.renderTo.cloneNode(0),G(b,{position:"absolute",top:"-9999px",display:"block"}),b.style.setProperty&&b.style.setProperty("display","block","important"),y.body.appendChild(b),c&&b.appendChild(c))},getContainer:function(){var a,b=this.options.chart,c,d,e;this.renderTo=a=b.renderTo;e="highcharts-"+tb++;if(Fa(a))this.renderTo=a=y.getElementById(a); +a||ra(13,!0);c=z(H(a,"data-highcharts-chart"));!isNaN(c)&&V[c]&&V[c].hasRendered&&V[c].destroy();H(a,"data-highcharts-chart",this.index);a.innerHTML="";!b.skipClone&&!a.offsetWidth&&this.cloneRenderTo();this.getChartSize();c=this.chartWidth;d=this.chartHeight;this.container=a=Y(Ja,{className:"highcharts-container"+(b.className?" "+b.className:""),id:e},q({position:"relative",overflow:"hidden",width:c+"px",height:d+"px",textAlign:"left",lineHeight:"normal",zIndex:0,"-webkit-tap-highlight-color":"rgba(0,0,0,0)"}, +b.style),this.renderToClone||a);this._cursor=a.style.cursor;this.renderer=b.forExport?new ta(a,c,d,b.style,!0):new Za(a,c,d,b.style);fa&&this.renderer.create(this,a,c,d)},getMargins:function(){var a=this.spacing,b,c=this.legend,d=this.margin,e=this.options.legend,f=m(e.margin,20),g=e.x,h=e.y,i=e.align,j=e.verticalAlign,k=this.titleOffset;this.resetMargins();b=this.axisOffset;if(k&&!r(d[0]))this.plotTop=v(this.plotTop,k+this.options.title.margin+a[0]);if(c.display&&!e.floating)if(i==="right"){if(!r(d[1]))this.marginRight= +v(this.marginRight,c.legendWidth-g+f+a[1])}else if(i==="left"){if(!r(d[3]))this.plotLeft=v(this.plotLeft,c.legendWidth+g+f+a[3])}else if(j==="top"){if(!r(d[0]))this.plotTop=v(this.plotTop,c.legendHeight+h+f+a[0])}else if(j==="bottom"&&!r(d[2]))this.marginBottom=v(this.marginBottom,c.legendHeight-h+f+a[2]);this.extraBottomMargin&&(this.marginBottom+=this.extraBottomMargin);this.extraTopMargin&&(this.plotTop+=this.extraTopMargin);this.hasCartesianSeries&&p(this.axes,function(a){a.getOffset()});r(d[3])|| +(this.plotLeft+=b[3]);r(d[0])||(this.plotTop+=b[0]);r(d[2])||(this.marginBottom+=b[2]);r(d[1])||(this.marginRight+=b[1]);this.setChartSize()},reflow:function(a){var b=this,c=b.options.chart,d=b.renderTo,e=c.width||jb(d,"width"),f=c.height||jb(d,"height"),c=a?a.target:I,d=function(){if(b.container)b.setSize(e,f,!1),b.hasUserSize=null};if(!b.hasUserSize&&e&&f&&(c===I||c===y)){if(e!==b.containerWidth||f!==b.containerHeight)clearTimeout(b.reflowTimeout),a?b.reflowTimeout=setTimeout(d,100):d();b.containerWidth= +e;b.containerHeight=f}},initReflow:function(){var a=this,b=function(b){a.reflow(b)};K(I,"resize",b);K(a,"destroy",function(){W(I,"resize",b)})},setSize:function(a,b,c){var d=this,e,f,g;d.isResizing+=1;g=function(){d&&D(d,"endResize",null,function(){d.isResizing-=1})};Qa(c,d);d.oldChartHeight=d.chartHeight;d.oldChartWidth=d.chartWidth;if(r(a))d.chartWidth=e=v(0,u(a)),d.hasUserSize=!!e;if(r(b))d.chartHeight=f=v(0,u(b));(va?kb:G)(d.container,{width:e+"px",height:f+"px"},va);d.setChartSize(!0);d.renderer.setSize(e, +f,c);d.maxTicks=null;p(d.axes,function(a){a.isDirty=!0;a.setScale()});p(d.series,function(a){a.isDirty=!0});d.isDirtyLegend=!0;d.isDirtyBox=!0;d.layOutTitles();d.getMargins();d.redraw(c);d.oldChartHeight=null;D(d,"resize");va===!1?g():setTimeout(g,va&&va.duration||500)},setChartSize:function(a){var b=this.inverted,c=this.renderer,d=this.chartWidth,e=this.chartHeight,f=this.options.chart,g=this.spacing,h=this.clipOffset,i,j,k,l;this.plotLeft=i=u(this.plotLeft);this.plotTop=j=u(this.plotTop);this.plotWidth= +k=v(0,u(d-i-this.marginRight));this.plotHeight=l=v(0,u(e-j-this.marginBottom));this.plotSizeX=b?l:k;this.plotSizeY=b?k:l;this.plotBorderWidth=f.plotBorderWidth||0;this.spacingBox=c.spacingBox={x:g[3],y:g[0],width:d-g[3]-g[1],height:e-g[0]-g[2]};this.plotBox=c.plotBox={x:i,y:j,width:k,height:l};d=2*T(this.plotBorderWidth/2);b=Ka(v(d,h[3])/2);c=Ka(v(d,h[0])/2);this.clipBox={x:b,y:c,width:T(this.plotSizeX-v(d,h[1])/2-b),height:T(this.plotSizeY-v(d,h[2])/2-c)};a||p(this.axes,function(a){a.setAxisSize(); +a.setAxisTranslation()})},resetMargins:function(){var a=this.spacing,b=this.margin;this.plotTop=m(b[0],a[0]);this.marginRight=m(b[1],a[1]);this.marginBottom=m(b[2],a[2]);this.plotLeft=m(b[3],a[3]);this.axisOffset=[0,0,0,0];this.clipOffset=[0,0,0,0]},drawChartBox:function(){var a=this.options.chart,b=this.renderer,c=this.chartWidth,d=this.chartHeight,e=this.chartBackground,f=this.plotBackground,g=this.plotBorder,h=this.plotBGImage,i=a.borderWidth||0,j=a.backgroundColor,k=a.plotBackgroundColor,l=a.plotBackgroundImage, +o=a.plotBorderWidth||0,n,s=this.plotLeft,m=this.plotTop,p=this.plotWidth,q=this.plotHeight,r=this.plotBox,v=this.clipRect,u=this.clipBox;n=i+(a.shadow?8:0);if(i||j)if(e)e.animate(e.crisp({width:c-n,height:d-n}));else{e={fill:j||Q};if(i)e.stroke=a.borderColor,e["stroke-width"]=i;this.chartBackground=b.rect(n/2,n/2,c-n,d-n,a.borderRadius,i).attr(e).addClass("highcharts-background").add().shadow(a.shadow)}if(k)f?f.animate(r):this.plotBackground=b.rect(s,m,p,q,0).attr({fill:k}).add().shadow(a.plotShadow); +if(l)h?h.animate(r):this.plotBGImage=b.image(l,s,m,p,q).add();v?v.animate({width:u.width,height:u.height}):this.clipRect=b.clipRect(u);if(o)g?g.animate(g.crisp({x:s,y:m,width:p,height:q})):this.plotBorder=b.rect(s,m,p,q,0,-o).attr({stroke:a.plotBorderColor,"stroke-width":o,fill:Q,zIndex:1}).add();this.isDirtyBox=!1},propFromSeries:function(){var a=this,b=a.options.chart,c,d=a.options.series,e,f;p(["inverted","angular","polar"],function(g){c=F[b.type||b.defaultSeriesType];f=a[g]||b[g]||c&&c.prototype[g]; +for(e=d&&d.length;!f&&e--;)(c=F[d[e].type])&&c.prototype[g]&&(f=!0);a[g]=f})},linkSeries:function(){var a=this,b=a.series;p(b,function(a){a.linkedSeries.length=0});p(b,function(b){var d=b.options.linkedTo;if(Fa(d)&&(d=d===":previous"?a.series[b.index-1]:a.get(d)))d.linkedSeries.push(b),b.linkedParent=d})},renderSeries:function(){p(this.series,function(a){a.translate();a.setTooltipPoints&&a.setTooltipPoints();a.render()})},render:function(){var a=this,b=a.axes,c=a.renderer,d=a.options,e=d.labels,f= +d.credits,g;a.setTitle();a.legend=new lb(a,d.legend);a.getStacks();p(b,function(a){a.setScale()});a.getMargins();a.maxTicks=null;p(b,function(a){a.setTickPositions(!0);a.setMaxTicks()});a.adjustTickAmounts();a.getMargins();a.drawChartBox();a.hasCartesianSeries&&p(b,function(a){a.render()});if(!a.seriesGroup)a.seriesGroup=c.g("series-group").attr({zIndex:3}).add();a.renderSeries();e.items&&p(e.items,function(b){var d=q(e.style,b.style),f=z(d.left)+a.plotLeft,g=z(d.top)+a.plotTop+12;delete d.left;delete d.top; +c.text(b.html,f,g).attr({zIndex:2}).css(d).add()});if(f.enabled&&!a.credits)g=f.href,a.credits=c.text(f.text,0,0).on("click",function(){if(g)location.href=g}).attr({align:f.position.align,zIndex:8}).css(f.style).add().align(f.position);a.hasRendered=!0},destroy:function(){var a=this,b=a.axes,c=a.series,d=a.container,e,f=d&&d.parentNode;D(a,"destroy");V[a.index]=t;ab--;a.renderTo.removeAttribute("data-highcharts-chart");W(a);for(e=b.length;e--;)b[e]=b[e].destroy();for(e=c.length;e--;)c[e]=c[e].destroy(); +p("title,subtitle,chartBackground,plotBackground,plotBGImage,plotBorder,seriesGroup,clipRect,credits,pointer,scroller,rangeSelector,legend,resetZoomButton,tooltip,renderer".split(","),function(b){var c=a[b];c&&c.destroy&&(a[b]=c.destroy())});if(d)d.innerHTML="",W(d),f&&Pa(d);for(e in a)delete a[e]},isReadyToRender:function(){var a=this;return!aa&&I==I.top&&y.readyState!=="complete"||fa&&!I.canvg?(fa?Lb.push(function(){a.firstRender()},a.options.global.canvasToolsURL):y.attachEvent("onreadystatechange", +function(){y.detachEvent("onreadystatechange",a.firstRender);y.readyState==="complete"&&a.firstRender()}),!1):!0},firstRender:function(){var a=this,b=a.options,c=a.callback;if(a.isReadyToRender()){a.getContainer();D(a,"init");a.resetMargins();a.setChartSize();a.propFromSeries();a.getAxes();p(b.series||[],function(b){a.initSeries(b)});a.linkSeries();D(a,"beforeRender");if(R.Pointer)a.pointer=new Wa(a,b);a.render();a.renderer.draw();c&&c.apply(a,[a]);p(a.callbacks,function(b){b.apply(a,[a])});a.cloneRenderTo(!0); +D(a,"load")}},splashArray:function(a,b){var c=b[a],c=ca(c)?c:[c,c,c,c];return[m(b[a+"Top"],c[0]),m(b[a+"Right"],c[1]),m(b[a+"Bottom"],c[2]),m(b[a+"Left"],c[3])]}};Ya.prototype.callbacks=[];X=R.CenteredSeriesMixin={getCenter:function(){var a=this.options,b=this.chart,c=2*(a.slicedOffset||0),d,e=b.plotWidth-2*c,f=b.plotHeight-2*c,b=a.center,a=[m(b[0],"50%"),m(b[1],"50%"),a.size||"100%",a.innerSize||0],g=C(e,f),h;return Ua(a,function(a,b){h=/%$/.test(a);d=b<2||b===2&&h;return(h?[e,f,g,g][b]*z(a)/100: +a)+(d?c:0)})}};var Ea=function(){};Ea.prototype={init:function(a,b,c){this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint&&(b=a.options.colors||a.chart.options.colors,this.color=this.color||b[a.colorCounter++],a.colorCounter===b.length))a.colorCounter=0;a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=c.pointValKey,a=Ea.prototype.optionsToObject.call(this,a);q(this,a);this.options=this.options?q(this.options,a):a;if(d)this.y=this[d];if(this.x=== +t&&c)this.x=b===t?c.autoIncrement():b;return this},optionsToObject:function(a){var b={},c=this.series,d=c.pointArrayMap||["y"],e=d.length,f=0,g=0;if(typeof a==="number"||a===null)b[d[0]]=a;else if(La(a)){if(a.length>e){c=typeof a[0];if(c==="string")b.name=a[0];else if(c==="number")b.x=a[0];f++}for(;g<e;)b[d[g++]]=a[f++]}else if(typeof a==="object"){b=a;if(a.dataLabels)c._hasPointLabels=!0;if(a.marker)c._hasPointMarkers=!0}return b},destroy:function(){var a=this.series.chart,b=a.hoverPoints,c;a.pointCount--; +if(b&&(this.setState(),ja(b,this),!b.length))a.hoverPoints=null;if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)W(this),this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a="graphic,dataLabel,dataLabelUpper,group,connector,shadowGroup".split(","),b,c=6;c--;)b=a[c],this[b]&&(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series, +point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=m(c.valueDecimals,""),e=c.valuePrefix||"",f=c.valueSuffix||"";p(b.pointArrayMap||["y"],function(b){b="{point."+b;if(e||f)a=a.replace(b+"}",e+b+"}"+f);a=a.replace(b+"}",b+":,."+d+"f}")});return Ia(a,{point:this,series:this.series})},firePointEvent:function(a,b,c){var d=this,e=this.series.options;(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&& +this.importEvents();a==="click"&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});D(this,a,b,c)}};var O=function(){};O.prototype={isCartesian:!0,type:"line",pointClass:Ea,sorted:!0,requireSorting:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],init:function(a,b){var c=this,d,e,f=a.series,g=function(a,b){return m(a.options.index,a._i)-m(b.options.index, +b._i)};c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();q(c,{name:b.name,state:"",pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0});if(fa)b.animation=!1;e=b.events;for(d in e)K(c,d,e[d]);if(e&&e.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();p(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);if(c.isCartesian)a.hasCartesianSeries=!0;f.push(c);c._i=f.length-1;ob(f,g);this.yAxis&& +ob(this.yAxis.series,g);p(f,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;p(a.axisTypes||[],function(e){p(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]!==t&&b[e]===d.id||b[e]===t&&d.index===0)c.series.push(a),a[e]=c,c.isDirty=!0});!a[e]&&a.optionalAxis!==e&&ra(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,d=arguments;p(c.parallelArrays,typeof b==="number"?function(d){var f=d==="y"&&c.toYData?c.toYData(a):a[d]; +c[d+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(d,2))})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=m(b,a.pointStart,0);this.pointInterval=m(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval;return b},getSegments:function(){var a=-1,b=[],c,d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)d[c].y===null&&d.splice(c,1);d.length&&(b=[d])}else p(d,function(c,g){c.y===null?(g>a+1&&b.push(d.slice(a+ +1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},d=b.plotOptions||{},e=c[this.type];this.userOptions=a;c=w(e,c.series,a);this.tooltipOptions=w(E.tooltip,E.plotOptions[this.type].tooltip,b.tooltip,d.series&&d.series.tooltip,d[this.type]&&d[this.type].tooltip,a.tooltip);e.marker===null&&delete c.marker;return c},getColor:function(){var a=this.options,b=this.userOptions,c=this.chart.options.colors,d=this.chart.counters, +e;e=a.color||ba[this.type].color;if(!e&&!a.colorByPoint)r(b._colorIndex)?a=b._colorIndex:(b._colorIndex=d.color,a=d.color++),e=c[a];this.color=e;d.wrapColor(c.length)},getSymbol:function(){var a=this.userOptions,b=this.options.marker,c=this.chart,d=c.options.symbols,c=c.counters;this.symbol=b.symbol;if(!this.symbol)r(a._symbolIndex)?a=a._symbolIndex:(a._symbolIndex=c.symbol,a=c.symbol++),this.symbol=d[a];if(/^url/.test(this.symbol))b.radius=0;c.wrapSymbol(d.length)},drawLegendSymbol:N.drawLineMarker, +setData:function(a,b,c,d){var e=this,f=e.points,g=f&&f.length||0,h,i=e.options,j=e.chart,k=null,l=e.xAxis,o=l&&!!l.categories,n=e.tooltipPoints,s=i.turboThreshold,q=this.xData,r=this.yData,v=(h=e.pointArrayMap)&&h.length,a=a||[];h=a.length;b=m(b,!0);if(d!==!1&&h&&g===h&&!e.cropped&&!e.hasGroupedData)p(a,function(a,b){f[b].update(a,!1)});else{e.xIncrement=null;e.pointRange=o?1:i.pointRange;e.colorCounter=0;p(this.parallelArrays,function(a){e[a+"Data"].length=0});if(s&&h>s){for(c=0;k===null&&c<h;)k= +a[c],c++;if(ha(k)){o=m(i.pointStart,0);i=m(i.pointInterval,1);for(c=0;c<h;c++)q[c]=o,r[c]=a[c],o+=i;e.xIncrement=o}else if(La(k))if(v)for(c=0;c<h;c++)i=a[c],q[c]=i[0],r[c]=i.slice(1,v+1);else for(c=0;c<h;c++)i=a[c],q[c]=i[0],r[c]=i[1];else ra(12)}else for(c=0;c<h;c++)if(a[c]!==t&&(i={series:e},e.pointClass.prototype.applyOptions.apply(i,[a[c]]),e.updateParallelArrays(i,c),o&&i.name))l.names[i.x]=i.name;Fa(r[0])&&ra(14,!0);e.data=[];e.options.data=a;for(c=g;c--;)f[c]&&f[c].destroy&&f[c].destroy(); +if(n)n.length=0;if(l)l.minRange=l.userMinRange;e.isDirty=e.isDirtyData=j.isDirtyBox=!0;c=!1}b&&j.redraw(c)},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e;e=0;var f,g,h=this.xAxis,i=this.options,j=i.cropThreshold,k=0,l=this.isCartesian,o,n;if(l&&!this.isDirty&&!h.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(l&&this.sorted&&(!j||d>j||this.forceCrop))if(o=h.min,n=h.max,b[d-1]<o||b[0]>n)b=[],c=[];else if(b[0]<o||b[d-1]>n)e=this.cropData(this.xData,this.yData,o,n),b=e.xData,c=e.yData, +e=e.start,f=!0,k=b.length;for(d=b.length-1;d>=0;d--)a=b[d]-b[d-1],!f&&b[d]>o&&b[d]<n&&k++,a>0&&(g===t||a<g)?g=a:a<0&&this.requireSorting&&ra(15);this.cropped=f;this.cropStart=e;this.processedXData=b;this.processedYData=c;this.activePointCount=k;if(i.pointRange===null)this.pointRange=g||1;this.closestPointRange=g},cropData:function(a,b,c,d){var e=a.length,f=0,g=e,h=m(this.cropShoulder,1),i;for(i=0;i<e;i++)if(a[i]>=c){f=v(0,i-h);break}for(;i<e;i++)if(a[i]>d){g=i+h;break}return{xData:a.slice(f,g),yData:b.slice(f, +g),start:f,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,i,j=this.hasGroupedData,k,l=[],o;if(!b&&!j)b=[],b.length=a.length,b=this.data=b;for(o=0;o<g;o++)i=h+o,j?l[o]=(new f).init(this,[d[o]].concat(qa(e[o]))):(b[i]?k=b[i]:a[i]!==t&&(b[i]=k=(new f).init(this,a[i],d[o])),l[o]=k);if(b&&(g!==(c=b.length)||j))for(o=0;o<c;o++)if(o===h&&!j&&(o+=g),b[o])b[o].destroyElements(),b[o].plotX= +t;this.data=b;this.points=l},getExtremes:function(a){var b=this.yAxis,c=this.processedXData,d,e=[],f=0;d=this.xAxis.getExtremes();var g=d.min,h=d.max,i,j,k,l,a=a||this.stackedYData||this.processedYData;d=a.length;for(l=0;l<d;l++)if(j=c[l],k=a[l],i=k!==null&&k!==t&&(!b.isLog||k.length||k>0),j=this.getExtremesFromAll||this.cropped||(c[l+1]||j)>=g&&(c[l-1]||j)<=h,i&&j)if(i=k.length)for(;i--;)k[i]!==null&&(e[f++]=k[i]);else e[f++]=k;this.dataMin=m(void 0,Na(e));this.dataMax=m(void 0,Ba(e))},translate:function(){this.processedXData|| +this.processData();this.generatePoints();for(var a=this.options,b=a.stacking,c=this.xAxis,d=c.categories,e=this.yAxis,f=this.points,g=f.length,h=!!this.modifyValue,i=a.pointPlacement,j=i==="between"||ha(i),k=a.threshold,a=0;a<g;a++){var l=f[a],o=l.x,n=l.y,s=l.low,p=b&&e.stacks[(this.negStacks&&n<k?"-":"")+this.stackKey];if(e.isLog&&n<=0)l.y=n=null;l.plotX=c.translate(o,0,0,0,1,i,this.type==="flags");if(b&&this.visible&&p&&p[o])p=p[o],n=p.points[this.index+","+a],s=n[0],n=n[1],s===0&&(s=m(k,e.min)), +e.isLog&&s<=0&&(s=null),l.total=l.stackTotal=p.total,l.percentage=p.total&&l.y/p.total*100,l.stackY=n,p.setOffset(this.pointXOffset||0,this.barW||0);l.yBottom=r(s)?e.translate(s,0,1,0,1):null;h&&(n=this.modifyValue(n,l));l.plotY=typeof n==="number"&&n!==Infinity?e.translate(n,0,1,0,1):t;l.clientX=j?c.translate(o,0,0,0,1):l.plotX;l.negative=l.y<(k||0);l.category=d&&d[l.x]!==t?d[l.x]:l.x}this.getSegments()},animate:function(a){var b=this.chart,c=b.renderer,d;d=this.options.animation;var e=this.clipBox|| +b.clipBox,f=b.inverted,g;if(d&&!ca(d))d=ba[this.type].animation;g=["_sharedClip",d.duration,d.easing,e.height].join(",");a?(a=b[g],d=b[g+"m"],a||(b[g]=a=c.clipRect(q(e,{width:0})),b[g+"m"]=d=c.clipRect(-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),this.group.clip(a),this.markerGroup.clip(d),this.sharedClipKey=g):((a=b[g])&&a.animate({width:b.plotSizeX},d),b[g+"m"]&&b[g+"m"].animate({width:b.plotSizeX+99},d),this.animate=null)},afterAnimate:function(){var a=this.chart,b=this.sharedClipKey, +c=this.group,d=this.clipBox;if(c&&this.options.clip!==!1){if(!b||!d)c.clip(d?a.renderer.clipRect(d):a.clipRect);this.markerGroup.clip()}D(this,"afterAnimate");setTimeout(function(){b&&a[b]&&(d||(a[b]=a[b].destroy()),a[b+"m"]&&(a[b+"m"]=a[b+"m"].destroy()))},100)},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,j,k;d=this.options.marker;var l=this.pointAttr[""],o,n=this.markerGroup,s=m(d.enabled,this.activePointCount<0.5*this.xAxis.len/d.radius);if(d.enabled!==!1||this._hasPointMarkers)for(f= +b.length;f--;)if(g=b[f],d=T(g.plotX),e=g.plotY,k=g.graphic,i=g.marker||{},a=s&&i.enabled===t||i.enabled,o=c.isInsidePlot(u(d),e,c.inverted),a&&e!==t&&!isNaN(e)&&g.y!==null)if(a=g.pointAttr[g.selected?"select":""]||l,h=a.r,i=m(i.symbol,this.symbol),j=i.indexOf("url")===0,k)k[o?"show":"hide"](!0).animate(q({x:d-h,y:e-h},k.symbolName?{width:2*h,height:2*h}:{}));else{if(o&&(h>0||j))g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(n)}else if(k)g.graphic=k.destroy()},convertAttribs:function(a, +b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=m(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=a.options,c=ba[a.type].marker?b.marker:b,d=c.states,e=d.hover,f,g=a.color;f={stroke:g,fill:g};var h=a.points||[],i,j=[],k,l=a.pointAttrToOptions;k=a.hasPointSpecificOptions;var o=b.negativeColor,n=c.lineColor,s=c.fillColor;i=b.turboThreshold;var m;b.marker?(e.radius=e.radius||c.radius+2,e.lineWidth=e.lineWidth||c.lineWidth+1):e.color= +e.color||ya(e.color||g).brighten(e.brightness).get();j[""]=a.convertAttribs(c,f);p(["hover","select"],function(b){j[b]=a.convertAttribs(d[b],j[""])});a.pointAttr=j;g=h.length;if(!i||g<i||k)for(;g--;){i=h[g];if((c=i.options&&i.options.marker||i.options)&&c.enabled===!1)c.radius=0;if(i.negative&&o)i.color=i.fillColor=o;k=b.colorByPoint||i.color;if(i.options)for(m in l)r(c[l[m]])&&(k=!0);if(k){c=c||{};k=[];d=c.states||{};f=d.hover=d.hover||{};if(!b.marker)f.color=f.color||!i.options.color&&e.color|| +ya(i.color).brighten(f.brightness||e.brightness).get();f={color:i.color};if(!s)f.fillColor=i.color;if(!n)f.lineColor=i.color;k[""]=a.convertAttribs(q(f,c),j[""]);k.hover=a.convertAttribs(d.hover,j.hover,k[""]);k.select=a.convertAttribs(d.select,j.select,k[""])}else k=j;i.pointAttr=k}},destroy:function(){var a=this,b=a.chart,c=/AppleWebKit\/533/.test(wa),d,e,f=a.data||[],g,h,i;D(a,"destroy");W(a);p(a.axisTypes||[],function(b){if(i=a[b])ja(i.series,a),i.isDirty=i.forceRedraw=!0});a.legendItem&&a.chart.legend.destroyItem(a); +for(e=f.length;e--;)(g=f[e])&&g.destroy&&g.destroy();a.points=null;clearTimeout(a.animationTimeout);p("area,graph,dataLabelsGroup,group,markerGroup,tracker,graphNeg,areaNeg,posClip,negClip".split(","),function(b){a[b]&&(d=c&&b==="group"?"hide":"destroy",a[b][d]())});if(b.hoverSeries===a)b.hoverSeries=null;ja(b.series,a);for(h in a)delete a[h]},getSegmentPath:function(a){var b=this,c=[],d=b.options.step;p(a,function(e,f){var g=e.plotX,h=e.plotY,i;b.getPointSpline?c.push.apply(c,b.getPointSpline(a, +e,f)):(c.push(f?"L":"M"),d&&f&&(i=a[f-1],d==="right"?c.push(i.plotX,h):d==="center"?c.push((i.plotX+g)/2,i.plotY,(i.plotX+g)/2,h):c.push(g,i.plotY)),c.push(e.plotX,e.plotY))});return c},getGraphPath:function(){var a=this,b=[],c,d=[];p(a.segments,function(e){c=a.getSegmentPath(e);e.length>1?b=b.concat(c):d.push(e[0])});a.singlePoints=d;return a.graphPath=b},drawGraph:function(){var a=this,b=this.options,c=[["graph",b.lineColor||this.color]],d=b.lineWidth,e=b.dashStyle,f=b.linecap!=="square",g=this.getGraphPath(), +h=b.negativeColor;h&&c.push(["graphNeg",h]);p(c,function(c,h){var k=c[0],l=a[k];if(l)bb(l),l.animate({d:g});else if(d&&g.length)l={stroke:c[1],"stroke-width":d,fill:Q,zIndex:1},e?l.dashstyle=e:f&&(l["stroke-linecap"]=l["stroke-linejoin"]="round"),a[k]=a.chart.renderer.path(g).attr(l).add(a.group).shadow(!h&&b.shadow)})},clipNeg:function(){var a=this.options,b=this.chart,c=b.renderer,d=a.negativeColor||a.negativeFillColor,e,f=this.graph,g=this.area,h=this.posClip,i=this.negClip;e=b.chartWidth;var j= +b.chartHeight,k=v(e,j),l=this.yAxis;if(d&&(f||g)){d=u(l.toPixels(a.threshold||0,!0));d<0&&(k-=d);a={x:0,y:0,width:k,height:d};k={x:0,y:d,width:k,height:k};if(b.inverted)a.height=k.y=b.plotWidth-d,c.isVML&&(a={x:b.plotWidth-d-b.plotLeft,y:0,width:e,height:j},k={x:d+b.plotLeft-e,y:0,width:b.plotLeft+d,height:e});l.reversed?(b=k,e=a):(b=a,e=k);h?(h.animate(b),i.animate(e)):(this.posClip=h=c.clipRect(b),this.negClip=i=c.clipRect(e),f&&this.graphNeg&&(f.clip(h),this.graphNeg.clip(i)),g&&(g.clip(h),this.areaNeg.clip(i)))}}, +invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};p(["group","markerGroup"],function(c){b[c]&&b[c].attr(a).invert()})}var b=this,c=b.chart;if(b.xAxis)K(c,"resize",a),K(b,"destroy",function(){W(c,"resize",a)}),a(),b.invertGroups=a},plotGroup:function(a,b,c,d,e){var f=this[a],g=!f;g&&(this[a]=f=this.chart.renderer.g(b).attr({visibility:c,zIndex:d||0.1}).add(e));f[g?"attr":"animate"](this.getPlotBox());return f},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis; +if(a.inverted)b=c,c=this.xAxis;return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,d=a.options,e=(c=d.animation)&&!!a.animate&&b.renderer.isSVG&&m(c.duration,500)||0,f=a.visible?"visible":"hidden",g=d.zIndex,h=a.hasRendered,i=b.seriesGroup;c=a.plotGroup("group","series",f,g,i);a.markerGroup=a.plotGroup("markerGroup","markers",f,g,i);e&&a.animate(!0);a.getAttribs();c.inverted=a.isCartesian?b.inverted:!1;a.drawGraph&&(a.drawGraph(), +a.clipNeg());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();d.clip!==!1&&!a.sharedClipKey&&!h&&c.clip(b.clipRect);e&&a.animate();if(!h)e?a.animationTimeout=setTimeout(function(){a.afterAnimate()},e):a.afterAnimate();a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData,c=this.group,d=this.xAxis,e=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth, +height:a.plotHeight}),c.animate({translateX:m(d&&d.left,a.plotLeft),translateY:m(e&&e.top,a.plotTop)}));this.translate();this.setTooltipPoints&&this.setTooltipPoints(!0);this.render();b&&D(this,"updatedData")}};Hb.prototype={destroy:function(){Oa(this,this.axis)},render:function(a){var b=this.options,c=b.format,c=c?Ia(c,this):b.formatter.call(this);this.label?this.label.attr({text:c,visibility:"hidden"}):this.label=this.axis.chart.renderer.text(c,null,null,b.useHTML).css(b.style).attr({align:this.textAlign, +rotation:b.rotation,visibility:"hidden"}).add(a)},setOffset:function(a,b){var c=this.axis,d=c.chart,e=d.inverted,f=this.isNegative,g=c.translate(c.usePercentage?100:this.total,0,0,0,1),c=c.translate(0),c=M(g-c),h=d.xAxis[0].translate(this.x)+a,i=d.plotHeight,f={x:e?f?g:g-c:h,y:e?i-h-b:f?i-g-c:i-g,width:e?c:b,height:e?b:c};if(e=this.label)e.align(this.alignOptions,null,f),f=e.alignAttr,e[this.options.crop===!1||d.isInsidePlot(f.x,f.y)?"show":"hide"](!0)}};la.prototype.buildStacks=function(){var a= +this.series,b=m(this.options.reversedStacks,!0),c=a.length;if(!this.isXAxis){for(this.usePercentage=!1;c--;)a[b?c:a.length-c-1].setStackedPoints();if(this.usePercentage)for(c=0;c<a.length;c++)a[c].setPercentStacks()}};la.prototype.renderStackTotals=function(){var a=this.chart,b=a.renderer,c=this.stacks,d,e,f=this.stackTotalGroup;if(!f)this.stackTotalGroup=f=b.g("stack-labels").attr({visibility:"visible",zIndex:6}).add();f.translate(a.plotLeft,a.plotTop);for(d in c)for(e in a=c[d],a)a[e].render(f)}; +O.prototype.setStackedPoints=function(){if(this.options.stacking&&!(this.visible!==!0&&this.chart.options.chart.ignoreHiddenSeries!==!1)){var a=this.processedXData,b=this.processedYData,c=[],d=b.length,e=this.options,f=e.threshold,g=e.stack,e=e.stacking,h=this.stackKey,i="-"+h,j=this.negStacks,k=this.yAxis,l=k.stacks,o=k.oldStacks,n,m,p,q,r,u;for(q=0;q<d;q++){r=a[q];u=b[q];p=this.index+","+q;m=(n=j&&u<f)?i:h;l[m]||(l[m]={});if(!l[m][r])o[m]&&o[m][r]?(l[m][r]=o[m][r],l[m][r].total=null):l[m][r]=new Hb(k, +k.options.stackLabels,n,r,g);m=l[m][r];m.points[p]=[m.cum||0];e==="percent"?(n=n?h:i,j&&l[n]&&l[n][r]?(n=l[n][r],m.total=n.total=v(n.total,m.total)+M(u)||0):m.total=da(m.total+(M(u)||0))):m.total=da(m.total+(u||0));m.cum=(m.cum||0)+(u||0);m.points[p].push(m.cum);c[q]=m.cum}if(e==="percent")k.usePercentage=!0;this.stackedYData=c;k.oldStacks={}}};O.prototype.setPercentStacks=function(){var a=this,b=a.stackKey,c=a.yAxis.stacks,d=a.processedXData;p([b,"-"+b],function(b){var e;for(var f=d.length,g,h;f--;)if(g= +d[f],e=(h=c[b]&&c[b][g])&&h.points[a.index+","+f],g=e)h=h.total?100/h.total:0,g[0]=da(g[0]*h),g[1]=da(g[1]*h),a.stackedYData[f]=g[1]})};q(Ya.prototype,{addSeries:function(a,b,c){var d,e=this;a&&(b=m(b,!0),D(e,"addSeries",{options:a},function(){d=e.initSeries(a);e.isDirtyLegend=!0;e.linkSeries();b&&e.redraw(c)}));return d},addAxis:function(a,b,c,d){var e=b?"xAxis":"yAxis",f=this.options;new la(this,w(a,{index:this[e].length,isX:b}));f[e]=qa(f[e]||{});f[e].push(a);m(c,!0)&&this.redraw(d)},showLoading:function(a){var b= +this.options,c=this.loadingDiv,d=b.loading;if(!c)this.loadingDiv=c=Y(Ja,{className:"highcharts-loading"},q(d.style,{zIndex:10,display:Q}),this.container),this.loadingSpan=Y("span",null,d.labelStyle,c);this.loadingSpan.innerHTML=a||b.lang.loading;if(!this.loadingShown)G(c,{opacity:0,display:"",left:this.plotLeft+"px",top:this.plotTop+"px",width:this.plotWidth+"px",height:this.plotHeight+"px"}),kb(c,{opacity:d.style.opacity},{duration:d.showDuration||0}),this.loadingShown=!0},hideLoading:function(){var a= +this.options,b=this.loadingDiv;b&&kb(b,{opacity:0},{duration:a.loading.hideDuration||100,complete:function(){G(b,{display:Q})}});this.loadingShown=!1}});q(Ea.prototype,{update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g,h=e.data,i=e.chart,j=e.options,b=m(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);if(ca(a)){e.getAttribs();if(f)a&&a.marker&&a.marker.symbol?d.graphic=f.destroy():f.attr(d.pointAttr[d.state||""]);if(a&&a.dataLabels&&d.dataLabel)d.dataLabel=d.dataLabel.destroy()}g= +Da(d,h);e.updateParallelArrays(d,g);j.data[g]=d.options;e.isDirty=e.isDirtyData=!0;if(!e.fixedBox&&e.hasCartesianSeries)i.isDirtyBox=!0;j.legendType==="point"&&i.legend.destroyItem(d);b&&i.redraw(c)})},remove:function(a,b){var c=this,d=c.series,e=d.points,f=d.chart,g,h=d.data;Qa(b,f);a=m(a,!0);c.firePointEvent("remove",null,function(){g=Da(c,h);h.length===e.length&&e.splice(g,1);h.splice(g,1);d.options.data.splice(g,1);d.updateParallelArrays(c,"splice",g,1);c.destroy();d.isDirty=!0;d.isDirtyData= +!0;a&&f.redraw()})}});q(O.prototype,{addPoint:function(a,b,c,d){var e=this.options,f=this.data,g=this.graph,h=this.area,i=this.chart,j=this.xAxis&&this.xAxis.names,k=g&&g.shift||0,l=e.data,o,n=this.xData;Qa(d,i);c&&p([g,h,this.graphNeg,this.areaNeg],function(a){if(a)a.shift=k+1});if(h)h.isArea=!0;b=m(b,!0);d={series:this};this.pointClass.prototype.applyOptions.apply(d,[a]);g=d.x;h=n.length;if(this.requireSorting&&g<n[h-1])for(o=!0;h&&n[h-1]>g;)h--;this.updateParallelArrays(d,"splice",h,0,0);this.updateParallelArrays(d, +h);if(j)j[g]=d.name;l.splice(h,0,a);o&&(this.data.splice(h,0,null),this.processData());e.legendType==="point"&&this.generatePoints();c&&(f[0]&&f[0].remove?f[0].remove(!1):(f.shift(),this.updateParallelArrays(d,"shift"),l.shift()));this.isDirtyData=this.isDirty=!0;b&&(this.getAttribs(),i.redraw())},remove:function(a,b){var c=this,d=c.chart,a=m(a,!0);if(!c.isRemoving)c.isRemoving=!0,D(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();a&&d.redraw(b)});c.isRemoving= +!1},update:function(a,b){var c=this.chart,d=this.type,e=F[d].prototype,f,a=w(this.userOptions,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1);for(f in e)e.hasOwnProperty(f)&&(this[f]=t);q(this,F[a.type||d].prototype);this.init(c,a);m(b,!0)&&c.redraw(!1)}});q(la.prototype,{update:function(a,b){var c=this.chart,a=c.options[this.coll][this.options.index]=w(this.userOptions,a);this.destroy(!0);this._addedPlotLB=t;this.init(c,q(a,{events:t}));c.isDirtyBox= +!0;m(b,!0)&&c.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,d=this.series,e=d.length;e--;)d[e]&&d[e].remove(!1);ja(b.axes,this);ja(b[c],this);b.options[c].splice(this.options.index,1);p(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;m(a,!0)&&b.redraw()},setTitle:function(a,b){this.update({title:a},b)},setCategories:function(a,b){this.update({categories:a},b)}});ga=ka(O);F.line=ga;ba.area=w(S,{threshold:0});var pa=ka(O,{type:"area",getSegments:function(){var a= +[],b=[],c=[],d=this.xAxis,e=this.yAxis,f=e.stacks[this.stackKey],g={},h,i,j=this.points,k=this.options.connectNulls,l,o,n;if(this.options.stacking&&!this.cropped){for(o=0;o<j.length;o++)g[j[o].x]=j[o];for(n in f)f[n].total!==null&&c.push(+n);c.sort(function(a,b){return a-b});p(c,function(a){if(!k||g[a]&&g[a].y!==null)g[a]?b.push(g[a]):(h=d.translate(a),l=f[a].percent?f[a].total?f[a].cum*100/f[a].total:0:f[a].cum,i=e.toPixels(l,!0),b.push({y:null,plotX:h,clientX:h,plotY:i,yBottom:i,onMouseOver:sa}))}); +b.length&&a.push(b)}else O.prototype.getSegments.call(this),a=this.segments;this.segments=a},getSegmentPath:function(a){var b=O.prototype.getSegmentPath.call(this,a),c=[].concat(b),d,e=this.options;d=b.length;var f=this.yAxis.getThreshold(e.threshold),g;d===3&&c.push("L",b[1],b[2]);if(e.stacking&&!this.closedStacks)for(d=a.length-1;d>=0;d--)g=m(a[d].yBottom,f),d<a.length-1&&e.step&&c.push(a[d+1].plotX,g),c.push(a[d].plotX,g);else this.closeSegment(c,a,f);this.areaPath=this.areaPath.concat(c);return b}, +closeSegment:function(a,b,c){a.push("L",b[b.length-1].plotX,c,"L",b[0].plotX,c)},drawGraph:function(){this.areaPath=[];O.prototype.drawGraph.apply(this);var a=this,b=this.areaPath,c=this.options,d=c.negativeColor,e=c.negativeFillColor,f=[["area",this.color,c.fillColor]];(d||e)&&f.push(["areaNeg",d,e]);p(f,function(d){var e=d[0],f=a[e];f?f.animate({d:b}):a[e]=a.chart.renderer.path(b).attr({fill:m(d[2],ya(d[1]).setOpacity(m(c.fillOpacity,0.75)).get()),zIndex:0}).add(a.group)})},drawLegendSymbol:N.drawRectangle}); +F.area=pa;ba.spline=w(S);ga=ka(O,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,j,k;if(f&&g){a=f.plotY;j=g.plotX;var g=g.plotY,l;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;j=(1.5*d+j)/2.5;k=(1.5*e+g)/2.5;l=(k-i)*(j-d)/(j-h)+e-k;i+=l;k+=l;i>a&&i>e?(i=v(a,e),k=2*e-i):i<a&&i<e&&(i=C(a,e),k=2*e-i);k>g&&k>e?(k=v(g,e),i=2*e-k):k<g&&k<e&&(k=C(g,e),i=2*e-k);b.rightContX=j;b.rightContY=k}c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX= +f.rightContY=null):b=["M",d,e];return b}});F.spline=ga;ba.areaspline=w(ba.area);pa=pa.prototype;ga=ka(ga,{type:"areaspline",closedStacks:!0,getSegmentPath:pa.getSegmentPath,closeSegment:pa.closeSegment,drawGraph:pa.drawGraph,drawLegendSymbol:N.drawRectangle});F.areaspline=ga;ba.column=w(S,{borderColor:"#FFFFFF",borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:0.1,shadow:!1,halo:!1},select:{color:"#C0C0C0",borderColor:"#000000", +shadow:!1}},dataLabels:{align:null,verticalAlign:null,y:null},stickyTracking:!1,tooltip:{distance:6},threshold:0});ga=ka(O,{type:"column",pointAttrToOptions:{stroke:"borderColor",fill:"color",r:"borderRadius"},cropShoulder:0,trackerGroups:["group","dataLabelsGroup"],negStacks:!0,init:function(){O.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){if(b.type===a.type)b.isDirty=!0})},getColumnMetrics:function(){var a=this,b=a.options,c=a.xAxis,d=a.yAxis,e= +c.reversed,f,g={},h,i=0;b.grouping===!1?i=1:p(a.chart.series,function(b){var c=b.options,e=b.yAxis;if(b.type===a.type&&b.visible&&d.len===e.len&&d.pos===e.pos)c.stacking?(f=b.stackKey,g[f]===t&&(g[f]=i++),h=g[f]):c.grouping!==!1&&(h=i++),b.columnIndex=h});var c=C(M(c.transA)*(c.ordinalSlope||b.pointRange||c.closestPointRange||c.tickInterval||1),c.len),j=c*b.groupPadding,k=(c-2*j)/i,l=b.pointWidth,b=r(l)?(k-l)/2:k*b.pointPadding,l=m(l,k-2*b);return a.columnMetrics={width:l,offset:b+(j+((e?i-(a.columnIndex|| +0):a.columnIndex)||0)*k-c/2)*(e?-1:1)}},translate:function(){var a=this,b=a.chart,c=a.options,d=a.borderWidth=m(c.borderWidth,a.activePointCount>0.5*a.xAxis.len?0:1),e=a.yAxis,f=a.translatedThreshold=e.getThreshold(c.threshold),g=m(c.minPointLength,5),c=a.getColumnMetrics(),h=c.width,i=a.barW=Ka(v(h,1+2*d)),j=a.pointXOffset=c.offset,k=-(d%2?0.5:0),l=d%2?0.5:1;b.renderer.isVML&&b.inverted&&(l+=1);O.prototype.translate.apply(a);p(a.points,function(c){var d=m(c.yBottom,f),p=C(v(-999-d,c.plotY),e.len+ +999+d),q=c.plotX+j,r=i,t=C(p,d),x;x=v(p,d)-t;M(x)<g&&g&&(x=g,t=u(M(t-f)>g?d-g:f-(e.translate(c.y,0,1,0,1)<=f?g:0)));c.barX=q;c.pointWidth=h;c.tooltipPos=b.inverted?[e.len-p,a.xAxis.len-q-r/2]:[q+r/2,p];d=M(q)<0.5;r=u(q+r)+k;q=u(q)+k;r-=q;p=M(t)<0.5;x=u(t+x)+l;t=u(t)+l;x-=t;d&&(q+=1,r-=1);p&&(t-=1,x+=1);c.shapeType="rect";c.shapeArgs={x:q,y:t,width:r,height:x}})},getSymbol:sa,drawLegendSymbol:N.drawRectangle,drawGraph:sa,drawPoints:function(){var a=this,b=this.chart,c=a.options,d=b.renderer,e=c.animationLimit|| +250,f,g,h;p(a.points,function(i){var j=i.plotY,k=i.graphic;if(j!==t&&!isNaN(j)&&i.y!==null)f=i.shapeArgs,h=r(a.borderWidth)?{"stroke-width":a.borderWidth}:{},g=i.pointAttr[i.selected?"select":""]||a.pointAttr[""],k?(bb(k),k.attr(h)[b.pointCount<e?"animate":"attr"](w(f))):i.graphic=d[i.shapeType](f).attr(g).attr(h).add(a.group).shadow(c.shadow,null,c.stacking&&!c.borderRadius);else if(k)i.graphic=k.destroy()})},animate:function(a){var b=this.yAxis,c=this.options,d=this.chart.inverted,e={};if(aa)a? +(e.scaleY=0.001,a=C(b.pos+b.len,v(b.pos,b.toPixels(c.threshold))),d?e.translateX=a-b.len:e.translateY=a,this.group.attr(e)):(e.scaleY=1,e[d?"translateX":"translateY"]=b.pos,this.group.animate(e,this.options.animation),this.animate=null)},remove:function(){var a=this,b=a.chart;b.hasRendered&&p(b.series,function(b){if(b.type===a.type)b.isDirty=!0});O.prototype.remove.apply(a,arguments)}});F.column=ga;ba.bar=w(ba.column);pa=ka(ga,{type:"bar",inverted:!0});F.bar=pa;ba.scatter=w(S,{lineWidth:0,tooltip:{headerFormat:'<span style="color:{series.color}">â—</span> <span style="font-size: 10px;"> {series.name}</span><br/>', +pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"},stickyTracking:!1});pa=ka(O,{type:"scatter",sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["markerGroup"],takeOrdinalPosition:!1,singularTooltips:!0,drawGraph:function(){this.options.lineWidth&&O.prototype.drawGraph.call(this)}});F.scatter=pa;ba.pie=w(S,{borderColor:"#FFFFFF",borderWidth:1,center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name}},ignoreHiddenPoint:!0, +legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}},stickyTracking:!1,tooltip:{followPointer:!0}});S={type:"pie",isCartesian:!1,pointClass:ka(Ea,{init:function(){Ea.prototype.init.apply(this,arguments);var a=this,b;if(a.y<0)a.y=null;q(a,{visible:a.visible!==!1,name:m(a.name,"Slice")});b=function(b){a.slice(b.type==="select")};K(a,"select",b);K(a,"unselect",b);return a},setVisible:function(a){var b=this,c=b.series,d=c.chart;b.visible=b.options.visible= +a=a===t?!b.visible:a;c.options.data[Da(b,c.data)]=b.options;p(["graphic","dataLabel","connector","shadowGroup"],function(c){if(b[c])b[c][a?"show":"hide"](!0)});b.legendItem&&d.legend.colorizeItem(b,a);if(!c.isDirty&&c.options.ignoreHiddenPoint)c.isDirty=!0,d.redraw()},slice:function(a,b,c){var d=this.series;Qa(c,d.chart);m(b,!0);this.sliced=this.options.sliced=a=r(a)?a:!this.sliced;d.options.data[Da(this,d.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a); +this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var b=this.shapeArgs,c=this.series.chart;return this.series.chart.renderer.symbols.arc(c.plotLeft+b.x,c.plotTop+b.y,b.r+a,b.r+a,{innerR:this.shapeArgs.r,start:b.start,end:b.end})}}),requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},singularTooltips:!0,getColor:sa,animate:function(a){var b=this,c=b.points,d= +b.startAngleRad;if(!a)p(c,function(a){var c=a.graphic,a=a.shapeArgs;c&&(c.attr({r:b.center[3]/2,start:d,end:d}),c.animate({r:a.r,start:a.start,end:a.end},b.options.animation))}),b.animate=null},setData:function(a,b,c,d){O.prototype.setData.call(this,a,!1,c,d);this.processData();this.generatePoints();m(b,!0)&&this.chart.redraw(c)},generatePoints:function(){var a,b=0,c,d,e,f=this.options.ignoreHiddenPoint;O.prototype.generatePoints.call(this);c=this.points;d=c.length;for(a=0;a<d;a++)e=c[a],b+=f&&!e.visible? +0:e.y;this.total=b;for(a=0;a<d;a++)e=c[a],e.percentage=b>0?e.y/b*100:0,e.total=b},translate:function(a){this.generatePoints();var b=0,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f,g,h,i=c.startAngle||0,j=this.startAngleRad=ma/180*(i-90),i=(this.endAngleRad=ma/180*(m(c.endAngle,i+360)-90))-j,k=this.points,l=c.dataLabels.distance,c=c.ignoreHiddenPoint,o,n=k.length,p;if(!a)this.center=a=this.getCenter();this.getX=function(b,c){h=U.asin(C((b-a[1])/(a[2]/2+l),1));return a[0]+(c?-1:1)*Z(h)*(a[2]/ +2+l)};for(o=0;o<n;o++){p=k[o];f=j+b*i;if(!c||p.visible)b+=p.percentage/100;g=j+b*i;p.shapeType="arc";p.shapeArgs={x:a[0],y:a[1],r:a[2]/2,innerR:a[3]/2,start:u(f*1E3)/1E3,end:u(g*1E3)/1E3};h=(g+f)/2;h>1.5*ma?h-=2*ma:h<-ma/2&&(h+=2*ma);p.slicedTranslation={translateX:u(Z(h)*d),translateY:u(ea(h)*d)};f=Z(h)*a[2]/2;g=ea(h)*a[2]/2;p.tooltipPos=[a[0]+f*0.7,a[1]+g*0.7];p.half=h<-ma/2||h>ma/2?1:0;p.angle=h;e=C(e,l/2);p.labelPos=[a[0]+f+Z(h)*l,a[1]+g+ea(h)*l,a[0]+f+Z(h)*e,a[1]+g+ea(h)*e,a[0]+f,a[1]+g,l<0? +"center":p.half?"right":"left",h]}},drawGraph:null,drawPoints:function(){var a=this,b=a.chart.renderer,c,d,e=a.options.shadow,f,g;if(e&&!a.shadowGroup)a.shadowGroup=b.g("shadow").add(a.group);p(a.points,function(h){d=h.graphic;g=h.shapeArgs;f=h.shadowGroup;if(e&&!f)f=h.shadowGroup=b.g("shadow").add(a.shadowGroup);c=h.sliced?h.slicedTranslation:{translateX:0,translateY:0};f&&f.attr(c);d?d.animate(q(g,c)):h.graphic=d=b[h.shapeType](g).setRadialReference(a.center).attr(h.pointAttr[h.selected?"select": +""]).attr({"stroke-linejoin":"round"}).attr(c).add(a.group).shadow(e,f);h.visible!==void 0&&h.setVisible(h.visible)})},sortByAngle:function(a,b){a.sort(function(a,d){return a.angle!==void 0&&(d.angle-a.angle)*b})},drawLegendSymbol:N.drawRectangle,getCenter:X.getCenter,getSymbol:sa};S=ka(O,S);F.pie=S;O.prototype.drawDataLabels=function(){var a=this,b=a.options,c=b.cursor,d=b.dataLabels,e=a.points,f,g,h,i;if(d.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(d),i=a.plotGroup("dataLabelsGroup", +"data-labels","hidden",d.zIndex||6),!a.hasRendered&&m(d.defer,!0)&&(i.attr({opacity:0}),K(a,"afterAnimate",function(){a.dataLabelsGroup.show()[b.animation?"animate":"attr"]({opacity:1},{duration:200})})),g=d,p(e,function(b){var e,l=b.dataLabel,o,n,p=b.connector,u=!0;f=b.options&&b.options.dataLabels;e=m(f&&f.enabled,g.enabled);if(l&&!e)b.dataLabel=l.destroy();else if(e){d=w(g,f);e=d.rotation;o=b.getLabelConfig();h=d.format?Ia(d.format,o):d.formatter.call(o,d);d.style.color=m(d.color,d.style.color, +a.color,"black");if(l)if(r(h))l.attr({text:h}),u=!1;else{if(b.dataLabel=l=l.destroy(),p)b.connector=p.destroy()}else if(r(h)){l={fill:d.backgroundColor,stroke:d.borderColor,"stroke-width":d.borderWidth,r:d.borderRadius||0,rotation:e,padding:d.padding,zIndex:1};for(n in l)l[n]===t&&delete l[n];l=b.dataLabel=a.chart.renderer[e?"text":"label"](h,0,-999,null,null,null,d.useHTML).attr(l).css(q(d.style,c&&{cursor:c})).add(i).shadow(d.shadow)}l&&a.alignDataLabel(b,l,d,null,u)}})};O.prototype.alignDataLabel= +function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=m(a.plotX,-999),i=m(a.plotY,-999),j=b.getBBox();if(a=this.visible&&(a.series.forceDL||f.isInsidePlot(h,u(i),g)||d&&f.isInsidePlot(h,g?d.x+1:d.y+d.height-1,g)))d=q({x:g?f.plotWidth-i:h,y:u(g?f.plotHeight-h:i),width:0,height:0},d),q(c,{width:j.width,height:j.height}),c.rotation?(g={align:c.align,x:d.x+c.x+d.width/2,y:d.y+c.y+d.height/2},b[e?"attr":"animate"](g)):(b.align(c,null,d),g=b.alignAttr,m(c.overflow,"justify")==="justify"?this.justifyDataLabel(b, +c,g,j,d,e):m(c.crop,!0)&&(a=f.isInsidePlot(g.x,g.y)&&f.isInsidePlot(g.x+j.width,g.y+j.height)));if(!a)b.attr({y:-999}),b.placed=!1};O.prototype.justifyDataLabel=function(a,b,c,d,e,f){var g=this.chart,h=b.align,i=b.verticalAlign,j,k;j=c.x;if(j<0)h==="right"?b.align="left":b.x=-j,k=!0;j=c.x+d.width;if(j>g.plotWidth)h==="left"?b.align="right":b.x=g.plotWidth-j,k=!0;j=c.y;if(j<0)i==="bottom"?b.verticalAlign="top":b.y=-j,k=!0;j=c.y+d.height;if(j>g.plotHeight)i==="top"?b.verticalAlign="bottom":b.y=g.plotHeight- +j,k=!0;if(k)a.placed=!f,a.align(b,null,e)};if(F.pie)F.pie.prototype.drawDataLabels=function(){var a=this,b=a.data,c,d=a.chart,e=a.options.dataLabels,f=m(e.connectorPadding,10),g=m(e.connectorWidth,1),h=d.plotWidth,d=d.plotHeight,i,j,k=m(e.softConnector,!0),l=e.distance,o=a.center,n=o[2]/2,q=o[1],r=l>0,t,w,x,y,z=[[],[]],A,C,G,D,B,F=[0,0,0,0],N=function(a,b){return b.y-a.y};if(a.visible&&(e.enabled||a._hasPointLabels)){O.prototype.drawDataLabels.apply(a);p(b,function(a){a.dataLabel&&a.visible&&z[a.half].push(a)}); +for(D=0;!y&&b[D];)y=b[D]&&b[D].dataLabel&&(b[D].dataLabel.getBBox().height||21),D++;for(D=2;D--;){var b=[],K=[],H=z[D],I=H.length,E;a.sortByAngle(H,D-0.5);if(l>0){for(B=q-n-l;B<=q+n+l;B+=y)b.push(B);w=b.length;if(I>w){c=[].concat(H);c.sort(N);for(B=I;B--;)c[B].rank=B;for(B=I;B--;)H[B].rank>=w&&H.splice(B,1);I=H.length}for(B=0;B<I;B++){c=H[B];x=c.labelPos;c=9999;var Q,P;for(P=0;P<w;P++)Q=M(b[P]-x[1]),Q<c&&(c=Q,E=P);if(E<B&&b[B]!==null)E=B;else for(w<I-B+E&&b[B]!==null&&(E=w-I+B);b[E]===null;)E++;K.push({i:E, +y:b[E]});b[E]=null}K.sort(N)}for(B=0;B<I;B++){c=H[B];x=c.labelPos;t=c.dataLabel;G=c.visible===!1?"hidden":"visible";c=x[1];if(l>0){if(w=K.pop(),E=w.i,C=w.y,c>C&&b[E+1]!==null||c<C&&b[E-1]!==null)C=c}else C=c;A=e.justify?o[0]+(D?-1:1)*(n+l):a.getX(E===0||E===b.length-1?c:C,D);t._attr={visibility:G,align:x[6]};t._pos={x:A+e.x+({left:f,right:-f}[x[6]]||0),y:C+e.y-10};t.connX=A;t.connY=C;if(this.options.size===null)w=t.width,A-w<f?F[3]=v(u(w-A+f),F[3]):A+w>h-f&&(F[1]=v(u(A+w-h+f),F[1])),C-y/2<0?F[0]= +v(u(-C+y/2),F[0]):C+y/2>d&&(F[2]=v(u(C+y/2-d),F[2]))}}if(Ba(F)===0||this.verifyDataLabelOverflow(F))this.placeDataLabels(),r&&g&&p(this.points,function(b){i=b.connector;x=b.labelPos;if((t=b.dataLabel)&&t._pos)G=t._attr.visibility,A=t.connX,C=t.connY,j=k?["M",A+(x[6]==="left"?5:-5),C,"C",A,C,2*x[2]-x[4],2*x[3]-x[5],x[2],x[3],"L",x[4],x[5]]:["M",A+(x[6]==="left"?5:-5),C,"L",x[2],x[3],"L",x[4],x[5]],i?(i.animate({d:j}),i.attr("visibility",G)):b.connector=i=a.chart.renderer.path(j).attr({"stroke-width":g, +stroke:e.connectorColor||b.color||"#606060",visibility:G}).add(a.dataLabelsGroup);else if(i)b.connector=i.destroy()})}},F.pie.prototype.placeDataLabels=function(){p(this.points,function(a){var a=a.dataLabel,b;if(a)(b=a._pos)?(a.attr(a._attr),a[a.moved?"animate":"attr"](b),a.moved=!0):a&&a.attr({y:-999})})},F.pie.prototype.alignDataLabel=sa,F.pie.prototype.verifyDataLabelOverflow=function(a){var b=this.center,c=this.options,d=c.center,e=c=c.minSize||80,f;d[0]!==null?e=v(b[2]-v(a[1],a[3]),c):(e=v(b[2]- +a[1]-a[3],c),b[0]+=(a[3]-a[1])/2);d[1]!==null?e=v(C(e,b[2]-v(a[0],a[2])),c):(e=v(C(e,b[2]-a[0]-a[2]),c),b[1]+=(a[0]-a[2])/2);e<b[2]?(b[2]=e,this.translate(b),p(this.points,function(a){if(a.dataLabel)a.dataLabel._pos=null}),this.drawDataLabels&&this.drawDataLabels()):f=!0;return f};if(F.column)F.column.prototype.alignDataLabel=function(a,b,c,d,e){var f=this.chart,g=f.inverted,h=a.dlBox||a.shapeArgs,i=a.below||a.plotY>m(this.translatedThreshold,f.plotSizeY),j=m(c.inside,!!this.options.stacking);if(h&& +(d=w(h),g&&(d={x:f.plotWidth-d.y-d.height,y:f.plotHeight-d.x-d.width,width:d.height,height:d.width}),!j))g?(d.x+=i?0:d.width,d.width=0):(d.y+=i?d.height:0,d.height=0);c.align=m(c.align,!g||j?"center":i?"right":"left");c.verticalAlign=m(c.verticalAlign,g||j?"middle":i?"top":"bottom");O.prototype.alignDataLabel.call(this,a,b,c,d,e)};S=R.TrackerMixin={drawTrackerPoint:function(){var a=this,b=a.chart,c=b.pointer,d=a.options.cursor,e=d&&{cursor:d},f=function(c){var d=c.target,e;if(b.hoverSeries!==a)a.onMouseOver(); +for(;d&&!e;)e=d.point,d=d.parentNode;if(e!==t&&e!==b.hoverPoint)e.onMouseOver(c)};p(a.points,function(a){if(a.graphic)a.graphic.element.point=a;if(a.dataLabel)a.dataLabel.element.point=a});if(!a._hasTracking)p(a.trackerGroups,function(b){if(a[b]&&(a[b].addClass("highcharts-tracker").on("mouseover",f).on("mouseout",function(a){c.onTrackerMouseOut(a)}).css(e),$a))a[b].on("touchstart",f)}),a._hasTracking=!0},drawTrackerGraph:function(){var a=this,b=a.options,c=b.trackByArea,d=[].concat(c?a.areaPath: +a.graphPath),e=d.length,f=a.chart,g=f.pointer,h=f.renderer,i=f.options.tooltip.snap,j=a.tracker,k=b.cursor,l=k&&{cursor:k},k=a.singlePoints,m,n=function(){if(f.hoverSeries!==a)a.onMouseOver()},q="rgba(192,192,192,"+(aa?1.0E-4:0.002)+")";if(e&&!c)for(m=e+1;m--;)d[m]==="M"&&d.splice(m+1,0,d[m+1]-i,d[m+2],"L"),(m&&d[m]==="M"||m===e)&&d.splice(m,0,"L",d[m-2]+i,d[m-1]);for(m=0;m<k.length;m++)e=k[m],d.push("M",e.plotX-i,e.plotY,"L",e.plotX+i,e.plotY);j?j.attr({d:d}):(a.tracker=h.path(d).attr({"stroke-linejoin":"round", +visibility:a.visible?"visible":"hidden",stroke:q,fill:c?q:Q,"stroke-width":b.lineWidth+(c?0:2*i),zIndex:2}).add(a.group),p([a.tracker,a.markerGroup],function(a){a.addClass("highcharts-tracker").on("mouseover",n).on("mouseout",function(a){g.onTrackerMouseOut(a)}).css(l);if($a)a.on("touchstart",n)}))}};if(F.column)ga.prototype.drawTracker=S.drawTrackerPoint;if(F.pie)F.pie.prototype.drawTracker=S.drawTrackerPoint;if(F.scatter)pa.prototype.drawTracker=S.drawTrackerPoint;q(lb.prototype,{setItemEvents:function(a, +b,c,d,e){var f=this;(c?b:a.legendGroup).on("mouseover",function(){a.setState("hover");b.css(f.options.itemHoverStyle)}).on("mouseout",function(){b.css(a.visible?d:e);a.setState()}).on("click",function(b){var c=function(){a.setVisible()},b={browserEvent:b};a.firePointEvent?a.firePointEvent("legendItemClick",b,c):D(a,"legendItemClick",b,c)})},createCheckboxForItem:function(a){a.checkbox=Y("input",{type:"checkbox",checked:a.selected,defaultChecked:a.selected},this.options.itemCheckboxStyle,this.chart.container); +K(a.checkbox,"click",function(b){D(a,"checkboxClick",{checked:b.target.checked},function(){a.select()})})}});E.legend.itemStyle.cursor="pointer";q(Ya.prototype,{showResetZoom:function(){var a=this,b=E.lang,c=a.options.chart.resetZoomButton,d=c.theme,e=d.states,f=c.relativeTo==="chart"?null:"plotBox";this.resetZoomButton=a.renderer.button(b.resetZoom,null,null,function(){a.zoomOut()},d,e&&e.hover).attr({align:c.position.align,title:b.resetZoomTitle}).add().align(c.position,!1,f)},zoomOut:function(){var a= +this;D(a,"selection",{resetSelection:!0},function(){a.zoom()})},zoom:function(a){var b,c=this.pointer,d=!1,e;!a||a.resetSelection?p(this.axes,function(a){b=a.zoom()}):p(a.xAxis.concat(a.yAxis),function(a){var e=a.axis,h=e.isXAxis;if(c[h?"zoomX":"zoomY"]||c[h?"pinchX":"pinchY"])b=e.zoom(a.min,a.max),e.displayBtn&&(d=!0)});e=this.resetZoomButton;if(d&&!e)this.showResetZoom();else if(!d&&ca(e))this.resetZoomButton=e.destroy();b&&this.redraw(m(this.options.chart.animation,a&&a.animation,this.pointCount< +100))},pan:function(a,b){var c=this,d=c.hoverPoints,e;d&&p(d,function(a){a.setState()});p(b==="xy"?[1,0]:[1],function(b){var d=a[b?"chartX":"chartY"],h=c[b?"xAxis":"yAxis"][0],i=c[b?"mouseDownX":"mouseDownY"],j=(h.pointRange||0)/2,k=h.getExtremes(),l=h.toValue(i-d,!0)+j,i=h.toValue(i+c[b?"plotWidth":"plotHeight"]-d,!0)-j;h.series.length&&l>C(k.dataMin,k.min)&&i<v(k.dataMax,k.max)&&(h.setExtremes(l,i,!1,!1,{trigger:"pan"}),e=!0);c[b?"mouseDownX":"mouseDownY"]=d});e&&c.redraw(!1);G(c.container,{cursor:"move"})}}); +q(Ea.prototype,{select:function(a,b){var c=this,d=c.series,e=d.chart,a=m(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=c.options.selected=a;d.options.data[Da(c,d.data)]=c.options;c.setState(a&&"select");b||p(e.getSelectedPoints(),function(a){if(a.selected&&a!==c)a.selected=a.options.selected=!1,d.options.data[Da(a,d.data)]=a.options,a.setState(""),a.firePointEvent("unselect")})})},onMouseOver:function(a){var b=this.series,c=b.chart,d=c.tooltip,e=c.hoverPoint; +if(e&&e!==this)e.onMouseOut();this.firePointEvent("mouseOver");d&&(!d.shared||b.noSharedTooltip)&&d.refresh(this,a);this.setState("hover");c.hoverPoint=this},onMouseOut:function(){var a=this.series.chart,b=a.hoverPoints;if(!b||Da(this,b)===-1)this.firePointEvent("mouseOut"),this.setState(),a.hoverPoint=null},importEvents:function(){if(!this.hasImportedEvents){var a=w(this.series.options.point,this.options).events,b;this.events=a;for(b in a)K(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a, +b){var c=this.plotX,d=this.plotY,e=this.series,f=e.options.states,g=ba[e.type].marker&&e.options.marker,h=g&&!g.enabled,i=g&&g.states[a],j=i&&i.enabled===!1,k=e.stateMarkerGraphic,l=this.marker||{},m=e.chart,n=e.halo,p,a=a||"";p=this.pointAttr[a]||e.pointAttr[a];if(!(a===this.state&&!b||this.selected&&a!=="select"||f[a]&&f[a].enabled===!1||a&&(j||h&&i.enabled===!1)||a&&l.states&&l.states[a]&&l.states[a].enabled===!1)){if(this.graphic)g=g&&this.graphic.symbolName&&p.r,this.graphic.attr(w(p,g?{x:c- +g,y:d-g,width:2*g,height:2*g}:{})),k&&k.hide();else{if(a&&i)if(g=i.radius,l=l.symbol||e.symbol,k&&k.currentSymbol!==l&&(k=k.destroy()),k)k[b?"animate":"attr"]({x:c-g,y:d-g});else if(l)e.stateMarkerGraphic=k=m.renderer.symbol(l,c-g,d-g,2*g,2*g).attr(p).add(e.markerGroup),k.currentSymbol=l;if(k)k[a&&m.isInsidePlot(c,d,m.inverted)?"show":"hide"]()}if((c=f[a]&&f[a].halo)&&c.size){if(!n)e.halo=n=m.renderer.path().add(e.seriesGroup);n.attr(q({fill:ya(this.color||e.color).setOpacity(c.opacity).get()},c.attributes))[b? +"animate":"attr"]({d:this.haloPath(c.size)})}else n&&n.attr({d:[]});this.state=a}},haloPath:function(a){var b=this.series,c=b.chart,d=b.getPlotBox(),e=c.inverted;return c.renderer.symbols.circle(d.translateX+(e?b.yAxis.len-this.plotY:this.plotX)-a,d.translateY+(e?b.xAxis.len-this.plotX:this.plotY)-a,a*2,a*2)}});q(O.prototype,{onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&D(this,"mouseOver");this.setState("hover");a.hoverSeries= +this},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&D(this,"mouseOut");c&&!a.stickyTracking&&(!c.shared||this.noSharedTooltip)&&c.hide();this.setState();b.hoverSeries=null},setState:function(a){var b=this.options,c=this.graph,d=this.graphNeg,e=b.states,b=b.lineWidth,a=a||"";if(this.state!==a)this.state=a,e[a]&&e[a].enabled===!1||(a&&(b=e[a].lineWidth||b+1),c&&!c.dashstyle&&(a={"stroke-width":b},c.attr(a),d&&d.attr(a)))}, +setVisible:function(a,b){var c=this,d=c.chart,e=c.legendItem,f,g=d.options.chart.ignoreHiddenSeries,h=c.visible;f=(c.visible=a=c.userOptions.visible=a===t?!h:a)?"show":"hide";p(["group","dataLabelsGroup","markerGroup","tracker"],function(a){if(c[a])c[a][f]()});if(d.hoverSeries===c)c.onMouseOut();e&&d.legend.colorizeItem(c,a);c.isDirty=!0;c.options.stacking&&p(d.series,function(a){if(a.options.stacking&&a.visible)a.isDirty=!0});p(c.linkedSeries,function(b){b.setVisible(a,!1)});if(g)d.isDirtyBox=!0; +b!==!1&&d.redraw();D(c,f)},setTooltipPoints:function(a){var b=[],c,d,e=this.xAxis,f=e&&e.getExtremes(),g=e?e.tooltipLen||e.len:this.chart.plotSizeX,h,i,j=[];if(!(this.options.enableMouseTracking===!1||this.singularTooltips)){if(a)this.tooltipPoints=null;p(this.segments||this.points,function(a){b=b.concat(a)});e&&e.reversed&&(b=b.reverse());this.orderTooltipPoints&&this.orderTooltipPoints(b);a=b.length;for(i=0;i<a;i++)if(e=b[i],c=e.x,c>=f.min&&c<=f.max){h=b[i+1];c=d===t?0:d+1;for(d=b[i+1]?C(v(0,T((e.clientX+ +(h?h.wrappedClientX||h.clientX:g))/2)),g):g;c>=0&&c<=d;)j[c++]=e}this.tooltipPoints=j}},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)},select:function(a){this.selected=a=a===t?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;D(this,a?"select":"unselect")},drawTracker:S.drawTrackerGraph});q(R,{Axis:la,Chart:Ya,Color:ya,Point:Ea,Tick:Sa,Renderer:Za,Series:O,SVGElement:P,SVGRenderer:ta,arrayMin:Na,arrayMax:Ba,charts:V,dateFormat:cb,format:Ia,pathAnim:ub,getOptions:function(){return E}, +hasBidiBug:Nb,isTouchDevice:Jb,numberFormat:Ga,seriesTypes:F,setOptions:function(a){E=w(!0,E,a);Cb();return E},addEvent:K,removeEvent:W,createElement:Y,discardElement:Pa,css:G,each:p,extend:q,map:Ua,merge:w,pick:m,splat:qa,extendClass:ka,pInt:z,wrap:Ma,svg:aa,canvas:fa,vml:!aa&&!fa,product:"Highcharts",version:"4.0.1"})})(); diff --git a/assets/survey/js/jquery.mixitup.min.js b/assets/survey/js/jquery.mixitup.min.js new file mode 100755 index 0000000000000000000000000000000000000000..a4fa70ab7047f591f742b0d7b0b87d63345f3652 --- /dev/null +++ b/assets/survey/js/jquery.mixitup.min.js @@ -0,0 +1,14 @@ +/**! + * MixItUp v2.1.5 + * + * @copyright Copyright 2014 KunkaLabs Limited. + * @author KunkaLabs Limited. + * @link https://mixitup.kunkalabs.com + * + * @license Commercial use requires a commercial license. + * https://mixitup.kunkalabs.com/licenses/ + * + * Non-commercial use permitted under terms of CC-BY-NC license. + * http://creativecommons.org/licenses/by-nc/3.0/ + */ +!function(a,b){a.MixItUp=function(){var b=this;b._execAction("_constructor",0),a.extend(b,{selectors:{target:".mix",filter:".filter",sort:".sort"},animation:{enable:!0,effects:"fade scale",duration:600,easing:"ease",perspectiveDistance:"3000",perspectiveOrigin:"50% 50%",queue:!0,queueLimit:1,animateChangeLayout:!1,animateResizeContainer:!0,animateResizeTargets:!1,staggerSequence:!1,reverseOut:!1},callbacks:{onMixLoad:!1,onMixStart:!1,onMixBusy:!1,onMixEnd:!1,onMixFail:!1,_user:!1},controls:{enable:!0,live:!1,toggleFilterButtons:!1,toggleLogic:"or",activeClass:"active"},layout:{display:"inline-block",containerClass:"",containerClassFail:"fail"},load:{filter:"all",sort:!1},_$body:null,_$container:null,_$targets:null,_$parent:null,_$sortButtons:null,_$filterButtons:null,_suckMode:!1,_mixing:!1,_sorting:!1,_clicking:!1,_loading:!0,_changingLayout:!1,_changingClass:!1,_changingDisplay:!1,_origOrder:[],_startOrder:[],_newOrder:[],_activeFilter:null,_toggleArray:[],_toggleString:"",_activeSort:"default:asc",_newSort:null,_startHeight:null,_newHeight:null,_incPadding:!0,_newDisplay:null,_newClass:null,_targetsBound:0,_targetsDone:0,_queue:[],_$show:a(),_$hide:a()}),b._execAction("_constructor",1)},a.MixItUp.prototype={constructor:a.MixItUp,_instances:{},_handled:{_filter:{},_sort:{}},_bound:{_filter:{},_sort:{}},_actions:{},_filters:{},extend:function(b){for(var c in b)a.MixItUp.prototype[c]=b[c]},addAction:function(b,c,d,e){a.MixItUp.prototype._addHook("_actions",b,c,d,e)},addFilter:function(b,c,d,e){a.MixItUp.prototype._addHook("_filters",b,c,d,e)},_addHook:function(b,c,d,e,f){var g=a.MixItUp.prototype[b],h={};f=1===f||"post"===f?"post":"pre",h[c]={},h[c][f]={},h[c][f][d]=e,a.extend(!0,g,h)},_init:function(b,c){var d=this;if(d._execAction("_init",0,arguments),c&&a.extend(!0,d,c),d._$body=a("body"),d._domNode=b,d._$container=a(b),d._$container.addClass(d.layout.containerClass),d._id=b.id,d._platformDetect(),d._brake=d._getPrefixedCSS("transition","none"),d._refresh(!0),d._$parent=d._$targets.parent().length?d._$targets.parent():d._$container,d.load.sort&&(d._newSort=d._parseSort(d.load.sort),d._newSortString=d.load.sort,d._activeSort=d.load.sort,d._sort(),d._printSort()),d._activeFilter="all"===d.load.filter?d.selectors.target:"none"===d.load.filter?"":d.load.filter,d.controls.enable&&d._bindHandlers(),d.controls.toggleFilterButtons){d._buildToggleArray();for(var e=0;e<d._toggleArray.length;e++)d._updateControls({filter:d._toggleArray[e],sort:d._activeSort},!0)}else d.controls.enable&&d._updateControls({filter:d._activeFilter,sort:d._activeSort});d._filter(),d._init=!0,d._$container.data("mixItUp",d),d._execAction("_init",1,arguments),d._buildState(),d._$targets.css(d._brake),d._goMix(d.animation.enable)},_platformDetect:function(){var a=this,c=["Webkit","Moz","O","ms"],d=["webkit","moz"],e=window.navigator.appVersion.match(/Chrome\/(\d+)\./)||!1,f="undefined"!=typeof InstallTrigger,g=function(a){for(var b=0;b<c.length;b++)if(c[b]+"Transition"in a.style)return{prefix:"-"+c[b].toLowerCase()+"-",vendor:c[b]};return"transition"in a.style?"":!1},h=g(a._domNode);a._execAction("_platformDetect",0),a._chrome=e?parseInt(e[1],10):!1,a._ff=f?parseInt(window.navigator.userAgent.match(/rv:([^)]+)\)/)[1]):!1,a._prefix=h.prefix,a._vendor=h.vendor,a._suckMode=window.atob&&a._prefix?!1:!0,a._suckMode&&(a.animation.enable=!1),a._ff&&a._ff<=4&&(a.animation.enable=!1);for(var i=0;i<d.length&&!window.requestAnimationFrame;i++)window.requestAnimationFrame=window[d[i]+"RequestAnimationFrame"];"function"!=typeof Object.getPrototypeOf&&(Object.getPrototypeOf="object"==typeof"test".__proto__?function(a){return a.__proto__}:function(a){return a.constructor.prototype}),a._domNode.nextElementSibling===b&&Object.defineProperty(Element.prototype,"nextElementSibling",{get:function(){for(var a=this.nextSibling;a;){if(1===a.nodeType)return a;a=a.nextSibling}return null}}),a._execAction("_platformDetect",1)},_refresh:function(a,c){var d=this;d._execAction("_refresh",0,arguments),d._$targets=d._$container.find(d.selectors.target);for(var e=0;e<d._$targets.length;e++){var f=d._$targets[e];if(f.dataset===b||c){f.dataset={};for(var g=0;g<f.attributes.length;g++){var h=f.attributes[g],i=h.name,j=h.nodeValue;if(i.indexOf("data-")>-1){var k=d._helpers._camelCase(i.substring(5,i.length));f.dataset[k]=j}}}f.mixParent===b&&(f.mixParent=d._id)}if(d._$targets.length&&a||!d._origOrder.length&&d._$targets.length){d._origOrder=[];for(var e=0;e<d._$targets.length;e++){var f=d._$targets[e];d._origOrder.push(f)}}d._execAction("_refresh",1,arguments)},_bindHandlers:function(){var c=this,d=a.MixItUp.prototype._bound._filter,e=a.MixItUp.prototype._bound._sort;c._execAction("_bindHandlers",0),c.controls.live?c._$body.on("click.mixItUp."+c._id,c.selectors.sort,function(){c._processClick(a(this),"sort")}).on("click.mixItUp."+c._id,c.selectors.filter,function(){c._processClick(a(this),"filter")}):(c._$sortButtons=a(c.selectors.sort),c._$filterButtons=a(c.selectors.filter),c._$sortButtons.on("click.mixItUp."+c._id,function(){c._processClick(a(this),"sort")}),c._$filterButtons.on("click.mixItUp."+c._id,function(){c._processClick(a(this),"filter")})),d[c.selectors.filter]=d[c.selectors.filter]===b?1:d[c.selectors.filter]+1,e[c.selectors.sort]=e[c.selectors.sort]===b?1:e[c.selectors.sort]+1,c._execAction("_bindHandlers",1)},_processClick:function(c,d){var e=this,f=function(c,d,f){var g=a.MixItUp.prototype;g._handled["_"+d][e.selectors[d]]=g._handled["_"+d][e.selectors[d]]===b?1:g._handled["_"+d][e.selectors[d]]+1,g._handled["_"+d][e.selectors[d]]===g._bound["_"+d][e.selectors[d]]&&(c[(f?"remove":"add")+"Class"](e.controls.activeClass),delete g._handled["_"+d][e.selectors[d]])};if(e._execAction("_processClick",0,arguments),!e._mixing||e.animation.queue&&e._queue.length<e.animation.queueLimit){if(e._clicking=!0,"sort"===d){var g=c.attr("data-sort");(!c.hasClass(e.controls.activeClass)||g.indexOf("random")>-1)&&(a(e.selectors.sort).removeClass(e.controls.activeClass),f(c,d),e.sort(g))}if("filter"===d){var h,i=c.attr("data-filter"),j="or"===e.controls.toggleLogic?",":"";e.controls.toggleFilterButtons?(e._buildToggleArray(),c.hasClass(e.controls.activeClass)?(f(c,d,!0),h=e._toggleArray.indexOf(i),e._toggleArray.splice(h,1)):(f(c,d),e._toggleArray.push(i)),e._toggleArray=a.grep(e._toggleArray,function(a){return a}),e._toggleString=e._toggleArray.join(j),e.filter(e._toggleString)):c.hasClass(e.controls.activeClass)||(a(e.selectors.filter).removeClass(e.controls.activeClass),f(c,d),e.filter(i))}e._execAction("_processClick",1,arguments)}else"function"==typeof e.callbacks.onMixBusy&&e.callbacks.onMixBusy.call(e._domNode,e._state,e),e._execAction("_processClickBusy",1,arguments)},_buildToggleArray:function(){var a=this,b=a._activeFilter.replace(/\s/g,"");if(a._execAction("_buildToggleArray",0,arguments),"or"===a.controls.toggleLogic)a._toggleArray=b.split(",");else{a._toggleArray=b.split("."),!a._toggleArray[0]&&a._toggleArray.shift();for(var c,d=0;c=a._toggleArray[d];d++)a._toggleArray[d]="."+c}a._execAction("_buildToggleArray",1,arguments)},_updateControls:function(c,d){var e=this,f={filter:c.filter,sort:c.sort},g=function(a,b){d&&"filter"==h&&"none"!==f.filter&&""!==f.filter?a.filter(b).addClass(e.controls.activeClass):a.removeClass(e.controls.activeClass).filter(b).addClass(e.controls.activeClass)},h="filter",i=null;e._execAction("_updateControls",0,arguments),c.filter===b&&(f.filter=e._activeFilter),c.sort===b&&(f.sort=e._activeSort),f.filter===e.selectors.target&&(f.filter="all");for(var j=0;2>j;j++)i=e.controls.live?a(e.selectors[h]):e["_$"+h+"Buttons"],i&&g(i,"[data-"+h+'="'+f[h]+'"]'),h="sort";e._execAction("_updateControls",1,arguments)},_filter:function(){var b=this;b._execAction("_filter",0);for(var c=0;c<b._$targets.length;c++){var d=a(b._$targets[c]);d.is(b._activeFilter)?b._$show=b._$show.add(d):b._$hide=b._$hide.add(d)}b._execAction("_filter",1)},_sort:function(){var a=this,b=function(a){for(var b=a.slice(),c=b.length,d=c;d--;){var e=parseInt(Math.random()*c),f=b[d];b[d]=b[e],b[e]=f}return b};a._execAction("_sort",0),a._startOrder=[];for(var c=0;c<a._$targets.length;c++){var d=a._$targets[c];a._startOrder.push(d)}switch(a._newSort[0].sortBy){case"default":a._newOrder=a._origOrder;break;case"random":a._newOrder=b(a._startOrder);break;case"custom":a._newOrder=a._newSort[0].order;break;default:a._newOrder=a._startOrder.concat().sort(function(b,c){return a._compare(b,c)})}a._execAction("_sort",1)},_compare:function(a,b,c){c=c?c:0;var d=this,e=d._newSort[c].order,f=function(a){return a.dataset[d._newSort[c].sortBy]||0},g=isNaN(1*f(a))?f(a).toLowerCase():1*f(a),h=isNaN(1*f(b))?f(b).toLowerCase():1*f(b);return h>g?"asc"==e?-1:1:g>h?"asc"==e?1:-1:g==h&&d._newSort.length>c+1?d._compare(a,b,c+1):0},_printSort:function(a){var b=this,c=a?b._startOrder:b._newOrder,d=b._$parent[0].querySelectorAll(b.selectors.target),e=d[d.length-1].nextElementSibling,f=document.createDocumentFragment();b._execAction("_printSort",0,arguments);for(var g=0;g<d.length;g++){var h=d[g],i=h.nextSibling;"absolute"!==h.style.position&&(i&&"#text"==i.nodeName&&b._$parent[0].removeChild(i),b._$parent[0].removeChild(h))}for(var g=0;g<c.length;g++){var j=c[g];if("default"!=b._newSort[0].sortBy||"desc"!=b._newSort[0].order||a)f.appendChild(j),f.appendChild(document.createTextNode(" "));else{var k=f.firstChild;f.insertBefore(j,k),f.insertBefore(document.createTextNode(" "),j)}}e?b._$parent[0].insertBefore(f,e):b._$parent[0].appendChild(f),b._execAction("_printSort",1,arguments)},_parseSort:function(a){for(var b=this,c="string"==typeof a?a.split(" "):[a],d=[],e=0;e<c.length;e++){var f="string"==typeof a?c[e].split(":"):["custom",c[e]],g={sortBy:b._helpers._camelCase(f[0]),order:f[1]||"asc"};if(d.push(g),"default"==g.sortBy||"random"==g.sortBy)break}return b._execFilter("_parseSort",d,arguments)},_parseEffects:function(){var a=this,b={opacity:"",transformIn:"",transformOut:"",filter:""},c=function(b,c){if(a.animation.effects.indexOf(b)>-1){if(c){var d=a.animation.effects.indexOf(b+"(");if(d>-1){var e=a.animation.effects.substring(d),f=/\(([^)]+)\)/.exec(e),g=f[1];return{val:g}}}return!0}return!1},d=function(a,b){return b?"-"===a.charAt(0)?a.substr(1,a.length):"-"+a:a},e=function(a,e){for(var f=[["scale",".01"],["translateX","20px"],["translateY","20px"],["translateZ","20px"],["rotateX","90deg"],["rotateY","90deg"],["rotateZ","180deg"]],g=0;g<f.length;g++){var h=f[g][0],i=f[g][1],j=e&&"scale"!==h;b[a]+=c(h)?h+"("+d(c(h,!0).val||i,j)+") ":""}};return b.opacity=c("fade")?c("fade",!0).val||"0":"1",e("transformIn"),a.animation.reverseOut?e("transformOut",!0):b.transformOut=b.transformIn,b.transition={},b.transition=a._getPrefixedCSS("transition","all "+a.animation.duration+"ms "+a.animation.easing+", opacity "+a.animation.duration+"ms linear"),a.animation.stagger=c("stagger")?!0:!1,a.animation.staggerDuration=parseInt(c("stagger")?c("stagger",!0).val?c("stagger",!0).val:100:100),a._execFilter("_parseEffects",b)},_buildState:function(a){var b=this,c={};return b._execAction("_buildState",0),c={activeFilter:""===b._activeFilter?"none":b._activeFilter,activeSort:a&&b._newSortString?b._newSortString:b._activeSort,fail:!b._$show.length&&""!==b._activeFilter,$targets:b._$targets,$show:b._$show,$hide:b._$hide,totalTargets:b._$targets.length,totalShow:b._$show.length,totalHide:b._$hide.length,display:a&&b._newDisplay?b._newDisplay:b.layout.display},a?b._execFilter("_buildState",c):(b._state=c,b._execAction("_buildState",1),void 0)},_goMix:function(a){var b=this,c=function(){b._chrome&&31===b._chrome&&f(b._$parent[0]),b._setInter(),d()},d=function(){var a=window.pageYOffset,c=window.pageXOffset;document.documentElement.scrollHeight,b._getInterMixData(),b._setFinal(),b._getFinalMixData(),window.pageYOffset!==a&&window.scrollTo(c,a),b._prepTargets(),window.requestAnimationFrame?requestAnimationFrame(e):setTimeout(function(){e()},20)},e=function(){b._animateTargets(),0===b._targetsBound&&b._cleanUp()},f=function(a){var b=a.parentElement,c=document.createElement("div"),d=document.createDocumentFragment();b.insertBefore(c,a),d.appendChild(a),b.replaceChild(a,c)},g=b._buildState(!0);b._execAction("_goMix",0,arguments),!b.animation.duration&&(a=!1),b._mixing=!0,b._$container.removeClass(b.layout.containerClassFail),"function"==typeof b.callbacks.onMixStart&&b.callbacks.onMixStart.call(b._domNode,b._state,g,b),b._$container.trigger("mixStart",[b._state,g,b]),b._getOrigMixData(),a&&!b._suckMode?window.requestAnimationFrame?requestAnimationFrame(c):c():b._cleanUp(),b._execAction("_goMix",1,arguments)},_getTargetData:function(a,b){var c,d=this;a.dataset[b+"PosX"]=a.offsetLeft,a.dataset[b+"PosY"]=a.offsetTop,d.animation.animateResizeTargets&&(c=window.getComputedStyle(a),a.dataset[b+"MarginBottom"]=parseInt(c.marginBottom),a.dataset[b+"MarginRight"]=parseInt(c.marginRight),a.dataset[b+"Width"]=a.offsetWidth,a.dataset[b+"Height"]=a.offsetHeight)},_getOrigMixData:function(){var a=this,b=a._suckMode?{boxSizing:""}:window.getComputedStyle(a._$parent[0]),c=b.boxSizing||b[a._vendor+"BoxSizing"];a._incPadding="border-box"===c,a._execAction("_getOrigMixData",0),!a._suckMode&&(a.effects=a._parseEffects()),a._$toHide=a._$hide.filter(":visible"),a._$toShow=a._$show.filter(":hidden"),a._$pre=a._$targets.filter(":visible"),a._startHeight=a._incPadding?a._$parent.outerHeight():a._$parent.height();for(var d=0;d<a._$pre.length;d++){var e=a._$pre[d];a._getTargetData(e,"orig")}a._execAction("_getOrigMixData",1)},_setInter:function(){var a=this;a._execAction("_setInter",0),a._changingLayout&&a.animation.animateChangeLayout?(a._$toShow.css("display",a._newDisplay),a._changingClass&&a._$container.removeClass(a.layout.containerClass).addClass(a._newClass)):a._$toShow.css("display",a.layout.display),a._execAction("_setInter",1)},_getInterMixData:function(){var a=this;a._execAction("_getInterMixData",0);for(var b=0;b<a._$toShow.length;b++){var c=a._$toShow[b];a._getTargetData(c,"inter")}for(var b=0;b<a._$pre.length;b++){var c=a._$pre[b];a._getTargetData(c,"inter")}a._execAction("_getInterMixData",1)},_setFinal:function(){var a=this;a._execAction("_setFinal",0),a._sorting&&a._printSort(),a._$toHide.removeStyle("display"),a._changingLayout&&a.animation.animateChangeLayout&&a._$pre.css("display",a._newDisplay),a._execAction("_setFinal",1)},_getFinalMixData:function(){var a=this;a._execAction("_getFinalMixData",0);for(var b=0;b<a._$toShow.length;b++){var c=a._$toShow[b];a._getTargetData(c,"final")}for(var b=0;b<a._$pre.length;b++){var c=a._$pre[b];a._getTargetData(c,"final")}a._newHeight=a._incPadding?a._$parent.outerHeight():a._$parent.height(),a._sorting&&a._printSort(!0),a._$toShow.removeStyle("display"),a._$pre.css("display",a.layout.display),a._changingClass&&a.animation.animateChangeLayout&&a._$container.removeClass(a._newClass).addClass(a.layout.containerClass),a._execAction("_getFinalMixData",1)},_prepTargets:function(){var b=this,c={_in:b._getPrefixedCSS("transform",b.effects.transformIn),_out:b._getPrefixedCSS("transform",b.effects.transformOut)};b._execAction("_prepTargets",0),b.animation.animateResizeContainer&&b._$parent.css("height",b._startHeight+"px");for(var d=0;d<b._$toShow.length;d++){var e=b._$toShow[d],f=a(e);e.style.opacity=b.effects.opacity,e.style.display=b._changingLayout&&b.animation.animateChangeLayout?b._newDisplay:b.layout.display,f.css(c._in),b.animation.animateResizeTargets&&(e.style.width=e.dataset.finalWidth+"px",e.style.height=e.dataset.finalHeight+"px",e.style.marginRight=-(e.dataset.finalWidth-e.dataset.interWidth)+1*e.dataset.finalMarginRight+"px",e.style.marginBottom=-(e.dataset.finalHeight-e.dataset.interHeight)+1*e.dataset.finalMarginBottom+"px")}for(var d=0;d<b._$pre.length;d++){var e=b._$pre[d],f=a(e),g={x:e.dataset.origPosX-e.dataset.interPosX,y:e.dataset.origPosY-e.dataset.interPosY},c=b._getPrefixedCSS("transform","translate("+g.x+"px,"+g.y+"px)");f.css(c),b.animation.animateResizeTargets&&(e.style.width=e.dataset.origWidth+"px",e.style.height=e.dataset.origHeight+"px",e.dataset.origWidth-e.dataset.finalWidth&&(e.style.marginRight=-(e.dataset.origWidth-e.dataset.interWidth)+1*e.dataset.origMarginRight+"px"),e.dataset.origHeight-e.dataset.finalHeight&&(e.style.marginBottom=-(e.dataset.origHeight-e.dataset.interHeight)+1*e.dataset.origMarginBottom+"px"))}b._execAction("_prepTargets",1)},_animateTargets:function(){var b=this;b._execAction("_animateTargets",0),b._targetsDone=0,b._targetsBound=0,b._$parent.css(b._getPrefixedCSS("perspective",b.animation.perspectiveDistance+"px")).css(b._getPrefixedCSS("perspective-origin",b.animation.perspectiveOrigin)),b.animation.animateResizeContainer&&b._$parent.css(b._getPrefixedCSS("transition","height "+b.animation.duration+"ms ease")).css("height",b._newHeight+"px");for(var c=0;c<b._$toShow.length;c++){var d=b._$toShow[c],e=a(d),f={x:d.dataset.finalPosX-d.dataset.interPosX,y:d.dataset.finalPosY-d.dataset.interPosY},g=b._getDelay(c),h={};d.style.opacity="";for(var i=0;2>i;i++){var j=0===i?j=b._prefix:"";b._ff&&b._ff<=20&&(h[j+"transition-property"]="all",h[j+"transition-timing-function"]=b.animation.easing+"ms",h[j+"transition-duration"]=b.animation.duration+"ms"),h[j+"transition-delay"]=g+"ms",h[j+"transform"]="translate("+f.x+"px,"+f.y+"px)"}(b.effects.transform||b.effects.opacity)&&b._bindTargetDone(e),b._ff&&b._ff<=20?e.css(h):e.css(b.effects.transition).css(h)}for(var c=0;c<b._$pre.length;c++){var d=b._$pre[c],e=a(d),f={x:d.dataset.finalPosX-d.dataset.interPosX,y:d.dataset.finalPosY-d.dataset.interPosY},g=b._getDelay(c);(d.dataset.finalPosX!==d.dataset.origPosX||d.dataset.finalPosY!==d.dataset.origPosY)&&b._bindTargetDone(e),e.css(b._getPrefixedCSS("transition","all "+b.animation.duration+"ms "+b.animation.easing+" "+g+"ms")),e.css(b._getPrefixedCSS("transform","translate("+f.x+"px,"+f.y+"px)")),b.animation.animateResizeTargets&&(d.dataset.origWidth-d.dataset.finalWidth&&1*d.dataset.finalWidth&&(d.style.width=d.dataset.finalWidth+"px",d.style.marginRight=-(d.dataset.finalWidth-d.dataset.interWidth)+1*d.dataset.finalMarginRight+"px"),d.dataset.origHeight-d.dataset.finalHeight&&1*d.dataset.finalHeight&&(d.style.height=d.dataset.finalHeight+"px",d.style.marginBottom=-(d.dataset.finalHeight-d.dataset.interHeight)+1*d.dataset.finalMarginBottom+"px"))}b._changingClass&&b._$container.removeClass(b.layout.containerClass).addClass(b._newClass);for(var c=0;c<b._$toHide.length;c++){for(var d=b._$toHide[c],e=a(d),g=b._getDelay(c),k={},i=0;2>i;i++){var j=0===i?j=b._prefix:"";k[j+"transition-delay"]=g+"ms",k[j+"transform"]=b.effects.transformOut,k.opacity=b.effects.opacity}e.css(b.effects.transition).css(k),(b.effects.transform||b.effects.opacity)&&b._bindTargetDone(e)}b._execAction("_animateTargets",1)},_bindTargetDone:function(b){var c=this,d=b[0];c._execAction("_bindTargetDone",0,arguments),d.dataset.bound||(d.dataset.bound=!0,c._targetsBound++,b.on("webkitTransitionEnd.mixItUp transitionend.mixItUp",function(e){(e.originalEvent.propertyName.indexOf("transform")>-1||e.originalEvent.propertyName.indexOf("opacity")>-1)&&a(e.originalEvent.target).is(c.selectors.target)&&(b.off(".mixItUp"),delete d.dataset.bound,c._targetDone())})),c._execAction("_bindTargetDone",1,arguments)},_targetDone:function(){var a=this;a._execAction("_targetDone",0),a._targetsDone++,a._targetsDone===a._targetsBound&&a._cleanUp(),a._execAction("_targetDone",1)},_cleanUp:function(){var b=this,c=b.animation.animateResizeTargets?"transform opacity width height margin-bottom margin-right":"transform opacity";unBrake=function(){b._$targets.removeStyle("transition",b._prefix)},b._execAction("_cleanUp",0),b._changingLayout?b._$show.css("display",b._newDisplay):b._$show.css("display",b.layout.display),b._$targets.css(b._brake),b._$targets.removeStyle(c,b._prefix).removeAttr("data-inter-pos-x data-inter-pos-y data-final-pos-x data-final-pos-y data-orig-pos-x data-orig-pos-y data-orig-height data-orig-width data-final-height data-final-width data-inter-width data-inter-height data-orig-margin-right data-orig-margin-bottom data-inter-margin-right data-inter-margin-bottom data-final-margin-right data-final-margin-bottom"),b._$hide.removeStyle("display"),b._$parent.removeStyle("height transition perspective-distance perspective perspective-origin-x perspective-origin-y perspective-origin perspectiveOrigin",b._prefix),b._sorting&&(b._printSort(),b._activeSort=b._newSortString,b._sorting=!1),b._changingLayout&&(b._changingDisplay&&(b.layout.display=b._newDisplay,b._changingDisplay=!1),b._changingClass&&(b._$parent.removeClass(b.layout.containerClass).addClass(b._newClass),b.layout.containerClass=b._newClass,b._changingClass=!1),b._changingLayout=!1),b._refresh(),b._buildState(),b._state.fail&&b._$container.addClass(b.layout.containerClassFail),b._$show=a(),b._$hide=a(),window.requestAnimationFrame&&requestAnimationFrame(unBrake),b._mixing=!1,"function"==typeof b.callbacks._user&&b.callbacks._user.call(b._domNode,b._state,b),"function"==typeof b.callbacks.onMixEnd&&b.callbacks.onMixEnd.call(b._domNode,b._state,b),b._$container.trigger("mixEnd",[b._state,b]),b._state.fail&&("function"==typeof b.callbacks.onMixFail&&b.callbacks.onMixFail.call(b._domNode,b._state,b),b._$container.trigger("mixFail",[b._state,b])),b._loading&&("function"==typeof b.callbacks.onMixLoad&&b.callbacks.onMixLoad.call(b._domNode,b._state,b),b._$container.trigger("mixLoad",[b._state,b])),b._queue.length&&(b._execAction("_queue",0),b.multiMix(b._queue[0][0],b._queue[0][1],b._queue[0][2]),b._queue.splice(0,1)),b._execAction("_cleanUp",1),b._loading=!1},_getPrefixedCSS:function(a,b,c){var d=this,e={};for(i=0;2>i;i++){var f=0===i?d._prefix:"";e[f+a]=c?f+b:b}return d._execFilter("_getPrefixedCSS",e,arguments)},_getDelay:function(a){var b=this,c="function"==typeof b.animation.staggerSequence?b.animation.staggerSequence.call(b._domNode,a,b._state):a,d=b.animation.stagger?c*b.animation.staggerDuration:0;return b._execFilter("_getDelay",d,arguments)},_parseMultiMixArgs:function(a){for(var b=this,c={command:null,animate:b.animation.enable,callback:null},d=0;d<a.length;d++){var e=a[d];null!==e&&("object"==typeof e||"string"==typeof e?c.command=e:"boolean"==typeof e?c.animate=e:"function"==typeof e&&(c.callback=e))}return b._execFilter("_parseMultiMixArgs",c,arguments)},_parseInsertArgs:function(b){for(var c=this,d={index:0,$object:a(),multiMix:{filter:c._state.activeFilter},callback:null},e=0;e<b.length;e++){var f=b[e];"number"==typeof f?d.index=f:"object"==typeof f&&f instanceof a?d.$object=f:"object"==typeof f&&c._helpers._isElement(f)?d.$object=a(f):"object"==typeof f&&null!==f?d.multiMix=f:"boolean"!=typeof f||f?"function"==typeof f&&(d.callback=f):d.multiMix=!1}return c._execFilter("_parseInsertArgs",d,arguments)},_execAction:function(a,b,c){var d=this,e=b?"post":"pre";if(!d._actions.isEmptyObject&&d._actions.hasOwnProperty(a))for(var f in d._actions[a][e])d._actions[a][e][f].call(d,c)},_execFilter:function(a,b,c){var d=this;if(d._filters.isEmptyObject||!d._filters.hasOwnProperty(a))return b;for(var e in d._filters[a])return d._filters[a][e].call(d,c)},_helpers:{_camelCase:function(a){return a.replace(/-([a-z])/g,function(a){return a[1].toUpperCase()})},_isElement:function(a){return window.HTMLElement?a instanceof HTMLElement:null!==a&&1===a.nodeType&&"string"===a.nodeName}},isMixing:function(){var a=this;return a._execFilter("isMixing",a._mixing)},filter:function(){var a=this,b=a._parseMultiMixArgs(arguments);a._clicking&&(a._toggleString=""),a.multiMix({filter:b.command},b.animate,b.callback)},sort:function(){var a=this,b=a._parseMultiMixArgs(arguments);a.multiMix({sort:b.command},b.animate,b.callback)},changeLayout:function(){var a=this,b=a._parseMultiMixArgs(arguments);a.multiMix({changeLayout:b.command},b.animate,b.callback)},multiMix:function(){var a=this,c=a._parseMultiMixArgs(arguments);if(a._execAction("multiMix",0,arguments),a._mixing)a.animation.queue&&a._queue.length<a.animation.queueLimit?(a._queue.push(arguments),a.controls.enable&&!a._clicking&&a._updateControls(c.command),a._execAction("multiMixQueue",1,arguments)):("function"==typeof a.callbacks.onMixBusy&&a.callbacks.onMixBusy.call(a._domNode,a._state,a),a._$container.trigger("mixBusy",[a._state,a]),a._execAction("multiMixBusy",1,arguments));else{a.controls.enable&&!a._clicking&&(a.controls.toggleFilterButtons&&a._buildToggleArray(),a._updateControls(c.command,a.controls.toggleFilterButtons)),a._queue.length<2&&(a._clicking=!1),delete a.callbacks._user,c.callback&&(a.callbacks._user=c.callback);var d=c.command.sort,e=c.command.filter,f=c.command.changeLayout;a._refresh(),d&&(a._newSort=a._parseSort(d),a._newSortString=d,a._sorting=!0,a._sort()),e!==b&&(e="all"===e?a.selectors.target:e,a._activeFilter=e),a._filter(),f&&(a._newDisplay="string"==typeof f?f:f.display||a.layout.display,a._newClass=f.containerClass||"",(a._newDisplay!==a.layout.display||a._newClass!==a.layout.containerClass)&&(a._changingLayout=!0,a._changingClass=a._newClass!==a.layout.containerClass,a._changingDisplay=a._newDisplay!==a.layout.display)),a._$targets.css(a._brake),a._goMix(c.animate^a.animation.enable?c.animate:a.animation.enable),a._execAction("multiMix",1,arguments)}},insert:function(){var a=this,b=a._parseInsertArgs(arguments),c="function"==typeof b.callback?b.callback:null,d=document.createDocumentFragment(),e=function(){return a._refresh(),a._$targets.length?b.index<a._$targets.length||!a._$targets.length?a._$targets[b.index]:a._$targets[a._$targets.length-1].nextElementSibling:a._$parent[0].children[0]}();if(a._execAction("insert",0,arguments),b.$object){for(var f=0;f<b.$object.length;f++){var g=b.$object[f];d.appendChild(g),d.appendChild(document.createTextNode(" "))}a._$parent[0].insertBefore(d,e)}a._execAction("insert",1,arguments),"object"==typeof b.multiMix&&a.multiMix(b.multiMix,c)},prepend:function(){var a=this,b=a._parseInsertArgs(arguments);a.insert(0,b.$object,b.multiMix,b.callback)},append:function(){var a=this,b=a._parseInsertArgs(arguments);a.insert(a._state.totalTargets,b.$object,b.multiMix,b.callback)},getOption:function(a){var c=this,d=function(a,c){for(var d=c.split("."),e=d.pop(),f=d.length,g=1,h=d[0]||c;(a=a[h])&&f>g;)h=d[g],g++;return a!==b?a[e]!==b?a[e]:a:void 0};return a?c._execFilter("getOption",d(c,a),arguments):c},setOptions:function(b){var c=this;c._execAction("setOptions",0,arguments),"object"==typeof b&&a.extend(!0,c,b),c._execAction("setOptions",1,arguments)},getState:function(){var a=this;return a._execFilter("getState",a._state,a)},forceRefresh:function(){var a=this;a._refresh(!1,!0)},destroy:function(b){var c=this;c._execAction("destroy",0,arguments),c._$body.add(a(c.selectors.sort)).add(a(c.selectors.filter)).off(".mixItUp");for(var d=0;d<c._$targets.length;d++){var e=c._$targets[d];b&&(e.style.display=""),delete e.mixParent}c._execAction("destroy",1,arguments),delete a.MixItUp.prototype._instances[c._id]}},a.fn.mixItUp=function(){var c,d=arguments,e=[],f=function(b,c){var d=new a.MixItUp,e=function(){return("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6).toUpperCase()};d._execAction("_instantiate",0,arguments),b.id=b.id?b.id:"MixItUp"+e(),d._instances[b.id]||(d._instances[b.id]=d,d._init(b,c)),d._execAction("_instantiate",1,arguments)};return c=this.each(function(){if(d&&"string"==typeof d[0]){var c=a.MixItUp.prototype._instances[this.id];if("isLoaded"==d[0])e.push(c?!0:!1);else{var g=c[d[0]](d[1],d[2],d[3]);g!==b&&e.push(g)}}else f(this,d[0])}),e.length?e.length>1?e:e[0]:c},a.fn.removeStyle=function(a,c){return c=c?c:"",this.each(function(){for(var d=this,e=a.split(" "),f=0;f<e.length;f++)for(var g=0;2>g;g++){var h=g?e[f]:c+e[f];if(d.style[h]!==b&&"unknown"!=typeof d.style[h]&&d.style[h].length>0&&(d.style[h]=""),!c)break}d.attributes&&d.attributes.style&&d.attributes.style!==b&&""===d.attributes.style.nodeValue&&d.attributes.removeNamedItem("style")})}}(jQuery); \ No newline at end of file diff --git a/components/CommunecterController.php b/components/CommunecterController.php new file mode 100755 index 0000000000000000000000000000000000000000..e117eda38bd25785d0c858e2e7f4efd75af1fa5a --- /dev/null +++ b/components/CommunecterController.php @@ -0,0 +1,702 @@ +<?php +/** + * Controller is the customized base controller class. + * All controller classes for this application should extend from this base class. + */ +class CommunecterController extends Controller +{ + public $version = "v0.2.2.2"; + public $versionDate = "29/07/2016 19:12"; + public $title = "Communectez"; + public $subTitle = "se connecter à sa commune"; + public $pageTitle = "Communecter, se connecter à sa commune"; + public static $moduleKey = "communecter"; + public $keywords = "communecter,connecter, commun,commune, réseau, sociétal, citoyen, société, territoire, participatif, social, smarterre,tiers lieux, "; + public $description = "Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société."; + public $projectName = ""; + public $projectImage = "/images/CTK.png"; + public $projectImageL = "/images/logo.png"; + /*public $footerImages = array( + array("img"=>"/images/logoORD.PNG","url"=>"http://openrd.io"), + array("img"=>"/images/logo_region_reunion.png","url"=>"http://www.regionreunion.com"), + array("img"=>"/images/technopole.jpg","url"=>"http://technopole-reunion.com"), + array("img"=>"/images/Logo_Licence_Ouverte_noir_avec_texte.gif","url"=>"https://data.gouv.fr"), + array("img"=>'/images/blog-github.png',"url"=>"https://github.com/orgs/pixelhumain/dashboard"), + array("img"=>'/images/opensource.gif',"url"=>"http://opensource.org/"));*/ + const theme = "ph-dori"; + public $person = null; + public $themeStyle = "theme-style11";//3,4,5,7,9 + public $notifications = array(); + //TODO - Faire le tri des liens + //TODO - Les children ne s'affichent pas dans le menu + public $toolbarMenuAdd = array( + array('label' => "My Network", "key"=>"myNetwork", + "children"=> array( + //"myaccount" => array( "label"=>"My Account","key"=>"newContributor", "class"=>"new-contributor", "href" => "#newContributor", "iconStack"=> array("fa fa-user fa-stack-1x fa-lg","fa fa-pencil fa-stack-1x stack-right-bottom text-danger")), + "showContributors" => array( "label"=>"Find People","class"=>"show-contributor","key"=>"showContributors", "href" => "#showContributors", "iconStack"=> array("fa fa-user fa-stack-1x fa-lg","fa fa-search fa-stack-1x stack-right-bottom text-danger")), + "newInvite" => array( "label"=>"Invite Someone","key"=>"invitePerson", "class"=>"ajaxSV", "onclick" => "", "iconStack"=> array("fa fa-user fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + ) + ), + array('label' => "Organisation", "key"=>"organization", + "children"=> array( + "addOrganization" => array( "label"=>"Add an Organisation","key"=>"addOrganization", "class"=>"ajaxSV", "onclick"=>"", "iconStack"=> array("fa fa-group fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")) + ) + ), + array('label' => "News", "key"=>"note", + "children"=> array( + "createNews" => array( "label"=>"Create news", "key"=>"new-news", "class"=>"new-news", "iconStack"=> array("fa fa-bullhorn fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + //"newsStream" => array( "label"=>"News stream", "key"=>"newsstream", "class"=>"ajaxSV", "onclick"=>"openSubView('News stream', '/communecter/news/newsstream', null)", "iconStack"=> array("fa fa-list fa-stack-1x fa-lg","fa fa-search fa-stack-1x stack-right-bottom text-danger")), + //"newNote" => array( "label"=>"Add new note", "class"=>"new-note", "key"=>"newNote", "href" => "#newNote", "iconStack"=> array("fa fa-list fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + // "readNote" => array( "label"=>"Read All notes","class"=>"read-all-notes","key"=>"readNote", "href" => "#readNote", "iconStack"=> array("fa fa-list fa-stack-1x fa-lg","fa fa-share fa-stack-1x stack-right-bottom text-danger")), + ) + ), + array('label' => "Event", "key"=>"event", + "children"=> array( + "newEvent" => array( "label"=>"Add new event","key"=>"newEvent", "class"=>"init-event", "href" => "#newEvent", "iconStack"=> array("fa fa-calendar-o fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + "showCalendar" => array( "label"=>"Show calendar","class"=>"show-calendar","key"=>"showCalendar", "href" => "/ph/communecter/event/calendarview", "iconStack"=> array("fa fa-calendar-o fa-stack-1x fa-lg","fa fa-share fa-stack-1x stack-right-bottom text-danger")), + ) + ), + array('label' => "Projects", "key"=>"projects", + "children"=> array( + "newProject" => array( "label"=>"Add new Project","key"=>"newProject", "class"=>"new-project", "href" => "#newProject", "iconStack"=> array("fa fa-cogs fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + ) + ), + array('label' => "Rooms", "key"=>"rooms", + "children"=> array( + "newRoom" => array( "label"=>"Add new Room","key"=>"newRoom", "class"=>"ajaxSV", "onclick"=>"", "iconStack"=> array("fa fa-comments fa-stack-1x fa-lg","fa fa-plus fa-stack-1x stack-right-bottom text-danger")), + ) + ) + ); + public $subviews = array( + //"news.newsSV", + //"person.invite", + //"event.addAttendeesSV" + ); + public $pages = array( + "admin" => array( + "index" => array("href" => "/ph/co2/admin"), + "accueil" => array("href" => "/ph/co2/accueil"), + "directory" => array("href" => "/ph/co2/admin/directory"), + "switchto" => array("href" => "/ph/co2/admin/switchto"), + "delete" => array("href" => "/ph/co2/admin/delete"), + "activateuser" => array("href" => "/ph/co2/admin/activateuser"), + "importdata" => array("href" => "/ph/co2/admin/importdata"), + "previewdata" => array("href" => "/ph/co2/admin/previewdata"), + "importinmongo" => array("href" => "/ph/co2/admin/importinmongo"), + "assigndata" => array("href" => "/ph/co2/admin/assigndata"), + "checkdataimport" => array("href" => "/ph/co2/admin/checkdataimport"), + "openagenda" => array("href" => "/ph/co2/admin/openagenda"), + "checkventsopenagendaindb" => array("href" => "/ph/co2/admin/checkventsopenagendaindb"), + "importeventsopenagendaindb" => array("href" => "/ph/co2/admin/importeventsopenagendaindb"), + "checkgeocodage" => array("href" => "/ph/co2/admin/checkgeocodage"), + "getentitybadlygeolocalited" => array("href" => "/ph/co2/admin/getentitybadlygeolocalited"), + "getdatabyurl" => array("href" => "/ph/co2/admin/getdatabyurl"), + "adddata" => array("href" => "/ph/co2/admin/adddata"), + "adddataindb" => array("href" => "/ph/co2/admin/adddataindb"), + "createfileforimport" => array("href" => "/ph/co2/admin/createfileforimport"), + "sourceadmin" => array("href" => "/ph/co2/admin/sourceadmin"), + "moderate" => array("href" => "/ph/co2/admin/moderate"), + "statistics" => array("href" => "/ph/co2/stat/chart"), + "checkcities" => array("href" => "/ph/co2/admin/checkcities"), + "checkcedex" => array("href" => "/ph/co2/admin/checkcedex"), + "downloadfile" => array("href" => "/ph/co2/admin/downloadfile"), + "createfile" => array("href" => "/ph/co2/admin/createfile"), + "mailerrordashboard" => array("href" => "/ph/co2/admin/mailerrordashboard"), + "cities" => array("href" => "/ph/co2/admin/cities"), + "circuits" => array("href" => "/ph/co2/admin/circuits"), + ), + + "adminpublic" => array( + "index" => array("href" => "/ph/co2/adminpublic/index"), + "adddata" => array("href" => "/ph/co2/adminpublic/adddata"), + "adddataindb" => array("href" => "/ph/co2/adminpublic/adddataindb"), + "createfile" => array("href" => "/ph/co2/adminpublic/createfile"), + "sourceadmin" => array("href" => "/ph/co2/adminpublic/sourceadmin"), + "assigndata" => array("href" => "/ph/co2/adminpublic/assigndata"), + "getdatabyurl" => array("href" => "/ph/co2/adminpublic/getdatabyurl"), + "previewdata" => array("href" => "/ph/co2/adminpublic/previewdata"), + "interopproposed" => array("href" => "/ph/co2/adminpublic/interopproposed"), + "cleantags" => array("href" => "ph/co2/adminpublic/cleantags"), + ), + "collections" => array( + "add" => array("href" => "/ph/co2/collections/add"), + "list" => array("href" => "/ph/co2/collections/list"), + "crud" => array("href" => "/ph/co2/collections/crud"), + ), + "tool" => array( + "get" => array("href" => "/ph/co2/tool/get") + ), + "rocketchat" => array( + "index" => array("href" => "/ph/co2/rocketchat/index"), + "cors" => array("href" => "/ph/co2/rocketchat/cors"), + "login" => array("href" => "/ph/co2/rocketchat/login"), + "logint" => array("href" => "/ph/co2/rocketchat/logint"), + "test" => array("href" => "/ph/co2/rocketchat/test"), + "testt" => array("href" => "/ph/co2/rocketchat/testt"), + "chat" => array("href" => "/ph/co2/rocketchat/chat"), + "list" => array("href" => "/ph/co2/rocketchat/list"), + "invite" => array("href" => "/ph/co2/rocketchat/invite"), + ), + "default" => array( + "index" => array("href" => "/ph/co2/default/index", "public" => true), + "directory" => array("href" => "/ph/co2/default/directory", "public" => true), + "directoryjs" => array("href" => "/ph/co2/default/directoryjs", "public" => true), + "agenda" => array("href" => "/ph/co2/default/agenda", "public" => true), + "news" => array("href" => "/ph/co2/default/news", "public" => true), + "home" => array("href" => "/ph/co2/default/home", "public" => true), + "apropos" => array("href" => "/ph/co2/default/apropos", "public" => true), + "add" => array("href" => "/ph/co2/default/add"), + "view" => array("href" => "/ph/co2/default/view", "public" => true), + "dir" => array("href" => "/ph/co2/default/dir", "public" => true), + "twostepregister" => array("href" => "/ph/co2/default/twostepregister"), + "switch" => array("href" => "/ph/co2/default/switch"), + "live" => array("href" => "/ph/co2/default/live"), + ), + "city"=> array( + "index" => array("href" => "/ph/co2/city/index", "public" => true), + "detail" => array("href" => "/ph/co2/city/detail", "public" => true), + "detailforminmap" => array("href" => "/ph/co2/city/detailforminmap", "public" => true), + "dashboard" => array("href" => "/ph/co2/city/dashboard", "public" => true), + "directory" => array("href" => "/ph/co2/city/directory", "public" => true, + "title"=>"City Directory", "subTitle"=>"Find Local Actors and Actions : People, Organizations, Events"), + 'statisticpopulation' => array("href" => "/ph/co2/city/statisticpopulation", "public" => true), + 'getcitydata' => array("href" => "/ph/co2/city/getcitydata", "public" => true), + 'getcityjsondata' => array("href" => "/ph/co2/city/getcityjsondata", "public" => true), + 'statisticcity' => array("href" => "/ph/co2/city/statisticcity", "public" => true), + 'statisticPopulation' => array("href" => "/ph/co2/city/statisticPopulation", "public" => true), + 'getcitiesdata' => array("href" => "/ph/co2/city/getcitiesdata"), + 'opendata' => array("href" => "/ph/co2/city/opendata","public" => true), + 'getoptiondata' => array("href" => "/ph/co2/city/getoptiondata"), + 'getlistoption' => array("href" => "/ph/co2/city/getlistoption"), + 'getpodopendata' => array("href" => "/ph/co2/city/getpodopendata"), + 'addpodopendata' => array("href" => "/ph/co2/city/addpodopendata"), + 'getlistcities' => array("href" => "/ph/co2/city/getlistcities"), + 'creategraph' => array("href" => "/ph/co2/city/creategraph"), + 'graphcity' => array("href" => "/ph/co2/city/graphcity"), + 'updatecitiesgeoformat' => array("href" => "/ph/co2/city/updatecitiesgeoformat","public" => true), + 'getinfoadressbyinsee' => array("href" => "/ph/co2/city/getinfoadressbyinsee"), + 'cityexists' => array("href" => "/ph/co2/city/cityexists"), + 'autocompletemultiscope' => array("href" => "/ph/co2/city/autocompletemultiscope"), + "save" => array("href" => "/ph/co2/city/save", "public" => true), + 'getlevel' => array("href" => "/ph/co2/city/getlevel"), + ), + "news"=> array( + "index" => array( "href" => "/ph/co2/news/index", "public" => true,'title' => "Fil d'actualités - N.E.W.S", "subTitle"=>"Nord.Est.West.Sud","pageTitle"=>"Fil d'actualités - N.E.W.S"), + "latest" => array( "href" => "/ph/co2/news/latest"), + "save" => array( "href" => "/ph/co2/news/save"), + "detail" => array( "href" => "/ph/co2/news/detail"), + "delete" => array( "href" => "/ph/co2/news/delete"), + "updatefield" => array( "href" => "/ph/co2/news/updatefield"), + "update" => array( "href" => "/ph/co2/news/update"), + "extractprocess" => array( "href" => "/ph/co2/news/extractprocess"), + "moderate" => array( "href" => "/ph/co2/news/moderate"), + "share" => array("href" => "/ph/co2/news/share"), + ), + "search"=> array( + "getmemberautocomplete" => array("href" => "/ph/co2/search/getmemberautocomplete"), + "getshortdetailsentity" => array("href" => "/ph/co2/search/getshortdetailsentity"), + "index" => array("href" => "/ph/co2/search/index"), + "mainmap" => array("href" => "/ph/co2/default/mainmap", "public" => true) + ), + "network" => array( + "simplydirectory" => array("href" => "/ph/co2/network/simplydirectory") + ), + "rooms"=> array( + "index" => array("href" => "/ph/co2/rooms/index"), + "saveroom" => array("href" => "/ph/co2/rooms/saveroom"), + "editroom" => array("href" => "/ph/co2/rooms/editroom"), + "external" => array("href" => "/ph/co2/rooms/external"), + "actions" => array("href" => "/ph/co2/rooms/actions"), + "action" => array("href" => "/ph/co2/rooms/action"), + "editaction" => array("href" => "/ph/co2/rooms/editaction"), + 'saveaction' => array("href" => "/ph/co2/rooms/saveaction"), + 'closeaction' => array("href" => "/ph/co2/rooms/closeaction"), + 'assignme' => array("href" => "/ph/co2/rooms/assignme"), + 'fastaddaction' => array("href" => "/ph/co2/rooms/fastaddaction"), + 'move' => array("href" => "/ph/co2/rooms/move"), + ), + "gantt"=> array( + "index" => array("href" => "/ph/co2/gantt/index", "public" => true), + "savetask" => array("href" => "/ph/co2/gantt/savetask"), + "removetask" => array("href" => "/ph/co2/gantt/removetask"), + "generatetimeline" => array("href" => "/ph/co2/gantt/generatetimeline"), + "addtimesheetsv" => array("href" => "/ph/co2/gantt/addtimesheetsv"), + ), + "need"=> array( + "index" => array("href" => "/ph/co2/need/index", "public" => true), + "description" => array("href" => "/ph/co2/need/dashboard/description"), + "dashboard" => array("href" => "/ph/co2/need/dashboard"), + "detail" => array("href" => "/ph/co2/need/detail", "public" => true), + "saveneed" => array("href" => "/ph/co2/need/saveneed"), + "updatefield" => array("href" => "/ph/co2/need/updatefield"), + "addhelpervalidation" => array("href" => "/ph/co2/need/addhelpervalidation"), + "addneedsv" => array("href" => "/ph/co2/need/addneedsv"), + ), + "person"=> array( + "login" => array("href" => "/ph/co2/person/login",'title' => "Log me In"), + "logged" => array("href" => "/ph/co2/person/logged"), + "sendemail" => array("href" => "/ph/co2/person/sendemail"), + "index" => array("href" => "/ph/co2/person/dashboard",'title' => "My Dashboard"), + "authenticate" => array("href" => "/ph/co2/person/authenticate",'title' => "Authentication"), + "dashboard" => array("href" => "/ph/co2/person/dashboard"), + "detail" => array("href" => "/ph/co2/person/detail", "public" => true), + "follows" => array("href" => "/ph/co2/person/follows"), + "disconnect" => array("href" => "/ph/co2/person/disconnect"), + "register" => array("href" => "/ph/co2/person/register"), + "activate" => array('href' => "/ph/co2/person/activate"), + "updatesettings" => array('href' => "/ph/co2/person/updatesettings"), + "validateinvitation" => array('href' => "/ph/co2/person/validateinvitation", "public" => true), + "logout" => array("href" => "/ph/co2/person/logout"), + 'getthumbpath' => array("href" => "/ph/co2/person/getThumbPath"), + 'getnotification' => array("href" => "/person/getNotification"), + 'changepassword' => array("href" => "/person/changepassword"), + 'changerole' => array("href" => "/person/changerole"), + 'checkusername' => array("href" => "/person/checkusername"), + "invite" => array("href" => "/ph/co2/person/invite"), + "invitation" => array("href" => "/ph/co2/person/invitation"), + "updatefield" => array("href" => "/person/updatefield"), + "update" => array("href" => "/person/update"), + "getuserautocomplete" => array('href' => "/person/getUserAutoComplete"), + 'checklinkmailwithuser' => array("href" => "/ph/co2/checklinkmailwithuser"), + 'getuseridbymail' => array("href" => "/ph/co2/getuseridbymail"), + "getbyid" => array("href" => "/ph/co2/person/getbyid"), + "getorganization" => array("href" => "/ph/co2/person/getorganization"), + "updatename" => array("href" => "/ph/co2/person/updatename"), + "updateprofil" => array("href" => "/ph/co2/person/updateprofil"), + "updatewithjson" => array("href" => "/ph/co2/person/updatewithjson"), + "updatemultitag" => array("href" => "/ph/co2/person/updatemultitag"), + "updatemultiscope" => array("href" => "/ph/co2/person/updatemultiscope"), + "sendinvitationagain" => array("href" => "/ph/co2/person/sendinvitationagain"), + "removehelpblock" => array("href" => "/ph/co2/person/removehelpblock"), + + + "chooseinvitecontact"=> array('href' => "/ph/co2/person/chooseinvitecontact"), + "sendmail"=> array('href' => "/ph/co2/person/sendmail"), + + "telegram" => array("href" => "/ph/co2/person/telegram", "public" => true), + + //Init Data + "clearinitdatapeopleall" => array("href" =>"'/ph/co2/person/clearinitdatapeopleall'"), + "initdatapeopleall" => array("href" =>"'/ph/co2/person/initdatapeopleall'"), + "importmydata" => array("href" =>"'/ph/co2/person/importmydata'"), + "about" => array("href" => "/person/about"), + "data" => array("href" => "/person/scopes"), + "directory" => array("href" => "/ph/co2/city/directory", "public" => true, "title"=>"My Directory", "subTitle"=>"My Network : People, Organizations, Events"), + + + "get" => array("href" => "/ph/co2/person/get"), + "getcontactsbymails" => array("href" => "/ph/co2/person/getcontactsbymails"), + "shoppingcart" => array("href" => "/ph/co2/person/shoppingcart"), + "updatescopeinter" => array("href" => "/ph/co2/person/updatescopeinter"), + ), + "organization"=> array( + "addorganizationform" => array("href" => "/ph/co2/organization/addorganizationform", + 'title' => "Organization", + "subTitle"=>"Découvrez les organization locales", + "pageTitle"=>"Organization : Association, Entreprises, Groupes locales"), + "save" => array("href" => "/ph/co2/organization/save", + 'title' => "Organization", + "subTitle"=>"Découvrez les organization locales", + "pageTitle"=>"Organization : Association, Entreprises, Groupes locales"), + "update" => array("href" => "/ph/co2/organization/update", + 'title' => "Organization", + "subTitle"=>"Découvrez les organization locales", + "pageTitle"=>"Organization : Association, Entreprises, Groupes locales"), + "getbyid" => array("href" => "/ph/co2/organization/getbyid"), + "updatefield" => array("href" => "/ph/co2/organization/updatefield"), + "join" => array("href" => "/ph/co2/organization/join"), + "sig" => array("href" => "/ph/co2/organization/sig"), + //Links // create a Link controller ? + "addneworganizationasmember" => array("href" => "/ph/co2/organization/AddNewOrganizationAsMember"), + //Dashboards + "dashboard" => array("href"=>"/ph/co2/organization/dashboard"), + "dashboardmember" => array("href"=>"/ph/co2/organization/dashboardMember"), + "dashboard1" => array("href"=>"/ph/co2/organization/dashboard1"), + "directory" => array("href"=>"/ph/co2/organization/directory", "public" => true), + "disabled" => array("href"=>"/ph/co2/organization/disabled"), + "detail" => array("href"=>"/ph/co2/organization/detail", "public" => true), + "addmember" => array("href"=>"/ph/co2/organization/addmember"), + "updatesettings" => array('href'=>"/ph/co2/organization/updatesettings"), + "get" => array("href" => "/ph/co2/organization/get"), + ), + "event"=> array( + "save" => array("href" => "/ph/co2/event/save"), + "update" => array("href" => "/ph/co2/event/update"), + "saveattendees" => array("href" => "/ph/co2/event/saveattendees"), + "removeattendee" => array("href" => "/ph/co2/event/removeattendee"), + "detail" => array("href" => "/ph/co2/event/detail", "public" => true), + "delete" => array("href" => "ph/co2/event/delete"), + "updatefield" => array("href" => "ph/co2/event/updatefield"), + "calendarview" => array("href" => "ph/co2/event/calendarview"), + "eventsv" => array("href" => "ph/co2/event/eventsv" , "public" => true), + "directory" => array("href"=>"/ph/co2/event/directory", "public" => true), + "addattendeesv" => array("href"=>"/ph/co2/event/addattendeesv"), + "updatesettings" => array('href'=>"/ph/co2/event/updatesettings") + ), + "project"=> array( + "edit" => array("href" => "/ph/co2/project/edit"), + "get" => array("href" => "/ph/co2/project/get"), + "save" => array("href" => "/ph/co2/project/save"), + "update" => array("href" => "/ph/co2/project/update"), + "savecontributor" => array("href" => "/ph/co2/project/savecontributor"), + "dashboard" => array("href" => "/ph/co2/project/dashboard"), + "detail" => array("href" => "/ph/co2/project/detail", "public" => true), + "removeproject" => array("href" => "/ph/co2/project/removeproject"), + "editchart" => array("href" => "/ph/co2/project/editchart"), + "updatefield" => array("href" => "/ph/co2/project/updatefield"), + "projectsv" => array("href" => "/ph/co2/project/projectsv"), + "addcontributorsv" => array("href" => "/ph/co2/project/addcontributorsv"), + "addchartsv" => array("href" => "/ph/co2/project/addchartsv"), + "directory" => array("href"=>"/ph/co2/project/directory", "public" => true), + "updatesettings" => array('href'=>"/ph/co2/project/updatesettings"), + ), + "chart" => array( + "addchartsv" => array("href" => "/ph/co2/chart/addchartsv"), + "index" => array("href" => "/ph/co2/chart/index"), + "header" => array("href" => "/ph/co2/chart/header"), + "editchart" => array("href" => "/ph/co2/chart/editchart"), + "get" => array("href" => "/ph/co2/chart/get"), + ), + "job"=> array( + "edit" => array("href" => "/ph/co2/job/edit"), + "public" => array("href" => "/ph/co2/job/public"), + "save" => array("href" => "/ph/co2/job/save"), + "delete" => array("href" => "/ph/co2/job/delete"), + "list" => array("href" => "/ph/co2/job/list"), + ), + "pod" => array( + "slideragenda" => array("href" => "/ph/co2/pod/slideragenda", "public" => true), + "photovideo" => array("href" => "ph/co2/pod/photovideo"), + "fileupload" => array("href" => "ph/co2/pod/fileupload"), + "activitylist" => array("href" => "ph/co2/pod/activitylist"), + "circuit" => array("href" => "/ph/co2/pod/circuit"), + ), + "bookmark" => array( + "delete" => array("href" => "ph/communecter/bookmark/delete"), + ), + "slug" => array( + "check" => array("href" => "ph/communecter/slug/check"), + "getinfo" => array("href" => "ph/communecter/slug/getinfo"), + ), + "gallery" => array( + "index" => array("href" => "ph/communecter/gallery/index"), + "gallery" => array("href" => "ph/communecter/gallery/gallery"), + "crudcollection" => array("href" => "ph/communecter/gallery/crudcollection"), + "crudfile" => array("href" => "ph/communecter/gallery/crudfile"), + "removebyid" => array("href" => "ph/communecter/gallery/removebyid"), + "filter" => array("href" => "ph/communecter/gallery/filter"), + ), + "link" => array( + "removemember" => array("href" => "/ph/co2/link/removemember"), + "removerole" => array("href" => "/ph/co2/link/removerole"), + "removecontributor" => array("href" => "/ph/co2/link/removecontributor"), + "disconnect" => array("href" => "/ph/co2/link/disconnect"), + "connect" => array("href" => "/ph/co2/link/connect"), + "multiconnect" => array("href" => "/ph/co2/link/multiconnect"), + "follow" => array("href" => "/ph/co2/link/follow"), + "validate" => array("href" => "/ph/co2/link/validate"), + ), + "document" => array( + "resized" => array("href"=> "/ph/communecter/document/resized", "public" => true), + "list" => array("href"=> "/ph/communecter/document/list"), + "save" => array("href"=> "/ph/communecter/document/save"), + "deleteDocumentById" => array("href"=> "/ph/communecter/document/deleteDocumentById"), + "removeAndBacktract" => array("href"=> "/ph/communecter/document/removeAndBacktract"), + "getlistbyid" => array("href"=> "ph/communecter/document/getlistbyid"), + "upload" => array("href"=> "ph/communecter/document/upload"), + "update" => array("href"=> "ph/communecter/document/update"), + "uploadsave" => array("href"=> "ph/communecter/document/uploadsave"), + "delete" => array("href"=> "ph/communecter/document/delete") + ), + "survey" => array( + "index" => array("href" => "/ph/co2/survey/index", "public" => true), + "entries" => array("href" => "/ph/co2/survey/entries", "public" => true), + "savesession" => array("href" => "/ph/co2/survey/savesession"), + "savesurvey" => array("href" => "/ph/co2/survey/savesurvey"), + "delete" => array("href" => "/ph/co2/survey/delete"), + "addaction" => array("href" => "/ph/co2/survey/addaction"), + "moderate" => array("href" => "/ph/co2/survey/moderate"), + "entry" => array("href" => "/ph/co2/survey/entry", "public" => true ), + "graph" => array("href" => "/ph/co2/survey/graph"), + "textarea" => array("href" => "/ph/co2/survey/textarea"), + "editlist" => array("href" => "/ph/co2/survey/editList"), + "multiadd" => array("href" => "/ph/co2/survey/multiadd"), + "close" => array("href" => "/ph/co2/survey/close"), + "editentry" => array("href" => "/ph/co2/survey/editentry"), + "fastaddentry"=> array("href" => "/ph/co2/survey/fastaddentry"), + ), + "discuss"=> array( + "index" => array( "href" => "/ph/co2/discuss/index", "public" => true), + ), + "comment"=> array( + "index" => array( "href" => "/ph/co2/comment/index", "public" => true), + "save" => array( "href" => "/ph/co2/comment/save"), + 'abuseprocess' => array( "href" => "/ph/co2/comment/abuseprocess"), + "testpod" => array("href" => "/ph/co2/comment/testpod"), + "moderate" => array( "href" => "/ph/co2/comment/moderate"), + "delete" => array( "href" => "/ph/co2/comment/delete"), + "updatefield" => array( "href" => "/ph/co2/comment/updatefield"), + "update" => array( "href" => "/ph/co2/comment/update"), + "countcommentsfrom" => array( "href" => "/ph/co2/comment/countcommentsfrom"), + ), + "order"=> array( + "save" => array("href" => "/ph/co2/order/save"), + "get" => array("href" => "/ph/co2/order/get"), + ), + "circuit"=> array( + "save" => array("href" => "/ph/co2/circuit/save"), + "index" => array("href" => "/ph/co2/circuit/index"), + ), + "pay"=> array( + "index" => array("href" => "/ph/co2/pay/index"), + "in" => array("href" => "/ph/co2/pay/in"), + ), + "backup"=> array( + "save" => array("href" => "/ph/co2/backup/save"), + "delete" => array("href" => "/ph/co2/backup/delete"), + "update" => array("href" => "/ph/co2/backup/update"), + // "get" => array("href" => "/ph/co2/order/get"), + ), + "orderitem"=> array( + "save" => array("href" => "/ph/co2/orderitem/save"), + "get" => array("href" => "/ph/co2/orderitem/get"), + ), + "action"=> array( + "addaction" => array("href" => "/ph/co2/action/addaction"), + ), + "notification"=> array( + "getnotifications" => array("href" => "/ph/co2/notification/get","json" => true), + "marknotificationasread" => array("href" => "/ph/co2/notification/remove"), + "removeall" => array("href" => "/ph/co2/notification/removeall"), + "update" => array("href" => "/ph/co2/notification/update"), + ), + "gamification"=> array( + "index" => array("href" => "/ph/co2/gamification/index"), + ), + "graph"=> array( + "viewer" => array("href" => "/ph/co2/graph/viewer"), + "getdata" => array("href" => "/ph/co2/graph/getdata"), + ), + "log"=> array( + "monitoring" => array("href" => "/ph/co2/log/monitoring"), + "dbaccess" => array("href" => "/ph/co2/log/dbaccess"), + "clear" => array("href" => "/ph/co2/log/clear"), + ), + "stat"=> array( + "createglobalstat" => array("href" => "/ph/co2/stat/createglobalstat"), + ), + "mailmanagement"=> array( + "droppedmail" => array("href" => "/co2/mailmanagement/droppedmail"), + ), + "element"=> array( + "updatesettings" => array('href' => "/ph/co2/element/updatesettings"), + "updatefield" => array("href" => "/ph/co2/element/updatefield"), + "updatefields" => array("href" => "/ph/co2/element/updatefields"), + "updateblock" => array("href" => "/ph/co2/element/updateblock"), + "updatestatus" => array("href" => "/ph/co2/element/updatestatus"), + "detail" => array("href" => "/ph/co2/element/detail", "public" => true), + "getalllinks" => array("href" => "/ph/co2/element/getalllinks"), + "geturls" => array("href" => "/ph/co2/element/geturls"), + "getcontacts" => array("href" => "/ph/co2/element/getcontacts"), + "simply" => array("href" => "/ph/co2/element/simply", "public" => true), + "directory" => array("href" => "/ph/co2/element/directory", "public" => true), + "directory2" => array("href" => "/ph/co2/element/directory2", "public" => true), + "addmembers" => array("href" => "/ph/co2/element/addmembers", "public" => true), + "aroundme" => array("href" => "/ph/co2/element/aroundme"), + "save" => array("href" => "/ph/co2/element/save"), + "list" => array("href" => "/ph/co2/element/list"), + "savecontact" => array("href" => "/ph/co2/element/savecontact"), + "saveurl" => array("href" => "/ph/co2/element/saveurl"), + "get" => array("href" => "/ph/co2/element/get"), + "delete" => array("href" => "/ph/co2/element/delete"), + "notifications" => array("href" => "/ph/co2/element/notifications"), + "about" => array("href" => "/ph/co2/element/about"), + "getdatadetail" => array("href" => "/ph/co2/element/getdatadetail"), + "stopdelete" => array("href" => "/ph/co2/element/stopdelete"), + 'getthumbpath' => array("href" => "/ph/co2/element/getThumbPath"), + 'getcommunexion' => array("href" => "/ph/co2/element/getcommunexion"), + 'getdatabyurl' => array("href" => "/ph/co2/element/getdatabyurl"), + "invoice" => array("href" => "/ph/co2/element/invoice"), + ), + "app" => array( + "welcome" => array('href' => "/ph/co2/app/welcome", "public" => true), + "index" => array('href' => "/ph/co2/app/index", "public" => true), + "web" => array('href' => "/ph/co2/app/web", "public" => true), + "websearch" => array('href' => "/ph/co2/app/websearch", "public" => true), + "live" => array('href' => "/ph/co2/app/live", "public" => true), + "media" => array('href' => "/ph/co2/app/media", "public" => true), + "referencement" => array('href' => "/ph/co2/app/referencement", "public" => true), + "savereferencement" => array('href' => "/ph/co2/app/savereferencement", "public" => true), + "annonces" => array('href' => "/ph/co2/app/annonces", "public" => true), + "live" => array('href' => "/ph/co2/app/live", "public" => true), + "agenda" => array('href' => "/ph/co2/app/agenda", "public" => true), + "mediacrawler" => array('href' => "/ph/co2/app/mediacrawler", "public" => false), + "page" => array('href' => "/ph/co2/app/page", "public" => true), + "search" => array('href' => "/ph/co2/app/search", "public" => true), + "activities" => array('href' => "/ph/co2/app/search", "public" => true), + "store" => array('href' => "/ph/co2/app/search", "public" => true), + "circuits" => array('href' => "/ph/co2/app/search", "public" => true), + "agenda" => array('href' => "/ph/co2/app/agenda", "public" => true), + "power" => array('href' => "/ph/co2/app/power", "public" => true), + "superadmin" => array('href' => "/ph/co2/app/superadmin", "public" => false), + "admin" => array('href' => "/ph/co2/app/admin", "public" => true), + "info" => array('href' => "/ph/co2/app/info", "public" => true), + "smartconso" => array('href' => "/ph/co2/app/smartconso", "public" => true), + "city" => array('href' => "/ph/co2/app/city", "public" => false), + "chat" => array('href' => "/ph/co2/app/chat", "public" => true), + "sendmailformcontact" => array('href' => "/ph/co2/app/sendmailformcontact", "public" => true), + "sendmailformcontactprivate" => array('href' => "/ph/co2/app/sendmailformcontactprivate", "public" => true), + "checkurlexists" => array('href' => "/ph/co2/app/checkurlexists", "public" => true), + "rooms" => array('href' => "/ph/co2/app/rooms", "public" => true), + "survey" => array('href' => "/ph/co2/app/survey", "public" => true), + "interoperability" => array( + "index" => array('href' => 'ph/co2/interoperability/index', "public" => true), + "get" => array('href' => 'ph/co2/interoperability/get', "public" => true), + "copedia" => array('href' => 'ph/co2/interoperability/copedia', "public" => true), + "co-osm" => array('href' => 'ph/co2/interoperability/co-osm', "public" => true), + "co-osm-getode" => array('href' => 'ph/co2/interoperability/co-osm-getnode', "public" => true), + "wikitoco" => array('href' => 'ph/co2/interoperability/wikitoco', "public" => true), + "pushtypewikidata" => array('href' => 'ph/co2/interoperability/pushtypewikidata', "public" => true), + "wikidata-put-description" => array('href' => 'ph/co2/interoperability/wikidata-put-description', "public" => true), + ), + ), + "siteurl" => array( + "incnbclick" => array('href' => "ph/co2/siteurl/incnbclick") + ), + "cooperation" => array( + "getcoopdata" => array('href' => "ph/co2/cooperation/getcoopdata"), + "savevote" => array('href' => "ph/co2/cooperation/savevote"), + "deleteamendement" => array('href' => "ph/co2/cooperation/deleteamendement") + ), + "pdf" => array( + "create" => array('href' => "ph/co2/pdf/create") + ), + ); + + function initPage(){ + + //review the value of the userId to check loosing session + //creates an issue with Json requests : to clear add josn:true on the page definition here + //if( Yii::app()->request->isAjaxRequest && (!isset( $page["json"] )) ) + //echo "<script type='text/javascript'> userId = '".Yii::app()->session['userId']."'; var blackfly = 'sosos';</script>"; + Yii::app()->params["version"] = $this->version ; + if( @$_GET["theme"] ){ + Yii::app()->theme = $_GET["theme"]; + Yii::app()->session["theme"] = $_GET["theme"]; + } + else if(@Yii::app()->session["theme"]) + Yii::app()->theme = Yii::app()->session["theme"]; + /*else + Yii::app()->theme = "ph-dori";*/ + + //managed public and private sections through a url manager + if( Yii::app()->controller->id == "admin" && !Yii::app()->session[ "userIsAdmin" ] ) + throw new CHttpException(403,Yii::t('error','Unauthorized Access.')); + + if( Yii::app()->controller->id == "adminpublic" && ( !Yii::app()->session[ "userIsAdmin" ] && !Yii::app()->session[ "userIsAdminPublic" ] ) ) + throw new CHttpException(403,Yii::t('error','Unauthorized Access.')); + if( Yii::app()->controller->id != "test") + $page = $this->pages[Yii::app()->controller->id][Yii::app()->controller->action->id]; + $pagesWithoutLogin = array( + //Login Page + "person/login", + "person/register", + "person/authenticate", + "person/activate", + "person/sendemail", + "person/checkusername", + //Document Resizer + "document/resized"); + + $prepareData = true; + //if (true)//(isset($_SERVER["HTTP_ORIGIN"]) )//&& $_SERVER["REMOTE_ADDR"] == "52.30.32.155" ) //this is an outside call + //{ + //$host = "meteor.communecter.org"; + //if (strpos("http://".$host, $_SERVER["HTTP_ORIGIN"]) >= 0 || strpos("https://".$host, $_SERVER["HTTP_ORIGIN"]) >= 0 ){ + if( isset( $_POST["X-Auth-Token"]) && Authorisation::isMeteorConnected( $_POST["X-Auth-Token"] ) ){ + $prepareData = false; + //once the token is check => remove the token from the post + unset($_POST["X-Auth-Token"]); + } + //Api access through REST + //no need to prepare interface data + else if (!Yii::app()->session[ "userId" ] && isset($_SERVER['PHP_AUTH_USER']) && Authorisation::isValidUser($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])) { + $prepareData = false; + } + //} + else if( (!isset( $page["public"] ) ) && (!isset( $page["json"] )) + && !in_array(Yii::app()->controller->id."/".Yii::app()->controller->action->id, $pagesWithoutLogin) + && !Yii::app()->session[ "userId" ] ) + { + Yii::app()->session["requestedUrl"] = Yii::app()->request->url; + //if( Yii::app()->request->isAjaxRequest) + //echo "<script type='text/javascript'> checkIsLoggued('".Yii::app()->session['userId']."'); </script>"; + + } + + if( isset( $_GET["backUrl"] ) ) + Yii::app()->session["requestedUrl"] = $_GET["backUrl"]; + /*if( !isset(Yii::app()->session['logguedIntoApp']) || Yii::app()->session['logguedIntoApp'] != $this->module->id) + $this->redirect(Yii::app()->createUrl("/".$this->module->id."/person/logout"));*/ + if( $prepareData ) + { + $this->sidebar1 = array_merge( Menu::menuItems(), $this->sidebar1 ); + $this->person = Person::getPersonMap(Yii::app() ->session["userId"]); + $this->title = (isset($page["title"])) ? $page["title"] : $this->title; + $this->subTitle = (isset($page["subTitle"])) ? $page["subTitle"] : $this->subTitle; + $this->pageTitle = (isset($page["pageTitle"])) ? $page["pageTitle"] : $this->pageTitle; + if(!empty(Yii::app()->session["userId"])) + $this->notifications = ActivityStream::getNotifications( array( "notify.id" => Yii::app()->session["userId"] ) ); + if( $_SERVER['SERVER_NAME'] == "127.0.0.1" || $_SERVER['SERVER_NAME'] == "localhost" ) + CornerDev::addWorkLog("communecter",Yii::app()->session["userId"],Yii::app()->controller->id,Yii::app()->controller->action->id); + } + + //load any DB config Params + Application::loadDBAppConfig(); + } + + protected function beforeAction($action){ + if( $_SERVER['SERVER_NAME'] == "127.0.0.1" || $_SERVER['SERVER_NAME'] == "localhost" ){ + Yii::app()->assetManager->forceCopy = true; + //if(Yii::app()->controller->id."/".Yii::app()->controller->action->id != "log/dbaccess") + //Yii::app()->session["dbAccess"] = 0; + } + + $this->manageLog(); + + return parent::beforeAction($action); + } + + + protected function afterAction($action){ + return parent::afterAction($action); + } + + /** + * Start the log process + * Bring back log parameters, then set object before action and save it if there is no return + * If there is return, the method save in session the log object which will be finished and save in db during the method afteraction + */ + protected function manageLog(){ + //Bring back logs needed + $actionsToLog = Log::getActionsToLog(); + $actionInProcess = Yii::app()->controller->id.'/'.Yii::app()->controller->action->id; + + //Start logs if necessary + if(isset($actionsToLog[$actionInProcess])) { + + //To let several actions log in the same time + if(!$actionsToLog[$actionInProcess]['waitForResult']){ + Log::save(Log::setLogBeforeAction($actionInProcess)); + }else if(isset(Yii::app()->session["logsInProcess"]) && is_array(Yii::app()->session["logsInProcess"])){ + Yii::app()->session["logsInProcess"] = array_merge( + Yii::app()->session["logsInProcess"], + array($actionInProcess => Log::setLogBeforeAction($actionInProcess)) + ); + } else{ + Yii::app()->session["logsInProcess"] = array($actionInProcess => Log::setLogBeforeAction($actionInProcess)); + } + } + } +} + diff --git a/components/CommunecterException.php b/components/CommunecterException.php new file mode 100755 index 0000000000000000000000000000000000000000..9ca9db5c6b73264079677e7ad46f9ec285d610a7 --- /dev/null +++ b/components/CommunecterException.php @@ -0,0 +1,15 @@ +<?php +/** + * Exception for Communecter business Error + */ +class CommunecterException extends Exception +{ + + public function __construct($message = null, $code = 0) { + if (!$message) { + throw new $this('Unknown '. get_class($this)); + } + parent::__construct($message, $code); + } + +} \ No newline at end of file diff --git a/config/CO2/classified.json b/config/CO2/classified.json new file mode 100644 index 0000000000000000000000000000000000000000..19be257c6b6e225a7d9db32f78a386e18845c8eb --- /dev/null +++ b/config/CO2/classified.json @@ -0,0 +1,246 @@ +{ + "sections" : { + "sharing": { + "label":"Share", + "labelFront":"To share", + "key" : "sharing", + "icon" : "exchange", + "section":2, + "color":"azure" + }, + "donation": { + "label":"Give", + "labelFront":"To give", + "key" : "donation", + "icon" : "gift", + "section":2, + "color":"azure" + }, + + "forsale": { + "label":"Sale", + "labelFront":"For sale", + "key" : "forsale", + "icon" : "money", + "section":3, + "color":"azure" + }, + + "forrent": { + "label":"Rent", + "labelFront":"For rent", + "key" : "forrent", + "icon" : "external-link", + "section":3, + "color":"azure" + }, + + + "lookingfor" : { + "label":"Need", + "labelFront":"Looking for", + "key" : "lookingfor", + "icon" : "eye", + "section":4, + "color":"azure" + }, + + "job": { + "label":"Jobs", + "labelFront":"Offers", + "key" : "job", + "icon" : "briefcase", + "section":5, + "color":"azure", + "filters" : "jobFilters" + } + + }, + "filters" : { + "Technology" : + { "icon" : "laptop", + "subcat" : ["TV / Video", "IT", "Touchpads", "Telephony", "Camera", "Audio device"] + }, + + "Property" : + { "icon" : "building", + "subcat" : ["House", "Flat", "Ground", "Parking", "Office"] + }, + + "Vehicles" : + { "icon" : "car", + "subcat" : + [ "Car", + "SUV", + "Utility", + "Moto", + "Scooter", + "Boat", + "Small car", + "Bikes", + "Car equipment", + "2-wheeled equipment", + "Boat equipment", + "Bike equipment" + ] + }, + + "Home" : + { "icon" : "home", + "subcat" : + [ "Household appliances", + "Furniture", + "Baby equipment", + "Animals", + "Various" + ] + }, + + "Leisure" : + { "icon" : "smile-o", + "subcat" : + [ "Sports", + "Musical instrument", + "Sound system", + "CD / DVD", + "Toy", + "Games", + "Books / Comics", + "Collections", + "DIY", + "Gardening", + "Art / Deco", + "Model making", + "Childcare", + "Animals", + "Various" + ] + }, + + "Fashion" : + { "icon" : "shopping-bag", + "subcat" : + [ "Clothes", + "Shoes", + "Accessories", + "Watches", + "Jewels" + ] + } + }, + "jobFilters" : { + "Purchase-Comptability-Management" : { + "icon":"briefcase", + "subcat" : [] + }, + "Arts-Crafts" : { + "icon":"paint-brush", + "subcat" : [] + }, + "Bank-Insurance" : { + "icon":"money", + "subcat" : [] + }, + "Building-Public_works" : { + "icon":"building", + "subcat" : [] + }, + "Trade-Sales" : { + "icon":"handshake-o", + "subcat" : [] + }, + "Communication-Multimedia" : { + "icon":"television", + "subcat" : [] + }, + "Consultant-Market_research" : { + "icon":"search", + "subcat" : [] + }, + "Natural_spaces" : { + "icon":"tree", + "subcat" : [] + }, + "Agriculture" : { + "icon":"shopping-basket", + "subcat" : [] + }, + "Fishing" : { + "icon":"tint", + "subcat" : [] + }, + "Animals_care" : { + "icon":"medkit", + "subcat" : [] + }, + "Hotel_business" : { + "icon":"hotel", + "subcat" : [] + }, + "Catering" : { + "icon":"cutlery", + "subcat" : [] + }, + "Tourism" : { + "icon":"info-circle", + "subcat" : [] + }, + "Animation" : { + "icon":"signing", + "subcat" : [] + }, + "Property" : { + "icon":"building-o", + "subcat" : [] + }, + "Industry" : { + "icon":"industry", + "subcat" : [] + }, + "IT-Telecommunication" : { + "icon":"wifi", + "subcat" : [] + }, + "Installation-Maintenance" : { + "icon":"wrench", + "subcat" : [] + }, + "Marketing-Strategy" : { + "icon":"area-chart", + "subcat" : [] + }, + "Human_Ressources" : { + "icon":"group", + "subcat" : [] + }, + "Health" : { + "icon":"stethoscope", + "subcat" : [] + }, + "Secretariat-Assistantship" : { + "icon":"support", + "subcat" : [] + }, + "Home_services" : { + "icon":"blind", + "subcat" : [] + }, + "Public_services" : { + "icon":"university", + "subcat" : [] + }, + "Spectacle" : { + "icon":"star", + "subcat" : [] + }, + "Sport" : { + "icon":"futbol-o", + "subcat" : [] + }, + "Transport-Logistic" : { + "icon":"truck", + "subcat" : [] + } + } + +} diff --git a/config/CO2/event.json b/config/CO2/event.json new file mode 100644 index 0000000000000000000000000000000000000000..7c70cfc7bb1b106e4ff9da03abab3ffbfc26994c --- /dev/null +++ b/config/CO2/event.json @@ -0,0 +1,101 @@ +{ + "sections" : { + "competition": { + "label":"Competition", + "key" : "competition", + "icon" : "trophy", + "section":2, + "color":"azure" + }, + "concert": { + "label":"Concert", + "key" : "concert", + "icon" : "microphone", + "section":2, + "color":"azure" + }, + + "concours": { + "label":"Contest", + "key" : "concours", + "icon" : "graduation-cap", + "section":3, + "color":"azure" + }, + + "exposition": { + "label":"Exhibition", + "key" : "exposition", + "icon" : "universal-access", + "section":3, + "color":"azure" + }, + + + "festival" : { + "label":"Festival", + "key" : "festival", + "icon" : "beer", + "section":4, + "color":"azure" + }, + + "getTogether": { + "label":"Get together", + "key" : "getTogether", + "icon" : "group", + "section":5, + "color":"azure" + }, + + "market": { + "label":"Market", + "key" : "market", + "icon" : "shopping-basket", + "section":5, + "color":"azure" + }, + "meeting": { + "label":"Meeting", + "key" : "meeting", + "icon" : "handshake-o", + "section":5, + "color":"azure" + }, + "course": { + "label":"Course", + "key" : "course", + "icon" : "handshake-o", + "section":5, + "color":"azure" + }, + "workshop": { + "label":"Workshop", + "key" : "workshop", + "icon" : "handshake-o", + "section":5, + "color":"azure" + }, + "conference": { + "label":"Conference", + "key" : "conference", + "icon" : "handshake-o", + "section":5, + "color":"azure" + }, + "film": { + "label":"Film", + "key" : "film", + "icon" : "handshake-o", + "section":5, + "color":"azure" + }, + "debate": { + "label":"Debate", + "key" : "debate", + "icon" : "handshake-o", + "section":5, + "color":"azure" + } + } +} \ No newline at end of file diff --git a/config/CO2/filliaireCategories.json b/config/CO2/filliaireCategories.json new file mode 100644 index 0000000000000000000000000000000000000000..3fa5e9c7b7faaa2e9e05f7045cc23d729bddf02c --- /dev/null +++ b/config/CO2/filliaireCategories.json @@ -0,0 +1,62 @@ +{ + "common" : { + "name" : "Commons", + "icon" : "fa-thumbs-o-up", + "tags" : ["commun"] + }, + "food": { + "name" : "Agriculture | Food", + "icon" : "fa-cutlery", + "tags" : ["agriculture","alimentation"] + }, + "health": { + "name" : "Health", + "icon" : "fa-heartbeat", + "tags" : ["santé"] + }, + "waste": { + "name" : "Waste", + "icon" : "fa-trash-o ", + "tags" : ["déchets"] + }, + "building": { + "name" : "Development | Transport | Construction", + "icon" : "fa-bus", + "tags" : ["aménagement","transport","construction"] + }, + "education": { + "name" : "Education | Childhood", + "icon" : "fa-book", + "tags" : ["éducation","petite Enfance"] + }, + "citizen": { + "name" : "Citizenship", + "icon" : "fa-user-circle-o", + "tags" : ["citoyenneté"] + }, + "economy": { + "name" : "Economy", + "icon" : "fa-money", + "tags" : [ "ess","economie social solidaire" ] + }, + "energy": { + "name" : "Energy | Climate", + "icon" : "fa-sun-o", + "tags" : ["energie" ,"climat"] + }, + "culture": { + "name" : "Culture | Animation", + "icon" : "fa-universal-access", + "tags" : ["culture" ,"animation"] + }, + "biodiversity": { + "name" : "Biodiversity", + "icon" : "fa-tree", + "tags" : ["biodiversité"] + }, + "tic": { + "name" : "ICT | Numeric | Internet", + "icon" : "fa-laptop", + "tags" : ["numérique","tic","internet"] + } +} diff --git a/config/CO2/params.json b/config/CO2/params.json new file mode 100644 index 0000000000000000000000000000000000000000..a58149e11958b230f57c5ed3a723e6533952bd6c --- /dev/null +++ b/config/CO2/params.json @@ -0,0 +1,208 @@ +{ + "title" : "app", + "metaImg" : "/assets/img/bg_pixeltree2.jpg", + "metaTitle" : "Réseau sociétal citoyen", + "metaDesc" : "Communecter : Connecter à sa commune, inter connecter les communs, un réseau sociétal pour un citoyen connecté et acteur au centre de sa société.", + "devises" : {"€" : "€", + "£" : "£", + "$" : "$", + "CFP" : "CFP"}, + "deviseDefault" : "€", + + "pages" : { + "#app.index": {"redirect":"welcome"}, + + "#welcome": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "welcome", + "subdomainName" : "Home", + "hash" : "#app.welcome", + "icon" : "", + "mainTitle" : "Réseau sociétal <span class='text-red'>territorial</span>", + "placeholderMainSearch" : "search something ...", + "lblBtnCreate" : "Create something", + "colorBtnCreate" : "green" + }, + + "#search": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "search", + "subdomainName" : "Search", + "hash" : "#app.search", + "icon" : "search", + "mainTitle" : "<span class='text-red'>Territorial</span> search engine", + "placeholderMainSearch" : "search a page ...", + "lblBtnCreate" : "Create a page", + "colorBtnCreate" : "green" + }, + + "#annonces": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "annonces", + "subdomainName" : "Classifieds", + "hash" : "#app.annonces", + "icon" : "bullhorn", + "mainTitle" : "Classified ads", + "placeholderMainSearch" : "search among classifieds ...", + "lblBtnCreate" : "Create a classified ad", + "colorBtnCreate" : "azure" + }, + + "#agenda": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "agenda", + "subdomainName" : "Agenda", + "hash":"#app.agenda", + "icon" : "calendar", + "mainTitle" : "<span class='text-red'>C</span>Ommon agenda", + "placeholderMainSearch" : "search an event ...", + "lblBtnCreate" : "Create an event", + "colorBtnCreate" : "orange" + }, + + "#live": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "live", + "subdomainName" : "Live", + "hash":"#app.live", + "icon" : "newspaper-o", + "mainTitle" : "<span class='text-red'>CO</span>mmon live", + "placeholderMainSearch" : "search in live ..." + }, + + "#chat": { + "inMenu" : false, + "open" : true, + "subdomain" : "chat", + "subdomainName" : "Chat", + "alias":"#chatAction", + "login" : true, + "notif" : "chatNotifs", + "icon" : "comments", + "mainTitle" : "<span class='text-red'>CHAT with your communities</span>", + "removeAfterLoad" : true, + "emptyContextData" : false + }, + + "#page": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "page", + "subdomainName" : "page", + "hash":"#app.page", + "icon" : "", + "mainTitle" : "Le réseau social citoyen", + "placeholderMainSearch" : "search ..." + }, + + "#info": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "apropos", + "subdomainName" : "Info", + "hash":"#app.info", + "icon" : "info-circle", + "mainTitle" : "Le réseau social citoyen", + "placeholderMainSearch" : "search on people communected ..." + }, + + "#power": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "power", + "subdomainName" : "Power", + "hash":"#app.power", + "icon" : "hand-rock-o", + "mainTitle" : "CO-démocratie", + "placeholderMainSearch" : "search ...", + "lblBtnCreate" : "Faire une proposition", + "colorBtnCreate" : "azure" + }, + + + "#city": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "city", + "subdomainName" : "City", + "hash":"#app.city", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "search ..." + }, + + "#interoperability": { + "inMenu" : false, + "useHeader" : true, + "open" : true, + "subdomain" : "interoperability", + "subdomainName" : "Intéropérabilité", + "hash" : "#app.interoperability", + "icon" : "database", + "mainTitle" : "Module d'intéropérabilité", + "placeholderMainSearch" : "Rechercher des données venus d'ailleurs ..." + }, + + "#rooms": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "rooms", + "subdomainName" : "rooms", + "hash":"#app.rooms", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "search ..." + }, + + "#survey": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "city", + "subdomainName" : "City", + "hash":"#app.survey", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "search ..." + }, + + "#admin": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#app.admin", + "icon" : "university", + "mainTitle" : "Partie Admin", + "placeholderMainSearch" : "Admin ..." + }, + + "#adminpublic": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#adminpublic", + "icon" : "university", + "mainTitle" : "Partie Admin Public", + "placeholderMainSearch" : "Admin Public ..." + } + } +} diff --git a/config/CO2/place.json b/config/CO2/place.json new file mode 100644 index 0000000000000000000000000000000000000000..2b1d12b4ab6fdc170907fcaa9b8193ba66e019e6 --- /dev/null +++ b/config/CO2/place.json @@ -0,0 +1,60 @@ +{ + "sections" : { + "all": { + "label":"Tous", + "key" : "all", + "icon" : "cloud" + }, + "common": { + "label":"Commun", + "key" : "common", + "icon" : "circle-o" + }, + "public": { + "label":"Public", + "key" : "public", + "icon" : "users" + }, + "private": { + "label":"Privée", + "key" : "private", + "icon" : "lock" + }, + "urban": { + "label":"Urbain", + "key" : "urban", + "icon" : "building-o" + }, + "rural": { + "label":"Rural", + "key" : "rural", + "icon" : "tree" + } + + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} \ No newline at end of file diff --git a/config/CO2/poi.json b/config/CO2/poi.json new file mode 100644 index 0000000000000000000000000000000000000000..9591af475988c569b7e7b02fae7aba9ce2a20dd4 --- /dev/null +++ b/config/CO2/poi.json @@ -0,0 +1,55 @@ +{ + "sections" : { + + + "link" : { "label": "Link, Url","key":"link","icon":"link"}, + "tool" : { "label": "Tool","key":"tool","icon":"wrench"}, + "machine" : { "label": "Machine","key":"machine","icon":"cogs"}, + "software" : { "label": "Software","key":"software","icon":"code"}, + "rh" : { "label": "Human ressource","key":"rh","icon":"users"}, + "materialRessource" : { "label": "Material ressource","key":"RessourceMaterielle","icon":"cubes"}, + "financialRessource" : { "label": "Financial ressource","key":"RessourceFinanciere","icon":"money"}, + "documentation" : { "label": "Documentation","key":"ficheBlanche","icon":"file-text-o"}, + "geoJson" : { "label": "Geojson / UMap","key":"geoJson","icon":"map"}, + "compostPickup" : { "label": "Compost pickup","key":"compostPickup","icon":"inbox"}, + "video" : { "label": "Video","key":"video","icon":"video-camera"}, + "sharedLibrary" : { "label": "Shared library","key":"sharedLibrary","icon":"book"}, + "recoveryCenter": { "label": "Recory center","key":"recoveryCenter","icon":"recycle"}, + "trash" : { "label": "Trash","key":"trash","icon":"trash"}, + "history" : { "label": "History","key":"history","icon":"clock-o"}, + "something2See" : { "label": "To see","key":"something2See","icon":"eye"}, + "funPlace" : { "label": "Fun place","key":"funPlace","icon":"smile-o"}, + "place" : { "label": "Public place","key":"place","icon":"map-marker"}, + "artPiece" : { "label": "Art pieces","key":"artPiece","icon":"paint-brush"}, + "streetArt" : { "label": "Street art","key":"streetArts","icon":"paint-brush"}, + "openScene" : { "label": "Open mic","key":"openScene","icon":"bullhorn"}, + "stand" : { "label": "Stand","key":"stand","icon":"map-marker"}, + "parking" : { "label": "Parking","key":"parking","icon":"car"}, + "other" : { "label":"Other","key":"other","icon":"map-marker"} + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} diff --git a/config/CO2/prestation.json b/config/CO2/prestation.json new file mode 100644 index 0000000000000000000000000000000000000000..f7218285caafd111efac9e93b405d3e27b8c2fc1 --- /dev/null +++ b/config/CO2/prestation.json @@ -0,0 +1,11 @@ +{ + "categories" : { + "sleeping":"Sleeping", + "restaurant":"Restaurant", + "funnytime":"Funny activity", + "transport":"Transport", + "siteToSee":"Uncredible site", + "artisants":"Artisants", + "guideAccom":"Guide and helper" + } +} \ No newline at end of file diff --git a/config/CO2/ressource.json b/config/CO2/ressource.json new file mode 100644 index 0000000000000000000000000000000000000000..01e0bf7c5597f4804e7e0d0ac6e9ed3d3116612b --- /dev/null +++ b/config/CO2/ressource.json @@ -0,0 +1,33 @@ +{ + "sections" : { + "tool": { + "label":"Outil", + "key" : "tool", + "icon" : "cutlery" + }, + "competence": { + "label":"Compétence", + "key" : "competence", + "icon" : "users" + } + }, + "filters" : { + "Machine" : + { "icon" : "home", + "subcat" : + [ "CNC", + "Imprimante 3D", + "Découpeuse laser" + ] + }, + "Knowledge" : + { "icon" : "user", + "subcat" : + [ "Ingenieur Elec", + "Electrcité", + "Journaliste" + ] + } + } + +} \ No newline at end of file diff --git a/config/CO2/room.json b/config/CO2/room.json new file mode 100644 index 0000000000000000000000000000000000000000..53ab9e6103df2a8734605db15952471bd9e5d471 --- /dev/null +++ b/config/CO2/room.json @@ -0,0 +1,19 @@ +{ + "sections" : { + "discuss": { + "label":"Discussion", + "key" : "discuss", + "icon" : "comment" + }, + "vote": { + "label":"Decision", + "key" : "vote", + "icon" : "gavel" + }, + "actions": { + "label":"Action", + "key" : "actions", + "icon" : "cogs" + } + } +} \ No newline at end of file diff --git a/config/CO2/todo.json b/config/CO2/todo.json new file mode 100644 index 0000000000000000000000000000000000000000..85ac7bc84e899843c3e2fc9d41515c95668f6111 --- /dev/null +++ b/config/CO2/todo.json @@ -0,0 +1,29 @@ +"#power": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "power", + "subdomainName" : "Démocratie", + "hash":"#app.power", + "icon" : "comments", + "mainTitle" : "Espace d'expression démocratique", + "placeholderMainSearch" : "rechercher parmis les propositions ...", + "lblBtnCreate" : "Faire une proposition", + "colorBtnCreate" : "azure" +}, + +"#place": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "place", + "subdomainName" : "Lieux", + "hash" : "#app.search.type.place", + "icon" : "map-marker", + "mainTitle" : "Moteur de Ressource <span class='text-red'>territoriales</span>", + "placeholderMainSearch" : "Rechercher un lieu ...", + "lblBtnCreate" : "Ajouter un lieu", + "colorBtnCreate" : "green" +}, + + diff --git a/config/FI/classified.json b/config/FI/classified.json new file mode 100644 index 0000000000000000000000000000000000000000..c66b8879ebf5ddfb488e8ac1d7740eedc881b8af --- /dev/null +++ b/config/FI/classified.json @@ -0,0 +1,251 @@ +{ + "sections" : { + "sharing": { + "label":"Partager", + "labelFront":"À partager", + "key" : "sharing", + "icon" : "exchange", + "section":2, + "color":"azure" + }, + "donation": { + "label":"Donner", + "labelFront":"À donner", + "key" : "donation", + "icon" : "gift", + "section":2, + "color":"azure" + }, + + "forsale": { + "label":"Vendre", + "labelFront":"À vendre", + "key" : "forsale", + "icon" : "money", + "section":3, + "color":"azure" + }, + + "forrent": { + "label":"Louer", + "labelFront":"À louer", + "key" : "forrent", + "icon" : "external-link", + "section":3, + "color":"azure" + }, + + + "lookingfor" : { + "label":"Besoin", + "labelFront":"À la recherche", + "key" : "lookingfor", + "icon" : "eye", + "section":4, + "color":"azure" + }, + + "job": { + "label":"Emplois", + "labelFront":"Offres d'emplois", + "key" : "job", + "icon" : "briefcase", + "section":5, + "color":"azure", + "filters" : "jobFilters" + } + + }, + "filters" : { + "Technologie" : + { "icon" : "laptop", + "subcat" : ["TV / Vidéo", "Informatique", "Tablettes", "Téléphonie", "Appareils photos", "Appareil audio"] + }, + + "Immobilier" : + { "icon" : "building", + "subcat" : ["Maison", "Appartement", "Terrain", "Parking", "Bureaux"] + }, + + "Véhicules" : + { "icon" : "car", + "subcat" : + [ "Voiture", + "SUV", + "4x4", + "Utilitaire", + "Moto", + "Scooter", + "Bateau", + "Voiturette", + "Vélos", + "Équipement véhicule", + "Équipement 2 roues", + "Équipement bateau", + "Équipement vélo" + ] + }, + + "Maison" : + { "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + }, + + "Loisirs" : + { "icon" : "smile-o", + "subcat" : + [ "Sports", + "Instrument musique", + "Sonorisation", + "CD / DVD", + "Jouet", + "Jeux de société", + "Livres / BD", + "Collections", + "Bricolages", + "Jardinage", + "Art / Déco", + "Modélisme", + "Puériculture", + "Animaux", + "Divers" + ] + }, + + "Mode" : + { "icon" : "shopping-bag", + "subcat" : + [ "Vêtements", + "Chaussures", + "Accessoires", + "Montres", + "Bijoux" + ] + } + }, + "jobFilters" : { + "Achats-Comptabilité-Gestion" : { + "icon":"user", + "subcat" : [] + }, + "Arts-Artisanat" : { + "icon":"user", + "subcat" : [] + }, + "Banque-Assurance" : { + "icon":"user", + "subcat" : [] + }, + "Bâtiment-Travaux_Publics" : { + "icon":"user", + "subcat" : [] + }, + "Commerce-Vente" : { + "icon":"user", + "subcat" : [] + }, + "Communication-Multimédia" : { + "icon":"user", + "subcat" : [] + }, + "Conseil-Etudes" : { + "icon":"user", + "subcat" : [] + }, + "Direction_Entreprise" : { + "icon":"user", + "subcat" : [] + }, + "Espaces_Naturels" : { + "icon":"user", + "subcat" : [] + }, + "Agriculture" : { + "icon":"user", + "subcat" : [] + }, + "Pêche" : { + "icon":"user", + "subcat" : [] + }, + "Soins_aux_animaux" : { + "icon":"user", + "subcat" : [] + }, + "Hôtellerie" : { + "icon":"user", + "subcat" : [] + }, + "Restauration" : { + "icon":"user", + "subcat" : [] + }, + "Tourisme" : { + "icon":"user", + "subcat" : [] + }, + "Animation" : { + "icon":"user", + "subcat" : [] + }, + "Immobilier" : { + "icon":"user", + "subcat" : [] + }, + "Industrie" : { + "icon":"user", + "subcat" : [] + }, + "Informatique-Télécommunication" : { + "icon":"user", + "subcat" : [] + }, + "Installation-Maintenance" : { + "icon":"user", + "subcat" : [] + }, + "Marketing-Stratégie_Commerciale" : { + "icon":"user", + "subcat" : [] + }, + "Ressources_Humaines" : { + "icon":"user", + "subcat" : [] + }, + "Santé" : { + "icon":"user", + "subcat" : [] + }, + "Secrétariat-Assistanat" : { + "icon":"user", + "subcat" : [] + }, + "Services_à _la_personne" : { + "icon":"user", + "subcat" : [] + }, + "Services_à _la_collectivité" : { + "icon":"user", + "subcat" : [] + }, + "Spectacle" : { + "icon":"user", + "subcat" : [] + }, + "Sport" : { + "icon":"user", + "subcat" : [] + }, + "Transport-Logistique" : { + "icon":"user", + "subcat" : [] + } + } + +} diff --git a/config/FI/event.json b/config/FI/event.json new file mode 100644 index 0000000000000000000000000000000000000000..69e753a23f334fa19429511f093077c780d64d11 --- /dev/null +++ b/config/FI/event.json @@ -0,0 +1,66 @@ +{ + "sections" : { + "competition": {"label":"Compétition", + "key" : "competition", + "icon" : "trophy", + "section":2, + "color":"azure" + }, + "concert": { + "label":"Concert", + "key" : "concert", + "icon" : "microphone", + "section":2, + "color":"azure" + }, + + "concours": { + "label":"Concours", + "key" : "concours", + "icon" : "graduation-cap", + "section":3, + "color":"azure" + }, + + "exposition": { + "label":"Exposition", + "key" : "exposition", + "icon" : "universal-access", + "section":3, + "color":"azure" + }, + + + "festival" : { + "label":"Festival", + "key" : "festival", + "icon" : "beer", + "section":4, + "color":"azure" + }, + + "getTogether": { + "label":"Rencontre", + "key" : "getTogether", + "icon" : "group", + "section":5, + "color":"azure" + }, + + "market": { + "label":"Marché", + "key" : "market", + "icon" : "shopping-basket", + "section":5, + "color":"azure" + }, + + "meeting": { + "label":"Réunion", + "key" : "meeting", + "icon" : "handshake-o", + "section":5, + "color":"azure" + } + } +} \ No newline at end of file diff --git a/config/FI/filliaireCategories.json b/config/FI/filliaireCategories.json new file mode 100644 index 0000000000000000000000000000000000000000..3bf8fa99e7ca045993a3e38bcf061de4598d2d9c --- /dev/null +++ b/config/FI/filliaireCategories.json @@ -0,0 +1,62 @@ +{ + "common" : { + "name" : "Communs", + "icon" : "fa-thumbs-o-up", + "tags" : ["commun"] + }, + "food": { + "name" : "Agriculture | Alimentation", + "icon" : "fa-cutlery", + "tags" : ["agriculture","alimentation"] + }, + "health": { + "name" : "Santé", + "icon" : "fa-heartbeat", + "tags" : ["santé"] + }, + "waste": { + "name" : "Déchets", + "icon" : "fa-trash-o ", + "tags" : ["déchets"] + }, + "building": { + "name" : "Aménagement | Transport | Construction", + "icon" : "fa-bus", + "tags" : ["aménagement","transport","construction"] + }, + "education": { + "name" : "Éducation | Petite-enfance", + "icon" : "fa-book", + "tags" : ["éducation","petite Enfance"] + }, + "citizen": { + "name" : "Citoyenneté", + "icon" : "fa-user-circle-o", + "tags" : ["citoyenneté"] + }, + "economy": { + "name" : "Economie", + "icon" : "fa-money", + "tags" : [ "ess","economie social solidaire" ] + }, + "energy": { + "name" : "Energie | Climat", + "icon" : "fa-sun-o", + "tags" : ["energie" ,"climat"] + }, + "culture": { + "name" : "Culture | Animation", + "icon" : "fa-universal-access", + "tags" : ["culture" ,"animation"] + }, + "biodiversity": { + "name" : "Biodiversité", + "icon" : "fa-tree", + "tags" : ["biodiversité"] + }, + "tic": { + "name" : "TIC | Numérique | Internet", + "icon" : "fa-laptop", + "tags" : ["numérique","tic","internet"] + } +} diff --git a/config/FI/params.json b/config/FI/params.json new file mode 100644 index 0000000000000000000000000000000000000000..9d9810f37bcc05d78acaf97f8b142144700fa8ea --- /dev/null +++ b/config/FI/params.json @@ -0,0 +1,182 @@ +{ + "title" : "app", + "metaImg" : "/assets/img/CO.png", + "metaDesc" : "Le réseau de la France Insoumise", + + "pages" : { + "#app.index": {"redirect":"welcome"}, + + "#welcome": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "welcome", + "subdomainName" : "Accueil", + "hash" : "#app.welcome", + "icon" : "", + "mainTitle" : "Réseau sociétal <span class='text-red'>territorial</span>", + "placeholderMainSearch" : "Rechercher quelque chose ...", + "lblBtnCreate" : "Créer quelque chose", + "colorBtnCreate" : "green" + }, + + "#search": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "search", + "subdomainName" : "Recherche", + "hash" : "#app.search", + "icon" : "search", + "mainTitle" : "Moteur de recherche <span class='text-red'>territorial</span>", + "placeholderMainSearch" : "Rechercher une page ...", + "lblBtnCreate" : "Créer une page", + "colorBtnCreate" : "green" + }, + + "#annonces": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "annonces", + "subdomainName" : "Annonces", + "hash" : "#app.annonces", + "icon" : "bullhorn", + "mainTitle" : "Petites annonces", + "placeholderMainSearch" : "rechercher parmis les annonces ...", + "lblBtnCreate" : "Publier une annonce", + "colorBtnCreate" : "azure" + }, + + "#agenda": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "agenda", + "subdomainName" : "Agenda", + "hash":"#app.agenda", + "icon" : "calendar", + "mainTitle" : "L'agenda <span class='text-red'>C</span>Ommun", + "placeholderMainSearch" : "rechercher un événement ...", + "lblBtnCreate" : "Créer un événement", + "colorBtnCreate" : "orange" + }, + + + + "#live": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "live", + "subdomainName" : "Live", + "hash":"#app.live", + "icon" : "newspaper-o", + "mainTitle" : "Le fil d'actualité <span class='text-red'>CO</span>mmun", + "placeholderMainSearch" : "rechercher parmis les messages ..." + }, + + + + "#page": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "page", + "subdomainName" : "page", + "hash":"#app.page", + "icon" : "", + "mainTitle" : "Le réseau social à effet de sert", + "placeholderMainSearch" : "rechercher ..." + }, + + "#info": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "apropos", + "subdomainName" : "Info", + "hash":"#app.info", + "icon" : "info-circle", + "mainTitle" : "Le réseau social à effet de sert", + "placeholderMainSearch" : "rechercher parmis les membres du réseau ..." + }, + + "#power": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "power", + "subdomainName" : "Power", + "hash":"#app.power", + "icon" : "hand-rock-o", + "mainTitle" : "CO-démocratie", + "placeholderMainSearch" : "Rechercher ...", + "lblBtnCreate" : "Faire une proposition", + "colorBtnCreate" : "azure" + }, + + + "#city": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "city", + "subdomainName" : "City", + "hash":"#app.city", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "rechercher ..." + }, + + "#rooms": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "rooms", + "subdomainName" : "rooms", + "hash":"#app.rooms", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "rechercher ..." + }, + + "#survey": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "city", + "subdomainName" : "City", + "hash":"#app.survey", + "icon" : "university", + "mainTitle" : "Communexion activée", + "placeholderMainSearch" : "rechercher ..." + }, + + "#admin": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#admin", + "icon" : "university", + "mainTitle" : "Partie Admin", + "placeholderMainSearch" : "Admin ..." + }, + + "#adminpublic": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#adminpublic", + "icon" : "university", + "mainTitle" : "Partie Admin Public", + "placeholderMainSearch" : "Admin Public ..." + } + + } + +} \ No newline at end of file diff --git a/config/FI/place.json b/config/FI/place.json new file mode 100644 index 0000000000000000000000000000000000000000..2b1d12b4ab6fdc170907fcaa9b8193ba66e019e6 --- /dev/null +++ b/config/FI/place.json @@ -0,0 +1,60 @@ +{ + "sections" : { + "all": { + "label":"Tous", + "key" : "all", + "icon" : "cloud" + }, + "common": { + "label":"Commun", + "key" : "common", + "icon" : "circle-o" + }, + "public": { + "label":"Public", + "key" : "public", + "icon" : "users" + }, + "private": { + "label":"Privée", + "key" : "private", + "icon" : "lock" + }, + "urban": { + "label":"Urbain", + "key" : "urban", + "icon" : "building-o" + }, + "rural": { + "label":"Rural", + "key" : "rural", + "icon" : "tree" + } + + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} \ No newline at end of file diff --git a/config/FI/poi.json b/config/FI/poi.json new file mode 100644 index 0000000000000000000000000000000000000000..7d3dd5ea41881e24308a3f277df18a488727c42f --- /dev/null +++ b/config/FI/poi.json @@ -0,0 +1,55 @@ +{ + "sections" : { + + + "link" : { "label": "Lien, Url","key":"link","icon":"link"}, + "tool" : { "label": "Outil","key":"tool","icon":"wrench"}, + "machine" : { "label": "Machine","key":"machine","icon":"cogs"}, + "software" : { "label": "Software","key":"software","icon":"code"}, + "rh" : { "label": "Ressource Humaine","key":"rh","icon":"users"}, + "RessourceMaterielle" : { "label": "Ressource Materielle","key":"RessourceMaterielle","icon":"cubes"}, + "RessourceFinanciere" : { "label": "Ressource Financiere","key":"RessourceFinanciere","icon":"money"}, + "ficheBlanche" : { "label": "Fiche Blanche","key":"ficheBlanche","icon":"file-text-o"}, + "geoJson" : { "label": "Url au format geojson ou vers une umap","key":"geoJson","icon":"map"}, + "compostPickup" : { "label": "récolte de composte","key":"compostPickup","icon":"inbox"}, + "video" : { "label": "video","key":"video","icon":"video-camera"}, + "sharedLibrary" : { "label": "bibliothèque partagée","key":"sharedLibrary","icon":"book"}, + "recoveryCenter": { "label": "ressourcerie","key":"recoveryCenter","icon":"recycle"}, + "trash" : { "label": "poubelle","key":"trash","icon":"trash"}, + "history" : { "label": "histoire","key":"history","icon":"clock-o"}, + "something2See" : { "label": "chose a voir","key":"something2See","icon":"eye"}, + "funPlace" : { "label": "endroit Sympas (skatepark, vue...)","key":"funPlace","icon":"smile-o"}, + "place" : { "label": "place publique","key":"place","icon":"map-marker"}, + "artPiece" : { "label": "oeuvres","key":"artPiece","icon":"paint-brush"}, + "streetArts" : { "label": "arts de rue","key":"streetArts","icon":"paint-brush"}, + "openScene" : { "label": "scène ouverte","key":"openScene","icon":"bullhorn"}, + "stand" : { "label": "stand","key":"stand","icon":"map-marker"}, + "parking" : { "label": "Parking","key":"parking","icon":"car"}, + "other" : { "label":"Autre","key":"other","icon":"map-marker"} + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} diff --git a/config/FI/ressource.json b/config/FI/ressource.json new file mode 100644 index 0000000000000000000000000000000000000000..01e0bf7c5597f4804e7e0d0ac6e9ed3d3116612b --- /dev/null +++ b/config/FI/ressource.json @@ -0,0 +1,33 @@ +{ + "sections" : { + "tool": { + "label":"Outil", + "key" : "tool", + "icon" : "cutlery" + }, + "competence": { + "label":"Compétence", + "key" : "competence", + "icon" : "users" + } + }, + "filters" : { + "Machine" : + { "icon" : "home", + "subcat" : + [ "CNC", + "Imprimante 3D", + "Découpeuse laser" + ] + }, + "Knowledge" : + { "icon" : "user", + "subcat" : + [ "Ingenieur Elec", + "Electrcité", + "Journaliste" + ] + } + } + +} \ No newline at end of file diff --git a/config/FI/todo.json b/config/FI/todo.json new file mode 100644 index 0000000000000000000000000000000000000000..85ac7bc84e899843c3e2fc9d41515c95668f6111 --- /dev/null +++ b/config/FI/todo.json @@ -0,0 +1,29 @@ +"#power": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "power", + "subdomainName" : "Démocratie", + "hash":"#app.power", + "icon" : "comments", + "mainTitle" : "Espace d'expression démocratique", + "placeholderMainSearch" : "rechercher parmis les propositions ...", + "lblBtnCreate" : "Faire une proposition", + "colorBtnCreate" : "azure" +}, + +"#place": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "place", + "subdomainName" : "Lieux", + "hash" : "#app.search.type.place", + "icon" : "map-marker", + "mainTitle" : "Moteur de Ressource <span class='text-red'>territoriales</span>", + "placeholderMainSearch" : "Rechercher un lieu ...", + "lblBtnCreate" : "Ajouter un lieu", + "colorBtnCreate" : "green" +}, + + diff --git a/config/kgougle/classified.json b/config/kgougle/classified.json new file mode 100644 index 0000000000000000000000000000000000000000..19be257c6b6e225a7d9db32f78a386e18845c8eb --- /dev/null +++ b/config/kgougle/classified.json @@ -0,0 +1,246 @@ +{ + "sections" : { + "sharing": { + "label":"Share", + "labelFront":"To share", + "key" : "sharing", + "icon" : "exchange", + "section":2, + "color":"azure" + }, + "donation": { + "label":"Give", + "labelFront":"To give", + "key" : "donation", + "icon" : "gift", + "section":2, + "color":"azure" + }, + + "forsale": { + "label":"Sale", + "labelFront":"For sale", + "key" : "forsale", + "icon" : "money", + "section":3, + "color":"azure" + }, + + "forrent": { + "label":"Rent", + "labelFront":"For rent", + "key" : "forrent", + "icon" : "external-link", + "section":3, + "color":"azure" + }, + + + "lookingfor" : { + "label":"Need", + "labelFront":"Looking for", + "key" : "lookingfor", + "icon" : "eye", + "section":4, + "color":"azure" + }, + + "job": { + "label":"Jobs", + "labelFront":"Offers", + "key" : "job", + "icon" : "briefcase", + "section":5, + "color":"azure", + "filters" : "jobFilters" + } + + }, + "filters" : { + "Technology" : + { "icon" : "laptop", + "subcat" : ["TV / Video", "IT", "Touchpads", "Telephony", "Camera", "Audio device"] + }, + + "Property" : + { "icon" : "building", + "subcat" : ["House", "Flat", "Ground", "Parking", "Office"] + }, + + "Vehicles" : + { "icon" : "car", + "subcat" : + [ "Car", + "SUV", + "Utility", + "Moto", + "Scooter", + "Boat", + "Small car", + "Bikes", + "Car equipment", + "2-wheeled equipment", + "Boat equipment", + "Bike equipment" + ] + }, + + "Home" : + { "icon" : "home", + "subcat" : + [ "Household appliances", + "Furniture", + "Baby equipment", + "Animals", + "Various" + ] + }, + + "Leisure" : + { "icon" : "smile-o", + "subcat" : + [ "Sports", + "Musical instrument", + "Sound system", + "CD / DVD", + "Toy", + "Games", + "Books / Comics", + "Collections", + "DIY", + "Gardening", + "Art / Deco", + "Model making", + "Childcare", + "Animals", + "Various" + ] + }, + + "Fashion" : + { "icon" : "shopping-bag", + "subcat" : + [ "Clothes", + "Shoes", + "Accessories", + "Watches", + "Jewels" + ] + } + }, + "jobFilters" : { + "Purchase-Comptability-Management" : { + "icon":"briefcase", + "subcat" : [] + }, + "Arts-Crafts" : { + "icon":"paint-brush", + "subcat" : [] + }, + "Bank-Insurance" : { + "icon":"money", + "subcat" : [] + }, + "Building-Public_works" : { + "icon":"building", + "subcat" : [] + }, + "Trade-Sales" : { + "icon":"handshake-o", + "subcat" : [] + }, + "Communication-Multimedia" : { + "icon":"television", + "subcat" : [] + }, + "Consultant-Market_research" : { + "icon":"search", + "subcat" : [] + }, + "Natural_spaces" : { + "icon":"tree", + "subcat" : [] + }, + "Agriculture" : { + "icon":"shopping-basket", + "subcat" : [] + }, + "Fishing" : { + "icon":"tint", + "subcat" : [] + }, + "Animals_care" : { + "icon":"medkit", + "subcat" : [] + }, + "Hotel_business" : { + "icon":"hotel", + "subcat" : [] + }, + "Catering" : { + "icon":"cutlery", + "subcat" : [] + }, + "Tourism" : { + "icon":"info-circle", + "subcat" : [] + }, + "Animation" : { + "icon":"signing", + "subcat" : [] + }, + "Property" : { + "icon":"building-o", + "subcat" : [] + }, + "Industry" : { + "icon":"industry", + "subcat" : [] + }, + "IT-Telecommunication" : { + "icon":"wifi", + "subcat" : [] + }, + "Installation-Maintenance" : { + "icon":"wrench", + "subcat" : [] + }, + "Marketing-Strategy" : { + "icon":"area-chart", + "subcat" : [] + }, + "Human_Ressources" : { + "icon":"group", + "subcat" : [] + }, + "Health" : { + "icon":"stethoscope", + "subcat" : [] + }, + "Secretariat-Assistantship" : { + "icon":"support", + "subcat" : [] + }, + "Home_services" : { + "icon":"blind", + "subcat" : [] + }, + "Public_services" : { + "icon":"university", + "subcat" : [] + }, + "Spectacle" : { + "icon":"star", + "subcat" : [] + }, + "Sport" : { + "icon":"futbol-o", + "subcat" : [] + }, + "Transport-Logistic" : { + "icon":"truck", + "subcat" : [] + } + } + +} diff --git a/config/kgougle/classifiedCategories.json b/config/kgougle/classifiedCategories.json new file mode 100644 index 0000000000000000000000000000000000000000..b64622fb394890828401f23178bc0d96d9db7a39 --- /dev/null +++ b/config/kgougle/classifiedCategories.json @@ -0,0 +1,73 @@ +{ + "Technologie" : + { "icon" : "laptop", + "subcat" : ["TV / Vidéo", "Informatique", "Tablettes", "Téléphonie", "Appareils photos", "Appareil audio"] + }, + + "Immobilier" : + { "icon" : "building", + "subcat" : ["Maison", "Appartement", "Terrain", "Parking", "Bureaux"] + }, + + "Véhicules" : + { "icon" : "car", + "subcat" : + [ "Voiture", + "SUV", + "4x4", + "Utilitaire", + "Moto", + "Scooter", + "Bateau", + "Voiturette", + "Vélos", + "Équipement véhicule", + "Équipement 2 roues", + "Équipement bateau", + "Équipement vélo" + ] + }, + + "Maison" : + { "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + }, + + "Loisirs" : + { "icon" : "smile-o", + "subcat" : + [ "Sports", + "Instrument musique", + "Sonorisation", + "CD / DVD", + "Jouet", + "Jeux de société", + "Livres / BD", + "Collections", + "Bricolages", + "Jardinage", + "Art / Déco", + "Modélisme", + "Puériculture", + "Animaux", + "Divers" + ] + }, + + "Mode" : + { "icon" : "shopping-bag", + "subcat" : + [ "Vêtements", + "Chaussures", + "Accessoires", + "Montres", + "Bijoux" + ] + } +} \ No newline at end of file diff --git a/config/kgougle/event.json b/config/kgougle/event.json new file mode 100644 index 0000000000000000000000000000000000000000..69e753a23f334fa19429511f093077c780d64d11 --- /dev/null +++ b/config/kgougle/event.json @@ -0,0 +1,66 @@ +{ + "sections" : { + "competition": {"label":"Compétition", + "key" : "competition", + "icon" : "trophy", + "section":2, + "color":"azure" + }, + "concert": { + "label":"Concert", + "key" : "concert", + "icon" : "microphone", + "section":2, + "color":"azure" + }, + + "concours": { + "label":"Concours", + "key" : "concours", + "icon" : "graduation-cap", + "section":3, + "color":"azure" + }, + + "exposition": { + "label":"Exposition", + "key" : "exposition", + "icon" : "universal-access", + "section":3, + "color":"azure" + }, + + + "festival" : { + "label":"Festival", + "key" : "festival", + "icon" : "beer", + "section":4, + "color":"azure" + }, + + "getTogether": { + "label":"Rencontre", + "key" : "getTogether", + "icon" : "group", + "section":5, + "color":"azure" + }, + + "market": { + "label":"Marché", + "key" : "market", + "icon" : "shopping-basket", + "section":5, + "color":"azure" + }, + + "meeting": { + "label":"Réunion", + "key" : "meeting", + "icon" : "handshake-o", + "section":5, + "color":"azure" + } + } +} \ No newline at end of file diff --git a/config/kgougle/filliaireCategories.json b/config/kgougle/filliaireCategories.json new file mode 100644 index 0000000000000000000000000000000000000000..3fa5e9c7b7faaa2e9e05f7045cc23d729bddf02c --- /dev/null +++ b/config/kgougle/filliaireCategories.json @@ -0,0 +1,62 @@ +{ + "common" : { + "name" : "Commons", + "icon" : "fa-thumbs-o-up", + "tags" : ["commun"] + }, + "food": { + "name" : "Agriculture | Food", + "icon" : "fa-cutlery", + "tags" : ["agriculture","alimentation"] + }, + "health": { + "name" : "Health", + "icon" : "fa-heartbeat", + "tags" : ["santé"] + }, + "waste": { + "name" : "Waste", + "icon" : "fa-trash-o ", + "tags" : ["déchets"] + }, + "building": { + "name" : "Development | Transport | Construction", + "icon" : "fa-bus", + "tags" : ["aménagement","transport","construction"] + }, + "education": { + "name" : "Education | Childhood", + "icon" : "fa-book", + "tags" : ["éducation","petite Enfance"] + }, + "citizen": { + "name" : "Citizenship", + "icon" : "fa-user-circle-o", + "tags" : ["citoyenneté"] + }, + "economy": { + "name" : "Economy", + "icon" : "fa-money", + "tags" : [ "ess","economie social solidaire" ] + }, + "energy": { + "name" : "Energy | Climate", + "icon" : "fa-sun-o", + "tags" : ["energie" ,"climat"] + }, + "culture": { + "name" : "Culture | Animation", + "icon" : "fa-universal-access", + "tags" : ["culture" ,"animation"] + }, + "biodiversity": { + "name" : "Biodiversity", + "icon" : "fa-tree", + "tags" : ["biodiversité"] + }, + "tic": { + "name" : "ICT | Numeric | Internet", + "icon" : "fa-laptop", + "tags" : ["numérique","tic","internet"] + } +} diff --git a/config/kgougle/freedomSections.json b/config/kgougle/freedomSections.json new file mode 100644 index 0000000000000000000000000000000000000000..34ed600737e28852808ae9ae5936f82a649d9e22 --- /dev/null +++ b/config/kgougle/freedomSections.json @@ -0,0 +1,72 @@ +{ + "all": + {"label":"Tout", + "key" : "all", + "icon" : "circle-o", + "section":1, "color":"default"}, + + "like": + {"label":"Coup de cÅ“ur", + "key" : "like", + "icon" : "heartbeat", + "section":2, + "color":"green" + }, + + "dislike": + {"label":"Coup de gueule", + "key" : "dislike", + "icon" : "thumbs-o-down", + "section":2, + "color":"red" + }, + + "lookingfor" : + {"label":"À la recherche", + "key" : "lookingfor", + "icon" : "eye", + "section":3, + "color":"yellow" + }, + + "job": + {"label":"Offre d'emplois", + "key" : "job", + "icon" : "briefcase", + "section":3, + "color":"yellow" + }, + + "forsale": + {"label":"À vendre", + "key" : "forsale", + "icon" : "money", + "section":4, + "color":"blue" + }, + + "location": + {"label":"À louer", + "key" : "location", + "icon" : "external-link", + "section":4, + "color":"blue" + }, + + "donation": + {"label":"À donner", + "key" : "donation", + "icon" : "gift", + "section":5, + "color":"blue" + }, + + "sharing": + {"label":"À partager", + "key" : "sharing", + "icon" : "exchange", + "section":5, + "color":"blue" + } + +} \ No newline at end of file diff --git a/config/kgougle/params.json b/config/kgougle/params.json new file mode 100644 index 0000000000000000000000000000000000000000..706231a4f27abf35723929113c57ab4fd90e2153 --- /dev/null +++ b/config/kgougle/params.json @@ -0,0 +1,168 @@ +{ + "title" : "Kgougle", + "metaImg" : "/assets/img/KGOUGLE-logo-min.png", + "metaDesc" : "Le moteur de recherche des cagous", + "devises" : { "CFP" : "CFP" }, + "deviseDefault" : "CFP", + + "pages" : + { + "#app.index": + {"redirect":"web"}, + + "#welcome": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "welcome", + "subdomainName" : "Accueil", + "hash" : "#app.welcome", + "icon" : "", + "mainTitle" : "La porte d'entrée sur le web Calédonien", + "placeholderMainSearch" : "Rechercher quelque chose ...", + "lblBtnCreate" : "Créer quelque chose", + "colorBtnCreate" : "green" + }, + + "#web": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "web", + "subdomainName" : "web", + "hash" : "#app.web", + "icon" : "search", + "mainTitle" : "Le moteur de recherche des cagous", + "placeholderMainSearch" : "Que recherchez-vous ?"}, + + "#referencement": + {"inMenu" : false, + "useHeader" : true, + "open" : true, + "subdomain" : "referencement", + "subdomainName" : "referencement", + "hash" : "#app.referencement", + "icon" : "search", + "mainTitle" : "Référencer une page", + "placeholderMainSearch" : ""}, + + "#actu": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "actu", + "subdomainName" : "Actu", + "hash" : "#app.media", + "icon" : "newspaper-o", + "mainTitle" : "Fil d'actu <span class='letter-red'>média</span>", + "placeholderMainSearch" : "rechercher dans l'actu ..."}, + + "#live": { + "inMenu" : true, + "useHeader" : true, + "open" : false, + "subdomain" : "live", + "subdomainName" : "Live", + "hash":"#app.live", + "icon" : "stack-exchange", + "mainTitle" : "Fil d'actu Fil d'actu <span class='letter-red'>citoyen</span>", + "placeholderMainSearch" : "search in live ..." + }, + + "#social": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "social", + "subdomainName" : "social", + "hash" : "#app.search", + "icon" : "user-circle-o", + "mainTitle" : "Réseau social citoyen", + "placeholderMainSearch" : "rechercher une page ...", + "lblBtnCreate" : "Créer une page", + "colorBtnCreate" : "green"}, + + "#annonces": + {"inMenu" : true, + "useHeader" : true, + "open" : false, + "subdomain" : "annonces", + "subdomainName" : "annonces", + "hash" : "#app.annonces", + "icon" : "bullhorn", + "mainTitle" : "Toutes vos annonces en direct", + "placeholderMainSearch" : "rechercher parmis les annonces ...", + "lblBtnCreate" : "Publier une annonce", + "colorBtnCreate" : "azure"}, + + "#agenda": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "agenda", + "subdomainName" : "agenda", + "hash" : "#app.agenda", + "icon" : "calendar", + "mainTitle" : "L'agenda collaboratif des Calédoniens", + "placeholderMainSearch" : "rechercher un événement ...", + "lblBtnCreate" : "Créer un événement", + "colorBtnCreate" : "orange"}, + + "#power": + {"inMenu" : true, + "useHeader" : true, + "open" : false, + "subdomain" : "power", + "subdomainName" : "power", + "hash" : "#app.power", + "icon" : "hand-rock-o", + "mainTitle" : "L'espace collaboratif des Calédoniens.", + "placeholderMainSearch" : "rechercher parmis les propositions"}, + + "#page": + {"inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "page", + "subdomainName" : "page", + "hash" : "#app.page", + "icon" : "", + "mainTitle" : "Le réseau social Calédonien", + "placeholderMainSearch" : "rechercher parmis les membres du réseau ..."}, + + "#info": + {"inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "apropos", + "subdomainName" : "Info", + "hash" : "#app.info", + "icon" : "search", + "mainTitle" : "Le moteur de recherche des Cagous", + "placeholderMainSearch" : "rechercher parmis les membres du réseau ..."}, + + "#admin": { + "inMenu" : false, + "useHeader" : true, + "open" : true, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#admin", + "icon" : "grav", + "mainTitle" : "Partie Admin", + "placeholderMainSearch" : "Admin ..." + }, + "#smartconso": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "smartconso", + "subdomainName" : "smartconso", + "hash":"#app.smartconso.p.home", + "icon" : "recycle", + "mainTitle" : "Consommons mieux en Nouvelle-Calédonie", + "placeholderMainSearch" : "rechercher ..." + } + } + +} \ No newline at end of file diff --git a/config/kgougle/place.json b/config/kgougle/place.json new file mode 100644 index 0000000000000000000000000000000000000000..2b1d12b4ab6fdc170907fcaa9b8193ba66e019e6 --- /dev/null +++ b/config/kgougle/place.json @@ -0,0 +1,60 @@ +{ + "sections" : { + "all": { + "label":"Tous", + "key" : "all", + "icon" : "cloud" + }, + "common": { + "label":"Commun", + "key" : "common", + "icon" : "circle-o" + }, + "public": { + "label":"Public", + "key" : "public", + "icon" : "users" + }, + "private": { + "label":"Privée", + "key" : "private", + "icon" : "lock" + }, + "urban": { + "label":"Urbain", + "key" : "urban", + "icon" : "building-o" + }, + "rural": { + "label":"Rural", + "key" : "rural", + "icon" : "tree" + } + + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} \ No newline at end of file diff --git a/config/kgougle/placeSections.json b/config/kgougle/placeSections.json new file mode 100644 index 0000000000000000000000000000000000000000..148fa1f63150cff445a72ccd75f0bcab3cab51b8 --- /dev/null +++ b/config/kgougle/placeSections.json @@ -0,0 +1,28 @@ +{ + "common": { + "label":"Commun", + "key" : "common", + "icon" : "circle-o" + }, + "public": { + "label":"Public", + "key" : "public", + "icon" : "users" + }, + "private": { + "label":"Privée", + "key" : "private", + "icon" : "lock" + }, + "urban": { + "label":"Urbain", + "key" : "urban", + "icon" : "building-o" + }, + "rural": { + "label":"Rural", + "key" : "rural", + "icon" : "tree" + } + +} \ No newline at end of file diff --git a/config/kgougle/placesFilters.json b/config/kgougle/placesFilters.json new file mode 100644 index 0000000000000000000000000000000000000000..b170ca4d3892971d39ff35360c0622cc76de6193 --- /dev/null +++ b/config/kgougle/placesFilters.json @@ -0,0 +1,26 @@ +{ + + + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Coworking", + "Salle reunion", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : + { "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + +} \ No newline at end of file diff --git a/config/kgougle/poi.json b/config/kgougle/poi.json new file mode 100644 index 0000000000000000000000000000000000000000..c02fc045a7ff71fd4e915140c28adb80edb73fc8 --- /dev/null +++ b/config/kgougle/poi.json @@ -0,0 +1,56 @@ +{ + "sections" : { + + + "link" : { "label": "Lien, Url","key":"link","icon":"map-marker"}, + "tool" : { "label": "Outil","key":"tool","icon":"map-marker"}, + "machine" : { "label": "Machine","key":"machine","icon":"map-marker"}, + "software" : { "label": "Software","key":"software","icon":"map-marker"}, + "rh" : { "label": "Ressource Humaine","key":"rh","icon":"map-marker"}, + "RessourceMaterielle" : { "label": "Ressource Materielle","key":"RessourceMaterielle","icon":"map-marker"}, + "RessourceFinanciere" : { "label": "Ressource Financiere","key":"RessourceFinanciere","icon":"map-marker"}, + "ficheBlanche" : { "label": "Fiche Blanche","key":"ficheBlanche","icon":"map-marker"}, + "poi" : { "label":"points d'intérêt","key":"poi","icon":"map-marker"}, + "geoJson" : { "label": "Url au format geojson ou vers une umap","key":"geoJson","icon":"map-marker"}, + "compostPickup" : { "label": "récolte de composte","key":"compostPickup","icon":"map-marker"}, + "video" : { "label": "video","key":"video","icon":"map-marker"}, + "sharedLibrary" : { "label": "bibliothèque partagée","key":"sharedLibrary","icon":"map-marker"}, + "artPiece" : { "label": "oeuvres","key":"artPiece","icon":"map-marker"}, + "recoveryCenter": { "label": "ressourcerie","key":"recoveryCenter","icon":"map-marker"}, + "trash" : { "label": "poubelle","key":"trash","icon":"map-marker"}, + "history" : { "label": "histoire","key":"history","icon":"map-marker"}, + "something2See" : { "label": "chose a voir","key":"something2See","icon":"map-marker"}, + "funPlace" : { "label": "endroit Sympas (skatepark, vue...)","key":"funPlace","icon":"map-marker"}, + "place" : { "label": "place publique","key":"place","icon":"map-marker"}, + "streetArts" : { "label": "arts de rue","key":"streetArts","icon":"map-marker"}, + "openScene" : { "label": "scène ouverte","key":"openScene","icon":"map-marker"}, + "stand" : { "label": "stand","key":"stand","icon":"map-marker"}, + "parking" : { "label": "Parking","key":"parking","icon":"map-marker"} + + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} \ No newline at end of file diff --git a/config/kgougle/ressource.json b/config/kgougle/ressource.json new file mode 100644 index 0000000000000000000000000000000000000000..01e0bf7c5597f4804e7e0d0ac6e9ed3d3116612b --- /dev/null +++ b/config/kgougle/ressource.json @@ -0,0 +1,33 @@ +{ + "sections" : { + "tool": { + "label":"Outil", + "key" : "tool", + "icon" : "cutlery" + }, + "competence": { + "label":"Compétence", + "key" : "competence", + "icon" : "users" + } + }, + "filters" : { + "Machine" : + { "icon" : "home", + "subcat" : + [ "CNC", + "Imprimante 3D", + "Découpeuse laser" + ] + }, + "Knowledge" : + { "icon" : "user", + "subcat" : + [ "Ingenieur Elec", + "Electrcité", + "Journaliste" + ] + } + } + +} \ No newline at end of file diff --git a/config/kgougle/room.json b/config/kgougle/room.json new file mode 100644 index 0000000000000000000000000000000000000000..53ab9e6103df2a8734605db15952471bd9e5d471 --- /dev/null +++ b/config/kgougle/room.json @@ -0,0 +1,19 @@ +{ + "sections" : { + "discuss": { + "label":"Discussion", + "key" : "discuss", + "icon" : "comment" + }, + "vote": { + "label":"Decision", + "key" : "vote", + "icon" : "gavel" + }, + "actions": { + "label":"Action", + "key" : "actions", + "icon" : "cogs" + } + } +} \ No newline at end of file diff --git a/config/overwrite.php b/config/overwrite.php deleted file mode 100644 index fd4da0f5e3c8bd2c6a37503dca9cbb8899f8e4a8..0000000000000000000000000000000000000000 --- a/config/overwrite.php +++ /dev/null @@ -1,9 +0,0 @@ -<?php -$overWrite = array( - "name" => "terla", - "baseUrl" => "/ph/terla/", - "assets" => array( - 'js/directory.js',), - "views" => array( - "directoryjs" => "default/directoryjs"), - ); \ No newline at end of file diff --git a/config/terla/classified.json b/config/terla/classified.json new file mode 100644 index 0000000000000000000000000000000000000000..c66b8879ebf5ddfb488e8ac1d7740eedc881b8af --- /dev/null +++ b/config/terla/classified.json @@ -0,0 +1,251 @@ +{ + "sections" : { + "sharing": { + "label":"Partager", + "labelFront":"À partager", + "key" : "sharing", + "icon" : "exchange", + "section":2, + "color":"azure" + }, + "donation": { + "label":"Donner", + "labelFront":"À donner", + "key" : "donation", + "icon" : "gift", + "section":2, + "color":"azure" + }, + + "forsale": { + "label":"Vendre", + "labelFront":"À vendre", + "key" : "forsale", + "icon" : "money", + "section":3, + "color":"azure" + }, + + "forrent": { + "label":"Louer", + "labelFront":"À louer", + "key" : "forrent", + "icon" : "external-link", + "section":3, + "color":"azure" + }, + + + "lookingfor" : { + "label":"Besoin", + "labelFront":"À la recherche", + "key" : "lookingfor", + "icon" : "eye", + "section":4, + "color":"azure" + }, + + "job": { + "label":"Emplois", + "labelFront":"Offres d'emplois", + "key" : "job", + "icon" : "briefcase", + "section":5, + "color":"azure", + "filters" : "jobFilters" + } + + }, + "filters" : { + "Technologie" : + { "icon" : "laptop", + "subcat" : ["TV / Vidéo", "Informatique", "Tablettes", "Téléphonie", "Appareils photos", "Appareil audio"] + }, + + "Immobilier" : + { "icon" : "building", + "subcat" : ["Maison", "Appartement", "Terrain", "Parking", "Bureaux"] + }, + + "Véhicules" : + { "icon" : "car", + "subcat" : + [ "Voiture", + "SUV", + "4x4", + "Utilitaire", + "Moto", + "Scooter", + "Bateau", + "Voiturette", + "Vélos", + "Équipement véhicule", + "Équipement 2 roues", + "Équipement bateau", + "Équipement vélo" + ] + }, + + "Maison" : + { "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + }, + + "Loisirs" : + { "icon" : "smile-o", + "subcat" : + [ "Sports", + "Instrument musique", + "Sonorisation", + "CD / DVD", + "Jouet", + "Jeux de société", + "Livres / BD", + "Collections", + "Bricolages", + "Jardinage", + "Art / Déco", + "Modélisme", + "Puériculture", + "Animaux", + "Divers" + ] + }, + + "Mode" : + { "icon" : "shopping-bag", + "subcat" : + [ "Vêtements", + "Chaussures", + "Accessoires", + "Montres", + "Bijoux" + ] + } + }, + "jobFilters" : { + "Achats-Comptabilité-Gestion" : { + "icon":"user", + "subcat" : [] + }, + "Arts-Artisanat" : { + "icon":"user", + "subcat" : [] + }, + "Banque-Assurance" : { + "icon":"user", + "subcat" : [] + }, + "Bâtiment-Travaux_Publics" : { + "icon":"user", + "subcat" : [] + }, + "Commerce-Vente" : { + "icon":"user", + "subcat" : [] + }, + "Communication-Multimédia" : { + "icon":"user", + "subcat" : [] + }, + "Conseil-Etudes" : { + "icon":"user", + "subcat" : [] + }, + "Direction_Entreprise" : { + "icon":"user", + "subcat" : [] + }, + "Espaces_Naturels" : { + "icon":"user", + "subcat" : [] + }, + "Agriculture" : { + "icon":"user", + "subcat" : [] + }, + "Pêche" : { + "icon":"user", + "subcat" : [] + }, + "Soins_aux_animaux" : { + "icon":"user", + "subcat" : [] + }, + "Hôtellerie" : { + "icon":"user", + "subcat" : [] + }, + "Restauration" : { + "icon":"user", + "subcat" : [] + }, + "Tourisme" : { + "icon":"user", + "subcat" : [] + }, + "Animation" : { + "icon":"user", + "subcat" : [] + }, + "Immobilier" : { + "icon":"user", + "subcat" : [] + }, + "Industrie" : { + "icon":"user", + "subcat" : [] + }, + "Informatique-Télécommunication" : { + "icon":"user", + "subcat" : [] + }, + "Installation-Maintenance" : { + "icon":"user", + "subcat" : [] + }, + "Marketing-Stratégie_Commerciale" : { + "icon":"user", + "subcat" : [] + }, + "Ressources_Humaines" : { + "icon":"user", + "subcat" : [] + }, + "Santé" : { + "icon":"user", + "subcat" : [] + }, + "Secrétariat-Assistanat" : { + "icon":"user", + "subcat" : [] + }, + "Services_à _la_personne" : { + "icon":"user", + "subcat" : [] + }, + "Services_à _la_collectivité" : { + "icon":"user", + "subcat" : [] + }, + "Spectacle" : { + "icon":"user", + "subcat" : [] + }, + "Sport" : { + "icon":"user", + "subcat" : [] + }, + "Transport-Logistique" : { + "icon":"user", + "subcat" : [] + } + } + +} diff --git a/config/terla/event.json b/config/terla/event.json new file mode 100644 index 0000000000000000000000000000000000000000..69e753a23f334fa19429511f093077c780d64d11 --- /dev/null +++ b/config/terla/event.json @@ -0,0 +1,66 @@ +{ + "sections" : { + "competition": {"label":"Compétition", + "key" : "competition", + "icon" : "trophy", + "section":2, + "color":"azure" + }, + "concert": { + "label":"Concert", + "key" : "concert", + "icon" : "microphone", + "section":2, + "color":"azure" + }, + + "concours": { + "label":"Concours", + "key" : "concours", + "icon" : "graduation-cap", + "section":3, + "color":"azure" + }, + + "exposition": { + "label":"Exposition", + "key" : "exposition", + "icon" : "universal-access", + "section":3, + "color":"azure" + }, + + + "festival" : { + "label":"Festival", + "key" : "festival", + "icon" : "beer", + "section":4, + "color":"azure" + }, + + "getTogether": { + "label":"Rencontre", + "key" : "getTogether", + "icon" : "group", + "section":5, + "color":"azure" + }, + + "market": { + "label":"Marché", + "key" : "market", + "icon" : "shopping-basket", + "section":5, + "color":"azure" + }, + + "meeting": { + "label":"Réunion", + "key" : "meeting", + "icon" : "handshake-o", + "section":5, + "color":"azure" + } + } +} \ No newline at end of file diff --git a/config/terla/filliaireCategories.json b/config/terla/filliaireCategories.json new file mode 100644 index 0000000000000000000000000000000000000000..46fec10d8055871ed15ce1541b0ae0c76e6cf940 --- /dev/null +++ b/config/terla/filliaireCategories.json @@ -0,0 +1,22 @@ +{ + "Hébergement" : { + "name" : "Hébergement", + "icon" : "fa-home", + "tags" : ["commun"] + }, + "Restauration": { + "name" : "Restauration", + "icon" : "fa-cutlery", + "tags" : ["agriculture","alimentation"] + }, + "Loisirs": { + "name" : "Loisirs", + "icon" : "fa-heartbeat", + "tags" : ["santé"] + }, + "Transport": { + "name" : "Transport", + "icon" : "fa-car ", + "tags" : ["déchets"] + } +} diff --git a/config/terla/params.json b/config/terla/params.json new file mode 100644 index 0000000000000000000000000000000000000000..ee61e614edf4dd99bf26081d64b96b39ee56c813 --- /dev/null +++ b/config/terla/params.json @@ -0,0 +1,170 @@ +{ + "title" : "app", + "metaImg" : "/assets/img/LOGOS/BCH/logo.png", + "metaDesc" : "Bienvenue chez l'habitant", + + "pages" : { + "#app.index": {"redirect":"welcome"}, + + "#welcome": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "welcome", + "subdomainName" : "Home", + "hash" : "#app.welcome", + "icon" : "", + "mainTitle" : "Réseau sociétal <span class='text-red'>territorial</span>", + "placeholderMainSearch" : "search something ...", + "lblBtnCreate" : "Create something", + "colorBtnCreate" : "green" + }, + + "#search": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "search", + "subdomainName" : "Search", + "hash" : "#app.search", + "icon" : "search", + "mainTitle" : "Result for", + "placeholderMainSearch" : "search a page ...", + "lblBtnCreate" : "Create a page", + "colorBtnCreate" : "green" + }, + + "#annonces": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "annonces", + "subdomainName" : "Classifieds", + "hash" : "#app.annonces", + "icon" : "bullhorn", + "mainTitle" : "Classified ads", + "placeholderMainSearch" : "search among classifieds ...", + "lblBtnCreate" : "Create a classified ad", + "colorBtnCreate" : "azure" + }, + "#activities": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "activities", + "subdomainName" : "Activities", + "hash" : "#app.activities", + "icon" : "sun-o", + "mainTitle" : "Store", + "placeholderMainSearch" : "search among activities ...", + "lblBtnCreate" : "Create an activity", + "colorBtnCreate" : "orange" + }, + "#circuits": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "circuits", + "subdomainName" : "circuits", + "hash" : "#app.circuits", + "icon" : "ravelry", + "mainTitle" : "Store", + "placeholderMainSearch" : "search among circuits ...", + "lblBtnCreate" : "", + "colorBtnCreate" : "orange" + }, + "#store": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "annonces", + "subdomainName" : "Store", + "hash" : "#app.store", + "icon" : "shopping-basket", + "mainTitle" : "Store", + "placeholderMainSearch" : "search among classifieds ...", + "lblBtnCreate" : "Create a product", + "colorBtnCreate" : "orange" + }, + + "#agenda": { + "inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "agenda", + "subdomainName" : "Agenda", + "hash":"#app.agenda", + "icon" : "calendar", + "mainTitle" : "<span class='text-red'>C</span>Ommon agenda", + "placeholderMainSearch" : "search an event ...", + "lblBtnCreate" : "Create an event", + "colorBtnCreate" : "orange" + }, + + + "#chat": { + "inMenu" : false, + "open" : true, + "subdomain" : "chat", + "subdomainName" : "Chat", + "alias":"#chatAction", + "login" : true, + "notif" : "chatNotifs", + "icon" : "comments", + "mainTitle" : "<span class='text-red'>CHAT with your communities</span>", + "removeAfterLoad" : true, + "emptyContextData" : false + }, + + "#page": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "page", + "subdomainName" : "page", + "hash":"#app.page", + "icon" : "", + "mainTitle" : "Le réseau social à effet de sert", + "placeholderMainSearch" : "search ..." + }, + + "#info": { + "inMenu" : false, + "useHeader" : false, + "open" : true, + "subdomain" : "apropos", + "subdomainName" : "Info", + "hash":"#app.info", + "icon" : "info-circle", + "mainTitle" : "Le réseau social à effet de sert", + "placeholderMainSearch" : "search..." + }, + + + + "#admin": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#app.admin", + "icon" : "university", + "mainTitle" : "Partie Admin", + "placeholderMainSearch" : "Admin ..." + }, + + "#adminpublic": { + "inMenu" : false, + "useHeader" : true, + "open" : false, + "subdomain" : "admin", + "subdomainName" : "admin", + "hash":"#adminpublic", + "icon" : "university", + "mainTitle" : "Partie Admin Public", + "placeholderMainSearch" : "Admin Public ..." + } + } + +} \ No newline at end of file diff --git a/config/terla/place.json b/config/terla/place.json new file mode 100644 index 0000000000000000000000000000000000000000..2b1d12b4ab6fdc170907fcaa9b8193ba66e019e6 --- /dev/null +++ b/config/terla/place.json @@ -0,0 +1,60 @@ +{ + "sections" : { + "all": { + "label":"Tous", + "key" : "all", + "icon" : "cloud" + }, + "common": { + "label":"Commun", + "key" : "common", + "icon" : "circle-o" + }, + "public": { + "label":"Public", + "key" : "public", + "icon" : "users" + }, + "private": { + "label":"Privée", + "key" : "private", + "icon" : "lock" + }, + "urban": { + "label":"Urbain", + "key" : "urban", + "icon" : "building-o" + }, + "rural": { + "label":"Rural", + "key" : "rural", + "icon" : "tree" + } + + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} \ No newline at end of file diff --git a/config/terla/poi.json b/config/terla/poi.json new file mode 100644 index 0000000000000000000000000000000000000000..7d3dd5ea41881e24308a3f277df18a488727c42f --- /dev/null +++ b/config/terla/poi.json @@ -0,0 +1,55 @@ +{ + "sections" : { + + + "link" : { "label": "Lien, Url","key":"link","icon":"link"}, + "tool" : { "label": "Outil","key":"tool","icon":"wrench"}, + "machine" : { "label": "Machine","key":"machine","icon":"cogs"}, + "software" : { "label": "Software","key":"software","icon":"code"}, + "rh" : { "label": "Ressource Humaine","key":"rh","icon":"users"}, + "RessourceMaterielle" : { "label": "Ressource Materielle","key":"RessourceMaterielle","icon":"cubes"}, + "RessourceFinanciere" : { "label": "Ressource Financiere","key":"RessourceFinanciere","icon":"money"}, + "ficheBlanche" : { "label": "Fiche Blanche","key":"ficheBlanche","icon":"file-text-o"}, + "geoJson" : { "label": "Url au format geojson ou vers une umap","key":"geoJson","icon":"map"}, + "compostPickup" : { "label": "récolte de composte","key":"compostPickup","icon":"inbox"}, + "video" : { "label": "video","key":"video","icon":"video-camera"}, + "sharedLibrary" : { "label": "bibliothèque partagée","key":"sharedLibrary","icon":"book"}, + "recoveryCenter": { "label": "ressourcerie","key":"recoveryCenter","icon":"recycle"}, + "trash" : { "label": "poubelle","key":"trash","icon":"trash"}, + "history" : { "label": "histoire","key":"history","icon":"clock-o"}, + "something2See" : { "label": "chose a voir","key":"something2See","icon":"eye"}, + "funPlace" : { "label": "endroit Sympas (skatepark, vue...)","key":"funPlace","icon":"smile-o"}, + "place" : { "label": "place publique","key":"place","icon":"map-marker"}, + "artPiece" : { "label": "oeuvres","key":"artPiece","icon":"paint-brush"}, + "streetArts" : { "label": "arts de rue","key":"streetArts","icon":"paint-brush"}, + "openScene" : { "label": "scène ouverte","key":"openScene","icon":"bullhorn"}, + "stand" : { "label": "stand","key":"stand","icon":"map-marker"}, + "parking" : { "label": "Parking","key":"parking","icon":"car"}, + "other" : { "label":"Autre","key":"other","icon":"map-marker"} + }, + "filters":{ + "TiersLieux" : + { "icon" : "home", + "subcat" : + [ "Fablab", + "Repaire Café", + "Coworking", + "Salle reunion", + "Jardin Partagé", + "Urbaine", + "Rurale" + ] + }, + + "Maison" : { + "icon" : "home", + "subcat" : + [ "Electroménager", + "Mobilier", + "Équipement bébé", + "Animaux", + "Divers" + ] + } + } +} diff --git a/config/terla/ressource.json b/config/terla/ressource.json new file mode 100644 index 0000000000000000000000000000000000000000..01e0bf7c5597f4804e7e0d0ac6e9ed3d3116612b --- /dev/null +++ b/config/terla/ressource.json @@ -0,0 +1,33 @@ +{ + "sections" : { + "tool": { + "label":"Outil", + "key" : "tool", + "icon" : "cutlery" + }, + "competence": { + "label":"Compétence", + "key" : "competence", + "icon" : "users" + } + }, + "filters" : { + "Machine" : + { "icon" : "home", + "subcat" : + [ "CNC", + "Imprimante 3D", + "Découpeuse laser" + ] + }, + "Knowledge" : + { "icon" : "user", + "subcat" : + [ "Ingenieur Elec", + "Electrcité", + "Journaliste" + ] + } + } + +} \ No newline at end of file diff --git a/config/terla/room.json b/config/terla/room.json new file mode 100644 index 0000000000000000000000000000000000000000..53ab9e6103df2a8734605db15952471bd9e5d471 --- /dev/null +++ b/config/terla/room.json @@ -0,0 +1,19 @@ +{ + "sections" : { + "discuss": { + "label":"Discussion", + "key" : "discuss", + "icon" : "comment" + }, + "vote": { + "label":"Decision", + "key" : "vote", + "icon" : "gavel" + }, + "actions": { + "label":"Action", + "key" : "actions", + "icon" : "cogs" + } + } +} \ No newline at end of file diff --git a/config/terla/service.json b/config/terla/service.json new file mode 100644 index 0000000000000000000000000000000000000000..f7218285caafd111efac9e93b405d3e27b8c2fc1 --- /dev/null +++ b/config/terla/service.json @@ -0,0 +1,11 @@ +{ + "categories" : { + "sleeping":"Sleeping", + "restaurant":"Restaurant", + "funnytime":"Funny activity", + "transport":"Transport", + "siteToSee":"Uncredible site", + "artisants":"Artisants", + "guideAccom":"Guide and helper" + } +} \ No newline at end of file diff --git a/config/terla/todo.json b/config/terla/todo.json new file mode 100644 index 0000000000000000000000000000000000000000..85ac7bc84e899843c3e2fc9d41515c95668f6111 --- /dev/null +++ b/config/terla/todo.json @@ -0,0 +1,29 @@ +"#power": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "power", + "subdomainName" : "Démocratie", + "hash":"#app.power", + "icon" : "comments", + "mainTitle" : "Espace d'expression démocratique", + "placeholderMainSearch" : "rechercher parmis les propositions ...", + "lblBtnCreate" : "Faire une proposition", + "colorBtnCreate" : "azure" +}, + +"#place": + {"inMenu" : true, + "useHeader" : true, + "open" : true, + "subdomain" : "place", + "subdomainName" : "Lieux", + "hash" : "#app.search.type.place", + "icon" : "map-marker", + "mainTitle" : "Moteur de Ressource <span class='text-red'>territoriales</span>", + "placeholderMainSearch" : "Rechercher un lieu ...", + "lblBtnCreate" : "Ajouter un lieu", + "colorBtnCreate" : "green" +}, + + diff --git a/controllers/ActionController.php b/controllers/ActionController.php new file mode 100755 index 0000000000000000000000000000000000000000..a31327b5add6b943122ea9e1f70cf4d1d0656a58 --- /dev/null +++ b/controllers/ActionController.php @@ -0,0 +1,23 @@ +<?php +/** + * ActionController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 7/29/15 + * Time: 12:25 AM + */ +class ActionController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'addaction' => 'citizenToolKit.controllers.action.AddActionAction' + ); + } +} \ No newline at end of file diff --git a/controllers/AdminController.php b/controllers/AdminController.php new file mode 100755 index 0000000000000000000000000000000000000000..01700fa3f29d98f03bfafa73fd78ca9f97a3feb0 --- /dev/null +++ b/controllers/AdminController.php @@ -0,0 +1,62 @@ +<?php +/** + * AdminController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 7/23/12 + * Time: 12:25 AM + */ +class AdminController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions(){ + return array( + 'directory' => 'citizenToolKit.controllers.admin.DirectoryAction', + 'circuits' => 'citizenToolKit.controllers.admin.CircuitsAction', + 'mailerrordashboard' => 'citizenToolKit.controllers.admin.MailErrorDashboardAction', + 'switchto' => 'citizenToolKit.controllers.admin.SwitchtoAction', + 'delete' => 'citizenToolKit.controllers.admin.DeleteAction', + 'activateuser'=> 'citizenToolKit.controllers.admin.ActivateUserAction', + 'importdata' => 'citizenToolKit.controllers.admin.ImportDataAction', + 'previewdata' => 'citizenToolKit.controllers.admin.PreviewDataAction', + 'importinmongo' => 'citizenToolKit.controllers.admin.ImportInMongoAction', + 'assigndata' => 'citizenToolKit.controllers.admin.AssignDataAction', + 'checkdataimport' => 'citizenToolKit.controllers.admin.CheckDataImportAction', + 'openagenda' => 'citizenToolKit.controllers.admin.OpenAgendaAction', + 'checkventsopenagendaindb' => 'citizenToolKit.controllers.admin.CheckEventsOpenAgendaInDBAction', + 'importeventsopenagendaindb' => 'citizenToolKit.controllers.admin.ImportEventsOpenAgendaInDBAction', + 'checkgeocodage' => 'citizenToolKit.controllers.admin.CheckGeoCodageAction', + 'getentitybadlygeolocalited' => 'citizenToolKit.controllers.admin.GetEntityBadlyGeoLocalitedAction', + 'getdatabyurl' => 'citizenToolKit.controllers.admin.GetDataByUrlAction', + 'adddata' => 'citizenToolKit.controllers.admin.AddDataAction', + 'adddataindb' => 'citizenToolKit.controllers.admin.AddDataInDbAction', + 'createfileforimport' => 'citizenToolKit.controllers.admin.CreateFileForImportAction', + 'sourceadmin' => 'citizenToolKit.controllers.admin.SourceAdminAction', + 'moderate' => 'citizenToolKit.controllers.admin.ModerateAction', + 'checkcities' => 'citizenToolKit.controllers.admin.CheckCitiesAction', + 'checkcedex' => 'citizenToolKit.controllers.admin.CheckCedexAction', + 'downloadfile' => 'citizenToolKit.controllers.admin.DownloadFileAction', + 'statistics' => 'citizenToolKit.controllers.admin.StatisticsAction', + 'createfile' => 'citizenToolKit.controllers.admin.CreateFileAction', + 'cities' => 'citizenToolKit.controllers.admin.CitiesAction', + ); + } + + + /*public function actionIndex($view=null){ + CO2Stat::incNbLoad("co2-admin"); + $params = array( + "view" => @$view, + ); + $dir=""; + if(Yii::app()->params["CO2DomainName"] == "terla") + $dir="terla/"; + echo $this->renderPartial($dir."index", $params, true); + }*/ + +} \ No newline at end of file diff --git a/controllers/AdminpublicController.php b/controllers/AdminpublicController.php new file mode 100755 index 0000000000000000000000000000000000000000..ec1793bd2a7a85bdda94a1b10b9a705207af0a65 --- /dev/null +++ b/controllers/AdminpublicController.php @@ -0,0 +1,38 @@ +<?php +/** + * + * + * @author: Raphael RIVIERE + * Date: + */ +class AdminpublicController extends CommunecterController { + + protected function beforeAction($action) + { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + // captcha action renders the CAPTCHA image displayed on the contact page + //'index' => 'citizenToolKit.controllers.adminpublic.IndexAction', + 'createfile' => 'citizenToolKit.controllers.adminpublic.CreateFileAction', + 'adddata' => 'citizenToolKit.controllers.adminpublic.AddDataAction', + 'adddataindb' => 'citizenToolKit.controllers.adminpublic.AddDataInDbAction', + 'sourceadmin' => 'citizenToolKit.controllers.adminpublic.SourceadminAction', + 'getdatabyurl' => 'citizenToolKit.controllers.adminpublic.GetDataByUrlAction', + 'assigndata' => 'citizenToolKit.controllers.adminpublic.AssignDataAction', + 'previewdata' => 'citizenToolKit.controllers.adminpublic.PreviewDataAction', + 'interopproposed' => 'citizenToolKit.controllers.adminpublic.InteropProposedAction', + 'cleantags' => 'citizenToolKit.controllers.adminpublic.CleanTagsAction', + ); + } + + public function actionIndex(){ + CO2Stat::incNbLoad("co2-admin"); + $params = array(); + echo $this->renderPartial("index", $params, true); + } +} \ No newline at end of file diff --git a/controllers/AppController.php b/controllers/AppController.php new file mode 100755 index 0000000000000000000000000000000000000000..5494d8935bb5b3dc1df933243b6b30642ac9bb8a --- /dev/null +++ b/controllers/AppController.php @@ -0,0 +1,395 @@ +<?php +/** + * Co2Controller.php + * + * @author: Alpha Tango + * Date: 12/2016 + */ +class AppController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.app.IndexAction', + 'websearch' => 'citizenToolKit.controllers.app.WebSearchAction', + 'live' => 'citizenToolKit.controllers.app.LiveAction', + 'savereferencement' => 'citizenToolKit.controllers.app.SaveReferencementAction', + 'mediacrawler' => 'citizenToolKit.controllers.app.MediaCrawlerAction', + 'superadmin' => 'citizenToolKit.controllers.app.SuperAdminAction', + //'sendmailformcontact' => 'citizenToolKit.controllers.app.SendMailFormContactAction', + 'checkurlexists' => 'citizenToolKit.controllers.app.CheckUrlExistsAction', + ); + } + + + public function actionIndex(){ + $CO2DomainName = isset( Yii::app()->params["CO2DomainName"]) ? + Yii::app()->params["CO2DomainName"] : "CO2"; + + //Yii::app()->theme = "CO2"; + Yii::app()->session["theme"] = "CO2"; + $params = CO2::getThemeParams(); + + $hash = $params["pages"]["#app.index"]["redirect"]; + + $params = array("type" => @$type ); + + if(!@$hash || @$hash=="") $hash="search"; + //echo @$hash; exit; + if(@$hash == "web"){ + self::actionWeb(); + }else{ + echo $this->renderPartial($hash, $params, true); + } + } + + + public function actionWelcome(){ + //CO2Stat::incNbLoad("co2-welcome"); + + $params = array(); + echo $this->renderPartial("welcome", $params, true); + } + + + + public function actionWeb(){ //kgougle + CO2Stat::incNbLoad("co2-web"); + + //get my favorites web sites in my cookies + $cookiesFav = isset( Yii::app()->request->cookies['webFavorites'] ) + && Yii::app()->request->cookies['webFavorites'] != "" ? + explode(",", Yii::app()->request->cookies['webFavorites']->value) : + array(); + + //var_dump($cookiesFav);exit; + //get information about each website + $myWebFavorites = array();// + foreach ($cookiesFav as $key => $urlId) { //var_dump($web); exit; + $url = PHDB::findOne(Url::COLLECTION,array("_id"=>new MongoId($urlId))); + $myWebFavorites[] = $url; + } + + $params = array("myWebFavorites"=>$myWebFavorites); + echo $this->renderPartial("web", $params, true); + } + + public function actionReferencement(){ //kgougle + CO2Stat::incNbLoad("co2-referencement"); + + $params = array("subdomain" => "referencement", + "mainTitle" => "Référencer votre site Calédonien", + "placeholderMainSearch" => ""); + + echo $this->renderPartial("referencement", $params, true); + } + + public function actionMedia(){ //kgougle + $indexMin = isset($_POST['indexMin']) ? $_POST['indexMin'] : 0; + $indexMax = isset($_POST['indexMax']) ? $_POST['indexMax'] : 10; + $sources = isset($_POST['sources']) ? $_POST['sources'] : array("NCI", "NC1", "CALEDOSPHERE", "NCTV"); + $search = isset($_POST['search']) ? $_POST['search'] : ""; + + $indexStep = $indexMax - $indexMin; + + $query = array('srcMedia' => array('$in' => $sources)); + + if($search != ""){ + + $searchStr = Search::removeEmptyWords($search); + + $searchRegExp1 = Search::accentToRegex($searchStr); + $arraySearch = explode(" ", $searchRegExp1); + + foreach ($arraySearch as $key => $searchRegExp) { + $plain['$or'][]["title"] = new MongoRegex("/.*{$searchRegExp}.*/i"); + $plain['$or'][]["content"] = new MongoRegex("/.*{$searchRegExp}.*/i"); + $plain['$or'][]["srcMedia"] = new MongoRegex("/.*{$searchRegExp}.*/i"); + } + + $query['$and'][] = $plain; + } + + //var_dump($query);// exit; + $medias = PHDB::findAndSortAndLimitAndIndex("media", $query, array("date"=>-1) , $indexStep, $indexMin); + + $params = array("medias" => $medias, "indexMin" => @$indexMin, "indexMax" => @$indexMax ); + + CO2Stat::incNbLoad("co2-live"); + + if(@$_POST['renderPartial'] == true) + echo $this->renderPartial("liveStream", $params, true); + else + echo $this->renderPartial("media", $params, true); + } + + + public function actionSearch($type=null){ + CO2Stat::incNbLoad("co2-search"); + $params = array("type" => @$type ); + echo $this->renderPartial("search", $params, true); + } + + public function actionSocial($type=null){ + CO2Stat::incNbLoad("co2-search"); + $params = array("type" => @$type ); + echo $this->renderPartial("search", $params, true); + } + + public function actionAnnonces(){ + CO2Stat::incNbLoad("co2-annonces"); + $params = array("type" => "classified"); + echo $this->renderPartial("search", $params, true); + } + + public function actionActivities(){ + CO2Stat::incNbLoad("terla-activities"); + $params = array("type" => "services"); + echo $this->renderPartial("search", $params, true); + } + + public function actionStore(){ + CO2Stat::incNbLoad("terla-store"); + $params = array("type" => "products"); + echo $this->renderPartial("search", $params, true); + } + + public function actionCircuits(){ + CO2Stat::incNbLoad("terla-store"); + $params = array("type" => "circuits"); + echo $this->renderPartial("search", $params, true); + } + + public function actionFreedom(){ + CO2Stat::incNbLoad("co2-annonces"); + $params = array("type" => "classified"); + echo $this->renderPartial("search", $params, true); + } + + public function actionLive(){ + CO2Stat::incNbLoad("co2-live"); + $params = array();//"type" => "classified"); + echo $this->renderPartial("live", $params, true); + } + + public function actionAgenda(){ + CO2Stat::incNbLoad("co2-agenda"); + $params = array("type" => "events"); + echo $this->renderPartial("search", $params, true); + } + + public function actionPower(){ + CO2Stat::incNbLoad("co2-power"); + $params = array("type" => "vote"); + echo $this->renderPartial("search", $params, true); + } + + public function actionAdmin($view=null, $dir=null){ + CO2Stat::incNbLoad("co2-admin"); + $params = array( + "view" => @$view, + "dir" => @$dir, + ); + $redirect=""; + if(Yii::app()->params["CO2DomainName"] == "terla") + $redirect="terla/"; + echo $this->renderPartial("../admin/".$redirect."index", $params, true); + } + + public function actionChat(){ + CO2Stat::incNbLoad("co2-chat"); + $params = array("iframeOnly"=>true); + echo $this->renderPartial("../rocketchat/iframe", $params, true); + } + + public function actionRooms($type,$id){ exit; + CO2Stat::incNbLoad("co2-rooms"); + $params = array("id" => @$id, + "type" => @$type + ); + //print_r($params); + echo $this->renderPartial("rooms", $params, true); + } + + + public function actionPage($type, $id, $view=null, $dir=null){ + CO2Stat::incNbLoad("co2-page"); + //var_dump($type); exit; + + if( $type == Person::COLLECTION || $type == Event::COLLECTION || + $type == Project::COLLECTION || $type == Organization::COLLECTION ) + $element = Element::getByTypeAndId($type, $id); + + else if($type == News::COLLECTION){ + $element = News::getById($id); + } + + else if($type == Classified::COLLECTION){ + $element = Classified::getById($id); + } + else if($type == Product::COLLECTION){ + $element = Product::getById($id); + } + else if($type == Service::COLLECTION){ + $element = Service::getById($id); + } + else if($type == Poi::COLLECTION){ + $element = Poi::getById($id); + } + else if($type == Survey::COLLECTION){ + $element = Survey::getById($id); + } + + if(@$element["parentId"] && @$element["parentType"]) + $element['parent'] = Element::getByTypeAndId( $element["parentType"], $element["parentId"]); + if(@$element["organizerId"] && @$element["organizerType"] && + $element["organizerId"] != "dontKnow" && $element["organizerType"] != "dontKnow") + $element['organizer'] = Element::getByTypeAndId( $element["organizerType"], $element["organizerId"]); + + $params = array("id" => @$id, + "type" => @$type, + "view" => @$view, + "dir" => @$dir, + "subdomain" => "page", + "mainTitle" => "Page perso", + "placeholderMainSearch" => "", + "element" => $element); + + $params = Element::getInfoDetail($params, $element, $type, $id); + echo $this->renderPartial("page", $params, true); + } + + public function actionInteroperability(){ + CO2Stat::incNbLoad("co2-interoberability"); + echo $this->renderPartial("interoperability", array(), true); + } + + public function actionInfo($p){ + $CO2DomainName = isset(Yii::app()->params["CO2DomainName"]) ? + Yii::app()->params["CO2DomainName"] : "CO2"; + + $page = @$p ? $p : "apropos"; + echo $this->renderPartial("info/" . $CO2DomainName . "/" . $page, array(), true); + } + + public function actionSmartconso($p){ error_log("ecoconso"); + $CO2DomainName = isset(Yii::app()->params["CO2DomainName"]) ? + Yii::app()->params["CO2DomainName"] : "CO2"; + + $page = @$p ? $p : "home"; + echo $this->renderPartial("../smartconso/" . $page, array(), true); + } + + public function actionCity($insee, $postalCode){ + + echo $this->renderPartial("city", array("insee"=> $insee, "postalCode" => $postalCode), true); + } + + + public function actionSendMailFormContact(){ + function rpHash($value) { + $hash = 5381; + $value = strtoupper($value); + for($i = 0; $i < strlen($value); $i++) { + $hash = (leftShift32($hash, 5) + $hash) + ord(substr($value, $i)); + } + return $hash; + } + + // Perform a 32bit left shift + function leftShift32($number, $steps) { + // convert to binary (string) + $binary = decbin($number); + // left-pad with 0's if necessary + $binary = str_pad($binary, 32, "0", STR_PAD_LEFT); + // left shift manually + $binary = $binary.str_repeat("0", $steps); + // get the last 32 bits + $binary = substr($binary, strlen($binary) - 32); + // if it's a positive number return it + // otherwise return the 2's complement + return ($binary{0} == "0" ? bindec($binary) : + -(pow(2, 31) - bindec(substr($binary, 1)))); + } + + + if (rpHash($_POST['captchaUserVal']) == $_POST['captchaHash']){ + Mail::sendMailFormContact($_POST["emailSender"], $_POST["names"], $_POST["subject"], $_POST["contentMsg"]); + + $res = array("res"=>true, "captcha"=>true); + Rest::json($res); exit; + }else{ + $res = array("res"=>false, "captcha"=>false, "msg"=>"Code de sécurité incorrecte"); + Rest::json($res); exit; + } + + $res = array("res"=>false, "msg"=>"Une erreur inconnue est survenue. Sorry", "telalpha"=>"96.53.57"); + Rest::json($res); + exit; + } + + public function actionSendMailFormContactPrivate(){ + function rpHash($value) { + $hash = 5381; + $value = strtoupper($value); + for($i = 0; $i < strlen($value); $i++) { + $hash = (leftShift32($hash, 5) + $hash) + ord(substr($value, $i)); + } + return $hash; + } + + // Perform a 32bit left shift + function leftShift32($number, $steps) { + // convert to binary (string) + $binary = decbin($number); + // left-pad with 0's if necessary + $binary = str_pad($binary, 32, "0", STR_PAD_LEFT); + // left shift manually + $binary = $binary.str_repeat("0", $steps); + // get the last 32 bits + $binary = substr($binary, strlen($binary) - 32); + // if it's a positive number return it + // otherwise return the 2's complement + return ($binary{0} == "0" ? bindec($binary) : + -(pow(2, 31) - bindec(substr($binary, 1)))); + } + + + if (rpHash($_POST['captchaUserVal']) == $_POST['captchaHash']){ + + $element = Element::getByTypeAndId($_POST["typeReceiverParent"], $_POST["idReceiverParent"]); + $idReceiver = $_POST["idReceiver"]; + + if( @$element && !empty($element) && + !empty($element["contacts"]) && + !empty($element["contacts"][$idReceiver]) && + !empty($element["contacts"][$idReceiver]["email"]) ){ + + $emailReceiver = $element["contacts"][$idReceiver]["email"]; + error_log("EMAIL FOUND : ".$emailReceiver); + + if(!empty($emailReceiver)) + Mail::sendMailFormContactPrivate($_POST["emailSender"], $_POST["names"], $_POST["subject"], + $_POST["contentMsg"], $emailReceiver); + + $res = array("res"=>true, "captcha"=>true); + Rest::json($res); exit; + } + }else{ + $res = array("res"=>false, "captcha"=>false, "msg"=>"Code de sécurité incorrecte"); + Rest::json($res); exit; + } + + $res = array("res"=>false, "msg"=>"Une erreur inconnue est survenue. Sorry", "telalpha"=>"96.53.57"); + Rest::json($res); + exit; + } + + +} \ No newline at end of file diff --git a/controllers/BackupController.php b/controllers/BackupController.php new file mode 100644 index 0000000000000000000000000000000000000000..14e1d579c4e0afa64b43cecb7760bb90a4542410 --- /dev/null +++ b/controllers/BackupController.php @@ -0,0 +1,27 @@ +<?php +/** + * SiteController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 7/23/12 + * Time: 12:25 AM + */ +class BackupController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //CTK actions + 'save' => 'citizenToolKit.controllers.backup.SaveAction', + 'delete' => 'citizenToolKit.controllers.backup.DeleteAction', + 'update' => 'citizenToolKit.controllers.backup.UpdateAction', + ); + } + + +} \ No newline at end of file diff --git a/controllers/BookmarkController.php b/controllers/BookmarkController.php new file mode 100644 index 0000000000000000000000000000000000000000..b30085524c482feded47acffebb24dd14e95171b --- /dev/null +++ b/controllers/BookmarkController.php @@ -0,0 +1,25 @@ +<?php +/** + * SiteController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 7/23/12 + * Time: 12:25 AM + */ +class BookmarkController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //CTK actions + 'delete' => 'citizenToolKit.controllers.bookmark.DeleteAction', + ); + } + + +} \ No newline at end of file diff --git a/controllers/ChartController.php b/controllers/ChartController.php new file mode 100755 index 0000000000000000000000000000000000000000..542140a51752b26fcae283d9cf7b239814642cd3 --- /dev/null +++ b/controllers/ChartController.php @@ -0,0 +1,25 @@ +<?php +/** + * ChartController.php + * + * + * @author: Bouboule + * Date: 24/06/2015 + */ +class ChartController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.chart.IndexAction', + 'header' => 'citizenToolKit.controllers.chart.HeaderAction', + 'addchartsv' => 'citizenToolKit.controllers.chart.AddChartSvAction', + 'editchart' => 'citizenToolKit.controllers.chart.EditChartAction', + 'get' => 'citizenToolKit.controllers.chart.GetJsonAction', + ); + } +} \ No newline at end of file diff --git a/controllers/CircuitController.php b/controllers/CircuitController.php new file mode 100644 index 0000000000000000000000000000000000000000..efe69e300e5b95464a4868f00029cd757de631de --- /dev/null +++ b/controllers/CircuitController.php @@ -0,0 +1,35 @@ +<?php +/** + * CommentController.php + * + * @author: Sylvain Barbot + * Date: 2/7/15 + * Time: 12:25 AM + */ +class CircuitController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //'index' => 'citizenToolKit.controllers.comment.IndexAction', + 'save' => 'citizenToolKit.controllers.circuit.SaveAction', + 'index' => 'citizenToolKit.controllers.circuit.IndexAction', + /*'abuseprocess' => 'citizenToolKit.controllers.comment.AbuseProcessAction', + 'moderate' => 'citizenToolKit.controllers.comment.ModerateAction', + 'countcommentsfrom' => 'citizenToolKit.controllers.comment.CountCommentsAction', + 'delete' => 'citizenToolKit.controllers.comment.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.comment.UpdateFieldAction',*/ + ); + } + + public function actionTestPod() { + $params = array(); + $this->render( "testpod" , $params ); + } +} \ No newline at end of file diff --git a/controllers/CityController.php b/controllers/CityController.php new file mode 100755 index 0000000000000000000000000000000000000000..0d14c66b38ede48fcc7775581cc9e1ba670d511c --- /dev/null +++ b/controllers/CityController.php @@ -0,0 +1,47 @@ +<?php +/** + * SiteController.php + * + * @author: antonio ramirez <antonio@clevertech.biz> + * Date: 7/23/12 + * Time: 12:25 AM + */ +class CityController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.city.IndexAction', + 'detail' => 'citizenToolKit.controllers.city.DetailAction', + 'detailforminmap' => 'citizenToolKit.controllers.city.DetailforminmapAction', + 'directory' => 'citizenToolKit.controllers.city.DirectoryAction', + 'calendar' => 'citizenToolKit.controllers.city.CalendarAction', + 'statisticpopulation' => 'citizenToolKit.controllers.city.StatisticPopulationAction', + 'getcitydata' => 'citizenToolKit.controllers.city.GetCityDataAction', + 'getcityjsondata' => 'citizenToolKit.controllers.city.GetCityJsonDataAction', + 'getcitiesdata' => 'citizenToolKit.controllers.city.GetCitiesDataAction', + 'statisticcity' => 'citizenToolKit.controllers.city.statisticCityAction', + 'opendata' => 'citizenToolKit.controllers.city.OpenDataAction', + 'getoptiondata' => 'citizenToolKit.controllers.city.GetOptionDataAction', + 'getlistoption' => 'citizenToolKit.controllers.city.GetListOptionAction', + 'getpodopendata' => 'citizenToolKit.controllers.city.GetPodOpenDataAction', + 'addpodopendata' => 'citizenToolKit.controllers.city.AddPodOpenDataAction', + 'getlistcities' => 'citizenToolKit.controllers.city.GetListCitiesAction', + 'creategraph' => 'citizenToolKit.controllers.city.CreateGraphAction', + 'graphcity' => 'citizenToolKit.controllers.city.GraphCityAction', + 'updatecitiesgeoformat' => 'citizenToolKit.controllers.city.UpdateCitiesGeoFormatAction', + 'getinfoadressbyinsee' => 'citizenToolKit.controllers.city.GetInfoAdressByInseeAction', + 'cityexists' => 'citizenToolKit.controllers.city.CityExistsAction', + 'autocompletemultiscope'=> 'citizenToolKit.controllers.city.AutocompleteMultiScopeAction', + 'save' => 'citizenToolKit.controllers.city.SaveAction', + 'getlevel' => 'citizenToolKit.controllers.city.GetLevelAction', + + ); + } +} \ No newline at end of file diff --git a/controllers/CollectionsController.php b/controllers/CollectionsController.php new file mode 100755 index 0000000000000000000000000000000000000000..bc20898c5496baea27565be83447228a5962f484 --- /dev/null +++ b/controllers/CollectionsController.php @@ -0,0 +1,25 @@ +<?php +/** + * LinkController.php + * + * Manage Links between Organization, Person, Projet and Event + * + * @author: Sylvain Barbot <sylvain@pixelhumain.com> + * Date: 05/05/2015 + */ +class CollectionsController extends CommunecterController +{ + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'add' => 'citizenToolKit.controllers.collections.AddAction', + 'list' => 'citizenToolKit.controllers.collections.ListAction', + 'crud' => 'citizenToolKit.controllers.collections.CrudAction', + ); + } +} \ No newline at end of file diff --git a/controllers/CommentController.php b/controllers/CommentController.php new file mode 100755 index 0000000000000000000000000000000000000000..1fd22af0063198a1744137f0941d09047757fd6c --- /dev/null +++ b/controllers/CommentController.php @@ -0,0 +1,35 @@ +<?php +/** + * CommentController.php + * + * @author: Sylvain Barbot + * Date: 2/7/15 + * Time: 12:25 AM + */ +class CommentController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.comment.IndexAction', + 'save' => 'citizenToolKit.controllers.comment.SaveAction', + 'abuseprocess' => 'citizenToolKit.controllers.comment.AbuseProcessAction', + 'moderate' => 'citizenToolKit.controllers.comment.ModerateAction', + 'countcommentsfrom' => 'citizenToolKit.controllers.comment.CountCommentsAction', + 'delete' => 'citizenToolKit.controllers.comment.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.comment.UpdateFieldAction', + 'update' => 'citizenToolKit.controllers.comment.UpdateAction', + ); + } + + public function actionTestPod() { + $params = array(); + $this->render( "testpod" , $params ); + } +} \ No newline at end of file diff --git a/controllers/CooperationController.php b/controllers/CooperationController.php new file mode 100644 index 0000000000000000000000000000000000000000..f3555dc390cf7cae39c870c0c0407f1d9ee3e05e --- /dev/null +++ b/controllers/CooperationController.php @@ -0,0 +1,26 @@ +<?php +/** + * CommentController.php + * + * @author: Tango + * Date: 9/8/17 + * Time: 12:25 AM + */ +class CooperationController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'getcoopdata' => 'citizenToolKit.controllers.cooperation.GetCoopDataAction', + 'savevote' => 'citizenToolKit.controllers.cooperation.SaveVoteAction', + 'deleteamendement' => 'citizenToolKit.controllers.cooperation.DeleteAmendementAction', + ); + } + +} \ No newline at end of file diff --git a/controllers/CronController.php b/controllers/CronController.php new file mode 100644 index 0000000000000000000000000000000000000000..2edd00880b6f8b2ce54cd8ac0c802e47decf99ca --- /dev/null +++ b/controllers/CronController.php @@ -0,0 +1,24 @@ +<?php +/** + * CronController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 10/04/16 + * Time: 12:25 AM + */ +class CronController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'doCron' => 'citizenToolKit.controllers.action.DoCronAction', + 'checkDeletePending' => 'citizenToolKit.controllers.action.CheckDeletePendingAction', + ); + } +} \ No newline at end of file diff --git a/controllers/DataController.php b/controllers/DataController.php new file mode 100755 index 0000000000000000000000000000000000000000..81de3df1f48bcbfcd23455d8c8c95b1125db41c0 --- /dev/null +++ b/controllers/DataController.php @@ -0,0 +1,234 @@ +<?php +/** + * DataController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +class DataController extends Controller { + + /** + * Listing des Urls open data accessible + * avec la description des varialbes + */ + public function actionIndex() { + $this->layout = "//layouts/mainSearch"; + $this->renderPartial("index"); + } + + /** + * Listing de la structure de Base de données + * toute les tables + * et tout les documents + */ + public function actionMicroformats() { + array_push( $this->sidebar1, array( "label"=>"Creer", "onclick"=>"alert('TODO : microformat builder using drag and drop ')","iconClass"=>"icon-plus")); + $this->render("microformats"); + } + + /** + * Retourne les données open data relative à un code postale + */ + public function actionCP() { + $format = (isset($_GET["format"])) ? $_GET["format"] : "json" ; + $citoyens = Yii::app()->mongodb->citoyens->find(); + + if($format == "csv"){ + header('Content-Type: application/tsv'); + + foreach ($citoyens as $pa){ + $cp = (isset($pa["cp"])) ? $pa["cp"] : "none" ; + if(!isset($children[$cp])){ + $children[$cp]=array("name"=>$cp, + "children"=>array()); + } + $name = (isset($pa["name"])) ? $pa["name"] : "no Name" ; + array_push($children[$cp]["children"], array("name"=>$name,"size"=>1)); + } + $ct = .0022; + $c = 1; + echo "letters\tfrequency\n"; + foreach ($children as $c=>$v){ + //echo $c."\t".count($v["children"])."\n"; + echo $c."\t".$ct."\n"; + $c++; + $ct = $ct *2; + } + echo "\n"; + } + else + { + $children = array(); + $json = array("name"=>"Pixel Humain", + "children"=>array()); + foreach ($citoyens as $pa){ + $cp = (isset($pa["cp"])) ? $pa["cp"] : "none" ; + if(!isset($children[$cp])){ + $children[$cp]=array("name"=>$cp, + "children"=>array()); + } + $name = (isset($pa["name"])) ? $pa["name"] : "no Name" ; + array_push($children[$cp]["children"], array("name"=>$name,"size"=>1)); + } + + foreach ($children as $c) + array_push($json["children"], $c); + + header('Content-Type: application/json'); + echo json_encode($json); + } + } + + + public function actionGet( $type, $id = null, $format = null ,$limit=50, $index=0, $tags = null, $multiTags=null , $key = null, $insee = null, $typeNews = null) + { + $bindMap = null; + if( $type == Person::COLLECTION ){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_person; + else if( $format == Translate::FORMAT_PLP ) + $bindMap = TranslatePlp::$dataBinding_person; + else if( $format == Translate::FORMAT_AS ) + $bindMap = TranslateActivityStream::$dataBinding_person; + else + $bindMap = TranslateCommunecter::$dataBinding_person; + } + else if( $type == Event::COLLECTION){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_event; + else + $bindMap = TranslateCommunecter::$dataBinding_event; + } + else if( $type == Organization::COLLECTION){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_organization; + else + $bindMap = TranslateCommunecter::$dataBinding_organization; + } + else if( $type == Project::COLLECTION){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_project; + else + $bindMap = TranslateCommunecter::$dataBinding_project; + } + else if( $type == City::COLLECTION){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_city; + else + $bindMap = TranslateCommunecter::$dataBinding_city; + } + else if( $type == Need::COLLECTION){ + if( $format == Translate::FORMAT_SCHEMA) + $bindMap = TranslateSchema::$dataBinding_need; + else + $bindMap = TranslateCommunecter::$dataBinding_need; + } + else if( $type == News::COLLECTION){ + if($format == Translate::FORMAT_RSS) + $bindMap = TranslateSchema::$dataBinding_news; + } + else + $format = null; + + + $result = Api::getData($bindMap, $format, $type, $id,$limit, $index, $tags, $multiTags, $key, $insee, $typeNews); + + header("Access-Control-Allow-Origin: *"); + Rest::json($result, JSON_UNESCAPED_SLASHES); + } + + /** + * Page de démo pour le concours etalab : dataconnexion + */ + public function actionDataConnexion() { + // $this->layout = "swe"; + $this->render("dataconnexion"); + } + /** + * Export all data related to a person + * Generates a json file + * and an image folder + */ + public function actionExportInitData($id,$module) + { + if( isset(Yii::app()->session["userId"]) && $id == Yii::app()->session["userId"]) + { + $account = PHDB::findOne(PHType::TYPE_CITOYEN,array("_id"=>new MongoId(Yii::app()->session["userId"]))); + if( $account ) + { + /* ************************************** + * SETUP FILE SYSTEM + ***************************************** */ + $suffixe = "";//"_".date('YmdHi') + $base = 'upload'.DIRECTORY_SEPARATOR.'export'.DIRECTORY_SEPARATOR.Yii::app()->session["userId"].$suffixe.DIRECTORY_SEPARATOR; + $upload_dir = $base."assets".DIRECTORY_SEPARATOR; + if(!file_exists ( $upload_dir )) + mkdir ( $upload_dir, 0775, true ); + $upload_dir = $base; + + $account["_id"] = array('$oid'=>(string)$account["_id"]); + unset( $account["_id"]['$id'] ); + + /* ************************************** + * CITOYENS MAP + ***************************************** */ + $exportInitData = array( + PHType::TYPE_CITOYEN => array($account) + ); + + /* ************************************** + * ORGANIZATIONS MAP + ***************************************** */ + $myOrganizations = Organization::getWhere( array("creator"=>Yii::app()->session["userId"]) ); + if($myOrganizations){ + $exportInitData[ Organization::COLLECTION ] = array(); + + foreach ($myOrganizations as $key => $o) { + array_push( $exportInitData[ Organization::COLLECTION ], $o ); + } + + } + + /* ************************************** + * Events MAP + ***************************************** */ + $myEvents = Event::getWhere( array("creator"=>Yii::app()->session["userId"]) ); + if($myEvents){ + $exportInitData[ Event::COLLECTION ] = array(); + + foreach ($myEvents as $key => $e) { + array_push($exportInitData[ Event::COLLECTION ], $e); + } + } + + /* ************************************** + * Documents MAP + ***************************************** */ + $myDocs = Document::getWhere( array("creator"=>Yii::app()->session["userId"]) ); + if($myDocs){ + $exportInitData[ Document::COLLECTION ] = array(); + + foreach ($myDocs as $key => $doc) { + array_push($exportInitData[ Document::COLLECTION ], $doc); + $src = "upload".DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.$doc["type"].DIRECTORY_SEPARATOR.$doc["id"].DIRECTORY_SEPARATOR.$doc["name"]; + $dest = $upload_dir."assets".DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.$doc["folder"].DIRECTORY_SEPARATOR.$doc["name"]; + if( file_exists ( $src ) ) + { + if(!file_exists ( $upload_dir."assets".DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.$doc["folder"].DIRECTORY_SEPARATOR )) + mkdir ( $upload_dir."assets".DIRECTORY_SEPARATOR.$module.DIRECTORY_SEPARATOR.$doc["folder"].DIRECTORY_SEPARATOR, 0775, true ); + copy ( $src , $dest ); + } + } + } + + $res = json_encode( $exportInitData ); + + file_put_contents( $upload_dir.Yii::app()->session["userId"].".json" , $res , LOCK_EX ); + echo "<a href='".Yii::app()->createUrl("/".$upload_dir.Yii::app()->session["userId"].".json")."' target='_blank'>See your Exported data</a>"; + } else + echo Rest::json(array("result"=>false,"msg"=>"Cette requete ne peut aboutir.")); + } else + echo Rest::json(array("result"=>false, "msg"=>"Cette requete ne peut aboutir.")); + } + +} \ No newline at end of file diff --git a/controllers/DataListController.php b/controllers/DataListController.php new file mode 100755 index 0000000000000000000000000000000000000000..2b1aea25a0805b7ad29e802f98e6b4e72c726e68 --- /dev/null +++ b/controllers/DataListController.php @@ -0,0 +1,15 @@ +<?php + +class DataListController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() { + return array( + 'getlistbyname' => 'citizenToolKit.controllers.datalist.GetListByNameAction' + ); + } +} \ No newline at end of file diff --git a/controllers/DatamigrationController.php b/controllers/DatamigrationController.php index 465153637b14aca46c3929d3052414f917890e34..07d212e23a66f32ad4c96023197d7e4d5ebc12cf 100755 --- a/controllers/DatamigrationController.php +++ b/controllers/DatamigrationController.php @@ -2519,7 +2519,12 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){ echo "NB Element mis à jours: " .$nbelement."<br>" ; } +<<<<<<< HEAD +======= +<<<<<<< HEAD +======= +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla public function actionBatchOwnToHas() { ini_set('memory_limit', '-1'); $where = array( "ownACity" => true); @@ -2540,6 +2545,11 @@ if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )){ echo "NB Element mis à jours: " .$nbelement."<br>" ; } +<<<<<<< HEAD +======= + +>>>>>>> master +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla public function actionBatchZoneUnsetKey(){ ini_set('memory_limit', '-1'); $nbelement = 0 ; diff --git a/controllers/DefaultController.php b/controllers/DefaultController.php index 460c4bb3fb10261ec1fdc1a16f7e860bed436e1b..040bb3dbe31ee20f07668a81d989c15378ffb6b6 100755 --- a/controllers/DefaultController.php +++ b/controllers/DefaultController.php @@ -7,12 +7,16 @@ * @author: Tibor Katelbach <tibor@pixelhumain.com> * Date: 14/03/2014 */ -class DefaultController extends CController { +class DefaultController extends CommunecterController { protected function beforeAction($action) { - return parent::beforeAction($action); + + parent::initPage(); + + + return parent::beforeAction($action); } /** @@ -21,10 +25,146 @@ class DefaultController extends CController { public function actionIndex($src=null) { - echo Yii::getPathOfAlias('application.modules.terla.assets'); - echo "</br>"; - echo Yii::getPathOfAlias('webroot'); - echo "</br>"; - echo Yii::app()->getModule('terla')->getAssetsUrl(); + //Yii::app()->theme = $theme; + //Yii::app()->session["theme"] = $theme; + //Yii::app()->theme = "notragora"; + //Yii::app()->theme = "CO2"; + + // http://127.0.0.1/ph/network?network=tierslieuxlille + // http://127.0.0.1/ph/network/default/index/src/tierslieuxlille + + if(@$_GET["network"] ){ + $this->redirect(Yii::app()->createUrl("/network/default/index?src=".$_GET["network"])); + } + if( @$src ){ + Yii::app()->theme = "network"; + Yii::app()->params['networkParams'] = $src; + Yii::app()->session["theme"] = "network"; + Yii::app()->session["networkParams"] = $src; + } + else if(@Yii::app()->session["theme"] == "network" ){ + Yii::app()->theme = "network"; + Yii::app()->params['networkParams'] = Yii::app()->session["networkParams"]; + } + $this->render("index"); + } + + public function actionTwoStepRegister() + { + $this->layout = "//layouts/mainSearch"; + $this->renderPartial("two_step_register"); + } + public function actionAgenda() + { + $this->renderPartial("agenda"); + } + + public function actionLive($type=null) + { + $stream = array(); + $now = array(); + /*if( !$type || $type == "dda" ){ + $stream = array_merge( $stream, ActionRoom::getAllRoomsActivityByTypeId( Person::COLLECTION, Yii::app()->session['userId'] ) ); + }*/ + if( !$type || $type == Project::COLLECTION ){ + $stream = array_merge( $stream, Element::getActive( Project::COLLECTION ) ); + } + if( !$type || $type == Event::COLLECTION ){ + $stream = array_merge( $stream, Element::getActive( Event::COLLECTION ) ); + } + if( !$type || $type == Organization::COLLECTION ){ + $stream = array_merge( $stream, Element::getActive( Organization::COLLECTION ) ); + } + function mySort($a, $b){ + if( isset($a['updated']) && isset($b['updated']) ){ + return (strtolower(@$b['updated']) > strtolower(@$a['updated'])); + }else{ + return false; + } + } + + usort($stream,"mySort"); + $this->renderPartial("live", array( "stream"=>$stream, + "now"=>$now, + "type"=>$type )); + } + + public function actionNews() + { + $this->renderPartial("news"); + } + + public function actionDirectory() + { + $this->renderPartial("directory"); + } + public function actionDirectoryjs() + { + $this->renderPartial("directoryjs"); + } + + public function actionLang() + { + $this->render("index"); + } + + public function actionHome() + { + //$this->layout = "//layouts/mainSearch"; + + //Get the last global statistics + $stats = Stat::getWhere(array(),null,1); + if(is_array($stats)) $stats = array_pop($stats); + $tpl = "home"; + if(Yii::app()->theme != "ph-dori") + $tpl = "//layouts/default/home"; + + // $tpl=(@$_GET["tpl"]) ? $_GET["tpl"]: "home"; + $this->renderPartial($tpl, array("stats"=>$stats)); + } + public function actionApropos() + { + //$this->layout = "//layouts/mainSearch"; + $tpl = "apropos"; + if(Yii::app()->theme != "ph-dori") + $tpl = "//layouts/default/apropos"; + + // $tpl=(@$_GET["tpl"]) ? $_GET["tpl"]: "home"; + $this->renderPartial($tpl); + } + public function actionLogin() + { + $this->layout = "//layouts/mainSearch"; + $this->renderPartial("login"); + } + + public function actionView($page,$dir=null,$layout=null) + { + if(@$dir){ + + if( strpos($dir,"docs") !== false ) + $dir = "../".$dir; + + if(strpos($dir,"|")){ + $dir=str_replace("|", "/", $dir); + } + $page = $dir."/".$page; + + } + if(Yii::app()->request->isAjaxRequest || $layout=="empty"){ + $this->layout = "//layouts/empty"; + echo $this->renderPartial($page, null,true); + } + else { + //$this->sidebar2 = Menu::$infoMenu; + $this->render($page); + } } + + public function actionSwitch($lang) + { + $this->layout = "//layouts/empty"; + Yii::app()->session["lang"] = $lang; + $this->redirect(Yii::app()->createUrl("/".$this->module->id)); + } } \ No newline at end of file diff --git a/controllers/DocumentController.php b/controllers/DocumentController.php new file mode 100755 index 0000000000000000000000000000000000000000..0859e1046ba68bd4867ca8fbe46670f19fa0b64f --- /dev/null +++ b/controllers/DocumentController.php @@ -0,0 +1,49 @@ +<?php +/** + * SiteController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 7/23/12 + * Time: 12:25 AM + */ +class DocumentController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //CTK actions + 'list' => 'citizenToolKit.controllers.document.ListAction', + 'save' => 'citizenToolKit.controllers.document.SaveAction', + 'deletedocumentbytid' => 'citizenToolKit.controllers.document.DeleteDocumentByIdAction', + 'delete' => 'citizenToolKit.controllers.document.DeleteAction', + 'upload' => 'citizenToolKit.controllers.document.UploadAction', + 'update' => 'citizenToolKit.controllers.document.UpdateAction', + 'uploadsave' => 'citizenToolKit.controllers.document.UploadSaveAction', + 'getlistbyid' => 'citizenToolKit.controllers.document.GetListByIdAction', + + 'resized' => array ( + 'class' => 'ext.resizer.ResizerAction', + 'options' => array( + // Tmp dir to store cached resized images + 'cache_dir' => Yii::getPathOfAlias('webroot') . '/assets/', + // Web root dir to search images from + 'base_dir' => Yii::getPathOfAlias('webroot') . '/', + ) + ) + ); + } + + //Not use ??? + function clean($string) { + $string = preg_replace('/ */', '-', $string); + $string = strtr($string,'à áâãäçèéêëìÃîïñòóôõöùúûüýÿÀÃÂÃÄÇÈÉÊËÌÃÃŽÃÑÒÓÔÕÖÙÚÛÜÃ','aaaaaceeeeiiiinooooouuuuyyAAAAACEEEEIIIINOOOOOUUUUY'); // Replaces all spaces with hyphens. + return preg_replace('/[^A-Za-z0-9\-]/', '', $string); // Removes special chars. + } + + +} \ No newline at end of file diff --git a/controllers/ElementController.php b/controllers/ElementController.php new file mode 100755 index 0000000000000000000000000000000000000000..d0ad1ec5b19186db3f73db02a003245059e19003 --- /dev/null +++ b/controllers/ElementController.php @@ -0,0 +1,46 @@ +<?php +/** + * ElementController.php + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +class ElementController extends CommunecterController { + const moduleTitle = "Element"; + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'updatefield' => 'citizenToolKit.controllers.element.UpdateFieldAction', + 'updatefields' => 'citizenToolKit.controllers.element.UpdateFieldsAction', + 'updateblock' => 'citizenToolKit.controllers.element.UpdateBlockAction', + 'updatesettings' => 'citizenToolKit.controllers.element.UpdateSettingsAction', + 'updatestatus' => 'citizenToolKit.controllers.element.UpdateStatusAction', + 'detail' => 'citizenToolKit.controllers.element.DetailAction', + 'getalllinks' => 'citizenToolKit.controllers.element.GetAllLinksAction', + 'geturls' => 'citizenToolKit.controllers.element.GetUrlsAction', + 'getcontacts' => 'citizenToolKit.controllers.element.GetContactsAction', + 'directory' => 'citizenToolKit.controllers.element.DirectoryAction', + 'addmembers' => 'citizenToolKit.controllers.element.AddMembersAction', + 'aroundme' => 'citizenToolKit.controllers.element.AroundMeAction', + 'save' => 'citizenToolKit.controllers.element.SaveAction', + 'savecontact' => 'citizenToolKit.controllers.element.SaveContactAction', + 'saveurl' => 'citizenToolKit.controllers.element.SaveUrlAction', + 'delete' => 'citizenToolKit.controllers.element.DeleteAction', + 'get' => 'citizenToolKit.controllers.element.GetAction', + 'notifications' => 'citizenToolKit.controllers.element.NotificationsAction', + 'about' => 'citizenToolKit.controllers.element.AboutAction', + 'getdatadetail' => 'citizenToolKit.controllers.element.GetDataDetailAction', + 'stopdelete' => 'citizenToolKit.controllers.element.StopDeleteAction', + 'getthumbpath' => 'citizenToolKit.controllers.element.GetThumbPathAction', + 'list' => 'citizenToolKit.controllers.element.ListAction', + 'getcommunexion' => 'citizenToolKit.controllers.element.GetCommunexionAction', + 'getdatabyurl' => 'citizenToolKit.controllers.element.GetDataByUrlAction', + 'invoice' => 'citizenToolKit.controllers.element.InvoiceAction', + ); + } +} \ No newline at end of file diff --git a/controllers/ErrorController.php b/controllers/ErrorController.php new file mode 100755 index 0000000000000000000000000000000000000000..b734ba4b2c94ec73dd6bd2269b017bc3d30d6ac4 --- /dev/null +++ b/controllers/ErrorController.php @@ -0,0 +1,23 @@ +<?php +/** + * DefaultController.php + * + * azotlive application + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 18/07/2014 + */ +class ErrorController extends CommunecterController { + + protected function beforeAction($action) + { + return parent::beforeAction($action); + } + + public function actions() { + return array( + 'index' => 'citizenToolKit.controllers.error.IndexAction' + ); + } + +} \ No newline at end of file diff --git a/controllers/EventController.php b/controllers/EventController.php new file mode 100755 index 0000000000000000000000000000000000000000..3aca69b8ca906d3de2c645dbc5f29575ef0e030e --- /dev/null +++ b/controllers/EventController.php @@ -0,0 +1,36 @@ +<?php +/** + * EventController.php + * + * tous ce que propose le PH en terme de gestion d'evennement + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +class EventController extends CommunecterController { + const moduleTitle = "Évènement"; + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + + 'saveattendees' => 'citizenToolKit.controllers.event.SaveAttendeesAction', + 'detail' => 'citizenToolKit.controllers.event.DetailAction', + 'save' => 'citizenToolKit.controllers.event.SaveAction', + 'update' => 'citizenToolKit.controllers.event.UpdateAction', + 'getcalendar' => 'citizenToolKit.controllers.event.GetCalendarAction', + 'delete' => 'citizenToolKit.controllers.event.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.event.UpdateFieldAction', + 'eventsv' => 'citizenToolKit.controllers.event.EventSVAction', + 'calendarview' => 'citizenToolKit.controllers.event.CalendarViewAction', + 'removeattendee' => 'citizenToolKit.controllers.event.RemoveAttendeeAction', + 'directory' => 'citizenToolKit.controllers.event.DirectoryAction', + 'addattendeesv' => 'citizenToolKit.controllers.event.AddAttendeeSvAction', + "updatesettings" => 'citizenToolKit.controllers.event.UpdateSettingsAction' + ); + } +} \ No newline at end of file diff --git a/controllers/ExportController.php b/controllers/ExportController.php new file mode 100644 index 0000000000000000000000000000000000000000..89663bab3124758c5af8c508a3cf6ec83095fb1a --- /dev/null +++ b/controllers/ExportController.php @@ -0,0 +1,16 @@ +<?php + +class ExportController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() { + return array( + 'index' => 'citizenToolKit.controllers.export.IndexAction', + ); + } +} + +?> \ No newline at end of file diff --git a/controllers/FundingController.php b/controllers/FundingController.php new file mode 100755 index 0000000000000000000000000000000000000000..c08d6121e961d2b604f31570de446ceff0fb503e --- /dev/null +++ b/controllers/FundingController.php @@ -0,0 +1,22 @@ +<?php +/** + * FundingController.php + * + * @author: oceatoon@gmail.com + * Date: 25/7/15 + * Time: 11:25 PM + */ +class FundingController extends CommunecterController { + + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.funding.RequestAction' + ); + } +} \ No newline at end of file diff --git a/controllers/GalleryController.php b/controllers/GalleryController.php new file mode 100755 index 0000000000000000000000000000000000000000..cc8c51026b520cd405c304b1dba870349997812b --- /dev/null +++ b/controllers/GalleryController.php @@ -0,0 +1,27 @@ +<?php +/** + * EventController.php + * + * contient tous ce qui concerne les utilisateurs / clietns TEEO + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 18/07/2014 + */ +class GalleryController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.gallery.IndexAction', + 'getlistbyid' => 'citizenToolKit.controllers.gallery.GetListByIdAction', + 'crudcollection' => 'citizenToolKit.controllers.gallery.CrudCollectionAction', + 'crudfile' => 'citizenToolKit.controllers.gallery.CrudFileAction', + 'filter' => 'citizenToolKit.controllers.gallery.FilterAction', + ); + } +} \ No newline at end of file diff --git a/controllers/GamificationController.php b/controllers/GamificationController.php new file mode 100755 index 0000000000000000000000000000000000000000..e9f2a12f969c6c834685960045fbd4f9f3b6b240 --- /dev/null +++ b/controllers/GamificationController.php @@ -0,0 +1,23 @@ +<?php +/** + * GamificationController.php + * + * @author: Tibor Katelbach <oceatoon@gmail.com> + * Date: 7/09/15 + * Time: 10:00 AM + */ +class GamificationController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.gamification.IndexAction' + ); + } +} \ No newline at end of file diff --git a/controllers/GanttController.php b/controllers/GanttController.php new file mode 100755 index 0000000000000000000000000000000000000000..c708b88aeb6c224d9c90c4f02ba97f75c31903eb --- /dev/null +++ b/controllers/GanttController.php @@ -0,0 +1,25 @@ +<?php +/** + * DiscussController.php + * + * + * @author: Sylvain Barbot + * Date: 24/06/2015 + */ +class GanttController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.gantt.IndexAction', + 'savetask' => 'citizenToolKit.controllers.gantt.SaveTaskAction', + 'removetask' => 'citizenToolKit.controllers.gantt.RemoveTaskAction', + 'generatetimeline' => 'citizenToolKit.controllers.gantt.GenerateTimelineAction', + 'addtimesheetsv' => 'citizenToolKit.controllers.gantt.AddTimesheetSvAction', + ); + } +} \ No newline at end of file diff --git a/controllers/GraphController.php b/controllers/GraphController.php new file mode 100755 index 0000000000000000000000000000000000000000..2801d3f5122e1fef72ea4b5e53b94475b22e3238 --- /dev/null +++ b/controllers/GraphController.php @@ -0,0 +1,24 @@ +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 14/03/2014 + */ +class GraphController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'getdata' => 'citizenToolKit.controllers.graph.GetDataAction', + 'viewer' => 'citizenToolKit.controllers.graph.ViewerAction' + ); + } +} diff --git a/controllers/InteroperabilityController.php b/controllers/InteroperabilityController.php new file mode 100644 index 0000000000000000000000000000000000000000..7c0a0eb3ea70e4036636c32237015f22574d1bfa --- /dev/null +++ b/controllers/InteroperabilityController.php @@ -0,0 +1,29 @@ +<?php +class InteroperabilityController extends CommunecterController { + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.interoperability.IndexAction', + 'wiki' => 'citizenToolKit.controllers.interoperability.WikiAction', + 'datagouv' => 'citizenToolKit.controllers.interoperability.DatagouvAction', + 'osm' => 'citizenToolKit.controllers.interoperability.OsmAction', + 'ods' => 'citizenToolKit.controllers.interoperability.OdsAction', + 'get' => 'citizenToolKit.controllers.interoperability.GetAction', + 'copedia' => 'citizenToolKit.controllers.interoperability.CopediaAction', + 'co-osm' => 'citizenToolKit.controllers.interoperability.COSMAction', + 'co-osm-getnode' => 'citizenToolKit.controllers.interoperability.OSMGetNodeAction', + 'co-osm-push-tag' => 'citizenToolKit.controllers.interoperability.OSMPushTagAction', + 'wikitoco' => 'citizenToolKit.controllers.interoperability.WikiToCoAction', + 'pushtypewikidata' => 'citizenToolKit.controllers.interoperability.PushTypeWikidataAction', + 'wikidata-put-description' => 'citizenToolKit.controllers.interoperability.WikidataPutDescriptionAction', + 'wikidata-put-claim' => 'citizenToolKit.controllers.interoperability.WikidataPutClaimAction', + 'proposeopendatasource' => 'citizenToolKit.controllers.interoperability.ProposeOpenDataSourceAction', + 'validateproposeinterop' => 'citizenToolKit.controllers.interoperability.ValidateProposeInteropAction', + 'rejectproposeinterop' => 'citizenToolKit.controllers.interoperability.RejectProposeInteropAction', + ); + } +} \ No newline at end of file diff --git a/controllers/JobController.php b/controllers/JobController.php new file mode 100755 index 0000000000000000000000000000000000000000..6159350a9d17c5978434b79632caafbf6edf0c9a --- /dev/null +++ b/controllers/JobController.php @@ -0,0 +1,38 @@ +<?php +/** + * JobController.php + * + * Create, update and manage Jobs offers + * + * @author: Sylvain Barbot <sylvain@pixelhumain.com> + * Date: 31/03/2015 + */ +class JobController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'save' => 'citizenToolKit.controllers.job.SaveAction', + 'delete' => 'citizenToolKit.controllers.job.DeleteAction', + 'list' => 'citizenToolKit.controllers.job.ListAction', + 'public' => 'citizenToolKit.controllers.job.PublicAction', + ); + } + + public function getCollectionFieldName($fieldName) { + if ($fieldName == "address") + return "jobLocation.address"; + else if ($fieldName == "jobLoc") + return "jobLocation.description"; + //specific case for tagsJob + else if ($fieldName == "tagsJob") + return "tags"; + else + return $fieldName; + } +} \ No newline at end of file diff --git a/controllers/LinkController.php b/controllers/LinkController.php new file mode 100755 index 0000000000000000000000000000000000000000..ca4f3ee777178f971e536d1a1ca919df4ad7837a --- /dev/null +++ b/controllers/LinkController.php @@ -0,0 +1,32 @@ +<?php +/** + * LinkController.php + * + * Manage Links between Organization, Person, Projet and Event + * + * @author: Sylvain Barbot <sylvain@pixelhumain.com> + * Date: 05/05/2015 + */ +class LinkController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'removemember' => 'citizenToolKit.controllers.link.RemoveMemberAction', + "removerole" => 'citizenToolKit.controllers.link.RemoveRoleAction', + 'removecontributor' => 'citizenToolKit.controllers.link.RemoveContributorAction', + 'disconnect' => 'citizenToolKit.controllers.link.DisconnectAction', + + //New Actions + 'connect' => 'citizenToolKit.controllers.link.ConnectAction', + 'multiconnect' => 'citizenToolKit.controllers.link.MultiConnectAction', + 'follow' => 'citizenToolKit.controllers.link.FollowAction', + 'validate' => 'citizenToolKit.controllers.link.ValidateAction', + 'favorite' => 'citizenToolKit.controllers.link.FavoriteAction', + ); + } +} \ No newline at end of file diff --git a/controllers/LogController.php b/controllers/LogController.php new file mode 100755 index 0000000000000000000000000000000000000000..64e9aa440fde85323a62b94fe1e6d563aa543722 --- /dev/null +++ b/controllers/LogController.php @@ -0,0 +1,28 @@ +<?php +/** + * LogController.php + * + * @author: Childéric THOREAU <childericthoreau@gmail.com> + * Date: 7/29/15 + * Time: 12:25 AM + */ +class LogController extends CommunecterController { + + public function actions() + { + return array( + 'monitoring' => 'citizenToolKit.controllers.log.MonitoringAction', + 'cleanup' => 'citizenToolKit.controllers.log.CleanUpAction' + ); + } + + public function actionDbaccess() + { + echo Yii::app()->session["dbAccess"]; + } + public function actionClear() + { + Yii::app()->session["dbAccess"] = 0; + echo Yii::app()->session["dbAccess"]; + } +} \ No newline at end of file diff --git a/controllers/MailmanagementController.php b/controllers/MailmanagementController.php new file mode 100755 index 0000000000000000000000000000000000000000..f0b0b342c4ca6fa2433115997ab0041a81ccca0f --- /dev/null +++ b/controllers/MailmanagementController.php @@ -0,0 +1,29 @@ +<?php +/** + * ActionController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 7/29/15 + * Time: 12:25 AM + */ +class MailmanagementController extends CommunecterController { + + + protected function beforeAction($action) { + //Check hook come from mailgun + $mailgunCheck = true; + if (! $mailgunCheck) { + //TODO SBAR : add notification for SuperAdmin + + throw new CommunecterException("It seems that the hook has been launch by someone else than mailgun"); + } + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'droppedmail' => 'citizenToolKit.controllers.mailmanagement.DroppedMailAction' + ); + } +} \ No newline at end of file diff --git a/controllers/MigrationController.php b/controllers/MigrationController.php new file mode 100755 index 0000000000000000000000000000000000000000..f5c792135a1259f81508f8c5d29cb97a2c1b73f5 --- /dev/null +++ b/controllers/MigrationController.php @@ -0,0 +1,22 @@ +<?php +/** + * MigrationController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 25/03/2016 + * Time: 16:14 + */ +class MigrationController extends CController { + + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'citiespostalcodes' => 'citizenToolKit.controllers.migration.CitiesPostalCodesAction', + ); + } +} \ No newline at end of file diff --git a/controllers/NeedController.php b/controllers/NeedController.php new file mode 100755 index 0000000000000000000000000000000000000000..6f8e7a8f198b043b8c54e94ef4faea93f8f6657d --- /dev/null +++ b/controllers/NeedController.php @@ -0,0 +1,27 @@ +<?php +/** + * DiscussController.php + * + * + * @author: Sylvain Barbot + * Date: 24/06/2015 + */ +class NeedController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.need.IndexAction', + 'dashboard' => 'citizenToolKit.controllers.need.DashboardAction', + 'saveneed' => 'citizenToolKit.controllers.need.SaveNeedAction', + 'updatefield' => 'citizenToolKit.controllers.need.UpdateFieldAction', + 'addhelpervalidation' => 'citizenToolKit.controllers.need.AddHelperValidationAction', + 'addneedsv' => 'citizenToolKit.controllers.need.AddNeedSvAction', + 'detail' => 'citizenToolKit.controllers.need.DetailAction', + ); + } +} \ No newline at end of file diff --git a/controllers/NetworkController.php b/controllers/NetworkController.php new file mode 100755 index 0000000000000000000000000000000000000000..7372328a06b82ca40d3a82ba4d5a452ae7f7cb2c --- /dev/null +++ b/controllers/NetworkController.php @@ -0,0 +1,25 @@ + +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 14/03/2014 + */ +class NetworkController extends CommunecterController { + + + protected function beforeAction($action){ + parent::initPage(); + return parent::beforeAction($action); + } + + public function actionSimplyDirectory(){ + //$params = self::getParams(@$_GET['params']); + $this->layout = "//layouts/mainSearch"; + $this->render("simplyDirectory"); + } +} + ?> \ No newline at end of file diff --git a/controllers/NewsController.php b/controllers/NewsController.php new file mode 100755 index 0000000000000000000000000000000000000000..75d9b4df8ea505854507008cc9bc5c0a3822aa47 --- /dev/null +++ b/controllers/NewsController.php @@ -0,0 +1,40 @@ +<?php +/** + * NewsController.php + * + * + * @author: Tristan Goguet + * Date: 09/11/2014 + */ +class NewsController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.news.IndexAction', + 'detail' => 'citizenToolKit.controllers.news.DetailAction', + 'moderate' => 'citizenToolKit.controllers.news.ModerateAction', + 'latest' => 'citizenToolKit.controllers.news.LatestAction', + 'save' => 'citizenToolKit.controllers.news.SaveAction', + 'delete' => 'citizenToolKit.controllers.news.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.news.UpdateFieldAction', + 'update' => 'citizenToolKit.controllers.news.UpdateAction', + 'share' => 'citizenToolKit.controllers.news.ShareAction', + 'extractprocess' => array ( + 'class' => 'ext.extract-url-content.ExtractProcessAction', + 'options' => array( + // Tmp dir to store cached resized images + 'cache_dir' => Yii::getPathOfAlias('webroot') . '/assets/', + // Web root dir to search images from + 'base_dir' => Yii::getPathOfAlias('webroot') . '/', + ) + ) + ); + } +} + + diff --git a/controllers/NotificationController.php b/controllers/NotificationController.php new file mode 100755 index 0000000000000000000000000000000000000000..be36ae814db121a8101307452c507b0742e1a675 --- /dev/null +++ b/controllers/NotificationController.php @@ -0,0 +1,26 @@ +<?php +/** + * NotificationController.php + * + * @author: Tibor Katelbach <oceatoon@gmail.com> + * Date: 8/09/15 + * Time: 10:00 AM + */ +class NotificationController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'getnotifications' => 'citizenToolKit.controllers.notification.GetAction', + 'marknotificationasread' => 'citizenToolKit.controllers.notification.RemoveAction', + 'removeall' => 'citizenToolKit.controllers.notification.RemoveAllAction', + 'update' => 'citizenToolKit.controllers.notification.UpdateAction', + ); + } +} \ No newline at end of file diff --git a/controllers/OpendataController.php b/controllers/OpendataController.php new file mode 100755 index 0000000000000000000000000000000000000000..bc50ef55963c6341c269a6afd7b517ebfcbab0ee --- /dev/null +++ b/controllers/OpendataController.php @@ -0,0 +1,19 @@ +<?php +/** + * OpenDataController.php + * + * @author: sylvain.barbot@gmail.com + * Date: 10/05/15 + * Time: 12:25 AM + */ +class OpendataController extends CommunecterController { + + public function actions() { + return array( + 'getcitiesbypostalcode' => 'citizenToolKit.controllers.opendata.GetCitiesByPostalCodeAction', + 'getcitiesgeoposbypostalcode' => 'citizenToolKit.controllers.opendata.GetCitiesGeoPosByPostalCodeAction', + 'getcountries' => 'citizenToolKit.controllers.opendata.GetCountriesAction' + ); + } + +} \ No newline at end of file diff --git a/controllers/OrderController.php b/controllers/OrderController.php new file mode 100644 index 0000000000000000000000000000000000000000..63b389b58cf0f14b5e41b382a838cde9f189e598 --- /dev/null +++ b/controllers/OrderController.php @@ -0,0 +1,35 @@ +<?php +/** + * CommentController.php + * + * @author: Sylvain Barbot + * Date: 2/7/15 + * Time: 12:25 AM + */ +class OrderController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //'index' => 'citizenToolKit.controllers.comment.IndexAction', + 'save' => 'citizenToolKit.controllers.order.SaveAction', + 'get' => 'citizenToolKit.controllers.order.GetAction', + /*'abuseprocess' => 'citizenToolKit.controllers.comment.AbuseProcessAction', + 'moderate' => 'citizenToolKit.controllers.comment.ModerateAction', + 'countcommentsfrom' => 'citizenToolKit.controllers.comment.CountCommentsAction', + 'delete' => 'citizenToolKit.controllers.comment.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.comment.UpdateFieldAction',*/ + ); + } + + public function actionTestPod() { + $params = array(); + $this->render( "testpod" , $params ); + } +} \ No newline at end of file diff --git a/controllers/OrderitemController.php b/controllers/OrderitemController.php new file mode 100644 index 0000000000000000000000000000000000000000..f9f8fbb350c50e072e5dd3c999636398ccaa9211 --- /dev/null +++ b/controllers/OrderitemController.php @@ -0,0 +1,35 @@ +<?php +/** + * CommentController.php + * + * @author: Sylvain Barbot + * Date: 2/7/15 + * Time: 12:25 AM + */ +class OrderitemController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //'index' => 'citizenToolKit.controllers.comment.IndexAction', + 'save' => 'citizenToolKit.controllers.orderitem.SaveAction', + 'get' => 'citizenToolKit.controllers.orderitem.GetAction', + /*'abuseprocess' => 'citizenToolKit.controllers.comment.AbuseProcessAction', + 'moderate' => 'citizenToolKit.controllers.comment.ModerateAction', + 'countcommentsfrom' => 'citizenToolKit.controllers.comment.CountCommentsAction', + 'delete' => 'citizenToolKit.controllers.comment.DeleteAction', + 'updatefield' => 'citizenToolKit.controllers.comment.UpdateFieldAction',*/ + ); + } + + public function actionTestPod() { + $params = array(); + $this->render( "testpod" , $params ); + } +} \ No newline at end of file diff --git a/controllers/OrganizationController.php b/controllers/OrganizationController.php new file mode 100755 index 0000000000000000000000000000000000000000..c07bbfe0de9c7133c711e54cbcf380fe66c85d4f --- /dev/null +++ b/controllers/OrganizationController.php @@ -0,0 +1,44 @@ +<?php +/** + * ActionLocaleController.php + * + * tous ce que propose le PH pour les associations + * comment agir localeement + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +class OrganizationController extends CommunecterController { + + protected function beforeAction($action) + { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + // captcha action renders the CAPTCHA image displayed on the contact page + 'captcha'=>array( + 'class'=>'CCaptchaAction', + 'backColor'=>0xFFFFFF, + ), + 'getbyid' => 'citizenToolKit.controllers.organization.GetByIdAction', + 'addorganizationform' => 'citizenToolKit.controllers.organization.AddOrganizationFormAction', + 'save' => 'citizenToolKit.controllers.organization.SaveAction', + 'updatefield' => 'citizenToolKit.controllers.organization.UpdateFieldAction', + 'update' => 'citizenToolKit.controllers.organization.UpdateAction', + 'disabled' => 'citizenToolKit.controllers.organization.DisableAction', + 'join' => 'citizenToolKit.controllers.organization.JoinAction', + 'addneworganizationasmember' => 'citizenToolKit.controllers.organization.AddNewOrganizationAsMemberAction', + 'detail' => 'citizenToolKit.controllers.organization.DetailAction', + 'news' => 'citizenToolKit.controllers.organization.NewsAction', + 'sig' => 'citizenToolKit.controllers.organization.SigAction', + 'directory' => 'citizenToolKit.controllers.organization.DirectoryAction', + 'addmember' => 'citizenToolKit.controllers.organization.AddMemberAction', + 'declaremeadmin' => 'citizenToolKit.controllers.organization.DeclareMeAdminAction', + "updatesettings" => 'citizenToolKit.controllers.organization.UpdateSettingsAction' + ); + } +} \ No newline at end of file diff --git a/controllers/PayController.php b/controllers/PayController.php new file mode 100644 index 0000000000000000000000000000000000000000..875f8ee990a4cafac119474492da98a21d59d3e9 --- /dev/null +++ b/controllers/PayController.php @@ -0,0 +1,226 @@ +<?php +/** + * PayController.php + * + * @author: Tibor Katelbach<tibor@communecter.org> + * Date: 11/11/17 + */ +class PayController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + + + public function actionIndex() { + if(@Yii::app()->session["userId"]) + { + require_once '../../pixelhumain/ph/vendor/autoload.php'; + define('MangoPayDemo_ClientId', Yii::app()->params["mangoPay"]["ClientId"] ); + define('MangoPayDemo_ClientPassword', Yii::app()->params["mangoPay"]["ClientPassword"] ); + define('MangoPayDemo_TemporaryFolder', Yii::app()->params["mangoPay"]["TemporaryFolder"]); + + $api = new MangoPay\MangoPayApi(); + + // configuration + $api->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"]; + $api->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"]; + $api->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + + $user = Person::getById(Yii::app()->session["userId"]); + if(!@$user["mangoUserId"]){ + $userM = new MangoPay\UserNatural(); + $userM->FirstName = Yii::app()->session["user"]["name"]; + $userM->LastName = Yii::app()->session["user"]["username"]; + $userM->Email = Yii::app()->session["userEmail"]; + + $userM->Birthday = time(); + $userM->Nationality = 'FR'; + $userM->CountryOfResidence = 'FR'; + $userM->Occupation = "programmer"; + $userM->IncomeRange = 3; + + //mUser comes from MangoDB App + $mUser = $api->Users->Create($userM); + PHDB::update( Person::COLLECTION, array("_id" => new MongoId(Yii::app()->session["userId"])), + array('$set' => array("mangoUserId"=> $mUser->Id)) + ); + }else { + echo "user has mango account : ".$user["mangoUserId"]; + $mUser = $api->Users->GetNatural($user["mangoUserId"]); + } + + $cardRegister = new \MangoPay\CardRegistration(); + $cardRegister->UserId = $mUser->Id; + $cardRegister->Currency = (@$_GET["cur"]) ? $_GET["cur"] : "EUR"; + $cardRegister->CardType = (@$_GET["card"]) ? $_GET["card"] : "CB_VISA_MASTERCARD"; //or alternatively MAESTRO or DINERS etc + $createdCardRegister = $api->CardRegistrations->Create($cardRegister); + + + $_SESSION['cardRegisterId'] = $createdCardRegister->Id; + $_SESSION['amount'] = $_GET["amount"]; + $_SESSION['amount'] = (@$_GET["cur"]) ? $_GET["cur"] : "EUR"; + + $params = array( + "api" => $api, + 'amount' => $_GET["amount"], + 'currency' => (@$_GET["cur"]) ? $_GET["cur"] : "EUR", + 'createdUser' => $mUser, + 'createdCardRegister' => $createdCardRegister + ); + + $this->renderPartial( "with_js" , $params ); + } else + throw new CHttpException(401,Yii::t("common","Login First")); + } + + public function actionIn() { + if(@Yii::app()->session["userId"]) + { + require_once '../../pixelhumain/ph/vendor/autoload.php'; + define('MangoPayDemo_ClientId', Yii::app()->params["mangoPay"]["ClientId"] ); + define('MangoPayDemo_ClientPassword', Yii::app()->params["mangoPay"]["ClientPassword"] ); + define('MangoPayDemo_TemporaryFolder', Yii::app()->params["mangoPay"]["TemporaryFolder"]); + + $api = new MangoPay\MangoPayApi(); + + // configuration + $api->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"]; + $api->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"]; + $api->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + + + if (!isset($_SESSION['amount'])) { + die('<div style="color:red;">No payment has been started<div>'); + } + + try { + // update register card with registration data from Payline service + //$cardRegister = $api->CardRegistrations->Get($_SESSION['cardRegisterId']); + + // get created virtual card object + $user = Person::getById(Yii::app()->session["userId"]); + $card = $api->Cards->Get( $_POST["cardId"] ); + + // create temporary wallet for user + $userWallet = new \MangoPay\Wallet(); + $userWallet->Owners = array( $user["mangoUserId"] ); + $userWallet->Currency = $_POST['currency']; + $userWallet->Description = 'Temporary wallet for payment demo'; + $createdUserWallet = $api->Wallets->Create($userWallet); + + // create pay-in CARD DIRECT + $payIn = new \MangoPay\PayIn(); + $payIn->CreditedWalletId = $createdUserWallet->Id; + $payIn->AuthorId = $user["mangoUserId"]; + $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds->Amount = $_POST['obj']['total']; + $payIn->DebitedFunds->Currency = $_POST['currency']; + $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees->Amount = 0; + $payIn->Fees->Currency = $_POST['currency']; + + // payment type as CARD + $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); + $payIn->PaymentDetails->CardType = $card->CardType; + $payIn->PaymentDetails->CardId = $card->Id; + + // execution type as DIRECT + $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); + $payIn->ExecutionDetails->SecureModeReturnURL = 'http://test.com'; + + // create Pay-In + $createdPayIn = $api->PayIns->Create($payIn); + + // if created Pay-in object has status SUCCEEDED it's mean that all is fine + if ($createdPayIn->Status == \MangoPay\PayInStatus::Succeeded) { + echo '<div style="color:green;">'. + 'Pay-In has been created successfully. ' + .'Pay-In Id = ' . $createdPayIn->Id.'<br/>' + . ', Wallet Id = ' . $createdUserWallet->Id .'<br/>' + . 'transferring'.'<br/>' + . '</div>'; + /* + for each Seller from $_POST['obj'] + check if has mangoPay account + else create MangoPay\UserLegal(); + */ + foreach ($_POST['obj']["sellers"] as $key => $sale) + { + $seller = Person::getById( $key ); + if(!@$seller["mangoSellerId"]){ + + $sellerM = new MangoPay\UserLegal(); + $sellerM->Name = $seller["name"]; + $sellerM->LegalPersonType = "BUSINESS"; + $sellerM->Email = $seller["email"]; + $sellerM->LegalRepresentativeFirstName = $seller["name"]; + $sellerM->LegalRepresentativeLastName = $seller["username"]; + $sellerM->LegalRepresentativeBirthday = 121271; + $sellerM->LegalRepresentativeNationality = "FR"; + $sellerM->LegalRepresentativeCountryOfResidence = "RE"; + $mSeller = $api->Users->Create($sellerM); + + echo $seller["name"]." seller account created: ".$seller["mangoSellerId"]."<br/>"; + PHDB::update( Person::COLLECTION, array("_id" => $seller["_id"] ), + array('$set' => array("mangoSellerId"=> $mSeller->Id)) ); + }else { + echo $seller["name"]." seller has mango account : ".$seller["mangoSellerId"]."<br/>"; + $mSeller = $api->Users->GetLegal($seller["mangoSellerId"]); + } + + + //create a wallet + //Note that there is no difference between a Wallet for a Natural User and a Legal User + $Wallet = new \MangoPay\Wallet(); + $Wallet->Owners = array( $mSeller->Id ); + $Wallet->Description = "Demo wallet as seller"; + $Wallet->Currency = "EUR"; + $createdSellerWallet = $api->Wallets->Create($Wallet); + echo $seller["name"]." wallet created <br/>"; + + //transfer amount from user to seller + $Transfer = new \MangoPay\Transfer(); + $buyer = Person::getById( Yii::app()->session["userId"] ); + $Transfer->AuthorId = $buyer["mangoUserId"]; + $Transfer->DebitedFunds = new \MangoPay\Money(); + $Transfer->DebitedFunds->Currency = $_POST['currency']; + $Transfer->DebitedFunds->Amount = $sale["total"]; + + $Transfer->Fees = new \MangoPay\Money(); + $Transfer->Fees->Currency = $_POST['currency']; + $Transfer->Fees->Amount = $sale["total"]*0.1; + $Transfer->DebitedWalletID = $createdUserWallet->Id; + $Transfer->CreditedWalletId = $createdSellerWallet->Id; + $result = $api->Transfers->Create($Transfer); + echo "Trensfer from ".$buyer["name"]." to ".$seller["name"]." <br/>"; + + } + } + else { + // if created Pay-in object has status different than SUCCEEDED + // that occurred error and display error message + echo '<div style="color:red;">'. + 'Pay-In has been created with status: ' + . $createdPayIn->Status . ' (result code: ' + . $createdPayIn->ResultCode . ')' + .'</div>'; + } + + } catch (\MangoPay\Libraries\ResponseException $e) { + + echo '<div style="color: red;">' + .'\MangoPay\ResponseException: Code: ' + . $e->getCode() . '<br/>Message: ' . $e->getMessage() + .'<br/><br/>Details: '; print_r($e->GetErrorDetails()) + .'</div>'; + } + } else + throw new CHttpException(401,Yii::t("common","Login First")); + + } + +} \ No newline at end of file diff --git a/controllers/PdfController.php b/controllers/PdfController.php new file mode 100644 index 0000000000000000000000000000000000000000..33a5e95d05fb1fcd201aee35ffcf6b592f2a65bf --- /dev/null +++ b/controllers/PdfController.php @@ -0,0 +1,22 @@ +<?php +/** + * PdfController.php + * + * @author: Raphael R + * Date: 09/2017 + */ +class PdfController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'create' => 'citizenToolKit.controllers.pdf.CreateAction', + ); + } +} \ No newline at end of file diff --git a/controllers/PersonController.php b/controllers/PersonController.php new file mode 100755 index 0000000000000000000000000000000000000000..011d29ba2088fd8188f67317fe751186f66336a2 --- /dev/null +++ b/controllers/PersonController.php @@ -0,0 +1,162 @@ +<?php +class PersonController extends CommunecterController { + + public $hasSocial = false; + public $loginRegister = true; + + + public function accessRules() { + return array( + // not logged in users should be able to login and view captcha images as well as errors + array('allow', 'actions' => array('index','graph','register','register2')), + // logged in users can do whatever they want to + array('allow', 'users' => array('@')), + // not logged in users can't do anything except above + array('deny'), + ); + } + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.person.IndexAction', + 'login' => 'citizenToolKit.controllers.person.LoginAction', + 'logged' => 'citizenToolKit.controllers.person.LoggedAction', + 'sendemail' => 'citizenToolKit.controllers.person.SendEmailAction', + 'logout' => 'citizenToolKit.controllers.person.LogoutAction', + 'authenticate' => 'citizenToolKit.controllers.person.AuthenticateAction', + 'detail' => 'citizenToolKit.controllers.person.DetailAction', + 'follows' => 'citizenToolKit.controllers.person.FollowsAction', + 'disconnect' => 'citizenToolKit.controllers.person.DisconnectAction', + 'activate' => 'citizenToolKit.controllers.person.ActivateAction', + 'register' => 'citizenToolKit.controllers.person.RegisterAction', + 'getnotification' => 'citizenToolKit.controllers.person.GetNotificationAction', + 'getthumbpath' => 'citizenToolKit.controllers.person.GetThumbPathAction', + 'invite' => 'citizenToolKit.controllers.person.InviteAction', + 'invitation' => 'citizenToolKit.controllers.person.InvitationAction', + 'updatefield' => 'citizenToolKit.controllers.person.UpdateFieldAction', + 'update' => 'citizenToolKit.controllers.person.UpdateAction', + 'directory' => 'citizenToolKit.controllers.person.DirectoryAction', + 'data' => 'citizenToolKit.controllers.person.DataAction', + 'chooseinvitecontact'=> 'citizenToolKit.controllers.person.ChooseInviteContactAction', + 'changepassword' => 'citizenToolKit.controllers.person.ChangePasswordAction', + 'changerole' => 'citizenToolKit.controllers.person.ChangeRoleAction', + 'checkusername' => 'citizenToolKit.controllers.person.CheckUsernameAction', + 'checklinkmailwithuser'=> 'citizenToolKit.controllers.person.CheckLinkMailWithUserAction', + 'validateinvitation' => 'citizenToolKit.controllers.person.ValidateInvitationAction', + 'getuseridbymail' => 'citizenToolKit.controllers.person.GetUserIdByMailAction', + "updatesettings" => 'citizenToolKit.controllers.person.UpdateSettingsAction', + "updateprofil" => 'citizenToolKit.controllers.person.UpdateProfilAction', + "updatewithjson" => 'citizenToolKit.controllers.person.UpdateWithJsonAction', + "telegram" => 'citizenToolKit.controllers.person.TelegramAction', + "updatemultitag" => 'citizenToolKit.controllers.person.UpdateMultiTagAction', + "updatemultiscope" => 'citizenToolKit.controllers.person.UpdateMultiScopeAction', + "sendinvitationagain"=> 'citizenToolKit.controllers.person.SendInvitationAgainAction', + 'get' => 'citizenToolKit.controllers.person.GetAction', + 'getcontactsbymails' => 'citizenToolKit.controllers.person.GetContactsByMailsAction', + 'removehelpblock' => 'citizenToolKit.controllers.person.RemoveHelpBlockAction', + 'dashboard' => 'citizenToolKit.controllers.person.dashboardAction', + 'updatescopeinter' => 'citizenToolKit.controllers.person.UpdatescopeinterAction', + + + ); + } + +public function actionAbout(){ + + $person = PHDB::findOne(PHType::TYPE_CITOYEN, array( "_id" => new MongoId(Yii::app()->session["userId"]) ) ); + $tags = PHDB::findOne( PHType::TYPE_LISTS,array("name"=>"tags"), array('list')); + + $this->render( "about" , array("person"=>$person,'tags'=>json_encode($tags['list'])) ); + +} +public function actionInitDataPeople() +{ + //inject Data brute d'une liste de Person avec Id + $import = Admin::initModuleData( $this->module->id, "personNetworking", PHType::TYPE_CITOYEN,true ); + $import = Admin::initModuleData($this->module->id, "organizationNetworking", Organization::COLLECTION); + + $result = ( $import["errors"] > 0 ) ? false : true; + Rest::json( $import ); + Yii::app()->end(); +} + + public function actionInitDataPeopleAll() + { + //inject Data brute d'une liste de Person avec Id + $import = Admin::initMultipleModuleData( $this->module->id, "personNetworkingAll", true ); + + $result = ( $import["errors"] > 0 ) ? false : true; + Rest::json( $import ); + Yii::app()->end(); + } + + public function actionImportMyData() + { + $base = 'upload'.DIRECTORY_SEPARATOR.'export'.DIRECTORY_SEPARATOR.Yii::app()->session["userId"].DIRECTORY_SEPARATOR; + if( Yii::app()->session["userId"] && file_exists ( $base.Yii::app()->session["userId"].".json" ) ) + { + //inject Data brute d'une liste de Person avec Id + $res = array("result"=>true, "msg"=>"import success");//Admin::initMultipleModuleData( $this->module->id, "personNetworkingAll", true ); + //$res["result"] = ( isset($res["errors"]) && $res["errors"] > 0 ) ? false : true; + } else + $res = array("result"=>false, "msg"=>"no Data to Import"); + + Rest::json( $res ); + Yii::app()->end(); + } + + public function actionClearInitDataPeopleAll() + { + //inject Data brute d'une liste de Person avec Id + $import = Admin::initMultipleModuleData( $this->module->id, "personNetworkingAll", true,true,true ); + + Rest::json( $import ); + Yii::app()->end(); + } + public function actionShoppingCart(){ + echo $this->renderPartial("shoppingCart", array(), true); + } + public function actionSendMail() + { + foreach ($_POST['mails'] as $value) + { + if (filter_var($value, FILTER_VALIDATE_EMAIL)) + { + + $params = array( + "type" => Cron::TYPE_MAIL, + "tpl"=>'sharePH', + "subject" => 'Rejoint-nous sur PixelHumain', + "from"=>Yii::app()->params['adminEmail'], + "to" => $value, + "tplParams" => array( "message"=>$_POST['textmail'], + "personne"=>Yii::app()->session['userId']) + ); + + Mail::schedule($params); + + + + /*$message = new YiiMailMessage; + $message->setSubject("Communecte toi"); + $message->setBody($_POST['textmail']."<br/><a href='http://pixelhumain.com'>PixelHumain</a>", 'text/html'); + $message->addTo($value); + $message->from = Yii::app()->params['adminEmail']; + + Yii::app()->mail->send($message); + + Yii::app()->session["mailsend"] = true;*/ + + } + + } + return Rest::json(array('result'=> true)); + } + +} \ No newline at end of file diff --git a/controllers/PodController.php b/controllers/PodController.php new file mode 100755 index 0000000000000000000000000000000000000000..6d43059eaaecab736940acfc9e022b9e072ddafe --- /dev/null +++ b/controllers/PodController.php @@ -0,0 +1,27 @@ +<?php + /** + * PodController.php + * + */ + +class PodController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'slideragenda' => 'citizenToolKit.controllers.pod.SliderAgendaAction', + 'photovideo' => 'citizenToolKit.controllers.pod.PhotoVideoAction', + 'fileupload' => 'citizenToolKit.controllers.pod.FileUploadAction', + 'activitylist' => 'citizenToolKit.controllers.pod.ActivityListAction' + ); + } + public function actionCircuit(){ + echo $this->renderPartial("circuit", array(), true); + } +} +?> \ No newline at end of file diff --git a/controllers/ProjectController.php b/controllers/ProjectController.php new file mode 100755 index 0000000000000000000000000000000000000000..c00349bc89209e496f068598b45ed350ad81dd3f --- /dev/null +++ b/controllers/ProjectController.php @@ -0,0 +1,145 @@ +<?php +/** + * ActionLocaleController.php + * + * tous ce que propose le PH pour les associations + * comment agir localeement + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +class ProjectController extends CommunecterController { + const moduleTitle = "Projet"; + protected function beforeAction($action) + { + parent::initPage(); + return parent::beforeAction($action); + } + public function actionIndex() + { + $this->render("index"); + } + public function actions() + { + return array( + // captcha action renders the CAPTCHA image displayed on the contact page + 'captcha'=>array( + 'class'=>'CCaptchaAction', + 'backColor'=>0xFFFFFF, + ), + 'edit' => 'citizenToolKit.controllers.project.EditAction', + 'removeproject' => 'citizenToolKit.controllers.project.RemoveProjectAction', + 'save' => 'citizenToolKit.controllers.project.SaveAction', + 'update' => 'citizenToolKit.controllers.project.UpdateAction', + 'dashboard' => 'citizenToolKit.controllers.project.DashboardAction', + 'detail' => 'citizenToolKit.controllers.project.DetailAction', + 'savecontributor' => 'citizenToolKit.controllers.project.SaveContributorAction', + 'editchart' => 'citizenToolKit.controllers.project.EditChartAction', + 'updatefield' => 'citizenToolKit.controllers.project.UpdateFieldAction', + 'projectsv' => 'citizenToolKit.controllers.project.ProjectSVAction', + 'addcontributorsv' => 'citizenToolKit.controllers.project.AddContributorSvAction', + 'addchartsv' => 'citizenToolKit.controllers.project.AddChartSvAction', + 'directory' => 'citizenToolKit.controllers.project.DirectoryAction', + 'get' => 'citizenToolKit.controllers.project.GetAction', + "updatesettings" => 'citizenToolKit.controllers.project.UpdateSettingsAction' + /*'delete' => 'citizenToolKit.controllers.organization.DeleteAction', + 'join' => 'citizenToolKit.controllers.organization.JoinAction', + 'addneworganizationasmember' => 'citizenToolKit.controllers.organization.AddNewOrganizationAsMemberAction', + 'dashboard' => 'citizenToolKit.controllers.organization.DashboardAction', + 'dashboard1' => 'citizenToolKit.controllers.organization.Dashboard1Action', + 'dashboardmember' => 'citizenToolKit.controllers.organization.DashboardMemberAction', + 'news' => 'citizenToolKit.controllers.organization.NewsAction', + 'sig' => 'citizenToolKit.controllers.organization.SigAction',*/ + + ); + } +//} +/** + * ActionLocaleController.php + * + * tous ce que propose le PH en terme de projet + * comment agir localeement + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 15/08/13 + */ +//class ProjectController extends CommunecterController { + // const moduleTitle = "Projet"; + + /* protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actionIndex() + { + $this->render("index"); + }*/ + + /* public function actionEdit($id) + { + $project = Project::getById($id); + $citoyens = array(); + $organizations = array(); + if (isset($project['links']["contributors"]) && !empty($project['links']["contributors"])) + { + foreach ($project['links']["contributors"] as $id => $e) + { + + if (!empty($project)) { + if($e["type"] == "citoyens"){ + $citoyen = PHDB::findOne( PHType::TYPE_CITOYEN, array( "_id" => new MongoId($id))); + array_push($citoyens, $citoyen); + }else if($e["type"] == "organizations"){ + $organization = PHDB::findOne( Organization::COLLECTION, array( "_id" => new MongoId($id))); + array_push($organizations, $organization); + } + } else { + // throw new CommunecterException("Données inconsistentes pour le citoyen : ".Yii::app()->session["userId"]); + } + } + } + $this->render("edit",array('project'=>$project, 'organizations'=>$organizations, 'citoyens'=>$citoyens)); + }*/ + // A voir si utile + public function actionPublic($id){ + //get The project Id + if (empty($id)) { + throw new CommunecterException("The project id is mandatory to retrieve the project !"); + } + + $project = Project::getPublicData($id); + + $this->title = (isset($project["name"])) ? $project["name"] : ""; + $this->subTitle = (isset($project["description"])) ? $project["description"] : ""; + $this->pageTitle = "Communecter - Informations publiques de ".$this->title; + + + $this->render("public", array("project" => $project)); + } + + //********** + // Old - Still used ? + //********** + /* public function actionList($ownerId) + { + $list = Yii::app()->mongodb->groups->find(array("type" => "projet", "owner" => new MongoId($ownerId) )); + $owner = Yii::app()->mongodb->groups->findOne(array("_id"=>new MongoId($ownerId))); + $this->render( "list" , array( 'owner'=>$owner, 'list' => $list )); + } + public function actionPeople($id,$type) + { + $projet = Yii::app()->mongodb->groups->findOne(array("_id"=>new MongoId($id))); + $this->render( "people" , array( 'projet' => $projet,"typePeople"=>$type )); + } + public function actionOrganigrid($id,$type,$design="s") + { + $projet = Yii::app()->mongodb->groups->findOne(array("_id"=>new MongoId($id))); + $this->render( "organigrid" , array( 'projet' => $projet,"typePeople"=>$type,"design"=>$design )); + } + public function actionCreer() + { + $this->render("new"); + }*/ + +} \ No newline at end of file diff --git a/controllers/RocketchatController.php b/controllers/RocketchatController.php new file mode 100644 index 0000000000000000000000000000000000000000..8469e358e61e92a3ac89c18cb1b49b8b0d79a865 --- /dev/null +++ b/controllers/RocketchatController.php @@ -0,0 +1,393 @@ +<?php +/** + * ActionController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 7/29/15 + * Time: 12:25 AM + */ +class RocketchatController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + //'iframe' => 'citizenToolKit.controllers.action.AddActionAction' + ); + } + + public function actionIndex() { + if ( @Yii::app()->session["userId"] && Yii::app()->params['rocketchatEnabled'] ) + $this->renderPartial("iframe"); + else { + Yii::app()->session["goto"] = "/rocketchat"; + $this->redirect( Yii::app()->homeUrl ); + } + } + + public function actionCors() { + + if ( @Yii::app()->session["userId"] ) + { + // use $_SESSION of parent window + $sessionid = $_COOKIE['PHPSESSID']; + + // set headers for CORS + header("Access-Control-Allow-Origin: ".Yii::app()->params['rocketchatURL']); + header("Access-Control-Allow-Credentials: true "); + header("Access-Control-Allow-Methods: OPTIONS, GET, POST"); + header("Access-Control-Allow-Headers: Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control"); + header('Content-Type: application/json'); + + // return token saved by IFRAME URL page to confirm login + echo '{ "loginToken":"'.Yii::app()->session['loginToken'].'"}'; + } + } + + public function actionLogin() { + /*if(!Yii::app()->session["loginToken"]) + $rocket = RocketChat::getToken(Yii::app()->params['userEmail'], Yii::app()->params['rocketAdminPwd']); + }*/ + $this->renderPartial( "rocket" ); + } + + //test + // http://127.0.0.1/ph/co2/rocketchat/logint + // existing user with good pwd > genertes token + // existing user with bad pwd > msg > Unauthorised + // inexistant user > msg > Unauthorised + public function actionLogint($email=null,$pwd=null) { + header('Content-Type: application/json'); + if(Yii::app()->session["userId"]) + { + + if(!@$email){ + Yii::app()->session["adminLoginToken"] = null; + Yii::app()->session["adminRocketUserId"] = null; + Yii::app()->session["loginToken"] = null; + Yii::app()->session["rocketUserId"] = null; + } + + Yii::app()->session["adminLoginToken"] = Yii::app()->params["adminLoginToken"]; + Yii::app()->session["adminRocketUserId"] = Yii::app()->params["adminRocketUserId"]; + + + + if(!@Yii::app()->session["loginToken"]){ + $rocket = RocketChat::getToken( $email, $pwd ); + Yii::app()->session["loginToken"] = $rocket["loginToken"]; + Yii::app()->session["rocketUserId"] = $rocket["rocketUserId"]; + } + $rocket["loginToken"] = Yii::app()->session["loginToken"]; + $rocket["rocketUserId"] = Yii::app()->session["rocketUserId"]; + $rocket["adminLoginToken"] = Yii::app()->params["adminLoginToken"]; + $rocket["adminRocketUserId"] = Yii::app()->params["adminRocketUserId"]; + $rocket['username'] = Yii::app()->session['user']['username']; + $rocket['email'] = $email; + + echo json_encode($rocket); + } else + Rest::json( array("result"=>false,"error"=>"Must be Loggued in.")); + + } + + //tested + // All actions are driven by the coAdmin user + // creations and invites + // accessing Element > creates + // channels : http://127.0.0.1/ph/co2/rocketchat/chat/name/openatlas/type/test/roomType/channel/test/true + // groups : http://127.0.0.1/ph/co2/rocketchat/chat/name/openatlas/type/test/roomType/group/test/true + public function actionChat($name,$type="",$id=null,$roomType=null) { + $group = null; + if(Yii::app()->session["userId"]) + { + /*if( $type == Person::COLLECTION ){ + //id will contain the username + /*$roomType == "direct"; + $path = "/direct/".$name; + $group = RocketChat::createDirect($id);*/ + //$group = array("msg" => "all users are created on first login"); + //} else*/ + if($roomType == "channel"){ + $path = "/channel/".$name; + $group = RocketChat::createGroup ($name,$roomType, Yii::app()->session['user']['username']); + } + else{ + $path = "/group/".$name; + $group = null; + if(Authorisation::canEditItem(Yii::app()->session['userId'], $type, $id) || + Link::isLinked($id,$type,Yii::app()->session["userId"]) ){ + $group = RocketChat::createGroup ($name,null, Yii::app()->session['user']['username']); + } else + Rest::json(array("result"=>false, + "error"=>"Unauthorized Access.", + "canEdit" => Authorisation::canEditItem(Yii::app()->session['userId'], $type, $id), + "userId"=>Yii::app()->session['userId'], + "userEmail"=>Yii::app()->session['userEmail'], + "type"=>$type, "id"=>$id)); + + + } + + if($group != null && @$group->create->channel->_id ) { + $result = PHDB::update( $type, array("_id" => new MongoId($id)), + array('$set' => array("hasRC"=>true) )); + // TODO : notification or news + Notification::constructNotification(ActStr::VERB_ADD, + array("id" => Yii::app()->session["userId"],"name"=> Yii::app()->session["user"]["name"]), + array( "type"=>$type,"id"=> $id), + null, + "chat" + ); + + /*array( "text"=>"Oyé Oyé , ".Yii::app()->session["user"]["name"]." a créé la fusée pour Dailoguer en direct : Click pour découvrir le Rocket Chat de la Communauté.", + "parentType"=>$type, + "parentId"=>$id, + "scope"=>"private", + "media"=>array( + "type"=>"url_content", + "content"=> array( + "url"=>Yii::app()->getRequest()->getBaseUrl(true)."/themes/CO2//assets/img/bg_pixeltree2.jpg", + "image"=>Yii::app()->getRequest()->getBaseUrl(true)."/themes/CO2//assets/img/bg_pixeltree2.jpg", + "imageSize":"large")), + "type"=>"news"); + News::save($array);*/ + } + + //echo json_encode($group); + //$embed = true; + /*if(Yii::app()->request->isAjaxRequest && !$noRender){ + $this->renderPartial( "iframe", array( 'path'=>$path, "embed"=>$embed) ); + } else {*/ + + Rest::json($group); + } else + Rest::json( array("result"=>false,"error"=>"Must be Loggued in.")); + + } + + public function actionInvite($name,$type="",$id=null,$roomType=null,$test=null) { + $group = null; + $group = RocketChat::invite ($type."_".$name,$roomType, Yii::app()->session['user']['username']); + + } + + public function actionList() { + if(@Yii::app()->session['userId'] && @Yii::app()->session["loginToken"] ) + Rest::json( RocketChat::listUserChannels() ); + } + + + public function actionTest() { + + /*define('REST_API_ROOT', '/api/v1/'); + define('ROCKET_CHAT_INSTANCE', "https://chat.lescommuns.org"); + + Yii::import('rocketchat.RocketChatClient', true); + Yii::import('rocketchat.RocketChatUser', true); + Yii::import('rocketchat.RocketChatChannel', true); + Yii::import('rocketchat.RocketChatGroup', true); + Yii::import('httpful.Request', true); + Yii::import('httpful.Bootstrap', true); + $api = new \RocketChat\Client(); + echo $api->version()." on https://chat.lescommuns.org"; + + // login as the main admin user + echo "<br/>***************LOGIN **********************<br/>"; + echo ">>>> login admin<br/>"; + $admin = new \RocketChat\User("oceatoon@gmail.com", "");*/ + + + define('REST_API_ROOT', '/api/v1/'); + define('ROCKET_CHAT_INSTANCE', Yii::app()->params['rocketchatURL']); + + Yii::import('rocketchat.RocketChatClient', true); + Yii::import('rocketchat.RocketChatUser', true); + Yii::import('rocketchat.RocketChatChannel', true); + Yii::import('rocketchat.RocketChatGroup', true); + Yii::import('httpful.Request', true); + Yii::import('httpful.Bootstrap', true); + $api = new \RocketChat\Client(); + echo $api->version()." on ".Yii::app()->params['rocketchatURL']; + + + // login as the main admin user + echo "<br/>***************LOGIN **********************<br/>"; + $admin = new \RocketChat\User(Yii::app()->params['rocketAdmin'], Yii::app()->params['rocketAdminPwd'],null,true); + //$admin = new \RocketChat\User("openatlas974@gmail.com", "2210open"); + //$admin = new \RocketChat\User("clement.damiens@gmail.com", "blaiross"); + + //5715348040bb4e873d1d650b + if( $admin->login() ) { + echo "user logged in<br/>"; + }; + $admin->info(); + echo "username {$admin->username}<br/>id ({$admin->id})<br/>authToken ({$admin->authToken}) <br/>"; + + /*echo ">>>> list channels <br/>"; + $list = $admin->listJoined(); + foreach ($list as $key => $value) { + echo $key." channel : ".$value." <br/>"; + }*/ + + /* echo "<br/>***************LIST PRIVATE CHANNELS **********************<br/>"; + $list = $api->list_groups(); + + foreach ($list as $key => $value) { + echo $key." :: ".$value->name."<br/>"; + } + */ + /* echo "<br/>*********** LIST ALL CHANNELS **************************<br/>"; + $list = $api->list_channels(); + + foreach ($list as $key => $value) { + echo $key." :: ".$value->name."<br/>"; + } + */ + +$list = array( +//array("Julie","MARTIN","julie.ml.martin@gmail.com"), +); + /* echo "<br/>*********** TEST NEW USER **************************<br/>"; + foreach ($list as $key => $user) + { + //$user = $list[0]; + $newuser = new \RocketChat\User( $user[0].$user[1].'_reunion', 'alternatiba', array( + 'nickname' => $user[0].$user[1], + 'email' => $user[2], + )); + + //$newuser->info(); + //if( !$newuser->login(false) ) { + // actually create the user if it does not exist yet + echo ">>>> create user<br/>"; + $newuser->create(); + //} + echo "user {$newuser->nickname} created ({$newuser->id})<br/>"; + }*/ + echo "<br/>**************** TEST CREATE/JOIN POST msg to CHANNEL *********************<br/>"; + + // create a new channel + //K6YT5zkLBKmKKScWy 'croxxxat' + + + //$channel = new \RocketChat\Group( 'test8priv',array("openatlas")); + $channel = new \RocketChat\Group( 'projects_booom-closed'); + + //creates if doesn't exist + /* + echo ">>>> channel create<br/>"; + $res = $channel->create(); + var_dump($res);*/ + + echo "<br/>>>>> channel info : ({$channel->name})<br/>"; + $res = $channel->info(); + var_dump($res); + if($channel->id == null) + echo "<br/><b style='color:red'>you dont have access to this room</b><br/>"; + else + echo "<br/>channel id ({$channel->id}) <br/>name ({$channel->name})<br/>"; + + + + //if( !$res->success && $res->errorType == "error-duplicate-channel-name" ){ + //set as private + //$channel->setType("crocket","p"); + + + //echo "<br/>>>>> invite new user<br/>"; + //$res = $channel->invite("openatlas"); + $res = $channel->invite("Bouboule"); + var_dump($res); + //} + + // post a message + //$channel->postMessage('Hello world from PHP RC API code in co2 :smile:'); + + /* ---------------- Page with ROCKET CHAT in an iframe ----------------------- */ + } + + public function actionTestt() { + + define('REST_API_ROOT', '/api/v1/'); + define('ROCKET_CHAT_INSTANCE', Yii::app()->params['rocketchatURL']); + + Yii::import('rocketchat.RocketChatClient', true); + Yii::import('rocketchat.RocketChatUser', true); + Yii::import('rocketchat.RocketChatChannel', true); + Yii::import('rocketchat.RocketChatGroup', true); + Yii::import('httpful.Request', true); + Yii::import('httpful.Bootstrap', true); + $api = new \RocketChat\Client(); + echo $api->version()." on ".Yii::app()->params['rocketchatURL']; + + + // login as the main admin user + echo "<br/>***************LOGIN **********************<br/>"; + $admin = new \RocketChat\User(Yii::app()->params['rocketAdmin'], Yii::app()->params['rocketAdminPwd']); + if( $admin->login() ) { + echo "admin user logged in<br/>"; + }; + $admin->info(); + echo "I'm {$admin->nickname} ({$admin->id}) "; echo "<br/>"; + + /* echo "<br/>***************LIST PRIVATE CHANNELS **********************<br/>"; + $list = $api->list_groups(); + + foreach ($list as $key => $value) { + echo $key." :: ".$value->name."<br/>"; + } + */ + + + /* echo "<br/>*********** LIST ALL CHANNELS **************************<br/>"; + $list = $api->list_channels(); + + foreach ($list as $key => $value) { + echo $key." :: ".$value->name."<br/>"; + } + */ + + + /* echo "<br/>*********** TEST NEW USER **************************<br/>"; + + $newuser = new \RocketChat\User('tib_co2', 'alternatiba', array( + 'nickname' => 'tib@co2.org', + 'email' => 'tibor@communecter.org', + )); + + $newuser->info(); + /*if( !$newuser->login(false) ) { + // actually create the user if it does not exist yet + $newuser->create(); + }*/ + //echo "user {$newuser->nickname} created ({$newuser->id})<br/>"; + + echo "<br/>**************** TEST CREATE/JOIN POST msg to CHANNEL *********************<br/>"; + + // create a new channel + //K6YT5zkLBKmKKScWy 'croxxxat' + $channel = new \RocketChat\Group( 'croxit'); + + //creates if doesn't exist + $channel->create(); + + //set as private + $channel->setType("crocket","p"); + + //invite someone + $channel->info(); + echo "channel ({$channel->id})<br/>"; + + //$channel->invite($newuser); + + // post a message + //$channel->postMessage('Hello world from PHP RC API code in co2 :smile:'); + + /* ---------------- Page with ROCKET CHAT in an iframe ----------------------- */ + } +} \ No newline at end of file diff --git a/controllers/RoomsController.php b/controllers/RoomsController.php new file mode 100755 index 0000000000000000000000000000000000000000..edb32740d71fb9296348354ce1690fd802e2855f --- /dev/null +++ b/controllers/RoomsController.php @@ -0,0 +1,32 @@ +<?php +/** + * DiscussController.php + * + * + * @author: Sylvain Barbot + * Date: 24/06/2015 + */ +class RoomsController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.actionRoom.IndexAction', + 'saveroom' => 'citizenToolKit.controllers.actionRoom.SaveRoomAction', + 'editroom' => 'citizenToolKit.controllers.actionRoom.EditRoomAction', + 'external' => 'citizenToolKit.controllers.actionRoom.ExternalAction', + 'actions' => 'citizenToolKit.controllers.actionRoom.ActionsAction', + 'action' => 'citizenToolKit.controllers.actionRoom.ActionAction', + 'editaction' => 'citizenToolKit.controllers.actionRoom.EditActionAction', + 'saveaction' => 'citizenToolKit.controllers.actionRoom.SaveActionAction', + 'closeaction' => 'citizenToolKit.controllers.actionRoom.CloseActionAction', + 'assignme' => 'citizenToolKit.controllers.actionRoom.AssignMeAction', + "fastaddaction" => 'citizenToolKit.controllers.actionRoom.FastAddActionAction', + 'move' => 'citizenToolKit.controllers.actionRoom.MoveAction', + ); + } +} \ No newline at end of file diff --git a/controllers/SearchController.php b/controllers/SearchController.php new file mode 100755 index 0000000000000000000000000000000000000000..f0b9ce6f5863072062a032f56759332fd72facc0 --- /dev/null +++ b/controllers/SearchController.php @@ -0,0 +1,28 @@ +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 14/03/2014 + */ +class SearchController extends CommunecterController { + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'globalautocomplete' => 'citizenToolKit.controllers.search.GlobalAutoCompleteAction', + 'simplyautocomplete' => 'citizenToolKit.controllers.search.SimplyAutoCompleteAction', + 'searchmemberautocomplete' => 'citizenToolKit.controllers.search.SearchMembersAutoCompleteAction', + 'getshortdetailsentity' => 'citizenToolKit.controllers.search.GetShortDetailsEntityAction', + 'searchbycriteria' => 'citizenToolKit.controllers.search.SearchByCriteriaAction', + 'index' => 'citizenToolKit.controllers.search.IndexAction', + 'mainmap' => 'citizenToolKit.controllers.search.MainMapAction', + ); + } +} \ No newline at end of file diff --git a/controllers/SigController.php b/controllers/SigController.php new file mode 100755 index 0000000000000000000000000000000000000000..4c4a88465fb8956c5fc8596c1c36dd04e32896ff --- /dev/null +++ b/controllers/SigController.php @@ -0,0 +1,39 @@ +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 14/03/2014 + */ +class SigController extends CommunecterController { + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'network' => 'citizenToolKit.controllers.sig.NetworkAction', + 'companies' => 'citizenToolKit.controllers.sig.CompaniesAction', + 'state' => 'citizenToolKit.controllers.sig.StateAction', + 'events' => 'citizenToolKit.controllers.sig.EventsAction', + 'getmyposition' => 'citizenToolKit.controllers.sig.GetMyPositionAction', + 'getlatlngbyinsee' => 'citizenToolKit.controllers.sig.GetLatLngByInseeAction', + 'getinseebylatlng' => 'citizenToolKit.controllers.sig.GetInseeByLatLngAction', + 'getcodeinseebycityname' => 'citizenToolKit.controllers.sig.GetCodeInseeByCityNameAction', + 'getcountrybylatlng' => 'citizenToolKit.controllers.sig.GetCountryByLatLngAction', + 'showmynetwork' => 'citizenToolKit.controllers.sig.ShowMyNetworkAction', + 'ShowNetworkMapping' => 'citizenToolKit.controllers.sig.ShowNetworkMappingAction', + 'ShowLocalCompanies' => 'citizenToolKit.controllers.sig.ShowLocalCompaniesAction', + 'ShowLocalState' => 'citizenToolKit.controllers.sig.ShowLocalStateAction', + 'ShowLocalEvents' => 'citizenToolKit.controllers.sig.ShowLocalEventsAction', + 'initDatanetworkmapping' => 'citizenToolKit.controllers.sig.InitDataNetworkMappingAction', + 'updateentitygeoposition' => 'citizenToolKit.controllers.sig.UpdateEntityGeopositionAction', + + ); + } + +} diff --git a/controllers/SiteurlController.php b/controllers/SiteurlController.php new file mode 100755 index 0000000000000000000000000000000000000000..dc0d161e45e09f02dd70a14b00e3c0b97ec7b516 --- /dev/null +++ b/controllers/SiteurlController.php @@ -0,0 +1,23 @@ +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Alpha Tango + * Date: 29/11/2016 + */ +class SiteurlController extends CommunecterController { + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'incnbclick' => 'citizenToolKit.controllers.siteurl.IncNbClickAction', + ); + } + +} diff --git a/controllers/SlugController.php b/controllers/SlugController.php new file mode 100644 index 0000000000000000000000000000000000000000..deb998a82f6fbf280c2cacdd92c77093c4654515 --- /dev/null +++ b/controllers/SlugController.php @@ -0,0 +1,24 @@ +<?php +/** + * ActionController.php + * + * @author: Sylvain Barbot <sylvain.barbot@gmail.com> + * Date: 7/29/15 + * Time: 12:25 AM + */ +class SlugController extends CommunecterController { + + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'check' => 'citizenToolKit.controllers.slug.CheckAction', + 'getinfo' => 'citizenToolKit.controllers.slug.GetInfoAction' + ); + } +} \ No newline at end of file diff --git a/controllers/StatController.php b/controllers/StatController.php new file mode 100755 index 0000000000000000000000000000000000000000..6eec9c42adb31ef7a1df54ab7152f3d958842ecd --- /dev/null +++ b/controllers/StatController.php @@ -0,0 +1,20 @@ +<?php +/** + * StatController.php + * + * @author: Childéric THOREAU <childericthoreau@gmail.com> + * Date: 3/18/16 + * Time: 12:25 AM + */ +class StatController extends CommunecterController { + + public function actions() + { + return array( + 'createglobalstat' => 'citizenToolKit.controllers.stat.CreateGlobalStatAction', + 'getstatjson' => 'citizenToolKit.controllers.stat.GetStatJsonAction', + 'chartglobal' => 'citizenToolKit.controllers.stat.ChartGlobalAction', + 'chartlogs' => 'citizenToolKit.controllers.stat.ChartLogsAction', + ); + } +} \ No newline at end of file diff --git a/controllers/SurveyController.php b/controllers/SurveyController.php new file mode 100755 index 0000000000000000000000000000000000000000..5e253f5ba82e2315aa50f03ad7f67d824f24f45a --- /dev/null +++ b/controllers/SurveyController.php @@ -0,0 +1,54 @@ +<?php +/** + * DefaultController.php + * + * OneScreenApp for Communecting people + * + * @author: Tibor Katelbach <tibor@pixelhumain.com> + * Date: 14/03/2014 + */ +class SurveyController extends CommunecterController { + + protected function beforeAction($action) + { + parent::initPage(); + return parent::beforeAction($action); + } + + public function actions() + { + return array( + 'index' => 'citizenToolKit.controllers.survey.IndexAction', + 'indexPod' => 'citizenToolKit.controllers.survey.IndexAction', + 'entries' => 'citizenToolKit.controllers.survey.EntriesAction', + 'entry' => 'citizenToolKit.controllers.survey.EntryAction', + 'graph' => 'citizenToolKit.controllers.survey.GraphAction', + 'savesession' => 'citizenToolKit.controllers.survey.SaveSessionAction', + 'moderate' => 'citizenToolKit.controllers.survey.ModerateAction', + //'delete' => 'citizenToolKit.controllers.survey.DeleteAction', + 'close' => 'citizenToolKit.controllers.survey.CloseAction', + 'addaction' => 'citizenToolKit.controllers.action.AddActionAction', + 'editentry' => 'citizenToolKit.controllers.survey.EditEntryAction', + "fastaddentry" => 'citizenToolKit.controllers.survey.FastAddEntryAction', + + ); + } + + + + public function actionTextarea() + { + Yii::app()->theme = "empty"; + $this->render( "textarea" ); + } + public function actionEditList() + { + Yii::app()->theme = "empty"; + $this->render( "editList" ); + } + public function actionMultiAdd() + { + Yii::app()->theme = "empty"; + $this->render( "multiadd" ); + } +} \ No newline at end of file diff --git a/controllers/TestController.php b/controllers/TestController.php new file mode 100755 index 0000000000000000000000000000000000000000..80a0324b2d08c433055720ec4a192a8028c6f0cb --- /dev/null +++ b/controllers/TestController.php @@ -0,0 +1,1488 @@ +<?php +class TestController extends CommunecterController { + + protected function beforeAction($action) { + parent::initPage(); + return parent::beforeAction($action); + } + public function actionIndex() { + $userNotifcations = ActivityStream::getNotifications( array( "notify.id" => Yii::app()->session["userId"] ) );//PHDB::find( ActivityStream::COLLECTION,array("notify.id" => Yii::app()->session["userId"] )); + echo count($userNotifcations); + } + + public function actionMsg() { + + $langs = array("en","fr","de","es") ; + $files = array("activityList","category","chart","comment","common","cooperation","docs","document","event","form","home","import","jobs","KCFinderWidget","loader","login","mail","need","news","notification","openData","organization","person","project","rooms","survey","translate" ); + echo "<h1>Missing in folder 'de'</h1>"; + foreach ($files as $key => $value) { + echo "<h3 style='color:red'>file : ".$value.".php</h3>"; + try { + $fr = include ( "./protected/messages/fr/".$value.".php"); + //$es = include ( "./protected/messages/es/".$value.".php"); + $de = include ( "./protected/messages/de/".$value.".php"); + foreach ($fr as $k => $v) { + //echo $k.":".$v."<br/>"; + //if(!@$es[$k])echo "<span style='color:red'>'".$k."' is missing in ./protected/messages/es/".$value.".php</span> <br/>"; + if(!@$de[$k]) echo '<span>"'.htmlspecialchars($k).'" => "",</span> <br/>'; + } + } catch (Exception $e) { + echo $value."file unfound <br/>"; + } + + } + echo "<h1>Missing in folder 'es'</h1>"; + foreach ($files as $key => $value) { + echo "<h3>file : ".$value."</h3>"; + try { + $fr = include ( "./protected/messages/fr/".$value.".php"); + $es = include ( "./protected/messages/es/".$value.".php"); + //$de = include ( "./protected/messages/de/".$value.".php"); + foreach ($fr as $k => $v) { + //echo $k.":".$v."<br/>"; + //if(!@$es[$k])echo "<span style='color:red'>'".$k."' is missing in ./protected/messages/es/".$value.".php</span> <br/>"; + if(!@$es[$k])echo '<span>"'.$k.'" => "",</span> <br/>'; + } + } catch (Exception $e) { + echo $value."file unfound <br/>"; + } + + } + + + } + + public function actionMango() { + require_once '../../pixelhumain/ph/vendor/autoload.php'; + $api = new MangoPay\MangoPayApi(); + + // configuration + $api->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"]; + $api->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"]; + $api->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + + /*define('MangoPayDemo_ClientId', Yii::app()->params["mangoPay"]["ClientId"]); + define('MangoPayDemo_ClientPassword', Yii::app()->params["mangoPay"]["ClientPassword"]); + define('TemporaryFolder',Yii::app()->params["mangoPay"]["TemporaryFolder"]); + */ + + // call some API methods... + echo "inside Mango "; + /*try { + $john = $api->Users->Get("xx"); + if(!@$john){ + $User = new MangoPay\UserNatural(); + $User->Email = "test_natural@testmangopay.com"; + $User->FirstName = "xxx"; + $User->LastName = "yyyy"; + $User->Birthday = 121271; + $User->Nationality = "FR"; + $User->CountryOfResidence = "RE"; + $result = $api->Users->Create($User); + $_SESSION["MangoPayDemo"]["UserNatural"] = $result->Id; + + echo '<pre>' . var_export($result, true) . '</pre>'; + echo "<br/>".$_SESSION["MangoPayDemo"]["UserNatural"]."<br/><br/>"; + + $Wallet = new \MangoPay\Wallet(); + $Wallet->Owners = array($_SESSION["MangoPayDemo"]["UserNatural"]); + $Wallet->Description = "Demo wallet for User 1"; + $Wallet->Currency = "EUR"; + $result = $api->Wallets->Create($Wallet); + + echo '<pre>' . var_export($result, true) . '</pre>'; + echo "<br/><br/><br/>"; + } else { + echo '<pre>' . var_export($john, true) . '</pre>'; + $wal = $api->Users->GetWallets("35027132"); + //echo '<pre>' . var_export($wal, true) . '</pre>'; + foreach ($wal as $k => $v) { + echo $v->Id." : ".$v->Description."<br/>"; + + } + echo "<br/><br/><br/>"; + } + + + } catch(MangoPay\Libraries\ResponseException $e) { + // handle/log the response exception with code $e->GetCode(), message $e->GetMessage() and error(s) $e->GetErrorDetails() + echo "<br/><br/><br/>"; + //echo '<pre>' . var_export($e, true) . '</pre>'; + echo $e->GetCode()."<br/><br/>"; + echo $e->GetMessage()."<br/><br/>"; + echo $e->GetErrorDetails()."<br/><br/>"; + } catch(MangoPay\Libraries\Exception $e) { + // handle/log the exception $e->GetMessage() + echo "<br/><br/><br/>"; + echo $e->GetMessage()."<br/>"; + }*/ + + $params = array( "ClientId" => $api->Config->ClientId ); + //$this->renderPartial( "doc/mango" , $params ); + //$this->renderPartial( "api/index" , $params ); + $this->renderPartial( "paymentDirect/index" , $params ); + } + + public function actionPay() { + require_once '../../pixelhumain/ph/vendor/autoload.php'; + $api = new MangoPay\MangoPayApi(); + + // configuration + $api->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"]; + $api->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"]; + $api->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + + + + $params = array( "ClientId" => $api->Config->ClientId ); + //$this->renderPartial( "doc/mango" , $params ); + //$this->renderPartial( "api/index" , $params ); + $this->renderPartial( "paymentDirect/payment" , $params ); + } + + // VoteDown + public static function actionRefactorModerateVoteDown($collection){ + echo "actionRefactorModerateVoteDown => "; + $news=PHDB::find($collection, array('voteDown' => array('$exists' => 1),'refactorDownAction' => array('$exists' => 0))); + $i=0; + echo count($news)." $collection en base avec voteDown<br/>"; + foreach($news as $key => $data){ + $map = array(); + foreach ($data['voteDown'] as $j => $reason) { + if(!is_array($reason))$map['voteDown.'.$reason] = array('date' => new MongoDate(time())); + } + if(count($map)){ + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$set' => array('refactorDownAction' => new MongoDate(time())))); + + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$unset' => array('voteDown' => 1))); + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$set' => $map, '$unset' => array('voteDownReason' => 1))); + $i++; + } + elseif(isset($news['voteDownReason'])){ + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$unset' => array('voteDownReason' => 1))); + $i++; + } + } + + echo "nombre de $collection modifié => ".$i."<br/>"; + } + + // VoteUp + public static function actionRefactorModerateVoteUp($collection){ + echo "actionRefactorModerateVoteUp => "; + $news=PHDB::find($collection, array('voteUp' => array('$exists' => 1),'refactorUpAction' => array('$exists' => 0))); + $i=0; + echo count($news)." $collection en base avec voteUp<br/>"; + foreach($news as $key => $data){ + $map = array(); + foreach ($data['voteUp'] as $j => $reason) { + if(!is_array($reason))$map['voteUp.'.$reason] = array('date' => new MongoDate(time())); + } + if(count($map)){ + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$set' => array('refactorUpAction' => new MongoDate(time())))); + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$unset' => array('voteUp' => 1))); + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$set' => $map, '$unset' => array('voteUpReason' => 1))); + $i++; + } + elseif(isset($news['voteUpReason'])){ + $res = PHDB::update($collection, array('_id' => $data['_id']), array('$unset' => array('voteUpReason' => 1))); + $i++; + } + } + + echo "nombre de $collection modifié => ".$i."<br/>"; + } + + // ReportAbuse + public static function actionRefactorModerateReportAbuse(){ + echo "actionRefactorModerateReportAbuse => "; + $i = 0; + $news=PHDB::find(News::COLLECTION, array('reportAbuseReason' => array('$exists' => 1))); + foreach($news as $key => $data){ + $res = PHDB::update('news', array('_id' => $data['_id']), array('$unset' => array('reportAbuseReason' => 1))); + $res = PHDB::update('news', array('_id' => $data['_id']), array('$unset' => array('reportAbuseCount' => 1))); + $res = PHDB::update('news', array('_id' => $data['_id']), array('$unset' => array('reportAbuse' => 1))); + $i++; + } + + echo count($news)." News en base avec reportAbuseReason<br/>"; + } + + // ReportAbuse + public static function actionDeleteCommentReportAbuse(){ + echo "actionCommentRefactorModerateReportAbuse => "; + $i = 0; + $news=PHDB::find(Comment::COLLECTION, array('reportAbuse' => array('$exists' => 1))); + foreach($news as $key => $data){ + $res = PHDB::remove('comments', array('_id' => $data['_id'])); + $i++; + } + + echo count($news)." Comments en base avec reportAbuseReason<br/>"; + } + + public function actionRefactorNewsCommentsActions(){ + TestController::actionRefactorModerateVoteDown('news'); + TestController::actionRefactorModerateVoteUp('news'); + TestController::actionRefactorModerateVoteDown('comments'); + TestController::actionRefactorModerateVoteUp('comments'); + TestController::actionRefactorModerateReportAbuse(); + TestController::actionDeleteCommentReportAbuse(); + } + + // Efface le champs refactorAction + public static function actionDeleteAttributRefactorAction(){ + echo "actionDeleteAttributRefactorAction => "; + $i = 0; + $news=PHDB::find(News::COLLECTION, array('refactorUpAction' => array('$exists' => 1))); + foreach($news as $key => $data){ + $res = PHDB::update('news', array('_id' => $data['_id']), array('$unset' => array('refactorUpAction' => 1))); + $i++; + } + $news=PHDB::find(News::COLLECTION, array('refactorDownAction' => array('$exists' => 1))); + foreach($news as $key => $data){ + $res = PHDB::update('news', array('_id' => $data['_id']), array('$unset' => array('refactorDownAction' => 1))); + $i++; + } + echo $i." News update<br/>"; + $i = 0; + $comments=PHDB::find(Comment::COLLECTION, array('refactorUpAction' => array('$exists' => 1))); + foreach($comments as $key => $data){ + $res = PHDB::update('comments', array('_id' => $data['_id']), array('$unset' => array('refactorUpAction' => 1))); + $i++; + } + $comments=PHDB::find(Comment::COLLECTION, array('refactorDownAction' => array('$exists' => 1))); + foreach($comments as $key => $data){ + $res = PHDB::update('comments', array('_id' => $data['_id']), array('$unset' => array('refactorDownAction' => 1))); + $i++; + } + echo $i." comments update<br/>"; + + + } + + public function actionRemoveOrgaAdminOfProject() { + $projects=PHDB::find(Project::COLLECTION); + foreach($projects as $projectId => $data){ + $orgaWasAdmin=false; + $orgahasmemberadmin=false; + if(@$data["links"] && @$data["links"]["contributors"]){ + foreach($data["links"]["contributors"] as $key => $e){ + if(@$e["type"]==Organization::COLLECTION && @$e["isAdmin"]){ + echo 'Modification du liens entre le projet : '.$projectId." et l'organisation ".$key; + //echo json_encode($data["links"]["contributors"]); + PHDB::update(Project::COLLECTION, + array("_id" => new MongoId($projectId)) , + array('$unset' => array("links.contributors.".$key.".isAdmin" => "")) + ); + PHDB::update(Organization::COLLECTION, + array("_id" => new MongoId($key)) , + array('$unset' => array("links.projects.".$projectId.".isAdmin" => "")) + ); + $orgaWasAdmin=true; + } + } + if($orgaWasAdmin){ + foreach($data["links"]["contributors"] as $key => $e){ + if(@$e["type"]==Person::COLLECTION && @$e["isAdmin"] && @$e["isAdminPending"]){ + PHDB::update(Project::COLLECTION, + array("_id" => new MongoId($projectId)) , + array('$unset' => array("links.contributors.".$key.".isAdminPending" => "")) + ); + PHDB::update(Person::COLLECTION, + array("_id" => new MongoId($key)) , + array('$unset' => array("links.projects.".$projectId.".isAdminPending" => "")) + ); + //echo "ici<br/>"; + //echo json_encode($data["links"]["contributors"]); + $orgahasmemberadmin=true; + } + } + } + if($orgaWasAdmin && !$orgahasmemberadmin){ + $creator = $data["creator"]; + $creator=Person::getById($creator); + if($creator){ + echo "Creator est reelement une person on project : ".$projectId; + }else{ + echo "Creator is an orga on project : ".$projectId; + } + } + } + echo "<br/>"; + } + + } + public function actionAddExplain() { + $persons=PHDB::find(Person::COLLECTION); + foreach($persons as $key => $data){ + PHDB::update(Person::COLLECTION, + array("_id" => $data["_id"]) , + array('$set' => array("preferences.seeExplanations" => true)) + ); + } + } + + + +public function actionTest() { + + echo "<br/>*************************************<br/>"; + /*$allOrganizations = PHDB::findAndSort ( Organization::COLLECTION ,array("disabled" => array('$exists' => false)), + array("updated" => -1, "name" => 1), 100, + + array("name", "address", "shortDescription", "description","updated")); + foreach ($allOrganizations as $key => $value) + { + echo $value['name']." > ".$value['updated']."<br/>"; + } + echo "*************************************"; + $all = PHDB::findAndSort ( Event::COLLECTION ,array(), + array("updated" => -1, "startDate" => 1), 100, + array("name","updated",'startDate')); + foreach ($all as $key => $value) + { + echo $value['name']." > ".date("d/m/Y",$value['updated'])." > ".$value['startDate']."<br/>"; + }*/ + //echo hash('sha256', "mc420011@gmail.com"."communecter974"); + //echo $_SERVER["X-Auth-Token"]; + //Authorisation::isMeteorConnected( "TCvdPtAVCkkDvrBDtICLUfRIi93L3gOG+MwT4SvDK0U=", true ); + //var_dump(Link::addMember("551a5c00a1aa146d160041b0", PHType::TYPE_ORGANIZATIONS, + //"5374fc91f6b95c9c1b000871", PHType::TYPE_CITOYEN, Yii::app()->session["userId"], true)); + + /*var_dump(Link::connect("54fed0eca1aa1411180041ae", PHType::TYPE_CITOYEN, + "5374fc91f6b95c9c1b000871", PHType::TYPE_CITOYEN, Yii::app()->session["userId"])); + + var_dump(Link::isConnected("54fed0eca1aa1411180041ae", PHType::TYPE_CITOYEN, + "5374fc91f6b95c9c1b000871", PHType::TYPE_CITOYEN)); + + var_dump(Link::disconnect("54fed0eca1aa1411180041ae", PHType::TYPE_CITOYEN, + "5374fc91f6b95c9c1b000871", PHType::TYPE_CITOYEN, Yii::app()->session["userId"])); + + var_dump(Link::isConnected("54fed0eca1aa1411180041ae", PHType::TYPE_CITOYEN, + "5374fc91f6b95c9c1b000871", PHType::TYPE_CITOYEN)); + */ + /*$person=PHDB::find(Person::COLLECTION); + foreach($person as $key => $data){ + if(@$data["geoPosition"]){ + echo $data["name"]."//"; + print_r($data["geoPosition"]); + $geoPosition=array("type"=> "Point", "coordinates" => array("0" => $data["geoPosition"]["coordinates"][1], "1" => $data["geoPosition"]["coordinates"][0])); + print_r($geoPosition); + $res = PHDB::update(Person::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("geoPosition" => $geoPosition))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + }*/ + /*$index=PHDB::createIndex (Person::COLLECTION) ; + $res=$index::find(Person::COLLECTION,array('geoPosition.coordinates' => array ('$nearSphere' => array( + '$geometry' => array( + "type" => "Point", + "coordinates" => array(3.06388688609426, 50.6333596221436) + ), + '$maxDistance' => 5000 + ) +)));*///.createIndex( { 'geoPosition.coordinates' : "2dsphere" } ); +//print_r($res); +/* .getCollection('citoyens').createIndex( { 'geoPosition.coordinates' : "2dsphere" } ); +db.getCollection('citoyens').find({'geoPosition.coordinates': { + $nearSphere: { + $geometry: { + type: "Point", + coordinates: [3.06388688609426, 50.6333596221436] + }, + $maxDistance: 5000 + } + } + })*/ + //Rest::Json($res); + /*$news=PHDB::find(News::COLLECTION); + foreach ($news as $key => $data){ + if (@$data["created"]){ + if (is_int($data["created"])){ + echo $data["created"]; + $dateCreated= new MongoDate($data["created"]); + echo "::".date(DATE_ISO8601, $dateCreated->sec)."</br>"; + $res = PHDB::update(News::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("created" => $dateCreated))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + } + //echo $data["date"]; + //$dateCreated= new MongoDate($data["date"]); + //echo "::".date(DATE_ISO8601, $dateCreated->sec)."</br>"; + //$dateDate = new MongoDate( strtotime($data["date"], '%d/%m/%y') ); + if (@$data["date"]){ + if (is_int($data["date"])){ + echo $data["date"]; + $dateDate= new MongoDate($data["date"]); + echo "::".date(DATE_ISO8601, $dateDate->sec)."</br>"; + $res = PHDB::update(News::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("created" => $dateCreated))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + else if (is_string($data["date"])){ + echo $data["date"]; + echo "//".strtotime(str_replace('/', '-', $data["date"])); + $dateDate= new MongoDate(strtotime(str_replace('/', '-', $data["date"]))); + echo "::".date(DATE_ISO8601, $dateDate->sec)."</br>"; + + $res = PHDB::update(News::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("date" => $dateDate))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + + } + } + $activity=PHDB::find(ActivityStream::COLLECTION); + foreach ($activity as $key => $data){ + if (@$data["created"]){ + if (is_int($data["created"])){ + echo $data["created"]; + $dateCreated= new MongoDate($data["created"]); + echo "::".date(DATE_ISO8601, $dateCreated->sec)."</br>"; + $res = PHDB::update(ActivityStream::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("created" => $dateCreated))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + } + if (@$data["timestamp"]){ + if (is_int($data["timestamp"])){ + echo $data["timestamp"]; + $dateTimestamp= new MongoDate($data["timestamp"]); + echo "::".date(DATE_ISO8601, $dateTimestamp->sec)."</br>"; + $res = PHDB::update(ActivityStream::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("timestamp" => $dateTimestamp))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + } + if (@$data["date"]){ + if (is_int($data["date"])){ + echo $data["date"]; + $dateDate= new MongoDate($data["date"]); + echo "::".date(DATE_ISO8601, $dateDate->sec)."</br>"; + $res = PHDB::update(ActivityStream::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("created" => $dateDate))); + echo "</br>"; + print_r($res); + echo '</br>'; + + + } + else if (is_string($data["date"])){ + echo $data["date"]; + echo "//".strtotime($data["date"]); + $dateDate= new MongoDate(strtotime($data["date"])); + echo "::".date(DATE_ISO8601, $dateDate->sec)."</br>"; + + $res = PHDB::update(ActivityStream::COLLECTION, + array("_id"=>new MongoId($key)), + array('$set' => array("date" => $dateDate))); + echo "</br>"; + print_r($res); + echo '</br>'; + } + } + }*/ +} + + public function actionInsertNewPerson() { + $params = array( + 'name' => "Test", 'email' => "new14@email.com", 'postalCode' => "97426", "city"=> "97401" ,'pwd' => "vlanlepass" + ); + $res = Person::insert($params); + + var_dump($params); + + } + + public function actionListEvent() { + var_dump(Authorisation::listEventsIamAdminOf(Yii::app()->session["userId"])); + + } + + public function actionAddCron() { + $params = array( + "type" => Cron::TYPE_MAIL, + "tpl"=>'validation', + "subject" => 'TEST Confirmer votre compte pour le site ', + "from"=>Yii::app()->params['adminEmail'], + "to" => "oceatoon@gmail.com", + "tplParams" => array( "user"=>Yii::app()->session['userId'] , + "title" => "Test" , + "logo" => "/images/logo.png" ) + ); + + Mail::schedule($params); + + $params = array( + "type" => Cron::TYPE_MAIL, + "tpl"=>'newOrganization', + "subject" => 'TEST Nouvelle Organization de créer ', + "from"=>Yii::app()->params['adminEmail'], + "to" => "oceatoon@gmail.com", + "tplParams" => array( "user"=>Yii::app()->session['userId'] , + "title" => "Test" , + "creatorName" => "Tib Kat", + "url" => "/organization/" ) + ); + Mail::schedule($params); + } + + public function actionDoCron() { + Cron::processCron(); + } + + public function actionMail() { + //send validation mail + echo "from : ".Yii::app()->params['adminEmail']; + echo "<br/>"; + echo "to : ".Yii::app()->session['userEmail']; + echo "<br/>"; + echo "img : ".$this->module->assetsUrl."/images/logo.png"; + + //Send Classic Email + $res = Mail::send(array("tpl"=>'validation', + "subject" => 'TEST Confirmer votre compte pour le site ', + "from"=>Yii::app()->params['adminEmail'], + "to" => Yii::app()->session['userEmail'], + "tplParams" => array( "user"=>Yii::app()->session['userId'] , + "title" => "Test" , + "logo" => $this->module->assetsUrl."/images/logo.png" )) , true); + + echo "<br/>"; + echo "result: ".$res; + } + + public function actionNotif() + { + echo "Push a notication <br/>"; + //push an activity Stream Notification + /* ********************************** + Activity Stream and Notifications + */ + //$type,$perimetre,$verb,$label,$id + $asParam = array("type" => ActStr::TEST, + "codeInsee" => "97400",//option + // IP //option + "verb" => "add", + "actorType"=>"persons", + "objectType"=>"test", + "label" => "Testing Notification Push 2", //option + "id" => Yii::app()->session['userId'] + ); + $action = ActStr::buildEntry($asParam); + + //LOGGING WHO TO NOTIFY + $notif = array( "persons" => array( Yii::app()->session['userId'] ), + "label" => "Something Changed Again " , + "icon" => ActStr::ICON_QUESTION , + "url" => 'javascript:alert( "testing notifications" );' + ); + $action["notify"] = ActivityStream::addNotification( $notif ); + ActivityStream::addEntry($action); + } + + public function actionMandrill() { + //test Mandrill async mailing system + Yii::import('mandrill.Mandrill', true); + + try { + $mandrill = new Mandrill(Yii::app()->params['mandrill']); + + /*$mandrill = new Mandrill(Yii::app()->params['mandrill']); + $name = 'Example Template'; + $from_email = Yii::app()->params['adminEmail']; + $from_name = 'Association Granddir', + $subject = 'example subject Granddir',y + $code = '<div>example code</div>'; + $text = 'Example text content'; + $publish = false; + $labels = array('example-label'); + $result = $mandrill->templates->add($name, $from_email, $from_name, $subject, $code, $text, $publish, $labels); + print_r($result); +*/ + //https://mandrillapp.com/ + //https://mandrillapp.com/api/docs/templates.php.html + $message = array( + 'html' => '<p>Example HTML content</p>', + 'text' => 'Example text content', + 'subject' => 'example subject Granddir', + 'from_email' => Yii::app()->params['adminEmail'], + 'from_name' => 'Association Granddir', + 'to' => array( + array( + 'email' => "oceatoon@gmail.com", + 'name' => 'Destinataire XXX', + 'type' => 'to' + ) + ), + 'headers' => array('Reply-To' => 'message.reply@granddir.re'), + 'important' => false, + 'track_opens' => null, + 'track_clicks' => null, + 'auto_text' => null, + 'auto_html' => null, + 'inline_css' => null, + 'url_strip_qs' => null, + 'preserve_recipients' => null, + 'view_content_link' => null, + 'bcc_address' => 'pixelhumain@gmail.com', + 'tracking_domain' => null, + 'signing_domain' => null, + 'return_path_domain' => null, + 'merge' => true, + 'merge_language' => 'mailchimp', + 'global_merge_vars' => array( + array( + 'name' => 'merge1', + 'content' => 'merge1 content' + ) + ), + 'merge_vars' => array( + array( + 'rcpt' => 'recipient.email@granddir.re', + 'vars' => array( + array( + 'name' => 'merge2', + 'content' => 'merge2 content' + ) + ) + ) + ), + 'tags' => array('newOrganization'), + /*'subaccount' => 'oceatoon', + 'google_analytics_domains' => array('granddir.re'), + 'google_analytics_campaign' => 'contact@granddir.re', + 'metadata' => array('website' => 'www.granddir.re'), + 'recipient_metadata' => array( + array( + 'rcpt' => 'recipient.email@granddir.re', + 'values' => array('user_id' => 123456) + ) + ),*/ + /*'attachments' => array( + array( + 'type' => 'text/plain', + 'name' => 'myfile.txt', + 'content' => 'ZXhhbXBsZSBmaWxl' + ) + ), + 'images' => array( + array( + 'type' => 'image/png', + 'name' => 'IMAGECID', + 'content' => 'ZXhhbXBsZSBmaWxl' + ) + )*/ + ); + $async = false; + $ip_pool = 'Main Pool'; + $send_at = ""; + $result = $mandrill->messages->send($message, $async, $ip_pool, $send_at); + print_r($result); + /* + Array + ( + [0] => Array + ( + [email] => recipient.email@example.com + [status] => sent + [reject_reason] => hard-bounce + [_id] => abc123abc123abc123abc123abc123 + ) + + ) + */ + } catch(Mandrill_Error $e) { + // Mandrill errors are thrown as exceptions + echo 'A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage(); + // A mandrill error occurred: Mandrill_Unknown_Subaccount - No subaccount exists with the id 'customer-123' + throw $e; + } + } + + public function actionSearchOrganization() { + $criterias = array("name" => "O.R", "email" => "O.R"); + var_dump(Organization::findOrganizationByCriterias($criterias, 10)); + } + + public function actionListOrganizationEvent() { + $id = "54eed904a1aa1958b70041ef"; + var_dump(Organization::listEventsPublicAgenda($id)); + } + + public function actionInsertJob() { + $job = array("hiringOrganization" => "54eed4efa1aa1458b70041ac", "description" => "Job de Test"); + $res = Job::insertJob($job); + var_dump($res); + $listjob = Job::getJobsList("54eed4efa1aa1458b70041ac"); + var_dump($listjob); + } + + public function actionPlaquette() { + $listPlaquette = Document::listDocumentByCategory("55509e082336f27ade0041aa", Organization::COLLECTION, Document::CATEGORY_PLAQUETTE, array( 'created' => 1 )); + var_dump(reset($listPlaquette)); + $listCategory = Document::getAvailableCategories("55509e082336f27ade0041aa",Organization::COLLECTION); + var_dump($listCategory); + } + + public function actionHelper() { + $cssAnsScriptFiles = array( + //dropzone + '/plugins/dropzone/downloads/css/ph.css', + '/plugins/dropzone/downloads/dropzone.min.js', + //lightbox + '/plugins/lightbox2/css/lightbox.css', + '/plugins/lightbox2/js/lightbox.min.js' + ); + + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->request->baseUrl); + } + + public function actionAverageComment() { + var_dump(Comment::getCommunitySelectedComments("5596a29b88aee0c4d97da608", Survey::COLLECTION, null)); + } + + public function actionActivationURL() { + $userId = "55e5c4722336f2d8580041e5"; + + $validationKey =Person::getValidationKeyCheck($userId); + $url = Yii::app()->getRequest()->getBaseUrl(true)."/".$this->module->id."/person/activate/user/".$userId.'/validationKey/'.$validationKey; + var_dump($url); + } + + public function actionTestEmail() { + var_dump(Utils::getServerInformation()); + //$person = Person::getById("555a124b126e9a6f6600000d"); + $text = "yes mamamamamamamammamama"; + $params = array( + "title" => Yii::app()->session["user"]["username"] , + "logo" => "/images/logo.png", + "url" => "href='javascript:;' onclick='urlCtrl.loadByHash(\'#news.index.type.pixels?isNotSV=1\')'", + "content"=> $text); + + $this->renderPartial('application.views.emails.helpAndDebugNews', $params); + } + + public function actionImageMarker() { + //$profilImage = Yii::app()->params['uploadDir']."communecter/slide1.png"; + $profilImage = Yii::app()->params['uploadDir']."communecter/photoProfil.jpg"; + $srcEmptyMarker = Yii::app()->params['uploadDir']."communecter/marker-citizen.png"; + + $imageUtils = new ImagesUtils($profilImage); + // $imageUtils->resizeImage(40,40)->display(); + //$imageUtils->createCircleImage(40,40)->display(); + $imageUtils->createMarkerFromImage($srcEmptyMarker)->display(); + } + + public function actionGenerateThumbs() { + $docId = "561bb2ca2336f2e70c0041ab"; + //$docId = "5608ca102336f2b4040041af"; + $document = Document::getById($docId); + Document::generateProfilImages($document); + } + + public function actionGetImages() { + $itemId = "55c0c1a72336f213040041ee"; + $itemType = Person::COLLECTION; + $limit = array(Document::IMG_PROFIL => 1, Document::IMG_SLIDER => 5); + var_dump(Document::getImagesByKey($itemId, $itemType, $limit)); + } + + public function actionTestMarker() { + $itemId = "55c0c1a72336f213040041e"; + $itemType = Person::COLLECTION; + var_dump(Document::getGeneratedImageUrl($itemId, $itemType, Document::GENERATED_THUMB_PROFIL)); + var_dump(Document::getGeneratedImageUrl($itemId, $itemType, Document::GENERATED_MARKER)); + } + + public function actionTestMailAdmin() { + var_dump(Utils::getServerInformation()); + $person = Person::getById("55c0c1a72336f213040041ee"); + $organization = Organization::getById("55797ceb2336f25c0c0041a8"); + var_dump($organization); + $params = array( "organization" => $organization, + "newPendingAdmin" => $person , + "title" => Yii::app()->name , + "logo" => "/images/logo.png"); + + $this->renderPartial('application.views.emails.askToBecomeAdmin', $params); + } + + public function actionTestMailInvitation() { + var_dump(Utils::getServerInformation()); + $person = Person::getById("56cc5a0c94ef47ae237b23d6"); + var_dump($person); + $params = array( "invitorName" => "Invitation Man !", + "title" => Yii::app()->name , + "logo" => "/images/logo.png", + "invitedUserId" => $person["_id"], + "message" => "Bah alors ramène toi sur Communecter ma couille !"); + $this->renderPartial('application.views.emails.invitation', $params); + } + + public function actionTestBecomeAnAdmin() { + $person = Person::getById("55c0c1a72336f213040041ee"); + $organization = Organization::getById("55797ceb2336f25c0c0041a8"); + var_dump($organization); + $params = array( "organization" => $organization, + "newPendingAdmin" => $person , + "title" => Yii::app()->name , + "logo" => "/images/logo.png"); + + $this->renderPartial('application.views.emails.askToBecomeAdmin', $params); + } + + public function actionTestValidation() { + $person = Person::getById("5703b8bd2336f250520041c2"); + var_dump($person); + $params = array( "person" => $person , + "title" => Yii::app()->name , + "logo" => "/images/logoLTxt.jpg"); + + $this->renderPartial('application.views.emails.notifAdminNewUser', $params); + } + + public function actionTestAddPersonAdmin() { + $organizationId = "55797ceb2336f25c0c0041a8"; + $personId = "5577d525a1aa1458540041b0"; + var_dump(Organization::addPersonAsAdmin($organizationId, $personId, $personId)); + } + + public function actionTestUpdateOrganization() { + $organizationId = "55794e302336f240060041a8"; + $userId = "55c0c1a72336f213040041ee"; + $organization = array("name" => "Ekopratik"); + + var_dump(Organization::update($organizationId, $organization, $userId)); + } + + public function actionTestUpdatePerson() { + $personId = "56cedff02336f2a17a0041df"; + $userId = "56cedff02336f2a17a0041df"; + $person = array("address" => + array( + "streetAddress" => "45X Chemin des Cactus", + "postalCode" => "97426", + "codeInsee" => "97423", + "addressCountry" => "RE") + ); + + var_dump(Person::update($personId, $person, $userId)); + } + + public function actionTestIsAdminOrganization($id) { + var_dump(Authorisation::isOrganizationAdmin("55c0c1a72336f213040041ee", $id)); + } + + public function actionDisplayMail($id) { + $cron = PHDB::findOne("cron", array( "_id" => new MongoId($id))); + var_dump( $cron); + $params = $cron["tplParams"]; + $this->renderPartial('application.views.emails.'.$cron["tpl"], $params); + } + + + + public function actionUploadDocument() { + $dir = "communecter" ; + $folder = Person::COLLECTION ; + $ownerId = "56eff58e94ef47451c7b23d6" ; + $input = "avatar" ; + $rename = false ; + $pathFile = "http://www.lescolporteurs.info/medias/images/" ; + $nameFile = "nuit-debout-dijon.jpg" ; + + $res = Document::uploadDocument($dir,$folder,$ownerId,$input,$rename, $pathFile, $nameFile); + var_dump($res); + } + + + public function actionSaveImage() { + $dir = "communecter" ; + $folder = Person::COLLECTION ; + $ownerId = "56eff58e94ef47451c7b23d6" ; + $input = "avatar" ; + $rename = false ; + $pathFile = "http://www.placetob.org/wp-content/uploads/2016/04/NuitDebout-sebM.jpg" ; + $nameFile = "NuitDebout-sebM.jpg" ; + + $res = Document::uploadDocument($dir,$folder,$ownerId,$input,$rename, $pathFile, $nameFile); + var_dump($res); + } + public function actionAddPersonMediumImage(){ + $people=PHDB::find(Person::COLLECTION); + foreach ($people as $key => $value){ + if(@$value["profilImageUrl"]){ + $tabImage=explode("/", $value["profilImageUrl"]); + $countTabImage=count($tabImage); + $nameImage=$tabImage[$countTabImage-1]; + $i=0; + $urlImage=""; + foreach($tabImage as $data){ + if($i != 0 && $i<($countTabImage-1)) + $urlImage.= $data."/"; + $i++; + } + $upload_dir_medium = $urlImage.Document::GENERATED_MEDIUM_FOLDER ; + echo $upload_dir_medium; + if(!file_exists ($upload_dir_medium )) { + mkdir($upload_dir_medium, 0777); + } + $imageMediumUtils = new ImagesUtils(substr($value["profilImageUrl"],1)); + $destPathMedium = $upload_dir_medium."/".$nameImage; + $profilMediumUrl = "/".$upload_dir_medium."/".$nameImage; + $imageMediumUtils->resizePropertionalyImage(400,400)->save($destPathMedium,100); + echo '/////////////'.$key.'////////////<br/>'; + echo 'destPath : '.$destPathMedium.'<br/>'; + echo 'profilPath : '.$profilMediumUrl.'<br/>'; + PHDB::update(Person::COLLECTION, array("_id" => new MongoId($key)), array('$set' => array("profilMediumImageUrl" => $profilMediumUrl))); + //if(!file_exists ( $upload_dir_medium )) { + // mkdir($upload_dir_medium, 0777); + //} + + } + } + } + public function actionAddOrgaMediumImage(){ + $organization=PHDB::find(Organization::COLLECTION); + foreach ($organization as $key => $value){ + if(@$value["profilImageUrl"]){ + $tabImage=explode("/", $value["profilImageUrl"]); + $countTabImage=count($tabImage); + $nameImage=$tabImage[$countTabImage-1]; + $i=0; + $urlImage=""; + foreach($tabImage as $data){ + if($i != 0 && $i<($countTabImage-1)) + $urlImage.= $data."/"; + $i++; + } + $upload_dir_medium = $urlImage.Document::GENERATED_MEDIUM_FOLDER ; + if(!file_exists ( $upload_dir_medium )) { + mkdir($upload_dir_medium, 0777); + } + $imageMediumUtils = new ImagesUtils(substr($value["profilImageUrl"],1)); + $destPathMedium = $upload_dir_medium."/".$nameImage; + $profilMediumUrl = "/".$upload_dir_medium."/".$nameImage; + $imageMediumUtils->resizePropertionalyImage(400,400)->save($destPathMedium,100); + echo '/////////////'.$key.'////////////<br/>'; + echo 'destPath : '.$destPathMedium.'<br/>'; + echo 'profilPath : '.$profilMediumUrl.'<br/>'; + PHDB::update(Organization::COLLECTION, array("_id" => new MongoId($key)), array('$set' => array("profilMediumImageUrl" => $profilMediumUrl))); + //if(!file_exists ( $upload_dir_medium )) { + // mkdir($upload_dir_medium, 0777); + //} + + } + } + } + public function actionAddProjectMediumImage(){ + $project=PHDB::find(Project::COLLECTION); + foreach ($project as $key => $value){ + if(@$value["profilImageUrl"]){ + $tabImage=explode("/", $value["profilImageUrl"]); + $countTabImage=count($tabImage); + $nameImage=$tabImage[$countTabImage-1]; + $i=0; + $urlImage=""; + foreach($tabImage as $data){ + if($i != 0 && $i<($countTabImage-1)) + $urlImage.= $data."/"; + $i++; + } + $upload_dir_medium = $urlImage.Document::GENERATED_MEDIUM_FOLDER ; + if(!file_exists ( $upload_dir_medium )) { + mkdir($upload_dir_medium, 0777); + } + $imageMediumUtils = new ImagesUtils(substr($value["profilImageUrl"],1)); + $destPathMedium = $upload_dir_medium."/".$nameImage; + $profilMediumUrl = "/".$upload_dir_medium."/".$nameImage; + $imageMediumUtils->resizePropertionalyImage(400,400)->save($destPathMedium,100); + echo '/////////////'.$key.'////////////<br/>'; + echo 'destPath : '.$destPathMedium.'<br/>'; + echo 'profilPath : '.$profilMediumUrl.'<br/>'; + PHDB::update(Project::COLLECTION, array("_id" => new MongoId($key)), array('$set' => array("profilMediumImageUrl" => $profilMediumUrl))); + //if(!file_exists ( $upload_dir_medium )) { + // mkdir($upload_dir_medium, 0777); + //} + + } + } + } + public function actionAddEventMediumImage(){ + $event=PHDB::find(Event::COLLECTION); + foreach ($event as $key => $value){ + if(@$value["profilImageUrl"]){ + $tabImage=explode("/", $value["profilImageUrl"]); + $countTabImage=count($tabImage); + $nameImage=$tabImage[$countTabImage-1]; + $i=0; + $urlImage=""; + foreach($tabImage as $data){ + if($i != 0 && $i<($countTabImage-1)) + $urlImage.= $data."/"; + $i++; + } + $upload_dir_medium = $urlImage.Document::GENERATED_MEDIUM_FOLDER ; + if(!file_exists ( $upload_dir_medium )) { + mkdir($upload_dir_medium, 0777); + } + $imageMediumUtils = new ImagesUtils(substr($value["profilImageUrl"],1)); + $destPathMedium = $upload_dir_medium."/".$nameImage; + $profilMediumUrl = "/".$upload_dir_medium."/".$nameImage; + $imageMediumUtils->resizePropertionalyImage(400,400)->save($destPathMedium,100); + echo '/////////////'.$key.'////////////<br/>'; + echo 'destPath : '.$destPathMedium.'<br/>'; + echo 'profilPath : '.$profilMediumUrl.'<br/>'; + PHDB::update(Event::COLLECTION, array("_id" => new MongoId($key)), array('$set' => array("profilMediumImageUrl" => $profilMediumUrl))); + //if(!file_exists ( $upload_dir_medium )) { + // mkdir($upload_dir_medium, 0777); + //} + + } + } + } + // Log + public function actionLogDeletePasswordCitoyen(){ + echo "actionLogDeletePasswordCitoyen => "; + $i = 0; + $res1 = PHDB::find('logs', + array('params.pwd' => array('$exists' => 1))); + foreach ($res1 as $key => $value) { + $res = PHDB::updateWithOptions('logs', + array('params.pwd' => array('$exists' => 1)), + array('$unset' => array('params.pwd' => 1)), + array('multi'=>true)); + $i++; + } + + echo $i." Logs modifiés<br/>"; + } + + public function actionMailKKBB(){ + Mail::inviteKKBB(Person::getById("55c0c1a72336f213040041ee"), false); + + } + + //Stat sur les logs + public function actionCreateLastLogStatistics(){ + echo "actionCreateLastLogStatistics => "; + $i = 0; + $lastUpdate = new MongoDate('1458733145'); + + //We get all the stats documents to get periode + $allStats = PHDB::findAndSort('stats',array(), array("created" =>1), 10000, array("created", '_id')); + foreach ($allStats as $key => $stat) { + $i++; + $where = array('created' => array('$gt' => $lastUpdate, '$lt' => $stat['created'])); + $allLogs = Log::getWhere($where); + + echo $i." ".@$stat['_id']." ".date('d-m-Y H:i', $lastUpdate->sec)." -> ".date('d-m-Y H:i', $stat['created']->sec)." -> Logs concerné : ".count($allLogs)."<BR/>"; + $datas = array(); + if(count($allLogs)){ + foreach ($allLogs as $key => $value) { + $action = @$value['action']; + + //If result => Consolidate by result + if(!empty($action)){ + if(isset($value['result'])){ + $res_res = @$value['result']['result']; + if(!isset($datas[$action][$res_res])){ + $datas[$action][0] = 0; + $datas[$action][1] = 0; + } + $datas[$action][$res_res] += 1 ; + } + else{ + if(!isset($datas[$action])) $datas[$action] = 0; + $datas[$action] += 1; + } + } + } + $lastUpdate = $value['created']; + ksort($datas); + PHDB::update('stats', + array("_id" => $stat['_id']) , + array('$set' => array("logs" => $datas)) + ); + } + } + + echo $i." stats crééés<br/>"; + } + + public function actionupdateAlternatiba(){ + + $content = "AREC, Association pour le Respect de l'Environnement et du Cadre de vie;Agriculture;Alimentation; +arTerre;Agriculture;Alimentation; +AVAB, Association pour la Valorisation d'une Agriculture Biologique;Agriculture;Alimentation; +Biodynamie Réunion;Agriculture;Alimentation; +C tout bio;Agriculture;Alimentation; +Cacao péi;Agriculture;Alimentation; +Domaine du café grillé;Agriculture;Biodiversité; +Ecole du Jardin Planétaire ;Agriculture;Alimentation;Biodiversité +GAB, Groupement des Agricultures Biologiques;Agriculture;Alimentation;Biodiversité +GCEIP, Militan pou la tèr;Agriculture;Alimentation; +GERME;Agriculture;Alimentation; +Latitude fruitière;Agriculture;Alimentation; +Le Labyrinthe En Champ Thé;Agriculture;Alimentation; +Le lien végétal;Agriculture;Alimentation; +Le verger de la chapelle;Agriculture;Alimentation; +AD2R, Association Développement Rural Réunion;Agriculture ;; +Agro&co;Agriculture ;; +Passages formation;Agriculture ;Alimentation ; +SAFER, Société d'Aménagement Foncier et d'Etablissement Rural ;Agriculture ;; +La Part des Anges ;Alimentation;; +La Ruche qui dit Oui;Alimentation;; +la z'olie crèpe;Alimentation;; +Tisane héritage tradition;Alimentation ;; +Acquatiris;Aménagement, Transport, Construction;; +ATR-FNAUT, Alternatives Transport Réunion;Aménagement, Transport, Construction;; +Bambou, Régis Brinsinger;Aménagement, Transport, Construction;; +Bambouseraie du Guillaume;Aménagement, Transport, Construction;; +CAUE 974, Conseil d'Architecture, d'Urbanisme et de l'Environnement ;Aménagement, Transport, Construction;; +CRPV, Comité Réunionnais pour la Promotion du Vélo ;Aménagement, Transport, Construction;; +Globice, Groupe Local d'Observation et d'Identification des Cetacés;Biodiversité;; +Réserve Naturel Marine;Biodiversité;; +APE, Association d'aménagement et de protection de l'environnement;Biodiversité ;; +APLAMEDOM Réunion, Association pour les PLantes Aromatiques et MEdicinales de la Réunion;Biodiversité ;; +APN, Amis des Plantes et de la Nature;Biodiversité ;; +APPER, Association Promotion Patrimoine Écologie Réunion;Biodiversité ;; +ARDA, Association Réunionnaise de Développement de l'Aquaculture (Hydrô Réunion);Biodiversité ;; +Kelonia;Biodiversité ;; +Le conservatoire du littoral;Biodiversité ;; +Le Parc National ;Biodiversité ;; +Nature Océan Indien;Biodiversité ;; +SEOR, Société d'Etude Ornitologiques de la Réunion;Biodiversité ;; +SREPEN, Société Réunionnaise pour l'Etue et la Protection de l'ENvironnement;Biodiversité ;; +Surfrider Foundation;Biodiversité ;Citoyenneté ; +Vie océane;Biodiversité ;; +EMMAUS;Citoyenneté;; +GRANDDIR, Groupement Régional des Acteurs de l’éducation à l’eNvironnement pour un Développement Durable de l’Ile de La Réunion;Citoyenneté;; +Libre974;Citoyenneté;; +Réseau WARN-ZIG;Citoyenneté;; +Unit métis;Citoyenneté ;; +Yourte en scène;Citoyenneté ;; +Ecomanifestation;Déchets;; +Titang recup;Déchets;; +AIR, Association des Inclassables Réunionnais ;Déchets ;Aménagement, Transport, Construction; +ART Récup';Déchets ;; +Carto d'O ;Déchets ;; +Collectif zéro déchet;Déchets ;; +Les palettes de Marguerite;Déchets ;; +Les rencontres alternatives ;Déchets ;; +OCRE, Organisation des Consommateurs Respectueux de l'Environnement;Déchets ;; +Poc Poc;Economie Sociale et Solidaire ;; +Réunion équitable;Economie Sociale et Solidaire ;; +Réunisel ;Economie Sociale et Solidaire ;; +Béb' écolo;Education;; +Ekolo tipa tipa;Education;; +ADEME, Agence De l'Environnement et de la Maîtrise de l'Energie;Energie;; +AKUO Fondation;Energie;; +Robin des mers;Energie;; +ANPCEN, Association Nationale pour la Protection du Ciel et de l'Environnement Nocturne ;Energie ;; +ARMSE, Association Réunionnaise Médicale Santé Environnement;Santé;; +La vie en santé;Santé;; +"; + $i = 0; + $array_rows = str_getcsv($content, "\n"); + foreach ($array_rows as $row) { + + $contentRow = str_getcsv($row, ";"); + $name = ""; + + //Name + if(isset($contentRow[0])){ + $name = $contentRow[0]; + unset($contentRow[0]); + + //tag + $result = Organization::getWhere(array('name' => new MongoRegex("/".$name."/i"), 'source.key' => 'AlternatibaPei')); + if(is_array($result) && $result){ + foreach ($result as $id => $value) { + + //Format + foreach ($value["tags"] as $keyTag => $valueTag) { + $value["tags"][$keyTag] = TextHelper::createHashTag($valueTag); + } + + //merge + $value["tags"]= Tags::filterAndSaveNewTags(array_unique(array_merge($value["tags"], $contentRow))); + + //case vide + foreach ($value["tags"] as $k => $v) { + if (empty($v)) unset($value["tags"][$k]); + } + } + + //update + $i++; + // echo "<br>$i ".$name." "; + // print_r($value["tags"]); + Organization::updateOrganizationField($id, 'tags', $value["tags"], "5534fd9da1aa14201b0041cb"); + // die(); + } + } + else{ + // echo "<br> attention => ".$name; + } + + } + + die('OK'); + + } + + public function actionAddBadgeOpenData(){ + $types = array(Event::COLLECTION, Organization::COLLECTION, Project::COLLECTION); + $res = array(); + foreach ($types as $key => $type) { + $entities = PHDB::find($type,array("preferences.isOpenData" => true), 0, array("_id")); + $eeeee = array(); + foreach ($entities as $key => $entity) { + $eeeee[] = Badge::addAndUpdateBadges("opendata", (String)$entity["_id"], $type); + } + $res[$type] = $eeeee; + + } + + //var_dump(count($res)); + + foreach ($res as $key => $val) { + echo "</br> </br>".$key; + foreach ($val as $key2 => $val2) { + echo "</br> </br>"; + echo "-------------------</br>"; + var_dump($val2); + } + } + } + + + public function actionAddOpenEdition(){ + $types = array(Event::COLLECTION, Organization::COLLECTION, Project::COLLECTION); + $res = array(); + foreach ($types as $key => $type) { + $entities = PHDB::find($type,array("preferences.isOpenEdition" => array('$exists' => 0)), array("_id", "links", "preferences")); + $eeeee = array(); + foreach ($entities as $key => $entity) { + if(!empty($entity["links"])){ + $isAdmin = false; + if($type == Project::COLLECTION){ + if (!empty($entity["links"]["contributors"])) { + foreach ($entity["links"]["contributors"] as $key => $contributors) { + if(!empty($contributors["isAdmin"]) && $contributors["isAdmin"] == true){ + $isAdmin = true; + break; + } + } + } + } + if($type == Event::COLLECTION){ + if (!empty($entity["links"]["attendees"])) { + foreach ($entity["links"]["attendees"] as $key => $attendees) { + if( !empty($attendees["isAdmin"]) && $attendees["isAdmin"] == true){ + $isAdmin = true; + break; + } + } + } + + } + + if($type == Organization::COLLECTION){ + if (!empty($entity["links"]["members"])) { + foreach ($entity["links"]["members"] as $key => $members) { + if( !empty($members["isAdmin"]) && $members["isAdmin"] == true){ + $isAdmin = true; + break; + } + } + } + } + + if($isAdmin == false){ + $entity["preferences"]["isOpenEdition"] = true ; + }else{ + $entity["preferences"]["isOpenEdition"] = false ; + } + }else{ + $entity["preferences"]["isOpenEdition"] = true ; + } + + PHDB::update($type, + array("_id" => $entity['_id']) , + array('$set' => array("preferences" => $entity["preferences"])) + ); + $eeeee[] = $entity; + } + $res[$type] = $eeeee; + + } + foreach ($res as $key => $val) { + echo "</br> </br>".$key; + foreach ($val as $key2 => $val2) { + echo "</br> </br>"; + echo "-------------------</br>"; + var_dump($val2); + } + } + } + + + + public function actionRecherche(){ + $Citoyen = PHDB::findAndSortAndLimitAndIndex(Person::COLLECTION , array(), array("name" => 1), 10, 0); + $allCitoyen = PHDB::findAndSortAndLimitAndIndex(Person::COLLECTION , array(),array("name" => 1), 5, 0); + $allCitoyen2 = PHDB::findAndSortAndLimitAndIndex(Person::COLLECTION , array(), array("name" => 1), 5, 5); + + + foreach ($Citoyen as $key => $value) { + var_dump(@$value["name"]); + echo "<br/>"; + } + echo "<br/><br/>-------------------------------<br/><br/>"; + foreach ($allCitoyen as $key => $value) { + var_dump(@$value["name"]); + echo "<br/>"; + } + echo "<br/><br/>-------------------------------<br/><br/>"; + foreach ($allCitoyen2 as $key => $value) { + var_dump(@$value["name"]); + echo "<br/>"; + } + } + + + public function actionCheckGeoShape(){ + Import::checkGeoShape(); + } + + public function actionCheckGeo(){ + Import::checkGeo(); + } + + public function actionCheckGeoPostalCodes(){ + Import::checkGeoPostalCode(); + } + + public function actionDepRegion(){ + $where = array("country" => "BEL"); + $cities = PHDB::find(City::COLLECTION, $where); + + $dep = array() ; + $region = array() ; + + $depS = "" ; + $regionS = "" ; + + foreach ($cities as $key => $value) { + if(!in_array($value["region"], $region)){ + $region[] = $value["region"]; + $regionS .= '"'.$value["regionName"].'" => array("'.$value["regionName"].'","'.$value["region"].'"), <br/>'; + } + + if(!in_array($value["dep"], $dep)){ + $dep[] = $value["dep"]; + $depS .= '"'.$value["depName"].'" => array("'.$value["depName"].'","'.$value["dep"].'"), <br/>'; + } + } + + echo $depS ; + echo "<br><br>"; + echo $regionS; + } + + + public function actionCheckNameBelgique(){ + $cities = PHDB::find(City::COLLECTION, array("country" => "BE")); + $nbcities = 0 ; + $str = "" ; + foreach ($cities as $key => $city) { + $name = $city["name"]; + $find = false ; + if(count($city["postalCodes"]) > 1){ + foreach ($city["postalCodes"] as $keyCP => $cp) { + //echo $cp["name"]." : " .$name."<br>" ; + if(trim($cp["name"]) == trim($name)){ + $find =true; + } + } + + if($find == false){ + $nbcities++; + $str .= $key." : ".$name."<br>" ; + } + } + + + + } + echo "NB Cities : " .$nbcities."<br>" ; + echo $str; + } + + /*"latitude": "46.493621", +"longitude": +"62301"*/ + + public function actionTestCityByLatLngGeoShape(){ + $lat = "48.873479"; + $lon = "2.3302237"; + $cp = "75599"; + $city = SIG::getCityByLatLngGeoShape($lat, $lon,$cp); + $city2 = SIG::getCityByLatLngGeoShape($lat, $lon,null); + var_dump($city); + echo "<br><br>--------------------------<br><br>"; + var_dump($city2); + } + + public function actionWikidata(){ + $cities = PHDB::find(City::COLLECTION, array("wikidataID" => array('$exists' => false) , 'country' => array('$ne' => "BE"))); + $nbcities = count($cities) ; + $str = "id;name;insee;country" ; + foreach ($cities as $key => $city) { + $name = $city["name"]; + $str .= $key." ; ".$name." ; ".$city["insee"]." ; ".$city["country"]."<br>" ; + } + echo "NB Cities : " .$nbcities."<br>" ; + echo $str; + } + + + public function actionPdf(){ + + $order = Order::getById("5a1537116ff9926e12b34733"); + + $person = Person::getById($order["customerId"]); + + $tpl = $this->renderPartial('application.views.pdf.factureTerla', + array( "img1" => "http://127.0.0.1".Yii::app()->theme->baseUrl."/assets/img/LOGOS/terla/logo-min.png", + "order" => $order, + "person" => $person), true); + Pdf::createPdf($tpl); + + echo $tpl; + } +} diff --git a/controllers/TestPerformanceController.php b/controllers/TestPerformanceController.php new file mode 100755 index 0000000000000000000000000000000000000000..2c2a5aeedc46be43e4781a046d20e6db29d71945 --- /dev/null +++ b/controllers/TestPerformanceController.php @@ -0,0 +1,36 @@ +<?php +class TestPerformanceController extends CommunecterController { + + protected function beforeAction($action) { + return parent::beforeAction($action); + } + + public function actionListEntities($type) { + + $managedType = array("Person", "Organization", "Project", "Event"); + + if (! in_array($type, $managedType)) { + echo "The type ".$type." is unknown or not managed by the test yet ! <br>"; + die(); + } + $timeStart = microtime(true); + $nbEntities = 0; + $res = PHDB::findAndSort($type::COLLECTION, array(), array("_id" => 1), 1000); + foreach ($res as $id => $value) { + $functionName = "getSimple".$type."ById"; + $element = $type::$functionName($id); + if (!empty($element["profilImageUrl"])) { + echo $id." ".$element["profilImageUrl"]."<br>"; + } + $nbEntities++; + } + + $timeSpend = microtime(true) - $timeStart; + echo "<br><b>************ End of execution ! ************</b><br>"; + echo "Total time spent : ".$timeSpend."<br>"; + echo "To retrieve : ".$nbEntities." entities <br>"; + echo "Avg time by entity : ".$timeSpend/$nbEntities." <br>"; + + } + +} \ No newline at end of file diff --git a/convertion_semantique.png b/convertion_semantique.png new file mode 100644 index 0000000000000000000000000000000000000000..9b8e793058b831be7bd8402e171e3eea6b991529 Binary files /dev/null and b/convertion_semantique.png differ diff --git a/data/cities.json.zip b/data/cities.json.zip new file mode 100644 index 0000000000000000000000000000000000000000..cad52539af9ad2c7576443a7c20b5688978324f9 Binary files /dev/null and b/data/cities.json.zip differ diff --git a/data/createIndexMongoDocker.sh b/data/createIndexMongoDocker.sh new file mode 100755 index 0000000000000000000000000000000000000000..b10055c6a28060e0b91abc6da1d3d8008bfb12a9 --- /dev/null +++ b/data/createIndexMongoDocker.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +#delete index mongo +mongo mongo/pixelhumain <<EOF +db.citoyens.dropIndexes(); +db.cities.dropIndexes(); +db.events.dropIndexes(); +db.organizations.dropIndexes(); +db.projects.dropIndexes(); +EOF + +#create index mongo +mongo mongo/pixelhumain <<EOF +db.citoyens.createIndex({"email": 1} , { unique: true }); +db.cities.createIndex({"geoPosition": "2dsphere"}); +db.cities.createIndex({"postalCodes.geoPosition": "2dsphere"}); +db.cities.createIndex({"geoShape" : "2dsphere" }); +db.cities.createIndex({"insee" : 1}); +db.cities.createIndex({"region" : 1}); +db.cities.createIndex({"dep" : 1}); +db.cities.createIndex({"cp" : 1}); +db.cities.createIndex({"country" : 1}); +db.cities.createIndex({"postalCodes.name" : 1}); +db.cities.createIndex({"postalCodes.postalCode" : 1}); +db.events.createIndex({"geoPosition" : "2dsphere" }); +db.events.createIndex({"parentId" : 1}); +db.events.createIndex({"name" : 1}); +db.organizations.createIndex({"geoPosition" : "2dsphere" }); +db.projects.createIndex({"geoPosition" : "2dsphere" }); +db.citoyens.createIndex({"geoPosition" : "2dsphere" }); +EOF diff --git a/data/import/event.json b/data/import/event.json new file mode 100755 index 0000000000000000000000000000000000000000..ebcebd8def1fb21de37ebeceb2f4b4e5daa311e7 --- /dev/null +++ b/data/import/event.json @@ -0,0 +1,39 @@ +{ + "name" : "STRING", + "type" : "STRING", + "address" : { + "postalCode" : "STRING", + "addressLocality" : "STRING", + "codeInsee" : "STRING", + "streetAddress" : "STRING", + "addressCountry" : "STRING" + }, + "geo" : { + "latitude" : "FLOAT", + "longitude" : "FLOAT" + }, + "description" : "STRING", + "url" : "STRING", + "tags" : [ + "STRING" + ], + "telephone" : { + "fixe" : [ + "STRING" + ], + "mobile" : [ + "STRING" + ], + "fax" : [ + "STRING" + ] + }, + "url" : "STRING", + "allDay" : "STRING", + "startDate" : "STRING", + "endDate" : "STRING", + "organizerType" : "STRING", + "organizerId" : "STRING", + "parentId" : "STRING", + "duree" : "STRING" +} \ No newline at end of file diff --git a/data/import/mappings.json b/data/import/mappings.json new file mode 100755 index 0000000000000000000000000000000000000000..3b03b3785678de27290942ec455064afdf187140 --- /dev/null +++ b/data/import/mappings.json @@ -0,0 +1,109 @@ +[ + { + "key" : "organizationStandart", + "name" : "Organization Standart", + "typeElement" : "organization", + "fields" : { + "Nom de l'organisme" : "name", + "Type : (Association, Groupe Informel, Entreprise ou Groupe Gouvernemental)" : "type", + "Rue" : "address.streetAddress", + "Code Postal" : "address.postalCode", + "Ville" : "address.addressLocality", + "Code_Country" : "address.addressCountry", + "Email" : "email", + "Site web" : "url", + "Description courte" : "shortDescription", + "Description Longue" : "description", + "Latitude" : "geo.latitude", + "Longitude" : "geo.longitude", + "Fixe1" : "telephone.fixe.0", + "Fixe2" : "telephone.fixe.1", + "Mobile1" : "telephone.mobile.0", + "Mobile2" : "telephone.mobile.1", + "Fax1" : "telephone.fax.1", + "Fax2" : "telephone.fax.1", + "Tag1" : "tags.0", + "Tag2" : "tags.1", + "Tag3" : "tags.2", + "Contact1 : name" : "contacts.0.name", + "Contact1 : email" : "contacts.0.email", + "Contact1 : telephone" : "contacts.0.telephone", + "Contact1 : role" : "contacts.0.role", + "Contact2 : name" : "contacts.1.name", + "Contact2 : email" : "contacts.1.email", + "Contact2 : telephone" : "contacts.1.telephone", + "Contact2 : role" : "contacts.1.role" + } + }, + { + "key" : "personStandart", + "name" : "Person Standart", + "typeElement" : "person", + "fields" : { + "Nom" : "name", + "Email" : "email" + } + }, + { + "key" : "eventStandart", + "name" : "Event Standart", + "typeElement" : "event", + "fields" : { + "Nom" : "name", + "Type" : "type", + "Journée" : "allDay", + "Date de Date" : "startDate", + "Date de Fin" : "endDate", + "Code Postal" : "address.postalCode", + "Ville" : "address.addressLocality", + "Username" : "username", + "Rue" : "address.streetAddress", + "Code_Country" : "address.addressCountry", + "Email" : "email", + "Site web" : "url", + "short Description" : "shortDescription", + "Description" : "description", + "Latitude" : "geo.latitude", + "Longitude" : "geo.longitude", + "Fixe1" : "telephone.fixe.0", + "Fixe2" : "telephone.fixe.1", + "Mobile1" : "telephone.mobile.0", + "Mobile2" : "telephone.mobile.1", + "Fax1" : "telephone.fax.1", + "Fax2" : "telephone.fax.1", + "Tag1" : "tags.0", + "Tag2" : "tags.1", + "Tag3" : "tags.2" + } + }, + { + "key" : "projetStandart", + "name" : "Projet Standart", + "typeElement" : "project", + "fields" : { + "Nom" : "name", + "Date de Date" : "startDate", + "Date de Fin" : "endDate", + "Code_Postal" : "address.postalCode", + "Ville" : "address.addressLocality", + "Username" : "username", + "Rue" : "address.streetAddress", + "Code_Country" : "address.addressCountry", + "Email" : "email", + "Site_Web" : "url", + "short Description" : "shortDescription", + "Description" : "description", + "Latitude" : "geo.latitude", + "Longitude" : "geo.longitude", + "Fixe1" : "telephone.fixe.0", + "Fixe2" : "telephone.fixe.1", + "Mobile1" : "telephone.mobile.0", + "Mobile2" : "telephone.mobile.1", + "Fax1" : "telephone.fax.1", + "Fax2" : "telephone.fax.1", + "Tag1" : "tags.0", + "Tag2" : "tags.1", + "Tag3" : "tags.2" + } + } +] \ No newline at end of file diff --git a/data/import/organization.json b/data/import/organization.json new file mode 100755 index 0000000000000000000000000000000000000000..63cf8215990062a578620c07a5eece332bde936b --- /dev/null +++ b/data/import/organization.json @@ -0,0 +1,55 @@ +{ + + "name" : "STRING", + "email" : "STRING", + "type" : "STRING", + "address" : { + "postalCode" : "STRING", + "addressLocality" : "STRING", + "codeInsee" : "STRING", + "streetAddress" : "STRING", + "addressCountry" : "STRING" + }, + "geo" : { + "latitude" : "FLOAT", + "longitude" : "FLOAT", + "precision" : "INT" + }, + "description" : "STRING", + "shortDescription" : "STRING", + "url" : "STRING", + "image" : "STRING", + "urlFacebook" : "STRING", + "urlTwitter" : "STRING", + "source" : { + "id" : "STRING", + "url" : "STRING", + "key" : "STRING", + "update" : "DATETIME" + }, + "tags" : [ + "STRING" + ], + "telephone" : { + "fixe" : [ + "STRING" + ], + "mobile" : [ + "STRING" + ], + "fax" : [ + "STRING" + ] + }, + "contacts" : [ + { + "name" : "STRING", + "role" : "STRING", + "telephone" : [ + "STRING" + ], + "email" : "STRING" + } + ] + +} \ No newline at end of file diff --git a/data/import/person.json b/data/import/person.json new file mode 100755 index 0000000000000000000000000000000000000000..9d6a17b6ccd9b1334c81d958282d8cc3321655d7 --- /dev/null +++ b/data/import/person.json @@ -0,0 +1,4 @@ +{ + "name" : "STRING", + "email" : "STRING" +} \ No newline at end of file diff --git a/data/import/project.json b/data/import/project.json new file mode 100755 index 0000000000000000000000000000000000000000..af2160035a40a4140b9a4725856fbb25351c7a1f --- /dev/null +++ b/data/import/project.json @@ -0,0 +1,28 @@ +{ + "name" : "STRING", + "created" : "STRING", + "startDate" : "DATETIME", + "endDate" : "DATETIME", + "description" : "STRING", + "address" : { + "postalCode" : "STRING", + "addressLocality" : "STRING", + "codeInsee" : "STRING", + "streetAddress" : "STRING", + "addressCountry" : "STRING" + }, + "geo" : { + "latitude" : "FLOAT", + "longitude" : "FLOAT" + }, + "tags" : [ + "STRING" + ], + "url" : "STRING", + "source" : { + "id" : "STRING", + "url" : "STRING", + "key" : "STRING" + } + +} \ No newline at end of file diff --git a/data/lists.json b/data/lists.json new file mode 100755 index 0000000000000000000000000000000000000000..7d0330ff1ddc7af3d66a37712f6e36eccb071e94 --- /dev/null +++ b/data/lists.json @@ -0,0 +1 @@ +[{"_id":{"$oid":"54e2f3764fb89e3da2759ea5"},"name":"countries","list":{"Martinique":"Martinique","Mayotte":"Mayotte","Nouvelle-Calédonie":"Nouvelle-Calédonie","Réunion":"Réunion","France":"France","Guadeloupe":"Guadeloupe","Guyanne":"Guyanne"}},{"_id":{"$oid":"551e7be32e179dbae99fd717"},"name":"public","list":["Enseignants","Educateurs à l'environnement","Elus / Agents de collectivités","Cycle 1","Cycle 2","Cycle 3","Collectivités","Collège","Lycée","Enseignement sup.","Entreprises","Etudiants","Familles","Adultes encadrés","Public spécialisé","Autres"]},{"_id":{"$oid":"551e7bef2e179dbae99fd718"},"name":"typeIntervention","list":["Accompagnement de démarche DD","Accueil à la journée","Animation pour adultes et visite guidée","Chantier de jeunes","Evénementiel","Formation","Intervention en milieu scolaire","Séjour classe de découverte","Autres"]},{"_id":{"$oid":"551e7c032e179dbae99fd719"},"list":["Agriculture","Air","Alimentation","Astronomie","Biodiversité","Bruit","Consommation","Déchets","Développement durable","Eau / fleuve / rivière / milieux humides","Energie","Faune","Flore","Forêt","Géologie","Jardin","Météo-climat","Mobilité","Patrimoine","Paysage","Risques","Santé","Solidarité","Urbanisme","Autres","javascript","css","","Education populaire","Education populaire\nAlimentation","Economie","Economie\nAlimentation\nDéchets\njavascript","Eau / fleuve / rivière / milieux humides\nGéologie","Partage","Environnement","Transports","Ecologie","Collaboration","Biologique","Education populaire\r\nAlimentation","web sémantique","biens communs","techno","imprimante 3D","maker","Innovation","patrimoire","écologie","développement durable","politique","démocratie","opegouv","gouvernance","développement local","qualité de vie","système d'information territorial","économie collaborative","ESS","culture de la paix","économie contributive","média","édition","livre","imprimerie","avenirdespixels","réalité augmenté","internet","éco-village","révolution du souire","révolution du sourire","économie","culture de paix","tourisme","maison d'hôte","coworking","coaching","initiatives citoyennes","écosystème","intelligence collective","culture","ChezNousCoop","convivialité augmentée","habitat participatif","habitat partagé","vivre ensemble","cooperative","Développement Durable","humain","société","environnement","tadk","ville","connecter","territoire","SIT","democratie","participative","do it yourself","fablab","machines","idée","partage","conception","collaboration","numerique","solaire","tirage au sort","La Réunion","citoyen","éducation à l'environnment"," culture","Incubateur","Ubiquitaire \u0026 IoT","Caisse","distribution","Commerce","Formation","Animation","Insertion","innovation","sociale","Cétacés","Baleines","Observation","Chorale","Chanson","Orchidées","Crèche","Périscolaire","Sport","Rugby","Moringue","sport","Danse","Halte-garderie","alcoolisme","prévention","animation","Volley Ball","arbre fruitier","endemique","médias","presse","territoires","médiation","Empowerment","proximité","veille","autonomie","mutualisation","6 décembre 2015","régionales2015","demorun","citoyens tirés au sort","tout domoun lé kapab","communecter","vot pou nou tout","contes","poésie","Raspberry Pi","Informatique","Développeur","cours de musique","instrument","chant","danse","patrimoine","communs","coopération","CodeSocial","Comptabilité ouverte","synergie","OpenSource","Logiciel Libre","révolution numérique","Matiere premiere","Recyclage","Cosmetique","Engrais","Énergies renouvelables","Études en économie d'énergie","Recherche","Laboratoire","Agglomération de communes","Economie circulaire","relais","Echange","Rencontre","Culture","Langue","commerce","commun","collectivité","bien-être","opengouv","photo","cirque","hip hop","slam","RH","emploi","management","économie symbiotique","économie P2P","conseil","études","entraide","football","berbere","gambie","congo brazzaville","equipements de proximité","Transition","Musique","Bio","Maraichage","participatif","piscine","tennis","jardin","graines","semences","permaculture","production","Forges les bains","formation","agroécologie","jeu de cartes","première session","art","artisanat","journalisme","art de rue","tremplin","festival","Peer to peer","PAIR à PAIR","services publics","espace numérique","comestible","vivrier","potager","manger","boire","fruits","légumes","céréales","oléagineux","LUG","réparation","Tiers lieu","cartographie","Crowdfunding","Création sites Web","Web rédactionnel","Community Management","LeJeu","Education","Occitan","Cinema","Economie sociale et solidaire","enseignement","santé","social","solidarite","Voisinage","Mairie","Officiel","La Possession","Théâtre","Comédie","Glanage","Glaneur","Soupe","Entraide","Communection","montagne","neige","alpes","sommet","vallée","nature","raid","treks","ART CULTURE","Associations","féminisme","anti-sexisme","lutte","vélo","scolaire","soutien","education","enfant","aide aux devoirs","stratégie","entrepreneuriat","accompagnement","recherche de financement","développement commercial","Femmes","International","Nature","loisir","insertion","arts","solidarité","cultures","ecologie"," sanitaire et social","Emploi \u0026 Insertion","sports","loisirs","hors frontières","salle","spectacle","exposition","échanges","international","Cinéma","algérien","événement","clown","disc jokey","DJ","accompagnement projet","racisme","discrimination","jeunesse","conseil local","jeunes","homophobie","handicap","préjugé","migration","citoyenneté","développement","canoe","kayak","garage","web","Arts","Spectacle vivant","Vidéo","Don","Zone de gratuité","upcycly","impression 3D","retro ingenerie","palette","societe alternative","monaie local","depollution","Sports","Loisirs","cabinet","gestion","affaires","consultant","foncier","architecture","vrd","contrat","juriste","competence","pedicure","podologue","primaire","la primaire","Education populaireAlimentation","electrique","conversion","bio","biodynamie","electroculture","climat","lifi","monaie","local","depolluante","alternative","consommation","junior association","monnaie","COMMUNE","abeilles","commune","Wikipédia","contribution","bien communs","Enfants","Ados","Océan Indien","Naturel","Humain","Social","Vivre ensemble","Groupe Informel","Vie de quartier","Lien intergénérationnel","Levier de mobilisation collective","Permaculture","Sport Pour Tous","Europe","Mobilité Jeunesse","Art","Mobilisation","les groupes électrogènes BiOil"," Le groupe électrogène FULL HYBRID","Le groupe électrogène hybrid OFF GRID","Vélo","Pollution","DIY","Cacao","Tortues marines","conservation","musée","econologie","decroissance","apolitique","monnaie locale","Action","Nuit debout Lille","Communication","Nuit Debout","Fonctionnement","Logistique","Modèle Eco et Travail","Mode de vie","élections","municipales","savoir faire","services","Roswell974","Web Services","Esparon Gianni","Accompagnement de projet","Ethique","Idéalisme","Pragmatisme","Gestion","Cosmétiques home made","Banque éthique","Finances responsables","Football","Aikido","twirling baton","Patriotique","Zumba","athlétisme","Pétanque","Artisanat","Terroir","Fitness, zumba","CMPP","Autre","Boxe","Comité des fêtes","C.E","T.I.C","Trail Rando","Divers","Environneme nt","Jeu d'échecs","Arts martiaux","Handball","Judo","Pôle adulte handicapé","Twirling baton","Karaté","Handisport","e Musique","Parents d'éléves","Radio locale","Collége","NuitDebout","Alternative","Alternatiba","Convergence des luttes","Politique","citoyens","Culturelle","Sociale","PersonnesAgées","projet","Constitution","République","Numérique","réappropriation","barque","convivialité","navigation","startup","numérique","table tactile","Epicerie","marquet","alimentaire","Embelissement","Récupération","Initiative citoyenne","Décoration","IncroyablesComestibles","GroupementDAchat","Financement","Cigale","Service","Loisir","BibliothèqueDeRue","CinémaAssociatif","AMAP","JardinPartagé","LaRucheQuiDitOui","Grainothèque","équipement","Troc","Covoiturage","VéloPartage","AtelierDeRéparationDeVélo","SEL","Information","Greeters","Logement","LocationDeLogement","Concertà Domicile","Travail","Givebox","Coworking","Réparation","Fablab","TiersLieux","FinancementParticipatif","RepairCafé","Autopartage","ZoneDeGratuité","MutualisationDeMatériels","LivraisonDePaniers","Freecycle","Création","MuséoMix","CompostageCollectif","BusCycliste","CaféAssociatif","HabitatPartagé","WikiTerritorial","FormationEntrePairs","HabitatParticipatif","MagasinDeProducteurs","Recyclerie","CUMA","CoLunch","MonnaieLocale","Pédibus","Ludothèque","BudgetParticipatif","CarteOuverte","Outillothèque","UpCycling","MaisonMix","TiersLieu","GroupementDeProducteur","TricotGraffiti","FabLab","AutoStopOrganisé","AutoPartage","FournisseurDAccèsà Internet","RéseauSocialDeProximité","ToursimeCollaboratif","AMAPCulturelle","CoLocation","Instrumenthèque","RERS","Crowdsourcing","Web","Communauté","GroupeDeTravail","Fabmob","Commun","Cjs","InstitutProspective","Lomme","ApiV0Tag70","Accompagnement","ApiV0Tag64","Autostop","AutoStop","TransportParticipatif","Dynamique","Nord","Lille","Standard","W3c","Plateforme","DonnéesPubliques","Opendata","Erp","LogicielLibre","Méthode","PatatesChouxFleurs","Connaissance","Aviation","Co2","MobilitéDurable","Ecoconduite","ObjetConnecté","UbiquitaireIot","Climat","VoitureConnectée","TélématiqueEmbarquée","Compensation","Coaching","Greetech","Greentech","Carbone","Fai","Logiciel","Compétences","Développeurs","Infrastructure","Python","Monjob","Boulogne","Isochrones","AnalyseDeDesserte","CalculDItinéraire","Garage","Budget","Mobilitéélectrique","VLS","Vélopartage","Borne","SYSTRA","VTC","Taxis","ServicesDeMobilité","Rechargeélectrique","Bus","Alarme","Utilitaire","Fête","Famille","SallesDeRéunion","ArtisanatDArt","MetiersDArts","Diy","Atelier","Nocturne","B2b","Trajet","Api","Database","Coopérative","Zouzoucar","Scolaire","Extrascolaire","école","Transport","Ecomobilité","Gouvernance","éléctronique","Matériel","Automobile","Automotive","EspaceRessourcesProjets","Habitants","MagasinCoopératif","CaféRestaurantBioéquitable","Taxi","Crytographie","Tripplanner","Optimisation","InformationVoyageur","CalculDItinéraires","Droit","Juridique","Contrat","TempsRéel","Localisation","GPs","LibrairieConnectée","Librairie","ErpOpensource","PartiesPrenantes","Impressionà LaDemande","EBook","Coyright","PrixUniqueVariableDuLivre","Livre","Opensource","GouvernanceContributive","Collaboratif","WebSémantique","Streaming","Copyleft","Edition","LogistiqueCrossCanal","DividendeContributif","Connecté","DigitalisationDuPointDeVente","Copyrigh","Copyfair","Transportdoux","Entreaideentrevoisins","Calculateur","Multimodal","Parkingsharing","PeerToPeerparking","Futuremobility","Mobility","Vehicule","Voiture","électrique","Traffic","Congestion","DecalageHoraire","Incitation","Recompense","Application","Boîtier","Véhicules","Datas","Cloud","Appli","Shareanampool","Connectedampool","Openconnectedcar","Test","Simulation","Vehiculeautonome","Smartcity","Connectivité","Design","Mobilitéconnectée","Transportintelligent","Réseauoptimisé","Rail4brussels","Comca","Busopensource","Opensourcebus","Bettertransporterforemergingmarkets","Supraways","Podcar","Prt","PartageDeSavoirsEtCompétences","Comprendre","Savoir","Agir","PortageSalarial","Télétravail","Ridesharing","MarchandiseTechnologie","Marchandise","Technologie","BureauxIndividuels","OpenSpace","Cantine","BonnesPratiques","Urbain","Expression","Carpooling","Opens","Coopération","Datacleanup","Hackerspace","Educ","Medialab","EducFablab","Biohacklab","Makerspace","CorporateLab","PrototypingAccelerator","FablabArt","FablabHackerspace","FablabHackerspaceArtEduc","FablabEduc","HackerspaceArt","MakerspaceArt","MedialabArt","FablabArtEduc","Pizzeria","Kebab","Restauration rapide","logement","hebergement","urgence","solidaire","mineur","isole","etranger","immigration","asile","droits de l'homme","Bien vivre","participation","Saint Leu","Actions","El Kohmri","créole","vidéo","Embellissement","Architecture","humanitaire","OpenStreetMap","collaboratif","partagé","cinéma","conférences","microcrêche","BAFA","Accompagnement à la Scolarité","Lille Sud","http://www.levaldocco.fr/lille/","Education Spécialisée","Aide aux devoirs","Bénévolat","café citoyen","Restauration","Local","commerce équitable","responsable","éthique","ingénieurs","debout","Cosmétique","Beauté","Gluten","épicerie","Magasin","ComplémentsAlimentaires","Bienêtre","Diététique","SansGluten","SansEmballage","Vrac","Détail","MagasinBio","AgricultureBio","Boulangerie","Fruit","Légume","Légumineuses","Laitages","Biocoop","Commerceéquitable","Monde","Restaurant","Viande","Boucherie","Ferme","Charcuterie","Amap","Panier","Légumes","Fruits","Frais","CaféCitoyen","événements","Café","Thé","PetiteRestauration","Maroquinerie","Association","Agriculteur","CircuitCourt","Oeufs","Biodynamie","Vin","Bière","Å“ufs","Commande","Internet","Laitage","ProduitsDEntretien","Cosmétiques","Traiteur","Ateliers","AtelierCuisine","Culinaire","Réception","Pain","Artisanal","Déjeuner","Cocktail","Cuisine","Habit","Vêtement","Mode","Textile","Couture","Manuel","Livres","Occasion","Friperie","Vêtements","Habits","oranges","citrons","ESR","Enseignement supérieur","Sciences","refuser la misère","ne nous emballons pas","agir tous pour la dignité","zo kwe zo","wresinski","nuitdebout","Aide humanitaire","Danse traditionnelle africaine","PRESIDENTE","portrait","huiles essentielles","généalogie","photographie","dessin","peinture","developpement personnel","littérature","Autogestion","Humanitaire","Gestion de l'information","consommation responsable","La bas si j'y suis","sport santé lille sud","freelance","biodiversité","alternatiba","alimentation","construction","amenagement","transport","Fitness"," zumba","Tourisme","Producteur Bio","Vanille","Curcuma","Palmiste Rouge","Vétements","gauche","écologistes","Animaux","Conception logicielle","Assistance","ERP","Open source","support","Maintenance","Places","ressourcerie","incinérateur","windsurf","planche a voile","rap","co-création","horizontal","justice","confiance","Transport maritime","Mer","Océan","Activités nautiques","Qualité de l'Eau","jardin partagé","incredible edible","incroyables commestibles","Compost collectif","Partage de semences","Sensibilisation","Pedagogie","concert","créateurs","céramique","comme une envie","médiation numérique","FIbre Optique","Telecom","obsolescence","café","humour","philosophie","proverbe","surf","agriculture","paysanne","biologique","amap","cléry","village","harmonieux","pédagogie","independance","organisation ouverte","organisation démocratique","Réflextion","Laboratoire d'idées","expérimentation","Projet politique","Métropoles","Roms","Amnesty","Répertoire","Migrants","Tortures","prisonnier opinion","Code social","Chambre des communs","#monnaie locale","#éducation bienveillante","#alimentation","langues étrangères","activités ludiques","immersion linguistique","événementiel","à domicile","Découverte","Droits Humains","Peine de Mort","Loi","Avocats","Ecole","Alphabétisation","OpenSourceHardware","OSH","refugiés","Réflexion","Oasis","Lieu d'accueil","Concierge","Tiers Lieux","Open Source","QHSE","Qualité","Sécurité","Hygiène","danse comtemporaine","maloya","jce","jci","jcesdr","escalade","club","urbaine","multimédia","diversité","Accessibilité","journal","quartier","webmedia","Service Publique","Travailleur Social","jeux","Parents","Jeux","transition","bricolage","TIC","cluster","habitat ecologique","bien être","Education à l'Environnement","Education à l'environnement","Réseau","atelier","Epinal","meteo","volcan","http://www.pekkip.re","artsplastiques","#artsplastiques","#sociologie","#cuisine","#anthropologiesociale","#littérature","#ecriture","#tango","#flamenco","sociologie","anthropologiesociale","cuisine","écriture","flamenco","tango","Graffiti","Médiathèque","Sophrologie","Initiation","Amicale scolaire","Tennis","Club sportif","Contemporaine","Moderne","Jazz","Street","Shiatsu","Do-in","Bien-être","Peintures","Modélisme","Arts plastiques","revenu","inconditionnel","universel","Tao","Ecovillage","Performance","Spectacle Viva","t","Spectacle Vivant","Exposition","locavore","cohabitation","formation web","reseaux","handicaps","Communs","geek","hackathon","Radio","rock","musique","agriculture biologique","agriculture paysanne","paysans","fermier","paysannerie","foncier agricole","transmission","intsallation","jeune producteur","tirage photo","Coordination","Territoire","Océan Indien Innovation Santé","OIIS APPUI","Plateforme territoriale d'appui","coordination","maladie rénale chronique","médico-social","médecin traitant","appui","Bourgogne-Franche-Comté","vulgarisation","Bilan Carbone","Projets","cadre de vie","Sensibilisation à l'environnement","Produits biologiques","Alimentation durable","Alimentation soutenable","Circuits-courts","Mixité sociale","Ouverture d'esprit","Alimentation de qualité","Alimentation de qualité pour tous","Accessibilité alimentaire","Développement Soutenable","batterie","borne de recharge","education alternative","Réparation de vélos","Vélos","Circuits vélos","Sociabilité","Liens","Rencontres","Débrouille","Vélo-éducation","voiture","ateliers créatif","création de lien","citoyenne","Regrouper","Identifier","réseau","alternatif","populaire","Éco-ferme","Écologie","Tir","Sportif","Débats","Communecter","Zéro déchet","maison","engagement","initiative","rencontre","collège","association","élève","maison de quartier","Atelier Cuisine","Eveil Sensoriel","valorisation des territoires","valorisation des habitants","valorisation des produits","Confiance en soi","Autonomie","Sensibilisation alimentaire","coopérative jeunesse et service","cjs","b nb *","Parentalité","initiatives","cohesion sociale","habitat","cluture","VotonsBlanc2017","deliberation","expérience","transphobie","sexisme","égalité","ligne d'urgence","biphobie","psychologie","associatif","orizon","informaticien","community management","webmaster","#NuitDebout","Solidaire","formations","information","zero déchet","ESPACE PUBLIC","CITOYEN","Bar","Bureau","espaceArtistique","artistes","lieuxDeCréation","artisans","artsVivants","artLab","incubateur","EconomieCirculaire","ZéroDéchet","Compostage","VTT","randonnée","Nuitdebout","Hellemmes","Hauts de France","Mobilités","artisanat d'art","Filage de verre","Bijoux","location","outils","dépot","Publicité","nuit debout","#thé","Réparali","Gratiferia","ObsolescenceProgrammée","Primeur","Cosmetiques","Droguerie","ZeroWaste","méditation","pleine conscience","Catalyst","Entre 60 et 200m2","Salles de réunion","Espace détente","Cuisine à disposition","Achat groupé","Cuisine participative","Epicerie participative","Salle de bain","Accès wifi","Cibercafé","entrepreneuriat social","developpement local","economie collaborative","cafe participatif","Habitat participatif","Entrepreneuriat social","Economie collaborative","Developpement local","Initiatives citoyennes","Cafe participatf","Saillans","Participatif"],"name":"tags"},{"_id":{"$oid":"551e7c132e179dbae99fd71a"},"name":"organisationTypes","list":{"NGO":"Association","LocalBusiness":"Entreprise","Group":"Groupe","GovernmentOrganization":"Organisation Gouvernementale"}},{"_id":{"$oid":"55d473b8293315e4087e67a0"},"name":"listRoomTypes","list":{"survey":"Survey","vote":"Vote","actions":"Actions","discuss":"Discussion","proposals":"Brainstorm / Proposals / Ideas"}},{"_id":{"$oid":"55e41eb6293315e4087e6922"},"name":"eventTypes","list":{"concert":"Concert","concours":"Concours","exposition":"Exposition","festival":"Festival","getTogether":"Rencontre","market":"Marché","meeting":"Réunion","competition":"Compétition","others":"Autres","nacelle":"Nacelle"}},{"_id":{"$oid":"563aefbf7b49887b95511f39"},"name":"NGOCategories","list":{"agiculture-alimentation":"Agriculture \u0026 Alimentation","entraide-solidarite":"Entraide \u0026 Solidarité","politique":"Politique","autres":"Autres","emploi-insertion":"Emploi \u0026 Insertion","education-formation":"Éducation \u0026 Formation","religion":"Religion","sante-sanitaire":"Santé, sanitaire et social","sport-loisir":"Sports \u0026 Loisirs","usages-numeriques":"Usages numeriques","international":"International","sciences-decouverte":"Sciences \u0026 Découverte","architecture-urbanisme":"Architecture et Urbanisme","art-culture":"Arts \u0026 Culture","droits-liberte":"Droits \u0026 Liberté","ecologie-nature":"Écologie \u0026 Nature","humanitaire":"Humanitaire"}},{"_id":{"$oid":"563aefcd7b49887b95511f3a"},"name":"localBusinessCategories","list":{"chimie":"Chimie / Parachimie","environnement":"Environnement / Espaces Verts","rh":"Services RH et administratifs","sante-sanitaire":"Santé, sanitaire et social","agiculture-alimentation":"Agriculture \u0026 Alimentation","edition-multimedia":"Edition / Communication / Multimédia","etudes-conseils":"Etudes / conseils","informatique-telecom":"Informatique / Télécom","mise-a-dispo-personnel":"Mise à disposition de personnel","restauration":"Restauration","textile-artisanat":"Textile, Artisanat","banque-assurance":"Banque / Assurance","bois-papier":"Bois / Papier / Imprimerie","btp":"BTP / Matériaux de construction","collecter-traitement":"Collecte, Traitement, Recyclage","commerce-distribution":"Commerce / Distribution","evenementiel-tourisme":"Evénementiel / Tourisme","service-entreprises":"Service aux entreprises","automobile":"Automobile","logistique-transport":"Logistique, Transport","tourisme":"Tourisme","electronique":"Electronique / Electricité"}}] diff --git a/data/notifications.org b/data/notifications.org new file mode 100644 index 0000000000000000000000000000000000000000..b7c2670d5278ca09c2dc980bd6f42df2c645c6ac --- /dev/null +++ b/data/notifications.org @@ -0,0 +1,1393 @@ +/////////////////////////////////////////////////////// +////////////// LIST OF JSON NOTIFICATIONS ///////////// +//--------ALL USE CASE BASED ON PIKACHUI USER--------// +/////////////////////////////////////////////////////// + +*** FIRST STEP ***** +Insert pikachui_user_json in the collection "citoyens" without the entry "_id". +Then add the same id in pikachui json to get all the following notification +$["_id"]=ObjectId("59775556e2f07e141a22965c"); + +///////////// pikachui_user_json ///////////////// +psw : pikachui +{ + "_id" : ObjectId("59775556e2f07e141a22965c"), + "two_steps_register" : true, + "name" : "pikachui", + "email" : "pikachui@gmail.com", + "username" : "pikachui", + "@context" : { + "@vocab" : "http://schema.org", + "ph" : "http://pixelhumain.com/ph/ontology/" + }, + "roles" : { + "standalonePageAccess" : true + }, + "created" : ISODate("2017-07-25T14:27:34.000Z"), + "preferences" : { + "isOpenData" : true, + "publicFields" : [ + "locality", + "directory" + ], + "privateFields" : [ + "birthDate", + "updated" : NumberLong(1509464214), + "email", + "phone" + ] + }, + "seePreferences" : true, + "pwd" : "512a94e1b2ca2f0f7c45375efe5fbd63bd77df16d166795d5a8aaf0fc123489a", + "lastLoginDate" : NumberLong(1509649578), + "modified" : ISODate("2017-10-31T15:36:54.000Z"), + "gamification" : { + "created" : ISODate("2017-10-30T18:47:37.000Z"), + "total" : 8.5, + "actions" : { + "total" : NumberLong(0) + }, + "links" : { + "total" : 8.5 + } + }, + "slug" : "pikachui" +} + +///////////// END pikachui_user_json ////////////////////// + +/////////////////LIST OF NOTIFS /////////////////////////// + +{ + "type" : "test", + "verb" : "mention", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-02T13:30:43.000Z"), + "updated" : ISODate("2017-11-02T13:30:43.000Z"), + "target" : { + "type" : "news", + "id" : "59fb1e03e2f07e2e1737b34a" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + }, + "56f3cc4040bb4eac54f0070f" : { + "isUnseen" : true, + "isUnread" : true + } + }, + "displayName" : "{who} mentionned {mentions} {where}", + "icon" : "fa-rss", + "url" : "page/type/news/id/59fb1e03e2f07e2e1737b34a", + "labelAuthorObject" : "mentions", + "mentions" : [ + "LIVIN'COOP2" + ], + "labelArray" : { + "{where}" : [ + "in a news" + ], + "{who}" : [ + "Clément Damiens" + ], + "{mentions}" : [ + "LIVIN'COOP2" + ] + }, + "type" : "organizations" + } +}, +{ + "type" : "notifications", + "verb" : "follow", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T16:42:32.000Z"), + "updated" : ISODate("2017-10-31T16:42:32.000Z"), + "target" : { + "type" : "organizations", + "id" : "573db23e40bb4e64339a9f2b" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "573da8dc40bb4e302f9a9f6e" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc21740bb4e44359a9f2b" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc28c40bb4e25359a9f3a" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc35140bb4e24359a9f47" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc3ff40bb4e44359a9f30" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc19640bb4e23359a9f30" : { + "isUnread" : true, + "isUnseen" : true + }, + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} is following {where}", + "icon" : "fa-link", + "url" : "page/type/organizations/id/573db23e40bb4e64339a9f2b/view/directory/dir/followers", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Art Bien-être et Culture dans les Weppes" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "post", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T15:37:42.000Z"), + "updated" : ISODate("2017-10-31T15:37:42.000Z"), + "target" : { + "type" : "organizations", + "id" : "573db23e40bb4e64339a9f2b" + }, + "notify" : { + "objectType" : "news", + "id" : { + "573da8dc40bb4e302f9a9f6e" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc21740bb4e44359a9f2b" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc28c40bb4e25359a9f3a" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc35140bb4e24359a9f47" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc3ff40bb4e44359a9f30" : { + "isUnread" : true, + "isUnseen" : true + }, + "573dc19640bb4e23359a9f30" : { + "isUnread" : true, + "isUnseen" : true + }, + "59775556e2f07e141a22965c" : { + "isUnread":true, + "isUnseen" : true + } + }, + "displayName" : "{who} writes a post on the wall of {where}", + "icon" : "fa-rss", + "url" : "page/type/organizations/id/573db23e40bb4e64339a9f2b", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Art Bien-être et Culture dans les Weppes" + ], + "{what}" : [ + "a organization" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "accept", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T15:37:03.000Z"), + "updated" : ISODate("2017-10-31T15:37:03.000Z"), + "target" : { + "type" : "organizations", + "id" : "573db23e40bb4e64339a9f2b" + }, + "notify" : { + "objectType" : "asAdmin", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{author} confirmed your request to administrate {where}", + "icon" : "fa-check", + "url" : "page/type/organizations/id/573db23e40bb4e64339a9f2b/view/directory/dir/members", + "labelAuthorObject" : "object", + "labelArray" : { + "{author}" : [ + "Clément Damiens" + ], + "{who}" : [ + "" + ], + "{where}" : [ + "Art Bien-être et Culture dans les Weppes" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "ask", + "author" : { + "59775556e2f07e141a22965c" : { + "name" : "pikachui" + } + }, + "created" : ISODate("2017-10-31T15:36:54.000Z"), + "updated" : ISODate("2017-10-31T15:36:54.000Z"), + "target" : { + "type" : "organizations", + "id" : "573db23e40bb4e64339a9f2b" + }, + "notify" : { + "objectType" : "asAdmin", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} wants to administrate {where}", + "icon" : "fa-cog", + "url" : "page/type/organizations/id/573db23e40bb4e64339a9f2b/view/notifications", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Art Bien-être et Culture dans les Weppes" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "accept", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T15:36:46.000Z"), + "updated" : ISODate("2017-10-31T15:36:46.000Z"), + "target" : { + "type" : "organizations", + "id" : "573db23e40bb4e64339a9f2b" + }, + "notify" : { + "objectType" : "asMember", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{author} confirmed your request to join {where}", + "icon" : "fa-check", + "url" : "page/type/organizations/id/573db23e40bb4e64339a9f2b/view/directory/dir/members", + "labelAuthorObject" : "object", + "labelArray" : { + "{author}" : [ + "Clément Damiens" + ], + "{who}" : [ + "" + ], + "{where}" : [ + "Art Bien-être et Culture dans les Weppes" + ] + } + } +}, +{ + "type" : "test", + "verb" : "mention", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T15:36:24.000Z"), + "updated" : ISODate("2017-10-31T15:36:24.000Z"), + "target" : { + "type" : "news", + "id" : "59f89878e2f07e670e32ce71" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread": true, + "isUnseen" : true + } + }, + "displayName" : "{who} mentionned you {mentions} {where}", + "icon" : "fa-rss", + "url" : "page/type/news/id/59f89878e2f07e670e32ce71", + "labelAuthorObject" : "mentions", + "mentions" : [ + "LIVIN'COOP2" + ], + "labelArray" : { + "{where}" : [ + "in a news" + ], + "{who}" : [ + "Clément Damiens" + ], + "{mentions}" : [ + "with", + "LIVIN'COOP2" + ] + }, + "type" : "citoyens" + } +}, +{ + "type" : "test", + "verb" : "mention", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-10-31T15:36:10.000Z"), + "updated" : ISODate("2017-10-31T15:36:10.000Z"), + "target" : { + "type" : "news", + "id" : "59f8986ae2f07e991532ce6e" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} mentionned you {mentions} {where}", + "icon" : "fa-rss", + "url" : "page/type/news/id/59f8986ae2f07e991532ce6e", + "labelAuthorObject" : "mentions", + "labelArray" : { + "{where}" : [ + "in a news" + ], + "{who}" : [ + "Clément Damiens" + ], + "{mentions}" : "" + }, + "type" : "citoyens" + } +}, +{ + "type" : "test", + "verb" : "mention", + "author" : { + "597b4090e2f07eba5b9474ed" : { + "name" : "projet projet projet" + } + }, + "created" : ISODate("2017-10-30T19:01:29.000Z"), + "updated" : ISODate("2017-10-30T19:01:29.000Z"), + "target" : { + "type" : "news", + "id" : "59f77709e2f07eda378b456a" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} mentionned you {mentions} {where}", + "icon" : "fa-rss", + "url" : "page/type/news/id/59f77709e2f07eda378b456a", + "labelAuthorObject" : "mentions", + "mentions" : [ + "new association het link roles" + ], + "type" : "citoyens" + } +}, +{ + "_id" : ObjectId("5a05db8be2f07e95128b4576"), + "type" : "notifications", + "verb" : "follow", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:02:03.000Z"), + "updated" : ISODate("2017-11-10T17:02:03.000Z"), + "target" : { + "type" : "citoyens", + "id" : "59775556e2f07e141a22965c" + }, + "notify" : { + "objectType" : "user", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} is following you", + "icon" : "fa-link", + "url" : "page/type/citoyens/id/59775556e2f07e141a22965c/view/directory/dir/followers", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "pikachui" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "comment", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:02:20.000Z"), + "updated" : ISODate("2017-11-10T17:02:20.000Z"), + "target" : { + "type" : "news", + "id" : "5a05db43e2f07e68098b4594", + "parent" : { + "id" : "59775556e2f07e141a22965c", + "type" : "citoyens" + } + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} commented on your news {what}", + "icon" : "fa-comment", + "url" : "page/type/news/id/5a05db43e2f07e68098b4594", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "pikachui" + ], + "{what}" : [ + ""hellllo Le postttttt..."" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "like", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:02:22.000Z"), + "updated" : ISODate("2017-11-10T17:02:22.000Z"), + "target" : { + "type" : "news", + "id" : "5a05db43e2f07e68098b4594", + "parent" : { + "id" : "59775556e2f07e141a22965c", + "type" : "citoyens" + } + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} likes your news {what}", + "icon" : "fa-thumbs-up", + "url" : "page/type/news/id/5a05db43e2f07e68098b4594", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "pikachui" + ], + "{what}" : [ + ""hellllo Le postttttt..."" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "follow", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:07:36.000Z"), + "updated" : ISODate("2017-11-10T17:07:36.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} is following {where}", + "icon" : "fa-link", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/directory/dir/followers", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "ask", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:08:38.000Z"), + "updated" : ISODate("2017-11-10T17:08:38.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "asMember", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} wants to join {where}", + "icon" : "fa-cog", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/notifications", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "post", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:09:45.000Z"), + "updated" : ISODate("2017-11-10T17:09:45.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} writes a post on the wall of {where}", + "icon" : "fa-rss", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + "a project" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "comment", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + }, + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "created" : ISODate("2017-11-10T17:02:20.000Z"), + "updated" : ISODate("2017-11-10T17:22:15.000Z"), + "target" : { + "type" : "news", + "id" : "5a05db43e2f07e68098b4594", + "parent" : { + "id" : "59775556e2f07e141a22965c", + "type" : "citoyens" + } + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} added comments on your news {what}", + "icon" : "fa-comment", + "url" : "page/type/news/id/5a05db43e2f07e68098b4594", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "actionman", + "Clément Damiens" + ], + "{where}" : [ + "pikachui" + ], + "{what}" : [ + ""hellllo Le postttttt..."" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "like", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + }, + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "created" : ISODate("2017-11-10T17:02:22.000Z"), + "updated" : ISODate("2017-11-10T17:22:17.000Z"), + "target" : { + "type" : "news", + "id" : "5a05db43e2f07e68098b4594", + "parent" : { + "id" : "59775556e2f07e141a22965c", + "type" : "citoyens" + } + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} like your news {what}", + "icon" : "fa-thumbs-up", + "url" : "page/type/news/id/5a05db43e2f07e68098b4594", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "actionman", + "Clément Damiens" + ], + "{where}" : [ + "pikachui" + ], + "{what}" : [ + ""hellllo Le postttttt..."" + ] + } + } +}, +{ + "_id" : ObjectId("5a05dcd8e2f07eea0c8b457b"), + "type" : "notifications", + "verb" : "follow", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + }, + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "created" : ISODate("2017-11-10T17:07:36.000Z"), + "updated" : ISODate("2017-11-10T17:21:45.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + }, + "55ee8d59e41d756612558516" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} are following {where}", + "icon" : "fa-link", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/directory/dir/followers", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "actionman", + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "ask", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + }, + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "created" : ISODate("2017-11-10T17:08:38.000Z"), + "updated" : ISODate("2017-11-10T17:21:51.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "asMember", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + }, + "55ee8d59e41d756612558516" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} want to join {where}", + "icon" : "fa-cog", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/notifications", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "actionman", + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +}, +{ + "_id" : ObjectId("5a05dd59e2f07efc118b4578"), + "type" : "notifications", + "verb" : "post", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + }, + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "created" : ISODate("2017-11-10T17:09:45.000Z"), + "updated" : ISODate("2017-11-10T17:22:00.000Z"), + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "news", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true, + "isUnseen" : true + }, + "55ee8d59e41d756612558516" : { + "isUnread" : true, + "isUnseen" : true + } + }, + "displayName" : "{who} write posts on the wall of {where}", + "icon" : "fa-rss", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "actionman", + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + "a project" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "unlike", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:31:21.000Z"), + "updated" : ISODate("2017-11-10T17:31:21.000Z"), + "object" : { + "type" : "comments", + "id" : "5a05dfafe2f07efa118b4576" + }, + "target" : { + "type" : "news", + "id" : "5a05dd59e2f07efc118b4577", + "parent" : { + "id" : "597b3ffce2f07e3136947519", + "type" : "projects" + } + }, + "notify" : { + "objectType" : "comments", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} disapproves your comment on {where}", + "icon" : "fa-thumbs-down", + "url" : "page/type/news/id/5a05dd59e2f07efc118b4577", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "the wall of", + "Coucou la notif" + ], + "{what}" : [ + ""Salut la notif..."" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "comment", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:31:29.000Z"), + "updated" : ISODate("2017-11-10T17:31:29.000Z"), + "object" : { + "id" : "5a05dfafe2f07efa118b4576", + "type" : "comments" + }, + "target" : { + "type" : "news", + "id" : "5a05dd59e2f07efc118b4577", + "parent" : { + "id" : "597b3ffce2f07e3136947519", + "type" : "projects" + } + }, + "notify" : { + "objectType" : "comments", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} answered to your comment posted on {where}", + "icon" : "fa-comment", + "url" : "page/type/news/id/5a05dd59e2f07efc118b4577", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "the wall of", + "Coucou la notif" + ], + "{what}" : [ + ""Salut la notif..."" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "add", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:32:50.000Z"), + "updated" : ISODate("2017-11-10T17:32:50.000Z"), + "object" : { + "id" : "5a05e2a9e2f07e70168b4585", + "type" : "events" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "events", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} added a new event on {where}", + "icon" : "fa-plus", + "url" : "page/type/events/id/5a05e2a9e2f07e70168b4585", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + null + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "add", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:34:31.000Z"), + "updated" : ISODate("2017-11-10T17:34:31.000Z"), + "object" : { + "id" : "5a05e31ee2f07e59108b458e", + "type" : "rooms" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "rooms", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} added a new room in the co-space on {where}", + "icon" : "fa-plus", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + null + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "add", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:34:53.000Z"), + "updated" : ISODate("2017-11-10T17:34:53.000Z"), + "object" : { + "id" : "5a05e33de2f07e57168b4581", + "type" : "proposals" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "proposals", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} added a new proposal {what} in {where}", + "icon" : "fa-plus", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e/proposal/5a05e33de2f07e57168b4581", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + null + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "add", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:35:08.000Z"), + "updated" : ISODate("2017-11-10T17:35:08.000Z"), + "object" : { + "id" : "5a05e34ce2f07e04108b459f", + "type" : "actions" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "actions", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} added a new action {what} in {where}", + "icon" : "fa-plus", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e/action/5a05e34ce2f07e04108b459f", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + null + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "comment", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:35:18.000Z"), + "updated" : ISODate("2017-11-10T17:35:18.000Z"), + "object" : { + "type" : "proposals", + "id" : "5a05e33de2f07e57168b4581", + "name" : null + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "proposals", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} commented on proposal {what} in {where}", + "icon" : "fa-comment", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e/proposal/5a05e33de2f07e57168b4581", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + "jiejfiezfezjifiez" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "ammend", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:35:27.000Z"), + "updated" : ISODate("2017-11-10T17:35:27.000Z"), + "object" : { + "id" : "5a05e33de2f07e57168b4581", + "type" : "proposals" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} amended the proposal {what} in {where}", + "icon" : "fa-gavel", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e/proposal/5a05e33de2f07e57168b4581", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + "jiejfiezfezjifiez" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "vote", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:35:31.000Z"), + "updated" : ISODate("2017-11-10T17:35:31.000Z"), + "object" : { + "id" : "5a05e33de2f07e57168b4581", + "type" : "proposals" + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "persons", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{who} voted on {what} in {where}", + "icon" : "fa-gavel", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/coop/room/5a05e31ee2f07e59108b458e/proposal/5a05e33de2f07e57168b4581", + "labelAuthorObject" : "author", + "labelArray" : { + "{who}" : [ + "Clément Damiens" + ], + "{where}" : [ + "Coucou la notif" + ], + "{what}" : [ + "jiejfiezfezjifiez" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "accept", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:38:45.000Z"), + "updated" : ISODate("2017-11-10T17:38:45.000Z"), + "object" : { + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "asMember", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{author} confirmed {who} to join {where}", + "icon" : "fa-check", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519/view/directory/dir/contributors", + "labelAuthorObject" : "object", + "labelArray" : { + "{author}" : [ + "Clément Damiens" + ], + "{who}" : [ + "actionman" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +}, +{ + "type" : "notifications", + "verb" : "invite", + "author" : { + "55ee8d59e41d756612558516" : { + "name" : "Clément Damiens" + } + }, + "created" : ISODate("2017-11-10T17:38:56.000Z"), + "updated" : ISODate("2017-11-10T17:38:56.000Z"), + "object" : { + "59775527e2f07e0e1c22965b" : { + "name" : "actionman" + } + }, + "target" : { + "type" : "projects", + "id" : "597b3ffce2f07e3136947519" + }, + "notify" : { + "objectType" : "asAdmin", + "id" : { + "59775556e2f07e141a22965c" : { + "isUnread" : true + } + }, + "displayName" : "{author} invited {who} to administrate {where}", + "icon" : "fa-send", + "url" : "page/type/projects/id/597b3ffce2f07e3136947519", + "labelAuthorObject" : "object", + "labelArray" : { + "{author}" : [ + "Clément Damiens" + ], + "{who}" : [ + "actionman" + ], + "{where}" : [ + "Coucou la notif" + ] + } + } +} +////////////////// END LISTS /////////////////////////////// \ No newline at end of file diff --git a/data/translate.json.zip b/data/translate.json.zip new file mode 100644 index 0000000000000000000000000000000000000000..f4b13b7e7137c26418bf82842538d93acf1a4fa0 Binary files /dev/null and b/data/translate.json.zip differ diff --git a/data/zones.json b/data/zones.json new file mode 100644 index 0000000000000000000000000000000000000000..9bf4b3243c4e24ffff34fb95942fe3922a17dd94 --- /dev/null +++ b/data/zones.json @@ -0,0 +1,409 @@ +{"_id":{"$oid":"58be480a94ef47d1250ddbcd"},"name":"Martinique","countryCode":"MQ","level":["1","3","4"],"level1":"58be480a94ef47d1250ddbcd","level3":"58be480a94ef47d1250ddbcd","geo":{"@type":"GeoCoordinates","latitude":"14.6113732","longitude":"-60.9620776"},"geoPosition":{"type":"Point","float":true,"coordinates":[-60.9620776,14.6113732]},"osmID":"2473088","wikidataID":"Q17054","translateId":"599296ee6ff992e7038b456a","ownACity":true} +{"_id":{"$oid":"58bd5d5d94ef471f218b4587"},"name":"Belgique","countryCode":"BE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"50.6407351","longitude":"4.66696"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.66696,50.6407351]},"osmID":"52411","wikidataID":"Q31","translateId":"599296ec6ff992e7038b4567","ownACity":true} +{"_id":{"$oid":"58be480c94ef47d1250ddbce"},"name":"Mayotte","countryCode":"YT","level":["1","3","4"],"level1":"58be480c94ef47d1250ddbce","level3":"58be480c94ef47d1250ddbce","geo":{"@type":"GeoCoordinates","latitude":"-12.8230479","longitude":"45.1520755"},"geoPosition":{"type":"Point","float":true,"coordinates":[45.1520755,-12.8230479]},"osmID":"1363069","wikidataID":"Q17063","translateId":"599296ee6ff992e7038b456b","ownACity":true} +{"_id":{"$oid":"58be4bd194ef47e31d0ddbcb"},"name":"Nouvelle-Calédonie","countryCode":"NC","level":["1","3","4"],"level1":"58be4bd194ef47e31d0ddbcb","level3":"58be4bd194ef47e31d0ddbcb","geo":{"@type":"GeoCoordinates","latitude":"-20.4542885","longitude":"164.55660583078"},"geoPosition":{"type":"Point","float":true,"coordinates":[164.55660583078,-20.4542885]},"osmID":"254939036","translateId":"59f8258f6ff9921c048b4b7e","ownACity":true} +{"_id":{"$oid":"58be480794ef47d1250ddbcc"},"name":"Guadeloupe","countryCode":"GP","level":["1","3","4"],"level1":"58be480794ef47d1250ddbcc","level3":"58be480794ef47d1250ddbcc","geo":{"@type":"GeoCoordinates","latitude":"16.2490067","longitude":"-61.5650443"},"geoPosition":{"type":"Point","float":true,"coordinates":[-61.5650443,16.2490067]},"osmID":"2562137","wikidataID":"Q17012","translateId":"599296ed6ff992e7038b4569","ownACity":true} +{"_id":{"$oid":"58c12b5e94ef474e068b4567"},"name":"Bruxelles","countryCode":"BE","level":["2"],"level1":"58bd5d5d94ef471f218b4587","geo":{"@type":"GeoCoordinates","latitude":"50.83853395","longitude":"4.37543388666309"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.37543388666309,50.83853395]},"osmID":"54094","wikidataID":"Q240","translateId":"599296f16ff992e7038b456e"} +{"_id":{"$oid":"58be4af494ef47df1d0ddbcc"},"name":"Réunion","countryCode":"RE","level":["1","3","4"],"level1":"58be4af494ef47df1d0ddbcc","level3":"58be4af494ef47df1d0ddbcc","geo":{"@type":"GeoCoordinates","latitude":"-21.1309331","longitude":"55.5265771"},"geoPosition":{"type":"Point","float":true,"coordinates":[55.5265771,-21.1309331]},"osmID":"2470060","wikidataID":"Q17070","translateId":"599296ef6ff992e7038b456c","ownACity":true} +{"_id":{"$oid":"58be53b694ef47df1d0ddbcd"},"name":"Guyane","countryCode":"GF","level":["1","3","4"],"level1":"58be53b694ef47df1d0ddbcd","level3":"58be53b694ef47df1d0ddbcd","geo":{"@type":"GeoCoordinates","latitude":"4.0039882","longitude":"-52.9999979"},"geoPosition":{"type":"Point","float":true,"coordinates":[-52.9999979,4.0039882]},"osmID":"2502058","wikidataID":"Q3769","translateId":"599296f16ff992e7038b456d","ownACity":true} +{"_id":{"$oid":"5979d18f6ff9925a108b456c"},"name":"ÃŽle-de-France","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.6443057","longitude":"2.7537863"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.7537863,48.6443057]},"osmID":"8649","wikidataID":"Q13917","translateId":"599296f36ff992e7038b4571"} +{"_id":{"$oid":"58c12b6694ef474e068b4569"},"name":"Flandre","countryCode":"BE","level":["2"],"level1":"58bd5d5d94ef471f218b4587","geo":{"@type":"GeoCoordinates","latitude":"51.0962462","longitude":"4.17985128926016"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.17985128926016,51.0962462]},"osmID":"53134","wikidataID":"Q9337","translateId":"599296f36ff992e7038b4570"} +{"_id":{"$oid":"58bd5d6494ef471f218b4588"},"name":"France","countryCode":"FR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"46.603354","longitude":"1.8883335"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.8883335,46.603354]},"osmID":"2202162","wikidataID":"Q142","translateId":"599296ec6ff992e7038b4568","ownACity":true} +{"_id":{"$oid":"58c12b6294ef474e068b4568"},"name":"Wallonie","countryCode":"BE","level":["2"],"level1":"58bd5d5d94ef471f218b4587","geo":{"@type":"GeoCoordinates","latitude":"50.15455465","longitude":"5.39921064948211"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.39921064948211,50.15455465]},"osmID":"90348","wikidataID":"Q231","translateId":"599296f26ff992e7038b456f"} +{"_id":{"$oid":"5979d1986ff9925a108b456d"},"name":"Pays de la Loire","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.6594864","longitude":"-0.8186143"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.8186143,47.6594864]},"osmID":"8650","wikidataID":"Q16994","translateId":"599296f46ff992e7038b4572"} +{"_id":{"$oid":"5979d1a16ff9925a108b456e"},"name":"Corse","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"42.1640662","longitude":"9.0982074"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.0982074,42.1640662]},"osmID":"76910","wikidataID":"Q14112","translateId":"599296f56ff992e7038b4573"} +{"_id":{"$oid":"5979d1ac6ff9925a108b456f"},"name":"Nouvelle-Aquitaine","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.4039367","longitude":"0.3756199"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.3756199,45.4039367]},"osmID":"3792880","wikidataID":"Q18678082","translateId":"599296f66ff992e7038b4574"} +{"_id":{"$oid":"5979d1c96ff9925a108b4571"},"name":"Normandie","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.0677708","longitude":"0.3138532"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.3138532,49.0677708]},"osmID":"3793170","wikidataID":"Q18677875","translateId":"599296f76ff992e7038b4576"} +{"_id":{"$oid":"5979d1cd6ff9925a108b4572"},"name":"Centre-Val de Loire","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.5490251","longitude":"1.7324062"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.7324062,47.5490251]},"osmID":"8640","wikidataID":"Q13947","translateId":"599296f76ff992e7038b4577"} +{"_id":{"$oid":"5979d1d46ff9925a108b4573"},"name":"Grand Est","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.4845157","longitude":"6.113035"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.113035,48.4845157]},"osmID":"3792876","wikidataID":"Q18677983","translateId":"599296f86ff992e7038b4578"} +{"_id":{"$oid":"5979d1e66ff9925a108b4575"},"name":"West-Vlaanderen","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","geo":{"@type":"GeoCoordinates","latitude":"51.0962462","longitude":"4.17985128926016"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.17985128926016,51.0962462]},"osmID":"53134","wikidataID":"Q9337","translateId":"599296f96ff992e7038b457a"} +{"_id":{"$oid":"5979d1ed6ff9925a108b4576"},"name":"Hauts-de-France","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"50.1024606","longitude":"2.7247515"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.7247515,50.1024606]},"osmID":"4217435","wikidataID":"Q18677767","translateId":"599296fa6ff992e7038b457b"} +{"_id":{"$oid":"5979d1f36ff9925a108b4578"},"name":"Région Bruxelles-Capitale","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b5e94ef474e068b4567","geo":{"@type":"GeoCoordinates","latitude":"50.83853395","longitude":"4.37543388666309"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.37543388666309,50.83853395]},"osmID":"54094","wikidataID":"Q240","translateId":"599296fb6ff992e7038b457d"} +{"_id":{"$oid":"5979d1f26ff9925a108b4577"},"name":"Bourgogne-Franche-Comté","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.0510946","longitude":"5.0740568"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.0740568,47.0510946]},"osmID":"3792878","wikidataID":"Q18578267","translateId":"599296fb6ff992e7038b457c"} +{"_id":{"$oid":"5979dbe56ff9924e088b4567"},"name":"Liège","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":null,"geo":{"@type":"GeoCoordinates","latitude":"50.47081585","longitude":"5.77349888408805"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.77349888408805,50.47081585]},"osmID":"1407192","wikidataID":"Q1127","translateId":"599296fd6ff992e7038b457f"} +{"_id":{"$oid":"5979d1e26ff9925a108b4574"},"name":"Provence-Alpes-Côte d'Azur","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.0580563","longitude":"6.0638506"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.0638506,44.0580563]},"osmID":"8654","wikidataID":"Q15104","translateId":"599296f96ff992e7038b4579"} +{"_id":{"$oid":"5979dbeb6ff9924e088b4569"},"name":"Limburg","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","geo":{"@type":"GeoCoordinates","latitude":"50.99780495","longitude":"5.44552873206813"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.44552873206813,50.99780495]},"osmID":"53142","wikidataID":"Q1095","translateId":"599296fe6ff992e7038b4581"} +{"_id":{"$oid":"5979dbe86ff9924e088b4568"},"name":"Hainaut","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":null,"geo":{"@type":"GeoCoordinates","latitude":"50.3624612","longitude":"4.1251731786317"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.1251731786317,50.3624612]},"osmID":"157559","wikidataID":"Q1129","translateId":"599296fd6ff992e7038b4580"} +{"_id":{"$oid":"5979dbee6ff9924e088b456a"},"name":"Luxembourg","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","geo":{"@type":"GeoCoordinates","latitude":"49.963667","longitude":"5.43991862540759"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.43991862540759,49.963667]},"osmID":"1412581","wikidataID":"Q1126","translateId":"599296ff6ff992e7038b4582"} +{"_id":{"$oid":"5979dbf16ff9924e088b456b"},"name":"Namur","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","geo":{"@type":"GeoCoordinates","latitude":"50.21673105","longitude":"4.80119963123916"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.80119963123916,50.21673105]},"osmID":"1311816","wikidataID":"Q1125","translateId":"599296ff6ff992e7038b4583"} +{"_id":{"$oid":"5979dbf66ff9924e088b456d"},"name":"Brabant Wallon","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","geo":{"@type":"GeoCoordinates","latitude":"50.66636025","longitude":"4.54997107345024"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.54997107345024,50.66636025]},"osmID":"78748","wikidataID":"Q1122","translateId":"599297016ff992e7038b4585"} +{"_id":{"$oid":"5979dbff6ff9924e088b456e"},"name":"Oost-Vlaanderen","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","geo":{"@type":"GeoCoordinates","latitude":"51.0375423","longitude":"3.81182750467243"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.81182750467243,51.0375423]},"osmID":"53135","wikidataID":"Q1114","translateId":"599297016ff992e7038b4586"} +{"_id":{"$oid":"5979dbf46ff9924e088b456c"},"name":"Antwerpen","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","geo":{"@type":"GeoCoordinates","latitude":"51.2484171","longitude":"4.75740523845913"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.75740523845913,51.2484171]},"osmID":"53114","wikidataID":"Q1116","translateId":"599297006ff992e7038b4584"} +{"_id":{"$oid":"597b1b3b6ff992f0038b4585"},"name":"Waremme","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":null,"level3":"5979dbe56ff9924e088b4567","geo":{"@type":"GeoCoordinates","latitude":"50.65610095","longitude":"5.2146380978506"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.2146380978506,50.65610095]},"osmID":"1407190","wikidataID":"Q93970","translateId":"599297036ff992e7038b4588"} +{"_id":{"$oid":"5979dc026ff9924e088b456f"},"name":"Vlaams-Brabant","countryCode":"BE","level":["3"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","geo":{"@type":"GeoCoordinates","latitude":"50.8684677","longitude":"4.78847719090684"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.78847719090684,50.8684677]},"osmID":"58004","wikidataID":"Q1118","translateId":"599297026ff992e7038b4587"} +{"_id":{"$oid":"5979d1c36ff9925a108b4570"},"name":"Bretagne","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.2640845","longitude":"-2.9202408"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.9202408,48.2640845]},"osmID":"102740","wikidataID":"Q12130","translateId":"599296f66ff992e7038b4575"} +{"_id":{"$oid":"5979d1fc6ff9925a108b4579"},"name":"Auvergne-Rhône-Alpes","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.2968119","longitude":"4.6604809"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.6604809,45.2968119]},"osmID":"3792877","wikidataID":"Q18338206","translateId":"599296fc6ff992e7038b457e"} +{"_id":{"$oid":"597b1b3d6ff992f0038b4586"},"name":"Liège","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":null,"level3":"5979dbe56ff9924e088b4567","geo":{"@type":"GeoCoordinates","latitude":"50.47081585","longitude":"5.77349888408805"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.77349888408805,50.47081585]},"osmID":"1407192","wikidataID":"Q1127","translateId":"599297046ff992e7038b4589"} +{"_id":{"$oid":"597b1b406ff992f0038b4587"},"name":"Diksmuide","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"51.017509","longitude":"2.91983253888889"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.91983253888889,51.017509]},"osmID":"2239583","wikidataID":"Q91402","translateId":"599297046ff992e7038b458a"} +{"_id":{"$oid":"597b1b456ff992f0038b4588"},"name":"Dendermonde","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"51.0356564","longitude":"4.08513080231758"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.08513080231758,51.0356564]},"osmID":"4005601","translateId":"59f8258f6ff9921c048b4b7f"} +{"_id":{"$oid":"597b1b476ff992f0038b4589"},"name":"Charleroi","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":null,"level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.4227884363942","longitude":"4.4334232375423"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.4334232375423,50.4227884363942]},"translateId":"59f8258f6ff9921c048b4b80"} +{"_id":{"$oid":"597b1b4b6ff992f0038b458a"},"name":"Roeselare","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"50.9529987","longitude":"3.06534708865482"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.06534708865482,50.9529987]},"osmID":"2239123","wikidataID":"Q91439","translateId":"599297066ff992e7038b458b"} +{"_id":{"$oid":"597b1b506ff992f0038b458c"},"name":"Maaseik","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbeb6ff9924e088b4569","geo":{"@type":"GeoCoordinates","latitude":"51.0952371","longitude":"5.77335143909351"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.77335143909351,51.0952371]},"osmID":"6188085","translateId":"59f8258f6ff9921c048b4b81"} +{"_id":{"$oid":"597b1b4d6ff992f0038b458b"},"name":"Ieper","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"50.8327406","longitude":"2.86559157050271"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.86559157050271,50.8327406]},"osmID":"2239171","wikidataID":"Q91450","translateId":"599297066ff992e7038b458c"} +{"_id":{"$oid":"597b1b526ff992f0038b458d"},"name":"Soignies","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.5924275","longitude":"4.09721556602672"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.09721556602672,50.5924275]},"osmID":"2372935","wikidataID":"Q94110","translateId":"599297086ff992e7038b458d"} +{"_id":{"$oid":"597b1b556ff992f0038b458e"},"name":"Sint-Niklaas","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"51.16055165","longitude":"4.1574550682489"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.1574550682489,51.16055165]},"osmID":"3376840","translateId":"59f8258f6ff9921c048b4b82"} +{"_id":{"$oid":"597b1b5a6ff992f0038b4590"},"name":"Hasselt","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbeb6ff9924e088b4569","geo":{"@type":"GeoCoordinates","latitude":"50.930358","longitude":"5.33683839706759"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.33683839706759,50.930358]},"osmID":"4169989","translateId":"5992970a6ff992e7038b458f"} +{"_id":{"$oid":"597b1b586ff992f0038b458f"},"name":"Arlon","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbee6ff9924e088b456a","geo":{"@type":"GeoCoordinates","latitude":"49.698265","longitude":"5.7822170449426"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.7822170449426,49.698265]},"osmID":"1412580","wikidataID":"Q93816","translateId":"599297096ff992e7038b458e"} +{"_id":{"$oid":"597b1b5c6ff992f0038b4591"},"name":"Veurne","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"51.03583175","longitude":"2.65749637671305"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.65749637671305,51.03583175]},"osmID":"2239635","wikidataID":"Q91411","translateId":"5992970a6ff992e7038b4590"} +{"_id":{"$oid":"597b1b5e6ff992f0038b4592"},"name":"Neufchâteau","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbee6ff9924e088b456a","geo":{"@type":"GeoCoordinates","latitude":"50.7195828","longitude":"5.7764464"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.7764464,50.7195828]},"osmID":"685124330","translateId":"59f8258f6ff9921c048b4b83"} +{"_id":{"$oid":"597b1b616ff992f0038b4593"},"name":"Tongeren","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbeb6ff9924e088b4569","geo":{"@type":"GeoCoordinates","latitude":"50.86369935","longitude":"5.44556515381188"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.44556515381188,50.86369935]},"osmID":"2377237","wikidataID":"Q93549","translateId":"5992970c6ff992e7038b4591"} +{"_id":{"$oid":"597b1b646ff992f0038b4594"},"name":"Marche-en-Famenne","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbee6ff9924e088b456a","geo":{"@type":"GeoCoordinates","latitude":"50.23867115","longitude":"5.48462078489016"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.48462078489016,50.23867115]},"osmID":"1412582","wikidataID":"Q93905","translateId":"5992970c6ff992e7038b4592"} +{"_id":{"$oid":"597b1b666ff992f0038b4595"},"name":"Nivelles 2","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbf66ff9924e088b456d","geo":{"@type":"GeoCoordinates","latitude":"50.59074135","longitude":"4.35929575601133"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.35929575601133,50.59074135]},"osmID":"23290060","translateId":"59f8258f6ff9921c048b4b84"} +{"_id":{"$oid":"597b1b6c6ff992f0038b4597"},"name":"Aalst","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"50.7813901","longitude":"5.2127604"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.2127604,50.7813901]},"osmID":"2440771602","translateId":"59f8258f6ff9921c048b4b85"} +{"_id":{"$oid":"597b1b696ff992f0038b4596"},"name":"Thuin","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.20822125","longitude":"4.27206532203534"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.27206532203534,50.20822125]},"osmID":"2198768","wikidataID":"Q94122","translateId":"5992970e6ff992e7038b4593"} +{"_id":{"$oid":"597b1b6e6ff992f0038b4598"},"name":"Halle-Vilvoorde","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dc026ff9924e088b456f","geo":{"@type":"GeoCoordinates","latitude":"50.8650847","longitude":"4.17238713649992"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.17238713649992,50.8650847]},"osmID":"2524255","wikidataID":"Q93368","translateId":"5992970f6ff992e7038b4594"} +{"_id":{"$oid":"597b1b716ff992f0038b4599"},"name":"Mechelen","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbf46ff9924e088b456c","geo":{"@type":"GeoCoordinates","latitude":"51.02803335","longitude":"4.47132119999597"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.47132119999597,51.02803335]},"osmID":"3369538","translateId":"59f8258f6ff9921c048b4b86"} +{"_id":{"$oid":"597b1b816ff992f0038b459e"},"name":"Brugge","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"51.2147083","longitude":"3.2073611"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.2073611,51.2147083]},"translateId":"59f8258f6ff9921c048b4b87"} +{"_id":{"$oid":"597b1b7b6ff992f0038b459c"},"name":"Leuven","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dc026ff9924e088b456f","geo":{"@type":"GeoCoordinates","latitude":"50.876659","longitude":"4.83867059735026"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.83867059735026,50.876659]},"osmID":"2524256","wikidataID":"Q93392","translateId":"599297126ff992e7038b4597"} +{"_id":{"$oid":"597b1b756ff992f0038b459a"},"name":"Verviers","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe56ff9924e088b4567","geo":{"@type":"GeoCoordinates","latitude":"50.4464143","longitude":"6.07954976701268"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.07954976701268,50.4464143]},"osmID":"1407211","wikidataID":"Q93989","translateId":"599297106ff992e7038b4595"} +{"_id":{"$oid":"597b1b886ff992f0038b45a0"},"name":"Huy","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe56ff9924e088b4567","geo":{"@type":"GeoCoordinates","latitude":"50.50109585","longitude":"5.33947535765498"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.33947535765498,50.50109585]},"osmID":"1407189","wikidataID":"Q94019","translateId":"599297136ff992e7038b4599"} +{"_id":{"$oid":"597b1b8a6ff992f0038b45a1"},"name":"HAUTS-DE-SEINE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.84016715","longitude":"2.19862720595133"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.19862720595133,48.84016715]},"osmID":"7449","wikidataID":"Q12543","level3":"5979d18f6ff9925a108b456c","translateId":"599297146ff992e7038b459a"} +{"_id":{"$oid":"597b1b776ff992f0038b459b"},"name":"Namur","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbf16ff9924e088b456b","geo":{"@type":"GeoCoordinates","latitude":"50.21673105","longitude":"4.80119963123916"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.80119963123916,50.21673105]},"osmID":"1311816","wikidataID":"Q1125","translateId":"599297116ff992e7038b4596"} +{"_id":{"$oid":"597b1b836ff992f0038b459f"},"name":"Antwerpen","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbf46ff9924e088b456c","geo":{"@type":"GeoCoordinates","latitude":"51.2484171","longitude":"4.75740523845913"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.75740523845913,51.2484171]},"osmID":"53114","wikidataID":"Q1116","translateId":"599297126ff992e7038b4598"} +{"_id":{"$oid":"597b1b906ff992f0038b45a3"},"name":"Gent","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"51.0645585426894","longitude":"3.73016684600466"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.73016684600466,51.0645585426894]},"translateId":"59f8258f6ff9921c048b4b88"} +{"_id":{"$oid":"597b1b8e6ff992f0038b45a2"},"name":"TERRITOIRE DE BELFORT","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.62923095","longitude":"6.89930115671088"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.89930115671088,47.62923095]},"osmID":"7410","wikidataID":"Q12782","level3":"5979d1f26ff9925a108b4577","translateId":"599297146ff992e7038b459b"} +{"_id":{"$oid":"597b1b996ff992f0038b45a5"},"name":"Tournai","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.6289327","longitude":"3.4073896337759"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.4073896337759,50.6289327]},"osmID":"2198998","wikidataID":"Q94139","translateId":"599297156ff992e7038b459d"} +{"_id":{"$oid":"597b1b946ff992f0038b45a4"},"name":"YONNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.85512575","longitude":"3.64504392572388"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.64504392572388,47.85512575]},"osmID":"7392","wikidataID":"Q12816","level3":"5979d1f26ff9925a108b4577","translateId":"599297156ff992e7038b459c"} +{"_id":{"$oid":"597b1ba26ff992f0038b45a6"},"name":"VOSGES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.16378605","longitude":"6.38207117359553"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.38207117359553,48.16378605]},"osmID":"7384","wikidataID":"Q3105","level3":"5979d1d46ff9925a108b4573","translateId":"599297166ff992e7038b459e"} +{"_id":{"$oid":"597b1ba56ff992f0038b45a7"},"name":"HAUTE-VIENNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.91901925","longitude":"1.20317677187629"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.20317677187629,45.91901925]},"osmID":"7418","wikidataID":"Q12808","level3":"5979d1ac6ff9925a108b456f","translateId":"599297176ff992e7038b459f"} +{"_id":{"$oid":"597b1bbb6ff992f0038b45ab"},"name":"Kortrijk","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"50.81788085","longitude":"3.27841539037433"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.27841539037433,50.81788085]},"osmID":"960213","translateId":"59f8258f6ff9921c048b4b89"} +{"_id":{"$oid":"597b1bb36ff992f0038b45a9"},"name":"TARN","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.7921741","longitude":"2.13396477226954"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.13396477226954,43.7921741]},"osmID":"7442","wikidataID":"Q12772","level3":"598412b76ff9920d048b4569","translateId":"599297186ff992e7038b45a1"} +{"_id":{"$oid":"597b1bb76ff992f0038b45aa"},"name":"DEUX-SEVRES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.53914","longitude":"-0.299533326480368"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.299533326480368,46.53914]},"osmID":"7455","wikidataID":"Q12765","level3":"5979d1ac6ff9925a108b456f","translateId":"599297186ff992e7038b45a2"} +{"_id":{"$oid":"597b1bac6ff992f0038b45a8"},"name":"TARN-ET-GARONNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.080656","longitude":"1.20506329587002"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.20506329587002,44.080656]},"osmID":"7388","wikidataID":"Q12779","level3":"598412b76ff9920d048b4569","translateId":"599297176ff992e7038b45a0"} +{"_id":{"$oid":"597b1bcb6ff992f0038b45af"},"name":"PARIS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.85881005","longitude":"2.32003101155031"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.32003101155031,48.85881005]},"osmID":"71525","wikidataID":"Q90","level3":"5979d18f6ff9925a108b456c","translateId":"5992971c6ff992e7038b45a6"} +{"_id":{"$oid":"597b1bca6ff992f0038b45ae"},"name":"Virton","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbee6ff9924e088b456a","geo":{"@type":"GeoCoordinates","latitude":"49.6409283","longitude":"5.52135529693417"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.52135529693417,49.6409283]},"osmID":"2336444","wikidataID":"Q93860","translateId":"5992971b6ff992e7038b45a5"} +{"_id":{"$oid":"597b1bd16ff992f0038b45b1"},"name":"ÃŽle-de-france","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.68505075","longitude":"2.16854157923014"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.16854157923014,48.68505075]},"osmID":"1361272","level3":"5979d18f6ff9925a108b456c","translateId":"59f8258f6ff9921c048b4b8a"} +{"_id":{"$oid":"597b1bd06ff992f0038b45b0"},"name":"Mouscron","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.7379164","longitude":"3.25905415605925"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.25905415605925,50.7379164]},"osmID":"2198351","wikidataID":"Q94095","translateId":"5992971d6ff992e7038b45a7"} +{"_id":{"$oid":"597b1bc66ff992f0038b45ad"},"name":"YVELINES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.76203735","longitude":"1.88713756212644"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.88713756212644,48.76203735]},"osmID":"7457","wikidataID":"Q12820","level3":"5979d18f6ff9925a108b456c","translateId":"5992971b6ff992e7038b45a4"} +{"_id":{"$oid":"597b1bdc6ff992f0038b45b4"},"name":"Bastogne","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbee6ff9924e088b456a","geo":{"@type":"GeoCoordinates","latitude":"50.08427495","longitude":"5.73561435333192"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.73561435333192,50.08427495]},"osmID":"1412583","wikidataID":"Q93925","translateId":"5992971f6ff992e7038b45aa"} +{"_id":{"$oid":"597b1bdf6ff992f0038b45b5"},"name":"HAUT-RHIN","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.8654746","longitude":"7.23154334757976"},"geoPosition":{"type":"Point","float":true,"coordinates":[7.23154334757976,47.8654746]},"osmID":"7403","wikidataID":"Q12722","level3":"5979d1d46ff9925a108b4573","translateId":"599297206ff992e7038b45ab"} +{"_id":{"$oid":"597b1bd96ff992f0038b45b3"},"name":"HAUTE-SAONE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.63842335","longitude":"6.09511408893277"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.09511408893277,47.63842335]},"osmID":"7423","wikidataID":"Q12730","level3":"5979d1f26ff9925a108b4577","translateId":"5992971f6ff992e7038b45a9"} +{"_id":{"$oid":"597b1bd66ff992f0038b45b2"},"name":"Turnhout","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbf46ff9924e088b456c","geo":{"@type":"GeoCoordinates","latitude":"51.25827285","longitude":"5.00051187429989"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.00051187429989,51.25827285]},"osmID":"2524404","wikidataID":"Q90911","translateId":"5992971e6ff992e7038b45a8"} +{"_id":{"$oid":"597b1be16ff992f0038b45b6"},"name":"PYRENEES-ORIENTALES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"42.625894","longitude":"2.50650899469315"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.50650899469315,42.625894]},"osmID":"7466","wikidataID":"Q12709","level3":"598412b76ff9920d048b4569","translateId":"599297206ff992e7038b45ac"} +{"_id":{"$oid":"597b1bc46ff992f0038b45ac"},"name":"VENDEE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.67577325","longitude":"-1.29144634801388"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.29144634801388,46.67577325]},"osmID":"7402","wikidataID":"Q12798","level3":"5979d1986ff9925a108b456d","translateId":"5992971a6ff992e7038b45a3"} +{"_id":{"$oid":"597b1beb6ff992f0038b45b8"},"name":"SOMME","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.9708401","longitude":"2.37568079441057"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.37568079441057,49.9708401]},"osmID":"7463","wikidataID":"Q12770","level3":"5979d1ed6ff9925a108b4576","translateId":"599297226ff992e7038b45ae"} +{"_id":{"$oid":"597b1bf56ff992f0038b45bb"},"name":"NIEVRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.11969705","longitude":"3.54488979472272"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.54488979472272,47.11969705]},"osmID":"7448","wikidataID":"Q12657","level3":"5979d1f26ff9925a108b4577","translateId":"599297246ff992e7038b45b1"} +{"_id":{"$oid":"597b1be56ff992f0038b45b7"},"name":"PUY-DE-DOME","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.7715343","longitude":"3.08399342067179"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.08399342067179,45.7715343]},"osmID":"7406","wikidataID":"Q12694","level3":"5979d1fc6ff9925a108b4579","translateId":"599297216ff992e7038b45ad"} +{"_id":{"$oid":"597b1bf36ff992f0038b45ba"},"name":"OISE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.41205455","longitude":"2.40648784690548"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.40648784690548,49.41205455]},"osmID":"7427","wikidataID":"Q12675","level3":"5979d1ed6ff9925a108b4576","translateId":"599297236ff992e7038b45b0"} +{"_id":{"$oid":"597b1bee6ff992f0038b45b9"},"name":"PAS-DE-CALAIS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"50.51413765","longitude":"2.258093225"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.258093225,50.51413765]},"osmID":"7394","wikidataID":"Q12689","level3":"5979d1ed6ff9925a108b4576","translateId":"599297226ff992e7038b45af"} +{"_id":{"$oid":"597b1bfe6ff992f0038b45bd"},"name":"MEUSE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.01296845","longitude":"5.42866907663977"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.42866907663977,49.01296845]},"osmID":"7382","wikidataID":"Q12631","level3":"5979d1d46ff9925a108b4573","translateId":"599297256ff992e7038b45b3"} +{"_id":{"$oid":"597b1bf96ff992f0038b45bc"},"name":"MOSELLE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.0207259","longitude":"6.53803517035795"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.53803517035795,49.0207259]},"osmID":"51854","wikidataID":"Q12652","level3":"5979d1d46ff9925a108b4573","translateId":"599297256ff992e7038b45b2"} +{"_id":{"$oid":"597b1c0c6ff992f0038b45bf"},"name":"Nivelles 1","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbf66ff9924e088b456d","geo":{"@type":"GeoCoordinates","latitude":"50.59074135","longitude":"4.35929575601133"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.35929575601133,50.59074135]},"osmID":"23290060","translateId":"59f8258f6ff9921c048b4b8b"} +{"_id":{"$oid":"597b1c0e6ff992f0038b45c0"},"name":"Oudenaarde","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"50.83710665","longitude":"3.64072786803973"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.64072786803973,50.83710665]},"osmID":"2524068","wikidataID":"Q90932","translateId":"599297276ff992e7038b45b5"} +{"_id":{"$oid":"597b1c056ff992f0038b45be"},"name":"HAUTE-MARNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.1329414","longitude":"5.25291078975193"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.25291078975193,48.1329414]},"osmID":"7396","wikidataID":"Q12607","level3":"5979d1d46ff9925a108b4573","translateId":"599297266ff992e7038b45b4"} +{"_id":{"$oid":"597b1c156ff992f0038b45c3"},"name":"Dinant","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbf16ff9924e088b456b","geo":{"@type":"GeoCoordinates","latitude":"50.10147015","longitude":"4.96393041545393"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.96393041545393,50.10147015]},"osmID":"1405412","wikidataID":"Q108247","translateId":"599297296ff992e7038b45b8"} +{"_id":{"$oid":"597b1c106ff992f0038b45c1"},"name":"MAINE-ET-LOIRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.38863045","longitude":"-0.390909714638737"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.390909714638737,47.38863045]},"osmID":"7409","wikidataID":"Q12584","level3":"5979d1986ff9925a108b456d","translateId":"599297286ff992e7038b45b6"} +{"_id":{"$oid":"597b1c186ff992f0038b45c4"},"name":"RHONE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.8802348","longitude":"4.56453362955952"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.56453362955952,45.8802348]},"osmID":"4850451","wikidataID":"Q46130","level3":"5979d1fc6ff9925a108b4579","translateId":"5992972a6ff992e7038b45b9"} +{"_id":{"$oid":"597b1c136ff992f0038b45c2"},"name":"LOT","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.6249918","longitude":"1.66577421697537"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.66577421697537,44.6249918]},"osmID":"7454","wikidataID":"Q12576","level3":"598412b76ff9920d048b4569","translateId":"599297286ff992e7038b45b7"} +{"_id":{"$oid":"597b1c1e6ff992f0038b45c6"},"name":"LOIR-ET-CHER","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.65977515","longitude":"1.29718352539046"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.29718352539046,47.65977515]},"osmID":"7399","wikidataID":"Q12564","level3":"5979d1cd6ff9925a108b4572","translateId":"5992972b6ff992e7038b45bb"} +{"_id":{"$oid":"597b1c236ff992f0038b45c9"},"name":"Eeklo","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979dbff6ff9924e088b456e","geo":{"@type":"GeoCoordinates","latitude":"51.22648005","longitude":"3.57809245073545"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.57809245073545,51.22648005]},"osmID":"2523965","wikidataID":"Q90942","translateId":"5992972d6ff992e7038b45be"} +{"_id":{"$oid":"597b1c226ff992f0038b45c8"},"name":"VAL-D'OISE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.07507045","longitude":"2.20981144366838"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.20981144366838,49.07507045]},"osmID":"7433","wikidataID":"Q12784","level3":"5979d18f6ff9925a108b456c","translateId":"5992972c6ff992e7038b45bd"} +{"_id":{"$oid":"597b1c206ff992f0038b45c7"},"name":"LANDES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.00996945","longitude":"-0.643387235446738"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.643387235446738,44.00996945]},"osmID":"7376","wikidataID":"Q12563","level3":"5979d1ac6ff9925a108b456f","translateId":"5992972c6ff992e7038b45bc"} +{"_id":{"$oid":"597b1c1b6ff992f0038b45c5"},"name":"LOIRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.75385355","longitude":"4.0454736825511"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.0454736825511,45.75385355]},"osmID":"7420","wikidataID":"Q12569","level3":"5979d1fc6ff9925a108b4579","translateId":"5992972a6ff992e7038b45ba"} +{"_id":{"$oid":"597b1c2b6ff992f0038b45ca"},"name":"MAYENNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.1507819","longitude":"-0.649127381200709"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.649127381200709,48.1507819]},"osmID":"7438","wikidataID":"Q12620","level3":"5979d1986ff9925a108b456d","translateId":"5992972e6ff992e7038b45bf"} +{"_id":{"$oid":"597b1c2d6ff992f0038b45cb"},"name":"ISERE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.28979315","longitude":"5.63438247738623"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.63438247738623,45.28979315]},"osmID":"7437","wikidataID":"Q12559","level3":"5979d1fc6ff9925a108b4579","translateId":"5992972e6ff992e7038b45c0"} +{"_id":{"$oid":"597b1c336ff992f0038b45cd"},"name":"Brussel-Hoofdstad","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b5e94ef474e068b4567","level3":"5979d1f36ff9925a108b4578","geo":{"@type":"GeoCoordinates","latitude":"50.83853395","longitude":"4.37543388666309"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.37543388666309,50.83853395]},"osmID":"2404020","wikidataID":"Q90870","translateId":"599297306ff992e7038b45c2"} +{"_id":{"$oid":"597b1c316ff992f0038b45cc"},"name":"SEINE-ET-MARNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.6191861","longitude":"3.04170161525698"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.04170161525698,48.6191861]},"osmID":"7383","wikidataID":"Q12753","level3":"5979d18f6ff9925a108b456c","translateId":"5992972f6ff992e7038b45c1"} +{"_id":{"$oid":"597b1c366ff992f0038b45ce"},"name":"VIENNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.61211655","longitude":"0.465407009663971"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.465407009663971,46.61211655]},"osmID":"7377","wikidataID":"Q12804","level3":"5979d1ac6ff9925a108b456f","translateId":"599297306ff992e7038b45c3"} +{"_id":{"$oid":"597b1c396ff992f0038b45cf"},"name":"SEINE-MARITIME","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.66323745","longitude":"0.94009442040286"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.94009442040286,49.66323745]},"osmID":"7426","wikidataID":"Q12758","level3":"5979d1c96ff9925a108b4571","translateId":"599297316ff992e7038b45c4"} +{"_id":{"$oid":"597b1c3c6ff992f0038b45d0"},"name":"SARTHE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.02692875","longitude":"0.253821748224732"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.253821748224732,48.02692875]},"osmID":"7443","wikidataID":"Q12740","level3":"5979d1986ff9925a108b456d","translateId":"599297326ff992e7038b45c5"} +{"_id":{"$oid":"597b1c3e6ff992f0038b45d1"},"name":"INDRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.81210565","longitude":"1.53820515570562"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.53820515570562,46.81210565]},"osmID":"7417","wikidataID":"Q12553","level3":"5979d1cd6ff9925a108b4572","translateId":"599297336ff992e7038b45c6"} +{"_id":{"$oid":"597b1c4e6ff992f0038b45d5"},"name":"GARD","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.95995","longitude":"4.29763700237717"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.29763700237717,43.95995]},"osmID":"7461","wikidataID":"Q12515","level3":"598412b76ff9920d048b4569","translateId":"599297356ff992e7038b45ca"} +{"_id":{"$oid":"597b1c4a6ff992f0038b45d4"},"name":"HAUTE-GARONNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.3054546","longitude":"0.971679170190158"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.971679170190158,43.3054546]},"osmID":"7413","wikidataID":"Q12538","level3":"598412b76ff9920d048b4569","translateId":"599297356ff992e7038b45c9"} +{"_id":{"$oid":"597b1c4f6ff992f0038b45d6"},"name":"SEINE-SAINT-DENIS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.9098125","longitude":"2.4528634806147"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.4528634806147,48.9098125]},"osmID":"7389","wikidataID":"Q12761","level3":"5979d18f6ff9925a108b456c","translateId":"599297366ff992e7038b45cb"} +{"_id":{"$oid":"597b1c426ff992f0038b45d2"},"name":"GIRONDE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.88390205","longitude":"-0.604643888117042"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.604643888117042,44.88390205]},"osmID":"7405","wikidataID":"Q12526","level3":"5979d1ac6ff9925a108b456f","translateId":"599297336ff992e7038b45c7"} +{"_id":{"$oid":"597b1c466ff992f0038b45d3"},"name":"MEURTHE-ET-MOSELLE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.95596825","longitude":"5.98703829975656"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.98703829975656,48.95596825]},"osmID":"51856","wikidataID":"Q12626","level3":"5979d1d46ff9925a108b4573","translateId":"599297346ff992e7038b45c8"} +{"_id":{"$oid":"597b1c516ff992f0038b45d7"},"name":"Oostende","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"51.1846839","longitude":"2.9226366807234"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.9226366807234,51.1846839]},"osmID":"2239593","wikidataID":"Q91427","translateId":"599297366ff992e7038b45cc"} +{"_id":{"$oid":"597b1c546ff992f0038b45d8"},"name":"MARNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.961264","longitude":"4.31224359285714"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.31224359285714,48.961264]},"osmID":"7379","wikidataID":"Q12594","level3":"5979d1d46ff9925a108b4573","translateId":"599297376ff992e7038b45cd"} +{"_id":{"$oid":"597b1c5d6ff992f0038b45da"},"name":"PYRENEES-ATLANTIQUES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.18718655","longitude":"-0.728247400084667"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.728247400084667,43.18718655]},"osmID":"7450","wikidataID":"Q12703","level3":"5979d1ac6ff9925a108b456f","translateId":"599297386ff992e7038b45cf"} +{"_id":{"$oid":"597b1c5a6ff992f0038b45d9"},"name":"LOIRE-ATLANTIQUE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.3480563","longitude":"-1.87276795414718"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.87276795414718,47.3480563]},"osmID":"7432","wikidataID":"Q3068","level3":"5979d1986ff9925a108b456d","translateId":"599297386ff992e7038b45ce"} +{"_id":{"$oid":"597b1c696ff992f0038b45dc"},"name":"EURE-ET-LOIR","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.4474102","longitude":"1.39988201850208"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.39988201850208,48.4474102]},"osmID":"7374","wikidataID":"Q3377","level3":"5979d1cd6ff9925a108b4572","translateId":"5992973a6ff992e7038b45d1"} +{"_id":{"$oid":"597b1c6b6ff992f0038b45dd"},"name":"EURE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.0756358","longitude":"0.96520259447748"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.96520259447748,49.0756358]},"osmID":"7435","wikidataID":"Q3372","level3":"5979d1c96ff9925a108b4571","translateId":"5992973a6ff992e7038b45d2"} +{"_id":{"$oid":"597b1c786ff992f0038b45e0"},"name":"COTE-D'OR","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.46550335","longitude":"4.74812234575117"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.74812234575117,47.46550335]},"osmID":"7424","wikidataID":"Q3342","level3":"5979d1f26ff9925a108b4577","translateId":"5992973c6ff992e7038b45d5"} +{"_id":{"$oid":"597b1c766ff992f0038b45df"},"name":"COTES-D'ARMOR","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.45842215","longitude":"-2.75058683461077"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.75058683461077,48.45842215]},"osmID":"7398","wikidataID":"Q3349","level3":"5979d1c36ff9925a108b4570","translateId":"5992973b6ff992e7038b45d4"} +{"_id":{"$oid":"597b1c7d6ff992f0038b45e2"},"name":"SAVOIE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.49489515","longitude":"6.38466038137565"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.38466038137565,45.49489515]},"osmID":"7425","wikidataID":"Q12745","level3":"5979d1fc6ff9925a108b4579","translateId":"5992973d6ff992e7038b45d7"} +{"_id":{"$oid":"597b1c716ff992f0038b45de"},"name":"MORBIHAN","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.82598115","longitude":"-2.76334926955883"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.76334926955883,47.82598115]},"osmID":"7447","wikidataID":"Q12642","level3":"5979d1c36ff9925a108b4570","translateId":"5992973b6ff992e7038b45d3"} +{"_id":{"$oid":"597b1c806ff992f0038b45e4"},"name":"Ath","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.6395044993846","longitude":"3.79267935021567"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.79267935021567,50.6395044993846]},"translateId":"59f8258f6ff9921c048b4b8c"} +{"_id":{"$oid":"597b1c7b6ff992f0038b45e1"},"name":"CORSE-DU-SUD","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"41.87340825","longitude":"9.0087052196875"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.0087052196875,41.87340825]},"osmID":"76932","wikidataID":"Q3336","level3":"5979d1a16ff9925a108b456e","translateId":"5992973d6ff992e7038b45d6"} +{"_id":{"$oid":"597b1c7f6ff992f0038b45e3"},"name":"CORREZE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.3429047","longitude":"1.81764244061206"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.81764244061206,45.3429047]},"osmID":"7464","wikidataID":"Q3326","level3":"5979d1ac6ff9925a108b456f","translateId":"5992973e6ff992e7038b45d8"} +{"_id":{"$oid":"597b1c676ff992f0038b45db"},"name":"FINISTERE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.2452998","longitude":"-4.04403022572015"},"geoPosition":{"type":"Point","float":true,"coordinates":[-4.04403022572015,48.2452998]},"osmID":"102430","wikidataID":"Q3389","level3":"5979d1c36ff9925a108b4570","translateId":"599297396ff992e7038b45d0"} +{"_id":{"$oid":"597b1c826ff992f0038b45e5"},"name":"CREUSE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.0593485","longitude":"2.04890101251091"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.04890101251091,46.0593485]},"osmID":"7459","wikidataID":"Q3353","level3":"5979d1ac6ff9925a108b456f","translateId":"5992973f6ff992e7038b45d9"} +{"_id":{"$oid":"597b1c856ff992f0038b45e6"},"name":"SAONE-ET-LOIRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.6557086","longitude":"4.55855481835173"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.55855481835173,46.6557086]},"osmID":"7397","wikidataID":"Q12736","level3":"5979d1f26ff9925a108b4577","translateId":"5992973f6ff992e7038b45da"} +{"_id":{"$oid":"597b1c966ff992f0038b45ea"},"name":"LOIRET","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.9140388","longitude":"2.30737946206759"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.30737946206759,47.9140388]},"osmID":"7440","wikidataID":"Q12574","level3":"5979d1cd6ff9925a108b4572","translateId":"599297426ff992e7038b45de"} +{"_id":{"$oid":"597b1c8c6ff992f0038b45e8"},"name":"CHARENTE-MARITIME","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.73022675","longitude":"-0.721287587256379"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.721287587256379,45.73022675]},"osmID":"7431","wikidataID":"Q3278","level3":"5979d1ac6ff9925a108b456f","translateId":"599297406ff992e7038b45dc"} +{"_id":{"$oid":"597b1c886ff992f0038b45e7"},"name":"ILLE-ET-VILAINE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.17276805","longitude":"-1.64980924206811"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.64980924206811,48.17276805]},"osmID":"7465","wikidataID":"Q12549","level3":"5979d1c36ff9925a108b4570","translateId":"599297406ff992e7038b45db"} +{"_id":{"$oid":"597b1c8f6ff992f0038b45e9"},"name":"ORNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.57605325","longitude":"0.0446617175958816"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.0446617175958816,48.57605325]},"osmID":"7419","wikidataID":"Q12679","level3":"5979d1c96ff9925a108b4571","translateId":"599297416ff992e7038b45dd"} +{"_id":{"$oid":"597b1c9c6ff992f0038b45eb"},"name":"HAUTE-CORSE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"42.42193005","longitude":"9.10089225686045"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.10089225686045,42.42193005]},"osmID":"76931","wikidataID":"Q3334","level3":"5979d1a16ff9925a108b456e","translateId":"599297436ff992e7038b45df"} +{"_id":{"$oid":"597b1cac6ff992f0038b45ed"},"name":"CHARENTE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.6667902","longitude":"0.0973050440984852"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.0973050440984852,45.6667902]},"osmID":"7428","wikidataID":"Q3266","level3":"5979d1ac6ff9925a108b456f","translateId":"599297446ff992e7038b45e1"} +{"_id":{"$oid":"597b1ca66ff992f0038b45ec"},"name":"MANCHE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.0918952","longitude":"-1.24543706075455"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.24543706075455,49.0918952]},"osmID":"7404","wikidataID":"Q12589","level3":"5979d1c96ff9925a108b4571","translateId":"599297436ff992e7038b45e0"} +{"_id":{"$oid":"597b1cb16ff992f0038b45ee"},"name":"CALVADOS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.09076485","longitude":"-0.24139505722798"},"geoPosition":{"type":"Point","float":true,"coordinates":[-0.24139505722798,49.09076485]},"osmID":"7453","wikidataID":"Q3249","level3":"5979d1c96ff9925a108b4571","translateId":"599297456ff992e7038b45e2"} +{"_id":{"$oid":"597b1cb56ff992f0038b45ef"},"name":"CHER","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.0248824","longitude":"2.57533336066557"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.57533336066557,47.0248824]},"osmID":"7456","wikidataID":"Q3286","level3":"5979d1cd6ff9925a108b4572","translateId":"599297456ff992e7038b45e3"} +{"_id":{"$oid":"597b1cbd6ff992f0038b45f1"},"name":"ESSONNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.53034015","longitude":"2.23929180566817"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.23929180566817,48.53034015]},"osmID":"7401","wikidataID":"Q3368","level3":"5979d18f6ff9925a108b456c","translateId":"599297476ff992e7038b45e5"} +{"_id":{"$oid":"597b1cb96ff992f0038b45f0"},"name":"BOUCHES-DU-RHONE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.54242045","longitude":"5.03433373718415"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.03433373718415,43.54242045]},"osmID":"7393","wikidataID":"Q3240","level3":"5979d1e26ff9925a108b4574","translateId":"599297466ff992e7038b45e4"} +{"_id":{"$oid":"597b1cc26ff992f0038b45f2"},"name":"AVEYRON","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.31585745","longitude":"2.50656973024198"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.50656973024198,44.31585745]},"osmID":"7451","wikidataID":"Q3216","level3":"598412b76ff9920d048b4569","translateId":"599297476ff992e7038b45e6"} +{"_id":{"$oid":"597b1cd16ff992f0038b45f4"},"name":"ARDENNES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.69801175","longitude":"4.67160051824518"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.67160051824518,49.69801175]},"osmID":"7395","wikidataID":"Q3164","level3":"5979d1d46ff9925a108b4573","translateId":"599297496ff992e7038b45e8"} +{"_id":{"$oid":"597b1cca6ff992f0038b45f3"},"name":"VAR","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.4173595","longitude":"6.26728100271036"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.26728100271036,43.4173595]},"osmID":"7390","wikidataID":"Q12789","level3":"5979d1e26ff9925a108b4574","translateId":"599297486ff992e7038b45e7"} +{"_id":{"$oid":"597b1cda6ff992f0038b45f6"},"name":"DROME","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.72964575","longitude":"5.20443694882273"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.20443694882273,44.72964575]},"osmID":"7434","wikidataID":"Q3364","level3":"5979d1fc6ff9925a108b4579","translateId":"5992974a6ff992e7038b45ea"} +{"_id":{"$oid":"597b1cd56ff992f0038b45f5"},"name":"ARDECHE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.815194","longitude":"4.3986524702344"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.3986524702344,44.815194]},"osmID":"7430","wikidataID":"Q3148","level3":"5979d1fc6ff9925a108b4579","translateId":"599297496ff992e7038b45e9"} +{"_id":{"$oid":"597b1cdd6ff992f0038b45f7"},"name":"Mons","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbe86ff9924e088b4568","geo":{"@type":"GeoCoordinates","latitude":"50.46009675","longitude":"3.90903496045664"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.90903496045664,50.46009675]},"osmID":"2372934","wikidataID":"Q94087","translateId":"5992974b6ff992e7038b45eb"} +{"_id":{"$oid":"597b1ce36ff992f0038b45f8"},"name":"HAUTES-ALPES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.6564666","longitude":"6.35254935489728"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.35254935489728,44.6564666]},"osmID":"7436","wikidataID":"Q3125","level3":"5979d1e26ff9925a108b4574","translateId":"5992974b6ff992e7038b45ec"} +{"_id":{"$oid":"597b1ce96ff992f0038b45f9"},"name":"ALPES-MARITIMES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.9210587","longitude":"7.1790785"},"geoPosition":{"type":"Point","float":true,"coordinates":[7.1790785,43.9210587]},"osmID":"7385","wikidataID":"Q3139","level3":"5979d1e26ff9925a108b4574","translateId":"5992974c6ff992e7038b45ed"} +{"_id":{"$oid":"597b1cf06ff992f0038b45fa"},"name":"HAUTE-LOIRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.08572485","longitude":"3.83382611767329"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.83382611767329,45.08572485]},"osmID":"7452","wikidataID":"Q12572","level3":"5979d1fc6ff9925a108b4579","translateId":"5992974d6ff992e7038b45ee"} +{"_id":{"$oid":"597b1cf56ff992f0038b45fb"},"name":"ALPES-DE-HAUTE-PROVENCE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.1640832","longitude":"6.18785153860908"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.18785153860908,44.1640832]},"osmID":"7380","wikidataID":"Q3131","level3":"5979d1e26ff9925a108b4574","translateId":"5992974d6ff992e7038b45ef"} +{"_id":{"$oid":"597b1cfb6ff992f0038b45fc"},"name":"DORDOGNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.14291985","longitude":"0.632125805865104"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.632125805865104,45.14291985]},"osmID":"7375","wikidataID":"Q3357","level3":"5979d1ac6ff9925a108b456f","translateId":"5992974e6ff992e7038b45f0"} +{"_id":{"$oid":"597b1cff6ff992f0038b45fd"},"name":"INDRE-ET-LOIRE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.2232046","longitude":"0.686670252328688"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.686670252328688,47.2232046]},"osmID":"7408","wikidataID":"Q12556","level3":"5979d1cd6ff9925a108b4572","translateId":"5992974f6ff992e7038b45f1"} +{"_id":{"$oid":"597b1d046ff992f0038b45fe"},"name":"ALLIER","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.36746405","longitude":"3.16388284831195"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.16388284831195,46.36746405]},"osmID":"1450201","wikidataID":"Q3113","level3":"5979d1fc6ff9925a108b4579","translateId":"5992974f6ff992e7038b45f2"} +{"_id":{"$oid":"597b1d0b6ff992f0038b45ff"},"name":"AISNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"49.45328545","longitude":"3.60689900359406"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.60689900359406,49.45328545]},"osmID":"7411","wikidataID":"Q3093","level3":"5979d1ed6ff9925a108b4576","translateId":"599297506ff992e7038b45f3"} +{"_id":{"$oid":"597b1d106ff992f0038b4600"},"name":"LOZERE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.5425706","longitude":"3.52111464833333"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.52111464833333,44.5425706]},"osmID":"7421","wikidataID":"Q12580","level3":"598412b76ff9920d048b4569","translateId":"599297516ff992e7038b45f4"} +{"_id":{"$oid":"597b1d1e6ff992f0038b4602"},"name":"Tielt","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6694ef474e068b4569","level3":"5979d1e66ff9925a108b4575","geo":{"@type":"GeoCoordinates","latitude":"50.9406272","longitude":"4.9020687"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.9020687,50.9406272]},"osmID":"3376348655","translateId":"59f8258f6ff9921c048b4b8d"} +{"_id":{"$oid":"597b1d156ff992f0038b4601"},"name":"NORD","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"50.52896715","longitude":"3.08835236944649"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.08835236944649,50.52896715]},"osmID":"7400","wikidataID":"Q12661","level3":"5979d1ed6ff9925a108b4576","translateId":"599297516ff992e7038b45f5"} +{"_id":{"$oid":"597b1d266ff992f0038b4604"},"name":"HERAULT","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.5914424","longitude":"3.35528302489692"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.35528302489692,43.5914424]},"osmID":"7429","wikidataID":"Q12545","level3":"598412b76ff9920d048b4569","translateId":"599297536ff992e7038b45f7"} +{"_id":{"$oid":"597b1d226ff992f0038b4603"},"name":"JURA","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.7833625","longitude":"5.7832857263549"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.7832857263549,46.7833625]},"osmID":"7460","wikidataID":"Q3120","level3":"5979d1f26ff9925a108b4577","translateId":"599297526ff992e7038b45f6"} +{"_id":{"$oid":"597b1d2a6ff992f0038b4605"},"name":"AUBE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.3201921","longitude":"4.19053966150475"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.19053966150475,48.3201921]},"osmID":"7441","wikidataID":"Q3194","level3":"5979d1d46ff9925a108b4573","translateId":"599297546ff992e7038b45f8"} +{"_id":{"$oid":"597b1d2c6ff992f0038b4606"},"name":"VAUCLUSE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.99386435","longitude":"5.18188983890024"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.18188983890024,43.99386435]},"osmID":"7445","wikidataID":"Q12792","level3":"5979d1e26ff9925a108b4574","translateId":"599297546ff992e7038b45f9"} +{"_id":{"$oid":"597b1d326ff992f0038b4607"},"name":"GERS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.6955276","longitude":"0.410101917523799"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.410101917523799,43.6955276]},"osmID":"7422","wikidataID":"Q12517","level3":"598412b76ff9920d048b4569","translateId":"599297556ff992e7038b45fa"} +{"_id":{"$oid":"597b1d376ff992f0038b4608"},"name":"CANTAL","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"45.0497701","longitude":"2.69971756773736"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.69971756773736,45.0497701]},"osmID":"7381","wikidataID":"Q3259","level3":"5979d1fc6ff9925a108b4579","translateId":"599297566ff992e7038b45fb"} +{"_id":{"$oid":"597b1d3a6ff992f0038b4609"},"name":"BAS-RHIN","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.5991783","longitude":"7.53381862433265"},"geoPosition":{"type":"Point","float":true,"coordinates":[7.53381862433265,48.5991783]},"osmID":"7415","wikidataID":"Q12717","level3":"5979d1d46ff9925a108b4573","translateId":"599297566ff992e7038b45fc"} +{"_id":{"$oid":"597b1d3f6ff992f0038b460a"},"name":"HAUTES-PYRENEES","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.1433898","longitude":"0.156435251703084"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.156435251703084,43.1433898]},"osmID":"7467","wikidataID":"Q12700","level3":"598412b76ff9920d048b4569","translateId":"599297576ff992e7038b45fd"} +{"_id":{"$oid":"597b1d416ff992f0038b460b"},"name":"HAUTE-SAVOIE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.06882085","longitude":"6.3445369915871"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.3445369915871,46.06882085]},"osmID":"7407","wikidataID":"Q12751","level3":"5979d1fc6ff9925a108b4579","translateId":"599297586ff992e7038b45fe"} +{"_id":{"$oid":"597b1d456ff992f0038b460c"},"name":"AUDE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.0542733","longitude":"2.51247145749955"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.51247145749955,43.0542733]},"osmID":"7446","wikidataID":"Q3207","level3":"598412b76ff9920d048b4569","translateId":"599297586ff992e7038b45ff"} +{"_id":{"$oid":"597b1d496ff992f0038b460d"},"name":"DOUBS","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"47.06699155","longitude":"6.23562277282045"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.23562277282045,47.06699155]},"osmID":"7462","wikidataID":"Q3361","level3":"5979d1f26ff9925a108b4577","translateId":"599297596ff992e7038b4600"} +{"_id":{"$oid":"597b1d4b6ff992f0038b460e"},"name":"VAL-DE-MARNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"48.77448935","longitude":"2.45433214445882"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.45433214445882,48.77448935]},"osmID":"7458","wikidataID":"Q12788","level3":"5979d18f6ff9925a108b456c","translateId":"599297596ff992e7038b4601"} +{"_id":{"$oid":"597b1d566ff992f0038b4610"},"name":"ARIEGE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"42.9455368","longitude":"1.40655441560655"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.40655441560655,42.9455368]},"osmID":"7439","wikidataID":"Q3184","level3":"598412b76ff9920d048b4569","translateId":"5992975b6ff992e7038b4603"} +{"_id":{"$oid":"597b1d536ff992f0038b460f"},"name":"LOT-ET-GARONNE","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"44.3691703","longitude":"0.453915758324875"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.453915758324875,44.3691703]},"osmID":"1284995","wikidataID":"Q12578","level3":"5979d1ac6ff9925a108b456f","translateId":"5992975a6ff992e7038b4602"} +{"_id":{"$oid":"597b1d596ff992f0038b4611"},"name":"AIN","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"46.06551335","longitude":"5.28478031423462"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.28478031423462,46.06551335]},"osmID":"7387","wikidataID":"Q3083","level3":"5979d1fc6ff9925a108b4579","translateId":"5992975b6ff992e7038b4604"} +{"_id":{"$oid":"59846c0c6ff992f90d8b45d5"},"name":"Philippeville","countryCode":"BE","level":["4"],"level1":"58bd5d5d94ef471f218b4587","level2":"58c12b6294ef474e068b4568","level3":"5979dbf16ff9924e088b456b","geo":{"@type":"GeoCoordinates","latitude":"50.13347245","longitude":"4.57535978235725"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.57535978235725,50.13347245]},"osmID":"1405411","wikidataID":"Q93769","translateId":"5992975d6ff992e7038b4606"} +{"_id":{"$oid":"59edc2186ff99227048b456b"},"name":"Anguilla","countryCode":"AI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"18.1954947","longitude":"-63.0750234"},"geoPosition":{"type":"Point","float":true,"coordinates":[-63.0750234,18.1954947]},"osmID":"2177161","wikidataID":"Q25228","cca3":"AIA","callingCode":["1264"],"translateId":"59edc21a6ff99227048b456c"} +{"_id":{"$oid":"59edc21c6ff99227048b456d"},"name":"Republic of Albania","countryCode":"AL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"41.000028","longitude":"19.9999619"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.9999619,41.000028]},"osmID":"53292","wikidataID":"Q222","cca3":"ALB","callingCode":["355"],"translateId":"59edc21e6ff99227048b456e"} +{"_id":{"$oid":"59edc2206ff99227048b456f"},"name":"United Arab Emirates","countryCode":"AE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"24.0002488","longitude":"53.9994829"},"geoPosition":{"type":"Point","float":true,"coordinates":[53.9994829,24.0002488]},"osmID":"307763","wikidataID":"Q878","cca3":"ARE","callingCode":["971"],"translateId":"59edc2226ff99227048b4570"} +{"_id":{"$oid":"59edc2166ff99227048b4569"},"name":"Republic of Angola","countryCode":"AO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-11.8775768","longitude":"17.5691241"},"geoPosition":{"type":"Point","float":true,"coordinates":[17.5691241,-11.8775768]},"osmID":"195267","wikidataID":"Q916","cca3":"AGO","callingCode":["244"],"translateId":"59edc2186ff99227048b456a"} +{"_id":{"$oid":"59edc2106ff99227048b4567"},"name":"Islamic Republic of Afghanistan","countryCode":"AF","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"33.7680065","longitude":"66.2385139"},"geoPosition":{"type":"Point","float":true,"coordinates":[66.2385139,33.7680065]},"osmID":"303427","wikidataID":"Q889","cca3":"AFG","callingCode":["93"],"translateId":"59edc2136ff99227048b4568"} +{"_id":{"$oid":"59edc22d6ff99227048b4575"},"name":"American Samoa","countryCode":"AS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-14.289304","longitude":"-170.692511"},"geoPosition":{"type":"Point","float":true,"coordinates":[-170.692511,-14.289304]},"osmID":"506535828","wikidataID":"Q16641","cca3":"ASM","callingCode":["1684"],"translateId":"59edc22f6ff99227048b4576"} +{"_id":{"$oid":"59edc22f6ff99227048b4577"},"name":"Antarctica","countryCode":"AQ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-82.1081822","longitude":"34.37824"},"geoPosition":{"type":"Point","float":true,"coordinates":[34.37824,-82.1081822]},"osmID":"506532878","wikidataID":"Q51","cca3":"ATA","translateId":"59edc2316ff99227048b4578"} +{"_id":{"$oid":"59edc22a6ff99227048b4573"},"name":"Republic of Armenia","countryCode":"AM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"40.7696272","longitude":"44.6736646"},"geoPosition":{"type":"Point","float":true,"coordinates":[44.6736646,40.7696272]},"osmID":"364066","wikidataID":"Q399","cca3":"ARM","callingCode":["374"],"translateId":"59edc22c6ff99227048b4574"} +{"_id":{"$oid":"598412b76ff9920d048b4569"},"name":"Occitanie","countryCode":"FR","level":["3"],"level1":"58bd5d6494ef471f218b4588","geo":{"@type":"GeoCoordinates","latitude":"43.6487851","longitude":"2.3435684"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.3435684,43.6487851]},"osmID":"3792883","wikidataID":"Q18678265","translateId":"5992975c6ff992e7038b4605"} +{"_id":{"$oid":"59edc2276ff99227048b4571"},"name":"Argentine Republic","countryCode":"AR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-34.9964963","longitude":"-64.9672817"},"geoPosition":{"type":"Point","float":true,"coordinates":[-64.9672817,-34.9964963]},"osmID":"286393","wikidataID":"Q414","cca3":"ARG","callingCode":["54"],"translateId":"59edc2296ff99227048b4572","ownACity":true} +{"_id":{"$oid":"59edc2336ff99227048b4579"},"name":"Antigua and Barbuda","countryCode":"AG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"17.079128","longitude":"-61.8222516"},"geoPosition":{"type":"Point","float":true,"coordinates":[-61.8222516,17.079128]},"osmID":"536900","wikidataID":"Q781","cca3":"ATG","callingCode":["1268"],"translateId":"59edc2346ff99227048b457a"} +{"_id":{"$oid":"59edc2366ff99227048b457b"},"name":"Commonwealth of Australia","countryCode":"AU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-24.7761086","longitude":"134.755"},"geoPosition":{"type":"Point","float":true,"coordinates":[134.755,-24.7761086]},"osmID":"80500","wikidataID":"Q408","cca3":"AUS","callingCode":["61"],"translateId":"59edc2386ff99227048b457c"} +{"_id":{"$oid":"59edc2406ff99227048b457f"},"name":"Republic of Azerbaijan","countryCode":"AZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"40.3936294","longitude":"47.7872508"},"geoPosition":{"type":"Point","float":true,"coordinates":[47.7872508,40.3936294]},"osmID":"364110","wikidataID":"Q227","cca3":"AZE","callingCode":["994"],"translateId":"59edc2426ff99227048b4580"} +{"_id":{"$oid":"59edc2506ff99227048b4585"},"name":"Republic of Bulgaria","countryCode":"BG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"42.6073975","longitude":"25.4856617"},"geoPosition":{"type":"Point","float":true,"coordinates":[25.4856617,42.6073975]},"osmID":"186382","wikidataID":"Q219","cca3":"BGR","callingCode":["359"],"translateId":"59edc2526ff99227048b4586"} +{"_id":{"$oid":"59edc2536ff99227048b4587"},"name":"Kingdom of Bahrain","countryCode":"BH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"26.1551249","longitude":"50.5344606"},"geoPosition":{"type":"Point","float":true,"coordinates":[50.5344606,26.1551249]},"osmID":"378734","wikidataID":"Q398","cca3":"BHR","callingCode":["973"],"translateId":"59edc2556ff99227048b4588"} +{"_id":{"$oid":"59edc2556ff99227048b4589"},"name":"Commonwealth of the Bahamas","countryCode":"BS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"24.7736546","longitude":"-78.0000547"},"geoPosition":{"type":"Point","float":true,"coordinates":[-78.0000547,24.7736546]},"osmID":"547469","wikidataID":"Q778","cca3":"BHS","callingCode":["1242"],"translateId":"59edc2576ff99227048b458a"} +{"_id":{"$oid":"59edc24c6ff99227048b4583"},"name":"Burkina Faso","countryCode":"BF","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"12.0753083","longitude":"-1.6880314"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.6880314,12.0753083]},"osmID":"192783","wikidataID":"Q965","cca3":"BFA","callingCode":["226"],"translateId":"59edc24d6ff99227048b4584","ownACity":true} +{"_id":{"$oid":"59edc25a6ff99227048b458b"},"name":"Bosnia and Herzegovina","countryCode":"BA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"44.3053476","longitude":"17.5961467"},"geoPosition":{"type":"Point","float":true,"coordinates":[17.5961467,44.3053476]},"osmID":"2528142","wikidataID":"Q225","cca3":"BIH","callingCode":["387"],"translateId":"59edc25b6ff99227048b458c"} +{"_id":{"$oid":"59edc2626ff99227048b458f"},"name":"Belize","countryCode":"BZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"16.8259793","longitude":"-88.7600927"},"geoPosition":{"type":"Point","float":true,"coordinates":[-88.7600927,16.8259793]},"osmID":"287827","wikidataID":"Q242","cca3":"BLZ","callingCode":["501"],"translateId":"59edc2656ff99227048b4590"} +{"_id":{"$oid":"59edc2656ff99227048b4591"},"name":"Bermuda","countryCode":"BM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"32.3018217","longitude":"-64.7603583"},"geoPosition":{"type":"Point","float":true,"coordinates":[-64.7603583,32.3018217]},"osmID":"1993208","wikidataID":"Q23635","cca3":"BMU","callingCode":["1441"],"translateId":"59edc2676ff99227048b4592"} +{"_id":{"$oid":"59edc2466ff99227048b4581"},"name":"Kingdom of Belgium","countryCode":"BE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"50.6407351","longitude":"4.66696"},"geoPosition":{"type":"Point","float":true,"coordinates":[4.66696,50.6407351]},"osmID":"52411","wikidataID":"Q31","cca3":"BEL","callingCode":["32"],"translateId":"59edc2486ff99227048b4582","ownACity":true} +{"_id":{"$oid":"59edc25f6ff99227048b458d"},"name":"Republic of Belarus","countryCode":"BY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"53.4250605","longitude":"27.6971358"},"geoPosition":{"type":"Point","float":true,"coordinates":[27.6971358,53.4250605]},"osmID":"59065","wikidataID":"Q184","cca3":"BLR","callingCode":["375"],"translateId":"59edc2616ff99227048b458e"} +{"_id":{"$oid":"59edc2696ff99227048b4593"},"name":"Plurinational State of Bolivia","countryCode":"BO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-17.0568696","longitude":"-64.9912286"},"geoPosition":{"type":"Point","float":true,"coordinates":[-64.9912286,-17.0568696]},"osmID":"252645","wikidataID":"Q750","cca3":"BOL","callingCode":["591"],"translateId":"59edc26b6ff99227048b4594","ownACity":true} +{"_id":{"$oid":"59edc2726ff99227048b4597"},"name":"Barbados","countryCode":"BB","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.1500331","longitude":"-59.5250305"},"geoPosition":{"type":"Point","float":true,"coordinates":[-59.5250305,13.1500331]},"osmID":"547511","wikidataID":"Q244","cca3":"BRB","callingCode":["1246"],"translateId":"59edc2746ff99227048b4598"} +{"_id":{"$oid":"59edc23d6ff99227048b457d"},"name":"Republic of Austria","countryCode":"AT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"47.2000338","longitude":"13.199959"},"geoPosition":{"type":"Point","float":true,"coordinates":[13.199959,47.2000338]},"osmID":"16239","wikidataID":"Q40","cca3":"AUT","callingCode":["43"],"translateId":"59edc23f6ff99227048b457e"} +{"_id":{"$oid":"59edc2766ff99227048b4599"},"name":"Kingdom of Bhutan","countryCode":"BT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"27.549511","longitude":"90.5119273"},"geoPosition":{"type":"Point","float":true,"coordinates":[90.5119273,27.549511]},"osmID":"184629","wikidataID":"Q917","cca3":"BTN","callingCode":["975"],"translateId":"59edc2786ff99227048b459a"} +{"_id":{"$oid":"59edc2806ff99227048b459d"},"name":"Central African Republic","countryCode":"CF","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"7.0323598","longitude":"19.9981227"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.9981227,7.0323598]},"osmID":"192790","wikidataID":"Q929","cca3":"CAF","callingCode":["236"],"translateId":"59edc2826ff99227048b459e"} +{"_id":{"$oid":"59edc27c6ff99227048b459b"},"name":"Republic of Botswana","countryCode":"BW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-23.1681782","longitude":"24.5928742"},"geoPosition":{"type":"Point","float":true,"coordinates":[24.5928742,-23.1681782]},"osmID":"1889339","wikidataID":"Q963","cca3":"BWA","callingCode":["267"],"translateId":"59edc27e6ff99227048b459c"} +{"_id":{"$oid":"59edc26f6ff99227048b4595"},"name":"Federative Republic of Brazil","countryCode":"BR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-10.3333333","longitude":"-53.2"},"geoPosition":{"type":"Point","float":true,"coordinates":[-53.2,-10.3333333]},"osmID":"59470","wikidataID":"Q155","cca3":"BRA","callingCode":["55"],"translateId":"59edc2716ff99227048b4596","ownACity":true} +{"_id":{"$oid":"59edc2846ff99227048b459f"},"name":"Canada","countryCode":"CA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"61.0666922","longitude":"-107.9917071"},"geoPosition":{"type":"Point","float":true,"coordinates":[-107.9917071,61.0666922]},"osmID":"1428125","wikidataID":"Q16","cca3":"CAN","callingCode":["1"],"translateId":"59edc2876ff99227048b45a0"} +{"_id":{"$oid":"59edc28a6ff99227048b45a1"},"name":"Swiss Confederation","countryCode":"CH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"46.7985624","longitude":"8.2319736"},"geoPosition":{"type":"Point","float":true,"coordinates":[8.2319736,46.7985624]},"osmID":"51701","wikidataID":"Q39","cca3":"CHE","callingCode":["41"],"translateId":"59edc28c6ff99227048b45a2"} +{"_id":{"$oid":"59edc29c6ff99227048b45a7"},"name":"Republic of Côte d'Ivoire","countryCode":"CI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"7.9897371","longitude":"-5.5679458"},"geoPosition":{"type":"Point","float":true,"coordinates":[-5.5679458,7.9897371]},"osmID":"192779","wikidataID":"Q1008","cca3":"CIV","callingCode":["225"],"translateId":"59edc29e6ff99227048b45a8","ownACity":true} +{"_id":{"$oid":"59edc2a16ff99227048b45a9"},"name":"Republic of Cameroon","countryCode":"CM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.6125522","longitude":"13.1535811"},"geoPosition":{"type":"Point","float":true,"coordinates":[13.1535811,4.6125522]},"osmID":"192830","wikidataID":"Q1009","cca3":"CMR","callingCode":["237"],"translateId":"59edc2a36ff99227048b45aa"} +{"_id":{"$oid":"59edc2aa6ff99227048b45ad"},"name":"Republic of the Congo","countryCode":"CG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-0.7264327","longitude":"15.6419155"},"geoPosition":{"type":"Point","float":true,"coordinates":[15.6419155,-0.7264327]},"osmID":"192794","wikidataID":"Q971","cca3":"COG","callingCode":["242"],"translateId":"59edc2ac6ff99227048b45ae"} +{"_id":{"$oid":"59edc2ac6ff99227048b45af"},"name":"Cook Islands","countryCode":"CK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-16.0492781","longitude":"-160.3554851"},"geoPosition":{"type":"Point","float":true,"coordinates":[-160.3554851,-16.0492781]},"osmID":"2184233","wikidataID":"Q26988","cca3":"COK","callingCode":["682"],"translateId":"59edc2ae6ff99227048b45b0"} +{"_id":{"$oid":"59edc2906ff99227048b45a3"},"name":"Republic of Chile","countryCode":"CL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-31.7613365","longitude":"-71.3187697"},"geoPosition":{"type":"Point","float":true,"coordinates":[-71.3187697,-31.7613365]},"osmID":"167454","wikidataID":"Q298","cca3":"CHL","callingCode":["56"],"translateId":"59edc2926ff99227048b45a4","ownACity":true} +{"_id":{"$oid":"59edc2b46ff99227048b45b3"},"name":"Union of the Comoros","countryCode":"KM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-12.2045176","longitude":"44.2832964"},"geoPosition":{"type":"Point","float":true,"coordinates":[44.2832964,-12.2045176]},"osmID":"535790","wikidataID":"Q970","cca3":"COM","callingCode":["269"],"translateId":"59edc2b66ff99227048b45b4"} +{"_id":{"$oid":"59edc2b86ff99227048b45b5"},"name":"Republic of Costa Rica","countryCode":"CR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"10.2735633","longitude":"-84.0739102"},"geoPosition":{"type":"Point","float":true,"coordinates":[-84.0739102,10.2735633]},"osmID":"287667","wikidataID":"Q800","cca3":"CRI","callingCode":["506"],"translateId":"59edc2ba6ff99227048b45b6"} +{"_id":{"$oid":"59edc2a66ff99227048b45ab"},"name":"Democratic Republic of the Congo","countryCode":"CD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-2.9814344","longitude":"23.8222636"},"geoPosition":{"type":"Point","float":true,"coordinates":[23.8222636,-2.9814344]},"osmID":"192795","wikidataID":"Q974","cca3":"COD","callingCode":["243"],"translateId":"59edc2a86ff99227048b45ac"} +{"_id":{"$oid":"59edc2bb6ff99227048b45b7"},"name":"Republic of Cuba","countryCode":"CU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"23.0131338","longitude":"-80.8328748"},"geoPosition":{"type":"Point","float":true,"coordinates":[-80.8328748,23.0131338]},"osmID":"307833","wikidataID":"Q241","cca3":"CUB","callingCode":["53"],"translateId":"59edc2bc6ff99227048b45b8"} +{"_id":{"$oid":"59edc2b16ff99227048b45b1"},"name":"Republic of Colombia","countryCode":"CO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"2.8894434","longitude":"-73.783892"},"geoPosition":{"type":"Point","float":true,"coordinates":[-73.783892,2.8894434]},"osmID":"120027","wikidataID":"Q739","cca3":"COL","callingCode":["57"],"translateId":"59edc2b36ff99227048b45b2"} +{"_id":{"$oid":"59edc2bf6ff99227048b45b9"},"name":"Cayman Islands","countryCode":"KY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"19.5417212","longitude":"-80.5667132"},"geoPosition":{"type":"Point","float":true,"coordinates":[-80.5667132,19.5417212]},"osmID":"2185366","wikidataID":"Q5785","cca3":"CYM","callingCode":["1345"],"translateId":"59edc2c06ff99227048b45ba"} +{"_id":{"$oid":"59edc2986ff99227048b45a5"},"name":"People's Republic of China","countryCode":"CN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"35.000074","longitude":"104.999927"},"geoPosition":{"type":"Point","float":true,"coordinates":[104.999927,35.000074]},"osmID":"270056","wikidataID":"Q148","cca3":"CHN","callingCode":["86"],"translateId":"59edc29a6ff99227048b45a6"} +{"_id":{"$oid":"59edc2c16ff99227048b45bb"},"name":"Republic of Cyprus","countryCode":"CY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"35.1695632","longitude":"33.1396402839342"},"geoPosition":{"type":"Point","float":true,"coordinates":[33.1396402839342,35.1695632]},"osmID":"307787","wikidataID":"Q229","cca3":"CYP","callingCode":["357"],"translateId":"59edc2c36ff99227048b45bc"} +{"_id":{"$oid":"59edc2ce6ff99227048b45bf"},"name":"Commonwealth of Dominica","countryCode":"DM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"15.4113138","longitude":"-61.3653618"},"geoPosition":{"type":"Point","float":true,"coordinates":[-61.3653618,15.4113138]},"osmID":"307823","wikidataID":"Q784","cca3":"DMA","callingCode":["1767"],"translateId":"59edc2cf6ff99227048b45c0"} +{"_id":{"$oid":"59edc2d16ff99227048b45c1"},"name":"Dominican Republic","countryCode":"DO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"19.0974031","longitude":"-70.3028026"},"geoPosition":{"type":"Point","float":true,"coordinates":[-70.3028026,19.0974031]},"osmID":"307828","wikidataID":"Q786","cca3":"DOM","callingCode":["1809","1829","1849"],"translateId":"59edc2d36ff99227048b45c2"} +{"_id":{"$oid":"59edc2d56ff99227048b45c3"},"name":"People's Democratic Republic of Algeria","countryCode":"DZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"28.0000272","longitude":"2.9999825"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.9999825,28.0000272]},"osmID":"192756","wikidataID":"Q262","cca3":"DZA","callingCode":["213"],"translateId":"59edc2d66ff99227048b45c4"} +{"_id":{"$oid":"59edc2c96ff99227048b45bd"},"name":"Czech Republic","countryCode":"CZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"49.8167003","longitude":"15.4749544"},"geoPosition":{"type":"Point","float":true,"coordinates":[15.4749544,49.8167003]},"osmID":"51684","wikidataID":"Q213","cca3":"CZE","callingCode":["420"],"translateId":"59edc2cb6ff99227048b45be"} +{"_id":{"$oid":"59edc2d86ff99227048b45c5"},"name":"Republic of Ecuador","countryCode":"EC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-1.3397668","longitude":"-79.3666965"},"geoPosition":{"type":"Point","float":true,"coordinates":[-79.3666965,-1.3397668]},"osmID":"108089","wikidataID":"Q736","cca3":"ECU","callingCode":["593"],"translateId":"59edc2da6ff99227048b45c6"} +{"_id":{"$oid":"59edc2dc6ff99227048b45c7"},"name":"Arab Republic of Egypt","countryCode":"EG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"26.2540493","longitude":"29.2675469"},"geoPosition":{"type":"Point","float":true,"coordinates":[29.2675469,26.2540493]},"osmID":"1473947","wikidataID":"Q79","cca3":"EGY","callingCode":["20"],"translateId":"59edc2de6ff99227048b45c8"} +{"_id":{"$oid":"59edc2df6ff99227048b45c9"},"name":"State of Eritrea","countryCode":"ER","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"15.9500319","longitude":"37.9999668"},"geoPosition":{"type":"Point","float":true,"coordinates":[37.9999668,15.9500319]},"osmID":"296961","wikidataID":"Q986","cca3":"ERI","callingCode":["291"],"translateId":"59edc2e16ff99227048b45ca"} +{"_id":{"$oid":"59edc2e26ff99227048b45cb"},"name":"Sahrawi Arab Democratic Republic","countryCode":"EH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"23.55021135","longitude":"-12.93110195"},"geoPosition":{"type":"Point","float":true,"coordinates":[-12.93110195,23.55021135]},"osmID":"5441968","wikidataID":"Q40362","cca3":"ESH","callingCode":["212"],"translateId":"59edc2e46ff99227048b45cc"} +{"_id":{"$oid":"59edc2ea6ff99227048b45cf"},"name":"Republic of Estonia","countryCode":"EE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"58.7523778","longitude":"25.3319078"},"geoPosition":{"type":"Point","float":true,"coordinates":[25.3319078,58.7523778]},"osmID":"79510","wikidataID":"Q191","cca3":"EST","callingCode":["372"],"translateId":"59edc2eb6ff99227048b45d0"} +{"_id":{"$oid":"59edc2e66ff99227048b45cd"},"name":"Kingdom of Spain","countryCode":"ES","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"40.0028028","longitude":"-4.003104"},"geoPosition":{"type":"Point","float":true,"coordinates":[-4.003104,40.0028028]},"osmID":"1311341","wikidataID":"Q29","cca3":"ESP","callingCode":["34"],"translateId":"59edc2e86ff99227048b45ce","ownACity":true} +{"_id":{"$oid":"59edc2f16ff99227048b45d3"},"name":"Republic of Finland","countryCode":"FI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"63.2467777","longitude":"25.9209164"},"geoPosition":{"type":"Point","float":true,"coordinates":[25.9209164,63.2467777]},"osmID":"54224","wikidataID":"Q33","cca3":"FIN","callingCode":["358"],"translateId":"59edc2f36ff99227048b45d4"} +{"_id":{"$oid":"59edc2ed6ff99227048b45d1"},"name":"Federal Democratic Republic of Ethiopia","countryCode":"ET","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"10.2116702","longitude":"38.6521203"},"geoPosition":{"type":"Point","float":true,"coordinates":[38.6521203,10.2116702]},"osmID":"192800","wikidataID":"Q115","cca3":"ETH","callingCode":["251"],"translateId":"59edc2ef6ff99227048b45d2"} +{"_id":{"$oid":"59edc2f56ff99227048b45d5"},"name":"Falkland Islands","countryCode":"FK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-51.9666424","longitude":"-59.5500387"},"geoPosition":{"type":"Point","float":true,"coordinates":[-59.5500387,-51.9666424]},"osmID":"2185374","wikidataID":"Q9648","cca3":"FLK","callingCode":["500"],"translateId":"59edc2f66ff99227048b45d6"} +{"_id":{"$oid":"59edc2f86ff99227048b45d7"},"name":"Faroe Islands","countryCode":"FO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"62.0448724","longitude":"-7.0322972"},"geoPosition":{"type":"Point","float":true,"coordinates":[-7.0322972,62.0448724]},"osmID":"52939","wikidataID":"Q4628","cca3":"FRO","callingCode":["298"],"translateId":"59edc2f96ff99227048b45d8"} +{"_id":{"$oid":"59edc2fb6ff99227048b45d9"},"name":"Federated States of Micronesia","countryCode":"FM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"5.5600565","longitude":"150.1982846"},"geoPosition":{"type":"Point","float":true,"coordinates":[150.1982846,5.5600565]},"osmID":"571802","wikidataID":"Q702","cca3":"FSM","callingCode":["691"],"translateId":"59edc2fd6ff99227048b45da"} +{"_id":{"$oid":"59edc2fe6ff99227048b45db"},"name":"Gabonese Republic","countryCode":"GA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-0.8999695","longitude":"11.6899699"},"geoPosition":{"type":"Point","float":true,"coordinates":[11.6899699,-0.8999695]},"osmID":"192793","wikidataID":"Q1000","cca3":"GAB","callingCode":["241"],"translateId":"59edc3006ff99227048b45dc"} +{"_id":{"$oid":"59edc3086ff99227048b45e1"},"name":"Bailiwick of Guernsey","countryCode":"GG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"49.580437","longitude":"-2.484854"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.484854,49.580437]},"osmID":"270009","wikidataID":"Q25230","cca3":"GGY","callingCode":["44"],"translateId":"59edc30a6ff99227048b45e2"} +{"_id":{"$oid":"59edc3026ff99227048b45dd"},"name":"United Kingdom of Great Britain and Northern Ireland","countryCode":"GB","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"54.7023545","longitude":"-3.2765753"},"geoPosition":{"type":"Point","float":true,"coordinates":[-3.2765753,54.7023545]},"osmID":"62149","wikidataID":"Q145","cca3":"GBR","callingCode":["44"],"translateId":"59edc3046ff99227048b45de","ownACity":true} +{"_id":{"$oid":"59edc3066ff99227048b45df"},"name":"Georgia","countryCode":"GE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"41.6809707","longitude":"44.0287382"},"geoPosition":{"type":"Point","float":true,"coordinates":[44.0287382,41.6809707]},"osmID":"28699","wikidataID":"Q230","cca3":"GEO","callingCode":["995"],"translateId":"59edc3086ff99227048b45e0"} +{"_id":{"$oid":"59edc30e6ff99227048b45e5"},"name":"Gibraltar","countryCode":"GI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"36.10674695","longitude":"-5.33527718348356"},"geoPosition":{"type":"Point","float":true,"coordinates":[-5.33527718348356,36.10674695]},"osmID":"1278736","wikidataID":"Q1410","cca3":"GIB","callingCode":["350"],"translateId":"59edc3106ff99227048b45e6"} +{"_id":{"$oid":"59edc3166ff99227048b45e7"},"name":"Grenada","countryCode":"GD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"12.1360374","longitude":"-61.6904045"},"geoPosition":{"type":"Point","float":true,"coordinates":[-61.6904045,12.1360374]},"osmID":"550727","wikidataID":"Q769","cca3":"GRD","callingCode":["1473"],"translateId":"59edc3186ff99227048b45e8"} +{"_id":{"$oid":"59edc3196ff99227048b45e9"},"name":"Greenland","countryCode":"GL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"77.6192349","longitude":"-42.8125967"},"geoPosition":{"type":"Point","float":true,"coordinates":[-42.8125967,77.6192349]},"osmID":"2184073","wikidataID":"Q223","cca3":"GRL","callingCode":["299"],"translateId":"59edc31a6ff99227048b45ea"} +{"_id":{"$oid":"59edc30c6ff99227048b45e3"},"name":"Republic of Ghana","countryCode":"GH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.0300284","longitude":"-1.0800271"},"geoPosition":{"type":"Point","float":true,"coordinates":[-1.0800271,8.0300284]},"osmID":"192781","wikidataID":"Q117","cca3":"GHA","callingCode":["233"],"translateId":"59edc30e6ff99227048b45e4"} +{"_id":{"$oid":"59edc3236ff99227048b45eb"},"name":"Republic of Croatia","countryCode":"HR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"45.5643442","longitude":"17.0118954"},"geoPosition":{"type":"Point","float":true,"coordinates":[17.0118954,45.5643442]},"osmID":"214885","wikidataID":"Q224","cca3":"HRV","callingCode":["385"],"translateId":"59edc3256ff99227048b45ec"} +{"_id":{"$oid":"59edc3266ff99227048b45ed"},"name":"Republic of Haiti","countryCode":"HT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"19.1399952","longitude":"-72.3570972"},"geoPosition":{"type":"Point","float":true,"coordinates":[-72.3570972,19.1399952]},"osmID":"307829","wikidataID":"Q790","cca3":"HTI","callingCode":["509"],"translateId":"59edc3286ff99227048b45ee"} +{"_id":{"$oid":"59edc3316ff99227048b45f3"},"name":"Isle of Man","countryCode":"IM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"54.1936805","longitude":"-4.5591148"},"geoPosition":{"type":"Point","float":true,"coordinates":[-4.5591148,54.1936805]},"osmID":"62269","wikidataID":"Q9676","cca3":"IMN","callingCode":["44"],"translateId":"59edc3336ff99227048b45f4"} +{"_id":{"$oid":"59edc3396ff99227048b45f7"},"name":"British Indian Ocean Territory","countryCode":"IO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-6.4157192","longitude":"72.1173961"},"geoPosition":{"type":"Point","float":true,"coordinates":[72.1173961,-6.4157192]},"osmID":"1993867","wikidataID":"Q43448","cca3":"IOT","callingCode":["246"],"translateId":"59edc33b6ff99227048b45f8"} +{"_id":{"$oid":"59edc32e6ff99227048b45f1"},"name":"Republic of Indonesia","countryCode":"ID","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-4.7993356","longitude":"114.5632032"},"geoPosition":{"type":"Point","float":true,"coordinates":[114.5632032,-4.7993356]},"osmID":"304751","wikidataID":"Q252","cca3":"IDN","callingCode":["62"],"translateId":"59edc3306ff99227048b45f2","ownACity":true} +{"_id":{"$oid":"59edc32b6ff99227048b45ef"},"name":"Hungary","countryCode":"HU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"47.1817585","longitude":"19.5060937"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.5060937,47.1817585]},"osmID":"21335","wikidataID":"Q28","cca3":"HUN","callingCode":["36"],"translateId":"59edc32d6ff99227048b45f0"} +{"_id":{"$oid":"59edc33d6ff99227048b45f9"},"name":"Republic of Ireland","countryCode":"IE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"52.865196","longitude":"-7.9794599"},"geoPosition":{"type":"Point","float":true,"coordinates":[-7.9794599,52.865196]},"osmID":"62273","wikidataID":"Q27","cca3":"IRL","callingCode":["353"],"translateId":"59edc33f6ff99227048b45fa"} +{"_id":{"$oid":"59edc3366ff99227048b45f5"},"name":"Republic of India","countryCode":"IN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"22.3511148","longitude":"78.6677428"},"geoPosition":{"type":"Point","float":true,"coordinates":[78.6677428,22.3511148]},"osmID":"304716","wikidataID":"Q668","cca3":"IND","callingCode":["91"],"translateId":"59edc3396ff99227048b45f6","ownACity":true} +{"_id":{"$oid":"59edc34a6ff99227048b45ff"},"name":"Iceland","countryCode":"IS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"64.9841821","longitude":"-18.1059013"},"geoPosition":{"type":"Point","float":true,"coordinates":[-18.1059013,64.9841821]},"osmID":"299133","wikidataID":"Q189","cca3":"ISL","callingCode":["354"],"translateId":"59edc34c6ff99227048b4600"} +{"_id":{"$oid":"59edc3516ff99227048b4603"},"name":"Jamaica","countryCode":"JM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"18.1850507","longitude":"-77.3947693"},"geoPosition":{"type":"Point","float":true,"coordinates":[-77.3947693,18.1850507]},"osmID":"555017","wikidataID":"Q766","cca3":"JAM","callingCode":["1876"],"translateId":"59edc3536ff99227048b4604","ownACity":true} +{"_id":{"$oid":"59edc3546ff99227048b4605"},"name":"Bailiwick of Jersey","countryCode":"JE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"49.2214561","longitude":"-2.1358386"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.1358386,49.2214561]},"osmID":"367988","wikidataID":"Q785","cca3":"JEY","callingCode":["44"],"translateId":"59edc3556ff99227048b4606"} +{"_id":{"$oid":"59edc3576ff99227048b4607"},"name":"Hashemite Kingdom of Jordan","countryCode":"JO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"31.1667049","longitude":"36.941628"},"geoPosition":{"type":"Point","float":true,"coordinates":[36.941628,31.1667049]},"osmID":"184818","wikidataID":"Q810","cca3":"JOR","callingCode":["962"],"translateId":"59edc3596ff99227048b4608"} +{"_id":{"$oid":"59edc34e6ff99227048b4601"},"name":"State of Israel","countryCode":"IL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"30.8760272","longitude":"35.0015196"},"geoPosition":{"type":"Point","float":true,"coordinates":[35.0015196,30.8760272]},"osmID":"1473946","wikidataID":"Q801","cca3":"ISR","callingCode":["972"],"translateId":"59edc3506ff99227048b4602"} +{"_id":{"$oid":"59edc3476ff99227048b45fd"},"name":"Republic of Iraq","countryCode":"IQ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"33.0955793","longitude":"44.1749775"},"geoPosition":{"type":"Point","float":true,"coordinates":[44.1749775,33.0955793]},"osmID":"304934","wikidataID":"Q796","cca3":"IRQ","callingCode":["964"],"translateId":"59edc3496ff99227048b45fe"} +{"_id":{"$oid":"59edc35b6ff99227048b4609"},"name":"Japan","countryCode":"JP","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"36.5748441","longitude":"139.2394179"},"geoPosition":{"type":"Point","float":true,"coordinates":[139.2394179,36.5748441]},"osmID":"382313","wikidataID":"Q17","cca3":"JPN","callingCode":["81"],"translateId":"59edc35d6ff99227048b460a"} +{"_id":{"$oid":"59edc3676ff99227048b460d"},"name":"Republic of Kenya","countryCode":"KE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"1.4419683","longitude":"38.4313975"},"geoPosition":{"type":"Point","float":true,"coordinates":[38.4313975,1.4419683]},"osmID":"192798","wikidataID":"Q114","cca3":"KEN","callingCode":["254"],"translateId":"59edc3686ff99227048b460e"} +{"_id":{"$oid":"59edc3706ff99227048b4611"},"name":"Republic of Korea","countryCode":"KR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"36.5581914","longitude":"127.9408564"},"geoPosition":{"type":"Point","float":true,"coordinates":[127.9408564,36.5581914]},"osmID":"307756","wikidataID":"Q884","cca3":"KOR","callingCode":["82"],"translateId":"59edc3726ff99227048b4612"} +{"_id":{"$oid":"59edc3426ff99227048b45fb"},"name":"Islamic Republic of Iran","countryCode":"IR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"32.9407496","longitude":"52.9471344"},"geoPosition":{"type":"Point","float":true,"coordinates":[52.9471344,32.9407496]},"osmID":"304938","wikidataID":"Q794","cca3":"IRN","callingCode":["98"],"translateId":"59edc3446ff99227048b45fc"} +{"_id":{"$oid":"59edc3746ff99227048b4613"},"name":"Republic of Kosovo","countryCode":"XK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"42.5869578","longitude":"20.9021231"},"geoPosition":{"type":"Point","float":true,"coordinates":[20.9021231,42.5869578]},"osmID":"2088990","wikidataID":"Q1246","cca3":"UNK","callingCode":["383"],"translateId":"59edc3756ff99227048b4614"} +{"_id":{"$oid":"59edc36c6ff99227048b460f"},"name":"Kingdom of Cambodia","countryCode":"KH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.5066394","longitude":"104.869423"},"geoPosition":{"type":"Point","float":true,"coordinates":[104.869423,13.5066394]},"osmID":"49898","wikidataID":"Q424","cca3":"KHM","callingCode":["855"],"translateId":"59edc36e6ff99227048b4610"} +{"_id":{"$oid":"59edc3766ff99227048b4615"},"name":"State of Kuwait","countryCode":"KW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"29.2733964","longitude":"47.4979476"},"geoPosition":{"type":"Point","float":true,"coordinates":[47.4979476,29.2733964]},"osmID":"305099","wikidataID":"Q817","cca3":"KWT","callingCode":["965"],"translateId":"59edc3786ff99227048b4616"} +{"_id":{"$oid":"59edc3836ff99227048b461b"},"name":"Saint Lucia","countryCode":"LC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.8250489","longitude":"-60.975036"},"geoPosition":{"type":"Point","float":true,"coordinates":[-60.975036,13.8250489]},"osmID":"550728","wikidataID":"Q760","cca3":"LCA","callingCode":["1758"],"translateId":"59edc3856ff99227048b461c"} +{"_id":{"$oid":"59edc3646ff99227048b460b"},"name":"Republic of Kazakhstan","countryCode":"KZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"47.2286086","longitude":"65.2093197"},"geoPosition":{"type":"Point","float":true,"coordinates":[65.2093197,47.2286086]},"osmID":"214665","wikidataID":"Q232","cca3":"KAZ","callingCode":["76","77"],"translateId":"59edc3656ff99227048b460c"} +{"_id":{"$oid":"59edc3806ff99227048b4619"},"name":"Republic of Liberia","countryCode":"LR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"5.7499721","longitude":"-9.3658524"},"geoPosition":{"type":"Point","float":true,"coordinates":[-9.3658524,5.7499721]},"osmID":"192780","wikidataID":"Q1014","cca3":"LBR","callingCode":["231"],"translateId":"59edc3826ff99227048b461a"} +{"_id":{"$oid":"59edc3866ff99227048b461d"},"name":"Principality of Liechtenstein","countryCode":"LI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"47.1416307","longitude":"9.5531527"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.5531527,47.1416307]},"osmID":"1155955","wikidataID":"Q347","cca3":"LIE","callingCode":["423"],"translateId":"59edc3886ff99227048b461e"} +{"_id":{"$oid":"59edc37b6ff99227048b4617"},"name":"Lao People's Democratic Republic","countryCode":"LA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"20.0171109","longitude":"103.378253"},"geoPosition":{"type":"Point","float":true,"coordinates":[103.378253,20.0171109]},"osmID":"49903","wikidataID":"Q819","cca3":"LAO","callingCode":["856"],"translateId":"59edc37d6ff99227048b4618"} +{"_id":{"$oid":"59edc38b6ff99227048b461f"},"name":"Kingdom of Lesotho","countryCode":"LS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-29.6039267","longitude":"28.3350193"},"geoPosition":{"type":"Point","float":true,"coordinates":[28.3350193,-29.6039267]},"osmID":"2093234","wikidataID":"Q1013","cca3":"LSO","callingCode":["266"],"translateId":"59edc38d6ff99227048b4620"} +{"_id":{"$oid":"59edc3a06ff99227048b4627"},"name":"Principality of Monaco","countryCode":"MC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"43.63071345","longitude":"7.47616101640138"},"geoPosition":{"type":"Point","float":true,"coordinates":[7.47616101640138,43.63071345]},"osmID":"1124039","wikidataID":"Q235","cca3":"MCO","callingCode":["377"],"translateId":"59edc3a26ff99227048b4628"} +{"_id":{"$oid":"59edc3916ff99227048b4621"},"name":"Republic of Lithuania","countryCode":"LT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"55.3500003","longitude":"23.7499997"},"geoPosition":{"type":"Point","float":true,"coordinates":[23.7499997,55.3500003]},"osmID":"72596","wikidataID":"Q37","cca3":"LTU","callingCode":["370"],"translateId":"59edc3936ff99227048b4622"} +{"_id":{"$oid":"59edc3a66ff99227048b462b"},"name":"Republic of Madagascar","countryCode":"MG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-18.9249604","longitude":"46.4416422"},"geoPosition":{"type":"Point","float":true,"coordinates":[46.4416422,-18.9249604]},"osmID":"447325","wikidataID":"Q1019","cca3":"MDG","callingCode":["261"],"translateId":"59edc3a86ff99227048b462c","ownACity":true} +{"_id":{"$oid":"59edc3a36ff99227048b4629"},"name":"Republic of Moldova","countryCode":"MD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"47.286747","longitude":"28.5110236"},"geoPosition":{"type":"Point","float":true,"coordinates":[28.5110236,47.286747]},"osmID":"58974","wikidataID":"Q217","cca3":"MDA","callingCode":["373"],"translateId":"59edc3a56ff99227048b462a"} +{"_id":{"$oid":"59edc3956ff99227048b4623"},"name":"Grand Duchy of Luxembourg","countryCode":"LU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"49.8158683","longitude":"6.1296751"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.1296751,49.8158683]},"osmID":"2171347","wikidataID":"Q32","cca3":"LUX","callingCode":["352"],"translateId":"59edc3976ff99227048b4624"} +{"_id":{"$oid":"59edc39b6ff99227048b4625"},"name":"Republic of Latvia","countryCode":"LV","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"56.8406494","longitude":"24.7537645"},"geoPosition":{"type":"Point","float":true,"coordinates":[24.7537645,56.8406494]},"osmID":"72594","wikidataID":"Q211","cca3":"LVA","callingCode":["371"],"translateId":"59edc39c6ff99227048b4626"} +{"_id":{"$oid":"59edc3b46ff99227048b462f"},"name":"Republic of Macedonia","countryCode":"MK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"41.6171214","longitude":"21.7168387"},"geoPosition":{"type":"Point","float":true,"coordinates":[21.7168387,41.6171214]},"osmID":"53293","wikidataID":"Q221","cca3":"MKD","callingCode":["389"],"translateId":"59edc3b66ff99227048b4630"} +{"_id":{"$oid":"59edc3be6ff99227048b4633"},"name":"Montenegro","countryCode":"ME","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"42.7728491","longitude":"19.2408586"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.2408586,42.7728491]},"osmID":"53296","wikidataID":"Q236","cca3":"MNE","callingCode":["382"],"translateId":"59edc3c06ff99227048b4634"} +{"_id":{"$oid":"59edc3b96ff99227048b4631"},"name":"Republic of Mali","countryCode":"ML","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"16.3700359","longitude":"-2.2900239"},"geoPosition":{"type":"Point","float":true,"coordinates":[-2.2900239,16.3700359]},"osmID":"192785","wikidataID":"Q912","cca3":"MLI","callingCode":["223"],"translateId":"59edc3ba6ff99227048b4632"} +{"_id":{"$oid":"59edc3c26ff99227048b4635"},"name":"Mongolia","countryCode":"MN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"46.8250388","longitude":"103.8499736"},"geoPosition":{"type":"Point","float":true,"coordinates":[103.8499736,46.8250388]},"osmID":"161033","wikidataID":"Q711","cca3":"MNG","callingCode":["976"],"translateId":"59edc3c36ff99227048b4636"} +{"_id":{"$oid":"59edc3c96ff99227048b4639"},"name":"Montserrat","countryCode":"MS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"16.7417041","longitude":"-62.1916844"},"geoPosition":{"type":"Point","float":true,"coordinates":[-62.1916844,16.7417041]},"osmID":"537257","wikidataID":"Q13353","cca3":"MSR","callingCode":["1664"],"translateId":"59edc3cb6ff99227048b463a"} +{"_id":{"$oid":"59edc3c76ff99227048b4637"},"name":"Islamic Republic of Mauritania","countryCode":"MR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"20.2540382","longitude":"-9.2399263"},"geoPosition":{"type":"Point","float":true,"coordinates":[-9.2399263,20.2540382]},"osmID":"192763","wikidataID":"Q1025","cca3":"MRT","callingCode":["222"],"translateId":"59edc3c96ff99227048b4638"} +{"_id":{"$oid":"59edc3cc6ff99227048b463b"},"name":"Republic of Mauritius","countryCode":"MU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-20.2759451","longitude":"57.5703566"},"geoPosition":{"type":"Point","float":true,"coordinates":[57.5703566,-20.2759451]},"osmID":"535828","wikidataID":"Q1027","cca3":"MUS","callingCode":["230"],"translateId":"59edc3ce6ff99227048b463c"} +{"_id":{"$oid":"59edc3d46ff99227048b463f"},"name":"Malaysia","countryCode":"MY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.5693754","longitude":"102.2656823"},"geoPosition":{"type":"Point","float":true,"coordinates":[102.2656823,4.5693754]},"osmID":"2108121","wikidataID":"Q833","cca3":"MYS","callingCode":["60"],"translateId":"59edc3d66ff99227048b4640"} +{"_id":{"$oid":"59edc3d06ff99227048b463d"},"name":"Republic of Malawi","countryCode":"MW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-13.2687204","longitude":"33.9301963"},"geoPosition":{"type":"Point","float":true,"coordinates":[33.9301963,-13.2687204]},"osmID":"195290","wikidataID":"Q1020","cca3":"MWI","callingCode":["265"],"translateId":"59edc3d26ff99227048b463e"} +{"_id":{"$oid":"59edc3af6ff99227048b462d"},"name":"United Mexican States","countryCode":"MX","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"22.5000485","longitude":"-100.0000375"},"geoPosition":{"type":"Point","float":true,"coordinates":[-100.0000375,22.5000485]},"osmID":"114686","wikidataID":"Q96","cca3":"MEX","callingCode":["52"],"translateId":"59edc3b16ff99227048b462e"} +{"_id":{"$oid":"59edc3df6ff99227048b4643"},"name":"Republic of Niger","countryCode":"NE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"17.7356214","longitude":"9.3238432"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.3238432,17.7356214]},"osmID":"192786","wikidataID":"Q1032","cca3":"NER","callingCode":["227"],"translateId":"59edc3e16ff99227048b4644"} +{"_id":{"$oid":"59edc3da6ff99227048b4641"},"name":"Republic of Namibia","countryCode":"NA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-23.2335499","longitude":"17.3231107"},"geoPosition":{"type":"Point","float":true,"coordinates":[17.3231107,-23.2335499]},"osmID":"195266","wikidataID":"Q1030","cca3":"NAM","callingCode":["264"],"translateId":"59edc3dc6ff99227048b4642"} +{"_id":{"$oid":"59edc3e56ff99227048b4645"},"name":"Federal Republic of Nigeria","countryCode":"NG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"9.6000359","longitude":"7.9999721"},"geoPosition":{"type":"Point","float":true,"coordinates":[7.9999721,9.6000359]},"osmID":"192787","wikidataID":"Q1033","cca3":"NGA","callingCode":["234"],"translateId":"59edc3e66ff99227048b4646"} +{"_id":{"$oid":"59edc3e86ff99227048b4647"},"name":"Niue","countryCode":"NU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-19.0536414","longitude":"-169.8613411"},"geoPosition":{"type":"Point","float":true,"coordinates":[-169.8613411,-19.0536414]},"osmID":"1558556","wikidataID":"Q34020","cca3":"NIU","callingCode":["683"],"translateId":"59edc3e96ff99227048b4648"} +{"_id":{"$oid":"59edc3f06ff99227048b464b"},"name":"Kingdom of Norway","countryCode":"NO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"60.5000209","longitude":"9.0999715"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.0999715,60.5000209]},"osmID":"2978650","wikidataID":"Q20","cca3":"NOR","callingCode":["47"],"translateId":"59edc3f26ff99227048b464c"} +{"_id":{"$oid":"59edc3f36ff99227048b464d"},"name":"Republic of Nauru","countryCode":"NR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-0.5249624","longitude":"166.9333009"},"geoPosition":{"type":"Point","float":true,"coordinates":[166.9333009,-0.5249624]},"osmID":"571804","wikidataID":"Q697","cca3":"NRU","callingCode":["674"],"translateId":"59edc3f56ff99227048b464e"} +{"_id":{"$oid":"59edc3ed6ff99227048b4649"},"name":"Netherlands","countryCode":"NL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"52.5001698","longitude":"5.7480821"},"geoPosition":{"type":"Point","float":true,"coordinates":[5.7480821,52.5001698]},"osmID":"2323309","wikidataID":"Q29999","cca3":"NLD","callingCode":["31"],"translateId":"59edc3ee6ff99227048b464a","ownACity":true} +{"_id":{"$oid":"59edc3fa6ff99227048b4651"},"name":"Sultanate of Oman","countryCode":"OM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"21.0000287","longitude":"57.0036901"},"geoPosition":{"type":"Point","float":true,"coordinates":[57.0036901,21.0000287]},"osmID":"305138","wikidataID":"Q842","cca3":"OMN","callingCode":["968"],"translateId":"59edc3fc6ff99227048b4652"} +{"_id":{"$oid":"59edc3f76ff99227048b464f"},"name":"New Zealand","countryCode":"NZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-41.5000831","longitude":"172.8344077"},"geoPosition":{"type":"Point","float":true,"coordinates":[172.8344077,-41.5000831]},"osmID":"556706","wikidataID":"Q664","cca3":"NZL","callingCode":["64"],"translateId":"59edc3f96ff99227048b4650"} +{"_id":{"$oid":"59edc4036ff99227048b4655"},"name":"Republic of Panama","countryCode":"PA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.3096067","longitude":"-81.3066246"},"geoPosition":{"type":"Point","float":true,"coordinates":[-81.3066246,8.3096067]},"osmID":"287668","wikidataID":"Q804","cca3":"PAN","callingCode":["507"],"translateId":"59edc4056ff99227048b4656"} +{"_id":{"$oid":"59edc4006ff99227048b4653"},"name":"Islamic Republic of Pakistan","countryCode":"PK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"30.3308401","longitude":"71.247499"},"geoPosition":{"type":"Point","float":true,"coordinates":[71.247499,30.3308401]},"osmID":"307573","wikidataID":"Q843","cca3":"PAK","callingCode":["92"],"translateId":"59edc4026ff99227048b4654"} +{"_id":{"$oid":"59edc4156ff99227048b465b"},"name":"Democratic People's Republic of Korea","countryCode":"KP","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"40.3736611","longitude":"127.0870417"},"geoPosition":{"type":"Point","float":true,"coordinates":[127.0870417,40.3736611]},"osmID":"192734","wikidataID":"Q423","cca3":"PRK","callingCode":["850"],"translateId":"59edc4176ff99227048b465c"} +{"_id":{"$oid":"59edc4096ff99227048b4657"},"name":"Republic of Peru","countryCode":"PE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-6.8699697","longitude":"-75.0458515"},"geoPosition":{"type":"Point","float":true,"coordinates":[-75.0458515,-6.8699697]},"osmID":"288247","wikidataID":"Q419","cca3":"PER","callingCode":["51"],"translateId":"59edc40b6ff99227048b4658","ownACity":true} +{"_id":{"$oid":"59edc4216ff99227048b4661"},"name":"Réunion Island","countryCode":"RE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"44.7337459","longitude":"0.0108167"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.0108167,44.7337459]},"osmID":"4603951151","cca3":"REU","callingCode":["262"],"translateId":"59f8258f6ff9921c048b4b8e","ownACity":true} +{"_id":{"$oid":"59edc4116ff99227048b4659"},"name":"Republic of Poland","countryCode":"PL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"52.0977181","longitude":"19.0258159"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.0258159,52.0977181]},"osmID":"49715","wikidataID":"Q36","cca3":"POL","callingCode":["48"],"translateId":"59edc4136ff99227048b465a"} +{"_id":{"$oid":"59edc41d6ff99227048b465f"},"name":"State of Palestine","countryCode":"PS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"31.649741","longitude":"35.162072"},"geoPosition":{"type":"Point","float":true,"coordinates":[35.162072,31.649741]},"osmID":"1703814","wikidataID":"Q407199","cca3":"PSE","callingCode":["970"],"translateId":"59edc41e6ff99227048b4660"} +{"_id":{"$oid":"59edc4196ff99227048b465d"},"name":"Portuguese Republic","countryCode":"PT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"40.033265","longitude":"-7.8896263"},"geoPosition":{"type":"Point","float":true,"coordinates":[-7.8896263,40.033265]},"osmID":"295480","wikidataID":"Q45","cca3":"PRT","callingCode":["351"],"translateId":"59edc41b6ff99227048b465e"} +{"_id":{"$oid":"59edc4236ff99227048b4662"},"name":"Romania","countryCode":"RO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"45.9852129","longitude":"24.6859225"},"geoPosition":{"type":"Point","float":true,"coordinates":[24.6859225,45.9852129]},"osmID":"90689","wikidataID":"Q218","cca3":"ROU","callingCode":["40"],"translateId":"59edc4256ff99227048b4663","ownACity":true} +{"_id":{"$oid":"59edc42e6ff99227048b4666"},"name":"Republic of Rwanda","countryCode":"RW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-1.9646631","longitude":"30.0644358"},"geoPosition":{"type":"Point","float":true,"coordinates":[30.0644358,-1.9646631]},"osmID":"171496","wikidataID":"Q1037","cca3":"RWA","callingCode":["250"],"translateId":"59edc4306ff99227048b4667"} +{"_id":{"$oid":"59edc4316ff99227048b4668"},"name":"Kingdom of Saudi Arabia","countryCode":"SA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"25.6242618","longitude":"42.3528328"},"geoPosition":{"type":"Point","float":true,"coordinates":[42.3528328,25.6242618]},"osmID":"307584","wikidataID":"Q851","cca3":"SAU","callingCode":["966"],"translateId":"59edc4336ff99227048b4669"} +{"_id":{"$oid":"59edc4346ff99227048b466a"},"name":"Republic of the Sudan","countryCode":"SD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"14.5844444","longitude":"29.4917691"},"geoPosition":{"type":"Point","float":true,"coordinates":[29.4917691,14.5844444]},"osmID":"192789","wikidataID":"Q1049","cca3":"SDN","callingCode":["249"],"translateId":"59edc4366ff99227048b466b"} +{"_id":{"$oid":"59edc42a6ff99227048b4664"},"name":"Russian Federation","countryCode":"RU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"64.6863136","longitude":"97.7453061"},"geoPosition":{"type":"Point","float":true,"coordinates":[97.7453061,64.6863136]},"osmID":"60189","wikidataID":"Q159","cca3":"RUS","callingCode":["7"],"translateId":"59edc42c6ff99227048b4665"} +{"_id":{"$oid":"59edc4386ff99227048b466c"},"name":"Republic of Singapore","countryCode":"SG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"1.357107","longitude":"103.8194992"},"geoPosition":{"type":"Point","float":true,"coordinates":[103.8194992,1.357107]},"osmID":"536780","wikidataID":"Q334","cca3":"SGP","callingCode":["65"],"translateId":"59edc4396ff99227048b466d"} +{"_id":{"$oid":"59edc43d6ff99227048b4670"},"name":"Solomon Islands","countryCode":"SB","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-9.7354344","longitude":"162.8288542"},"geoPosition":{"type":"Point","float":true,"coordinates":[162.8288542,-9.7354344]},"osmID":"1857436","wikidataID":"Q685","cca3":"SLB","callingCode":["677"],"translateId":"59edc43f6ff99227048b4671"} +{"_id":{"$oid":"59edc43a6ff99227048b466e"},"name":"South Georgia and the South Sandwich Islands","countryCode":"GS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-54.8432857","longitude":"-35.8090698"},"geoPosition":{"type":"Point","float":true,"coordinates":[-35.8090698,-54.8432857]},"osmID":"1983628","wikidataID":"Q35086","cca3":"SGS","callingCode":["500"],"translateId":"59edc43c6ff99227048b466f"} +{"_id":{"$oid":"59edc4416ff99227048b4672"},"name":"Republic of Sierra Leone","countryCode":"SL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.6400349","longitude":"-11.8400269"},"geoPosition":{"type":"Point","float":true,"coordinates":[-11.8400269,8.6400349]},"osmID":"192777","wikidataID":"Q1044","cca3":"SLE","callingCode":["232"],"translateId":"59edc4426ff99227048b4673"} +{"_id":{"$oid":"59edc4486ff99227048b4674"},"name":"Republic of Serbia","countryCode":"RS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"44.1534121","longitude":"20.55144"},"geoPosition":{"type":"Point","float":true,"coordinates":[20.55144,44.1534121]},"osmID":"1741311","wikidataID":"Q403","cca3":"SRB","callingCode":["381"],"translateId":"59edc44a6ff99227048b4675"} +{"_id":{"$oid":"59edc4506ff99227048b4678"},"name":"Republic of Suriname","countryCode":"SR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.1413025","longitude":"-56.0771187"},"geoPosition":{"type":"Point","float":true,"coordinates":[-56.0771187,4.1413025]},"osmID":"287082","wikidataID":"Q730","cca3":"SUR","callingCode":["597"],"translateId":"59edc4526ff99227048b4679"} +{"_id":{"$oid":"59edc45a6ff99227048b467c"},"name":"Kingdom of Swaziland","countryCode":"SZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-26.5624806","longitude":"31.3991317"},"geoPosition":{"type":"Point","float":true,"coordinates":[31.3991317,-26.5624806]},"osmID":"88210","wikidataID":"Q1050","cca3":"SWZ","callingCode":["268"],"translateId":"59edc45c6ff99227048b467d"} +{"_id":{"$oid":"59edc44d6ff99227048b4676"},"name":"Republic of South Sudan","countryCode":"SS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"7.8699431","longitude":"29.6667897"},"geoPosition":{"type":"Point","float":true,"coordinates":[29.6667897,7.8699431]},"osmID":"1656678","wikidataID":"Q958","cca3":"SSD","callingCode":["211"],"translateId":"59edc44f6ff99227048b4677"} +{"_id":{"$oid":"59edc45d6ff99227048b467e"},"name":"Republic of Seychelles","countryCode":"SC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-4.6574977","longitude":"55.4540146"},"geoPosition":{"type":"Point","float":true,"coordinates":[55.4540146,-4.6574977]},"osmID":"536765","wikidataID":"Q1042","cca3":"SYC","callingCode":["248"],"translateId":"59edc45f6ff99227048b467f"} +{"_id":{"$oid":"59edc4606ff99227048b4680"},"name":"Turks and Caicos Islands","countryCode":"TC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"21.7214683","longitude":"-71.6201783"},"geoPosition":{"type":"Point","float":true,"coordinates":[-71.6201783,21.7214683]},"osmID":"547479","wikidataID":"Q18221","cca3":"TCA","callingCode":["1649"],"translateId":"59edc4626ff99227048b4681"} +{"_id":{"$oid":"59edc4556ff99227048b467a"},"name":"Slovak Republic","countryCode":"SK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"48.7411522","longitude":"19.4528646"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.4528646,48.7411522]},"osmID":"14296","wikidataID":"Q214","cca3":"SVK","callingCode":["421"],"translateId":"59edc4576ff99227048b467b"} +{"_id":{"$oid":"59edc4636ff99227048b4682"},"name":"Republic of Chad","countryCode":"TD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"15.6134137","longitude":"19.0156172"},"geoPosition":{"type":"Point","float":true,"coordinates":[19.0156172,15.6134137]},"osmID":"2361304","wikidataID":"Q657","cca3":"TCD","callingCode":["235"],"translateId":"59edc4656ff99227048b4683"} +{"_id":{"$oid":"59edc46d6ff99227048b4686"},"name":"Tokelau","countryCode":"TK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-9.1676396","longitude":"-171.8196878"},"geoPosition":{"type":"Point","float":true,"coordinates":[-171.8196878,-9.1676396]},"osmID":"2186600","wikidataID":"Q36823","cca3":"TKL","callingCode":["690"],"translateId":"59edc46f6ff99227048b4687"} +{"_id":{"$oid":"59edc4716ff99227048b4688"},"name":"Turkmenistan","countryCode":"TM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"39.3763807","longitude":"59.3924609"},"geoPosition":{"type":"Point","float":true,"coordinates":[59.3924609,39.3763807]},"osmID":"223026","wikidataID":"Q874","cca3":"TKM","callingCode":["993"],"translateId":"59edc4736ff99227048b4689"} +{"_id":{"$oid":"59edc4746ff99227048b468a"},"name":"Democratic Republic of Timor-Leste","countryCode":"TL","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-8.5151979","longitude":"125.8375756"},"geoPosition":{"type":"Point","float":true,"coordinates":[125.8375756,-8.5151979]},"osmID":"305142","wikidataID":"Q574","cca3":"TLS","callingCode":["670"],"translateId":"59edc4766ff99227048b468b"} +{"_id":{"$oid":"59edc46a6ff99227048b4684"},"name":"Kingdom of Thailand","countryCode":"TH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"14.8971921","longitude":"100.83273"},"geoPosition":{"type":"Point","float":true,"coordinates":[100.83273,14.8971921]},"osmID":"2067731","wikidataID":"Q869","cca3":"THA","callingCode":["66"],"translateId":"59edc46c6ff99227048b4685"} +{"_id":{"$oid":"59edc4766ff99227048b468c"},"name":"Kingdom of Tonga","countryCode":"TO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-19.9160819","longitude":"-175.2026424"},"geoPosition":{"type":"Point","float":true,"coordinates":[-175.2026424,-19.9160819]},"osmID":"2186665","wikidataID":"Q678","cca3":"TON","callingCode":["676"],"translateId":"59edc4786ff99227048b468d"} +{"_id":{"$oid":"59edc4796ff99227048b468e"},"name":"Republic of Trinidad and Tobago","countryCode":"TT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"10.8677845","longitude":"-60.9821067"},"geoPosition":{"type":"Point","float":true,"coordinates":[-60.9821067,10.8677845]},"osmID":"555717","wikidataID":"Q754","cca3":"TTO","callingCode":["1868"],"translateId":"59edc47a6ff99227048b468f"} +{"_id":{"$oid":"59edc47b6ff99227048b4690"},"name":"Tunisian Republic","countryCode":"TN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"33.8439408","longitude":"9.400138"},"geoPosition":{"type":"Point","float":true,"coordinates":[9.400138,33.8439408]},"osmID":"192757","wikidataID":"Q948","cca3":"TUN","callingCode":["216"],"translateId":"59edc47d6ff99227048b4691"} +{"_id":{"$oid":"59edc4806ff99227048b4692"},"name":"Republic of Turkey","countryCode":"TR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"38.9597594","longitude":"34.9249653"},"geoPosition":{"type":"Point","float":true,"coordinates":[34.9249653,38.9597594]},"osmID":"174737","wikidataID":"Q43","cca3":"TUR","callingCode":["90"],"translateId":"59edc4826ff99227048b4693"} +{"_id":{"$oid":"59edc4836ff99227048b4694"},"name":"Tuvalu","countryCode":"TV","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-7.768959","longitude":"178.1167698"},"geoPosition":{"type":"Point","float":true,"coordinates":[178.1167698,-7.768959]},"osmID":"2177266","wikidataID":"Q672","cca3":"TUV","callingCode":["688"],"translateId":"59edc4856ff99227048b4695"} +{"_id":{"$oid":"59edc4906ff99227048b469a"},"name":"United States Minor Outlying Islands","countryCode":"UM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"6.4295092","longitude":"-162.407309978782"},"geoPosition":{"type":"Point","float":true,"coordinates":[-162.407309978782,6.4295092]},"osmID":"296770514","cca3":"UMI","translateId":"59f8258f6ff9921c048b4b8f"} +{"_id":{"$oid":"59edc4896ff99227048b4696"},"name":"Republic of Uganda","countryCode":"UG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"1.5333554","longitude":"32.2166578"},"geoPosition":{"type":"Point","float":true,"coordinates":[32.2166578,1.5333554]},"osmID":"192796","wikidataID":"Q1036","cca3":"UGA","callingCode":["256"],"translateId":"59edc48b6ff99227048b4697"} +{"_id":{"$oid":"59edc4926ff99227048b469b"},"name":"Oriental Republic of Uruguay","countryCode":"UY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-32.8755548","longitude":"-56.0201525"},"geoPosition":{"type":"Point","float":true,"coordinates":[-56.0201525,-32.8755548]},"osmID":"287072","wikidataID":"Q77","cca3":"URY","callingCode":["598"],"translateId":"59edc4936ff99227048b469c","ownACity":true} +{"_id":{"$oid":"59edc49f6ff99227048b469f"},"name":"Saint Vincent and the Grenadines","countryCode":"VC","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"12.90447","longitude":"-61.2765569"},"geoPosition":{"type":"Point","float":true,"coordinates":[-61.2765569,12.90447]},"osmID":"550725","wikidataID":"Q757","cca3":"VCT","callingCode":["1784"],"translateId":"59edc4a16ff99227048b46a0"} +{"_id":{"$oid":"59edc48e6ff99227048b4698"},"name":"Ukraine","countryCode":"UA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"49.4871968","longitude":"31.2718321"},"geoPosition":{"type":"Point","float":true,"coordinates":[31.2718321,49.4871968]},"osmID":"60199","wikidataID":"Q212","cca3":"UKR","callingCode":["380"],"translateId":"59edc4906ff99227048b4699"} +{"_id":{"$oid":"59edc4a66ff99227048b46a3"},"name":"Virgin Islands","countryCode":"VG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"18.4024395","longitude":"-64.5661642"},"geoPosition":{"type":"Point","float":true,"coordinates":[-64.5661642,18.4024395]},"osmID":"285454","wikidataID":"Q25305","cca3":"VGB","callingCode":["1284"],"translateId":"59edc4a86ff99227048b46a4"} +{"_id":{"$oid":"59edc4ab6ff99227048b46a5"},"name":"Republic of Vanuatu","countryCode":"VU","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-16.5255069","longitude":"168.1069154"},"geoPosition":{"type":"Point","float":true,"coordinates":[168.1069154,-16.5255069]},"osmID":"2177246","wikidataID":"Q686","cca3":"VUT","callingCode":["678"],"translateId":"59edc4ad6ff99227048b46a6"} +{"_id":{"$oid":"59edc4b06ff99227048b46a7"},"name":"Independent State of Samoa","countryCode":"WS","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-13.7693895","longitude":"-172.1200508"},"geoPosition":{"type":"Point","float":true,"coordinates":[-172.1200508,-13.7693895]},"osmID":"1872673","wikidataID":"Q683","cca3":"WSM","callingCode":["685"],"translateId":"59edc4b26ff99227048b46a8"} +{"_id":{"$oid":"59edc4a46ff99227048b46a1"},"name":"Bolivarian Republic of Venezuela","countryCode":"VE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.0018709","longitude":"-66.1109318"},"geoPosition":{"type":"Point","float":true,"coordinates":[-66.1109318,8.0018709]},"osmID":"272644","wikidataID":"Q717","cca3":"VEN","callingCode":["58"],"translateId":"59edc4a66ff99227048b46a2"} +{"_id":{"$oid":"59edc4b36ff99227048b46a9"},"name":"Republic of Yemen","countryCode":"YE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"16.3471243","longitude":"47.8915271"},"geoPosition":{"type":"Point","float":true,"coordinates":[47.8915271,16.3471243]},"osmID":"305092","wikidataID":"Q805","cca3":"YEM","callingCode":["967"],"translateId":"59edc4b56ff99227048b46aa"} +{"_id":{"$oid":"59edc4c16ff99227048b46af"},"name":"Republic of Zimbabwe","countryCode":"ZW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-18.4554963","longitude":"29.7468414"},"geoPosition":{"type":"Point","float":true,"coordinates":[29.7468414,-18.4554963]},"osmID":"195272","wikidataID":"Q954","cca3":"ZWE","callingCode":["263"],"translateId":"59edc4c36ff99227048b46b0"} +{"_id":{"$oid":"59edcc7f6ff99228048b4567"},"name":"Andorra","countryCode":"AD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"42.5407167","longitude":"1.5732033"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.5732033,42.5407167]},"osmID":"9407","wikidataID":"Q228","cca3":"AND","callingCode":["376"],"translateId":"59edcc826ff99228048b4568"} +{"_id":{"$oid":"59edc4bd6ff99227048b46ad"},"name":"Republic of Zambia","countryCode":"ZM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-14.5186239","longitude":"27.5599164"},"geoPosition":{"type":"Point","float":true,"coordinates":[27.5599164,-14.5186239]},"osmID":"195271","wikidataID":"Q953","cca3":"ZMB","callingCode":["260"],"translateId":"59edc4bf6ff99227048b46ae"} +{"_id":{"$oid":"59edc4b96ff99227048b46ab"},"name":"Republic of South Africa","countryCode":"ZA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-28.8166236","longitude":"24.991639"},"geoPosition":{"type":"Point","float":true,"coordinates":[24.991639,-28.8166236]},"osmID":"87565","wikidataID":"Q258","cca3":"ZAF","callingCode":["27"],"translateId":"59edc4bb6ff99227048b46ac"} +{"_id":{"$oid":"59edc49a6ff99227048b469d"},"name":"United States of America","countryCode":"US","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"39.7837304","longitude":"-100.4458825"},"geoPosition":{"type":"Point","float":true,"coordinates":[-100.4458825,39.7837304]},"osmID":"148838","wikidataID":"Q30","cca3":"USA","callingCode":["1"],"translateId":"59edc49c6ff99227048b469e","ownACity":true} +{"_id":{"$oid":"59edcc926ff99228048b456f"},"name":"Brunei","countryCode":"BN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.4137155","longitude":"114.5653908"},"geoPosition":{"type":"Point","float":true,"coordinates":[114.5653908,4.4137155]},"osmID":"2103120","wikidataID":"Q921","cca3":"BRN","callingCode":["673"],"translateId":"59edcc946ff99228048b4570"} +{"_id":{"$oid":"59edcc856ff99228048b4569"},"name":"Burundi","countryCode":"BI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-3.3634357","longitude":"29.8870575"},"geoPosition":{"type":"Point","float":true,"coordinates":[29.8870575,-3.3634357]},"osmID":"195269","wikidataID":"Q967","cca3":"BDI","callingCode":["257"],"translateId":"59edcc876ff99228048b456a"} +{"_id":{"$oid":"59edcc976ff99228048b4571"},"name":"Cape Verde","countryCode":"CV","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"16.0000552","longitude":"-24.0083947"},"geoPosition":{"type":"Point","float":true,"coordinates":[-24.0083947,16.0000552]},"osmID":"535774","wikidataID":"Q1011","cca3":"CPV","callingCode":["238"],"translateId":"59edcc9a6ff99228048b4572"} +{"_id":{"$oid":"59edcc896ff99228048b456b"},"name":"Benin","countryCode":"BJ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"9.5293472","longitude":"2.2584408"},"geoPosition":{"type":"Point","float":true,"coordinates":[2.2584408,9.5293472]},"osmID":"192784","wikidataID":"Q962","cca3":"BEN","callingCode":["229"],"translateId":"59edcc8b6ff99228048b456c","ownACity":true} +{"_id":{"$oid":"59edcca76ff99228048b4575"},"name":"Djibouti","countryCode":"DJ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"11.85677545","longitude":"42.7577845199437"},"geoPosition":{"type":"Point","float":true,"coordinates":[42.7577845199437,11.85677545]},"osmID":"192801","wikidataID":"Q977","cca3":"DJI","callingCode":["253"],"translateId":"59edcca96ff99228048b4576"} +{"_id":{"$oid":"59edcc8d6ff99228048b456d"},"name":"Bangladesh","countryCode":"BD","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"24.4768783","longitude":"90.2932426"},"geoPosition":{"type":"Point","float":true,"coordinates":[90.2932426,24.4768783]},"osmID":"184640","wikidataID":"Q902","cca3":"BGD","callingCode":["880"],"translateId":"59edcc906ff99228048b456e"} +{"_id":{"$oid":"59edcca96ff99228048b4577"},"name":"Denmark","countryCode":"DK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"55.670249","longitude":"10.3333283"},"geoPosition":{"type":"Point","float":true,"coordinates":[10.3333283,55.670249]},"osmID":"50046","wikidataID":"Q35","cca3":"DNK","callingCode":["45"],"translateId":"59edccab6ff99228048b4578","ownACity":true} +{"_id":{"$oid":"59edccac6ff99228048b4579"},"name":"Fiji","countryCode":"FJ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-18.1239696","longitude":"179.0122737"},"geoPosition":{"type":"Point","float":true,"coordinates":[179.0122737,-18.1239696]},"osmID":"571747","wikidataID":"Q712","cca3":"FJI","callingCode":["679"],"translateId":"59edccaf6ff99228048b457a"} +{"_id":{"$oid":"59edccb56ff99228048b457d"},"name":"Gambia","countryCode":"GM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.470062","longitude":"-15.4900464"},"geoPosition":{"type":"Point","float":true,"coordinates":[-15.4900464,13.470062]},"osmID":"192774","wikidataID":"Q1005","cca3":"GMB","callingCode":["220"],"translateId":"59edccb76ff99228048b457e"} +{"_id":{"$oid":"59edccba6ff99228048b4581"},"name":"Equatorial Guinea","countryCode":"GQ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"1.613172","longitude":"10.5170357"},"geoPosition":{"type":"Point","float":true,"coordinates":[10.5170357,1.613172]},"osmID":"192791","wikidataID":"Q983","cca3":"GNQ","callingCode":["240"],"translateId":"59edccbc6ff99228048b4582"} +{"_id":{"$oid":"59edccb86ff99228048b457f"},"name":"Guinea-Bissau","countryCode":"GW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"12.100035","longitude":"-14.9000214"},"geoPosition":{"type":"Point","float":true,"coordinates":[-14.9000214,12.100035]},"osmID":"192776","wikidataID":"Q1007","cca3":"GNB","callingCode":["245"],"translateId":"59edccba6ff99228048b4580"} +{"_id":{"$oid":"59edccb26ff99228048b457b"},"name":"Guinea","countryCode":"GN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"10.7226226","longitude":"-10.7083587"},"geoPosition":{"type":"Point","float":true,"coordinates":[-10.7083587,10.7226226]},"osmID":"192778","wikidataID":"Q1006","cca3":"GIN","callingCode":["224"],"translateId":"59edccb46ff99228048b457c"} +{"_id":{"$oid":"59edccc46ff99228048b4583"},"name":"Greece","countryCode":"GR","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"38.9953683","longitude":"21.9877132"},"geoPosition":{"type":"Point","float":true,"coordinates":[21.9877132,38.9953683]},"osmID":"192307","wikidataID":"Q41","cca3":"GRC","callingCode":["30"],"translateId":"59edccc66ff99228048b4584","ownACity":true} +{"_id":{"$oid":"59edccc76ff99228048b4585"},"name":"Guatemala","countryCode":"GT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"15.6356088","longitude":"-89.8988087"},"geoPosition":{"type":"Point","float":true,"coordinates":[-89.8988087,15.6356088]},"osmID":"1521463","wikidataID":"Q774","cca3":"GTM","callingCode":["502"],"translateId":"59edccc96ff99228048b4586"} +{"_id":{"$oid":"59edcccc6ff99228048b4587"},"name":"Guyana","countryCode":"GY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.88732","longitude":"-58.9398798968075"},"geoPosition":{"type":"Point","float":true,"coordinates":[-58.9398798968075,4.88732]},"osmID":"287083","wikidataID":"Q734","cca3":"GUY","callingCode":["592"],"translateId":"59edcccd6ff99228048b4588"} +{"_id":{"$oid":"59edccd26ff99228048b4589"},"name":"Honduras","countryCode":"HN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"15.0610686","longitude":"-84.5978534"},"geoPosition":{"type":"Point","float":true,"coordinates":[-84.5978534,15.0610686]},"osmID":"287670","wikidataID":"Q783","cca3":"HND","callingCode":["504"],"translateId":"59edccd36ff99228048b458a"} +{"_id":{"$oid":"59edccde6ff99228048b458d"},"name":"Kyrgyzstan","countryCode":"KG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"41.5089324","longitude":"74.724091"},"geoPosition":{"type":"Point","float":true,"coordinates":[74.724091,41.5089324]},"osmID":"178009","wikidataID":"Q813","cca3":"KGZ","callingCode":["996"],"translateId":"59edcce06ff99228048b458e"} +{"_id":{"$oid":"59edcce16ff99228048b458f"},"name":"Kiribati","countryCode":"KI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"0.306","longitude":"173.664834025"},"geoPosition":{"type":"Point","float":true,"coordinates":[173.664834025,0.306]},"osmID":"571178","wikidataID":"Q710","cca3":"KIR","callingCode":["686"],"translateId":"59edcce36ff99228048b4590"} +{"_id":{"$oid":"59edccd96ff99228048b458b"},"name":"Italy","countryCode":"IT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"42.6384261","longitude":"12.674297"},"geoPosition":{"type":"Point","float":true,"coordinates":[12.674297,42.6384261]},"osmID":"365331","wikidataID":"Q38","cca3":"ITA","callingCode":["39"],"translateId":"59edccdc6ff99228048b458c","ownACity":true} +{"_id":{"$oid":"59edcca36ff99228048b4573"},"name":"Germany","countryCode":"DE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"51.0834196","longitude":"10.4234469"},"geoPosition":{"type":"Point","float":true,"coordinates":[10.4234469,51.0834196]},"osmID":"51477","wikidataID":"Q183","cca3":"DEU","callingCode":["49"],"translateId":"59edcca66ff99228048b4574","ownACity":true} +{"_id":{"$oid":"59edcce46ff99228048b4591"},"name":"Saint Kitts and Nevis","countryCode":"KN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"17.3462278","longitude":"-62.7687277"},"geoPosition":{"type":"Point","float":true,"coordinates":[-62.7687277,17.3462278]},"osmID":"536899","wikidataID":"Q763","cca3":"KNA","callingCode":["1869"],"translateId":"59edcce66ff99228048b4592"} +{"_id":{"$oid":"59edcce76ff99228048b4593"},"name":"Lebanon","countryCode":"LB","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"33.8750629","longitude":"35.843409"},"geoPosition":{"type":"Point","float":true,"coordinates":[35.843409,33.8750629]},"osmID":"184843","wikidataID":"Q822","cca3":"LBN","callingCode":["961"],"translateId":"59edcce96ff99228048b4594","ownACity":true} +{"_id":{"$oid":"59edcced6ff99228048b4597"},"name":"Sri Lanka","countryCode":"LK","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"7.878","longitude":"80.7038245875"},"geoPosition":{"type":"Point","float":true,"coordinates":[80.7038245875,7.878]},"osmID":"536807","wikidataID":"Q854","cca3":"LKA","callingCode":["94"],"translateId":"59edccee6ff99228048b4598"} +{"_id":{"$oid":"59edccea6ff99228048b4595"},"name":"Libya","countryCode":"LY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"26.8234472","longitude":"18.1236723"},"geoPosition":{"type":"Point","float":true,"coordinates":[18.1236723,26.8234472]},"osmID":"192758","wikidataID":"Q1016","cca3":"LBY","callingCode":["218"],"translateId":"59edccec6ff99228048b4596"} +{"_id":{"$oid":"59edccf56ff99228048b459b"},"name":"Maldives","countryCode":"MV","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"4.7064352","longitude":"73.3287853"},"geoPosition":{"type":"Point","float":true,"coordinates":[73.3287853,4.7064352]},"osmID":"536773","wikidataID":"Q826","cca3":"MDV","callingCode":["960"],"translateId":"59edccf76ff99228048b459c"} +{"_id":{"$oid":"59edccfb6ff99228048b459f"},"name":"Malta","countryCode":"MT","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"35.8885993","longitude":"14.4476911"},"geoPosition":{"type":"Point","float":true,"coordinates":[14.4476911,35.8885993]},"osmID":"365307","wikidataID":"Q233","cca3":"MLT","callingCode":["356"],"translateId":"59edccfd6ff99228048b45a0"} +{"_id":{"$oid":"59edccf26ff99228048b4599"},"name":"Morocco","countryCode":"MA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"31.1728192","longitude":"-7.3366043"},"geoPosition":{"type":"Point","float":true,"coordinates":[-7.3366043,31.1728192]},"osmID":"3630439","wikidataID":"Q1028","cca3":"MAR","callingCode":["212"],"translateId":"59edccf46ff99228048b459a"} +{"_id":{"$oid":"59edcd0c6ff99228048b45a5"},"name":"Nicaragua","countryCode":"NI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"12.3724928","longitude":"-84.8700308"},"geoPosition":{"type":"Point","float":true,"coordinates":[-84.8700308,12.3724928]},"osmID":"287666","wikidataID":"Q811","cca3":"NIC","callingCode":["505"],"translateId":"59edcd0e6ff99228048b45a6"} +{"_id":{"$oid":"59edccf86ff99228048b459d"},"name":"Marshall Islands","countryCode":"MH","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"11.299","longitude":"166.917397391667"},"geoPosition":{"type":"Point","float":true,"coordinates":[166.917397391667,11.299]},"osmID":"571771","wikidataID":"Q709","cca3":"MHL","callingCode":["692"],"translateId":"59edccfb6ff99228048b459e"} +{"_id":{"$oid":"59edcd086ff99228048b45a3"},"name":"Mozambique","countryCode":"MZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-19.302233","longitude":"34.9144977"},"geoPosition":{"type":"Point","float":true,"coordinates":[34.9144977,-19.302233]},"osmID":"195273","wikidataID":"Q1029","cca3":"MOZ","callingCode":["258"],"translateId":"59edcd096ff99228048b45a4"} +{"_id":{"$oid":"59edcd106ff99228048b45a7"},"name":"Nepal","countryCode":"NP","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"28.1083929","longitude":"84.0917139"},"geoPosition":{"type":"Point","float":true,"coordinates":[84.0917139,28.1083929]},"osmID":"184633","wikidataID":"Q837","cca3":"NPL","callingCode":["977"],"translateId":"59edcd126ff99228048b45a8"} +{"_id":{"$oid":"59edcd006ff99228048b45a1"},"name":"Myanmar","countryCode":"MM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"17.1750495","longitude":"95.9999652"},"geoPosition":{"type":"Point","float":true,"coordinates":[95.9999652,17.1750495]},"osmID":"50371","wikidataID":"Q836","cca3":"MMR","callingCode":["95"],"translateId":"59edcd026ff99228048b45a2"} +{"_id":{"$oid":"59edcd136ff99228048b45a9"},"name":"Pitcairn Islands","countryCode":"PN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-25.0657719","longitude":"-130.1017823"},"geoPosition":{"type":"Point","float":true,"coordinates":[-130.1017823,-25.0657719]},"osmID":"2185375","wikidataID":"Q35672","cca3":"PCN","callingCode":["64"],"translateId":"59edcd146ff99228048b45aa"} +{"_id":{"$oid":"59edcd166ff99228048b45ab"},"name":"Palau","countryCode":"PW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"6.097367","longitude":"133.313631"},"geoPosition":{"type":"Point","float":true,"coordinates":[133.313631,6.097367]},"osmID":"571805","wikidataID":"Q695","cca3":"PLW","callingCode":["680"],"translateId":"59edcd186ff99228048b45ac"} +{"_id":{"$oid":"59edcd1a6ff99228048b45ad"},"name":"Papua New Guinea","countryCode":"PG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-6.21004105","longitude":"146.051241849312"},"geoPosition":{"type":"Point","float":true,"coordinates":[146.051241849312,-6.21004105]},"osmID":"307866","wikidataID":"Q691","cca3":"PNG","callingCode":["675"],"translateId":"59edcd1c6ff99228048b45ae"} +{"_id":{"$oid":"59edcd236ff99228048b45b1"},"name":"Qatar","countryCode":"QA","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"25.3336984","longitude":"51.2295295"},"geoPosition":{"type":"Point","float":true,"coordinates":[51.2295295,25.3336984]},"osmID":"305095","wikidataID":"Q846","cca3":"QAT","callingCode":["974"],"translateId":"59edcd256ff99228048b45b2"} +{"_id":{"$oid":"59edcd206ff99228048b45af"},"name":"Paraguay","countryCode":"PY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-23.3165935","longitude":"-58.1693445"},"geoPosition":{"type":"Point","float":true,"coordinates":[-58.1693445,-23.3165935]},"osmID":"287077","wikidataID":"Q733","cca3":"PRY","callingCode":["595"],"translateId":"59edcd226ff99228048b45b0"} +{"_id":{"$oid":"59edcd276ff99228048b45b3"},"name":"Senegal","countryCode":"SN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"14.4750607","longitude":"-14.4529612"},"geoPosition":{"type":"Point","float":true,"coordinates":[-14.4529612,14.4750607]},"osmID":"192775","wikidataID":"Q1041","cca3":"SEN","callingCode":["221"],"translateId":"59edcd296ff99228048b45b4"} +{"_id":{"$oid":"59edcd2c6ff99228048b45b5"},"name":"El Salvador","countryCode":"SV","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.8000382","longitude":"-88.9140683"},"geoPosition":{"type":"Point","float":true,"coordinates":[-88.9140683,13.8000382]},"osmID":"1520612","wikidataID":"Q792","cca3":"SLV","callingCode":["503"],"translateId":"59edcd2e6ff99228048b45b6"} +{"_id":{"$oid":"59edcd2f6ff99228048b45b7"},"name":"San Marino","countryCode":"SM","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"43.9458623","longitude":"12.458306"},"geoPosition":{"type":"Point","float":true,"coordinates":[12.458306,43.9458623]},"osmID":"54624","wikidataID":"Q238","cca3":"SMR","callingCode":["378"],"translateId":"59edcd316ff99228048b45b8"} +{"_id":{"$oid":"59edcd316ff99228048b45b9"},"name":"Somalia","countryCode":"SO","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.3676771","longitude":"49.083416"},"geoPosition":{"type":"Point","float":true,"coordinates":[49.083416,8.3676771]},"osmID":"192799","wikidataID":"Q1045","cca3":"SOM","callingCode":["252"],"translateId":"59edcd336ff99228048b45ba"} +{"_id":{"$oid":"59edcd356ff99228048b45bb"},"name":"São Tomé and PrÃncipe","countryCode":"ST","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"0.8875498","longitude":"6.9648718"},"geoPosition":{"type":"Point","float":true,"coordinates":[6.9648718,0.8875498]},"osmID":"535880","wikidataID":"Q1039","cca3":"STP","callingCode":["239"],"translateId":"59edcd376ff99228048b45bc"} +{"_id":{"$oid":"59edcd436ff99228048b45c1"},"name":"Syria","countryCode":"SY","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"34.8152564","longitude":"38.4266844289349"},"geoPosition":{"type":"Point","float":true,"coordinates":[38.4266844289349,34.8152564]},"osmID":"184840","wikidataID":"Q858","cca3":"SYR","callingCode":["963"],"translateId":"59edcd456ff99228048b45c2"} +{"_id":{"$oid":"59edcd3e6ff99228048b45bf"},"name":"Sweden","countryCode":"SE","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"59.6749712","longitude":"14.5208584"},"geoPosition":{"type":"Point","float":true,"coordinates":[14.5208584,59.6749712]},"osmID":"52822","wikidataID":"Q34","cca3":"SWE","callingCode":["46"],"translateId":"59edcd406ff99228048b45c0"} +{"_id":{"$oid":"59edcd4d6ff99228048b45c7"},"name":"Taiwan","countryCode":"TW","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"23.9739374","longitude":"120.9820179"},"geoPosition":{"type":"Point","float":true,"coordinates":[120.9820179,23.9739374]},"osmID":"449220","wikidataID":"Q865","cca3":"TWN","callingCode":["886"],"translateId":"59edcd4f6ff99228048b45c8"} +{"_id":{"$oid":"59edcd466ff99228048b45c3"},"name":"Togo","countryCode":"TG","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"8.7800265","longitude":"1.0199765"},"geoPosition":{"type":"Point","float":true,"coordinates":[1.0199765,8.7800265]},"osmID":"192782","wikidataID":"Q945","cca3":"TGO","callingCode":["228"],"translateId":"59edcd486ff99228048b45c4"} +{"_id":{"$oid":"59edcd3b6ff99228048b45bd"},"name":"Slovenia","countryCode":"SI","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"45.8133113","longitude":"14.4808369"},"geoPosition":{"type":"Point","float":true,"coordinates":[14.4808369,45.8133113]},"osmID":"218657","wikidataID":"Q215","cca3":"SVN","callingCode":["386"],"translateId":"59edcd3c6ff99228048b45be"} +{"_id":{"$oid":"59edcd4a6ff99228048b45c5"},"name":"Tajikistan","countryCode":"TJ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"38.6281733","longitude":"70.8156541"},"geoPosition":{"type":"Point","float":true,"coordinates":[70.8156541,38.6281733]},"osmID":"214626","wikidataID":"Q863","cca3":"TJK","callingCode":["992"],"translateId":"59edcd4c6ff99228048b45c6"} +{"_id":{"$oid":"59edcd556ff99228048b45cb"},"name":"Uzbekistan","countryCode":"UZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"41.32373","longitude":"63.9528098"},"geoPosition":{"type":"Point","float":true,"coordinates":[63.9528098,41.32373]},"osmID":"196240","wikidataID":"Q265","cca3":"UZB","callingCode":["998"],"translateId":"59edcd566ff99228048b45cc"} +{"_id":{"$oid":"59edcd516ff99228048b45c9"},"name":"Tanzania","countryCode":"TZ","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"-6.5247123","longitude":"35.7878438"},"geoPosition":{"type":"Point","float":true,"coordinates":[35.7878438,-6.5247123]},"osmID":"195270","wikidataID":"Q924","cca3":"TZA","callingCode":["255"],"translateId":"59edcd536ff99228048b45ca"} +{"_id":{"$oid":"59edcd5d6ff99228048b45cd"},"name":"Vietnam","countryCode":"VN","level":["1"],"geo":{"@type":"GeoCoordinates","latitude":"13.2904027","longitude":"108.4265113"},"geoPosition":{"type":"Point","float":true,"coordinates":[108.4265113,13.2904027]},"osmID":"49915","wikidataID":"Q881","cca3":"VNM","callingCode":["84"],"translateId":"59edcd5e6ff99228048b45ce"} +{"_id":{"$oid":"59fff6b26ff9929f2278bf9f"},"name":"Δήμος Αθηναίων","countryCode":"GR","level":["4"],"level1":"59edccc46ff99228048b4583","level3":null,"geo":{"@type":"GeoCoordinates","latitude":"37.99085805","longitude":"23.7414742473712"},"geoPosition":{"type":"Point","float":true,"coordinates":[23.7414742473712,37.99085805]},"osmID":"1370736","wikidataID":"Q1224979","translateId":"59fff6b36ff9929f2278bfa0"} +{"_id":{"$oid":"5a0012b16ff992bb4f78bfb0"},"name":"Analamanga","countryCode":"MG","level":["3"],"level1":"59edc3a66ff99227048b462b","geo":{"@type":"GeoCoordinates","latitude":"-18.897925","longitude":"46.714808"},"geoPosition":{"type":"Point","float":true,"coordinates":[46.714808,-18.897925]},"osmID":"4506468798","translateId":"5a0012b16ff992bb4f78bfb1"} +{"_id":{"$oid":"5a0012bc6ff992bb4f78bfb8"},"name":"Microrregião de Guaratinguetá","countryCode":"BR","level":["4"],"level1":"59edc26f6ff99227048b4595","level3":null,"geo":{"@type":"GeoCoordinates","latitude":"-22.7156549","longitude":"-45.1715523697177"},"geoPosition":{"type":"Point","float":true,"coordinates":[-45.1715523697177,-22.7156549]},"osmID":"4813202","translateId":"5a0012bc6ff992bb4f78bfb9"} +{"_id":{"$oid":"5a0012c26ff992bb4f78bfbe"},"name":"California","countryCode":"US","level":["3"],"level1":"59edc49a6ff99227048b469d","geo":{"@type":"GeoCoordinates","latitude":"35.9043367","longitude":"-75.6804525"},"geoPosition":{"type":"Point","float":true,"coordinates":[-75.6804525,35.9043367]},"osmID":"158621535","translateId":"5a0012c26ff992bb4f78bfbf"} +{"_id":{"$oid":"5a0012c36ff992bb4f78bfc0"},"name":"Glenn County","countryCode":"US","level":["4"],"level1":"59edc49a6ff99227048b469d","level3":"5a0012c26ff992bb4f78bfbe","geo":{"@type":"GeoCoordinates","latitude":"40.2634243","longitude":"-76.6513583"},"geoPosition":{"type":"Point","float":true,"coordinates":[-76.6513583,40.2634243]},"osmID":"158347829","translateId":"5a0012c36ff992bb4f78bfc1"} +{"_id":{"$oid":"5a0012c66ff992bb4f78bfc4"},"name":"Lima","countryCode":"PE","level":["3"],"level1":"59edc4096ff99227048b4657","geo":{"@type":"GeoCoordinates","latitude":"-15.3812565","longitude":"-71.4727931"},"geoPosition":{"type":"Point","float":true,"coordinates":[-71.4727931,-15.3812565]},"osmID":"3500937920","translateId":"5a0012c66ff992bb4f78bfc5"} +{"_id":{"$oid":"5a0012c76ff992bb4f78bfc6"},"name":"Lima","countryCode":"PE","level":["4"],"level1":"59edc4096ff99227048b4657","level3":"5a0012c66ff992bb4f78bfc4","geo":{"@type":"GeoCoordinates","latitude":"-15.3812565","longitude":"-71.4727931"},"geoPosition":{"type":"Point","float":true,"coordinates":[-71.4727931,-15.3812565]},"osmID":"3500937920","translateId":"5a0012c76ff992bb4f78bfc7"} +{"_id":{"$oid":"5a0012d46ff992bb4f78bfcc"},"name":"Tamil Nadu","countryCode":"IN","level":["3"],"level1":"59edc3366ff99227048b45f5","geo":{"@type":"GeoCoordinates","latitude":"22.3511148","longitude":"78.6677428"},"geoPosition":{"type":"Point","float":true,"coordinates":[78.6677428,22.3511148]},"osmID":"304716","wikidataID":"Q668","translateId":"5a0012d76ff992bb4f78bfcd"} +{"_id":{"$oid":"5a0012d86ff992bb4f78bfce"},"name":"South Arcot","countryCode":"IN","level":["4"],"level1":"59edc3366ff99227048b45f5","level3":"5a0012d46ff992bb4f78bfcc","geo":{"@type":"GeoCoordinates","latitude":"12.9078949","longitude":"79.320393"},"geoPosition":{"type":"Point","float":true,"coordinates":[79.320393,12.9078949]},"osmID":"263014528","wikidataID":"Q589185","translateId":"5a0012d96ff992bb4f78bfcf"} +{"_id":{"$oid":"5a0012db6ff992bb4f78bfd2"},"name":"Jawa Tengah","countryCode":"ID","level":["3"],"level1":"59edc32e6ff99227048b45f1","geo":{"@type":"GeoCoordinates","latitude":"-0.8410022","longitude":"117.2096563"},"geoPosition":{"type":"Point","float":true,"coordinates":[117.2096563,-0.8410022]},"osmID":"1308625630","translateId":"5a0012db6ff992bb4f78bfd3"} +{"_id":{"$oid":"5a0012df6ff992bb4f78bfd6"},"name":"رأس بيروت","countryCode":"LB","level":["4"],"level1":"59edcce76ff99228048b4593","level3":null,"geo":{"@type":"GeoCoordinates","latitude":"33.8910958","longitude":"35.4779172343552"},"geoPosition":{"type":"Point","float":true,"coordinates":[35.4779172343552,33.8910958]},"osmID":"3074298","translateId":"5a0012df6ff992bb4f78bfd7"} +{"_id":{"$oid":"5a0012e96ff992bb4f78bfdc"},"name":"Aalborg Kommune","countryCode":"DK","level":["4"],"level1":"59edcca96ff99228048b4577","level3":null,"geo":{"@type":"GeoCoordinates","latitude":"56.9451339","longitude":"10.0520320040515"},"geoPosition":{"type":"Point","float":true,"coordinates":[10.0520320040515,56.9451339]},"osmID":"2099194","wikidataID":"Q300856","translateId":"5a0012ea6ff992bb4f78bfdd"} +{"_id":{"$oid":"5a0012f36ff992bb4f78bfe2"},"name":"Montreuil","countryCode":"FR","level":["4"],"level1":"58bd5d6494ef471f218b4588","level3":"5979d1ed6ff9925a108b4576","geo":{"@type":"GeoCoordinates","latitude":"49.5703063","longitude":"3.6045126"},"geoPosition":{"type":"Point","float":true,"coordinates":[3.6045126,49.5703063]},"osmID":"1616783178","translateId":"5a0012f36ff992bb4f78bfe3"} +{"_id":{"$oid":"5a0013016ff992bb4f78bfea"},"name":"IaÈ™i","countryCode":"RO","level":["4"],"level1":"59edc4236ff99227048b4662","geo":{"@type":"GeoCoordinates","latitude":"45.762786","longitude":"24.9303781"},"geoPosition":{"type":"Point","float":true,"coordinates":[24.9303781,45.762786]},"osmID":"442929793","wikidataID":"Q4968773","translateId":"5a0013026ff992bb4f78bfeb"} +{"_id":{"$oid":"5a0013066ff992bb4f78bfee"},"name":"England","countryCode":"GB","level":["3"],"level1":"59edc3026ff99227048b45dd","geo":{"@type":"GeoCoordinates","latitude":"52.0559575","longitude":"0.4918938"},"geoPosition":{"type":"Point","float":true,"coordinates":[0.4918938,52.0559575]},"osmID":"54146487","translateId":"5a0013066ff992bb4f78bfef"} diff --git a/data/zones.json.zip b/data/zones.json.zip new file mode 100644 index 0000000000000000000000000000000000000000..ba7023dff841985ffae5fb08c8effd53466fd6c2 Binary files /dev/null and b/data/zones.json.zip differ diff --git a/docs/.floo b/docs/.floo new file mode 100755 index 0000000000000000000000000000000000000000..4761ed87fa21fc7110869f7abe2ce95701450c27 --- /dev/null +++ b/docs/.floo @@ -0,0 +1,3 @@ +{ + "url": "https://floobits.com/oceatoon/communecterTasks" +} \ No newline at end of file diff --git a/docs/.flooignore b/docs/.flooignore new file mode 100755 index 0000000000000000000000000000000000000000..8c380e3e1045265ef22188659db0fe4015a3be29 --- /dev/null +++ b/docs/.flooignore @@ -0,0 +1,8 @@ +#* +*.o +*.pyc +*~ +extern/ +node_modules/ +tmp +vendor/ \ No newline at end of file diff --git "a/docs/Conditions Ge\314\201ne\314\201rales d'Utilisation.pdf" "b/docs/Conditions Ge\314\201ne\314\201rales d'Utilisation.pdf" new file mode 100755 index 0000000000000000000000000000000000000000..7a92c9f68ad9fba8dcffd903b6c810dec7c44709 Binary files /dev/null and "b/docs/Conditions Ge\314\201ne\314\201rales d'Utilisation.pdf" differ diff --git a/docs/bugs.org b/docs/bugs.org new file mode 100755 index 0000000000000000000000000000000000000000..172fecf5a51dac263af5b3957bd02187d8eafb5c --- /dev/null +++ b/docs/bugs.org @@ -0,0 +1,84 @@ +* ************************************************************ +* Correction de bugs CO2 +* ************************************************************ + + + + + + + + +* ************************************************************ +* Correction de bugs +* ************************************************************ + + [ ] Impossible d'ajouter une image sur un subevent en production (Sitti) => Pas reproduit en attente de voir avec Sitti. + [ ] avec le wysiwyg sur les addsv qui s'active au clic c'est chiant, tu es obligé de cliquer deux fois dans la zone description + [ ] Erreur sur les projets de Fabienne + [ ] https://www.communecter.org/#event.calendarview.id.57d78dab40bb4efa33ec9f71 => Syntaxe error + [ ] Bouton communecter-moi qui apparait sur la page de profil d'un autre user [https://www.communecter.org/#person.detail.id.57c5965640bb4e4b36fb8257] + +** Bugs relevés sur le fil de Communecter "help and debug" + + [ ] Je suis admin du projet "jardin partagé Vauban" et je ne peux pas créer de discussion / décision / action De plus ce projet apparait comme ancien projet sur l'organisation "Nuit Debout Saint-Denis". A la base j'avais mis une date de fin qui avait été dépassée, j'ai modifié la date de fin, mais ce projet reste dans "ancien projet + +** Bugs relevés pas le ND : https://www.communecter.org/#comment.index.type.actionRooms.id.57c847ac40bb4ebd0efb8257 + + [ ] Le partage de lien n'est pas efficace : quand on met un lien il ne prend pas la vignette, le titre, et la description de la page ciblée, et le lien n'est pas cliquable + [ ] Infobulles manquantes. Espace connecté : *Alertes *Profil Espace non connecté : * [to edit] + [ ] Bug affichage si fenétre réduite : Dans Mon espace perso: je clique sur "Ma commune" les boutons sont hors du tooltip dans le changement de code postal ( <input name="postalCode" class="input-small" id="postalCode" type="text">)(screencast-01-09-2016-20-14-35.webm) + [ ] Lorsque l'on change de commune dans le profil utilisateur, Qu'ensuite on clique sur "Ma commune" on obtiens la page de la commune précédente. un CTRL F5 résout le probléme + [ ] Dans son profil>editer : on peut changer d'email, si on change d'email, ca change le login, sans activation, du coup si on se trompe en tapant le nouvel email, et bien plus possible de retrouver son mot de passe, en cas d'oubli. + [@clement] Le partage de lien n'est pas efficace : quand on met un lien il ne prend pas la vignette, le titre, et la description de la page ciblée, et le lien n'est pas cliquable + [ ] Infobulles manquantes. Espace connecté : *Alertes *Profil Espace non connecté : * [to edit] + [ ] Bug affichage si fenétre réduite : Dans Mon espace perso: je clique sur "Ma commune" les boutons sont hors du tooltip dans le changement de code postal ( <input name="postalCode" class="input-small" id="postalCode" type="text">)(screencast-01-09-2016-20-14-35.webm) + [ ] Lorsque l'on change de commune dans le profil utilisateur, Qu'ensuite on clique sur "Ma commune" on obtiens la page de la commune précédente. un CTRL F5 résout le probléme + [X] En résolution 1920x1200, quand je clique sur la "Cloche de notification" dans le topmenu a droite , la boite de notification apparait décalée vers la gauche, et donc disparait avant que je puisse cliquer dessus. .main-top-menu button.btn-menu-notif + [ ] Le partage sur FB et twitter n'est pas optimal pour ramener le titre, l'image et la description du post - par exemple un post de projet + [ ] Filtre ne marche plus sur un event (participants / invités). Ex : [https://www.communecter.org/#event.directory.id.57d1b4c040bb4e706caa4157?tpl=directory2] + + +** Erreurs de logs en prods + [ ] 2016/09/05 14:16:29 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "themes/ph-dori/css/rooms/header.css".' + [ ] 2016/09/05 23:23:55 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "assets/d8941b81/images/testamonials/guillaumeR.png".' in /home/ubuntu/communecter/pixelhumain/ph/vendor/yiisoft/yii/framework/web/CWebApplication.php:286 + [ ] 2016/09/05 14:14:41 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "themes/ph-dori/assets/plugins/jQuery/wysihtml5x-toolbar.min.map". + [ ] 2016/09/04 21:41:23 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "assets/d8941b81/images/logoL.jpg".' + [ ] 2016/09/04 21:45:32 [error] [exception.CHttpException.404] exception 'CHttpException' with message 'Unable to resolve the request "upload/communecter/events/57c8701c40bb4e021dfb8264fives.JPG".' + + +* ************************************************************ +* Version 0.15.2 +* ************************************************************ + +* Non reproduit + [ ] Je me dis participant d'un evénénement => on me dit que j'été invité par moi même et on me demande de confirmer ma participation ???? + +* Sylvain + +* Rapha + +* Tib + +* ************************************************************ +* Version 0.15.1 +* ************************************************************ + +* Rapha + + [X] En open edition, sur une Orga, on ne pouvez ajouter un évènement, un besoin ou un projet. + [X] les boutons "Devenir Admin", "Ajouter un évènement" etc ... apparait lorsque l'utilisateur n'est pas connecter et que l'orga est en open edition + [X] https://www.communecter.org/#gallery.index.id.56ad340cdd04528b3dd37405.type.citoyens Erreur 404 sur la galerie d'image + [X] Si on regarde le compteur dans "discussion" il ne fonctionne pas malgré 2 commentaires + [X] Quand je crée un projet (et il me semble d'autres types de contenus), quand je renseigne la description, elle ne se retrouve pas dans le projet créé, il faut que je la renseigne à nouveau + [X] Meme probleme dans orga + [X] Meme probleme pour event + +* Sylvain + [X] bug : gestion des comptes en doublon depuis communEvent ou invitation (ex : 57cbce3a40bb4e0a0dfb8256 et 57be6caa40bb4eb84ef5aa49 en prod) + [X] gestion des comptes en doublons sur la prod : suppression et report + [X] pb de case + trim sur l'email avec link.connect + [X] pb de case + trim sur l'email au login + [X] pb de case + trim sur l'email au register + [X] 404 lors de l'ajout d'un commentaire lors d'un vote : 2016/09/05 14:15:51 [error] [php] Undefined index: content (/home/ubuntu/communecter/modules/citizenToolKit/models/Comment.php:74) + [X] Manque un '/' dans l'URL des images de "En ce moment". Ex Manapany Festival. Arrive lorsque l'événement a des sous events ! Les URL des thumbs sont mal recalculées. diff --git a/docs/communecter.org b/docs/communecter.org new file mode 100755 index 0000000000000000000000000000000000000000..76e57e7f018e06bb7ebb92a87a9b2bf17e95b892 --- /dev/null +++ b/docs/communecter.org @@ -0,0 +1,337 @@ +{{SIG}} +{{PERSON}} +{{PROJECTS}} +{{CITY}} +{{THINK TANK}} +{{OPEN PEOPLE}} +{{PITCH}} + +* COMMUNECTER [1/22] + ** GENERIC + - count down before opening 15th september + - real time people connected count on every page + * FILTERING + [ ] backend filtering with page reload, for the moment filtering is only front end + [ ] personnal tags + - can be anything and are not shared accross users + - are saved in [[tags]] collection + [[roadmap.org]] + [ ] context tags + - gathered during the render process + [ ] categories + - are generic and shared tags + - are saved in [[lists::tags]] collection and document + [ ] territory + - can be anything and are not shared accross users + - are saved in [[tags]] collection + [ ] filter by content type + - show only images + - show only links + [ ] filter by person + [ ] Timeline RSS feed + * INTEROPERABILITY + [ ] join with a PLP url > convert into ph data + * data converter + [ ] schema City map + [ ] schema Place map + [X] generic view Page system using ActivityStream + - ActStr::viewPage( $url ); + - db.getCollection('activityStream').find({"actor.ip":{"$exists":1}}) + * URLs + [ ] url formatting for seo , ex : /organization/openatlas + ** SIG + [ ] geo localiser les action Rooms ou les discussions + ** PERSON + [ ] profil > click tag => show directory with similar content + ** ORGANIZATION + --- BUGS --- + [ ] in links.members.xxx many entries have ::: "roles" : [""], + + ** EVENTS + [ ] add attending organizations + [ ] add sub events + + ** PROJECTS + [ ] sexy projects directory + [ ] room pod > add room + [ ] ajaxified pods + + --- BUGS --- + [ ] add contributor : Alias "citizenToolKit.controllers.project.SaveContributorAction" is invalid. + [ ] module Viewer :var id = obj2["_id"]["$id"]; + [ ] change start date impossible , start date must be before end date mais end date is empty + --- TEST LIBS --- + [ ] [[http://madvic.net/timesheet/]] + [ ] [[http://www.simile-widgets.org/timeline/examples/index.html]] + + ** CITY + --- TEST GRAPHS --- + [ ] [[https://www.jasondavies.com/coffee-wheel/]] + [ ] [[http://bl.ocks.org/chrisrzhou/raw/d5bdd8546f64ca0e4366/]]r + + + ** NEXT + [ ] Back Office PH + [ ] Back Office City + [ ] Gamification + [ ] Opendata + Public / Privé + webId + + ** TEST + [ ] France Connect [[https://doc.integ01.dev-franceconnect.fr/]] + [ ] Indie Auth [[https://indieauth.com/setup]] + [ ] Distributed Comments [[https://www.famust.com/fr/contact]] + [ ] Open Badges [[http://openbadges.org/]] + [ ] Kmap [[https://github.com/cjrd/kmap]] [[https://github.com/beneater/kmap-editor]] + ** Vocabs and conversions + [ ] [[https://github.com/openvocab/ovn]] + [ ] [[https://github.com/openvocab/ovn/wiki/Principles-for-this-vocabulary]] + + ** THINK TANK + *** any one who wants a conversion format avalable needs to make his github and extraction format publicly available + *** stupid loading pong game with mouse on a small section of screen + *** faire J'AIME | JE SOUTIENS | BECOME MEMBER | FOLLOW sur Orga , Event , Projet + ex : [[http://fr-voosilla.ouvaton.org/Incubation/DevSite/Actuel/index.html#ancre-contribliste]] + *** activity Stream Mapper + when some one enters a module or anything + as he uses the system + his activity Stream Map grows with his different actions + can help understand usage + debug any bugs + add easily add gamification features + *** Application Communacelle : Communecter dans une nacelle + :cominspace: + - application smartphone ou tablet + - condition testing + - connection quality + - can work on gprs and relay into a web server + - sounds settings + - is phone adapted + - is envirronment adapted + - voice test for each participant + - register a session : cube border + - sessions can be physical or distant + - real time or async + - every participant takes a cube + - fills form + - tests voice + - session features + - record session + - live session ( real time streamed ) + - decision session + - session timeline + - who arrived when + - actions + - volume fluctuence ( could the spirit of the meeting ) + - important point button + - anyone at anytime can hit a btn , this will position a flag on the session timeline + - relay phones + - the system detects a phone neirby ( bluetooth ) with the app + - can connect localy to other phone as relay for better sound recording + - relay phones also workfor surveys and decision making + - phone connecting works anywhere + - walking in the street with the app alive + - will be if you cross someone with the app + - hardware + - wireless mics + - tablet + *** Module Alert + se greffe sur le news module + on ne regarde pas juste un poste passer mais on peut s'y abonner + *** Badge Commune () + different niveau de badge d'une commune + - local data gathered ( button pressed ) + - adhésion de la commune + signifie qu'elle a creer son entité Organisation et fait des action contributive + definir une procedure d'inscription d'une commune + - nombre de communecter + - nombre de flux locaux connecté + - taux d'activité inter commune + - Opendata + - faire des appels a projet locaux + *** Badge citoyen / Organisation + nb de connection + nb de contribution + nb de lien + citoyen + orga + event + projects + *** Colectivité + according to criterias + adherent + citizen user count + participation quotas + Badge types + Gold + Platinum + Silver + + *** Meteor Real Time Voting / open data sensor + *** MOAC : Massiv Apero Citoyen + *** Question + - Do you feel there's a waste of energy, due to individualism ? + - Do you feel like a creator, like someone who has good ideas ? + - How much energy would you give your ideas ? 10 25 50 75 90 100% + - Quelle sorte de culture aimer et le genre => ville Rock , Reggae, Maloya, Theatre ... + - qui ferait un MOAC + - quel type de citoyen etes vous + - sportif + - culturel + + *** NETWORK MAPPING + in a cloud version + mon organisation =:: create a group : asso, ent., group of people ... + access through a single URL + no login required + loggued features + easy import with excel + + ** VOTE ROOM == pppm == OpenNote + easy import/ export + txt import + using tab parenting + *** CITIZEN TASKING + - declarer votre quartier + - photo de votre ville vue du dessus + *** Timeline module / MODULE LIFEPATH + user :: login + add entry + name + date + desc + tags + people + type : event | + *** Human Pixel The Movie + *** Site Duplicator + PH will propose differnet layouts for groups etc + so an easy theme switcher will be available + but also copy this site btn , will extract the page for anyone to duplicate + simply fork a page + use Github pages : http://www.smashingmagazine.com/2014/08/01/build-blog-jekyll-github-pages/ + *** Gestion Association + GET TOGETHER + - Add members + - Add Organizations + ACT TOGETHER + - Add Projects + - Add Contributors + - layout wireframe and bullet points + - Start Actions / Tasks + - assignee + - Add Events + - add attendees + - Add documents + THINK TOGETHER + --- Request --- + question Communauté + demande de brainstorm + --- Answer --- + Proposals + Yes / No / Maybe + --- Vote --- + VISUALIZE GLOBALY + - Graph + - GIS + *** My planet : a nice vizualisation of my network + http://codepen.io/jdniki/pen/YyzBqd + ** tag features + un simple tag ajouté sur un element (ex : projet) + propose automatiquement des fonctionalités spécifique + #agricutlure : ajoute le module production / permaculture + #developpement : ajoute le kanban + #evennementiel : donne plus d'element au calendrier , preparation de salle ...etc + ** Etape pour cartographier un territoire + - cartographier son propre reseau + chaque personne est acteur du systeme + le systeme se dessine grace au lien sur un territoire + - une personne ou une organization ajoute + - d'autre personne + - des proches + - des connaissances + - son reseau professionel + - des organizations + - des projets + ** Inscription + [[https://libertic.wordpress.com/2015/08/27/loperation-libre-libere-communes/]] + ** Code Postale Photographers + comme AirBnb pour les appart + commencer une collection de photographe par code postal + ex : 974 + ./mobilehttp://www.rup.re/-/galeries/diaporama-page-dacceuil/-/medias/d92165f8-cdf8-11e3-a4d1-329e81129ea7-shrimp + ** Dark PH + Organisation secret + ** Dashboard thematique + [ ] un vue dashboard pour un tag : tagboard + [ ] scope board + ** List to Map + - paste a list of addresses > geolocate them + - Import People list into an organization + geoloc +** COMMUNICATION + [ ] faire marcher la newsletter + [ ] ANNIVERSAIRE PH + +* PITCH +** Start Up WE 2012 + Une plateforme de communication entre citoyens qui appartient aux citoyens, + avec une approche serieuse, ouverte, collaborative avec les pouvoirs publiques.<br/> + Parce qu'on aimerait participer un peu plus dans notre ville, et que tous ensemble, nous ne faisons qu'un.<br/> + <br/> + Concrètement :<br/> + Nous aimerions améliorer l'image de la ville, lui donner un visage humain<br/> + En appliquant le système des réseaux sociaux du web à la collectivité<br/> + Pour une ville aussi connectée que Facebook et aussi ouverte que Wikipedia<br/> + Pour une réflexion publique et une intelligence collective<br/> + <br/> + Repenser la ville via la participation citoyenne et la transparence<br/> + Offrir une Boite à idée : un Système décisionnel ouvert, participatif et démocratique <br/> + Proposer un Annuaire interactif des compétences locales pour particuliers et professionnels<br/> + +* Smarterre +pour devenir SmarTerre : la terre native sur une terrenette pour une smarterre + +par terre , je veux dire connecté +par Native , je parles du passé +par Nette, on cherche un filet +le Lien , c'est la terre +sans cable et sans juger +la collaboration, pour une terre nette +une realisation smarterre +pour voir a l'interieur d'un territoire +pour croire au relation collective +pour boire l'intelligence distribué +et réunir ce qui l'etait +en un état de bien communs +* La Terre c'est nous + +** Smarter +** Smart City innovation Sociétal +** Territoire Intelligent Ouvert Connecté et experimental + Internet en Libre Acces + smart Territoire Region City Quartier Citoyen Intelligent + introduire un vrai reseau social citoyen sur internet + pour faciliter et creer du lien + Fab Lab, Maker Space pour produire librement localement + Librairie d'outil, Partage D'outil, D'objet + Réparali pour réparer soi meme et pas jeter + Ressourcerie, pour revaloriser les dechets + Marché d'occasion , Fete du don + Espace de Coworking + Epicerie Collborative (100% Production Locale, Local Food Hub) + Covoiturage + Open Data, Transparence et acces a l'information + Participation Citoyenne + smart collector + citizen contributeur au flux et revalorisation locale + CrowdFunding, Financement Citoyen peut etre une solution au manque de budget + Monnaie Locale Reunionaise, permet de creer une vraie economie locale + Production D'Energie Décentralisé + Tourisme 2.0 : Guide Ultra Locaux + SAS de decheterie + city indicateur (expert dechet lille) + dechet : + transport + capacité a créé du lien + [[http://www.operation-libre.org/]] diff --git a/docs/conversion_semantique.png b/docs/conversion_semantique.png new file mode 100644 index 0000000000000000000000000000000000000000..b0bb1e8bda827289c0049e849705d63b1ac47fd8 Binary files /dev/null and b/docs/conversion_semantique.png differ diff --git a/docs/dda_refactor.org b/docs/dda_refactor.org new file mode 100644 index 0000000000000000000000000000000000000000..0b145881f57bf70b921a8201a71fb41f25ed8f0f --- /dev/null +++ b/docs/dda_refactor.org @@ -0,0 +1,378 @@ + +Application "Démocratie" dans CO2 +------------------------------- +by AlphaTango + +Ce texte est une proposition personnelle concernant l'application de participation citoyenne que nous souhaitons proposer sur le réseau communecter. +Toutes ces propositions sont soumises à réflexion / correction / amélioration / suggestions des lecteurs, et ne constituent en aucun cas +une proposition complète, définitive, immuable, de l'application à développer. +Je vous expose mes réflexions afin de faire avancer ce chantier, je ne prétend pas avoir la vérité absolue sur le sujet, ni même avoir pensé à tout. + +------------------------------- +Démocratie : le pouvoir du peuple, pour le peuple, par le peuple +------------------------------- +- La démocratie ce n'est pas élire ses maîtres, c'est voter ses lois. +---------------------------- + +** Introduction + +A titre personnel, je considère que la démocratie telle que nous la pratiquons aujourd'hui, en 2017, en France, +est devenue trop élitiste pour mériter encore le nom de démocratie. + +Je ne renie pas pour autant l'histoire de France. Je suis même plutôt heureux de savoir que des gens se sont un jour levé contre le pouvoir monarchique, afin de l'abolir, et de mettre en place un système où le peuple obtenait une plus large répartition du pouvoir. +Les choses ne changent jamais en un éclair. Il faut du temps pour avancer. C'est pourquoi la démocratie s'est progressivement perfectionnée, améliorée, au fil des années, en fonction des courants de pensées et de l'évolution technologique de la société (qui accélère la diffusion des idées, et qui libère du temps pour Penser). + +Au départ donc, je peux comprendre que nous ayons appelé ce système la "démocratie", dans le sens où c'était la meilleure démocratie que nous puissions mettre en place avec les moyens de l'époque. + +Mais je considère aujourd'hui, que la démocratie telle que nous la pratiquons en France n'est plus la forme la plus aboutie que nous puissions imaginer. +L'avènement d'internet implique de nouvelles possitilités que nous allons devoir mettre en place pour que la France redevienne une vraie démocratie. +Au fil du temps, la démocratie a été remplacée par une oligarchie que plus personne ne peut nier depuis l'investiture de Mr Macron. +Le pouvoir sera désormais accaparé par ce groupe d'oligarque jusqu'à ce que le peuple se soulève à nouveau et décide de changer les règles du jeu. + +https://www.youtube.com/watch?v=o1sQAvB39N4 + +Avec internet, nous pouvons changer les règles du jeu. + +Internet est un évènement majeur dans l'histoire de l'humanité. +Pour la première fois, nous sommes tous reliés les uns aux autres de façon directe, et nous pouvons tous interragir les uns avec les autres en direct. + +Reprenons l'historique des inventions en terme de diffusion de l'information, +et constatons comme chaque nouvelle invention repousse les limites : + +- L'imprimerie : permet d'imprimer des documents papier et de les distribuer sur un territoire (plusieurs personnes, mais nombre d'impressions limité à l'époque, et rayon de diffusion limité) +- Le télégrame : permet d'envoyer un texte court, de façon instantanée, sur une longue distance, à une personne à la fois. +- Le téléphone : permet d'envoyer une séquence audio, de façon instantanée et en direct, sur une longue distance à une personne à la fois. +- La radio : permet de diffuser une séquence audio, en continue et en direct, dans un large périmètre, à un grand nombre de personnes à la fois. +- La télévision : permet d'envoyer de l'image et du son, en direct, sur un très large périmètre, et à un grand nombre de personnes. + +- Internet : permet de mettre à disposition de tout le monde, tout type d'information (image, son, vidéo, texte), accessible à n'importe quel moment, depuis n'importe où dans le monde (ou presque, en tout cas une très grande surface du globe). + +Internet libère l'information, en permettant à l'humanité de s'affranchir des barrières de l'espace et du temps (en matière de diffusion d'information) + +Le réseau communecter.org, tente d'apporter une nouvelle amélioration à internet, en ajoutant aux informations une notion géographique, de façon à géolocaliser les données pertinentes pour une zone géographique donnée, et à les rendre accessibles facilement aux habitants de ce territoire. +(C'est ce que j'appelle la géo-communication.) + +Cette nouvelle amélioration, rend possible une nouvelle forme de démocratie basée sur la participation locale, et peut permettre de régler le problème de la représentativité des élus. + +Pour faire simple, si nous avons une oligarchie, c'est parce que nous avons des représentant (qui ne représentent plus qu'eux-mêmes). +Au fil du temps, la professionnalisation de la politique a engendré une nouvelle classe dominante dont nous avons conscience qu'elle n'agit pas en notre faveur, mais dont nous ne savons pas comment nous en passer. Pour nous passer de nos représentant, il n'y a qu'un seul moyen : mettre en place une démocratie directe. + +Jusqu'à l'invention d'internet, la démocratie directe n'était possible que sur un territoire restreint. Car la mise en commun du travail démocratique n'était pas possible à grande échelle. Seul un système informatique connecté peut rendre possible une démocratie où tout le monde participe. Si nous ne voulons plus de l'oligarchie, nous devons nous impliquer nous même dans le processus démocratique, et pour que tout le monde puisse s'impliquer, il faut que cela passe par un système informatique. + +Cependant, même si un système informatique est indispensable, ce système n'est qu'un outil. Cela ne signifie pas que la démocratie n'existerait QUE sur internet. +Il me semblerait absolument nécessaire d'organiser AUSSI des assemblées locales (IRL) pour parler de politique entre citoyens, pour débattre des idées, pour faire des propositions, etc. Le système informatique sera là pour rassembler l'ensemble de ces travaux, les rendre disponibles à tous, permettre le vote pour les prises de décisions à grande échelle, etc, etc. + +Voici donc une hébauche du système informatique que j'imagine, basé sur le réseau communecter.org, et le système de "communexion" : + +---------------------------- +*** La démocratie Communectée : +---------------------------- + + +*** - Dans Communecter, chaque commune dispose d'un "conseil citoyen". + +*** - Dans Communecter, un "conseil citoyen" est un espace destiné à co-écrire les lois du pays. +Dans notre cas : la France. (applicable pour n'importe quel pays). + +*** - Chaque citoyens peut proposer des textes de lois + +*** - Chaque citoyens peut participer la correction, l'amélioration, et le vote des lois proposées par les autres citoyens. + +*** - Chaque citoyens peut voter -pour- les lois qui lui conviennent, et -voter- contre celles qui ne lui conviennent pas (+ vote blanc pris en compte). + +*** - Pour valider une loi, il faut qu'elle obtienne une majorité de suffrages favorables dans un temps donnée (ma proposition : 1 mois) + +=> règle de la majorité : à définir + + => ma proposition : une proposition doit obtenir un minimum de 61.8% des suffrages favorables pour être validée. + + => pourquoi 61.8 ? le nombre d'or : 0.618 + - http://villemin.gerard.free.fr/Wwwgvmm/Geometri/NbOrDebu.htm + - https://fr.wikipedia.org/wiki/Nombre_d%27or + => pourquoi pas 50% ? il faut garder une marge d'erreur suffisante pour faire face aux spécificités des votes en ligne : + + => tout le monde ne peut pas voter à chaque fois qu'il le pourrait + + => tout le monde peut tricher (voter avec plusieurs comptes - dans un sens comme dans l'autre) + + => il faut donc éviter la majorité à 50% qui est trop aléatoire (49 je perd, 51 je gagne) + => il faut donc relever le seuil de la majorité, pour assurer que chaque texte validé correspond à la volonté populaire. + + +*** - Sur Communecter, voter signifie : + + - Je valide cette proposition de loi + + - J'invalide cette proposition de loi + + - Je n'ai pas d'avis : Vote blanc + + -- formulé autrement : + + Valider cette proposition ? + + - Oui (pour) + + - Non, invalider (contre) + + - Blanc + + +------------------------------------------------ +Rayon d'action des citoyens : +------------------------------------------------ +- Un citoyen ne peut agir (proposer, voter, amander) que dans les conseil citoyens liés à sa communexion : +sa commune, son département, sa région, son pays. + +- Cepedant, chaque citoyen peut accéder en lecture à toutes les propositions de tous les conseils citoyens (en changeant de communexion), +même s'il ne peut pas y participer (proposer, voter, amander). + +=> pourquoi ? + => pour limiter les possibilités de triches (je ne peux tricher que dans MON conseil citoyen) + => pour répartir le travail de lecture et de vote sur l'ensemble du territoire + +*** Sur Communecter, une loi c'est quoi ? +------------------------------------------------ +Loi = array(articlesDeLoi) + array(Amendements) +------------------------------------------------ + +*** - Une loi est composées de plusieurs articles. +*** - Chaque article est soumis aux propositions d'amendements des autres utilisateurs + +** Amendement : def Wikipedia : +Un amendement est une modification, soumise au vote d'une assemblée, en vue de corriger, compléter ou annuler tout ou une partie d'un projet de loi en cours de délibération ou d'une loi pré-existante. +https://fr.wikipedia.org/wiki/Amendement_(loi) + + + +*** Votations des lois et application des résultats : +******** +**** La spécificité du système que je propose ici réside en grande partie dans ce principe : +COMMUNE > DEPARTEMENT > REGION > PAYS + + +*** +Les lois sont toujours proposées d'abord au niveau local : la commune. Dans le conseil citoyen des communes. +Lorsqu'on propose un texte, on peut définir le "niveau final" à atteindre (COMMUNE, DEPARTEMENT, REGION ou PAYS) en fonction de la portée du texte. + +*** +Lorsqu'une proposition de loi est adoptée dans une commune, elle est automatiquement soumise à un nouveau vote, au niveau supérieur,jusqu'à atteindre +le niveau final visé. + +*** +Si le conseil citoyen départemental approuve à nouveau la proposition de loi, celle-ci est officiellement validée, +et légitimement applicable à l'ensemble des communes du département en question, après un délais d'application à définir. Il est possible qu'un plan de mise en oeuvre soit nécessaire pour certaines lois validées . + +Si elle est réfusée, elle n'est pas valide et donc inaplicable sauf dans la commune initiale qui l'avait validée, +si la commune est en mesure d'en assurer seule l'application, et que cela n'entre pas en conflit avec les lois des niveaux supérieurs. + +*** +Lorsqu'une proposition de loi est validée au niveau départemental, elle est automatiquement soumise à un nouveau vote, au niveau régional, +avec les mêmes règles qu'au niveau inférieur, de même pour le niveau Pays. + +*** +De cette façon, on réparti la masse de proposition à traiter équitablement sur tout le territoire, +en partant du principe qu'une proposition de loi est toujours liée à un contexte local favorable à sa venue, et que par conséquent, +les gens situés à proximité sur le même territoire sont les plus à même de juger de la pertinence d'une proposition. + +*** +De cette façon, nous encourageons également les gens à se préocuper d'abord à leur contexte territorial, avant de s'occuper de celui des autres. +En respect avec l'adage "penser global, agir local". + +On a beaucoup de problème en commun sur tous nos territoires, mais si on essaie d'abord de régler ceux de son territoire, +si chacun fait sa part au niveau local, on n'aura plus qu'à afiner et mutualiser les lois aux niveaux département, région, et pays, +pour armoniser les textes et les rendres applicables à des contextes territoriaux plus étendus, si besoin. + + +*** AUTRE AVANTAGE DE CE SYSTEME : +Pas besoin de tirage au sort, puisque tout le monde peut y participer en même temps. +Et pas besoin d'élus pour écrire les lois, puisqu'elles sont co-écrites par tout le monde. + +*** EN RÉSUMÉ +La validation d'une loi part de la base (les communes), puis s'étend progressivement à travers le département, la région, le pays. +Une loi progresse sur le territoire à travers 4 niveaux : commune, dep, region, pays + + +*** Note : On peut imaginer différents comportement possibles, dans le cas où une proposition est rejetée au niveau régional (par exemple), reste-t-elle en vigueur au niveau départemental ? je n'ai pas de réponse définitive aujourd'hui. + + + +******** +*** Abrogation d'une loi (préalablement adoptée) +******** + +*** Lorsqu'une loi est adoptée, elle n'est jamais adoptée définitivement : + - Tout le monde peut proposer son abrogation (suppression du texte, soumis au vote) + et son remplacement (écriture d'un nouveau texte pour remplacer le texte abrogé) + + - La procédure d'abrogation ne peut être lancé que si un nombre suffisant de citoyen le demande + (1% 2% 5% 20% des votants ?) + + - Tous les citoyens qui n'ont pas encore voté (mais qui en ont le droit) peuvent toujours voter + (pour / contre / blanc). + + - Tous les citoyens qui ont déjà voté peuvent changer leur vote à tout moment + + - Un texte est automatiquement abrogé (passe à l'état refusé) si le total des votes en cours est redescendu en dessous du seuil de la majorité + (61,8% ou moins ? pour éviter que ca clignote autour de la limite. Par exemple 60% ou 55%. ou mieux : 61.80 - 6.18 = 55.62) + + - Une notification est envoyée à tous les citoyens concernés par cette abrogation (en fonction du niveau atteint par la proposition) + + + +*** Comment on crée une proposition de loi ? + +- On choisi un(ou plusieurs) thème(s), parmis les thèmes prédéfinis (+ possibilité de proposer de nouveaux thèmes) + - les thèmes pourraient être équivalents à différents ministères : + Santé, Energie, Climat, Culture, Animation, Biodiversité, Economie sociale et solidaire, etc... + +- On écrit sa proposition +- On définit le niveau final à atteindre (commune, departement, region, ou pays) +- On définit une liste de tags pour décrire le contenu de la proposition +- On enregistre + +=> la proposition est publiée dans mon conseil citoyen communal en premier. + +=> mes voisins votes + + => la proposition est acceptée + + => la proposition concerne seulement ma commune ? + + => oui : fin du process + + => non : envoi automatique au département (et ainsi de suite aux niveaux supérieurs jusqu'au niveau final) + + => la proposition est refusée : fin du process + + + +*** Comment on accède aux propositions de loi ? +**************************************** +INTERFACE DE NAVIGATION: +**************************************** + +Menu gauche : +*** En ce moment +*** J'ai voté pour +*** J'ai voté contre +*** Adoptées +*** Refusées + +Menu gauche secondaire : choix des thèmes (résultats croisés avec menu de gauche) +** Thèmes +*** santé, energie, culture, climat, etc ... + +Menu scope : pour pouvoir lire les propositions de n'importe quelle commune, departement, region. +Le scope est automatiquement initialisé sur la communexion de l'utilisateur connecté au départ (il peut naviguer ensuite) + + + + + +******** +** MISE EN OEUVRE / CONCRETEMENT KESKON FAIT AVEC CA ? +******** +*** Par quoi commencer ? Quelles lois ? Quels thèmes traiter ? etc... +******** +Avant toute chose, il me semble qu'il faut commencer par (ré)écrire le texte fondateur sur lequel repose toutes les autres lois : la constitution. +Je propose que le premier texte co-écrit sur communecter soit une nouvelle constitution, pour une 6eme république. + +Pourquoi ? + +Les lois dépendent de la constitution, donc il est logique de commencer par réécrire une constitution. +Sinon, toutes les lois réécrites resteront soumise à la constitution actuelle, et seront donc en quelques sortes faussées dès le départ. + +La constitution est là pour définir le fonctionnement de l'Etat, notamment la façon dont sont votées et appliquées les lois, +et pour définir ses principes fondateurs inviolables. ex : le droit au travail, le droit au logement, l'égalité homme/femme, etc + +La constitution définit le socle commun de la société. +Les lois suivantes ne font que découler des principes définis dans la constitution. +Il faut donc la réécrire en premier. + +Si nous réussissons à co-écrire ce texte, nous serons capables d'écrire tous les autres textes de lois dont nous aurons besoins. + +https://www.youtube.com/watch?v=S5ImWW1f_W4 + +*** La constituante +Dans le cas où nous décidons de commencer par la procédure de (ré)écriture de la constitution, +le processus d'écriture et de vote sera le même que celui décrit précédemment. + +Cependant, la constitution étant un texte commun, concernant l'ensemble des citoyens du territoire, +il me semble qu'il faudrait utiliser uniquement le "niveau PAYS" pour la constituante. + +Si nous utilisons le même parcours avec tous les niveaux, en commençant par les communes, +nous risquons de nous retrouver avec énormément de doublons (propositions similaires) +qui seront difficiles à départager une fois arrivé au niveau PAYS. + +Il me semble donc qu'il faut tout mettre en commun dès le départ + - déjà pour gagner du temps (1 mois ou + par niveau) => mise en commun + rapide + - et pour éviter les doublons dans les propositions + -> si j'ai lu une proposition similaire à celle que je voulais faire : + je n'ajouterai pas ma proposition, puisque je pourrai proposer un amendement. + + +Dans le cas d'une constituante, nous serons obligés d'écrire les premiers articles de la constitution que nous souhaitons réécrire, +une sorte de préambule à la constitution, pour définir les règles de fonctionnement du système informatique. + +Ce préambule pourrait être soumis à ses propres règles de fonctionnement pour être définitivement validé (ou non) avant de lancer la constituante. + +La constituante ne pourrait débuter véritablement qu'une fois le préambule validé par le vote, et éventuellment modifié par amendements. + +*** Question > est-il possible de modifier le préambule de la constitution une fois qu'il a été validé ? + Il faut peut être une procédure spéciale. + Parce que les développeurs doivent être en mesure d'apporter les corrections dans le code (ça ne se fait pas en un claquement de doigt). + Il faut pouvoir assurer à tout moment la cohérence entre le texte voté, et l'état du système en production. + Et il faut vérifier que le texte validé est réalisable techniquement. + +*** Je propose : on peut proposer des modifications au préambule, même après qu'il ait été validé une première fois, après votes et amendements. +Mais il faut que l'équipe de dev ait un droit de véto (avec justification obligatoire, et éventuellement une séance de vote réservé aux dev), +pour assurer que les modifications proposées soit compatibles avec le système en place, et réalisables techniquement. +(il faut pouvoir assurer que le système est toujours cohérent avec le préambule, mais le code ne se modifie pas en un claquement de doigt) + +*** Je propose aussi : que l'on puisse signaler son désacord avec l'ensemble de la démarche en signant par email. + + Je trouve ça intéressant de savoir combien de personnes sont prêtes à manifester leur désaprobation globale par rapport à notre démarche. + En faisant le ratio entre NB-mailContre / NB-inscrits, on aura une idée de notre légitimité. + Le but étant d'avoir un maximum de légitimité si on arrive à co-écrire une nouvelle constitution de A à Z, + pour avoir le maximum de poid pour la faire ratifier : cad faire en sorte que cette nouvelle constitution devienne la nouvelle constitution officielle + du peuple Français, et qu'elle soit la référence pour toutes nos institutions. + (ce qui n'arrivera probablement jamais sans un mouvement insurectonnel/révolutionnaire utilisant probablement la force, + mais surtout sans une nouvelle constitution écrite et prête à être mise en place). + + Il n'y aura une 6eme république QUE si nous réussissons à co-écrire une nouvelle constitution. C'est une étape incontournable. + + Tant que nous restons dans la 5eme république, les changements que nous souhaitons voir se produire au niveau de la démocratie (participation locale, controle des élus, etc) n'ont que très peu de chance de se produire à grande échelle. Seule une nouvelle constitution pourra créer l'élan suffisant pour s'attaquer à l'ampleur de la tâche. + + Il ne peut pas y avoir de véritable démocratie (participative/directe) dans la 5eme république. + + + +------------------------------------------------- +Afin de donner une impulsion forte au lancement de la constituante, et donner un exemple du travail que l'on attend des citoyens, +je pense que nous devrions nous-mêmes (les communecteurs) écrire les grandes lignes d'une nouvelle constitution, en se basant sur le projet SMART-TERRE. + +Nous pouvons aussi mettre en place 2 espaces constituant : +1 pour la constituante SMART-TERRE et +1 qui démarre à partir de rien (procédure libre) + + + +------------------------------------------------- +*** Question sécurité : +La technologie blockchain semble être parfaitement adapté au contexte, +mais je ne saurais pas dire dans quelle mesure il est possible de l'utiliser au sein du projet Communecter. +Je ne saurais dire aussi combien de temps ce système est utilisable, étant donnée que la puissance de calcule nécessaire au maintient du réseau augmente avec le temps. +Quand j'ai installé mon porte feuille bitcoin il y a quelques temps, j'ai mis 2 semaines à télécharger la blockchain sur ma machine. Qu'en sera-t-il dans 1 an ? 5 ans ? 10 ans ? Si c'est la même chose pour une blockchain de vote, ça me semble limité de fait par ce pb. + +Personnellement, je considère que : quelques soit le niveau de sécurité qui sera utilisé, il y aura toujours des failles, +et que toute l'énergie qu'on mettra à sécuriser un système sera un jour réduite à néant par un hackeur plus malin que les autres. + +Donc, je serais plutôt favorable à une solution qui intègre le fait que le système ne soit pas infaillible (sans pour autant être une passoire), et que l'on prenne en compte cette incertitude comme faisant partie du système. Il faut aussi prendre en compte le fait qu'une triche peut être jouée dans les deux sens : en bien comme en mal. Donc les triches s'équilibres. +Je peux très bien voter 3 fois avec 3 comptes pour une loi absolument vitale. +Et même si l'inverse est vrai aussi, je pense qu'il n'y aura pas suffisamment de tricheurs pour qu'ils influances suffisamment le résultat des votes. + +Le fait par exemple, de limiter le droit de vote aux conseils citoyens liés à la communexion des utilisateurs, limite leurs possibilités de tricher. +(il faudra probablement bloquer la communexion à 1 changement par mois au maximum) +La majorité à 61,8% limite aussi la triche puisque les propositions ont besoin de toutes façon d'une large majorité pour gagner, donc les propositions qui seront acceptées sont celles qui sont les plus consensuelles. Il faut un nombre de tricheurs plus important pour faire annuler une proposition consensuelle. + diff --git a/docs/demo.txt b/docs/demo.txt new file mode 100755 index 0000000000000000000000000000000000000000..aa175dc5fce786daa29c617f705a4f5d3b54738c --- /dev/null +++ b/docs/demo.txt @@ -0,0 +1,26 @@ +--- PIXEL HUMAIN - COMMUNECTER - DEV TEAM WEEKLY DEMO 2 --- +10/08/2015 +en francais +enregistrer et disponible ici +url : [[https://www.youtube.com/watch?v=LiX9NjM4bbc]] + +* @Sylvain :: login / create account + Back Office +* @Tibor :: dynForm + dynSurvey + Form Builder +* @Raph :: city stats +* @Tibor :: standalone vote + + +--- PIXEL HUMAIN - COMMUNECTER - DEV TEAM WEEKLY DEMO 1 --- +24/07/2015 +en francais +enregistrer et disponible ici +url : [[https://plus.google.com/u/0/events/c9s4r1mqm23nttvjsh92g0nuaf8]] + +presentation : +* @Clement presente le module PROJET +* @Yannick presente le module Visualisation Graph D3JS +* @Raphael presente le module cityData (outil d'import et visualisation) +* @Sylvain presente l'architecture de l'hebergement +* @Tristan presente le module SIG (la cartographie geographique ) +* @Tibor presente le systeme de conversion ontologie PH vers schema et PLP + diff --git a/docs/devLog.org b/docs/devLog.org new file mode 100755 index 0000000000000000000000000000000000000000..15f87e151db8ba45051f28c4bac6ef7ad8b38444 --- /dev/null +++ b/docs/devLog.org @@ -0,0 +1,784 @@ +// This file helps any devlopper to update his environment in order to make it work +// according to the new development +// Add a datetime or better a commit id linked to the modification +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- + +--------------------------------------- +----- BASH DE REPRISE DES DONNEES ----- +--------------------------------------- + +* Version C0.22 + +** @Rapha +*** Batch qui tranforme les adresses des elements dans le nouveau formats +co2/datamigration/BatchInterElement + +*** Batch qui tranforme les adresses des news dans le nouveau formats +co2/datamigration/BatchInterNews + +---------------------------------------------------- + +* Version C0.21.7 + +** @BOUBOULE +*** [!!!A passer le slugelement + SUPPRESSION DES CITOYENS SANS NOOOOM!!!] Bash de reprise sur les slugs citoyens et supprime les citoyens sans nom !!!! +** Crée les slugs à partir des usernames et si n'y a pas d'username (premiers utilisateurs) crée les usernames à la volée +co2/datamigration/slugifycitoyens + +*** Bash de reprise sur les slugs organizations, projects, events +** Crée les slugs à partir des name + entrée dans les collections +co2/datamigration/slugifyelement + +*** Bash de reprise du les notifications avec ajout du param updated dans toutes les notifs et suppression des notifs sans params $created +co2/datamigration/CreatorUpdatedOnNotifications + +*** Bash sur les clés des event en francais: "concours"=>"contest" et "exposition"=>"exhibition" +co2/datamigration/ChangeEventFrenchType +*** Bash sur les type des poi: si type existe pas => "other", si type == poi => "other", si clé francaise => clé anglaise etc +co2/datamigration/ChangePoiType + +*** A faire Bash de reprise des clés francaises POI (ex ressourceMaterielle to materialRessource) et CLASSIFIED +TODO @TIBOR @BOUBOULE + +*** Bash on document used for profil and banner of element => Add boolean current : true +co2/dataMigration/AddCurrentToDoc + +*** Script de relance des 2000 citoyens en attente d'inscription suite à invitation +** Enregistrement de cron avec le template relaunchInvitation +co2/dataMigration/relaunchinvitation + + +* MISE EN PRODUCTION CO2 +** @Rapha +*** Ajoute un zeo au cp +/co2/datamigration/AddZeroPostalCode +*** initialise les multiscopes +/co2/datamigration/InitMultiScope +*** ajout des geoShape au ville qui en ont pas +/co2/datamigration/AddGeoShapeMissing +*** change le type des telephones de object en array +/co2/datamigration/ChangePhoneObjectToArray +*** departement manquant +/co2/datamigration/ChangePhoneObjectToArray + +** @Bouboule : +**** Bash de reprise des data dans les chart des projets +/co2/datamigration/RefactorChartProjectData +**** Bash de reprise des data dans notifications +****** Create notify.id as object with isUnread and isUnseen +/co2/datamigration/UpOldNotifications +**** Bash of object.type inbstead of object.objectType on news(!!!important with notification reactor!!!!) +/co2/datamigration/ObjectObjectTypeNewsToObjectType +**** Bash of sharedBy on news (refactor share) - create an array sharedBy with the author and date +/co2/datamigration/SharedByRefactor +**** Bash delete organizations properties !! +co2/datamigration/RemovePropertiesOfOrganizations +**** Params config => Mettre les deux variables à jour (celle ci sont bonnes pour la prod) => utliser dans l'accueil + "openatlasId" => "555eba56c655675cdd65bf19", + "communecterId" => "55dafac4e41d75571d848360" +**** Supprimer les news avec un media string +db.getCollection('news').find({ "media" : {'$type': 2},"created":{'$lt':new Date('Jun 01, 2016')}}).count() +152 news avec un media de type string enregistrer entre janvier 2016 et mai 2016 (avant la mise en ligne de Juin) +qui font sauté les fils des pages !! +**** Supprimer les news de type needs (après avoir lancer le bash ObjectObjectTypeNewsToObjectType) +db.getCollection('news').find("object.type":"needs") + +---------------------------------------------------- +* Version 0.2 + +[ ] MEQA + [X] tagging : ph,ctk, communecter master actuel en v0.17 : v.0.17 PH-DORY + + tag v0.0.17 co2 prod + | | | + master --------------------- ------------ + / \ + / \ + dev ----------------- --------- + \ + future devs + ---- internationalisation ---------------- + tiers lieux ------------ + dda --------------- +MEQA + [X] master en v.02 + [X] paramsQA en v.02 + [X] copy BDD PROD to QA + [X] dump PROD + [X] restore QA + drop + [ ] transfert des images + [X] update ph, ctk , co2 + [X] script de devlog + +MEP + [X] update code + [X] paramsconfigPROD en v.02 + [X] script de devlog + +---------------------------------------------------- + +* Version 0.17 +** @Rapha : Ajout un attribu descriptionHtml = true +/communecter/datamigration/DescInHtml + +* Hot fix 0.16.3 +** @Rapha : Corrige les mauvais types des organisations +db.organizations.find({$and: [ { type : { $ne: "NGO" } }, { type : { $ne: "Group" } } , { type : { $ne: "LocalBusiness" } }, { type : { $ne: "GovernmentOrganization" } } ] } +).forEach(function(doc) +{ + if(typeof doc.type != "undefined"){ + if(doc.type == "Entreprise" ) + db.organizations.update({"_id":doc._id},{'$set':{'type': 'LocalBusiness'}}); + + if(doc.type == "Association" ) + db.organizations.update({"_id":doc._id},{'$set':{'type': 'NGO'}}); + + if(doc.type == "Groupe Gouvernemental" ) + db.organizations.update({"_id":doc._id},{'$set':{'type': 'GovernmentOrganization'}}); + + if(doc.type == "Groupe" ) + db.organizations.update({"_id":doc._id},{'$set':{'type': 'Group'}}); + + print( '"'+doc.name+'" => '+ doc.type ); + }else{ + db.organizations.update({"_id":doc._id},{'$set':{'type': 'Group'}}); + print( '"'+doc.name+'" => else' ); + } +}); + + +* Hot Fix 0.16.1 +** @Rapha : enleve l'encodage en html sur les noms des éléments +/communecter/datamigration/NameHtmlSpecialCharsDecode + +** @Rapha : Ajoute les nom des dep et régions au addresse des elements +/communecter/datamigration/AddDepAndRegionAndCountryInAddress + +** @Sylvain : ajout des paramètres rocketChat dans paramsconfig +//rocketchat params +'rocketchatEnabled' => false, +'rocketchatURL' => "http://chat.lescommuns.org", + +* Hot Fix 0.16 +** @Rapha : Fix Organisation avec country = Réunion +/communecter/datamigration/FixBugCoutryReunion + +---------------------------------------------------- +* Notragora +add params in protected/config/ +-- paramsconfig.php => redirect/filter/logoUrl in $mailConfig + => front in $params +---------------------------------------------------- +* Version 0.16 +** @Rapha : Suppression des links en doublons sur les orgas +/communecter/datamigration/DeleteLinksHimSelf + +** @tango : Batch de reprise des geo.Point sur les elements +exécuter updateGeoPosElement.org sur la base +Exemple : +mongo localhost:10019/bdname --username user --password pass updateGeoPosElements.org > result.txt + +** @Rapha : Update Geo Belgique sur les codes postal +/communecter/datamigration/UpdateCitiesBelgiqueGeo + +---------------------------------------------------- +* Version 0.15 + +** @Rapha : Séparer Mayotte et la Réunion au niveau de la régions +db.cities.find({'region': '04'}).forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + if(doc.insee.indexOf("976")>=0 ) + db.cities.update({"_id":doc._id},{'$set':{'region': '06'}}); + } +}); + +** @Rapha : Mettre les bon numéro de département +db.cities.find({'dep': '97'}).forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + if(doc.insee.indexOf("971")>=0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'971'}}); + else if(doc.insee.indexOf("972")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'972'}}); + else if(doc.insee.indexOf("973")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'973'}}); + else if(doc.insee.indexOf("974")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'974'}}); + else if(doc.insee.indexOf("975")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'975'}}); + else if(doc.insee.indexOf("976")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'dep':'976'}}); + } +}); + +** @Rapha +Update Region +http://qa.communecter.org/communecter/datamigration/updateRegion + +** @tib : Update sur element +db.citoyens.find({}).forEach(function(doc){ + if(!doc.updated){ + var d = new Date(); + db.citoyens.update({"_id":doc._id},{'$set':{'updated': Math.round(d.getTime()/1000)-1814400} }) + //print(doc.email+" | "+d.getTime() ) + } +}) +db.projects.find({}).forEach(function(doc){ + if(!doc.updated){ + var d = new Date(); + db.projects.update({"_id":doc._id},{'$set':{'updated': Math.round(d.getTime()/1000)-1814400} }) + //print(doc.email+" | "+d.getTime() ) + } +}) +db.events.find({}).forEach(function(doc){ + if(!doc.updated){ + var d = new Date(); + db.events.update({"_id":doc._id},{'$set':{'updated': Math.round(d.getTime()/1000)-1814400} }) + //print(doc.email+" | "+d.getTime() ) + } +}) +db.organizations.find({}).forEach(function(doc){ + if(!doc.updated){ + var d = new Date(); + db.organizations.update({"_id":doc._id},{'$set':{'updated': Math.round(d.getTime()/1000)-1814400} }) + //print(doc.email+" | "+d.getTime() ) + } +}) + +db.cities.find({dep:/987/}).forEach(function(doc) +{ + print( '"'+doc.name+'" => array("'+doc.regionName+'","'+doc.region+'"),' ); + db.cities.update({"_id":doc._id},{'$set':{'region': '07','regionName':'POLYNESIE'} }) +}); +db.cities.find({dep:/986/}).forEach(function(doc) +{ + print( '"'+doc.name+'" => array("'+doc.regionName+'","'+doc.region+'"),' ); + db.cities.update({"_id":doc._id},{'$set':{'region': '07','regionName':'POLYNESIE'} }) +}); +db.cities.find({dep:/988/}).forEach(function(doc) +{ + print( '"'+doc.name+'" => array("'+doc.regionName+'","'+doc.region+'"),' ); + db.cities.update({"_id":doc._id},{'$set':{'region': '08','regionName':'NOUVELLE-CALEDONIE'} }) +}); + +** @Sylvain/Thomas/Tib : Créer les index corrects sur cities +db.cities.dropIndexes(); +db.cities.createIndex({"geoPosition": "2dsphere"}); +db.cities.createIndex({"postalCodes.geoPosition": "2dsphere"}); +db.cities.createIndex({"geoShape" : "2dsphere" }); +db.cities.createIndex({"insee" : 1}); +db.cities.createIndex({"region" : 1}); +db.cities.createIndex({"dep" : 1}); +db.cities.createIndex({"cp" : 1}); +db.cities.createIndex({"country" : 1}); +db.cities.createIndex({"postalCodes.name" : 1}); +db.cities.createIndex({"postalCodes.postalCode" : 1}); + + +---------------------------------------------------- +//deja mis sur dev +db.cities.find().forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + //print(doc.country+"_"+doc.insee); + + if(doc.postalCodes){ + doc.postalCodes.forEach(function(v) + { + //print(">>"+doc.country+"_"+doc.insee+"_"+v.postalCode); + //if(v.postalCode == "97450") + //{ + var d = new Date(); + var categs = ["Agriculture / Alimentation", "Santé","Déchets","Aménagement, Transport, Construction","Éducation, Petite-enfance","Citoyenneté","Economie Social et Solidaire","Energie-Climat","Culture / Animation ","Biodiversité "]; + categs.forEach(function(c) + { + print(c+">>"+doc.country+"_"+doc.insee+"_"+v.postalCode); + db.actionRooms.insert({ + "email" : "contact@communecter.org", + "name" : c, + "type" : "vote", + "parentType" : "cities", + "parentId" : doc.country+"_"+doc.insee+"-"+v.postalCode, + "created" : parseInt(Math.round(d.getTime()/1000)), + "updated" : parseInt(Math.round(d.getTime()/1000)) + }); + }); + //} + }); + } + } +}); + var t = {}; +db.cities.find().forEach(function(doc) +{ + if(!t[ doc.region ] ){ + t[ doc.region ] = doc.regionName; + print( '"'+doc.regionName+'" => array("'+doc.regionName+'","'+doc.region+'"),' ); + } +}); + +---------------------------------------------------- +Version 0.14 + +@Bouboule: +1.ph/communecter/test/addpersonmediumimage will run actionAddPersonMediumImage() + => Add medium Image for each entity (Person/Organization/Event/Project) + => Create image in folder /medium and size 400px x 400 px +2.communecter/test/addeventmediumimage actionAddEventMediumImage() +3.communecter/test/addprojectmediumimage actionAddProjectMediumImage() +5.communecter/test/addorgamediumimage actionAddOrgaMediumImage() + +@Rapha Ajout et Modification des préférences pour Orga/Project/Event +db.organizations.find({"preferences" : {$exists : false}}).forEach(function(doc){ + db.organizations.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : [], "privateFields" : [], "isOpenData" : true}} + }) +}); + +db.organizations.find({"preferences" : {$exists : true}}).forEach(function(doc){ + db.organizations.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : doc.preferences.publicFields, "privateFields" : doc.preferences.privateFields, "isOpenData" : true}} + }) +}); + +db.events.find({"preferences" : {$exists : false}}).forEach(function(doc){ + db.events.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : [], "privateFields" : [], "isOpenData" : true}} + }) +}); + +db.events.find({"preferences" : {$exists : true}}).forEach(function(doc){ + db.events.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : doc.preferences.publicFields, "privateFields" : doc.preferences.privateFields, "isOpenData" : true}} + }) +}); + + +db.projects.find({"preferences" : {$exists : false}}).forEach(function(doc){ + db.projects.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : [], "privateFields" : [], "isOpenData" : true}} + }) +}); + +db.projects.find({"preferences" : {$exists : true}}).forEach(function(doc){ + db.projects.update({"_id":doc._id},{ + '$set':{'preferences': {"publicFields" : doc.preferences.publicFields, "privateFields" : doc.preferences.privateFields, "isOpenData" : true}} + }) +}); + + +Version 0.13 +---------------------------------------------------- +@Rapha +Transforme les telephones au format String dans le nouveaux format +db.citoyens.find().forEach(function(doc){ + if(typeof doc.telephone == "string") { + print(doc.name); + db.citoyens.update({"_id":doc._id},{ + '$set':{'telephone': {"fixe" : {0 : doc.telephone } }} + }) + } +}); + +db.organizations.find().forEach(function(doc){ + if(typeof doc.telephone == "string") { + print(doc.name); + db.organizations.update({"_id":doc._id},{ + '$set':{'telephone': {"fixe" : {0 : doc.telephone } }} + }) + } +}); + +@Chil +Efface le flag "refactorAction" mis dans comment et news via la précédente fonction RefractorNewsCommentsActions +Executer l'url /communecter/test/DeleteAttributRefactorAction + + +db.getCollection('events').find({"geoPosition.type":"point"}); + +//script d'inversion coordinates +db.events.find({}).forEach( function(c){ + if( c.geo && c.geo.longitude ){ + print(c.geo.longitude) + + db.events.update({_id:c._id}, {$set: {'geoPosition': { + type: "Point", + 'coordinates': [parseFloat(c.geo.longitude), parseFloat(c.geo.latitude)] + }}}); + geoPos} +}) +--------------------------------------------------- +Version 0.12 + +@Bouboule (clement.damiens@gmail.com) +1.Push in params config 'communeventUrl' => "https://communevent.communecter.org" +2.Bash on news (already done on qa and dev) + 21-ph/communecter/datamigration/refactornews will run actionRefactorNews() + => Remove all id and type in and object target.id, target.type + => Modify target type city to target.id=author, target.type=Person::COLLECTION + => Add @params type string "news" OR "activityStream" + + 22-ph/communecter/datamigration/deletenewsganttsneeds will run actionDeleteNewsGanttsNeeds() + => Delete news type "activityStream" where object.objectType is "needs" OR "gantts" + + 23-ph/communecter/datamigration/washingnewsnoscopetype will run actionWashingNewsNoScopeType() (CAREFULLY CAUSE NO CHECK) + => Delete news where scope is undefined + + 24-ph/communecter/datamigration/washingnewstargetnotexist will run actionWashingNewsTargetNotExist() + => Delete news where target object is undefined + => Check if target is defined else delete news + + +3.Bash on documents (only on qa) + 31-ph/communecter/datamigration/WashIncorrectAndOldDataDocument will run WashIncorrectAndOldDataDocument() + => Wash data with array in params @size which could be string + => Wash data with no type or no id, represent the target of the document + => Wash data with no contentKey + 32-ph/communecter/datamigration/changesizedocumenttobytesnumber will run actionChangeSizeDocumentToBytesNumber() + => Modify @params string $size to a number in bytes + 33- [!!!!!!!!!!!! CAREFULLY THIS METHOD IS FOR COMMUNECTER AND NOT FOR GRANDDIR !!!!!!!!!!!!!!!!!] + ph/communecter/datamigration/refactorcontentkey will run actionRefactorContentKey() + => Update @params string contentKey type "person.dashboard.profil" to "profil" + => String use is "profil" OR "slider" + +@Sylvain +Create index on citizen email +db.citizen.createIndex({"email": 1} , { unique: true }) + +---------------------------------------------------- +2016/05/23 => Récupérer statistiques sur les logs +@Chil +Executer l'url /communecter/test/CreateLastLogStatistics + +---------------------------------------------------- +2016/05/20 => Structure en tableau + insertion de la date du jour pour les actions + dans la collections news et comments +@Chil +Executer l'url /communecter/test/RefactorNewsCommentsActions + +---------------------------------------------------- +2016/05/20 => Suppression des password dans la collection log +@Chil +Executer l'url /communecter/test/LogDeletePasswordCitoyen + + + +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- +---------------------------------------------------- + +@Rapha +Ajout du type course dans la liste des events +db.getCollection('lists').find({name : "eventTypes"}).forEach(function(doc){ + if(typeof doc.listcourse == "undefined" ){ + db.lists.update({"_id":doc._id},{ + '$set':{'list.course': "Formation" } + }) + } +}); +@Rapha +Change le type Array en Object de socialNetwork +db.citoyens.find().forEach(function(doc){ + if(doc.socialNetwork instanceof Array == true) { + print(doc.name); + db.citoyens.update({"_id":doc._id},{ + '$set':{'socialNetwork': {} } + }) + } +}); + +@Tib +db.cities.find().forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + print(doc.country+"_"+doc.insee); + db.organizations.update({"_id":doc._id},{ + '$set':{'_id': doc.country+"_"+doc.insee} + }) + } +}); + +SBA - Add numberOfInvit on every citizen +db.citoyens.find().forEach(function(doc){ + if(doc.numberOfInvit == null) { + print(doc.name); + db.citoyens.update({"_id":doc._id},{ + '$set':{'numberOfInvit': NumberLong(10)} + }) + } +}); +--------------------------------------------------- +2016/03/18 + +Mettre en cron les statistiques +communecter/stat/createglobalstat + +---------------------------------------------------- + + +2016/03/01 +@Raphael +Add "'isOpendata': true" for all projects which have sourceKey == "patapouf" + +db.organizations.find().forEach(function(doc){ + if(doc.source != null) { + if(doc.source.key == "patapouf"){ + print(doc.name); + db.organizations.update({"_id":doc._id},{ + '$set':{'isOpendata': true} + }) + } + } +}); + + + +---------------------------------------------------- +set up indexes +db.cities.createIndex({"geoPosition": "2dsphere"}); +db.cities.createIndex({"postalCodes.geoPosition": "2dsphere"}); +---------------------------------------------------- +benchmarkin mongo + +var timeStart = new Date(); +for(var i = 0 ; i < 70000 ; i++){ + //db.test.insert({name:"test"+i}); //prend 30s > + db.test.insert({name:"test"+i,email:"test"+i,toto:"test"+i,coco:"test"+i});//prend 33s > 7Mb + db.test.insert({name:"test"+i,email:"test"+i,toto:"test"+i,coco:"test"+i,namex:"test"+i,emailx:"test"+i,totox:"test"+i,cocox:"test"+i}); // 36s > 13Mb + //pour 200K entré : 108s et 38Mb +} +var timeEnd = new Date(); +print(timeEnd-timeStart); +---------------------------------------------------- +//adding countries to cities +db.cities.find().forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + if(doc.insee.indexOf("971")>=0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'GP'}}); + else if(doc.insee.indexOf("972")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'MQ'}}); + else if(doc.insee.indexOf("973")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'GF'}}); + else if(doc.insee.indexOf("974")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'RE'}}); + else if(doc.insee.indexOf("975")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'PM'}}); + else if(doc.insee.indexOf("976")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'YT'}}); + else if(doc.insee.indexOf("988")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'country':'NC'}}); + else + db.cities.update({"_id":doc._id},{'$set':{'country':'FR'}}); + } +}); +---------------------------------------------------- +//adding regionName to cities Nouvelle-Caledonie +db.cities.find().forEach(function(doc) +{ + if(typeof doc.insee != "undefined"){ + if(doc.insee.indexOf("988")==0 ) + db.cities.update({"_id":doc._id},{'$set':{'regionName':'Nouvelle-Calédonie', 'depName':'Nouvelle-Calédonie'}}); + } +}); +---------------------------------------------------- +Update username on citizen collection. +To launch with mongodb + +db.citoyens.find().forEach(function(doc){ + if(doc.username == null) { + var username = doc.email.substr(0, doc.email.indexOf('@')); + print(doc.name+" : "+doc.email+": "+username); + db.citoyens.update({"_id":doc._id},{'$set':{'username':username}}) + } +}); + +---------------------------------------------------- +Init scripts + +#import lists +cd communecter/data +mongoimport --db pixelhumain --collection lists lists.json --jsonArray; + +---------------------------------------------------- +https://www.google.com/url?q=https%3A%2F%2Fgit-scm.com%2Fbook%2Ffr%2Fv1%2FLes-branches-avec-Git-Les-branches-distantes&sa=D&sntz=1&usg=AFQjCNHT0E5vbg_-BUC7xIm7guTVRBzG1Q + +//1. Créer une branche locale +git branch granddir-V.0.1 +//2. Pusher la branche sur le serveur distant +git push origin granddir-V.0.1 +//3. Si besoin checkout d'une branche distante sur une branche en local +//3.1 Récupérer les branches distantes nouvellement créée +git fetch origin +//3.2 récupérer le contenu d'une branche distante +git checkout -b granddir-V.0.1 origin/granddir-V.0.1 + + +//Azot live branch +git checkout -b azot-live-0.1 origin/azot-live-0.1 + + +git remote show origin +If the remote branch you want to checkout is under "New remote branches" and not "Tracked remote branches" then you need to fetch them first: +git remote update +git fetch +Now it should work: +git checkout -b local-name origin/remote-name +---------------------------------------------------- + +//SBA : 12/08/2015 +New role object on Citoyen collection +1/Backup your citoyen collection +2/Launch the following code on your mongodb +db.citoyens.find().forEach(function(citoyen){ + if(citoyen.roles == null) { + print(citoyen.name+" roles is null "); + db.citoyens.update({"_id":citoyen._id}, + {'$set':{'roles': { + "standalonePageAccess" : true + }}} + ); + } +}); + +//SBA : 30/04/2015 +Update your config/main.php +Now all the parameters link to your environment are stored in paramsconfig.php + +---------------------------------------------------- + +//SBA : 30/04/2015 : +How to Load cities collection +Download the ville de france file on git : https://raw.githubusercontent.com/pixelhumain/Villes-de-France/master/cities.js +Drop or rename any existing "cities" collection +Load the new collection +mongoimport --db pixelhumain --collection cities PATH_TO_MY_FILE\cities.js --jsonArray + +---------------------------------------------------- +//TKA : 28/04/2015 : +execute composer update to install Captcha libs +and add the secret key to your paramsconfig.php +---------------------------------------------------- +#TKA : 28/04/2015 : mettre a jour les cp dans cities + +db.cities.find().forEach(function(doc){ + if(doc.insee.length == 4){ + print(doc.name+" cp "+doc.insee.length+": "+doc.insee); + db.cities.update({"_id":doc._id},{'$set':{'insee':"0"+doc.insee}}) + } +}); + +db.cities.find().forEach(function(doc){ + if(doc.cp.length == 4){ + print(doc.name+" cp "+doc.cp.length+": "+doc.cp); + db.cities.update({"_id":doc._id},{'$set':{'cp':"0"+doc.cp}}) + } +}); + +---------------------------------------------------- +//TKA - 24/2/15 +db.organizations.update({type:"entreprise"},{"$set":{type:"LocalBusiness"}},{"multi":1}) +db.organizations.update({type:"association"},{"$set":{type:"NGO"}},{"multi":1}) +db.organizations.update({type:"group"},{"$set":{type:"Group"}},{"multi":1}) + +DB lists update documents +{ + "name" : "organisationTypes", + "list" : { + "NGO" : "Association", + "LocalBusiness" : "Entreprise", + "Group" : "Group" + } +} + +--------------------------------------------------- + +Modifier un mail +db.organizations.find().forEach(function(doc){ + if(doc.email == "vanespen.amaury@gmail.com"){ + print(doc.name+" :: " + doc.email); + db.organizations.update({"_id":doc._id},{ + '$set':{'email':""} + }) + } +}); + +TANGO - 22/05/2017 +--------------------------------------------------- +batch refactor news for SHARE +--------------------------------------------------- + +db.news.find({}).forEach(function(doc){ + if(typeof doc.targetIsAuthor !="undefined" && doc.targetIsAuthor == "true"){ + db.news.update({"_id":doc._id},{'$set': + {'sharedBy':[ + {'id': doc.target.id, + 'type':doc.target.type, + 'updated': doc.created + }] + }}) + }else{ + db.news.update({"_id":doc._id},{'$set': + {'sharedBy':[ + {'id': doc.author, + 'type':'citoyens', + 'updated': doc.created + }] + }}) + } +}) + + +TANGO - 22/05/2017 +--------------------------------------------------- +set localityid to all NC cities +--------------------------------------------------- + +db.cities.find().forEach(function(doc){ + if(doc.country == "NC"){ + print(doc.name+" :: " + doc.country + " - " + doc._id.str); + db.cities.update({"_id":doc._id},{ + '$set':{'localityId':doc._id.str} + }) + } +}); + + +db.cities.find().forEach(function(doc){ + if(doc.country == "NC"){ + print(doc.name+" :: " + doc.postalCodes[0].kanakName); + + if(typeof doc.postalCodes[0].kanakName != "undefined"){ + db.cities.update({"_id":doc._id},{ + '$set':{'kanakName':doc.postalCodes[0].kanakName} + }); + } else { + db.cities.update({"_id":doc._id},{ + '$set':{'kanakName':doc.postalCodes[0].name} + }); + } + } +}); + + +--------------------------------------------------- +Activer / Désactiver MAPBOX + +In file : pixelhumain/ph/protected/config/paramsconfig.php +Default params : + 'mapboxActive' => true, //set to false to disable MapBox on no-local-server = prod || dev || qa (use OSM) + 'forceMapboxActive' => false,//set to true to use MapBox on local-server + 'mapboxToken' => '', //pense à mettre le Token sur QA et prod pour utiliser mapbox diff --git a/docs/devdocs/Internationnalisation.md b/docs/devdocs/Internationnalisation.md new file mode 100644 index 0000000000000000000000000000000000000000..52031886cb1efb4ee9626163513128530e43eb68 --- /dev/null +++ b/docs/devdocs/Internationnalisation.md @@ -0,0 +1,248 @@ +# Internationnalisation / refactor cities/Zone + +## Lien utile + +* https://docs.google.com/document/d/12bO0BGOy-YBboe2AXSTwJen7iNp6y4EGDa3fRkfoUk4/edit#heading=h.gqj7abdamv9q + +## Road Map + + [ ] Création des zones administrative supèrieur à 5 (Commune) + [X] Niveau 1 ( Pays et DOMTOM) + [X] Niveau 2 ( Region belgique ) + [99%] Niveau 3 ( Région France et Canton belge) + [99%] Niveau 4 ( Département France et Arrondissement belge) + [X] Batch pour renommer les regions de France + [X] Batch pour créer le lien entre cities / zones + [X] departement -> level4 + [X] region -> level3 + [X] regionBel -> level2 + [ ] Batch qui supprime “*BE“ dans les insee des communes de la belgique + [X] Batch pour remplacer dans les addresses (vérifier que c'est la même chose pour la belgique: + [X] departement -> level4 + [X] region -> level3 + [X] regionBel -> level2 + [ ] Traduction en Fonction du pays + [ ] géré le process + [ ] “insee“ -> “INSEEâ€, “INS†(etc …) + [ ] "level4" -> “départementâ€, “préfecture†etc ... + [ ] "level3" -> “régionâ€, “canton†etc ... + [ ] "level2" -> “régionâ€, etc … + [ ] Création automatique des nouvelles communes + [95%] Via le formInMap + [ ] Via l'import + [95%] Création des zones liers + [X] Ajout des wikiID et osm ID + [95%] Ajout des CP + [ ] Update Commune + [ 50% ] Création d'un formulaire pour permettre de modifier les communes + [ ] Page admin pour géré les villes + [X] Modification dans le code + [X] Gestion des scopes + [X] Géré la recherche sur la localité + [ ] Network : + [X] Géré l'ancien format + [ ] Nouveau format + [X] Activité du territoire + [X] Communexion + +## Process passage à l'internationnalisation + +- Sauvegarder l'actuelle base de données +- Supprimer cities +- Importer cities, zones et translates qui se trouve dans co2/data : + + Déziper les fichiers puis exécuter les commandes suivants +``` +mongoimport --db communecter --collection zones --file zones.json +``` + +``` +mongoimport --db communecter --collection translate --file translate.json +``` + +``` +mongoimport --db communecter --collection cities --file cities.json +``` + +- Passer les batchs + - co2/datamigration/BatchInterElement + - co2/datamigration/BatchInterNews + + +## Changements + +### Données + +#### Citoyen, orga , event et project + +On a enlevé depName et regionName + +On a rajouté localityId qui correspond au Mongo ID de la commune, level et levelName de 1 à 4 + +level1 : Mongo ID de la zone +level1Name : Nom de la zone + +``` +"address" : { + "@type" : "PostalAddress", + "codeInsee" : "37131", + "addressCountry" : "FR", + "postalCode" : "37530", + "addressLocality" : "LIMERAY", + "streetAddress" : "", + "localityId" : "54c09644f6b95c1418004eb4", + "level1" : "58bd5d6494ef471f218b4588", + "level1Name" : "France", + "level3" : "5979d1cd6ff9925a108b4572", + "level3Name" : "Centre-Val de Loire", + "level4" : "597b1cff6ff992f0038b45fd", + "level4Name" : "INDRE-ET-LOIRE" + } +``` + +#### Cities + +On a enlevé dep, depName, region et regionName + +On a rajouté localityId qui correspond au Mongo ID de la commune, level et levelName de 1 à 4 + +#### Zone + +Ajout d'une collection Zone, qui va contenir l'ensembles des zones adminstratifs, c'est a dire +- Pays +- Canton +- Région +- Departement +- Agglo + +En fonction du Pays + +####Translate + +Va contenir l'ensemble des Traduction pour les cities et les zones + +``` +{ + "_id" : ObjectId("5991803c6ff992ed1203d53b"), + "countryCode" : "FR", + "parentId" : "54c09634f6b95c141800151d", + "parentType" : "cities", + "translates" : { + "PL" : "Genouilleux", + "EU" : "Genouilleux" + } +} + +``` + +# A tester + +Pour voir les différents types de pays, voir dans le lien utile + +- Ajout d'element avec une adresses +- Modification d'addresse +- Suppression d'adresse +- Communexion +- Scope dans Search / Live / Agenda / Interop +- Activité du térritoire +- Network +- Import + + +## A Faire + +### API + +Géré la recherche par ville + +### Import + +Géré la recherche par ville + +### File + +ProfilSocial.js : Géré le loadLiveNow avec les zones +cities.js : Refaire le formulaire des cities +co2/assets/js/menus/multiscopes.js : nettoyer le code inutile (postalCode, dep etc ) +newsHtml.js : Nettoyage +co2/assets/js/sig/map_popupContent.js : Nettoyage +CO2.php : getCitiesNewCaledonia() : Voir avec Tango + +### Erreur +- dans tranlates remplace les types cities par zones pour les zones. +- tranlates -> translate + +### Communexion + - Ajouter la key à la communexion + +### Gestion des zones level 3 + +Erreur: POLYNESIE : City :3 + +### Gestion des zones level 4 + +Les niveaux 3 n'apparait pas + +Erreur: Polynesie : City :6 + +http://nominatim.openstreetmap.org/lookup?osm_ids=R3412620&polygon_geojson=1&extratags=1&format=json + +### Traduction +Error Nouvelle-Calédonie 58be4bd194ef47e31d0ddbcb +Error Dendermonde 597b1b456ff992f0038b4588 +Error Maaseik 597b1b506ff992f0038b458c +Error Sint-Niklaas 597b1b556ff992f0038b458e +Error Neufchâteau 597b1b5e6ff992f0038b4592 +Error Nivelles 2 597b1b666ff992f0038b4595 +Error Aalst 597b1b6c6ff992f0038b4597 +Error Mechelen 597b1b716ff992f0038b4599 +Error Kortrijk 597b1bbb6ff992f0038b45ab +Error ÃŽle-de-france 597b1bd16ff992f0038b45b1 +Error Nivelles 1 597b1c0c6ff992f0038b45bf +Error Tielt 597b1d1e6ff992f0038b4602 +NB Element mis à jours: 160 + + + + +### Integration de Pays + +Import 1 +NB Element mis à jours: 0 +NB Element created: 166 +NB Element error: 82 + +Import 2 +NB Element mis à jours: 0 +NB Element created: 52 +NB Element error: 24 + +Reste a faire : + +todo: AW : Aruba +todo: AX : Ã…land Islands +todo: TF : French Southern and Antarctic Lands +todo: BL : Saint Barthélemy +todo: BV : Bouvet Island +todo: CC : Cocos (Keeling) Islands +todo: CW : Curaçao +todo: CX : Christmas Island +todo: GU : Guam +todo: HK : Hong Kong +todo: HM : Heard Island and McDonald Islands +todo: MO : Macau +todo: MF : Saint Martin +todo: MP : Northern Mariana Islands +todo: NF : Norfolk Island +todo: PH : Philippines +todo: PR : Puerto Rico +todo: PF : French Polynesia +todo: SJ : Svalbard and Jan Mayen +todo: PM : Saint Pierre and Miquelon +todo: SX : Sint Maarten +todo: VA : Vatican City +todo: VI : United States Virgin Islands +todo: WF : Wallis and Futuna + + + + diff --git a/docs/devdocs/Network.md b/docs/devdocs/Network.md new file mode 100644 index 0000000000000000000000000000000000000000..159e69976a32555a25166041dbbf2ee8797ce3b2 --- /dev/null +++ b/docs/devdocs/Network.md @@ -0,0 +1,32 @@ +# Refont du Network + +## A checker + +MainSearch.php : + $user + <body class=""> + mainMap + +la Déconnexion + +### A supprimer + + toogleCommunexion + + +## Dans parametre network + +### A supprimer + +iconeSearchPlus : n'est plus utiliser +iconeAdd + +### A voir si on garde ou pas + +displayButtonGridList : Permet de modifier la liste des element en ligne ou en carré + +filtre.tags :Utilité + +### A Renommer + +displayCommunexion -> signup ou login \ No newline at end of file diff --git a/docs/devdocs/archi.md b/docs/devdocs/archi.md new file mode 100644 index 0000000000000000000000000000000000000000..ef243e005335862150879a980c9829e85e087dff --- /dev/null +++ b/docs/devdocs/archi.md @@ -0,0 +1,41 @@ +# Architecture et Templates + +## Layout +le décor est poser par le ph/themes/CO2 +- views/layouts/mainSearch.php + + body > div.mainMap : mapEnd + + body > div.main-container : front End +``` + +-------------------------------------------------+ + | + | layouts/menu/CO2.php <nav #mainNav + +-------------------------------------------------> + | + | layouts/header/CO2.php <header.main-menu-app + +-------------------------------------------------> + | + | layouts/header/CO2.php <header.container + +-------------------------------------------------> + | div #content-social .pageContent + | + | + | + | + | + | + | + | + | + +-------------------------------------------------+ +``` +*hidden* +- layouts/notifications.php + + div.notificationPanelSearch +- layouts/formCreateElement.php + + div.ajax-modal +- div #floopDrawerDirectory .floopDrawer +- layouts/modals/CO2/mainMenu.php + +div #openModal + + div #modalMainMenu + + div #rocketchatModal +- scopes/CO2/multi_scope \ No newline at end of file diff --git a/docs/devdocs/deleteElement.md b/docs/devdocs/deleteElement.md new file mode 100644 index 0000000000000000000000000000000000000000..81688f69261da874aba74583ef9bba5118c99253 --- /dev/null +++ b/docs/devdocs/deleteElement.md @@ -0,0 +1,23 @@ +# Deleting an Element + + +- Element::deleteElement($elementType, $elementId, $reason, $userId) + - self::getByTypeAndId + - Document::listMyDocumentByIdAndType + + Document::removeDocumentById + - ActivityStream::removeElementActivityStream + - News::deleteNewsOfElement + + get all news for elem + + for each News::delete + * $authorization=self::canAdministrate + * Delete Images if exist + * PHDB::remove(Comment::COLLECTION, + * efface les activityStream lié à la news + * Comment::deleteAllContextComments + - ActionRoom::deleteElementActionRooms + - Remove backwards links :: $elementToDelete["links"] + - Unset the organizer for events organized by the element + - Unset the project with parent this element + - Notification::constructNotification + - Delete the element :: PHDB::remove($elementType, $where) + - Log::save diff --git a/docs/devdocs/dynForms.md b/docs/devdocs/dynForms.md new file mode 100644 index 0000000000000000000000000000000000000000..7d1462f933f3156720be04e499ad3daa7e4b9c5f --- /dev/null +++ b/docs/devdocs/dynForms.md @@ -0,0 +1,95 @@ +# DynForm : Dynamic Formulares +> builds forms on the fly based on a json opbject description +> many input types are available + +## dyF +> List of methods used to manipulate dynForms + +## dyF.specs +> Any dynFormForm definition +- onLoad methods +- init implementations +- + +## dyF.inputs +> is a generic list of types definitions +anyone can neverthe less create their own definition + +## type : image +Upload Process in dynforms + - uses (FineUploader)[https://fineuploader.com/] instance + -generic definition + ``` + dyF.inputs.image :function(str) { + gotoUrl = (str) ? str : location.hash; + return { + inputType : "uploader", + label : "Images de profil et album", + afterUploadComplete : function(){ + dyFObj.closeForm(); + //alert(gotoUrl+uploadObj.id); + urlCtrl.loadByHash( gotoUrl+uploadObj.id ); + } + } + }, + ``` + - uses + ``` + var uploadObj = { + type : null, + id : null, + folder : "communecter", //on force pour pas casser toutes les vielles images + set : function(type,id){ + uploadObj.type = type; + uploadObj.id = id; + } + }; + ``` + - this information is generated when open the dynForm + ``` + beforeBuild : function(){ + dyFObj.setMongoId('classified'); + }, + + //this launches the image upload process + afterSave : function(){ + if( $('.fine-uploader-manual-trigger').fineUploader('getUploads').length > 0 ) + $('.fine-uploader-manual-trigger').fineUploader('uploadStoredFiles'); + else { + dyFObj.closeForm(); + urlCtrl.loadByHash( location.hash ); + } + }, + ``` + - the fineUploader.uploadStoredFiles event + ``` + request: { + endpoint: baseUrl+"/"+moduleId+"/document/uploadSave/dir/"+uploadObj.folder+"/folder/"+uploadObj.type+"/ownerId/"+uploadObj.id+"/input/qqfile" + //params : uploadObj +}, + +- Controller : ctk/document/uploadSaveAction + - prepares folders + - checks size and extension + - returns path + ``` + Document::checkFileRequirements($file, $dir, $folder, $ownerId, $input); + ``` + +- uploads to corresponding folder + ``` + Document::uploadDocument($file, $res["uploadDir"],$input,$rename); + add COLLECTION generateProfilImages::$allowedElements + ``` + +- saves to DB document collection + * can canEdit permissions :: Authorisation::canEditItem ($type) + * add the the COLLECTION canEdit test + ``` + Document::save($params) + ``` + + -errors : + ``` + Vous n'êtes pas autorisé à modifier et/ou ajouter un document ici + ``` diff --git a/docs/directory.md b/docs/directory.md new file mode 100644 index 0000000000000000000000000000000000000000..3847e0557e38ed92b66c2aaf590104ed595d9060 --- /dev/null +++ b/docs/directory.md @@ -0,0 +1,8 @@ +# New directory +- add entry in co2/config/CO2/params.json +- add entry into headerParams in directoryjs.php + - ex : "place" : { color: "green", icon: "map-marker", name: "Lieux" }, +- add entry into Search::globalAutoComplete +- left side filter can be added optionaly in directoryjs.php + - allSearchType add type +- add new type Authorisation canedit for image uploads diff --git a/docs/exemple_lien_copedia.png b/docs/exemple_lien_copedia.png new file mode 100644 index 0000000000000000000000000000000000000000..507c2dc8e994db073df1f9fd1fef1f5902e5ea75 Binary files /dev/null and b/docs/exemple_lien_copedia.png differ diff --git a/docs/faq.md b/docs/faq.md new file mode 100755 index 0000000000000000000000000000000000000000..aea59e93dcafc1cee6ff8f6d74bbb0b17510b236 --- /dev/null +++ b/docs/faq.md @@ -0,0 +1,50 @@ +#Foire aux questions xx + +## libre ? +AGPL + +## Bon, je lance du troll : Si diaspora est mort, pourquoi communecter ne mourrait pas ? + +## il est où le lien de l'open system ? +https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md + +## on peut autoheberger ? distribuer > décentralisé ? + + +## je comprend rien en terme de navigation à communecté ??? + +## le fichage généralisé ont y arrive de toute facon parcontre la gestion de la confidentialité du profil est une question importante + +## il faut voir global, pas que pour nuit debout + +## Quid de la "ligne éditoriale" en somme ? + +## es ce que y a un git , une API ? + +## où est la road map ? + +## ça veut dire quoi un language pivot ?? y a un nouveau language ? + +## C'est des forks ou inter opérable ? + +## qu'est ce qu'apporte communecter pour nuitdebout ... y a moyen de faire une liste claire ? + + +## pkoi pas 2 interfaces en temporaire +Impoli et surtout Time consuming + +## il est possible de voir les anciennes interfaces? on peut voir les versions précédentes ? + +## Deja il faudrait voir comment les gens sont d'accord ou pas pour lier les villes et créer des réseaux plus larges. Ici on va sur d'autres ND mais au niveau national ? + +## t'as un lien d'un exemple moins annuaire, plus dynamique ? + +## La pensée sur les espaces entre les deux manque un peu ds la mvt non ? (Département / région / nation) + +## on mets des remarques où ? + +## elle est ou la doc d install ? dans /docs/ ? + +## comment le faire marcher pour ma commune ? + + diff --git a/docs/fonctionnement.org b/docs/fonctionnement.org new file mode 100755 index 0000000000000000000000000000000000000000..eebddee77a80811e7310e36b4d5b7b818f2d4a5b --- /dev/null +++ b/docs/fonctionnement.org @@ -0,0 +1,66 @@ +[ ] comptabiliser le temps + type + [ ] ecrire noir sur blanc les regles de remuneration de chaque + [ ] ecrire la doc de fonctionnement + [ ] a quoi ca peut servir + [ ] .... autres question + [ ] jauge de tarification proportionnel et prix libre de contribution au commun + [ ] avec analyse de consommation et prix adapté à la conso + [ ] vision disk dur : en fonction de la consommation de chacun + +modalité Niveau de rémuneration +- nb d'h passer en demi journée +- imaginer un un contrat de confiance qui engagement +- s'ouvrir au don de temps benvole +- attention + +* 35K€ +** Tib + date d'entrée : oct 2012 + date d'entrée dev : juin 2013 + 1ere remuneration : jan 2015 à 1000€ +** Sylvain + date d'entrée : oct 2012 + date d'entrée dev : dec 2014 +** Tango + contribution : mars 2014 + ??? + date d'entrée dev : sept 2014 + 1ere remuneration : sept 2014 à 1000€ +** Clement + date d'entrée : mars 2015 + 1ere remuneration : janvier 2015 à 1000€ +** Thomas + dette : 4.5K€ +** Jerome (demarchage) + date d'entrée : oct + dette : 12K +** Livin Coop + *** Florent + @Clement >> à voir +** Comm1possible + @Tibor >> à voir +** Simon Sarazin + Pourcentage sur une presta + Apport : + de personne + Clement + Alexis + de contrat : + Hors Cadre : 25K => 2.5k + TelecomBretagne : 2K : 200€ + la MEL : 4K > 400€ + à 10% de l'apport + dette : 3.1K +** Maia Dereva + Travail Crowdfunding : 1.5K€ +** Steph + au forfait : 3K + +Souteneur / Educateur +** Mathieu Coste ??? +** Simon Louvet ?? +** Guillaume Rouyer ?? +** Thomas Wolff ?? +** Armel Le Coz ?? +** Pierre Lalu ?? +** Xavier Canal \ No newline at end of file diff --git a/docs/goodStuff.md b/docs/goodStuff.md new file mode 100755 index 0000000000000000000000000000000000000000..a5f515bcfd299a1d55be1565998aecb9136d9b57 --- /dev/null +++ b/docs/goodStuff.md @@ -0,0 +1,23 @@ +# Outils et trucs pratiques + +## Sublime Text +Notre editor favoris +https://www.sublimetext.com/3 + +## orgmode for Sublime Text 2 & 3 +https://github.com/danielmagnussons/orgmode +ex : +* ouvrez /docs/roadmap.org +* Ctrl+Shift+P, tapez orgmode + +## markdown-live +Visualiser en direct l'edition d'un MD +Editer Save > prévisualisé directement dans le navigateur +https://github.com/mobily/markdown-live#installation +### install +sudo npm install -g markdown-live +petit bug reglé par ca +echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p +###usage +mdlive --file modules/communecter/docs/devLog.md +mdlive --dir modules/communecter/docs \ No newline at end of file diff --git a/docs/graphViewer.txt b/docs/graphViewer.txt new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/ideas.txt b/docs/ideas.txt new file mode 100755 index 0000000000000000000000000000000000000000..2e3ce67fbb5c22224cae42cfc03fc18d7bbdebec --- /dev/null +++ b/docs/ideas.txt @@ -0,0 +1,58 @@ +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- +-------------------------------------------------------------------------------------- + +-------------------------------------------------------------------------------------- + +* tiers Lieux CampTIC + +un reseau de tier lieu partenaire de communecter +partenaire de communecter signifie , qu'il y a aau moins un referant communecteur dans le lieu +au sein de ce reseau de lieux seront transmis l'activité de chacun +et l'idée est quantic , car tous les autres lieux peuvent dire +je fait la meme chose en meme temps +les evennements doivent etre production , avec des but a atteindre : + - carto party + - recolte d'information + - brainstorm thématique + - questionnaire + - MOAC de lancement +il y aura des outils pour restituer et merge toute cette intelligence produite de facon distribué +pour en faire un resultat d'intelligence collective +TKA - 12/02/2016 + +-------------------------------------------------------------------------------------- + +* RMLL programm proposals + +retour d’expérience : 3ans d'un projet OS à la Réunion +présentation du projet : Communecter : réseau sociétal Libre +Atelier Citoyen +comment créer un territoire Ouvert et Collaboratif +Communecter +Fablab +Repair café +Travaille Distribué +Organisation et Gouvernance ouverte et circulaire +L'open Source un bien commun, l'économie du partage +open source, open data, open gov, fondation d'une smart city et d'une smart society +TKA - 10/02/2016 + +-------------------------------------------------------------------------------------- + +* Développer des "commons transition party" +où l'on pourrait "être aidé pour passer : +- non seulement son ordinateur sous un commun (linux, libre office), +- passer son compte en banque à la NEF, +- son fournisseur d'électricité chez Enercoop, +- sa connexion internet chez le fournisseur d'accès associatif Tetaneutral +- son approvisionnement en légumes auprès d'une AMAP locale… +TKA - 11/12/2015 \ No newline at end of file diff --git a/docs/interop_schema.png b/docs/interop_schema.png new file mode 100644 index 0000000000000000000000000000000000000000..d1d295b331a39a6b68e621f34ab7914fdf8c78b4 Binary files /dev/null and b/docs/interop_schema.png differ diff --git a/docs/lorem_ipsum.txt b/docs/lorem_ipsum.txt new file mode 100644 index 0000000000000000000000000000000000000000..cad2235948ce2ea6dd5104af3096bdcb494d77d7 --- /dev/null +++ b/docs/lorem_ipsum.txt @@ -0,0 +1,21 @@ + + +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et volutpat arcu. Nulla malesuada consectetur erat, ut sollicitudin risus dictum id. Donec rhoncus, elit non sodales feugiat, mi neque consequat quam, ut sollicitudin velit purus quis sem. Sed vel lobortis lectus, nec convallis nisl. Donec sodales at ipsum eget accumsan. Cras nec volutpat ex. Nulla euismod facilisis orci in pellentesque. In at egestas ligula. Sed dictum justo in arcu pellentesque, ac pretium justo blandit. Suspendisse id posuere nunc. Nulla vitae sapien sed urna pulvinar hendrerit sit amet a ex. Nam gravida ipsum et arcu aliquet semper. Pellentesque ornare libero ipsum, vitae convallis orci interdum sed. Cras dictum sed risus non dignissim. Vestibulum justo nulla, interdum laoreet enim id, feugiat bibendum odio. Nunc id nulla sed ligula imperdiet tempor quis eu libero. + +Suspendisse feugiat dui magna, vel molestie mauris porttitor quis. Vivamus et pulvinar mi, vel dictum mauris. Donec sapien sem, gravida eu arcu sit amet, ullamcorper faucibus tellus. Duis non odio non nisi laoreet egestas vel sed tortor. Nullam lectus orci, hendrerit eget malesuada fermentum, blandit quis nunc. Quisque laoreet aliquam nisi eget aliquam. Nulla sapien enim, gravida in ex eu, ultricies commodo ipsum. Donec orci libero, dictum vel enim ut, auctor interdum mauris. Donec eu lectus rhoncus felis elementum posuere. Aenean imperdiet id erat posuere dignissim. Praesent fermentum augue quis nibh posuere, vulputate euismod nisi luctus. Pellentesque feugiat nisi non lectus tempus pharetra. Ut porta iaculis lacinia. Sed aliquam volutpat ex, id aliquam massa cursus ut. Vestibulum leo ligula, cursus mattis diam sed, sodales pellentesque enim. + +Etiam varius ultricies massa, euismod faucibus ligula. Aenean blandit sit amet velit eget dictum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Ut dictum elit a magna tincidunt ornare. Praesent volutpat sit amet diam non iaculis. Vestibulum sapien ex, tincidunt id velit pulvinar, aliquam fermentum neque. Vivamus porttitor blandit massa. Donec eu eleifend sapien, ac convallis mauris. Suspendisse cursus, purus in commodo rhoncus, nisl lacus consequat nunc, et suscipit urna nulla non nisi. Vestibulum non ex urna. Nullam iaculis molestie tincidunt. + +Vestibulum eu lobortis orci. Donec aliquet finibus augue, at tempus dui rutrum in. Proin pellentesque felis ligula, ac congue ante hendrerit tempor. Duis lobortis, quam at porta tincidunt, enim felis tincidunt nisi, sed ornare dui neque non nunc. Quisque pellentesque at ex a volutpat. Proin ultricies viverra enim, vel cursus nulla condimentum a. Etiam nibh ligula, molestie sit amet ultricies at, imperdiet vel neque. Vestibulum lacinia quam non dui faucibus, eget viverra felis fermentum. Donec dui orci, fermentum nec diam at, convallis elementum massa. Aliquam dignissim nisl sed tempor feugiat. + +Etiam ultricies pulvinar porttitor. Duis ac purus libero. Phasellus accumsan porta libero, id fermentum odio auctor ac. Aliquam erat volutpat. Aliquam lobortis lectus vel feugiat facilisis. Curabitur enim velit, vulputate a tempus nec, volutpat pellentesque nunc. Phasellus eget mauris risus. Nunc tristique tincidunt nisi, a congue magna laoreet ut. Quisque gravida elementum varius. In a finibus ligula, at tincidunt erat. Aenean et consequat nibh, sit amet placerat purus. Cras laoreet, diam eu cursus consectetur, augue orci sagittis augue, nec hendrerit nisl ligula vitae arcu. Aliquam eleifend quis ex sit amet commodo. + +Proin dictum mauris eu elit lacinia maximus. Etiam scelerisque a turpis ac rhoncus. Fusce congue nibh at lorem ultrices, vel semper odio bibendum. Curabitur facilisis orci in tempus auctor. Duis quam mauris, condimentum vitae laoreet sit amet, porttitor vel lorem. Aliquam nibh ipsum, venenatis a magna quis, facilisis laoreet massa. Donec cursus feugiat fringilla. Aliquam semper ligula non interdum sollicitudin. Mauris ultricies malesuada dignissim. Proin mattis urna ac sapien condimentum, at pretium erat efficitur. Morbi ultricies leo sit amet lacus ullamcorper lobortis. Quisque ligula nulla, accumsan posuere urna et, blandit lobortis felis. Ut nisi ex, dapibus id laoreet nec, mollis sed tellus. Curabitur placerat, odio sit amet vehicula luctus, ante leo malesuada ex, in aliquet erat turpis quis lectus. + +Aliquam posuere venenatis augue eget gravida. Pellentesque vitae purus lobortis, sollicitudin libero non, molestie odio. Quisque tincidunt lectus ut metus vestibulum sollicitudin. Donec nec erat lorem. Nulla scelerisque sagittis nisl lobortis fermentum. Praesent tristique turpis eget justo blandit, sit amet ullamcorper nisi bibendum. Mauris et erat commodo, pellentesque elit vel, rutrum elit. Integer aliquet, nisl eget suscipit dignissim, augue augue porta ligula, ut mollis mauris lorem vel justo. Ut et diam eget nibh malesuada commodo vel aliquam arcu. Cras viverra magna a gravida maximus. Donec non commodo augue, id viverra ligula. Etiam ut orci quis ligula varius malesuada sed efficitur tellus. Vestibulum vulputate ante eget enim cursus iaculis. Fusce tempus mattis tellus, in pulvinar mauris egestas at. Duis aliquam risus mi, rhoncus iaculis purus tincidunt et. Nullam et velit nec magna rutrum tempor at a nisi. + +Fusce bibendum scelerisque elit a dictum. Morbi efficitur gravida dapibus. Aenean tellus lacus, interdum vitae egestas eget, placerat ac mi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus accumsan neque in massa elementum, sed porta lacus tempus. In maximus ex erat, vitae suscipit enim euismod sit amet. Nam aliquet suscipit est. + +Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce in dignissim odio. Nam dictum quam eu consequat suscipit. Aenean id urna diam. Fusce sollicitudin lorem vehicula est feugiat accumsan. Etiam pulvinar orci sit amet velit facilisis, id ornare augue blandit. Pellentesque vitae blandit tortor, sit amet tempor nibh. Sed sagittis semper ipsum id lacinia. Proin congue nec mauris eget convallis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nunc vulputate magna purus, vitae viverra mauris dignissim id. Praesent sodales lectus dignissim justo elementum tincidunt. In non hendrerit nisl. Nulla tincidunt odio in quam consequat, id egestas nunc tincidunt. Fusce posuere diam bibendum aliquam sagittis. + +Etiam vitae sem rhoncus, venenatis justo ut, pretium lacus. Aenean in vehicula nulla. Maecenas laoreet dolor vitae maximus hendrerit. Morbi et mattis est. Cras molestie nunc eu diam dapibus, non sollicitudin tellus rhoncus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sit amet convallis dolor, in placerat felis. Proin facilisis quam quis enim porttitor, at consectetur libero auctor. Cras porta lacus velit, id vulputate leo vehicula quis. Pellentesque vulputate dapibus est, quis blandit urna pellentesque vitae. Donec eget nibh massa. Vestibulum convallis, odio vitae sodales fringilla, ante orci congue libero, eget lobortis urna nulla vitae leo. Donec cursus porta velit vel sagittis. Nullam ornare finibus ex, at finibus lorem sodales in. Vestibulum sollicitudin vehicula est eget tempus. \ No newline at end of file diff --git a/docs/mapViewExemple.html b/docs/mapViewExemple.html new file mode 100755 index 0000000000000000000000000000000000000000..43e5e2fc85b23d5968ec1c1b0d29187f7fe41cc2 --- /dev/null +++ b/docs/mapViewExemple.html @@ -0,0 +1,139 @@ +<?php + + /* ***************** modifier l'url relative si besoin pour trouver communecter/view/sig/ *******************/ + $relativePath = "./"; + /* ***********************************************************************************/ + + //chargement de toutes les librairies css et js indispensable pour la carto + $this->renderPartial($relativePath.'generic/mapLibs'); + + + /* **************** modifier les parametre en fonction des besoins *******************/ + if(!isset($sigParams)) + + $sigParams = array( + + /* CLÉ UNIQUE QUI SERT D'IDENTIFIANT POUR CETTE CARTE */ + "sigKey" => "SV", + + /* MAP */ + "mapHeight" => 450, + "mapTop" => 0, + "mapColor" => '', //ex : '#456074', //'#5F8295', //'#955F5F', rgba(69, 116, 88, 0.49) + "mapOpacity" => 1, //ex : 0.4 + + /* * + * Provider de fond de carte + * http://leaflet-extras.github.io/leaflet-providers/preview/index.html + * */ + + /* MAP LAYERS (FOND DE CARTE) */ + "mapTileLayer" => 'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png', //'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png' + "mapAttributions" => '<a href="http://www.opencyclemap.org">OpenCycleMap</a>', //'Map tiles by <a href="http://stamen.com">Stamen Design</a>' + + + /* MAP BUTTONS */ + "mapBtnBgColor" => '#E6D414', + "mapBtnColor" => '#213042', + "mapBtnBgColor_hover" => '#5896AB', + + /* USE */ + "usePanel" => true, + "titlePanel" => 'THÈMES', + "useRightList" => true, + "useZoomButton" => true, + "useHelpCoordinates" => false, + "useFullScreen" => true, + + /* TYPE NON CLUSTERISÉ (liste des types de données à ne pas inclure dans les clusters sur la carte (marker seul))*/ + "notClusteredTag" => array("citoyens"), + + /* COORDONNÉES DE DÉPART (position géographique de la carte au chargement) && zoom de départ */ + "firstView" => array( "coordinates" => array(-21.13318, 55.5314), + "zoom" => 9), + ); + /* ***********************************************************************************/ + + $moduleName = "sigModule".$sigParams['sigKey']; + + /* ***************** modifier l'url si besoin pour trouver ce fichier *******************/ + //chargement de toutes les librairies css et js indispensable pour la carto + $this->renderPartial($relativePath.'generic/mapCss', array("sigParams" => $sigParams)); + +?> + +<?php /* ********************** CHANGER LE STYLE CSS SI BESOIN ********************/?> +<style> + + .<?php echo $moduleName; ?> .mapCanvas {} + .<?php echo $moduleName; ?> .panel_map { + background-color:rgba(255, 255, 255, 0.83) !important; + } + .<?php echo $moduleName; ?> .item_panel_map { + background-color:rgba(0, 0, 0, 0) !important; + color:#7A7A7A !important; + } + .<?php echo $moduleName; ?> .item_panel_map:hover { + background-color:rgba(0, 0, 0, 0.04) !important; + } + + .<?php echo $moduleName; ?> #right_tool_map {} + .<?php echo $moduleName; ?> #liste_map_element {} + + .<?php echo $moduleName; ?> #lbl-chk-scope {} + + .<?php echo $moduleName; ?> .btn-group-map {} + + /* XS */ + @media screen and (max-width: 768px) { + .<?php echo $moduleName; ?> .mapCanvas{} + .<?php echo $moduleName; ?> .btn-group-map{} + } + +</style> + + +<?php /* ********************** HTML ********************/?> + + +<?php /* ********************** CHANGER LE CHEMIN RELATIF SI BESOIN ********************/?> +<?php $this->renderPartial($relativePath.'generic/mapView', array( "sigParams" => $sigParams)); ?> +<?php /* *******************************************************************************/?> + + +<script type="text/javascript"> + + var Sig; + + /**************************** DONNER UN NOM DIFFERENT A LA MAP POUR CHAQUE CARTE ******************************/ + //le nom de cette variable doit changer dans chaque vue pour éviter les conflits (+ vérifier dans la suite du script vvvv) + var mapExemple; + /**************************************************************************************************************/ + + //mémorise l'url des assets (si besoin) + var assetPath = "<?php echo $this->module->assetsUrl; ?>"; + + jQuery(document).ready(function() + { + //création de l'objet SIG + Sig = SigLoader.getSig(); + //affiche l'icone de chargement + Sig.showIcoLoading(true); + + //chargement des paramètres d'initialisation à partir des params PHP definis plus haut + var initParams = <?php echo json_encode($sigParams); ?>; + //chargement la carte + mapExemple = Sig.loadMap("mapCanvas", initParams); + + /**************************** CHANGER LA SOURCE DES DONNEES EN FONCTION DU CONTEXTE ***************************/ + var mapData = contextMap; + /**************************************************************************************************************/ + + //affichage des éléments sur la carte + Sig.showMapElements(mapExemple, mapData);//, elementsMap); + //masque l'icone de chargement + Sig.showIcoLoading(false); + + }); + +</script>SS \ No newline at end of file diff --git a/docs/process.md b/docs/process.md new file mode 100755 index 0000000000000000000000000000000000000000..8223c7b9cd4c665e8528b6d958f6880c81a7d76d --- /dev/null +++ b/docs/process.md @@ -0,0 +1,9 @@ + +process Organization + New Organization + form.php => minimal information + /organization/savenew + Update Organization + view.php + editOrganization.php + more information and data + /organization/save diff --git a/docs/process/interoperability.txt b/docs/process/interoperability.txt new file mode 100644 index 0000000000000000000000000000000000000000..838fd10845db8c85523bee5259dc39cb984a370c --- /dev/null +++ b/docs/process/interoperability.txt @@ -0,0 +1,39 @@ +Obtenir l'url de la requête à l'API donnant les données souhaité filtré par zone (par ville de préférence), filtrage par geoshape ou bien par insee + +Crée une nouvelle action dans le CTK de Convert (WikipediaAction.php ou OsmAction.php par exemple) + - rajouter la ligne adéquat dans ApiController + - rajouter aussi la ligne dans ConvertController + +L'action va appeller une fonction dans le model Convert.php qui va effectuer la convertion au format PH + + Le mapping est à faire dans un nouveau fichier type TranslateWikipediaToPh.php qui va faire le mapping entre les différents champ du JSON source et les champs de Communecter. + + Exemple de mapping : + + "properties.name" => "name" + "geometry.coordinates.0" => "geo.longitude" + "geometry.coordinates.1" => "geo.latitude" + + Passer les différents paramètres dans la fonction previewData situé dans le model Import.php afin de géolocaliser les éléments par rapport à une latitude et une longitude. + + les paramètres à passer est un array $param : + - $param['key'] => obligatoire + - $param['nameFile'] => obligatoire + - $param['pathObject'] => optionnel (correspond au chemin où sont placé les données dans le JSON source) + - $param['file'][0] => obligatoire (correspond à un string, contient l'enssemble des données à traduire) + + Dans le model Import.php ne pas lancer la fonction getWarnings car les data interop ne possède pas forcément les champ obligatoire d'un élément Communecter. + +Afin de visualiser les données dans le directory de Communecter + + Dans directory.js + + Dans la fonction ShowDirectoryResults, les paramètres à afficher doivent obligatoirement avoir un id et un type (les rajouter si ce n'est pas déjà le cas); + + params.htmlIco => change l'icone qui est affiché sur chaque élément du directory + params.url => modifie le lien de chaque élément du directory + +Pour modifier les images dans la carto, modifier la fonction Sig.getThumbProfil() dans le fichier map_initializer.js + + + diff --git a/docs/process/projects.txt b/docs/process/projects.txt new file mode 100755 index 0000000000000000000000000000000000000000..c24a445e317e3fbb49f7978b80a628ffa5f58699 --- /dev/null +++ b/docs/process/projects.txt @@ -0,0 +1,11 @@ +* toolbar + -> Timeline + -> Discuss or Action Rooms +* dashboard + [[http://127.0.0.1/ph/communecter/project/dashboard/id/556767a5f6ca4723538b4569]] + * pods + -> dashboard/description + -> ../pod/sliderPhoto + -> dashboard/contributors + -> dashboard/timesheet + -> dashboard/projectChart \ No newline at end of file diff --git a/docs/process/statisticpopulation.txt b/docs/process/statisticpopulation.txt new file mode 100755 index 0000000000000000000000000000000000000000..3774569c264bd48012146f76544bbb78bb0204e3 --- /dev/null +++ b/docs/process/statisticpopulation.txt @@ -0,0 +1,16 @@ +[[http://127.0.0.1/ph/communecter/city/statisticpopulation/insee/72168/]] + +* StatisticPopulationAction + Envoie en paramètre un tableau {[nomVille] {[cdeinsee] info population ... + -> getMultiBarChart ({[nomVille] ..., string) + + -> buildDataSetMulti ({[nomVille] ... , string) + + -> getMapObject ({[codeInsee] , string) + return un tableau avec les infos de la population + [2011]{....} + + return la ou les villes avec le total de population + [2011]{ [0]{[x]: nomVille, [y]: 2162}} + + -> affiche le graph diff --git a/docs/read-me-SIG.txt b/docs/read-me-SIG.txt new file mode 100755 index 0000000000000000000000000000000000000000..180a3b9569bfe89c550473ce7eec51869c8d1694 --- /dev/null +++ b/docs/read-me-SIG.txt @@ -0,0 +1,257 @@ + +------------------------------------------------------------------------------------- +* +* ** READ-ME ********************* +* ** UTILISATION DU MODULE SIG *** +* ********************************* +* +------------------------------------------------------------------------------------- + + +**** Fichier type : **** +* mapViewExemple.php (/ph/communecter/docs/mapViewExemple.html) +* Vous pouvez copier/coller ce fichier où vous voulez pour créer une nouvelle carte. +************************ + + + +**** Configuration d'une nouvelle carte : 3 ETAPES **** +------------------------------------------------------- + + + ------------------------------------------------------------------------------------- + *** 1 - PATH + ------------------------------------------------------------------------------------- + *** 2 - PARAMETRES GLOBAUX + ------------------------------------------------------------------------------------- + *** 3 - CSS + ------------------------------------------------------------------------------------- + *** 4 - JS + ------------------------------------------------------------------------------------- + + + + ------------------------------------------------------------------------------------- + *** 1 - PATH + ------------------------------------------------------------------------------------- + + * mapViewExemple.php (/ph/communecter/docs/mapViewExemple.html) + * l.4: $relativePath = "./"; + + Il est important de vérifier que $relativePath contient un chemin relatif correct vers le répertoire /communecter/view/sig/generic. + $relativePath est utilisé pour charger les fichier mapLibs.php, mapCss.php, et mapView.php + + //chargement de toutes les librairies css et js indispensable pour la carto + * l.8: $this->renderPartial($relativePath.'generic/mapLibs'); + + //chargement du style css avec les paramètres d'initialisation + * l.61: $this->renderPartial($relativePath.'generic/mapCss', array("sigParams" => $sigParams)); + + //chargement du html avec les paramètres d'initialisation + * l.100: $this->renderPartial($relativePath.'generic/mapView', array( "sigParams" => $sigParams)); + + + + ------------------------------------------------------------------------------------- + *** 2 - PARAMETRES GLOBAUX + ------------------------------------------------------------------------------------- + + * mapViewExemple.php + * l.14 : $sigParams = array() + + ******************************************** + + $sigParams : + + Contient tous les paramètres de configuration de la carte + Pour modifier l’apparence et le comportement de la carte que vous souhaitez afficher, + il suffit de renseigner ces paramètres en PHP avant de charger la carte en JS. + + ******************************************** + + + "sigKey" => "SV" //clé unique qui sert d'identifiant pour cette carte, permet d'afficher plusieurs carte sur une même page + + "mapHeight" => 450 //hauteur de la carte + "mapTop" => 0 //position top de la carte + "mapColor" => '' //teinte coloré de la carte ex : '#456074' ou rgba(69, 116, 88, 0.49) + "mapOpacity" => 1 //opacité de la carte ex : 0.4 + + * + *** MAP TILES LAYERS *** + * + * Provider de fond de carte : + * http://leaflet-extras.github.io/leaflet-providers/preview/index.html + * Liste de fond de carte gratuits que l’on peut utiliser pour nos cartes OSM. + * + * Pour changer le fond de carte : + * Choisir une carte du provider et récupérer les valeurs des paramètres "mapTileLayer" et "mapAttributions" + * + *** + + "mapTileLayer" => 'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png' + //changer l’url pour changer le fond de carte ex : 'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png' + + "mapAttributions" => '<a href="http://www.opencyclemap.org">OpenCycleMap</a>' + //changer l’url pour afficher le nom du créateur de la carte en bas à droite + + * + *** BUTTONS *** + * + * Pour changer l’apparence des boutons qui se trouvent sur la carte (btn zoom) + * + *** + + "mapBtnBgColor" => '#E6D414' //couleur background + "mapBtnColor" => '#213042' //couleur font + "mapBtnBgColor_hover" => '#5896AB' //couleur background hover + + * + *** USE *** + * + * Pour activer / désactiver des fonctionnalités + * + *** + + "usePanel" => true, //utiliser le panel de gauche (Tags), true or false + "titlePanel" => 'THÈMES //le titre du panel (ignorer si usePanel = false) + + "useRightList" => true //utiliser la liste de droite (éléments de la carte), true or false + + "useZoomButton" => true // afficher les boutons zoomIn / zoomOut, true or false + + "useHelpCoordinates" => false // afficher sous la carte un espace qui affiche les coordonnées d’un click souris sur la carte + //(pratique pour initialiser le centre de la carte quand on créé une nouvelle carte) + + "useFullScreen" => true // indique si la carte se trouve dans une subview, true or false. + //Si c’est le cas, la map s’affiche en « plein écran » selon la taille de la subview + + * + *** TYPE NON CLUSTERISÉ *** + * + * liste des Types de données à ne pas inclure dans les clusters sur la carte + * lorsqu'un marker n'est pas clusterisé, il est toujours visible sur la carte et n'est jamais inclu dans un cluster + * + *** + + "notClusteredTag" => array("citoyens") + + + * + *** COORDONNÉES DE DÉPART + * + * position géographique de la carte au chargement) && zoom de départ + * + *** + + "firstView" => array( "coordinates" => array(-21.13318, 55.5314), + "zoom" => 9 ); + + + + + ------------------------------------------------------------------------------------- + *** 3 - CSS + ------------------------------------------------------------------------------------- + + * mapViewExemple.php + * l.65: CHANGER LE STYLE CSS SI BESOIN + + + ******************************************** + Pour surcharger le style css d'une carte, il faut respecter la syntaxe suivante, + cad : ajouter .<?php echo $moduleName; ?> avant chaque nom de class ou identifiant, + afin de ne pas surcharger le style toutes les cartes qui pourraient être chargées en même temps. + ex : une carte + une carte en subview + + Le paramètre $moduleName est automatiquement créé à la ligne 57 + à partir du paramètre sigKey que vous indiquez dans sigParams : + + l.57 : $moduleName = "sigModule".$sigParams['sigKey']; + + De cette façon, il est possible de charger autant de carte qu'on le souhaite sur la même page, + et de personnaliser chaque carte différemment. + ******************************************** + + + .<?php echo $moduleName; ?> .mapCanvas {} + .<?php echo $moduleName; ?> .panel_map { + background-color:rgba(255, 255, 255, 0.83) !important; + } + .<?php echo $moduleName; ?> .item_panel_map { + background-color:rgba(0, 0, 0, 0) !important; + color:#7A7A7A !important; + } + .<?php echo $moduleName; ?> .item_panel_map:hover { + background-color:rgba(0, 0, 0, 0.04) !important; + } + + /* XS */ + @media screen and (max-width: 768px) { + .<?php echo $moduleName; ?> .mapCanvas{} + .<?php echo $moduleName; ?> .btn-group-map{} + } + + + + ------------------------------------------------------------------------------------- + *** 4 - JS + ------------------------------------------------------------------------------------- + + * mapViewExemple.php + + ******************************************** + Le code javascript doit être légèrement modifié dans chaque view afin d'éviter les conflits entre les cartes. + La seule modification à effectuer est de renommer la variable mapExemple, qui représente la carte affichée. + ******************************************** + + + //DONNER UN NOM DIFFERENT POUR CHAQUE CARTE + l.110 var mapExemple; + + l.126 //MODIFIER LE NOM DE LA VARIABLE 'mapExemple' + mapExemple = Sig.loadMap("mapCanvas", initParams); + + l.133 //MODIFIER LE NOM DE LA VARIABLE 'mapExemple' + Sig.showMapElements(mapExemple, mapData); + + + + ******************************************** + Par défaut, les données JSON chargées sur la carte sont les données contenues dans la variable 'contextMap'. + Si aucune variable 'contextMap' n'est définit, aucune donnée ne sera chargée. + ******************************************** + + Pour modifier la source des données JSON : changer le nom de 'contextMap' l.126 par le nom de variable qui contient les données + + /**************************** CHANGER LA SOURCE DES DONNEES EN FONCTION DU CONTEXTE ***************************/ + l.126 var mapData = contextMap; + /**************************************************************************************************************/ + + + + ------------------------------------------------------------------------------------- + *** 5 - CONCLUSION + ------------------------------------------------------------------------------------- + + - Tout le code nécessaire pour afficher une carte est disponible dans mapViewExemple.php + + - Pour afficher une nouvelle carte, copier/coller le code (ou le fichier) à l'endroit souhaité + et configurez les paramètres selon le context. + + + ----------- + Important : + ----------- + Les fichiers PHP génériques se trouvent dans : communecter/views/sig/generic + Les fichiers JS se trouvent dans : communecter/assets/js/sig + Les fichiers CSS se trouvent dans : communecter/assets/js/sig + + Pour afficher des cartes dans un autre module que communecter, il faut avoir ces lib aux mêmes endroits + + + + + + + \ No newline at end of file diff --git a/docs/roadmap.org b/docs/roadmap.org new file mode 100755 index 0000000000000000000000000000000000000000..e8412fbb86d8977838a1663eca32050e06f0f814 --- /dev/null +++ b/docs/roadmap.org @@ -0,0 +1,1512 @@ + +* ************************************************************ +* Bug et retoure des rencontre alternative +* ************************************************************ +[ ] Bug detail orga, lorsuqe l'on clic sur une dda , retour a la page home (PROD) +[ ] possibilité d'envoie un messsage entre conseil citoyen +[ ] Btn suggest sur co +‎ [ ] Ajouter un participant type orga +[ ] Invité par le phone +[ ] partager le lien vers lappli dans l'email + + +[ ] ajouter un event a une orga + +* ************************************************************ + +Je suis admin du projet "jardin partagé Vauban" et je ne peux pas créer de discussion / décision / action +De plus ce projet apparait comme ancien projet sur l'organisation "Nuit Debout Saint-Denis". +A la base j'avais mis une date de fin qui avait été dépassée, +j'ai modifié la date de fin, mais ce projet reste dans "ancien projet" + +* ************************************************************ + +* optim +[.2] SEO finir + http://embed.ly/docs/explore/oembed?url=https%3A%2F%2Fwww.communecter.org%2F%23event.detail.id.57e2422a40bb4e7727c4c9d2 + http://phantomjs.org/ + https://prerender.io/documentation + +* Global +[.2] pouvoir ajouter des url d'image plutôt que d'uploader les photos ou le copier coller +[.2] Ne plus etre bloquer pour ouvrir des pays => #1261, #323 + - utilisant le localiseur et une validation que tout est bon pour ajouter une city + - ouverture par pays validé en amont +[.2] internationalisation traduction + +[.2] la charte ethique en 10 pts + - Liberté + - respect total de l'autre + - un outil pur faire société +[.2 spec] reflechir First Connect , show notifications, hot news .... + + * Elements +[.2] event + project : change organiser #632 + *** Location amélioration + [.2] ajouter une colonne mes lieux préférés, click et rempli + [.2] ajouter par element + [.2] selecteur de target utilisant mon repertoire et le design du dashboard + - switcher from form to selection dash + - onSelect == onclick fill form fields and switch back to form + [ ] auto complete custom list [[http://jqueryui.com/autocomplete/#custom-data]] + [[http://stackoverflow.com/questions/3488016/using-html-in-jquery-ui-autocomplete]] +Report Abuse on element + +** Event ideas + [.2] Duplication d'event + [.2] agenda : les events prennent pas la durée sur plusieurs jours + [.2] affiché les event mois precedent et suivant + [.21] Best place calculator : utilisant la position des participants + [.2] parent Event : load param ajax : show only ongoing or event to come + When subevent , prefill location => #1017 + Type d'événement : liste ouverte #663 + Pouvoir choisir en lieu Online pour les events #663 + +** POI + [.2] affiché sur la carte un type geoJson + [.2] import POIs from : + [ ] geojson, ex umap + [ ] csv ... + [ ] xml + [ ] api smart citizen + conversion + +* City +[.2] city bread crumb ( cp, insee, agglo, departement, region) +[.2] ajouter une photo de votre ville + - baniere +[.2] refactor péi_insee-cp en péi_insee_cp +[.2] city kicker thematique grace a des tags bien choisit ouvrant la recherche avec les resultat locaux de la thématique + +** Notifications +Notification intelligentes => 685 +Liste des notifications déjà lues => #370 #453 + +* Action Terrain + [ ] journée Biodiversité Pointoss coupe coupe l'accacia (Galabert) +* Action Projet + * COBUS + [ ] design + - 16/08 point @steph + [ ] install batterie RV @Charly + [ ] switch + test multi ordi + [ ] generateur avec onduleur @Franky + * COMOBI + * interop + [ ] connecté une autre instance CO en mode interop + [ ] amélioré le checkExist au remplisage du input NAME + [ ] check also les reseaux FB , Google, twitter + [ ] remplir réseau sociaux + * COPEDIA + [ ] intégré dans un projet global universitaire trans discipline + [ ] voir avec Fred Mesnard et David Grosser , comment l'intégrer dans le cursus , ou meme au LIM + * FAI + [ ] rencontre avec martial + [ ] TEster les antennes + * COPI + TIERS LIEUX + * Kiltir Lab + * imprimante de quartier + [ ] cout 199€ + [ ] utilisateur + [ ] personne ou asso + * broyeur de quartier + * Ter Là + [ ] {{@Tib}} : etudier interop avec des cart open source + [ ] {{@Tib}} : contacter Anil voir + [ ] {{@Geoffrey}} : Doc épuré + [ ] Features + [X] Messagerie -> Rocket chat + [ ] creer une instance + [ ] Payement -> A faire + [ ] mangoPay + [ ] Acceuil + [ ] La Carte + [ ] Sauvegarde -> Collection + [ ] Facture + Contrat (Case à cocher) -> A faire (générateur pdf) + [ ] Les circuits -> Search + [ ] Boutique -> POI + Vente en ligne + Stock (meme design que "Les circuits") + [ ] Integration du Design + [ ] Reservation N°1 : Etape + - Calendrier remplie d'event -> Page Agenda + - Utilisateur fait une réservation -> Dynform + - Le pro reçoit un mail avec le tel / email de l'user -> Envoie de mail + - Payement + [ ] Cdc receptionné le 01/08/2017 + [ ] Réunion de lancement 8/08 + [ ] Démarrage du projet prévu le seamine du 18 Sept + +* Communication + [ ] passer la roadmap dans le Wiki + [ ] commencer une campagne d'adhésion à Open Atlas + [ ] poster CO + smarterre , base de la gazette automatiser + +* GFX + ** @Edith + [ ] Aide Design Site + [ ] Aide Design de la Gazette + [ ] Aide Plaquette + [ ] Participation Design Local + ** @Steph + [ ] Design deco du CoBus + + +* idea + [ ] menu > drop answers > show nb of members + nb of links + [ ] new menu List or shortcut: last visited links + [ ] add contributor or member, add a tag list option , could be used as roles or team filters + ** feature + [ ] 4 question scrum : on organisation : + [ ] offrir a tous : le ppt, slideshow intégré + [ ] sur detail element montrer la filère , valoriser les tags + [ ] lifepath : ultra personnel tag + - can use POI's type lifepath > private | public + - can be used for following any item + [ ] Shop : Listing produit + [ ] listing en mode bullet points + [ ] POI type produit , prix + [ ] subtype : sandwich plat + ** interoperabilty + data mining : + [ ] use FB social graph to mine events and organisation + ** COMOBI + [ ] global phone app : btn add to communecter + - activable anywhere on anything + - FB link + - url site + - event (FB, Google) + ** ERgonomie + [ ] menuLeft dynamic avec l'activité + - faire remonté les point menu qui ont des nouveauté + ** news + @pitonStLeu, pouvoir référencer une commune + [ ] baniere ou image : remerciement, cité un auteur pour la réutilisation + c'est le minimum dans le copytalisme + ** Event communication + [ ] comunicate an email like event@co.org anyone can add it to a mailing list + the event would be added by someone + [ ] in time this mail box could even become a task box that anyone could act upon + ** Open Science + [ ] photo-identification collaborative : + - créer group + - POI + photo + hashtag en commun , ex : #baleineReunion + - Btn sameAs : open Search Box + find Element + choose name + - Outside src : en regardant les photos, video de qlqun (FB, flickR...) + > POI : #baleineREunion + url + ** dynsurvey proposal + - dynForm & dynSurvey Builder + - room > create survey as proposal + - instead of voting, people will answer a answer + - each question can be of certain type + - texte + - values + - fixed + - percentage + ** Page dédié sondage avec le module de proposition + faire une page genre comme les change.org et autre + on fait un appel , venez nombreux donner votre avis, proposer vos idées, ou jsute etre présent à l'appel + sur la question du : ....blah blah + ** Qui est là , Action en cours, Todo, Todo Perso : dans un e communauté + une vision à un temps t, de toutes les ressources d'une CO + - en mode web + - mobi + ** menu configurable comme sur telephone , on click avatar + avec des widget , esay access links ... + possibilité de plusieurs panels + ** idea build dynform based on final json analysis (retro build) + - entry param is a structure similare + ** Keyboard nav + Ctrl + ? > opens floop > type > reduce selection + ** Link Badge, POD , widget CO + permettra de symboliser le liens en des entité + pour WP ou a tout site + on a pas besoin d'etre membre de l'orga + c'est comme porter un pins de nos amis , peut etre lié au staring / favoris + ** application launcher like linux + ** lecteur de site embed dans CO en gardant la barre de menu + ** export an Element as MD and import a structured MD file (to be defined) + ** PPT pres suivi du qui es tu :: + - rempli qlq detail + - et en avant + ** COPI as a type of POI + - name + - where + - url for interoperating + ** POI as an RSS feed + could show in journal live feed + or as an rss reader integrating an open source RSS reader + ** Stagiaire : + [ ] imaginer un serious game sociétal , interactif + - réintégrer la gamification + [ ] blockchain + ** DDA + Proposition Orienté / Duel + exemple de vote: PPT terminé validé ou a retoucher + pouvoir changer les libélé pour contre + ** add location into POI list by default +* ************************************************************ +* Version C0.22 : en cours +* ************************************************************ + ** optim + dynform Localiser + positionner direct sur ma localité + btn validé disparait parfois + fonctionnalité des lieux (module places) + + ** @Tib +>>>> [ ] bug :: preview POI + [ ] search fork the world > opens a preview POI > should have the parent link + [ ] connecté une proposition avec un POI +>>>> [ ] bug :: presistent login issue , SSO ? +>>>> [ ] thematique SPORT +>>>> [ ] fail :: diaspora on users social networks +>>>> [ ] when ona page , after login return to same page instead of personnal detail +:totest: [ ] logo de l'element dans le mail d'invite + - co2/test/displayMail/id/59dc95b3dd0452f9308d4af7 +>>>> [ ] ajouter Thématique Sport +>>>> [ ] when on a page , after login return to same page instead of personnal detail +>>>> [ ] application launcher + activater like linux +[X] remake error in CO +[X] loading configs from DB applications.key = "devParams || prodParams" > Application::loadDBAppConfig(); +[ ] integration du system de paiement Mango + [ ] create User + [ ] create User Wallet + [ ] create Seller + [ ] create seller wallet + [ ] Payin Cash + [ ] creates a CardRegistration + [ ] setle transaction + [ ] build payment interface +>>>> [ ] faciliter la création de page static + [ ] avec du contenu MD + [ ] un slideshow MD + [X] json config builder + [ ] read an externel .md text source + [X] json config builder + - is just dynForm selector + - save allready gets the collection as a param in formatData + - any new saved Element must have a model and it's databinding at least + [X] select type of config ex : "network" + - onclick : openForm of the given type + - this way editing will also work + [X] subDynform : open a subDF from any DF + - similar to location process + - on click opens a new modal with a dynform inside +>>>>[ ] removing dynform classes from co.js and lazy load them +>>>>[ ] check webpacking +>>>>[ ] suppression d'un element user type COEDitor + [ ] bug effacement de latitude fruitiere [[https://www.communecter.org/#page.type.organizations.id.5718adb240bb4eeb271d6553.view.directory.dir.followers]] +>>>>[ ] add parent class to POI types + [ ] poi le saviez vous , a utiliser dans les chargements + [ ] life ,lifepath, consumsion,ressources, architecture, urban +>>>>[ ] http://127.0.0.1/ph/co2/rocketChat/type/xxx/id/xxxx > open chat + [ ] request an open app system + - demande d'hébergement de tout les outils dégoogelisé + - le prix peut etre proportionnel à la consommation + - avec un reversement a chque commun utilisé + [ ] add filters in top bar mapEnd , near username + [ ] add delete to image upload [[https://docs.fineuploader.com/quickstart/02-setting_options.html]] + - on Update l'image dans le form edit > pas possible de supprimer l'image qu'on a précédement ajouté + * Finir module Tiers Lieux + [ ] on events TL connecté url to visio + [ ] partage de calendrier entre plusieurs TL connecté + [ ] show icons for quick access to ressources of a TL event + [ ] avoir des roles concirerge ...etc == RH + [ ] Compétence + * features + [ ] Ressource [[[https://docs.google.com/drawings/d/17L1sZ0so3BHoV8fNclsCio9HflaAVkKP_Q1XhuUBhn4/edit]]] + [ ] temps de consommation d'une ressource + [ ] taux d'utilisation + [ ] Besoin + [ ] Service + [ ] Wifi , lit, bouffe, coworking, café + [ ] url city a transmettre + [ ] dynform bookmarking using POI : add a url > Next > get content (voir avec tango kgougle ) + [ ] dynform filling threw get content from url copied into name field + [ ] brique comeptence et tache sur mon profil + [ ] réintégré la GEd de granddir + [ ] losing session : rememberme + [ ] enable edit POI when open Edition + + + +* ************************************************************ +* Version CO.22.terlà : en cours +* ************************************************************ + +* Tib +[X] #checkout page +[X] test with card + [X] generate all user wallets for all sellers + [X] PayIn payement +[ ] seller Payout + [ ] create bank account + [ ] + + +* ************************************************************ +* Version C0.21.8 : MEP +8 correpsond le nb de nouvelle fonctionalité +- DDA refactored +- internationalisation +- integration de rocket Chat +- creation de dossier sur les album +- mini GED avec upload de document +- gestion des role sur les membres +- traduction +- ??? module Tiers Lieux , Ressources +* ************************************************************ + +* DEV + ** Todo + [ ] Api annonce + ** Amelioration during tests + [ ] redirect after error : go back to previous page , not "home" + [ ] date devant le lien follow + [ ] click follow sur orga > msg : "Êtes-vous sûr de ne plus suivre cette personne ?" + [ ] removes the orga from list , why ???? + [ ] bug msg non approprié : inviter qlqun + [ ] clean up themes (cityBox, sig ) + [ ] clean up recurrent logs + [ ] url preview when sharing communecter + [ ] SEO optim + +** Tib + * integrating Rocket Chat + [X] mode standalone : http://127.0.0.1/ph/co2/rocketchat/ + [X] mode module : lbh('#chat') + [X] mode modal on elements : $("#rocketchatModal").modal('show') + [X] create group channel by Name + [X] creer un user admin username "communecter" ou corail coralali coAdmin + [X] on orga page , btn > creates and opens RC group (private channel) + [X] groups always created by coAdmin + [X] first user creates the room , but if another user tries to join it jsut does go , which doesn't work on groups + [X] only Admins can create rooms + [X] if exists , check user list of channels, then decide go or invite process + [X] check group existance before creation , otherwise just invite + [X] on demand : either we put a property on an element describing if corresponding exists or not + [X] only members, have access + [X] testing if non member has access to + [X] after create invite all members to chat by notification + [X] try to optimise admin login using smart handling of header + + [X] apply to projects and events + [X] on CO-login get RC loginToken + [ ] don't show chat if no loginToken + [X] integrate into CO + [X] on element pages as modal + [X] as a module in top menu + [X] add redirect iframe to login + after login redirect to iframe + [X] how to use live chat :?layout=embedded + [X] preload iframe after login + [X] changing organisation type open Edition or cloed > change room group or channel +[ ] base room on contextData.slug + [X] changing slug > renames room + [X] getting chat notifictions [[https://rocket.chat/docs/developer-guides/iframe-integration/events]] + [ ] mutualiser les import RocketChat + ** test + [X] check anymember can join the chat + [ ] person changing username : changement de nom d'user d'un coté, il faut viré coté rocket chat profil et avatar pour pas pouvoir changer de nom d'user email avatar, et coté CO2 si changement appelle a /api/v1/users.update avec data.username data.email data.name https://rocket.chat/docs/developer-guides/rest-api/users/update + ** use cases + [X] gloabal menu : module chat btn opens , all my chat rooms + [X] any element page : open the elements channel + [X] chat with members , or add all members + [X] on someones page : show btn if connected, open the direct chat room + [X] when connection is billateral + [X] connect one to one msg + [X] use as private message otherwise + ** ideas + amelioration + [ ] @all > would post a news on wall element + [ ] export chat history + [ ] pouvoir utiliser un rocket chat externe (only for admins) + [ ] add chat shortcut, maybe right click in directories , or floopdrwaer + [ ] build up visual tchat tree, showing all your channels , onclick a channel show who is inside + - could analyse participation by sizing face icon size + * ----------------------------------------- + ** @Tib et @Tango + [ ] lancé DDA sur plusieur communauté test + [ ] pour : CGPME (vienne sveloupoule@cpmereunion.re), nancy mine, Pref, Digi Reunion + [ ] proposition pour 15 spetembre + [ ] idée sur axe regionnaux + [ ] nationaux + [ ] filiere + [ ] échanges poser les questions + [ ] lister vos actions concrete + [ ] quick adder : copy link , set type + - get page data > fill form > save + - fill contact form + *** usages + [ ] DDA is for members only ? preference ? + [ ] utiliser le DDA pour les propositions de nouvelles fonctionnalités de CO + *** ideas features + * amélioration + [ ] pouvoir like ou qualifier un surlignage + [ ] background Color nuance pour pondéré la force d'un commentaire ou amendement + - plus ou moins rouge si on est plus ou moins en désaccord + - plus ou moins vert si on est plus ou moins en accord + [ ] add short Desc :: dyFInputs.textarea(tradDynForm["shortDescription"], "...",{ maxlength: 140 }) + [ ] add DDA activity to journal + [ ] in decision room > open proposal in preview to run through all proposals + [ ] one room containing all DDAs instead create a room for each section + [ ] Tripple page + [ ] think about a process stepper Discuss (can skip), Decide (can skip) Action (option) where nothing is mandatory + [ ] intégrer aussi un partage de budget sur une proposition + [ ] convert proposal to project + [ ] on a proposal open to crowdfunding > status : funding + [ ] list objectives titles + description (medium) + [ ] build pixel funding + [ ] particpation join and get involved / share budget + [ ] if obtained > projects status : implementation + [ ] project tasking / actions + [ ] when all done status : finished + [ ] what about Document, Discuss, Decide, Act = 3D.A + ** @tango + [ ] connecter le form mail au membres d'un groupe + ** @Bouboule + [ ] add HTML5 notifications + [ ] Finir Besoin Ressource compétence () [commencer] + [ ] visualisation de la banque des besoins =>#1260 + #490 + [ ] msg mail sur un groupe sur les @ dans les news, et @all (send message on notify someone) + [ ] create notification for @all + [ ] NEWS + [ ]Rework @ for same working mobile [#192] + [ ] générer des pseudoUnique pour le mention et aussi pour générer de jolie url communecter.org/livincoop + [ ] Add # in news text + [ ] Show who like the news and separte action and views pod comment/like/unlike + [X] Template gallerie files + [ ] Integrating notifications of dda with @tango + [X] News design of laoding + [X] Translate website (get spanish trad from poupou or others) + [ ] Create template of co-working on language translation and add language (wishlist) + [X] Banniere rework + [X] Save cropping with no modficiation + [X] Save and redimension main image as 1100*700 + [X] Limitation of 300px*100px + [X] Create normal banniere image, rezized/banner.png and thumb for album + [X] LightBox for banner and profil + [X] Portefolio + [X] Create folder albums + [X] Move file to album + [X] Arborescente navigation into folder + [X] Gallery + [X] Delete photos + delete current profile and cover photos + [X] Edit document => title on photo + [X] Portefolio - Library - Documentations -bookmarks + [X] Add file type pdf-excell-ppt-word-libreoffice + [X] Urls dynform process with extract process + [X] Bookmarks (tags organization) + [X] Document view + [X] Delete documents and urls + [X] Merge collections inside portefolio + [X] addPhoto & addFile => can share as news + [ ] add extract image on bookmark + [X] Roles + [X] Open organizations to event only for admin + [X] Add roles (prefine and free) in addMultiMembers and in links (Database) + [X] List of role by contextType (json or ctk) + [X] Edit role in directory if admin + [X] filter roles (tags in directory) + [ ] Get preferences of email + [ ] Create more email + [ ] faire le point sur l'evaluation des communs + [ ] idée + [ ] sur les valeurs pouvoir ajouter une image sur chaque valeur pourrait etre un peu plus sexy + et l'autre option proposé par maia, rajouter une liste fixe de mot sur chacune des 6sections du survey de Simon + [X] pour le 31/8 : sur un event ou une orga + pouvoir ajouté les personnes ou orga qui font l'event , + ou qui sont partenaires yaurait simplement un lien Organisation dans ces 2 type event et orga + [X] Ajouter les roles en attribut des links + ** @Rapha + [ ] internationalisation + [ ] Barcelone + [ ] ajout des villes libre + [ ] modification villes via dynform + [ ] ajout ville via import import + [ ] traduction EN + ES + [ ] network + [ ] refactor cleanup + [ ] simplifier l'ergonomie + [ ] btn plus + [ ] filtres + [ ] liste + [ ] affiche au load + [ ] lazyload + ** @Damien + [ ] coopedia + [ ] sortir comme une appli + [ ] etat pour mettre en prod ? + [ ] orga TER +>>>>[ ] tags +>>>>[ ] converter RSS + jsonFeed + [ ] opendata sources + interop + [ ] connecter des scripts api + [ ] scope geo + [ ] thematique ou tag + [ ] perso + ** @Daniel + [ ] SSO + ** @Marc + [ ] wikimedia + ** @Christopher + [ ] nextclowd + [ ] DEV et QA sur server privé + ** @Thomas + [ ] interoperabilté Rocket Chat + [ ] COMOBI en PROD + +* ************************************************************ +* Version 0.2 : MEQA, MEP 17/07 +* ************************************************************ +** @Tib +[ ] on previews , activate keyboard navigation +[X] personne.annonce > n'ouvre pas preview +[X] ouvrir POI dans PREVIEW +[ ] je peux ajouter une annonce sur un autre user ???? +[ ] ajouté POI sur all elements +[X] Modifier annonce pour un citoyen formulaire pas afficher [[https://github.com/pixelhumain/co2/issues/213]] +[ ] annonces url standalone + [ ] dynform : apostrophe dans les nom des suggestions + [ ] not loggued > open dynform > login > opens dynform > should reload top bar as well + + [X] bug notragora + [X] email communecter + [ ] tiers lieux ressources + [ ] créer directement le lieux from create + [ ] ajouter name on fiche address + [ ] pré remplir avec le nom de l'orga + [ ] version minimal de ajout Lieu : avec input locality + [X] directory + [ ] sections + [ ] categories + [ ] subtypes + [ ] create + [ ] turn sections into tagList + [ ] edit + [ ] view : page.type.place.id.530f3d9ab0e25fb10acbb9dd + [ ] optim + [ ] headerParams replace with typeObj + [ ] bug + [ ] app menu not selected + [ ] declaration des ressources internes + [ ] annonces + [X] top level types + [X] differents filtre apr section + [ ] mes annonces + [ ] annonce cleaner : faire un script pour vider la DB + [ ] durée d'une annonces + [ ] avertir avant le clean , btn relance l'annonce + [ ] add something on a section > click > add section is pre-set + + * bugs + [ ] dynSurvey photos + [ ] module clean up communecter to CO2 : clear deprecated views + [ ] mainSearch Libs clean up + wysihtml5 + Chart.min + boostrapswitch + bostrap editable ??? + datetimepicker + [X] default.home + [X] #default.live + [X] news.index.type.citoyens.id.582e9551f6ca4759438b4584 + [X] element.detail + [X] person #person.detail.id.582e9551f6ca4759438b4584 + [X] me + [X] orga + - why chart/index + [X] project #element.detail.type.project + [X] event #element.detail.type.event + [X] #element.detail.type.poi + bug : Undefined index: parentId + [X] dynform + [X] orga + [X] poi + [X] project + [X] event + [X] survey + [X] actions + [X] directory + [X] agenda + [X] orga + [X] project + [X] citoyens + [X] survey #default.directory?type=vote + [X] actions #default.directory?type=actions + [X] classified #default.directory?type=classified + [ ] icon in directory + [X] cities #default.directory?type=cities + [X] DDA + [X] #survey.entries.id.57b71a0ff6ca4712778b4570 + [X] #survey.entry.id.582d9920f6ca47630c8b4580 + [X] #rooms.actions.id.5786585cf6ca477b4e8b457d + [X] #rooms.action.id.5788d9f3f6ca47f8168b457d + [X] #comment.index.type.actionRooms.id.57a19c21f6ca47d2548b456e + [X] city.detail #city.detail.insee.97414.postalCode.97450 + - sliderAgenda ??? + - podBtnTypeNews ??? + [X] docs #default.view.page.index.dir.docs + [X] move docs to github + +* ************************************************************ +* Version 0.17 : cloturé sur ph-dori +* ************************************************************ + +** @Clem + [.2] add POI to news + +** @Rapha + [.2] connecter a des sources events externes (RSS) => #523, #986 + [.2] globaliser le system de Tokens et utilisation API Communecter =>#341 (Auth) + #1262 + [.2] page city : ajouter quartier isis, qpv , maison et conseil de quartier =>#1258, #277 + [.2] finir la belgique => #1259 + * DynForm + [ ] Refactor DynForm + [X] dyFInputs + [ ] Refactor Editable + [ ] Organiser a géré + [ ] Nettoyer le code inutile + * BUG + [ ] Historique bug lorsqu'on ajoutes des contacts + [ ] In CO2 + [X] Integrer dans CO2 + [ ] Bug + [ ] Info + [ ] Gestion BirthDate + [ ] Description + [ ] c'est centré au milieu surement du au dynForm + [ ] Network + [ ] Type + [ ] Orga + [ ] Event + [ ] Project + [ ] Person + + * Import / Export + [.2] RSS (Personne, Orga, Projet, event, city, region, thematique, tags) => #523 + [X] INTEGRATTE MARKDOWN wisiwig + [X] add documentation editor project page + * wishlist + [ ] add from external link + [ ] multi bao + [ ] wiki page + [ ] git url or wiki + [ ] mainstenant + +** @Tango + * Tags + [.2] suggestion de tag : section sous la baniere de categorie de tags => #1255, #1018, #350, #989 + - sport / alternative/ agriculture /santé ...etc + on click on decouvre une selection de tags, facilement ajoutable + - pour voir combien d'acteur oeuvre dans une thematique + * Recherche + [.2] rajouter le nombre de lien dans les résultats (ex : nb membre orga, nb contrib project, etc) =>1256 + +** @Sylvain + [.2] delete element : avec regle stricte => #1061, #1026, #268, #757 + * API + [.2] replicaset dédié aux utilisateur de l'api + + +** @Tib + * bugs + [ ] person.edit.poi > validate > doesn't refresh location.hash + [ ] map click savoir plus > KO : http://127.0.0.1/ph/communecter#poi.detail.id.58a69c0b539f22b8298b4571 + [new] database optim : on citoyens, remove or archives event participation + [new] url builder url.get(type,what,id) + [new] follow un tag : envoie de notif si nouvel element + [new] linky / Connect / INTEResting CONNECTions + - basé sur le finder + scope + tags + [new] film viewer + [ ] special POI with 3 questions + [ ] a film is a collection of type webdocu+question + [ ] each poi + [ ] is part of the collection , poi.collection : zordi + [ ] holds , 3 questions each question is connected to another poi + [ ] when the poi.type.video stops playing , ask the 3 questions + [new] page pour reflechir + une page qui pousse a l'action, qui fait reflechir, et utiliser les outils de la plateforme + [new] connecter les POI à des source ousite externe ex : randopitons.re + [new] from siteweb to element + [ ] from json : oceatoon.json + [ ] openatlas.org + [new] element de type LIEU + [ ] "quartier", connecté une "zone" et un element + [ ] "lieux", décrivez ce qu'il ya dans votre lieux : + - fablab, coworking, repare café, ressourcerie, salle de réunion, restaurant, + [new] element param : dont show in search + [new] expliquer ce qu'est un commun + [new] test a light mobile version + [new] my profile , if twitter account, add a twitter reader + [new] sur n'importe quelle url , si on ajoute ?format=json > ca fait un export grace a l'api + [new] save search criterias and better user activity stats to make a better platform + [new] connect a WP RSS to an element wall + [new] show profile consuption > percentage possible contribution to budget (under pts) + [new] budget calculator proportionnel à l'utilisation + [test] regression delete image from news , from gallery + [new] define common points between element in typeObj , make a merge with a common map + * network + [new] utilisation de Picto externe via URL pour les filtres d'une carte network. + [new] Ajout d'info lors du survol d'un POI (horaires, description courte, ... j'ai une liste precise) + [new] Alerte email sur modification d'un POI ou d'une sélection + [ ] notification à la création d'un dda + [X] Count requests DB per page + [X] document uploader + [X] add photo + [X] limit + [X] size of images + [X] image types + [X] join upload and save into one unique action : UploadSaveAction + [X] added test btn to gallery page and authorisation limitations + [X] added fineUploader element to dynForm + [X] connecting image upload endpoint + [X] adding list of images to album + [X] clean up mkdir($upload_dir, 0777); + * use case + [X] gallery for poi : in menuSmall view + [X] add into a element form + [X] generate id when image exist /api/tool/get/what/mongoId + [X] set context + id + [X] make upload on validate button + [X] all elements : orga, event, project + * wishlist + [ ] image selector from album, pick from existing images + [ ] get from url + [ ] cropping before upload + [ ] adding album colelctions + [ ] add photos to news page on upload + [X] network source from gist served by gitraw + [X] Finance Transparente + [X] Finder + [ ] url direct sur le finder + [ ] url open + recherche + [X] Ctrl+Alt+F : recherche type finder dans un design dashboard =>1257 + [X] connect with multi scope and tags + [X] right click on tag, add to scope or activate filter + * bugs + [ ] search : 974 + [ ] finder : no crossing between location search and tags + [ ] City Finder - City Filiaire + [X] mono tag, multi types, multi cp + smallMenu.openAjax( baseUrl+'/'+moduleId+'/search/globalautocomplete', + "Communs", + 'fa-laptop', + 'yellow', + "<i class='fa fa-map-marker text-yellow'></i> Nantes", + { + name:"#commun", + //searchTag:["informaticien","tic","digital","numerique"], + tpl:"list", + searchBy : "CODE_POSTAL_INSEE", + //searchLocalityREGION : ["REUNION"], + searchLocalityCODE_POSTAL : ["44800","44300"], + //searchLocalityDEPARTEMENT : "974", + indexMax : 200, + indexMin : 0, + searchType : ["events","projects","organizations"] + }) + [X] multi tags, multi types on a region + smallMenu.openAjax( baseUrl+'/'+moduleId+'/search/globalautocomplete', + "TIC", + 'fa-laptop', + 'yellow', + "<i class='fa fa-map-marker text-yellow'></i> La Reunion", + { + name:"", + searchTag:["informaticien","tic","digital","numerique"], + tpl:"list", + searchBy : "CODE_POSTAL_INSEE", + searchLocalityREGION : ["REUNION"], + //searchLocalityCODE_POSTAL : ["44800"], + //searchLocalityDEPARTEMENT : "974", + indexMax : 200, + indexMin : 0, + searchType : ["events","projects","organizations"] + }) + * todo + [ ] build not empty category lists + [ ] click on map-marker icon , shows the map of the content + [ ] menu predefined tags + [ ] cross with location + [ ] manage large cities, with many elements + * wish list + [ ] add element into a predefined tag + [ ] propose related tags + [ ] click 974, can change on region scope + [ ] click TIC, can change tags + [X] Directories + [X] hide tools + [X] Mon repertoire + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/person/directory?tpl=json','Mon repertoire','fa-book','red') + [X] Person Directory + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/person/directory/id/57394d37f6ca4709228b4572?tpl=json',"Directory",'fa-book','red','<i class="fa fa-user text-yellow"></i> Tib Kat') + [X] project Directory + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/project/directory/id/56c1a474f6ca47a8378b45ef?tpl=json','Directory','fa-book','yellow','<i class="fa fa-lightbulb-o text-purple"></i> Communecter') + :question: ??? @Clement : pourquoi on a plusieur map sur la data people, contributors, followers ? + [X] add contextData in response json to fill name dynamically + [X] event Directory + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/event/directory/id/586784f8f6ca474366980880?tpl=json','Directory','fa-book','yellow','<i class="fa fa-calendar text-orange"></i> Clic a Clak') + [X] orga Directory + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/organization/directory/id/54edb794f6b95c3c2a000941?tpl=json','Directory','fa-book','yellow','<i class="fa fa-group text-green"></i> Open Atlas') + [X] Collections + - smallMenu.openAjax(baseUrl+'/'+moduleId+'/collections/list/col/krops','krops','fa-folder-open','yellow') + [X] favorites.{type}.id on persons data + [X] increment element favoriteCount + [X] add btn on elements + [X] maybe use right click, on any link > add to fav + [X] onclickfav tags > active css + [X] apply multi tag cumulation + [X] moved favorites into collections.favorites + [X] collection library viewer and connect to collections/list/col/surf + [X] add new collection + [X] add to collection from contextMenu + [X] delete a collection + [X] rebuild collection list + [X] rename collection + [X] pod collection + [X] after add reload collections menu + [X] in directory click droit tag add to multi tag + [X] template engine prototype with menuSmall Collections + [X] switch title add/remove + * wish list: + [ ] collection kanban interface + [ ] view collection on map + [ ] sub colections + [ ] collections on all elements + - must be admin of element + - what would we put inside ? + [ ] group add : list to collection + [ ] open from url + * bugs + [ ] persisting location, + [ ] contextmenu on nowList + * bugs + [ ] city > click orga pas de résultat + [ ] elements count on city + [X] API : push Thing push + [X] API : Basic authentcation using username or email + pwd + * todo + [ ] encrypt username and pwd when giving out token accesses + [X] my POIs + [ ] cut up communecter.js + [X] lazyloading dynForm definitions + [ ] use a packing system to split the file + [ ] my calendar + [[http://127.0.0.1/ph/#event.calendarview.id.585bdfdaf6ca47b6118b4583.type.person]] + [X] my created events + [X] events I participate in + [ ] events : right click, participate to event + * wishlist + [ ] show all events of my links, with posibility to choose to hide anyone of them + [ ] add automatically any events from this organization or project to my calendar + + + [ ] element config : cacher des sections sur un element (cacher events, projects ...) + [ ] header du live ou dans en ce moment + - les events favoris du territoire + [ ] PPT explication des 25 use cases + [X] use runSlide() + [ ] use reveal.js + [ ] finish use cases scenario + [ ] activate pourquoi btn in header + [ ] interoperability : communecter + wikidata +@CLEM + [ ] Quick Add Bookmarklets + [ ] Element Trombinoscope + [new] section pro + [ ] ajouter une annonce (besoin , proposition) + [ ] organisation / professionel : santé, TIC, BTP + [ ] api pole emploi + [ ] remplacement + [ ] emploi + [ ] cession + [ ] stagiaire + [ ] assistanat + [ ] collaborateur + [ ] mission humanitaire + [ ] immobilier + [ ] location + [ ] vente + [ ] person : status personnel + [ ] cherche travail + [ ] cherche/propose formation + [ ] charche partenariat + [ ] cherche/propose benevolat + [ ] aimerait apprendre + [ ] abonnement a des alerts + * DDA + [ ] Quand la liste est vide , faire une page explication avec des kickers pour creer des espaces + [ ] bug : sur archiver , persiste dans les listes + [ ] bug : une décision terminé, on peut toujours voté dessus + [ ] bug : j'ai créé cet espace de discussion, je ne peux pas le modifier : https://www.communecter.org/communecter#comment.index.type.actionRooms.id.57b5981b40bb4e631ce9f6e3 + +** @Rapha + *** Import + [ ] Supprimer les anciens fichiers + + *** API + + [ ] GET + [ ] Checker : Person, Orga, Event, Projet. + [ ] All element, mettre seulement name, url communecter et api + [ ] A faire : News, City, DDA, POI. + [ ] POST + [ ] Implémenter les tokens + [ ] Ajouter les url POST + [ ] ADD Element (Person, Orga, Event, Projet) + [ ] ADD (News, City, DDA, POI) + [ ] DOC + [ ] Ecrire entierement la doc en Anglais + [ ] GET + [ ] POST + [ ] Tester l'API via Swagger + [ ] GET + [ ] POST + [ ] refaire le design + +** @Bouboule + *** CHART + [1][X] Create common and open Chart for project and organization + [1][X] Bash de reprise des données sur project dans properties.chart + *** NOTIFICATIONS + [1][X] Create notificationTree + [1][X] Simplification of method with $construct + [1][ ] Add method to get intelligent Notifications + [1] [X] Simple action on same notification with different author + [1] [ ] Limit of time (1 day Or two day?) + [1] [X] Update community to notify if one is out of element + [1][X] Documentations + [1][ ] Commons method called to construct notification + [1] [X] /Follow/ => TEST OK + [1] [X] /Ask/ to become member or admin => TEST OK + [1] [X] /Accept/ an admin or member (include new sublevel in notficationTree) => TEST OK + [1] [X] /Invite/ => TEST OK + [1] [X] Generalize invitation as event for organization and project + [1] [X] /Confirm/ an invitation to join a element => TEST OK + [1] [X] /Join/ for creator of event, member of orga or project => TEST OK + [1] [X] /Like/Unlike/Comment => TEST OK ++ + [1] [X] /Add/ => TEST OK + [1] [X] /Post/ => TEST OK ++ + [1] [X] /Vote/ => TEST OK + [2] [X] "isUnsee" => "isUnseen" + [2][X] MERGE DEVELOPMENT ON CO2 + *** Test all use case up (around 12 hours) + [1] [X] TEST OK + *** Wishlist + [2] [ ] /Leave/ + [2] [ ] /Refuse/ + [3] [ ] /Update/ + [2][ ] Update or delete notification + [2] [ ] Ask to Become => remove object if empty delete notification side + [2] [ ] Confirm to become => delete notification on user side + [1][X] Community to notify + [1] [X] method + [2] [X] add parent target in $construct if usecase of comment on room/news of element + [2] [X] Send $construct and work with it instead of only target information + [2] [X] Not used method when only notify specific user + [2] [X] Use context parameter to notify only admin for notifications ASK and INVITE + *** WishList + [2][ ] City + [2] [ ] Creator && community participating && community subscribing to theme or citizen council + [2][ ] Create model notificationTree.php + [1][X] View of notification + [1] [X] Get new model of notification + [1] [X] Create $or in condition to get old notification + [1] [X] Create bash on notify.id in datamigration => ph/communecter/datamigration/UpOldNotifications + [1] [X] Plug notifification time on updated + [1] [X] Use unSee && unRead label in notifcation + [1] [X] Count unsee notification + [1] [X] Onclick notif, check this notif as read + [1] [X] Onclick mark all as read, update all notif as read + [1] [X] Create delete btn + [1] [X] Bug on lbh load + [2][X] Count notifications badge by element CO2 + [2][X] Count notifications badge in menu CO2 + [2][X] MERGE DEVELOPMENT ON CO2 + *** Wishlist + [2] [X] View of notification by element + [2] [X] Confirm push on head + [2] [X] Create element.notifications.type.id [communecter && ctk] + [2] [X] Validation action on notification + [2] [X] fix bug when refuse an admin already member... He stays member + [2] [X] Generalize js for element.notifications && notification2.php => assets/default/notifications.js + [2] [ ] Simplify confirmation using js + [2] [X] Add count badges on view + [2] [ ] Redirect "Verb_ASK" notif on notif + [2] [X] Merge Element/GetNotificationsAction in Notification/GetAction + *** MAIL + [2][X] Template for use case + [2] [X] someoneAskToBecome (Admin || Member= + [2] [X] someoneInvitingYou + [2] [X] someoneValidate invitation or demand to author + [2] [X] Follow me [Insert new follow if notif is not view] + [2][ ] Insert daily mail + [2][ ] Not send email if user is connected and have active view on communecter.org + [2][ ] Result of vote + [2][X] MERGE DEVELOPMENT ON CO2 + *** PREFERENCES + [2][ ] Create view of settings + [2][ ] Add inscription on citizen consult that I will follow OR specific room (news + notif + mail) + [2][ ] Mailing on add something in element and comment/Like/unlike on element where I am linking + [2][ ] daily Report + [2] [ ] Add parameters (everyday [default], 2days, 3days, every week) [beginning on Monday] + [2] [ ] Activity Report + [2] [ ] New events with tags &&/|| scope I subscribe + [2] [ ] New organization with tags &&/|| scope I subscribe + [2] [ ] New projects with tags &&/|| scope I subscribe + [2] [ ] New item on element that I am linking + [2] [ ] Followers on element where I am linking + *** NEWS + [2][ ] View of like, unlike + [2][ ] Get news from friends + [1][X] Bash of object.type inbstead of object.objectType (!!!important with notification reactor!!!!) + => ph/communecter/datamigration/ObjectObjectTypeNewsToObjectType + [2][X] MERGE DEVELOPMENT ON CO2 + ****** CO2 + [2][ ] Up news for CO2 + [X] Views of media url + [X] Repair add images gallery + [X] Views of gallery Images + [X] Repair mentions on saving + [ ] Views of mentions + [ ] View of text (regression) + [X] Change scope of sharing + [X] See author when is target + [ ] Link on news + [X] Change target + [X] View scope of the news + [ ] Repair citizen actu + *** LINK + [1][X] Add confirmation if someone link me to orga or projet (as event) -- ValdiateLink + [1][X] Rework pod/userList to get invitations + [2][ ] Friend relation between persons ?? (community to notify, messaging, see information ??) + [2][X] MERGE DEVELOPMENT ON CO2 + *** ADMIN COMMUNICATION + [3][ ] Creation of news letter + [3] [ ] Choose scope or theme community + [3] [ ] To all + [3] [ ] See view of newsletter + *** BUGS + [1][X] Notification + [1][X] /ADD/ Problem of url on add => id of object and not target + [1][X] /FOLLOW/ Make usecase following you or target + [1][X] /FOLLOW/ => no repeat on notify when I follow a user + [1][X] /VALIDATE/ => undefined community + [1][X] /VALIDATE/ => undefined object on check and update because go to update (add object exist in query) + [1][X] BUG BUG BUG && BUG + [1][X] Link + [1][X] If isPendingAdmin or toBeValidated as member user is consedering as member in right access + [1][X] change method Project::getContibutorsByProjectId && Organization::getMembersByOrganizationId + [1][X] Add label ToBeValidated on user asking to be admin not being member yet + [1][X] Menu btn => if I am member he purpose me to follow + [1][X] No disconnect btn if I am member of an element + [1][X] Two disconnect btn on event + [2][X] Fix bug on $unset on disconnect + [2][X] Add linkOption parameter on method disconnectTo() + [1][X] Project + [1][X] Project with event without address => bug on gantt indexAction + *** Questions + *** Event + [ ] Declare me as admin when there are admins => no confirmation asking but directly join ? + [2][X] MERGE DEVELOPMENT ON CO2 + + ** CO2 + **** Element + [X] Repair Project List + [X] Repair community pod + [X] Add gallery + [X] Add notification by element + [X] Add notifications on top menu +* ************************************************************ +* Version 0.16 (début oct) : en PROD +* ************************************************************ + +** @Tango + [ ] Recherche par 100, 500, 1000, all + [X] page recherche + [ ] page agenda + [X] synchronize new item menu (on selected) + [X] Finir Orga:Add member + [X] refaire marcher la modal + [X] brancher le save de la modal sur un controller (link/multiConnectAction) + [X] faire un pod "add membre" plus simple et convivial (directement sur la page orag/detail ?) + [X] Around me + [X] Liste HTML + [X] result on map + [X] change radius on map + [X] around all element + [X] share aroundMe in iframe + [X] modification du menu principal (recherche) + [X] modifications page directory + [X] ajout Debat & Action dans le globalSearch + [X] création de la page recherche commune + [X] integration design notragora + [X] Page commune : modif header btn search + [X] Dashboard responsive + +** @Sylvain +[X] pb d'images dans en ce moment (ex : Manapany) +[X] delete person : + [X] on admin : delete simple person (links but no news/votes/comments) + [X] delete with anonymization + [X] delete my account +[ ] rsync on server for upload +[ ] interface screen shot tutoriel + [ ] test d'un guided tour simplifier +[ ] cannot empty communected location +[X] remove betatester attr +[X] remove empty image attribs +[ ] mailing + notification + parametre + [X] doc + [ ] faire un mail hebdomadaire + [ ] invitation event + [ ] news privée + [ ] nouveau DDA + [ ] création d'une organisation (mail à l'orga => envoi sur un formulaire de type join ?) + [ ] faire un mail, special quand invité par l'invitation communEvent + faisant reference à l'event , vous etiez ou serez à event xxx + communecter vous aide .... +[X] Gérer le retour de mail en erreur + [X] créer un hook + erreur dans mailerror + [X] creation de notif pour super admin + [X] page admin avec les erreurs de mails +[ ] Stocker les images en S3 +[X] passer configDB en externe configdb.example.php +[ ] filtrer par type d'event +[ ] event modifier l'organisateur +[ ] améliorer la verification d'existence d'elements + + +** @Tib + [X] new theme architecture + [X] moving plugins into the ph base + [X] front end configuration by configparams + [X] activating forms + [X] movins communecter's css into the theme for specific tweaking + [X] generate basic element code + [X] parse and build post genericaly jsonHelper.stringFormtoJson + [X] on press send + [X] post proper ajax + [X] build a dynform for a simplest element POI + [X] inside a modal + [X] url form in modal + [X] personnalisé + [X] le scroll marche pas + [X] elements to simple dynform + [X] connect btns + [X] dashboard + [X] profile page + [X] bugs + [X] add to floopdrawer after save + [X] [[@Rapha :: location > tape CP > validate , ca passe]] + [X] cancel location is not empty + [X] onclick add spinner on save btn +disable + [X] type::afterSave : connect specific post process for each elem + [X] organization + [X] project + [X] event + [X] dynForm on create project of orga + [X] add parentId and TYpe on project.orga + [X] refactor : move from ACtion to model Element + [X] affichage des addresses + [X] wisiwig on desc + [X] orga simplified to name, type, location btn + [X] validate exist using globalSearch works on any element + [X] ajouter les autres champs en activable + [X] project to name, location btn + [X] event to organizer, name, type, allday, dates, location btn + [X] organizer select & parent Id based on myContacts var from index.php + [X] parent Event : load param ajax : show only ongoing or event to come + [X] connecté l'ajout new subEvent aux neaux formulaires + [X] connect locality data from copyMapForm2Dynform() + [X] POI et Element de base : name,desc, url, location,photo + periscope,youtube,twitter journal + [X] switch on map , show / hide POI, point of parent + [X] link to parent : can have a parent, Type & Id + [X] add a btn on any parent add POI + [X] place avec geoloc + [X] Thing sans geoloc + [X] formulaire evolutif + [X] add text : getUrl, multiple medias , $.each + [X] unknown attribute passes the the save + [X] delete POI + [X] edit POI + [X] debat + [X] ouvrir une proposition sur un element orga ou projet + [X] localiser une propistion + [X] action + [X] save process + [X] Element::save + [X] params containing map using a json source base + specific attributes + - { element: {}, orga:{} } + [X] dataBinding validation process + [X] parse and build post genericaly jsonHelper.stringFormtoJson + [X] on press send post proper ajax + [X] added middle click to notifications + [X] switched QRcodes to full URLs, they can then be parsed + +** @Rapha et Clement + + [ ] Préférences : + [X] Bloqué l'acces a mon répertoire mode Privé + [ ] Mieux gére les addresses + [X] renomer locality en streetAddress + [X] Checker au moins une ces préférences + [X] Ajouter un btn comme pour le "Communecter-moi" pour que l'utilisateur check au moins un fois le les preferences + [X] Ajouter "seePreferences" à la création d'un user + [X] Batch pour ajouter "seePreferences" au user. + [X] Batch qui remet tout les Preférence au niveau de base + [ ] Vérifier qu'au niveau de l'api c'est géré + [ ] Traduction + [X] Add members et tooltip + [ ] Bugs + [ ] SI on change la ville du user, et qu'on clique sur repositionner alors il y une erreur + [X] TypeError: newsObj.target.name is undefined : Lorsqu'on va arrive sur la communauté depuis (detail , news ou gallery); + [X] Design : lorsqu'on veut modifier la description ou shortDescription , le panel de x-edit se cache derrier le menu de gauche. + [ ] Impossible de mettre les tags a vide + + [ ] Caché les consoles.log + [ ] news : lorsqu'on ecrit sur le message + hidden slidupScopetagsMin false + slidupScopetagsMin false + +** @Rapha + + *** Priority 1 + [ ] bug : open edition : on peut pas ajouter de sous event + - info : ca marche que pour les admins > devinir admin et ca marche + [X] remonté tes points de la 0.15 + [X] Vérifier que les badges s'ajouter a la création d'une entité + [X] Evénement : admin + open edition + [X] bug, ajout event sur projet , s'affiche pas dans la liste + [ ] Refactor Element + [X] Refactor sur Element::UpdateField() + [X] Rajout des badges + [X] Correction sur les url + [X] FAire appaitre sur l'event parent dans un sous événement + [X] le pod et le btn menu pour le calendrier des événements + [ ] TEST Global + [ ] Test des updatefields + [ ] Person + [ ] Orga + [ ] Event + [ ] Project + [ ] Test Confidentialité + [X] Bug image QR Code + [X] User sans etre Communecter + [X] Refactor DirectoryAction et directory2 + [X] Le Header qui est dans details et plus grand que dans fil d'actualité, etc... + [X] Améliorer le btn "Communecter-moi", celui du HeaderElement + [X] Active des btn menu + [X] Bug ajout d'une image de profil + [X] Error 404 , pendant la deconnexion + [X] tooltip menu (detail, news etc ...) traduire ou améliorer + [ ] Dans news/index.js : buildTimeLine() ; cette fct continue de s'executer meme si on est sur la page détail de l'élément + + + *** Priority 2 + [ ] Récuperer activeMenuElement() dans communecter.js et l mettre dans element.js lorsque qu'il sera crée + [ ] Admin + [ ] GEstion des utilisateurs en toBeActiveted and Pendig + [ ] Afficher la liste de ces utilisateurs + [ ] Batch qui envoie un mail pour signaler aux utilsateurs de valider leur compte + [ ] Ajouter un le nombre de fois on a envoyer le mail + [ ] form keep my position / my latest psitions + [ ] Ajouter les numéros de tel dans le formulaire de création + [ ] Sur une person, retirer superAdmin false, inutile ? + [ ] API + [ ] Regarder la doc de https://insomnia.rest/?utm_source=hackernewsletter&utm_medium=email&utm_term=show_hn + [ ] Vérifier que tout les retours URL soit conforme au format { result : true or false , msg : "" , data : ... } + [ ] Doc + [ ] Amélioration / Correction + [ ] Correction faute orthographe + [ ] UpdateField, pour nameField mettre un select avec tout les fields possible + [ ] Faire les types evenements + [ ] Faire les définitions + [ ] Checker si link/connect permet de fairemettre en attente de validation ou si c'est follow pour les events + [ ] Mettre a jour DOC API : https://docs.google.com/document/d/1AyDWnipUeKR_r1kf5RcRMJn4xB7dxADSFNPmjvyzLs4/edit#heading=h.w75go4nanjvk + [ ] AJouter la partie recherche + [ ] Faire la partie Authorisation/Token + [ ] Bugs + [ ] person/get/id : les préférences ne sont pas traité + [ ] RSS + [ ] News to RSS + [ ] Checker NewsTRanlate de Clem + [ ] Faire apparaitre les news via l'api + [ ] Faire la traduction en RSS + [ ] RSS to News + [0.17] Evénement : import /export open agenda + [ ] evenement récurent + [ ] cronJob + +** @Clement + [ ] "Si j'écris une news en mode ""privé"" (visible seulement par les membres d'une orga) en notifiant quelqu'un qui n'est pas membre de l'orga (donc qui ne devrait pas voir la news) et bah il l'a recoit dans son fil d'actu quand même. Mais ne la voit pas dans le journal de l'orga. Proposition : en mode privée, ne proposer à la notification que les membres de l'orga / projet." + [X] sur orga reparer afficher tous les membres + [ ] pouvoir ajouter une liste d'url Typé pour Elements (loomio, video, pad) + [ ] visionneur spécialisé par type (image, video, simple lien) + [ ] uplodaer de document + [ ] Regroupement de notifications (plusieurs notifications avec la même source) + [ ] Regroupement de news de communevent (plusieurs photos sur le même event). En collab avec Thomas. + [ ] bug : mention aprés avoir ajouter une fois , ca marche plus + +** @Thomas communEvent + [ ] mettre une etape de validation lors du connect, vous allez vous connecter à + [ ] si je suis logguer et admin d'une orga , permettre de scan pour inviter qlqun + [ ] ajouter l'invitation à un event par scan, sur un event> click inviter > scan QR + [ ] ajouter mon QR code , envoyer par mail, copier dans mes images, icone sur le mobile + [ ] filtrer par type d'event (Nacelle, Rencontre, Reunion... ) [[https://github.com/pixelhumain/communEvent/issues/112]] + [ ] btn utiliser la position GPS [[https://github.com/pixelhumain/communEvent/issues/113]] + [ ] simulation du village et du systeme QR code + [ ] dans un event filtrer par mes posts,et plus globalmeent on click qlqun on verrait que ces postes + [ ] Photo taille originale + [ ] utilisé ma position > fait un reverse geocodage pour trouver l'adresse + + +* ************************************************************ +* Version 0.15 (31/08/2016) : Livré 01/09/2016 +* ************************************************************ + + ** @Rapha + [ ] Modifier un paramètre (open data / open edition) ne fait pas une entrée dans l'historique + [ ] Bug + [ ] voteUp voteDown + [ ] Event : + [ ] Ajout de l'utilisation des tags pour les évenement + [ ] Gestion des admins pour les events + [ ] Refactor Element + [ ] Preferences avec open data / open edition / public-hide-private data + [ ] Formulaire d'édition: + [ ] Depuis orga + [ ] Ajouter un evenement ou un projet d'un element à partir des pods + [ ] AddContributors / AddMembers / AddAttendees + [ ] AddTasksGantt / AddChartSV pour les projets + [ ] Pod need pour les projets et orga [asso et groupe] et AddNeed + [ ] Ajout du dda pour project et orga + [ ] Authorization (admin-membre-openedition) à rajouter coté ctk + [ ] Bugs + [ ] Btn Editer + [ ] Unknown type: postalCode Detail -> Fil d'actue -> détail + + ** @Tango + [ ] onChange search criteria, empty list + reload button + [ ] interface ND + [ ] menu + [ ] multi scope + [ ] multi tags + [ ] type sur les news (idea, question announce, information) + [ ] Refactor design top bar + [ ] Refactor agenda + [ ] Recherche connecté au multi scope + [ ] search by name on live page + [ ] Bug Repair geoloc sur tous les element + [ ] two step refactor + [ ] home page : switch to live ? + + ** @Tib + [ ] DDA + [ ] bug : Pas de possibilité d'éditer la photo d'une proposition + [ ] Decision : restreindre les votes citoyens city, aux communecter de la commune + [ ] généré les catégories principale + [ ] généré lors de la premiere visite du DDA espace collab + [ ] remettre le contexte sur la room dans mon DDA + [ ] ajouter un scope geo sur une proposition + [ ] scoper dep et region : type number + [ ] moved search to opendata + [ ] live on city page + [ ] wisiwig sur les commentaires + [ ] dashboard + [ ] live controller + [ ] not connected > shows live , public information + [ ] getActivity + - global activity based on scope and tags search filters + - can be filtered by userId + [ ] dda + [ ] stream : shows recent sorted by "updated" + [ ] en ce moment : most active updated + - how to define activity ? vote counts, comment counts + algorythm based on vote and comment dates + [ ] projects + [ ] organisations + [ ] events + [ ] QR code + [ ] onclick : explain why QR Codes + [???] add QR code to invite mail / and create mail + [ ] script devlog pour ajouter updated sur les anciennes data + [ ] reparer le click du milieu + - en mettant simplement notre hash dans le href + [ ] refactor links.urlCtrl.loadByHash + chemin dans href + [ ] search and filter tag engine + [ ] wisiwig sur les desc de form create + [ ] markdown editor sur les desc de form create using bootstrap-markdown ex : in projectsv.php + - not activated globaly because front end isn't ready + [ ] ajouter un tag onclick methode générique utilisant juste la class="tag" + data-val="xxx" + [ ] only when loggued + [ ] getRRoomsListByActivity : Pour un pod d'affichage des DDA actif pour projet, orga et city + [ ] added "updated" attribute on all DDA elemnts used on any activity (votes , assigned, comments ...) + [ ] survey/proposals : create , votes, edit + [ ] actions : create, assign, edit + [ ] discuss : create, new post + [ ] archiving + [ ] getRoomsListByActivity + [ ] getRoomsActivity + [ ] Action:addAction : add update parent Action::updateParent($_POST['id'], self::COLLECTION_ACTIONS); + [ ] switcher le titre navigateur + [ ] replacing all $(".moduleLabel").html + [ ] badge organisation "Communecteur" + documentation + - association "communecteuse" (Livin Coop ,comm1possible , cheznous, ekprotik,cyberungame, forum des debats) + - association référante de communecter + - peuvent faire des formations et etre un lieu d'acceuil et de conseil + + + ** @Sylvain + [ ] ajouter updated on login + + ** @Thomas communEvent + [ ] remplacer la map par une url parser dans les QR code + [ ] mettre en PROD + [ ] ajouter le linker sur le scan connectant lutilisateur et les elements du QR person, event, orga, project + + +* ************************************************************ +* Version 0.14 : Livré +* ************************************************************ + + ** @Tango + [ ] Refonte interface DDA + [ ] Documentation + ** @Rapha + [ ] Open Data préférence + [ ] Moteur de traduction, pour lire et convertir les sources externes ( ex : Open Agenda ) + ** @Clement + [ ] Open Edition ubiquité en préférence + [ ] Mentionner qlq'un dans une actu/News @someone + [ ] DDA : pouvoir ajouter des images sur les propositions et les actions + ** @Tib + [ ] Ajouter un Framapad + [ ] Archiving : discussion, decision et action rooms + [ ] who can archive + [ ] owner of the vote or the action + [ ] archiver == passer le status à "archived" + [ ] survey + [ ] actions + [ ] discussions + [ ] decision & action room archived + [ ] when archived remove features : + [ ] edit features + [ ] Add proposals + [ ] desactivate votes + [ ] front ends + [ ] differntiate style when archived + [ ] show index without archived rooms + [ ] add btn, see archives + [ ] show only archived rooms + [ ] move Menu::Btn + [ ] permission + [ ] only organizer on survey and actions + [ ] open Modal : + [ ] list all possible destinations + [ ] romve in list the current parent room + [ ] convertir une proposition en action + [ ] copy as action + [ ] action Room must exist already + [ ] add moved attribute add room attr + [ ] convertir une action en proposition + [ ] deplacer vers une autre room + [ ] vote proposals : switch survey Id + [ ] actions : switch room Id + diff --git a/docs/specs/25Slides.md b/docs/specs/25Slides.md new file mode 100644 index 0000000000000000000000000000000000000000..ddc5727a50729c614e4187153ae5377280e53b53 --- /dev/null +++ b/docs/specs/25Slides.md @@ -0,0 +1,8 @@ + +| WHY | WHAT | WHO | HOW | WHEN | WHERE | +| ------ | ----------- | -----| -----| -----| -----| +| data | path to data files to supply the data that will be passed into templates. | sgs dfg | sgs dfg | sgs dfg | sgs dfg | +| engine | engine to be used for processing templates. Handlebars is the default. | sgs dfg | sgs dfg | sgs dfg | sgs dfg | +| ext | extension to be used for dest files. | sgs dfg | sgs dfg | sgs dfg | sgs dfg | +| coco | | | | | | | +| lolo | | | | | | | \ No newline at end of file diff --git a/docs/specs/JsonEditor.md b/docs/specs/JsonEditor.md new file mode 100644 index 0000000000000000000000000000000000000000..98071265e85d77806ebc80f042f6d9fee5b0c0b1 --- /dev/null +++ b/docs/specs/JsonEditor.md @@ -0,0 +1,11 @@ +# Json editor +> Make Building formatted json files easy for anyone +> Generate a structured json Without ever touching a line of json code + +## Features + + - declare a final json + - declare an editor map , listing any modifiable fields as a dynform + - generate the corresponding dynform + - Fill form + - Submit : generates a well foramted json based on a fixed format \ No newline at end of file diff --git a/docs/specs/Untitled Diagram.xml b/docs/specs/Untitled Diagram.xml new file mode 100644 index 0000000000000000000000000000000000000000..4704cd71c46ec0b3e0d2ba01ac3d2995a6c13dc2 --- /dev/null +++ b/docs/specs/Untitled Diagram.xml @@ -0,0 +1 @@ +<mxfile userAgent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36" version="7.0.6" editor="www.draw.io" type="github"><diagram>UzV2zq1wL0osyPDNT0nNUTV2VTV2LsrPL4GwciucU3NyVI0MMlNUjV1UjYwMgFjVyA2HrCFY1qAgsSg1rwSLBiADYTaQg2Y1AA==</diagram></mxfile> \ No newline at end of file diff --git a/docs/specs/dda.md b/docs/specs/dda.md new file mode 100644 index 0000000000000000000000000000000000000000..7425919f48b331102dfead083edcd8c119f492b5 --- /dev/null +++ b/docs/specs/dda.md @@ -0,0 +1,93 @@ +# DDA : Discussion , Decision , Action +> outil de gestion de communauté +https://docs.google.com/document/d/1RX-a5Os9sw7a9CMPCOOE1N3Q-P6XRxFL2NNZXrpWgWE/edit + +## architecture spec +menu is build using ajax +``` +loadActionRoom() +/rooms/index/type/'+contextData.type+'/id/'+contextData.id +``` + +testing directory loading +``` +loadDataDirectory +ajax /element/getdatadetail/type.... +``` +### Rooms + 3 types listed in config/CO2/rooms.json +- discussion +- decision +- action + +created by +``` +dynForm dyFObj.openForm('room','sub') +``` + +according to type , rooms show differently + +Features : +- Archiving : +- + +### Discussion +on creation we redirect to the discussion wall +Viewing Decision Room +``` +/co2/views/comments/commentPodActionRooms.php +``` + + +### Decision +in decisions you can create proposals +created by +``` +dynForm dyFObj.openForm('entry','sub') +uses : co2/assets/js/dynform/entry.js +``` + +hash on a organization +``` +#page.type.organizations.id.58220d0bf6ca47907cb6cb97.view.dda.dir.actions.idda.59846b00539f22935ca498ae +``` + +Viewing Decision Room +``` +/co2/views/survey/index.php +``` + +Viewing Decision Room Proposals +``` +/co2/views/rooms/entryStandalone.php +``` + + + +### Actions +in decisions you can create actions +created by +``` +dynForm dyFObj.openForm('action','sub') +uses : co2/assets/js/dynform/action.js +``` + +hash on an organization +``` +#page.type.organizations.id.58220d0bf6ca47907cb6cb97.view.dda.dir.actions.idda.59846b00539f22935ca498ae +``` + +Viewing an Action Room +``` +/co2/views/rooms/actionList.php +``` + +Viewing an Action +``` +/co2/views/rooms/actionStandalone.php +``` + + + +V2 +co2/views/cooperation/action.ph diff --git a/docs/specs/gallery.md b/docs/specs/gallery.md new file mode 100644 index 0000000000000000000000000000000000000000..e1135ec3ebe0ba6939ec1ef2187041106775a13c --- /dev/null +++ b/docs/specs/gallery.md @@ -0,0 +1,21 @@ +# Element :: Pod Gallerie photo +> Organiser, gérer, éditer ça gallerie image + +## Features + +- Gestion des albums et des images de profil et bannière +- Profil et banniere : + -Prise en compte de la suppression de l'image active +- Albums + - Ajout d'images + - trie des images par albums + - Suppression + - déplacement des images dans les albums + - Gestion de l'arborescence dynamique (mutualiser avec la librairie fichier) + - Edition d'une image (titre) +- A l'ajout d'une image d'album, pouvoir l'ajouter en news dans l'element en question + +## Enhancement + - Pouvoir rajouter, une description, des tags et scope (pour les retrouver dans les albums des cities) + - Pouvoir liker, unliker, commenter une image + - Informations ci-dessus visible au pop-up de l'image \ No newline at end of file diff --git a/docs/specs/library.md b/docs/specs/library.md new file mode 100644 index 0000000000000000000000000000000000000000..0a1948712898b7b956312afab723f9e294777603 --- /dev/null +++ b/docs/specs/library.md @@ -0,0 +1,32 @@ +# Element :: Pod Library (plugguer sur les features de gestions de la gallery) +> Librairie de ressource d'un élément + +## Features + +- librairie de bookmarks +- librairie de documents + +--Bookmarks: + - Ajout d'une url qui génére automatiquement le nom, la description, les keywords d'une page web renseignée + - Edition des informations à la volonté de l'utilisateur + - Filtre par tags (attrait au tags bookmarks de l'élément) +--Files: + - Ajout des docs uploadables : ods, odt, odp, cxs, ppt, doc, docx, excell + - liste de files avec gestion par dossier comme pour les albums de la gallerie + - Suppression des fichiers + + +## Enhancement: +-- Librairie: + - Ajouter les collections, favoris à la librairie du users + - Ajouter des docs partager en ligne (pour une édition collaborative) au librairie "fichier" ou autres [utiliser nextcloud - Iframe ou API] + +-- Bookmarks + - Interpréter une image à l'extraction + - Pouvoir rajouter, une description, des tags et scope (pour les retrouver dans les albums des cities) + - Pouvoir liker, unliker, commenter une image + - Informations ci-dessus visible au pop-up de l'image + +-- Files: + - Meme amelioration que pour les photos de la gallerie (descr, tags, scope, comment, like) + - Pouvoir les retranscrir sur le nextcloud \ No newline at end of file diff --git a/docs/specs/network.md b/docs/specs/network.md new file mode 100644 index 0000000000000000000000000000000000000000..2ccb1b0eda629abb41d869b0a8857dd4aca67f2d --- /dev/null +++ b/docs/specs/network.md @@ -0,0 +1,32 @@ +# Network +> communecter en marque blanche + +## Features +- show on a map elements corresponding to a json config file +[ ] afficher les personnes + +## Config File +- dataSrc : can be an external url json file, respecting the ontology:ph +https://gist.githubusercontent.com/oceatoon/ef54f75f7a159922ae35c215195eed7c/raw/99c4d6a06ce21da8ef9a407262477788650dede5/gistfile1.json + * todo + - in Network model , direct conversion + - geojson to ph:ontology + - structured csv to ph:ontology + +## Wishlist +[ ] faire un générateur de config avec dynform +[ ] permettre une autre url ?db=http://data.json qui eviterait de passer par la DB + [ ] btn : export data > data.json +[ ] enregistrer les configs pour analyser les taux d'utilisation et générer une estimation de cout +[ ] pour inciter les utilisateurs de carte a participer au financement du commun +[ ] configurer des icones cartos pour chaque tag +[ ] autogénérateur de config, affichant un event, une orga, un projet, un territoire + [ ] sourceKey @type@id + [ ] network/type/xxx/id/xxx + [ ] génère des filtres + [ ] type + [ ] tags + [ ] localité +[ ] version imprimable + QR COde recto liste , verso carto + + diff --git a/docs/specs/opendata.md b/docs/specs/opendata.md new file mode 100644 index 0000000000000000000000000000000000000000..f065dd8505e09f0f05a47ebb0c54c56e75b0782b --- /dev/null +++ b/docs/specs/opendata.md @@ -0,0 +1,88 @@ + +# Open Data + +## Point départ intéressant +> Le Système d’information Territoriale (SIT) basé sur Communecter construit comme un commun , inter communale +-100% Open source +-fait de brique logiciel adaptable et compte déjà une belle collection de fonctionnalité +-ce projet permettra d’améliorer et faire évoluer + +## objectifs +- mutualiser à plusieurs collectivités une même boîte à outils open data, complété d’un Système d’information territorial multi usage +- 100% open source +- Une collection d’outils à expérimenter dans plusieurs collectivités + - Région Réunion + - Agglo TCO + - Commune de Nevers + - Nanterre ??? + - Lille +- Ouverture à l’amélioration continu + +# mode de visualisation multiple +- Filière territoriale + - cartographique + - liste + - divers graphe et statistique + - graphe cartographique + - sur Système d'information territorial multi cope / multi tags + - interface de visualisation en marque blanche + - système comparatif et d'analyse trans communal et trans frontalier + +# traduction ou complétion sémantique à la volé +- respect des formats standards json-LD +- optimisation pour le partage de donnée +- respect des ontologies standards pour maximiser la réutilisation +- système de traduction multi ontologies, pour communiquer directement à divers systeme +- ouverture à l'interopérabilité + +# moulinette d'import autonome et multi format +- pont d'interopérabilité GET et POST avec les systèmes open data existant +- data gouv +- etalab +- interface communale +- BDD Européénne +- Wiki data , wikipedia +- Open Street Maps +- OpendataFrance +- Autres …. + +# api/ export + - interface api privatisé + +# module de contribution publique +- odération +- ormulaire de récolte multi thématique (facon GForms) +- ulti modal (ordi, tablet , telephone, capteur IoT) + +# différent niveau d'ouverture pour la data +- 100% open +- privé +- controllé par role + +# proposition de réutilisation immédiate des données +- serviront notamment à nourrir l'intelligence, la connaissance et l'efficience d'un territoire via un S.I.T comme communecter et produire une visualisation filière et Thématique +- pouvant ensuite proposer une version professionnalisante d'une filière + +# interface de connaissance de territoire +- élu.mieuConnecté.gouv +- citoyen.interactif.commune +- Expérimentation SIC : Système d'info communale mutualisé +- efficience et modernisation administrative +- numérisation de la politique communale +- suivi des dossiers/tâches par l'ouverture et agilité de l'activité interne notamment dans la relation technicien <> élus +- communication directe locale + - evenementiel + - service to population + - population to service + - population participante +- système intégrant les citoyens et ouvert à la contribution +- affichage multi modal (ordi, tablet , téléphone, capteur IoT) + +# SIT : Terrapedia wikipedia territorial ouvert et contributif +- un wikipedia remplie avec des données multi source + wikimedia +- connection a wikidata et OSM pour contribuer au BDD libre +- aggregation des données +- interfaces UX innovantes valorisant les croisements de données +- introduction à l'expérimentation Smarterre : territoire intelligent et connecté + + diff --git a/docs/specs/rocketChatIntegration.md b/docs/specs/rocketChatIntegration.md new file mode 100644 index 0000000000000000000000000000000000000000..dce878adfdd2c4c9d54a2d4a821bd928b9e1d7fe --- /dev/null +++ b/docs/specs/rocketChatIntegration.md @@ -0,0 +1,44 @@ +# Integrating Rocket Chat into Communecter +> The main idea is to get a real time private messaging system into Communecter (CO²) +> something similare to FB messenger, but for our open source context with an open source partner +> as we allready use RC for our organization, it seems very well adapted to the plateforms +> and we'd like to offer it to the people +> to enable +- P2P : person to person exchanges +- P2G : private group chat rooms + +## Our side specificationson CO² +- we run on a mongoDB + - we have a user collection + - and a collection for any ELEMENT + - organizations + - projects + - events + - city + - classifieds + +## Integration +- ultimetly RC would sit inside the plateform in 2 forms : + - small bottom popin + - chat page, grouping all different conversations + - open to suggestions ??? + +## Use cases +- Login will be transparent between our panels +- RC notifications should also be hooked up with our notification system or the other way around +- a user can go on any users page and start a discussion, identicall to a P2P converstaion in RC + - the conversation is not accessible to other users +- ELEMENTs always have group or people associated + - any ELEMENT has a "create chat room" feature + - channels are only accessible to the group's members + - only admins can open a channel + - a group can have many channels +- see all "my chatRooms" in one place + +## Relation +- we are interested in a close relation with other open source project like RC +- our interoperabilty will be the first of a long list + +##Questions +- How is RC's security ? have you + diff --git a/docs/specs/roles.md b/docs/specs/roles.md new file mode 100644 index 0000000000000000000000000000000000000000..b8e5f4b43e699884844f19d1424e086656cdd3c4 --- /dev/null +++ b/docs/specs/roles.md @@ -0,0 +1,12 @@ +# Element :: Feature roles sur les membres, contributeurs, participants +> Organiser et mettre en valeur l'importance de chaque acteur lié à un élément + +## Features + +- Ajout des rôles lors de l'invitation à un élément +- Filtre des rôles dans le directory => Pouvoir facilement voir un financeur, un partenaire, un organisateur, un acteur, un intervent, un clown ;) +- Modification des rôles +- Fonctionnalité existante seulement pour les admins + +## Enhancement - Possibilté +- Porte ouverte à l'attribution de préférences de gestion par rôles et d'affichage différents !! \ No newline at end of file diff --git a/docs/specs/tagEngine.md b/docs/specs/tagEngine.md new file mode 100644 index 0000000000000000000000000000000000000000..02b794fe05989e6b2eb751e751ff2251540a1e87 --- /dev/null +++ b/docs/specs/tagEngine.md @@ -0,0 +1,17 @@ +# Smart Tag Engine +> make better tag management in CO + +## Steps +- organiser tout les tags existant (manuellement) + - détecter les doublons manuellement et classifier + - produire une liste des bons tag et la liste des tags a remplacer + - créer un script de remise en cohérence des collections + - remplacer tous les tags doublons par leur equivalent unique + - faire lelien avec les wikipedia/wikidata tags +- script de detection de ressemblance, +- interface pour lancer le scripts et corriger des tags doublons +- reflection : comment exploiter les tags wikipedia ? +- verifier avec les utilisateurs de network de pas avoir d'incohérence +- enregistrer le fichier config de tous nouveau network +- notification aux de nouveau tag +- generateur de proposition de mot clefs basé sur le contenu d'un element diff --git a/docs/specs/translate.md b/docs/specs/translate.md new file mode 100644 index 0000000000000000000000000000000000000000..61fca6c460f4cabfb98889008d81eb43206250ea --- /dev/null +++ b/docs/specs/translate.md @@ -0,0 +1,8 @@ +Communecter en anglais, Here we are !! + +-Changer de langue facilement + +##Besoin urgent: +Un anglais parfait qui ne change plus car modification de l'anglais == modification de tous les documents de trad + code !! +##Enhancement +-Avoir un portail collaborative pour créer et éditer les nouvelles langues \ No newline at end of file diff --git a/docs/specs/urls.md b/docs/specs/urls.md new file mode 100644 index 0000000000000000000000000000000000000000..51db4e917be6b9dd91ccf499575035d6f41748af --- /dev/null +++ b/docs/specs/urls.md @@ -0,0 +1,21 @@ +# Element :: Pod Urls +> on peut ajouter une liste d'urls typé sur chaque éléments +> les urls peuvent avoir un comportement spécifique en fonction de leur type + +## Features + +- pod d'une liste d'urls +- type et comportement : + - video (youtube, viemo...) : onclick ouvre un lecteur video + - geojson : ouvre les contenu sur la vue carto + - rss : est scanné lors de la lecture des news + - agenda, calDav, iCal, Google Cal : intégré dans l'agenda + - git hub : NT new TAb + - framaxxxx : NT + - DDA externe : + - loomio : NT + - democracy OS : NT + - facebook : NT + - twitter : NT + - gestion de projet : NT + - chat : NT \ No newline at end of file diff --git a/docs/tasks.txt b/docs/tasks.txt new file mode 100755 index 0000000000000000000000000000000000000000..1f8507a7839d7cb140c127706e495a997e945f71 --- /dev/null +++ b/docs/tasks.txt @@ -0,0 +1,292 @@ +* pb de connexion de Jerome +* REST project pour Thomas +* contact metamaps for Ecosystem +* Cities details when no content add.specific msg, be the first citizen to join xxxx and start a new era !! + Special ponts ? , Explain creating links, value by usage +* open Communecter + Au reseau proche , Commencer a communecter la famille +* Test a brand new user +* Communecter: quel interet +* Traduction : crowdfunding +* Ubiquity nano station m5 : [[http://www.ldlc.com/fiche/PB00142273.html#utm_source=Google%2BShopping&utm_medium=cpc&utm_campaign=LDLC%2B-%2BGoogle%2BShopping]] +* Follow a tag +* Crowdfunding + - ecrire une lzttre type pour les artistes pour leur dzmabder leur soutien et lzur reseau coyé, waro, jeremy, wojtek +* update buildingCommons models +* modeliser le systeme de wishlist > existant + + + +* Beinact + - Getion de projet + seminaire : system de rencontre + gouvernance : structurer le projet + acommpagnement : bilan et synthese du projet + - Communication + outil + privilégier la video + l'event + plateforme associative + reseau sociétale + - Observatoire + - Regards croisés + - Fiche Blanche + - annuaire + de competence + de besoin + d'ambassadeur + - Debat + + +CINOR + Christopha ANnette + 0692272212 + Sainte Marie + Joslin Trules DGS + Sainte Suzanne + lafine Morice + Bertrand de bois villier (DGS) + +openId + https://wwelves.org/perpetual-tripper/ + https://indieauth.com/setup + http://openid.net/developers/specs/ + + +* CONTACT + * projet Tangue (application mobile - mobilité durable) + association RUN ACTION - président Willy ASSABY + Directeur Angamma Gerald 0692222218 + 0262 58 63 90 + 0692 56 10 01 + + * écoquartier Ravine Blanche + CIVIS Jessica K Bidi 0262499673 jessicak@civis.re + SIDR et Saint-Pierre : j'ai perdu le contact mais madame K Bidi pourra surement te renseigner + + + * Labo reunion Labo Elec 2 Procédé (Moufia) + - Fred alicalapa + - reseau de capteur + + * mairie sin paul + - Mme BERFEUIL au 0262 70 28 25 ou par mail à johanie.berfeuil@mairie-saintpaul.fr + - Service Subventions Associations au 0262 70 28 85 + [ ] pour presenter PH ::ATTEND RV:: Chef : Mr Carlo + [ ] SUIVRE pour la ::SUB:: https://mairie-saintpaul.fr/spip.php?rubrique62 + +* IDEAS + + ** - join Standalone / simple + - tree type form + - create orga + admin + - add members + - create project + - add contributors + - create event + - invite someone + - import form + ** EAT OUR OWN FOOD + - repertorier nos partenaires + - nos evennements + - nos projets + - chacun doit avoir son dashboard + - test decision using the voting system + ** fiche Orga + - existe depuis + - nombres moy d'adherents + ** affiche + - forum des communs + - crowdfunding + +* IN PROGRESS + ** CLEMENT + ** RAPHAEL + [ ] utilisation de opendata Sets + - data.gouv + - wikidata + [[https://www.wikidata.org/wiki/Help:Items]] + [[https://www.wikidata.org/w/api.php]] + [[http://wdq.wmflabs.org/api_documentation.html]] + [ ] Import données + [ ] lorsqu'on change un sous-fichier bloquer l'import de données, demandé une visualisation avant + [ ] bug avec mongoDB : Read time out after reading 0 bytes, waited for 30.00000000 + [ ] testé l'excution en ligne de commande + [ ] Update des données + [ ] ligne de commande + [ ] Vérifier si on a pas déja d'anciennes données + - Cas d'exemple , nous avons déja les données sur les entreprises en 2012, et nous voulons ajouter celle de 2013 + - Etre capable de les ajouter dans le même document que celui de 2012 + [ ] City + [ ] Ajouter les options pour les pods et le type de zonne + [ ] Crée les names_id pour les difs pod + [ ] ajouter des pod sur opendata + [ ] drop down liste des communes + [ ] ré-importer l'ensemble des données + [ ] entreprise + [ ] sport et loisir + [ ] enseignement + [ ] 1er degres + [ ] 2er degres + [ ] superieur + [ ] autre... + [ ] Contact + [ ] faire comme dans linkin verifier si les contacts ne sont pas déjà dans communecter + ** SYLVAIN + ** TIBOR + Jean Marc Laurent > prise de vue + + - plan Crowd Funding + - Forum des communs (10Oct) + - CARRECO + - Banderole + - Affiche Fonctionnel + - Territoire connecté : 1j Cartographier Association, Entreprise + - System d'import 1j : Prix 500€ + - City Box : Location : 1500€/an + - OpenData Consulting + installation de la plateforme : 2000€ + - Conseil Citoyen : 2000€ /an + - Citizen Tool Kit : Package : 5000€ / an + - LOCAL TOURISMO : + - Economie Collaborative : Package : + - Smart Citizen GRid : Capteur Local + - Formation : Opendata , Open source, Collaboratif, SIT + * DEMO + - cityData dash + Geo Stats + - city dash + - opendata /capteur Fablab demo + + [ ] hide .git in prod htacess + [ ] test & debug : vagrant install https://github.com/acorbi/ph-deployment + [ ] page expliquer la gouvernance + [ ] disable orga + [ ] hide from lists users lists + [X] inform users + [X] show disabled button + [X] disable all pods + +[X] remove Notifications as Read +[X] Azotlive +[X] news on orga scope and notify members +[ ] news on project scope and notify members +[ ] news on event scope and notify members +[ ] trier events by date show date +[ ] on admin show orga counts, people counts, event counts, project count +[ ] test creating orga/person dash list and project +[ ] Impossible de s'ajouter à l'organisation [[https://github.com/pixelhumain/communecter/issues/92]] +[ ] Bug lors de l'affichage du formulaire d'un nouvel évènement dans le pod "organizations" #82 [[https://github.com/pixelhumain/communecter/issues/82]] +[ ] Orga : Rééditer un membre #104 + + [ ] test creating a user with an existing email + + + [ ] Grid Pod : + * Githubs + http://vnjs.net/www/project/freewall/ + http://ksylvest.github.io/jquery-gridly/ + Grid inside an item ? + * Usage + Event : whoboard : liste en mode (title, bg img, short desc , long) + Event / Project : sitemap : + Project : in depth viewer + * vote Standalone + [ ] traduction + [ ] line break in textarea edit/create form + [ ] pour ce qui n'ont pas internet ::System par SMS:: + [ ] mobile App + [ ] reflechir au notification + [ ] reflechir ajout au plan d'action + [ ] plan d'action : présené en dessous des resultat + [ ] ajouter par les admins + [ ] basé sur les commentaire avec un outil de high light + + [ ] creatorId must exist if organizer is an orga, for admin purposes + + * GRANDDIR + [ ] Créer une pagination sur les résultats (8 résultats par page) + [ ] @Tristan Publics est toujours vide + [ ] @Tristan Lors d'un clic sur un réul + + + [ ] adding scope to news form (pub priv) & territories + + * dynSurvey + [X] integrate Smart Wizard into DynSurvey + [X] layouts with Smart Wizard + [X] onNext and onPrev event functions on each form section + * dynForm Builder + [X] Bootstrap-Form-Builder read my Form json definition + [X] integrate jsonFromjsonTo + [X] convert BFB json to dynForm json using jsonFromjsonTo + [ ] ::Test::btn:: : opens a standalone Form that uses localStorage.dynFormJson to build the form + [ ] save to localStorage.dynFormJson, show dynForm in a simpleForm template + [ ] save as microformat + [ ] set a destination collection write directly using CommonController + [ ] /common/save/ + [ ] /common/GetMicroformat/key/ + + * PH join + [ ] accepter les CGU + [ ] chaque rencontre send email + [ ] add Orga : Paillasse + https://hackpad.com/Forum-des-Communs-Pixel-Humain-La-Reunion-b3Lneu3HHno + http://lapaillassaone.strikingly.com/ + [ ] add Person + [ ] question + [ ] become tete de reseau pour crowdfunding + [ ] become beta tester + [ ] use Communecter to connect your terrritory + + * FORUM DES COMMUNS + [ ] cartographier les projet des biens communs d'un territoire + [ ] creer un planning + [ ] un ordre de passage + [ ] version enregistré + [ ] en smartPhone : 10 questions pour 10 reponses presentant + Une Personne + - Qui êtes-vous et que faites-vous dans la vie ? + - Quelles sont vos passions ? + - Pouvez-vous nous citer 3 de vos points forts/atouts ? + - Qu'est-ce qui, dans le monde ou dans votre environnement quotidien, vous donne envie d'agir et comment ? + - Pourquoi aimez-vous votre projet/métier et quelle est son utilité pour le monde ? + - En quoi est ce que ce métier/projet vous ressemble ? + - Quel est pour vous le sens de la vie ? Du travail ? + - Quels conseils donneriez-vous aux personnes qui souhaitent réaliser leurs rêves ? Votre message pour les jeunes + + * CROWD FUNDING + --- @TRISTAN?? see, choose and build SCOPE TOOL --- + [ ] users will have my scopes + - location or territory + - geoArea + - Organisation + - Person + [ ] add a scope : is selector + [ ] add as scope btn + search a location can be added + [ ] scopes can be listed like tags on any form + ** slogan + commune histoire + commencons par communiquer + et commettre un crime des communs + et communecter les + [ ] apply filter tags and scope + [ ] survey + [ ] maps + [ ] inter operable Granddir + --- ??? ---- + - check persons events existence + [[??? event.address]] : { + "street": "Tempelhofer Ufer 23/24", + "code": "10963", + "city": "Berlin", + "country": "Germany" + } + + ** TRISTAN + [ ] mettre les liens Graphs dans la liste a droite + [ ] faire interagir une carto avec les top filters ( tag et scope ) + + + + diff --git a/docs/terla.org b/docs/terla.org new file mode 100644 index 0000000000000000000000000000000000000000..e51ea3e2ec57228715198cda6c77c5d977caa9b4 --- /dev/null +++ b/docs/terla.org @@ -0,0 +1,52 @@ +Existed Functionnality: +[X] create travellers account +[] Become professional + [X] add label for citoyens + [X] alert admin + [ ] Admin moderation + [ ] link organization with juridical infos +[ ] Add services & products + [X] Form and openingHours + [X] Add label to be validated + [ ] Admin validation +[X] Shopping cart - Create your personal circuits +[X] Backups - Save you current cart +[X] Visualiser les items +[X] Evaluer les prestations que j'ai acheté +[X] Dashbord product + [X] GuestBook + [ ] Visualiser les réservations + +Roadmap: +[ ] Finir l'affichage du circuit + [ ] design dans directory #circuits + [ ] design du pod/circuit.php + [ ] Ajouter le pod/sliderMedia.php au circuit en compilant des images des services proposés + || ajouter média et images dans circuit directement +[ ] Générer les cartos circuits (dans default/circuit.js) + [ ] Button dans le pod circuit +[ ] Générer la liste des circuits dans la map + [ ] Afficher au click la map des services proposés par circuits +[ ] Gérer la quantité déjà réservée par circuit (bookingFor stocké dans les Orders avec l'id du circuit) +[ ] Dynform circuit + enlever la frequency "unique" || "everyweek" MAIS frequency== "unique" à initialiser tout de même dans le circuit.obj !!!! +[ ] Filtrage circuit + [ ] Par quantité souhaitée suivant la quantité restant + [ ] Par date de début et de fin +[ ] Visualiser les réservations sur un circuit + [X] Alert mail lors de la résa d'un circuit aux admin terla + [ ] Générer la liste des orders réservés pour un circuit #admin.view.circuits +[ ] Dashboard services à continuer + [ ] Pour l'avoir allez sur #admin.view.services et cliquez sur un service +[ ] Ajouter les liens des services dans la vues circuits pour avoir la preview par service tout de même +Bugs: +[ ] Pod circuit constructions + [ ] Delete service and session tricky js bug +[ ]Comment rating => Dashboard voyageurs (section my travellers) + [ ] Bug sur le "show comment" (bricolle js) +[ ] Bug quand on passe d'un backup à l'enregistrement du circuit [backup coté CTK n'est pas dans le data binding de l'objet Circuit] + [ ] Si id de backup dans circuit/SaveAction.php faire un le Backup::delete($_Post["backup"]) et enlever l'entrée backup pour le insert du circuit +[ ] Tricky bug dans composition des circuits pour afficher les calendars des services +[ ] Btn de navigation #admin.view.circuits avec event qui se répéte passer les event en off().on("click") + +Remarques: +Les dates de début et de fin des circuits sont générées directement suivant le service ajouté commencant le premier et le service ajouté terminant le circuit diff --git a/docs/updateGeoPosElements.org b/docs/updateGeoPosElements.org new file mode 100755 index 0000000000000000000000000000000000000000..b46df35081ecf5109b46ceb3534b4fb7772662a7 --- /dev/null +++ b/docs/updateGeoPosElements.org @@ -0,0 +1,85 @@ +//Launch the js script with your command line +//Exemple : mongo lamppost.17.mongolayer.com:10019/dbname --username XXX --password XXXX updateGeoPosElements.org > result.txt + +/* UPDATE INDEX GEOPOS ORGAS */ +print("**************************** UPDATING ORGA *****************************"); +db.organizations.find().forEach(function(doc){ +if(typeof doc.geo != "undefined") { +var lat = doc.geo.latitude; var lng = doc.geo.longitude; +if(lat > 90 || lat < -90){ +var tempLat = lat; +lat = lng; lng = tempLat; +} +lat = parseFloat(lat); +lng = parseFloat(lng); +print(doc.name); +db.organizations.update({"_id":doc._id},{ +'$set':{'geoPosition': {"type" : "Point", "coordinates" : [lng, lat] }, "geo.longitude" : lng, "geo.latitude" : lat} +}); +} +}); + +db.organizations.createIndex({"geoPosition": "2dsphere"}); + + +/* UPDATE INDEX GEOPOS PROJECTS */ +print("**************************** UPDATING PROJECT *****************************"); +db.projects.find().forEach(function(doc){ +if(typeof doc.geo != "undefined") { +var lat = doc.geo.latitude; var lng = doc.geo.longitude; +if(lat > 90 || lat < -90){ +var tempLat = lat; +lat = lng; lng = tempLat; +} +lat = parseFloat(lat); +lng = parseFloat(lng); +print(doc.name); +db.projects.update({"_id":doc._id},{ +'$set':{'geoPosition': {"type" : "Point", "coordinates" : [lng, lat] }, "geo.longitude" : lng, "geo.latitude" : lat} +}); +} +}); + +db.projects.createIndex({"geoPosition": "2dsphere"}); + +/* UPDATE INDEX GEOPOS EVENTS */ +print("**************************** UPDATING EVENT *****************************"); +db.events.find().forEach(function(doc){ +if(typeof doc.geo != "undefined") { +var lat = doc.geo.latitude; var lng = doc.geo.longitude; +if(lat > 90 || lat < -90){ +var tempLat = lat; +lat = lng; lng = tempLat; +} +lat = parseFloat(lat); +lng = parseFloat(lng); +print(doc.name); +db.events.update({"_id":doc._id},{ +'$set':{'geoPosition': {"type" : "Point", "coordinates" : [lng, lat] }, "geo.longitude" : lng, "geo.latitude" : lat } +}); +} +}); + +db.events.createIndex({"geoPosition": "2dsphere"}); + +/* UPDATE INDEX GEOPOS PERSONS */ +print("**************************** UPDATING CITOYENS *****************************"); +db.citoyens.find().forEach(function(doc){ +if(typeof doc.geo != "undefined") { +var lat = doc.geo.latitude; var lng = doc.geo.longitude; +lat = parseFloat(lat); +lng = parseFloat(lng); +if(lat > 90 || lat < -90){ +var tempLat = lat; +lat = lng; lng = tempLat; +} +if(lat < -90 || lat > 90){lat = 0} +if(lng < -180 || lng > 180){lng = 0;} +print(doc.name); +db.citoyens.update({"_id":doc._id},{ +'$set':{'geoPosition': {"type" : "Point", "coordinates" : [lng, lat] }, "geo.longitude" : lng, "geo.latitude" : lat } +}); +} +}); + +db.citoyens.createIndex({"geoPosition": "2dsphere"}); diff --git a/docs/wishlist.org b/docs/wishlist.org new file mode 100755 index 0000000000000000000000000000000000000000..aa4061daf4bd9be2afd8606bc26fbb1f128a7f24 --- /dev/null +++ b/docs/wishlist.org @@ -0,0 +1,185 @@ +* Communication +[ ] connect Rocket + Github [[https://github.com/RocketChat/Rocket.Chat.Ops]] +* BUGS +[ ] repairing localisation HTML5 + +* optim +[ ] XSS filtering [[https://www.owasp.org/index.php/Content_Security_Policy]] +[ ] reactiver viewport filter sur la carte +[ ] on person.detail add autocomplete on tags +[ ] refactor : chgt de carte avec bcp de data + [ ] repertoire + [ ] lazy loading sur la carto +[ ] passing to Yii 2.0 +[ ] passing sessions to DB [[http://www.yiiframework.com/doc-2.0/yii-mongodb-session.html]] +[ ] redirection après 404 : home ? live ? "la page que vous demandez est introuvable" + btn retour ? +[ ] refactor design recherche a directory et utiliser la page recherche pour communauté +[ ] HTML5 notifications + +* refactor +[ ] passer les listes non dynamique dans OpenDAta plutot que collection lists ex : orgaType +[ ] moving discussion polling to discussion page instead of communecter.js + +* Tags + +* Elements +[ ] comptabiliser le temps + type +[ ] ecrire noir sur blanc les regles de remuneration de chaque +[ ] ecrire la doc de fonctionnement + [ ] a quoi ca peut servir + [ ] .... autres question +[ ] Faire un Sitemap designé comme un village avec toute les fonctionalité de communecter +[ ] le répertoire : ordonner les échanges/ressources les plus courant mis en premier + ** dynform + *** Location amélioration + [ ] affichant la carte , click sur la carte cache le panel , hover effect montre les geoshape + click ajoute multi scope + [ ] auto complete custom list [[http://jqueryui.com/autocomplete/#custom-data]] + [[http://stackoverflow.com/questions/3488016/using-html-in-jquery-ui-autocomplete]] + [ ] desactivate dynForm if not Logged + [ ] dynform evolutif par type + [ ] start by name + [ ] build as you complete the info + [ ] create dashbord design monrep , mode browsing > convert flood to dash design + [ ] 2 modes selector or browsing + ** Person + [ ] citoyen recoltant + [ ] pouvoir supprimer son compte + [ ] Indicateur du nb de nouveauté depuis dernier login + [ ] validation de compte voir openhub + + ** Orga + [ ] donner le choix lorsqu'on est invité a une orga + [ ] inviter les gens a suivre + + ** Event ideas + [ ] tester : calendrier full calendar sur agenda + [ ] utiliser action Rooms pour les salles des events et les relier aux subs events + [ ] affichage triable en mode mixitup + [ ] par salle , chrono, tag filter, all subevents + [ ] my events : events I participate in , calendrier perso + [ ] doodle : pour comparer facilement les dispo + [ ] covoit : décrire les trajet pour les partagers + [ ] Event intérrsant pour moi, moteur d'affinité + [ ] push back vers Open Agenda + [ ] Pouvoir ajouter plusieur date à un event + [ ] Inviter les invités de l'événement parent à la création d'un sous évent. + + ** Project + [ ] préremplir la date d'une task d'un projet avec la date de fin du projet + [ ] Top 10 projet Locaux , liké ou soutenu par la population + [ ] inspiré de openhub, pour la valorisation de projet locaux et communs + [ ] enable create subProjects like subEvents + + ** Needs + - section besoin + - filtre par type de besoin + - par type d'acteur + + ** POI + [ ] type umap type geojson : dans ce cas on mouline chaque point ou à la demande du mapEnd on get et on affiche le geoJson sur notre carte + [ ] use Poi as social bookmarking + [ ] import from diigo, bookmarks or delicious + [ ] btn add to my favorites + [ ] bookmarklet like diigo + +* City +[ ] faire des appels a projets +[ ] ajouter la gestion des quartier Isis dans les scope +[ ] Valoriser les communes qui ont signées +[ ] taper un nom de ville sur le scoper, avec le type region activé, si je tape Bordeau me ressort la REgion correspondante +[ ] scoper adding a code postal > ajoute toute la chaine +[ ] add a calendar on city page ??? +[ ] localiser libre : avec le nouvel input + - si la city n'existe pas , panel de creation et on enchaine + + +* Ergo +[1.1] utiliser ce design du dashboard pour afficher notif + - ca pourrait ouvrir des porte pour trier les section des notifs + - moins clostro que les bar vertical actuelle + - turn notification list into a header panel + +* Global +[ ] shortcuts : navigate with 4 btns + [ ] F1 : dashboard + - ajouter un champs de recherche qui fera comme le finder linux ou apple + [ ] F2 : me or my data dash comme le finder Apple + [ ] F3 : my map or my statistic + [ ] F4 : My Society or my game +[ ] Utilisateur qui n'ont cp + [ ] en mode carto : indiquer qu'il ne sont pas sur la carte et leur proposer de se communecter. + [ ] Dans le header : a la place du cp , proposer de ce communecter. +[ ] synchroniser le scopper et la carto +[ ] Module FAQ : posez une questions a cette entité +[ ] rapatrier les docs module +[ ] repair fluidlog +[ ] declaration de pb contextualisé + - bug idée ... sur chaque page , persistent et en mode votable +[ ] representation du multi scoping sur la carte + - peut etre tracer les perimtres de chaque zone +[ ] system de synchronisation between instances : download + upload + - download from OCDB + - connect to one or many servers, info new differences + - upload from instance + - select types for what to upload + - see diffs + - id unique : id_sourkeyInstance +[ ] Post outside : ne pas juste utiliser les mails + - user pourront demander des push sur differentes destination FB, twitter, +[ ] systeme calculant la valeur indirect de communecter basé sur un systeme de valeur economique existant + ex : sur les base des prix des pages jaune calculé la valeur cumulé de l'annuaire + +* API +[ ] integrate France Connect + +* Import / Export +[ ] ical + +* Interop + [.2] ajouter un RSS , systeme fondant + [1.1] possibility de soumettre une url pour connecter un profile externe + [ ] creer un editeur minimal de profile ou de data , utilisable sur nimporte quel site + [ ] on login , si profile externe , loader celui ci pour que ca tourne sur CO + [ ] faire une system de persistance , pour que les element puissent etre recherché dans CO ou n'importe quel agregateur + [ ] intégrer plus d'outil externe + - framasoft + - http://www.covoit.net/ + +* News + [.2] Ajouter DDA, POI + [ ] Améliorer l'affichage de commentaires dans les news + +* admin + [ ] Gérer la pagination de admin (essayer de faire un proto duplicable) + +* DDA +[ ] ouvrir une proposition une geo scope cp, insee.. +[ ] ouvrir une proposition sans parent room +[ ] btn archiver afficher si deconnecté +[ ] changer les lien des DDA sur les parent insee +[1.1] Decision externe par lien : Loomio, pétition, reference juste une url pour agir +[1.1] Discussion externe : Roket Chat, Gitter or Slack with url +[ ] Réunion privée pour avancement interne organisation +[ ] ajouter des pièces jointes (doc, pdf...) associées aux DDA +[ ] optim : pour eviter les count propositions, dans les boucles ajouter le propalCount on the actionRoom + +* Notifications : + [.2] Un subevent a été ajouté sur un event auquel je suis participant + [ ] Un nouveau message privé (écrit sur votre journal) vous a été adressé. + [ ] ajouter des acceptation dans le notif, pour pas etre obligé d'aller sur le post + [ ] Améliorer la notification de report d'abus + +* Financement +[1.1] jauge de tarification proportionnel et prix libre de contribution au commun + [ ] avec analyse de consommation et prix adapté à la conso + [ ] vision disk dur : en fonction de la consommation de chacun + + +* Recherche +[ ] Crée une classe Search + [ ] Qui regroupe des functions que symply et global autocomplete pourrons piochier + +* Dongles +[ ] contribution par mail : https://www.diigo.com/tools/post_by_email +[ ] plugin Chrome plugguer avec dynform et l'api pour partage rapide et viral a la diigo + diff --git a/messages/fr/admin.php b/messages/fr/admin.php new file mode 100755 index 0000000000000000000000000000000000000000..61012b3df9c2ab979c512dc652b7171cf4aed992 --- /dev/null +++ b/messages/fr/admin.php @@ -0,0 +1,11 @@ +<?php + +return array( + "DIRECTORY" => "DIRECTORY", + "Converter" => "Convertisseur de données", + "OPEN AGENDA" => "OPEN AGENDA", + "CHECK GEOCODAGE" => "VERIFIER LE GEOCODAGE DES ENTITES ", + "IMPORT DATA" => "Injecter des données", + "SOURCE ADMIN" => "SOURCE ADMIN", + "CHECK CITIES" => "VERIFIER LA TABLE CITIES", +); \ No newline at end of file diff --git a/messages/fr/badge.php b/messages/fr/badge.php new file mode 100755 index 0000000000000000000000000000000000000000..5d247e3070a64e4d08dbfee411559e0c965dca84 --- /dev/null +++ b/messages/fr/badge.php @@ -0,0 +1,11 @@ +<?php + +return array( + + "crowdfunder" => "Vous avez participer au financement participatif de Communecter", + "developper" => "Vous êtes un développeur de Communecter", + "opendata" => "Vous contribuez à l'Open Data", + +); + +?> \ No newline at end of file diff --git a/messages/fr/comment.php b/messages/fr/comment.php new file mode 100755 index 0000000000000000000000000000000000000000..826295d74392b32e96c68a269973a285bbf5ecec --- /dev/null +++ b/messages/fr/comment.php @@ -0,0 +1,22 @@ +<?php + + return array( + "You can not comment more on this discussion" => "Vous ne pouvez pas publier d'autes commentaires dans cette discussion", + + "Can Reply" => "Vous pouvez répondre", + "Can't Reply" => "Vous ne pouvez pas répondre", + "Anonymous" => "Anonyme", + "Nominatively" => "En votre nom", + "Only one comment" => "limite : 1 commentaire", + "No limit comments" => "", + + "You can reply to a comment" => "", + "You can not reply to a comment" => "", + "The discussion is anonymous" => "", + 'Refresh to see the new comments' => "Rafraichir pour voir les nouveaux commentaires", + 'New Comments Refresh' => "Nouveaux Commentaires", + 'New Comment(s) Click to Refresh' => 'nouveau(x) commentaires, click pour voir' + + ) + +?> \ No newline at end of file diff --git a/messages/fr/common.php b/messages/fr/common.php new file mode 100755 index 0000000000000000000000000000000000000000..f00de3dde352a63fe3f2198407b45792e360a039 --- /dev/null +++ b/messages/fr/common.php @@ -0,0 +1,59 @@ +<?php + +return array( + "Searching" => "Recherche en cours", + "WELCOME" => "BIENVENUE", + "ADD SOMETHING" => "AJOUTER", + + "PEOPLE" => "CITOYENS", + "ORGANIZATIONS" => "ORGANISATIONS", + "PROJECTS" => "PROJETS", + "EVENTS" => "ÉVÉNEMENTS", + "CITIES" => "COMMUNES", + "ADD SOMETHING" => "AJOUTER", + "HELP US : BUGS, IDEAS" => "AIDEZ NOUS : BUG, IDEE", + "CONNECT" => "CONNECTER", + "LOGOUT" => "DÉCONNECTER", + "REGISTER" => "S'INSCRIRE", + + "WHAT" => "COMMUNECTER ?", + "WHY" => "POURQUOI ?", + "WHO" => "QUI ?", + "FOR WHO" => "POUR QUI ?", + "BY WHO" => "PAR QUI ?", + "HOW" => "COMMENT ?", + "WHEN" => "QUAND ?", + "WHERE" => "OÙ ?", + "HELP US" => "AIDEZ-NOUS ?", + "GET INVOLVED" => "PARTICIPEZ !", + + "Required Fields" => "Champs obligatoires", + "Change password" => "Changez le mot de passe", + + "The current user is not valid : please login." => "Cet utilisateur n'est pas loggué", + "Incomplete Request." => "Demande Incomplète", + + "Oops! You are stuck at " => "Oops! Vous etes bloqué en ", + "Unfortunately the page you were looking for could not be found." => "Malheureusement la page que vous cherchez est introuvable", + "It may be temporarily unavailable, moved or no longer exist." => "Elle est peut etre temporairement indisponible, déplacé ou n'existe plus.", + "Check the URL you entered for any mistakes and try again." => "Vérifier l'URL et rééssayez", + "Return home" => "Retour Acceuil", + + "Follow this person" => "Suivre cette personne", + "Follow this organization" => "Suivre cette organisation", + "Follow this project" => "Suivre ce projet", + "Unfollow" => "Ne plus suivre", + + "Documentation" => "Documentation", + + "Save Processing"=> "Enregistrement en cours", + "Understanding newspaper and news stream"=> "Comprendre le journal et le fil d'actualité", + + "Short description" => "Description courte", + + "Remove" => "Supprimer", + "Update" => "Modifier", + "Edit" => "Éditer", + "Chat Settings" => "de Messagerie" + +); \ No newline at end of file diff --git a/messages/fr/documents.php b/messages/fr/documents.php new file mode 100755 index 0000000000000000000000000000000000000000..48f943e88f525a87355288070d9f7561f78d6948 --- /dev/null +++ b/messages/fr/documents.php @@ -0,0 +1,28 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "Share your Organizations Documents Simply" => "Partager vos documents simplement", + "Loading Documents Section" => "Chargement des ressources", + "DOCUMENTS"=>"RESSOURCES", + "The document is not well formated" => "Le document est mal formé", + "deleted file fail" => "Erreur d'effacement du fichier ", + 'Are you sure to delete' => 'Veuillez confrmer cette effacement', + "No document at this position." => "Ce document n'éxiste pas.", + "deleted file success!!" => "Effacé avec succés", + "Manage Documents" => "Gestion des ressources", + "Categories" => "Catégories", + "No Category" => "Pas de catégorie", + "Click or Drag over" => "Cliquez ou déposez un fichier ici", + "Size" => "Taille", + "Nothing is closer to the true than the false" => "Rien n'est plus proche du vrai que le faux", + "No delete method available!" => "Aucune fonction d'effacement", + "Add Files" => "Ajouter une ressource", + "Document saved successfully" => "Document enregistré avec succés", +); +?> \ No newline at end of file diff --git a/messages/fr/event.php b/messages/fr/event.php new file mode 100755 index 0000000000000000000000000000000000000000..3918c89447823185b44a27613e30c383385176d9 --- /dev/null +++ b/messages/fr/event.php @@ -0,0 +1,86 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + //Title + "UPCOMING EVENTS"=>"PROCHAINS EVENEMENTS", + "ALL EVENTS"=>"TOUS LES EVENEMENTS", + "EVENT" => "ÉVÈNEMENT", + "Events" => "Événements", + "MY EVENTS" => "MES ÉVÈNEMENTS", + "EVENTS" => "ÉVÈNEMENTS", + "Create and Attend<br/>Local Events<br/>To build up local activity<br/>To help local culture<br/>To create movement" + => "Créez et participez...<br/>Aux événements locaux pour...<br/>Construire l'activité local,<br/>Diffuser la culture,<br/>Engendrer des mouvements.", + //Form + "Add new event" => "Ajouter un nouvel évènement", + "Choose an organizer" => "Choisir un organisateur", + "Event Name" => "Nom de l'évènement", + //Description + "Organized by the project" => "Organisé par le projet", + "By the project" => "Par le projet", + "Organizer" => "Organisateur", + "this event" => "cet évènement", + //Attendees + "Attendees" => "Participants", + "ATTENDEES" => "PARTICIPANTS", + "Attending" => "attendus", + "Add an attendee" => "Ajouter un participant", + "Add me as attendee" => "M'ajouter en tant que participant", + "Allready attending for this event" => "Participe déjà à l'évènement", + "ATTENDEE SUCCESSFULLY ADD!!" => "Participant ajouté avec succès !!", + "Attendee well registered and invite!!" => "Participant enregistré et invité avec succès ", + "All day" => "Toute la journée", + "Your event has been connected." => "Votre événement est communecté", + + "Parent Event" => "Événement parent", + "Events" => "Événements", + "Part of Event" => "durant l'événement ", + "If this event is Part of an Event" => "Si fait parti d'un événement", + "Cancel Event" => "Annuler l'événement", + "Edit Event"=>"Editer l'événement", + "Modify Position on the map" => "Modifiez la position sur la carte", + "Delete this event" => "Effacer cet événement", + "SUBEVENT ORGANISER" => "Contributeur", + 'Visualise' => "Visualisez", + 'View this event as a directory' => "Voir l'événement en annuaire", + "Unlink event" => "Détacher cette évènement", + "Create an event"=>"Créer un événement", + + //Type + "concours" => "Concours", + "festival" => "Festival", + "market" => "Marché", + "others" => "Autres", + "concert" => "Concert", + "exposition" => "Exposition", + "getTogether" => "Rencontre", + "meeting" => "Réunion", + "competition" => "Compétition", + "course" => "Formation", + "workshop" => "Atelier", + "conference" => "Conférence", + "debate" => "Débat", + + "Please specify the name of the event"=>"Le nom est obligatoire", + "Please specify the postal code"=>"Le code postal est obligatoire", + "Please specify the city"=>"La commune est obligatoire", + + 'Calendar' => "Calendrier", + "No Parent Event" => "Pas de parent", + "Display/Hide old events" => "Afficher/Cacher les événements passés", + "Old events" => "Evénements passés", + "Create your next events <br>To show your next meet-up<br>And where people can go" => "Référencer vos prochains événements<br>Pour montrer les prochains rendez-vous<br>Et où les gens peuvent sortir", + "View this event calendar" => "Voir la programmation de l’événement", + "Invite people to this event" => "Inviter des personnes à cet événement", + "Invite people to your event and manage its administration" => "Inviter des personnes à participer et gérer l'administration de l'événement", + + "Write the event's short description" => "Ecrire la description courte de l'événement", + "Write the event's description" => "Ecrire la description de l'événement" + +); +?> \ No newline at end of file diff --git a/messages/fr/fileUpload.php b/messages/fr/fileUpload.php new file mode 100755 index 0000000000000000000000000000000000000000..265dc4ca1dd42dfd75c865ad397f54d369a38a34 --- /dev/null +++ b/messages/fr/fileUpload.php @@ -0,0 +1,9 @@ +<?php + + return array( + "Size maximum 2Mo" => "Taille du fichier superieur à 2Mo", + "for share your pictures" => "pour partager vos images", + "Click on" => "Cliquez sur" + ) + +?> \ No newline at end of file diff --git a/messages/fr/gantt.php b/messages/fr/gantt.php new file mode 100755 index 0000000000000000000000000000000000000000..5b0e39379768cba1c035419ba2821c3b89e8d489 --- /dev/null +++ b/messages/fr/gantt.php @@ -0,0 +1,25 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + //Title + "PROJECT TIMELINE" => "VIE DU PROJET", + "Project timeline" => "Vie du projet", + "EVENT PROGRAM" => "Programme", + "Edit timeline" => "Editer la chronologie du projet", + "Yearly" => "Annuel", + "Create Gantt with<br/>Tasks<br/>Deadlines<br/>Priorities<br/>To think, develop, build and shows next steps of the project to everyone" => "Créer un Gantt avec des<br/>Tâches<br/>Deadlines<br/>Priorités<br/>Pour penser, développer, construire et montrer les prochaines étapes du projet à toute la communauté", + "Add a Task" => "Ajouter une tâche", + "Tasks show what's next in the project" => "Les tâches montrent les étapes à suivre du projet", + "Task's name" => "Nom de la tâche", + "Task's duration" => "Durée de la tâche", + "Task's color" => "Couleur de la tâche", + "the task" => "la tâche", + +); +?> \ No newline at end of file diff --git a/messages/fr/import.php b/messages/fr/import.php new file mode 100755 index 0000000000000000000000000000000000000000..3c834e88f23bb9ec4bff0508e08de61ddf3aca90 --- /dev/null +++ b/messages/fr/import.php @@ -0,0 +1,46 @@ +<?php + +return array( + // + "001" => "L'entité n'a pas de nom", + // Partie concernant l'adresse + "100" => "L'entité n'a aucune informations l'adresse.", + "101" => "L'entité n'a pas de code postal.", + "102" => "L'entité n'a pas de code INSEE.", + "103" => "L'entité n'a pas de commune.", + "104" => "L'entité n'a pas de pays.", + "105" => "L'entité n'a pas de nom rue.", + "106" => "Ce code postal n'existe pas dans notre base de données.", + "110" => "Nous n'avons pas trouver la commune : Vérifier si le code postal et le nom de la commune soient bonnes", + "111" => "Nous n'avons pas réussi a récupérer le nom de la commune car l'INSEE et le code postal ne sont pas compatibles. Vérifier l'adresse.", + "112" => "Nous n'avons pas réussi récupérer le code INSEE. Vérifier l'adresse.", + + // Partie concernant la géolocalisation + "150" => "L'entité n'a pas de géolocalisation.", + "151" => "L'entité n'a pas de latitude.", + "152" => "L'entité n'a pas de longitude.", + "153" => "L'entité n'a pu être géolocalisé précisément : Repositionner le.", + "154" => "Nous n'avons pas réussi à géolocaliser l'entité: Vérifier l'adresse et Repositionner le.", + + // Partie concernant la géolocalisation et l'adresse. + "170" => "Incohérence entre la géolocalisation et le code postal. Vérifier l'adresse et la géolocalisation", + "171" => "L'INSEE du fichier et celui retourné par la géolocalisation n'est pas le même.", + "172" => "Le code postal du fichier et celui retourné par la géolocalisation n'est pas le même.", + + + "201" => "Le nom est obligatoire.", + "202" => "Le surnom est obligatoire.", + "203" => "L'email est obligatoire.", + "204" => "Le mot de passe est obligatoire.", + "205" => "L'email n'est pas bien formaté.", + "206" => "Une personne avec ce mail existe déjà sur la plateforme.", + "207" => "Une personne avec ce username existe déjà sur la plateforme.", + "208" => "Cette organisme n'a pas de type.", + "209" => "Vous devez remplir un email valide pour le contactPoint.", + "210" => "Cette personne n'a pas de username.", + "211" => "Cette username a été généré automatique à partir du nom de l'utilisateur.", + "212" => "Le Type \"Groupe\" a été attribué a cette organisation. Veuilliez changer le type de l'organisation s'il ne correspond pas à ce type.", + "250" => "L'entité a été mis a jour.", +); + +?> \ No newline at end of file diff --git a/messages/fr/jobs.php b/messages/fr/jobs.php new file mode 100755 index 0000000000000000000000000000000000000000..4697f3f1b1aa6e0644f0f369840155bfb2dbf30e --- /dev/null +++ b/messages/fr/jobs.php @@ -0,0 +1,16 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "Share your Organizations Jobs Simply" => "Partager vos offres d'emploi simplement", + "JOBS & COURSES" => "EMPLOIS ET FORMATIONS", + "Create a job Offer" => "Créer une offre d'emploi", + "The job offer has been removed successfully!!" => "L'offre a été retiré avec succés !!", + "Loading Jobs Section" => "Chargement des offres d'emploi" +); +?> \ No newline at end of file diff --git a/messages/fr/link.php b/messages/fr/link.php new file mode 100755 index 0000000000000000000000000000000000000000..525f1d7b51f3745902f22183c8b7ab8654498b17 --- /dev/null +++ b/messages/fr/link.php @@ -0,0 +1,16 @@ + +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "The member's role has been removed with success" => "Le role de ce membre a été retiré", + "Directory" => "Annuaire", + "Connect People or Organizations that are part of your Organization" => "Connecter des personnes ou des organisations à votre organisation", + "Remove this member" => "Retirer ce membre" +); +?> \ No newline at end of file diff --git a/messages/fr/need.php b/messages/fr/need.php new file mode 100755 index 0000000000000000000000000000000000000000..7f4de391717a0d5c52af2b988f4747ff6b1efe75 --- /dev/null +++ b/messages/fr/need.php @@ -0,0 +1,38 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "NEEDS" => "BESOINS", + "Need" => "Besoin", + "Needs" => "Besoins", + "Task will show what's next in the project" => "Chaque projet a des besoins différents.</br>Pour trouver facilement ce dont vous avez besoin autour de vous, c'est simple : publiez vos besoins sur la page de votre projet !", + "Add a need" => "Ajouter un besoin", + "You are already helpers for this need !" => "Vous venez déjà en aide à ce besoin !", + "Succesfully add !! Wait for validation" => "Aide bien enregistrée !! Attendre pour la validation", + "Congrats, help is succesfully validated" => "Bravo, l'aide est validée avec succès", + "You are not a person" => "Vous n'êtes pas une personne", + "Contribute to the project ansering to this need !!" => "Contribuez au projet en répondant à ce besoin !!", + "Involve me" => "Se proposer", + "Need has enough helpers !!" => "Le besoin a trouvé ces volontaires !!", + "HELPERS" => "VOLONTAIRES", + "HELPER" => "VOLONTAIRE", + "NEED DESCRIPTION" => "DESCRIPTION DU BESOIN", + "NEED INFORMATIONS" => "INFORMATIONS DU BESOIN", + "Quantity" => "Quantité", + "Benefits" => "Nature", + "Add need to find energies to help you" => "Ajouter des besoins pour trouver des énergies", + "Create needs<br/>Materials<br/>Knowledge<br/>Skills<br/>To call ressources that you need" => "Créez des besoins<br/>Matériels<br/>Savoirs<br/>Compétences<br/>Pour avoir les ressources qu'il vous manque", + + "What do you need ?" => "De quoi avez-vous besoin ?", + "Services" => "Service", + "Competences" => "Compétence", + "Materials" => "Matériel", + "Name of need" => "Description du besoin", + +); +?> \ No newline at end of file diff --git a/messages/fr/news.php b/messages/fr/news.php new file mode 100755 index 0000000000000000000000000000000000000000..93e64f8953a1f40b17b8d4eec42b0e82d03ad3ef --- /dev/null +++ b/messages/fr/news.php @@ -0,0 +1,18 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "News" => "News", + "Actuality" => "Acitvity", + "Add something to share your activity" => "Ajoutez quelque chose à votre réseau", + "Share a thought, an idea, a link" => "Partagez une pensée, une idée, un lien", + "In a few words" => "En quelques mots", + "Details" => "Détail", + "Please write something" => "message vide", +); +?> \ No newline at end of file diff --git a/messages/fr/organisation.php b/messages/fr/organisation.php new file mode 100755 index 0000000000000000000000000000000000000000..0709fdbc33e3033531278546029a1f6dacdb361c --- /dev/null +++ b/messages/fr/organisation.php @@ -0,0 +1,42 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + "test" => "TEST FR", + "Discover local Organisations" => "Découvrez les organisations locales", + "Directory" => "Annuaire", + "People" => "Citoyens", + "MEMBERS" => "MEMBRES", + "Organizations" => "Organisations", + "Invite People<br>create links <br>communicate and interact<br>better cities and Organizations<br>People are the heart of the system" => "Inviter des gens<br>créer des liens<br>communiquer et interagir<br>rendre meilleur les villes et les organisations<br>Les personnes sont le coeur du système", + "Add a Member ( Person, Organization )" => "Ajoutez un membre (Personne, Organisation)", + "An Organization can have People as members or Organizations" => "Une organisation peut avoir des personnes ou des organisations comme membres", + "Member added successfully " => "Membre ajouté avec succès ", + // Form OrganizationSV + "Reference your organization" => "Référencer votre organisation", + "If you manage one or several organizations or you're simply part of an organization as member:<br/>You are at the best place to emphasize, to promote, to help your organization in order make it alive.<br/>Verify if the organization already exists with its name or its email in search field." => "Si vous gérer une ou plusieurs organisations ou etes simplement membre d'une organization :<br/>vous êtes au bon endroit pour la valoriser, la diffuser, l'aider à la faire vivre.<br/>Vérifier l'existance de l'organisation en saisissant son nom ou son email dans le champs de recherche.", + "Corporate Name" => "Raison Sociale", + "Add Me as member Of" => "M'ajouter en tant que membre de", + "Add a member to this organization" => "Ajouter un membre à cette organisation", + "An Organization can have People as members or Organizations" => "Les membres d'une organisation peuvent être des personnes ou des organisations.", + "Search by name, email" => "Rechercher par nom ou e-mail", + + //TYPES + "NGO" => "Association", + "LocalBusiness" => "Entreprise", + "Local Business" => "Entreprise", + "Group" => "Groupe", + "Government Organization" => "Service Public", + "the NGO" => "l'association", + "the localBusiness" => "l'entreprise", + "Local Business" => "Entreprise", + "the group" => "le collectif", + "the Group" => "le groupe", + "the government organization" => "l'organisation gouvernementale", +); +?> \ No newline at end of file diff --git a/messages/fr/photoVideo.php b/messages/fr/photoVideo.php new file mode 100755 index 0000000000000000000000000000000000000000..8a37ef674ce92e354a7ff1a085658d072d592c82 --- /dev/null +++ b/messages/fr/photoVideo.php @@ -0,0 +1,10 @@ +<?php + + return array( + "Show gallery" => "Voir la gallerie", + "Loading Media" => "Chargement des médias", + "Add an image" => "Ajouter une image", + "Validate" => "Valider" + + ) +?> \ No newline at end of file diff --git a/messages/fr/poi.php b/messages/fr/poi.php new file mode 100644 index 0000000000000000000000000000000000000000..f04115c339722a8b972726ae6b7175bfca69b117 --- /dev/null +++ b/messages/fr/poi.php @@ -0,0 +1,22 @@ +<?php + + return array( + "link" => "Lien, Url", + "poi" => "Points d'intérêt", + "geoJson" => "Url au format geojson ou vers une umap", + "compostPickup" => "Écolte de composte", + "video" => "Video", + "sharedLibrary" => "Bibliothèque partagée", + "artPiece" => "Oeuvres", + "recoveryCenter"=> "Ressourcerie", + "trash" => "Poubelle", + "history" => "Histoire", + "something2See" => "Chose a voir", + "funPlace" => "Endroit Sympas (skatepark, vue...)", + "place" => "Place publique", + "streetArts" => "Arts de rue", + "openScene" => "Scène ouverte", + "stand" => "Stand", + "parking" => "Parking" + ) +?> \ No newline at end of file diff --git a/messages/fr/project.php b/messages/fr/project.php new file mode 100755 index 0000000000000000000000000000000000000000..e4042f42e5d2a9b90be8fa6a1b3dda41e8cbf381 --- /dev/null +++ b/messages/fr/project.php @@ -0,0 +1,63 @@ +<?php +/** + * Extends Locale data for 'en_US'. + * In this file you can put custom locale settings that will be + * merged with the ones provided by the framework + * ( that are stored in <framework_dir>/i18n/data/ ) + */ + +return array( + //Title + "test" => "TEST FR", + "MY PROJECTS" => "MES PROJETS", + "PROJECTS" => "PROJETS", + "Projects" => "Projets", + "PROJECT TIMELINE" => "VIE DU PROJET", + "PROJECT INFORMATIONS" => "INFORMATIONS DU PROJET", + "PROJECT DESCRIPTION" => "DESCRIPTION DU PROJET", + "Project description" => "Description du projet", + "CHART" => "CHARTE", + "Chart" => "Charte", + //Informations + "Maturity" => "Maturité", + "Project maturity" => "Maturité du projet", + "idea" => "Idée", + "started" => "En démarrage", + "development" => "Développement", + "testing" => "En test", + "Enter the project's name" => "Entrer le nom du projet", + "Write the project's description" => "Rédigez la description du projet", + "Write the project's short description" => "Décrivez ce projet en quelques mots (moins de 141 caractères)", + "Enter the project's maturity" => "Entrer l'avancement du projet", + "Enter the project's start" => "Entrer le début du projet", + "Enter the project's end" => "Entrer la fin du projet", + "Enter the project's licence" => "Entrer la licence du projet", + "Enter the project's url" => "Entrer l'url du projet", + + //Porject form + "Add a new project" => "Créer un nouveau projet", + "If you want to create a new project in order to make it more visible : it's the best place<br/>You can as well organize your project team, plan tasks, discuss, take decisions...<br/>Depending on the project visibility, contributors can join the project and help<br>to make it happen ! " => "Si tu veux créer un nouveau projet de façon à le rendre plus visible : c'est le bon endroit !!<br/>Tu peux ainsi organiser l'équipe projet, planifier les tâches, échanger, prendre des décisions ...", + "Project duration" => "Durée du projet", + //Contributors + "CONTRIBUTORS" => "CONTRIBUTEURS", + "Contributor successfully removed" => "Contributeur enlevé avec succès", + "Add contributor" => "Ajouter un contributeur", + "Connect People or Organizations that are part of the project" => "Connectez les personnes et les organisations qui font partis du projet", + //Chart + "Edit properties" => "Editer les propriétés", + "Create Chart<br/>Opening<br/>Values<br/>Governance<br/>To explain the aim and draw project conduct" => "Créer un graphique montrant<br/>l'Ouverture<br/>les Valeurs<br/>la Gouvernance, etc<br/>Pour montrer le but et les valeurs du projets", + "Add project's properties" => "Ajouter des propriétés au projet", + "Degree of project's openness (0% = very closed, 100% = very opened)" => "Degré d'ouverture du projet (0% = très fermé, 100% = très ouvert)", + "Add<br/>A new<br/>Property" => "Ajouter<br/>Une nouvelle<br/>Propriété", + "No contributor for this project" => "Pas de contributeur sur le projet", + "Your project is updated" => "Projet mis à jour avec succés", + "Create or Contribute <br>Build Things<br>Find Help<br>Organize<br>Local or distant<br>Projects" => "Créer ou Contribuer<br>Construire<br>Trouver de l'Aide<br>Organiser des Projets<br>Localement ou à distance", + "Old projects" => "Anciens projects", + "Display/Hide old projects" => "Afficher/Cacher les anciens projets", + "Create new projects <br>To show your current activity<br>And what's happened around people" => "Référencer vos nouveaux projets<br>Pour montrer votre activité<br>Et ce qu'il se passe autour de nous", + "Add a contributor to this project" => "Ajouter des contributeurs à ce projet", + "A project can have People as contributors or Organizations" => "Des citoyens et des organisations peuvent contribuer au projet" + + //Erreur +); +?> \ No newline at end of file diff --git a/messages/fr/rooms.php b/messages/fr/rooms.php new file mode 100755 index 0000000000000000000000000000000000000000..551c15a47ae67187beaa5f1fdcc909ab451d44d1 --- /dev/null +++ b/messages/fr/rooms.php @@ -0,0 +1,197 @@ +<?php + +return array( + "VOTE" => "VOTER", + "DECIDE" => "DECIDER", + "ACT" => "AGIR", + "YOU VOTED ALLREADY" => "VOUS AVEZ DEJA VOTÉ", + "FEEL FREE TO VOTE" => "LIBRE A VOUS DE VOTER", + "THIS VOTE IS CLOSED" => "Ce vote est terminé", + "people voted" => "ont voté", + "You are Following this vote." => "Vous suivez cette session", + "You created this vote." => "Vous êtes l'auteur de cette proposition", + "VOTE"=>"VOTER", + "DISCUSS"=>"DISCUTER", + "DECIDE"=>"DECIDER", + "ACT"=>"AGIR", + "Discuss" => "Discuter", + "Decide" => "Décider", + "Act" => "Agir", + "My Activity" => "Mon Activité", + "CONTACT"=>"CONTACT", + "Thank you for voting" => "Merci d'avoir voté", + "Feel Free to vote"=>"Voter est un droit, pas un devoir.", + "INVITATION TO VOTE" => "INVITATION A VOTER", + "VOTERS"=>"Nombre de votants", + "Since"=>"Ouvert le", + "Started"=>"En cours depuis le", + "Ends"=>"Se termine le", + "VISITORS"=>"Nombre de visiteurs", + "Voted" => "Vous avez voté", + "Not Voted" => "Vous n'avez pas voté", + "Closed" => "Cloturé", + "You did not vote" => "Vous n'avez pas voté", + "Proposed by" => "Proposé par", + "Add a proposal" => "Faire une proposition", + + "Survey" => "Sondage", + "Vote" => "Vote", + "Discussion" => "Discussion", + "Brainstorm / Proposals / Ideas" => "Brainstorming, propositions, idées", + + "Type of Room" => "Type d'espace", + 'Add an Action Room' => "Créer un nouvel espace", + "Surveys contain subject to vote on, brainstorm sessions, discussions..." => + "Un espace Citoyen permet de faire des propositions, de voter, d'échanger des idées, créer des discussions, ou encore des débats.", + "Create Room" => "Créer un espace citoyen", + "Discussions" => "Discussions", + "Let's Discuss" => "Espace de discussion", + "Create a discussion" => "Créer un espace de discussion", + "Decisions" => "Prendre des décisions", + "Brainstorms" => "Echanger des idées", + + "Create a discussion" => "Espace de discussion", + "Take decisions" => "Espace de décision", + "Organize Actions" =>"Espace d'actions", + + "To vote" => "A voter", + "My votes" => "Mes votes", + "My proposals" => "Mes propositions", + //"Closed" => "Cloturé", + "Edit" => "Modifier", + "Close" => "Fermer", + "Comment" => "Commenter", + + "created" => "Publié le", + "end" => "Fin le", + "ended" => "Clôturé le", + "Result" => "Résultats", + "You did not vote" => "Vous n'avez pas voté", + "Login to vote" => "Connectez-vous", + //"Closed" => "Fermé", + "Archived" => "Archivé", + + "Type / Action" => "Type / Action", + "Name" => "Thématique", + "Entries" => "Propositions", + "Participants" => "Participants", + "Start Date" => "Début", + "End Date" => "Fin", + "Actions" => "Actions", + "Action" => "Action", + "action" => "action", + "All your Actions" => "Liste de vos actions", + "All your Rooms" => "Liste des thématiques", + "Rooms" => "Espaces coopératifs", + "Action Rooms" => "Espaces coopératifs", + 'Back to Parent Survey' => "Retour aux propositions", + 'Parent Survey' => "Liste des propositions", + + "propositions" => "propositions", + "Create propostal" => "Faire une proposition", + + + "Let's talk about" => "Échanger des idées librement", + "Find questions to ask" => "Poser des questions", + "Collective intelligence sometimes starts by talking" => "Utiliser l'intelligence collective pour approfondir un sujet", + + "Decide Collectivelly" => "Voter collectivement", + "to think, develop, build and decide collaboratively" => "Penser, développer, construire et décider de façon collaborative", + "Back to Parent" => "Retour", + "Created" => "Créé le", + "Back to collaborative space" =>"Retour vers espace coopératif", + "Collaborative space" =>"Espace coopératif", + + "Help us with new ideas" => "Améliorez avec vos idées", + 'Share Your ideas ' => "Partagez vos idées", + 'Innovate for more democratic actions' => "Innover pour l'action democratique", + 'Action Rooms are made for new approaches' => "Les nouveaux types de salles d'action sont les bienvenus", + + "You must login or join to vote" => "Connectez vous ou participez pour pouvoir voter", + + 'Work Collectivelly'=> "Travailler Ensemble", + "It's time for action" => "Prendre le temps d'agir", + + 'Add an Action' => "Ajouter une action", + "Your action has been Saved" => "Votre action est enregistré", + 'Get some Actions going' => "Lancer quelques actions", + 'Acts speak louder than words' => "Vivre, ce n'est pas respirer, c'est agir", + 'Break up Big actions into smaller ones' => "Découpez les grandes actions, en plusieurs plus petites", + 'practise before theory' => 'Le pratique doit préceder la théorie', + 'to build and experiment collaboratively' => "Construire et expérimenter ensemble", + + "Actions speak louder than words" => "Vivre, ce n'est pas respirer, c'est agir", + 'Back to Action List' => "Retour à la liste", + 'Action List' => "Liste d'actions", + "Action Lists" => "Listes d'actions", + + "Title of the action" => "Titre de l'action", + "Description of the action" => "Description de l'action", + "Estimated End Date" => "Date de fin", + "Add urls or Bullet points" => "Ajouter des liens ou actions à faire" , + "Assignees" => "Responsable", + "start" => "Début", + + "Todo" => "A faire", + "Move" => "Déplacer", + 'My Todo' => "Mes Actions", + "Progressing"=> "En cours", + "In Progress" => "En cours", + 'Unassigned' => "Non Assignées", + "Late" => "En retard", + "Date Change Count" => "Changement de date", + 'Close this action' => "Fermer cette action", + 'Re-open This Action' => "Réouvrir cette action", + 'Close' => "Fermer", + 'ReOpen' => "Réouvrir", + "Links and Info Bullet points" => "Des liens d'informations ou actions à faire", + "Add your point of view in the comments" => "Faites des propositions dans les commentaires", + "Assign Me This Task" => "Assignez moi cette tache ", + "Made by " => "Proposition à l'assemblée par ", + "Copied from a discussion :" => "Copié d'une discussion : ", + "action Saved" => "Action Enregistrer", + "Made by " => "Proposé par ", + "JOIN TO PARTICIPATE" => "Devenez membre pour participer", + "LOGIN TO PARTICIPATE" => "Connectez-vous pour participer", + "JOIN TO VOTE" => "Devenez membre pour voter", + "LOGIN TO VOTE" => "Connectez-vous pour voter", + "go back to the detail page of the parent" => "retour vers la fiche info", + + "COOPERATIVE SPACE" => "ESPACE COOPÉRATIF", + "Element" => "Element", + + "Create a Proposal" => "Créez des propositions", + "Share an Idea" => "Partagez des idées", + "a Solution"=> "des solutions", + "to think, develop, build and decide collaboratively" => "pour penser, développer, construire et décider de façon collaborative", + "The action will be created in an Action List named like this discussion" => "L'action sera créé dans la liste d'action qui porte le même nom", + "The proposal will be created in a Decision Room named like this discussion" => "La proposition sera créé dans l'espace de décision qui porte le même nom", + + //notifications + "{who} added a new Voting Room on {where}" => "{who} a ajouté une salle de décision sur {where}", + "{who} added a new Discussion Room on {where}" => "{who} a ajouté une salle de discussion sur {where}", + "{who} added a new Actions List on {where}" => "{who} a ajouté une salle d'action sur {where}", + "{who} added a new Proposal {what} in {where}" => "{who} a ajouté une Proposition {what} dans {where}", + "{who} added a new Action {what} in {where}" => "{who} a ajouté une Action {what} dans {where}", + "{who} voted on {what} in {where}" => "{who} a voté sur {what} dans {where}", + + "Archive" => "Archiver", + "This will hide and Archive this Decision Room" => "Archiver le contenu de cet espace", + "Create an Action for your community" => "Créer une nouvelle action dans cet espace", + "Understanding action list" => "Comprendre les listes d'actions", + + "Moved Succesfully to " => "Déplacé avec Succés vers ", + "Moved Succesfully to Decision room : " => "Déplacé avec Succés vers la salle de décision : ", + "Moved Succesfully to action room : " => "Déplacé avec Succés vers la salle d'action : ", + "Destination Room doen't exist" => "L'espace de destination n'existe pas", + + "Edit this proposal" => "Editer cette proposition", + "Move this proposal" => "Déplacer cette proposition dans un autre espace", + "Close this proposal" => "Supprimer cette proposition", + 'Participation open to city residents only' => "Seuls les citoyens de cette ville peuvent participer" +); + + + + + diff --git a/messages/fr/sliderAgenda.php b/messages/fr/sliderAgenda.php new file mode 100755 index 0000000000000000000000000000000000000000..bf104eeea67f1a1b0ae05fcd92fce1a6126ada0d --- /dev/null +++ b/messages/fr/sliderAgenda.php @@ -0,0 +1,12 @@ +<?php + + return array( + "Loading Shared Calendar Section" => "Chargement de l'agenda partagé", + "No picture for this event" => "Aucune images pour cette événement", + "No upcoming events" => "Aucun événement à venir", + "Add an event" => "Ajouter un événement", + "SHARED CALENDAR" => "AGENDA PARTAGÉ", + "to add a new event" => "pour ajouter un nouvel événement" + ); + +?> \ No newline at end of file diff --git a/messages/fr/survey.php b/messages/fr/survey.php new file mode 100755 index 0000000000000000000000000000000000000000..545f8ec3ccd8ff4a0fe56b5c15ec215bbbdb76a9 --- /dev/null +++ b/messages/fr/survey.php @@ -0,0 +1,39 @@ +<?php + + return array( + "VOTE" => "VOTER", + "DECIDE" => "DECIDER", + "ACT" => "AGIR", + "JOIN TO VOTE" => "Lire", + "YOU VOTED ALLREADY" => "VOUS AVEZ DEJA VOTÉ", + "FEEL FREE TO VOTE" => "LIBRE A VOUS DE VOTER", + "THIS VOTE IS CLOSED" => "Ce vote est terminé", + "people voted" => "ont voté", + "You are Following this vote." => "Vous suivez cette session", + "You created this vote." => "Vous etes créateur de la session", + "VOTE"=>"VOTER", + "DISCUSS"=>"DISCUTER", + "DECIDE"=>"DECIDER", + "ACT"=>"AGIR", + "CONTACT"=>"CONTACT", + "Thank you for voting" => "Merci d'avoir voté", + "Feel Free to vote"=>"Voter est un droit, pas un devoir.", + "INVITATION TO VOTE" => "INVITATION A VOTER", + "VOTERS"=>"Nombre de votants", + "Since"=>"Début", + "Ends"=>"Fin", + "VISITORS"=>"Visiteurs", + "Voted" => "Vous avez voté", + "Not Voted" => "Vous n'avez pas voté", + "Closed" => "Cloturé", + "You did not vote" => "Vous n'avez pas voté", + "Proposed by" => "Proposé par", + "Add a proposal" => "Faire une proposition", + "You must login to vote" => "Vous devez vous connecter pour pouvoir voter", + "You must join to vote" => "Vous devez être membre pour pouvoir voter", + "Add an Action" => "Ajouter une action", + "The survey has been updated" => "La proposition a été mise à jour" + + ) + +?> \ No newline at end of file diff --git a/models/CO2.php b/models/CO2.php new file mode 100755 index 0000000000000000000000000000000000000000..5020dc883ee5bdc4814918e04fee823e28dedb0c --- /dev/null +++ b/models/CO2.php @@ -0,0 +1,89 @@ + <?php +class CO2 { + + public static function getThemeParams($domainName=null){ + $domainName = @$domainName ? $domainName : Yii::app()->params["CO2DomainName"]; + + $layoutPath ="../../modules/co2/config/".$domainName."/params.json"; + + $str = file_get_contents($layoutPath); + + $params = json_decode($str, true); + return $params; + } + + + public static function getContextList($contextName, $domainName=null){ + $domainName = @$domainName ? $domainName : Yii::app()->params["CO2DomainName"]; + + $layoutPath ="../../modules/co2/config/".$domainName."/".$contextName.".json"; + $str = file_get_contents($layoutPath); + + $list = json_decode($str, true); + return $list; + } + + public static function getCitiesNewCaledonia(){ + $query = array("country"=>"NC", "name"=>array('$in'=>array("Noumea", "Dumbea", "Paita", "Mont-Dore"))); + $citiesGN = PHDB::find(City::COLLECTION, $query); + + $query = array("country"=>"NC", "level3Name"=>"Province Sud", + "name"=>array('$nin'=>array("Noumea", "Dumbea", "Paita", "Mont-Dore"))); + $citiesS = PHDB::find(City::COLLECTION, $query); + + $query = array("country"=>"NC", "level3Name"=>"Province Nord"); + $citiesN = PHDB::find(City::COLLECTION, $query); + + $query = array("country"=>"NC", "level3Name"=>"Province des Iles"); + $citiesI = PHDB::find(City::COLLECTION, $query); + + $cities = array("GN"=>$citiesGN, + "Sud"=>$citiesS, + "Nord"=>$citiesN, + "Iles"=>$citiesI); + return $cities; + } + + public static function getCommunexionCookies(){ + $communexion = array("state"=>false, "values"=>array()); + //var_dump(Yii::app()->request->cookies['communexionActivated']); + if(CookieHelper::hasCookie("communexion") && CookieHelper::hasCookie("communexionType")) { + if(isset( Yii::app()->request->cookies['communexionActivated'] ) && (string)Yii::app()->request->cookies['communexionActivated'] == "true"){ + $communexion["state"] = true; + } + $communexion["values"] = json_decode(CookieHelper::getCookie("communexion"), true); + + if(!empty($communexion["values"])){ + $communexion["values"] = json_decode(CookieHelper::getCookie("communexion"), true); + } + $communexion["currentLevel"] = "city"; + + if($communexion["values"]["cp"]){ + $where = array("postalCodes.postalCode" =>new MongoRegex("/^".$communexion["values"]["cp"]."/i")); + $citiesResult = PHDB::find( City::COLLECTION , $where ); + + $cities=array(); + foreach ($citiesResult as $key => $v) { + // $trad4 = Zone::getTranslateById($key, City::COLLECTION); + // $cities[]=(!empty($trad4["translates"]["EN"]) ? $trad4["translates"]["EN"] : $v["name"]); + $cities[] = City::getNameCity($key); + } + $communexion["cities"] = $cities; + } + + $communexion["communexionType"] = CookieHelper::getCookie("communexionType"); + $communexion["currentName"] = $communexion["values"]["cityName"]; + $communexion["currentValue"] = $communexion["values"]["city"]; + }else{ + $communexion["levelMinCommunexion"] = false; + $communexion["currentLevel"] = false; + $communexion["currentName"] = false; + $communexion["currentValue"] = false; + $communexion["state"] = false; + } + return $communexion; + } + + +} +?> diff --git a/models/CityOpenData.php b/models/CityOpenData.php new file mode 100755 index 0000000000000000000000000000000000000000..a33293fd0d43d4904e9391a587988acd5ec0156e --- /dev/null +++ b/models/CityOpenData.php @@ -0,0 +1,134 @@ +<?php +class CityOpenData { + + /** + * get Entries from a collection and converts ID and applies a dummyData field for easy export and remove + * @param type $type + * @param type $where + * @return type + */ + public static function listOption($arrayOption, $chaine, $first, $name_id, $father=""){ + + $i = 1 ; + foreach ($arrayOption as $key => $value) { + + //if(is_array($value)) + if(empty($value["value"]) && empty($value["label"])) + { + //var_dump($value); + $chaine = $chaine.'<li><strong class="btn-drop bold" >'.$key.'</strong></li>'; + $otherfather = $father .".". $key ; + if($first == true && $i==1) + $chaine = CityOpenData::listOption($value, $chaine, true, $name_id, $otherfather); + else + $chaine = CityOpenData::listOption($value, $chaine, false, $name_id, $otherfather); + } + else + { + if($first == true && $i==1) + $list = '<li> + <a class="btn-drop optionBtn" data-name="'.$father .'.'. $key.'"> + <input type="checkbox" id="'.$name_id . $father .'.'. $key.'" name="'.$name_id .'optionCheckbox" value="'.$father .'.'. $key.'" checked/> + <label for="'.$name_id . $father .'.'. $key.'" >'.$value["label"].'</label> + </a> + </li>'; + else + $list = '<li> + <a class="btn-drop optionBtn" data-name="'.$father .'.'. $key.'"> + <input type="checkbox" id="'.$name_id . $father .'.'. $key.'" name="'.$name_id .'optionCheckbox" value="'.$father .'.'. $key.'"/> + <label for="'.$name_id . $father .'.'. $key.'" >'.$value["label"].'</label> + </a> + </li>'; + $chaine = $chaine . $list ; + // var_dump($chaine); + $i++; + } + } + + return $chaine; + } + + public static function listOptionWithOptionChecked($arrayOption, $chaine, $name_id, $optionCheckbox , $father=""){ + + $i = 1 ; + foreach ($arrayOption as $key => $value) { + //var_dump($value); + if(empty($value["value"]) && empty($value["label"])) + { + $chaine = $chaine.'<li><strong class="btn-drop bold" >'.$key.'</strong></li>'; + $otherfather = $father .".". $key ; + $chaine = CityOpenData::listOptionWithOptionChecked($value, $chaine, $name_id, $optionCheckbox, $otherfather); + } + else + { + $trouver = false ; + + foreach ($optionCheckbox as $optionKey => $optionValue){ + //var_dump($optionValue); + if($optionValue == $father .'.'. $key) + { + $list = '<li> + <a class="btn-drop optionBtn" data-name="'.$father .'.'. $key.'"> + <input type="checkbox" id="'.$name_id . $father .'.'. $key.'" name="'.$name_id .'optionCheckbox" value="'.$father .'.'. $key.'" checked/> + <label for="'. $father .'.'. $key.'" >'.$value["label"].'</label> + </a> + </li>'; + $trouver = true ; + break; + } + } + + if($trouver == false) + { $list = '<li> + <a class="btn-drop optionBtn" data-name="'.$father .'.'. $key.'"> + <input type="checkbox" id="'.$name_id . $father .'.'. $key.'" name="'.$name_id .'optionCheckbox" value="'.$father .'.'. $key.'"/> + <label for="'.$father .'.'. $key.'" >'.$value["label"].'</label> + </a> + </li>'; + + } + + $chaine = $chaine . $list ; + $i++; + + } + } + + return $chaine; + + } + + /******* NEW ***********/ + + public static function listOption2($arrayOption, $chaine, $first, $name_id, $father=""){ + + $i = 1 ; + foreach ($arrayOption as $key => $value) { + + //if(is_array($value)) + if(empty($value["value"]) && empty($value["label"])) + { + //var_dump($value); + $otherfather = $father .".". $key ; + if($first == true && $i==1) + $chaine = CityOpenData::listOption2($value, $chaine, true, $name_id, $otherfather); + else + $chaine = CityOpenData::listOption2($value, $chaine, false, $name_id, $otherfather); + } + else + { + if($first == true && $i==1) + $list = '<option value="'.$father .'.'. $key.'" checked>'.$value["label"].'</option>'; + else + $list = '<option value="'.$name_id .$father .'.'. $key.'">'.$value["label"].'</option>'; + $chaine = $chaine . $list ; + // var_dump($chaine); + $i++; + } + } + + return $chaine; + } + +} +?> \ No newline at end of file diff --git a/models/Data.php b/models/Data.php new file mode 100755 index 0000000000000000000000000000000000000000..20c2388a6572afd63ccff0fd3e2cbff6d36ac84e --- /dev/null +++ b/models/Data.php @@ -0,0 +1,25 @@ +<?php +class Data { + + /** + * get Entries from a collection and converts ID and applies a dummyData field for easy export and remove + * @param type $type + * @param type $where + * @return type + */ + public static function getByAttributeForExport($type,$where){ + $list = PHDB::find($type,$where); + if($list){ + $res = array(); + foreach ( $list as $key => $value) { + $value["_id"] = array('$oid'=>(string)$value["_id"]); + $value["dummyData"] = "myData.".Yii::app()->session["userId"]; + unset( $value["_id"]['$id'] ); + array_push($res, $value); + } + return $res; + } + + } +} +?> \ No newline at end of file diff --git a/schema_base_interop.png b/schema_base_interop.png new file mode 100644 index 0000000000000000000000000000000000000000..412ea009aee05b36a1bf4f7cbd76b5fce69316f3 Binary files /dev/null and b/schema_base_interop.png differ diff --git a/tests/Login b/tests/Login new file mode 100755 index 0000000000000000000000000000000000000000..70f3acec8670795e9d5b3a4b0e2310df9f641a0f --- /dev/null +++ b/tests/Login @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://127.0.0.1/ph/communecter" /> +<title>Login</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Login</td></tr> +</thead><tbody> +<tr> + <td>click</td> + <td>//button[@onclick="showPanel('box-login');"]</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=email-login</td> + <td>oceatoon</td> +</tr> +<tr> + <td>type</td> + <td>id=password-login</td> + <td>22102210</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clean()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.warn('TEST userId : ',userId)</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#person.detail.id.'+userId)</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/Logout b/tests/Logout new file mode 100755 index 0000000000000000000000000000000000000000..74f9f4fd520514eceb47aa1f8ea8593360e79064 --- /dev/null +++ b/tests/Logout @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://127.0.0.1/ph/communecter" /> +<title>Logout</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">Logout</td></tr> +</thead><tbody> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#person.logout')</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#default.home')</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>window.location.reload()</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/api b/tests/api new file mode 100755 index 0000000000000000000000000000000000000000..6bbd2cd96eb48c81580a615bbff4f9bf1b7fc671 --- /dev/null +++ b/tests/api @@ -0,0 +1,101 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="https://127.0.0.1:80/" /> +<title>api</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">api</td></tr> +</thead><tbody> +<tr> + <td>echo</td> + <td>************ Test GET</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=request-url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=request-url</td> + <td>https://127.0.0.1:80/ph/communecter/data/get/type/organizations/</td> +</tr> +<tr> + <td>click</td> + <td>id=request-button</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=request-url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=request-url</td> + <td>https://127.0.0.1:80/ph/communecter/data/get/type/projects/</td> +</tr> +<tr> + <td>click</td> + <td>id=request-button</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=request-url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=request-url</td> + <td>https://127.0.0.1:80/ph/communecter/data/get/type/events/</td> +</tr> +<tr> + <td>click</td> + <td>id=request-button</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=request-url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=request-url</td> + <td>https://127.0.0.1:80/ph/communecter/data/get/type/citoyens/</td> +</tr> +<tr> + <td>click</td> + <td>id=request-button</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/api_postman.json b/tests/api_postman.json new file mode 100755 index 0000000000000000000000000000000000000000..c574683a2bafa68fd8130a7e5c06bf5af62a4796 --- /dev/null +++ b/tests/api_postman.json @@ -0,0 +1,828 @@ +{ + "id": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "name": "API Communecter", + "description": "Les différents url de l'api de communecter ", + "order": [ + "904f67c1-8c93-67e4-7d01-bac4d1b80dc7", + "18b205b1-e69d-4f7f-9956-f648d82acfd6" + ], + "folders": [ + { + "id": "cdbf0b40-2dfb-f174-0dd5-a2f09d5a58be", + "name": "Event", + "description": "", + "order": [ + "3da07884-2a18-58db-06ea-67a477891d07", + "0809ccc4-7b7d-2021-9195-e44f795a8a49" + ], + "owner": "870465" + }, + { + "id": "aa247afa-3c87-2538-2455-f6ed826ece94", + "name": "GET", + "description": "", + "order": [ + "90edd296-392d-73c0-f6bf-7e73168adcea", + "8c9019b2-a701-2eb2-88a6-7d4c904f3874" + ], + "owner": "870465" + }, + { + "id": "8bdb632d-47b6-b335-b8b0-ce2211ca9a12", + "name": "Link", + "description": "", + "order": [ + "22bff4e1-74e4-1445-83f6-d4e56bc20cae", + "6f11e930-5b32-a761-3dec-9f00c9a7280a", + "b414170d-f038-66c9-734d-ed3590814568" + ], + "owner": "870465" + }, + { + "id": "128b4c24-1df0-35c3-bc38-b1cc76e18868", + "name": "News", + "description": "", + "order": [ + "48aa58a1-7cd4-5f06-5642-afb2e5e5d58b", + "4714f6e9-9706-8d4c-0c4c-7d0dcf5570cf", + "d1f04301-496b-74bd-8055-aa373d8930ae" + ], + "owner": "870465" + }, + { + "id": "c99b7b12-fc00-6270-e54c-2f060c964f70", + "name": "Organization", + "description": "", + "order": [ + "67e13bea-2666-67bb-053d-b4fa287aca0f", + "280b8619-43cf-4a80-917c-bfee5980a27d" + ], + "owner": "870465" + }, + { + "id": "02de863e-cd2f-4af8-9f8d-e8547a880079", + "name": "Project", + "description": "", + "order": [ + "47931414-27d9-c2b2-ff51-fe947a437c76", + "b7ef59c9-385d-d95a-0aa6-386df55b60f7" + ], + "owner": "870465" + } + ], + "timestamp": 1470140978524, + "owner": "870465", + "public": false, + "published": false, + "requests": [ + { + "id": "0809ccc4-7b7d-2021-9195-e44f795a8a49", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/event/save", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "name", + "value": "TestEvent222", + "type": "text", + "enabled": true + }, + { + "key": "startDate", + "value": "10/08/2016 18:00:00", + "type": "text", + "enabled": true + }, + { + "key": "endDate", + "value": "10/08/2016 23:00:00", + "type": "text", + "enabled": true + }, + { + "key": "postalCode", + "value": "97421", + "type": "text", + "enabled": true + }, + { + "key": "city", + "value": "97414", + "type": "text", + "enabled": true + }, + { + "key": "cityName", + "value": "La RIviere", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLatitude", + "value": "-21.25598005", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLongitude", + "value": "55.437367360757", + "type": "text", + "enabled": true + }, + { + "key": "organizerType", + "value": "dontKnow", + "type": "text", + "enabled": true + }, + { + "key": "organizerId", + "value": "dontKnow", + "type": "text", + "enabled": true + }, + { + "key": "allDay", + "value": "false", + "type": "text", + "enabled": true + }, + { + "key": "type", + "value": "concert", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/event/save", + "description": "Créer un événement", + "descriptionFormat": "html", + "time": 1470223768404, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "cdbf0b40-2dfb-f174-0dd5-a2f09d5a58be" + }, + { + "id": "18b205b1-e69d-4f7f-9956-f648d82acfd6", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/opendata/getcitiesbypostalcode/", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "postalCode", + "value": "59260", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/opendata/getcitiesbypostalcode/", + "description": "Récupère les informations d'une commune en fonction du code postal\nparametre en POST :\n\npostalCode : yourPostalCode\n", + "descriptionFormat": "html", + "time": 1470204443684, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {} + }, + { + "id": "22bff4e1-74e4-1445-83f6-d4e56bc20cae", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/link/disconnect", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "childId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "childType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "parentType", + "value": "organizations", + "type": "text", + "enabled": true + }, + { + "key": "parentId", + "value": "57a188da94ef47c3047b23d8", + "type": "text", + "enabled": true + }, + { + "key": "connectType", + "value": "members", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/link/disconnect", + "description": "Supprimer un lien entre 2 entité", + "descriptionFormat": "html", + "time": 1470206097501, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "8bdb632d-47b6-b335-b8b0-ce2211ca9a12" + }, + { + "id": "280b8619-43cf-4a80-917c-bfee5980a27d", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/organization/updatefield", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "id", + "value": "57a188da94ef47c3047b23d8", + "type": "text", + "enabled": true + }, + { + "key": "name", + "value": "email", + "type": "text", + "enabled": true + }, + { + "key": "value", + "value": "testj@yahoo.fr", + "type": "text", + "enabled": true + }, + { + "key": "", + "value": "", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "Update Fields", + "description": "Modifier un champs d'une organisation \n\nParametre en POST\n\nidOrganisation\nnameField\nvalueField\n", + "descriptionFormat": "html", + "time": 1470211277867, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "c99b7b12-fc00-6270-e54c-2f060c964f70" + }, + { + "id": "3da07884-2a18-58db-06ea-67a477891d07", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/event/updatefield", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "pk", + "value": "57a1d4b194ef47bb137b2400", + "type": "text", + "enabled": true + }, + { + "key": "name", + "value": "description", + "type": "text", + "enabled": true + }, + { + "key": "value", + "value": "Ceci est une nouvelle description", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/event/updatefield", + "description": "Mettre a jour un champs de l'évènement", + "descriptionFormat": "html", + "time": 1470223928629, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "cdbf0b40-2dfb-f174-0dd5-a2f09d5a58be" + }, + { + "id": "4714f6e9-9706-8d4c-0c4c-7d0dcf5570cf", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/news/updatefields", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "pk", + "value": "57a1d96d94ef47df137b23ed", + "type": "text", + "enabled": true + }, + { + "key": "name", + "value": "newsContent57a1d96d94ef47df137b23ed", + "type": "text", + "enabled": true + }, + { + "key": "value", + "value": "New text", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "Update Fields", + "description": "Mise a jour d'une news", + "descriptionFormat": "html", + "time": 1470291449504, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "128b4c24-1df0-35c3-bc38-b1cc76e18868" + }, + { + "id": "47931414-27d9-c2b2-ff51-fe947a437c76", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/project/save", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "parentId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "parentType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "name", + "value": "TestProject3", + "type": "text", + "enabled": true + }, + { + "key": "startDate", + "value": "10/08/2016 18:00:00", + "type": "text", + "enabled": true + }, + { + "key": "endDate", + "value": "10/08/2016 23:00:00", + "type": "text", + "enabled": true + }, + { + "key": "postalCode", + "value": "97421", + "type": "text", + "enabled": true + }, + { + "key": "city", + "value": "97414", + "type": "text", + "enabled": true + }, + { + "key": "cityName", + "value": "La RIviere", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLatitude", + "value": "-21.25598005", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLongitude", + "value": "55.437367360757", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/project/save", + "description": "Ajout d'un project", + "descriptionFormat": "html", + "time": 1470222551347, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "02de863e-cd2f-4af8-9f8d-e8547a880079" + }, + { + "id": "48aa58a1-7cd4-5f06-5642-afb2e5e5d58b", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/news/save", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "userId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "text", + "value": "Qui participe au prochaine débat de la ville", + "type": "text", + "enabled": true + }, + { + "key": "date", + "value": "03/08/2016 12:00:00", + "type": "text", + "enabled": true + }, + { + "key": "parentId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "parentType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "scope", + "value": "public", + "type": "text", + "enabled": true + } + ], + "dataMode": "params", + "name": "Save", + "description": "Ajouter une news", + "descriptionFormat": "html", + "time": 1470224781514, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "128b4c24-1df0-35c3-bc38-b1cc76e18868" + }, + { + "id": "67e13bea-2666-67bb-053d-b4fa287aca0f", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/organization/save", + "preRequestScript": null, + "pathVariables": {}, + "method": "POST", + "data": [ + { + "key": "organizationName", + "value": "TestOrganisation", + "type": "text", + "enabled": true + }, + { + "key": "organizationEmail", + "value": "testorganization@test.com", + "type": "text", + "enabled": true + }, + { + "key": "type", + "value": "NGO", + "type": "text", + "enabled": true + }, + { + "key": "streetAddress", + "value": "", + "type": "text", + "enabled": true + }, + { + "key": "postalCode", + "value": "97421", + "type": "text", + "enabled": true + }, + { + "key": "cityName", + "value": "La RIVIERE", + "type": "text", + "enabled": true + }, + { + "key": "city", + "value": "97414", + "type": "text", + "enabled": true + }, + { + "key": "organizationCountry", + "value": "RE", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLatitude", + "value": "-21.25598005", + "type": "text", + "enabled": true + }, + { + "key": "geoPosLongitude", + "value": "55.437367360757", + "type": "text", + "enabled": true + }, + { + "key": "role", + "value": "admin", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470222079393, + "name": "Save", + "description": "Ajouter une organization , parametre obligatoire en POST :\n", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "responses": [], + "folder": "c99b7b12-fc00-6270-e54c-2f060c964f70" + }, + { + "id": "6f11e930-5b32-a761-3dec-9f00c9a7280a", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/link/connect", + "preRequestScript": null, + "pathVariables": {}, + "method": "POST", + "data": [ + { + "key": "childId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "childType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "parentType", + "value": "organizations", + "type": "text", + "enabled": true + }, + { + "key": "parentId", + "value": "57a188da94ef47c3047b23d8", + "type": "text", + "enabled": true + }, + { + "key": "connectType", + "value": "admin", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470205850407, + "name": "https://127.0.0.1:80/ph/communecter/link/connect", + "description": "Connecter une personnes (child) a une organisationt, un événement ou un projet (parent)\n\nParametre en POST :\n- childId : childId\n- childType\" : childType, \n- parentType\" : parentType,\n- parentId\" : parentId,\n- connectType\" : connectType\n} \nUse case with connectType : \"member\",\"admin\", \"contributor\", \"attendee\"", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "responses": [], + "folder": "8bdb632d-47b6-b335-b8b0-ce2211ca9a12" + }, + { + "id": "8c9019b2-a701-2eb2-88a6-7d4c904f3874", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/data/get/type/events/", + "preRequestScript": null, + "pathVariables": {}, + "method": "GET", + "data": null, + "dataMode": "params", + "version": 2, + "tests": "tests[\"Status code is 200\"] = responseCode.code === 200;", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470288146163, + "name": "https://127.0.0.1:80/ph/communecter/data/get/type/events/", + "description": "", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "folder": "aa247afa-3c87-2538-2455-f6ed826ece94" + }, + { + "id": "904f67c1-8c93-67e4-7d01-bac4d1b80dc7", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/person/authenticate", + "preRequestScript": null, + "pathVariables": {}, + "method": "POST", + "data": [ + { + "key": "email", + "value": "usertest@test.com", + "type": "text", + "enabled": true + }, + { + "key": "pwd", + "value": "m=+?gQ6a", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "version": 2, + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470221800619, + "name": "Authenticate", + "description": "Se connecter depuis Communecter\nAvoir en paramètre :\n - email : youremail@communecter.fr\n - pwd : yourpwd", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "responses": [] + }, + { + "id": "90edd296-392d-73c0-f6bf-7e73168adcea", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/data/get/type/organizations/", + "preRequestScript": null, + "pathVariables": {}, + "method": "GET", + "data": null, + "dataMode": "params", + "version": 2, + "tests": "tests[\"Status code is 200\"] = responseCode.code === 200;", + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470288194410, + "name": "https://127.0.0.1:80/ph/communecter/data/get/type/organizations/", + "description": "", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "folder": "aa247afa-3c87-2538-2455-f6ed826ece94" + }, + { + "id": "b414170d-f038-66c9-734d-ed3590814568", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/link/follow", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "childId", + "value": "5798a77d94ef4749187b23da", + "type": "text", + "enabled": true + }, + { + "key": "childType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "parentType", + "value": "citoyens", + "type": "text", + "enabled": true + }, + { + "key": "parentId", + "value": "55e042ffe41d754428848363", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/link/follow", + "description": "Suivre une personne", + "descriptionFormat": "html", + "time": 1470208427634, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "8bdb632d-47b6-b335-b8b0-ce2211ca9a12" + }, + { + "id": "b7ef59c9-385d-d95a-0aa6-386df55b60f7", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/project/updatefield", + "pathVariables": {}, + "preRequestScript": null, + "method": "POST", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "data": [ + { + "key": "pk", + "value": "57a1cd8a94ef47e6137b23de", + "type": "text", + "enabled": true + }, + { + "key": "name", + "value": "description", + "type": "text", + "enabled": true + }, + { + "key": "value", + "value": "Ceci est une nouvelle description", + "type": "text", + "enabled": true + } + ], + "dataMode": "urlencoded", + "name": "https://127.0.0.1:80/ph/communecter/project/updatefield", + "description": "Mise a jour d'un champs dans projects", + "descriptionFormat": "html", + "time": 1470222510244, + "version": 2, + "responses": [], + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "folder": "02de863e-cd2f-4af8-9f8d-e8547a880079" + }, + { + "id": "d1f04301-496b-74bd-8055-aa373d8930ae", + "headers": "", + "url": "https://127.0.0.1:80/ph/communecter/news/delete/id/57a2e2e094ef4747057b23e0", + "preRequestScript": null, + "pathVariables": {}, + "method": "GET", + "data": [], + "dataMode": "urlencoded", + "tests": null, + "currentHelper": "normal", + "helperAttributes": {}, + "time": 1470303908466, + "name": "Delete", + "description": "Supprimer une news\n\nParametre en GET :\n\n\"id\": l'identifiant de la news", + "collectionId": "9c4208c2-9840-08c1-b2a6-f6c5c823ea3d", + "responses": [] + } + ] +} \ No newline at end of file diff --git a/tests/communecterSuite b/tests/communecterSuite new file mode 100755 index 0000000000000000000000000000000000000000..1903fbeb40a69679fbc3d1fa6546a190b3b9a641 --- /dev/null +++ b/tests/communecterSuite @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta content="text/html; charset=UTF-8" http-equiv="content-type" /> + <title>Test Suite</title> +</head> +<body> +<table id="suiteTable" cellpadding="1" cellspacing="1" border="1" class="selenium"><tbody> +<tr><td><b>Test Suite</b></td></tr> +<tr><td><a href="Logout">Logout</a></td></tr> +<tr><td><a href="Login">Login</a></td></tr> +<tr><td><a href="organization">organization</a></td></tr> +<tr><td><a href="dda">dda</a></td></tr> +<tr><td><a href="dynForms">dynForms</a></td></tr> +</tbody></table> +</body> +</html> diff --git a/tests/dda b/tests/dda new file mode 100755 index 0000000000000000000000000000000000000000..83cd8e4e96c287092c519d7b3770bc37c4c04efc --- /dev/null +++ b/tests/dda @@ -0,0 +1,261 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://127.0.0.1/ph/communecter/person/login" /> +<title>dda</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">dda</td></tr> +</thead><tbody> +<tr> + <td>echo</td> + <td>*************** ADD A DISCUSSION ROOM</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#rooms.index.type.cities.id.RE_97414-97421')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>link=Nouvel espace</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=name</td> + <td>javascript{"test discuss room"+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>id=btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=room-container</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=main-title</td> + <td>Discussion</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** ADD A DECISION ROOM</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#rooms.index.type.cities.id.RE_97414-97421')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@id='accordion']/div[2]/div/h4/a/span</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#collapse2 > div.panel-body.hide-on-reduce-menu > a.text-green</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=name</td> + <td>javascript{"test decision room"+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>id=btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=room-container</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=main-title</td> + <td>décider ensemble</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** ADD A PROPOSAL</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=span.hidden-xs</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=blockquote.padding-10 > button.btn.btn-success</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.note-editable</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#ajaxFormEntry</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.note-editable</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=#ajaxFormEntry > div.form-group.nametext > #name</td> + <td>javascript{"test decision proposal "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>runScript</td> + <td>("#editEntryContainer #message").val("test decision proposal content"+Math.floor(Math.random()*111))</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=dateEnd</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#ajaxFormEntry > div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** ADD AN ACTION ROOM</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#rooms.index.type.cities.id.RE_97414-97421')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@id='accordion']/div[3]/div/h4/a/span</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#collapse3 > div.panel-body.hide-on-reduce-menu > a.text-green</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=name</td> + <td>javascript{"test action room"+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>id=btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=room-container</td> + <td></td> +</tr> +<tr> + <td>waitForElementPresent</td> + <td>id=main-title</td> + <td>Actions Réactions</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** ADD AN ACTION</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=span.hidden-xs</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=#ajaxFormAction > div.form-group.nametext > #name</td> + <td>javascript{"test action"+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>css=div.note-editable > p</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.row.bg-white</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=startDate</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#ajaxFormAction > div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/dynForms b/tests/dynForms new file mode 100755 index 0000000000000000000000000000000000000000..93dd30c4e326b732eca15d66991198a0151d117b --- /dev/null +++ b/tests/dynForms @@ -0,0 +1,746 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="http://127.0.0.1/ph/communecter" /> +<title>dynForms</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">dynForms</td></tr> +</thead><tbody> +<tr> + <td>echo</td> + <td>*************** TEST Event Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('event')</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test event "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>id=organizerId</td> + <td>label=Je ne sais pas</td> +</tr> +<tr> + <td>select</td> + <td>id=type</td> + <td>label=Concours</td> +</tr> +<tr> + <td>type</td> + <td>name=startDate</td> + <td>2016/11/10 10:00</td> +</tr> +<tr> + <td>type</td> + <td>name=endDate</td> + <td>2016/11/15 20:00</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Event on Orga Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('event')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test event "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=organizerId</td> + <td>label=tchonk</td> +</tr> +<tr> + <td>select</td> + <td>id=type</td> + <td>label=Concert</td> +</tr> +<tr> + <td>type</td> + <td>name=startDate</td> + <td>2016/11/10 10:00</td> +</tr> +<tr> + <td>type</td> + <td>name=endDate</td> + <td>2016/11/15 20:00</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Event on Project Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('event')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test event "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=organizerId</td> + <td>label=communecter d</td> +</tr> +<tr> + <td>select</td> + <td>name=type</td> + <td>label=Concert</td> +</tr> +<tr> + <td>type</td> + <td>name=startDate</td> + <td>2016/11/10 10:00</td> +</tr> +<tr> + <td>type</td> + <td>name=endDate</td> + <td>2016/11/15 20:00</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST sub Event Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#organization.detail.id.57f533a6f6ca47db6a8b456e')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('event','subEvent')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test event "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=type</td> + <td>label=Concert</td> +</tr> +<tr> + <td>type</td> + <td>name=startDate</td> + <td>2016/11/10 10:00</td> +</tr> +<tr> + <td>type</td> + <td>name=endDate</td> + <td>2016/11/15 20:00</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST sub Project Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#organization.detail.id.57f533a6f6ca47db6a8b456e')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('project','sub')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test project on orga "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST sub POI Form non localisé</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#organization.detail.id.57f533a6f6ca47db6a8b456e')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('poi','subPoi')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test poi sur orga "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=type</td> + <td>label=histoire</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST sub POI Form localisé</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#organization.detail.id.57f533a6f6ca47db6a8b456e')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('poi','subPoi')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test poi sur orga "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=type</td> + <td>label=poubelle</td> +</tr> +<tr> + <td>click</td> + <td>link=Localiser</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=newElement_cp</td> + <td>19120</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST sub POI Form avec url</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>urlCtrl.loadByHash('#organization.detail.id.57f533a6f6ca47db6a8b456e')</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('poi','subPoi')</td> + <td></td> +</tr> +<tr> + <td>waitForPageToLoad</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test poi sur orga "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>name=type</td> + <td>label=histoire</td> +</tr> +<tr> + <td>click</td> + <td>link=options (urls)</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=urls[]</td> + <td>https://www.youtube.com/watch?v=Y7QQS5V3cnI</td> +</tr> +<tr> + <td>click</td> + <td>name=urls[]</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//form[@id='ajaxFormModal']/div[9]/span/div/a</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>xpath=(//input[@name='urls[]'])[2]</td> + <td>url without a link </td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>link=Annuler</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Orga Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('organization')</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test orga "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>select</td> + <td>id=type</td> + <td>label=Association</td> +</tr> +<tr> + <td>select</td> + <td>id=role</td> + <td>label=Administrateur</td> +</tr> +<tr> + <td>click</td> + <td>link=Localiser</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=newElement_cp</td> + <td>19120</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>link=ALTILLAC, 19120</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=newElement_btnValidateAddress</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Invite Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('person')</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test person "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.emailtext > #email</td> + <td>javascript{"person"+Math.floor(Math.random()*111)+"@communecter.org"}</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Project Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('project')</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test project "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>click</td> + <td>link=Localiser</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=newElement_cp</td> + <td>javascript{Math.floor(Math.random()*1111)}</td> +</tr> +<tr> + <td>click</td> + <td>name=newElement_cp</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST Actions Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('action')</td> + <td></td> +</tr> +<tr> + <td>select</td> + <td>id=room</td> + <td>label=kikiki</td> +</tr> +<tr> + <td>type</td> + <td>id=message</td> + <td>description action description action description action description action description action description action description action description action description action description action description action </td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test action "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>type</td> + <td>name=startDate</td> + <td>2016/11/10</td> +</tr> +<tr> + <td>type</td> + <td>name=dateEnd</td> + <td>2016/11/15</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** TEST DEbat Form</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>console.clear()</td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>dyFObj.openForm('entry')</td> + <td></td> +</tr> +<tr> + <td>select</td> + <td>id=survey</td> + <td>label=Culture / Animation</td> +</tr> +<tr> + <td>type</td> + <td>id=message</td> + <td>description proposition description proposition description proposition description proposition description proposition description proposition description proposition description proposition description proposition </td> +</tr> +<tr> + <td>type</td> + <td>css=div.form-group.nametext > #name</td> + <td>javascript{"test proposition "+Math.floor(Math.random()*111)}</td> +</tr> +<tr> + <td>type</td> + <td>name=dateEnd</td> + <td>2016/11/15</td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions > #btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/event b/tests/event new file mode 100755 index 0000000000000000000000000000000000000000..ed6f6ae9d185eabcbab3456273bb45e109f07e7f --- /dev/null +++ b/tests/event @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="https://127.0.0.1:80/" /> +<title>event</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">event</td></tr> +</thead><tbody> +<tr> + <td>click</td> + <td>//button[@onclick="urlCtrl.loadByHash('#event.eventsv');"]</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo </td> + <td>**************** ADD Event</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=eventName</td> + <td>Selenium Event</td> +</tr> +<tr> + <td>click</td> + <td>id=fullStreet</td> + <td></td> +</tr> +<tr> + <td>mouseDown</td> + <td>css=.select2-choice</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result</td> + <td></td> +</tr> +<tr> + <td>mouseUp</td> + <td>css=.select2-result-label:contains('Réunion') </td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=fullStreet</td> + <td>3 rue pente nicole</td> +</tr> +<tr> + <td>type</td> + <td>id=eventDetail</td> + <td>Ceci est une description</td> +</tr> +<tr> + <td>click</td> + <td>xpath=(//button[@type='button'])[12]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@id='newEvent']/div[2]/div/div/form/div/div[3]/div/div/ul/li[8]/a/span</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=postalCode</td> + <td>97421</td> +</tr> +<tr> + <td>runScript</td> + <td>searchCity();</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=labelOrga</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=dontKnow</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>xpath=(//button[@onclick=''])[3]</td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/news b/tests/news new file mode 100755 index 0000000000000000000000000000000000000000..927180a007f1f7f53e40420a7b38f58124f247a3 --- /dev/null +++ b/tests/news @@ -0,0 +1,216 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="https://127.0.0.1:80/" /> +<title>news</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">news</td></tr> +</thead><tbody> +<tr> + <td>click</td> + <td>css=.btn-menu8</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=get_url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=get_url</td> + <td>Bonne nouvelle, bientot la création d'un nouveau commun</td> +</tr> +<tr> + <td>click</td> + <td>id=btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=get_url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=get_url</td> + <td>Nouveau MOAC : https://www.youtube.com/watch?v=DZUF6Ej7GTI</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>getUrlContent();</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.form-actions</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#s2id_tags > ul.select2-choices</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result-label</td> + <td></td> +</tr> +<tr> + <td>clickAt</td> + <td>css=.select2-result-label:contains("commun")</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=btn-submit-form</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>selectWindow</td> + <td>null</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=span.label.text-dark > i.fa.fa-thumbs-up</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=i.fa.fa-comment</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=div.saySomething.padding-5 > input[type="text"]</td> + <td>Exprimez-vous</td> +</tr> +<tr> + <td>type</td> + <td>css=textarea.newComment</td> + <td>Super vidéo</td> +</tr> +<tr> + <td>click</td> + <td>css=span.label.label-info</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>mylog.log("comments----------------", comments);</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=span.label.label-green > i.fa.fa-thumbs-up</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>********* UPDATE COMMENT</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=span.comment-modify.pull-right</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>runScript</td> + <td>var idComment = </td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=commentText5799a77194ef4708057b23db</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=textarea.form-control.input-large</td> + <td>Super vidéo :)</td> +</tr> +<tr> + <td>click</td> + <td>xpath=(//button[@type='submit'])[5]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=i.fa.fa-reply</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=textarea.newComment</td> + <td>Super sujet</td> +</tr> +<tr> + <td>click</td> + <td>css=a.validateComment > span.label.label-info</td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/organization b/tests/organization new file mode 100755 index 0000000000000000000000000000000000000000..19ef97f1fad1192e76b840d6a225390c1f72a78c --- /dev/null +++ b/tests/organization @@ -0,0 +1,361 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="https://127.0.0.1:80/" /> +<title>AddOrga</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">AddOrga</td></tr> +</thead><tbody> +<tr> + <td>click</td> + <td>//button[@onclick="urlCtrl.loadByHash('#organization.addorganizationform');"]</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** ADD A ORGANIZATION ***************</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//div[@id='formNewOrganization']/div/div/label/div</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=organizationName</td> + <td>Selenium Test</td> +</tr> +<tr> + <td>type</td> + <td>id=organizationEmail</td> + <td>selenium@gmail.com</td> +</tr> +<tr> + <td>select</td> + <td>id=role</td> + <td>label=Administrateur</td> +</tr> +<tr> + <td>click</td> + <td>css=option[value="admin"]</td> + <td></td> +</tr> +<tr> + <td>mouseDown</td> + <td>css=.select2-choice</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result</td> + <td></td> +</tr> +<tr> + <td>mouseUp</td> + <td>css=.select2-result-label:contains('Réunion') </td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=fullStreet</td> + <td>3 rue pente nicole</td> +</tr> +<tr> + <td>type</td> + <td>id=description</td> + <td>Ceci est une description</td> +</tr> +<tr> + <td>click</td> + <td>css=#s2id_tagsOrganization > ul.select2-choices</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result-label</td> + <td></td> +</tr> +<tr> + <td>clickAt</td> + <td>css=.select2-result-label:contains("Agriculture")</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=postalCode</td> + <td>97421</td> +</tr> +<tr> + <td>runScript</td> + <td>searchCity();</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=btnSaveNewOrganization</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>echo</td> + <td>*************** UPDATE A ORGANIZATION ***************</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#editFicheInfo > span.hidden-xs</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=type</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=select.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>select</td> + <td>css=select.form-control.input-sm</td> + <td>label=Groupe</td> +</tr> +<tr> + <td>click</td> + <td>css=option[value="Group"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=name</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>Selenium</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.text-dark.lbl-info-details</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=fixe</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>032115487889, 0215478569</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.text-dark.lbl-info-details</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=mobile</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>0215478754</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#contentGeneralInfos > div.row</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=fax</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>023658965656564, 54784564546</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#contentGeneralInfos > div.row</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=email</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#contentGeneralInfos > div.row</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=email</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>selenium@test.com</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.text-dark.lbl-info-details</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=url</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>www.google.fr</td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=div.text-dark.lbl-info-details</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +</tbody></table> +</body> +</html> diff --git a/tests/project b/tests/project new file mode 100755 index 0000000000000000000000000000000000000000..0fe7a3d93992a9a8273ada6fcb7c6c39f2765d3c --- /dev/null +++ b/tests/project @@ -0,0 +1,187 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head profile="http://selenium-ide.openqa.org/profiles/test-case"> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> +<link rel="selenium.base" href="https://127.0.0.1:80/" /> +<title>project</title> +</head> +<body> +<table cellpadding="1" cellspacing="1" border="1"> +<thead> +<tr><td rowspan="1" colspan="3">project</td></tr> +</thead><tbody> +<tr> + <td>click</td> + <td>//button[@onclick="urlCtrl.loadByHash('#project.projectsv');"]</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>name=projectName</td> + <td>Selenium Project</td> +</tr> +<tr> + <td>click</td> + <td>id=fullStreet</td> + <td></td> +</tr> +<tr> + <td>mouseDown</td> + <td>css=.select2-choice</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result</td> + <td></td> +</tr> +<tr> + <td>mouseUp</td> + <td>css=.select2-result-label:contains('Réunion') </td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=fullStreet</td> + <td>3 rue pente nicole</td> +</tr> +<tr> + <td>type</td> + <td>id=description</td> + <td>Ceci est une description</td> +</tr> +<tr> + <td>click</td> + <td>css=#s2id_tagsProject > ul.select2-choices</td> + <td></td> +</tr> +<tr> + <td>waitForVisible</td> + <td>css=.select2-result-label</td> + <td></td> +</tr> +<tr> + <td>clickAt</td> + <td>css=.select2-result-label:contains("Agriculture")</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>id=postalCode</td> + <td>97421</td> +</tr> +<tr> + <td>runScript</td> + <td>searchCity();</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//button[@onclick="$('.form-event').submit();"]</td> + <td></td> +</tr> +<tr> + <td>echo </td> + <td>****** UPDATE</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=#editProjectDetail > span.hidden-xs</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=name</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=input.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>Project Selenium </td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=avancement</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>css=select.form-control.input-sm</td> + <td></td> +</tr> +<tr> + <td>select</td> + <td>css=select.form-control.input-sm</td> + <td>label=idea</td> +</tr> +<tr> + <td>click</td> + <td>css=option[value="idea"]</td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>//button[@type='submit']</td> + <td></td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=licence</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>Licence GPL</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> +<tr> + <td>click</td> + <td>id=url</td> + <td></td> +</tr> +<tr> + <td>type</td> + <td>css=input.form-control.input-sm</td> + <td>www.communecter.org</td> +</tr> +<tr> + <td>break</td> + <td></td> + <td></td> +</tr> + +</tbody></table> +</body> +</html> diff --git a/tests/test.json b/tests/test.json new file mode 100755 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/views/admin/checkcities.php b/views/admin/checkcities.php new file mode 100755 index 0000000000000000000000000000000000000000..d076694f78246ebcdd8a432ee39b4d4f45b0ec33 --- /dev/null +++ b/views/admin/checkcities.php @@ -0,0 +1,198 @@ +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div class="panel-heading text-center border-light"> + <h3 class="panel-title text-red"><i class="fa fa-map-marker"></i> <?php echo Yii::t("common", "SOURCE ADMIN"); ?></h3> + </div> + <div class="panel-body"> + <h4 class="panel-title">Cities mal </h4> + <br/> + <div><span id="nbWarnings"></span></div> + <div class="col-sm-2 col-xs-12" id="divFile"> + <h4 class=" text-dark"> + Fichier (CSV,JSON) : + </h4> + <input type="file" id="fileImport" name="fileImport" accept=".csv,.json,.js,.geojson"> + </div> + <div class="col-xs-12"> + <a href="#" id="btnVerification" class="btn btn-success margin-top-15">Vérification</a> + </div> + <table id="tableEntity" class="col-xs-12"> + <?php + //var_dump($cities); + /*foreach ($cities as $name => $find) { + echo $name."</br>"; + var_dump($find); + }*/ + ?> + </table> + </div> +</div> + +<script type="text/javascript"> + +var file = []; +jQuery(document).ready(function() { + setTitle("Espace administrateur : Import de données","cog"); + //init(); + bindCheck(); +}); + + +function bindCheck(){ + $("#fileImport").change(function(e) { + var ext = $("input#fileImport").val().split(".").pop().toLowerCase(); + //mylog.log("ext", ext, $.inArray(ext, "json")); + if(ext != "csv" && ext != "json" && ext == "js" && ext != "geojson") { + alert('Upload CSV or JSON'); + return false; + } + + if(ext == "csv") { + if (e.target.files != undefined) { + var reader = new FileReader(); + file = []; + reader.onload = function(e) { + //mylog.log("csv : ", e.target.result ); + var csvval=e.target.result.split("\n"); + //mylog.log("csv : ", csvval ); + $.each(csvval, function(key, value){ + var ligne = value.split(";"); + var newLigne = []; + $.each(ligne, function(keyLigne, valueLigne){ + //mylog.log("valueLigne", valueLigne); + if(valueLigne.charAt(0) == '"' && valueLigne.charAt(valueLigne.length-1) == '"'){ + var elt = valueLigne.substr(1,valueLigne.length-2); + newLigne.push(elt); + }else{ + newLigne.push(valueLigne); + } + }); + + file.push(newLigne); + }); + mylog.log("file :", file.length ); + mylog.log("file :", file ); + }; + reader.readAsText(e.target.files.item(0)); + } + } + + return false; + + }); + + + $("#btnVerification").off().on('click', function(e) + { + if($("#chooseCollection").val() == "-1"){ + toastr.error("Vous devez sélectionner une collection"); + return false ; + } + + var fin = false ; + var indexStart = 0 ; + var limit = 25 ; + var indexEnd = limit; + var params = {}; + + while(fin == false){ + subFile = file.slice(indexStart,indexEnd); + mylog.log("subFile", subFile.length); + params["file"] = subFile; + visualisation(params); + indexStart = indexEnd ; + indexEnd = indexEnd + limit; + if(indexStart > file.length) + fin = true ; + } + + + + }); + +} + +function visualisation(params){ + $.ajax({ + url: baseUrl+'/communecter/admin/checkcedex/', + type: 'POST', + dataType: 'json', + data:{ params }, + async : false, + success: function (obj){ + mylog.log('obj', obj); + var ligne = ""; + $.each(obj, function(key, value){ + + ligne += "<tr><td>"+value.cp+"</td><td>"+value.name+"</td><tr>"; + }); + + $("#tableEntity").html(ligne); + + }, + error: function (error) { + mylog.log('error', error); + } + }); + +} +/*function init(){ + //mylog.log("cities", jQuery.parseJSON(cities)); + + var obj = jQuery.parseJSON(cities) ; + chaine = ""; + mylog.log("obj", obj.length, obj); + $.each(obj, function(key, value){ + var address = transformNominatimUrl(value["alternateName"]); + var addressName = transformNominatimUrl(value["name"]); + mylog.log('--------------------------------------------------------'); + var elt = findGeoposByDataGouv(value["cp"], value["insee"], address, "village"); + + if(elt.length == 0) + elt = findGeoposByDataGouv(value["cp"], value["insee"], address, "town"); + if(elt.length == 0) + elt = findGeoposByDataGouv(value["cp"], value["insee"], address, "city"); + + + mylog.log("RESULT", elt); + if(elt.length == 0){ + chaine += "<tr><td>"+ value["insee"]+" : "+ value["insee"]+" : "+ value["alternateName"]+"</td>"; + chaine += "<td>Introuvable sur DataGouv</td></tr>"; + } + }); + + $("#tableEntity").html(chaine); + +} + +function findGeoposByDataGouv(cp, insee, city, type){ + var elt = {}; + $.ajax({ + url: "//api-adresse.data.gouv.fr/search/?q="+city+"&postcode="+cp+"&citycode="+insee+"&type="+type, + dataType: 'json', + async:false, + complete: function () {}, + success: function (obj){ + //mylog.log('success', type, obj.features); + if(typeof obj.features != "undefined"){ + elt = obj.features ; + } + }, + error: function (error) { + mylog.log('error', error); + } + }); + + return elt ; + +} + +function transformNominatimUrl(str){ + var res = ""; + for(var i = 0; i<str.length; i++){ + res += (str.charAt(i) == " ") ? "+" : str.charAt(i); + } + return res; +}*/ + + +</script> \ No newline at end of file diff --git a/views/admin/checkgeocodage.php b/views/admin/checkgeocodage.php new file mode 100755 index 0000000000000000000000000000000000000000..501a6f7ae232256b53b32668c2fea14354e0510b --- /dev/null +++ b/views/admin/checkgeocodage.php @@ -0,0 +1,89 @@ +<?php +$userId = Yii::app()->session["userId"] ; + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div> + <div class="panel-heading text-center border-light"> + <h3 class="panel-title text-red"><i class="fa fa-map-marker"></i> <?php echo Yii::t("common", "CHECKGEOCODAGE"); ?></h3> + </div> + <div class="panel-body"> + <div class="col-xs-12"> + <a href="#" class="btn btn-primary" id="btnCheckGeo"> Récupérer les entités qui sont mal géolocaliser</a> + </div> + <div class="col-xs-12"> + Process : <br/> + - On vérifie si l'entité a une adresse, si il en a une, on vérifie si l'entité a un code postal et un code INSEE : <br/> + - Si il n'y en pas alors on retourne avec l'erreur : "Code INSEE ou code postal absent".<br/> + - Sinon on test si il y a une géolocalisation :<br/> + - Si il n'y en pas alors on retourne avec l'erreur : "Pas de géolocalisation"<br/> + - Intérrogation du SIG avec la lat/lon/cp : <br/> + - Si aucune commune , on affiche un message d'erreur : "Mal<br/> + - On test si le code INSEE de la commune et celui de l'entité sont identiques <br/> + </div> + </div> + </div> + + + <div id="divCheckEvents"> + <div class="panel-heading border-light"> + <h4 class="panel-title">Entité mal géolocalisé</h4> + </div> + <div class="panel-body"> + <table id="tableEntity" class="col-xs-12"> + + + </table> + </div> + </div> +</div> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + setTitle("Espace administrateur : Entités mal géolocalisé","cog"); + + bindCheckGeo(); +}); + +function bindCheckGeo(){ + $("#btnCheckGeo").off().on('click', function(e){ + rand = Math.floor((Math.random() * 8) + 1); + $.blockUI({message : '<div class="title-processing homestead"><i class="fa fa-spinner fa-spin"></i> Processing... </div>' + +'<a class="thumb-info" href="'+proverbs[rand]+'" data-title="Proverbs, Culture, Art, Thoughts" data-lightbox="all">' + + '<img src="'+proverbs[rand]+'" style="border:0px solid #666; border-radius:3px;"/></a><br/><br/>' + }); + $.ajax({ + type: 'POST', + url: baseUrl+'/communecter/admin/getentitybadlygeolocalited/', + dataType : 'json', + success: function(data) + { + mylog.log("data",data); + textHTML = "<tr><th>Type</th><th>Entité</th><th>Msg Error</th></tr>"; + $.each(data, function(typeEntity, listEntity){ + $.each(listEntity, function(key, entity){ + textHTML += "<tr>"+ + "<td>"+typeEntity+"</td>"+ + "<td>"+ + '<a href="#'+typeEntity+'.detail.id.'+entity["id"]+'" class="lbh"> '+ + entity["name"]+ "</a></td>"+ + "<td>"+entity["error"]+"</td>"+ + "</tr>"; + }); + }); + $("#tableEntity").html(textHTML); + $.unblockUI(); + } + }); + }); + + +} + +</script> \ No newline at end of file diff --git a/views/admin/cities.php b/views/admin/cities.php new file mode 100755 index 0000000000000000000000000000000000000000..2f378931ab865647317ef8cb29d8b6b52d123bce --- /dev/null +++ b/views/admin/cities.php @@ -0,0 +1,312 @@ +<?php +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); +echo CHtml::cssFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/css/DT_bootstrap.css'); +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/DT_bootstrap.js'); + +?> + +<div class="panel panel-white"> + <div class="panel-heading border-light col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <h4 class="panel-title"> + <a href="javascript:;" onclick="applyStateFilter('goods')" class="filtergood btn btn-xs btn-default"><i class="fa fa-check fa-1x text-success"></i>Goods <span class="badge badge-warning"> <?php echo count(@$goods) ?></span></a> + + <a href="javascript:;" onclick="applyStateFilter('errors')" class="filtererror btn btn-xs btn-default"><i class="fa fa-close fa-1x text-danger"></i> Errors <span class="badge badge-warning"><?php echo count(@$errors) ?></span></a> + + <a href="javascript:;" onclick="applyStateFilter('news')" class="filtererror btn btn-xs btn-default"><i class="fa fa-warning fa-1x text-warning"></i> News <span class="badge badge-warning"> <?php echo count(@$news) ?></span></a> + + <a href="javascript:;" onclick="clearAllFilters('')" class="btn btn-xs btn-default"><i class="fa fa-university fa-1x text-primary"></i> All</a></h4> + </div> + <div class="panel-tools"> + <a href="javascript:;" onclick="openSubView('Add an city', '/'+moduleId+'/organization/addorganizationform',null)" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Add an city"><i class="fa fa-plus"></i> <i class="fa fa-group"></i> </a> + </div> + <div class="panel-body"> + <div> + <table class="table table-striped table-bordered table-hover directoryTable"> + <thead> + <tr> + <th>Type</th> + <th>Name</th> + <th>Département</th> + <th>Région</th> + <th>Pays</th> + <th>Errors</th> + <th>Action</th> + </tr> + </thead> + <tbody class="directoryLines"> + <?php + $memberId = Yii::app()->session["userId"]; + $memberType = Person::COLLECTION; + $tags = array(); + $scopes = array( + "codeInsee"=>array(), + "codePostal"=>array(), + "region"=>array(), + ); + + if(isset($goods)) + { + foreach ($goods as $e) + { + buildDirectoryLine($e, City::COLLECTION, City::CONTROLLER, City::ICON, $this->module->id,$tags,$scopes, "goods"); + }; + } + + if(isset($errors)) + { + foreach ($errors as $e) + { + buildDirectoryLine($e, City::COLLECTION, City::CONTROLLER, City::ICON, $this->module->id,$tags,$scopes, "errors"); + } + } + + if(isset($news)) + { + foreach ($news as $e) + { + buildDirectoryLine($e, City::COLLECTION, City::CONTROLLER, City::ICON, $this->module->id,$tags,$scopes, "news"); + } + } + + + + function buildDirectoryLine( $e, $collection, $type, $icon, $moduleId, &$tags, &$scopes, $goodsOrNot ){ + + if(!isset( $e['_id'] ) || !isset( $e["name"]) || $e["name"] == "" ) + return; + $actions = ""; + $classes = ""; + $id = @$e['_id']; + + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ){ + $actions .= '<li>'. + '<a href="javascript:;" onclick="updateCities(\''.$id.'\', \''.$goodsOrNot.'\');" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 validateThisBtn">'. + '<span class="fa-stack">'. + '<i class="fa fa-university fa-stack-1x"></i>'. + '<i class="fa fa-pencil fa-stack-1x stack-right-bottom text-danger"></i>'. + '</span> Update '. + '</a>'. + '</li>'; + $actions .= '<li>'. + '<a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 validateThisBtn">'. + '<span class="fa-stack">'. + '<i class="fa fa-university fa-stack-1x"></i>'. + '<i class="fa fa-trash fa-stack-1x stack-right-bottom text-danger"></i>'. + '</span> Delete '. + '</a>'. + '</li>'; + } + + /* ************************************** + * TYPE + ICON + ***************************************** */ + $strHTML = '<tr id="'.(string)$id.'">' ; + $strHTML = '<td class="'.$collection.'Line '.$classes.'">'; + $strHTML .= '<span class="fa-stack"><i class="fa '.$icon.' fa-stack-2x"></i>'; + if($goodsOrNot == "goods") + $strHTML .= '<i class="fa fa-check fa-stack-2x stack-right-bottom text-success"></i>'; + else if($goodsOrNot == "errors") + $strHTML .= '<i class="fa fa-close fa-stack-2x stack-right-bottom text-danger"></i>'; + else if($goodsOrNot == "news") + $strHTML .= '<i class="fa fa-warning fa-stack-2x stack-right-bottom text-warning"></i>'; + $strHTML .= '</span><span class="hidden">'.$goodsOrNot.'</span>'; + $strHTML .= '</td>'; + + /* ************************************** + * NAME + ***************************************** */ + $strHTML .= '<td><a href="'.Yii::app()->createUrl('/'.$moduleId.'/'.$type.'/dashboard/id/'.$id).'">'.((isset($e["name"]))? $e["name"]:"").'</a></td>'; + + /* ************************************** + * EMAIL for admin use only + ***************************************** */ + $strHTML .= '<td>'.((isset($e["depName"]))? $e["depName"]:"").'</td>'; + $strHTML .= '<td>'.((isset($e["regionName"]))? $e["regionName"]:"").'</td>'; + $strHTML .= '<td>'.((isset($e["country"]))? $e["country"]:"").'</td>'; + $strHTML .= '<td>'.((isset($e["msgErrors"]))? $e["msgErrors"]:"").'</td>'; + + /* ************************************** + * ACTIONS + ***************************************** */ + $strHTML .= '<td class="center">'; + if( !empty($actions) && Yii::app()->session["userIsAdmin"] ){ + $strHTML .= '<div class="btn-group">'. + '<a href="#" data-toggle="dropdown" class="btn btn-red dropdown-toggle btn-sm"><i class="fa fa-cog"></i> <span class="caret"></span></a>'. + '<ul class="dropdown-menu pull-right dropdown-dark" role="menu">'. + $actions. + '</ul></div>'; + + } + $strHTML .= '</td>'; + $strHTML .= '</tr>'; + echo $strHTML ; + } + ?> + + </tbody> + </table> + + + <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px; width: 0px; display: none;"><div class="ps-scrollbar-x" style="left: -10px; width: 0px;"></div></div><div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 230px; display: inherit;"><div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div></div> + + </div> + </div> +</div> +<script type="text/javascript"> +var openingFilter = "<?php echo ( isset($_GET['type']) ) ? $_GET['type'] : '' ?>"; +var goods = <?php echo ( isset($goods) ) ? json_encode($goods) : '' ?>; +var errors = <?php echo ( isset($errors) ) ? json_encode($errors) : '' ?>; +var news = <?php echo ( isset($news) ) ? json_encode($news) : '' ?>; +var directoryTable = null; +/*var contextMap = { + "tags" : <?php echo json_encode($tags) ?>, + "scopes" : <?php echo json_encode($scopes) ?>, +};*/ + +jQuery(document).ready(function() { + setTitle("Espace administrateur : Répertoire","cog"); + bindAdminBtnEvents(); + resetDirectoryTable(); + if(openingFilter != "") + $('.filter'+openingFilter).trigger("click"); +}); + +function resetDirectoryTable() +{ + mylog.log("resetDirectoryTable"); + + if( !$('.directoryTable').hasClass("dataTable") ) + { + directoryTable = $('.directoryTable').dataTable({ + "aoColumnDefs" : [{ + "aTargets" : [0] + }], + "oLanguage" : { + "sLengthMenu" : "Show _MENU_ Rows", + "sSearch" : "", + "oPaginate" : { + "sPrevious" : "", + "sNext" : "" + } + }, + "aaSorting" : [[1, 'asc']], + "aLengthMenu" : [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"] // change per page values here + ], + // set the initial value + "iDisplayLength" : 10, + }); + } + else + { + if( $(".directoryLines").children('tr').length > 0 ) + { + directoryTable.dataTable().fnDestroy(); + directoryTable.dataTable().fnDraw(); + } else { + mylog.log(" directoryTable fnClearTable"); + directoryTable.dataTable().fnClearTable(); + } + } +} + +function applyStateFilter(str) +{ + mylog.log("applyStateFilter",str); + directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); +} +function clearAllFilters(str){ + directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); +} +function applyTagFilter(str) +{ + mylog.log("applyTagFilter",str); + if(!str){ + str = ""; + sep = ""; + $.each($(".btn-tag.active"), function() { + mylog.log("applyTagFilter",$(this).data("id")); + str += sep+$(this).data("id"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyTagFilter",str); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function applyScopeFilter(str) +{ + //mylog.log("applyScopeFilter",$(".btn-context-scope.active").length); + if(!str){ + str = ""; + sep = ""; + $.each( $(".btn-context-scope.active"), function() { + mylog.log("applyScopeFilter",$(this).data("val")); + str += sep+$(this).data("val"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyScopeFilter",str); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function bindAdminBtnEvents(){ + mylog.log("bindAdminBtnEvents"); + +} + + +function updateCities(id, goodsOrNot) { + var city = {}; + if(goodsOrNot == "goods") + city = generateDataForDynForm(goods[id]); + else + city = generateDataForDynForm(errors[id]); + + openForm ('cities', null, city); +} + +function generateDataForDynForm(city) { + mylog.log("city", city); + var data = { + id : city._id.$id, + name : city.name, + alternateName : city.alternateName, + insee : city.insee, + country : city.country, + dep : city.dep, + depName : city.depName, + region : city.region, + regionName : city.regionName, + osmId : city.osmId, + wikidataId : city.wikidataId, + latitude : city.geo.latitude, + longitude : city.geo.longitude, + geoShape : city.geoShape, + postalCodes : [] + }; + + $.each(city.postalCodes,function(key,pc){ + mylog.log("city.postalCodes"); + console.dir(pc); + var newPC = { + postalCode : pc.postalCode, + name : pc.name, + latitude : pc.geo.latitude, + longitude : pc.geo.longitude, + } + data.postalCodes.push(newPC); + }); + mylog.log("data", data); + return data ; +} + +</script> \ No newline at end of file diff --git a/views/admin/directoryTable.php b/views/admin/directoryTable.php new file mode 100644 index 0000000000000000000000000000000000000000..3bfe92cadbc0fb94cc5d29ad40211fc5b2aa0774 --- /dev/null +++ b/views/admin/directoryTable.php @@ -0,0 +1,736 @@ +<?php +//echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); +//echo CHtml::cssFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/css/DT_bootstrap.css'); +//echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/DT_bootstrap.js'); +$cssAnsScriptFilesModule = array( + '/plugins/jquery-simplePagination/jquery.simplePagination.js', + '/plugins/jquery-simplePagination/simplePagination.css' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->getRequest()->getBaseUrl(true)); +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +/*$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") );*/ +?> +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12"> + <h3>Search by name :</h3><br/> + <div id="" class="col-sm-3 col-md-4 col-lg-4"> + <input type="text" class="form-control" id="input-search-table" + placeholder="search by name"> + </div> + <button class="btn btn-default hidden-xs pull-left menu-btn-start-search-admin btn-directory-type"> + <i class="fa fa-search"></i> + </button> + </div> + <div class="panel-heading border-light"> + <h4 class="panel-title"><i class="fa fa-globe fa-2x text-green"></i> Filtered by types : </h4> + <?php foreach ($typeDirectory as $value) { ?> + <a href="javascript:;" onclick="applyStateFilter('<?php echo $value ?>')" class="filter<?php echo $value ?> btn btn-xs btn-default active btncountsearch"> <?php echo $value ?> <span class="badge badge-warning countPeople" id="count<?php echo $value ?>"> <?php echo @$results["count"][$value] ?></span></a> + <?php } ?> + <!--<a href="javascript:;" onclick="applyStateFilter('<?php echo Person::COLLECTION ?>')" class="filter<?php echo Person::COLLECTION ?> btn btn-xs btn-default active btncountsearch"> People <span class="badge badge-warning countPeople" id="countcitoyens"> <?php echo @$results["count"]["citoyens"] ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('<?php echo Organization::COLLECTION ?>')" class="filter<?php echo Organization::COLLECTION ?> btn btn-xs btn-default btncountsearch"> Organizations <span class="badge badge-warning countOrganizations" id="countorganizations"> <?php echo @$results["count"]["organizations"] ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('<?php echo Event::COLLECTION ?>')" class="filter<?php echo Event::COLLECTION ?> btn btn-xs btn-default btncountsearch"> Events <span class="badge badge-warning countEvents" id="countevents"> <?php echo @$results["count"]["events"] ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('<?php echo Project::COLLECTION ?>')" class="filter<?php echo Project::COLLECTION ?> btn btn-xs btn-default btncountsearch"> Projects <span class="badge badge-warning countProjects" id="countprojects"> <?php echo @$results["count"]["projects"] ?></span></a> + <a href="javascript:;" onclick="clearAllFilters('')" class="btn btn-xs btn-default"> All</a></h4>--> + </div> + <!--<div class="panel-tools padding-20"> + <?php if( Yii::app()->session["userId"] ) { ?> + <a href="javascript:;" onclick="dyFObj.openForm('organization')" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Add an Organization"><i class="fa fa-plus"></i> <i class="fa fa-group"></i> </a> + + <a href="javascript:;" onclick="dyFObj.openForm('event')" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Add an Event"><i class="fa fa-plus"></i> <i class="fa fa-calendar"></i></a> + + <a href="javascript:;" onclick="dyFObj.openForm('person')" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Invite Someone "><i class="fa fa-plus"></i> <i class="fa fa-user"></i></a> + <?php } ?> + </div>--> + <div class="pageTable col-md-12 col-sm-12 col-xs-12 padding-20"></div> + <div class="panel-body"> + <div> + <?php //var_dump($projects) ?> + <table class="table table-striped table-bordered table-hover directoryTable" id="panelAdmin"> + <thead> + <tr> + <th>Type</th> + <th>Name</th> + <?php //if( Yii::app()->session[ "userIsAdmin"] && Yii::app()->controller->id == "admin" ){?> + <th>Email</th> + <?php //} ?> + <th>Tags</th> + <th>Scope</th> + <th>Status</th> + <th>Actions</th> + </tr> + </thead> + <tbody class="directoryLines"> + <?php + $memberId = Yii::app()->session["userId"]; + $memberType = Person::COLLECTION; + $tags = array(); + $scopes = array( + "codeInsee"=>array(), + "codePostal"=>array(), + "region"=>array(), + ); + + /* ************ ORGANIZATIONS ********************** */ + /*if(isset($organizations)) + { + foreach ($organizations as $e) + { + buildDirectoryLine($e, Organization::COLLECTION, Organization::CONTROLLER, Organization::ICON, $this->module->id,$tags,$scopes); + }; + } + + /* ********** PEOPLE ****************** + if(isset($people)) + { + foreach ($people as $e) + { + buildDirectoryLine($e, Person::COLLECTION, Person::CONTROLLER, Person::ICON, $this->module->id,$tags,$scopes); + } + } + + /* ************ EVENTS ************************ + if(isset($events)) + { + foreach ($events as $e) + { + buildDirectoryLine($e, Event::COLLECTION, Event::CONTROLLER, Event::ICON, $this->module->id,$tags,$scopes); + } + } + + /* ************ PROJECTS **************** + if( count($projects) ) + { + foreach ($projects as $e) + { + buildDirectoryLine($e, Project::COLLECTION, Project::CONTROLLER, Project::ICON, $this->module->id,$tags,$scopes); + } + }*/ + + ?> + </tbody> + </table> + <?php + /*if (isset($organizations) && count($organizations) == 0) { + ?> + <div id="infoPodOrga" class="padding-10"> + <blockquote> + Create or Connect + <br>an Organization, NGO, + <br>Local Business, Informal Group. + <br>Build links in your network, + <br>to create a connected local directory + </blockquote> + </div> + <?php + };*/ + ?> + </div> + </div> + <div class="pageTable col-md-12 col-sm-12 col-xs-12 padding-20"></div> +</div> +<script type="text/javascript"> +var openingFilter = "<?php echo ( isset($_GET['type']) ) ? $_GET['type'] : '' ?>"; +var directoryTable = null; +var contextMap = { + "tags" : <?php echo json_encode($tags) ?>, + "scopes" : <?php echo json_encode($scopes) ?>, +}; +var results = <?php echo json_encode($results) ?>; +var initType = <?php echo json_encode($typeDirectory) ?>; +var betaTest= "<?php echo @Yii::app()->params['betaTest'] ?>"; +var icons = { + organizations : "fa-group", + projects : "fa-lightbulb-o", + events : "fa-calendar", + citoyens : "fa-user", + services : "fa-sun-o", +}; +var search={ + value:"", + page:"", + type:initType[0] +}; +jQuery(document).ready(function() { + setTitle("Espace administrateur : Répertoire","cog"); + initKInterface(); + initViewTable(results); + if(openingFilter != "") + $('.filter'+openingFilter).trigger("click"); + $("#input-search-table").keyup(function(e){ + //$("#second-search-bar").val($("#input-search-map").val()); + //$("#main-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + search.page=0; + search.value = $(this).val(); + startAdminSearch(true); + } + }); + initPageTable(results.count.citoyens); + +}); +function initPageTable(number){ + numberPage=(number/100); + $('.pageTable').pagination({ + items: numberPage, + itemOnPage: 15, + currentPage: 1, + hrefTextPrefix:"?page=", + cssStyle: 'light-theme', + //prevText: '<span aria-hidden="true">«</span>', + //nextText: '<span aria-hidden="true">»</span>', + onInit: function () { + // fire first page loading + }, + onPageClick: function (page, evt) { + // some code + //alert(page); + search.page=(page-1); + startAdminSearch(); + } + }); +} +function initViewTable(data){ + $('#panelAdmin .directoryLines').html(""); + //showLoader('#panelAdmin .directoryLines'); + console.log("valuesInit",data); + $.each(data,function(type,list){ + $.each(list, function(key, values){ + entry=buildDirectoryLine( values, type, type, icons[type]); + $("#panelAdmin .directoryLines").append(entry); + }); + }); + bindAdminBtnEvents(); + //resetDirectoryTable() ; +} +function refreshCountBadge(count){ + $.each(count, function(e,v){ + $("#count"+e).text(v); + }); +} +function startAdminSearch(initPage){ + + //$("#second-search-bar").val(search); + $('#panelAdmin .directoryLines').html("Recherche en cours. Merci de patienter quelques instants..."); + + /*var params = { + search:search, + status:status, + orderBy:"url" + };*/ + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/admin/directory/tpl/json", + data: search, + dataType: "json", + success:function(data) { + initViewTable(data.results); + bindAdminBtnEvents(); + if(typeof data.results.count !="undefined") + refreshCountBadge(data.results.count); + console.log(data.results); + if(initPage) + initPageTable(data.results.count[search.type]); + }, + error:function(xhr, status, error){ + $("#searchResults").html("erreur"); + }, + statusCode:{ + 404: function(){ + $("#searchResults").html("not found"); + } + } + }); +} +function buildDirectoryLine( e, collection, type, icon/* tags, scopes*/ ){ + strHTML=""; + if(typeof e._id =="undefined" || typeof e.name == "undefined" || e.name == "" ) + return strHTML; + actions = ""; + classes = ""; + id = e._id.$id; + var status=[]; + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if(userId != "" + && typeof userConnected.roles != "undefined" + && typeof userConnected.roles.superAdmin != "undefined" + && userConnected.roles.superAdmin){ + if(type == "<?php echo Person::COLLECTION ?>"){ + //Activated + if( typeof e.roles != "undefined" && typeof e.roles.tobeactivated != "undefined" ) + { + classes += "tobeactivated"; + status.push({"key":"tobeactivated","label":"To be activated"}); + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 activatedUserBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-2x stack-right-bottom text-danger"></i></span> Validate </a></li>'; + } + //Beta Test + if (betaTest) { + if( typeof e.roles != "undefined" && typeof e.roles.betaTester != "undefined" ) { + classes += "betaTester"; + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 revokeBetaTesterBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Revoke this beta tester </a></li>'; + } else { + $actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 addBetaTesterBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Add this beta tester </a></li>'; + } + } + //Super Admin + if( typeof e.roles != "undefined" && typeof e.roles.superAdmin != "undefined" ) { + classes += "superAdmin"; + status.push({"key":"superAdmin", "label":"Super admin"}); + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 revokeSuperAdminBtn"><span class="fa-stack"><i class="fa fa-user-plus fa-stack-1x"></i><i class="fa fa-times fa-stack-2x stack-right-bottom text-danger"></i></span> Revoke this super admin </a></li>'; + } else { + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 addSuperAdminBtn"><span class="fa-stack"><i class="fa fa-user-plus fa-stack-1x"></i><i class="fa fa-check fa-stack-2x stack-right-bottom text-danger"></i></span> Add this super admin </a></li>'; + } + if( typeof e.roles != "undefined" && typeof e.roles.isBanned != "undefined" ) { + status.push({"key":"isBanned","label":"Banned user"}); + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 unbanUserBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-stack-2x fa-check text-red"></i></span> Unban this user</a> </li>'; + }else{ + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 banUserBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-stack-2x fa-ban stack-right-bottom text-danger"></i></span> Ban this user</a> </li>'; + } + actions += '<li><a href="javascript:;" data-id="'+id+'" class="margin-right-5 switch2UserThisBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-eye fa-stack-2x stack-right-bottom text-danger"></i></span> Switch to this user</a> </li>'; + + } + if(typeof e.tobevalidated != "undefined"){ + status.push({"key":"toBeValidated","label":"To be validated"}); + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 validateThisBtn"><i class="fa fa-ban text-red"></i> Validate '+type+'</a> </li>'; + } + actions += '<li><a href="javascript:;" data-id="'+id+'" data-type="'+type+'" class="margin-right-5 deleteThisBtn"><i class="fa fa-trash text-red"></i>Delete</a> </li>'; + //TODO + + // else if( type == "<?php echo Organization::COLLECTION ?>" ) { + + //} + } + + /* ************************************** + * TYPE + ICON + ***************************************** */ + strHTML += '<tr id="'+type+id+'">'+ + '<td class="'+collection+'Line '+classes+'">'+ + '<a href="#page.type.'+type+'.id.'+id+'" class="lbh" target="_blank">'; + if (e && typeof e.profilThumbImageUrl != "undefined" && e.profilThumbImageUrl!="") + strHTML += '<img width="50" height="50" alt="image" class="img-circle" src="'+baseUrl+e.profilThumbImageUrl+'">'+e.type; + else + strHTML += '<i class="fa '+icon+' fa-2x"></i> '+type; + strHTML += '</a>'; + strHTML += '</td>'; + + /* ************************************** + * NAME + ***************************************** */ + strHTML += '<td><a href="#page.type.'+type+'.id.'+id+'" class="lbh" target="_blank">'+e.name+'</a></td>'; + + /* ************************************** + * EMAIL for admin use only + ***************************************** */ + strHTML += '<td>'+e.email+'</td>'; + + /* ************************************** + * TAGS + ***************************************** */ + strHTML += '<td>'; + if(typeof e.tags != "undefined"){ + $.each(e.tags, function(key,value){ + strHTML += ' <a href="javascript:;" onclick="applyTagFilter(\''+value+'\')"><span class="label label-inverse text-red">'+value+'</span></a>'; + //if( tags != "" && !in_array($value, tags) ) + // array_push($tags, $value); + }); + } + strHTML += '</td>'; + + /* ************************************** + * SCOPES + ***************************************** */ + strHTML += '<td>'; + /*if( typeof e.address != "undefined" && isset( $e["address"]['codeInsee']) ){ + $strHTML .= ' <a href="#" onclick="applyScopeFilter('.$e["address"]['codeInsee'].')"><span class="label label-inverse">'.$e["address"]['codeInsee'].'</span></a>'; + if( !in_array($e["address"]['codeInsee'], $scopes['codeInsee']) ) + array_push($scopes['codeInsee'], $e["address"]['codeInsee'] ); + }*/ + if( typeof e.address != "undefined"){ + if(typeof e.address.streetAddress != "undefined" ){ + strHTML += ' <a href="javascript:;" onclick="applyScopeFilter('+e.address.streetAddress+')" class="letter-blue"><span class="">'+e.address.streetAddress+'</span></a><br/>'; + //if( !in_array($e["address"]['codePostal'], $scopes['codePostal']) ) + // array_push($scopes['codePostal'], $e["address"]['codePostal'] ); + } + if(typeof e.address.postalCode != "undefined" ){ + strHTML += ' <a href="javascript:;" onclick="applyScopeFilter('+e.address.postalCode+')" class="letter-blue"><span class="">'+e.address.postalCode+'</span></a>'; + //if( !in_array($e["address"]['codePostal'], $scopes['codePostal']) ) + // array_push($scopes['codePostal'], $e["address"]['codePostal'] ); + } + if(typeof e.address.addressLocality != "undefined"){ + strHTML += ' <a href="javascript:;" onclick="applyScopeFilter('+e.address.addressLocality+')" class="letter-blue"><span class="">'+e.address.addressLocality+'</span></a><br/>'; + } + if(typeof e.address.level1Name){ + strHTML += '<a href="javascript:;" onclick="applyScopeFilter('+e.address.level1Name+')" class="letter-blue"><span class="">'+e.address.level1Name+'</span></a><br/>'; + //if( !in_array($e["address"]['region'], $scopes['region']) ) + // array_push($scopes['region'], $e["address"]['region'] ); + } + if(typeof e.address.addressCountry){ + strHTML += '<a href="javascript:;" onclick="applyScopeFilter('+e.address.addressCountry+')" class="letter-blue"><span class="">'+e.address.addressCountry+'</span></a><br/>'; + //if( !in_array($e["address"]['region'], $scopes['region']) ) + // array_push($scopes['region'], $e["address"]['region'] ); + } + } + strHTML += '</td>'; + strHTML += '<td class="center status">'; + console.log(status); + if(notEmpty(status)){ + $.each(status,function(e,v){ + strHTML+="<span class='badge bg-primary "+v.key+"'>"+v.label+"</span>"; + }); + }else{ + strHTML += "No status"; + } + strHTML += '</td>'; + /* ************************************** + * ACTIONS + ***************************************** */ + strHTML += '<td class="center">'; + if( actions != "" ){ + strHTML += '<div class="btn-group">'+ + '<a href="#" data-toggle="dropdown" class="btn btn-danger dropdown-toggle btn-sm"><i class="fa fa-cog"></i> <span class="caret"></span></a>'+ + '<ul class="dropdown-menu pull-right dropdown-dark" role="menu">'+ + actions+ + '</ul></div>'; + } + strHTML += '</td>'; + + strHTML += '</tr>'; + return strHTML; +} + +function resetDirectoryTable() +{ + /*mylog.log("resetDirectoryTable"); + + if( !$('.directoryTable').hasClass("dataTable") ) + { + directoryTable = $('.directoryTable').dataTable({ + "aoColumnDefs" : [{ + "aTargets" : [0] + }], + "oLanguage" : { + "sLengthMenu" : "Show _MENU_ Rows", + "sSearch" : "", + "oPaginate" : { + "sPrevious" : "", + "sNext" : "" + } + }, + "aaSorting" : [[1, 'asc']], + "aLengthMenu" : [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"] // change per page values here + ], + // set the initial value + "iDisplayLength" : 10, + }); + } + else + { + if( $(".directoryLines").children('tr').length > 0 ) + { + directoryTable.dataTable().fnDestroy(); + directoryTable.dataTable().fnDraw(); + } else { + mylog.log(" directoryTable fnClearTable"); + directoryTable.dataTable().fnClearTable(); + } + }*/ +} + +function applyStateFilter(str) +{ + //mylog.log("applyStateFilter",str); + search.type=str; + search.page=0; + $(".btncountsearch").removeClass("active"); + $(".filter"+str).addClass("active"); + startAdminSearch(true); + //directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); +} +function clearAllFilters(str){ + directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); +} +function applyTagFilter(str) +{ + mylog.log("applyTagFilter",str); + if(!str){ + str = ""; + sep = ""; + $.each($(".btn-tag.active"), function() { + mylog.log("applyTagFilter",$(this).data("id")); + str += sep+$(this).data("id"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyTagFilter",str); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function applyScopeFilter(str) +{ + //mylog.log("applyScopeFilter",$(".btn-context-scope.active").length); + if(!str){ + str = ""; + sep = ""; + $.each( $(".btn-context-scope.active"), function() { + mylog.log("applyScopeFilter",$(this).data("val")); + str += sep+$(this).data("val"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyScopeFilter",str); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function bindAdminBtnEvents(){ + mylog.log("bindAdminBtnEvents"); + + <?php + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ) { ?> + + $(".activatedUserBtn").off().on("click",function () + { + mylog.log("validateThisBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/activateuser/user/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) + { + if ( data && data.result ) { + toastr.info("Activated User!!"); + btnClick.parents().eq(2).find(".status .tobeactivated").remove(); + btnClick.empty().html('<i class="fa fa-thumbs-up"></i>'); + + } else { + toastr.info("something went wrong!! please try again."); + } + }); + + }); + + }); + + $(".addBetaTesterBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "addBetaTester"); + } + }); + }); + + $(".revokeBetaTesterBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "revokeBetaTester") + } + }); + }); + + $(".addSuperAdminBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "addSuperAdmin"); + } + }); + }); + + $(".revokeSuperAdminBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "revokeSuperAdmin") + } + }); + }); + + + $(".switch2UserThisBtn").off().on("click",function () + { + mylog.log("A FAIRE : switch2UserThisBtn click"); + //$(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/switchto/uid/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) + { + if ( data && data.result ) { + toastr.info("Switched user!!"); + location.hash='#page.type.citoyens.id.'+data.id; + window.location.reload(); + //window.location.href = baseUrl+"/"+moduleId; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + }); + + }); + + $(".deleteThisBtn").off().on("click",function () + { + mylog.log("deleteThisBtn click"); + /*$(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/delete/type/"+type+"/id/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.info("User has been deleted"); + $("#"+type+id).remove(); + //window.location.href = ""; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + });*/ + + }); + + <?php } ?> + + $(".banUserBtn").off().on("click",function (){ + mylog.log("banThisBtn click"); + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "addBannedUser"); + } + }); + }); + $(".unbanUserBtn").off().on("click",function (){ + mylog.log("banThisBtn click"); + var btnClick = $(this); + bootbox.confirm("confirm to accept this user again !!", function(result) { + if (result) { + changeRole(btnClick, "revokeBannedUser"); + } + }); + }); +} + +function changeRole(button, action) { + mylog.log(button," click"); + //$(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var params ={ + type:button.data("type"), + id:button.data("id"), + action:action + } + var urlToSend = baseUrl+"/"+moduleId+"/element/updatestatus"; + var res = false; + + $.ajax({ + type: "POST", + url: urlToSend, + data: params, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.success("Change has been done !!"); + changeButtonName(button, action); + bindAdminBtnEvents(); + } else { + toastr.error("Something went wrong!! please try again. " + data.msg); + } + }); +} + +function changeButtonName(button, action) { + mylog.log(action); + var icon = '<span class="fa-stack"> <i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-2x stack-right-bottom text-danger"></i></span>'; + if (action=="addBetaTester") { + button.removeClass("addBetaTesterBtn"); + button.addClass("revokeBetaTesterBtn"); + button.html(icon+" Revoke this beta tester"); + } else if (action=="revokeBetaTester") { + button.removeClass("revokeBetaTesterBtn"); + button.addClass("addBetaTesterBtn"); + button.html(icon+" Add this beta tester"); + } else if (action=="addSuperAdmin") { + button.removeClass("addSuperAdminBtn"); + button.addClass("revokeSuperAdminBtn"); + button.parents().eq(4).find(".status").append("<span class='badge bg-primary superAdmin'>Super Admin</span>"); + button.html('<span class="fa-stack"> <i class="fa fa-user-plus fa-stack-1x"></i><i class="fa fa-times fa-stack-2x stack-right-bottom text-danger"></i></span>'+" Revoke this super admin"); + } else if (action=="revokeSuperAdmin") { + button.removeClass("revokeSuperAdminBtn"); + button.addClass("addSuperAdminBtn"); + button.parents().eq(4).find(".status .superAdmin").remove(); + button.html(icon+" Add this super admin"); + } else if (action=="addBannedUser") { + button.removeClass("banUserBtn"); + button.addClass("unbanUserBtn"); + button.parents().eq(4).find(".status").append("<span class='badge bg-primary isBanned'>Is banned</span>"); + button.html(icon+" Unban user"); + }else if (action=="revokeBannedUser") { + button.removeClass("unbanUserBtn"); + button.addClass("banUserBtn"); + button.parents().eq(4).find(".status .isBanned").remove(); + button.html('<span class="fa-stack"> <i class="fa fa-user fa-stack-1x"></i><i class="fa fa-ban fa-stack-2x stack-right-bottom text-danger"></i></span>'+" Ban user"); + } else { + mylog.warn("Unknown action !"); + } +} + +</script> \ No newline at end of file diff --git a/views/admin/index.php b/views/admin/index.php new file mode 100755 index 0000000000000000000000000000000000000000..14dcc80f81305ff729f4c2cb70b0cd5580026582 --- /dev/null +++ b/views/admin/index.php @@ -0,0 +1,115 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> +<!-- start: PAGE CONTENT --> + + +<div class="col-lg-offset-1 col-lg-10 col-xs-12 no-padding" id="content-social" style="min-height:700px;"> + <div class=""> + <ul class="list-group text-left no-margin"> + <?php if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )) { ?> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-yellow" style="cursor:pointer;" href="#admin.directory"> + <i class="fa fa-user fa-2x"></i> + <?php echo Yii::t("admin", "DIRECTORY", null, Yii::app()->controller->module->id); ?> + </a> + </li> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-purple" style="cursor:pointer;" href="#adminpublic.createfile"> + <i class="fa fa-upload fa-2x"></i> + <?php echo Yii::t("admin", "IMPORT DATA", null, Yii::app()->controller->module->id); ?> + </a> + </li> + + <!-- <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-red" style="cursor:pointer;" href="#admin.openagenda"> + <i class="fa fa-calendar fa-2x"></i> + <?php echo Yii::t("admin", "OPEN AGENDA", null, Yii::app()->controller->module->id); ?> + </a> + </li> --> + + <!-- <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-red" style="cursor:pointer;" href="#admin.checkgeocodage"> + <i class="fa fa-map fa-2x"></i> + <?php echo Yii::t("admin", "CHECK GEOCODAGE", null, Yii::app()->controller->module->id); ?> + </a> + </li> --> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-red" style="cursor:pointer;" href="#adminpublic.adddata"> + <i class="fa fa-plus fa-2x"></i> + <?php echo Yii::t("admin", "ADD DATA", null, Yii::app()->controller->module->id); ?> + </a> + </li> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-green" style="cursor:pointer;" href="#log.monitoring"> + <i class="fa fa-list fa-2x"></i> + <?php echo Yii::t("admin", "LOG", null, Yii::app()->controller->module->id); ?> + </a> + </li> + + <!-- <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-green" style="cursor:pointer;" href="#admin.checkcities"> + <i class="fa fa-list fa-2x"></i> + <?php echo Yii::t("admin", "CHECK CITIES", null, Yii::app()->controller->module->id); ?> + </a> + </li> --> + + <li class="list-group-item col-md-4 col-sm-6 link-to-moderate"> + <a class="lbh text-orange" style="cursor:pointer;" href="#admin.moderate.one"> + <i class="fa fa-check fa-2x"></i> + <?php echo Yii::t("admin", "MODERATION", null, Yii::app()->controller->module->id); ?> + </a> + + <li class="list-group-item col-md-4 col-sm-6 link-to-moderate"> + <a class="lbh text-orange" style="cursor:pointer;" href="#stat.chartglobal"> + <i class="fa fa-bar-chart fa-2x"></i> + <?php echo Yii::t("admin", "STATISTICS", null, Yii::app()->controller->module->id); ?> + </a> + </li> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-yellow" style="cursor:pointer;" href="#admin.mailerrordashboard"> + <i class="fa fa-envelope fa-2x"></i> + <?php echo Yii::t("admin", "MAILERROR", null, Yii::app()->controller->module->id); ?> + </a> + </li> + <!-- <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-yellow" style="cursor:pointer;" href="#admin.cities"> + <i class="fa fa-university fa-2x"></i> + <?php echo Yii::t("admin", "CITIES", null, Yii::app()->controller->module->id); ?> + </a> + </li> --> + +<?php } + + if( Role::isSourceAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) ) ){ ?> + <li class="list-group-item text-red col-md-4 col-sm-6 "> + <a class="lbh" style="cursor:pointer;" href="#stat.chart"> + <i class="fa fa-plus fa-2x"></i> + <?php echo Yii::t("admin", "SOURCE ADMIN", null, Yii::app()->controller->module->id); ?> + </a> + </li> +<?php } ?> + </ul> + </div> +</div> +<!-- end: PAGE CONTENT--> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + //setTitle("Espace administrateur","cog"); + //Index.init(); + initKInterface(); +}); + +</script> \ No newline at end of file diff --git a/views/admin/mailErrorTable.php b/views/admin/mailErrorTable.php new file mode 100755 index 0000000000000000000000000000000000000000..569443da5c44a068d6bd3a3504c2e7975f6edecc --- /dev/null +++ b/views/admin/mailErrorTable.php @@ -0,0 +1,181 @@ +<?php +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); +echo CHtml::cssFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/css/DT_bootstrap.css'); +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/DT_bootstrap.js'); +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div class="panel-body"> + <div> + <table class="table table-striped table-bordered table-hover directoryTable"> + <thead> + <tr> + <th>Event</th> + <th>Email</th> + <th>Reason</th> + <th>Description</th> + <th>Date</th> + <th>Actions</th> + </tr> + </thead> + <tbody class="directoryLines"> + <?php + foreach ($mailErrors as $id => $mailError) { + ?> + <tr id="<?php echo 'mailError'.$id?>"> + <td class="mailErrorLine"> + <a href=""><i class="fa fa-envelope fa-2x"></i> <?php echo $mailError->event ?></a> + </td> + <td class="mailErrorLine"> + <a href=""><?php echo $mailError->recipient ?></a> + </td> + <td class="mailErrorLine"> + <a href=""><?php echo $mailError->reason ?></a> + </td> + <td class="mailErrorLine"> + <a href=""><?php echo $mailError->description ?></a> + </td> + <td class="mailErrorLine"> + <a href=""><?php echo date("d-m-Y H:i:s", $mailError->timestamp) ?></a> + </td> + <td class="center"> + <div class="btn-group"> + <a href="#" data-toggle="dropdown" class="btn btn-red dropdown-toggle btn-sm"><i class="fa fa-cog"></i> <span class="caret"></span></a> + <ul class="dropdown-menu pull-right dropdown-dark" role="menu"> + <li> + <a href="javascript:;" data-type="person" data-id="<?php echo $mailError->id ?>" class="margin-right-5 deleteThisUserBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Delete this user </a></li> + </ul> + </div> + </td> + </tr> + <?php } ?> + </tbody> + </table> + + + <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px; width: 0px; display: none;"><div class="ps-scrollbar-x" style="left: -10px; width: 0px;"></div></div><div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 230px; display: inherit;"><div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div></div> + </div> + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + bindAdminBtnEvents(); + resetDirectoryTable(); +}); + +var directoryTable = null; + +function resetDirectoryTable() { + mylog.log("resetDirectoryTable"); + + if( !$('.directoryTable').hasClass("dataTable") ) + { + directoryTable = $('.directoryTable').dataTable({ + "aoColumnDefs" : [{ + "aTargets" : [0] + }], + "oLanguage" : { + "sLengthMenu" : "Show _MENU_ Rows", + "sSearch" : "", + "oPaginate" : { + "sPrevious" : "", + "sNext" : "" + } + }, + "aaSorting" : [[1, 'asc']], + "aLengthMenu" : [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"] // change per page values here + ], + // set the initial value + "iDisplayLength" : 10, + }); + } + else + { + if( $(".directoryLines").children('tr').length > 0 ) + { + directoryTable.dataTable().fnDestroy(); + directoryTable.dataTable().fnDraw(); + } else { + mylog.log(" directoryTable fnClearTable"); + directoryTable.dataTable().fnClearTable(); + } + } +} + + +function bindAdminBtnEvents(){ + mylog.log("bindAdminBtnEvents"); + + <?php + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ) {?> + + $(".deleteThisUserBtn").off().on("click",function () + { + mylog.log("deleteThisUserBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/delete/type/"+type+"/id/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.info("User has been deleted"); + $("#"+type+id).remove(); + //window.location.href = ""; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + }); + + }); + + <?php } ?> +} + +function changeButtonName(button, action) { + mylog.log(action); + var icon = '<span class="fa-stack"> <i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span>'; + if (action=="addBetaTester") { + button.removeClass("addBetaTesterBtn"); + button.addClass("revokeBetaTesterBtn"); + button.html(icon+" Revoke this beta tester"); + } else if (action=="revokeBetaTester") { + button.removeClass("revokeBetaTesterBtn"); + button.addClass("addBetaTesterBtn"); + button.html(icon+" Add this beta tester"); + } else if (action=="addSuperAdmin") { + button.removeClass("addSuperAdminBtn"); + button.addClass("revokeSuperAdminBtn"); + button.html(icon+" Revoke this super admin"); + } else if (action=="revokeSuperAdmin") { + button.removeClass("revokeSuperAdminBtn"); + button.addClass("addSuperAdminBtn"); + button.html(icon+" Add this super admin"); + } else { + mylog.warn("Unknown action !"); + } +} + +</script> \ No newline at end of file diff --git a/views/admin/moderateAll.php b/views/admin/moderateAll.php new file mode 100755 index 0000000000000000000000000000000000000000..550c673f1298490b034ba1f2b6f2bdaa992ecc9b --- /dev/null +++ b/views/admin/moderateAll.php @@ -0,0 +1,691 @@ + +<?php +$cs = Yii::app()->getClientScript(); +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +Menu::moderate(); +$this->renderPartial('../default/panels/toolbar'); + +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); +echo CHtml::cssFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/css/DT_bootstrap.css'); +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/DT_bootstrap.js'); + +/* ************ PARAMS DISPLAY ********************** */ +$typeParams['city'] = array("libelle" => "Citoyens","class" => "Person", "count" => 0, "tri" => 1); +$typeParams['projects'] = array("libelle" => "Projet","class" => "Project", "count" => 0, "tri" => 1); +$typeParams['events'] = array("libelle" => "Evénement","class" => "Event", "count" => 0, "tri" => 1); +$typeParams['organizations'] = array("libelle" => "Organisation","class" => "Organization", "count" => 0, "tri" => 1); +$typeParams['citoyens'] = array("libelle" => "Citoyens", "class" => "Person", "count" => 0, "tri" => 2); +$typeParams['comments'] = array("libelle" => "Commentaire", "class" => "Person", "count" => 0, "tri" => 3); +$typeParams['news'] = array("libelle" => "News", "class" => "News", "count" => 0, "tri" => 1); + +$colCorrespondance['tri'] = 0; +$colCorrespondance['type'] = 1; +$colCorrespondance['propriétaire'] = 2; +$colCorrespondance['contenu'] = 3; +$colCorrespondance['avis'] = 4; +$colCorrespondance['tags'] = 5; +$colCorrespondance['scope'] = 6; +$colCorrespondance['actions'] = 7; + + +$content = ""; +$memberId = Yii::app()->session["userId"]; +$memberType = Person::COLLECTION; +$tags = array(); +$scopes = array( + "codeInsee"=>array(), + "postalCode"=>array(), + "region"=>array(), +); + +/* ************ NEWS ********************** */ +if(isset($news) && is_array($news)) +{ + foreach ($news as $i => $e) + { + + $e['name'] = ""; + if(isset($e['target']['id'])){ + // if($e['target']['type'] == 'citoyens1'){ + // $tmp = $typeParams[$e['target']['type']]['class']::getSimpleCityById($typeParams[$e['target']['type']]['class']::getIdByInsee($e['_id'])); + // } + // else{ + $tmp = $typeParams[$e['target']['type']]['class']::getById($e['target']['id']); + // } + $e['name'] = $tmp['name']; + } + $content .= buildNewsLine($e, News::CONTROLLER, $e['target']['type'], $typeParams[$e['target']['type']]['class']::ICON, $this->module->id,$tags,$scopes,$typeParams); + }; +} +/* ************ COMMENTS ********************** */ +if(isset($comments) && is_array($comments)) +{ + foreach ($comments as $c) + { + $content .= buildCommentsLine($c, Comment::COLLECTION, $typeParams); + }; +} + + + +?> +<!-- ************ DATATABLES ********************** --> +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding" style="margin-top:40px"> + <div class="panel-heading border-light"> + <h4 class="panel-title"> + <i class="fa fa-globe fa-2x text-green"></i> + <?php foreach($typeParams as $type => $params){ + if($params['count'] > 0){?> + <a href="javascript:;" onclick="applyStateFilter('<?php echo $type?>')" class="filter<?php echo $type?> btn btn-xs btn-default"> <?php echo $params['libelle'] ?><span class="badge badge-warning badge<?php echo $type?>"> <?php echo $params['count'] ?></span></a> + <?php } ?> + <?php } ?> + <a href="javascript:;" onclick="clearAllFilters('')" class="btn btn-xs btn-default"> All</a> + <div id="filterTag" style="float:right"></div> + <div id="filterScope" style="float:right"></div> + </h4> + </div> + <div class="panel-body"> + <div> + <?php //var_dump($projects) ?> + <table class="table table-striped table-bordered table-hover moderateTable"> + <thead> + <tr> + <th>Tri</th> + <th>Type</th> + <th>Propriétaire</th> + <th>Contenu</th> + <th>Avis</th> + <th>Tags</th> + <th>Scope</th> + <th>Actions</th> + </tr> + </thead> + <tbody class="directoryLines"> + <?php echo $content; ?> + </tbody> + </table> + + + <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px; width: 0px; display: none;"><div class="ps-scrollbar-x" style="left: -10px; width: 0px;"></div></div><div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 230px; display: inherit;"><div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div></div> + </div> + </div> +</div> + +<!-- ************ MODAL ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalAbuseContents"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <div class="modal-title" id="modalText">Contenu de la news</div> + </div> + <div class="modal-body"> + <ul id='listReason'></ul> + </div> + <div class="modal-body"> + <center><button id="toggle-detail" class="btn btn-info">+ de détail</button></center><br> + <ul id='listDetail'></ul> + </div> + <div class="modal-footer"> + <div id="modalAction" style="display:inline"></div> + <button type="button" class="btn btn-default" data-dismiss="modal">OK</button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> + + +<?php +function buildNewsLine( $e, $collection, $type, $icon, $moduleId, &$tags, &$scopes, &$typeParams ){ + + //CountByType + if(isset($typeParams[$type]['count'])) $typeParams[$type]['count'] += 1; + + + if(!isset( $e['_id'] ) || !isset( $e["text"]) || $e["text"] == "" ) + return; + $actions = ""; + $classes = ""; + $id = @$e['_id']; + + + /* + * TYPE + ICON + ***************************************** */ + $strHTML = '<tr id="'.(string)$id.'">'. + '<td>'.$typeParams[$type]['tri'].'</td> + <td>'.$type.'</td> + <td class="Line'.$classes.'">'. + '<a target="_blank" href="'.Yii::app()->createUrl('/'.$moduleId.'/#news.index.type.'.$type.'.id.'.$e['target']['id']).'">'; + if ($e && isset($e["imagePath"])){ + $strHTML .= '<img width="50" height="50" alt="image" class="img-circle" src="'.Yii::app()->createUrl('/'.$moduleId.'/document/resized/50x50'.$e['imagePath']).'">'.((isset($e["name"])) ? $e["name"] : ""); + } else { + $strHTML .= '<i class="fa '.$icon.' fa-2x"></i> '.$e['name'].''; + } + $strHTML .= '</a>'; + $strHTML .= '<span></span></td>'; + + /* ************************************** + * TEXT + ***************************************** */ + $strHTML .= '<td>'.((isset($e["text"]))? substr($e["text"],0,50) :"").'</td>'; + + /* ************************************** + * AVIS + *****************************************/ + $strHTML .= '<td> + <i class="fa fa-thumbs-up text-green">'.((isset($e['voteUpCount']) ) ? $e['voteUpCount'] : '0').'</i> + <i class="fa fa-thumbs-down text-orange">'.((isset($e['voteDownCount']) ) ? $e['voteDownCount'] : '0').'</i> + <i class="fa fa-flag text-red modalAbuseContentsBtn" style="cursor:pointer" data-context="News" data-id="'.$e['_id'].'">'.((isset($e['reportAbuseCount']) ) ? $e['reportAbuseCount'] : '0').'</i> + </td>'; + + /* ************************************** + * TAGS + ***************************************** */ + $strHTML .= '<td>'; + if(isset($e["tags"])){ + foreach ($e["tags"] as $key => $value) { + $strHTML .= ' <a href="#" onclick="applyTagFilter(\''.$value.'\')"><span class="label label-inverse">'.$value.'</span></a>'; + if( $tags != "" && !in_array($value, $tags) ) + array_push($tags, $value); + } + } + $strHTML .= '</td>'; + + /* ************************************** + * SCOPES + ***************************************** */ + $strHTML .= '<td>'; + if(isset($e['scope']['cities']))foreach ($e['scope']['cities'] as $value) { + if(is_array($value))foreach($value as $ids => $city){ + if(isset($scopes[$ids])){ + $strHTML .= ' <a href="javascript::;" onclick="applyScopeFilter('.$city.')"><span class="label label-inverse">'.$city.'</span></a>'; + if( !in_array($city, $scopes[$ids]) ) + array_push($scopes[$ids], $city ); + } + } + } + else{ + $strHTML .= ' <a href="javascript::;" onclick="applyScopeFilter(\''.trim($e['scope']['type']).'\')"><span class="label label-inverse">'.$e['scope']['type'].'</span></a>'; + } + $strHTML .= '</td>'; + + /* ************************************** + * ACTIONS + ***************************************** */ + $strHTML .= '<td class="center">'; + if(Yii::app()->session["userIsAdmin"] ) + $strHTML .= '<a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" data-value="true" class="margin-right-5 declareAsAuthorizeBtn"><i class="fa fa-eye-slash text-red fa-2x"></i></a> + <a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 declareAsAbuseBtn" data-value="false"><i class="fa fa-eye text-green fa-2x"></i></a>'; + $strHTML .= '</td>'; + + $strHTML .= '</tr>'; + return $strHTML; +} + + +function buildCommentsLine($c, $type, &$typeParams){ + + //CountByType + if(isset($typeParams[$type]['count'])) $typeParams[$type]['count'] += 1; + + + if(!isset( $c['_id'] ) || !isset( $c["text"]) || $c["text"] == "" ) + return; + $actions = ""; + $classes = ""; + $id = @$c['_id']; + $moduleId = $strHTML = ""; + + /* ************************************* + * TYPE + ICON + ***************************************** */ + $strHTML = '<tr id="'.(string)$id.'">'. + '<td>'.$typeParams[$type]['tri'].'</td> + <td>'.$type.'</td> + <td class="Line'.$classes.'">'. + '<a class="linkComment" data-contextid="'.@$c['contextId'].'">'; + $strHTML .= '<i class="fa fa-comment fa-2x"></i> Commentaire sur '.@$c['contextType']; + $strHTML .= '</a>'; + $strHTML .= '<span></span></td>'; + + /* ************************************** + * TEXT + ***************************************** */ + $strHTML .= '<td>'.((isset($c["text"]))? $c["text"]:"").'</td>'; + + /* ************************************** + * Avis + ***************************************** / + */ + $strHTML .= '<td> + <i class="fa fa-thumbs-up text-green">'.((isset($c['voteUpCount']) ) ? $c['voteUpCount'] : '0').'</i> + <i class="fa fa-thumbs-down text-orange">'.((isset($c['voteDownCount']) ) ? $c['voteDownCount'] : '0').'</i> + <i class="fa fa-flag text-red modalAbuseContentsBtn" style="cursor:pointer" data-context="Comment" data-id="'.$c['_id'].'">'.((isset($c['reportAbuseCount']) ) ? $c['reportAbuseCount'] : '0').'</i> + </td>'; + $strHTML .= '<td> - </td>'; + + + /* ************************************** + * TAGS + ***************************************** */ + $strHTML .= '<td>'; + if(isset($c["contextType"])){ + $strHTML .= ' <a href="#" onclick="applyScopeFilter(\''.$c["contextType"].'\')"><span class="label label-inverse">'.$c["contextType"].'</span></a>'; + } + $strHTML .= '</td>'; + // $strHTML .= '<td></td>'; + + /* ************************************** + * SCOPES + ***************************************** */ + // $strHTML .= '<td>'; + // foreach ($scopes as $ids => $value) { + // if( isset($c["scope"]) && isset( $c["scope"]['cities']) ){ + // foreach($c["scope"]['cities'] as $city){ + // if(isset($city[$ids])){ + // $strHTML .= ' <a href="#" onclick="applyScopeFilter('.$city[$ids].')"><span class="label label-inverse">'.$city[$ids].'</span></a>'; + // if( !in_array($city[$ids], $scopes[$ids]) ) + // array_push($scopes[$ids], $city[$ids] ); + // } + // } + // } + // } + // $strHTML .= '</td>'; + + /* ************************************** + * ACTIONS + ***************************************** */ + $strHTML .= '<td class="center">'; + if(Yii::app()->session["userIsAdmin"] ) + $strHTML .= '<a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" data-value="true" class="margin-right-5 declareCommentAsAuthorizeBtn"><i class="fa fa-eye-slash text-red fa-2x"></i></a> + <a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 declareCommentAsAbuseBtn" data-value="false"><i class="fa fa-eye text-green fa-2x"></i></a>'; + $strHTML .= '</td>'; + + $strHTML .= '</tr>'; + return $strHTML; +} + +?> + +<script type="text/javascript"> + +var openingFilter = "<?php echo ( isset($_GET['type']) ) ? $_GET['type'] : '' ?>"; +var moderateTable = null; + +jQuery(document).ready(function() { + + //Datatables + bindAdminBtnEvents(); + resetModerateTable() ; + if(openingFilter != "")$('.filter'+openingFilter).trigger("click"); + + //Title + setTitle("Espace administrateur : Modération","cog"); + //Modal configuration + bindModalEvent(); + + $(".linkComment").off().on("click",function () { + mylog.log("linkComment click "+$(this).data("contextid")); + var contextId = $(this).data("contextid"); + var urlToSend = baseUrl+'/'+moduleId+"/comment/index/type/news/id/"+contextId; + $.blockUI({ + message : '<div><a href="javascript:$.unblockUI();"><span class="pull-right text-dark"><i class="fa fa-share-alt"></span></a>'+ + '<div class="commentContent"></div></div>', + onOverlayClick: $.unblockUI, + css: {"text-align": "left", "cursor":"default", "width":"50%", "left":"25%" } + }); + + getAjax('.commentContent',urlToSend,function(){ + + $('.bar_tools_post').hide(); + $('.saySomething').hide(); + + + },"html"); + }); +}); + + +var contextMap = { + "tags" : <?php echo json_encode($tags) ?>, + "scopes" : <?php echo json_encode($scopes) ?>, +}; + +function resetModerateTable() +{ + mylog.log("resetModerateTable"); + + if( !$('.moderateTable').hasClass("dataTable") ) + { + moderateTable = $('.moderateTable').dataTable({ + "aoColumnDefs" : [{ + "aTargets" : [<?php echo $colCorrespondance['tri']; ?>,<?php echo $colCorrespondance['type']; ?>], + "visible" : false, + "searchable" : true, + }], + "oLanguage" : { + // "sLengthMenu" : "Show _MENU_ Rows", + "sSearch" : "", + "oPaginate" : { + "sPrevious" : "", + "sNext" : "" + } + }, + "aaSorting" : [[<?php echo $colCorrespondance['tri']; ?>, 'asc']], + "aLengthMenu" : [[5, 10, 15, 20, -1], [5, 10, 15, 20, "Tout"] // change per page values here + ], + // set the initial value + "iDisplayLength" : -1, + }); + } + else + { + if( $(".directoryLines").children('tr').length > 0 ) + { + moderateTable.dataTable().fnDestroy(); + moderateTable.dataTable().fnDraw(); + } else { + mylog.log(" moderateTable fnClearTable"); + moderateTable.dataTable().fnClearTable(); + } + } +} + +function applyStateFilter(str) +{ + mylog.log("applyStateFilter",str); + moderateTable.DataTable().column( <?php echo $colCorrespondance['type']; ?> ).search(str , true , false).draw(); +} + +function applyTypeFilter(str) +{ + if(!str){ + str = ""; + sep = ""; + $.each($("."+str), function() { + mylog.log("applyTypeFilter",$(this).data("id")); + str += sep+$(this).data("id"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyTypeFilter",str); + moderateTable.DataTable().column( <?php echo $colCorrespondance['type']; ?> ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function clearAllFilters(str){ + moderateTable.DataTable().column( <?php echo $colCorrespondance['type']; ?> ).search( str , true , false ).draw(); + moderateTable.DataTable().column( <?php echo $colCorrespondance['tags']; ?> ).search( str , true , false ).draw(); + moderateTable.DataTable().column( <?php echo $colCorrespondance['scope']; ?> ).search( str , true , false ).draw(); + $('#filterTag').html(''); + $('#filterScope').html(''); +} + +function clearTagFilters(){ + moderateTable.DataTable().column( <?php echo $colCorrespondance['tags']; ?> ).search( '' , true , false ).draw(); + $('#filterTag').html(''); +} + +function clearScopeFilters(){ + $('#filterScope').html(''); + moderateTable.DataTable().column( <?php echo $colCorrespondance['scope']; ?> ).search( '' , true , false ).draw(); +} + +function applyTagFilter(str) +{ + mylog.log("applyTagFilter",str); + if(!str){ + str = ""; + sep = ""; + $.each($(".btn-tag.active"), function() { + mylog.log("applyTagFilter",$(this).data("id")); + str += sep+$(this).data("id"); + sep = "|"; + }); + } else + clearTagFilters(); + mylog.log("applyTagFilter",str); + moderateTable.DataTable().column( <?php echo $colCorrespondance['tags']; ?> ).search( str, true , false ).draw(); + $('#filterTag').html('<a href="#" onclick="clearTagFilters()"><span class="label label-inverse">'+str+'</span></a>'); + return $('.directoryLines tr').length; +} + +function applyScopeFilter(str) +{ + //mylog.log("applyScopeFilter",$(".btn-context-scope.active").length); + if(!str){ + str = ""; + sep = ""; + $.each( $(".btn-context-scope.active"), function() { + mylog.log("applyScopeFilter",$(this).data("val")); + str += sep+$(this).data("val"); + sep = "|"; + }); + } else + clearScopeFilters(); + mylog.log("applyScopeFilter",str); + $('#filterScope').html('<a href="#" onclick="clearScopeFilters()"><span class="label label-inverse">'+str+'</span></a>'); + moderateTable.DataTable().column( <?php echo $colCorrespondance['scope']; ?> ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function bindAdminBtnEvents(){ + mylog.log("bindAdminBtnEvents"); + <?php + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ) {?> + + $(".declareAsAbuseBtn, .declareAsAuthorizeBtn").off().on("click",function () + { + mylog.log("declareAsAbuseBtn / declareAsAuthorizeBtn click"); + mylog.log("isAnAbuse",$(this).data("value")); + var btnClick = $(this); + var id = $(this).data("id"); + var urlToSend = baseUrl+"/"+moduleId+"/news/moderate/news/"; + + var params = {}; + params.subAction = "saveModerate"; + params.id = id; + params.isAnAbuse = $(this).data("value"); + + var message = "Cette actualité restera affichée"; + if(params.isAnAbuse == true) message = "Cette actualité ne sera plus affichée"; + + bootbox.confirm(message,function(result){ + if (!result) { + // btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } + $.ajax({ + type: "POST", + url: urlToSend, + data:params, + dataType : "json", + success:function (data){ + if( data && data.result ) { + toastr.info(data.msg); + if(moderateTable.$('#'+id).length > 0){ + + //update the count + var countToChange = moderateTable.fnGetData('#'+id)[1]; + $('.badge'+countToChange).html(($('.badge'+countToChange).text())-1); + + //Delete the row + moderateTable.fnDeleteRow(moderateTable.$('#'+id)[0]); + } + + } else { + toastr.info("Erreur"); + } + } + }); + + }); + + }); + + $(".declareCommentAsAbuseBtn, .declareCommentAsAuthorizeBtn").off().on("click",function () + { + mylog.log("declareCommentAsAbuseBtn / declareCommentAsAuthorizeBtn click"); + mylog.log("isAnAbuse",$(this).data("value")); + var btnClick = $(this); + var id = $(this).data("id"); + var urlToSend = baseUrl+"/"+moduleId+"/comment/moderate/"; + + var params = {}; + params.subAction = "saveModerate"; + params.id = id; + params.isAnAbuse = $(this).data("value"); + + var message = "Ce commentaire restera affiché"; + if(params.isAnAbuse == true) message = "Ce commentaire ne sera plus affiché"; + + bootbox.confirm(message,function(result){ + if (!result) { + // btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } + $.ajax({ + type: "POST", + url: urlToSend, + data:params, + dataType : "json", + success:function (data){ + if( data && data.result ) { + toastr.info(data.msg); + if(moderateTable.$('#'+id).length > 0){ + + //update the count + var countToChange = moderateTable.fnGetData('#'+id)[1]; + $('.badge'+countToChange).html(($('.badge'+countToChange).text())-1); + + //Delete the row + moderateTable.fnDeleteRow(moderateTable.$('#'+id)[0]); + } + } else { + toastr.info("Erreur"); + } + } + }); + + }); + + }); + + <?php } ?> + $(".banThisBtn").off().on("click",function () + { + mylog.log("banThisBtn click"); + }); +} + +function bindModalEvent(){ + //To dispkay abuse texts + $('.modalAbuseContentsBtn').off().on("click",function (e) { + mylog.log("modalAbuseContentsBtn click"); + var context = $(this).data("context"); + var urlToSend = baseUrl+"/"+moduleId+"/"+context+"/moderate/"; + var id = $(this).data("id"); + var subAction = "consolidateModerate"+context; + + var strReason = '<li>Propos malveillants : XX</li>'+ + '<li>Incitation et glorification des conduites agressives : XX</li>'+ + '<li>Affichage de contenu gore et trash : XX</li>'+ + '<li>Contenu pornographique : XX</li>'+ + '<li>Liens fallacieux ou frauduleux : XX</li>'+ + '<li>Mention de source erronée : XX</li>'+ + '<li>Violations des droits d\'auteur : XX</li>'; + var strReason = ""; + var strDetail = ""; + $.getJSON( urlToSend, { "id" : id, "subAction" : subAction}, function(data) { + $('#modalText').html(data.result.text); + $.each(data.result.reason, function(reason, count){ + strReason += '<li>'+reason+' : '+count+'</li>'; + }); + $.each(data.result.detail, function(user, report){ + strDetail += '<li>'+report+'</li>'; + }); + + //Display lists + $('#listReason').html(strReason); + $('#listDetail').html(strDetail); + }); + + //Display buttons + $('#modalAction').html( + '<button type="button" class="btn btn-success declareAsAuthorizeModalBtn" data-context="'+context+'" data-id="'+id+'" data-value="true" data-dismiss="modal"><i class="fa fa-eye text-white fa-1x" ></i> Laisser publié</button>'+ + '<button type="button" class="btn btn-danger declareAsAbuseModalBtn" data-context="'+context+'" data-id="'+id+'" data-value="true"><i class="fa fa-eye-slash text-white fa-1x" data-dismiss="modal"></i> C\'est un abus</button>' + + ); + + + $('#modalAbuseContents').modal('show'); + }); + + $('#modalAbuseContents').on('show.bs.modal', function (event) { + + $('#listDetail').hide(); + + $(document).off("click", ".declareAsAbuseModalBtn declareAsAuthorizeModalBtn"); + $(document).on("click", ".declareAsAbuseModalBtn, .declareAsAuthorizeModalBtn", function(event){ + mylog.log("isAnAbuse",$(this).data("value"), $(this).data("id")); + var btnClick = $(this); + var id = $(this).data("id"); + var context = $(this).data("context"); + var urlToSend = baseUrl+"/"+moduleId+"/"+context+"/moderate/"; + + var params = {}; + params.subAction = "saveModerate"; + params.id = id; + params.isAnAbuse = $(this).data("value"); + + $.ajax({ + type: "POST", + url: urlToSend, + data:params, + dataType : "json" + }) + .success(function (data) + { + if ( data && data.result ) { + toastr.info(data.msg); + if(moderateTable.$('#'+id).length > 0){ + + //update the count + var countToChange = moderateTable.fnGetData('#'+id)[1]; + $('.badge'+countToChange).html(($('.badge'+countToChange).text())-1); + + //Delete the row + moderateTable.fnDeleteRow(moderateTable.$('#'+id)[0]); + } + } else { + toastr.info("Erreur"); + } + }); + $('#modalAbuseContents').modal('hide'); + }); + + $(document).on("click", "#toggle-detail", function(event){ + $('#listDetail').toggle(); + if($("#listDetail").is(":visible")){ + $("#toggle-detail").html('- de détail'); + } + else{ + $("#toggle-detail").html('+ de détail'); + } + + }); + + }); +} + + +</script> \ No newline at end of file diff --git a/views/admin/moderateOne.php b/views/admin/moderateOne.php new file mode 100755 index 0000000000000000000000000000000000000000..f0fb28f936af9126e948063562d44f4663372216 --- /dev/null +++ b/views/admin/moderateOne.php @@ -0,0 +1,127 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); + Menu::moderate(); + $this->renderPartial('../default/panels/toolbar'); + +?> + +<style> + .buttonBar{ + width:95%; + text-align: center; + padding-bottom: 20px; + } + + .buttonBar button{ + min-width: 250px; + font-size: 18px; + } +</style> +<div id="panelOne" class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding" style="margin-top:40px"> + <div class="toModerateContent"></div> + + <div class="buttonBar"> + <button class="btn btn-success declareAsAuthorizeBtn" data-id="5726de593780ea9d058b4572" data-type="city" data-value="false">Laisser publié + </button> + <button class="btn btn-danger declareAsAbuseBtn" data-id="5726de593780ea9d058b4572" data-type="city" data-value="true">C'est un abus + </button> + </div> +</div> + +<script type="text/javascript" > + var newsId = ""; + var htmlSpiner = '<h2 class="homestead text-dark padding-10"><i class="fa fa-spin fa-circle-o-notch"></i></h2>'; + function loadNewsToModerate(idNews){ + var urlToSend = baseUrl+'/'+moduleId+"/news/detail/id/"+idNews; + mylog.log(urlToSend); + getAjax('.toModerateContent',urlToSend,function(handleResponse){ + + $('.buttonBar').show(); + + $(".timeline_element").css("min-width","95%"); + $(".timeline_element").css("pointer-events","none"); + $(".timeline_element").css("cursor","default"); + $("div.timeline").css("min-height", 0); + $(".date_separator").hide(); + $(".dropdown").hide(); + $(".newsAddComment").hide(); + + },"html"); + } + + function setNextNewsId(){ + mylog.log("setNextNewsId"); + $('.toModerateContent').html(htmlSpiner); + $('.buttonBar').hide(); + var urlToSend = baseUrl+"/"+moduleId+"/news/moderate/"; + + var params = {}; + params.subAction = "getNextIdToModerate"; + $.ajax({ + type: "POST", + url: urlToSend, + data:params, + dataType : "json", + success:function (data){ + mylog.log(data); + if(data.result == true){ + newsId = data.newsId; + loadNewsToModerate(newsId); + $(".declareAsAbuseBtn, .declareAsAuthorizeBtn").data('id',newsId); + } + else{ + $('.toModerateContent').html("<center><h3>Aucune news à modérer</h3></center>"); + // $('#panelOne').show(); + } + } + }); + } + + jQuery(document).ready(function() { + + + //Title + setTitle("Espace administrateur : Modération","cog"); + $('.toModerateContent').html(htmlSpiner); + $('.buttonBar').hide(); + + //We load the moderation + setNextNewsId(); + + $(".declareAsAbuseBtn, .declareAsAuthorizeBtn").off().on("click",function () + { + mylog.log("declareAsAbuseBtn / declareAsAuthorizeBtn click"); + mylog.log("isAnAbuse",$(this).data("value")); + var btnClick = $(this); + var id = $(this).data("id"); + var urlToSend = baseUrl+"/"+moduleId+"/news/moderate/"; + + var params = {}; + params.subAction = "saveModerate"; + params.id = id; + params.isAnAbuse = $(this).data("value"); + + $.ajax({ + type: "POST", + url: urlToSend, + data:params, + dataType : "json", + success:function (data){ + if( data && data.result ) { + toastr.info(data.msg); + setNextNewsId(); + } else { + toastr.info("Erreur"); + } + } + }); + }); + + }); + +</script> \ No newline at end of file diff --git a/views/admin/openAgenda.php b/views/admin/openAgenda.php new file mode 100755 index 0000000000000000000000000000000000000000..57269431cbebdbd306ea3c57dffb6a0df31767cb --- /dev/null +++ b/views/admin/openAgenda.php @@ -0,0 +1,289 @@ +<div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div> + <div class="panel-heading text-center border-light"> + <h3 class="panel-title text-red"><i class="fa fa-calendar"></i> OpenAgenda</h3> + </div> + <div class="panel-body"> + <div class="col-xs-12"> + <a href="#" class="btn btn-primary" id="collectOpenAgenda"> Récupérer les évenements de OpenAgenda </a> + </div> + </div> + </div> + + + <div id="divCheckEvents"> + <div class="panel-heading border-light"> + <h4 class="panel-title">Vérification avant l'import</h4> + </div> + <div class="panel-body"> + <div class="col-xs-12 col-sm-4"> + <div class="panel-scroll row-fluid height-300"> + <input type="hidden" id="jsonEventsAdd" name="jsonEventsAdd" /> + <h3 class="panel-title text-green text-center"><i class="fa fa-plus"></i> <?php echo Yii::t("common", "ADD"); ?> : <span id="nbAdd" ></span></h3> + <br/> + <table id="EventsAdd" class="table table-striped table-hover"> + + </table> + </div> + </div> + <div class="col-xs-12 col-sm-4"> + <div class="panel-scroll row-fluid height-300"> + <input type="hidden" id="jsonEventsUpdate" name="jsonEventsUpdate" value=""/> + <h3 class="panel-title text-orange text-center"><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "UPDATE"); ?> : <span id="nbUpdate" ></span></h3> + <br/> + <table id="EventsUpdate" class="table table-striped table-hover"> + + </table> + </div> + </div> + <div class="col-xs-12 col-sm-4"> + <div class="panel-scroll row-fluid height-300"> + <input type="hidden" id="jsonEventsDelete" name="jsonEventsDelete" value=""/> + <h3 class="panel-title text-red text-center"><i class="fa fa-minus"></i> <?php echo Yii::t("common", "DELETE"); ?> : <span id="nbDelete" ></span></h3> + <br/> + <table id="EventsDelete" class="table table-striped table-hover"> + + </table> + </div> + </div> + <div class="col-xs-12 col-sm-12 text-center"> + <a href="#" class="btn btn-primary col-sm-2" id="importOpenAgenda"> <?php echo Yii::t("common", "IMPORT"); ?></a> + </div> + </br></br> + <div class="col-xs-12 col-sm-12 text-center"> + <table id="tableRes" class="table table-striped table-bordered table-hover"> + <thead> + <tr> + <th class="col-sm-5">Entité</th> + <th class="col-sm-5">Result</th> + </tr> + </thead> + <tbody class="directoryLines" id="bodyResult"> + + </tbody> + </table> + </div> + </div> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("Espace administrateur : Open Agenda","cog"); + $("#divCheckEvents").hide(); + bindEvents(); +}); + + +function bindEvents(){ + $("#collectOpenAgenda").off().on('click', function(e){ + rand = Math.floor((Math.random() * 8) + 1); + $.blockUI({message : '<div class="title-processing homestead"><i class="fa fa-spinner fa-spin"></i> Processing... </div>' + +'<a class="thumb-info" href="'+proverbs[rand]+'" data-title="Proverbs, Culture, Art, Thoughts" data-lightbox="all">' + + '<img src="'+proverbs[rand]+'" style="border:0px solid #666; border-radius:3px;"/></a><br/><br/>' + }); + + var dateToday = "<?php echo date('d').'/'.date('m').'/'.date('Y') ;?>"; + var date50 = "<?php echo date('d').'/'.date('m').'/'.(date('Y')+50) ;?>"; + var page = 1 ; + var url = "https://api.openagenda.com/v1/events?lang=fr&key=6e08b4156e0860265c61e59f440ffb0e&when=18/03/2016-18/03/2066&limit=0"; + + mylog.log("url", url); + $.ajax({ + url: baseUrl+'/communecter/admin/getdatabyurl/', + type: 'POST', + dataType: 'json', + data:{ url : url }, + async : false, + success: function (obj){ + mylog.log('success', obj.data, obj.total); + var object = jQuery.parseJSON(obj.data); + var x = object.total; + var y = 100; + var d = 0 + if(x%y > 0) + d = 1 ; + s = Number((x / y).toFixed(0)) ; + var z = d + s; + + var finish = {}; + finish["arrayAdd"] = []; + finish["arrayUpdate"] = []; + finish["arrayDelete"] = []; + + finish["ligneAdd"] = ""; + finish["ligneUpdate"] = "" ; + finish["ligneDelete"] = "" ; + + check(z, 1, dateToday, date50, finish); + mylog.log("res", res); + + + + }, + error: function (error) { + mylog.log('error', error); + } + }); + }); + + + $("#importOpenAgenda").off().on('click', function(e){ + rand = Math.floor((Math.random() * 8) + 1); + $.blockUI({message : '<div class="title-processing homestead"><i class="fa fa-spinner fa-spin"></i> Processing... </div>' + +'<a class="thumb-info" href="'+proverbs[rand]+'" data-title="Proverbs, Culture, Art, Thoughts" data-lightbox="all">' + + '<img src="'+proverbs[rand]+'" style="border:0px solid #666; border-radius:3px;"/></a><br/><br/>' + }); + $.ajax({ + url: baseUrl+'/communecter/admin/importeventsopenagendaindb/', + type: 'POST', + dataType: 'json', + data : { + jsonEventsAdd : $("#jsonEventsAdd").val(), + jsonEventsUpdate : $("#jsonEventsUpdate").val() + }, + success: function (data){ + mylog.log('success', data); + var ligne = "" ; + if(typeof data.result != "undefined"){ + toastr.success(data.result.length + " events ont été ajoutés et/ou modifier"); + $.each(data.result, function( key, events ){ + ligne += "<tr><td>"+events.name+"</td><td>"+events.msg+"</td></tr>" ; + }); + } + else{ + toastr.success("Aucun evenement n'a été ajouté et/ou modifier"); + } + + if(typeof data.error != "undefined"){ + $.each(data.error, function( key, events ){ + ligne += "<tr><td>"+events.name.fr+"</td><td>"+events.msg+"</td></tr>" ; + }); + } + + $("#bodyResult").html(ligne); + + $.unblockUI(); + + }, + error: function (error) { + mylog.log('error', error); + } + }); + }); + +} + + + +function checkEventsOpenAgendaInDB(data){ + var arrayAdd = [] ; + var arrayUpdate = [] ; + var arrayDelete = [] ; + var arrayEvents = {} ; + + $.ajax({ + url: baseUrl+'/communecter/admin/checkventsopenagendaindb/', + type: 'POST', + dataType: 'json', + data : { + events : data + }, + async:false, + complete: function () {}, + success: function (result){ + mylog.log('result', result); + mylog.log('Add', result.Add.length); + mylog.log('Update', result.Update.length); + mylog.log('Delete', result.Delete.length); + arrayEvents["Add"] = result.Add; + arrayEvents["Update"] = result.Update; + arrayEvents["Delete"] = result.Delete; + }, + error: function (error) { + mylog.log('error', error); + } + }); + + + return arrayEvents ; +} + +function check (nbpage, page, dateToday, date50, finish){ + + var url = "https://api.openagenda.com/v1/events?lang=fr&key=6e08b4156e0860265c61e59f440ffb0e&when="+dateToday+"-"+date50+"&limit=1000&page="+page ; + mylog.log('url', url); + + $.ajax({ + url: baseUrl+'/communecter/admin/getdatabyurl/', + type: 'POST', + dataType: 'json', + data:{ url : url }, + async : false, + success: function (object){ + mylog.log('success', object); + var obj = jQuery.parseJSON(object.data); + mylog.log('obj', obj); + var allEvents = checkEventsOpenAgendaInDB(obj); + $.each(allEvents, function( stateEvent, arrayEvents ) { + var nbEvents = 0; + $.each(arrayEvents, function( keyEvent, Event ) { + //mylog.log(stateEvent, keyEvent, Event); + nbEvents++; + if(stateEvent == "Add"){ + finish["arrayAdd"].push(Event); + finish["ligneAdd"] += "<tr><td>"+Event.title.fr+"</td></tr>" ; + } + else if(stateEvent == "Update"){ + finish["arrayUpdate"].push(Event); + finish["ligneUpdate"] += "<tr><td>"+Event.title.fr+"</td></tr>" ; + } + else if(stateEvent == "Delete"){ + finish["arrayDelete"].push(Event); + finish["ligneDelete"] += "<tr><td>"+Event.title.fr+"</td></tr>" ; + } + + }); + }); + + if(nbpage > page){ + page++; + check(nbpage, page, dateToday, date50, finish); + }else{ + callbackF(finish); + } + }, + error: function (error) { + mylog.log('error', error); + } + }); + + + + +} + + +function callbackF(finish){ + + $("#nbAdd").html(finish["arrayAdd"].length + " Event(s)"); + $("#EventsAdd").html(finish["ligneAdd"]); + $("#jsonEventsAdd").val(JSON.stringify(finish["arrayAdd"])); + + $("#nbUpdate").html(finish["arrayUpdate"].length + " Event(s)"); + $("#EventsUpdate").html(finish["ligneUpdate"]); + $("#jsonEventsUpdate").val(JSON.stringify(finish["arrayUpdate"])); + + $("#nbDelete").html(finish["arrayDelete"].length + " Event(s)"); + $("#EventsDelete").html(finish["ligneDelete"]); + $("#jsonEventsDelete").val(JSON.stringify(finish["arrayDelete"])); + + $("#divCheckEvents").fadeIn("slow", function() {}); + $.unblockUI(); + mylog.log('---------FINISH---------------', finish); +} + + +</script> diff --git a/views/admin/terla/circuits.php b/views/admin/terla/circuits.php new file mode 100644 index 0000000000000000000000000000000000000000..c37198e04276eccb06fc2add85c841ac2f214360 --- /dev/null +++ b/views/admin/terla/circuits.php @@ -0,0 +1,173 @@ +<style type="text/css"> + .podDash .nav{ + display: inline-block; + display: -webkit-inline-box; + height: 50px; + display: inline-block; + display: -webkit-inline-box; + /*position: absolute;*/ + } + .podDash .nav-item{ + text-transform: uppercase; + font-size: 18px; + font-weight: 600; + border-top: 5px solid lightgray; + margin-right: 5px; + position: relative; + } + .podDash .nav-item.active{ + border-top: 5px solid #EF5B34; + box-shadow: 0 9px 0px 0px white, + 0 9px 0px 0px white, + 0px 0px 10px -1px rgba(0,0,0,0.5), + 0px 0px 10px -1px rgba(0,0,0,0.5); + z-index: 1; + height: 55px; + margin-top: -5px; + padding-top: 5px; + background-color: white; + } + .podDash .content-view-circuits{ + margin-bottom:150px !important; + min-height: 300px; + -webkit-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + -moz-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + /*position: absolute; + top: 50px;*/ + + } +</style> +<!-- A transformer en dyn form --> +<div id="create-new-circuit" class="col-md-10 col-md-offset-1 col-sm-10 col-sm-offset-1 col-xs-12 margin-top-20" style="display:none;"> + <div class="form-group"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding">Name of the circuit:</label> + <input type="text" id="name" name="name" class="form-control" placeholder="Enter name of circuit"> + </div> + <div class="form-group"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding">Type of the circuit:</label> + <select class="" name="frequency" id="frequency" style="width: 100%;height:30px;" class="form-control"> + <option class="text-red" style="font-weight:bold" value="unique" selected>Unique</option> + <option value="weekly">Every week</option> + <option value="dayly">Every day</option> + </select> + </div> + <div class="form-group"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding">Description of the circuit:</label> + <textarea id="description" name="description" class="form-control"></textarea> + </div> + <div class="form-group"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding">Capacity for the circuit:</label> + <input type="number" id="capacity" name="capacity" value="12" class="form-control"> + </div> + <div class="form-group text-center"> + <button id="validateCircuit" class="btn btn-success"><?php echo Yii::t("common", "Start the circuit") ?></button> + </div> +</div> +<div class="podDash col-md-12 margin-top-20"> + <ul class="nav pull-left"> + <li class="nav-item active"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-circuits-home"> + <?php echo Yii::t("common","Circuits") ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-circuits-backups"> + <?php echo Yii::t("common","Backups") ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-circuits-reservations"> + <?php echo Yii::t("common","Reservations") ?> + </a> + </li> + </ul> + <div class="content-view-circuits col-md-12 col-sm-12 col-xs-12 margin-bottom-20 padding-10 bg-white"> + </div> +</div> +<script type="text/javascript"> + var hashDir=".view.circuits"; + var dir="<?php echo @$dir; ?>"; + jQuery(document).ready(function() { + $("#validateCircuit").click(function(){ + startCircuit($(this)); + }); + getCircuitsDir(dir); + bindButtonMenu(); + }); + function getCircuitsDir(dir){ + if(typeof dir != "undefined" && dir!="undefined" && dir!=""){ + if(dir=="backups") + loadCircuitsBackup(); + else if(dir=="reservations") + loadCircuitsReservations(); + } else + loadCircuitsHome(); + } + function bindButtonMenu(){ + /*$(".nav-link").click(function(){ + $(".podDash .nav .nav-item").removeClass("active"); + $(this).parent().addClass("active"); + });*/ + $(".show-form-new-circuit").click(function(){ + $("#create-new-circuit").toggle("slow"); + }); + $("#btn-circuits-home").click(function(){ + location.hash=hashUrlPage+hashDir; + loadCircuitsHome(); + }); + $("#btn-circuits-backups").click(function(){ + location.hash=hashUrlPage+hashDir+".dir.backups"; + loadCircuitsBackup(); + }); + + $("#btn-circuits-reservations").click(function(){ + location.hash=hashUrlPage+hashDir+".dir.reservations"; + loadCircuitsReservations(); + }); + } + function loadCircuitsHome(){ + initBtnDash("#btn-circuits-home"); + data={category:["circuits"],actionType:"admin","admin":true}; + var url = "element/list"; + showLoader('.content-view-circuits'); + ajaxPost('.content-view-circuits', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function loadCircuitsBackup(){ + initBtnDash("#btn-circuits-backups"); + data={category:["backups"],type:"circuits", actionType:"backup", admin:true}; + var url = "element/list"; + showLoader('.content-view-circuits'); + ajaxPost('.content-view-circuits', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function loadCircuitsReservations(){ + + } + function initBtnDash(dom){ + $(".podDash .nav .nav-item").removeClass("active"); + $(dom).parent().addClass("active"); + } + function startCircuit($this){ + if($("#create-new-circuit #name").val()=="" + || $("#create-new-circuit #description").val()=="" + ){ + $this.parent().append("<div class='alert-danger col-md-12 col-sm-12 col-xs-12'>Please enter something for name and description</div>"); + return false; + }else + $this.parent().find(".alert-danger").remove(); + circuit.obj.show=true; + circuit.obj.name=$("#create-new-circuit #name").val(); + circuit.obj.description=$("#create-new-circuit #description").val(); + circuit.obj.capacity=$("#create-new-circuit #capacity").val(); + circuit.obj.frequency=$("#create-new-circuit #frequency").val(); + $("#create-new-circuit #name").val(""); + $("#create-new-circuit #description").val(""); + $("#create-new-circuit #capacity").val(12); + $("#create-new-circuit #frequency").val("unique"); + localStorage.setItem("circuit",JSON.stringify(circuit.obj)); + circuit.countCircuit("init"); + toastr.success("You can began to create the circuit"); + urlCtrl.loadByHash("#activities"); + + }; +</script> \ No newline at end of file diff --git a/views/admin/terla/index.php b/views/admin/terla/index.php new file mode 100755 index 0000000000000000000000000000000000000000..fdb068ff4e3f8bb32dba3e641bbcc7b46f25f4f1 --- /dev/null +++ b/views/admin/terla/index.php @@ -0,0 +1,200 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> +<!-- start: PAGE CONTENT --> +<style type="text/css"> + #content-view-admin, #goBackToHome{ + display: none; + } + #content-social{ + margin-top: 70px; + min-height:700px; + background-color: white; + } + .addServices, .show-form-new-circuit{ + display:none; + } +</style> + +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding" id="content-social"> + <?php if(@Yii::app()->session["userIsAdmin"]){ ?> + <div class="col-md-10 col-sm-10 col-xs-12 margin-top-20" id="navigationAdmin"> + <ul class="list-group text-left no-margin"> + <?php if( Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) )) { ?> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a href="javascript:;" class=" text-yellow" id="btn-community" style="cursor:pointer;"> + <i class="fa fa-user fa-2x"></i> + <?php echo Yii::t("admin", "Community"); ?> + </a> + </li> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="text-red" id="btn-services" style="cursor:pointer;" href="javascript:;"> + <i class="fa fa-plus fa-2x"></i> + <?php echo Yii::t("admin", "Services"); ?> + </a> + </li> + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="text-red" id="btn-circuits" style="cursor:pointer;" href="javascript:;"> + <i class="fa fa-ravelry fa-2x"></i> + <?php echo Yii::t("admin", "Circuits"); ?> + </a> + </li> + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-green" style="cursor:pointer;" href="#log.monitoring"> + <i class="fa fa-list fa-2x"></i> + <?php echo Yii::t("admin", "LOG"); ?> + </a> + </li> + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-yellow" style="cursor:pointer;" href="#admin.mailerrordashboard"> + <i class="fa fa-envelope fa-2x"></i> + <?php echo Yii::t("admin", "MAILERROR"); ?> + </a> + </li> + <?php } ?> + </ul> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="goBackToHome"> + <a href="javascript:;" class="col-md-12 col-sm-12 col-xs-12 padding-20 text-center bg-orange" id="btn-home" style="font-size:20px;"><i class="fa fa-home"></i> Back to administrator home</a> + <a href="javascript:;" data-form-type="service" data-form-subtype="" + data-dismiss="modal" + class="col-md-12 col-sm-12 col-xs-12 padding-20 btn-open-form text-center addServices" style="font-size:20px;background-color: #18BC9C;color: white;"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common", "Create a service") ?> + </a> + <a href="javascript:;" class="col-md-12 col-sm-12 col-xs-12 padding-20 text-center show-form-new-circuit" style="font-size:20px;background-color: #18BC9C;color: white;"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common", "Create a circuit") ?></a> + </div> + <div id="content-view-admin" class="col-md-12 col-sm-12 col-xs-12 no-padding"></div> + <?php }else{ ?> + <div class="col-md-10 col-sm-10 col-xs-10 alert-danger text-center margin-top-20"><strong><?php echo Yii::t("common","You are not authorized to acces adminastrator panel ! <br/>Connect you or contact us in order to become admin system") ?></strong></div> + <?php } ?> +</div> +<!-- end: PAGE CONTENT--> +<script type="text/javascript"> + // initKInterface(); + var superAdmin="<?php echo @Yii::app()->session["userIsAdmin"] ?>"; + var edit=true; + var hashUrlPage = "#admin"; + var subView="<?php echo @$_GET['view']; ?>"; + var dir="<?php echo @$_GET['dir']; ?>"; + jQuery(document).ready(function() { + //loadDetail(true); + if(superAdmin == ""){ + urlCtrl.loadByHash(""); + bootbox.dialog({message:'<div class="alert-danger text-center"><strong><?php echo Yii::t("common","You are not authorized to acces adminastrator panel ! <br/>Connect you or contact us in order to become admin system") ?></strong></div>'}); + } + bindAdminButtonMenu(); + initKInterface(); + getAdminSubview(subView, dir); + //KScrollTo("#topPosKScroll"); + }); + //function goProAccount(){ + // urlCtrl.loadByHash("#page.type.citoyens.id."+contextData.id+".view.pro"); + //} + function getAdminSubview(sub, dir){ console.log("getProfilSubview", sub, dir); + if(sub!=""){ + if(sub=="community") + loadCommunity(); + else if(sub=="services") + loadServices(); + else if(sub=="circuits") + loadCircuits(dir); + /*else if(sub=="backups") + loadBackup(); + else if(sub=="bookings"){ + loadListPro(); + }*/ + } else + loadIndex(); + } + function bindAdminButtonMenu(){ + /*$(".nav-link").click(function(){ + $(".podDash .nav .nav-item").removeClass("active"); + $(this).parent().addClass("active"); + });*/ + + $("#btn-home").click(function(){ + location.hash=hashUrlPage; + loadIndex(); + }); + $("#btn-community").click(function(){ + location.hash=hashUrlPage+".view.community"; + loadCommunity(); + }); + $("#btn-circuits").click(function(){ + location.hash=hashUrlPage+".view.circuits"; + loadCircuits(); + }); + $("#btn-services").click(function(){ + location.hash=hashUrlPage+".view.services"; + loadServices(); + }); + $(".btn-open-form").click(function(){ + dyFObj.openForm($(this).data("form-type"),"sub"); + }); + } + function loadIndex(){ + initDashboard(true); + //var url = "element/about/type/"+contextData.type+"/id/"+contextData.id; + //ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, null, function(){},"html"); + } + function loadCommunity(){ + initDashboard(); + initType=["citoyens"]; + data={initType:initType}; + var url = "admin/directory"; + //showLoader('.content-view-dashboard'); + ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function loadServices(){ + initDashboard(); + initType=["services"]; + data={initType:initType}; + var url = "admin/directory"; + //showLoader('.content-view-dashboard'); + $("#goBackToHome .addServices").show(700); + ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + + } + function loadCircuits(dir){ + initDashboard(); + //data={category:["circuits"],actionType:"history"}; + var url = "admin/circuits/dir/"+dir; + $("#goBackToHome .show-form-new-circuit").show(700); + ajaxPost('#content-view-admin', baseUrl+'/'+moduleId+'/'+url, null, function(){},"html"); + } + function loadBackup(){ + initBtnDash("#btn-backup"); + data={category:["backups"],actionType:"backup"}; + var url = "element/list/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function showLoader(id){ + $(id).html("<center><i class='fa fa-spin fa-refresh margin-top-50 fa-2x'></i></center>"); + } + function inintDescs() { + return true; + } + function initDashboard(home){ + if(home){ + $("#goBackToHome, #content-view-admin").hide(700); + $("#navigationAdmin").show(700); + $("#goBackToHome .addServices, #goBackToHome .show-form-new-circuit").hide(700); + } else { + $("#navigationAdmin").hide(700); + $("#goBackToHome, #content-view-admin").show(700); + showLoader('#content-view-dashboard'); + } + } + function descHtmlToMarkdown() { + mylog.log("htmlToMarkdown"); + } +</script> \ No newline at end of file diff --git a/views/adminpublic/adddata.php b/views/adminpublic/adddata.php new file mode 100755 index 0000000000000000000000000000000000000000..02e42a177b3566d4ac4389aae18afda112ca1d26 --- /dev/null +++ b/views/adminpublic/adddata.php @@ -0,0 +1,592 @@ +<?php +$cs = Yii::app()->getClientScript(); +$cssAnsScriptFilesModule = array( + '/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css', + '/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js' +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->request->baseUrl); +$userId = Yii::app()->session["userId"] ; +$userId = Yii::app()->session["userId"] ; + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> +<style> + .dropdown-menu{ + width: 100%; + } + .btn-add-to-directory{ + font-size: 14px; + margin-right: 0px; + border-radius: 6px; + color: #666; + border: 1px solid rgba(188, 185, 185, 0.69); + margin-left: 3px; + float: left; + padding: 1px; + width: 24px; + margin-top: 15px; + } + .img-logo { + height: 290px; + } + .btn-filter-type{ + height:35px; + border-bottom: 3px solid transparent; + } + .btn-filter-type.active{ + height:35px; + border-bottom: 3px solid #383f4e; + } + .btn-filter-type:hover{ + height:35px; + border-bottom: 3px solid #383f4e; + } + .btn-scope{ + display: inline; + } + .lbl-scope-list { + top: 255px; + } + .btn-tag{ + font-weight:300; + padding-left: 0px; + } + .btn-tag.bold{ + font-weight:600; + } + .searchEntity{ + padding: 10px; + } + .searchEntity:hover{ + background-color: #d9d9d9; + } + + #searchLink{ + margin-top: 10px; + margin-bottom: 10px; + } + + #searchLink .entityName{ + font-size: 14px; + } + + .vcenter { + display: inline-block; + vertical-align: middle; + float: none; + } + + @media screen and (max-width: 1024px) { + #menu-directory-type .hidden-sm{ + display:none; + } + } + +@media screen and (max-width: 767px) { + .searchEntity{ + /*margin-left: 25px !important;*/ + } + + #searchBarText{ + font-size:13px !important; + margin-right:-30px; + } + /*.btn-add-to-directory { + position: absolute; + right: 0px; + z-index:9px !important; + }*/ +} + + +</style> + +<div class="col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + <div class="col-xs-12 no-padding "> + <h4>Obligatoire</h4> + <div class="col-sm-4 col-xs-12"> + <label for="chooseElement"><?php echo Yii::t("common", "Element"); ?> : </label> + <select id="chooseElement" name="chooseElement" class=""> + <option value="-1"><?php echo Yii::t("common", "Choose"); ?></option> + <option value="<?php echo City::COLLECTION; ?>"><?php echo Yii::t("common", "City"); ?></option> + <option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option> + <option value="<?php echo Project::COLLECTION; ?>"><?php echo Yii::t("common", "Project"); ?></option> + <option value="<?php echo Event::COLLECTION; ?>"><?php echo Yii::t("common", "Event"); ?></option> + <option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option> + </select> + </div> + <div class="col-sm-4 col-xs-12"> + <label for="fileImport">Fichier JSON :</label> + <input type="file" id="fileImport" name="fileImport" accept=".json,.js"> + </div> + </div> + <div class="col-xs-12 no-padding"> + <h4>Option</h4> + <div class="col-xs-12"> + <label for="checkboxLink">Lier les entités : <input type="hidden" id="isLink" value=""/></label> + <input id="checkboxLink" name="checkboxLink" type="checkbox" data-on-text="<?php echo Yii::t("common","Yes") ?>" data-off-text="<?php echo Yii::t("common","No") ?>"/> + <br/> + <div id="searchLink" class="input-group col-xs-8 pull-left hide"> + <span class="input-group-btn"> + <select id="chooseElementLink" name="chooseElementLink" class=""> + <option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option> + <option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option> + <option value="<?php echo Event::COLLECTION; ?>"><?php echo Yii::t("common", "Event"); ?></option> + <option value="<?php echo Project::COLLECTION; ?>"><?php echo Yii::t("common", "Project"); ?></option> + </select> + </span> + <input id="searchBarText" data-searchPage="true" type="text" placeholder="Chercher le citoyen ou l'organisation pour lier les données importer" class="input-search form-control"> + <span class="input-group-btn"> + <a href="javascript:;" class="btn btn-success btn-start-search tooltips" id="btn-start-search"> + <i class="fa fa-search"></i> + </a> + </span> + <ul class="dropdown-menu" id="dropdown_searchInvite" style=""> + <li class="li-dropdown-scope"></li> + </ul> + </div> + <!-- onclick='addElementLink("name","name")' --> + <div id="resultSearchEntity" class='col-xs-8 no-padding hide'> + Link : + <span id="nameSearchEntity" class='vcenter entityName text-dark'></span> + <img id="imgSearchEntity" width='40' height='40' class='img-circle' src=''/> + <input type="hidden" id="idSearchEntity" value=""/> + <select id="roleLink" name="roleLink" class=""> + <option value="member"><?php echo Yii::t("common", "Member"); ?></option> + <option value="admin"><?php echo Yii::t("common", "Admin"); ?></option> + </select> + </div> + </div> + </div> + + <div class="col-xs-12 center"> + <br/><a href="#" class="btn btn-primary col-sm-3" id="sumitVerification">Ajouter</a> + </div> + <br/> + <div id="resultAddData"> + <br/><h4 class="panel-title">Résultat</h4> + + <div class="panel-body"> + <div id="divtab" class="table-responsive"> + <table id="tabcreatemapping" class="table table-striped table-bordered table-hover"> + <thead> + <tr> + <th class="col-sm-5">Entité</th> + <th class="col-sm-5">Result</th> + <th class="col-sm-5">Url</th> + <th class="col-sm-5">Type</th> + <th class="col-sm-5">Id</th> + </tr> + </thead> + <tbody class="directoryLines" id="bodyResult"> + + </tbody> + </table> + </div> + </div> + </div> + +</div> + + + + + + +<script type="text/javascript"> +var file = "" ; +var extensions = ["json", "js", "geojson"]; +var nameFile = ""; +var typeFile = ""; +var typeElement = ""; +var searchType = [ "persons" ]; +jQuery(document).ready(function() +{ + + bindAddData(); + +}); + + + +function bindAddData(){ + + $("#fileImport").change(function(e) { + var nameFileSplit = $("#fileImport").val().split("."); + if(extensions.indexOf(nameFileSplit[nameFileSplit.length-1]) == -1){ + toastr.error("Vous devez sélectionner un fichier JSON"); + return false ; + } + nameFile = nameFileSplit[0]; + typeFile = nameFileSplit[nameFileSplit.length-1]; + file = ""; + if (e.target.files != undefined) { + var reader = new FileReader(); + reader.onload = function(e) { + file = e.target.result; + }; + reader.readAsText(e.target.files.item(0)); + } + return false; + + }); + + $("#checkboxLink").bootstrapSwitch(); + $("#checkboxLink").on("switchChange.bootstrapSwitch", function (event, state) { + mylog.log("state = "+state ); + $("#isLink").val(state); + if(state == true){ + $("#searchLink").removeClass("hide"); + }else{ + $("#searchLink").addClass("hide"); + } + }); + + $("#chooseElementLink").change(function(){ + console.log("chooseElementLink : " + $("#chooseElementLink").val()); + if($("#chooseElementLink").val() == "<?php echo Person::COLLECTION; ?>") + searchType = [ "persons" ]; + else if($("#chooseElementLink").val() == "<?php echo Organization::COLLECTION; ?>") + searchType = [ "organizations" ]; + else if($("#chooseElement").val() == "<?php echo Project::COLLECTION; ?>") + searchType = [ "projects" ]; + else if($("#chooseElement").val() == "<?php echo Event::COLLECTION; ?>") + searchType = [ "events" ]; + initLink(); + }); + + $("#chooseElement").change(function(){ + console.log("chooseElement : " + $("#chooseElement").val()); + var options = "" ; + if($("#chooseElement").val() == "<?php echo Person::COLLECTION; ?>"){ + options = '<option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option>'; + } + else if($("#chooseElement").val() == "<?php echo Organization::COLLECTION; ?>"){ + options = '<option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option>'+ + '<option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option>'; + }else if($("#chooseElement").val() == "<?php echo Project::COLLECTION; ?>"){ + options = '<option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option>'+ + '<option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option>'; + }else if($("#chooseElement").val() == "<?php echo Event::COLLECTION; ?>"){ + options = '<option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option>'+ + '<option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option>'+ + '<option value="<?php echo Event::COLLECTION; ?>"><?php echo Yii::t("common", "Event"); ?></option>'+ + '<option value="<?php echo Project::COLLECTION; ?>"><?php echo Yii::t("common", "Project"); ?></option>'; + } + $("#chooseElementLink").html(options); + initLink(); + + }); + + $('#btn-start-search').off().on('click', function(e){ + loadingData = false; + console.log("btn-start-search", typeof callBackSearch(loadingData)); + //signal que le chargement est terminé + startSearch(0, 15, callBackSearch); + }); + + + $("#sumitVerification").off().on('click', function(e){ + if($("#chooseElement").val() == "-1"){ + toastr.error("Vous devez sélectionner un élément"); + return false ; + } + else if(file == ""){ + toastr.error("Vous devez sélectionner un fichier"); + return false ; + } + + $.blockUI({ + message : "<h1 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> Processing ...</h1>" + }); + + var params = { + file : file, + typeElement : $("#chooseElement").val() + }; + + + if($("#isLink").val() == "true"){ + params["isLink"] = true; + params["typeLink"] = $("#chooseElementLink").val(); + params["idLink"] = $("#idSearchEntity").val(); + params["roleLink"] = $("#roleLink").val(); + } + + + $.ajax({ + type: 'POST', + data: params, + url: baseUrl+'/'+moduleId+'/adminpublic/adddataindb/', + dataType : 'json', + success: function(data){ + console.log("data",data); + var chaine = ""; + var csv = '"name";"info";"url"' ; + if(typeof data.resData != "undefined"){ + $.each(data.resData, function(key, value2){ + chaine += "<tr>" + + "<td>"+value2.name+"</td>"+ + "<td>"+value2.info+"</td>"+ + "<td>"+(notNull(value2.url) ? baseUrl+value2.url : "")+"</td>"+ + "<td>"+value2.type+"</td>"+ + "<td>"+(notNull(value2.id) ? baseUrl+value2.id : "")+"</td>"+ + "</tr>"; + csv += "\n"; + csv += '"'+value2.name+'";"'+value2.info+'";"'+baseUrl+value2.url+'";"'+value2.type+'";"'+value2.id+'";' ; + + }); + } + + $("<a />", { + "download": "Data_a_verifier.csv", + "href" : "data:application/csv," + encodeURIComponent(csv) + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() ; + + $("#bodyResult").html(chaine); + $.unblockUI(); + + }, + error:function(data){ + mylog.log("error",data); + $.unblockUI(); + } + }); + + + + + return false; + + }); +} + +function callBackSearch(data){ + console.log("callBackSearch", data); + str = ""; + var city, postalCode = ""; + $.each(data, function(key, element) { + + var typeIco = key; + var ico = "fa-"+typeObj["default"].icon; + var color = mapColorIconTop["default"]; + + mapElements.push(element); + typeIco = element.type; + ico = ("undefined" != typeof typeObj[typeIco]) ? "fa-"+typeObj[typeIco].icon : "fa-"+typeObj["default"].icon; + color = ("undefined" != typeof mapColorIconTop[typeIco]) ? mapColorIconTop[typeIco] : mapColorIconTop["default"]; + htmlIco ="<i class='fa "+ ico +" fa-2x bg-"+color+"'></i>"; + + if("undefined" != typeof element.profilThumbImageUrl && element.profilThumbImageUrl != ""){ + var htmlIco= "<img width='60' height='60' class='img-circle bg-"+color+"' src='"+baseUrl+element.profilThumbImageUrl+"'/>"; + } + city=""; + var postalCode = element.cp + + if (element.address != null) { + city = element.address.addressLocality; + postalCode = element.cp ? element.cp : element.address.postalCode ? element.address.postalCode : ""; + } + + //var id = getObjectId(element); + var id = element.id ; + var insee = element.insee ? element.insee : ""; + type = element.type; + if(type=="citoyen") + type = "person"; + var url = "javascript:"; + var onclick = 'urlCtrl.loadByHash("#' + type + '.detail.id.' + id + '");'; + var onclickCp = ""; + var target = " target='_blank'"; + var dataId = ""; + if(type == "city"){ + url = "javascript:"; + onclick = 'setScopeValue($(this))'; + onclickCp = 'setScopeValue($(this));'; + target = "";dataId = element.name; + } + var tags = ""; + if(typeof element.tags != "undefined" && element.tags != null){ + $.each(element.tags, function(key, value){ + if(value != "") + tags += "<span class='badge bg-red btn-tag'>#" + value + "</span>"; + }); + } + var name = typeof element.name != "undefined" ? element.name : ""; + var postalCode = ( typeof element.address != "undefined" && + typeof element.address.postalCode != "undefined") ? element.address.postalCode : ""; + + if(postalCode == "") + postalCode = typeof element.cp != "undefined" ? element.cp : ""; + var cityName = (typeof element.address != "undefined" && + typeof element.address.addressLocality != "undefined") ? element.address.addressLocality : ""; + var fullLocality = postalCode + " " + cityName; + var description = (typeof element.shortDescription != "undefined" && + element.shortDescription != null) ? element.shortDescription : ""; + + console.log("id", id, typeof id) ; + //onclick='addElementLink("+ name + "," + name + ");' + str = ""; + str += "<li class='li-dropdown-scope'>"; + str += "<div class='col-md-12 searchEntity' id='elementSearch"+id+"' >"; + str += "<div id='elementImgSearch"+id+"' class='col-md-2 col-sm-2 col-xs-3 no-padding'>"+ htmlIco + "</div>"; + target = ""; + str += "<div class='col-md-8 col-sm-9 col-xs-6 entityRight'>"; + str += "<span id='elementNameSearch"+id+"' class='entityName text-dark'>" + name + "</span>"; + if(fullLocality != "" && fullLocality != " ") + str += "<span class='entityLocality'><i class='fa fa-home'></i> " + fullLocality + "</span>"; + if(description != "") + str += "<div class='entityDescription'>" + description + "</div>"; + str += tags; + str += "</div>"; + str += "</li>"; + + $("#dropdown_searchInvite").html(str); + $('#elementSearch'+id).off().on('click', function(e){ + $("#resultSearchEntity").removeClass("hide"); + $("#nameSearchEntity").html(name); + $("#idSearchEntity").val(key); + //$("#imgSearchEntity").html(htmlIco); + $("#imgSearchEntity").addClass("bg-"+color); + $("#imgSearchEntity").attr('src',baseUrl+element.profilThumbImageUrl); + + $("#dropdown_searchInvite").css({"display" : "none" }); + $("#dropdown_search").html(""); + }); + + }); + //$("#dropdown_searchInvite").html(str); + $("#dropdown_searchInvite").css({"display" : "inline" }); + + + + +} + +function startSearch(indexMin, indexMax, callBack){ + console.log("startSearch", typeof callBack, callBack); + if(loadingData) return; + loadingData = true; + + //mylog.log("loadingData true"); + indexStep = 0; + + mylog.log("startSearch", indexMin, indexMax, indexStep); + + var name = $('#searchBarText').val(); + + if(name == "" && searchType.indexOf("cities") > -1) return; + + if(typeof indexMin == "undefined") indexMin = 0; + if(typeof indexMax == "undefined") indexMax = indexStep; + + mapElements = new Array(); + + mylog.log("name", name, name.length); + if(name.length>=3 || name.length == 0){ + var locality = ""; + if(communexionActivated){ + if(typeof(cityInseeCommunexion) != "undefined"){ + if(levelCommunexion == 1) locality = cpCommunexion; + if(levelCommunexion == 2) locality = inseeCommunexion; + }else{ + if(levelCommunexion == 1) locality = inseeCommunexion; + if(levelCommunexion == 2) locality = cpCommunexion; + } + //if(levelCommunexion == 3) locality = cpCommunexion.substr(0, 2); + if(levelCommunexion == 3) locality = inseeCommunexion; + if(levelCommunexion == 4) locality = inseeCommunexion; + if(levelCommunexion == 5) locality = ""; + } + autoCompleteSearch(name, locality, indexMin, indexMax, callBack); + }else{ + + } +} + + + +function autoCompleteSearch(name, locality, indexMin, indexMax, callBack){ + console.log("autoCompleteSearch", typeof callBack, callBack); + if(typeof(cityInseeCommunexion) != "undefined"){ + var levelCommunexionName = { 1 : "CODE_POSTAL_INSEE", + 2 : "INSEE", + 3 : "DEPARTEMENT", + 4 : "REGION" + }; + }else{ + var levelCommunexionName = { 1 : "INSEE", + 2 : "CODE_POSTAL_INSEE", + 3 : "DEPARTEMENT", + 4 : "REGION" + }; + } + //mylog.log("levelCommunexionName", levelCommunexionName[levelCommunexion]); + var data = { + "name" : name, + "locality" : "",//locality, + "searchType" : searchType, + "searchTag" : $('#searchTags').val().split(','), //is an array + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + "searchBy" : levelCommunexionName[levelCommunexion], + "indexMin" : indexMin, + "indexMax" : indexMax }; + + loadingData = true; + + str = "<i class='fa fa-circle-o-notch fa-spin'></i>"; + $(".btn-start-search").html(str); + $(".btn-start-search").addClass("bg-azure"); + $(".btn-start-search").removeClass("bg-dark"); + + if(indexMin > 0) + $("#btnShowMoreResult").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + else + $("#dropdown_search").html("<span class='search-loader text-dark' style='font-size:20px;'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span>"); + + if(isMapEnd) + $.blockUI({ + message : "<h3 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span></h3>" + }); + + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/globalautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error autocomplete search"); mylog.dir(data); + //signal que le chargement est terminé + loadingData = false; + }, + success: function(data){ + mylog.log("success autocomplete search"); //mylog.dir(data); + callBackSearch(data); + } + }); + } + + + function initLink(){ + $("#resultSearchEntity").addClass("hide"); + $("#nameSearchEntity").html(""); + $("#idSearchEntity").val(""); + $("#imgSearchEntity").attr('src',""); + + $.each(mapColorIconTop, function(key, color){ + $("#imgSearchEntity").removeClass("bg-"+color); + }); + $('#searchBarText').val(""); + } +</script> \ No newline at end of file diff --git a/views/adminpublic/cleantags.php b/views/adminpublic/cleantags.php new file mode 100644 index 0000000000000000000000000000000000000000..e31dc6366a632bcb79e17a215035699ca854e3b9 --- /dev/null +++ b/views/adminpublic/cleantags.php @@ -0,0 +1,102 @@ +<?php + + $cs = Yii::app()->getClientScript(); + +?> + +<div><h2>Clean-up des tags de Communecter </h2></div> + +<?php + + $m = new MongoClient(); + $db = $m->pixelhumain; + $collections = $db->getCollectionNames(); + $col = $m->selectDB("pixelhumain")->organizations; + + $res = array(); + $nb_col_news=0; + $nb_col_orga=0; + $nb_col_actions=0; + $nb_col_project=0; + $nb_col_surveys=0; + $nb_news=0; + + $doublon = json_decode(file_get_contents("/home/damien/workspace/modules/communecter/data/temp/doublon.json")); + + foreach ($doublon as $key => $value) { + + foreach ($value as $key2 => $value2) { + $tag_filter = array('tags' => $value2); + + foreach ($collections as $collection) { + + $cursor = PHDB::find($collection, $tag_filter); + + foreach ($cursor as $doc) { + + array_push($res, $doc); + + if(isset($doc['name'])) { + print('<br/>Pour l\'élement : '. $doc['name'].'<br/>'); + } + + foreach ($doc['tags'] as $key3 => $value3) { + + if ($value3 == $value2) { + + $phrase = 'Il faut changer '. $value3; + $phrase .= ' dans la collection '. $collection; + $phrase .= ' par le bon tag qui est : '. $key.'<br/>'; + + if ($collection == 'news') { + $nb_col_news++; + } elseif ($collection == 'organizations') { + $nb_col_orga++; + } elseif ($collection == 'actions') { + $nb_col_actions++; + } elseif ($collection == 'projects') { + $nb_col_project++; + } elseif ($collection == 'surveys') { + $nb_col_surveys++; + } + + echo $phrase; + + //Ligne suivante à commenté/décommenté pour réaliser ou pas le Clean Up des tags + + CleanTags::cleanAllTags($collection, $doc, $key, $key3); + + if(!isset($doc['name'])) { + $nb_news++; + } + } + PHDB::update( $collection, array("_id" => $doc['_id']) , + array('$pull' => array("tags" => null)) + ); + } + } + } + } + } +?> + +<div> + <h3>AU FINAL : </h3> + + Il y a <?php echo $nb_news?> news qui vont voir leurs tags modifiés<br/> + Il y a <?php echo $nb_col_orga?> organisations qui vont voir leurs tags modifiés<br/> + Il y a <?php echo $nb_col_actions?> actions qui vont voir leurs tags modifiés<br/> + Il y a <?php echo $nb_col_project?> projets qui vont voir leurs tags modifiés<br/> + Il y a <?php echo $nb_col_surveys?> propositions qui vont voir leurs tags modifiés<br/> +</div> + +<br/> + +<script type="text/javascript"> + + alldata = <?php echo json_encode($res) ?>; + jQuery(document).ready(function() { + setTitle("Espace administrateur","cog"); + }); + +</script> \ No newline at end of file diff --git a/views/adminpublic/createFile.php b/views/adminpublic/createFile.php new file mode 100755 index 0000000000000000000000000000000000000000..a0c3dcd4cb90c745fd07f1fa53609ff49a4a8f28 --- /dev/null +++ b/views/adminpublic/createFile.php @@ -0,0 +1,971 @@ +<?php +$cs = Yii::app()->getClientScript(); +$cssAnsScriptFilesModule = array( + '/plugins/jsonview/jquery.jsonview.js', + '/plugins/jsonview/jquery.jsonview.css', + '/plugins/JSzip/jszip.min.js', + '/plugins/FileSaver.js/FileSaver.min.js', + //'/assets/js/sig/geoloc.js', + /*'/assets/js/dataHelpers.js', + '/assets/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css', + '/assets/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js'*/ +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + + +$userId = Yii::app()->session["userId"] ; + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> + +<style> + .bg-azure-light-1{ + background-color: rgba(43, 176, 198, 0.3) !important; + } + .bg-azure-light-2{ + background-color: rgba(43, 176, 198, 0.7) !important; + } + .bg-azure-light-3{ + background-color: rgba(42, 135, 155, 0.8) !important; + } + + .menu-step-tsr div{ + margin-left: 20px; + font-size: 18px; + width: 15%; + text-align: center; + display: inline-block; + margin-top:15px; + margin-bottom:5px; + } + .menu-step-tsr div.homestead{ + font-size:12px; + } + .menu-step-tsr div.selected { + border-bottom: 7px solid white; + } + + .block-step-tsr div{ + font-size: 18px; + text-align: center; + display: inline-block; + margin-top:15px; + margin-bottom:15px; + } + + .mapping-step-tsr{ + display: inline-block; + margin-top:15px; + margin-bottom:15px; + } + + .nbFile{ + font-size: 18px; + } + + .divJsonClass{ + height: 300px; + } +</style> +<div class="col-xs-12 no-padding bg-white"> + <div class="panel panel-white col-lg-offset-1 col-lg-10 col-xs-12 no-padding"> + + <!-- HEADER --> + <center> + <div class="col-md-12 center bg-azure-light-3 menu-step-tsr section-tsr center"> + <div class="homestead text-white selected" id="menu-step-1"> + <i class="fa fa-2x fa-circle"></i><br/><?php echo Yii::t("common", "Source"); ?> + </div> + <div class="homestead text-white" id="menu-step-2"> + <i class="fa fa-2x fa-circle-o"></i><br/><?php echo Yii::t("common", "Link"); ?> + + </div> + <div class="homestead text-white" id="menu-step-3"> + <i class="fa fa-2x fa-circle-o"></i><br/><?php echo Yii::t("common", "Visualisation"); ?> + </div> + </div> + </center> + + <!-- SOURCE --> + <div class="col-sm-12 block-step-tsr section-tsr" id="menu-step-source"> + <div class="col-sm-4 col-xs-12"> + <label for="chooseElement"><?php echo Yii::t("common", "Element"); ?> : </label> + <select id="chooseElement" name="chooseElement" class=""> + <option value="-1"><?php echo Yii::t("common", "Choose"); ?></option> + <option value="<?php echo Organization::COLLECTION; ?>"><?php echo Yii::t("common", "Organization"); ?></option> + <option value="<?php echo Project::COLLECTION; ?>"><?php echo Yii::t("common", "Project"); ?></option> + <option value="<?php echo Event::COLLECTION; ?>"><?php echo Yii::t("common", "Event"); ?></option> + <option value="<?php echo Person::COLLECTION; ?>"><?php echo Yii::t("common", "Person"); ?></option> + </select> + </div> + <div class="col-sm-4 col-xs-12"> + <label for="selectTypeSource"><?php echo Yii::t("common", "Source"); ?> : </label> + <select id="selectTypeSource" name="selectTypeSource" class=""> + <option value="-1"><?php echo Yii::t("common", "Choose"); ?></option> + <option value="url"><?php echo Yii::t("common", "URL"); ?></option> + <option value="file"><?php echo Yii::t("common", "File"); ?></option> + </select> + </div> + <div class="col-sm-4 col-xs-12"> + <label for="selectTypeSource"><?php echo Yii::t("common", "Link"); ?> : </label> + <select id="chooseMapping" name="chooseMapping" class=""> + <option value="-1"><?php echo Yii::t("common", "Not link"); ?></option> + <?php + if(!empty($allMappings)){ + foreach ($allMappings as $key => $value){ + echo '<option value="'.$key .'">'.$value["name"].'</option>'; + } + } + ?> + </select> + </div> + <div id="divFile" class="col-sm-12 col-xs-12"> + <div class="col-sm-2 col-xs-12"> + <label for="fileImport"><?php echo Yii::t("common", "File (CSV, JSON)"); ?> : </label> + </div> + <div class="col-sm-4 col-xs-12" id="divInputFile"> + <input type="file" id="fileImport" name="fileImport" accept=".csv,.json,.js,.geojson"> + </div> + </div> + <div id="divUrl" class="col-sm-12 col-xs-12"> + <div class="col-sm-4 col-xs-12"> + <label for="textUrl"><?php echo Yii::t("common", "URL (JSON)"); ?> :</label> + <input type="text" id="textUrl" name="textUrl" value=""> + </div> + <div class="col-sm-4 col-xs-12"> + <label for="pathElement"><?php echo Yii::t("common", "Path Elements"); ?> :</label> + <input type="text" id="pathElement" name="pathElement" value=""> + </div> + </div> + <div id="divCsv" class="col-sm-12 col-xs-12"> + <div class="col-sm-4 col-xs-12"> + <label for="selectSeparateur"><?php echo Yii::t("common", "Séparateur"); ?> : </label> + <select id="selectSeparateur" name="selectSeparateur" class=""> + <option value=";"><?php echo Yii::t("common", "Semicolon"); ?></option> + <option value=","><?php echo Yii::t("common", "Comma"); ?></option> + <option value=" "><?php echo Yii::t("common", "Space"); ?></option> + </select> + </div> + <div class="col-sm-4 col-xs-12"> + <label for="selectSeparateurText"><?php echo Yii::t("common", "Separateur de Text"); ?> : </label> + <select id="selectSeparateurText" name="selectSeparateur" class=""> + <option value=""><?php echo Yii::t("common", "Nothing"); ?></option> + <option value='"'><?php echo Yii::t("common", "Quotation marks"); ?></option> + <option value="'"><?php echo Yii::t("common", "Quotes"); ?></option> + </select> + </div> + </div> + <div class="col-sm-12 col-xs-12"> + <a href="javascript:;" id="btnNextStep" class="btn btn-success margin-top-15"><?php echo Yii::t("common", "Next step"); ?></a> + </div> + </div> + + <!-- MAPPING --> + <div class="col-md-12 mapping-step-tsr section-tsr" id="menu-step-mapping"> + <input type="hidden" id="nbLigneMapping" value="0"/> + <div class="col-md-12 nbFile text-dark" > + Il y a <span id="nbFileMapping" class="text-red"> <span> + </div> + <div id="divInputHidden"></div> + <table id="tabcreatemapping" class="table table-striped table-bordered table-hover"> + <thead> + <tr> + <th class="col-sm-5"><?php echo Yii::t("common", "Source"); ?></th> + <th class="col-sm-5"><?php echo Yii::t("common", "Communecter"); ?></th> + <th class="col-sm-2"><?php echo Yii::t("common", "Add")." / ".Yii::t("common", "Remove"); ?></th> + </tr> + </thead> + <tbody class="directoryLines" id="bodyCreateMapping"> + <tr id="LineAddMapping"> + <td> + <select id="selectSource" class="col-sm-12"></select> + </td> + <td> + <select id="selectAttributesElt" class="col-sm-12"></select> + </td> + <td> + <input type="submit" id="addMapping" class="btn btn-primary col-sm-12" value="Ajouter"/> + </td> + </tr> + </tbody> + </table> + <div class="col-sm-12 col-xs-12"> + <div class="col-sm-6 col-xs-12"> + <label for="inputKey">Key : </label> + <input class="" placeholder="Key a attribuer à l'ensemble des données importer" id="inputKey" name="inputKey" value=""> + </div> + <!--<div class="col-sm-6 col-xs-12" id="divCheckboxWarnings"> + <label> + Warnings : <input type="checkbox" value="" id="checkboxWarnings" name="checkboxWarnings"> + </label> + </div>--> + </div> + <div class="col-sm-12 col-xs-12"> + <div class="col-sm-6 col-xs-12"> + <label> + Test : <input class="hide" id="isTest" name="isTest" ></input> + <input id="checkboxTest" name="checkboxTest" type="checkbox" data-on-text="<?php echo Yii::t("common","Yes") ?>" data-off-text="<?php echo Yii::t("common","No") ?>" name="my-checkbox" checked></input> + </label> + </div> + <div class="col-sm-6 col-xs-12" id="divNbTest"> + <label for="inputNbTest">Nombre d'entités à tester max(900) : </label> + <input class="" placeholder="" id="inputNbTest" name="inputNbTest" value="5"> + </div> + </div> + <div class="col-sm-2 col-xs-12" id="divInvite"> + <div class="col-sm-12 col-xs-12" id="divAuthor"> + <label for="nameInvitor">Author Invite: </label> + <input class="" placeholder="" id="nameInvitor" name="nameInvitor" value=""> + </div> + <div class="col-sm-12 col-xs-12" id="divMessage"> + <textarea id="msgInvite" class="" rows="3">Message Invite</textarea> + </div> + </div> + <div class="col-sm-12 col-xs-12"> + <a href="javascript:;" id="btnPreviousStep" class="btn btn-danger margin-top-15"><?php echo Yii::t("common", "Previous step"); ?></a> + <a href="javascript:;" id="btnNextStep2" class="btn btn-success margin-top-15"><?php echo Yii::t("common", "Next step"); ?></a> + </div> + </div> + + <div class="col-md-12 mapping-step-tsr section-tsr" id="menu-step-visualisation"> + <div class="panel-scroll row-fluid height-300"> + <label class="nbFile text-dark">Liste des éléments :</label> + <table id="representation" class="table table-striped table-hover"></table> + </div> + <br/> + <div class="panel-scroll row-fluid height-300"> + <label class="nbFile text-dark">Liste des villes a ajouter :</label> + <table id="saveCitiesTab" class="table table-striped table-hover"></table> + <input type="hidden" id="jsonCities" value=""> + </div> + <br/> + <div class="col-xs-12 col-sm-6"> + <label class="nbFile text-dark"> + Données importés : <span id="nbFileImport" class="text-red"> <span> + </label> + <div class="panel panel-default"> + <div class="panel-body"> + <input type="hidden" id="jsonImport" value=""> + <div class="col-sm-12" style="max-height : 300px ;overflow-y: auto" id="divJsonImportView"></div> + </div> + </div> + <div class="col-sm-12 center"> + <a href="javascript:;" class="btn btn-primary col-sm-2 col-md-offset-2" type="submit" id="btnImport">Save</a> + </div> + + </div> + <div class="col-xs-12 col-xs-12 col-sm-6"> + <label class="nbFile text-dark"> + Données rejetées : <span id="nbFileError" class="text-red"> <span> + </label> + <div class="panel panel-default"> + <div class="panel-body"> + <input type="hidden" id="jsonError" value=""> + <div class="col-sm-12" id="divJsonErrorView" style="max-height : 300px ;overflow-y: auto"></div> + + </div> + </div> + <div class="col-sm-12 col-xs-12 center"> + <a href="javascript:;" class="btn btn-primary col-sm-2" type="submit" id="btnError">Save</a> + </div> + </div> + <div class="col-xs-12 col-sm-12 margin-top-15"> + <button class="btn btn-danger col-sm-2 col-md-offset-4 " onclick="returnStep2()">Retour <i class="fa fa-reply"></i></button> + <a href="#adminpublic.addData" class="btn btn-success col-sm-2 col-md-offset-2" type="submit">Page d'ajout de données</a> + </div> + </div> + + </div> +</div> +<script type="text/javascript"> +var file = [] ; +var csvFile = "" ; +var extensions = ["csv", "json", "js", "geojson"]; +var nameFile = ""; +var typeFile = ""; +var typeElement = ""; +var nbFinal = 0 ; + +jQuery(document).ready(function() { + + setTitle("CreateFile","circle"); + + $("#divFile").hide(); + $("#divCsv").hide(); + $("#divUrl").hide(); + $("#menu-step-mapping").hide(); + $("#menu-step-visualisation").hide(); + bindCreateFile(); + bindUpdate(); + +}); + + +function bindCreateFile(){ + $("#selectTypeSource").change( function (){ + var typeSource = $("#selectTypeSource").val(); + if(typeSource == "url"){ + $("#divUrl").show(); + $("#divCsv").hide(); + $("#divFile").hide(); + } + else if(typeSource == "file"){ + $("#divUrl").hide(); + $("#divFile").show(); + }else{ + $("#divUrl").hide(); + $("#divFile").hide(); + } + }); + + + $("#btnPreviousStep").off().on('click', function(e){ + returnStep1(); + }); + + + $("#btnNextStep").off().on('click', function(e){ + mylog.log($("#selectTypeSource").val(), file.length); + if($("#chooseElement").val() == "-1"){ + toastr.error("Vous devez sélectionner un type d'éléments"); + return false ; + } + else if($("#selectTypeSource").val() == "-1"){ + toastr.error("Vous devez sélectionner une source"); + return false ; + }else if($("#selectTypeSource").val() == "file"){ + if(file.length == 0 && csvFile.length == 0){ + toastr.error("Vous devez sélectionner un fichier."); + return false ; + } + } + var typeSource = $("#selectTypeSource").val(); + typeElement = $("#chooseElement").val(); + + if(typeSource == "url"){ + nameFile = "JSON_URL"; + typeFile = "json"; + $.ajax({ + url: baseUrl+'/'+moduleId+'/adminpublic/getdatabyurl/', + type: 'POST', + dataType: 'json', + data:{ url : $("#textUrl").val() }, + async : false, + success: function (obj){ + mylog.log('success' , obj); + file.push(obj.data) ; + stepTwo(); + }, + error: function (error) { + mylog.log('error', error); + } + }); + } + else if(typeSource == "file"){ + stepTwo(); + } + + return false; + + }); + + + $("#addMapping").off().on('click', function(){ + + var nbLigneMapping = parseInt($("#nbLigneMapping").val()) + 1; + var error = false ; + var msgError = "" ; + + //var selectValueHeadCSV = $("#selectHeadCSV option:selected").text() ; + var selectSource = $("#selectSource option:selected").val() ; + var selectAttributesElt = $("#selectAttributesElt option:selected").text() ; + + + var inc = 1; + while(error == false && inc <= nbLigneMapping){ + if($("#valueSource"+inc).text() == selectSource ){ + error = true; + msgError += "Vous avez déja ajouter l'éléments de la colonne CSV. " + } + + if($("#valueAttributeElt"+inc).text() == selectAttributesElt){ + error = true; + msgError += "Vous avez déja ajouter l'éléments de la colonne du Mapping. " + } + inc++; + } + + if(error == false){ + + var attributeEltSplit = selectAttributesElt.split("."); + if(verifNameSelected(attributeEltSplit)){ + var newOptionSelect = addNewMappingForSelecte(attributeEltSplit, false); + var arrayOption = []; + getOptionHTML(arrayOption, newOptionSelect, ""); + verifBeforeAddSelect(arrayOption); + chaine = "" ; + $.each(arrayOption, function(key, value){ + chaine = chaine + '<option name="optionAttributesElt" values="'+value+'">'+value+'</option>' + }); + + $("#selectAttributesElt").append(chaine); + } + ligne = '<tr id="lineMapping'+nbLigneMapping+'" class="lineMapping"> '; + ligne = ligne + '<td id="valueSource'+nbLigneMapping+'">' + selectSource + '</td>'; + ligne = ligne + '<td id="valueAttributeElt'+nbLigneMapping+'">' + selectAttributesElt + '</td>'; + ligne = ligne + '<td><input type="hidden" id="idHeadCSV'+nbLigneMapping+'" value="'+ selectSource +'"/><a href="javascript:;" class="deleteLineMapping btn btn-danger">X</a></td></tr>'; + $("#nbLigneMapping").val(nbLigneMapping); + $("#LineAddMapping").before(ligne); + + } + else + { + toastr.error(msgError); + } + + bindUpdate(); + return false; + }); + + $(".deleteLineMapping").off().on('click', function(){ + $(this).parent().parent().remove(); + }); + + $("#btnNextStep2").off().on('click', function(){ + processingBlockUi(); + setTimeout(function(){ preStep2(); }, 2000); + return false; + }); + + + $("#btnImport").off().on('click', function(){ + if(notEmpty($('#jsonCities').val())){ + var zip = new JSZip(); + zip.file(nameFile+"_StandardForCommunecter.json", $('#jsonImport').val()); + zip.file("SaveCities.json", $('#jsonCities').val()); + zip.generateAsync({type:"blob"}) + .then(function(content) { + // see FileSaver.js + saveAs(content, nameFile+"_Import.zip"); + }); + }else{ + saveAs($('#jsonImport').val(), nameFile+"_StandardForCommunecter.json"); + } + // $("<a />", { + // "download": nameFile+"_StandardForCommunecter.json", + // "href" : "data:application/json," + encodeURIComponent($('#jsonImport').val()) + // }).appendTo("body") + // .click(function() { + // $(this).remove() + // })[0].click() ; + }); + + $("#btnError").off().on('click', function(){ + $("<a />", { + "download": nameFile+"_NotStandardForCommunecter.json", + "href" : "data:application/json," + encodeURIComponent($('#jsonError').val()) + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() ; + }); +} + +function preStep2(){ + cleanVisualisation(); + var nbLigneMapping = $("#nbLigneMapping").val(); + var inputKey = $("#inputKey").val().trim(); + var infoCreateData = [] ; + + if(nbLigneMapping == 0){ + toastr.error("Vous devez faire au moins une assignation de données"); + $.unblockUI(); + return false ; + }else if(inputKey.length == 0){ + toastr.error("Vous devez ajouter une Key"); + $.unblockUI(); + return false ; + } + else{ + for (i = 0; i <= nbLigneMapping; i++){ + if($('#lineMapping'+i).length){ + var valuesCreateData = {}; + valuesCreateData['valueAttributeElt'] = $("#valueAttributeElt"+i).text(); + //mylog.log(typeof $("#idHeadCSV"+i).val()); + valuesCreateData['idHeadCSV'] = $("#idHeadCSV"+i).val(); + infoCreateData.push(valuesCreateData); + } + } + if(infoCreateData != []){ + + var params = { + infoCreateData : infoCreateData, + typeElement : typeElement, + nameFile : nameFile, + typeFile : typeFile, + pathObject : $('#pathObject').val(), + key : inputKey, + warnings : $("#checkboxWarnings").is(':checked') + } + + if(typeElement == "<?php echo Person::COLLECTION;?>"){ + params["msgInvite"] = $("#msgInvite").val(); + params["nameInvitor"] = $("#nameInvitor").val(); + } + + if($("#checkboxTest").is(':checked')){ + if(typeFile == "csv"){ + //mylog.log("inputNbTest", $("#inputNbTest").val()); + var subFile = file.slice(0,parseInt($("#inputNbTest").val())+1); + params["file"] = subFile; + } + else if(typeFile == "json" || typeFile == "js" || typeFile == "geojson"){ + params["file"] = file; + params["nbTest"] = $("#inputNbTest").val(); + } + //mylog.log(params); + stepThree(params); + showStep3(); + + }else{ + //mylog.log("Here"); + if(typeFile == "csv"){ + var fin = false ; + var indexStart = 1 ; + var limit = 30 ; + var indexEnd = limit; + var head = file.slice(0,1); + + + while(fin == false){ + subFile = head.concat(file.slice(indexStart,indexEnd)); + mylog.log("subFile", subFile.length); + params["file"] = subFile; + + stepThree(params); + + indexStart = indexEnd ; + indexEnd = indexEnd + limit; + if(indexStart > file.length) + fin = true ; + } + showStep3(); + } + else if(typeFile == "json" || typeFile == "js" || typeFile== "geojson"){ + params["file"] = file; + stepThree(params); + showStep3(); + } + } + } + else{ + $.unblockUI(); + toastr.error("Vous devez ajouter des éléments au mapping."); + } + } +} + +function stepTwo(){ + mylog.log("stepTwo", typeFile, typeElement); + var params = { + typeElement : typeElement, + typeFile : typeFile, + idMapping : $("#chooseMapping").val(), + path : $("#pathElement").val() + }; + + if(typeFile == "json" || typeFile == "js" || typeFile == "geojson") + params["file"] = file ; + else + file = dataHelper.csvToArray(csvFile, $("#selectSeparateur").val(), $("#selectSeparateurText").val()) + + $.ajax({ + type: 'POST', + data: params, + url: baseUrl+'/'+moduleId+'/adminpublic/assigndata/', + dataType : 'json', + async : false, + success: function(data) + { + mylog.log("stepTwo data",data); + if(data.result){ + createStepTwo(data); + } + else{ + + } + + } + }); +} +function bindUpdate(data){ + $(".deleteLineMapping").off().on('click', function(){ + $(this).parent().parent().remove(); + }); + + $("#fileImport").change(function(e) { + var fileSplit = $("#fileImport").val().split("."); + if(extensions.indexOf(fileSplit[fileSplit.length-1]) == -1){ + toastr.error("Vous devez sélectionner un fichier en CSV ou JSON"); + return false ; + } + nameFileSplit = fileSplit[0].split('\\'); + mylog.log("nameFileSplit", nameFileSplit); + nameFile = nameFileSplit[nameFileSplit.length-1]; + typeFile = fileSplit[fileSplit.length-1]; + + if(extensions.indexOf(typeFile) == -1) { + alert('Upload CSV or JSON'); + return false; + } + file = []; + if (e.target.files != undefined) { + var reader = new FileReader(); + reader.onload = function(e) { + if(typeFile == "csv"){ + //var csvval=e.target.result.split("\n"); + csvFile = e.target.result; + //mylog.log("csv : ", csvval ); + /*$.each(csvval, function(key, value){ + var ligne = value.split(";"); + var newLigne = []; + $.each(ligne, function(keyLigne, valueLigne){ + //mylog.log("valueLigne", valueLigne); + if(valueLigne.charAt(0) == '"' && valueLigne.charAt(valueLigne.length-1) == '"'){ + var elt = valueLigne.substr(1,valueLigne.length-2); + newLigne.push(elt); + }else{ + newLigne.push(valueLigne); + } + }); + file.push(newLigne); + });*/ + $("#divCsv").show(); + } + else if(typeFile == "json" || typeFile == "js" || typeFile == "geojson") { + $("#divCsv").hide(); + file.push(e.target.result); + } + }; + reader.readAsText(e.target.files.item(0)); + } + return false; + }); +} + +function createStepTwo(data){ + + mylog.log("createStepTwo"); + var chaineSelectCSVHidden = "" ; + if(data.typeFile == "csv"){ + $("#nbFileMapping").html(file.length - 1 + " éléments"); + $.each(file[0], function(key, value){ + chaineSelectCSVHidden += '<option value="'+value+'">'+value+'</option>'; + }); + }else if(data.typeFile == "json"){ + $("#nbFileMapping").html(data.nbElement + " éléments"); + $.each(data.arbre, function(key, value){ + chaineSelectCSVHidden += '<option value="'+value+'">'+value+'</option>'; + }); + } + $("#selectSource").html(chaineSelectCSVHidden); + + chaineAttributesElt = "" ; + $.each(data.attributesElt, function(key, value){ + chaineAttributesElt += '<option name="optionAttributesElt" value="' + value+'">'+value+'</option>'; + }); + + $("#selectAttributesElt").html(chaineAttributesElt); + + if(typeElement != "<?php echo Organization::COLLECTION;?>") + $("#divCheckboxWarnings").hide(); + + if(typeElement != "<?php echo Person::COLLECTION;?>") + $("#divInvite").hide(); + + if(typeof data.arrayMapping != "undefined"){ + var nbLigneMapping = $("#nbLigneMapping").val(); + var i = 0 ; + $.each(data.arrayMapping, function(key, value){ + ligne = '<tr id="lineMapping'+nbLigneMapping+'" class="lineMapping"> '; + ligne = ligne + '<td id="valueSource'+nbLigneMapping+'">' + key + '</td>'; + ligne = ligne + '<td id="valueAttributeElt'+nbLigneMapping+'">' + value + '</td>'; + ligne = ligne + '<td><input type="hidden" id="idHeadCSV'+nbLigneMapping+'" value="'+ key +'"/><a href="javascript:;" class="deleteLineMapping btn btn-danger">X</a></td></tr>'; + nbLigneMapping++; + $("#LineAddMapping").before(ligne); + i++; + + }); + $("#nbLigneMapping").val(nbLigneMapping); + } + + bindUpdate(); + displayStepTwo(); +} + +function verifNameSelected(arrayName){ + var find = false ; + $.each(arrayName, function(key, value){ + var beInt = parseInt(value); + if(!isNaN(beInt)){ + find = true ; + } + }); + return find ; +} + +function displayStepTwo(){ + mylog.log("showStep2") + $('#menu-step-2 i.fa').removeClass("fa-circle-o").addClass("fa-circle"); + $('#menu-step-1 i.fa').removeClass("fa-circle").addClass("fa-check-circle"); + $('#menu-step-1').removeClass("selected"); + $('#menu-step-2').addClass("selected"); + $("#menu-step-mapping").show(400); + $("#menu-step-source").hide(400); + $("#menu-step-visualisation").hide(400); +} + + +function showStep3(){ + mylog.log("showStep3"); + $('#menu-step-3 i.fa').removeClass("fa-circle-o").addClass("fa-circle"); + $('#menu-step-2 i.fa').removeClass("fa-circle").addClass("fa-check-circle"); + $('#menu-step-2').removeClass("selected"); + $('#menu-step-3').addClass("selected"); + $("#menu-step-mapping").hide(400); + $("#menu-step-source").hide(400); + $("#menu-step-visualisation").show(400); + //alert("hello"); + $.unblockUI(); +} + +function returnStep2(){ + mylog.log("returnStep2"); + $('#menu-step-3 i.fa').removeClass("fa-circle").addClass("fa-circle-o"); + $('#menu-step-2 i.fa').removeClass("fa-check-circle").addClass("fa-circle"); + $('#menu-step-3').removeClass("selected"); + $('#menu-step-2').addClass("selected"); + $("#menu-step-mapping").show(400); + $("#menu-step-source").hide(400); + $("#menu-step-visualisation").hide(400); + nbFinal=0; +} + +function returnStep1(){ + mylog.log("returnStep2"); + file = [] ; + nameFile = ""; + typeFile = ""; + typeElement = ""; + nbFinal=0; + $('#divInputFile').html('<input type="file" id="fileImport" name="fileImport" accept=".csv,.json,.js,.geojson">') + $('#menu-step-1 i.fa').removeClass("fa-circle-o").addClass("fa-circle"); + $('#menu-step-2 i.fa').removeClass("fa-circle").addClass("fa-circle-o"); + $('#menu-step-2').removeClass("selected"); + $('#menu-step-1').addClass("selected"); + $("#menu-step-mapping").hide(400); + $("#menu-step-source").show(400); + $("#menu-step-visualisation").hide(400); + $(".lineMapping").remove(); + bindUpdate(); +} + +function addNewMappingForSelecte(arrayMap, subArray){ + var firstElt = arrayMap[0] ; + arrayMap.shift(); + var beInt = parseInt(firstElt); + var newSelect = {} ; + + if(!isNaN(beInt)){ + beInt++; + if(subArray){ + if(arrayMap.length >= 1){ + var newArrayMap = jQuery.extend([], arrayMap); + newSelect[firstElt] = addNewMappingForSelecte(arrayMap, subArray); + newSelect[beInt.toString()] = addNewMappingForSelecte(newArrayMap, subArray); + } + else{ + newSelect[firstElt] = ""; + newSelect[beInt.toString()] = ""; + } + } + else{ + if(arrayMap.length >= 1){ + subArray = true ; + newSelect[beInt.toString()] = addNewMappingForSelecte(arrayMap, subArray); + } + else{ + newSelect[beInt.toString()] = ""; + } + } + } + else{ + if(arrayMap.length >=1){ + newSelect[firstElt] = addNewMappingForSelecte(arrayMap, true); + } + else{ + newSelect[firstElt] = ""; + } + } + return newSelect ; +} + +function getOptionHTML(arrayOption, objectOption, father) +{ + if(!jQuery.isPlainObject(objectOption)){ + arrayOption.push(father); + } + else{ + $.each(objectOption, function(key, values){ + if(father != "") + var newfather = father +"."+ key + else + var newfather = key + getOptionHTML(arrayOption, values, newfather); + }); + } +} + +function verifBeforeAddSelect(arrayMap) +{ + $('[name=optionAttributesElt]').each(function() { + var option = $(this).val() ; + var position = jQuery.inArray( option, arrayMap); + if(position != -1) + arrayMap.splice(position, 1); + //mylog.log("option", option); + }); +} + +function cleanVisualisation(){ + $("#representation").html(""); + $("#jsonImport").val(""); + $("#jsonError").val(""); + $("#jsonCities").val(""); +} + +function createInpu(nameFile, typeFile, typeElement){ + var chaineInputHidden = '<input type="hidden" id="typeElement" value="' + typeElement + '"/>'; + chaineInputHidden += '<input type="hidden" id="nameFile" value="'+nameFile+'"/>'; + chaineInputHidden += '<input type="hidden" id="typeFile" value="'+typeFile+'"/>'; + $("#divInputHidden").html(chaineInputHidden); +} + + +function stepThree(params){ + $.ajax({ + type: 'POST', + data: params, + url: baseUrl+'/'+moduleId+'/adminpublic/previewData/', + dataType : 'json', + async : false, + success: function(data) + { + mylog.log("stepThree data",data); + if(data.result){ + + var importD = "" ; + var errorD = "" ; + var saveCities = "" ; + + if($("#jsonImport").val() == "") + importD = data.elements; + else{ + if(data.elements == "[]") + importD = $("#jsonImport").val(); + else{ + var elt1 = jQuery.parseJSON($("#jsonImport").val()); + var elt2 = jQuery.parseJSON(data.elements); + $.each(elt2, function(key, val){ + elt1.push(val); + }); + importD = JSON.stringify(elt1); + } + + } + + if($("#jsonError").val() == "") + errorD = data.elementsWarnings; + else{ + if(data.elementsWarnings == "[]") + errorD = $("#jsonError").val(); + else{ + var elt1E = jQuery.parseJSON($("#jsonError").val()); + var elt2E = jQuery.parseJSON(data.elementsWarnings); + $.each(elt2E, function(key, val){ + elt1E.push(val); + }); + errorD = JSON.stringify(elt1E); + } + } + + if($("#jsonCities").val() == "") + saveCities = data.saveCities; + else{ + if(data.elements == "[]") + saveCities = $("#jsonCities").val(); + else{ + var elt1 = jQuery.parseJSON($("#jsonCities").val()); + var elt2 = jQuery.parseJSON(data.saveCities); + $.each(elt2, function(key, val){ + elt1.push(val); + }); + saveCities = JSON.stringify(elt1); + } + + } + + + mylog.log("importD",typeof importD); + mylog.log("errorD",typeof errorD); + + $("#jsonImport").val(importD); + $("#jsonCities").val(saveCities); + $("#jsonError").val(errorD); + $("#divJsonImportView").JSONView(importD); + $("#divJsonErrorView").JSONView(errorD); + + + var chaine = "" ; + $.each(data.listEntite, function(keyListEntite, valueListEntite){ + nbFinal++; + chaine += "<tr>" ; + if(keyListEntite == 0) + { + chaine += "<th>N°</th>"; + $.each(valueListEntite, function(key, value){ + chaine += "<th>"+value+"</th>"; + }); + }else{ + chaine += "<td>"+keyListEntite+"</td>"; + $.each(valueListEntite, function(key, value){ + chaine += "<td>"+value+"</td>"; + }); + } + chaine += "</tr>" ; + }); + $("#representation").append(chaine); + + + $("#nbFileImport").html(jQuery.parseJSON(importD).length); + $("#nbFileError").html(jQuery.parseJSON(errorD).length); + + if($("#checkboxTest").is(':checked')){ + $("#btnImport").hide(); + $("#btnError").hide(); + }else{ + $("#btnImport").show(); + $("#btnError").show(); + } + //$("#verifBeforeImport").show(); + } + } + }); +} + + +</script> \ No newline at end of file diff --git a/views/adminpublic/index.php b/views/adminpublic/index.php new file mode 100644 index 0000000000000000000000000000000000000000..6fc99a2702cfd1b2be6e230aea81ee9b14b0abd0 --- /dev/null +++ b/views/adminpublic/index.php @@ -0,0 +1,53 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "adminpublic") ); +?> +<!-- start: PAGE CONTENT --> + + +<div class="col-lg-offset-1 col-lg-10 col-xs-12 no-padding" id="content-social" style="min-height:700px;"> + <div class=""> + <ul class="list-group text-left no-margin"> + <?php + $roles = Role::getRolesUserId(Yii::app()->session["userId"]) ; + if( Role::isSourceAdmin( $roles) || Role::isSuperAdmin($roles ) ) { ?> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-purple" style="cursor:pointer;" href="#adminpublic.createfile"> + <i class="fa fa-upload fa-2x"></i> + <?php echo Yii::t("common", "Converter"); ?> + </a> + </li> + + <li class="list-group-item col-md-4 col-sm-6 "> + <a class="lbh text-red" style="cursor:pointer;" href="#adminpublic.adddata"> + <i class="fa fa-plus fa-2x"></i> + <?php echo Yii::t("common", "IMPORT DATA"); ?> + </a> + </li> + + <!--<li class="list-group-item text-red col-md-4 col-sm-6 "> + <a class="lbh" style="cursor:pointer;" href="#adminpublic.chart"> + <i class="fa fa-plus fa-2x"></i> + <?php //echo Yii::t("common", "SOURCE ADMIN"); ?> + </a> + </li> --> +<?php } ?> + </ul> + </div> +</div> +<!-- end: PAGE CONTENT--> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + //setTitle("Espace administrateur","cog"); + //Index.init(); + initKInterface(); +}); + +</script> \ No newline at end of file diff --git a/views/adminpublic/interopProposed.php b/views/adminpublic/interopProposed.php new file mode 100644 index 0000000000000000000000000000000000000000..9c1997cad573ff8979d8aab99d566aa7223f0bd5 --- /dev/null +++ b/views/adminpublic/interopProposed.php @@ -0,0 +1,124 @@ +<?php +$cs = Yii::app()->getClientScript(); +$cssAnsScriptFilesModule = array( + '/plugins/jsonview/jquery.jsonview.js', + '/plugins/jsonview/jquery.jsonview.css', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + + +$userId = Yii::app()->session["userId"] ; + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; +//header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> + +<div id="main-container-proposition" class="container-all-proposition col-xs-12 bg-white"> + + <table class='table table-bordered col-xs-12'> + <thead> + <tr> + <th>URL de la source de données</th> + <th>User ID</th> + <th>Description</th> + <th>Status</th> + </tr> + </thead> + <tbody id='one_element_table'> + </tbody> + </table> + +</div> + +<?php + + $collection = "proposeOpenDataSource"; + $all_proposition = PHDB::find($collection); + +?> + +<script type="text/javascript"> + + var all_proposition = <?php echo json_encode($all_proposition); ?>; + all_data_proposition = {}; + + $.each(all_proposition, function(index, value) { + + var new_index = index.toString(); + + all_data_proposition[new_index] = []; + all_data_proposition[new_index].push(value.url); + all_data_proposition[new_index].push(value.userID); + all_data_proposition[new_index].push(value.description); + + var class_tr = ""; + + if (value.status == 'accepted') { + class_tr = "class='success'"; + } else if (value.status == "rejected") { + class_tr = "class='danger'"; + } + + $("#one_element_table").append( + + "<tr "+class_tr+">"+ + "<td data-value='"+value.url+"'>" + value.url + " </td>"+ + "<td data-value='"+value.userID+"'> " + value.userID + "</td>"+ + "<td data-value='"+value.description+"'>"+ value.description + + "<td>"+ + "<button id='"+index.toString()+"' style='margin-bottom:5px; text-align='center'; class='btn btn-success btn_validate_status' data-status ='accepted' data-id='"+index.toString()+"'>Valider</button><br>"+ + "<button id='"+index.toString()+"' style='text-align:center;' class='btn btn-danger btn_validate_status' data-status='rejected' data-id='"+index.toString()+"'>Rejeter</button>"+ + "</td>" + + "</tr>" + ) + }); + + $(".btn_validate_status").click(function(){ + ValidateStatus($(this).data('id'), $(this).data('status')); + }); + +function ValidateStatus(id_propose, status) { + + if (confirm("Etes vous sur ?")) { + + $.each(all_data_proposition, function(index, value) { + + if (status == "accepted") { + if (index == id_propose) { + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/interoperability/validateproposeinterop?status="+status+"&idpropose="+id_propose, + dataType: "json", + success: function (data){ + + alert('Vous avez accepté la proposition !'); + } + }); + } + } else if (status == "rejected") { + if (index == id_propose) { + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/interoperability/rejectproposeinterop?status="+status+"&idpropose="+id_propose, + dataType: "json", + success: function (data){ + + alert('Vous avez refusé la proposition !'); + } + }); + } + } + }); + } else { + alert('Vous avec avorté la validation ou le rejet de la proposition'); + } +} + +</script> + + diff --git a/views/app/BCH/prestation.php b/views/app/BCH/prestation.php new file mode 100644 index 0000000000000000000000000000000000000000..a4fb210edd4c34acf27b28476aea09cd91784f12 --- /dev/null +++ b/views/app/BCH/prestation.php @@ -0,0 +1,465 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( array('/css/timeline2.css','/css/news/index.css', + + ) , Yii::app()->theme->baseUrl. '/assets'); + + + $cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/autosize.js', + '/js/news/newsHtml.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "annonces"; + if($params["title"] == "Kgougle") $page = "freedom"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "type" => @$type, + "page" => page) ); +?> +<style> + +.btn-create-news{ + margin-top:0px; + z-index: 10; + border-radius: 0 50%; + -ms-transform: rotate(7deg); + -webkit-transform: rotate(7deg); + transform: rotate(-45deg); +} +.btn-create-news:hover{ + background-color: white!important; + color:#34a853!important; + border: 2px solid #34a853!important; + +} + +.main-btn-scopes { + margin-top: -57px; +} + +#formCreateNewsTemp{ + display: none!important; +} +#modal-create-anc #formCreateNewsTemp{ + display: block!important; +} +#formCreateNewsTemp .form-create-news-container, #formActivity{ + max-width: 60%; + /*margin-left:20%;*/ +} +#sub-menu-left{ + margin-top:1px; + /*text-align: left;*/ +} +#sub-menu-left .btn{ + /*background-color: #4285f4; + border-color: #4285f4;*/ + /*color:white;*/ + /*border-radius:80px;*/ + font-weight: 700; +} +#sub-menu-left .btn.active{ + /*background-color: #fff; + color: #4285f4;*/ +} +/*#sub-menu-left .btn:hover{ + background-color: #1c6df5; + border-color: #4285f4; +}*/ +/*#sub-menu-left .btn.active:hover{ + background-color: #fff; + color: #4285f4; +} +#sub-menu-left .btn.bg-yellow{ + border-color: transparent; +}*/ +<?php + $btnAnc = array("blue" =>array("color1"=>"#4285f4", + "color2"=>"#1c6df5"), + + "green" =>array("color1"=>"#34a853", + "color2"=>"#2b8f45"), + + "red" =>array("color1"=>"#ea4335", + "color2"=>"#cc392d"), + + "yellow" =>array("color1"=>"#fbbc05", + "color2"=>"#e3a800"), + ); +?> + +<?php foreach($btnAnc as $color => $params){ ?> +.btn-anc-color-<?php echo $color; ?>{ + background-color: <?php echo $params["color1"]; ?>; + border-color: <?php echo $params["color1"]; ?>!important; + color: #fff!important; +} + +.btn-anc-color-<?php echo $color; ?>:hover{ + background-color: <?php echo $params["color2"]; ?>!important; + border-color: <?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active{ + background-color:#fff!important; + color:<?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active:hover{ + background-color: #fff; + color: <?php echo $params["color1"]; ?>; +} +<?php } ?> + +.keycat:hover, +.keycat.active, +.btn-select-category-1:hover, +.btn-select-category-1.active{ + background-color: #2C3E50!important; + color: #fff!important; + border-color:transparent!important; +} + + +#sub-menu-left.subsub .btn{ + width:95%; + text-align: left; + background-color: white; + border-color: white; + color:#4285f4; +} +#sub-menu-left.subsub{ + min-width: 180px; +} + +.btn-menu-left-add{ + background-color: transparent !important; + border-color: transparent !important; +} + +#photoAddNews{ + text-align: left; +} + +.tagstags, .form-actions{ + /*display: none!important;*/ +} + + +@media (max-width: 768px) { + .btn-select-type-anc.col-xs-5{ + width:48%!important; + } +} + + @media screen and (min-width: 768px) and (max-width: 1024px) { + .btn-select-type-anc.col-xs-5{ + font-size:0.8em; + } + } + +/* +.elemt_name, .elemt_date{ + display: none; +}*/ +</style> + +<div class="col-md-12 col-sm-12 col-xs-12 bg-white top-page no-padding" id="" style="padding-top:0px!important;"> + + <div class="col-lg-1 hidden-md col-sm-1 hidden-xs"></div> + <?php + $prestation = CO2::getContextList("prestation"); + $currentSection = 1; + ?> + + + <div class="col-lg-2 col-md-2 col-sm-3 col-xs-12 margin-top-25 text-left subsub" id="sub-menu-left"> + <h2 class="bg-orange text-white">FILTRE</h2> + <hr> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10">Toute destination</h4> <span class="col-md-12 bg-orange"><i class="fa fa-caret-right"></i><span> + </div> + <hr> + <?php + foreach ($prestation["categories"] as $key => $cat) { + ?> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category",$cat); ?> + </button><br> + <?php } ?> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10">Vous voyagez</h4> <span class="col-md-12 bg-orange"><i class="fa fa-caret-right"></i><span> + </div> + <hr> + <input type="text" id="filterNumber" value="" placeholder="Number of travellers"> + <label>Date of travel</label> + <span>From</span> + <input type="date" name=""> + <span>To</span> + <input type="date" name=""> + <label>Price for search</label> + <input type="price" name=""> + + <label>Adapted time</label> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Senior"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","PMR"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Famille avec enfants"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Régime alimentaires"); ?> + </button><br> + </div> + + <div class="col-lg-6 col-md-6 col-sm-6 no-padding margin-top-10"> + <h4 class="text-dark padding-bottom-5 margin-top-25 text-center"> + <i class="fa fa-angle-down"></i> Les annonces + <i class="fa fa-angle-right hidden fa-title-list"></i> <span class="letter-blue label-category"><i class="fa fa-"></i> </span> + </h4> + <hr> + + <h5 class="text-center letter-red"> + <button class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-top-5" + data-target="#modalScopes" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="Sélectionner des lieux de recherche"> + <!-- <i class="fa fa-bullseye" style="font-size:18px;"></i> --> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/cible3.png" height=42> + </button><br> + recherche ciblée + </h5> + <!-- <h5 class="text-center letter-red">choisir des sources</h5> --> + + <br> + <div class="scope-min-header list_tags_scopes hidden-xs hidden-sm text-center"></div> + + + <div id="newsstream"></div> + </div> + + <div class="pull-right col-lg-3 col-md-3 col-sm-4 hidden-xs padding-20 margin-top-50" id="nowList"> + + </div> +</div> + + + +<?php $this->renderPartial('../news/modalCreateAnc'); ?> + +<?php $this->renderPartial($layoutPath.'footer', array("subdomain"=>"annonces")); ?> + +<script type="text/javascript" > + +<?php $parent = Person::getById(@Yii::app()->session["userId"]); ?> + + +var indexStepInit = 5; +var searchType = ["organizations", "projects", "events", "needs"]; +var allNewsType = ["news", "idea", "question", "announce", "information"]; + +var liveTypeName = { "news":"<i class='fa fa-rss'></i> Les messages", + "idea":"<i class='fa fa-info-circle'></i> Les idées", + "question":"<i class='fa fa-question-circle'></i> Les questions", + "announce":"<i class='fa fa-ticket'></i> Les annonces", + "information":"<i class='fa fa-newspaper-o'></i> Les informations" + }; + + +var liveScopeType = "global"; + +<?php if(@$type && !empty($type)){ ?> + searchType = ["<?php echo $type; ?>"]; +<?php }else{ ?> + searchType = $.merge(allNewsType, searchType); +<?php } ?> + +var loadContent = '<?php echo @$_GET["content"]; ?>'; +jQuery(document).ready(function() { + + $(".subsub").hide(); + + var liveType = "<?php echo (@$type && !empty($type)) ? $type : ''; ?>"; + if(typeof liveTypeName[liveType] != "undefined") + liveType = " > "+liveTypeName[liveType]; + else liveType = ", la boite à outils citoyenne connectée " + liveType; + + setTitle("Communecter" + liveType, "<i class='fa fa-heartbeat '></i>"); + + //showTagsScopesMin("#list_tags_scopes"); + <?php if(@$lockCityKey){ ?> + lockScopeOnCityKey("<?php echo $lockCityKey; ?>"); + <?php }else{ ?> + rebuildSearchScopeInput(); + <?php } ?> + $("#btn-slidup-scopetags").click(function(){ + slidupScopetagsMin(); + }); + $('#btn-start-search').click(function(e){ //mylog.log("alo"); + startSearch(false); + }); + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + var index = searchType.indexOf(type); + + if(type == "all" && searchType.length > 1){ + $.each(allSearchType, function(index, value){ removeSearchType(value); }); return; + } + if(type == "all" && searchType.length == 1){ + $.each(allSearchType, function(index, value){ addSearchType(value); }); return; + } + + if (index > -1) removeSearchType(type); + else addSearchType(type); + }); + + + //initSelectTypeNews(); + /*$(".searchIcon").removeClass("fa-search").addClass("fa-file-text-o"); + $(".searchIcon").attr("title","Mode Recherche ciblé (ne concerne que cette page)");*/ + $('.tooltips').tooltip(); + searchPage = true; + startSearch(true); + $(".titleNowEvents .btnhidden").hide(); + + //init loading in scroll + $(window).off().bind("scroll",function(){ + if(!loadingData && !scrollEnd){ + var heightWindow = $("html").height() - $("body").height(); + console.log(heightWindow); + if( $(this).scrollTop() >= heightWindow - 400){ + //loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + showNewsStream(false); + } + } + }); + + initKInterface();//{"affixTop":10}); + initFreedomInterface(); + + //KScrollTo(".main-btn-scopes"); + + +}); + +var freedomCategories = <?php echo json_encode($classified["sections"]); ?> + +function initFreedomInterface(){ + $(".btn-select-type-anc").click(function(){ + + $(".btn-select-type-anc").removeClass("active"); + $(this).addClass("active"); + + var typeAnc = $(this).data("type-anc"); + if(typeAnc == "forsale" || typeAnc == "location" || typeAnc == "donation" || + typeAnc == "sharing" || typeAnc == "lookingfor"){ + $(".subsub").show(300); + }else{ + $(".subsub").hide(300); + } + + if(typeof freedomCategories[typeAnc] != "undefined") + $(".label-category").html("<i class='fa fa-"+ freedomCategories[typeAnc]["icon"] + "'></i> " + freedomCategories[typeAnc]["label"]); + $(".label-category").removeClass("letter-blue letter-red letter-green letter-yellow").addClass("letter-"+freedomCategories[typeAnc]["color"]) + $(".fa-title-list").removeClass("hidden"); + KScrollTo(".top-page"); + }); + + $(".btn-select-category-1").click(function(){ + $(".btn-select-category-1").removeClass("active"); + $(this).addClass("active"); + + var keycat = $(this).data("keycat"); + $(".keycat").addClass("hidden"); + $(".keycat-"+keycat).removeClass("hidden"); + }); + + $(".keycat").click(function(){ + $(".keycat").removeClass("active"); + $(this).addClass("active"); + }); + + $("#btn-create-classified").click(function(){ + dyFObj.openForm('classified'); + }); + + initFormImages(); + + //loadLiveNow(); +} + +var timeout; +function startSearch(isFirst){ + //Modif SBAR + //$(".my-main-container").off(); + if(liveScopeType == "global"){ + showNewsStream(isFirst); + }else{ + showNewsStream(isFirst);//loadStream(0,5); + } + //loadLiveNow(); +} + + + +function loadLiveNow () { + + var searchParams = { + "name":"", + "tpl":"/pod/nowList", + "latest" : true, + "searchType" : ["<?php echo Event::COLLECTION?>","<?php echo Project::COLLECTION?>", + "<?php echo Organization::COLLECTION?>","<?php echo ActionRoom::COLLECTION?>"], + "searchTag" : $('#searchTags').val().split(','), //is an array + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + "indexMin" : 0, + "indexMax" : 10 + }; + + + ajaxPost( "#nowList", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if($('.el-nowList').length==0) + $('.titleNowEvents').addClass("hidden"); + else + $('.titleNowEvents').removeClass("hidden"); + } , "html" ); +} + + +function addSearchType(type){ + var index = searchType.indexOf(type); + if (index == -1) { + searchType.push(type); + $(".search_"+type).removeClass("fa-circle-o"); + $(".search_"+type).addClass("fa-check-circle-o"); + } + mylog.log(searchType); +} +function removeSearchType(type){ + var index = searchType.indexOf(type); + if (index > -1) { + searchType.splice(index, 1); + $(".search_"+type).removeClass("fa-check-circle-o"); + $(".search_"+type).addClass("fa-circle-o"); + } + mylog.log(searchType); +} + +function hideNewLiveFeedForm(){ + //$("#newLiveFeedForm").hide(200); + showFormBlock(false); +} + +</script> \ No newline at end of file diff --git a/views/app/admin/live.php b/views/app/admin/live.php new file mode 100755 index 0000000000000000000000000000000000000000..4fd2f03bb349f89a3eec57183eb0a10cb0cdbb1e --- /dev/null +++ b/views/app/admin/live.php @@ -0,0 +1,58 @@ +<h1 class="letter-"><i class="fa fa-grav letter-red"></i> Bonjour <span class="letter-red">Super Admin</span></h1> +<h5 class="letter-"> + <button class="btn btn-sm btn-superadmin" data-action="live" data-idres="#central-container"><i class="fa fa-refresh"></i> </button> + Section : <i class="fa fa-search letter-red"></i> + <span class="font-blackoutM letter-red">live</span> +</h5> + +<br> +<hr> +<br> + +<button class="btn btn-success" id="btn-init-stream"><i class="fa fa-refresh"></i> Actualiser le fil d'actu</button> +<div id="res-loadstream" class="col-md-12"></div> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + + $(".btn-superadmin").off().click(function(){ + var action = $(this).data("action"); + var idres = $(this).data("idres"); + $(idres).html("<i class='fa fa-refresh fa-spin'></i>"); + getAjax(idres ,baseUrl+'/'+moduleId+"/app/superadmin/action/"+action,function(data){ //alert("yeh"); + $(idres).html(data); + },"html"); + }); + + //btn to load media data for first time (if no media found) + $("#btn-init-stream").click(function(){ + initStream(); + }); + +}); + +function initStream(){ + processingBlockUi(); + //toastr.info("Initialisation du LIVE en cours, merci de patienter quelques secondes."); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/mediacrawler", + success: + function(html) { + //$("#res-loadstream").html(html); + toastr.success("Chargement terminé."); + $.unblockUI(); + }, + error:function(xhr, status, error){ + toastr.error("Une erreur s'est produite pendant le chargement du LIVE"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + //toastr.success("404 : Impossible de trouver le script d'initialisation du LIVE"); + } + } + }); +} +</script> \ No newline at end of file diff --git a/views/app/admin/main.php b/views/app/admin/main.php new file mode 100755 index 0000000000000000000000000000000000000000..7fb8334eabec30e37af510079080e4679d033dec --- /dev/null +++ b/views/app/admin/main.php @@ -0,0 +1,95 @@ +<?php + $cssAnsScriptFiles = array( + '/assets/css/circle.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); +?> + +<h1 class="letter-"><i class="fa fa-grav letter-red"></i> Bonjour <span class="letter-red">Super Admin</span></h1> + +<?php if(Yii::app()->params["CO2DomainName"] == "kgougle"){ ?> + <h5 class="letter-">Quelle partie du site souhaitez-vous administrer ?</h5> + + <div class="col-md-4"> + <button class="btn btn-default btn-lg font-blackoutM letter-red col-md-12 padding-10 btn-superadmin" data-action="web"> + <i class="fa fa-search letter-red"></i><br>WEB + </button> + </div> + <div class="col-md-4"> + <button class="btn btn-default btn-lg font-blackoutM letter-red col-md-12 padding-10 btn-superadmin" data-action="live"> + <i class="fa fa-newspaper-o letter-red"></i><br>LIVE + </button> + </div> + <div class="col-md-4"> + <button class="btn btn-default btn-lg font-blackoutM letter-red col-md-12 padding-10 btn-superadmin" data-action="power"> + <i class="fa fa-comments letter-red"></i><br>POWER + </button> + </div> +<?php } ?> + +<?php + $week = @$_POST["week"]; + $visits = CO2Stat::getStatsByHash(@$week); + $days = array("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"); +?> +<style> + .stat-week .col-md-1{ + width:12%!important; + margin:1%!important; + } +</style> +<div class="col-md-12 stat-week padding-bottom-50"> + <hr> + <h4 class="text-left text-azure"> + <i class="fa fa-angle-down"></i> Nombre de visites - Semaine <?php echo $visits["week"]; ?></span> + <br><br> + <button class="btn btn-default pull-left margin-right-5" id="back-week" data-week="<?php echo $visits["numweek"]-1; echo $visits["year"]; ?>"> + <i class="fa fa-chevron-left"></i> Sem <?php echo $visits["numweek"]-1; ?> + </button> + <?php if($visits["numweek"]< Date("W")){ ?> + <button class="btn btn-default pull-left" id="next-week" data-week="<?php echo $visits["numweek"]+1; echo $visits["year"]; ?>"> + Sem <?php echo $visits["numweek"]+1; ?> <i class="fa fa-chevron-right"></i> + </button> + <?php } ?> + </h4> + + <?php foreach ($visits["hash"] as $domain => $stats) { $totalLoad = 0; ?> + <div class="col-md-12 text-center"> + <?php foreach ($days as $key => $day) { $totalLoad += @$stats[$day]["nbLoad"] ? $stats[$day]["nbLoad"] : 0; } ?> + <h3 class="text-left">#<?php echo $domain; ?> <small class="letter-azure">(<?php echo $totalLoad; ?>)</small></h3> + <?php foreach ($days as $key => $day) { ?> + <?php + $bg = "white"; + $text = "dark"; + if(@$stats[$day]["nbLoad"] > 0) { $text = "azure"; } + if(@$stats[$day]["nbLoad"] > 50) { $text = "green"; } + if(@$stats[$day]["nbLoad"] > 100) { $text = "orange"; } + if(@$stats[$day]["nbLoad"] > 300) { $text = "red"; } + ?> + <div class="col-md-1 bg-<?php echo $bg;?> letter-<?php echo $text;?> padding-10 radius-5 border-white-2"> + <h3 class="no-margin"><?php echo @$stats[$day]["nbLoad"]; ?></h3> + <?php echo $day; ?> + </div> + <?php } ?> + </div> + <?php } ?> +</div> + + +<script type="text/javascript"> + + jQuery(document).ready(function() { + $(".btn-superadmin").click(function(){ + var action = $(this).data("action"); + getAjax('#central-container' ,baseUrl+'/'+moduleId+"/app/superadmin/action/"+action,function(){ + + },"html"); + }); + + $("#back-week, #next-week").click(function(){ + var numweek = $(this).data("week"); + loadAdminDashboard(numweek); + }); + }); + +</script> \ No newline at end of file diff --git a/views/app/admin/modalEditUrl.php b/views/app/admin/modalEditUrl.php new file mode 100755 index 0000000000000000000000000000000000000000..58772440db20d1a2566c1f1426bcbcffbf4bf4fc --- /dev/null +++ b/views/app/admin/modalEditUrl.php @@ -0,0 +1,410 @@ +<?php + HtmlHelper::registerCssAndScriptsFiles( + array( '/css/referencement.css',) , + Yii::app()->theme->baseUrl. '/assets'); +?> + +<div class="portfolio-modal modal fade" id="modalEditUrl" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-content padding-top-15"> + <div class="close-modal" data-dismiss="modal"> + <div class="lr"> + <div class="rl"> + </div> + </div> + </div> + + <div class="container"> + + <div class="row"> + <h3 class="letter-red text-left"> + <i class="fa fa-cog"></i> Modifier les informations + <button class="btn btn-success pull-right margin-bottom-5 btn-save-maj-metadata" ><i class="fa fa-check-circle"></i> Valider mes modifications</button> + </h3> + + <hr> + <div class="col-md-6 text-left"> + + <div class="col-md-12"> + <div class="form-group"> + <label id="lbl-url"> + <i class="fa fa-circle"></i> URL + </label> + <?php + $idhidden="hidden"; + if(Role::isSuperAdmin(Role::getRolesUserId(@Yii::app()->session["userId"]) ) ) + $idhidden=""; + ?> + <input type="hidden" class="form-control <?php echo $idhidden; ?>" placeholder="id" id="form-idurl"><br> + <input type="text" class="form-control" + placeholder="exemple : http://kgougle.nc" id="form-url"><br> + <h5 class="letter-green pull-left" id="status-ref"></h5> + <!-- <button class="btn btn-success pull-right btn-scroll" data-targetid="#formRef" id="btn-start-ref-url"> + <i class="fa fa-binoculars"></i> Lancer la recherche d'information + </button> --> + </div> + </div> + <div class="col-md-12" id="refResult"> + <label id="lbl-title"> + <i class="fa fa-circle"></i> Nom de la page + <small class="pull-right text-light"> + <code><title></title></code> + </small> + </label> + <input type="text" class="form-control" placeholder="Nom de la page" id="form-title"><br> + <input type="hidden" id="form-favicon"> + + <label id="lbl-description"> + <i class="fa fa-circle"></i> Description + <small class="pull-right text-light"> + <code><meta name="description"></code> + </small> + </label> + <textarea class="form-control" placeholder="Description" id="form-description"></textarea><br> + + <div class="col-md-12 no-padding"> + <label id="lbl-keywords"> + <i class="fa fa-circle"></i> Mots clés + <small class="pull-right text-light"> + <code><meta name="keywords"></code> + </small><br> + </label> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 1" id="form-keywords1"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 2" id="form-keywords2"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 3" id="form-keywords3"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 4" id="form-keywords4"><br> + </div> + + <?php $isAdmin = Role::isSuperAdmin(Role::getRolesUserId(@Yii::app()->session["userId"]) ); ?> + <div class="col-md-12 padding-5 <?php if(!$isAdmin) echo "hidden"; ?>"> + <label id="lbl-description"> + <i class="fa fa-circle"></i> Status + </label> + <select class="form-control" id="form-status"> + <?php if($isAdmin){ ?> + <option name="status" value="locked">locked</option> + <option name="status" value="uncomplet">uncomplet</option> + <?php } ?> + <option name="status" value="validated" <?php if($isAdmin) echo "selected"; ?> >validated</option> + </select> + <hr> + </div> + + <div class="col-md-12 padding-5"> + <label id="lbl-description"> + <i class="fa fa-map-marker"></i> Addresse + </label> + + <h4 class='pull-left text-red' id="name-city-selected"></h4> + + <button class="btn btn-default text-red pull-right" id="btn-select-city" + data-target="#portfolioModalCities" data-toggle="modal"> + <i class="fa fa-university"></i> Sélectionner une commune + </button> + <br> + + <input type="text" class="form-control" placeholder="addresse, rue" id="form-street"><br> + + <button class="btn btn-default text-azure pull-right" id="btn-find-position"> + <i class="fa fa-map-marker"></i> Définir la position sur la carte + </button> + </div> + + <div class="col-md-12 padding-5"> + <hr> + <small> + <span class="letter-red"><i class="fa fa-info-circle"></i> Afin d'éviter tout abus,</span> vos modification seront envoyées aux administrateurs du site, et soumises à leur validation (sous 7 jours).<br> + <i class="fa fa-info-circle"></i> Si les informations fournies semblent farfellues, ou inexactes, nous nous réservons le droit de ne pas donner suite à votre demande.<br> + <i class="fa fa-info-circle"></i> Si elles semblent correctes, votre demande sera validée en quelques jours et vous pourrez retrouver vos modifications lors de vos futures recherches.<br> + </small> + </div> + </div> + </div> + <div class="col-md-6 pull-right" id="mainCategoriesEdit"> + </div> + <div class="col-md-12"> + <?php if(Role::isSuperAdmin(Role::getRolesUserId(@Yii::app()->session["userId"]) ) ) { ?> + <button class="btn btn-danger pull-left margin-bottom-5" id="btn-conf-delete" + data-target="#modalDeleteUrl" data-toggle="modal" > + <i class="fa fa-trash"></i> Supprimer + </button> + <?php } ?> + + <button class="btn btn-success pull-right margin-bottom-5 btn-save-maj-metadata" > + <i class="fa fa-check-circle"></i> Valider mes modifications + </button> + <button class="btn btn-default pull-right margin-right-5 margin-bottom-5" data-dismiss="modal"> + <i class="fa fa-times"></i> Annuler + </button> + + + </div> + </div> + </div> + </div> +</div> + +<div class="portfolio-modal modal fade" id="modalDeleteUrl" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-content padding-top-15"> + <div class="close-modal" data-dismiss="modal"> + <div class="lr"> + <div class="rl"> + </div> + </div> + </div> + + <div class="container"> + + <div class="row"> + <div class="col-md-6 col-md-offset-3 text-left margin-top-70"> + <h3 class="letter-red"><i class="fa fa-cog"></i> Souhaitez-vous vraiment supprimer cette URL ?</h3> + <h4 id="urlDeleteName"></h4> + + <div class="row margin-top-70"> + <button class="btn btn-danger pull-left" id="btn-delete-url" data-dismiss="modal"> + <i class="fa fa-trash"></i> Oui, supprimer + </button> + <button class="btn btn-default pull-right margin-right-5" data-dismiss="modal"> + <i class="fa fa-times"></i> Non, annuler + </button> + </div> + </div> + </div> + </div> + </div> +</div> + + +<?php + $cities = CO2::getCitiesNewCaledonia(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial($layoutPath.'modals.kgougle.citiesReferencement', array("cities"=>$cities)); +?> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + $(".btn-save-maj-metadata").click(function(){ + sendReferencement(); + }); + + $("#btn-conf-delete").click(function(){ + var url = $("#form-url").val(); + $("#urlDeleteName").html(url); + }); + + $("#btn-delete-url").click(function(){ + var url = $("#form-url").val(); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/superadmin/action/deleteUrl", + data: { "url" : url }, + dataType: "json", + success: function(data){ + toastr.success("L'url a bien été supprimé"); + //else toastr.error("Une erreur est survenue pendant le référencement"); + console.log("delete url success"); + }, + error: function(data){ + toastr.error("Une erreur est survenue pendant l'envoi de votre demande", data); + console.log("save referencement error"); + } + }); + + + }); + + $("#form-street, #btn-find-position").hide(); + $(".btn-scope").click(function(){ + //h4-name-city btn-select-city name-city-selected + var cityName = $(this).data("city-name"); + var cityCp = $(this).data("city-cp"); + var cityInsee = $(this).data("city-insee"); + var cityLat = $(this).data("city-lat"); + var cityLng = $(this).data("city-lng"); + + $("#h4-name-city, #form-street, #btn-find-position").show(); + $("#name-city-selected").html(cityName + ", " + cityCp); + + formType = "url"; + coordinatesPreLoadedFormMap = [cityLat, cityLng]; + formInMap.showMarkerNewElement(); + preLoadAddress(true, "NC", cityInsee, cityName, cityCp, cityLat, cityLng, ""); + + $("#btn-find-position").off().click(function(){ + showMap(true); + + if(Sig.markerFindPlace == null) + formInMap.showMarkerNewElement(); + + var street = $("#form-street").val(); + preLoadAddress(true, "NC", cityInsee, cityName, cityCp, cityLat, cityLng, street); + + if(street != "") + searchAdressNewElement(); + }); + + }); + + + + buildListCategoriesForm(); +}); + +function sendReferencement(){ + console.log("start referencement"); + + var id = $("#form-idurl").val(); + + var url = $("#form-url").val(); + var title = $("#form-title").val(); + var description = $("#form-description").val(); + + var keywords1 = $("#form-keywords1").val(); + var keywords2 = $("#form-keywords2").val(); + var keywords3 = $("#form-keywords3").val(); + var keywords4 = $("#form-keywords4").val(); + + var keywords = new Array(); + + if(notEmpty(keywords1)) keywords.push(keywords1); + if(notEmpty(keywords2)) keywords.push(keywords2); + if(notEmpty(keywords3)) keywords.push(keywords3); + if(notEmpty(keywords4)) keywords.push(keywords4); + + var status = $("#form-status").val(); + + var address = getAddressObj(); //formInMap.js + + var urlObj = { + url : url, + title: title, + description: description, + tags: keywords, + categories : categoriesSelected, + status: status + }; + + if(address != false) { + urlObj["address"] = address.address; + urlObj["geo"] = address.geo; + urlObj["geoPosition"] = address.geoPosition; + } + console.log("address", address); + + console.log("UPDATE THIS URL DATA ?", urlObj, id); + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/superadmin/action/updateurlmetadata", + data: { "id" : id, + "values" : urlObj }, + dataType: "json", + success: function(data){ + //if(data.valid == true) + toastr.success("Votre demande a bien été enregistrée"); + + $("#form-idurl").val(""); + $("#form-url").val(""); + $("#form-title").val(""); + $("#form-description").val(""); + + $("#form-keywords1").val(""); + $("#form-keywords2").val(""); + $("#form-keywords3").val(""); + $("#form-keywords4").val(""); + //else toastr.error("Une erreur est survenue pendant le référencement"); + console.log("save referencement success"); + + $("#modalEditUrl").modal("hide"); + }, + error: function(data){ + toastr.error("Une erreur est survenue pendant l'envoi de votre demande", data); + console.log("save referencement error"); + } + }); +} + + +var categoriesSelected = new Array(); +function buildListCategoriesForm(){ + console.log("mainCategoriesEdit", mainCategories); + + var html = "<h4 class='text-dark'>"+ + "sélectionner la / les catégorie(s)"+ + "</h4>"; + + $.each(mainCategories, function(name, params){ + var classe=""; + if(params.color == "green") classe="search-eco"; + + html += '<section id="portfolio" class="'+classe+'">'+ + '<div class="">'+ + '<div class="row">'+ + '<div class="col-lg-12 text-center">'+ + '<hr>'+ + //'<h4 class="letter-'+params.color+'">'+ + // name+ + //'</h4>'+ + //'<hr>'+ + '</div>'+ + '</div>'+ + '<div class="row text-'+params.color+'">'; + + $.each(params.items, function(keyC, val){ + //console.log(keyC, val); + html += '<div class="col-md-3 col-sm-4 col-xs-6 portfolio-item cat-'+val.name+'">'+ + '<button class="portfolio-link btn-select-category" data-value="'+val.name+'">'+ + '<div class="caption">'+ + '<div class="caption-content">'+ + '</div>'+ + '</div>'+ + '<i class="fa fa-'+val.faIcon+' fa-2x"></i>'+ + '<h3>'+val.name+'</h3>'+ + '</button>'+ + '</div>' + }); + + html += '</div>' + + '</div>' + + '</section>'; + + }); + + $("#modalEditUrl #mainCategoriesEdit").html(html); + + $("#modalEditUrl .btn-select-category").click(function(){ console.log("click cat"); + var val = $(this).data("value"); + + if(categoriesSelected.indexOf(val) < 0){ + categoriesSelected.push(val); + $(this).parent().addClass("selected"); + } + else{ + categoriesSelected.splice(categoriesSelected.indexOf(val), 1); + $(this).parent().removeClass("selected"); + } + + // if(categoriesSelected.length > 0){ + // $("#send-ref, #refLocalisation").removeClass("hidden"); + // $("#info-select-cat").addClass("hidden"); + // }else{ + // $("#send-ref, #refLocalisation").addClass("hidden"); + // $("#info-select-cat").removeClass("hidden"); + // } + //console.log("categoriesSelected"); + //console.dir(categoriesSelected); + }); + + +} + + +</script> \ No newline at end of file diff --git a/views/app/admin/power.php b/views/app/admin/power.php new file mode 100755 index 0000000000000000000000000000000000000000..ee1fb7e26e301137e21d3f0f48e4b9a74348580c --- /dev/null +++ b/views/app/admin/power.php @@ -0,0 +1,57 @@ +<h1 class="letter-"><i class="fa fa-grav letter-red"></i> Bonjour <span class="letter-red">Super Admin</span></h1> +<h5 class="letter-"> + <button class="btn btn-sm btn-superadmin" data-action="power" data-idres="#central-container"><i class="fa fa-refresh"></i> </button> + Section : <i class="fa fa-search letter-red"></i> + <span class="font-blackoutM letter-red">power</span> +</h5> + +<br> +<hr> +<br> + +<button class="btn btn-success" id="btn-init-stream"><i class="fa fa-refresh"></i> Actualiser le fil de propositions</button> + + +<script type="text/javascript"> + +jQuery(document).ready(function() { + + $(".btn-superadmin").off().click(function(){ + var action = $(this).data("action"); + var idres = $(this).data("idres"); + $(idres).html("<i class='fa fa-refresh fa-spin'></i>"); + getAjax(idres ,baseUrl+'/'+moduleId+"/app/superadmin/action/"+action,function(data){ //alert("yeh"); + $(idres).html(data); + },"html"); + }); + + //btn to load media data for first time (if no media found) + $("#btn-init-stream").click(function(){ + //initStream(); + }); + +}); + +function initStream(){ + processingBlockUi(); + //toastr.info("Initialisation du LIVE en cours, merci de patienter quelques secondes."); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/mediacrawler", + success: + function(html) { + toastr.success("Chargement terminé."); + $.unblockUI(); + }, + error:function(xhr, status, error){ + toastr.error("Une erreur s'est produite pendant le chargement du LIVE"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + //toastr.success("404 : Impossible de trouver le script d'initialisation du LIVE"); + } + } + }); +} +</script> \ No newline at end of file diff --git a/views/app/admin/web.php b/views/app/admin/web.php new file mode 100755 index 0000000000000000000000000000000000000000..275075367f94ecf79f183fd4a620e0a2341e195b --- /dev/null +++ b/views/app/admin/web.php @@ -0,0 +1,523 @@ +<?php + + $cssAnsScriptFiles = array( + '/assets/js/web.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); +?> + +<h1 class="letter-"><i class="fa fa-grav letter-red"></i> Bonjour <span class="letter-red">Super Admin</span></h1> +<h5 class="letter-"> + <button class="btn btn-sm btn-superadmin" data-action="web" data-idres="#central-container"><i class="fa fa-refresh"></i> </button> + Section : <i class="fa fa-search letter-red"></i> + <span class="font-blackoutM letter-red">web</span> +</h5> + +<br> +<hr> +<br> + + +<style> + .c100 > span{ + cursor:pointer; + } + +</style> + +<div class=""> + + <h3 class="letter-red"><i class="fa fa-bar-chart"></i> Stats</h3> + <h4>Total : <?php echo $urlsAllNb; ?></h4> + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsLockedNb*100/$urlsAllNb); ?> red small center"> + <span data-status="locked"><?php echo intval($urlsLockedNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>locked<br><small><?php echo $urlsLockedNb; ?></small></h5> + </div> + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsUnreachableNb*100/$urlsAllNb); ?> red small center"> + <span data-status="unreachable"><?php echo intval($urlsUnreachableNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>unreachable<br><small><?php echo $urlsUnreachableNb; ?></small></h5> + </div> + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsUncompletNb*100/$urlsAllNb); ?> orange small center"> + <span data-status="uncomplet"><?php echo intval($urlsUncompletNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>uncomplet<br><small><?php echo $urlsUncompletNb; ?></small></h5> + </div> + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsValidatedNb*100/$urlsAllNb); ?> blue small center"> + <span data-status="validated"><?php echo intval($urlsValidatedNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>validated<br><small><?php echo $urlsValidatedNb; ?></small></h5> + </div> + + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsEditedNb*100/$urlsAllNb); ?> green small center"> + <span data-status="edited"><?php echo intval($urlsEditedNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>edited<br><small><?php echo $urlsEditedNb; ?></small></h5> + </div> + + <div class="col-md-4 text-center"> + <div class="c100 p<?php echo intval($urlsUncategorizedNb*100/$urlsAllNb); ?> yellow small center"> + <span data-status="uncategorized"><?php echo intval($urlsUncategorizedNb*100/$urlsAllNb); ?>%</span> + <div class="slice"> + <div class="bar"></div> <div class="fill"></div> + </div> + </div> + <h5>uncategorized<br><small><?php echo $urlsUncategorizedNb; ?></small></h5> + </div> + + + + + <div class="col-md-12"> + + <hr> + + <a href="http://caledoweb.com/?page_id=14">http://caledoweb.com/?page_id=14</a><br> + <button class="btn btn-sm btn-default btn-superadmin" data-action="scanlinks" data-idres="#res-scan"> + <i class="fa fa-terminal"></i> Scanner la page + </button> + <i class="fa fa-check fa-2x letter-green"></i> + <hr> + <div id="res-scan"></div> + + <hr> + + <div class=""> + <h3><i class="fa fa-terminal fa-2x"></i> Auto-scan</h3> + <h4 class="letter-green"><?php echo sizeof($urlsNoFavicon); ?> url <span class="letter-red">no favicon</span> in database</h4> + <button class="btn btn-sm btn-default btn-start-scan" data-action="scanlinks" data-idres="#res-scan"> + <i class="fa fa-terminal"></i> Run scan + </button> + <button class="btn btn-sm btn-default btn-stop-scan" data-action="scanlinks" data-idres="#res-scan"> + <i class="fa fa-square letter-red"></i> Stop scan + </button> + </div> + + <br> + <hr> + + <div class="row" style="min-height:800px;" id="refStart"> + <div class="col-md-12 pull-left" id="searchResults"><hr></div> + <div class="col-md-6 pull-right text-right" id="nb-auto-scan"></div> + <div class="col-md-6 pull-right" id="res-auto-scan"></div> + </div> + </div> + +</div> + +<?php + //$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial('admin/modalEditUrl', array( ) ); +?> + +<script type="text/javascript"> + + var urlsLocked = <?php echo json_encode($urlsNoFavicon); ?>; + console.log("urlsNoFavicon", urlsLocked); + //alert("stop"); + //var urlsValidated = <?php //echo json_encode($urlsValidated); ?>; + + var autoScanProcessing = false; + + var currentCategory = ""; + + jQuery(document).ready(function() { + $(".btn-superadmin").off().click(function(){ + var action = $(this).data("action"); + var idres = $(this).data("idres"); + $(idres).html("<i class='fa fa-refresh fa-spin'></i>"); + getAjax(idres ,baseUrl+'/'+moduleId+"/app/superadmin/action/"+action,function(data){ //alert("yeh"); + $(idres).html(data); + },"html"); + }); + + $(".btn-start-scan").click(function(){ + autoScanProcessing = true; + autoScan(); + }); + $(".btn-stop-scan").click(function(){ + autoScanProcessing = false; + }); + + $(".c100 > span").click(function(){ + var status = $(this).data("status"); + startWebSearch("", status); + }); + + }); + + + var triedUrl = ""; + var toTotal = <?php echo sizeof($urlsLocked); ?>; + var total = 0; + var totalEchec = 0; + function autoScan(){ console.log("start autoScan", autoScanProcessing); + if(autoScanProcessing == false) { + $("#status-ref").html("<span class='letter-red'><i class='fa fa-square'></i> stop</span>"); + return false; + } + + $.each(urlsLocked, function(key, urlObj){ + + var url = urlObj.url; + + //if(typeof url.hostname != "undefined") + var path = (new URL(url)).pathname; + //console.log("path :", path); + + if(path != "/") + url = url.replace(path, ""); + + + pos = url.lastIndexOf("/"); + //console.log("pos :", pos, "length", url.length-1); + if(pos == url.length-1){ + url = url.substr(0 , pos); + } + + //if(typeof host != "undefined") + // url = host; + console.log("url :", url); + //return; + + $("#form-url").val(url); + $("#status-ref").html("<span class='letter-blue'><i class='fa fa-spin fa-refresh'></i> recherche en cours</span>"); + $("#refResult").addClass("hidden"); + $("#send-ref").addClass("hidden"); + + urlValidated = ""; + //return; + $.ajax({ + url: "//cors-anywhere.herokuapp.com/"+url, // 'http://google.fr', + crossOrigin: true, + timeout:10000, + success: + function(data) { + + var jq = $.parseHTML(data); + + var tempDom = $('<output>').append($.parseHTML(data)); + var title = $('title', tempDom).html(); + var stitle = ""; + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + //console.log("STITLE", stitle); + + if(stitle=="" || stitle=="undefined") + stitle = $('h2', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('h3', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + if(title=="" || title=="undefined") + title = stitle; + + var favicon = $("link[rel*='icon']", tempDom).attr("href"); + var hostname = (new URL(url)).origin; + var faviconSrc = ""; + if(typeof favicon != "undefined"){ + var faviconSrc = hostname+favicon; + if(favicon.indexOf("http")>=0) faviconSrc = favicon; + } + var description = $(tempDom).find('meta[name=description]').attr("content"); + + var keywords = $(tempDom).find('meta[name=keywords]').attr("content"); + //console.log("keywords", keywords); + + var arrayKeywords = new Array(); + if(typeof keywords != "undefined") + arrayKeywords = keywords.split(","); + + //console.log("arrayKeywords", arrayKeywords); + + if(typeof arrayKeywords[0] != "undefined") $("#form-keywords1").val(arrayKeywords[0]); else $("#form-keywords1").val(""); + if(typeof arrayKeywords[1] != "undefined") $("#form-keywords2").val(arrayKeywords[1]); else $("#form-keywords2").val(""); + if(typeof arrayKeywords[2] != "undefined") $("#form-keywords3").val(arrayKeywords[2]); else $("#form-keywords3").val(""); + if(typeof arrayKeywords[3] != "undefined") $("#form-keywords4").val(arrayKeywords[3]); else $("#form-keywords4").val(""); + + + if(description=="" || description=="undefined") + if(stitle=="" || stitle=="undefined") + description = stitle; + + + $("#form-title").val(title); + $("#form-favicon").val(faviconSrc); + $("#form-description").val(faviconSrc); + + + //color + if($("#form-title").val() != "") $("#lbl-title").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-title").removeClass("letter-green").addClass("letter-red"); + + //color + if($("#form-description").val() != "") $("#lbl-description").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-description").removeClass("letter-green").addClass("letter-red"); + + //color + if($("#form-keywords1").val() != "") $("#lbl-keywords").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("letter-red"); + + $("#form-title").off().keyup(function(){ + if($(this).val()!="")$("#lbl-title").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-title").removeClass("letter-green").addClass("letter-red"); + checkAllInfo(); + }); + $("#form-description").off().keyup(function(){ + if($(this).val()!="")$("#lbl-description").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-description").removeClass("letter-green").addClass("letter-red"); + checkAllInfo(); + }); + $("#form-keywords1").off().keyup(function(){ + if($(this).val()!="")$("#lbl-keywords").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("letter-red"); + checkAllInfo(); + }); + + $("#status-ref").html("<span class='letter-green'><img src='"+faviconSrc+"' height=30> <i class='fa fa-check'></i> Nous avons trouvé votre page</span>"); + $("#refResult").removeClass("hidden"); + + $("#lbl-url").removeClass("letter-red").addClass("letter-green"); + urlValidated = url; + + $('<output>').remove(); + tempDom = ""; + + checkAllInfo(); + + console.log("sendReferencement"); + sendReferencementAuto(key); + + total++; + $("#nb-auto-scan").html("<span class='letter-green'>"+ total + " / " + toTotal+"</span><br>"+ + "<span class='letter-red'>"+ totalEchec + " / " + toTotal+"</span>"); + $("#res-auto-scan").prepend("<div class='col-md-12 text-left margin-bottom-15'>"+ + "<span class='siteurl_title letter-blue'><img src='"+faviconSrc+"' height=30> "+title+"</span><br>"+ + "<span class='siteurl_desc letter-green'>"+urlValidated+"</span><br>"+ + "<span class='siteurl_hostname letter-grey'>"+description+"</span><br>"+ + "</div>"); + + console.log("setTimeout autoScan"); + delete urlsLocked[key]; + setTimeout(function(){ autoScan(); }, 1000); + }, + error:function(xhr, status, error){ + $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> URL INNACCESSIBLE</span>"); + //if(triedUrl != url){ triedUrl = url; } + //else{ + setStateUnreachable(key); + delete urlsLocked[key]; + totalEchec++; + $("#nb-auto-scan").html("<span class='letter-green'>"+ total + " / " + toTotal+"</span><br>"+ + "<span class='letter-red'>"+ totalEchec + " / " + toTotal+"</span>"); + $("#res-auto-scan").prepend("<div class='col-md-12 text-right margin-bottom-15'>"+ + "<span class='siteurl_title letter-red'>404 "+url+"</span>"+ + "</div>"); + //alert("stop1"); + //} + // autoScan(); + setTimeout(function(){ autoScan(); }, 1000); + }, + statusCode:{ + // 404: function(){ + // $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + // $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> 404 : URL INTROUVABLE OU INACCESSIBLE</span>"); + // //if(triedUrl != url){ triedUrl = url; } + // //else{ + // setStateUnreachable(key); + // delete urlsLocked[key]; + // totalEchec++; + // $("#nb-auto-scan").html("<span class='letter-green'>"+ total + " / " + toTotal+"</span><br>"+ + // "<span class='letter-red'>"+ totalEchec + " / " + toTotal+"</span>"); + // $("#res-auto-scan").prepend("<div class='col-md-12 text-right margin-bottom-15'>"+ + // "<span class='siteurl_title letter-red'>404"+url+"</span>"+ + // "</div>"); + // //alert("stop2"); + // //} + // // autoScan(); + // setTimeout(function(){ autoScan(); }, 1000); + // } + } + }); + return false; + }); + } + + +function checkAllInfo(){ + if( urlValidated != "" && + $("#form-keywords1").val() != "" && + $("#form-description").val() != "" && + $("#form-title").val() != "") + $("#btn-validate-information").removeClass("hidden"); + else $("#btn-validate-information").addClass("hidden"); +} + + +function sendReferencementAuto(id){ + console.log("start referencement"); + + var hostname = (new URL(urlValidated)).hostname; + + var title = $("#form-title").val(); + var favicon = $("#form-favicon").val(); + var description = $("#form-description").val(); + + var keywords1 = $("#form-keywords1").val(); + var keywords2 = $("#form-keywords2").val(); + var keywords3 = $("#form-keywords3").val(); + var keywords4 = $("#form-keywords4").val(); + + var keywords = new Array(); + + if(notEmpty(keywords1)) keywords.push(keywords1); + if(notEmpty(keywords2)) keywords.push(keywords2); + if(notEmpty(keywords3)) keywords.push(keywords3); + if(notEmpty(keywords4)) keywords.push(keywords4); + + //authorId *facultatif + //categoriesSelected + + //if(urlValidated != "" && title != "" && description != "" && keywords.length > 0&& categoriesSelected.length > 0){ + + var urlObj = { + //collection: "url", + //key: "url", + //url: urlValidated, + //hostname: hostname, + //title: title, + //description: description, + //tags: keywords, + //categories : categoriesSelected, + //status: "uncomplet", + favicon: favicon + }; + + console.log("UPDATE THIS URL DATA ?", urlObj, id); + //alert("stop"); + if(favicon!="") + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/superadmin/action/updateurlmetadata", + data: { "id" : id, + "values" : urlObj }, + dataType: "json", + success: function(data){ + if(data.valid == true) toastr.success("Votre demande a bien été enregistrée"); + //else toastr.error("Une erreur est survenue pendant le référencement"); + console.log("save referencement success"); + }, + error: function(data){ + toastr.error("Une erreur est survenue pendant l'envoi de votre demande", data); + console.log("save referencement error"); + } + }); + //}else{ + // toastr.error("Merci de remplir toutes les options"); + //} +} + +//states = locked - unreachable - uncomplet - locked + +function setStateUnreachable(id){ + var urlObj = { + status: "unreachable" + }; + + console.log("unreachable THIS URL DATA ?", urlObj, id); + //if(false) + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/superadmin/action/updateurlmetadata", + data: { "id" : id, + "values" : urlObj }, + dataType: "json", + success: function(data){ + if(data.valid == true) toastr.success("Votre demande a bien été enregistrée"); + //else toastr.error("Une erreur est survenue pendant le référencement"); + console.log("save referencement success"); + }, + error: function(data){ + toastr.error("Une erreur est survenue pendant l'envoi de votre demande", data); + console.log("save referencement error"); + } + }); +} + + + +function startWebSearch(search, status){ + + $("#second-search-bar").val(search); + $("#searchResults").html("Recherche en cours. Merci de patienter quelques instants..."); + + var params = { + search:search, + status:status, + orderBy:"url" + }; + + if(status == "edited"){ + params = { + search:search, + searchEdit:true, + orderBy:"url" + }; + } + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/websearch/", + data: params, + //dataType: "json", + success: + function(html) { + $("#searchResults").html(html); + $("#sectionSearchResults").removeClass("hidden"); + KScrollTo("#searchResults"); + }, + error:function(xhr, status, error){ + $("#searchResults").html("erreur"); + }, + statusCode:{ + 404: function(){ + $("#searchResults").html("not found"); + } + } + }); +} + + +</script> \ No newline at end of file diff --git a/views/app/annonces.php b/views/app/annonces.php new file mode 100755 index 0000000000000000000000000000000000000000..128d26b8498e8feb93b7c2a92b23713dbb99c7d6 --- /dev/null +++ b/views/app/annonces.php @@ -0,0 +1,598 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( array('/css/timeline2.css','/css/news/index.css', + + ) , Yii::app()->theme->baseUrl. '/assets'); + + + $cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/autosize.js', + '/js/news/newsHtml.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "annonces"; + if($params["title"] == "Kgougle") $page = "freedom"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "type" => @$type, + "page" => page) ); +?> +<style> + +.btn-create-news{ + margin-top:0px; + z-index: 10; + border-radius: 0 50%; + -ms-transform: rotate(7deg); + -webkit-transform: rotate(7deg); + transform: rotate(-45deg); +} +.btn-create-news:hover{ + background-color: white!important; + color:#34a853!important; + border: 2px solid #34a853!important; + +} + +.main-btn-scopes { + margin-top: -57px; +} + +#formCreateNewsTemp{ + display: none!important; +} +#modal-create-anc #formCreateNewsTemp{ + display: block!important; +} +#formCreateNewsTemp .form-create-news-container, #formActivity{ + max-width: 60%; + /*margin-left:20%;*/ +} +#sub-menu-left{ + margin-top:1px; + /*text-align: left;*/ +} +#sub-menu-left .btn{ + /*background-color: #4285f4; + border-color: #4285f4;*/ + /*color:white;*/ + /*border-radius:80px;*/ + font-weight: 700; +} +#sub-menu-left .btn.active{ + /*background-color: #fff; + color: #4285f4;*/ +} +/*#sub-menu-left .btn:hover{ + background-color: #1c6df5; + border-color: #4285f4; +}*/ +/*#sub-menu-left .btn.active:hover{ + background-color: #fff; + color: #4285f4; +} +#sub-menu-left .btn.bg-yellow{ + border-color: transparent; +}*/ +<?php + $btnAnc = array("blue" =>array("color1"=>"#4285f4", + "color2"=>"#1c6df5"), + + "green" =>array("color1"=>"#34a853", + "color2"=>"#2b8f45"), + + "red" =>array("color1"=>"#ea4335", + "color2"=>"#cc392d"), + + "yellow" =>array("color1"=>"#fbbc05", + "color2"=>"#e3a800"), + ); +?> + +<?php foreach($btnAnc as $color => $params){ ?> +.btn-anc-color-<?php echo $color; ?>{ + background-color: <?php echo $params["color1"]; ?>; + border-color: <?php echo $params["color1"]; ?>!important; + color: #fff!important; +} + +.btn-anc-color-<?php echo $color; ?>:hover{ + background-color: <?php echo $params["color2"]; ?>!important; + border-color: <?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active{ + background-color:#fff!important; + color:<?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active:hover{ + background-color: #fff; + color: <?php echo $params["color1"]; ?>; +} +<?php } ?> + +.keycat:hover, +.keycat.active, +.btn-select-category-1:hover, +.btn-select-category-1.active{ + background-color: #2C3E50!important; + color: #fff!important; + border-color:transparent!important; +} + + +#sub-menu-left.subsub .btn{ + width:95%; + text-align: left; + background-color: white; + border-color: white; + color:#4285f4; +} +#sub-menu-left.subsub{ + min-width: 180px; +} + +.btn-menu-left-add{ + background-color: transparent !important; + border-color: transparent !important; +} + +#photoAddNews{ + text-align: left; +} + +.tagstags, .form-actions{ + /*display: none!important;*/ +} + + +@media (max-width: 768px) { + .btn-select-type-anc.col-xs-5{ + width:48%!important; + } +} + + @media screen and (min-width: 768px) and (max-width: 1024px) { + .btn-select-type-anc.col-xs-5{ + font-size:0.8em; + } + } + +/* +.elemt_name, .elemt_date{ + display: none; +}*/ +</style> + +<div class="col-md-12 col-sm-12 col-xs-12 bg-white top-page no-padding" id="" style="padding-top:0px!important;"> + + <div class="col-lg-1 hidden-md col-sm-1 hidden-xs"></div> + <div class="col-lg-2 col-md-3 hidden-sm col-xs-12 padding-20 text-right hidden-xs" id="sub-menu-left"> + <button class="btn btn-default letter-green hidden-xs btn-menu-left-add margin-top-5" + id="btn-create-classified"> + <i class="fa fa-plus"></i> Publier une annonce + </button><hr> + <?php + $classified = CO2::getContextList("classified"); + $currentSection = 1; + foreach ($classified["sections"] as $key => $section) { ?> + <?php if($section["section"] > $currentSection){ $currentSection++; ?> + <hr> + <?php } ?> + <button class="btn btn-default margin-bottom-5 margin-left-5 btn-select-type-anc btn-anc-color-<?php echo @$section["color"]; ?>" + data-type-anc="<?php echo @$section["key"]; ?>"> + <i class="fa fa-<?php echo @$section["icon"]; ?> hidden-xs"></i> <?php echo @$section["label"]; ?> + </button> + <br> + <?php } ?> + + </div> + + <div class="col-lg-2 col-md-2 col-sm-3 col-xs-12 margin-top-25 text-left subsub" id="sub-menu-left"> + <h4 class="text-dark padding-bottom-5"><i class="fa fa-angle-down"></i> Catégories</h4> + <hr> + <h4 class="padding-top-10 padding-bottom-10 letter-blue label-category" id="title-sub-menu-category"> + <i class="fa fa-money"></i> A vendre + </h4> + <hr> + <?php + foreach ($classified["filters"] as $key => $cat) { + ?> + <?php if(is_array($cat)) { ?> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo $key; ?> + </button><br> + <?php foreach ($cat as $key2 => $cat2) { ?> + <button class="btn btn-default text-dark margin-bottom-5 margin-left-15 hidden keycat keycat-<?php echo $key; ?>"> + <i class="fa fa-angle-right"></i> <?php echo $cat2; ?> + </button><br class="hidden"> + <?php } ?> + <?php } ?> + <?php } ?> + </div> + + <div class="col-lg-6 col-md-6 col-sm-6 no-padding margin-top-10"> + <h4 class="text-dark padding-bottom-5 margin-top-25 text-center"> + <i class="fa fa-angle-down"></i> Les annonces + <i class="fa fa-angle-right hidden fa-title-list"></i> <span class="letter-blue label-category"><i class="fa fa-"></i> </span> + </h4> + <hr> + + <h5 class="text-center letter-red"> + <button class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-top-5" + data-target="#modalScopes" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="Sélectionner des lieux de recherche"> + <!-- <i class="fa fa-bullseye" style="font-size:18px;"></i> --> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/cible3.png" height=42> + </button><br> + recherche ciblée + </h5> + <!-- <h5 class="text-center letter-red">choisir des sources</h5> --> + + <br> + <div class="scope-min-header list_tags_scopes hidden-xs hidden-sm text-center"></div> + + + <div id="newsstream"></div> + </div> + + <div class="pull-right col-lg-3 col-md-3 col-sm-4 hidden-xs padding-20 margin-top-50" id="nowList"> + + </div> +</div> + + + +<?php $this->renderPartial('../news/modalCreateAnc'); ?> + +<?php $this->renderPartial($layoutPath.'footer', array("subdomain"=>"annonces")); ?> + +<script type="text/javascript" > + +<?php $parent = Person::getById(@Yii::app()->session["userId"]); ?> + + +var indexStepInit = 5; +var searchType = ["organizations", "projects", "events", "needs"]; +var allNewsType = ["news", "idea", "question", "announce", "information"]; + +var liveTypeName = { "news":"<i class='fa fa-rss'></i> Les messages", + "idea":"<i class='fa fa-info-circle'></i> Les idées", + "question":"<i class='fa fa-question-circle'></i> Les questions", + "announce":"<i class='fa fa-ticket'></i> Les annonces", + "information":"<i class='fa fa-newspaper-o'></i> Les informations" + }; + + +var liveScopeType = "global"; + +<?php if(@$type && !empty($type)){ ?> + searchType = ["<?php echo $type; ?>"]; +<?php }else{ ?> + searchType = $.merge(allNewsType, searchType); +<?php } ?> + +var loadContent = '<?php echo @$_GET["content"]; ?>'; +jQuery(document).ready(function() { + + $(".subsub").hide(); + + var liveType = "<?php echo (@$type && !empty($type)) ? $type : ''; ?>"; + if(typeof liveTypeName[liveType] != "undefined") + liveType = " > "+liveTypeName[liveType]; + else liveType = ", la boite à outils citoyenne connectée " + liveType; + + setTitle("Communecter" + liveType, "<i class='fa fa-heartbeat '></i>"); + + //showTagsScopesMin("#list_tags_scopes"); + <?php if(@$lockCityKey){ ?> + lockScopeOnCityKey("<?php echo $lockCityKey; ?>"); + <?php }else{ ?> + rebuildSearchScopeInput(); + <?php } ?> + $("#btn-slidup-scopetags").click(function(){ + slidupScopetagsMin(); + }); + $('#btn-start-search').click(function(e){ //mylog.log("alo"); + startSearch(false); + }); + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + var index = searchType.indexOf(type); + + if(type == "all" && searchType.length > 1){ + $.each(allSearchType, function(index, value){ removeSearchType(value); }); return; + } + if(type == "all" && searchType.length == 1){ + $.each(allSearchType, function(index, value){ addSearchType(value); }); return; + } + + if (index > -1) removeSearchType(type); + else addSearchType(type); + }); + + + //initSelectTypeNews(); + /*$(".searchIcon").removeClass("fa-search").addClass("fa-file-text-o"); + $(".searchIcon").attr("title","Mode Recherche ciblé (ne concerne que cette page)");*/ + $('.tooltips').tooltip(); + searchPage = true; + startSearch(true); + $(".titleNowEvents .btnhidden").hide(); + + //init loading in scroll + $(window).off().bind("scroll",function(){ + if(!loadingData && !scrollEnd){ + var heightWindow = $("html").height() - $("body").height(); + console.log(heightWindow); + if( $(this).scrollTop() >= heightWindow - 400){ + //loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + showNewsStream(false); + } + } + }); + + initKInterface();//{"affixTop":10}); + initFreedomInterface(); + + //KScrollTo(".main-btn-scopes"); + + +}); + +var freedomCategories = <?php echo json_encode($classified["sections"]); ?> + +function initFreedomInterface(){ + $(".btn-select-type-anc").click(function(){ + + $(".btn-select-type-anc").removeClass("active"); + $(this).addClass("active"); + + var typeAnc = $(this).data("type-anc"); + if(typeAnc == "forsale" || typeAnc == "location" || typeAnc == "donation" || + typeAnc == "sharing" || typeAnc == "lookingfor"){ + $(".subsub").show(300); + }else{ + $(".subsub").hide(300); + } + + if(typeof freedomCategories[typeAnc] != "undefined") + $(".label-category").html("<i class='fa fa-"+ freedomCategories[typeAnc]["icon"] + "'></i> " + freedomCategories[typeAnc]["label"]); + $(".label-category").removeClass("letter-blue letter-red letter-green letter-yellow").addClass("letter-"+freedomCategories[typeAnc]["color"]) + $(".fa-title-list").removeClass("hidden"); + KScrollTo(".top-page"); + }); + + $(".btn-select-category-1").click(function(){ + $(".btn-select-category-1").removeClass("active"); + $(this).addClass("active"); + + var keycat = $(this).data("keycat"); + $(".keycat").addClass("hidden"); + $(".keycat-"+keycat).removeClass("hidden"); + }); + + $(".keycat").click(function(){ + $(".keycat").removeClass("active"); + $(this).addClass("active"); + }); + + $("#btn-create-classified").click(function(){ + dyFObj.openForm('classified'); + }); + + initFormImages(); + + //loadLiveNow(); +} + +var timeout; +function startSearch(isFirst){ + //Modif SBAR + //$(".my-main-container").off(); + if(liveScopeType == "global"){ + showNewsStream(isFirst); + }else{ + showNewsStream(isFirst);//loadStream(0,5); + } + //loadLiveNow(); +} + + +function loadStream(indexMin, indexMax){ console.log("LOAD STREAM FREEDOM"); + loadingData = true; + currentIndexMin = indexMin; + currentIndexMax = indexMax; + + //isLive = isLiveBool==true ? "/isLive/true" : ""; + //var url = "news/index/type/citoyens/id/<?php echo @Yii::app()->session["userId"]; ?>"+isLive+"/date/"+dateLimit+"?isFirst=1&tpl=co2&renderPartial=true"; + + var url = "news/index/type/city/isLive/true/date/"+dateLimit+"?tpl=co2&renderPartial=true&nbCol=1"; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/'+url, + data: { indexMin: indexMin, + indexMax:indexMax, + renderPartial:true + }, + success: + function(data) { + if(data){ //alert(data); + $("#news-list").append(data); + //bindTags(); + + } + loadingData = false; + $(".stream-processing").hide(); + }, + error:function(xhr, status, error){ + loadingData = false; + $("#newsstream").html("erreur"); + }, + statusCode:{ + 404: function(){ + loadingData = false; + $("#newsstream").html("not found"); + } + } + }); +} + +function loadLiveNow () { + + var searchParams = { + "name":"", + "tpl":"/pod/nowList", + "latest" : true, + "searchType" : ["<?php echo Event::COLLECTION?>","<?php echo Project::COLLECTION?>", + "<?php echo Organization::COLLECTION?>","<?php echo ActionRoom::COLLECTION?>"], + "searchTag" : $('#searchTags').val().split(','), //is an array + "locality" : getLocalityForSearch(), + "indexMin" : 0, + "indexMax" : 10 + }; + + + ajaxPost( "#nowList", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if($('.el-nowList').length==0) + $('.titleNowEvents').addClass("hidden"); + else + $('.titleNowEvents').removeClass("hidden"); + } , "html" ); +} + +function showNewsStream(isFirst){ mylog.log("showNewsStream freedom"); + + scrollEnd = false; + + var isFirstParam = isFirst ? "?isFirst=1&tpl=co2" : "?tpl=co2"; + isFirstParam += "&nbCol=1"; + var tagSearch = $('#searchTags').val().split(','); + + var thisType="ko"; + var urlCtrl = "" + if(liveScopeType == "global") { + thisType = "city"; + urlCtrl = "/news/index/type/city/isLive/true"; + } + /*<?php if(@Yii::app()->session["userId"]){ ?> + else if(liveScopeType == "community"){ + thisType = "citoyens"; + urlCtrl = "/news/index/type/citoyens/id/<?php echo @Yii::app()->session["userId"]; ?>/isLive/true"; + } + <?php } ?>*/ + + var dataNewsSearch = {}; + if(liveScopeType == "global") + dataNewsSearch = { + "locality" : getLocalityForSearch() + }; + + dataNewsSearch.tagSearch = tagSearch; + dataNewsSearch.searchType = searchType; + dataNewsSearch.textSearch = $('#main-search-bar').val(); + + //dataNewsSearch.type = thisType; + //var myParent = <?php echo json_encode(@$parent)?>; + //dataNewsSearch.parent = { } + + var loading = "<div class='loader text-dark '>"+ + "<span style='font-size:25px;' class='homestead'>"+ + "<i class='fa fa-spin fa-circle-o-notch'></i> "+ + "<span class='text-dark'>Chargement en cours ...</span>" + + "</div>"; + + //loading = ""; + + if(isFirst){ //render HTML for 1st load + $("#newsstream").html(loading); + ajaxPost("#newsstream",baseUrl+"/"+moduleId+urlCtrl+"/date/0"+isFirstParam,dataNewsSearch, function(news){ + showTagsScopesMin(".list_tags_scopes"); + if(loadContent != ''){ + if(userId){ + showFormBlock(true); + if(loadContent.indexOf("%hash%")) + loadContent = loadContent.replace("%hash%", "#"); + $("#get_url").val(loadContent); + $("#get_url").trigger("input"); + + } + else { + toastr.error('you must be loggued to post on communecter!'); + } + } + else + showFormBlock(false); + + bindTags(); + + $("#formCreateNewsTemp").appendTo("#modal-create-anc #formCreateNews"); + $("#info-write-msg").html("Conseil : donnez un maximum de détails"); + $("#info-write-msg").html("Conseil : donnez un maximum de détails"); + showFormBlock(true); + //$("#formCreateNewsTemp").html(""); + + },"html"); + }else{ //data JSON for load next + dateLimit=0;currentMonth = null; + $(".newsTL").html(loading); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+urlCtrl+"/date/"+dateLimit+"?tpl=co2", + dataType: "json", + data: dataNewsSearch, + success: function(data){ + //mylog.log("LOAD NEWS BY AJAX"); + //mylog.log(data.news); + $(".newsTL").html('<div class="spine"></div>'); + if(data){ + buildTimeLine (data.news, 0, 5); + bindTags(); + if(typeof(data.limitDate.created) == "object") + dateLimit=data.limitDate.created.sec; + else + dateLimit=data.limitDate.created; + } + loadingData = false; + }, + error: function(){ + loadingData = false; + } + }); + } + $("#dropdown_search").hide(300); + +} + +function addSearchType(type){ + var index = searchType.indexOf(type); + if (index == -1) { + searchType.push(type); + $(".search_"+type).removeClass("fa-circle-o"); + $(".search_"+type).addClass("fa-check-circle-o"); + } + mylog.log(searchType); +} +function removeSearchType(type){ + var index = searchType.indexOf(type); + if (index > -1) { + searchType.splice(index, 1); + $(".search_"+type).removeClass("fa-check-circle-o"); + $(".search_"+type).addClass("fa-circle-o"); + } + mylog.log(searchType); +} + +function hideNewLiveFeedForm(){ + //$("#newLiveFeedForm").hide(200); + showFormBlock(false); +} + +</script> \ No newline at end of file diff --git a/views/app/city.php b/views/app/city.php new file mode 100644 index 0000000000000000000000000000000000000000..11695c9f0500a449d385a50b904f27ec741e3da4 --- /dev/null +++ b/views/app/city.php @@ -0,0 +1,56 @@ + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "city", + ) + ); + $cssAnsScriptFiles = array( + '/css/news/index.css', + '/css/timeline2.css', + '/js/comments.js', + + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl. '/assets'); + +?> + +<style> + #city-main-container{ + padding-top:80px; + display: inline-block; + } + .cityHeadSection { + position: absolute; + min-height: 500px !important; + width: 100%; + } + .btn-discover{ + color:white; + } + +</style> + +<div class="bg-white" id="city-main-container"></div> + +<?php $this->renderPartial($layoutPath.'footer', array( "subdomain"=>"web" ) ); ?> + +<script type="text/javascript" > + +var insee = "<?php echo @$insee; ?>"; +var postalCode = "<?php echo @$postalCode; ?>"; + +jQuery(document).ready(function() { + initKInterface(); + + getAjax("#city-main-container" ,baseUrl+'/'+moduleId+"/city/detail/insee/"+insee+"/postalCode/"+postalCode,function(data){ + //alert("yeh"); + //$(idres).html(data); + },"html"); + + //location.hash = "#app.web"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/CO2/finance.php b/views/app/info/CO2/finance.php new file mode 100644 index 0000000000000000000000000000000000000000..a252c1a22f3d5853c0f13c2d46624b4dc820e96f --- /dev/null +++ b/views/app/info/CO2/finance.php @@ -0,0 +1,104 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + +?> +<style> + p{ + font-size:15px; + } + + h1{ + padding-top:20px; + } + + .arrow_box:after, .arrow_box:before { + left: 19px; + } + + +@media screen and (max-width: 1024px) { + +} + +@media (max-width: 768px) { + + +</style> + + +<section class="padding-top-70"> + <div class="row main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-3 col-md-3 col-sm-4 text-right hidden-xs" id="sub-menu-left"> + </div> + <div class="col-lg-7 col-md-8 col-sm-7 col-xs-12"> + + <h5 class="pull-left"> + <i class="fa fa-angle-down"></i> <?php echo Yii::t("docs","Financial situation") ?> + </h5> + + <a href="#" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","Back to home") ?>"> + <b><?php echo Yii::t("common","Leave this page") ?> <i class="fa fa-arrow-right"></i></b> + </a> + + <br> + <hr> + + <h1 class="letter-red font-blackoutM" id="koica"> + <?php echo Yii::t("docs","ALERT : SOON OUT OF MONEY") ?> !!! + </h1> + + <h3 class="letter-blue"><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs","1 euro to save us") ?> !</h3> + <p> + <?php echo Yii::t("docs","The developers who work on the platform need to earn some good money to work full time on this huge project") ?>. + <br><br> + <?php echo Yii::t("docs","It just can’t be done as a part-time job.<br>The maintenance and the upgrading of the application need a competent team of technicians available on a daylee basis") ?>. + <br><br> + <?php echo Yii::t("docs", "In order to have full-time developpers on communecter, they need your financial support") ?>. + <br><br> + <?php echo Yii::t("docs","The current account of NGO is too low to assume a short-term vision for the platform and for its team") ?>. + <br><br> + <?php echo Yii::t("docs","To make this happen, we need your help") ?>. + <br><br> + <?php echo Yii::t("docs", "If you want to see the project keep on going and growing, you can now be part of it, even with 1 euro on a monthly basis, it will make things possible") ?> ! + + <h3 class="letter-blue"><?php echo Yii::t("docs","A long-term project") ?></h3> + <?php echo Yii::t("docs","The actual team of developpers are very motivated to follow the work.<br>She needs also to grow up with new developpers and to work with other team to build interoperable applications") ?>.<br><br> + <?php echo Yii::t("docs","Finally, we want to keep improving Communecter, adding new functions") ?>.<br><br> + + <h3 class="letter-blue"><?php echo Yii::t("docs","Annual budget") ?> :</h3> + <?php echo Yii::t("docs","6 developpers at 2000€/month for a year : To develop the app") ?><br> + 6 * 2000 * 12 = <?php $c1 = 6 * 2000 * 12; echo $c1; ?>€ + <br><br> + <?php echo Yii::t("docs","6 commonecters at 1000€/month for a year : To help people connect via the platform")?><br> + 6 * 2000 * 12 = <?php $c2 = 6 * 1000 * 12; echo $c2; ?>€ + <br><br> + ETC ... + <br><br><br> + <?php echo Yii::t("docs","Total") ?> : <?php echo $c1 + $c2; ?>€ + <br><br> + <?php echo Yii::t("docs","We are currently running on an annuel budget of 80K€ and only the developpers are payed 1000€ / monthly") ?>. + </p> + </div> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array()); ?> +<?php //$this->renderPartial($layoutPath.'footer', array( "subdomain"=>"info" ) ); ?> + +<script type="text/javascript" > + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.finance"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/alphatango.php b/views/app/info/kgougle/alphatango.php new file mode 100644 index 0000000000000000000000000000000000000000..6635d4f3f6a18e77b8dc31cb15643f543b9e9f5d --- /dev/null +++ b/views/app/info/kgougle/alphatango.php @@ -0,0 +1,97 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; + $urlTango = Yii::app()->theme->baseUrl . "/assets/img/alphatango.png"; +?> + + +<style type="text/css"> + .txt-mail{ + min-height: 300px; + max-height: 700px; + max-width: 100%; + min-width: 60%; + } +</style> + + + +<section class="padding-top-70"> + <div class="row main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-2 col-md-2 col-sm-2 text-right hidden-xs" id=""> + <img src="<?php echo $urlTango; ?>" class="img-responsive col-md-12"> + </div> + <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12"> + + <h5 class="pull-left text-azure"> + <i class="fa fa-angle-down"></i> Alpha Tango + </h5> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + <a href="#info.p.apropos" class="lbh btn btn-danger pull-right btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title='Retourner vers la page de présentation "A propos"'> + <b><i class="fa fa-arrow-left"></i> À propos</b> + </a> + + <br> + <hr> + <!-- --------------------------------------------------------------------------------- --> + + + + <!-- <div class="col-md-12 text-center"> + <img src="<?php echo $urlTango; ?>" width="450" style="margin-top:-20px;"> + </div> --> + <div class="col-md-12 text-left padding-top-60"> + <h1 class="letter-red font-blackoutM" id="koica"> + <span class="letter-azure">Aplha Tango</span>, C ki lui ?!? + </h1> + <h3 class="letter-blue"><i class="fa fa-angle-right"></i> Votre contact Calédonien</h3> + <b>KGOUGLE</b> a été mis en place par une équipe de développeurs indépendants : <a class="letter-yellow lbh" href="#info.p.ph"><b>les PixelHumains</b></a><br> + Ce collectif est composée de 5 développeurs répartis sur 3 fuseaux horaires : <b>Nouvelle-Calédonie, île de la Réunion, et métropole.</b><br><br> + + <b><span class="letter-azure font-blackoutM">Alpha Tango</span> est notre développeur Calédonien</b>, à l'origine de la création de <b>KGOUGLE</b>, et à votre disposition pour répondre à toutes vos questions.<br>C'est le lien entre les Calédoniens et notre collectif <b>PixelHumain</b>. + <br><br> + <hr> + <br> + </div> + + <?php $this->renderPartial($layoutPath.'forms.'.Yii::app()->params["CO2DomainName"].'.formContact'); ?> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + +<script> + +var currentCategory = ""; + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.alphatango"; + $(".tooltips").tooltip(); + + $(".dropdown-onepage-main-menu li a").click(function(e){ + e.stopPropagation(); + var target = $(this).data("target"); + console.log(target); + KScrollTo(target); + }); + + $("#btn-onepage-main-menu").trigger("click"); + +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/apropos.php b/views/app/info/kgougle/apropos.php new file mode 100644 index 0000000000000000000000000000000000000000..6665bdc02f5c36866216cb599e09147c5a95ecae --- /dev/null +++ b/views/app/info/kgougle/apropos.php @@ -0,0 +1,289 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; +?> +<style> + p{ + font-size:15px; + } + + .logoKgou{ + margin-top: -0px; + height:35px; + } + + h1{ + padding-top:20px; + } + + .arrow_box:after, .arrow_box:before { + left: 19px; + } + + +@media screen and (max-width: 1024px) { + +} + +@media (max-width: 768px) { + .row.main-apropos{ + padding:25px; + } + + h1, h3, h4, p{ + font-size:1em; + } + + .logoKgou{ + height:25px; + } + + h1{ + padding-top:0px; + } +} + +</style> + + +<section class="padding-top-70"> + <div class="row main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-3 col-md-3 col-sm-4 text-right hidden-xs" id="sub-menu-left"> + <div class="dropdown"> + <button class="btn bg-red text-white btn font-blackoutM dropdown-toggle" data-toggle="dropdown" id="btn-onepage-main-menu"> + <i class="fa fa-bars"></i> MENU + </button> + <div class="dropdown-onepage-main-menu font-montserrat" aria-labelledby="btn-onepage-main-menu"> + <ul class="dropdown-menu arrow_box font-blackoutM letter-red"> + <li><a href="javascript:" data-target="#koica" class="letter-red"><i class="fa fa-angle-right"></i> C koissa ?!?</a></li> + <li><a href="javascript:" data-target="#aussi" class="letter-red"><i class="fa fa-angle-right"></i> C'est aussi</a></li> + <li><a href="javascript:" data-target="#philo" class="letter-red"><i class="fa fa-angle-right"></i> Notre philosophie</a></li> + <li><a href="javascript:" data-target="#dev" class="letter-red"><i class="fa fa-angle-right"></i> En developpement</a></li> + <li><a href="javascript:" data-target="#motivation" class="letter-red"><i class="fa fa-angle-right"></i> Nos motivations</a></li> + <li role="separator" class="divider"></li> + <li><a href="#info.p.ph" class="lbh letter-yellow"><i class="fa fa-angle-right"></i> Pixel Humain</a></li> + <li role="separator" class="divider"></li> + <li><a href="#info.p.communecter" class="lbh letter-red"><i class="fa fa-angle-right"></i> Communecter</a></li> + <li role="separator" class="divider"></li> + <li><a href="#info.p.alphatango" class="lbh text-azure"><i class="fa fa-angle-right"></i> Alpha Tango</a></li> + </ul> + </div> + </div> + </div> + <div class="col-lg-7 col-md-8 col-sm-7 col-xs-12"> + + <h5 class="pull-left"> + <i class="fa fa-angle-down"></i> A propos + </h5> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + + <br> + <hr> + <!-- --------------------------------------------------------------------------------- --> + <h1 class="letter-red font-blackoutM" id="koica"> + <img src="<?php echo $urlKgou; ?>" class="logoKgou"> C koissa ?!? + </h1> + + <h3 class="letter-blue"><i class="fa fa-angle-right"></i> Un moteur de recherche simplifié</h3> + <p> + Kgougle vous permet de retrouver rapidement et facilement, <b> les principaux sites calédoniens</b>.<br> + Nous avons répertorié pour vous <b>près de 300 sites web</b>, pour vous permettre de gagner un temps fou lors de vos recherches !<br> + Vous trouverez tout ce que vous cherchez <b>sans taper plus d’un mot sur votre clavier...</b> + </p> + + <hr> + <h3 class="letter-blue"><i class="fa fa-angle-right"></i> Un moteur de recherche pour tous !</h3> + <p> + Internet reste un outil nouveau sur le caillou, et si les personnes les plus connectées ont appri à s’y retrouver, d’autres se sentent parfois un peu perdus…<br><br> + <span class="letter-green"><b>Les internautes les plus habitués</b></span> retrouveront tous les sites qu’ils utilisent fréquemment, tout en profitant de la puissance de recherche dans notre base de données locales. + Ils pourront également continuer à explorer le web international grâce à la fonction <b><i>continuer ma recherche</i></b>.<br><br> + + <span class="letter-green"><b>Quant aux plus novices</b></span>, ils pourront enfin explorer l’ensemble du web local facilement, grâce au système de recherches par catégories, sans même taper sur le clavier ! + + </p> + + <!-- --------------------------------------------------------------------------------- --> + <br><br><br> + <h1 class="letter-red font-blackoutM" id="aussi"> + <img src="<?php echo $urlKgou; ?>" height="35" class="logoKgou"> c'est ossi ... + </h1> + + <h3 class="letter-blue"><i class="fa fa-database fa-2x"></i> <i class="fa fa-angle-righ"></i> Une base de données co-construite</h3> + <h4>En amélioration continue...</h4> + <p> + Avec près de <b class="letter-green">300 sites répertoriés</b>, vous retrouverez à coup sûr tous les sites les plus utilisés en Nouvelle-Calédonie. <br> + <b>Mais il reste encore beaucoup de sites à ajouter</b> pour compléter le résultats de vos recherches, et rendre ce moteur encore plus puissant…<br><br> + + C’est pourquoi <b class="letter-green">vous pouvez TOUS référencer de nouvelles URL</b> via <a href="#referencement" class="letter-blue" target="_blank"><b>un formulaire de référencement</b></a>, lui aussi simplifié au maximum…<br> + <i>N’hésitez pas à ajouter les sites manquant et ainsi participer à la construction de cette base de données.</i> + + </p> + + <h1 class="letter-red font-blackoutM" id="aussi"> + <img src="<?php echo $urlKgou; ?>" height="35" class="logoKgou"> c'est ossi ... + </h1> + <hr> + <h3 class="letter-blue"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/radios/radio-ico.png" + height="50" style="margin-top: -15px;"> + Un poste de radio + </h3> + <h4>Pour rester en contact permanent avec le reste du pays...</h4> + <p> + Retrouvez à tout moment les radios locales, pour suivre l’actualité, se divertir, ou simplement écouter de la musique. + </p> + <button class="btn btn-link letter-blue" data-target="#modalRadioTool" data-toggle="modal"> + <i class="fa fa-arrow-circle-right"></i> Afficher la radio + </button> + + <hr> + <h3 class="letter-blue"><i class="fa fa-star-o fa-2x"></i> <i class="fa fa-angle-righ"></i> La gestion de vos sites favoris</h3> + <h4>Cherchez une fois, trouvez pour toujours...</h4> + <p> + Grâce à la section <b class="letter-blue">Mes favoris</b>, gardez à portée de main les sites que vous fréquentez le plus, et ne les cherchez plus !<!-- <br><small>* en attendant l'ouverture des inscriptions, cette fonctionnalité utilise vos cookies</small> --> + </p> + + <hr> + + + <h3 class="letter-blue"> + <i class="fa fa-map fa-2x"></i> Un outil de cartographie + </h3> + <h4>Pour se repérer facilement sur le Caillou...</h4> + + <button class="btn btn-link letter-blue btn-show-map"> + <i class="fa fa-arrow-circle-right"></i> Afficher la carte + </button> + + <hr> + <h3 class="letter-blue"> + <i class="fa fa-newspaper-o fa-2x"></i> Un fil d'actualités + </h3> + <h4>Une revue de presse des grands médias calédoniens et d’outre-mers</h4> + <p> + Pour suivre en direct l'actualité locale et garder un oeil sur le reste du monde.<br> + </p> + + + <hr> + <h3 class="letter-blue"> + <i class="fa fa-user-circle fa-2x"></i> Un réseau social + </h3> + <h4>Créez votre page en quelques secondes, trouvez des followers et communiquez avec eux.</h4> + <p>partagez votre actu, vos photos, vos événements, vos points d'intérêts, etc </p> + + + <hr> + <h3 class="letter-blue"> + <i class="fa fa-calendar fa-2x"></i> Un agenda collaboratif + </h3> + <h4>pour faire connaître tous vos événements et ne rien rater de l’activité locale</b></h4> + <p>(concert, exposition, sport, festival, sorties, animation culturelle, etc)</p> + + + + + + <!-- --------------------------------------------------------------------------------- --> + <br><br><br> + <h1 class="letter-red font-blackoutM" id="dev"> + <img src="<?php echo $urlKgou; ?>" height="35" class="logoKgou"> En developpement + </h1> + + <h3 class="letter-blue"><i class="fa fa-cubes fa-2x"></i> <i class="fa fa-angle-righ"></i> Plusieurs nouveautés déjà en préparation</h3> + <!-- <h4>Notre imagination est sans limite...</h4> --> + <p> + <i class="fa fa-comments letter-red"></i> <span class="letter-red font-blackoutT">ANNONCES</span> <b><span class="letter-green">Un outil de partage d’annonces en direct</span>, pour diffuser toutes vos annonces directement sur Kgougle.</b> + (à vendre, à donner, à partager, à louer, offre d’emplois, etc) + </p> + + <p> + <i class="fa fa-comments letter-red"></i> <span class="letter-red font-blackoutT">LIVE</span> <b><span class="letter-green">Un espace de discussion public et géolocalisé</span>, pour passer vos coups de coeur, vos coups de gueule, parler de l'actu, lancer des débats sur des sujets de société, etc</b> + </p> + + <!-- --------------------------------------------------------------------------------- --> + <br><br><br> + <h1 class="letter-red font-blackoutM" id="philo"> + <img src="<?php echo $urlKgou; ?>" height="35" class="logoKgou"> Notre philosophie + </h1> + + <h3 class="letter-blue"><i class="fa fa-line-chart fa-2x"></i> En amélioration continue, pour le bien commun...</h3> + <!-- <h4></h4> --> + <p> + Kgougle a été mis en place par <a href="" class="letter-yellow"><b>une équipe de développeurs indépendants</b></a>, dans le but de faciliter l’usage d’internet en Nouvelle-Calédonie. Ce moteur de recherche est un premier pas vers une évolution majeure de l'utilisation du web sur le territoire. En offrant un guide d'accès vers l'ensemble des sites web locaux, nous permettons à tous les Calédoniens de naviguer <i>sans se perdre</i>, et donc de prendre en main plus facilement cet outil sur-puissant... + <br><br> + Sur le caillou, internet est un outil encore nouveau, que l’on découvre petit à petit, et que nous tentons d’apprivoiser.<br> + Mais internet nous arrive avec une complexité et une immensité, dont nous n’avons pas toujours besoin. + <br><br> + Au sein de notre équipe, nous pensons qu’une recherche sur le web <b>ne devrait être un casse-tête pour personne</b>, car internet est un outil formidable, <b>pour toutes les générations</b>, qui ouvre un grand nombres de nouvelles possibilités <b>pour tout le territoire</b>. + <br><br> + A moyen terme, nous souhaitons également proposer d'autres outils numériques innovants, qui participeront à l'amélioration globale des services web disponibles en Nouvelle-Calédonie. + <br><br> + + <a href="#info.p.ph" class="letter-yellow"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/LOGO_PIXEL_HUMAIN.png" height=100> + <b><i class="fa fa-plus-circle"></i> En savoir plus sur notre équipe</b> + </a> + </p> + + + + <!-- --------------------------------------------------------------------------------- --> + <br><br><br> + <h1 class="letter-red font-blackoutM" id="motivation"> + <img src="<?php echo $urlKgou; ?>" height="35" class="logoKgou"> Nos motivations + </h1> + + <!-- <h3 class="letter-blue"><i class="fa fa-cubes fa-2x"></i> <i class="fa fa-angle-righ"></i> Plusieurs nouvelles applications sont déjà en cours de développement</h3> --> + <h4></h4> + <p> + Le collectif <b class="letter-yellow"><b>PixelHumain</b></b> est réuni depuis ses origines autour d'un objectif commun : créer des outils numériques collaboratifs afin de <b>(re)dynamiser les territoires</b>, en facilitant la <b>communication entre les différents acteurs locaux</b>.<br><br> + + Dans cet objectif, nous <b>co-construisons</b> depuis plus de 3 ans, une plateforme sociétale dénommée <a href="www.communecter.org" class="letter-red"><b>Communecter.org</b></a>, qui propose un ensemble de fonctionnalités cohérentes aux internautes souhaitant participer plus activement à la <b>vie de leur territoire</b>.<br><br> + + En Nouvelle-Calédonie, certaines particularités propres à ce territoire isolé d'océanie nous ont poussé à adopter une approche légèrement différente de celle que nous suivons depuis nos débuts. Pour répondre au mieux aux <b>besoins réels du pays</b> dans le domaine de l'internet.<br><br> + C'est ainsi que KGOUGLE est né : c'est une application issue de la plateforme <a href="www.communecter.org" class="letter-red"><b>Communecter.org</b></a>, adaptée au territoire Calédonien, pour en simplifier l'utilisation et proposer des applications spécifiques. + <br><br> + Motivé et conseillé par notre développeur calédonien <a href="#info.p.alphatango" class="letter-green"><b>AlphaTango</b></a>, nous espérons faire avancer internet sur le Caillou et en multiplier les usages : d'abord via ce moteur de recherche, pour faciliter votre navigation sur le web d'aujourd'hui, puis par la mise en place d'autres fonctionnalités innovantes déjà inclues dans la plateforme <a href="www.communecter.org" class="letter-red"><b>Communecter.org</b></a>. + </p> + + + </div> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + + + +<script type="text/javascript" > + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.apropos"; + + $(".dropdown-onepage-main-menu li a").click(function(e){ + e.stopPropagation(); + var target = $(this).data("target"); + console.log(target); + KScrollTo(target); + }); + + $("#btn-onepage-main-menu").trigger("click"); + +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/cgu.php b/views/app/info/kgougle/cgu.php new file mode 100644 index 0000000000000000000000000000000000000000..5e6f2dc79b3e0fa5d868825fe718517d24ac8e00 --- /dev/null +++ b/views/app/info/kgougle/cgu.php @@ -0,0 +1,39 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); +?> + + +<style type="text/css"> +</style> + + +<section class="padding-top-70" style="min-height:800px;"> + <div class="col-md-10 col-md-offset-1"> + <h3>Les Condition Générales d'Utilisation ne sont pas encore publiées (en cours de rédaction).<br> + <small>Merci de patienter encore quelques jours</small></h3> + <a href="#web" class="lbh btn btn-default pull-left margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b><i class="fa fa-arrow-left"></i> Retour</b> + </a> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + +<script> + +var currentCategory = ""; + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.cgu"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/communecter.php b/views/app/info/kgougle/communecter.php new file mode 100644 index 0000000000000000000000000000000000000000..4979157b9f10d30729b785ea274786014e6aad7a --- /dev/null +++ b/views/app/info/kgougle/communecter.php @@ -0,0 +1,101 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; +?> +<style> +</style> + +<section class="padding-top-70"> + <div class="row padding-20 main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-2 col-md-2 col-sm-2 text-right hidden-xs" id=""> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" class="img-responsive"> + + </div> + <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12"> + + <h4 class="pull-left"> + <a href="https://www.communecter.org/" class="tooltips homestead text-red" target='_blank' + data-toggle="tooltip" data-placement="right" title="Cliquer pour visiter le site"> + <i class="fa fa-angle-down"></i> Communecter + </a> + </h4> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + <a href="#info.p.apropos" class="lbh btn btn-danger pull-right btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title='Retourner vers la page de présentation "A propos"'> + <b><i class="fa fa-arrow-left"></i> À propos</b> + </a> + + <br> + <hr> + + <b><span class="letter-red">Communecter</span></b> est un dispositif de réseau sociétal local catalyseur d'une synergie régionale, collective et solidaire reliant tous types d’acteurs (Entreprises, Associations, Collectivités et citoyens), tous domaines et objectifs confondus. + <br> + <ul> + <li>La plateforme est un service d'aide à la population pour améliorer la valorisation des acteurs locaux pour produire un térritoire connecté.</li> + <li>Un outil de communication entre citoyens et collectivités.</li> + <li>Un outil de production et de visualisation d'open data pour mieux analyser et décider sur un térritoire.</li> + <li>Une boite outil citoyenne pour encourager , faciliter et dynamiser l'implication citoyenne.</li> + <li>le CTK : Citizen Tool Kit , Un socle technique et modulaire pour construire toutes sorte d'outils citoyens et administratifs spécialisés</li> + </ul> + + <br> + + <span class="letter-red">Communecter</span> c’est une plateforme web portée par le collectif <a href="#info.p.ph" class="lbh letter-yellow">Pixel Humain</a> dans lequel les citoyens sont connectés a leur commune. + Ils sont informés en quasi temps réel de ce qui se passe localement et participent à l'activité locale (dialogue facilité avec les collectivités, regroupement de citoyens pour réfléchir ou débattre...) + Connectés à la commune, ils le sont aussi avec leurs voisins pour partager des intérêts communs, avec des associations locales qui proposent des initiatives sociales et solidaires, des entreprises et producteurs qui fabriquent localement des produits. + <br><br> + A l’heure d’internet, de la simplification de la communication et du partage de l’information, tout est réuni pour fédérer et organiser cette dynamique. L’essence de <span class="letter-red">Communecter</span> est de créer cette synergie collective et solidaire reliant tous types d’acteurs, tous domaines et objectifs confondus. + <br><br> + A cet effet, <span class="letter-red">Communecter</span> souhaite être un catalyseur d’initiatives locales, un réseau social, libre de droit et d’accès, traitant de thématiques d’intérêt général. Cette plateforme internet de concertation est destinée à réunir et faire interagir les citoyens, le tissu associatif local, les entreprises locales et les pouvoirs publics. + <br><br> + Les objectifs sont de permettre à tous ces acteurs de ne plus agir chacun de leur côté mais de créer un territoire connecté et interactif. + La finalité de <span class="letter-red">Communecter</span> est d’apporter aux collectivités les réflexions individuelles et de donner aux individus l’intelligence collective. + <span class="letter-red">Communecter</span> met la recherche et l’experimentation au service de la société dans un contexte web 3.0 en proposant une boite à outils pour une Société 2.0. + <br><br> + Appliqué au monde de l’entreprise, un réseau social spécifique permet : + + <ul> + <li>de cartographier l’activité d’un territoire et voir facilement Qui fait quoi, donc trouver une entreprise</li> + <li>de créer des groupes d’entreprise et des sous groupes à l’interieur d’un groupe</li> + <li>de communiqué avec un groupe ou un sous groupe (module discussion : brainstorm, sondage, feedback...)</li> + <li>de reférencer une entreprise sur le territoire</li> + <li>créér l’organigramme de l’entreprise</li> + <li>d’élaborer des projets au sein d’un groupe (module projet)</li> + <li>divers mode de visualisation</li> + <li>pour une vue d’ensemble de structure et contenu de groupe</li> + <li>par thématique ou mot clef</li> + <li>par localité</li> + <li>par geolocalité</li> + <li>informer ou sonder l’ensemble des citoyens interressés à une thématique</li> + </ul> + <br><br> + La plateforme aborde des sujets d’innovation technique et d’usage social et sociétal. L’objectif est de proposer un réél outil d’experimentation pour les acteurs locaux oeuvrant sur des thématiques d’intérêt général afin d’obtenir des résultats concrets. Le projet regroupe des acteurs de la Recherche et Développement locale (dont des sociétés incubés), le LIM (Laboratoire d’Iinformatique et de Mathématique), des développeurs agréés par le Ministere de la recherche, des acteurs du changement, conscients de l’opportunité que peut leur apporter <span class="letter-red">Communecter</span>. + + </div> + + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + +<script> + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.communecter"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/mention.php b/views/app/info/kgougle/mention.php new file mode 100644 index 0000000000000000000000000000000000000000..466498306488cce9f627a25974d5cf0b5d0c9030 --- /dev/null +++ b/views/app/info/kgougle/mention.php @@ -0,0 +1,175 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; +?> +<style> +.main-col-search{ padding:0px !important; } +/*.fa-caret-right{font-size:56px;line-height: 10px;}*/ +.social-list{ padding: 0;} +.social-list li{ list-style-type: none; display:inline;margin-right:10px;} +.social-list li a{ font-size:20px;} +.social-list .btn{ margin-top: 15px;} +a.btn.btn-social{ color: #FFF; background-color: #2a3945; } +a.btn.btn-social:hover{ background: none;} +a.btn.btn-facebook:hover{ color: #3b5998;} +a.btn.btn-twitter:hover{ color: #00a0d1; border-color: #00a0d1;} +a.btn.btn-google:hover{ color: #dd4b39; border-color: #dd4b39;} +a.btn.btn-github:hover{ color: #4078C0; border-color: #4078C0;} +.yellowph{color:#F6E201;} +.information{font-size:15px;color:#8b91a0;} +.explainTitle{ + cursor: pointer; + background-color: #fff; + padding: 10px; + text-align: left; + /*color: #1a67e7;*/ + /*margin: 0px; + margin-top: 15px;*/ + border-bottom: 1px solid #666; +} +.explainDesc{ padding: 10px; background-color: white; } +.caretExplain{display: none; position: relative;top: 0px;background-color: white;color:#606060;} +</style> + + +<section class="padding-top-70"> + <div class="row padding-20 main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-2 col-md-2 col-sm-2 text-right hidden-xs" id=""> + + </div> + <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12"> + + + <h4 class="pull-left"><i class="fa fa-angle-down"></i> Mentions légales + </h4> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + <a href="#info.p.apropos" class="lbh btn btn-danger pull-right btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title='Retourner vers la page de présentation "A propos"'> + <b><i class="fa fa-arrow-left"></i> À propos</b> + </a> + + <br> + <hr> + + <div class="explainDesc"><i> + Merci de lire avec attentions les différentes modalités d’utilisation du présent site avant d’y parcourir ses pages. En vous connectant sur ce site, vous acceptez sans réserves les présentes modalités. Aussi, conformément de l’Article n°6 de la Loi n°2004-575 du 21 Juin 2004 pour la confiance dans l’économie numérique, les responsables du présent site internet <a href="http://www.kgougle.nc">www.kgougle.nc</a> sont :</i> + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Editeur du Site </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + <b>Association Open Atlas</b><br> + Numéro de SIRET : 513381830<br> + 102a rue pierre payet, 97421, La Réunion<br> + Email : contact@communecter.org<br> + Site Web : <a href="http://www.kgougle.nc">www.kgougle.nc</a><br><br> + + Responsable éditorial : Tristan Goguet<br> + 11 rue Joachim du Bellay, Dumbea, Koutio, Nouvelle-Calédonie<br> + RIDET : 1 225 812.001<br> + Email : tango@communecter.org<br> + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Hébergement </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + Hébergeur : Amazon, California, Usa + Site Web : <a href="http://www.amazon.com">www.amazon.com</a> + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Développement </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + <a href="https://www.communecter.org/#organization.detail.id.555eba56c655675cdd65bf19" target="_blank">Collectif d'indépendant O.R.D</a><br> + Adresse : 102a rue pierre payet, 97421, La Réunion<br> + <!-- Site Web : <a href="http://www.oceatoon.com">www.oceatoon.com</a> --> + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Conditions d’utilisation </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + Ce site (<a href="http://www.kgougle.nc">www.kgougle.nc</a>) est proposé en différents langages web (HTML, HTML5, Javascript, CSS, etc…) pour un meilleur confort d'utilisation et un graphisme plus agréable, nous vous recommandons de recourir à des navigateurs modernes comme Internet explorer, Safari, Firefox, Google Chrome, etc… + + <span style="color: #323333;">Association Open Atlas<b> </b></span>met en Å“uvre tous les moyens dont elle dispose, pour assurer une information fiable et une mise à jour fiable de ses sites internet. Toutefois, des erreurs ou omissions peuvent survenir. L'internaute devra donc s'assurer de l'exactitude des informations auprès de , et signaler toutes modifications du site qu'il jugerait utile. n'est en aucun cas responsable de l'utilisation faite de ces informations, et de tout préjudice direct ou indirect pouvant en découler. + + <b>Cookies</b> : Le site <a href="http://www.kgougle.nc">www.kgougle.nc</a> peut-être amené à vous demander l’acceptation des cookies pour des besoins de statistiques et d'affichage. Un cookies est une information déposée sur votre disque dure par le serveur du site que vous visitez. Il contient plusieurs données qui sont stockées sur votre ordinateur dans un simple fichier texte auquel un serveur accède pour lire et enregistrer des informations . Certaines parties de ce site ne peuvent être fonctionnelle sans l’acceptation de cookies. + + <b>Liens hypertextes :</b> Le site internet peut offrir des liens vers d’autres sites internet ou d’autres ressources disponibles sur Internet. L'Association Open Atlas ne dispose d'aucun moyen pour contrôler les sites en connexion avec le site internet, ne répond pas de la disponibilité de tels sites et sources externes, ni ne la garantit. Elle ne peut être tenue pour responsable de tout dommage, de quelque nature que ce soit, résultant du contenu de ces sites ou sources externes, et notamment des informations, produits ou services qu’ils proposent, ou de tout usage qui peut être fait de ces éléments. Les risques liés à cette utilisation incombent pleinement à l'internaute, qui doit se conformer à leurs conditions d'utilisation. + <br/><br/> + <!-- Les utilisateurs, les abonnés et les visiteurs des sites internet ne peuvent mettre en place un hyperlien en direction de ce site sans l'autorisation expresse et préalable de Association Open Atlas. + <br/><br/> + Dans l'hypothèse où un utilisateur ou visiteur souhaiterait mettre en place un hyperlien en direction d’un des sites internet de Association Open Atlas, il lui appartiendra d'adresser un email accessible sur le site afin de formuler sa demande de mise en place d'un hyperlien. Association Open Atlas se réserve le droit d’accepter ou de refuser un hyperlien sans avoir à en justifier sa décision. --> + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Services fournis </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + L'ensemble des activités de la société ainsi que ses informations sont présentés sur notre site <a href="http://www.kgougle.nc">www.kgougle.nc</a>.<br> + Association Open Atlas s’efforce de fournir sur le site www.kgougle.nc des informations aussi précises que possible. les renseignements figurant sur le site <a href="http://www.kgougle.nc">www.kgougle.nc</a> ne sont pas exhaustifs et les photos non contractuelles. Ils sont donnés sous réserve de modifications ayant été apportées depuis leur mise en ligne. Par ailleurs, tous les informations indiquées sur le site www.kgougle.nc<span style="color: #000000;"><b> </b></span>sont données à titre indicatif, et sont susceptibles de changer ou d’évoluer sans préavis. + </div> + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Limitation contractuelles sur les données</h5> + <div class="explainDesc"> + Les informations contenues sur ce site sont aussi précises que possibles et le site remis à jour à différentes périodes de l’année, mais peut toutefois contenir des inexactitudes ou des omissions. Si vous constatez une lacune, erreur ou ce qui parait être un dysfonctionnement, merci de bien vouloir le signaler par email, à l’adresse tango@communecter.org, en décrivant le problème de la manière la plus précise possible (page posant problème, type d’ordinateur et de navigateur utilisé, …). + <br/><br/> + Tout contenu téléchargé se fait aux risques et périls de l'utilisateur et sous sa seule responsabilité. En conséquence, ne saurait être tenu responsable d'un quelconque dommage subi par l'ordinateur de l'utilisateur ou d'une quelconque perte de données consécutives au téléchargement. <span style="color: #323333;">De plus, l’utilisateur du site s’engage à accéder au site en utilisant un matériel récent, ne contenant pas de virus et avec un navigateur de dernière génération mis-à -jour</span> + <br/><br/> + Les liens hypertextes mis en place dans le cadre du présent site internet en direction d'autres ressources présentes sur le réseau Internet ne sauraient engager la responsabilité de Association Open Atlas. + </div> + + <!-- <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Propriété intellectuelle </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + Tout le contenu du présent sur le site <a href="http://www.kgougle.nc">www.kgougle.nc</a>, incluant, de façon non limitative, les graphismes, images, textes, vidéos, animations, sons, logos, gifs et icônes ainsi que leur mise en forme sont la propriété exclusive de la société à l'exception des marques, logos ou contenus appartenant à d'autres sociétés partenaires ou auteurs. + <br/><br/> + Toute reproduction, distribution, modification, adaptation, retransmission ou publication, même partielle, de ces différents éléments est strictement interdite sans l'accord exprès par écrit de Association Open Atlas. Cette représentation ou reproduction, par quelque procédé que ce soit, constitue une contrefaçon sanctionnée par les articles L.335-2 et suivants du Code de la propriété intellectuelle. Le non-respect de cette interdiction constitue une contrefaçon pouvant engager la responsabilité civile et pénale du contrefacteur. En outre, les propriétaires des Contenus copiés pourraient intenter une action en justice à votre encontre. + </div> --> + + <!-- <h5 class=" explainTitle"> Déclaration à la CNIL </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + Conformément à la loi 78-17 du 6 janvier 1978 (modifiée par la loi 2004-801 du 6 août 2004 relative à la protection des personnes physiques à l'égard des traitements de données à caractère personnel) relative à l'informatique, aux fichiers et aux libertés, ce site a fait l'objet d'une déclaration auprès de la Commission nationale de l'informatique et des libertés (<a href="http://www.cnil.fr/">www.cnil.fr</a>). + </div> --> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Litiges </h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + Les présentes conditions du site <a href="http://www.kgougle.nc">www.kgougle.nc</a> sont régies par les lois françaises et toute contestation ou litiges qui pourraient naître de l'interprétation ou de l'exécution de celles-ci seront de la compétence exclusive des tribunaux dont dépend le siège social de la société. La langue de référence, pour le règlement de contentieux éventuels, est le français. + </div> + + <h5 class=" explainTitle"><i class="fa fa-caret-right"></i> Données personnelles</h5> + <center class="caretExplain"><i class="fa fa-caret-right"></i><br/></center> + <div class="explainDesc"> + De manière générale, vous n’êtes pas tenu de nous communiquer vos données personnelles lorsque vous visitez notre site Internet <a href="http://www.kgougle.nc">www.kgougle.nc</a>. + <br/><br/> + Cependant, <!-- ce principe comporte certaines exceptions. En effet, pour certains services proposés par notre site, vous pouvez être amenés à nous communiquer certaines données telles que : votre nom, votre fonction, le nom de votre société, votre adresse électronique, et votre numéro de téléphone. Tel est le cas lorsque vous remplissez le formulaire qui vous est proposé en ligne, dans la rubrique « contact ». Dans tous les cas, vous pouvez refuser de fournir vos données personnelles. Dans ce cas, vous ne pourrez pas utiliser les services du site, notamment celui de solliciter des renseignements sur notre société, ou de recevoir les lettres d’information. + <br/><br/> + Enfin, -->nous pouvons collecter de manière automatique certaines informations vous concernant lors d’une simple navigation sur notre site Internet, notamment : des informations concernant l’utilisation de notre site, comme les zones que vous visitez et les services auxquels vous accédez, votre adresse IP, le type de votre navigateur, vos temps d'accès. De telles informations sont utilisées exclusivement à des fins de statistiques internes, de manière à améliorer la qualité des services qui vous sont proposés. Les bases de données sont protégées par les dispositions de la loi du 1er juillet 1998 transposant la directive 96/9 du 11 mars 1996 relative à la protection juridique des bases de données. + </div> + </div> + </div> +</section> + + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + +<script> + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.mention"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/ph.php b/views/app/info/kgougle/ph.php new file mode 100644 index 0000000000000000000000000000000000000000..477f2cb4c01111c64baea2514aa14a24c1c6898f --- /dev/null +++ b/views/app/info/kgougle/ph.php @@ -0,0 +1,117 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; +?> + + +<section class="padding-top-70"> + <div class="row padding-20 main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-2 col-md-2 col-sm-2 text-right hidden-xs" id=""> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/LOGO_PIXEL_HUMAIN.png" class="img-responsive"> + + </div> + <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12"> + + <h5 class="pull-left"> + <i class="fa fa-angle-down"></i> + <a href="https://github.com/pixelhumain" class="tooltips homestead text-dark" target='_blank' + data-toggle="tooltip" data-placement="right" title="Découvrir les Pixels sur GitHub">Les pixels humains</a> + </h5> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + <a href="#info.p.apropos" class="lbh btn btn-danger pull-right btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title='Retourner vers la page de présentation "A propos"'> + <b><i class="fa fa-arrow-left"></i> À propos</b> + </a> + + <br> + <hr> + + Porté par l'association Open Atlas et l’agence O.R.D, <b>Pixel Humain</b> est un collectif regroupant différents acteurs qui souhaitent valoriser les <b>communs</b> et développer des outils <b>Open Source</b> afin de faciliter la cartographie et l’interaction des acteurs d’un <b>territoire</b> (citoyens, associations, entreprises et collectivités). <br><br> + + La société <b>O.R.D</b> (Open R&D) regroupe des acteurs du <b>numérique</b> (web, mobile, design, objets connectés). Elle est spécialisée dans les modes de communication innovants et défend depuis toujours l’innovation et la philosophie Open Source comme vecteurs de Collaboration Massive.<br><br> + + <b>L'association Open Atlas</b> est un espace multidisciplinaire d'échanges permettant de développer des projets dans des domaines de l’intérêt général, notamment autour de l’économie de l’information et de la communication. + Intérêt social et solidaire, l’association s’intéresse à tous les territoires, du local à + l’international et oeuvre, en toute diversité, dans les champs du développement humanitaire, culturel, artistique et de la communication. L’association se donne également pour objectif d’être un laboratoire et une cellule active de recherche et de développement, défendant le décloisonnement et le partage des compétences, ainsi que la liberté de penser et d’agir.<br><br> + + Open Atlas promeut l’action, <b>l’intelligence collective</b> et l’initiative citoyenne. Elle milite pour + la conjugaison de l’éthique et de l’efficacité, autour de l’économie numérique dans le + principe du développement soutenable, durable et solidaire. <br><br> + + <h5>Quelques projets portés et développés par Open Atlas : </h5> + <ul> + <li><b>Communecter</b>, un projet de réseau sociétal Open Source : + <ul><li>Nos adhérants sont : La Possession, Saint Louis, Lilles, Bretagne</li></ul> + </li> + <li><b>FabLab.re</b>, un collectif de bidouilleur Réunionais (2012) partenaire avec le Fablab de Barcelone</li> + <li><b>Cartographie d’acteur et recensement :</b> + <ul> + <li>Des acteurs du bien communs de Lilles :</li> + <li>Des tiers lieux de Lilles avec LA MEL </li> + <li>Des tiers lieux de Paris avec La ville de PAris</li> + </ul> + </li> + <li><b>Smarterre</b> : Programme de territoire intelligent et son modéle Kiltir Lab de tiers lieux camp TIC </li> + <li><b>Kgougle</b> : Un portail web dédié au territoire de la Nouvelle-Calédonie, basé sur le projet Communecter</li> + </ul> + + <br> + + --------------------------------------------------------------------------------<br> + <h5>A propos de ORD : </h5> + La société O.R.D (Open R&D) regroupe des acteurs du numérique (web, mobile, design, objets connectés). Elle est spécialisée dans les modes de communication innovants et défend depuis toujours l’innovation et la philosophie Open Source comme vecteurs de Collaboration Massive. + <br><br> + O.R.D regroupe une communauté de talents et d'expertises, bénéficiant de retours d’expérience éprouvés. Son objet est d'accompagner les entreprises et associations dans leur démarche d'innovation. Un clusters dédié à la recherche et au développement sous une forme décentralisé. + <br><br> + Nous offrons une gamme de produits et services à forte valeur ajoutée : + <ul> + <li>Développement de solutions numériques</li> + <li>Création Graphique (logo, direction artistique)</li> + <li>Utilisation de Hardware (Arduino, capteurs, imprimante 3D…)</li> + <li>Barcamp / Atelier collaboratif + créatif (Brainstorming, Serious game, Hackathon…)</li> + <li>Formations : outils collaboratifs, organisation projet, développement web, design…</li> + <li>Hébergement (hosting cloud ou dédié)</li> + <li>Animation Vidéo (design, motion...)</li> + <li>E-commerce</li> + <li>Installation et animation digitale (design intéractif)</li> + <li>Conseil et Think Tank innovation</li> + <li>Cartographie (SIG : Système d’information géographique)</li><br><br> + </ul> + + ORD promeut <b>l’intelligence collective et l’initiative citoyenne</b> en militant pour la conjugaison de l’éthique et de l’efficacité, autour de l’économie numérique et en oeuvrant dans le principe de développement soutenable, durable et solidaire.<br><br> + + <h4 class="pull-left"> + <a href="#info.p.communecter" class="tooltips homestead text-red" target='_blank' + data-toggle="tooltip" data-placement="right" title="En savoir plus sur le projet Communecter"> + <i class="fa fa-angle-right"></i> Communecter + </a> + </h4> + + </div> + + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + +<script> + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.ph"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/kgougle/sethome.php b/views/app/info/kgougle/sethome.php new file mode 100644 index 0000000000000000000000000000000000000000..d7cccff77ad51fac407e511d7b71df7a619e3377 --- /dev/null +++ b/views/app/info/kgougle/sethome.php @@ -0,0 +1,99 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); + + $urlKgou = Yii::app()->theme->baseUrl . "/assets/img/KGOUGLE-logo.png"; +?> +<style> + #iframevideo{ + width:640px; + height:480px; + } + +@media screen and (max-width: 1024px) { + #iframevideo{ + width:480px; + height:360px; + } +} + +@media (max-width: 768px) { + #iframevideo{ + width: 320px; + height: 180px; + margin-left: -15px; + } + + footer{ + position: absolute; + bottom: 0px; + } +} +</style> +<section class="padding-top-70"> + <div class="row col-md-12 main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-2 col-md-2 col-sm-2 text-right hidden-xs" id="sub-menu-left"> + + </div> + + <div class="col-lg-8 col-md-8 col-sm-8 col-xs-12"> + + <h5 class="pull-left"> + <i class="fa fa-angle-down"></i> Définir + <span class="letter-blue">K</span><span class="letter-yellow">GOU</span><span class="letter-green">GLE</span> + en page d'accueil + </h5> + + <a href="#web" class="lbh btn btn-default pull-right margin-left-5 btn-submenu tooltips" + data-toggle="tooltip" data-placement="top" title="Retourner vers le moteur de recherche"> + <b>Quitter cette page <i class="fa fa-arrow-right"></i></b> + </a> + + <br> + <hr> + <p class="hidden-xs"><b>Comment changer la page d'accueil de votre navigateur ?</b></p> + <span>Suivez les conseils de cette vidéo de <a class="letter-blue" href="http://www.commentcamarche.net/faq/16919-comment-changer-la-page-d-accueil-de-son-navigateur-web">commentcamarche.net</a> pour configurer votre navigateur : <b>(PC & Mac)</b><br> + <small class="hidden-xs"><a class="letter-green" href="http://www.commentcamarche.net/faq/16919-comment-changer-la-page-d-accueil-de-son-navigateur-web">http://www.commentcamarche.net/faq/16919-comment-changer-la-page-d-accueil-de-son-navigateur-web</a></small> + </span> + <!-- --------------------------------------------------------------------------------- --> + <br> + <ul class="hidden-xs"> + <li><b>0 min 16 sec :</b> Internet Explorer</li> + <li><b>0 min 35 sec :</b> Google Chrome</li> + <li><b>1 min 31 sec :</b> Mozilla Firefox</li> + <li><b>1 min 57 sec :</b> Opera</li> + </ul> + + <div class="col-md-12 margin-bottom-25"> + <h5>Copier / Coller l'url de kgougle :</h5> + <input type="text" value="http://www.kgougle.nc"> + </div> + <iframe width='740' height='480' frameborder='0' allowfullscreen id="iframevideo" + src='//player.ooyala.com/static/v4/stable/4.11.13/skin-plugin/iframe.html?ec=Vkazg4dzqp4NzPY7U_vhShMwTKIPJFnt&pbid=69cb820a85749509efca96fb36853ca&pcode=M4azMxOmZFabvRouis6TdYXWR9uR'> + </iframe> + + </div> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array( "subdomain"=>"info" ) ); ?> + + + +<script> + +var currentCategory = ""; + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.sethome"; +}); + +</script> \ No newline at end of file diff --git a/views/app/info/terla/contact.php b/views/app/info/terla/contact.php new file mode 100644 index 0000000000000000000000000000000000000000..b27a58d3b1d2eac72cfb95e00da1fb6965b8c488 --- /dev/null +++ b/views/app/info/terla/contact.php @@ -0,0 +1,144 @@ +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "info", + ) + ); +?> + + +<style type="text/css"> + .txt-mail{ + min-height: 300px; + max-height: 700px; + max-width: 100%; + min-width: 60%; + } + + #mapContactcontact{ + width:100%; + height:400px; + /*background:#62adbf;*/ + margin-top:50px; + } +</style> + +<header> +<div class="container"> + <div class="headerTitle"> <?php echo Yii::t("terla", "Contact"); ?></div> +</div> +</header> + +<section class="padding-top-70"> + <div class="container main-apropos padding-top-15 padding-bottom-50"> + + <div id="mapContactcontact"></div> + + <?php $this->renderPartial($layoutPath.'forms.'.Yii::app()->params["CO2DomainName"].'.formContact'); ?> + </div> +</section> + + +<?php $this->renderPartial($layoutPath.'footer', array( "subdomain"=>"info" ) ); ?> + + +<?php + $mapProvider = "OSM"; + if(PH::notlocalServer()){ + //error_log("NOT LOCAL"); + if(Yii::app()->params["mapboxActive"]==true) + $mapProvider = "mapbox"; + }else{ + //error_log("LOCAL"); + $mapProvider = "OSM"; + if(Yii::app()->params["forceMapboxActive"]==true) + $mapProvider = "mapbox"; + } + + $sigParamsContact = array( + "sigKey" => "contact", + + /* MAP */ + "mapHeight" => 235, + "mapTop" => 20, + "mapColor" => 'rgb(69, 96, 116)', //ex : '#456074', //'#5F8295', //'#955F5F', rgba(69, 116, 88, 0.49) + "mapOpacity" => 0.4, //ex : 0.4 + + /* MAP LAYERS (FOND DE CARTE) */ + "mapTileLayer" => '//stamen-tiles-{s}.a.ssl.fastly.net/toner/{z}/{x}/{y}.png', //'', //'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png' + "mapAttributions" => '<a href="http://www.opencyclemap.org">OpenCycleMap</a>', //'Map tiles by <a href="http://stamen.com">Stamen Design</a>' + + "mapProvider" => $mapProvider, + + //"mapTileLayer" => '//{s}.tile.stamen.com/toner/{z}/{x}/{y}.png', //'//{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png', //'http://{s}.tile.stamen.com/toner/{z}/{x}/{y}.png' + //"mapAttributions" => '<a href="http://www.opencyclemap.org">OpenCycleMap</a>', //'Map tiles by <a href="http://stamen.com">Stamen Design</a>' + + /* MAP BUTTONS */ + "mapBtnBgColor" => '#2B3136', //'rgba(76, 114, 126, 0.65)', //'#E6D414', + //"mapBtnColor" => 'rgba(76, 114, 126, 0.65)', //'#213042', + "mapBtnBgColor_hover" => '#0095FF', //'#5896AB', + + /* USE */ + "titlePanel" => '', + "usePanel" => true, + "useFilterType" => true, + "useRightList" => true, + "useZoomButton" => true, + "useHomeButton" => false, + "useSatelliteTiles" => true, + "useFullScreen" => true, + "useFullPage" => false, + "useBtnCloseMap" => false, + "useResearchTools" => true, + "useChartsMarkers" => false, + "useHelpCoordinates" => true, + + "notClusteredTag" => array(), + "firstView" => array( "coordinates" => array(-21.28329624575406, 55.45623779296875), + //array(-21.156238366109417, 166.497802734375),//array(-1.4061088354351594, -26.015625), + "zoom" => 14), + ); +?> + + +<script> + +var currentCategory = ""; +var initSigParamsContact = <?php echo json_encode($sigParamsContact); ?>; + +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#info.p.contact"; + $(".tooltips").tooltip(); + + $(".dropdown-onepage-main-menu li a").click(function(e){ + e.stopPropagation(); + var target = $(this).data("target"); + console.log(target); + KScrollTo(target); + }); + + $("#btn-onepage-main-menu").trigger("click"); + + var SigContact = SigLoader.getSig(); + SigContact.loadIcoParams(); + + console.log("loadMap","mapContact", initSigParamsContact); + var mapContact = SigContact.loadMap("mapContact", initSigParamsContact); + + var data = {"typeSig":"address"}; + var properties = { id : "id", + icon : SigContact.getIcoMarkerMap(data), + type : data.type, + typeSig : data.typeSig, + name : "Contact", + faIcon : SigContact.getIcoByType(data), + content: "hello" }; + + var marker = SigContact.getMarkerSingle(mapContact, properties, [-21.28329624575406, 55.45623779296875]); + +}); + +</script> \ No newline at end of file diff --git a/views/app/interoperability.php b/views/app/interoperability.php new file mode 100644 index 0000000000000000000000000000000000000000..e2eeb059c2934df373a7f247df729fdc448269f1 --- /dev/null +++ b/views/app/interoperability.php @@ -0,0 +1,913 @@ +<?php + +$cssAnsScriptFilesModule = array( + '/js/default/directory.js', + '/js/interoperability/interoperability.js', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , + Yii::app()->theme->baseUrl. '/assets'); + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath, + "page" => "interoperability") ); +?> + +<style> + + #page .bg-dark { + color: white !important; + background-color: #3C5665 !important; + } + #page .bg-red{ + background-color:#E33551 !important; + color:white!important; + } + #page .bg-blue{ + background-color: #5f8295 !important; + color:white!important; + } + #page .bg-green{ + background-color:#93C020 !important; + color:white!important; + } + #page .bg-orange{ + background-color:#FFA200 !important; + color:white!important; + } + #page .bg-yellow{ + background-color:#FFC600 !important; + color:white!important; + }N + #page .bg-turq{ + background-color: #229296 !important; + color:white!important; + } + #page .bg-purple{ + background-color:#8C5AA1 !important; + color:white!important; + } + #page #dropdown_search{ + min-height:500px; + /*margin-top:30px;*/ + } + #page .row.headerDirectory{ + margin-top: 20px; + display: none; + } + #page p { + font-size: 13px; + } + .container-result-search { + border-top:1px solid #eee; + padding-top:15px; + } + + .btn-create-page{ + margin-top:0px; + z-index: 10; + border-radius: 0 50%; + -ms-transform: rotate(7deg); + -webkit-transform: rotate(7deg); + transform: rotate(-45deg); + } + .btn-create-page:hover{ + background-color: white!important; + color:#34a853!important; + border: 2px solid #34a853!important; + + } + .main-btn-scopes { + margin-top: 7px; + } + + .scope-min-header{ + float: left; + margin-top: 27px; + margin-left: 35px; + } + + .links-create-element .btn-create-elem{ + margin-top:25px; + } + + .subtitle-search{ + display: none; + } + + .breadcrum-communexion{ + margin-top:25px; + } + + .breadcrum-communexion .item-globalscope-checker{ + border-bottom:1px solid #e6344d; + } + .item-globalscope-checker.inactive{ + color:#DBBCC1 !important; + border-bottom:0px; + margin(top:-6px;) + } + .item-globalscope-checker:hover, + .item-globalscope-checker:active, + .item-globalscope-checker:focus{ + color:#e6344d !important; + border-bottom:1px solid #e6344d; + text-decoration: none !important; + } + header .container, + .header .container{ + padding-bottom: 40px; + } + + .btn-directory-type.bg-white { + background-color: #F2F2F2 !important; + } + + .colonne { + display:table-cell; + padding:10px; + } + + .logo_interop { + margin-top: 10px; + margin-bottom: 10px; + max-height: 100px; + width: auto; + height: auto; + } + .lien_interop { + margin-bottom: 20px; + } + + .lien_interop_single { + max-height: 134px; + } + + .colonne { + display:table-cell; + padding:25px; + } + + .disptable { + display:table; + } + + .one_opendasoft_item { + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + } + + .favElBtn, .favAllBtn{ + padding: 5px 8px; + font-weight: 300; + margin-bottom:5px; + } + #searchBarTextJS{ + margin-bottom: 15px; + } + .btn-open-filliaire{ + font-weight: 700; + text-transform: uppercase; + background-color: #3C5665 !important; + color: white; + } + + #col-btn-type-directory .btn-directory-type, + #sub-menu-left .btn-select-type-anc{ + margin-bottom:5px; + /*font-weight: 700;*/ + text-transform: uppercase; + background-color: transparent; + } + + .btn-select-filliaire:hover{ + background-color: #F2F2F2; + } + @media (max-width: 768px) { + #col-btn-type-directory{ + text-align: center!important; + } + } + +</style> + +<div class="input-group col-md-6 col-md-offset-3" id="main-input-group" style="margin-bottom:15px;"> + <input class="form-control" id="main-search-bar" placeholder="<?php echo Yii::t("common", "Search a page ...");?>" type="text"> + <span class="input-group-addon bg-white" id="main-search-bar-addon"> + <i class="fa fa-search"></i> + </span> +</div> + +<div style='text-align:center;'> + <button class="btn btn-default" id="main-btn-start-search-interop"> + <i class="fa fa-search"></i> Lancer la recherche + </button> +</div> + + <div id="container-scope-filter" class="col-md-10 col-sm-10 col-xs-12 padding-5"> + <?php $this->renderPartial($layoutPath.'breadcrum_communexion', array("type"=>@$type)); ?> + </div> + +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 hidden text-center subsub" id="sub-menu-filliaire"> +<?php $filliaireCategories = CO2::getContextList("filliaireCategories"); + foreach ($filliaireCategories as $key => $cat) { + ?> + <?php if(is_array($cat)) { ?> + <div class="col-md-2 col-sm-3 col-sm-6 no-padding"> + <button class="btn btn-default col-md-12 col-sm-12 padding-10 bold text-dark elipsis margin-bottom-5 btn-select-filliaire" + data-fkey="<?php echo $key; ?>" + style="border-radius:0px; border-color: transparent; text-transform: uppercase;" + data-keycat="<?php echo $cat["name"]; ?>"> + <i class="fa <?php echo $cat["icon"]; ?> fa-2x hidden-xs"></i><br><?php echo $cat["name"]; ?> + </button> + </div> + <?php } ?> + </button> + <?php } ?> + <hr class="col-md-12 col-sm-12 col-xs-12 no-padding" id="before-section-result"> +</div> + +<div id="all_activity" class="hidden col-sm-12 col-md-12 hidden-xs hidden-sm text-left"></div> + +<div id="container-result-interop_search" class="container-result-search col-xs-12 bg-white"> + + <div class="col-sm-2 col-md-2 col-xs-12 text-right pull-left margin-top-15 no-padding" id="col-btn-type-directory"> + <button class="btn text-black bg-dark btn-open-filliaire"> + <i class="fa fa-th"></i> + <span class="hidden-xs">Thématiques</span> + </button><hr class="hidden-xs"> + <button id="btn-all-interop" class="btn text-grey btn-directory-type" data-type="all_interop"> + <i class="fa fa-search"></i> + <span class="hidden-xs">TOUS</span> + </button><br class="hidden-xs"> + <hr class="hidden-xs"> + <button id="btn-wiki" class="btn text-grey btn-directory-type" data-type="wikidata"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo-wikidata.png'> + <span class="hidden-xs">Wikidata</span> + </button><br class="hidden-xs"> + <button id="btn-datagouv" class="btn text-red btn-directory-type" data-type="datagouv"> + <img width=30 src='<?php echo $this->module->assetsUrl; ?>/images/logos/data-gouv-logo.png'> + <span class="hidden-xs">DataGouv</span> + </button><br class="hidden-xs"> + <button id="btn-osm" class="btn text-green btn-directory-type" data-type="osm"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/OSM-logo.png'> + <span class="hidden-xs">Open Stret Map</span> + </button><br class="hidden-xs"> + <button id="btn-ods" class="btn text-blue btn-directory-type" data-type="ods"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/opendata-soft-logo.png'> + <span class="hidden-xs">ODS : Base Sirene</span> + </button><br class="hidden-xs"> + <button id="btn-ods" class="btn text-yellow btn-directory-type" data-type="datanova"> + <img width=70 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo-laposte.png'> + <span class="hidden-xs">La poste</span> + </button><br class="hidden-xs"> + <button id="btn-pole-emploi" class="btn text-blue btn-directory-type" data-type="pole_emploi"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo_pole_emploi.png'> + <span class="hidden-xs">Pôle emploi</span> + </button><br class="hidden-xs"> + <hr class="hidden-xs"> + <button id="btn-eco-doct" class="btn text-blue btn-directory-type" data-type="eco_doct"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo_open_data_educ.jpg'> + <span class="hidden-xs">Ecoles doct</span> + </button><br class="hidden-xs"> + <button id="btn-membres-univ" class="btn text-blue btn-directory-type" data-type="membres_univ"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo_open_data_educ.jpg'> + <span class="hidden-xs">Membres univ.</span> + </button><br class="hidden-xs"> + <button id="btn-struc-recherche" class="btn text-blue btn-directory-type" data-type="struct_recherche"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo_open_data_educ.jpg'> + <span class="hidden-xs">Struc. recherche</span> + </button><br class="hidden-xs"> + <button id="btn-etab-recherche" class="btn text-blue btn-directory-type" data-type="etab_recherche"> + <img width=50 src='<?php echo $this->module->assetsUrl; ?>/images/logos/logo_open_data_educ.jpg'> + <span class="hidden-xs">Etab. recherche</span> + </button><br class="hidden-xs"> + <hr class="hidden-xs"> + </div> + <div id="dropdown_search" class="col-md-8 col-sm-8 col-xs-10 padding-10"></div> + <div id="listTags" class="col-sm-2 col-md-2 hidden-xs hidden-sm text-left"></div> +</div> + +<div class="col-md-12 col-sm-12 col-xs-12 bg-white no-padding shadow" id="content-social" style="min-height:700px;"> + + <div class="col-md-12 col-sm-12 col-xs-12 padding-5" id="page"></div> + +</div> + +<script type="text/javascript"> + + var filliaireCategories = <?php echo json_encode($filliaireCategories); ?>; + searchTags = $("#searchTags").val(); + + var all_interop_data = []; + var city_data = {}; + + var headerParams = { + "wikidata" : { color: "grey", icon: "group", name: "Wikidata" }, + "datagouv" : { color: "red", icon: "bullhorn", name: "DataGouv" }, + "osm" : { color: "green", icon: "bullhorn", name: "Open Street Map" }, + "ods" : { color: "azure", icon: "bullhorn", name: "OpenDatasoft" }, + "datanova" : { color: "yellow", icon: "bullhorn", name: "Datanova" }, + "pole_emploi" : { color: "blue", icon: "bullhorn", name: "Pole emploi" }, + "etab_recherche" : { color: "blue", icon: "bullhorn", name: "Etablissement impliqués dans la recherche" }, + "eco_doct" : { color: "blue", icon: "bullhorn", name: "Ecole doctorales accrédité" }, + "membres_univ" : { color: "blue", icon: "bullhorn", name: "Membres des universités de France" }, + "struct_recherche" : { color: "blue", icon: "bullhorn", name: "Structures de recherche" }, + } + + // if( typeof themeObj != "undefined" && typeof themeObj.headerParams != "undefined" ) + // { + // $.each(themeObj.headerParams,function(k,v) + // { + // headerParams[k] = v; + // }); + // } + + jQuery(document).ready(function() { + initKInterface({"affixTop":320}); + initTypeSearchInterop(); + typeD = "wikidata"; + + $('.moduleTitle').append('<br/><a href="javascript:OpenDynFormForProposeOpenData()">Vous avez des données Open Data que vous souhaiteriez incorporez dans Communecter ? N\'attendez plus ! Proposez vous même vos sources de données libres et faites les valoriser !!!</a>'); + + $(".btn-decommunecter").click(function(){ + activateGlobalCommunexion(false); + }); + + $(".btn-directory-type").click(function(){ + + mylog.log('LE TYPE DE DIRECTORY SOUHAITE : ', $(this).data("type") ); + typeD = $(this).data("type"); + putInteropImageOnTitle(typeD); + initTypeSearchInterop(); + startSearchInterop(0, 30); + KScrollTo("#container-result-interop_search"); + }); + + $(".btn-open-filliaire").click(function(){ + if($("#sub-menu-filliaire").hasClass("hidden")) { + $("#sub-menu-filliaire").removeClass("hidden"); + } + else { + $("#sub-menu-filliaire").addClass("hidden"); + } + }); + + $(".btn-select-filliaire").click(function(){ + var fKey = $(this).data("fkey"); + myMultiTags = {}; + $.each(filliaireCategories[fKey]["tags"], function(key, tag){ + addTagToMultitag(tag); + }); + + initTypeSearchInterop(type); + + startSearchInterop(0, 30); + KScrollTo("#container-result-interop_search"); + }); + + $("#main-btn-start-search-interop").click(function() { + + initTypeSearchInterop(); + startSearchInterop(0, 30); + KScrollTo("#container-result-interop_search"); + + }); + + $(window).bind("scroll",function(){ mylog.log("test scroll", scrollEnd); + if(!loadingData && !scrollEnd && !isMapEnd){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + if (typeD == "all_interop" ) + nb_of_stop = 0; + + if ( (typeD !== "all_interop" && part_data.length == 30) || typeD == "all_interop" ) { + scrollEnd = true; + startSearchInterop(currentIndexMin+indexStep, currentIndexMax+indexStep); + } + } + } + }); + + type = "all_interop"; + indexMin = 0; + indexMax = 30; + + startNow = 0; + endNow= 30; + + loadingData = false; + + var indexStep = 30; + var currentIndexMin = 0; + var currentIndexMax = indexStep; + var totalData = 0; + + // startSearchInterop(0, 30); + }); + + function searchCallback() { + directory.elemClass = '.searchEntityContainer '; + directory.filterTags(true); + $(".btn-tag").off().on("click",function(){ directory.toggleEmptyParentSection(null,"."+$(this).data("tag-value"), directory.elemClass, 1)}); + $("#searchBarTextJS").off().on("keyup",function() { + directory.search ( null, $(this).val() ); + }); + } + + function initTypeSearchInterop(){ + contextTestMap = []; + scrollEnd = false; + all_interop_data = []; + all_interop_url = []; + totalData = 0; + nb_of_stop = 0; + startNow = 0; + endNow = 30; + indexMin = 0; + indexMax = 30; + } + + function getUrlForInteropResearch(indexMin, indexMax) { + + all_interop_url = []; + var url_interop = ""; + + city_id = getCityId(); + type_zone = getTypeZone(); + + city_data = getCityDataById(city_id, type_zone); + + var geoShape = getGeoShapeForOsm(city_data.geoShape); + var geofilter = getGeofilterPolygon(city_data.geoShape); + var city_wikidataID = city_data.wikidataID; + var city_insee = city_data.insee; + + if (searchTags !== "") { + var libelle_activity = getLibelleActivity(); + var amenity_filter = getAmenityFilter(); + var rome_letters = getRomeActivityCodeFromThematic(searchTags); + } else { + var libelle_activity = null; + var amenity_filter = null; + var rome_letters = null; + } + + if (typeD !== "undefined") { + if (typeD == "wikidata") { + url_interop = getUrlInteropForWiki(city_wikidataID); + } else if (typeD == "datagouv") { + url_interop = getUrlInteropForDatagouv(city_insee); + } else if (typeD == "osm") { + url_interop = getUrlInteropForOsm(geoShape, amenity_filter); + } else if (typeD == "ods") { + url_interop = getUrlInteropForOds(geofilter, libelle_activity); + } else if (typeD == "datanova") { + url_interop = getUrlInteropForDatanova(geofilter); + } else if (typeD == "pole_emploi") { + url_interop = getUrlInteropForPoleEmploi(city_insee, rome_letters); + } else if (typeD == "membres_univ") { + url_interop = getUrlInteropForEducMembre(geofilter); + } else if (typeD == "etab_recherche") { + url_interop = getUrlInteropForEducEtab(geofilter); + } else if (typeD == "eco_doct") { + url_interop = getUrlInteropForEducEcole(geofilter); + } else if (typeD == "struct_recherche") { + url_interop = getUrlInteropForEducStruct(geofilter); + } + + else if (typeD == "all_interop") { + all_interop_url = []; + if (searchTags == "") { + url_interop = getUrlInteropForWiki(city_wikidataID); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForDatagouv(city_insee); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForOsm(geoShape, amenity_filter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForOds(geofilter, libelle_activity); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForDatanova(geofilter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForEducMembre(geofilter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForEducEtab(geofilter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForEducEcole(geofilter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForEducStruct(geofilter); + all_interop_url.push(url_interop); + + if (text_search_name == "") { + url_interop = getUrlInteropForPoleEmploi(city_insee, rome_letters); + all_interop_url.push(url_interop); + } + } else { + url_interop = getUrlInteropForOsm(geoShape, amenity_filter); + all_interop_url.push(url_interop); + + url_interop = getUrlInteropForOds(geofilter, libelle_activity); + all_interop_url.push(url_interop); + + if (text_search_name == "") { + url_interop = getUrlInteropForPoleEmploi(city_insee, rome_letters); + all_interop_url.push(url_interop); + } + } + } + } + + return url_interop; + } + + function startSearchInterop(indexMin, indexMax) { + + if (typeof(typeD) == "undefined") { + typeD = "wikidata"; + } + + indexStep = 30; + + text_search_name = ($('#main-search-bar').length>0) ? $('#main-search-bar').val() : ""; + + currentIndexMin = indexMin; + currentIndexMax = indexMax; + + if(name.length>=3 || name.length == 0) + { + var locality = ""; + if( communexionActivated ) + { + if(typeof(cityInseeCommunexion) != "undefined") + { + if(levelCommunexion == 1) locality = cpCommunexion; + if(levelCommunexion == 2) locality = inseeCommunexion; + }else{ + if(levelCommunexion == 1) locality = inseeCommunexion; + if(levelCommunexion == 2) locality = cpCommunexion; + } + //if(levelCommunexion == 3) locality = cpCommunexion.substr(0, 2); + if(levelCommunexion == 3) locality = inseeCommunexion; + if(levelCommunexion == 4) locality = inseeCommunexion; + if(levelCommunexion == 5) locality = ""; + } + } + + var url_interop = getUrlForInteropResearch(); + if (all_interop_url.length > 0 ) { + all_interop_data = []; + $.each(all_interop_url,function(index, value) { + getInteropResults(value); + }); + } else { + getInteropResults(url_interop); + } + } + + function getInteropResults(url_interop) { + + mylog.log("nouvelle url à passer dans l'auto complete : ", url_interop); + + loadingData = true; + + str = "<i class='fa fa-circle-o-notch fa-spin'></i>"; + $(".btn-start-search").html(str); + $(".btn-start-search").addClass("bg-azure"); + $(".btn-start-search").removeClass("bg-dark"); + + if(indexMin > 0) + $("#btnShowMoreResult").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + else + $("#dropdown_search").html("<center><span class='search-loaderr text-dark' style='font-size:20px;'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span></center>"); + + if(isMapEnd) { + $.blockUI({message : "<h1 class='homestead text-red'><i class='fa fa-spin fa-circle-o-notch'></i> Commune<span class='text-dark'>xion en cours ...</span></h1>"}); + } + + $.ajax({ + type: "POST", + url: url_interop, + dataType: "json", + error: function (data){ + mylog.log("error autocomplete INTEROP search"); mylog.dir(data); + //signal que le chargement est terminé + loadingData = false; + // $('#dropdown_search').append("<br/><div><h1>Something went wrong during this research ... </h1></div>"); + $("#dropdown_search").html("<center><span class='search-loaderr text-dark' style='font-size:20px;'></i> Something went wrong during this research ...</span></center>"); + }, + success: function(data){ mylog.log("success autocomplete INTEROP search", data); + toastr.success("Une partie des données est arrivé"); + + all_data_for_map = []; + + if (data.length > 0) { + if (data[0]["source"]["key"] == "convert_ods" || data[0]["source"]["key"] == "convert_datanova" || data[0]["source"]["key"] == "convert_educ_struct" || data[0]["source"]["key"] == "convert_educ_etab" || data[0]["source"]["key"] == "convert_educ_membre" || data[0]["source"]["key"] == "convert_educ_ecole") { + part_data = data; + } else { + part_data = data.slice(startNow, endNow); + } + } else { + part_data = []; + } + + mylog.log('PART_DATA POUR CHAQUE INTEROP RESEARCH : ', part_data); + + $.each(part_data,function(index,value) { + all_interop_data.push(value); + }); + + startNow = startNow + 30; + endNow = endNow + 30; + + if(!part_data){ toastr.error(part_data.content); } + else { + countData = 0; + + $.each(part_data, function(i, v) { + countData++; + }); + + totalData += countData; + + str = ""; + var city, postalCode = ""; + + //parcours la liste des résultats de la recherche + //mylog.dir(data); + str += '<div class="col-md-12 text-left" id="nb_results_search">'; + str += "<h4 style='margin-bottom:10px; margin-left:15px;' class='text-dark'>"+ + "<i class='fa fa-angle-down'></i> " + totalData + " résultats "; + str += "<small>"; + if(typeof headerParams != "undefined"){ + searchType = []; + if (typeD == "all_interop") { + $.each(headerParams, function(index, value) { + searchType.push(index); + }); + } else { + searchType.push(typeD); + } + $.each(searchType, function(key, val){ + var params = headerParams[val]; + str += "<span class='text-"+params.color+"'>"+ + "<i class='fa fa-"+params.icon+" hidden-sm hidden-md hidden-lg padding-5'></i> <span class='hidden-xs'>"+params.name+"</span>"+ + "</span> "; + });//console.log("myMultiTags", myMultiTags); + $.each(myMultiTags, function(key, val){ + var params = headerParams[val]; + str += "<span class='text-dark hidden-xs pull-right'>"+ + "#"+key+ + "</span> "; + }); + } + str += "</small>"; + str += "</h4>"; + str += "<hr style='float:left; width:100%;'/>"; + str += "</div>"; + + if ((Object.keys(part_data).length > 0 && typeD == "all_interop") || (typeD !== "all_interop") ){ + str += directory.showResultsDirectoryHtml(part_data); + + + if(str == "") { + $.unblockUI(); + showMap(false); + $(".btn-start-search").html("<i class='fa fa-refresh'></i>"); + if(indexMin == 0){ + //ajout du footer + var msg = "<i class='fa fa-ban'></i> "+trad.noresult; + if(name == "" && locality == "") msg = "<h3 class='text-dark padding-20'><i class='fa fa-keyboard-o'></i> Préciser votre recherche pour plus de résultats ...</h3>"; + str += '<div class="pull-left col-md-12 text-left" id="footerDropdown" style="width:100%;">'; + str += "<hr style='float:left; width:100%;'/><h3 style='margin-bottom:10px; margin-left:15px;' class='text-dark'>"+msg+"</h3><br/>"; + str += "</div>"; + $("#dropdown_search").html(str); + $("#searchBarText").focus(); + } + } + else + { + //ajout du footer + str += '<div class="pull-left col-md-12 text-center" id="footerDropdown" style="width:100%;">'; + str += "<hr style='float:left; width:100%;'/><h3 style='margin-bottom:10px; margin-left:15px;' class='text-dark'>" + totalData + " résultats</h3>"; + //str += '<span class="" id="">Complétez votre recherche pour un résultat plus précis</span></center><br/>'; + str += '<button class="btn btn-default" id="btnShowMoreResult"><i class="fa fa-angle-down"></i> Afficher plus de résultat</div></center>'; + str += "</div>"; + + //si on n'est pas sur une première recherche (chargement de la suite des résultat) + if(indexMin > 0){ + + //on supprime l'ancien bouton "afficher plus de résultat" + $("#btnShowMoreResult").remove(); + //on supprimer le footer (avec nb résultats) + $("#footerDropdown").remove(); + + //on calcul la valeur du nouveau scrollTop + var heightContainer = $(".main-container")[0].scrollHeight - 180; + //on affiche le résultat à l'écran + $("#dropdown_search").append(str); + //on scroll pour afficher le premier résultat de la dernière recherche + $(".my-main-container").animate({"scrollTop" : heightContainer}, 1700); + //$(".my-main-container").scrollTop(heightContainer); + + //si on est sur une première recherche + }else{ + //on affiche le résultat à l'écran + + $("#dropdown_search").html(str); + + if(typeof myMultiTags != "undefined"){ + $.each(myMultiTags, function(key, value){ //mylog.log("binding bold "+key); + $("[data-tag-value='"+key+"'].btn-tag").addClass("bold"); + }); + } + } + + indexMin = startNow; + indexMax = endNow; + + $.each(part_data, function(index, value) { + createAndPushItemForMap(value); + }); + + if (typeD == "datagouv") { + contextTestMap = []; + } + + Sig.showMapElements(Sig.map, contextTestMap); + + + $('.add2fav').attr('target', '_blank'); + //remet l'icon "loupe" du bouton search + $(".btn-start-search").html("<i class='fa fa-refresh'></i>"); + //active les link lbh + // bindLBHLinks(); + + $(".start-new-communexion").click(function(){ + setGlobalScope( $(this).data("scope-value"), $(this).data("scope-name"), $(this).data("scope-type"), + $(this).data("insee-communexion"), $(this).data("name-communexion"), $(this).data("cp-communexion"), + $(this).data("region-communexion"), $(this).data("country-communexion") ) ; + activateGlobalCommunexion(true, true); + }); + + $.unblockUI(); + $("#map-loading-data").html(""); + + //initialise les boutons pour garder une entité dans Mon répertoire (boutons links) + // initBtnLink(); + } //end else (str=="") + + //signal que le chargement est terminé + loadingData = false; + + //quand la recherche est terminé, on remet la couleur normal du bouton search + $(".btn-start-search").removeClass("bg-azure"); + } + + if(countData < 30){ + $("#btnShowMoreResult").remove(); + scrollEnd = true; + }else{ + scrollEnd = false; + } + + if(typeof searchCallback == "function") { + searchCallback(); + } + + if(mapElements.length==0) mapElements = part_data; + else $.extend(mapElements, part_data); + } + } + }); + } + + function putInteropImageOnTitle(type) { + + $(".moduleTitle").html( + '<i class="fa fa-database"></i>' + + ' Module d\'intéropérabilité <br/>' + ); + + var urlImg = "<img width=100 style='margin-top:20px;' src='<?php echo $this->module->assetsUrl; ?>"; + + if (type == "wikidata") { + urlImg += "/images/logos/logo-wikidata.png'>"; + } else if (type == "datagouv") { + urlImg += "/images/logos/data-gouv-logo.png'>"; + } else if (type == "osm") { + urlImg += "/images/logos/OSM-logo.png'>"; + } else if (type == "ods") { + urlImg += "/images/logos/opendata-soft-logo.png'>"; + } else if (type == "datanova") { + urlImg += "/images/logos/logo-laposte.png'>"; + } else if (type == "pole_emploi") { + urlImg += "/images/logos/logo_pole_emploi.png'>"; + } + + $(".moduleTitle").append(urlImg); + } + + function createAndPushItemForMap(value) { + + var new_item_id = Math.random(); + var new_item_id = new_item_id.toString(); + var new_item_id = new_item_id.replace('\.', ''); + var new_item_id = parseInt(new_item_id); + var item = { + "_id": { + "$id" : new_item_id, + }, + "geo": { + "@type": "GeoCoordinates", + "latitude": value.geo.latitude, + "longitude": value.geo.longitude, + }, + "name" : value.name, + "typeSig" : value.type, + "url" : value.url, + } + contextTestMap.push(item); + } + + function getAmenityFilter() { + + var theme_array = getThemeArray(); + + var amenity_filter = ""; + + $.each(theme_array, function(index, value) { + if (searchTags == index) { + $.each(value, function(index2, value2) { + if (value.length > 0) { + amenity_filter += "|" + value2; + } + }); + } + }); + + amenity_filter = amenity_filter.substring(1); + + return amenity_filter; + } + + function getLibelleActivity() { + + var activity_array = getActivityArray(); + + var libelle_activity = ""; + + $.each(activity_array, function(index, value) { + if (searchTags == index) { + $.each(value, function(index2, value2) { + libelle_activity += "&refine.libapen[]="+value2; + }); + } + }); + if (libelle_activity == "") { + libelle_activity = "&refine.libapen[]=NO AVAILABLE ACTIVITY"; + } + + libelle_activity += "&disjunctive.libapen=true"; + + return libelle_activity; + } + + function OpenDynFormForProposeOpenData(mapping = null) { + + var form = { + saveUrl : baseUrl+"/"+moduleId+"/interoperability/proposeopendatasource", + icon : "group", + type : "object", + dynForm : { + jsonSchema : { + title : "Proposez vos sources Open Data", + icon : "fa-group", + afterSave : function(data){ + dyFObj.closeForm(); + }, + properties : { + url : dyFInputs.inputUrl("L'url de la source de donnée"), + description : dyFInputs.textarea("Présentez rapidement les valeurs de votre source"), + } + } + } + }; + + dyFObj.openForm(form, null, mapping); + + $(".modal-header").addClass("bg-dark"); + } + +</script> \ No newline at end of file diff --git a/views/app/live.php b/views/app/live.php new file mode 100644 index 0000000000000000000000000000000000000000..f1e0cb198fc8ac7645e10aff0b699e2ddb932ee6 --- /dev/null +++ b/views/app/live.php @@ -0,0 +1,199 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( + array('/css/timeline2.css', + '/css/news/index.css', + '/css/default/directory.css', + ) , Yii::app()->theme->baseUrl. '/assets'); + + + $cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/autosize.js', + '/js/news/newsHtml.js', + '/js/default/live.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "type" => @$type, + "page" => "live", + "explain"=> "Live public : retrouvez tous les messages publics selon vos lieux favoris") ); + $randImg = rand(1, 2); + //$randImg = 1; +?> + +<style> + header { + background: url("<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/background-header/live/pexels-<?php echo $randImg; ?>.jpeg") top center; + min-height:300px; + } + + .scope-min-header{ + float: left; + margin-top: 23px; + margin-left: 35px; + } + .main-btn-scopes{ + margin-top:0px !important; + } + #formCreateNewsTemp .form-create-news-container{ + max-width: inherit !important; + } + .item-globalscope-checker.inactive{ + color:#DBBCC1 !important; + border-bottom:0px; + margin(top:-6px;) + } + .item-globalscope-checker:hover, + .item-globalscope-checker:active, + .item-globalscope-checker:focus{ + color:#e6344d !important; + border-bottom:1px solid #e6344d; + text-decoration: none !important; + } + #noMoreNews { + position: relative; + padding: 0px 40px; + bottom: 0px; + width: 100%; + text-align: center; + background: white; + } + + #btn-my-co{ + margin-top: 15px; + } +</style> +<div class="row padding-10 bg-white"> +<div class="col-md-12 col-sm-12 col-xs-12 bg-white top-page no-padding" id="" style="padding-top:0px!important;"> + <div id="container-scope-filter" class="col-md-offset-1 col-md-11 col-lg-offset-1 col-lg-11 col-sm-12 col-xs-12 col-md-offset" style="padding:20px 0px;"> + <?php + $this->renderPartial($layoutPath.'breadcrum_communexion', array("type"=>@$type)); + ?> + </div> + + <div class="col-lg-1 col-md-1 hidden-sm hidden-xs text-right hidden-xs" id="sub-menu-left"></div> + + <div class="col-lg-10 col-md-10 col-sm-12 col-xs-12 margin-top-10"> + <div id="newsstream"></div> + </div> + + <!-- <div class="pull-right col-lg-3 col-md-3 col-sm-4 hidden-xs padding-20 margin-top-50" id="nowList"> + + </div> --> +</div> +</div> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array("subdomain"=>"live")); ?> + + +<script type="text/javascript" > + +<?php $parent = Person::getById(@Yii::app()->session["userId"]); ?> + + +var indexStepInit = 5; +var searchType = ["organizations", "projects", "events", "needs"]; +var allNewsType = ["news"];//, "idea", "question", "announce", "information"]; + +var liveTypeName = { "news":"<i class='fa fa-rss'></i> Les messages", + //"idea":"<i class='fa fa-info-circle'></i> Les idées", + //"question":"<i class='fa fa-question-circle'></i> Les questions", + //"announce":"<i class='fa fa-ticket'></i> Les annonces", + //"information":"<i class='fa fa-newspaper-o'></i> Les informations" + }; + + +var scrollEnd = false; +<?php if(@$type && !empty($type)){ ?> + searchType = ["<?php echo $type; ?>"]; +<?php }else{ ?> + searchType = $.merge(allNewsType, searchType); +<?php } ?> + +var loadContent = '<?php echo @$_GET["content"]; ?>'; +var dataNewsSearch = {}; +var dateLimit=0; + +var personCOLLECTION = "<?php echo Person::COLLECTION; ?>"; +//var scrollEnd = false; +jQuery(document).ready(function() { + + $(".subsub").hide(); + setTitle("", "", "Live"); + + /*var liveType = "<?php echo (@$type && !empty($type)) ? $type : ''; ?>"; + if(typeof liveTypeName[liveType] != "undefined") + liveType = " > "+liveTypeName[liveType]; + else liveType = ", la boite à outils citoyenne connectée " + liveType; +*/ + setTitle("Live", "Live"); + //initFilterLive(); + //showTagsScopesMin("#list_tags_scopes"); + $("#btn-slidup-scopetags").click(function(){ + slidupScopetagsMin(); + }); + $('#btn-start-search').click(function(e){ + startNewsSearch(false); + }); + + + + searchPage = true; + //startNewsSearch(true); + + $(".titleNowEvents .btnhidden").hide(); + + //init loading in scroll + + initKInterface();//{"affixTop":10}); + initFreedomInterface(); + + Sig.restartMap(Sig.map); + + + + $("#main-search-bar").keyup(function(e){ + $("#second-search-bar").val($(this).val()); + $("#input-search-map").val($(this).val()); + if(e.keyCode == 13){ + loadStream(); + KScrollTo("#content-social"); + } + }); + $("#main-search-bar").change(function(){ + $("#second-search-bar").val($(this).val()); + }); + + $("#second-search-bar").keyup(function(e){ + $("#main-search-bar").val($(this).val()); + $("#input-search-map").val($(this).val()); + if(e.keyCode == 13){ + loadStream(); + KScrollTo("#content-social"); + } + }); + + $("#input-search-map").keyup(function(e){ + $("#second-search-bar").val($("#input-search-map").val()); + $("#main-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + loadStream(); + } + }); + + $("#menu-map-btn-start-search, #main-search-bar-addon").click(function(){ + loadStream(); + }); + + + //KScrollTo(".main-btn-scopes"); +}); + + +</script> \ No newline at end of file diff --git a/views/app/liveStream.php b/views/app/liveStream.php new file mode 100755 index 0000000000000000000000000000000000000000..354da559f8e610a0842dc72bd612f1b2acf19ee5 --- /dev/null +++ b/views/app/liveStream.php @@ -0,0 +1,68 @@ +<?php if(sizeof($medias)==0 && $indexMin == 0){ ?> + <li class="bold text-center bg-white" style="width:100%!important;"> + <h4><i class="fa fa-ban"></i> Aucun résultat</h4> + <h5>Précisez votre recherche</h5> + </li> +<?php }else if(sizeof($medias)==0 && $indexMin > 0){ ?> + <li class="bold text-center bg-white" style="width:100%!important;"> + <h4><i class="fa fa-ban"></i> Fin des résultats</h4> + </li> +<?php } ?> + +<?php + $timezone = ''; //'Pacific/Noumea'; + $pair = false; + foreach($medias as $key => $media){ + $class = $pair ? "timeline-inverted" : ""; + $pair = !$pair; +?> + + <li class="<?php echo $class; ?>"> + <div class="timeline-badge primary"><a><i class="glyphicon glyphicon-record" rel="tooltip"></i></a></div> + <div class="timeline-panel"> + <div class="timeline-heading text-center"> + + <h5 class="text-left srcMedia"> + <small class="ilyaL"><i class="fa fa-clock-o"></i> <?php echo Translate::pastTime($media["date"], "date", $timezone); ?></small> + <img src="<?php echo Yii::app()->theme->baseUrl."/assets/img/medias/".$media["srcMedia"]; ?>.png" height=40> + <small class="ilyaR"><i class="fa fa-clock-o"></i> <?php echo Translate::pastTime($media["date"], "date", $timezone); ?></small> + <a href="<?php echo $media["href"]; ?>" target="_blank" class="link-read-media margin-top-10 hidden-xs"><i class="fa fa-angle-right"></i> Lire</a> + </h5> + + <?php if(@$media["img"]){ ?> + <a class="block bg-black" target="_blank" href="<?php echo $media["href"]; ?>"> + <img class="img-responsive" src="<?php echo $media["img"]; ?>" /> + </a> + <?php } ?> + + <?php if(@$media["contentType"] == "youtube"){ ?> + <iframe width="100%" height="315" src="https://www.youtube.com/embed/<?php echo $media["idYoutube"]; ?>" frameborder="0" allowfullscreen></iframe> + <?php } ?> + + </div> + <div class="timeline-body padding-10"> + <h4><a target="_blank" href="<?php echo $media["href"]; ?>"><?php echo $media["title"]; ?></a></h4> + <p><?php echo $media["content"]; ?></p> + </div> + <?php if(isset(Yii::app()->session["userId"])) { ?> + <div class="timeline-footer pull-left col-md-12 padding-top-5"> + <div class="col-md-12 pull-left padding-5" id="footer-media-<?php echo $media["_id"]; ?>"></div> + <div class="col-md-12 no-padding pull-left margin-top-10" id="commentContent<?php echo $media["_id"]; ?>"></div> + </div> + <?php } ?> + </div> + </li> + +<?php } ?> + +<script type="text/javascript" > +var medias = <?php echo json_encode($medias); ?>; + +jQuery(document).ready(function() { + if(medias.length == 0) scrollEnd = true; + + <?php if(isset(Yii::app()->session["userId"])) { ?> + initCommentsTools(medias); + <?php } ?> +}); +</script> \ No newline at end of file diff --git a/views/app/media.php b/views/app/media.php new file mode 100755 index 0000000000000000000000000000000000000000..15b751e40e6827c7f64d5351cfca6d336ada07b0 --- /dev/null +++ b/views/app/media.php @@ -0,0 +1,153 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( array( '/css/timeline2.css', + '/js/comments.js', + ) , Yii::app()->theme->baseUrl. '/assets'); + + + $cssAnsScriptFilesModule = array( + '/js/news/autosize.js', + '/js/news/newsHtml.js', + '/js/default/media.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "actu") ); +?> + +<style> + #timeline-live{ + min-height:600px; + } + .btn-select-media-src img{ + height:40px; + } + + .btn-show-map{ + display: none; + } + +@media screen and (max-width: 767px) { + .btn-select-media-src img{ + height:30px; + } + + .timeline::before, + .timeline-badge{ + display: none; + } + ul.timeline > li > .timeline-panel{ + width: 90%; + } + .page-header.text-center, + .show-sources-xs{ + text-align: right; + } + .timeline-body > p, + .timeline-body > ul, + .timeline-body > h4{ + font-size:12px; + } + +} + +</style> +<div class="col-md-12 col-sm-12 col-xs-12 bg-white no-padding"> + + <!-- <div class="col-md-12 col-sm-12 col-xs-12 no-padding row-radio" style="background-color: #f8f8f8;"> + <?php //$this->renderPartial($layoutPath.'radioplayer', array( "layoutPath"=>$layoutPath ) ); ?> + </div> --> + + + <div class="col-md-12 col-sm-12 inline show-sources-xs text-center margin-top-20 visible-xs"> + <button class="btn btn-default" id="btn-show-sources-xs"><i class="fa fa-rss"></i></button> + </div> + <div class="col-md-12 col-sm-12 inline page-header text-center medias-sources margin-top-20 hidden-xs"> + <div class="col-md-1 hidden-sm hidden-xs bg-white"></div> + <div class="col-md-2 col-sm-2 col-xs-12 bg-white"> + <button class="btn btn-link tooltips btn-select-media-src srcNC1" data-srcactive="true" data-srcid="NC1" data-placement="top" data-toggle="tooltip" title="Cliquer pour activer/désactiver"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/medias/NC1.png"> + <br class="hidden-xs"><i class="fa fa-check-circle letter-green srcActive"></i> + <i class="fa fa-minus-circle letter-red srcDisable hidden"></i> + </button> + </div> + + <div class="col-md-2 col-sm-2 col-xs-12 bg-white"> + <button class="btn btn-link tooltips btn-select-media-src srcNCTV" data-srcactive="true" data-srcid="NCTV" data-placement="top" data-toggle="tooltip" title="Cliquer pour activer/désactiver"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/medias/NCTV.png"> + <br class="hidden-xs"><i class="fa fa-check-circle letter-green srcActive"></i> + <i class="fa fa-minus-circle letter-red srcDisable hidden"></i> + </button> + </div> + + <div class="col-md-2 col-sm-2 col-xs-12 bg-white"> + <button class="btn btn-link tooltips btn-select-media-src srcNCI" data-srcactive="true" data-srcid="NCI" data-placement="top" data-toggle="tooltip" title="Cliquer pour activer/désactiver"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/medias/NCI.png"> + <br class="hidden-xs"><i class="fa fa-check-circle letter-green srcActive"></i> + <i class="fa fa-minus-circle letter-red srcDisable hidden"></i> + </button> + </div> + + <div class="col-md-2 col-sm-2 col-xs-12 bg-white"> + <button class="btn btn-link tooltips btn-select-media-src srcTAZAR" data-srcactive="true" data-srcid="TAZAR" data-placement="top" data-toggle="tooltip" title="Cliquer pour activer/désactiver"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/medias/TAZAR.png"> + <br class="hidden-xs"><i class="fa fa-check-circle letter-green srcActive"></i> + <i class="fa fa-minus-circle letter-red srcDisable hidden"></i> + </button> + </div> + + <div class="col-md-2 col-sm-2 col-xs-12 bg-white"> + <button class="btn btn-link tooltips btn-select-media-src srcOUTREMERS360" data-srcactive="true" data-srcid="OUTREMERS360" data-placement="top" data-toggle="tooltip" title="Cliquer pour activer/désactiver"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/medias/OUTREMERS360.png"> + <br class="hidden-xs"><i class="fa fa-check-circle letter-green srcActive"></i> + <i class="fa fa-minus-circle letter-red srcDisable hidden"></i> + </button> + </div> + + </div> + + <div class="col-md-1 col-sm-1 hidden-xs no-padding" id="content-media" style="min-height: 500px;"> + </div> + + <div class="col-md-10 col-sm-10 inline-block no-padding"> + <div class="col-md-12 no-padding text-center" id="timeline-reload"></div> + <ul class="timeline inline-block" id="timeline-live"> + <?php + if(@$medias && sizeOf($medias) > 0) + $this->renderPartial('liveStream', array("medias"=>$medias)); + ?> + </ul> + </div> + + +</div> + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array("subdomain"=>"media")); ?> + +<script type="text/javascript" > +var loadingData = false; +var scrollEnd = false; + +var currentIndexMin = 0; +var currentIndexMax = 10; + +var indexStep = currentIndexMax; + +var idSession = "<?php echo @Yii::app()->session["userId"] ?>"; + +//permet d'ajouter des commentaires sur n'importe quel data (collection) +var parentTypeComment = "media"; +var interval; + +jQuery(document).ready(function() { + initKInterface(); + initMediaInterface(); + //initCommentsTools(medias); +}); + + +</script> \ No newline at end of file diff --git a/views/app/mediacrawler.php b/views/app/mediacrawler.php new file mode 100755 index 0000000000000000000000000000000000000000..677d64bc139a49b7624da4e8b58980a647050bb4 --- /dev/null +++ b/views/app/mediacrawler.php @@ -0,0 +1,2 @@ + +<?php echo $res; ?> \ No newline at end of file diff --git a/views/app/page.php b/views/app/page.php new file mode 100755 index 0000000000000000000000000000000000000000..615bae1cbc8e5882dd4a5345b4869d1e21f67c46 --- /dev/null +++ b/views/app/page.php @@ -0,0 +1,182 @@ +<?php + HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css') , Yii::app()->theme->baseUrl. '/assets'); + //$cssAnsScriptFilesModule = array(''); + //HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + + if($this->module->id != "network" && $type!=Classified::COLLECTION && ($type!=Product::COLLECTION || ($element["creator"]==Yii::app()->session["userId"] && $view != "show"))) + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "page") ); +?> + + +<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container"> + <div class="" id="onepage"> + <?php + + if($type == Person::COLLECTION || $type == Event::COLLECTION || + $type == Project::COLLECTION || $type == Organization::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "edit"=>$edit, + "openEdition" => $openEdition, + "linksBtn" => $linksBtn, + "type" => $type, + "isLinked" => $isLinked, + "controller" => $controller, + "countStrongLinks" => $countStrongLinks, + "countInvitations" => $countInvitations, + "countries" => $countries ); + + if(@$members) $params["members"] = $members; + if(@$invitedMe) $params["invitedMe"] = $invitedMe; + if(Yii::app()->params["CO2DomainName"] == "terla") + $this->renderPartial('../element/terla/index', $params ); + else + $this->renderPartial('../element/profilSocial', $params ); + } + + + if($type == News::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + if(@$members) $params["members"] = $members; + if(@$invitedMe) $params["invitedMe"] = $invitedMe; + + $this->renderPartial('../news/standalone', $params ); + } + + if($type == Classified::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + if(@$members) $params["members"] = $members; + if(@$invitedMe) $params["invitedMe"] = $invitedMe; + + $this->renderPartial('../classified/standalone', $params ); + } + if($type == Product::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + if(@$members) $params["members"] = $members; + if(@$invitedMe) $params["invitedMe"] = $invitedMe; + if(($element["creator"]==Yii::app()->session["userId"] || @Yii::app()->session["superAdmin"]) && $view != "show") + $this->renderPartial('../element/terla/dashboard', $params ); + else + $this->renderPartial('../element/standalone', $params ); + } + if($type == Service::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + if(@$members) $params["members"] = $members; + if(@$invitedMe) $params["invitedMe"] = $invitedMe; + if($element["creator"]==Yii::app()->session["userId"] && $view != "show") + $this->renderPartial('../element/terla/dashboard', $params ); + else + $this->renderPartial('../element/standalone', $params ); + } + if($type == Survey::COLLECTION){ + $params = array("survey"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + $this->renderPartial('../survey/entryStandalone', $params ); + } + + if($type == Poi::COLLECTION){ + $params = array("element"=>$element , + "page" => "page", + "type" => $type, + "controller" => $controller, + ); + + $this->renderPartial('../poi/standalone', $params ); + } + ?> + </div> +</div> + + +<script type="text/javascript" > + +var type = "<?php echo $type; ?>"; +var id = "<?php echo $id; ?>"; +var view = "<?php echo @$view; ?>"; +var indexStepGS = 20; + +jQuery(document).ready(function() { + + //initKInterface({"affixTop":0}); + $("#mainNav").addClass("affix"); + //initPageInterface(); + // var tpl = '<?php //echo @$_GET["tpl"] ? $_GET["tpl"] : "profilSocial"; ?>'; + // getAjax('#onepage' ,baseUrl+'/'+moduleId+"/element/detail/type/"+type+"/id/"+id+"/view/"+view+"?tpl="+tpl,function(){ + // initPageInterface(); + // },"html"); +}); + + +function initPageInterface(){ + + $("#second-search-bar").addClass("input-global-search"); + + $("#main-btn-start-search, .menu-btn-start-search").click(function(){ + startGlobalSearch(0, indexStepGS); + }); + + $("#second-search-bar").keyup(function(e){ console.log("keyup #second-search-bar"); + $("#input-search-map").val($("#second-search-bar").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#input-search-map").keyup(function(e){ console.log("keyup #input-search-map"); + $("#second-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#menu-map-btn-start-search").click(function(){ + $("#second-search-bar").val($("#input-search-map").val()); + startGlobalSearch(0, indexStepGS); + }); + + $(".social-main-container").mouseenter(function(){ + $(".dropdown-result-global-search").hide(); + }); + + $(".tooltips").tooltip(); + + $('.sub-menu-social').affix({ + offset: { + top: 320 + } + }); + //$(".dropdown-result-global-search").hide(); + + +} + +</script> \ No newline at end of file diff --git a/views/app/power.php b/views/app/power.php new file mode 100755 index 0000000000000000000000000000000000000000..28be1214d0a99b6e1307f542187b949508365eba --- /dev/null +++ b/views/app/power.php @@ -0,0 +1,15 @@ + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page"=>"power" + ) ); +?> +<script type="text/javascript" > +jQuery(document).ready(function() { + initKInterface(); + location.hash = "#app.power"; +}); +</script> \ No newline at end of file diff --git a/views/app/prestation.php b/views/app/prestation.php new file mode 100644 index 0000000000000000000000000000000000000000..0d221a62e93b36ec18a1587e425e3be4b228f60d --- /dev/null +++ b/views/app/prestation.php @@ -0,0 +1,405 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( array('/css/timeline2.css','/css/news/index.css', + + ) , Yii::app()->theme->baseUrl. '/assets'); + + + $cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/autosize.js', + '/js/news/newsHtml.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "annonces"; + if($params["title"] == "Kgougle") $page = "freedom"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "type" => @$type, + "page" => page) ); +?> +<style> + +.btn-create-news{ + margin-top:0px; + z-index: 10; + border-radius: 0 50%; + -ms-transform: rotate(7deg); + -webkit-transform: rotate(7deg); + transform: rotate(-45deg); +} +.btn-create-news:hover{ + background-color: white!important; + color:#34a853!important; + border: 2px solid #34a853!important; + +} + +.main-btn-scopes { + margin-top: -57px; +} + +#formCreateNewsTemp{ + display: none!important; +} +#modal-create-anc #formCreateNewsTemp{ + display: block!important; +} +#formCreateNewsTemp .form-create-news-container, #formActivity{ + max-width: 60%; + /*margin-left:20%;*/ +} +#sub-menu-left{ + margin-top:1px; + /*text-align: left;*/ +} +#sub-menu-left .btn{ + /*background-color: #4285f4; + border-color: #4285f4;*/ + /*color:white;*/ + /*border-radius:80px;*/ + font-weight: 700; +} +#sub-menu-left .btn.active{ + /*background-color: #fff; + color: #4285f4;*/ +} +/*#sub-menu-left .btn:hover{ + background-color: #1c6df5; + border-color: #4285f4; +}*/ +/*#sub-menu-left .btn.active:hover{ + background-color: #fff; + color: #4285f4; +} +#sub-menu-left .btn.bg-yellow{ + border-color: transparent; +}*/ +<?php + $btnAnc = array("blue" =>array("color1"=>"#4285f4", + "color2"=>"#1c6df5"), + + "green" =>array("color1"=>"#34a853", + "color2"=>"#2b8f45"), + + "red" =>array("color1"=>"#ea4335", + "color2"=>"#cc392d"), + + "yellow" =>array("color1"=>"#fbbc05", + "color2"=>"#e3a800"), + ); +?> + +<?php foreach($btnAnc as $color => $params){ ?> +.btn-anc-color-<?php echo $color; ?>{ + background-color: <?php echo $params["color1"]; ?>; + border-color: <?php echo $params["color1"]; ?>!important; + color: #fff!important; +} + +.btn-anc-color-<?php echo $color; ?>:hover{ + background-color: <?php echo $params["color2"]; ?>!important; + border-color: <?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active{ + background-color:#fff!important; + color:<?php echo $params["color1"]; ?>!important; +} +.btn-anc-color-<?php echo $color; ?>.active:hover{ + background-color: #fff; + color: <?php echo $params["color1"]; ?>; +} +<?php } ?> + +.keycat:hover, +.keycat.active, +.btn-select-category-1:hover, +.btn-select-category-1.active{ + background-color: #2C3E50!important; + color: #fff!important; + border-color:transparent!important; +} + + +#sub-menu-left.subsub .btn{ + width:95%; + text-align: left; + background-color: white; + border-color: white; + color:#4285f4; +} +#sub-menu-left.subsub{ + min-width: 180px; +} + +.btn-menu-left-add{ + background-color: transparent !important; + border-color: transparent !important; +} + +#photoAddNews{ + text-align: left; +} + +.tagstags, .form-actions{ + /*display: none!important;*/ +} + + +@media (max-width: 768px) { + .btn-select-type-anc.col-xs-5{ + width:48%!important; + } +} + + @media screen and (min-width: 768px) and (max-width: 1024px) { + .btn-select-type-anc.col-xs-5{ + font-size:0.8em; + } + } + +/* +.elemt_name, .elemt_date{ + display: none; +}*/ +</style> + +<div class="col-md-12 col-sm-12 col-xs-12 bg-white top-page no-padding" id="" style="padding-top:0px!important;"> + + <div class="col-lg-1 hidden-md col-sm-1 hidden-xs"></div> + <?php + $prestation = CO2::getContextList("prestation"); + $currentSection = 1; + ?> + + + <div class="col-lg-2 col-md-2 col-sm-3 col-xs-12 margin-top-25 text-left subsub" id="sub-menu-left"> + <h2 class="bg-orange text-white">FILTRE</h2> + <hr> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10">Toute destination</h4> <span class="col-md-12 bg-orange"><i class="fa fa-caret-right"></i><span> + </div> + <hr> + <?php + foreach ($prestation["categories"] as $key => $cat) { + ?> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category",$cat); ?> + </button><br> + <?php } ?> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10">Vous voyagez</h4> <span class="col-md-12 bg-orange"><i class="fa fa-caret-right"></i><span> + </div> + <hr> + <input type="text" id="filterNumber" value="" placeholder="Number of travellers"> + <label>Date of travel</label> + <span>From</span> + <input type="date" name=""> + <span>To</span> + <input type="date" name=""> + <label>Price for search</label> + <input type="price" name=""> + + <label>Adapted time</label> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Senior"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","PMR"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Famille avec enfants"); ?> + </button><br> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo Yii::t("category","Régime alimentaires"); ?> + </button><br> + </div> + + <div class="col-lg-6 col-md-6 col-sm-6 no-padding margin-top-10"> + <h4 class="text-dark padding-bottom-5 margin-top-25 text-center"> + <i class="fa fa-angle-down"></i> Les annonces + <i class="fa fa-angle-right hidden fa-title-list"></i> <span class="letter-blue label-category"><i class="fa fa-"></i> </span> + </h4> + <hr> + + <h5 class="text-center letter-red"> + <button class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5 margin-top-5" + data-target="#modalScopes" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="Sélectionner des lieux de recherche"> + <!-- <i class="fa fa-bullseye" style="font-size:18px;"></i> --> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/cible3.png" height=42> + </button><br> + recherche ciblée + </h5> + <!-- <h5 class="text-center letter-red">choisir des sources</h5> --> + + <br> + <div class="scope-min-header list_tags_scopes hidden-xs hidden-sm text-center"></div> + + + <div id="newsstream"></div> + </div> + + <div class="pull-right col-lg-3 col-md-3 col-sm-4 hidden-xs padding-20 margin-top-50" id="nowList"> + + </div> +</div> + + + +<?php $this->renderPartial('../news/modalCreateAnc'); ?> + +<?php $this->renderPartial($layoutPath.'footer', array("subdomain"=>"annonces")); ?> + +<script type="text/javascript" > + +var type = "<?php echo @$type ? $type : 'all'; ?>"; +var typeInit = "<?php echo @$type ? $type : 'all'; ?>"; +var page = "<?php echo @$page; ?>"; +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + +//var TPL = "kgougle"; + +//allSearchType = ["persons", "NGO", "LocalBusiness", "projects", "Group"]; + +var currentKFormType = ""; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + + initKInterface({"affixTop":320}); + + var typeUrl = "?nopreload=true"; + if(type!='') typeUrl = "?type="+type+"&nopreload=true"; + getAjax('#page' ,baseUrl+'/'+moduleId+"/default/directoryjs"+typeUrl,function(){ + + $(".btn-directory-type").click(function(){ + var typeD = $(this).data("type"); + + if(typeD == "events"){ + var typeEvent = $(this).data("type-event"); + searchSType = typeEvent; + } + + initTypeSearch(typeD); + mylog.log("search.php",searchType); + setHeaderDirectory(typeD); + loadingData = false; + startSearch(0, indexStepInit, searchCallback); + KScrollTo("#content-social"); + + $(".btn-directory-type").removeClass("active"); + $(this).addClass("active"); + }); + + $(".btn-open-filliaire").click(function(){ + KScrollTo("#content-social"); + }); + + //anny double section filter directory + <?php if(@$type == "classified" || @$type == "place" ){ ?> + initClassifiedInterface(); + <?php } ?> + + bindLeftMenuFilters(); + + //console.log("init Scroll"); + $(window).bind("scroll",function(){ + mylog.log("test scroll", scrollEnd); + if(!loadingData && !scrollEnd && !isMapEnd){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + startSearch(currentIndexMin+indexStep, currentIndexMax+indexStep, searchCallback); + } + } + }); + + + loadingData = false; + initTypeSearch(type); + startSearch(0, indexStepInit, searchCallback); + + },"html"); + + initSearchInterface(); //themes/co2/assets/js/default/search.js + + + if(page == "annonces" || page == "agenda" || page == "power"){ + setTimeout(function(){ + //KScrollTo("#content-social"); + }, 1000); + } + $(".tooltips").tooltip(); +}); + + +/* ------------------------- +AGENDA +----------------------------- */ + +<?php if(@$type == "events"){ ?> + +var calendarInit = false; +function showResultInCalendar(mapElements){ + //mylog.dir(mapElements); + + var events = new Array(); + $.each(mapElements, function(key, thisEvent){ + + var startDate = exists(thisEvent["startDateTime"]) ? thisEvent["startDateTime"].substr(0, 10) : ""; + var endDate = exists(thisEvent["endDateTime"]) ? thisEvent["endDateTime"].substr(0, 10) : ""; + var cp = ""; + var loc = ""; + if(thisEvent["address"] != null){ + var cp = exists(thisEvent["address"]["postalCode"]) ? thisEvent["address"]["postalCode"] : "" ; + var loc = exists(thisEvent["address"]["addressLocality"]) ? thisEvent["address"]["addressLocality"] : ""; + } + var position = cp + " " + loc; + + var name = exists(thisEvent["name"]) ? thisEvent["name"] : ""; + var thumb_url = notEmpty(thisEvent["profilThumbImageUrl"]) ? baseUrl+thisEvent["profilThumbImageUrl"] : ""; + + if(typeof events[startDate] == "undefined") events[startDate] = new Array(); + events[startDate].push({ "id" : thisEvent["_id"]["$id"], + "thumb_url" : thumb_url, + "startDate": startDate, + "endDate": endDate, + "name" : name, + "position" : position }); + }); + + if(calendarInit == true) { + $(".calendar").html(""); + } + + $(".calendar").html($(".responsive-calendar-init").html()); + + var aujourdhui = new Date(); + var month = (aujourdhui.getMonth()+1).toString(); + if(aujourdhui.getMonth() < 10) month = "0" + month; + var date = aujourdhui.getFullYear().toString() + "-" + month; + + $(".responsive-calendar").responsiveCalendar({ + time: date, + events: events + }); + + $(".responsive-calendar").show(); + + calendarInit = true; +} + +<?php } ?> + +/* ------------------------- +END AGENDA +----------------------------- */ + +</script> \ No newline at end of file diff --git a/views/app/referencement.php b/views/app/referencement.php new file mode 100755 index 0000000000000000000000000000000000000000..a2f4b2bd5cc87d40e6e04191b31a31ddce03dc78 --- /dev/null +++ b/views/app/referencement.php @@ -0,0 +1,623 @@ +<?php + + //HtmlHelper::registerCssAndScriptsFiles( array('/js/default/formInMap.js') , $this->module->assetsUrl); + + HtmlHelper::registerCssAndScriptsFiles( + array( '/css/referencement.css',) , + Yii::app()->theme->baseUrl. '/assets'); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "referencement", + )); +?> + +<style> + /*.name .pastille { + margin-top: -44px; + display: block; + text-align: right; + max-width: 82%; + font-size: 0.3em; + margin-bottom: 22px; + }*/ + +</style> + +<div id="mainFormReferencement"> + <section id="portfolio"> + <div class="container"> + + <div class="row" style="min-height:800px;" id="refStart"> + <div class="col-lg-12 text-center"> + <h2 class="text-blue" id="formRef"> + <!-- <i class="fa fa-search"></i><br> --> + Référencer une page web + </h2> + <hr class="angle-down"> + </div> + <div class="col-md-8 col-md-offset-2"> + <div class="col-md-12"> + <div class="form-group"> + <label id="lbl-url"> + <i class="fa fa-circle"></i> Indiquez l'URL de la page + </label> + <input type="text" class="form-control" placeholder="exemple : http://www.kgougle.nc" id="form-url"><br> + <h5 class="letter-green pull-left" id="status-ref"></h5> + <button class="btn btn-success pull-right btn-scroll" data-targetid="#formRef" id="btn-start-ref-url"> + <i class="fa fa-binoculars"></i> Lancer la recherche d'information + </button> + </div> + </div> + <div class="col-md-12 hidden" id="refResult"> + <label id="lbl-title"> + <i class="fa fa-circle"></i> Nom de la page <small>(complétez si besoin) *</small> + <small class="pull-right text-light"> + <code><title></title></code> + </small> + </label> + <input type="text" class="form-control" placeholder="Nom de la page" id="form-title"><br> + <input type="hidden" id="form-favicon"> + + <label id="lbl-description"> + <i class="fa fa-circle"></i> Description de la page <small>(complétez si besoin)</small> + <small class="pull-right text-light"> + <code><meta name="description"></code> + </small> + </label> + <textarea class="form-control" placeholder="Description" id="form-description"></textarea><br> + + <div class="col-md-12 no-padding"> + <label id="lbl-keywords"> + <i class="fa fa-circle"></i> Mots clés <small>(conseil : 3 mots max par expression)</small> + <small class="pull-right text-light"> + <code><meta name="keywords"></code> + </small><br> + <small class="text-light"> + <i class="fa fa-info-circle"></i> Les mots clés servent à optimiser les résultats de recherche, choisissez les avec soins<br><br> + </label> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 1" id="form-keywords1"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 2" id="form-keywords2"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 3" id="form-keywords3"><br> + </div> + <div class="col-md-3 padding-5"> + <input type="text" class="form-control" placeholder="expression 4" id="form-keywords4"><br> + </div> + + <div class="col-md-12 no-padding"> + <button class="btn btn-success text-white pull-right" id="btn-validate-information"> + <i class="fa fa-check"></i> Valider ces informations + </button> + </div> + + <div class="col-md-12 no-padding hidden margin-top-50" id="refMainCategories"> + <label id="lbl-keywords" class="margin-top-15"> + <i class="fa fa-circle"></i> Choix des catégories + </label> + <div class="col-md-12" id="mainCategoriesEdit"></div> + + <div class="col-md-12 text-center margin-bottom-50 hidden" id="info-select-cat"> + <h4 class='col-md-12 text-center'> + <i class='fa fa-hand-o-up fa-2x'></i> + </h4> + <span> + Merci de sélectionner <b>au moins une catégorie</b> avant de continuer + </span> + </div> + </div> + </div> + + + <div class="col-md-8 col-md-offset-2 hidden text-center" id="refLocalisation"> + <h4 class='col-md-12 text-center'> + <i class='fa fa-angle-down'></i><br>Géolocalisation + <br> + <small>(facultatif)</small></h4><br> + <span> + Ajoutez une addresse si vous souhaitez que cette page apparaîsse aussi dans les résultats sur la carte. + </span><br><br> + <!-- <input type="text" class="form-control" placeholder="commune / ville / village" id="form-url"><br> + <input type="text" class="form-control" placeholder="code postal" id="form-url"><br> --> + <button class="btn btn-default bg-red text-white" id="btn-select-city" data-target="#portfolioModalCities" data-toggle="modal"> + <i class="fa fa-university"></i> Sélectionner une commune + </button><br> + + <h4 class='col-md-12 text-center text-red' id="name-city-selected"> + </h4><br> + + <input type="text" class="form-control" placeholder="addresse, rue" id="form-street"><br> + + <button class="btn btn-default bg-green-k text-white" id="btn-find-position"> + <i class="fa fa-map-marker"></i> Définir la position sur la carte + </button><br><br> + + </div> + + </div> + </div> + </div> + </section> + <section class="bg-green-k hidden" id="send-ref"> + <div class="container"> + <div class="row"> + <div class="col-md-4 col-md-offset-4 text-center" style="margin-bottom:50px;"> + <button class="btn bg-white letter-green btn-lg" id="btn-send-ref"> + <i class="fa fa-send"></i> Envoyer ma demande de référencement + </button><br><br> + <label class="text-white">(soumis à l'approbation des administrateurs sous 7 jours)</label> + <hr> + <label class="text-white"> + Les informations fournies à propos de cette URL seront examinées par les administrateurs du réseau avant d'être publiées, afin d'éviter tout abus et de garantir la pertinence des résultats de recherches. + </label> + <hr> + <label class="text-white"> + Les sites internationaux sont tolérés à condition d'être pertinent pour une large majorité des internautes Calédoniens. + </label><hr> + <label class="text-white">Seront automatiquement refusés :<br>les sites web à caractère violent, ou pornographique.</label> + </div> + </div> + </div> + </section> +</div> + +<section class="letter-green hidden" id="section-thanks"> + <div class="container"> + <div class="row"> + <div class="col-md-4 col-md-offset-4 text-center" style="margin-bottom:50px;"> + <h3 class=""><i class="fa fa-thumbs-up"></i><br>Merci pour votre participation</h3> + <label> + <a href="" class="letter-green bold" id="url-validated"></a><br> + <i class="fa fa-check"></i> L'url a bien été enregistrée + </label> + <hr> + <label>Les informations fournies à propos de cette URL seront examinées par les administrateurs du site avant d'être publiées, afin d'éviter tout abus et de garantir la pertinence des résultats de recherches.</label> + <br><br> + <button class="btn bg-green-k text-white btn-lg lbh" data-hash="#web" id="btn-send-ref"> + <i class="fa fa-arrow-left"></i> retour + </button> + + + </div> + </div> + </div> +</section> + + +<?php $cities = CO2::getCitiesNewCaledonia(); ?> +<?php $this->renderPartial($layoutPath.'modals.kgougle.citiesReferencement', array("cities"=>$cities)); ?> + +<?php $this->renderPartial($layoutPath.'footer', array("subdomain"=>"referencement")); ?> + + +<script type="text/javascript" > + +var categoriesSelected = new Array(); +var urlValidated = ""; +var formType = "poi"; +var cities = <?php echo json_encode($cities); ?>; +var coordinatesPreLoadedFormMap = [0, 0]; + +var urlExists = "DONTKNOW"; + +console.log("CITIES", cities); + +jQuery(document).ready(function() { + initKInterface(); + buildListCategoriesForm(); + + $('#form-url').val("");//"https://www.bci.nc/");//" http://groupe-vocal-nc.net/"); + + $("#btn-start-ref-url").click(function(){ + refUrl($('#form-url').val()); + }); + + $("#btn-start-subscribe").click(function(){ + $(".show-subscribe").removeClass("hidden"); + $(".hidden-subscribe").addClass("hidden"); + }); + + $("#btn-cancel-subscribe").click(function(){ + $(".hidden-subscribe").removeClass("hidden"); + $(".show-subscribe").addClass("hidden"); + }); + + $("#name-city-selected, #form-street, #btn-find-position").hide(); + + $("#btn-start-anonymous").click(function(){ + $("#refStart").removeClass("hidden"); + KScrollTo("#formRef"); + }); + + $("#btn-validate-information").click(function(){ + $("#refMainCategories").removeClass("hidden"); + buildListCategoriesForm(); + $("#btn-send-ref").off().click(function(){ + sendReferencement(); + }); + KScrollTo("#refMainCategories"); + + $("#send-ref, #refLocalisation").removeClass("hidden"); + $("#info-select-cat").addClass("hidden"); + }); + + $(".btn-scope").click(function(){ + //h4-name-city btn-select-city name-city-selected + var cityName = $(this).data("city-name"); + var cityCp = $(this).data("city-cp"); + var cityInsee = $(this).data("city-insee"); + var cityLat = $(this).data("city-lat"); + var cityLng = $(this).data("city-lng"); + + $("#h4-name-city, #form-street, #btn-find-position, #name-city-selected").show(); + $("#name-city-selected").html(cityName + ", " + cityCp); + + coordinatesPreLoadedFormMap = [cityLat, cityLng]; + formInMap.showMarkerNewElement(); + preLoadAddress(true, "NC", cityInsee, cityName, cityCp, cityLat, cityLng, ""); + + $("#btn-find-position").off().click(function(){ + showMap(true); + + if(Sig.markerFindPlace == null) + formInMap.showMarkerNewElement(); + + var street = $("#form-street").val(); + preLoadAddress(true, "NC", cityInsee, cityName, cityCp, cityLat, cityLng, street); + + if(street != "") + searchAdressNewElement(); + }); + }); + +}); + + +function buildListCategoriesForm(){ + //console.log(mainCategories); + + var html = "<h4 class='col-md-12 text-center'><i class='fa fa-angle-down'></i><br>" + +"Sélectionner la ou les catégories<br>qui correspondent le mieux à cette page</h4><hr>"+ + //"<center><label></label></center><br>"+ + "<center><label>(cliquez pour sélectionner)</label></center>"; + + $.each(mainCategories, function(name, params){ + var classe=""; + if(params.color == "green") classe="search-eco"; + + html += '<section id="portfolio" class="'+classe+'">'+ + '<div class="">'+ + '<div class="row">'+ + '<div class="col-lg-12 text-center">'+ + '<h4 class="letter-'+params.color+'">'+ + name+ + '</h4>'+ + '<hr class="angle-down">'+ + '</div>'+ + '</div>'+ + '<div class="row text-'+params.color+'">'; + + $.each(params.items, function(keyC, val){ + //console.log(keyC, val); + html += '<div class="col-md-3 col-sm-4 col-xs-6 portfolio-item">'+ + '<button class="portfolio-link btn-select-category" data-value="'+val.name+'">'+ + '<div class="caption">'+ + '<div class="caption-content">'+ + '</div>'+ + '</div>'+ + '<i class="fa fa-'+val.faIcon+' fa-2x"></i>'+ + '<h3>'+val.name+'</h3>'+ + '</button>'+ + '</div>' + }); + + html += '</div>' + + '</div>' + + '</section>'; + + }); + + $("#mainCategoriesEdit").html(html); + + $(".btn-select-category").click(function(){ + var val = $(this).data("value"); + + if(categoriesSelected.indexOf(val) < 0){ + categoriesSelected.push(val); + $(this).parent().addClass("selected"); + } + else{ + categoriesSelected.splice(categoriesSelected.indexOf(val), 1); + $(this).parent().removeClass("selected"); + } + + // if(categoriesSelected.length > 0){ + // $("#send-ref, #refLocalisation").removeClass("hidden"); + // $("#info-select-cat").addClass("hidden"); + // }else{ + // $("#send-ref, #refLocalisation").addClass("hidden"); + // $("#info-select-cat").removeClass("hidden"); + // } + //console.log("categoriesSelected"); + //console.dir(categoriesSelected); + }); +} + +function checkUrlExists(url){ + url = url.trim(); + if(url.lastIndexOf("/") == url.lenght){ + url = url.substr(0, url.lenght-1); + $("#form-url").val(url); + } + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/app/checkurlexists", + data: { url: url }, + dataType: "json", + success: function(data){ console.log("checkUrlExists", data); + if(data.status == "URL_EXISTS") + urlExists = true; + else + urlExists = false; + console.log("checkUrlExists", data); + refUrl(url); + }, + error: function(data){ + console.log("check url exists error"); + } + }); +} +//http://www.evaneos.com/nouvelle-caledonie/voyage/ +function refUrl(url){ + + if(!isValidURL(url)){ + $("#status-ref").html("<span class='letter-red'><i class='fa fa-times'></i> cette url n'est pas valide.</span>"); + return; + } + + if(urlExists == "DONTKNOW"){ + checkUrlExists(url); + return; + } + + if(urlExists == true){ + $("#form-url").val(); + $("#send-ref, #refLocalisation, #refMainCategories, #refResult").addClass("hidden"); + $("#status-ref").html("<span class='letter-green'><i class='fa fa-thumbs-up'></i> Cette url est déjà référencée dans notre base de données.</span>"); + urlExists = "DONTKNOW"; + return; + } + + urlExists = "DONTKNOW"; + + $("#status-ref").html("<span class='letter-blue'><i class='fa fa-spin fa-refresh'></i> recherche en cours</span>"); + $("#refResult").addClass("hidden"); + $("#send-ref").addClass("hidden"); + + urlValidated = ""; + + $.ajax({ + url: "//cors-anywhere.herokuapp.com/" + url, // 'http://google.fr', + //crossOrigin: true, + timeout:10000, + success: + function(data) { + + var jq = $.parseHTML(data); + + var tempDom = $('<output>').append($.parseHTML(data)); + var title = $('title', tempDom).html(); + var stitle = ""; + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + //console.log("STITLE", stitle); + + if(stitle=="" || stitle=="undefined") + stitle = $('h2', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('h3', tempDom).html(); + + if(stitle=="" || stitle=="undefined") + stitle = $('blockquote', tempDom).html(); + + if(title=="" || title=="undefined") + title = stitle; + + var favicon = $("link[rel*='icon']", tempDom).attr("href"); + var hostname = (new URL(url)).origin; + var faviconSrc = ""; + if(typeof favicon != "undefined"){ + var faviconSrc = hostname+favicon; + if(favicon.indexOf("http")>=0) faviconSrc = favicon; + } + + var description = $(tempDom).find('meta[name=description]').attr("content"); + + var keywords = $(tempDom).find('meta[name=keywords]').attr("content"); + //console.log("keywords", keywords); + + var arrayKeywords = new Array(); + if(typeof keywords != "undefined") + arrayKeywords = keywords.split(","); + + //console.log("arrayKeywords", arrayKeywords); + + if(typeof arrayKeywords[0] != "undefined") $("#form-keywords1").val(arrayKeywords[0]); else $("#form-keywords1").val(""); + if(typeof arrayKeywords[1] != "undefined") $("#form-keywords2").val(arrayKeywords[1]); else $("#form-keywords2").val(""); + if(typeof arrayKeywords[2] != "undefined") $("#form-keywords3").val(arrayKeywords[2]); else $("#form-keywords3").val(""); + if(typeof arrayKeywords[3] != "undefined") $("#form-keywords4").val(arrayKeywords[3]); else $("#form-keywords4").val(""); + + + if(description=="" || description=="undefined") + if(stitle=="" || stitle=="undefined") + description = stitle; + + + $("#form-title").val(title); + $("#form-favicon").val(faviconSrc); + $("#form-description").val(description); + + + //color + if($("#form-title").val() != "") $("#lbl-title").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-title").removeClass("letter-green").addClass("letter-red"); + + //color + if($("#form-description").val() != "") $("#lbl-description").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-description").removeClass("letter-green").addClass("text-orange"); + + //color + if($("#form-keywords1").val() != "") $("#lbl-keywords").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("text-orange"); + + $("#form-title").off().keyup(function(){ + if($(this).val()!="")$("#lbl-title").removeClass("letter-red").addClass("letter-green"); + else $("#lbl-title").removeClass("letter-green").addClass("letter-red"); + checkAllInfo(); + }); + $("#form-description").off().keyup(function(){ + if($(this).val()!="")$("#lbl-description").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-description").removeClass("letter-green").addClass("text-orange"); + checkAllInfo(); + }); + $("#form-keywords1").off().keyup(function(){ + if($(this).val()!="")$("#lbl-keywords").removeClass("text-orange").addClass("letter-green"); + else $("#lbl-keywords").removeClass("letter-green").addClass("text-orange"); + checkAllInfo(); + }); + + $("#status-ref").html("<span class='letter-green'><img src='"+faviconSrc+"' height=30 alt='x'> <i class='fa fa-check'></i> Nous avons trouvé votre page</span>"); + $("#refResult").removeClass("hidden"); + + $("#lbl-url").removeClass("letter-red").addClass("letter-green"); + urlValidated = url; + + $('<output>').remove(); + tempDom = ""; + + checkAllInfo(); + }, + error:function(xhr, status, error){ + $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> URL INNACCESSIBLE</span>"); + }, + statusCode:{ + 404: function(){ + $("#lbl-url").removeClass("letter-green").addClass("letter-red"); + $("#status-ref").html("<span class='letter-red'><i class='fa fa-ban'></i> 404 : URL INTROUVABLE OU INACCESSIBLE</span>"); + } + } + }); +} + +function isValidURL(url) { + var match_url = new RegExp("(http[s]?:\\/\\/(www\\.)?|ftp:\\/\\/(www\\.)?|www\\.){1}([0-9A-Za-z-\\.@:%_\+~#=]+)+((\\.[a-zA-Z]{2,3})+)(/(.)*)?(\\?(.)*)?"); + return match_url.test(url); +} + +function checkAllInfo(){ + if( urlValidated != "" && + //$("#form-keywords1").val() != "" && + //$("#form-description").val() != "" && + $("#form-title").val() != "") + $("#btn-validate-information").removeClass("hidden"); + else $("#btn-validate-information").addClass("hidden"); +} + + +function sendReferencement(){ + console.log("start referencement"); + + var hostname = (new URL(urlValidated)).hostname; + + var title = $("#form-title").val(); + var favicon = $("#form-favicon").val(); + var description = $("#form-description").val(); + + var keywords1 = $("#form-keywords1").val(); + var keywords2 = $("#form-keywords2").val(); + var keywords3 = $("#form-keywords3").val(); + var keywords4 = $("#form-keywords4").val(); + + var keywords = new Array(); + + if(notEmpty(keywords1)) keywords.push(keywords1); + if(notEmpty(keywords2)) keywords.push(keywords2); + if(notEmpty(keywords3)) keywords.push(keywords3); + if(notEmpty(keywords4)) keywords.push(keywords4); + + //authorId *facultatif + //categoriesSelected + + if(urlValidated != "" && title != "" /*&& description != "" && keywords.length > 0 && categoriesSelected.length > 0*/){ + + var address = getAddressObj(); //formInMap.js + + + var urlObj = { + collection: "url", + key: "url", + url: urlValidated, + hostname: hostname, + title: title, + favicon: favicon, + description: description, + tags: keywords, + categories : categoriesSelected, + status: "locked" + }; + + if(address != false) { + urlObj["address"] = address.address; + urlObj["geo"] = address.geo; + urlObj["geoPosition"] = address.geoPosition; + } + console.log("address", address); + + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/save", + data: urlObj, + dataType: "json", + success: function(data){ + if(typeof data.result != "undefined" && data.result == false) + toastr.error("Une erreur est survenue, ou cette URL existe déjà dans notre base de données"); + else{ + console.log("save referencement success"); + toastr.success("Votre demande a bien été enregistrée"); + $("#mainFormReferencement").hide(); + $("#url-validated").html(urlValidated) + $("#section-thanks").removeClass("hidden"); + //urlCtrl.loadByHash("#web"); + } + //else toastr.error("Une erreur est survenue pendant le référencement"); + + }, + error: function(data){ + if(data.status == "URL_EXISTS") + toastr.error("Une erreur est survenue pendant l'envoi de votre demande'"); + + if(data.status == "URL_EXISTS") + toastr.error("Une erreur est survenue pendant l'envoi de votre demande'"); + console.log("save referencement error"); + } + }); + }else{ + toastr.error("Merci de remplir toutes les options"); + } + + + +} \ No newline at end of file diff --git a/views/app/rooms.php b/views/app/rooms.php new file mode 100644 index 0000000000000000000000000000000000000000..4602e6a8ec33c1e28c882d5451547654fb746709 --- /dev/null +++ b/views/app/rooms.php @@ -0,0 +1,73 @@ +<?php + //HtmlHelper::registerCssAndScriptsFiles( array('', ) , Yii::app()->theme->baseUrl. '/assets'); + //$cssAnsScriptFilesModule = array(''); + //HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "page") ); +?> + + +<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container"> + <div class="padding-top-15" id="onepage"></div> +</div> + + +<script type="text/javascript" > + +var type = "<?php echo $type; ?>"; +var id = "<?php echo $id; ?>"; +var view = "<?php echo @$view; ?>"; +var indexStepGS = 20; + +jQuery(document).ready(function() { + + initKInterface({"affixTop":0}); + $("#mainNav").addClass("affix"); + + var tpl = '<?php echo @$_GET["tpl"] ? $_GET["tpl"] : "profilSocial"; ?>'; + getAjax('#onepage' ,baseUrl+'/'+moduleId+"/rooms/index/type/"+type+"/id/"+id,function(){ + initPageInterface(); + },"html"); +}); + + +function initPageInterface(){ + + $("#second-search-bar").addClass("input-global-search"); + + $("#main-btn-start-search, .menu-btn-start-search").click(function(){ + startGlobalSearch(0, indexStepGS); + }); + + $("#second-search-bar").keyup(function(e){ + $("#input-search-map").val($("#second-search-bar").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#input-search-map").keyup(function(e){ + $("#second-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#menu-map-btn-start-search").click(function(){ + startGlobalSearch(0, indexStepGS); + }); + + $(".social-main-container").mouseenter(function(){ + $(".dropdown-result-global-search").hide(); + }); + + //$(".dropdown-result-global-search").hide(); + + +} + +</script> \ No newline at end of file diff --git a/views/app/search.php b/views/app/search.php new file mode 100755 index 0000000000000000000000000000000000000000..0173e231b2e09bdd6ac8aad8a44aa1a53b4eddbe --- /dev/null +++ b/views/app/search.php @@ -0,0 +1,341 @@ +<?php + + $cssAnsScriptFilesModule = array( + '/assets/css/default/responsive-calendar.css', + '/assets/css/default/search.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + '/js/default/responsive-calendar.js', + '/js/default/search.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $params = CO2::getThemeParams(); + + $maxImg = 5; + + $page = "search"; + if(!@$type){ $type = "all"; } + + if(@$type=="events") { $page = "agenda"; $maxImg = 7; } + if(@$type=="classified"){ $page = "annonces"; $maxImg = 1; } + if(@$type=="vote") { $page = "power"; $maxImg = 1; } + if(@$type=="place") { $page = "place"; $maxImg = 1; } + + if(@$type=="cities") { $lblCreate = ""; } + + if($params["title"] == "Kgougle") { + $page = "social"; + if(@$type=="classified"){ $page = "annonces"; } + if(@$type=="events"){ $page = "agenda"; } + } + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => $page, + "type" => @$type) ); + + + $randImg = rand(1, $maxImg); + //$randImg = 2; +?> + +<style> + header .headerImg{ + background-image: url("<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion1.jpg"); + background-size: 100% auto; + height: 300px; + margin-top: 45px; + background-repeat: no-repeat; + /*opacity: 0.3; + background-color: black;*/ + } + + #main-scope-name a{ + height: 130px; + background-color: rgba(255, 255, 255, 0.9); + width: 130px; + display: inline-block; + padding-top: 30px; + border-radius: 50%; + padding-right: 4px; + } + + #dropdown_search{ + margin-top:20px; + } +</style> + + +<div class="col-md-12 col-sm-12 col-xs-12 bg-white no-padding shadow pageContent" + id="content-social" style="min-height:700px;"> + + <?php if(@$type=="events"){ ?> + <div class="col-md-12 no-padding calendar"></div> + <div class="responsive-calendar-init hidden"> + <div class="responsive-calendar light col-md-12 no-padding"> + <div class="day-headers"> + <div class="day header"><?php echo Yii::t("translate","Mon") ?></div> + <div class="day header"><?php echo Yii::t("translate","Tue") ?></div> + <div class="day header"><?php echo Yii::t("translate","Wed") ?></div> + <div class="day header"><?php echo Yii::t("translate","Thu") ?></div> + <div class="day header"><?php echo Yii::t("translate","Fri") ?></div> + <div class="day header"><?php echo Yii::t("translate","Sat") ?></div> + <div class="day header"><?php echo Yii::t("translate","Sun") ?></div> + </div> + <div class="days" data-group="days"></div> + <div class="controls"> + <a id="btn-month-before" class="text-white" data-go="prev"><div class="btn"><i class="fa fa-arrow-left"></i></div></a> + <h4 class="text-white"><span data-head-month></span> <span data-head-year></span></h4> + <a id="btn-month-next" class="text-white" data-go="next"><div class="btn"><i class="fa fa-arrow-right"></i></div></a> + </div> + </div> + </div> + <?php } ?> + + <?php if(@$type!="cities" && Yii::app()->params["CO2DomainName"] != "terla"){ ?> + <div class="col-md-2 col-sm-2 col-xs-12 no-padding"> + <?php if(@$type=="all"){ ?> + <button class="btn btn-default letter-<?php echo @$params["pages"]["#".$page]["colorBtnCreate"]; ?> hidden-xs btn-menu-left-add pull-right margin-top-25 main-btn-create tooltips" + data-target="#dash-create-modal" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="<?php echo Yii::t("common", @$params["pages"]["#".$page]["lblBtnCreate"]); ?>"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("common",@$params["pages"]["#".$page]["lblBtnCreate"]); ?> + </button> + <?php }else{ ?> + <button class="btn btn-default letter-<?php echo @$params["pages"]["#".$page]["colorBtnCreate"]; ?> hidden-xs btn-menu-left-add pull-right margin-top-25 main-btn-create tooltips" data-type="<?php echo @$type; ?>" + data-toggle="tooltip" data-placement="top" + title="<?php echo Yii::t("common", @$params["pages"]["#".$page]["lblBtnCreate"]); ?>"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("common",@$params["pages"]["#".$page]["lblBtnCreate"]); ?> + </button> + <?php } ?> + + </div> + + <?php //var_dump(Yii::app()->request->cookies['communexionActivated']); + //var_dump(CO2::getCommunexionCookies()); + ?> + <?php if(Yii::app()->params["CO2DomainName"] != "terla"){ ?> + <div id="container-scope-filter" class="col-md-10 col-sm-10 col-xs-12 padding-5"> + <?php $this->renderPartial($layoutPath.'breadcrum_communexion', array("type"=>@$type)); ?> + </div> + <?php } ?> + <?php } ?> + + + <div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="page"></div> + + <?php if(@$type=="all" && !empty(Yii::app()->session["userId"]) && Yii::app()->params["CO2DomainName"] != "terla" ){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 padding-5 text-center"> + <!-- <hr style="margin-bottom:-20px;"> --> + <button class="btn btn-default btn-circle-1 btn-create-page bg-green-k text-white tooltips" + data-target="#dash-create-modal" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="<?php echo Yii::t("common","Create a new page") ?>"> + <i class="fa fa-times" style="font-size:18px;"></i> + </button> + <h5 class="text-center letter-green margin-top-25"><?php echo Yii::t("form","Create a page") ?></h5> + <h5 class="text-center"> + <small> + <span class="text-green"><?php echo Yii::t("common","NGOs") ?></span> + <span class="text-azure"><?php echo Yii::t("common","Local Business") ?></span> + <span class="text-purple"><?php echo Yii::t("common","Projects") ?></span> + <span class="text-turq"><?php echo Yii::t("common","Groups") ?></span> + <span class="text-red"><?php echo Yii::t("common","Government Organization") ?></span> + </small> + </h5><br> + </div> + <?php } ?> + +</div> + +<?php $this->renderPartial($layoutPath.'modals.'.Yii::app()->params["CO2DomainName"].'.pageCreate', array()); ?> +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array()); ?> + +<?php //$this->renderPartial($layoutPath.'footer', array("subdomain"=>$page)); ?> + + + +<script type="text/javascript" > + +var type = "<?php echo @$type ? $type : 'all'; ?>"; +var typeInit = "<?php echo @$type ? $type : 'all'; ?>"; +var page = "<?php echo @$page; ?>"; +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + + + +<?php if(@$type=="events"){ ?> + var STARTDATE = new Date(); + var ENDDATE = new Date(); + var startWinDATE = new Date(); + var agendaWinMonth = 0; +<?php } ?> + +//var TPL = "kgougle"; + +//allSearchType = ["persons", "NGO", "LocalBusiness", "projects", "Group"]; + +var currentKFormType = ""; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + + initKInterface({"affixTop":320}); + + var typeUrl = "?nopreload=true"; + if(type!='') typeUrl = "?type="+type+"&nopreload=true"; + getAjax('#page' ,baseUrl+'/'+moduleId+"/default/directoryjs"+typeUrl,function(){ + + $(".btn-directory-type").click(function(){ + var typeD = $(this).data("type"); + + if(typeD == "events"){ + var typeEvent = $(this).data("type-event"); + searchSType = typeEvent; + } + + initTypeSearch(typeD); + mylog.log("search.php",searchType); + setHeaderDirectory(typeD); + loadingData = false; + startSearch(0, indexStepInit, searchCallback); + KScrollTo("#content-social"); + + $(".btn-directory-type").removeClass("active"); + $(this).addClass("active"); + }); + + $(".btn-open-filliaire").click(function(){ + KScrollTo("#content-social"); + }); + + //anny double section filter directory + <?php if(@$type == "classified" || @$type == "place" ){ ?> + initClassifiedInterface(); + <?php } ?> + + bindLeftMenuFilters(); + + //console.log("init Scroll"); + $(window).bind("scroll",function(){ + mylog.log("test scroll", scrollEnd); + if(!loadingData && !scrollEnd && !isMapEnd){ + var heightWindow = $("html").height() - $("body").height(); + if( $(this).scrollTop() >= heightWindow - 400){ + startSearch(currentIndexMin+indexStep, currentIndexMax+indexStep, searchCallback); + } + } + }); + + + + loadingData = false; + initTypeSearch(type); + startSearch(0, indexStepInit, searchCallback); + initSearchInterface(); + },"html"); + + initSearchInterface(); //themes/co2/assets/js/default/search.js + + + + calculateAgendaWindow(0); + + if(page == "annonces" || page == "agenda" || page == "power"){ + setTimeout(function(){ + //KScrollTo("#content-social"); + }, 1000); + } + $(".tooltips").tooltip(); +}); + + +/* ------------------------- +AGENDA +----------------------------- */ + +<?php if(@$type == "events"){ ?> + +var calendarInit = false; +function showResultInCalendar(mapElements){ + //mylog.dir(mapElements); + + var events = new Array(); + var fstDate = ""; + console.log("data mapElements", mapElements); + $.each(mapElements, function(key, thisEvent){ + + var startDate = exists(thisEvent["startDateTime"]) ? thisEvent["startDateTime"].substr(0, 10) : ""; + var endDate = exists(thisEvent["endDateTime"]) ? thisEvent["endDateTime"].substr(0, 10) : ""; + + var cp = ""; + var loc = ""; + if(thisEvent["address"] != null){ + var cp = exists(thisEvent["address"]["postalCode"]) ? thisEvent["address"]["postalCode"] : "" ; + var loc = exists(thisEvent["address"]["addressLocality"]) ? thisEvent["address"]["addressLocality"] : ""; + } + var position = cp + " " + loc; + + var name = exists(thisEvent["name"]) ? thisEvent["name"] : ""; + var thumb_url = notEmpty(thisEvent["profilThumbImageUrl"]) ? baseUrl+thisEvent["profilThumbImageUrl"] : ""; + + if(typeof events[startDate] == "undefined") events[startDate] = new Array(); + events[startDate].push({ "id" : thisEvent["_id"]["$id"], + "thumb_url" : thumb_url, + "startDate": startDate, + "endDate": endDate, + "name" : name, + "position" : position }); + }); + + if(calendarInit == true) { + $(".calendar").html(""); + } + + $(".calendar").html($(".responsive-calendar-init").html()); + + var aujourdhui = startWinDATE; //new Date(); + //console.log("aujourdhui", aujourdhui); + var month = (aujourdhui.getMonth()+1).toString(); + if(aujourdhui.getMonth() < 10) month = "0" + month; + var date = aujourdhui.getFullYear().toString() + "-" + month; + + //console.log("data events", events, "time", date); + $(".responsive-calendar").responsiveCalendar({ + time: date, + events: events + }); + + $(".responsive-calendar").show(); + + + /*$("#btn-month-next").click(function(){ + agendaWinMonth++; + calculateAgendaWindow(agendaWinMonth); + startSearch(0, indexStep, searchCallback); + }); + $("#btn-month-before").click(function(){ + agendaWinMonth--; + calculateAgendaWindow(agendaWinMonth); + startSearch(0, indexStep, searchCallback); + });*/ + + + calendarInit = true; +} + +<?php } ?> + +/* ------------------------- +END AGENDA +----------------------------- */ + +</script> \ No newline at end of file diff --git a/views/app/web.php b/views/app/web.php new file mode 100755 index 0000000000000000000000000000000000000000..eaf22945e898fdbb9c851b4e67da62322f6b1132 --- /dev/null +++ b/views/app/web.php @@ -0,0 +1,218 @@ + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "web", + ) + ); + $cssAnsScriptFiles = array( + '/assets/css/circle.css', + '/assets/js/web.js', + // '/assets/css/referencement.css' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); + + +?> + +<style> + #sectionSearchResults{ + min-height:700px; + /*margin-left:80px;*/ + padding-bottom:50px; + } + #sub-menu-left { + margin-top: 207px; + text-align: right; + } + + #mainCategories .portfolio .portfolio-item{ + height:100px; + } + + <?php + $btnAnc = array("blue" =>array("color1"=>"#4285f4", + "color2"=>"#1c6df5"), + ); + ?> + + <?php foreach($btnAnc as $color => $params){ ?> + .btn-anc-color-<?php echo $color; ?>{ + background-color: <?php echo $params["color1"]; ?>; + border-color: <?php echo $params["color1"]; ?>!important; + color: #fff!important; + } + + .btn-anc-color-<?php echo $color; ?>:hover{ + background-color: <?php echo $params["color2"]; ?>!important; + border-color: <?php echo $params["color1"]; ?>!important; + } + .btn-anc-color-<?php echo $color; ?>.active{ + background-color:#fff!important; + color:<?php echo $params["color1"]; ?>!important; + } + .btn-anc-color-<?php echo $color; ?>.active:hover{ + background-color: #fff; + color: <?php echo $params["color1"]; ?>; + } + <?php } ?> + + + #btn-onepage-main-menu{ + position: fixed; + top:110px; + left:20px; + border-radius: 1px; + letter-spacing: 2px; + border:2px solid white; + border-radius:100px; + height:40px; + /*width:60px;*/ + } + + .siteurl_title{ + font-size:17px!important; + } + .siteurl_hostname{ + font-size:14px!important; + } + .siteurl_desc{ + font-size:13px!important; + color:#606060; + } + .portfolio.p1{ + padding-top:20px; + } + + .btn-fast-access{ + font-size: 24px; + } + + #section-fav{ + max-height: 50px; + overflow: hidden; + } + + #sub-menu-left{ + margin-top: 207px; + text-align: right; + } + @media screen and (max-width: 1024px) { + #mainCategories .portfolio .portfolio-item{ + height: 110px; + } + #mainCategories .portfolio .portfolio-item button.portfolio-link{ + margin-top: 15px; + } + } + + @media (max-width: 767px) { + + .category-search-link h4{ + font-size: 0.9em; + } + #mainCategories h3{ + font-size: 1.3em; + } + #sub-menu-left { + margin-top: 5px; + padding:15px; + text-align: left; + } + } +</style> + + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial('admin/modalEditUrl', array( ) ); + //var_dump($myWebFavorites); + $this->renderPartial($layoutPath.'modals.kgougle.favorites', array("myWebFavorites"=>@$myWebFavorites ) ); +?> + +<button class="hidden btn letter-red btn-link font-montserrat dropdown-toggle" data-toggle="dropdown" id="btn-onepage-main-menu"> + <i class='fa fa-angle-right'></i> A propos +</button> + +<section class="padding-top-10 text-center margin-bottom-10 hidden-xs" id="section-fav"> + <?php if(false){ ?> + <a href="#media" target="_blank" class="tooltips btn-fast-access" data-placement="bottom" data-toggle="tooltip" + title="Aller sur KgougleActu"><i class="fa fa-newspaper-o fa-2 padding-10 text-dark"></i></a> + <?php } ?> + + <?php if(!empty($myWebFavorites)){ ?> + <i class="fa fa-ellipsis-v btn-fast-access padding-10 letter-yellow hidden-xs hidden"></i> + <?php } ?> + + <a href="https://www.youtube.com" target="_blank" class="tooltips btn-fast-access" + data-placement="bottom" data-toggle="tooltip" title="Aller sur YouTube"> + <i class="fa fa-youtube-play padding-10 letter-red"></i> + </a> + <a href="https://www.facebook.com/" target="_blank" class="tooltips btn-fast-access" + data-placement="bottom" data-toggle="tooltip" title="Aller sur Facebook"> + <i class="fa fa-facebook-square padding-10 letter-blue"></i> + </a> + <a href="https://fr.wikipedia.org/w/index.php?search=&title=Sp%C3%A9cial%3ARecherche&go=Lire" + target="_blank" class="tooltips btn-fast-access" style="font-size: 19px;" + data-placement="bottom" data-toggle="tooltip" title="Aller sur Wikipedia"> + <i class="fa fa-wikipedia-w padding-10"></i> + </a> + + <?php if(!empty($myWebFavorites)){ ?> + <i class="fa fa-ellipsis-v btn-fast-access padding-10 letter-yellow hidden-xs hidden"></i> + <?php + foreach ($myWebFavorites as $key => $siteurl) { + if(@$siteurl["favicon"]){ + //$file_headers = @get_headers($siteurl["favicon"]); + //echo $siteurl["favicon"]."-".$file_headers[0]; + // if($file_headers[0] == "HTTP/1.1 200 OK") { + ?> + <a class="siteurl_title letter-blue elipsis tooltips" target="_blank" href="<?php echo $siteurl["url"]; ?>" + data-placement="bottom" data-toggle="tooltip" title="<?php echo $siteurl["title"]; ?>"> + <img src='<?php echo $siteurl["favicon"]; ?>' alt="o" height=22 class="margin-right-5" style="margin:0 14px;margin-top:4px;" alt=""> + </a> + + <?php }//} + } + ?> + + <i class="fa fa-ellipsis-v btn-fast-access padding-10 letter-yellow pull-right" style='margin-left:-10px;'></i> + <button class="btn btn-link tooltips pull-right no-padding" data-placement="bottom" title="Afficher vos favoris" + data-target="#modalFavorites" data-toggle="modal"> + <i class="fa fa-star btn-fast-access padding-10 letter-yellow" style="font-size: 18px;margin-top: 3px;"></i> + </button> + + <?php } ?> +</section> + +<section class="no-padding hidden" id="sectionSearchResults"> + <div class="row padding-10"> + <div class="col-md-2 col-sm-2 text-right" id="sub-menu-left"></div> + <div class="col-md-7 col-sm-9 col-lg-8" id="searchResults"></div> + <div class="col-md-2 col-sm-1 text-left" id="sub-menu-right"></div> + </div> +</section> + +<div id="mainCategories" class="shadow padding-bottom-50"></div> + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array("subdomain"=>"web")); ?> + +<script type="text/javascript" > + +var currentCategory = ""; + +jQuery(document).ready(function() { + initKInterface(); + initWebInterface(); + buildListCategories(); + + location.hash = "#web"; + setTitle("", "", "kgougle"); +}); + + + +</script> \ No newline at end of file diff --git a/views/app/webSearch.php b/views/app/webSearch.php new file mode 100755 index 0000000000000000000000000000000000000000..54a4ffcb5472d1f7f8320adc38d6e98fd18bd369 --- /dev/null +++ b/views/app/webSearch.php @@ -0,0 +1,245 @@ + + + +<hr> +<button class="btn btn-default menu-btn-back-category btn-second margin-bottom-5 margin-top-5" id="btn-new-search"> + <i class="fa fa-undo"></i> Nouvelle recherche +</button> + +<hr> +<?php if($category == "Météo"){ ?> + <iframe class="col-sm-12 col-md-12 col-xs-12 margin-bottom-20" style="padding:0 15px 0 0;border-radius: 5px;" height="450" + src="https://embed.windytv.com/embed2.html?lat=-20.180&lon=165.630&zoom=6&level=surface&overlay=rain&menu=&message=&marker=&forecast=12&calendar=now&location=coordinates&type=map&actualGrid=&metricWind=kt&metricTemp=%C2%B0C" + frameborder="0"> + </iframe> + + <div class="col-sm-12 col-md-12 col-xs-12 no-padding"> + <hr> + </div> +<?php } ?> +<h3 id="titleWebSearch" style="margin:20px 0 0 4px;"> + <?php echo @$category ? " <small class='letter-blue'><i class='fa' id='fa-category'></i> ".$category."</small>" : ""; ?> + <?php echo @$search ? " <small class='letter-blue'> <i class='fa fa-search'></i> ".$search."</small><br>" : "<br>"; ?> +</h3> +<h3 style="margin:0 0 20px 0;"> + <div class="margin-top-5"> + <i class="fa fa-angle-down"></i> + <?php echo sizeof($siteurls) > 0 ? sizeof($siteurls) : "aucun"; ?> + résultat<?php echo sizeof($siteurls) > 1 ? "s" : ""; ?> + </div> +</h3> + + + +<div class="col-md-10 margin-bottom-15" style=""> +<?php foreach ($siteurls as $key => $siteurl) { ?> + +<?php + //bold keywords found + $siteurl["urlDisplay"] = $siteurl["url"]; + + if(isset($siteurl["wordsFound"])) + foreach ($siteurl["wordsFound"] as $key2 => $regexWF) { + if($regexWF!=""){ + $regexWFR = Search::accentToRegex($regexWF); + $siteurl["urlDisplay"] = preg_replace("/(*UTF8)".$regexWFR."/" , "<b>$0</b>", @$siteurl["urlDisplay"]); + $siteurl["title"] = preg_replace("/(*UTF8)".$regexWFR."/i", "<b>$0</b>", @$siteurl["title"]); + $siteurl["description"] = preg_replace("/(*UTF8)".$regexWFR."/i", "<b>$0</b>", @$siteurl["description"]); + } + } + + + if(isset($arraySearch)) + foreach ($arraySearch as $key2 => $regexWF) { + if($regexWF!=""){ + $regexWFR = Search::accentToRegex($regexWF); + $siteurl["urlDisplay"] = preg_replace("/(*UTF8)".$regexWFR."/" , "<b>$0</b>", @$siteurl["urlDisplay"]); + $siteurl["title"] = preg_replace("/(*UTF8)".$regexWFR."/i", "<b>$0</b>", @$siteurl["title"]); + $siteurl["description"] = preg_replace("/(*UTF8)".$regexWFR."/i", "<b>$0</b>", @$siteurl["description"]); + } + } +?> + + + <div class="col-md-12 margin-bottom-15 url-<?php echo $siteurl['_id']; ?> url-div"> + + <div class="addToFavInfo"> + <a href="#web" class="btn-favory tooltips" data-idFav="<?php echo $siteurl['_id']; ?>" + data-placement="top" data-toggle="tooltip" title="Garder en favoris"> + <i class="fa fa-star-o"></i><i class="fa fa-star letter-yellow"></i> + </a> + + <a class="siteurl_title letter-blue" target="_blank" href="<?php echo $siteurl["url"]; ?>"> + <?php if(@$siteurl["favicon"]){ ?> + <img src='<?php echo $siteurl["favicon"]; ?>' height=17 class="margin-right-5" style="margin-top:-3px;" alt=""> + <?php } ?> + <?php echo $siteurl["title"]; ?> + </a> + <button class="btn btn-xs bg-white btn-edit-url tooltips hidden-xs" title="modifier" + data-target="#modalEditUrl" data-toggle="modal" data-placement="right" + data-idurl="<?php echo $key; ?>"> + <i class="fa fa-cog"></i> + </button> + <br> + <a href="<?php echo $siteurl["url"]; ?>" target="_blank" class="siteurl_hostname letter-green"> + <?php echo @$siteurl["urlDisplay"]; ?> + </a><br> + </div> + + <?php if(@$siteurl["description"]){ ?> + <span class="siteurl_desc letter-grey"><?php echo @$siteurl["description"]; ?></span><br> + <?php } ?> + + <span class="siteurl_desc letter-grey hidden"> + <?php if(Role::isSuperAdmin(Role::getRolesUserId(Yii::app()->session["userId"]) ) ) { ?> + <b> + <?php if(!empty($siteurl["categories"])) foreach ($siteurl["categories"] as $key2 => $category) { ?> + $<?php echo $category; ?> + <?php } ?> + </b> + <b> + <?php if(!empty($siteurl["tags"])) foreach ($siteurl["tags"] as $key2 => $tag) { ?> + #<?php echo $tag; ?> + <?php } ?> + </b> + <?php } ?> + </span> + <br> + </div> +<?php } ?> +</div> + +<?php //if(sizeof($siteurls) < 3){ + + $searchG = str_replace(" ", "+", $search); +?> +<div class="col-md-12 margin-bottom-50" style="margin-top:0px;"> + <hr> + <h5 class="text-right"> + <a href="https://www.ecosia.org/search?q=<?php echo $searchG; ?>" target="_blank"> + <i class="fa fa-fw fa-angle-right"></i> continuer la recherche sur <span class="visible-xs"><br></span> + <img style="margin-top:-10px;" src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/ecosia_logo.png" height=60> + </a> + </h5> + <hr> + <h5 class="text-right"> + <a href="https://www.google.com/search?q=<?php echo $searchG; ?>" target="_blank"> + <i class="fa fa-fw fa-angle-right"></i> continuer la recherche sur <span class="visible-xs"><br></span> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/google.png" height=25> + </a> + </h5> +</div> +<?php //} ?> + + + +<?php if(sizeof($siteurls) >= 0){ ?> +<div class="col-md-12 margin-bottom-50 text-right" style=""> + <hr class="margin-top-5"> + <span> + <small><b> + Vous connaissez un site qui n'est pas référencé ici ?<br> + Ajoutez le <span class="letter-green">gratuitement</span> dans la base de données, et faites-en profiter tout le monde ! + </b></small> + </span><br><br> + <b>Référencer un site <i class="fa fa-angle-right"></i></b> + <a class="btn btn-default btn-success margin-bottom-5 lbh" href="#referencement"> + <i class="fa fa-plus-circle"></i> Ajouter une URL + </a> +</div> +<?php } ?> +<script type="text/javascript" > + +var siteurls = <?php echo json_encode($siteurls) ? json_encode($siteurls) : "{}"; ?>; +var search = "<?php echo $search; ?>"; + +jQuery(document).ready(function() { + + Sig.showMapElements(Sig.map, siteurls); + + + $(".siteurl_title").click(function(){ + var url = $(this).attr("href"); + incNbClick(url); + }); + + $(".btn-edit-url").click(function(){ console.log("siteurls", siteurls); + var id = $(this).data("idurl"); + var site = siteurls[id]; + $("#form-idurl").val(site["_id"]['$id']); + $("#form-url").val(site.url); + $("#form-title").val(site.title); + $("#form-description").val(site.description); + + if(typeof site.geo != "undefined"){ + $("#form-lat").val(site.geo.latitude); + $("#form-lng").val(site.geo.longitude); + } + if(typeof site.tags != "undefined"){ + $("#form-keywords1").val(site.tags[0]); + $("#form-keywords2").val(site.tags[1]); + $("#form-keywords3").val(site.tags[2]); + $("#form-keywords4").val(site.tags[3]); + } + + if(typeof site.address != "undefined"){ + $("#btn-geoloc").data("city-name", site.address.addressLocality); + $("#btn-geoloc").data("city-cp", site.address.postalCode); + $("#btn-geoloc").data("city-insee", site.address.codeInsee); + $("#btn-geoloc").data("city-lat", site.geo.latitude); + $("#btn-geoloc").data("city-lng", site.geo.longitude); + NE_insee = site.address.codeInsee; + NE_lat = site.geo.latitude; + NE_lng = site.geo.longitude; + NE_city = site.address.addressLocality; + NE_cp = site.address.postalCode; + NE_street = site.address.streetAddress.trim(); + NE_country = site.address.addressCountry; + NE_level1 = site.address.level1; + NE_region = site.address.regionName; + $("#name-city-selected").html(site.address.addressLocality + ", " + site.address.postalCode); + }else{ + $("#form-street, #btn-find-position").hide(); + $("#name-city-selected").html(""); + } + + $("#form-status").val(site.status); + + $(".portfolio-item").removeClass("selected"); + categoriesSelected = new Array(); + $.each(site.categories, function(key, val){ + $(".portfolio-item.cat-"+val).addClass("selected"); + console.log("cat", val); + categoriesSelected.push(val); + }); + //categoriesSelected = site.categories; + + $("#sectionSearchResults").show(); + }); + + $(".menu-btn-back-category").off().click(function(){ + $("#mainCategories").show(); + $("#searchResults").html(""); + $("#sectionSearchResults").addClass("hidden"); + $("#main-search-bar").val(""); + $("#second-search-bar").val(""); + $("#input-search-map").val(""); + KScrollTo("#mainCategories"); + currentCategory = "" + }); + + $("#searchResults .btn-favory").click(function(){ + var id = $(this).data("idfav"); + addToFavorites(id); + }); + + + $(".tooltips").tooltip(); + + bindLBHLinks(); + + initKeywords(); + +}); + +</script> \ No newline at end of file diff --git a/views/app/welcome.php b/views/app/welcome.php new file mode 100644 index 0000000000000000000000000000000000000000..c496eb3ead66c9cc3b297be7c2e08c0099b2e2fd --- /dev/null +++ b/views/app/welcome.php @@ -0,0 +1,78 @@ + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "welcome", + ) + ); + $cssAnsScriptFiles = array( + '/assets/css/profilSocial.css', + '/assets/css/default/directory.css', + '/assets/css/welcome.css', + // '/assets/css/referencement.css' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); + + + $cssAnsScriptFilesModule = array( + '/js/default/directory.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +?> + +<section class="padding-top-70 bg-white inline-block pull-left" id="bg-homepage"> + <?php $this->renderPartial($layoutPath.'home.'.Yii::app()->params["CO2DomainName"], array()); ?> +</section> + +<script type="text/javascript" > + +var currentCategory = ""; + +jQuery(document).ready(function() { + initKInterface({"affixTop":0}); + $("#mainNav").addClass("affix"); + initWelcomeInterface(); + location.hash = ""; +}); + + +function initWelcomeInterface(){ + + $("#second-search-bar").addClass("input-global-search"); + + $("#main-btn-start-search, .menu-btn-start-search").click(function(){ + startGlobalSearch(0, indexStepGS); + }); + + $("#second-search-bar").keyup(function(e){ console.log("keyup #second-search-bar"); + $("#input-search-map").val($("#second-search-bar").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#input-search-map").off().keyup(function(e){ console.log("keyup #input-search-map"); + $("#second-search-bar").val($("#input-search-map").val()); + if(e.keyCode == 13){ + startGlobalSearch(0, indexStepGS); + } + }); + + $("#menu-map-btn-start-search").off().click(function(){ + startGlobalSearch(0, indexStepGS); + }); + + $("#bg-homepage").mouseenter(function(){ + $(".dropdown-result-global-search").hide(); + }); + + + $(".tooltips").tooltip(); + +} + + +</script> \ No newline at end of file diff --git a/views/chart/addChartSV.php b/views/chart/addChartSV.php new file mode 100755 index 0000000000000000000000000000000000000000..fe5a40dd9dba3257f3c4351b5738024c2f014332 --- /dev/null +++ b/views/chart/addChartSV.php @@ -0,0 +1,506 @@ +<?php +$cssAnsScriptFilesTheme = array( + '/plugins/jQuery-Knob/js/jquery.knob.js', + '/plugins/jQuery-Smart-Wizard/js/jquery.smartWizard.js', + '/plugins/jquery-validation/dist/jquery.validate.min.js', +// '/js/jsonHelper.js', + '/plugins/jquery.dynSurvey/jquery.dynSurvey.js', +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme,Yii::app()->request->baseUrl); +$cssAnsScriptFilesModule = array( + //Data helper + '/js/dataHelpers.js', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> +<style> +.borderHover{ + background-color: rgba(0, 0, 0, 0.04); + border-radius:5px; +} +.removeProperty{ + border: 3px solid white; + box-shadow: 0px 0px 0px 1px black; + width: 25px; + text-align: -webkit-center; + height: 25px; + background-color: black; + line-height: 22px; + color: white; + position: absolute; + right: -5px; + top: -5px; + border-radius: 25px; +} +.property-description{ + width: 100%; + height:200px; + padding:5px; +} +.stepFormChart{ + background-color: #8b91a0; + /*border: 5px solid #CED1D6;*/ + border-radius: 100% 100% 100% 100%; + color: white; + display: inline-block; + font-size: 20px; + height: 40px; + line-height: 40px; + position: relative; + text-align: center; + width: 40px; + z-index: 2; + margin-right: 5px; +} +.chooseTypeForm .btn{ + font-variant:small-caps; + font-size: 20px; +} +.chooseTypeForm{ + margin-left:45px; +} +textarea.form-control{ + height: inherit !important; + min-height: 200px !important; +} +</style> +<div id="editProjectChart"> + <div class="noteWrap col-md-12 col-sm-12 col-xs-12 bg-white"> + + <button class="btn btn-primary escapeForm btn-start-chart <?php if ((!@$properties["commons"] || (@$properties["commons"] && empty($properties["commons"]))) && (!@$properties["open"] || (@$properties["open"] && empty($properties["open"]))) ) echo "hide"; ?>"><i class="fa fa-sign-out"></i> <?php echo Yii::t("chart","Go back to the results") ?></button> + <h3 style="font-variant:small-caps;"><span class="stepFormChart">1</span><?php echo Yii::t("chart","Choose which kind of form to complete") ?></h3> + + <span style="font-style:italic; margin-left:45px;" class="text-right"><?php echo Yii::t("chart","Status") ?> : <i class="fa fa-circle text-green"></i> <span class="text-green"><?php echo Yii::t("chart","Current") ?></span> <i class="fa fa-circle text-orange"></i> <span class="text-orange"><?php echo Yii::t("chart","To modified") ?></span> <i class="fa fa-circle"></i> <?php echo Yii::t("chart","Empty") ?></span><br/> + + <div class="chooseTypeForm margin-top-50 text-center"> + <div class="col-md-12 col-sm-12 col-xs-12"> + <p><?php echo Yii::t("chart","These forms are here to show the values {what} in order to give an overview about organization, manage and life {what}",array("{what}"=> Yii::t("common","of the ".Element::getControlerByCollection($parentType)))) ?></p> + </div> + <div class="col-md-6 col-sm-6 col-xs-6"> + <a id="btncommons" href="javascript:;" onclick="switchTypeChart('commons')" class="btn <?php if (isset($properties["commons"]) && !empty($properties["commons"])) echo "text-orange" ?>"> + <i class="fa fa-circle"></i> <?php echo Yii::t("chart","Commons") ?> + </a> + <p><?php echo Yii::t("chart","Define {what} as a common. It means to manage one or several resources openly and transparently whitout appropriating it",array("{what}"=>Yii::t("common","this ".Element::getControlerByCollection($parentType)))) ?></p> + + </div> + <div class="col-md-6 col-sm-6 col-xs-6"> + <a id="btnopen" href="javascript:;" onclick="switchTypeChart('open')" class="btn <?php if (isset($properties["open"]) && !empty($properties["open"])) echo "text-orange" ?>"> + <i class="fa fa-circle"></i> <?php echo Yii::t("chart","Open") ?> + </a> + <p><?php echo Yii::t("chart","Indicate the values {what} openly defining its properties and describing them",array("{what}"=> Yii::t("common", "of the ".Element::getControlerByCollection($parentType)))) ?></p> + </div> + </div> + + + <div id="commonsChart" class="formChart col-md-12 col-sm-12 col-xs-12" style="display:none;"> + <h3 style="font-variant:small-caps;"><span class="stepFormChart">2</span><?php echo Yii::t("chart","Evaluate your ".substr($parentType,0,-1)." as commons") ?></h3> + <form id="opendata"></form> + </div> + <div id="openChart" class="formChart col-md-12 col-sm-12 col-xs-12" style="display:none;"> + <h3 style="font-variant:small-caps;"><span class="stepFormChart">2</span><?php echo Yii::t("chart","Add properties which defined your ".substr($parentType,0,-1)) ?></h3> + <form class="form-chart"> + <div> + <label for="properties" style="font-style: italic"> + <?php echo Yii::t("chart","Degree of your evaluation (0% = very closed, 100% = very opened)") ?> + </label> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <?php if (isset($properties["open"]) && !empty($properties["open"])){ + foreach ($properties["open"] as $key => $val){ + ?> + <div class="col-md-12 col-sm-12 col-xs-12 form-property"> + <div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div> + <h4 style="text-align:center;width:200px;"><?php echo Yii::t("chart",$key); ?></h4> + <?php if ($key=="gouvernance"){ ?> + <label for="properties" class="col-md-12 no-padding"> + Ouverture en terme de décisions, de partenaires, de parties prenantes + </label> + <?php } else if ($key=="partage"){ ?> + <label for="properties" class="col-md-12 no-padding"> + À combien le projet sert le bien communs? + </label> + <?php }else if ($key=="solidaire"){ ?> + <label for="properties" class="col-md-12 no-padding"> + À quel point le projet sert-il l'utilité sociale, le développement durable + </label> + <?php }else if ($key=="local"){ ?> + <label for="properties" class="col-md-12 no-padding"> + Quel est l'impact géographique du projet? + </label> + <?php } ?> + <div class="col-md-6 col-sm-6 col-xs-12"> + <input class="knob property-value" name="<?php echo $key; ?>" value="<?php if (!empty($val["value"])) echo $val["value"]; else echo 0;?>" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;"> + </div> + <div class="col-md-6 col-sm-6 col-xs-12"> + <textarea class="property-description" name="<?php echo $key; ?>" placeholder="<?php echo Yii::t("chart","Describe this property") ?>"><?php if (!empty($val["description"])) echo $val["description"]; ?></textarea> + </div> + </div> + <?php + } + } else { ?> + <div class="col-md-12 col-sm-12 col-xs-12 form-property"> + <div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div> + <h4>Gouvernance</h4> + <label for="properties" class="col-md-12 no-padding"> + Ouverture en terme de décisions, de partenaires, de parties prenantes + </label> + <div class="col-md-6 col-sm-6 col-xs-12"> + <input class="knob property-value" name="gouvernance" value="0" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;"> + </div> + <div class="col-md-6 col-sm-6 col-xs-12"> + <textarea class="property-description" name="gouvernance" placeholder="Describe this property"></textarea> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 form-property"> + <div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div> + <h4>Partage</h4> + <label for="properties" class="col-md-12"> + À combien le projet sert le bien communs? + </label> + <div class="col-md-6 col-sm-6 col-xs-12"> + <input class="knob property-value" value="0" name="partage" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;"> + </div> + <div class="col-md-6 col-sm-6 col-xs-12"> + <textarea class="property-description" name="partage" placeholder="Describe this property"></textarea> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 form-property"> + <div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div> + <h4>Solidaire</h4> + <label for="properties" class="col-md-12 no-padding"> + À quel point le projet est-il d'utilité sociale, du développement durable, etc.? + </label> + <div class="col-md-6 col-sm-6 col-xs-12"> + <input class="knob property-value" value="0" name="solidaire" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;"> + </div> + <div class="col-md-6 col-sm-6 col-xs-12"> + <textarea class="property-description" name="solidaire" placeholder="Describe this property"></textarea> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 form-property"> + <div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div> + <h4 style="text-align:center;width:200px;">Local</h4> + <label for="properties" class="col-md-12 no-padding"> + Quel est l'impact géographique du projet? + </label> + <div class="col-md-6 col-sm-6 col-xs-12"> + <input class="knob property-value" value="0" name="local" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;"> + </div> + <div class="col-md-6 col-sm-6 col-xs-12"> + <textarea class="property-description" name="local" placeholder="Describe this property"></textarea> + </div> + </div> + <?php } ?> + <div class="col-md-12 col-sm-12 col-xs-12 text-center margin-top-10"> + <a href="javascript:;" class="text-green addProperties" style="width:80%;"> + <i class="fa fa-plus"></i> <?php echo Yii::t("chart","Add a new property"); ?> + </a> + <!--<h4 style="text-align:center;width:200px;"></h4> + <div class="flexslider" style="margin-top:35px;"> + <div id="infoPodOrga" class="padding-10"> + <blockquote> + <i class="fa fa-puzzle-piece fa-2x text-blue"></i> <?php echo Yii::t("chart","Add<br/>A new<br/>Property") ?> + <br/> + <a href="javascript" class="addProperties" style="display: inline; opacity: 1; left: 0px;"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","ADD"); ?> + </a> + </blockquote> + + </div> + + </div>--> + </div> + </div> + <hr class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 text-center"> + <button class="btn btn-success" style="width:80%;"><i class="fa fa-save"></i> <?php echo Yii::t("common","Save") ?></button> + </div> + </div> + </form> + </div> + </div> +</div> +<script type="text/javascript"> +var countProperties=<?php echo json_encode(count($properties)); ?>; +var parentId = "<?php echo $parentId; ?>"; +var parentType = "<?php echo $parentType; ?>"; +var properties = <?php echo json_encode($properties); ?>; +propertiesCommons={}; +if(typeof(properties.commons) != "undefined") + propertiesCommons=properties.commons; +propertiesOpen={}; +if(typeof(properties.open) != "undefined") + propertiesOpen=properties.open; + +console.log(properties); +var formAlreadyLoad=[]; + +jQuery(document).ready(function() { + (function(){var e;!function(t,l){return t.fn.autogrow=function(i){return null==i&&(i={}),null==i.horizontal&&(i.horizontal=!0),null==i.vertical&&(i.vertical=!0),null==i.debugx&&(i.debugx=-1e4),null==i.debugy&&(i.debugy=-1e4),null==i.debugcolor&&(i.debugcolor="yellow"),null==i.flickering&&(i.flickering=!0),null==i.postGrowCallback&&(i.postGrowCallback=function(){}),null==i.verticalScrollbarWidth&&(i.verticalScrollbarWidth=e()),i.horizontal!==!1||i.vertical!==!1?this.filter("textarea").each(function(){var e,n,r,o,a,c,d;return e=t(this),e.data("autogrow-enabled")?void 0:(e.data("autogrow-enabled"),a=e.height(),c=e.width(),o=1*e.css("lineHeight")||0,e.hasVerticalScrollBar=function(){return e[0].clientHeight<e[0].scrollHeight},n=t('<div class="autogrow-shadow"></div>').css({position:"absolute",display:"inline-block","background-color":i.debugcolor,top:i.debugy,left:i.debugx,"max-width":e.css("max-width"),padding:e.css("padding"),fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),lineHeight:e.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),i.horizontal===!1?n.css({width:e.width()}):(r=e.css("font-size"),n.css("padding-right","+="+r),n.normalPaddingRight=n.css("padding-right")),d=function(t){return function(l){var r,d,s;return d=t.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n /g,"<br/> ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"<br/> ").replace(/\n/g,"<br/>").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(t.value)&&(d+="<br />",i.flickering===!1&&(d+="<br />")),n.html(d),i.vertical===!0&&(r=Math.max(n.height()+o,a),e.height(r)),i.horizontal===!0&&(n.css("padding-right",n.normalPaddingRight),i.vertical===!1&&e.hasVerticalScrollBar()&&n.css("padding-right","+="+i.verticalScrollbarWidth+"px"),s=Math.max(n.outerWidth(),c),e.width(s)),i.postGrowCallback(e)}}(this),e.change(d).keyup(d).keydown(d),t(l).resize(d),d())}):void 0}}(window.jQuery,window),e=function(){var e,t,l,i;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),l=e.offsetWidth,t.style.overflow="scroll",i=e.offsetWidth,l===i&&(i=t.clientWidth),document.body.removeChild(t),l-i}}).call(this); + + $(".moduleLabel").html("<span style='font-size:20px;'>Charte, valeurs, code social</span>"); + knobInit(); + $(".addProperties").click(function(){ + newProperty=addNewProperties(); + $(this).parents().eq(0).before(newProperty); + knobInit(); + removeChartProperty(); + }); + $(".btn-start-chart").click(function(){ + history.pushState(null, "New Title", hashUrlPage+".view.chart"); + loadChart(); + }); + //bindprojectSubViewchart(); + runChartFormValidation(); + removeChartProperty(); +}); +function runChartFormValidation() { + var formChart = $('.form-chart'); + var errorHandler2 = $('.errorHandler', formChart); + var successHandler2 = $('.successHandler', formChart); + formChart.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + invalidHandler : function(project, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + successHandler2.show(); + errorHandler2.hide(); + var newChart = {}; + newChart["open"] = {}; + nbProperties=0; + $('.form-property').each(function(){ + valueProperties = $(this).find(".property-value").val(); + descriptionProperties = $(this).find(".property-description").val(); + if(valueProperties !=0 || descriptionProperties!=""){ + if($(this).find(".property-value").attr("name") == "newProjectProperty"){ + nameProperties=$(this).find(".newLabelProperty").val(); + //alert(nameProperties); + if(nameProperties.length){ + newChart["open"][nameProperties]={}; + newProperties={"description": descriptionProperties, "value": valueProperties}; + //newProperties={"label" : nameProperties , "value" : valueProperties}; + newChart["open"][nameProperties]=newProperties; + nbProperties++; + } + } + else{ + nameProperties = $(this).find(".property-value").attr("name"); + newChart["open"][nameProperties]={}; + newProperties = new Object; + newProperties={"description": descriptionProperties, "value": valueProperties}; + newChart["open"][nameProperties]=newProperties; + nbProperties++; + } + } + }); + if(nbProperties == 0){ + newChart="open"; + } + console.log(newChart); + //mockjax simulates an ajax call + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/chart/editchart', + dataType : "json", + data: {properties : newChart, id : parentId, type : parentType}, + type:"POST", + }) + .done(function (data,myNewChart) + { + if (data.result==true) { + loadEditChart(); + toastr.success("<?php echo Yii::t("chart",ucfirst(substr($parentType,0,-1)).'’s values well updated') ?>"); + } else { + toastr.error('Something Went Wrong'); + } + }); + } + }); +}; + +// enables the edit form +/*function editChart() { + $(".close-chart-edit").off().on("click", function() { + $(".back-subviews").trigger("click"); + }); +};*/ +function addNewProperties(){ + $newProperty='<div class="col-md-12 col-sm-12 col-xs-12 form-property no-padding margin-top-10">'+ + '<div class="removeProperty hide"><span class="glyphicon glyphicon-remove"></span></div>'+ + '<h4 class="col-md-12 col-sm-12 col-xs-12 text-center"><?php echo Yii::t("chart", "New property") ?></h4>'+ + '<div class="col-md-12 col-sm-12 col-xs-12">'+ + '<div class="propertyName col-md-12 col-sm-12 col-xs-12 margin-bottom-10">'+ + /*'<label class="pull-left col-md-4 col-sm-4 col-xs-12" for="properties">'+ + "<?php echo Yii::t("chart", "Property's name") ?>:"+ + '</label>'+*/ + "<input type='text' placeholder='<?php echo Yii::t("chart", "Name of property") ?>' class='newLabelProperty form-control pull-left col-md-12 col-sm-12 col-xs-12'/>"+ + '</div>'+ + '<div class="col-md-6 col-sm-6 col-xs-12">'+ + '<input class="knob property-value" value="0" name="newProjectProperty" data-fgcolor="#66EE66" data-anglearc="250" data-angleoffset="-125" style="height: 66px; position: absolute; vertical-align: middle; margin-top: 66px; margin-left: -152px; border: 0px none; background: transparent none repeat scroll 0% 0%; font: bold 40px Arial; text-align: center; color: rgb(102, 238, 102); padding: 0px;">'+ + "</div>"+ + '<div class="col-md-6 col-sm-6 col-xs-12">'+ + '<textarea class="property-description" name="newProjectProperty" placeholder="<?php echo Yii::t("chart","Describe this property") ?>"></textarea>'+ + '</div>'+ + '</div>'+ + '</div>'; + return $newProperty; +} + +function removeChartProperty(){ + $(".form-property").mouseenter(function(){ + $(this).addClass("borderHover").find(".removeProperty").removeClass("hide"); + }).mouseleave(function(){ + $(this).removeClass("borderHover").find(".removeProperty").addClass("hide"); + }); + $(".removeProperty").off().on("click",function(){ + $(this).parent().remove(); + }); +} + +function knobInit(){ + $(".knob").knob({ + draw: function () { + // "tron" case + if (this.$.data('skin') == 'tron') { + var a = this.angle(this.cv) // Angle + , + sa = this.startAngle // Previous start angle + , + sat = this.startAngle // Start angle + , + ea // Previous end angle + , eat = sat + a // End angle + , + r = true; + this.g.lineWidth = this.lineWidth; + this.o.cursor && (sat = eat - 0.3) && (eat = eat + 0.3); + if (this.o.displayPrevious) { + ea = this.startAngle + this.angle(this.value); + this.o.cursor && (sa = ea - 0.3) && (ea = ea + 0.3); + this.g.beginPath(); + this.g.strokeStyle = this.previousColor; + this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false); + this.g.stroke(); + } + this.g.beginPath(); + this.g.strokeStyle = r ? this.o.fgColor : this.fgColor; + this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false); + this.g.stroke(); + this.g.lineWidth = 2; + this.g.beginPath(); + this.g.strokeStyle = this.o.fgColor; + this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false); + this.g.stroke(); + return false; + } + } + }); +} + function switchTypeChart(str){ + //$(".btn-group i").removeClass("fa-check-circle-o"); + //$(".btn-group i").addClass("fa-circle-thin"); + $(".chooseTypeForm .btn").removeClass("text-green"); + $(".chooseTypeForm #btn"+str).addClass("text-green"); + $(".formChart").hide(); + $("#"+str+"Chart").show( 700 ); + var str = str; + console.log("alreadyLoad",formAlreadyLoad); + if(str != "open" && formAlreadyLoad.indexOf(str) < 0){ + $.ajax({ + url : baseUrl+"/"+moduleId+"/chart/get", + type : 'POST', + data: {json : str}, + success : function(data, statut){ // success est toujours en place, bien sûr ! + /* ************************************** + * Using the dynForm + - declare a destination point + - a formDefinition + - the onLoad method + - the onSave method + ***************************************** */ + console.log(data); + surveyObj={}; + i=1; + $.each(data, function(e,form){ + sectionObject = {dynForm : form, key : e}; + surveyObj["section"+i]={}; + surveyObj["section"+i]=sectionObject; + i++; + }); + var form = $.dynSurvey({ + surveyId : "#opendata", + surveyObj : surveyObj, + surveyValues : propertiesCommons, + onLoad : function(){ + //$(".description1, .description2, .description3, .description4, .description5, .description6").focus().autogrow({vertical: true, horizontal: false}); + }, + onSave : function(params) { + //console.dir( $(params.surveyId).serializeFormJSON() ); + var result = {}; + result[str]={}; + console.log(params.surveyObj); + $.each( params.surveyObj,function(section,sectionObj) { + result[str][sectionObj.key] = {}; + console.log(sectionObj.dynForm.jsonSchema.properties); + $.each( sectionObj.dynForm.jsonSchema.properties,function(field,fieldObj) { + console.log(sectionObj.key+"."+field, $("#"+section+" #"+field).val() ); + if( fieldObj.inputType ){ + result[str][sectionObj.key][field] = {}; + result[str][sectionObj.key][field] = $("#"+section+" #"+field).val(); + } + }); + }); + console.dir( result ); + $.ajax({ + type: "POST", + url: params.savePath, + data: {properties:result, id: parentId, type: parentType}, + dataType: "json" + }).done( function(data){ + toastr.success("<?php echo Yii::t("chart",ucfirst(substr($parentType,0,-1)).'’s values well updated') ?>"); + }); + }, + collection : "commonsChart", + key : "SCSurvey", + savePath : baseUrl+"/"+moduleId+"/chart/editchart" + }); + formAlreadyLoad.push(str); + }, + error : function(data, statut, erreur){ + + } + }); + } + } + +</script> \ No newline at end of file diff --git a/views/chart/header.php b/views/chart/header.php new file mode 100644 index 0000000000000000000000000000000000000000..e46c5d5e3aab4ad9b4e4a4b6e5efefac8a848a00 --- /dev/null +++ b/views/chart/header.php @@ -0,0 +1,82 @@ +<style type="text/css"> + .headerChart .btnChart{ + font-variant: small-caps; + font-size: 20px; + } +</style> +<?php + if (@$properties["commons"] && !empty($properties["commons"])) $commonsView=true; + if (@$properties["open"] && !empty($properties["open"])) $openView=true; +?> + +<div class="col-xs-12 margin-bottom-15"> + <i class="fa fa-heartbeat fa-2x"></i><span class="Montserrat" id="name-lbl-title"> <?php echo Yii::t("chart","Values {what}",array("{what}"=>Yii::t("common", "of the ".Element::getControlerByCollection($parentType)))) ?></span> + <?php if(@$commonsView && @$openView) { ?> + <button class="btn-update-descriptions btn btn-default letter-blue pull-right edit-chart"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("chart", "Edit values") ?></b> + </button> + <?php } ?> +</div> +<div class="noteWrap col-md-12 col-sm-12 col-xs-12 bg-white"> +<div class="headerChart col-md-12 col-sm-12 col-xs-12 no-padding"> + <?php if(@$commonsView){ ?> + <div class="col-md-6"> + <a id="btncommons" href="javascript:;" onclick="switchTypeChartView('commons')" class="btnChart <?php if (@$commonsView) echo "text-green" ?>"> + <i class="fa fa-circle"></i> <?php echo Yii::t("chart","Commons") ?> + </a> + <p><?php echo Yii::t("chart","{what} that manages one or several resources openly and transparently whitout appropriating it",array("{what}"=>ucfirst(Yii::t("common",Element::getControlerByCollection($parentType))))) ?></p> + </div> + <?php } ?> + <?php if(@$openView){ ?> + <div class="col-md-6"> + <a id="btnopen" href="javascript:;" onclick="switchTypeChartView('open')" class="btnChart <?php if (!@$commonsView) echo "text-green" ?>"> + <i class="fa fa-circle"></i> <?php echo Yii::t("chart","Open") ?> + </a> + <p><?php echo Yii::t("chart","{what} that shows its values openly adding few properties and describing them",array("{what}"=>ucfirst(Yii::t("common",Element::getControlerByCollection($parentType))))) ?></p> + </div> + <?php } ?> + <?php if(!@$openView || !@$commonsView){ ?> + <div class="col-md-6"> + <a href="javascript:;" class="edit-chart btn btn-default letter-blue text-center col-md-12 margin-20" style="font-size:16px;"> + <span><i class="fa fa-pencil"></i> <?php echo Yii::t("chart","Edit chart") ?> "<?php if(@$commonsView) echo Yii::t("chart","Commons"); else echo Yii::t("chart","Open") ?>" + </span><br/> + <span><i class="fa fa-plus"></i> <?php echo Yii::t("chart","Add chart") ?> "<?php if(!@$commonsView) echo Yii::t("chart","Commons"); else echo Yii::t("chart","Open") ?>" + </span> + </a> + </div> + <?php } ?> + <hr class="col-md-12 no-padding"> +</div> +<div class="row col-md-12 col-sm-12 col-xs-12" id="chartPad"></div> +</div> +<script type="text/javascript"> +var contextType="<?php echo $parentType ?>"; +var contextId="<?php echo $parentId ?>"; +var commonsView="<?php echo @$commonsView ?>"; +var openView="<?php echo @$openView ?>"; +if(commonsView==true) + chartLoader="commons"; +else if (openView==true) + chartLoader="open"; +jQuery(document).ready(function() { + ajaxPost('#chartPad', baseUrl+'/'+moduleId+'/chart/index/type/'+contextType+'/id/'+contextId+'/chart/'+chartLoader, + null, + function(){},"html"); + $(".edit-chart").click(function(){ + history.pushState(null, "New Title", hashUrlPage+".view.editChart"); + loadEditChart(); + }); + +}); +function switchTypeChartView(str){ + //$(".btn-group i").removeClass("fa-check-circle-o"); + //$(".btn-group i").addClass("fa-circle-thin"); + $(".headerChart .btnChart").removeClass("text-green"); + $(".headerChart #btn"+str).addClass("text-green"); + var url = "chart/index/type/"+contextType+"/id/"+contextId+"/chart/"+str; + showLoader('#chartPad'); + ajaxPost('#chartPad', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); +} +</script> \ No newline at end of file diff --git a/views/chart/index.php b/views/chart/index.php new file mode 100644 index 0000000000000000000000000000000000000000..1eedc24a3521d9e94b56f748455e3c825fd1f44a --- /dev/null +++ b/views/chart/index.php @@ -0,0 +1,260 @@ +<?php +$cssAnsScriptFilesModule = array( + '/plugins/Chart.js/Chart.min.js' +); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + +$tabCommons = array( "0" => Yii::t("chart","Don't want"), + "20" => Yii::t("chart","Not applicable"), + "40" => Yii::t("chart","Want but not started"), + "60" => Yii::t("chart","Started"), + "80" => Yii::t("chart","In progress"), + "100" => Yii::t("chart","Finished") + ); +$titleChart = array( "commons" => Yii::t("chart","Chart of commons"), + "open" => Yii::t("chart", "Open chart") + ); +?> + +<style> +#myChart { + padding: 10px 10px 10px 10px; +} +#chartPad .panel-body{ + /*display: -moz-inline-box; + display: -webkit-inline-box; + display: inline-block;*/ +} +</style> + <div class="panel-body"> + <div class="col-md-6 col-sm-6 col-xs-12 pull-right margin-10 panel shadow2"> + <canvas id="myChart" width="" height=""></canvas> + </div> + <?php + $inc=0; + foreach($properties as $key => $value){ ?> + + <?php + if(gettype ($value) == "array" && $value["value"] != ""){ + if($chartKey=="commons") $valueProp=$tabCommons[@$value["value"]]; + else $valueProp= @$value["value"]; + //if($value["value"] || !empty($value["description"])){ ?> + <?php //if ($inc > 0) echo 'hide'; ?> + <div class="margin-bottom-10 descriptionLabel description<?php echo $key ?>"> + <h4 class="text-large text-dark text-bold light-text timeline_title no-margin pull-left"> + <?php echo ucfirst($key) ?> + </h4><br/> + <span class="text-red light-text timeline_title pull-left"><?php echo $valueProp ?></span> + <br/> + <span><?php echo @$value["description"]; ?></span> + </div> + <?php + $inc++; + //} + } + } + ?> + </div> + +<script type="text/javascript"> +var properties=<?php echo json_encode(@$properties); ?> ; +console.log(properties); +jQuery(document).ready(function() { + Chart.defaults.global = { + // Boolean - Whether to animate the chart + animation: true, + // Number - Number of animation steps + animationSteps: 60, + // String - Animation easing effect + animationEasing: "easeOutQuart", + // Boolean - If we should show the scale at all + showScale: true, + // Boolean - If we want to override with a hard coded scale + scaleOverride: false, + // ** Required if scaleOverride is true ** + // Number - The number of steps in a hard coded scale + scaleSteps: null, + // Number - The value jump in the hard coded scale + scaleStepWidth: null, + // Number - The scale starting value + scaleStartValue: null, + // String - Colour of the scale line + scaleLineColor: "rgba(0,0,0,.1)", + // Number - Pixel width of the scale line + scaleLineWidth: 1, + // Boolean - Whether to show labels on the scale + scaleShowLabels: true, + // Interpolated JS string - can access value + scaleLabel: "<%=value%>", + // Boolean - Whether the scale should stick to integers, not floats even if drawing space is there + scaleIntegersOnly: true, + // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value + scaleBeginAtZero: false, + // String - Scale label font declaration for the scale label + scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Scale label font size in pixels + scaleFontSize: 18, + // String - Scale label font weight style + scaleFontStyle: "normal", + // String - Scale label font colour + scaleFontColor: "#666", + // Boolean - whether or not the chart should be responsive and resize when the browser does. + responsive: true, + // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container + maintainAspectRatio: true, + // Boolean - Determines whether to draw tooltips on the canvas or not + showTooltips: true, + // Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips)) + customTooltips: false, + // Array - Array of string names to attach tooltip events + tooltipEvents: ["mousemove", "touchstart", "touchmove"], + // String - Tooltip background colour + tooltipFillColor: "rgba(0,0,0,0.8)", + // String - Tooltip label font declaration for the scale label + tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip label font size in pixels + tooltipFontSize: 14, + // String - Tooltip font weight style + tooltipFontStyle: "normal", + // String - Tooltip label font colour + tooltipFontColor: "#fff", + // String - Tooltip title font declaration for the scale label + tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip title font size in pixels + tooltipTitleFontSize: 14, + // String - Tooltip title font weight style + tooltipTitleFontStyle: "bold", + // String - Tooltip title font colour + tooltipTitleFontColor: "#fff", + // Number - pixel width of padding around tooltip text + tooltipYPadding: 6, + // Number - pixel width of padding around tooltip text + tooltipXPadding: 6, + // Number - Size of the caret on the tooltip + tooltipCaretSize: 8, + // Number - Pixel radius of the tooltip border + tooltipCornerRadius: 6, + // Number - Pixel offset from point x to tooltip edge + tooltipXOffset: 10, + // String - Template string for single tooltips + tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>", + // String - Template string for multiple tooltips + multiTooltipTemplate: "<%= value %>", + // Function - Will fire on animation progression. + onAnimationProgress: function(){}, + // Function - Will fire on animation completion. + onAnimationComplete: function(){} + } + setTimeout(function(){chartInit(properties);},2); + /*if ((countPropertiesCommons+countPropertiesOpen) > 0){ + //setTimeout(function(){ + if(typeof chartToLoad == "undefined"){ + if(countPropertiesCommons > 0) + setTimeout( function () { chartInit(propertiesCommons,"myChartCommons"); }, 3000); + + if(countPropertiesOpen > 0) + chartInit(propertiesOpen,"myChartOpen"); + if(countPropertiesCommons > 0 && countPropertiesOpen > 0){ + switcher="<select id='switchChart'>"+ + "<option class='switcherChart' value='Commons'><?php echo Yii::t("chart","Commons") ?></option>"+ + "<option class='switcherChart' value='Open'><?php echo Yii::t("chart","Open") ?></option>"+ + "</select>"; + $("#switchChart").append(switcher).show(); + $(".contentChartOpen").hide(); + $('#switchChart').change(function(){ + val=$(this).find(":selected").val(); + $(".charts").hide(); + $(".contentChart"+val).show(); + // alert( this.value ); + }); + + } + } + //}, 0); + }*/ +}); + +function updateChart(data, nbProperties){ + newCount=0; + if (countProperties==0){ + if(nbProperties!=0){ + $("#infoPodChart").addClass("hide"); + $(".contentChart").removeClass("hide"); + chartInit(data); + countProperties=nbProperties; + } + } + else{ + for (var i=0; i < countProperties; i++ ){ + myNewChart.removeData(); + } + if(nbProperties==0){ + $("#infoPodChart").removeClass("hide"); + $(".contentChart").addClass("hide"); + //$("#myChart").attr("width","0"); + //$("#myChart").attr("height","0"); + + } + else { + chartInit(data); + } + countProperties=nbProperties; + } +} +function chartInit(dataProperties){ + console.log(dataProperties); + var labelProperties=[]; + var valueProperties=[]; + for (var label in dataProperties){ + labelProperties.push(label); + valueProperties.push(dataProperties[label]["value"]); + } + var data = { + labels : labelProperties, + datasets: [ + { + label: "My First dataset", + fillColor: "rgba(220,220,220,0.2)", + strokeColor: "rgba(220,220,220,1)", + pointColor: "rgba(220,220,220,1)", + pointStrokeColor: "#fff", + pointHighlightFill: "#fff", + pointDot : false, + pointHighlightStroke: "rgba(220,220,220,1)", + data : valueProperties + }, + ] + }; + + var options; + var ctx = $("#myChart").get(0).getContext("2d"); + + // This will get the first returned node in the jQuery collection. + myNewChart = new Chart(ctx).Radar(data, options); + console.log(myNewChart); + /*document.getElementById("#myChart").onclick = function(evt){ + var activePoints = myNewChart.getPointsAtEvent(evt); + /* this is where we check if event has keys which means is not empty space + if(Object.keys(activePoints).length > 0) + { + var label = activePoints[0]["label"]; + var value = activePoints[0]["value"]; + $(".descriptionLabel").addClass("hide"); + $(".description"+label).removeClass("hide"); + //var url = "http://example.com/?label=" + label + "&value=" + value + /* process your url ... + } + };*/ +} + + +function numAttrs(obj) { + var count = 0; + for(var key in obj) { + if (obj.hasOwnProperty(key)) { + ++count; + } + } + return count; +} +</script> \ No newline at end of file diff --git a/views/chart/indexOld.php b/views/chart/indexOld.php new file mode 100755 index 0000000000000000000000000000000000000000..e36af041a3adfe4e176bf6d1e403b0e61b32e179 --- /dev/null +++ b/views/chart/indexOld.php @@ -0,0 +1,435 @@ +<?php +$cssAnsScriptFilesModule = array( + '/plugins/Chart.js/Chart.min.js' +); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + +$tabCommons = array( "0" => "Ne souhaite pas", + "20" => "Pas applicable", + "40" => "Souhait mais pas démarré", + "60" => "Démarré", + "80" => "En progression", + "100" => "Réalisé" + ); + +?> + +<style> +#myChart { + padding: 10px 10px 10px 10px; +} + +</style> + +<div class="panel panel-white"> + + <!--<div class="panel-heading border-light bg-dark"> + <h4 class="panel-title"><span><i class="fa fa-puzzle-piece"></i> <?php echo Yii::t("project","Chart",null,Yii::app()->controller->module->id) ?></span></h4> + </div>--> + <!--<div id="switchChart"> + </div>--> + <?php + if(!empty($properties)){ + if(@$properties["open"]) + $propertiesOpen=$properties["open"]; + if(@$properties["commons"]) + $propertiesCommons=$properties["commons"]; + } + ?> + <div class="panel-body no-padding contentChartCommons charts <?php if(!@$propertiesCommons) echo "hide" ?>"> + <canvas id="myChartCommons" width="" height=""></canvas> + <div class="col-md-12 col-sm-12 col-xs-12"> + <?php + if(@$propertiesCommons){ + $inc=0; + foreach($propertiesCommons as $key => $value){ ?> + + <?php + if(gettype ($value) == "array" && $value["value"] != ""){ + //if($value["value"] || !empty($value["description"])){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding descriptionLabel description<?php echo $key ?> <?php if ($inc > 0) echo 'hide'; ?>"> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <h2 class="text-large text-dark text-bold light-text timeline_title no-margin pull-left"> + <?php echo ucfirst($key) ?> + </h2> + </div><br/> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"><span class="text-red light-text timeline_title pull-left"><?php echo $tabCommons[@$value["value"]]; ?></span></div><br/> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <span><?php echo @$value["description"]; ?></span></div> + </div> + <?php + $inc++; + //} + } + } + } + ?> + </div> + </div> + <div class="panel-body no-padding contentChartOpen charts <?php if(!@$propertiesOpen) echo "hide" ?>"> + <div class="col-md-12"> + <canvas id="myChartOpen" width="" height=""></canvas> + </div> + <div class="col-md-12 col-sm-12 col-xs-12"> + <?php + if(@$propertiesOpen){ + $inc=0; + foreach($propertiesOpen as $key => $value){ ?> + + <?php + if(gettype ($value) == "array" && $value["value"] != ""){ + //if($value["value"] || !empty($value["description"])){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding descriptionLabel description<?php echo $key ?> <?php if ($inc > 0) echo 'hide'; ?>"> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <h2 class="text-large text-dark text-bold light-text timeline_title no-margin pull-left"> + <?php echo ucfirst($key) ?> + </h2> + </div><br/> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"><span class="text-red light-text timeline_title pull-left"><?php echo @$value["value"]; ?></span></div><br/> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <span><?php echo @$value["description"]; ?></span></div> + </div> + <?php + $inc++; + //} + } + } + } + ?> + </div> + </div> +</div> + +<script type="text/javascript"> +var propertiesCommons=<?php echo json_encode(@$propertiesCommons); ?> ; +var propertiesOpen=<?php echo json_encode(@$propertiesOpen); ?> ; +console.log(propertiesCommons); +var countPropertiesCommons=numAttrs(propertiesCommons); +var countPropertiesOpen=numAttrs(propertiesOpen); +jQuery(document).ready(function() { + Chart.defaults.global = { + // Boolean - Whether to animate the chart + animation: true, + // Number - Number of animation steps + animationSteps: 60, + // String - Animation easing effect + animationEasing: "easeOutQuart", + // Boolean - If we should show the scale at all + showScale: true, + // Boolean - If we want to override with a hard coded scale + scaleOverride: false, + // ** Required if scaleOverride is true ** + // Number - The number of steps in a hard coded scale + scaleSteps: null, + // Number - The value jump in the hard coded scale + scaleStepWidth: null, + // Number - The scale starting value + scaleStartValue: null, + // String - Colour of the scale line + scaleLineColor: "rgba(0,0,0,.1)", + // Number - Pixel width of the scale line + scaleLineWidth: 1, + // Boolean - Whether to show labels on the scale + scaleShowLabels: true, + // Interpolated JS string - can access value + scaleLabel: "<%=value%>", + // Boolean - Whether the scale should stick to integers, not floats even if drawing space is there + scaleIntegersOnly: true, + // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value + scaleBeginAtZero: false, + // String - Scale label font declaration for the scale label + scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Scale label font size in pixels + scaleFontSize: 18, + // String - Scale label font weight style + scaleFontStyle: "normal", + // String - Scale label font colour + scaleFontColor: "#666", + // Boolean - whether or not the chart should be responsive and resize when the browser does. + responsive: true, + // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container + maintainAspectRatio: true, + // Boolean - Determines whether to draw tooltips on the canvas or not + showTooltips: true, + // Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips)) + customTooltips: false, + // Array - Array of string names to attach tooltip events + tooltipEvents: ["mousemove", "touchstart", "touchmove"], + // String - Tooltip background colour + tooltipFillColor: "rgba(0,0,0,0.8)", + // String - Tooltip label font declaration for the scale label + tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip label font size in pixels + tooltipFontSize: 14, + // String - Tooltip font weight style + tooltipFontStyle: "normal", + // String - Tooltip label font colour + tooltipFontColor: "#fff", + // String - Tooltip title font declaration for the scale label + tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip title font size in pixels + tooltipTitleFontSize: 14, + // String - Tooltip title font weight style + tooltipTitleFontStyle: "bold", + // String - Tooltip title font colour + tooltipTitleFontColor: "#fff", + // Number - pixel width of padding around tooltip text + tooltipYPadding: 6, + // Number - pixel width of padding around tooltip text + tooltipXPadding: 6, + // Number - Size of the caret on the tooltip + tooltipCaretSize: 8, + // Number - Pixel radius of the tooltip border + tooltipCornerRadius: 6, + // Number - Pixel offset from point x to tooltip edge + tooltipXOffset: 10, + // String - Template string for single tooltips + tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>", + // String - Template string for multiple tooltips + multiTooltipTemplate: "<%= value %>", + // Function - Will fire on animation progression. + onAnimationProgress: function(){}, + // Function - Will fire on animation completion. + onAnimationComplete: function(){} + } + if ((countPropertiesCommons+countPropertiesOpen) > 0){ + //setTimeout(function(){ + if(typeof chartToLoad == "undefined"){ + if(countPropertiesCommons > 0) + setTimeout( function () { chartInit(propertiesCommons,"myChartCommons"); }, 3000); + + if(countPropertiesOpen > 0) + chartInit(propertiesOpen,"myChartOpen"); + if(countPropertiesCommons > 0 && countPropertiesOpen > 0){ + switcher="<select id='switchChart'>"+ + "<option class='switcherChart' value='Commons'><?php echo Yii::t("chart","Commons") ?></option>"+ + "<option class='switcherChart' value='Open'><?php echo Yii::t("chart","Open") ?></option>"+ + "</select>"; + $("#switchChart").append(switcher).show(); + $(".contentChartOpen").hide(); + $('#switchChart').change(function(){ + val=$(this).find(":selected").val(); + $(".charts").hide(); + $(".contentChart"+val).show(); + // alert( this.value ); + }); + + } + } + //}, 0); + } +}); + +function updateChart(data, nbProperties){ + newCount=0; + if (countProperties==0){ + if(nbProperties!=0){ + $("#infoPodChart").addClass("hide"); + $(".contentChart").removeClass("hide"); + chartInit(data); + countProperties=nbProperties; + } + } + else{ + for (var i=0; i < countProperties; i++ ){ + myNewChart.removeData(); + } + if(nbProperties==0){ + $("#infoPodChart").removeClass("hide"); + $(".contentChart").addClass("hide"); + //$("#myChart").attr("width","0"); + //$("#myChart").attr("height","0"); + + } + else { + chartInit(data); + } + countProperties=nbProperties; + } +} + +function chartInit(dataProperties){ + console.log(dataProperties); + var labelProperties=[]; + var valueProperties=[]; + for (var label in dataProperties){ + labelProperties.push(label); + valueProperties.push(dataProperties[label]["value"]); + } + console.log(labelProperties); + console.log(valueProperties); + /*Chart.defaults.global = { + // Boolean - Whether to animate the chart + animation: true, + // Number - Number of animation steps + animationSteps: 60, + // String - Animation easing effect + animationEasing: "easeOutQuart", + // Boolean - If we should show the scale at all + showScale: true, + // Boolean - If we want to override with a hard coded scale + scaleOverride: false, + // ** Required if scaleOverride is true ** + // Number - The number of steps in a hard coded scale + scaleSteps: null, + // Number - The value jump in the hard coded scale + scaleStepWidth: null, + // Number - The scale starting value + scaleStartValue: null, + // String - Colour of the scale line + scaleLineColor: "rgba(0,0,0,.1)", + // Number - Pixel width of the scale line + scaleLineWidth: 1, + // Boolean - Whether to show labels on the scale + scaleShowLabels: true, + // Interpolated JS string - can access value + scaleLabel: "<%=value%>", + // Boolean - Whether the scale should stick to integers, not floats even if drawing space is there + scaleIntegersOnly: true, + // Boolean - Whether the scale should start at zero, or an order of magnitude down from the lowest value + scaleBeginAtZero: false, + // String - Scale label font declaration for the scale label + scaleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Scale label font size in pixels + scaleFontSize: 18, + // String - Scale label font weight style + scaleFontStyle: "normal", + // String - Scale label font colour + scaleFontColor: "#666", + // Boolean - whether or not the chart should be responsive and resize when the browser does. + responsive: true, + // Boolean - whether to maintain the starting aspect ratio or not when responsive, if set to false, will take up entire container + maintainAspectRatio: true, + // Boolean - Determines whether to draw tooltips on the canvas or not + showTooltips: true, + // Function - Determines whether to execute the customTooltips function instead of drawing the built in tooltips (See [Advanced - External Tooltips](#advanced-usage-custom-tooltips)) + customTooltips: false, + // Array - Array of string names to attach tooltip events + tooltipEvents: ["mousemove", "touchstart", "touchmove"], + // String - Tooltip background colour + tooltipFillColor: "rgba(0,0,0,0.8)", + // String - Tooltip label font declaration for the scale label + tooltipFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip label font size in pixels + tooltipFontSize: 14, + // String - Tooltip font weight style + tooltipFontStyle: "normal", + // String - Tooltip label font colour + tooltipFontColor: "#fff", + // String - Tooltip title font declaration for the scale label + tooltipTitleFontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif", + // Number - Tooltip title font size in pixels + tooltipTitleFontSize: 14, + // String - Tooltip title font weight style + tooltipTitleFontStyle: "bold", + // String - Tooltip title font colour + tooltipTitleFontColor: "#fff", + // Number - pixel width of padding around tooltip text + tooltipYPadding: 6, + // Number - pixel width of padding around tooltip text + tooltipXPadding: 6, + // Number - Size of the caret on the tooltip + tooltipCaretSize: 8, + // Number - Pixel radius of the tooltip border + tooltipCornerRadius: 6, + // Number - Pixel offset from point x to tooltip edge + tooltipXOffset: 10, + // String - Template string for single tooltips + tooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>", + // String - Template string for multiple tooltips + multiTooltipTemplate: "<%= value %>", + // Function - Will fire on animation progression. + onAnimationProgress: function(){}, + // Function - Will fire on animation completion. + onAnimationComplete: function(){} +}*/ +var data = { + labels : labelProperties, + datasets: [ + { + label: "My First dataset", + fillColor: "rgba(220,220,220,0.2)", + strokeColor: "rgba(220,220,220,1)", + pointColor: "rgba(220,220,220,1)", + pointStrokeColor: "#fff", + pointHighlightFill: "#fff", + pointDot : false, + pointHighlightStroke: "rgba(220,220,220,1)", + data : valueProperties + }, + ] +}; + +var options; +var ctx = $("#"+id).get(0).getContext("2d"); + +// This will get the first returned node in the jQuery collection. +if(id=="myChartOpen"){ +myNewChart = new Chart(ctx).Radar(data, options); +console.log(myNewChart); +document.getElementById(id).onclick = function(evt){ + var activePoints = myNewChart.getPointsAtEvent(evt); + /* this is where we check if event has keys which means is not empty space */ + if(Object.keys(activePoints).length > 0) + { + var label = activePoints[0]["label"]; + var value = activePoints[0]["value"]; + $(".descriptionLabel").addClass("hide"); + $(".description"+label).removeClass("hide"); + //var url = "http://example.com/?label=" + label + "&value=" + value + /* process your url ... */ + } +}; +}else{ +myNewChartCommons = new Chart(ctx).Radar(data, options); +console.log(myNewChartCommons); +document.getElementById(id).onclick = function(evt){ + var activePoints = myNewChartCommons.getPointsAtEvent(evt); + /* this is where we check if event has keys which means is not empty space */ + if(Object.keys(activePoints).length > 0) + { + var label = activePoints[0]["label"]; + var value = activePoints[0]["value"]; + $(".descriptionLabel").addClass("hide"); + $(".description"+label).removeClass("hide"); + //var url = "http://example.com/?label=" + label + "&value=" + value + /* process your url ... */ + } +}; +} + ///////////// LAST ON DEVELOPMENT ////////////// + /*var data = { + labels : labelProperties, + datasets: [ + { + label: "My First dataset", + fillColor: "rgba(220,220,220,0.2)", + strokeColor: "rgba(220,220,220,1)", + pointColor: "rgba(220,220,220,1)", + pointStrokeColor: "#fff", + pointHighlightFill: "#fff", + pointDot : false, + pointHighlightStroke: "rgba(220,220,220,1)", + data : valueProperties + }, + ] + }; + + var options; + var ctx = $("#myChart").get(0).getContext("2d"); + + // This will get the first returned node in the jQuery collection. + myNewChart = new Chart(ctx).Radar(data, options); + console.log(myNewChart);*/ +} + +function numAttrs(obj) { + var count = 0; + for(var key in obj) { + if (obj.hasOwnProperty(key)) { + ++count; + } + } + return count; +} +</script> \ No newline at end of file diff --git a/views/chart/json/commons.json b/views/chart/json/commons.json new file mode 100755 index 0000000000000000000000000000000000000000..f1eedbc1439212f398aec6b9f91b5438899c222d --- /dev/null +++ b/views/chart/json/commons.json @@ -0,0 +1,170 @@ +{ + "partage" : { + "jsonSchema" : { + "title" : "Partage", + "type" : "object", + "properties" : { + "separator1":{ + "title":" Quels sont les communs proches ou similaires ? Ont il été contactés pour essayer de mutualiser avec eux ? Comment le commun est travaillé pour favoriser sa réplication, sa diffusion ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description1" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + }, + "gouvernance" : { + "jsonSchema" : { + "title" : "Gouvernance", + "type" : "object", + "properties" : { + "separator1":{ + "title":"Comment est pensée la gouvernance pour permettre à tous de s'approprier le commun sans pour autant réduire l'initiative individuelle ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description2" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + }, + "partenaires" : { + "jsonSchema" : { + "title" : "Partenaires", + "type" : "object", + "properties" : { + "separator1":{ + "title":"Quelle manière le commun a t'il de nouer des partenariats avec des acteurs privés et publics ? Quelles approches utilisées ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description3" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + }, + "juridique" : { + "jsonSchema" : { + "title" : "Juridique", + "type" : "object", + "properties" : { + "separator1":{ + "title":"Quels choix juridique pour protéger le caractère commun du projet ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description4" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + }, + "finance": { + "jsonSchema" : { + "title" : "Financement", + "type" : "object", + "properties" : { + "separator1":{ + "title":"Quelle logique de financement par les usagers et partenaires ainsi que de redistribution financière dans le commun ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description5" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + }, + "contribution" : { + "jsonSchema" : { + "title" : "Contribution", + "type" : "object", + "properties" : { + "separator1":{ + "title":"Comment le projet permet il la contribution à tous et sur le long terme ? Quels moyens pour rendre visibles les actions ?" + }, + "description" : { + "inputType" : "textarea", + "placeholder" : "Description", + "class" : "description6" + }, + "value" : { + "inputType" : "select", + "placeholder" : "---- Select a value ----", + "options":{ + "0":"Ne souhaite pas", + "20":"Pas applicable", + "40":"Souhait mais pas démarré", + "60":"Démarré", + "80":"En progression", + "100":"Réalisé" + } + } + } + } + } +} \ No newline at end of file diff --git a/views/city/detail.php b/views/city/detail.php new file mode 100755 index 0000000000000000000000000000000000000000..2f428a3ec66deae902b87d4f43fc338e7640cf35 --- /dev/null +++ b/views/city/detail.php @@ -0,0 +1,754 @@ + <div class="cityHeadSection"></div> + <?php + +Menu::city($city, $cityGlobal); +$this->renderPartial('../default/panels/toolbar'); + + $cssAnsScriptFilesModule = array( + '/assets/css/city/detail.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); +?> + + +<?php + //rajoute un attribut typeSig sur chaque donnée pour déterminer quel icon on doit utiliser sur la carte + //et pour ouvrir le panel info correctement + foreach($people as $key => $data) { $people[$key]["typeSig"] = PHType::TYPE_CITOYEN; } + foreach($organizations as $key => $data) { $organizations[$key]["typeSig"] = PHType::TYPE_ORGANIZATIONS; } + foreach($events as $key => $data) { $events[$key]["typeSig"] = PHType::TYPE_EVENTS; } + foreach($projects as $key => $data) { $projects[$key]["typeSig"] = PHType::TYPE_PROJECTS; } + + $contextMap = array(); + if(isset($organizations)) $contextMap = array_merge($contextMap, $organizations); + if(isset($people)) $contextMap = array_merge($contextMap, $people); + if(isset($events)) $contextMap = array_merge($contextMap, $events); + if(isset($projects)) $contextMap = array_merge($contextMap, $projects); + + $randomOrganization = findOrgaRandImg($organizations, 1); + function findOrgaRandImg($organizations, $try){ + $rand = rand(0, sizeof($organizations)-1); + if(isset($organizations[$rand]) && isset($organizations[$rand]["profilImageUrl"]) + && $organizations[$rand]["profilImageUrl"] != "" || $try>50){ + //error_log("try : " .$try); + return isset($organizations[$rand]) ? $organizations[$rand] : null; + }else{ + return findOrgaRandImg($organizations, $try+1); + } + } + + + $minCount = count($people); + if(count($organizations) < $minCount) $minCount = count($organizations); + if(count($projects) < $minCount) $minCount = count($projects); + $minCount =100; + $minCountOrga = $minCount; + + $countTotal = count($people) + count($organizations) + count($events); +?> + +<style type="text/css"> + + .cityHeadSection { + background-image:url(<?php echo $this->module->assetsUrl; ?>/images/city/cityDefaultHead_BW.jpg); + /*background-image: url(/ph/assets/449afa38/images/city/cityDefaultHead_BW.jpg);*/ + background-color: #fff; + background-repeat: no-repeat; + background-position: 0px 0px; + background-size: 100% auto; + } + .bborder{ + border-bottom: 1px solid #ccc; + } + .scope-global-community{ + display: none; + } + + .town { + font-size:12px; + color: #3c5665; + } + + .cityGlobal { + font-size:16px; + color: #3c5665; + } + + .cityGlobal:hover { + color: #2bb0c6; + } + + .header-home{ + display:none; + } + + #pod-local-actors .text-extra-large{ + font-size:15px; + } + +</style> +<!-- start: PAGE CONTENT --> +<div class="row padding-20" id="cityDetail"> + + <?php if(false){ //if(!isset(Yii::app()->session["userId"]) ){ // ?> + <!-- <h1 class="homestead text-dark center you-live">Vous habitez ici ? <?php //echo $city["name"]; ?></h1> --> + <a href="javascript:;" class="btn homestead text-red no-margin tooltips" + ctry-com="<?php echo $city['country']; ?>" + insee-com="<?php echo $city['insee']; ?>" + name-com="<?php echo $city['name']; ?>" + cp-com="<?php if(@$city['cp']) echo $city['cp']; ?>" + id="btn-communecter" onclick="setScopeValue($(this));" + data-toggle="tooltip" data-placement="bottom" + > + <i class="fa fa-crosshairs"></i> COMMUNECTER + </a> + <?php } ?> + <div class="col-xs-12 col-md-12" style="margin-bottom:-10px;"> + + <h1 class="homestead text-red text-center cityName-header"> + <span class="margin-bottom-10" style=""> + <a href="javascript:getWiki('<?php echo @$city["wikidataID"]; ?>')" class="pull-right"> + <img width=50 src="<?php echo $this->module->assetsUrl; ?>/images/logos/Wikipedia-logo-en-big.png"> + </a> + <i class="fa fa-university"></i><br> + <?php if($cityGlobal == false) echo $city["cp"]; ?> + <?php + if($cityGlobal == true) + echo $city["name"]; + else{ + echo $city["namePc"]; + if(count($city["postalCodes"]) > 1 ){ + ?> + <div class="town"> + <?php echo Yii::t("common", "Access to all common information of") ; ?> + <a href="#city.detail.insee.<?php echo $city['insee']; ?>" class="lbh cityGlobal"> + <?php echo $city["name"]; ?> + </a> + + </div> + <?php } + } ?> + </span> + + <div id="div-discover" class="col-md-12 col-sm-12 col-lg-12 col-xs-12"> + <!-- <div class="panel panel-white padding-10"> + <div id="local-actors-popup-sig"> + <div class="panel-heading text-center border-light"> + <h3 class="panel-title text-blue"> <i class="fa fa-search"></i> Découvrir - Participer</h3> + </div> + <div class="panel-body no-padding "> --> + + <div class="col-md-12 no-padding" style="margin-top:20px"> + <?php + $lockCityKey = ($cityGlobal == true) ? $city["country"].'_'.$city["insee"] : City::getUnikey($city) ; + + ?> + + <div class="col-xs-3 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#default.agenda?lockCityKey=<?php echo $lockCityKey; ?>" class="lbh btn btn-discover bg-orange"> + <i class="fa fa-calendar"></i> + </a> + <?php $cnt= (isset($events)) ? count($events): 0; ?> + <span class="badge nb-localactors bg-orange"><?php echo $cnt; ?></span> + <br> + <span class="text-orange discover-subtitle"> + Agenda + <?php //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> + </span> + </div> + + <div class="col-xs-4 col-sm-2 col-md-2 center no-padding" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#default.directory?type=projects&lockCityKey=<?php echo $lockCityKey; ?>" " class="lbh btn btn-discover bg-purple"> + <i class="fa fa-lightbulb-o"></i> + </a> + <?php $cnt= (isset($projects)) ? count($projects): 0; ?> + <span class="badge nb-localactors bg-purple"><?php echo $cnt; ?></span> + <!-- <br/>Rechercher des --> + <br/> + <span class="text-purple discover-subtitle homestead"> + <?php echo Yii::t("common", "LOCAL PROJECTS") ; + //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> + </span> + </div> + + <div class="col-xs-4 col-sm-2 col-md-2 center no-padding" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#default.directory?type=persons&lockCityKey=<?php echo $lockCityKey; ?>" class="lbh btn btn-discover bg-yellow"> + <i class="fa fa-user"></i> + </a> + <?php $cnt= (isset($people)) ? count($people): 0; ?> + <span class="badge nb-localactors bg-yellow"><?php echo $cnt; ?></span> + <!-- <br/>Rechercher des --> + <br/> + <span class="text-yellow discover-subtitle homestead"> + + <?php echo Yii::t("common", "LOCAL CONNECTED CITIZENS") ; + //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> + </span> + </div> + + <div class="col-xs-4 col-sm-2 col-md-2 center no-padding" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#default.directory?type=organizations&lockCityKey=<?php echo $lockCityKey; ?>" " class="lbh btn btn-discover bg-green"> + <i class="fa fa-group"></i> + </a> + <?php $cnt= (isset($organizations)) ? count($organizations): 0; ?> + <span class="badge nb-localactors bg-green"><?php echo $cnt; ?></span> + <!-- <br/>Rechercher des --> + <br/> + <span class="text-green discover-subtitle homestead"> + <?php echo Yii::t("common", "ORGANIZATIONS") ; + //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> + </span> + </div> + + <div class="col-xs-6 col-sm-3 col-md-3 center no-padding visible-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#default.agenda?lockCityKey=<?php echo $lockCityKey; ?>" class="lbh btn btn-discover bg-orange"> + <i class="fa fa-calendar"></i> + </a><br/> + <span class="text-orange discover-subtitle"> + Agenda + <?php //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> + </span> + </div> + + <!-- <div class="col-xs-3 center text-azure" style="margin-bottom:10px; font-size:20px; font-weight: 300;"> + <a href="#default.news?city=<?php echo City::getUnikey($city); ?>" class="lbh btn btn-discover bg-azure"> + <i class="fa fa-rss"></i> + </a><br/>L'actualité<br/><span class="text-red discover-subtitle">commune<span class="text-dark">ctée</span></span> + </div> --> + <?php if($cityGlobal != true){ ?> + <div class="col-xs-6 col-sm-3 col-md-3 center text-red no-padding" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a href="#rooms.index.type.cities.id.<?php echo City::getUnikey($city); ?>" class="lbh btn btn-discover bg-red"> + <i class="fa fa-group"></i> + </a> + <br/> + <span class='text-red discover-subtitle'>Conseil citoyen + <!-- <br><?php //echo ($cityGlobal == true) ? $city["name"] : $city["namePc"] ?> --> + </span> + </div> + <?php }else{?> + <div class="col-xs-6 col-sm-3 col-md-3 center text-red no-padding" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <label class="btn btn-discover bg-red"><i class="fa fa-group"></i></label> + <br/><span class='text-red discover-subtitle'>Conseil citoyen<br/> + <select id="selectRoom" class="text-red"> + <option value="">Choisir</option> + <?php + foreach ($city["postalCodes"] as $key => $value) { + $cityUniKey = array("country" => $city["country"], + "insee" => $city["insee"], + "cp" => $value["postalCode"]); + echo '<option value="#rooms.index.type.cities.id.'.City::getUnikey($cityUniKey).'">'.$value["name"].' ('. $value["postalCode"].')</option>'; + } + ?> + </select> + </span> + </div> + <?php } ?> + + <?php /* + <div class="col-xs-6 center text-dark" style="margin-bottom:10px; font-size:20px; font-weight: 300;"> + <strong>Le conseil citoyen</strong> est un lieu de discussion, de débat, de décision + </div> + <div class="col-xs-6 center text-dark" style="margin-bottom:10px; font-size:20px; font-weight: 300;"> + <strong>Tout le monde</strong> peut participer ! + </div> + */?> + </div> + <div class="space20"></div> + <a href="javascript:dyFObj.openForm(zonesDynForm)" class="btn btn-default">Zones</a> + <a href="javascript:cityFinderObj.finder('city','<?php echo $city["name"];?>')" class="btn btn-default">Filiaires locales</a> <a href="javascript:cityFinderObj.finder('departement','<?php echo @$city["depName"];?>')" class="btn btn-default">Filiaires département</a> <a href="javascript:cityFinderObj.finder('region','<?php echo @$city["regionName"];?>')" class="btn btn-default">Filiaires région</a> + <!-- </div> + </div> + + </div> --> + </div> + </h1> + + </div> + + <div id="pod-local-actors" class="col-lg-4 col-md-4 col-sm-4 col-xs-12 hidden"> + <div class="panel panel-white padding-10"> + <div id="local-actors-popup-sig"> + <div class="panel-heading text-center border-light"> + <h3 class="panel-title text-blue"><i class="fa fa-connectdevelop"></i> <?php echo strtolower (Yii::t("common", "LOCAL ACTORS")); ?></h3> + <!-- <div class="panel-tools" style="display:block"> </div> --> + </div> + <div class="panel-body "> + + <?php + $baseUrlPc = ($cityGlobal == false)?".postalCode.".$city["cp"]:"" ; + $baseUrlDirectory = "#city.directory.insee.".$city["insee"].$baseUrlPc.".tpl.directory2.type" ; + ?> + + <a href="<?php echo $baseUrlDirectory; ?>.citoyens" + class="lbh text-yellow homestead col-xs-12 text-extra-large padding-5 bborder"'> + <i class="fa fa-user"></i> + <?php $cnt= (isset($people)) ? count($people): 0; ?> + <?php echo strtolower (Yii::t("common", "LOCAL CONNECTED CITIZENS")); ?> + <span class="badge bg-yellow pull-right helvetica"><?php echo $cnt;?></span> + </a> + <a href="#city.directory.insee.<?php echo $city["insee"]; ?>.postalCode.<?php echo $city["cp"]; ?>.tpl.directory2.type.projects" class="lbh text-purple homestead col-xs-12 text-extra-large padding-5 bborder"'> + <i class="fa fa-lightbulb-o"></i> <?php echo strtolower (Yii::t("common", "LOCAL PROJECTS")); ?> + <?php $cnt= (isset($projects)) ? count($projects): 0; ?> + <span class="badge bg-purple pull-right helvetica"><?php echo $cnt;?></span> + </a> + <?php //echo Yii::t('common','Search a projects of your city.');?> + + <a href="#city.directory.insee.<?php echo $city["insee"]; ?>.postalCode.<?php echo $city["cp"]; ?>.tpl.directory2.type.events" + class="lbh text-orange homestead col-xs-12 text-extra-large padding-5 bborder"'> + <i class="fa fa-calendar"></i> <?php echo strtolower (Yii::t("common", "LOCAL EVENTS")); ?> + <span class="badge bg-orange pull-right helvetica"><?php echo count($events);?></span> + </a> + + + <a href="#city.directory.insee.<?php echo $city["insee"]; ?>.postalCode.<?php echo $city["cp"]; ?>.tpl.directory2.type.organizations" + class="lbh text-green homestead col-xs-12 text-extra-large padding-5 bborder"'> + <i class="fa fa-users"></i> <?php echo strtolower (Yii::t("common", "ORGANIZATIONS")); ?> + <?php $cnt=0;foreach($organizations as $orga){/*if($orga["type"]==Organization::TYPE_NGO )*/$cnt++;} ?> + <span class="badge bg-green pull-right helvetica"><?php echo $cnt;?></span> + </a> + + <?php /* + <div class="text-prune" onclick='urlCtrl.loadByHash("#city.directory?tpl=directory2&type=organizations&insee=<?php echo $city["insee"]; ?>");'> + <i class="fa fa-male"></i><i class="fa fa-male"></i><i class="fa fa-male"></i><?php echo strtolower (Yii::t("common", "GROUPES")); ?> + <?php $cnt=0;foreach($organizations as $orga){if($orga["type"]==Organization::TYPE_GROUP )$cnt++;} ?> + <span class="badge bg-prune"><?php echo $cnt;?></span> + </div> + + <div class="text-azure" onclick='urlCtrl.loadByHash("#city.directory?tpl=directory2&type=organizations&insee=<?php echo $city["insee"]; ?>");'> + <i class="fa fa-industry"></i> <?php echo strtolower (Yii::t("common", "ENTREPRISES")); ?> + <?php $cnt=0;foreach($organizations as $orga){ if($orga["type"] == Organization::TYPE_BUSINESS )$cnt++; } ?> + <span class="badge bg-azure"><?php echo $cnt;?></span> + </div> + */ ?> + + </div> + </div> + + </div> + </div> + + + +</div> + +<div class="col-xs-12"> + <?php $this->renderPartial('../default/live', array("lockCityKey" => City::getUnikey($city))); ?> +</div> + + +<!-- end: PAGE CONTENT--> + +<script type="text/javascript" > + +var zones = <?php echo json_encode($zones) ?>; +var postalCodesDynForm = <?php echo json_encode($postalCodes) ?>; +mylog.log("zones"); +mylog.dir(zones); + +mylog.log("postalCodesDynForm"); +mylog.dir(postalCodesDynForm); + +var currentCityZones = []; +var currentCityPC = []; + +var zonesDynForm = { + dynForm : { + jsonSchema : { + title : "Zones", + icon : "question-cirecle-o", + noSubmitBtns : true, + properties : { + custom :{ + inputType : "custom", + html : function() { + return "<div class='menuSmallMenu'><h1>Code postaux</h1>"+js_templates.loop( currentCityPC, "linkList", { classes : "bg-red kickerBtn", parentClass : "col-xs-12 col-sm-4 "} )+"<h1>Quartiers</h1>"+js_templates.loop( currentCityZones, "linkList", { classes : "bg-red kickerBtn", parentClass : "col-xs-12 col-sm-4 "} )+"</div>"; + } + } + } + } + } + } + +//var contextMap = {}; +contextMap = <?php echo json_encode($contextMap) ?>; +categs = <?php echo json_encode(OpenData::$categ) ?>; + +var city = <?php echo json_encode($city) ?>; +//var cityKey = "<?php //echo City::getUnikey($city) ?>"; +var images = <?php echo json_encode($images) ?>; +var contentKeyBase = "<?php echo $contentKeyBase ?>"; +var events = <?php echo json_encode($events) ?>; +var liveScopeType = "global"; +initCurrentCityZones(); +jQuery(document).ready(function() { + + $(".main-col-search").addClass("cityHeadSection"); + + + var iconCity = "<i class='fa fa-university'></i>"; + var mine = (city["insee"] == inseeCommunexion && city["cp"] == cpCommunexion) ? " MA" : ""; + var mineCity = (city["insee"] == inseeCommunexion && city["cp"] == cpCommunexion) ? true : false; + + <?php if( @$city["communected"] ){ ?> + iconCity = "<span class='fa-stack'>"+ + "<i class='fa fa-university fa-stack-1x'></i>"+ + "<i class='fa fa-circle-thin fa-stack-2x' style='color:#93C020'></i>"+ + "</span>"; + <?php } ?> + + setTitle(mine + " COMMUNE : <?php echo $city["name"] ?>",iconCity); + + //si on est sur la page de MA commune, on change le texte du bouton "communecter" + if(mineCity){ + $("#btn-communecter").html("<i class='fa fa-check'></i> COMMUNECTÉ"); + $("#btn-communecter").tooltip({ + title: 'Vous êtes communecté à cette commune.' + }); + $("#btn-communecter").attr("onclick", ""); + } + + setTimeout(function(){ + Sig.showMapElements(Sig.map, contextMap); + }, 4000); + + //initCityMap(); +/* $('.pulsate').pulsate({ + color: '#2A3945', // set the color of the pulse + reach: 10, // how far the pulse goes in px + speed: 1000, // how long one pulse takes in ms + pause: 200, // how long the pause between pulses is in ms + glow: false, // if the glow should be shown too + repeat: 10, // will repeat forever if true, if given a number will repeat for that many times + onHover: false // if true only pulsate if user hovers over the element + }); + */ + getAjax(".shareAgendaPod", baseUrl+"/"+moduleId+"/pod/slideragenda/id/<?php echo $_GET["insee"]?>/type/<?php echo City::COLLECTION ?>", function(){ + //initAddEventBtn (); + }, "html"); + getAjax(".votingPod", baseUrl+"/"+moduleId+"/survey/index/type/<?php echo City::COLLECTION ?>/id/<?php echo $_GET["insee"]?>?tpl=indexPod", function(){ + //initAddEventBtn (); + }, "html"); + + var lastValue=0; + $(window).on("scroll", function(e) { + var scroller_anchor = $("#pod-local-actors").offset().top; + scroller_anchor += $("#pod-local-actors").height(); + topScroll=$(this).scrollTop(); + mylog.log(window.scrollY+" // "+lastValue ); + + if (topScroll > (scroller_anchor-100)) { + $("#pod-local-actors").css("margin-bottom","550px"); + //$("#cityDetail").fadeOut(); + $("#newsHistory").addClass("fixedTop").children().addClass("col-md-12"); + $(".timeline-scrubber").addClass("fixScrubber"); + lastValue=window.scrollY; + //$(window).off('scroll'); + } + if (window.scrollY < lastValue-1) { + lastValue=0; + //$("#cityDetail").fadeIn(); + // $(window).on('scroll'); + $("#pod-local-actors").css("margin-bottom","0px"); + $(".timeline-scrubber").removeClass("fixScrubber"); + $("#newsHistory").removeClass("fixedTop").children().removeClass("col-md-12"); + } + }); + + + $('#selectRoom').change(function(){ + if($('#selectRoom').val() != "") + urlCtrl.loadByHash($('#selectRoom').val()); + + }); + + // $("#podCooparativeSpace").html("<i class='fa fa-spin fa-refresh text-azure'></i>"); + // var id = "<?php echo $city['country']."_".$city['insee']."-".$city['cp']; ?>"; + // getAjax('#podCooparativeSpace',baseUrl+'/'+moduleId+"/rooms/index/type/cities/id/"+id+"/view/pod", + // function(){}, "html"); + + + //getAjax(".photoVideoPod", baseUrl+"/"+moduleId+"/pod/photovideo/insee/<?php echo $_GET["insee"]?>/type/<?php echo City::COLLECTION ?>", function(){bindPhotoSubview();}, "html"); + + //getAjax(".statisticPop", baseUrl+"/"+moduleId+"/city/statisticpopulation/insee/<?php echo $_GET["insee"]?>", function(){bindBtnAction();}, "html") + +}); + + +function communecter(){ //toastr.info('TODO : redirect to form register || OR || slide to form register'); + + var cp = "<?php if(@$city['cp']) echo $city['cp']; ?>"; + $(".form-register #cp").val(cp); + + // $('.box-register').show().addClass("animated bounceInLeft").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + // $(this).show().removeClass("animated bounceInLeft"); + + // }); + + // $(".main-col-search").animate({ top: -1500, opacity:0 }, 800 ); + + // $(".box-ajax").hide(400); + showPanel("box-register"); + activePanel = "box-register"; + +} + +var markerCity; +function initCityMap(){ + + Sig.restartMap(); + Sig.map.setZoom(2, {animate:false}); + + mylog.log("city"); + mylog.dir(city.geo); + + Sig.showMapElements(Sig.map, contextMap); + var latlng = [parseFloat(city.geo.latitude)+0.0003, parseFloat(city.geo.longitude)+0.0003]; + mylog.dir(latlng); + + var content = Sig.getPopupSimpleCity(city); + var properties = { id : "0", + icon : Sig.getIcoMarkerMap({"type" : "city"}), + zIndexOffset: 100001, + content: content }; + + markerCity = Sig.getMarkerSingle(Sig.map, properties, latlng); + Sig.allowMouseoverMaker = false; + + markerCity.openPopup(); + + Sig.map.setView(latlng, 13, {animate:false}); + Sig.map.panBy([0, -150]); + //Sig.centerSimple(latlng, 13); + Sig.currentMarkerPopupOpen = markerCity; + mylog.log("geoShape"); + mylog.dir(city["geoShape"]); + if(typeof city["geoShape"] != "undefined"){ + var geoShape = Sig.inversePolygon(city["geoShape"]["coordinates"][0]); + Sig.showPolygon(geoShape); + Sig.map.setZoom(20, {animate:false}); + Sig.map.fitBounds(geoShape); + + } + + $("#btn-center-city").click(function(){ + Sig.currentMarkerPopupOpen = markerCity; + //markerCity.openPopup(); + showMap(true); + markerCity.openPopup(); + Sig.map.setZoom(13, {animate:false}); + Sig.map.panTo(latlng, {animate:true}); + Sig.map.panBy([0, -150]); + //Sig.centerSimple(latlng, 13); + }); + + markerCity.closePopup(); + showMap(false); + + Sig.allowMouseoverMaker = true; +} + + +//wget("https://wikidata.org/w/api.php?action=wbgetclaims&format=json&entity=Q90&property=P18") +// https://wikidata.org/w/api.php?action=wbgetentities&format=json&ids=Q90&props=claims&languages=fr +// https://wikidata.org/w/api.php?action=wbgetclaims&format=json&entity=Q90&property=P18 +var wikidata = null; +function getWiki(q){ + url = "https://wikidata.org/w/api.php?action=wbgetentities&format=json&ids="+q+"&props=claims&languages=fr"; + $.ajax({ + url:url, + type:"GET", + dataType: "jsonp", + /*data: { + q: "select title,abstract,url from search.news where query=\"cat\"", + format: "json" + },*/ + success:function(data) { + if( notNull(data) ){ + wikidata = data; + name = wikidata.entities[q].claims.P373[0].mainsnak.datavalue.value; + imgName = wikidata.entities[q].claims.P18[0].mainsnak.datavalue.value; + /*$.ajax({ + url:"https://www.wikidata.org/w/api.php?action=query&prop=imageinfo&iiprop=url&titles=File:"+imgName, + type:"GET", + dataType: "jsonp", + success:function(data) { + console.dir(data) + }, + error:function (xhr, ajaxOptions, thrownError){ + alert("error 2"); + } + });*/ + $("#ajax-modal-modal-title").html("<img width=40 src='<?php echo $this->module->assetsUrl; ?>/images/logos/Wikipedia-logo-en-big.png'> "+name); + $("#ajax-modal-modal-body").html( "<div class='row bg-white'>"+ + "<div class='col-sm-10 col-sm-offset-1'>"+ + "<div id='P18'>image : "+wikidata.entities[q].claims.P18[0].mainsnak.datavalue.value+"</div>"+ + "<div id='P94'>coat of arms image : "+wikidata.entities[q].claims.P94[0].mainsnak.datavalue.value+"</div>"+ + "<div id='P94'>located in time zone : "+wikidata.entities[q].claims.P421[0].mainsnak.datavalue.value+"</div>"+ + "<div id='P94'>area : "+wikidata.entities[q].claims.P2046[0].mainsnak.datavalue.value+"</div>"+ + "<div id='P94'>shared borders : "+wikidata.entities[q].claims.P47[0].mainsnak.datavalue.value+"</div>"+ + "<div id='P94'>lien insee : "+wikidata.entities[q].claims.P374[0].mainsnak.datavalue.value+"</div>"+ + "</div>"+ + "</div>"); + $('.modal-footer').show(); + $('#ajax-modal').modal("show"); + } + }, + error:function (xhr, ajaxOptions, thrownError){ + alert("error"); + } + }); +} + +var cityFinderObj = { + title1 : "<i class='fa fa-map-marker text-yellow'></i> <?php echo $city["name"];?>", + title2 : "Thèmatique <i class='fa fa-asterisk text-yellow'></i> ", + menu : { + content : { + label : "Contenu", + icon : "fa-pencil-square-o", + action : "javascript:alert('Link')" }, + followers : { + label : "Popularité", + icon : "fa-users", + action : "javascript:alert('Link')" }, + latest : { + label : "Activité", + icon : "fa-clock-o", + action : "javascript:alert('Link')" } + }, + list : { + <?php foreach (OpenData::$categ as $key => $value) + { + if( @$value["icon"] ) + { + ?> + "<?php echo @$value["name"]?>" : { label : "<?php echo @$value["name"]?>", + labelCount : 0, + icon : "<?php echo @$value["icon"]?>", + key : "<?php echo @$value["name"]?>", + //color : "dark", + classes : slugify("<?php echo @$value["name"]?>")+"Btn kickerBtn", + action : "javascript:;", + click : function(){ + cityFinderObj.search( scopeType, "<?php echo @$value["name"]?>", "<?php echo @$value["icon"]?>", <?php echo json_encode( @$value["tags"] );?> ) + } + }, + <?php } + } ?> + }, + finder : function (type,where) + { + scopeType = type; + if( type == "region" ) + scopeName = 'region : <?php echo @$city["regionName"];?>'; + else if( type == "departement" ) + scopeName = 'dep : <?php echo @$city["depName"];?>'; + else + scopeName = '<?php echo @$city["name"];?>'; + + cityFinderObj.title1 = "<i class='fa fa-map-marker text-yellow'></i> "+scopeName; + + smallMenu.build( cityFinderObj, + function(params){return js_templates.leftMenu_content(params);}, + function(){ + $(".labelCount").html('(0)'); + $.each(categs,function (i,c){c.count = 0;}); + $.each( contextMap,function(k,v){ + var tagList = []; + $.each(v.tags,function (i,t){ + tagList.push( t.toLowerCase() ); + }); + $.each(categs,function (i,c) + { + var common = intersection_destructive(tagList, c.tags); + var isIn = (common.length > 0) ? true : false; + if(isIn){ + c.count++; + $("."+slugify(c.name)+"Btn").addClass('bg-red'); + $("."+slugify(c.name)+"Btn .labelCount").html('('+c.count+')'); + } + }) + }); + $(".kickerBtn").on("click",function() { + cityFinderObj.list[$(this).data('key')].click() + }); + $(".menuSmallLeftMenu").prepend("<h2 class='homestead'>Trier</h2>") + }); + }, + search : function ( type, what, icon, tags ) +{ + searchTypes = ["events","projects","organizations"]; + var params = { + name : "", + searchTag : tags, + searchBy : "CODE_POSTAL_INSEE", + indexMax : 200, + indexMin : 0, + searchType : searchTypes, + tpl : "list", + otherCollectionList : function() { + var strHTML = "<h2 class='homestead'>Thématiques</h2>"+ + js_templates.loop( cityFinderObj.list,"linkList",{ classes : "menuThemeBtn" }); + $("#listCollections").append(strHTML); + $(".menuThemeBtn").on("click",function() { + cityFinderObj.list[ $(this).data('key') ].click(); + }); + } + }; + + delete params.searchLocalityCODE_POSTAL; + delete params.searchLocalityREGION; + delete params.searchLocalityDEPARTEMENT; + if( type == "region" ) + params.searchLocalityREGION = ['<?php echo @$city["regionName"]; ?>']; + if( type == "departement" ) + params.searchLocalityDEPARTEMENT = ['<?php echo @$city["depName"]; ?>']; + else + params.searchLocalityCODE_POSTAL = postalCodes; + + console.dir(params); + smallMenu.openAjax( baseUrl+'/'+moduleId+'/search/globalautocomplete', + what, icon, 'yellow', + '<a href="javascript:cityFinderObj.finder(scopeType,scopeName)"><i class="fa fa-th text-grey"></i></a> <i class="fa fa-angle-right"></i> <i class="fa fa-map-marker text-yellow"></i> '+scopeName , + params ); +} +}; + +<?php +$cps = array(); +foreach ($city["postalCodes"] as $key => $value) { + $cps[] = $value["postalCode"]; +} +?> + +var postalCodes = <?php echo json_encode( $cps);?>; +var cityRegion = "<?php echo $city["region"];?>"; +var cityDep = "<?php echo $city["dep"];?>"; +var scopeType = null; +var scopeName = null; + +function initCurrentCityZones() { + $.each(postalCodesDynForm,function (i,c){ + if(typeof c.complement == "undefined"){ + var pc = { + label : c.postalCode + " - " +c.name, + classes:"bg-"+typeObj["cities"].color, + icon:"fa-"+typeObj["cities"].icon, + action : "#city.detail.insee."+city["insee"]+".postalCode."+c.postalCode + } + currentCityPC.push(pc); + } + + }); + $.each(zones,function (i,z){ + var zone = { + label : z.name, + classes:"bg-"+typeObj["event"].color, + icon:"fa-map", + action : "" + } + currentCityZones.push(zone); + }); +} + +</script> \ No newline at end of file diff --git a/views/classified/standalone.php b/views/classified/standalone.php new file mode 100644 index 0000000000000000000000000000000000000000..2ec2da704e34bc73a75f60d9ac3b9e414895e352 --- /dev/null +++ b/views/classified/standalone.php @@ -0,0 +1,168 @@ + +<style type="text/css"> + .headerTitleStanalone{ + left:-25px; + right:-25px; + } + .contentOnePage{ + margin-top: 45px; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + } + .carousel-media > ol > li.active{ + margin:1px; + border-top: 5px solid #EF5B34 !important; + } + .carousel-media > ol > li{ + width: 60px !important; + background-color: inherit; + border: inherit !important; + height: 65px !important; + border-radius: inherit; + border-top: 5px solid lightgray !important; + } + + .carousel-media > ol > li > img{ + float:left; + width:60px; + height:60px; + } + .carousel-media > ol{ + bottom: -85px + } + .carousel-media{ + margin-bottom: 100px; + } + .informations .btn-social{ + padding: 0px; + height: inherit; + width: 50px; + } + .informations .btn-social > span{ + position: absolute; + font-size: 20px; + } +</style> +<div class="headerTitleStanalone"></div> +<div class="col-md-10 col-md-offset-1 contentOnePage"> + <div class="col-md-12 title text-left"><h2><?php echo ucfirst($element["name"]) ?></h2></div> + <div id="myCarousel" class="col-md-12 no-padding carousel carousel-media slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + + <li data-target="#myCarousel" data-slide-to="0" class="active"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion4.jpg" alt="Reunion 1"></li> + <li data-target="#myCarousel" data-slide-to="1"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" alt="Reunion 1"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner"> + + <div class="item active"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion4.jpg" alt="Reunion 1"> + <div class="carousel-caption"> + <h3>Bienvenu chez l'habitant</h3> + <p>L’objectif de ce projet est de promouvoir la culture réunionnaise en passant par des habitant, ou des prestataire à taille humaine, qui ont une légitimité pour la représenter. Des acteurs qui vont garantir la véracité et l’authenticité de notre culture et favoriser son développement. + </p> + </div> + </div> + + <div class="item"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" alt="Reunion 1"> + <div class="carousel-caption"> + <h3>Bienvenu chez l'habitant</h3> + <p>L’objectif de ce projet est de promouvoir la culture réunionnaise en passant par des habitant, ou des prestataire à taille humaine, qui ont une légitimité pour la représenter. Des acteurs qui vont garantir la véracité et l’authenticité de notre culture et favoriser son développement. + </p> + </div> + </div> + + </div> + </div> + + <div class="informations col-md-12 margin-bottom-20"> + <div class="header-info col-md-12 no-padding text-left"> + <h4 class="text-dark col-md-4 no-margin text-left">Project information</h4> + <div class="evalutation col-md-3"> + <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-half"></i> + </div> + <div class="col-md-5"> + <h3 class="pull-left no-margin" style="font-size: 20px;">Share</h3> + <a target="_blank" href="" class="btn btn-facebook btn-social pull-left"><span class="fa fa-facebook"></span></a> + <a target="_blank" href="" class="btn btn-facebook btn-social pull-left"><span class="fa fa-twitter"></span></a> + <a target="_blank" href="" class="btn btn-facebook btn-social pull-left"><span class="fa fa-google-plus"></span></a> + <a target="_blank" href="" class="btn btn-facebook btn-social pull-left"><span class="fa fa-linkedin"></span></a> + </div> + <div class="col-md-8 description text-left margin-top-20"> + <span class=""> + jiezjfiz ijezjfzeif ezoijfjiez fjiezfj ezof<br> + jiezjfiz ijezjfzeif ezoijfjiez fjiezfj ezof hdhuiezu ezhidihueza diuadhezaiud ezaudehzadiuezahd<br> + jiezjfiz ijezjfzeif ezoijfjiez fjiezfj ezof + </span> + </div> + <div class="col-md-4 padding-20 margin-top-20"> + <a href="javascript:;" class="btn bg-orange" onclick="addToShoppingCart('<?php echo (string)$element["_id"] ?>','<?php echo $element["type"] ?>');">I book</a> + </div> + </div> + <div id="commentElement" class="col-md-12 margin-top-20"> + </div> +</div> +<script type="text/javascript"> + + var element=<?php echo json_encode($element); ?>; + + jQuery(document).ready(function() { + var nav = directory.findNextPrev("#page.type.classified.id."+element['_id']['$id']); + //if(typeof params.name != "undefined" && params.name != "") + str = "<div class='col-md-6 no-padding'>"+ + nav.prev+ + "<span>"+element.name+"</span>"+ + nav.next+ + "</div>"; + $(".headerTitleStanalone").html(str); + initBtnLink(); + getAjax("#commentElement",baseUrl+"/"+moduleId+"/comment/index/type/"+type+"/id/"+element['_id']['$id'], + function(){ //$(".commentCount").html( $(".nbComments").html() ); + $(".container-txtarea").hide(); + + $(".btn-select-arg-comment").click(function(){ + var argval = $(this).data("argval"); + $(".container-txtarea").hide(); + }); + + },"html"); +//setTitle("", "", classified.name); + element["id"] = element['_id']['$id']; + //var html = directory.preview(classified); + //$("#classified").html(html); + }); + /*function addToShoppingCart(id,type){ + if(typeof userId != "undefined" && userId != ""){ + if(typeof shoppingCart[type] == "undefined") + shoppingCart[type]=[]; + shoppingCart[type].push(mapElements[id]); + shopping.countShoppingCart(true); + console.log("element",mapElements[id]); + }else{ + $('#modalLogin').modal("show"); + } + } + function countShoppingCart(){ + total=0; + $.each(shoppingCart, function(k, v){ + total+=v.length; + }); + if(total > 0){ + $(".shoppingCart-count").html(total); + $('.shoppingCart-count').removeClass('hide'); + $('.shoppingCart-count').addClass('animated bounceIn'); + $('.shoppingCart-count').addClass('badge-success'); + $('.shoppingCart-count').removeClass('badge-tranparent'); + }else{ + $('.shoppingCart-count').addClass('hide'); + $('.shoppingCart-count').removeClass('badge-success'); + $('.shoppingCart-count').addClass('badge-tranparent'); + } + }*/ +</script> \ No newline at end of file diff --git a/views/comment/commentPodActionRooms.php b/views/comment/commentPodActionRooms.php new file mode 100755 index 0000000000000000000000000000000000000000..74c0576a47806cc37c469230009f8a9348ff0ff5 --- /dev/null +++ b/views/comment/commentPodActionRooms.php @@ -0,0 +1,131 @@ +<?php if($contextType == "actionRooms"){ ?> + +<style type="text/css"> + +#commentHistory .panel-heading{ + min-height:185px !important; +} +.footer-comments{ + margin-top: 15px !important; + /*float:left;*/ + padding: 30px; +} +.ctnr-txtarea { + position: absolute; + right: 30px; + left: 70px !important; +} +</style> +<?php } ?> + + +<?php if($contextType == "actionRooms" && !isset($_GET["renderPartial"])){ + $this->renderPartial('../rooms/header',array( + "parent" => $parent, + "parentId" => $parentId, + "parentType" => $parentType, + "fromView" => "comment.index", + "faTitle" => "comments", + "colorTitle" => "azure", + "textTitle" => "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#rooms.index.type.$parentType.id.$parentId.tab.1\")'><i class='fa fa-comments'></i> ".Yii::t("rooms","Discuss", null, Yii::app()->controller->module->id)."</a>" + )); + echo '<div class="col-md-12 panel-white padding-15 discussContainer" id="room-container">'; + } +?> +<?php if($contextType == "actionRooms"){ ?> + <h1 class="text-dark" style="font-size: 25px;margin-top: 20px;"> + <i class="fa fa-angle-down"></i> <i class="fa fa-comment"></i> <span class="homestead"> Espace de discussion</span> + <?php //echo $context["name"]; ?> + </h1> +<?php } ?> + + +<?php if($contextType == "actionRooms"){ + //Menu::comments( $parentType, $parentId ); + //$this->renderPartial('../default/panels/toolbar'); +} +?> + +<?php + //$canComment = (isset($parentId) && isset($parentType) && isset(Yii::app()->session["userId"]) + // && Authorisation::canParticipate(Yii::app()->session["userId"], $parentType, $parentId)); + $this->renderPartial("../comment/commentPodSimple", array("comments"=>$comments, + "communitySelectedComments"=>$communitySelectedComments, + "abusedComments"=>$abusedComments, + "options"=>$options, + "canComment"=>$canComment, + "idComment"=>$idComment, + "parentType"=>$parentType, + "parentId" => $parentId, + "contextType"=>$contextType, + "nbComment"=>$nbComment, + "canComment" => $canComment, + "context"=>$context, + "images"=>$images)); + + if($contextType == "actionRooms" && !isset($_GET["renderPartial"])) + echo "</div>"; +?> + + + +<script type="text/javascript"> +var images = <?php echo json_encode($images) ?>; +var latestComments = <?php echo time(); ?>; +jQuery(document).ready(function() { + + <?php if($contextType == "actionRooms"){ ?> + //setTitle("<?php echo Yii::t("rooms","Discussion", null, Yii::app()->controller->module->id); ?>","comments"); + $(".main-col-search").addClass("assemblyHeadSection"); + <?php } ?> + +}); + +function checkCommentCount(){ + mylog.log("check if new comments exist since",latestComments); + //show refresh button + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+"/comment/countcommentsfrom", + data: { + "from" : latestComments, + "type" : contextType, + "id" : "<?php echo (string)$context["_id"]; ?>" + }, + dataType: "json", + success: function(data){ + if(data.count>0){ + mylog.log("you have new comments", data.count); + $(".refreshComments").removeClass('hidden').html("<i class='fa fa-refresh fa-spin'></i> <?php echo Yii::t( "comment", 'New Comment(s) Click to Refresh', Yii::app()->controller->module->id)?> "); + latestComments = data.time; + } else { + mylog.log("nothing new"); + } + if(userId){ + //checkCommentCount(); + } + } + }); +} + +function archive(collection,id){ + mylog.warn("--------------- archive ---------------------",collection,id); + + bootbox.confirm("Vous êtes sûr ? ", + function(result) { + if (result) { + params = { + "id" : id , + "type":collection, + "name":"status", + "value":"<?php echo ( @$context["status"] != ActionRoom::STATE_ARCHIVED ) ? ActionRoom::STATE_ARCHIVED : "" ?>", + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/element/updatefield")?>',params,function(data){ + urlCtrl.loadByHash(window.location.hash); + }); + } else { + $("."+clickedVoteObject).removeClass("faa-bounce animated"); + } + }); +} +</script> \ No newline at end of file diff --git a/views/comment/commentPodSimple.php b/views/comment/commentPodSimple.php new file mode 100755 index 0000000000000000000000000000000000000000..94fa4a332f2b89b47701072fe291b156fae8c2d0 --- /dev/null +++ b/views/comment/commentPodSimple.php @@ -0,0 +1,813 @@ +<?php + + $cssAnsScriptFilesModule = array( + '/js/news/autosize.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + function multiple10($nb, $total){ //error_log("multiple1000 : " . $nb. " - ".$total); + for($i=0;$i<$total;$i+=10){ + if($i==$nb) error_log( "multiple10 : " . $i); + if($i==$nb) return true; + } + return false; + } + +?> +<style> + .textarea-new-comment{ + max-width: 100%; + min-width: 100%; + vertical-align: top; + font-size:13px; + } + .textarea-new-comment:focus { + outline-style: solid; + outline-width: 1px; + outline-color: grey; + } + .footer-comments{ + <?php if($contextType != "actionRooms" && $contextType != "surveys" && $contextType != "actions"){ ?> + margin-right: -10px; + margin-left: -10px; + margin-top: -5px; + padding: 10px; + <?php } ?> + background-color: rgba(231, 231, 231, 0.62); + } + .content-comment{ + max-width:80%; + min-height: 35px; + } + .answerCommentContainer { + margin-left: 45px; + margin-top: 5px; + } + + .ctnr-txtarea{ + position: absolute; + right:10px; + left:50px; + } + + .answerCommentContainer .ctnr-txtarea{ + left:40px!important; + } + + .content-comment .tool-action-comment{ + display: none; + } + .content-comment:hover .tool-action-comment{ + display: inherit; + } + .content-comment .fa-reply{ + font-size:14px; + margin-right:5px; + margin-left:5px; + + } + .text-comment{ + white-space: pre-line; + } + .content-new-comment .mentions{ + padding: 10px !important; + font-size: 13px !important; + } + .content-update-comment .mentions{ + padding: 10px !important; + font-size: 14px !important; + } +</style> +<?php if($contextType == "actionRooms"){ ?> +<div class='row'> + <?php + $icon = (@$context["status"] == ActionRoom::STATE_ARCHIVED) ? "download" : "comments"; + $archived = (@$context["status"] == ActionRoom::STATE_ARCHIVED) ? "<span class='text-small helvetica'>(ARCHIVED)</span>" : ""; + $color = (@$context["status"] == ActionRoom::STATE_ARCHIVED) ? "text-red " : "text-dark"; + ?> + <div class='col-md-8'> + <h3 class=" <?php echo $color;?>" style="color:rgba(0, 0, 0, 0.8);"> + <i class="fa fa-angle-right"></i> "<?php echo $context["name"].$archived; ?>" + </h3> + </div> + + <?php + if($contextType == "actionRooms" && $context["type"] == ActionRoom::TYPE_DISCUSS){ + echo "<div class='col-md-4'>"; + /*$this->renderPartial('../pod/fileupload', array("itemId" => (string)$context["_id"], + "type" => ActionRoom::COLLECTION, + "resize" => false, + "contentId" => Document::IMG_PROFIL, + "editMode" => $canComment, + "image" => $images, + "parentType" => $parentType, + "parentId" => $parentId, + )); */ + } + echo "</div>"; + + ?> +</div> +<?php } ?> + + +<div class="footer-comments row"> + + <?php //image profil user connected + input new comment + $profilThumbImageUrlUser = ""; + + if(isset(Yii::app()->session["userId"])){ + $me = Person::getMinimalUserById(Yii::app()->session["userId"]); + $profilThumbImageUrlUser = Element::getImgProfil($me, "profilThumbImageUrl", $this->module->assetsUrl); + ?> + + + <div class="col-md-12 col-sm-12 col-xs-12 no-padding margin-top-15 container-txtarea"> + <img src="<?php echo $profilThumbImageUrlUser; ?>" class="img-responsive pull-left" + style="margin-right:6px;height:32px; border-radius:3px;"> + + <div id="container-txtarea-<?php echo $idComment; ?>" class="content-new-comment"> + <div style="" class="ctnr-txtarea"> + <textarea rows="1" style="height:1em;" class="form-control textarea-new-comment" + id="textarea-new-comment<?php echo $idComment; ?>" placeholder="<?php echo Yii::t("common","Your comment") ?>..."></textarea> + <input type="hidden" id="argval" value=""/> + </div> + </div> + </div> + <?php } ?> + + <div id="comments-list-<?php echo $idComment; ?>"> + + <?php + $assetsUrl = $this->module->assetsUrl; + function showCommentTree($comments, $assetsUrl, $idComment, $canComment, $level, $parentType=null){ + $count = 0; + $hidden = 0; + $hiddenClass = ""; + $nbTotalComments = sizeOf($comments); + + if($nbTotalComments == 0 && $level == 1) { echo "<span class='noComment'>".Yii::t("comment", "No comment")."</span>"; } + if($nbTotalComments == 0) return; + //if($nbTotalComments == 0 && $level == 2) echo "Aucune commentaire"; + + + foreach ($comments as $key => $comment) { + $count++; + $profilThumbImageUrl = Element::getImgProfil($comment["author"], "profilThumbImageUrl", $assetsUrl); + if($hidden > 0) $hiddenClass = "hidden hidden-".$hidden; + + $classArgument = ""; + if(@$comment["argval"] == "up") $classArgument = "bg-green-comment"; + if(@$comment["argval"] == "down") $classArgument = "bg-red-comment"; + if(@$comment["argval"] == "") $classArgument = "bg-white-comment"; + ?> + <div class="col-xs-12 no-padding margin-top-5 item-comment <?php echo $hiddenClass.' '.$classArgument; ?>" + id="item-comment-<?php echo $comment["_id"]; ?>"> + + <img src="<?php echo $profilThumbImageUrl; ?>" class="img-responsive pull-left" + style="margin-right:10px;height:32px; border-radius:3px;"> + + <span class="pull-left content-comment"> + <span class="text-black pull-left"> + <span class="text-dark pull-left"><strong><?php echo $comment["author"]["name"]; ?></strong></span> + <?php if(@$comment["rating"]){ ?> + <div class="br-wrapper br-theme-fontawesome-stars pull-left margin-left-10"> + <select id="ratingComments<?php echo $comment["_id"]; ?>" class="ratingComments"> + <option value="1">1</option> + <option value="2">2</option> + <option value="3">3</option> + <option value="4">4</option> + <option value="5">5</option> + </select> + </div> <br> + <?php } ?> + <span class="text-comment text-left pull-left <?php echo (@$comment['reportAbuseCount']&&$comment['reportAbuseCount']>=5)?'text-red-light-moderation':'' ?>"><?php echo $comment["text"]; ?></span> + </span><br> + <small class="bold"> + <?php if(isset(Yii::app()->session["userId"]) && !@$comment["rating"]){ ?> + + <?php if(@$canComment){ ?> + <?php + $lblReply = Yii::t("common","Answer"); + if(sizeOf($comment["replies"])==1) $lblReply = "<i class='fa fa-reply fa-rotate-180'></i>" . sizeOf($comment["replies"])." ".Yii::t("comment","answer"); + if(sizeOf($comment["replies"])>1) $lblReply = "<i class='fa fa-reply fa-rotate-180'></i>" . sizeOf($comment["replies"])." ".Yii::t("comment","answers"); + ?> + <a class="" href="javascript:answerComment('<?php echo $idComment; ?>', '<?php echo $comment["_id"]; ?>','<?php echo $comment["contextType"]; ?>')"><?php echo $lblReply; ?></a> + <?php } ?> + <?php + $myId = Yii::app()->session["userId"]; $iVoted = ""; + $voteUpCount = @$comment['voteUpCount'] ? $comment['voteUpCount'] : 0; + $voteDownCount = @$comment['voteDownCount'] ? $comment['voteDownCount'] : 0; + $reportAbuseCount = @$comment['reportAbuseCount'] ? $comment['reportAbuseCount'] : 0; + if(@$comment['voteUp']) foreach (@$comment['voteUp'] as $key => $value) { if($key == $myId) $iVoted = "up"; } + if(@$comment['voteDown']) foreach (@$comment['voteDown'] as $key => $value) { if($key == $myId) $iVoted = "down"; } + if(@$comment['reportAbuse']) foreach (@$comment['reportAbuse'] as $key => $value) { if($key == $myId) $iVoted = "abuse"; } + ?> + <a style="margin-left:5px;margin-right:5px;" href="javascript:" + class="tooltips commentVoteUp <?php echo $iVoted=='up' ? 'text-green' : ''; ?>" + data-voted="<?php echo $iVoted!='' ? 'true' : 'false'; ?>" + data-id="<?php echo $comment["_id"]; ?>" data-countcomment="<?php echo $voteUpCount; ?>" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","I like") ?>"> + <span class="countC"><?php echo @$voteUpCount; ?></span> + <i class='fa fa-thumbs-up'></i> + </a> + <a href="javascript:" + class="tooltips commentVoteDown <?php echo $iVoted=='down' ? 'text-orange' : ''; ?>" + data-voted="<?php echo $iVoted!='' ? 'true' : 'false'; ?>" + data-id="<?php echo $comment["_id"]; ?>" data-countcomment="<?php echo @$voteDownCount; ?>" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","I don't like") ?>"> + <span class="countC"><?php echo @$voteDownCount; ?></span> + <i class='fa fa-thumbs-down'></i> + </a> + + <?php if($reportAbuseCount > 1){ ?> + <a style="margin-left:5px; margin-right:5px;" href="javascript:" + class="tooltips commentReportAbuse <?php echo $iVoted=='abuse' ? 'text-red' : 'text-red-light'; ?>" + data-voted="<?php echo $iVoted!='' ? 'true' : 'false'; ?>" + data-id="<?php echo $comment["_id"]; ?>" data-countcomment="<?php echo @$reportAbuseCount; ?>" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","Declare an abuse") ?>"> + <span class="countC"><?php echo $reportAbuseCount; ?></span> + <i class='fa fa-flag'></i> + </a> + <?php } ?> + <div class="tool-action-comment"> + + <?php if($reportAbuseCount <= 1){ ?> + <a style="margin-left:5px; margin-right:5px;" href="javascript:" + class="tooltips commentReportAbuse <?php echo $iVoted=='abuse' ? 'text-red' : $reportAbuseCount >= 1 ? 'text-red-light' : ''; ?>" + data-voted="<?php echo $iVoted!='' ? 'true' : 'false'; ?>" + data-id="<?php echo $comment["_id"]; ?>" data-countcomment="<?php echo @$reportAcommentbuseCount; ?>" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","Declare an abuse") ?>"> + <span class="countC"><?php echo $reportAbuseCount; ?></span> + <i class='fa fa-flag'></i> + </a> + <?php } ?> + + <?php if(@$comment["author"]["id"] == Yii::app()->session["userId"]){ ?> + <a style="margin-left:5px; margin-right:5px;" class="tooltips" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","Update") ?>" + href="javascript:editComment('<?php echo $comment["_id"]; ?>')"><i class='fa fa-pencil'></i> + </a> + <a class="tooltips" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("common","Delete") ?>" + href="javascript:confirmDeleteComment('<?php echo $comment["_id"]; ?>',$(this))"><i class='fa fa-times'></i> + </a> + <?php } ?> + + </div> + + <?php } ?> + </small> + </span> + <div id="comments-list-<?php echo $comment["_id"]; ?>" class="hidden pull-left col-md-11 col-sm-11 col-xs-11 no-padding answerCommentContainer"> + <?php if(sizeOf($comment["replies"]) > 0) //recursive for answer (replies) + showCommentTree($comment["replies"], $assetsUrl, $comment["_id"], $canComment, $level+1, $comment["contextType"]); ?> + </div> + </div> + <?php if(multiple10($count, $nbTotalComments)){ $hidden = $count; ?> + <?php $hiddenClass = ($hidden > 10) ? "hidden hidden-".($hidden-10) : ""; ?> + <div class="pull-left margin-top-5 <?php echo $hiddenClass; ?> link-show-more-<?php echo ($hidden-10); ?>"> + <a class="" href="javascript:" onclick="showMoreComments('<?php echo $idComment; ?>', <?php echo $hidden; ?>);"> + <i class="fa fa-angle-down"></i> <?php echo Yii::t("comment","Show more comments") ?> + </a> + </div> + <?php } //if (multiple10 ?> + + + + <?php } //$.each ?> + <?php if($hidden > 0){ ?> + <div class="pull-right margin-top-5"> + <a class="" href="javascript:" onclick="hideComments('<?php echo $idComment; ?>', <?php echo $level; ?>);"> + <i class="fa fa-angle-up"></i> Masquer + </a> + </div> + <?php } ?> + <?php }//function() + ?> + + <?php showCommentTree($comments, $assetsUrl, $idComment, $canComment, 1, $contextType); ?> + + </div><!-- id="comments-list-<?php echo $idComment; ?>" --> + +</div><!-- class="footer-comments" --> + +<!-- ------------------------------------------------------------------------------------------------------------------------------------- --> + +<script type="text/javascript" > + var contextType = "<?php echo $contextType; ?>"; + var idComment = "<?php echo $idComment; ?>"; + var comments = <?php echo json_encode($comments); ?>; + + var context = <?php echo json_encode($context)?>; + + var profilThumbImageUrlUser = "<?php echo @$profilThumbImageUrlUser; ?>"; + var isUpdatedComment=false; + // mylog.log("context"); + // mylog.dir(context); + // mylog.log("comments"); + // mylog.dir(comments); + + jQuery(document).ready(function() { + + var idTextArea = '#textarea-new-comment<?php echo $idComment; ?>'; + bindEventTextArea(idTextArea, idComment, contextType, false, ""); + bindEventActions(); + + mylog.log(".comments-list-<?php echo $idComment; ?> .text-comment"); + $("#comments-list-<?php echo $idComment; ?> .text-comment").each(function(){ + idComment=$(this).data("id"); + idParent=$(this).data("parent-id"); + textComment=$(this).html(); + if(typeof idParent != "undefined"){ + comments[idComment]=comments[idParent].replies[idComment]; + } + /*if(typeof idParent != "undefined"){ + if(typeof(comments[idParent].replies[idComment].mentions) != "undefined"){ + textComment = mentionsInit.addMentionInText(textComment,comments[idParent].replies[idComment].mentions); + } + }else{*/ + if(typeof(comments[idComment]) !="undefined" && typeof(comments[idComment].mentions) != "undefined"){ + textComment = mentionsInit.addMentionInText(textComment,comments[idComment].mentions); + } + //} + textComment = linkify(textComment); + $(this).html(textComment); + }); + $.each(comments, function(i,v){ + if(typeof v.rating != "undefined"){ + $("#ratingComments"+i).barrating({ + theme: 'fontawesome-stars', + 'readonly': true + }); + $("#ratingComments"+i).barrating("set", v.rating); + //$("#ratingComments"+i).barrating(); + } + }); + + $(".tooltips").tooltip(); + }); + + + + function bindEventActions(){ + + $('.commentVoteUp').off().on("click",function(){ + id=$(this).data("id"); + mylog.log("thisData voted : ", $(this).data("voted")); + //if($(this).data("voted")=="true") + // alert(typeof $(this).data("voted")); + if((!$(this).hasClass("text-green") && $(this).data("voted")==true)){ + if($(".commentReportAbuse[data-id='"+id+"']").hasClass("text-red")){ + toastr.info("<?php echo Yii::t("common", "You can't make any actions on this comment after reporting abuse !") ?>"); + } + else{ + toastr.info("<?php echo Yii::t("common", "Remove your last opinion before") ?>"); + } + }else{ + method= $(this).hasClass("text-green"); + actionOnComment($(this),'<?php echo Action::ACTION_VOTE_UP ?>', method); + disableOtherAction(id, '.commentVoteUp',method); + } + }); + $('.commentVoteDown').off().on("click",function(){ + id=$(this).data("id"); + if((!$(this).hasClass("text-orange") && $(this).data("voted")==true)){ + if($(".commentReportAbuse[data-id='"+id+"']").hasClass("text-red")){ + toastr.info("<?php echo Yii::t("common", "You can't make any actions on this comment after reporting abuse !") ?>"); + } + else{ + toastr.info("<?php echo Yii::t("common", "Remove your last opinion before") ?>"); + } + }else{ + method= $(this).hasClass("text-orange"); + actionOnComment($(this),'<?php echo Action::ACTION_VOTE_DOWN ?>', method); + disableOtherAction(id, '.commentVoteDown', method); + } + }); + + //Abuse process + $('.commentReportAbuse').off().on("click",function(){ + id=$(this).data("id"); + if($(this).data("voted")=="true") + toastr.info("<?php echo Yii::t("common", "Remove your last opinion before") ?>"); + else{ + if($(".commentVoteUp[data-id='"+id+"']").hasClass("text-green") || $(".commentVoteDown[data-id='"+id+"']").hasClass("text-orange")){ + toastr.info("<?php echo Yii::t("common", "You can't make any actions on this comment after reporting abuse !") ?>"); + } + else{ + reportAbuse($(this), $(this).data("contextid")); + } + } + }); + $('.deleteComment').off().on("click",function(){ + actionAbuseComment($(this), "<?php echo Comment::STATUS_DELETED ?>", ""); + }); + } + + + function showOneComment(textComment, idComment, isAnswer, idNewComment, argval, mentionsArray){ + console.log(mentionsArray); + if(notNull(mentionsArray)){ + textComment = mentionsInit.addMentionInText(textComment,mentionsArray); + } + textComment = linkify(textComment); + var classArgument = ""; + if(argval == "up") classArgument = "bg-green-comment"; + if(argval == "down") classArgument = "bg-red-comment"; + if(argval == "") classArgument = "bg-white-comment"; + + var html = '<div class="col-xs-12 no-padding margin-top-5 item-comment '+classArgument+'" id="item-comment-'+idNewComment+'">'+ + + '<img src="<?php echo @$profilThumbImageUrlUser; ?>" class="img-responsive pull-left" '+ + ' style="margin-right:10px;height:32px; border-radius:3px;">'+ + + '<span class="pull-left content-comment">'+ + ' <span class="text-black">'+ + ' <span class="text-dark"><strong><?php echo @$me["name"]; ?></strong></span><br>'+ + ' <span class="text-comment">' + textComment + "</span>" + + ' </span><br>'+ + '<small class="bold">' + + <?php if(@$canComment){ ?> + ' <a class="" href=\'javascript:answerComment(\"<?php echo $idComment; ?>\", \"'+idNewComment+'\", \"'+contextType+'\")\'>'+trad.answer+'</a> '+ + <?php } ?> + <?php if(isset(Yii::app()->session["userId"])){ ?> + + ' <a class="tooltips commentVoteUp" style="margin-left:5px;margin-right:5px;"'+ + ' class="tooltips commentVoteUp"'+ + ' data-voted="false"'+ + ' data-id="'+idNewComment+'" data-countcomment="0" ' + + ' data-toggle="tooltip" data-placement="top" title="'+trad.ilike+'"'+ + ' href="javascript:">0 <i class="fa fa-thumbs-up"></i></a> ' + + + ' <a class="tooltips commentVoteDown"'+ + ' data-voted="false"'+ + ' data-id="'+idNewComment+'" data-countcomment="0" ' + + ' data-toggle="tooltip" data-placement="top" title="'+trad.idontlike+'"'+ + ' href="javascript:">0 <i class="fa fa-thumbs-down"></i></a> ' + + + '<div class="tool-action-comment">' + + ' <a class="tooltips commentReportAbuse" style="margin-left:5px;margin-right:5px;"'+ + ' data-voted="false"'+ + ' data-id="'+idNewComment+'" data-countcomment="0" ' + + ' data-toggle="tooltip" data-placement="top" title="'+trad.declareabuse+'"'+ + ' href="javascript:">0 <i class="fa fa-flag"></i></a> '+ + + ' <a style="margin-left:5px; margin-right:5px;" class="tooltips"'+ + ' data-toggle="tooltip" data-placement="top" title="'+trad.edit+'"'+ + ' href=\'javascript:editComment(\"'+idNewComment+'\")\'><i class="fa fa-pencil"></i></a>'+ + + ' <a class="tooltips"'+ + ' data-toggle="tooltip" data-placement="top" title="'+trad.delete+'"'+ + ' href=\'javascript:confirmDeleteComment(\"'+idNewComment+'\", $(this))\'><i class="fa fa-times"></i></a>'+ + '</div>' + + //' <a class="" href=\'javascript:deleteComment(\"'+idNewComment+'\")\'>Supprimer</a> '+ + //' <a class="" href=\'javascript:modifyComment(\"'+idNewComment+'\")\'>Modifier</a>'+ + <?php } ?> + '</small>'+ + '</span>'+ + '<div id="comments-list-'+idNewComment+'" class="hidden pull-left col-md-11 no-padding answerCommentContainer"></div>' + + + '</div>'; + + if(!isAnswer){ + $("#comments-list-<?php echo $idComment; ?>").prepend(html); + $("#comments-list-<?php echo $idComment; ?>").find(".noComment").remove(); + }else{ + $('#container-txtarea-'+idComment).after(html); + } + } + + + + function saveComment(textComment, parentCommentId, domElement){ + textComment = $.trim(textComment); + if(!notEmpty(parentCommentId)) parentCommentId = ""; + if(textComment == "") { + toastr.error("<?php echo Yii::t("comment","Your comment is empty") ?>"); + return; + } + + var argval = $("#argval").val(); + newComment={ + parentCommentId: parentCommentId, + text : textComment, + contextId : context["_id"]["$id"], + contextType : contextType, + argval : argval + }; + newComment=mentionsInit.beforeSave(newComment, domElement); + $.ajax({ + url: baseUrl+'/'+moduleId+"/comment/save/", + data: newComment, + type: 'post', + global: false, + dataType: 'json', + success: + function(data) { + if(!data.result){ + toastr.error(data.msg); + } + else { + toastr.success(data.msg); + var count = $("#newsFeed"+context["_id"]["$id"]+" .nbNewsComment").html(); + + if(!notEmpty(count)) count = 0; + //mylog.log(count, context["_id"]["$id"]); + comments[data.id.$id]=data.newComment; + if(data.newComment.contextType=="news"){ + mentionsInit.reset(domElement); + count = parseInt(count); + var newCount = count +1; + var labelCom = (newCount>1) ? trad.comments : trad.comment; + $("#newsFeed"+context["_id"]["$id"]+" .lblComment").html("<i class='fa fa-comment'></i> <span class='nbNewsComment'>"+newCount+"</span> "+labelCom); + $("#newsFeed"+context["_id"]["$id"]+" .newsAddComment").data('count', newCount); + // }else{ + // $("#newsFeed"+context["_id"]["$id"]+" .lblComment").html("<i class='fa fa-comment'></i> <span class='nbNewsComment'>1</span> commentaire"); + // $("#newsFeed"+context["_id"]["$id"]+" .newsAddComment").data('count', 1); + } + + // $('.nbComments').html((parseInt($('.nbComments').html()) || 0) + 1); + // if (data.newComment.contextType=="news"){ + // $(".newsAddComment[data-id='"+data.newComment.contextId+"']").children().children(".nbNewsComment").text(parseInt($('.nbComments').html()) || 0); + // } + //switchComment(commentId, data.newComment, parentCommentId); + latestComments = data.time; + + var isAnswer = parentCommentId!=""; + mentionsArray=null; + if(typeof data.newComment.mentions != "undefined"){ + mentionsArray=data.newComment.mentions; + } + showOneComment(data.newComment.text, parentCommentId, isAnswer, data.id.$id, argval, mentionsArray); + bindEventActions(); + } + }, + error: + function(data) { + toastr.error('<?php echo Yii::t("comment","Error calling the serveur : contact your administrator.") ?>'); + } + }); + + } + + + + function reportAbuse(comment, contextId) { + // mylog.log(contextId); + var message = "<div id='reason' class='radio'>"+ + "<h3 class='margin-top-10'>Pour quelle raison signalez-vous ce contenu ?</h3>" + + "<hr>" + + "<label><input type='radio' name='reason' value='Propos malveillants' checked>Propos malveillants</label><br>"+ + "<label><input type='radio' name='reason' value='Incitation et glorification des conduites agressives'>Incitation et glorification des conduites agressives</label><br>"+ + "<label><input type='radio' name='reason' value='Affichage de contenu gore et trash'>Affichage de contenu gore et trash</label><br>"+ + "<label><input type='radio' name='reason' value='Contenu pornographique'>Contenu pornographique</label><br>"+ + "<label><input type='radio' name='reason' value='Liens fallacieux ou frauduleux'>Liens fallacieux ou frauduleux</label><br>"+ + "<label><input type='radio' name='reason' value='Mention de source erronée'>Mention de source erronée</label><br>"+ + "<label><input type='radio' name='reason' value='Violations des droits auteur'>Violations des droits d\'auteur</label><br><br>"+ + "<input type='text' class='form-control' style='text-align:left;' id='reasonComment' placeholder='Laisser un commentaire...'/><br>"+ + "Votre signalement sera envoyé aux administrateurs du réseau,<br> qui le traiteront conformément aux <a href='javascript:'>conditions d'utilisations</a><br>" + + "<span class='text-red'><i class='fa fa-info-circle'></i> Tout signalement est définitif, vous ne pourrez pas l'annuler</span><br>" + + "<hr>" + + "<span class=''><i class='fa fa-arrow-right'></i> Le contenu sera signalé par un <i class='fa fa-flag text-red'></i> s'il fait l'objet d'au moins 2 signalements</span><br>" + + "<span class='text-red-light'><i class='fa fa-arrow-right'></i> Le contenu sera masqué s'il fait l'objet d'au moins 5 signalements</span><br>" + + "<span class=''><i class='fa fa-arrow-right'></i> Le contenu sera supprimé par les administrateurs s'il enfreint les conditions d'utilisations</span>" + + "</div>"; + var boxComment = bootbox.dialog({ + message: message, + //title: '<?php echo Yii::t("comment","You are going to declare this comment as abuse : please fill the reason ?") ?>', + title: '<span class="text-red"><i class="fa fa-flag"></i> <?php echo Yii::t("comment","Signaler un abus") ?>', + buttons: { + annuler: { + label: "Annuler", + className: "btn-default", + callback: function() { + mylog.log("Annuler"); + } + }, + danger: { + label: "Envoyer le signalement", + className: "btn-danger", + callback: function() { + // var reason = $('#reason').val(); + var reason = $("#reason input[type='radio']:checked").val(); + var reasonComment = $("#reasonComment").val(); + actionAbuseComment(comment, "<?php echo Action::ACTION_REPORT_ABUSE ?>", reason, reasonComment); + disableOtherAction(comment.data("id"), '.commentReportAbuse'); + //copyCommentOnAbuseTab(comment); + return true; + } + }, + } + }); + + boxComment.on("shown.bs.modal", function() { + $.unblockUI(); + }); + + boxComment.on("hide.bs.modal", function() { + $.unblockUI(); + }); + } + + function actionAbuseComment(comment, action, reason, reasonComment) { + $.ajax({ + url: baseUrl+'/'+moduleId+"/action/addaction/", + data: { + id: comment.data("id"), + collection : '<?php echo Comment::COLLECTION?>', + action : action, + reason : reason, + comment : reasonComment + }, + type: 'post', + global: false, + dataType: 'json', + success: + function(data) { + if(!data.result){ + toastr.error(data.msg); + } + else { + if (data.userAllreadyDidAction) { + toastr.info('<?php echo Yii::t("comment","You already declare this comment as abused.") ?>'); + } else { + toastr.success(data.msg); + if (action == "<?php echo Action::ACTION_REPORT_ABUSE ?>") { + count = parseInt(comment.data("count")); + comment.data( "count" , count+1 ); + icon = comment.children(".label").children(".fa").attr("class"); + comment.children(".label").html(comment.data("count")+" <i class='"+icon+"'></i>"); + } else { + $('.abuseCommentTable #comment'+comment.data("id")).remove(); + //abusedComments[comment.data("id")] + $('.nbCommentsAbused').html((parseInt($('.nbCommentsAbused').html()) || 0) -1); + } + } + } + }, + error: + function(data) { + toastr.error('<?php echo Yii::t("comment","Error calling the serveur : contact your administrator.") ?>'); + } + }); + } + + + + function actionOnComment(comment, action, method) { + mylog.log(comment); + params=new Object, + params.id = comment.data("id"), + params.collection = '<?php echo Comment::COLLECTION?>', + params.action = action; + if(method){ + params.unset=method; + } + $.ajax({ + url: baseUrl+'/'+moduleId+"/action/addaction/", + data: params, + type: 'post', + global: false, + dataType: 'json', + success: + function(data) { + if(!data.result){ + toastr.error(data.msg); + } + else { + if (data.userAllreadyDidAction) { + toastr.info("You already vote on this comment."); + } else { + count = parseInt(comment.data("count")); + if(action=="reportAbuse"){ + toastr.success(trad["thanktosignalabuse"]); + + //to hide menu + $(".newsReport[data-id="+params.id+"]").hide(); + } + else{ mylog.log("dataINC:", data); + if(data.inc>=1) + toastr.success("<?php echo Yii::t("common", "Your vote has been successfully added") ?>"); + else + toastr.success("<?php echo Yii::t("common","Your vote has been successfully removed") ?>"); + } + // toastr.success(data.msg); + + comment.data( "count" , count+data.inc ); + icon = comment.children(".label").children(".fa").attr("class"); + comment.children(".label").html(comment.data("count")+" <i class='"+icon+"'></i>"); + } + } + }, + error: + function(data) { + toastr.error("Error calling the serveur : contact your administrator."); + } + }); + } + + + + function confirmDeleteComment(id, $this){ + // mylog.log(contextId); + var message = "<?php echo Yii::t("comment","Do you want to delete this comment") ?> ?"; + var boxComment = bootbox.dialog({ + message: message, + title: '<?php echo Yii::t("comment","You are going to delete this comment : are your sure ?") ?>', //Souhaitez-vous vraiment supprimer ce commentaire ? + buttons: { + annuler: { + label: trad.cancel, + className: "btn-default", + callback: function() { + mylog.log("Annuler"); + } + }, + danger: { + label: trad.delete, + className: "btn-primary", + callback: function() { + deleteComment(id,$this); + return true; + } + }, + } + }); + + boxComment.on("shown.bs.modal", function() { + $.unblockUI(); + }); + + boxComment.on("hide.bs.modal", function() { + $.unblockUI(); + }); + } + + function deleteComment(id,$this){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/comment/delete/id/"+id, + dataType: "json", + //data: {"newsId": idNews}, + success: function(data){ + if (data.result) { + mylog.log(data); + toastr.success("<?php echo Yii::t("common","Comment successfully deleted")?>"); + //liParent=$this.parents().eq(2); + //liParent.fadeOut(); + $("#item-comment-"+id).html(""); + $('.nbComments').html((parseInt($('.nbComments').html()) || 0) - 1); + if (data.comment.contextType=="news"){ + $(".newsAddComment[data-id='"+data.comment.contextId+"']").children().children(".nbNewsComment").text(parseInt($('.nbComments').html()) || 0 ); + } + } else { + toastr.error("Quelque chose a buggé"); //j'adore cette alert ;) ! + } + } + }); + } + + function editComment(idComment){ + // mylog.log(contextId); + isUpdatedComment=true; + var commentContent = comments[idComment].text; + var message = "<div id='container-txtarea-"+idComment+"' class='content-update-comment'>"+ + "<textarea id='textarea-new-comment"+idComment+"' class='form-control' placeholder='"+trad.modifyyourcomment+"'>"+commentContent+ + "</textarea>"+ + "</div>"; + var boxComment = bootbox.dialog({ + message: message, + title: '<?php echo Yii::t("comment","Update your comment"); ?>', //Souhaitez-vous vraiment supprimer ce commentaire ? + buttons: { + annuler: { + label: trad.cancel, + className: "btn-default", + callback: function() { + isUpdatedComment=false; + } + }, + enregistrer: { + label: trad.save, + className: "btn-success", + callback: function() { + updateComment(idComment,$("#textarea-new-comment"+idComment).val(), "#textarea-new-comment"+idComment); + isUpdatedComment=false; + return true; + } + }, + } + }); + + boxComment.on("shown.bs.modal", function() { + $.unblockUI(); + bindEventTextArea('#textarea-new-comment'+idComment, idComment, contextType, false, "", comments[idComment]); + }); + + boxComment.on("hide.bs.modal", function() { + $.unblockUI(); + }); + } + + + +</script> \ No newline at end of file diff --git a/views/cooperation/action.php b/views/cooperation/action.php new file mode 100644 index 0000000000000000000000000000000000000000..cd7340c95619304955c4f2d740e59fd26ba75fdf --- /dev/null +++ b/views/cooperation/action.php @@ -0,0 +1,288 @@ +<?php + //var_dump($action); exit; + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], $action["parentType"], $action["parentId"]); + $parentRoom = Room::getById($action["idParentRoom"]); + + if(isset(Yii::app()->session['userId'])){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $myRoles = @$me["links"]["memberOf"][@$action["parentId"]]["roles"] ? + @$me["links"]["memberOf"][@$action["parentId"]]["roles"] : array(); + }else{ + $myRoles = array(); + } + + //lock access if the user doesnt have the good role + $accessRoom = @$parentRoom ? Room::getAccessByRole($parentRoom, $myRoles) : ""; + if($accessRoom == "lock") exit; +?> + + +<?php if(@$access=="deny"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12"> + <h5 class="padding-left-10 letter-red"> + <i class="fa fa-ban"></i> Vous n'êtes pas autorisé à accéder à ce contenu + </h5> + <h5 class="padding-left-10 letter-red"> + <small>Devenez membre ou contributeur</small> + </h5> + </div> +<?php exit; } ?> + + +<div class="col-lg-7 col-md-6 col-sm-6 pull-left margin-top-15"> + <h4 class="letter-turq load-coop-data title-room" + data-type="room" data-dataid="<?php echo @$action["idParentRoom"]; ?>"> + <i class="fa fa-connectdevelop"></i> <?php echo @$parentRoom["name"]; ?> + </h4> + <br> +</div> + + +<div class="col-lg-5 col-md-6 col-sm-6"> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="Fermer cette fenêtre" data-placement="bottom" + id="btn-close-action"> + <i class="fa fa-times"></i> + </button> + <?php if($auth && @$action["creator"] == Yii::app()->session['userId']){ ?> + <div class="pull-right dropdown"> + <button class="btn btn-default margin-left-5 margin-top-10" data-toggle="dropdown"> + <i class="fa fa-cog"></i> options + </button> + <ul class="dropdown-menu"> + <li><a href="javascript:" id="btn-edit-action" + data-id-action="<?php echo $action["_id"]; ?>"> + <i class="fa fa-pencil"></i> Modifier l'action + </a> + </li> + <li><a href="javascript:" class="btn-option-status-action" + data-id-action="<?php echo $action["_id"]; ?>" + data-status="disabled"> + <i class="fa fa-times"></i> Désactiver l'action + </a> + </li> + <!-- <li><hr class="margin-5"></li> --> + <li><a href="javascript:" class="btn-option-status-action" + data-id-action="<?php echo $action["_id"]; ?>" + data-status="done"> + <i class="fa fa-trash"></i> Fermer l'action + </a> + </li> + </ul> + </div> + <?php } ?> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="Actualiser les données" data-placement="bottom" + data-id-action="<?php echo $action["_id"]; ?>" + id="btn-refresh-action"><i class="fa fa-refresh"></i></button> + + <button class="btn btn-default pull-right margin-left-5 margin-top-10 btn-extend-action tooltips" + data-original-title="Agrandir l'espace de lecture" data-placement="bottom"> + <i class="fa fa-long-arrow-left"></i> + </button> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 hidden btn-minimize-action tooltips" + data-original-title="Réduire l'espace de lecture" data-placement="bottom"> + <i class="fa fa-long-arrow-right"></i> + </button> +</div> + + +<div class="col-lg-12 col-md-12 col-sm-12 pull-left margin-top-15"> +<?php + //if no assignee , no startDate no end Date + $statusLbl = Yii::t("rooms", @$post["status"]); + //if startDate passed, or no startDate but has end Date + if(@$action["status"] == "todo"){ + if( (bool)strtotime(@$action["startDate"]) == FALSE && (bool)strtotime(@$action["endDate"]) == FALSE ){ + $action["status"] = "nodate"; + } + else if( strtotime(@$action["startDate"]) > time() ) + $action["status"] = "startingsoon"; + else if( ( isset($action["startDate"]) && strtotime($action["startDate"]) <= time() ) || + ( !@$action["startDate"] && @$action["endDate"] ) ) { + $action["status"] = "progress"; + if( strtotime(@$action["endDate"]) < time() ) + $action["status"] = "late"; + + } + } + +?> + + <hr style="margin-top:5px;"> + <h4 class="no-margin status-breadcrum"> + + <small><i class="fa fa-certificate"></i></small> + + <?php if(@$action["status"] == "todo"){ ?> + <span class="letter-green underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else if(@$action["status"] == "late"){ ?> + <span class="letter-orange underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else if(@$action["status"] == "progress"){ ?> + <span class="letter-green underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else if(@$action["status"] == "startingsoon"){ ?> + <span class="letter-green underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else if(@$action["status"] == "nodate"){ ?> + <span class="letter-orange underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else if(@$action["status"] == "disabled"){ ?> + <span class="letter-orange underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else{ ?> + <small><?php echo Yii::t("cooperation", "todo"); ?></small> + <?php } ?> + + <small><i class="fa fa-chevron-right"></i></small> + <?php if(@$action["status"] == "done"){ ?> + <span class="letter-red underline"><?php echo Yii::t("cooperation", $action["status"]); ?></span> + <?php }else{ ?> + <small><?php echo Yii::t("cooperation", "done"); ?></small> + <?php } ?> + </h4> + <hr> + <!-- <label class=""><i class="fa fa-bell"></i> Status : + <small class="letter-<?php echo Cooperation::getColorCoop($action["status"]); ?>"> + <?php echo Yii::t("cooperation", $action["status"]); ?> + </small> + </label> + <hr> --> + + <h4 class="no-margin"> + <i class="fa fa-clock-o"></i> Action à réaliser + <?php + if( @$action["startDate"] && (bool)strtotime(@$action["startDate"]) != FALSE ){ + ?> + du <small class="letter-blue"><?php echo date('d/m/Y', strtotime($action["startDate"])); ?> + <?php } ?> + + <?php if( @$action["endDate"] && (bool)strtotime(@$action["endDate"]) != FALSE ){ ?> + au <?php echo date('d/m/Y', strtotime($action["endDate"])); ?></small> + <?php } ?> + </h4> + + <?php if(@$action["idParentResolution"]){ $reso = Resolution::getById($action["idParentResolution"]); ?> + <hr> + <h5> + Cette action est liée à la résolution suivante : + <a href="javascript:;" + class="load-coop-data" data-type="resolution" data-dataid="<?php echo $action['idParentResolution']; ?>"> + <i class="fa fa-hashtag"></i> + <?php echo @$reso["title"] ? @$reso["title"] : substr(@$reso["description"], 0, 150); ?> + </a> + </h5> + <?php } ?> +</div> + + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-25"> + + <div class="padding-15 bg-lightblue radius-5" id="container-text-action" > + <?php if(@$action["name"]){ ?> + <h3><i class="fa fa-hashtag"></i> <?php echo @$action["name"]; ?></h3> + <?php } ?> + + <?php if(@$action["description"]){ + $action["description"] = Translate::strToClickable($action["description"]); + } ?> + + <?php echo nl2br(@$action["description"]); ?> + + <?php if(@$action["tags"]){ ?> + <br><br> <b>Tags : </b> + <?php foreach($action["tags"] as $key => $tag){ ?> + <span class="letter-red margin-right-15">#<?php echo $tag; ?></span> + <?php } ?> + + <?php } ?> + </div> +</div> + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-25" > + + <?php if(@$action["urls"]){ ?> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> + <h4 class=""><i class="fa fa-angle-down"></i> Liens externes</h4> + <?php foreach($action["urls"] as $key => $url){ ?> + <a href="<?php echo $url; ?>" target="_blank" class="btn btn-default bg-white shadow2 margin-bottom-5"> + <i class="fa fa-external-link"></i> <?php echo $url; ?> + </a> + <?php } ?> + <hr> + </div> + <?php } ?> + + + + <hr> + <?php if( @$action["links"]["contributors"] ) { ?> + <h4 class="pull-left"> + <i class="fa fa-angle-down"></i> <i class="fa fa-group"></i> Ils participent à cette action + </h4> + <?php } ?> + <?php if( $auth && !@$action["links"]["contributors"][Yii::app()->session['userId']] ){ ?> + <button class="btn btn-default letter-green bold pull-right btn-assignee" + data-target="#modalAssignMe" data-toggle="modal"> + <i class="fa fa-handshake-o"></i> + <?php echo Yii::t("rooms","I'll Do it") ?> + </button> + <?php }else if( $auth ){ ?> + <h5 class="letter-green pull-right"><i class="fa fa-check"></i> Vous participez à cette action</h5> + <?php } ?> + + + <?php if( @$action["links"]["contributors"] ) { ?> + <div class="col-lg-12 col-md-12 col-sm-12 no-padding margin-top-15"> + <?php foreach ($action["links"]["contributors"] as $id => $att) { // var_dump($att); + $contrib = Element::getByTypeAndId($att["type"], $id); ?> + <div class="col-lg-4 col-md-4 col-sm-6 link-assignee "> + <a href="#page.type.citoyens.id.<?php echo $id; ?>" + class="elipsis shadow2 lbh"> + <img width="40" height="40" alt="image" class="img-circle tooltips" + <?php if(@$contrib['profilThumbImageUrl']){ ?> + src="<?php echo Yii::app()->createUrl('/'.$contrib['profilThumbImageUrl']) ?>" + <?php } ?> + data-placement="top" data-original-title="<?php echo @$contrib['name']; ?>"> + <span class=""> + <?php if(false && @$att["isAdmin"]==true){ ?> + <i class="fa fa-user-secret letter-red"></i> + <?php } ?> + <b><?php echo @$contrib['name']; ?></b> + </span> + </a> + </div> + <?php } ?> + </div> + + <?php }else{ ?> + <h4><i class="fa fa-ban"></i> <i class="fa fa-group"></i> Aucun participant</h4> + <?php } ?> + +</div> + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-50 padding-bottom-5"> + <h4 class="text-center"> + <i class="fa fa-comments fa-2x margin-bottom-10"></i><br>Discussion<br> + <i class="fa fa-angle-down"></i> + </h4> +</div> + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-10 margin-bottom-50" id="comments-container"><hr></div> + + +<script type="text/javascript"> + var parentTypeElement = "<?php echo $action['parentType']; ?>"; + var parentIdElement = "<?php echo $action['parentId']; ?>"; + var idAction = "<?php echo $action['_id']; ?>"; + var idParentRoom = "<?php echo $action['idParentRoom']; ?>"; + var msgController = "<?php echo @$msgController ? $msgController : ''; ?>"; + + currentRoomId = idParentRoom; + + jQuery(document).ready(function() { + uiCoop.initUIAction(); + $(".load-coop-data[data-type='proposal']").removeClass("active"); + $(".load-coop-data[data-type='action']").removeClass("active"); + $(".load-coop-data[data-type='resolution']").removeClass("active"); + $(".load-coop-data[data-type='action'][data-dataid='"+idAction+"']").addClass("active"); + }); + + +</script> \ No newline at end of file diff --git a/views/cooperation/amendements.php b/views/cooperation/amendements.php new file mode 100644 index 0000000000000000000000000000000000000000..ea41fc3299dbf19153d8c39156da9d5dc5dc522b --- /dev/null +++ b/views/cooperation/amendements.php @@ -0,0 +1,181 @@ +<div class="col-lg-4 col-md-5 col-sm-6 padding-top-15 hidden pull-right bg-white shadow2" id="amendement-container"> + <div class="col-lg-12 col-md-12 col-sm-12"> + <h5 class="pull-left"><i class="fa fa-angle-down"></i> Amendements</h5> + <button class="btn btn-default pull-right tooltips" + data-original-title="Fermer cette fenêtre" data-placement="bottom" + id="btn-hide-amendement"><i class="fa fa-times"></i></button> + <button class="btn btn-default pull-right margin-right-5 tooltips" + data-original-title="Actualiser les données" data-placement="bottom" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + id="btn-refresh-amendement"><i class="fa fa-refresh"></i></button> + </div> + <div class="col-lg-12 col-md-12 col-sm-12"> + <hr> + <?php if($auth && @$proposal["status"] == "amendable"){ ?> + <button class="btn btn-link radius-5 text-purple col-lg-12 col-md-12 col-sm-12 btn-create-amendement"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation", "Submit an amendement"); ?> + </button> + <?php } else if(@$proposal["status"] != "amendable"){ ?> + <label class="bg-white letter-purple"> + <i class="fa fa-clock-o"></i> <?php echo Yii::t("cooperation", "Amendement session is closed"); ?> + </label> + <hr> + <?php } else if(!$auth){ ?> + <label class="badge bg-purple col-lg-12 col-md-12 col-sm-12"> + <i class="fa fa-lock"></i> <?php echo Yii::t("cooperation", "You must be member or contributor"); ?><br><?php echo Yii::t("cooperation", "to submit amendements"); ?> + </label> + <?php } ?> + </div> + + <div class="form-group col-lg-12 col-md-12 col-sm-12 hidden" id="form-amendement"> + <hr> + <label><i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation", "Write your amendement"); ?> :</label><br> + <small><i><?php echo Yii::t("cooperation", "If your amendement is adopted, it will be added to the principale proposal, <br>and will incorporated the final proposal, submited to vote."); ?></i></small><br><br> + <textarea class="form-control" rows="8" id="txtAmdt" placeholder="<?php echo Yii::t("cooperation", "your amendement"); ?>"></textarea> + <br> + <small class="pull-left"><i><?php echo Yii::t("cooperation", "Size max : 1000 caracters"); ?></i></small> + + <small class="pull-right" id="charsLeft"></small><br> + <small class="pull-left"><i>(<?php echo Yii::t("cooperation", "Size min : 10 caracters"); ?>)</i></small> + <div class="ol-lg-12 col-md-12 col-sm-12 margin-top-10 no-padding"> + <button class="btn btn-sm btn-link radius-5 bg-green-k pull-right" id="btn-save-amendement"> + <i class="fa fa-save"></i> <?php echo Yii::t("cooperation", "Save my amendement"); ?> + </button> + <button class="btn btn-sm btn-link radius-5 bg-red pull-right margin-right-10 btn-create-amendement"> + <i class="fa fa-times"></i> <?php echo Yii::t("common", "Cancel"); ?> + </button> + </div> + <hr class="col-lg-12 col-md-12 col-sm-12 no-padding"> + </div> + + <?php + $allVotesRes = array(); + + if(@$amendements){ + foreach($amendements as $key => $am){ + //var_dump($am); //exit; + $author = Person::getSimpleUserById(@$am["idUserAuthor"]); + $allVotes = @$am["votes"] ? $am["votes"] : array(); + $myId = Yii::app()->session["userId"]; + $hasVoted = Cooperation::userHasVoted($myId, $allVotes); + $voteRes = Proposal::getAllVoteRes($am); + unset($voteRes["uncomplet"]); + $allVotesRes[$key] = $voteRes; + + $this->renderPartial('../cooperation/pod/amendement', + array( "key"=>$key, "am"=>$am, + "proposal"=>@$proposal, + "author" => $author, + "voteRes" => $voteRes, + "allVotes" => $allVotes, + "myId" => $myId, + "auth" => $auth, + "hasVoted" => $hasVoted)); + } + }else{ + ?> + <div class="col-lg-12 col-md-12 col-sm-12 margin-top-"> + <h5 class="text-left"><i class="fa fa-ban"></i> <?php echo Yii::t("cooperation", "No amendement"); ?></h5> + </div> + <?php } ?> + +</div> + +<script type="text/javascript"> + var myPieChart; + var amendements = <?php echo json_encode(@$amendements); ?> ; + var allVotesRes = <?php echo json_encode($allVotesRes); ?>; + jQuery(document).ready(function() { //alert("start loadchart"); + + var i=0; + if(allVotesRes != null){ + $.each(allVotesRes, function(key, voteRes){ + var voteValues = new Array(); + var totalVotant = 0; + + if(voteRes.up != "undefined") { voteValues.push(voteRes.up.percent); totalVotant+=voteRes.up.votant; } + if(voteRes.down != "undefined") { voteValues.push(voteRes.down.percent); totalVotant+=voteRes.down.votant; } + if(voteRes.white != "undefined") { voteValues.push(voteRes.white.percent); totalVotant+=voteRes.white.votant; } + + if(totalVotant > 0) + chartInitAm(key, voteValues); + }); + } + + $("#btn-save-amendement").click(function(){ + uiCoop.saveAmendement(idParentProposal, "add"); + }); + + $(".btn-send-vote-amendement").click(function(){ + var voteValue = $(this).data('vote-value'); + var idAmdt = $(this).data('vote-id-amdt'); + console.log("send vote", voteValue), + uiCoop.sendVote("amendement", idParentProposal, voteValue, idParentRoom, idAmdt); + }); + + $("#btn-save-amendement").attr("disabled", "disabled"); + + $("#txtAmdt").keyup(function(){ + var txt = $(this).val(); + if(txt.length > 1000){ console.log('len1', txt.length); + txt = txt.substr(0, 1000); console.log('len2', txt.length); + $(this).val(txt); + } + if(txt.length >= 10){ + $("#charsLeft").addClass("letter-green"); + $("#btn-save-amendement").removeAttr("disabled"); + }else { + $("#charsLeft").removeClass("letter-green"); + $("#btn-save-amendement").attr("disabled", "disabled"); + } + + $("#charsLeft").html(txt.length+" / 1000"); + }); + + //$('#txtAmdt').limit('140','#charsLeft'); + }); + + function chartInitAm(key, data){ + console.log("chartInitAm", key, data); + var data = { + datasets: [{ + data: data, + // These labels appear in the legend and in the tooltips when hovering different arcs + backgroundColor: [ + '#34a853', + '#E33551', + '#FFF', + ], + borderColor: [ + '#34a853', + '#E33551', + '#aba9a9', + ], + borderWidth: 1 + }], + labels: [ + 'Pour', + 'Contre', + 'Blanc', + ], + + }; + var ctx = $("#res-vote-chart-"+key).get(0).getContext("2d"); + var options; + myPieChart = new Chart(ctx,{ + type: 'pie', + data: data, + options: { + responsive: true, + //maintainAspectRatio:false, + legend: { + display: false + }, + animation: { + duration: 300 + } + }, + //options: options + }); + } +</script> \ No newline at end of file diff --git a/views/cooperation/menuCoop.php b/views/cooperation/menuCoop.php new file mode 100644 index 0000000000000000000000000000000000000000..c1b2ba1c4dac455b2e5795df7a182fc708d77d51 --- /dev/null +++ b/views/cooperation/menuCoop.php @@ -0,0 +1,129 @@ +<?php + + $cssAnsScriptFilesTheme = array( + "/plugins/Chart-2.6.0/Chart.min.js" + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + + HtmlHelper::registerCssAndScriptsFiles( array('/css/cooperation.css'), Yii::app()->theme->baseUrl. '/assets'); +?> + +<style> + body.modal-open{ + overflow: hidden !important; + } + /* MODAL */ +</style> + + <?php + $menuCoopData = Cooperation::getCoopData($type, (string)$element["_id"], "room"); + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], $type, (string)$element["_id"]); + ?> + <li class="padding-10 submenucoop sub-rooms"> + <h3 class="padding-left-10 letter-turq"> + <i class="fa fa-connectdevelop"></i> <?php echo Yii::t("cooperation", "CO-space"); ?> + </h3> + + </li> + + <li class="submenucoop sub-rooms"><hr></li> + + <?php if(@$access=="deny"){ ?> + <li class="padding-10 submenucoop sub-rooms"> + <h5 class="padding-left-10 letter-red"> + <i class="fa fa-ban"></i> Vous n'êtes pas autorisé à accéder à ce contenu + </h5> + <?php if(!isset(Yii::app()->session['userId'])){ ?> + <h5 class="padding-left-10"> + <small class="letter-orange"><i class="fa fa-user-circle"></i> Vous n'êtes pas connecté</small> + </h5> + <?php } ?> + <h5 class="padding-left-10 letter-red"> + <small>Devenez membre ou contributeur</small> + </h5> + </li> + <?php exit; } ?> + + <div id="coop-room-list" class="margin-bottom-50"> + <?php $this->renderPartial('../cooperation/roomList', array("roomList"=>$menuCoopData["roomList"], + "auth"=>$auth, + "parentType" => @$parentType, + "parentId" => @$parentId)); ?> + </div> + + <?php if(!@$menuCoopData["roomList"]) return; ?> + + + <!----------------- PROPOSALS ------------ --> + <li> + <a href="javascript:" class="title-section elipsis open" data-key="proposals"> + <i class="fa fa-caret-down"></i> + <i class="fa fa-inbox"></i> <?php echo Yii::t("cooperation", "Proposals") ?> + </a> + </li> + + <li class="submenucoop hidden sub-proposals"><hr></li> + + <?php $allStatus = array("amendable"=>"Amendable", + "tovote"=>"To vote", + "disabled"=> "Disabled", + "resolved"=> "Resolved", + "closed" => "Closed"); + + if(Yii::app()->session['userId']) + $allStatus["mine"] = "My proposals"; + + foreach($allStatus as $status=>$tradStatus){ ?> + + <li class="submenucoop sub-proposals"> + <a href="javascript:" class="load-coop-data" data-type="proposal" data-status="<?php echo $status ?>"> + <i class="fa fa-<?php echo Cooperation::getIconCoop($status); ?>"></i> <?php echo Yii::t("cooperation", $tradStatus) ?> + <span class="badge pull-right bg-<?php echo Cooperation::getColorCoop($status); ?> margin-right-10"> + <?php echo @$menuCoopData["allCount"]["proposals"][$status]; ?> + </span> + </a> + </li> + <?php } ?> + + + + <!-- ------------ ACTIONS -------------- --> + <li> + <a href="javascript:" class="title-section elipsis open" data-key="actions"> + <i class="fa fa-caret-down"></i> + <i class="fa fa-inbox"></i> <?php echo Yii::t("cooperation", "Actions") ?> + </a> + </li> + + <li class="submenucoop hidden sub-actions"><hr></li> + + <?php $allStatus = array("todo"=>"To do", + "disabled"=> "Disabled", + "done" => "Done"); + + if(Yii::app()->session['userId']) + $allStatus["mine"] = "My actions"; + + foreach($allStatus as $status=>$tradStatus){ ?> + + <li class="submenucoop sub-actions"> + <a href="javascript:" class="load-coop-data" data-type="action" data-status="<?php echo $status ?>"> + <i class="fa fa-<?php echo Cooperation::getIconCoop($status); ?>"></i> <?php echo Yii::t("cooperation", $tradStatus) ?> + <span class="badge pull-right bg-<?php echo Cooperation::getColorCoop($status); ?> margin-right-10"> + <?php echo @$menuCoopData["allCount"]["actions"][$status]; ?> + </span> + </a> + </li> + <?php } ?> + + +<li class="submenucoop sub-rooms margin-top-50"></li> + + <!-- ----------- RESOLUTION --------------- --> + <li class="hidden"> + <a href="javascript:" class="title-section" data-key="resolutions"> + <!-- <i class="fa fa-caret-right"></i> --> + <i class="fa fa-inbox margin-left-25"></i> <?php echo Yii::t("cooperation", "Resolutions") ?> + </a> + </li> + diff --git a/views/cooperation/menuRoom.php b/views/cooperation/menuRoom.php new file mode 100644 index 0000000000000000000000000000000000000000..b16dc6f2f7b75707f154cbbc1e16c6e34c671797 --- /dev/null +++ b/views/cooperation/menuRoom.php @@ -0,0 +1,514 @@ +<style> + body .load-coop-data .progress{ + display: none; + } + #menu-room .load-coop-data .progress{ + display: block; + } + body .load-coop-data, + #menu-room .load-coop-data{ + /*border-left: 3px solid #3C545D;*/ + padding:8px; + margin-top:5px; + font-size: 15px; + line-height: 17px; + } + + #menu-room .sub-resolutions .load-coop-data{ + line-height: 14px; + } +</style> + +<?php + $auth = false; + if(@$room){ + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], @$room["parentType"], @$room["parentId"]); + //$menuCoopData = Cooperation::getCoopData(@$room["parentType"], @$room["parentId"], "room"); + $parentId = @$room["parentId"]; $parentType = @$room["parentType"]; + + } + else if(@$post["parentType"]){ + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], @$post["parentType"], @$post["parentId"]); + //$menuCoopData = Cooperation::getCoopData(@$post["parentType"], @$post["parentId"], "room"); + $parentId = @$post["parentId"]; $parentType = @$post["parentType"]; + } + + if(isset(Yii::app()->session['userId'])){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $myRoles = @$me["links"]["memberOf"][@$parentId]["roles"] ? + @$me["links"]["memberOf"][@$parentId]["roles"] : array(); + }else{ + $myRoles = array(); + } + + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], @$parentType, @$parentId); + + $isAdmin = Authorisation::isElementAdmin(@$parentId, @$parentType, Yii::app()->session['userId']); + + $thisType = @$parentType; //@$room ? @$room["parentType"] : @$post["parentType"]; +?> + + + +<?php $accessRoom = @$room ? Room::getAccessByRole($room, $myRoles) : ""; ?> + +<div class="col-lg-12 col-md-12 col-sm-12 no-padding bg-white text-dark" id="coop-container"> + + <?php + if(isset($roomList) && empty(@$roomList)){ ?> + <div class="col-lg-12 col-md-12 col-sm-12" id="menu-room"> + <?php $this->renderPartial('../cooperation/pod/home', array("type"=>$thisType)); ?> + </div> + <?php }else{ ?> + + <div class="col-lg-12 col-md-12 col-sm-12 bg-white" id="menu-room"> + + <?php if(@$room){ ?> + + <?php if(@$auth && $accessRoom != "lock"){ ?> + <button class="btn btn-default pull-right btn-sm margin-top-10 hidden-min tooltips" + data-target="#modalDeleteRoom" data-toggle="modal" id="btn-open-modal-delete"> + <i class="fa fa-trash"></i> <?php echo Yii::t("common", "Delete"); ?> + </button> + <button class="btn btn-default pull-right btn-sm margin-top-10 hidden-min tooltips margin-right-5" + id="btn-edit-room" data-placement="bottom" + data-original-title="<?php echo Yii::t("cooperation", "Edit this space"); ?> : <?php echo @$room["name"]; ?>" + data-id-room="<?php echo @$room["_id"]; ?>"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Update"); ?> + </button> + <?php } ?> + + <button class="btn btn-link text-dark pull-right btn-sm margin-top-5 hidden-min tooltips margin-right-5" + id="btn-edit-room" data-placement="bottom" + data-original-title="<?php echo Yii::t("common", "Help"); ?>" + data-toggle="modal" data-target="#modalHelpCOOP"> + <i class="fa fa-2x fa-info-circle"></i> + </button> + + <h3 class="margin-top-15 letter-turq"> + <i class="fa fa-connectdevelop"></i> + <i class="fa fa-hashtag"></i> <?php echo @$room["name"]; ?> + </h3> + + + <h4 class="room-desc"><small><?php echo @$room["description"]; ?></small></h4> + + <?php if(@$room["roles"] && @$room["roles"] != ""){ ?> + <?php + $roomRoles = @$room["roles"]; + if(!is_array(@$room["roles"])) + $roomRoles = explode(",", @$room["roles"]); + ?> + <h5 class="room-desc"> + <small class="letter-blue"> + <b><i class="fa fa-unlock-alt"></i> <?php echo Yii::t("cooperation","Access restricted only for"); ?> : </b> + <?php $r = ""; foreach ($roomRoles as $role) { + if($r!="") $r.=", "; $r.=$role; + } echo $r; ?> + </small> + </h5> + <?php } ?> + + <hr> + + <?php }else{ ?> + <h3 class="margin-top-15 elipsis"> + <i class="fa fa-search"></i> + <?php $thisStatus = @$post["status"] ? @$post["status"] : "all status"; ?> + <?php echo Yii::t("cooperation", @$post["type"])." <small>". + Yii::t("cooperation", @$thisStatus)."</small>"; ?> + </h3> + <hr> + + <?php } ?> + + + <?php if(@$access=="deny"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12"> + <h5 class="padding-left-10 letter-red"> + <i class="fa fa-ban"></i> <?php echo Yii::t("cooperation", "You are not allowed to access this content"); ?> + </h5> + + <?php if(!isset(Yii::app()->session['userId'])){ ?> + <h5 class="padding-left-10"> + <small class="letter-orange"><i class="fa fa-user-circle"></i> + <?php echo Yii::t("cooperation", "You are not logged"); ?> + </small> + </h5> + <?php } ?> + + <h5 class="padding-left-10 letter-red"> + <small><?php echo Yii::t("cooperation", "You must be member or contributor"); ?></small> + </h5> + </div> + <?php exit; } ?> + + <?php if(@$accessRoom=="lock"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12"> + <h5 class="padding-left-10 letter-red"> + <i class="fa fa-ban"></i> <?php echo Yii::t("cooperation", "You are not allowed to access this content"); ?> + </h5> + + <?php + $rolesLabel = ""; + if(!is_array(@$room["roles"])) $rolesLabel = @$room["roles"]; + else foreach (@$room["roles"] as $r) $rolesLabel .= $rolesLabel == "" ? $r : ", ".$r; + ?> + <h5 class="padding-left-10 letter-red"> + <small> + <?php echo Yii::t("cooperation", "This space is open only for this roles"); ?> : + <?php echo Yii::t("cooperation", $rolesLabel); ?> + </small> + </h5> + </div> + <?php exit; } ?> + + <ul class="menuCoop margin-bottom-50"> + + <?php if(@$post["type"] == Proposal::CONTROLLER || @$post["type"] == Room::CONTROLLER){ ?> + <div class="margin-top-25 title-section"> + <!-- <a href="javascript:" + class="pull-left open elipsis btn-hide-data-room visible-sm visible-xs" + style="margin-left:-10px;" data-key="proposals"> + <i class="fa fa-caret-down"></i> + </a> --> + <i class="fa fa-inbox"></i> + <?php echo Yii::t("cooperation", "Proposals") ?> + + <?php + if(@$post["type"] == Room::CONTROLLER && $auth){ + ?> + <a href="javascript:dyFObj.openForm('proposal')" class="letter-green btn-add"> + <i class="fa fa-plus-circle tooltips" data-placement='top' data-toogle='tooltips' + data-original-title="<?php echo Yii::t("cooperation", "Add proposal") ?>"></i> + <span class="hidden-min hidden-sm"><?php echo Yii::t("cooperation", "Add proposal") ?></span> + </a> + <?php }else if(@$post["type"] == Room::CONTROLLER){ ?> + <label class="text-black tooltips" + data-position="top" data-original-title="<?php echo Yii::t("cooperation", "You must be member or contributor to contribuate"); ?> "> + <i class="fa fa-lock"></i> + </label> + <?php } ?> + + <input type="text" class="inputSearchInMenuRoom pull-right form-input hidden-min hidden-xs" + data-type-search="proposals" + placeholder="<?php echo Yii::t("cooperation", "Search in proposals") ?>..." /> + + + </div> + + + + <?php if(@$proposalList){ + foreach(array("tovote", "amendable", "closed", "disabled", "resolved") as $thisStatus){ + foreach($proposalList as $key => $proposal){ ?> + <?php $totalVotant = Proposal::getTotalVoters($proposal); ?> + <?php $isAuthor = Yii::app()->session['userId'] == $proposal["creator"]; ?> + <?php if(@$proposal["status"] == $thisStatus){ ?> + <li class="submenucoop sub-proposals no-padding col-lg-4 col-md-6 col-sm-6 " + data-name-search="<?php echo str_replace('"', '', @$proposal["title"]); ?>"> + <a href="javascript:;" class="load-coop-data " data-type="proposal" + data-status="<?php echo @$proposal["status"]; ?>" + data-dataid="<?php echo (string)@$proposal["_id"]; ?>"> + + <?php if((@$proposal["status"] == "amendable" || + @$proposal["status"] == "tovote") && + ($isAdmin || $isAuthor)){ ?> + <span class="elipsis draggable" + data-dataid="<?php echo (string)@$proposal["_id"]; ?>" + data-type="proposals" > + <i class="fa fa-arrows-alt letter-light tooltips" + data-original-title="<?php echo Yii::t("cooperation", "Drag / drop to an other space") ?>" + data-placement="right"></i> + <i class="fa fa-hashtag"></i> + <?php if(@$proposal["title"]) + echo @$proposal["title"]; + else echo "<small><b>". + substr(@$proposal["description"], 0, 150). + "</b></small>"; + ?> + </span> + + <?php }else{ ?> + <small class="elipsis"><b> + <i class="fa fa-hashtag"></i> + <?php echo substr(@$proposal["description"], 0, 150); ?></b> + </small> + <?php } ?> + + <?php if(@$post["status"]) { + $parentRoom = Room::getById(@$proposal["idParentRoom"]); ?> + <br> + <small class="elipsis"> + <i class="fa fa-connectdevelop"></i> <?php echo @$parentRoom["name"]; ?> + </small> + <?php } ?> + + <br> + + <small class="letter-light lbl-status"> + <i class="fa fa-<?php echo Cooperation::getIconCoop(@$proposal["status"]); ?>"></i> + <b><?php echo Yii::t("cooperation", @$proposal["status"]); ?></b> + </small> + + <?php if(@$proposal["status"] == "tovote"){ ?> + <small class="letter-light margin-left-10 tooltips" + data-original-title="<?php echo Yii::t("cooperation", "number of voters") ?>"> + <i class="fa fa-group"></i> + <?php echo $totalVotant; ?> + </small> + + <?php } ?> + <?php if(@$proposal["status"] == "amendable" || @$proposal["status"] == "tovote"){ ?> + <small class="letter-light margin-left-10"> + <i class="fa fa-clock-o"></i> + <?php if(@$proposal["amendementDateEnd"] && @$proposal["status"] == "amendable") + echo Yii::t("cooperation", "end") ." ". + //$proposal["amendementDateEnd"]; + //date("Y-m-d H:i:s", $proposal["amendementDateEnd"]); + Translate::pastTime($proposal["amendementDateEnd"], "date"); + + else if(@$proposal["voteDateEnd"] && @$proposal["status"] == "tovote" ) + echo Yii::t("cooperation", "end") ." ". + Translate::pastTime($proposal["voteDateEnd"], "date"); + ?> + </small> + <?php } ?> + + <div class="progress <?php if($proposal["status"] != "tovote") echo "hidden-min"; ?>"> + <?php + $voteRes = Proposal::getAllVoteRes($proposal); + foreach($voteRes as $key => $value){ + if($totalVotant > 0 && $value["percent"] > 0){ + ?> + <div class="progress-bar bg-<?php echo $value["bg-color"]; ?>" role="progressbar" + style="width:<?php echo $value["percent"]; ?>%"> + <?php echo $value["percent"]; ?>% + </div> + <?php } ?> + <?php } ?> + + <?php if($totalVotant == 0 && @$proposal["status"] == "tovote"){ ?> + <div class="progress-bar bg-turq" + role="progressbar" style="width:100%"> + <?php echo Yii::t("cooperation", "Be the first to vote"); ?> + </div> + <?php } ?> + + <?php if($totalVotant == 0 && @$proposal["status"] == "amendable"){ ?> + <div class="progress-bar bg-lightpurple text-dark" + role="progressbar" style="width:100%"> + <?php echo Yii::t("cooperation", "Processing amendements"); ?> + </div> + <?php } ?> + + <?php if($totalVotant == 0 && @$proposal["status"] == "closed"){ ?> + <div class="progress-bar bg-white text-dark" + role="progressbar" style="width:100%"> + <?php echo Yii::t("cooperation", "No vote"); ?> + </div> + <?php } ?> + + </div> + </a> + </li> + <?php } //end if ?> + <?php } //end foreach ?> + <?php } //end foreach ?> + <?php }else{ ?> + <li class="submenucoop sub-proposals col-lg-12 col-md-12 col-sm-12"> + <i class="fa fa-ban margin-left-15"></i> <?php echo Yii::t("cooperation", "No proposal") ?> + </li> + <?php } ?> + + <hr class="col-lg-12 col-md-12 col-sm-12 no-padding margin-bottom-25"> + + <?php } ?> + + + <?php //var_dump($proposalList); ?> + <?php if(@$resolutionList || @$room){ ?> + <div class="margin-top-25 title-section col-lg-12 col-md-12 col-sm-12"> + <i class="fa fa-inbox"></i> + <?php echo Yii::t("cooperation", "Resolutions") ?> + + <input type="text" class="inputSearchInMenuRoom pull-right form-input hidden-min hidden-xs" + data-type-search="resolutions" + placeholder="<?php echo Yii::t("cooperation", "Search in resolution") ?>..." /> + </div> + + <?php if(@$resolutionList) + foreach($resolutionList as $key => $resolution){ ?> + <li class="submenucoop sub-resolutions no-padding col-lg-4 col-md-6 col-sm-6" + data-name-search="<?php echo str_replace('"', '', @$resolution["title"]); ?>"> + <a href="javascript:;" class="load-coop-data" data-type="resolution" + data-status="<?php echo @$resolution["status"]; ?>" + data-dataid="<?php echo (string)@$resolution["_id"]; ?>"> + + <span class="elipsis"> + <i class="fa fa-hashtag"></i> + <?php if(@$resolution["title"]) + echo @$resolution["title"]; + else echo "<small><b>". + substr(@$resolution["description"], 0, 150). + "</b></small>"; + ?> + </span> + </a> + </li> + <?php }else{ ?> + <li class="submenucoop sub-resolutions col-lg-12 col-md-12 col-sm-12"> + <i class="fa fa-ban margin-left-15"></i> <?php echo Yii::t("cooperation", "No resolution") ?> + </li> + <?php } ?> + + <hr class="col-md-12 no-padding margin-bottom-25"> + + <?php } ?> + + + <?php if(@$post["type"] == Action::CONTROLLER || @$post["type"] == Room::CONTROLLER){ ?> + <div class="margin-top-25 title-section col-lg-12 col-md-12 col-sm-12"> + <!-- <a href="javascript:" class="open elipsis pull-left btn-hide-data-room visible-sm visible-xs" + style="margin-left:-10px;" data-key="actions"> + <i class="fa fa-caret-down"></i> + </a> --> + <i class="fa fa-inbox"></i> + <?php echo Yii::t("cooperation", "Actions") ?> + + <?php if(@$post["type"] == Room::CONTROLLER && $auth){ ?> + <a href="javascript:dyFObj.openForm('action')" class="letter-green btn-add"> + <i class="fa fa-plus-circle tooltips" + data-placement='top' data-toogle='tooltips' + data-original-title="<?php echo Yii::t("cooperation", "Add action") ?>"></i> + <span class="hidden-min hidden-sm"><?php echo Yii::t("cooperation", "Add action") ?></span> + </a> + <?php }elseif(@$post["type"] == Room::CONTROLLER){ ?> + <label class="text-black tooltips" + data-position="top" data-original-title="Devenez membre pour contribuer"> + <i class="fa fa-lock"></i> + </label> + <?php } ?> + + <input type="text" class="inputSearchInMenuRoom pull-right form-input hidden-min hidden-xs" + data-type-search="actions" + placeholder="<?php echo Yii::t("cooperation", "Search in actions") ?>..." /> + + + </div> + + <?php if(@$actionList) + foreach($actionList as $key => $action){ ?> + <li class="submenucoop sub-actions no-padding col-lg-4 col-md-6 col-sm-6" + data-name-search="<?php echo str_replace('"', '', @$action["name"]); ?>"> + <a href="javascript:;" + class="load-coop-data" data-type="action" + data-status="<?php echo @$action["status"]; ?>" + data-dataid="<?php echo (string)@$action["_id"]; ?>"> + <?php if(@$action["status"] == "todo" && $auth){ ?> + <span class="elipsis draggable" + data-dataid="<?php echo (string)@$action["_id"]; ?>" + data-type="actions" > + <i class="fa fa-arrows-alt letter-light tooltips" + data-original-title="<?php echo Yii::t("cooperation", "Drag / drop to an other space") ?>" + data-placement="right"></i> + <i class="fa fa-hashtag"></i> + <?php echo @$action["name"]; ?> + </span> + <?php }else{ ?> + <span class="elipsis"> + <i class="fa fa-hashtag"></i> + <?php echo @$action["name"]; ?> + </span> + <?php } ?> + <?php if(@$post["status"]) { $parentRoom = Room::getById($action["idParentRoom"]); ?> + <br> + <small class="elipsis"> + <i class="fa fa-connectdevelop"></i> <?php echo @$parentRoom["name"]; ?> + </small> + <?php } ?> + <br> + <small class="letter-light lbl-status"> + <i class="fa fa-pencil"></i> <b><?php echo Yii::t("cooperation", @$action["status"]); ?></b> + </small> + <small class="letter-light margin-left-10"> + <i class="fa fa-clock-o"></i> + <?php + if(@$action["endDate"]) + echo Yii::t("cooperation", "end") ." ". + Translate::pastTime($action["endDate"], "date"); + + ?> + </small> + </a> + </li> + <?php }else{ ?> + <li class="submenucoop sub-actions col-lg-12 col-md-12 col-sm-12"> + <i class="fa fa-ban margin-left-15"></i> <?php echo Yii::t("cooperation", "No action") ?> + </li> + <?php } ?> + + <hr class="col-lg-12 col-md-12 col-sm-12 no-padding margin-bottom-25"> + + <?php } ?> + + </ul> + + </div> + + <?php } ?> + + <div class="hidden" id="coop-data-container"> + + </div> + +</div> + + + + +<script type="text/javascript"> + var currentRoomId = "<?php echo @$room["_id"] ? $room["_id"] : ""; ?>"; + var currentRoomName = "<?php echo @$room["name"] ? $room["name"] : ""; ?>"; + + console.log("currentRoomId", currentRoomId); + + jQuery(document).ready(function() { + + $("#btn-edit-room").click(function(){ + + }); + + $("#btn-open-modal-delete").off().click(function(){ + $("#modalDeleteRoom #btn-delete-room").attr("data-id-room", currentRoomId); + $("#modalDeleteRoom #space-name").html(currentRoomName); + }); + + $("#btn-edit-room").click(function(){ + var idRoom = $(this).data("id-room"); + dyFObj.editElement('rooms', idRoom); + }); + + $("#btn-delete-room").off().click(function(){ + var idRoom = $(this).data("id-room"); + uiCoop.deleteByTypeAndId("rooms", currentRoomId); + }); + //alert("initDrag"); + //uiCoop.initDragAndDrop(); + + uiCoop.initDragAndDrop(); + uiCoop.initSearchInMenuRoom(); + + if(currentRoomId != ""){ + addCoopHash=".view.coop.room." + currentRoomId; + if(typeof hashUrlPage != "undefined") + location.hash = hashUrlPage +addCoopHash; + else if(notNull(contextData) && typeof contextData.slug != "undefined") + location.hash = "#" + contextData.slug + addCoopHash; + else + location.hash = "#page.type." + parentTypeElement + ".id." + parentIdElement +addCoopHash; + } + + }); + +</script> \ No newline at end of file diff --git a/views/cooperation/pod/amendement.php b/views/cooperation/pod/amendement.php new file mode 100644 index 0000000000000000000000000000000000000000..75dd50d03ab0be11a8ec23dafd029bb54d78edf4 --- /dev/null +++ b/views/cooperation/pod/amendement.php @@ -0,0 +1,118 @@ +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 shadow2 margin-top-15 margin-bottom-15 padding-15 podVoteAmendement"> + + <?php if(Yii::app()->session["userId"]==$am["idUserAuthor"]){ ?> + <button class="btn btn-sm btn-default pull-right btn-modal-delete-am" + data-toggle="modal" data-target="#modalDeleteAm" title="<?php echo Yii::t("cooperation", "Delete my amendement"); ?>" + data-id-am="<?php echo $key; ?>"> + <i class="fa fa-trash"></i> + </button> + <?php } ?> + + <div class="col-lg-9 col-md-9 col-sm-8 col-xs-8 pull-left no-padding"> + <!-- <img src="<?php echo $this->module->assetsUrl.'/images/thumbnail-default.jpg'; ?>" + class="img-circle pull-left margin-right-10" height="30" width="30"> + <label class="pull-left margin-top-5"><?php echo @$author["username"]; ?></label> --> + + <label class="pull-left"><span class="badge bg-purple">n°<?php echo $key; ?></span> <span class="letter-green"> + <i class="fa fa-angle-right"></i> <?php echo Yii::t("cooperation", "Add"); ?></span> + </label> + + + <?php if($hasVoted!=false){ ?> + <h5 class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-top-10 no-padding"> + <?php echo Yii::t("cooperation", "You did vote"); ?> + <span class="letter-<?php echo Cooperation::getColorVoted($hasVoted); ?>"> + <?php echo Yii::t("cooperation", $hasVoted); ?> + </span><br> + <small class="text-dark"><?php echo Yii::t("cooperation", "You can change your vote anytime"); ?> </small> + </h5> + <?php }else{ ?> + <h5 class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-top-10 no-padding"> + <?php if($auth){ ?> + <?php echo Yii::t("cooperation", "You did not vote"); ?><br> + <?php if($proposal["status"] == "amendable"){ ?> + <small class="text-dark"> + <?php echo Yii::t("cooperation", "Vote open until"); ?> : + <?php echo date('d/m/Y H:i e', strtotime($proposal["amendementDateEnd"])); ?> + </small> + <?php } ?> + <?php }else{ ?> + <small class="text-dark"> + <?php echo Yii::t("cooperation", "You must be member or contributor to vote"); ?> + </small> + <?php } ?> + </h5> + <?php } ?> + + </div> + + <div class="col-lg-2 col-md-3 col-sm-3 col-xs-2 pull-right"> + <canvas class="" id="res-vote-chart-<?php echo $key; ?>" width="50%" height="50px"/> + </div> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-10 no-padding"> + <hr> + </div> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-10 no-padding textAmdt"> + <?php echo @$am["textAdd"]; ?> + </div> + + + <div class="col-lg-12 col-md-12 col-sm-12 pull-left no-padding"> + <hr> + <small> + <i class="fa fa-2x fa-balance-scale"></i> <?php echo Yii::t("cooperation", "Majority"); ?> : + <b><?php echo @$proposal["majority"]; ?>%</b> + <?php if(@$voteRes["up"] && @$voteRes["up"]["percent"] && $voteRes["up"]["percent"] > @$proposal["majority"] ){ ?> + <span class="pull-right badge bg-green-k margin-top-5 padding-5"> + <?php if($proposal["status"] == "amendable"){ ?><?php echo Yii::t("cooperation", "temporaly"); ?> <?php }else{ ?><?php echo Yii::t("cooperation", "definitively"); ?><?php } ?> + <span class="bold"><?php echo Yii::t("cooperation", "validated"); ?></span></span> + <?php }else{ ?> + <span class="pull-right badge bg-red margin-top-5 padding-5"> + <?php if($proposal["status"] == "amendable"){ ?><?php echo Yii::t("cooperation", "temporaly"); ?> <?php }else{ ?><?php echo Yii::t("cooperation", "definitively"); ?><?php } ?> + <span class="bold"><?php echo Yii::t("cooperation", "refused"); ?></span></span> + <?php } ?> + </small> + + </div> + + + <?php + foreach ($voteRes as $keyV => $value) { //var_dump($auth); + ?> + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center pull-left margin-top-5 padding-5"> + <?php if(@$proposal["status"] == "amendable" && $auth){ ?> + <button class="btn btn-link btn-sm bg-<?php echo $value["bg-color"]; ?> btn-send-vote-amendement + tooltips col-lg-12 col-md-12 col-sm-12 col-xs-12" + data-vote-id-amdt="<?php echo @$key; ?>" + data-vote-value="<?php echo $value["voteValue"]; ?>" + data-original-title="<?php echo Yii::t("cooperation", "click to vote"); ?>" data-placement="bottom"> + <?php echo Yii::t("cooperation", $keyV); ?> (<?php echo $value["percent"]; ?>%) + </button> + <?php }else{ ?> + <label class="badge padding-10 bg-<?php echo $value["bg-color"]; ?> col-lg-12 col-md-12 col-sm-12 col-xs-12"> + <?php echo Yii::t("cooperation", $keyV); ?> (<?php echo $value["percent"]; ?>%) + </label> + <?php } ?> + </div> + + <?php } ?> + + <?php + foreach ($voteRes as $keyV => $value) { //var_dump($auth); + ?> + <div class="col-lg-4 col-md-4 col-sm-4 col-xs-4 text-center pull-left margin-top-5 padding-5"> + <?php if(@$proposal["status"] == "amendable" && $auth){ ?> + <div class="letter-<?php echo $value["bg-color"]; ?> + tooltips col-lg-12 col-md-12 col-sm-12 col-xs-12" + data-original-title="<?php echo Yii::t("cooperation", "number of voters"); ?>" data-placement="bottom"> + <i class="fa fa-group"></i> <b><?php echo $value["votant"]; ?></b> + </div> + <?php } ?> + </div> + + <?php } ?> + + +</div> \ No newline at end of file diff --git a/views/cooperation/pod/home.php b/views/cooperation/pod/home.php new file mode 100644 index 0000000000000000000000000000000000000000..bdd345406cb70c5c69fffd5c7190d5e91893c214 --- /dev/null +++ b/views/cooperation/pod/home.php @@ -0,0 +1,124 @@ +<style> + .help-coop{ + padding: 0 15px; + } +</style> +<div class="help-coop font-montserrat margin-bottom-50"> + <h2 class="letter-turq">Bienvenue dans votre espace coopératif</h2> + <hr> + <h3>A quoi ça sert ?</h3> + <hr> + <p style="font-size: 13px;"> + L'espace coopératif peut être considéré comme un outil de gestion de projet collaboratif, permettant de mettre en place une forme de <b>gouvernance transparente et horizontale</b>. + <br> + <br> + + C'est un outil d'aide à la décision, qui vous permettra de prendre des <b>décisions collectives</b>, + en concertation avec l'ensemble des + <?php if($type == Organization::COLLECTION){ ?> membres de votre organisation.<?php } ?> + <?php if($type == Project::COLLECTION){ ?> contributeurs de votre projet.<?php } ?> + <br> + Il vous permettra également de gérer les différentes <b>actions</b> (tâches) à réaliser dans le cadre de votre activité, + et d'attribuer ces actions à vos + <?php if($type == Organization::COLLECTION){ ?> membres.<?php } ?> + <?php if($type == Project::COLLECTION){ ?> contributeurs.<?php } ?> + </p> + <hr> + <h3>Comment ça marche ?</h3> + <hr> + <p style="font-size: 13px;"> + Parce que chaque + <?php if($type == Organization::COLLECTION){ ?> organisation est différente, <?php } ?> + <?php if($type == Project::COLLECTION){ ?> projet est différent, <?php } ?> + vous commencerez par créer des espaces thématiques en fonction de vos besoins. + <br> + Par exemple, si vous gérez un club sportif, vous pourrez créer un espace nommé "Utilisation du bugdet du club", dans lequel vos adhérents pourront faire leurs propositions en lien avec ce thème. + <br><br> + Chaque espace ainsi créé peut recevoir des propositions et des actions, en lien avec le thème de l'espace. + <br><br> + </p> + + <hr> + <h3>C'est parti !</h3> + <hr> + + <p style="font-size: 13px;"> + Créez votre premier espace coopératif, en cliquant sur le bouton + <a href="javascript:dyFObj.openForm('room')" class="letter-green bold"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("cooperation", "Create room") ?> + </a><br> + (Vous retrouverez ce bouton dans le menu situé à gauche de votre écran) + <br><br> + Votre nouvel espace s'affichera dans le menu de gauche, et vous pourrez immédiatement faire votre première <b>proposition</b> en cliquant sur le bouton <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/dda_help/addproposal.png" height=30> + </p> + + <br> + <hr> + <h3>Proposer, amender, voter...</h3> + <hr> + + <p style="font-size: 13px;"> + <h5>Ce sont les 3 étapes incontournables du processus de décision collective que nous vous proposons :</h5> + <ul class="padding-25"> + <li> + <b>1 - Proposer :</b> Une proposition est un texte écrit par un + <?php if($type == Organization::COLLECTION){ ?> membre de votre organisation<?php } ?> + <?php if($type == Project::COLLECTION){ ?> contributeur de votre projet<?php } ?>. + <br> + L'auteur d'une proposition peut activer ou désactiver la <i>procédure d'amendement</i>, selon la nécessité ou non de celle-ci. Il en définit également la durée. + <br> + L'auteur définit également la durée de la <i>procédure de vote</i>, plus ou moins longue en fonction du besoin de reflexion collective autour du sujet proposé. + <br><br> + </li> + <li> + <b>2 - Amender :</b> Un amendement est une modification, soumise au vote, dont le but est de corriger, compléter ou annuler tout ou une partie de la proposition en cours de délibération.<br> + <i>(actuellement, il est seulement possible de compléter la proposition par ajout d'information. La modification, et suppression, ne sont pas encore disponibles)</i> + <br><br> + Tous les + <?php if($type == Organization::COLLECTION){ ?> membre de votre organisation<?php } ?> + <?php if($type == Project::COLLECTION){ ?> contributeur de votre projet<?php } ?> + peuvent proposer des amendements aux propositions. + <br> + Chaque amendement est soumi au vote. + <br> + Lorsque la période d'amendement est achevée, les amendements validés par le vote sont automatiquement ajouté à la proposition originale, et la période de vote commence. + <br><br> + <i>Rappel : la période d'amendement peut être désactivée par l'auteur de la proposition, afin de lancer directement la procédure de vote.</i> + <br><br> + </li> + <li> + <b>3 - Voter :</b> Lorsque la période d'amendement est terminée (ou désactivée), la période de vote commence. + <br> + Chaque + <?php if($type == Organization::COLLECTION){ ?> membre<?php } ?> + <?php if($type == Project::COLLECTION){ ?> contributeur<?php } ?> + peut alors donner son avis en votant :<br><br> + + <img class="img-responsive" src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/dda_help/vote.png"> + </li> + </ul> + </p> + + <hr> + <h3>Et après ?</h3> + <hr> + + <p style="font-size: 13px;"> + Lorsque la période de vote est terminée, la proposition est automatiquement fermée, puis transformée en <i>résolution</i>. + <br> + Vous pouvez retrouver l'ensemble des résolutions <b class="letter-green">adoptées</b> ou <b class="letter-red">refusées</b> de chaque espace dans la section suivante : + <br><br> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/dda_help/resolution.png"> + </p> + + <br> + <hr> + <h3>Et les actions dans tout ça ?</h3> + <hr> + + <p style="font-size: 13px;"> + Les actions peuvent être créées librement dans chaque espace, en fonction de vos besoins. + <br> + Elles peuvent aussi être créées directement à la suite de chaque proposition adoptée, pour mettre en application les décisions. + </p> +</div> \ No newline at end of file diff --git a/views/cooperation/pod/modals.php b/views/cooperation/pod/modals.php new file mode 100644 index 0000000000000000000000000000000000000000..adc941718270988ea2d979a93828dd7c75eb6a6f --- /dev/null +++ b/views/cooperation/pod/modals.php @@ -0,0 +1,181 @@ + +<!-- ************ MAIN MODAL CO-SPACE ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalCoop"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close margin-5 padding-10" data-dismiss="modal" id="btn-close-coop" + aria-label="Close"><i class="fa fa-times"></i> + </button> + + <?php + if( isset( Yii::app()->session['userId']) ){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $profilThumbImageUrl = Element::getImgProfil($me, "profilThumbImageUrl", $this->module->assetsUrl); + $countNotifElement = ActivityStream::countUnseenNotifications(Yii::app()->session["userId"], Person::COLLECTION, Yii::app()->session["userId"]); + ?> + <!-- #page.type.citoyens.id.<?php echo Yii::app()->session['userId']; ?> --> + <a href="#page.type.citoyens.id.<?php echo Yii::app()->session['userId']; ?>" + class="menu-name-profil lbh text-dark pull-right shadow2" + data-toggle="dropdown"> + <small class="hidden-xs hidden-sm margin-left-10 bold" id="menu-name-profil"> + <?php echo @$me["name"] ? $me["name"] : @$me["username"]; ?> + </small> + <img class="img-circle" id="menu-thumb-profil" + width="40" height="40" src="<?php echo $profilThumbImageUrl; ?>" alt="image" > + </a> + <?php } ?> + + <button href="javascript:" class="btn btn-default btn-sm text-dark pull-right tooltips" + id="btn-update-coop" style="margin: 10px 10px 0 0;" data-original-title="<?php echo Yii::t("cooperation", "Reload window") ?>" data-placement="left"> + <i class="fa fa-refresh"></i> <?php echo Yii::t("cooperation", "Refresh data") ?> + </button> + + <div class="modal-title" id="modalText"> + <img class="pull-left margin-right-15" src="<?php echo $thumbAuthor; ?>" height=52 width=52 style=""> + <!-- <h4 class="pull-left margin-top-15"><i class="fa fa-connectdevelop"></i> Espace coopératif</h4> --> + <div class="pastille-type-element bg-<?php echo $iconColor; ?> pull-left" style="margin-top:14px;"></div> + <h4 class="pull-left margin-top-15"> + <?php echo @$element["name"]; ?> + </h4> + + + </div> + </div> + + <div class="modal-body col-lg-12 col-md-12 col-sm-12 padding-15"> + <ul id="menuCoop" class="menuCoop col-lg-2 col-md-3 col-sm-3"> + </ul> + <div id="main-coop-container" class="col-lg-10 col-md-9 col-sm-9"></div> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> + + + +<!-- ************ MODAL HELP COOP ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalHelpCOOP"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <!-- <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <div class="modal-title" id="modalText"> + <h4><i class="fa fa-info-circle"></i> Aide</h4> + </div> + </div> + --> + <div class="modal-body padding-25"> + <?php $this->renderPartial('../cooperation/pod/home', array("type"=>$type)); ?> + </div> + <div class="modal-footer"> + <div id="modalAction" style="display:inline"></div> + <button class="btn btn-default pull-right btn-sm margin-top-10 margin-right-10" data-dismiss="modal"> J'ai compris</button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> + + +<!-- ************ MODAL DELETE ROOM ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalDeleteRoom"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <div class="modal-title" id="modalText"> + <h4><i class="fa fa-times"></i> Supprimer un espace coopératif</h4> + </div> + </div> + <div class="modal-body"> + <h3 style="text-transform: none!important; font-weight: 200;" class="letter-turq"> + <i class="fa fa-hashtag"></i> <span id="space-name"><?php echo @$room["name"]; ?></span> + </h3> + <label>Etes-vous sur de vouloir supprimer cet espace coopératif ?</label><br> + <small class="text-red">Toutes les propositions, résolutions, et actions de cet espace seront supprimées définitivement.</small> + </div> + <div class="modal-footer"> + <div id="modalAction" style="display:inline"></div> + <button class="btn btn-danger pull-right btn-sm margin-top-10" + id="btn-delete-room" data-placement="bottom" + data-dismiss="modal" + data-original-title="supprimer l'espace : <?php echo @$room["name"]; ?>" + data-id-room=""> + <i class="fa fa-trash"></i> Oui, supprimer cet espace + </button> + <button class="btn btn-default pull-right btn-sm margin-top-10 margin-right-10" data-dismiss="modal"> Annuler</button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> + + +<!-- ************ MODAL ASSIGN ACTION ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalAssignMe"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close margin-5 padding-10" data-dismiss="modal" aria-label="Close"> + <i class="fa fa-times"></i> + </button> + + <div class="modal-title" id="modalText"> + <h5 class="pull-left margin-top-15"> + <i class="fa fa-handshake-o"></i> Participer à une action + </h5> + </div> + </div> + + <div class="modal-body padding-15"> + <strong>Êtes-vous sûr de vouloir participer à cette action ?</strong><br> + Vous serez inscrit dans la liste des participants. + </div> + + <div class="modal-footer"> + <button class="btn btn-success pull-right margin-left-10" data-dismiss="modal" id="btn-validate-assign-me"> + <i class="fa fa-check"></i> Oui + </button> + <button class="btn btn-default pull-right" data-dismiss="modal"> + <i class="fa fa-times"></i> Non + </button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> + + +<!-- ************ MODAL DELETE AMENDEMENT ********************** --> +<div class="modal fade" tabindex="-1" role="dialog" id="modalDeleteAm"> + <div class="modal-dialog modal-lg"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close margin-5 padding-10" data-dismiss="modal" aria-label="Close"> + <i class="fa fa-times"></i> + </button> + + <div class="modal-title" id="modalText"> + <h5 class="pull-left margin-top-15"> + <i class="fa fa-trash"></i> Supprimer un amendement + </h5> + </div> + </div> + + <div class="modal-body padding-15"> + <strong>Êtes-vous sûr de vouloir supprimer votre amendement ?</strong><br> + Toute suppression est définitive. + </div> + + <div class="modal-footer"> + <button class="btn btn-danger pull-right margin-left-10" + data-id-am="" data-dismiss="modal" id="btn-delete-am"> + <i class="fa fa-check"></i> Oui, supprimer + </button> + <button class="btn btn-default pull-right" data-dismiss="modal"> + <i class="fa fa-times"></i> Non + </button> + </div> + </div><!-- /.modal-content --> + </div><!-- /.modal-dialog --> +</div><!-- /.modal --> diff --git a/views/cooperation/pod/vote.php b/views/cooperation/pod/vote.php new file mode 100644 index 0000000000000000000000000000000000000000..dd54e51d8c197814b8174c7fec2d3674c996ad63 --- /dev/null +++ b/views/cooperation/pod/vote.php @@ -0,0 +1,211 @@ +<style> +#podVote{ + /*border: 1px dashed grey;*/ + border-radius: 20px; + margin-top:35px; + margin-bottom:30px; + background: #f3f3f3; + /*color: white;*/ +} +</style> + +<div class="col-lg-12 col-md-12 col-sm-12 padding-top-15 padding-bottom-5" id="podVote"> + + <div class="col-lg-3 col-md-4 col-sm-4 text-center padding-15 pull-right"> + <canvas id="pieVote"/> + </div> + + <div class="col-lg-4 col-md-4 col-sm-5 text-center no-padding pull-left"> + <h5 class="no-margin"> + <?php if(@$proposal["status"] == "tovote" && $auth){ ?> + <i class="fa fa-hand-o-up"></i> <?php echo Yii::t("cooperation", "VOTE NOW"); ?> + <?php }else if(@$proposal["status"] != "tovote"){ ?> + <i class="fa fa-balance-scale"></i> <?php echo Yii::t("cooperation", "RESULTS"); ?> + <?php }else if(!$auth){ ?> + <i class="fa fa-lock"></i> <?php echo Yii::t("cooperation", "You must be member or contributor to vote"); ?> + <?php } ?> + </h5> + + </div> + + + <?php + $voteRes = Proposal::getAllVoteRes($proposal); + $totalVotant = Proposal::getTotalVoters($proposal); + foreach ($voteRes as $key => $value) { + + $identities = ""; + if(@$proposal["voteAnonymous"] && @$proposal["voteAnonymous"] == "false"){ + $nbVotant=0; + if(@$proposal["votes"][$key]) + foreach ($proposal["votes"][$key] as $idVotant) { $nbVotant++; + if($nbVotant<50){ + $votant = Element::getByTypeAndId("citoyens", $idVotant); + $identities .= $identities!="" ? ", " : ""; + $identities .= $votant["username"]; + }else if($nbVotant==50){ + $identities .= "..."; + } + } + }else{ $identities = Yii::t("cooperation", "votes are anonymous"); } + + $tooltipsVoteCantChange = ""; + if($hasVote && @$proposal["voteCanChange"] == "false") + $tooltipsVoteCantChange = Yii::t("cooperation", "You can not change your vote"); + ?> + <div class="col-lg-8 col-md-8 col-sm-8 text-center no-padding pull-left margin-top-5"> + <div class="col-lg-1 col-md-1 col-sm-1 text-center no-padding pull-left margin-top-5"> + <?php if($key == $hasVote){ ?> + <i class="fa fa-chevron-right pull-right hidden-sm hidden-md" style="margin-top:8px;"></i> + <i class="fa fa-user-circle pull-right tooltips" style="margin-top:8px;" + data-original-title="<?php echo Yii::t("cooperation", "You did vote"); ?> <?php echo Yii::t("cooperation", $hasVote); ?>" + data-placement="right"></i> + <?php } ?> + </div> + <div class="col-lg-4 col-md-4 col-sm-6 text-center pull-left margin-top-5"> + <?php if(@$proposal["status"] == "tovote" && $auth && (!$hasVote || @$proposal["voteCanChange"] == "true")){ ?> + <button class="btn btn-send-vote btn-link btn-sm bg-<?php echo $value["bg-color"]; ?> tooltips" + data-original-title="cliquer pour voter" data-placement="right" + data-vote-value="<?php echo $value["voteValue"]; ?>"><?php echo Yii::t("cooperation", $key); ?> + </button> + <?php }else{ ?> + <label class="col-lg-12 col-md-12 col-sm-12 badge padding-10 bg-<?php echo $value["bg-color"]; ?> tooltips" + data-original-title="<?php echo $tooltipsVoteCantChange; ?>" data-placement="right"> + <?php echo Yii::t("cooperation", $key); ?> + </label> + <?php } ?> + + </div> + <div class="col-lg-2 col-md-2 col-sm-2 text-center pull-left margin-top-5 tooltips" + data-original-title="<?php echo $value["votant"]; ?> <?php echo Yii::t("cooperation", "voters"); ?>" data-placement="right"> + <label><?php echo $value["percent"]; ?>%</label> + </div> + <div class="col-lg-4 col-md-4 col-sm-4 text-center pull-left margin-top-5 hidden-sm hidden-xs tooltips" + data-original-title="<?php echo $identities; ?>" data-placement="top"> + <small><?php echo $value["votant"]; ?> <?php echo Yii::t("cooperation", "voter"); ?>(s)</small><br> + </div> + </div> + + <?php } ?> + + <div class="col-lg-12 col-md-12 col-sm-12 pull-left padding-15 majority-space"> + + <?php if(@$proposal["status"] != "amendable" && $auth){ ?> + <?php if($hasVote!=false){ ?> + <h4 class="no-margin col-lg-4 col-md-4 col-sm-5 text-center pull-left" + style="padding-left: 0px !important;"><?php echo Yii::t("cooperation", "You did vote"); ?> + <span class="letter-<?php echo Cooperation::getColorVoted($hasVote); ?>"> + <?php echo Yii::t("cooperation", $hasVote); ?> + </span> + </h4> + <?php }else{ ?> + <h4 class="no-margin col-lg-4 col-md-4 col-sm-5 text-center pull-left" + style="padding-left: 0px !important;"><?php echo Yii::t("cooperation", "You did not vote"); ?></h4> + <?php } ?> + <br> + <?php } ?> + + <hr style="border-color:lightgrey;"> + + <h4 class="pull-left"> + <small> + <i class="fa fa-gavel"></i> <?php echo Yii::t("cooperation", "Changing vote"); ?> : + <?php if(@$proposal["voteCanChange"] == "true"){ ?> + <span class="letter-green"><?php echo Yii::t("cooperation", "Allowed"); ?></span> + <?php }else{ ?> + <span class="letter-red"><?php echo Yii::t("cooperation", "Not allowed"); ?></span> + <?php } ?> + <br> + <i class="fa fa-user-secret"></i> Vote anonyme : + <?php if(!isset($proposal["voteAnonymous"]) || @$proposal["voteAnonymous"] == "true"){ ?> + <span class="letter-green"><?php echo Yii::t("common", "Yes"); ?></span> + <?php }else{ ?> + <span class="letter-red"><?php echo Yii::t("common", "No"); ?></span> + <?php } ?> + + + </small> + </h4> + + <h4 class="pull-right text-right"> + <small class="majority"> + <i class="fa fa-2x fa-balance-scale"></i> <?php echo Yii::t("cooperation", "Rule of majority"); ?> : + <b><?php echo @$proposal["majority"]; ?>%</b><br> + <?php if(@$voteRes["up"] && @$voteRes["up"]["percent"] && $voteRes["up"]["percent"] > @$proposal["majority"] ){ ?> + <?php echo Yii::t("cooperation", "Proposal"); ?> + <?php if($proposal["status"] == "tovote"){ ?><?php echo Yii::t("cooperation", "temporaly"); ?> <?php } ?> + <span class="bold letter-green"><?php echo Yii::t("cooperation", "validated"); ?></span> + <?php }else{ ?> + <?php echo Yii::t("cooperation", "Proposal"); ?> + <?php if($proposal["status"] == "tovote"){ ?><?php echo Yii::t("cooperation", "temporaly"); ?> <?php } ?> + <span class="bold letter-red"><?php echo Yii::t("cooperation", "refused"); ?></span> + <?php } ?> + </small> + </h4> + + </div> + +</div> + +<script type="text/javascript"> + var myPieChart; + var voteRes = <?php echo json_encode($voteRes); ?>; + var totalVotant = <?php echo $totalVotant; ?>; + jQuery(document).ready(function() { //alert("start loadchart"); + //setTimeout(function(){chartInit();},200); + if(totalVotant > 0) + chartInit(); + }); + + function chartInit(){ //alert("start loadchart"); + var voteValues = new Array(); + console.log("voteRes", voteRes); + $.each(voteRes, function(key, val){ + console.log("val.percent", val); + voteValues.push(val.percent); + }); + + var data = { + datasets: [{ + data: voteValues, + + // These labels appear in the legend and in the tooltips when hovering different arcs + backgroundColor: [ + '#34a853', + '#E33551', + '#FFF', + '#FFA200', + ], + borderColor: [ + '#34a853', + '#E33551', + '#aba9a9', + '#FFA200', + ], + borderWidth: 1 + }], + labels: [ + trad.Agree, + trad.Disagree, + trad.Abstain, + trad.Uncomplet + ], + + }; + var ctx = $("#pieVote").get(0).getContext("2d"); + var options; + myPieChart = new Chart(ctx,{ + type: 'pie', + data: data, + options: { + legend: { + display: false + }, + animation: { + duration: 300 + } + }, + //options: options + }); + } +</script> \ No newline at end of file diff --git a/views/cooperation/proposal.php b/views/cooperation/proposal.php new file mode 100644 index 0000000000000000000000000000000000000000..ccde6df675613b0d9b4e3fb9c1ffa1e0f4f4218f --- /dev/null +++ b/views/cooperation/proposal.php @@ -0,0 +1,495 @@ +<?php + $author = Person::getById(@$proposal["creator"]); + $profilThumbImageUrl = Element::getImgProfil($author, "profilThumbImageUrl", $this->module->assetsUrl); + + $myId = Yii::app()->session["userId"]; + $hasVote = @$proposal["votes"] ? Cooperation::userHasVoted($myId, $proposal["votes"]) : false; + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], $proposal["parentType"], $proposal["parentId"]); + + $parentRoom = Room::getById($proposal["idParentRoom"]); + + $totalVotant = Proposal::getTotalVoters($proposal); + $voteRes = Proposal::getAllVoteRes($proposal); + + + if(isset(Yii::app()->session['userId'])){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $myRoles = @$me["links"]["memberOf"][@$proposal["parentId"]]["roles"] ? + @$me["links"]["memberOf"][@$proposal["parentId"]]["roles"] : array(); + }else{ + $myRoles = array(); + } + + //lock access if the user doesnt have the good role + $accessRoom = @$parentRoom ? Room::getAccessByRole($parentRoom, $myRoles) : ""; + if($accessRoom == "lock") exit; +?> + +<?php if(@$access=="deny"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12"> + <h5 class="padding-left-10 letter-red"> + <i class="fa fa-ban"></i> <?php echo Yii::t("cooperation","You are not allowed to access this content"); ?> + </h5> + <h5 class="padding-left-10 letter-red"> + <small><?php echo Yii::t("cooperation","You must be member or contributor"); ?></small> + </h5> + </div> +<?php exit; } ?> + + +<div class="col-lg-7 col-md-6 col-sm-6 pull-left margin-top-15"> + <h4 class="letter-turq load-coop-data title-room" + data-type="room" data-dataid="<?php echo @$proposal["idParentRoom"]; ?>"> + <i class="fa fa-connectdevelop"></i> <i class="fa fa-hashtag"></i> <?php echo @$parentRoom["name"]; ?> + </h4> +</div> + + +<div class="col-lg-5 col-md-6 col-sm-6"> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="<?php echo Yii::t("cooperation","Close this window"); ?>" data-placement="bottom" + id="btn-close-proposal"> + <i class="fa fa-times"></i> + </button> + <?php if($auth && @$proposal["creator"] == Yii::app()->session['userId']){ ?> + <div class="pull-right dropdown"> + <button class="btn btn-default margin-left-5 margin-top-10" data-toggle="dropdown"> + <i class="fa fa-cog"></i> options + </button> + <ul class="dropdown-menu"> + <?php if(!@$proposal["amendements"] && !$hasVote){ ?> + <li><a href="javascript:" id="btn-edit-proposal" + data-id-proposal="<?php echo $proposal["_id"]; ?>"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation","Edit my proposal"); ?> + </a> + </li> + <?php }else{ ?> + <?php + $tradTitle = Yii::t("cooperation","Edition disabled")." : "; + if(@$proposal["amendements"]) $tradTitle .= Yii::t("cooperation",'amendement session has begun'); + else if($hasVote) $tradTitle .= Yii::t("cooperation",'vote session has begun'); + ?> + <li><button class="btn btn-link tooltips" disabled="true" style="width: 100%;" + data-original-title="<?php echo $tradTitle; ?>" data-placement="left"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation","Edit my proposal"); ?> + </button> + </li> + <?php } ?> + + <?php if(@$proposal["status"] == "disabled"){ ?> + <li><a href="javascript:" class="btn-option-status-proposal" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + data-status="amendable"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation","Back to amendements"); ?> + </a> + </li> + <li><a href="javascript:" class="btn-option-status-proposal" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + data-status="tovote"> + <i class="fa fa-gavel"></i> <?php echo Yii::t("cooperation","Open votes"); ?> + </a> + </li> + <?php }else{ ?> + <li><a href="javascript:" class="btn-option-status-proposal" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + data-status="disabled"> + <i class="fa fa-times"></i> <?php echo Yii::t("cooperation","Disabled my proposal"); ?> + </a> + </li> + <?php } ?> + <!-- <li><hr class="margin-5"></li> --> + <li><a href="javascript:" class="btn-option-status-proposal" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + data-status="closed"> + <i class="fa fa-trash"></i> <?php echo Yii::t("cooperation","Close my proposal"); ?> + </a> + </li> + </ul> + </div> + <?php } ?> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="<?php echo Yii::t("cooperation","Update datas"); ?>" data-placement="bottom" + data-id-proposal="<?php echo $proposal["_id"]; ?>" + id="btn-refresh-proposal"><i class="fa fa-refresh"></i></button> + + <button class="btn btn-default pull-right margin-left-5 margin-top-10 btn-extend-proposal tooltips" + data-original-title="<?php echo Yii::t("cooperation","Enlarge reading space"); ?>" data-placement="bottom"> + <i class="fa fa-long-arrow-left"></i> + </button> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 hidden btn-minimize-proposal tooltips" + data-original-title="<?php echo Yii::t("cooperation","Reduce reading space"); ?>" data-placement="bottom"> + <i class="fa fa-long-arrow-right"></i> + </button> +</div> + + +<div class="col-lg-12 col-md-12 col-sm-12 pull-left margin-top-10" style="padding-left: 8px;"> + + <label> + <img class="img-circle" id="menu-thumb-profil" + width="30" height="30" src="<?php echo $profilThumbImageUrl; ?>" alt="image" > + <a href="#page.type.citoyens.id.<?php echo $proposal["creator"]; ?>" class="lbh"> + <?php echo $author["username"]; ?></a><?php if($myId == $proposal["creator"]){ ?><small>, + <?php echo Yii::t("cooperation","your are the author of this proposal"); ?> </small> + <?php }else{ ?> + <small> <?php echo Yii::t("cooperation","is the author of this proposal"); ?></small> + <?php } ?> + </label> + + <hr style="margin-top:5px;"> + <h4 class="no-margin status-breadcrum"> + + <small><i class="fa fa-certificate"></i></small> + <?php if(@$proposal["status"] == "amendable"){ ?> + <span class="letter-purple underline"><?php echo Yii::t("cooperation", $proposal["status"]); ?></span> + <?php }else{ ?> + <small><?php echo Yii::t("cooperation", "amendable"); ?></small> + <?php } ?> + + <small><i class="fa fa-chevron-right"></i></small> + <?php if(@$proposal["status"] == "tovote"){ ?> + <span class="letter-green underline"><?php echo Yii::t("cooperation", $proposal["status"]); ?></span> + <?php }else if(@$proposal["status"] == "disabled"){ ?> + <span class="letter-orange underline"><?php echo Yii::t("cooperation", $proposal["status"]); ?></span> + <?php }else{ ?> + <small><?php echo Yii::t("cooperation", "tovote"); ?></small> + <?php } ?> + + <small><i class="fa fa-chevron-right"></i></small> + <?php if(@$proposal["status"] == "closed"){ ?> + <span class="letter-red underline"><?php echo Yii::t("cooperation", $proposal["status"]); ?></span> + <?php }else if(@$proposal["status"] == "resolved"){ ?> + <span class="letter-red underline"><?php echo Yii::t("cooperation", $proposal["status"]); ?></span> + <?php }else{ ?> + <small><?php echo Yii::t("cooperation", "closed"); ?></small> + <?php } ?> + </h4> + + <?php if(@$proposal["status"] == "amendable"){ ?> + <hr> + <h4 class="text-purple no-margin"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation", "Proposal submited to amendements"); ?> + <small class="text-purple"><?php echo Yii::t("cooperation", "until"); ?> + <?php echo date('d/m/Y H:i e', strtotime($proposal["amendementDateEnd"])); ?> + <br><i class="fa fa-angle-right"></i> <?php echo Yii::t("cooperation", "End of amendement session"); ?> + </small><?php echo Translate::pastTime($proposal["amendementDateEnd"], "date"); ?> + + </h4> + <small><?php echo Yii::t("cooperation", "You can submit your amendements and vote amendement proposed by other users"); ?> </small> + <hr> + <?php } ?> +</div> + + + +<div class="col-lg-9 col-md-12 col-sm-12 pull-left margin-bottom-15"> + + <?php if(@$proposal["status"] == "tovote"){ ?> + <hr> + <?php if(@$voteRes["up"] && @$voteRes["up"]["percent"] && $voteRes["up"]["percent"] > @$proposal["majority"] ){ ?> + <h4><?php echo Yii::t("cooperation", "Proposal"); ?> <?php if($proposal["status"] != "closed"){ ?> + <?php echo Yii::t("cooperation", "temporaly"); ?> <?php } ?> + <span class="bold letter-green"><?php echo Yii::t("cooperation", "Validated"); ?></span> · + <small><?php echo $totalVotant; ?> <?php echo Yii::t("cooperation", "voter"); ?> + <?php echo $totalVotant > 1 ? "s" : ""; ?></small> + </h4> + <?php }else{ ?> + <h4><?php echo Yii::t("cooperation", "Proposal"); ?> <?php if($proposal["status"] != "closed"){ ?> + <?php echo Yii::t("cooperation", "temporaly"); ?> <?php } ?> + <span class="bold letter-red"><?php echo Yii::t("cooperation", "Refused"); ?></span> · + <small><?php echo $totalVotant; ?> <?php echo Yii::t("cooperation", "voter"); ?> + <?php echo $totalVotant > 1 ? "s" : ""; ?></small> + </h4> + <?php } ?> + + + <div class="progress <?php if($proposal["status"] != "tovote") echo "hidden-min"; ?>"> + <?php + foreach($voteRes as $key => $value){ + if($totalVotant > 0 && @$proposal["status"] == "tovote" && $value["percent"] > 0){ + ?> + <div class="progress-bar bg-<?php echo $value["bg-color"]; ?>" role="progressbar" + style="width:<?php echo $value["percent"]; ?>%"> + <?php echo $value["percent"]; ?>% + </div> + <?php } ?> + <?php } ?> + + <?php if($totalVotant == 0 && @$proposal["status"] == "tovote"){ ?> + <div class="progress-bar bg-turq" role="progressbar" style="width:100%"> + <?php echo Yii::t("cooperation", "Be the first to vote"); ?> + </div> + <?php } ?> + </div> + + <h5> + <?php if(@$proposal["voteDateEnd"]){ ?> + <i class='fa fa-clock-o'></i> <?php echo Yii::t("cooperation", "End of vote session"); ?> + <?php echo Translate::pastTime($proposal["voteDateEnd"], "date"); ?> · + <small class='letter-green'> + <?php echo date('d/m/Y H:i e', strtotime($proposal["voteDateEnd"])); ?> + </small> + <?php }else{ ?> + <?php echo Yii::t("cooperation", "Vote open until undefined date"); ?> + <?php } ?> + + </h5> + <?php } ?> + + <?php if(@$proposal["status"] == "tovote" && $hasVote!=false){ ?> + <h5 class="pull-left no-margin"><i class="fa fa-user-circle"></i> <?php echo Yii::t("cooperation", "You did vote"); ?> + <span class="letter-<?php echo Cooperation::getColorVoted($hasVote); ?>"> + <?php echo Yii::t("cooperation", $hasVote); ?> + </span> + </h5> + <?php }elseif(@$proposal["status"] == "tovote"){ ?> + <h5 class="letter-red pull-left no-margin"> + <i class="fa fa-user-circle"></i> <?php echo Yii::t("cooperation", "You did not vote"); ?> + </h5> + <?php } ?> +</div> + + +<?php if(@$proposal["status"] == "resolved"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12 margin-bottom-15"> + <hr> + <h4 class=""> + <i class="fa fa-bell"></i> + <?php echo Yii::t("cooperation", "The <b>resolution</b> has been taken : "); ?> + <br class="visible-md"> + <small><?php echo Yii::t("cooperation", "The proposal is"); ?> + <?php if(@$voteRes["up"] && @$voteRes["up"]["percent"] && + $voteRes["up"]["percent"] > @$proposal["majority"] ){ ?> + <span class="letter-green"><?php echo Yii::t("cooperation", "validated"); ?></span> + <?php }else{ ?> + <span class="letter-red"><?php echo Yii::t("cooperation", "refused"); ?></span> + <?php } ?> + </small> + </h4> + <?php if(@$proposal["voteDateEnd"]){ ?> + <i class='fa fa-clock-o'></i> <?php echo Yii::t("cooperation", "End of vote session"); ?> + <?php echo Translate::pastTime($proposal["voteDateEnd"], "date"); ?> · + <small class='letter-green'>le + <?php echo date('d/m/Y H:i e', strtotime($proposal["voteDateEnd"])); ?> + </small> + <?php } ?><br> + <button class="btn btn-default load-coop-data" + data-type="resolution" data-dataid="<?php echo @$proposal["idResolution"]; ?>"> + <i class="fa fa-chevron-right"></i> <?php echo Yii::t("cooperation", "Show the resolution"); ?> + </button> + + </div> +<?php } ?> + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-5"> + + <div class="padding-25 bg-lightblue radius-5" id="container-text-proposal"> + + <?php if(@$proposal["title"]){ ?> + <h3><i class="fa fa-hashtag"></i> <?php echo @$proposal["title"]; ?></h3> + <?php }else{ ?> + <h3><i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "Proposal"); ?></h3> + <?php } ?> + + <?php if(@$proposal["description"]){ + $proposal["description"] = Translate::strToClickable($proposal["description"]); + } ?> + + <?php echo nl2br(@$proposal["description"]); ?> + <?php if(@$proposal["tags"]){ ?> + <br><br> <b>Tags : </b> + <?php foreach($proposal["tags"] as $key => $tag){ ?> + <span class="letter-red margin-right-15">#<?php echo $tag; ?></span> + <?php } ?> + + <?php } ?> + </div> + + + <div class="col-lg-12 col-md-12 col-sm-12 margin-top-15 no-padding"> + <?php if(@$proposal["status"] == "amendable"){ ?> + <?php if($auth){ ?> + <button class="btn btn-link text-purple radius-5 btn-create-amendement"> + <i class="fa fa-pencil"></i> <?php echo Yii::t("cooperation", "Submit an amendement"); ?> + </button> + <?php } ?> + <button class="btn btn-link text-purple radius-5 btn-show-amendement"> + <?php echo Yii::t("cooperation", "Show amendements"); ?> (<?php echo count(@$proposal["amendements"]); ?>) <i class="fa fa-chevron-right"></i> + </button> + <hr> + <?php }else if((@$proposal["status"] == "closed" || @$proposal["status"] == "disabled") + && count(@$proposal["amendements"]) > 0){ ?> + <button class="btn btn-link text-purple radius-5 btn-show-amendement pull-left"> + <?php echo Yii::t("cooperation", "Show all amendements"); ?> (<?php echo count(@$proposal["amendements"]); ?>) <i class="fa fa-chevron-right"></i> + </button><br> + <!-- + <h5 class="no-margin"><span class="text-red">La session de vote est terminée</span> + <?php //echo " · ".Yii::t("cooperation", "end")." ".Translate::pastTime($proposal["voteDateEnd"], "date"); ?> + </h5> --> + <br> + <?php } ?> + <!-- <hr> --> + <?php if(@$proposal["amendementActivated"] == "true"){ ?> + + <h4 class="pull-left text-purple"> + + <i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "List of amendements"); ?> + <?php if(@$proposal["status"] == "amendable"){ ?><?php echo Yii::t("cooperation", "temporaly"); ?><?php } ?> + <?php echo Yii::t("cooperation", "validated"); ?> · + + <small> + <i class="fa fa-balance-scale"></i> <?php echo Yii::t("cooperation", "Majority"); ?> : <b><?php echo @$proposal["majority"]; ?>%</b> + </small> + </h4> + + <button class="btn btn-default pull-right btn-extend-proposal"> + <i class="fa fa-long-arrow-left"></i> + </button> + <button class="btn btn-default pull-right btn-minimize-proposal hidden"> + <i class="fa fa-long-arrow-right"></i> + </button> + <div class="col-lg-12 col-md-12 col-sm-12 no-padding"> + <?php + $i=0; + if(@$proposal["amendements"]){ + foreach($proposal["amendements"] as $key => $am){ + //var_dump($am); //exit; + $author = Person::getSimpleUserById(@$am["idUserAuthor"]); + $allVotes = @$am["votes"] ? $am["votes"] : array(); + $myId = Yii::app()->session["userId"]; + $hasVoted = Cooperation::userHasVoted($myId, $allVotes); + $voteRes = Proposal::getAllVoteRes($am); + unset($voteRes["uncomplet"]); + $allVotesRes[$key] = $voteRes; + $validate = @$voteRes["up"] && + @$voteRes["up"]["percent"] && + $voteRes["up"]["percent"] > @$proposal["majority"]; + ?> + <?php if($validate == true){ $i++; ?> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 shadow2 margin-top-15 padding-15 podVoteAmendement"> + + <label class="pull-left"><span class="badge bg-purple">n°<?php echo $key; ?></span> + <span class="letter-green"> + <i class="fa fa-angle-right"></i> <?php echo Yii::t("cooperation", "Add"); ?></span> + </label> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-10 margin-top-5 no-padding textAmdt"> + <?php echo @$am["textAdd"]; ?> + </div> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding progress <?php if($proposal["status"] != "tovote") echo "hidden-min"; ?>"> + <?php + $voteRes = Proposal::getAllVoteRes($am); + $totalVotant = Proposal::getTotalVoters($am); + foreach($voteRes as $key => $value){ + ?> + <div class="progress-bar bg-<?php echo $value["bg-color"]; ?>" role="progressbar" + style="width:<?php echo $value["percent"]; ?>%"> + <?php echo $value["percent"]; ?>% + </div> + <?php } ?> + + </div> + + </div> + <?php } //if ?> + + <?php } //foreach ?> + <?php } if($i == 0){ echo "<i class='fa fa-ban'></i> ". Yii::t("cooperation", "No amendement validated"); } ?> + </div> + <?php }else{ ?> + <h5 class="pull-left text-purple"> + <i class="fa fa-ban"></i> <?php echo Yii::t("cooperation", "Amendement disabled"); ?> + </h5> + <?php } ?> + </div> + + <?php if(@$proposal["arguments"]){ ?> + <hr> + <h4 class="col-lg-12 col-md-12 col-sm-12 col-xs-12 margin-top-50 no-padding"><i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "More informations, arguments, exemples, demonstrations, etc"); ?></h4> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> + <?php echo nl2br(@$proposal["arguments"]); ?> + </div> + <?php } ?> + + + + <?php if(@$proposal["urls"]){ ?> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> + <hr> + <h4 class=""><i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "External links"); ?></h4> + <?php foreach($proposal["urls"] as $key => $url){ ?> + <a href="<?php echo $url; ?>" target="_blank" class="btn btn-default bg-white shadow2 margin-bottom-5"> + <i class="fa fa-external-link"></i> <?php echo $url; ?> + </a> + <?php } ?> + </div> + <?php } ?> +</div> + + + +<?php + if(@$proposal["status"] != "amendable") + $this->renderPartial('../cooperation/pod/vote', + array("proposal"=>$proposal, "auth" => $auth, "hasVote" => $hasVote)); +?> + +<div class="col-lg-12 col-md-12 col-sm-12"><hr></div> + + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-50 padding-bottom-15"> + + <h4 class="text-center"> + <i class="fa fa-balance-scale fa-2x margin-bottom-10"></i> + <br><?php echo Yii::t("cooperation", "Debat"); ?> + </h4> + <hr> + + <?php if($auth){ ?> + <h4 class="text-center"><?php echo Yii::t("cooperation", "Add an argument"); ?><br><i class="fa fa-angle-down"></i></h4> + + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link bg-green-comment col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval="up"><i class="fa fa-thumbs-up"></i> <?php echo Yii::t("cooperation", "For"); ?></button> + </div> + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval=""><?php echo Yii::t("cooperation", "Neutral"); ?></button> + </div> + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link bg-red-comment col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval="down"><i class="fa fa-thumbs-down"></i> <?php echo Yii::t("cooperation", "Against"); ?></button> + </div> + <?php }else{ ?> + <h5 class="text-center"><?php echo Yii::t("cooperation", "You must be member or contributor to participate"); ?><br><i class="fa fa-angle-down"></i></h5> + <?php } ?> +</div> + + + +<div class="col-lg-12 col-md-12 col-sm-12 margin-bottom-50" id="comments-container"> +<hr> +</div> + +<?php $this->renderPartial('../cooperation/amendements', + array("amendements"=>@$proposal["amendements"], + "proposal"=>@$proposal, + "auth"=>$auth)); ?> + +<script type="text/javascript"> + var parentTypeElement = "<?php echo $proposal['parentType']; ?>"; + var parentIdElement = "<?php echo $proposal['parentId']; ?>"; + var idParentProposal = "<?php echo $proposal['_id']; ?>"; + var idParentRoom = "<?php echo $proposal['idParentRoom']; ?>"; + var msgController = "<?php echo @$msgController ? $msgController : ''; ?>"; + + currentRoomId = idParentRoom; + + jQuery(document).ready(function() { + + uiCoop.initUIProposal(); + + }); + +</script> \ No newline at end of file diff --git a/views/cooperation/resolution.php b/views/cooperation/resolution.php new file mode 100644 index 0000000000000000000000000000000000000000..dd6b37035dbfc9436ec00da1b0b3fc734c98322f --- /dev/null +++ b/views/cooperation/resolution.php @@ -0,0 +1,389 @@ + +<?php + $author = Person::getById(@$resolution["creator"]); + $profilThumbImageUrl = Element::getImgProfil($author, "profilThumbImageUrl", $this->module->assetsUrl); + + $myId = Yii::app()->session["userId"]; + $hasVote = @$resolution["votes"] ? Cooperation::userHasVoted($myId, $resolution["votes"]) : false; + + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], + $resolution["parentType"], $resolution["parentId"]); + + $parentRoom = Room::getById($resolution["idParentRoom"]); + + if(isset(Yii::app()->session['userId'])){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $myRoles = @$me["links"]["memberOf"][@$resolution["parentId"]]["roles"] ? + @$me["links"]["memberOf"][@$resolution["parentId"]]["roles"] : array(); + }else{ + $myRoles = array(); + } + + //lock access if the user doesnt have the good role + $accessRoom = @$parentRoom ? Room::getAccessByRole($parentRoom, $myRoles) : ""; + if($accessRoom == "lock") exit; + + + + $totalVotant = Proposal::getTotalVoters($resolution); + $voteRes = Proposal::getAllVoteRes($resolution); +?> + + +<div class="col-lg-8 col-md-7 col-sm-7 pull-left margin-top-15"> + <?php $parentRoom = Room::getById($resolution["idParentRoom"]); ?> + <h4 class="letter-turq load-coop-data title-room" + data-type="room" data-dataid="<?php echo @$resolution["idParentRoom"]; ?>"> + <i class="fa fa-connectdevelop"></i> <i class="fa fa-hashtag"></i> <?php echo @$parentRoom["name"]; ?> + </h4> + <br> + + <label> + <img class="img-circle" id="menu-thumb-profil" + width="30" height="30" src="<?php echo $profilThumbImageUrl; ?>" alt="image" > + <a href="#page.type.citoyens.id.<?php echo $resolution["creator"]; ?>" class="lbh"> + <?php echo $author["username"]; ?></a><?php if($myId == $resolution["creator"]){ ?><small>, + <?php echo Yii::t("cooperation","your are the author of this proposal"); ?> </small> + <?php }else{ ?> + <small> <?php echo Yii::t("cooperation","is the author of this proposal"); ?></small> + <?php } ?> + </label> + +</div> + + +<div class="col-lg-4 col-md-5 col-sm-5"> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="Fermer cette fenêtre" data-placement="bottom" + id="btn-close-resolution"> + <i class="fa fa-times"></i> + </button> + + <button class="btn btn-default pull-right margin-left-5 margin-top-10 tooltips" + data-original-title="<?php echo Yii::t("cooperation","Update datas"); ?>" data-placement="bottom" + data-id-resolution="<?php echo $resolution["_id"]; ?>" + id="btn-refresh-resolution"><i class="fa fa-refresh"></i></button> + + <button class="btn btn-default pull-right margin-left-5 margin-top-10 btn-extend-resolution tooltips" + data-original-title="<?php echo Yii::t("cooperation","Enlarge reading space"); ?>" data-placement="bottom"> + <i class="fa fa-long-arrow-left"></i> + </button> + <button class="btn btn-default pull-right margin-left-5 margin-top-10 hidden btn-minimize-resolution tooltips" + data-original-title="<?php echo Yii::t("cooperation","Reduce reading space"); ?>" data-placement="bottom"> + <i class="fa fa-long-arrow-right"></i> + </button> +</div> + + +<div class="col-lg-12 col-md-12 col-sm-12 pull-left"> + <hr> + <h4 class=""> + <i class="fa fa-bell"></i> + <?php echo Yii::t("cooperation", "The <b>resolution</b> has been approved : "); ?> + <br class="visible-md"> + <small><?php echo Yii::t("cooperation", "The proposal is"); ?> + <?php if(@$voteRes["up"] && @$voteRes["up"]["percent"] && + $voteRes["up"]["percent"] > @$resolution["majority"] ){ ?> + <span class="letter-green"><?php echo Yii::t("cooperation", "validated"); ?></span> + <?php }else{ ?> + <span class="letter-red"><?php echo Yii::t("cooperation", "refused"); ?></span> + <?php } ?> + </small> + </h4> + + <div class="progress col-lg-7 col-md-10 col-sm-12 no-padding"> + <?php + foreach($voteRes as $key => $value){ + if($totalVotant > 0 && $value["percent"] > 0){ + ?> + <div class="progress-bar bg-<?php echo $value["bg-color"]; ?>" role="progressbar" + style="width:<?php echo $value["percent"]; ?>%"> + <?php echo $value["percent"]; ?>% + </div> + <?php } ?> + <?php } ?> + + <?php if($totalVotant == 0){ ?> + <div class="progress-bar bg-turq" role="progressbar" style="width:100%"> + <?php echo Yii::t("cooperation", "No vote"); ?> + </div> + <?php } ?> + </div> + + <h4 class="col-lg-12 col-md-12 col-sm-12 no-padding"> + <i class="fa fa-balance-scale"></i> <?php echo Yii::t("cooperation", "Rule of majority"); ?> : + <b><?php echo @$resolution["majority"]; ?>%</b> + <hr> + <button class="btn btn-default btn-sm" id="btn-show-voteres"> + <i class="fa fa-pie-chart"></i> <?php echo Yii::t("cooperation", "Show vote details"); ?> + </button> + </h4> + + <br> + + <div class="hidden podvote"> + <?php + $this->renderPartial('../cooperation/pod/vote', array("proposal"=>$resolution, + "hasVote" => $hasVote, + "auth" => $auth)); + ?> + </div> + <br> +</div> + + + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-5"> + + <div class="padding-25 bg-lightblue radius-5" id="container-text-resolution"> + <?php if(@$resolution["title"]){ ?> + <h3><i class="fa fa-hashtag"></i> <?php echo @$resolution["title"]; ?></h3> + <?php }else{ ?> + <br> + <?php } ?> + + <?php if(@$resolution["description"]){ + $resolution["description"] = Translate::strToClickable($resolution["description"]); + } ?> + + <?php echo nl2br(@$resolution["description"]); ?> + + <?php + $i=0; + if(@$resolution["amendements"]){ + foreach($resolution["amendements"] as $key => $am){ + $allVotes = @$am["votes"] ? $am["votes"] : array(); + $voteRes = Proposal::getAllVoteRes($am); + unset($voteRes["uncomplet"]); + $allVotesRes[$key] = $voteRes; + $validate = @$voteRes["up"] && @$voteRes["up"]["percent"] && $voteRes["up"]["percent"] > @$resolution["majority"]; + ?> + <?php if($validate == true){ $i++; ?> + <hr> + <small><b>Amendement n°<?php echo $i; ?></b></small><br> + <?php echo @$am["textAdd"]; ?> + + <?php } //if ?> + + <?php } //foreach ?> + <?php } //if($i == 0){ echo "<hr><i class='fa fa-ban'></i> Aucun amendement validé"; } ?> + + <?php if(@$resolution["tags"]){ ?> + <br><br> <b>Tags : </b> + <?php foreach($resolution["tags"] as $key => $tag){ ?> + <span class="letter-red margin-right-15">#<?php echo $tag; ?></span> + <?php } ?> + + <?php } ?> + </div> + + <?php if(false && @$resolution["arguments"]){ ?> + <h4 class="margin-top-50"><i class="fa fa-angle-down"></i> + <?php echo Yii::t("cooperation", "More informations, arguments, exemples, demonstrations, etc"); ?></h4> + <?php echo nl2br(@$resolution["arguments"]); ?> + <?php } ?> + + + <?php if(@$resolution["urls"]){ ?> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> + <h4 class="margin-top-25"><i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "External links"); ?></h4> + <?php foreach($resolution["urls"] as $key => $url){ ?> + <a href="<?php echo $url; ?>" target="_blank" class="btn btn-default bg-white shadow2 margin-bottom-5"> + <i class="fa fa-external-link"></i> <?php echo $url; ?> + </a> + <?php } ?> + </div> + <?php } ?> + + <?php if(@$resolution["status"] == "adopted"){ ?> + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 "> + <hr> + <h4 class="margin-top-25 pull-left"> + <?php if(@$resolution["actions"]){ ?> + <i class="fa fa-angle-down"></i> <?php echo Yii::t("cooperation", "List of actions linked with this resolution"); ?> + <?php }else{ ?> + <i class="fa fa-ban"></i> <?php echo Yii::t("cooperation", "No action for this resolution"); ?> + <?php } ?> + </h4> + <button class="btn btn-default letter-green pull-right margin-top-15 bold" id="btn-create-action"> + <i class="fa fa-plus-circle"></i> <i class="fa fa-ticket"></i> <?php echo Yii::t("cooperation", "Add an action"); ?> + </button> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding"> + <?php if(@$resolution["actions"]){ //echo "<hr>"; + foreach(@$resolution["actions"] as $key => $action){ + ?> + <button class="btn btn-default bg-white shadow2 margin-bottom-5 load-coop-data" + data-type="action" data-dataid="<?php echo @$action["_id"]; ?>"> + <i class="fa fa-ticket"></i> <?php echo $action["name"]; ?> + </button> + <?php }} ?> + </div> + </div> + <?php } ?> + + +</div> + + + +<div class="col-lg-12 col-md-12 col-sm-12"><hr></div> + + +<div class="col-lg-12 col-md-12 col-sm-12 margin-top-50 padding-bottom-15"> + + <h4 class="text-center"> + <i class="fa fa-balance-scale fa-2x margin-bottom-10"></i> + <br><?php echo Yii::t("cooperation", "Debat"); ?> + </h4> + <hr> + + <?php if($auth){ ?> + <h4 class="text-center"><?php echo Yii::t("cooperation", "Add an argument"); ?><br><i class="fa fa-angle-down"></i></h4> + + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link bg-green-comment col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval="up"><i class="fa fa-thumbs-up"></i> <?php echo Yii::t("cooperation", "I Agree"); ?></button> + </div> + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval=""><?php echo Yii::t("cooperation", "Neutral"); ?></button> + </div> + <div class="col-md-4 col-sm-4 col-xs-4"> + <button class="bold btn btn-link bg-red-comment col-md-12 col-sm-12 text-dark radius-5 btn-select-arg-comment" + data-argval="down"><i class="fa fa-thumbs-down"></i> <?php echo Yii::t("cooperation", "I disagree"); ?></button> + </div> + <?php }else{ ?> + <h5 class="text-center"><?php echo Yii::t("cooperation", "You must be member or contributor to participate"); ?><br><i class="fa fa-angle-down"></i></h5> + <?php } ?> +</div> + + + + +<div class="col-lg-12 col-md-12 col-sm-12 padding-bottom-50" id="comments-container"> + <hr> +</div> + +<?php $this->renderPartial('../cooperation/amendements', + array("amendements"=>@$resolution["amendements"], + "proposal"=>@$resolution, + "auth"=>$auth)); ?> + +<script type="text/javascript"> + var parentTypeElement = "<?php echo $resolution['parentType']; ?>"; + var parentIdElement = "<?php echo $resolution['parentId']; ?>"; + var idParentResolution = "<?php echo $resolution['_id']; ?>"; + var idParentRoom = "<?php echo $resolution['idParentRoom']; ?>"; + var msgController = "<?php echo @$msgController ? $msgController : ''; ?>"; + var useIdParentResolution = false; + + jQuery(document).ready(function() { + + $("#comments-container").html("<i class='fa fa-spin fa-refresh'></i> Chargement des commentaires"); + + getAjax("#comments-container",baseUrl+"/"+moduleId+"/comment/index/type/resolutions/id/"+idParentResolution, + function(){ //$(".commentCount").html( $(".nbComments").html() ); + $(".container-txtarea").hide(); + + $(".btn-select-arg-comment").click(function(){ + var argval = $(this).data("argval"); + $(".container-txtarea").show(); + + $(".textarea-new-comment").removeClass("bg-green-comment bg-red-comment"); + var classe=""; + var pholder="Votre commentaire"; + if(argval == "up") { classe="bg-green-comment"; pholder="Votre argument pour"; } + if(argval == "down") { classe="bg-red-comment"; pholder="Votre argument contre"; } + $(".textarea-new-comment").addClass(classe).attr("placeholder", pholder); + $("#argval").val(argval); + }); + },"html"); + + $("#btn-close-resolution").click(function(){ + uiCoop.minimizeMenuRoom(false); + }); + $(".btn-extend-resolution").click(function(){ + uiCoop.maximizeReader(true); + $(".btn-minimize-resolution").removeClass("hidden"); + $(".btn-extend-resolution").addClass("hidden"); + }); + $(".btn-minimize-resolution").click(function(){ + uiCoop.maximizeReader(false); + $(".btn-minimize-resolution").addClass("hidden"); + $(".btn-extend-resolution").removeClass("hidden"); + }); + $(".btn-show-amendement").click(function(){ + uiCoop.showAmendement(true); + }); + $("#btn-hide-amendement").click(function(){ + uiCoop.showAmendement(false); + }); + $(".btn-create-amendement").click(function(){ + uiCoop.showAmendement(true); + if($("#form-amendement").hasClass("hidden")) + $("#form-amendement").removeClass("hidden"); + else + $("#form-amendement").addClass("hidden"); + }); + + $(".btn-send-vote").click(function(){ + var voteValue = $(this).data('vote-value'); + console.log("send vote", voteValue), + uiCoop.sendVote("resolution", idParentResolution, voteValue, idParentRoom); + }); + $("#btn-activate-vote").click(function(){ + uiCoop.activateVote(idParentResolution); + }); + + $("#btn-refresh-resolution").click(function(){ + toastr.info(trad["processing"]); + var idresolution = $(this).data("id-resolution"); + uiCoop.getCoopData(null, null, "resolution", null, idresolution, + function(){ + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(false); + toastr.success(trad["processing ok"]); + }, false); + }); + + $("#btn-refresh-amendement").click(function(){ + toastr.info(trad["processing"]); + var idresolution = $(this).data("id-resolution"); + uiCoop.getCoopData(null, null, "resolution", null, idresolution, + function(){ + uiCoop.minimizeMenuRoom(true); + uiCoop.showAmendement(true); + toastr.success(trad["processing ok"]); + }, false); + }); + + $(".btn-option-status-resolution").click(function(){ + var idresolution = $(this).data("id-resolution"); + var status = $(this).data("status"); + uiCoop.changeStatus("resolutions", idresolution, status, parentTypeElement, parentIdElement); + }); + + $("#btn-show-voteres").click(function(){ + if($(".podvote").hasClass("hidden")) $(".podvote").removeClass("hidden"); + else $(".podvote").addClass("hidden"); + }); + + $("#btn-create-action").click(function(){ + useIdParentResolution = true; + dyFObj.openForm('action'); + }); + addCoopHash=".view.coop.room." + idParentRoom + ".resolution." + idParentResolution; + if(typeof hashUrlPage != "undefined") + location.hash = hashUrlPage +addCoopHash; + else if(notNull(contextData) && typeof contextData.slug != "undefined") + location.hash = "#" + contextData.slug + addCoopHash; + else + location.hash = "#page.type." + parentTypeElement + ".id." + parentIdElement +addCoopHash; + + if(msgController != ""){ + toastr.error(msgController); + } + }); + +</script> \ No newline at end of file diff --git a/views/cooperation/roomList.php b/views/cooperation/roomList.php new file mode 100644 index 0000000000000000000000000000000000000000..8c4996fbf38bd90c04d327343588dd88cd220c49 --- /dev/null +++ b/views/cooperation/roomList.php @@ -0,0 +1,66 @@ + +<?php if(!isset($auth)) + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], @$parentType, @$parentId); + + if(isset(Yii::app()->session['userId'])){ + $me = Element::getByTypeAndId("citoyens", Yii::app()->session['userId']); + $myRoles = @$me["links"]["memberOf"][@$parentId]["roles"] ? + @$me["links"]["memberOf"][@$parentId]["roles"] : array(); + }else{ + $myRoles = array(); + } +?> + + +<?php if($auth){ ?> + <li class="submenucoop sub-rooms"> + <a href="javascript:dyFObj.openForm('room')" class="btn btn-link letter-green bold"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("cooperation", "Create room"); ?> + </a> + </li> + <li class="submenucoop sub-rooms"><hr></li> +<?php } ?> + +<?php foreach($roomList as $key => $room){ ?> + <?php + + $accessRoom = Room::getAccessByRole($room, $myRoles); + + //var_dump( @$roomRoles); + if(!isset($room["roles"]) || $accessRoom != "lock"){ ?> + <li class="submenucoop sub-rooms " + data-type="room" data-dataid="<?php echo (string)@$room["_id"]; ?>"> + <a href="javascript:" class="load-coop-data droppable letter-turq" + data-type="room" data-dataid="<?php echo (string)@$room["_id"]; ?>"> + <?php if($accessRoom == "unlock"){ ?> <i class="fa fa-unlock-alt"></i> + <?php }else if($accessRoom == "lock"){ ?> <i class="fa fa-lock"></i> + <?php }else if($accessRoom == "open"){ ?> <i class="fa fa-hashtag"></i> + <?php } ?> + <?php echo @$room["name"]; ?> + + <i class="fa fa-inbox pull-right"></i> + </a> + </li> + <?php }else{ ?> + <?php + $rolesTooltip = ""; + if(!is_array(@$room["roles"])) $rolesTooltip = @$room["roles"]; + else foreach (@$room["roles"] as $r) $rolesTooltip .= $rolesTooltip == "" ? $r : ", ".$r; + ?> + <li class="submenucoop sub-rooms "> + <a href="javascript:" class="load-coop-data droppable letter-turq-light" + data-type="locked" data-dataid="locked"> + <i class="fa fa-lock tooltips" + data-original-title="réservé au(x) rôle(s) : <?php echo $rolesTooltip; ?>" + data-placement="right"></i> <?php echo @$room["name"]; ?> + <i class="fa fa-inbox pull-right"></i> + </a> + </li> + <?php } ?> +<?php } ?> + + +<script type="text/javascript"> + jQuery(document).ready(function() { + }); +</script> \ No newline at end of file diff --git a/views/default/agenda.php b/views/default/agenda.php new file mode 100755 index 0000000000000000000000000000000000000000..ebd922627dd18fd5106df3530de269b2b2a56e32 --- /dev/null +++ b/views/default/agenda.php @@ -0,0 +1,317 @@ + <?php + $cssAnsScriptFilesModule = array( + '/assets/css/default/responsive-calendar.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + '/js/default/directory.js', + '/js/default/responsive-calendar.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> + +<style> + .btn-add-to-directory{ + font-size: 14px; + margin-right: 0px; + border-radius: 6px; + color: #666; + border: 1px solid rgba(188, 185, 185, 0.69); + margin-left: 3px; + float: left; + padding: 1px; + width: 24px; + margin-top: 15px; + } + .img-logo { + height: 290px; + } + .btn-filter-type{ + height:35px; + } + .btn-scope{ + display: inline; + } + .lbl-scope-list { + top: 255px; + } + .btn-tag{ + font-weight:300; + padding-left: 0px; + } + .btn-tag.bold{ + font-weight:600; + } + #scopeListContainer span.text-red.disabled{ + color:#DBBCC1 !important; + font-weight:300 !important; + } + @media screen and (max-width: 1024px) { + #menu-directory-type .hidden-sm{ + display:none; + } + } + +/*responsive calendar*/ + + + +@media screen and (max-width: 767px) { + .searchEntity{ + /*margin-left: 25px !important;*/ + } + #searchBarText{ + font-size:13px !important; + margin-right:-30px; + } + /*.btn-add-to-directory { + position: absolute; + right: 0px; + z-index:9px !important; + }*/ +} + +</style> + + +<div class="row calendar"></div> +<div class="responsive-calendar-init hidden"> + <div class="responsive-calendar col-md-12 no-padding"> + <div class="day-headers"> + <div class="day header">Lun</div> + <div class="day header">Mar</div> + <div class="day header">Mer</div> + <div class="day header">Jeu</div> + <div class="day header">Ven</div> + <div class="day header">Sam</div> + <div class="day header">Dim</div> + </div> + <div class="days" data-group="days"></div> + <div class="controls"> + <a id="btn-month-before" class="" data-go="prev"><div class="btn"><i class="fa fa-arrow-left"></i></div></a> + <h4 class="text-white"><span data-head-month></span> <span data-head-year></span></h4> + <a id="btn-month-next" class="" data-go="next"><div class="btn"><i class="fa fa-arrow-right"></i></div></a> + <a href="javascript:urlCtrl.loadByHash('#event.eventsv');" class="btn text-white pull-right" style="margin-top:3px;"> + <i class="fa fa-plus"></i> <i class="fa fa-calendar"></i> ajouter un événement + </a> + </div> + </div> + </div> +</div> + +<div class="col-md-12"> + <div class="col-md-12 no-padding margin-top-15 "> + + <div class="input-group margin-bottom-10 col-md-8 col-sm-8 col-xs-12 pull-left"> + <input id="searchBarText" data-searchPage="true" type="text" placeholder="Que recherchez-vous ?" class="input-search form-control"> + <span class="input-group-btn"> + <button class="btn btn-success btn-start-search tooltips" id="btn-start-search" + data-toggle="tooltip" data-placement="bottom" title="Actualiser les résultats"> + <i class="fa fa-refresh"></i> + </button> + </span> + </div> + <button class="btn btn-sm tooltips hidden-xs" id="btn-slidup-scopetags" + style="margin-left:15px;margin-top:5px;" + data-toggle="tooltip" data-placement="bottom" title="Afficher/Masquer les filtres"> + <i class="fa fa-minus"></i> + </button> + <button data-id="explainDirectory" class="explainLink btn btn-sm tooltips hidden-xs" + style="margin-left:7px;margin-top:5px;" + data-toggle="tooltip" data-placement="bottom" title="Comment ça marche ?"> + <i class="fa fa-question-circle"></i> + </button> + </div> + + <div class="col-xs-12 no-padding " id="list_filters"> + <div id="scopeListContainer" class="hidden-xs list_tags_scopes inline-block"></div> + <div class='city-name-locked homestead text-red'></div> + </div> + +<div class="col-xs-12 no-padding"><hr></div> + +</div> + +<div style="" class="col-xs-12 no-padding no-margin" id="dropdown_search"></div> + +<?php //$this->renderPartial(@$path."first_step_directory"); ?> +<?php $city = @$_GET['lockCityKey'] ? City::getByUnikey($_GET['lockCityKey']) : null; + //$cityName = ($city!=null) ? $city["name"].", ".$city["cp"] : ""; + $cityName = (($city!=null) ? $city["name"]. (@$city["cp"]? ", ".$city["cp"] : "") : ""); +?> + +<script type="text/javascript"> + +var searchType = [ "events" ]; +var allSearchType = [ "events" ]; +var personCOLLECTION = "<?php echo Person::COLLECTION ?>"; +var userId = '<?php echo isset( Yii::app()->session["userId"] ) ? Yii::app() -> session["userId"] : null; ?>'; +var lockCityKey = <?php echo (@$_GET['lockCityKey']) ? "'".$_GET['lockCityKey']."'" : "null" ?>; +var cityNameLocked = "<?php echo $cityName; ?>"; + +jQuery(document).ready(function() { + + $("#searchBarText").val($(".input-global-search").val()); + + //selectScopeLevelCommunexion(levelCommunexion); + searchType = [ "events" ]; + allSearchType = [ "events" ]; + + topMenuActivated = true; + hideScrollTop = true; + loadingData = false; + + checkScroll(); + var timeoutSearch = setTimeout(function(){ }, 100); + + setTimeout(function(){ $("#input-communexion").hide(300); }, 300); + + setTitle("<span id='main-title-menu'>Agenda</span>","calendar","Agenda"); + + $('.tooltips').tooltip(); + + $("#btn-slidup-scopetags").click(function(){ + if($("#list_filters").hasClass("hidden")){ + $("#list_filters").removeClass("hidden"); + $("#btn-slidup-scopetags").html("<i class='fa fa-minus'></i>"); + } + else{ + $("#list_filters").addClass("hidden"); + $("#btn-slidup-scopetags").html("<i class='fa fa-plus'></i>"); + } + }); + + + showTagsScopesMin("#scopeListContainer"); + + if(lockCityKey != null){ + lockScopeOnCityKey(lockCityKey, cityNameLocked); + }else{ + rebuildSearchScopeInput(); + } + + $('#btn-start-search').click(function(e){ + //signal que le chargement est terminé + loadingData = false; + startSearch(0, indexStepInit); + }); + + // $('#link-start-search').click(function(e){ + // startSearch(0, indexStepInit); + // }); + + $(".my-main-container").bind('scroll', function(){ + if(!loadingData && !scrollEnd){ + var heightContainer = $(".my-main-container")[0].scrollHeight; + var heightWindow = $(window).height(); + + if(scrollEnd == false){ + var heightContainer = $(".my-main-container")[0].scrollHeight; + var heightWindow = $(window).height(); + if( ($(this).scrollTop() + heightWindow) >= heightContainer-150){ + mylog.log("scroll MAX"); + startSearch(currentIndexMin+indexStep, currentIndexMax+indexStep); + } + } + } + }); + + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + var index = searchType.indexOf(type); + + if(type == "all" && searchType.length > 1){ + $.each(allSearchType, function(index, value){ removeSearchType(value); }); return; + } + if(type == "all" && searchType.length == 1){ + $.each(allSearchType, function(index, value){ addSearchType(value); }); return; + } + + if (index > -1) removeSearchType(type); + else addSearchType(type); + }); + + //$(".searchIcon").removeClass("fa-search").addClass("fa-file-text-o"); + //$(".searchIcon").attr("title","Mode Recherche ciblé (ne concerne que cette page)"); + $('.tooltips').tooltip(); + searchPage = true; + + //initBtnToogleCommunexion(); + //$(".btn-activate-communexion").click(function(){ + // toogleCommunexion(); + //}); + + //initBtnScopeList(); + startSearch(0, 30); +}); + + +var calendarInit = false; +function showResultInCalendar(mapElements){ + //mylog.log("showResultInCalendar"); + //mylog.dir(mapElements); + + var events = new Array(); + $.each(mapElements, function(key, thisEvent){ + + var startDate = exists(thisEvent["startDate"]) ? thisEvent["startDate"].substr(0, 10) : ""; + var endDate = exists(thisEvent["endDate"]) ? thisEvent["endDate"].substr(0, 10) : ""; + var cp = ""; + var loc = ""; + if(thisEvent["address"] != null){ + var cp = exists(thisEvent["address"]["postalCode"]) ? thisEvent["address"]["postalCode"] : "" ; + var loc = exists(thisEvent["address"]["addressLocality"]) ? thisEvent["address"]["addressLocality"] : ""; + } + var position = cp + " " + loc; + + var name = exists(thisEvent["name"]) ? thisEvent["name"] : ""; + var thumb_url = notEmpty(thisEvent["profilThumbImageUrl"]) ? baseUrl+thisEvent["profilThumbImageUrl"] : ""; + + if(typeof events[startDate] == "undefined") events[startDate] = new Array(); + events[startDate].push({ "id" : thisEvent["_id"]["$id"], + "thumb_url" : thumb_url, + "startDate": startDate, + "endDate": endDate, + "name" : name, + "position" : position }); + }); + + //mylog.dir(events); + + if(calendarInit == true) { + $(".calendar").html(""); + } + + $(".calendar").html($(".responsive-calendar-init").html()); + + var aujourdhui = new Date(); + var month = (aujourdhui.getMonth()+1).toString(); + if(aujourdhui.getMonth() < 10) month = "0" + month; + var date = aujourdhui.getFullYear().toString() + "-" + month; + + $(".responsive-calendar").responsiveCalendar({ + time: date, + events: events + }); + + + $(".responsive-calendar").show(); + + calendarInit = true; +} + + + +function searchCallback() { + mylog.log("searchCallback"); + startSearch(0, indexStepInit); +} +</script> + + + + + + + diff --git a/views/default/aroundMe.php b/views/default/aroundMe.php new file mode 100755 index 0000000000000000000000000000000000000000..db27f9de70219098571670f695b06ce7fec8f5d5 --- /dev/null +++ b/views/default/aroundMe.php @@ -0,0 +1,337 @@ +<?php + $cssAnsScriptFilesModule = array( + '/js/default/directory.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> +<style> + + #grid_around{ + padding: 20px 0px; + } + + .btn-groupe-around-me-km { + display: inline-block!important; + } + + .headerDirectory a.lbh:hover{ + text-decoration: underline !important; + } +</style> + +<?php + $specs = Element::getElementSpecsByType($type); + $link = $specs["hash"].$id; +?> + +<div class="row headerDirectory bg-white padding-15"> + + <?php if($lat==null){ ?> + <div class="info-no-result"> + <h3 class="text-red"> + <i class="fa fa-ban"></i> Cet élément n'est pas communecté. + <br><small><b>Impossible d'effectuer une recherche géographique.</b></small> + </h3> + </div> + <?php }else{ ?> + <h3 class="text-dark text-left"> + <i class="fa fa-crosshairs"></i> Retrouvez les éléments <b>les plus actifs</b>, autour de <a href="#<?php echo $link; ?>" class="lbh" id="element-name"></a> dans un rayon de + <select class="inline text-red" id="stepSearch" style="padding: 6px;font-size:17px;"> + <option value="2000" <?php echo $radius=="2000"?"selected":"";?>>2</option> + <option value="5000" <?php echo $radius=="5000"?"selected":"";?>>5</option> + <option value="10000" <?php echo $radius=="10000"?"selected":"";?>>10</option> + <option value="25000" <?php echo $radius=="25000"?"selected":"";?>>25</option> + <option value="50000" <?php echo $radius=="50000"?"selected":"";?>>50</option> + </select> km + <button class="btn btn-default text-azure" style="margin-left:20px;" onclick="javascript:showMap(true)"> + <i class="fa fa-map-marker"></i> Afficher sur la carte + </button> + </h3> + + <div class="info-no-result <?php if(sizeOf($all)>0) echo 'hidden'; ?>"> + <h3 class="text-red"> + <i class="fa fa-ban"></i> Aucun élément n'a été trouvé. + <br><small><b>Élargissez la zone de recherche pour plus de résultat</b></small> + </h3> + <button class="btn bg-dark" id="reloadAuto"><i class="fa fa-binoculars"></i> Recherche automatique</button> + </div> + <?php } ?> + + <div class="info-results <?php if(sizeOf($all)==0) echo 'hidden'; ?>"> + <h3 class="text-dark"> + <b> + <i class="fa fa-angle-down"></i> + <span id="nbResAroundMe"></span> + </b> + </h3> + </div> + </div> + + <div id="grid_around"></div> + + +<script type="text/javascript" > + +var mapElements = new Array(); +var elementsMap = <?php echo json_encode($all) ?>; +var parent = <?php echo json_encode($parent) ?>; +var elementPosition = [<?php echo @$lat ?>, <?php echo @$lng ?>]; + +var personCOLLECTION = "<?php echo Person::COLLECTION ?>"; + +var radiusElement = "<?php echo $radius; ?>"; +var idElement = "<?php echo $id ?>"; +var typeElement = "<?php echo $type ?>"; +var parentName = "<?php echo @$parentName ?>"; + +var iconTitle = "fa-"+typeObj[typeElement].icon; +var colorTitle = mapColorIconTop[typeElement]; + +var noFitBoundAroundMe = true; + +jQuery(document).ready(function() { + + var elementName = "<span class='text-"+colorTitle+"'><i class='fa "+iconTitle+"'></i> "+parentName+"</span>"; + setTitle("Autour de "+elementName, + "<i class='fa fa-crosshairs'></i>", + "Autour de "+parentName); + + $("#element-name").html(elementName); + //$("#element-name").addClass("text-"+colorTitle); + + //mylog.log(elementsMap); + + //showMap(true); + if(notEmpty(elementsMap)){ + var str = directory.showResultsDirectoryHtml(elementsMap); + $("#grid_around").html(str); + initBtnLink(); + refreshUIAroundMe(elementsMap); + } + + $("#stepSearch").change(function(){ + radiusElement = $(this).val(); + refreshAroundMe(radiusElement); + }); + $("#reloadAuto").click(function(){ + radiusElement = $("#stepSearch").val(); + refreshAroundMe(radiusElement); + }); + + $(".btn-groupe-around-me-km .btn-map").off().click(function(){ + var km = $(this).data("km"); + if(km>0) + refreshAroundMe(km); + }); + + $(".btn-groupe-around-me-km .btn-map").removeClass("active"); + $(".btn-groupe-around-me-km .btn-map[data-km='"+radiusElement+"']").addClass("active"); + + <?php if(isset($_GET["tpl"]) && @$_GET["tpl"]=="iframesig"){ ?> + //iframesig TPL + var color = Sig.getIcoColorByType({"typeSig": typeElement}); + var icon = Sig.getIcoByType({"typeSig": typeElement}); + + var lblParentName = "<span class='text-"+color+"'><i class='fa fa-"+icon+"'></i> "+parentName+"</span>"; + $(".main-top-menu #menuParentName").html(lblParentName); + <?php } ?> + +}); + + + +function refreshUIAroundMe(elementsMap){ + + //if(notEmpty(Sig.myPosition)) + //var myLatlng = [Sig.myPosition.position.latitude, Sig.myPosition.position.longitude]; + var nbRes = elementsMap.length; + Sig.showMapElements(Sig.map, elementsMap); + + //Sig.showOneElementOnMap(parent, Sig.map); + var objectId = this.getObjectId(parent); + var content = Sig.getPopup(parent); + //création de l'icon sur la carte + var theIcon = Sig.getIcoMarkerMap(parent); + + var properties = { id : objectId, + icon : theIcon, + type : parent["type"], + typeSig : typeElement, + name : parent["name"], + faIcon : Sig.getIcoByType(parent), + content: content }; + + var coordinates = Sig.getCoordinates(parent, "markerSingle"); + var marker = Sig.getMarkerSingle(Sig.map, properties, coordinates); + marker.openPopup(); + + setTimeout(function(){ + Sig.showCircle(elementPosition, radiusElement); + Sig.map.fitBounds(Sig.circleAroundMe.getBounds()); + + <?php if(!isset($_GET["tpl"])||@$_GET["tpl"]!="iframesig"){ ?> + setTimeout(function(){ Sig.map.panBy([100, 0]); }, 500); + <?php } ?> + + }, 500); + + if(nbRes==0){ + $(".info-results").addClass("hidden"); + $(".info-no-result").removeClass("hidden"); + }else{ + $(".info-results").removeClass("hidden"); + $(".info-no-result").addClass("hidden"); + + var s = nbRes>1?"s":""; + nbRes = nbRes + " élément" + s + " trouvé" + s; + $("#nbResAroundMe").html(nbRes); + } + + $("#stepSearch").val(radiusElement); + +} + +function refreshAroundMe(radius){ + $("#grid_around").html("<h4><i class='fa fa-refresh fa-spin' style='margin-left:15px;'></i> "+trad.currentlyresearching+"</h4>"); + $("#loader-aroundme").html("<i class='fa fa-refresh fa-spin'></i>"); + + $(".btn-groupe-around-me-km .btn-map").removeClass("active"); + $(".btn-groupe-around-me-km .btn-map[data-km='"+radius+"']").addClass("active"); + + showMapLegende("refresh fa-spin", + "Chargement en cours ...<br><small>Le chargement peut prendre plusieurs secondes<br>merci de patienter...</small>"); + Sig.clearMap(); + + var url = "/element/aroundme/type/"+typeElement+"/id/"+idElement+"/radius/"+radius+"/manual/true/json/true"; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+url, + dataType: "json", + success: function(data) { + if (data.result) { + radiusElement = data.radius; + + var new_URL = "#element.aroundme.type."+typeElement+".id."+idElement+".radius."+radiusElement+".manual.true"; + window.history.replaceState( {} , "", new_URL ); + + setTimeout(function(){ + var str = directory.showResultsDirectoryHtml(data.all); + $("#grid_around").html(str); + initBtnLink(); + refreshUIAroundMe(data.all); + $("#loader-aroundme").html(""); + hideMapLegende(); + }, 1500); + } else { + toastr.error(data.msg); + } + }, + }); +} + +function initBtnLink(){ + $('.tooltips').tooltip(); + //parcours tous les boutons link pour vérifier si l'entité est déjà dans mon répertoire + $.each($(".followBtn"), function(index, value){ + var id = $(value).attr("data-id"); + var type = $(value).attr("data-type"); + //mylog.log("error type :", type); + if(type == "person") type = "people"; + else type = dyFInputs.get(type).col; + //mylog.log("#floopItem-"+type+"-"+id); + if($("#floopItem-"+type+"-"+id).length){ + //mylog.log("I FOLLOW THIS"); + if(type=="people"){ + $(value).html("<i class='fa fa-unlink text-green'></i>"); + $(value).attr("data-original-title", "Ne plus suivre cette personne"); + $(value).attr("data-ownerlink","unfollow"); + } + else{ + $(value).html("<i class='fa fa-user-plus text-green'></i>"); + + if(type == "organizations") + $(value).attr("data-original-title", "Vous êtes membre de cette organization"); + else if(type == "projects") + $(value).attr("data-original-title", "Vous êtes contributeur de ce projet"); + + //(value).attr("onclick", ""); + $(value).removeClass("followBtn"); + } + } + if($(value).attr("data-isFollowed")=="true"){ + + $(value).html("<i class='fa fa-unlink text-green'></i>"); + $(value).attr("data-original-title", (type == "events") ? "Ne plus participer" : "Ne plus suivre" ); + $(value).attr("data-ownerlink","unfollow"); + $(value).addClass("followBtn"); + } + }); + + //on click sur les boutons link + $(".followBtn").click(function(){ + formData = new Object(); + formData.parentId = $(this).attr("data-id"); + formData.childId = userId; + formData.childType = personCOLLECTION; + var type = $(this).attr("data-type"); + var name = $(this).attr("data-name"); + var id = $(this).attr("data-id"); + //traduction du type pour le floopDrawer + var typeOrigine = dyFInputs.get(type).col; + if(typeOrigine == "persons"){ typeOrigine = personCOLLECTION;} + formData.parentType = typeOrigine; + if(type == "person") type = "people"; + else type = dyFInputs.get(type).col; + + var thiselement = this; + $(this).html("<i class='fa fa-spin fa-circle-o-notch text-azure'></i>"); + //mylog.log(formData); + var linkType = (type == "events") ? "connect" : "follow"; + if ($(this).attr("data-ownerlink")=="follow"){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/"+linkType, + data: formData, + dataType: "json", + success: function(data) { + if(data.result){ + toastr.success(data.msg); + $(thiselement).html("<i class='fa fa-unlink text-green'></i>"); + $(thiselement).attr("data-ownerlink","unfollow"); + $(thiselement).attr("data-original-title", (type == "events") ? "Ne plus participer" : "Ne plus suivre"); + addFloopEntity(id, type, data.parentEntity); + } + else + toastr.error(data.msg); + }, + }); + } else if ($(this).attr("data-ownerlink")=="unfollow"){ + formData.connectType = "followers"; + //mylog.log(formData); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/link/disconnect", + data : formData, + dataType: "json", + success: function(data){ + if ( data && data.result ) { + $(thiselement).html("<i class='fa fa-chain'></i>"); + $(thiselement).attr("data-ownerlink","follow"); + $(thiselement).attr("data-original-title", (type == "events") ? "Participer" : "Suivre"); + removeFloopEntity(data.parentId, type); + toastr.success(trad["You are not following"]+data.parentEntity.name); + } else { + toastr.error("You leave succesfully"); + } + } + }); + } + }); + //on click sur les boutons link + $(".btn-tag").click(function(){ + setSearchValue($(this).html()); + }); +} + + +</script> \ No newline at end of file diff --git a/views/default/directory.php b/views/default/directory.php new file mode 100755 index 0000000000000000000000000000000000000000..5c251b5cfeffffa88220a7634c467cb89855a0f8 --- /dev/null +++ b/views/default/directory.php @@ -0,0 +1,263 @@ +<?php + $cssAnsScriptFilesModule = array( + '/js/default/directory.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , + Yii::app()->theme->baseUrl. '/assets'); + +?> + + <?php if(@$_GET['type']!="") { ?> + <?php $typeSelected = $_GET['type']; ?> + <?php if($typeSelected == "persons") $typeSelected = "citoyens" ; ?> + <?php $spec = Element::getElementSpecsByType($typeSelected); ?> + <h2 class="text-left pull-left" style="margin-left:10px; margin-top:15px; width:90%;"> + <span class="subtitle-search text-<?php echo $spec["text-color"]; ?> homestead"> + <i class="fa fa-angle-down"></i> + <?php + $typeName = Yii::t("common",$_GET['type']); + if($_GET['type'] == "vote") $typeName = "propositions"; + if($_GET['type'] == "cities") $typeName = "communes"; + ?> + <i class="fa fa-<?php echo $spec["icon"]; ?>"></i> Liste des <?php echo $typeName; ?> + </span> + </h2> + <?php } ?> + +<div class="row headerDirectory bg-white padding-15"> + <div class="col-md-12 no-padding pull-left" id="bar-tools-search" style="margin-top:0px; width:100%;"> + <?php $placeholder = ($typeSelected != "cities") ? Yii::t('common',"search by #tag or keywords...") : Yii::t('common',"search a city, a postal code ..."); ?> + <div class="input-group margin-bottom-10 col-md-8 col-sm-8 col-xs-8 pull-left"> + <input id="searchBarText" data-searchPage="true" type="text" placeholder="<?php echo $placeholder; ?>" class="input-search form-control"> + <span class="input-group-btn"> + <button class="btn btn-success btn-start-search tooltips" id="btn-start-search" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t('common','Refresh results') ; ?>"> + <i class="fa fa-search"></i> + </button> + </span> + </div> + <select class="pull-left" id="stepSearch" style="margin: 2px 0px 5px 15px; padding: 6px;"> + <option value="30">30</option> + <option value="100">100</option> + <option value="500">500</option> + <option value="1000">1000</option> + <option value="10000">Tout</option> + </select> + <button class="btn btn-sm tooltips hidden-xs" id="btn-slidup-scopetags" + style="margin-left:15px;margin-top:5px;" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t('common','Show / Hide filters') ; ?>"> + <i class="fa fa-minus"></i> + </button> + <button data-id="explainDirectory" class="explainLink btn btn-sm tooltips hidden-xs" + style="margin-left:7px;margin-top:5px;" + data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t('common','Comment ça marche ?') ; ?>"> + <i class="fa fa-question-circle"></i> + </button> + </div> + + <div class="col-md-12 col-sm-12 col-xs-12 no-padding" style="margin-bottom: 20px;"> + <?php //if(@$_GET['type'] != "cities"){ ?> + <div id="scopeListContainer" class="hidden-xs list_tags_scopes inline-block"></div> + <div class='city-name-locked text-red'></div> + + <?php //}else{ ?> + <!-- <i class="fa fa-info-circle"></i> Indiquez le nom d'une commune, ou un code postal, pour lancer la recherche --> + <?php //} ?> + </div> + +</div> + + <div class="container-result-search"> + <div class="col-md-12 padding-10 margin-bottom-5 lbl-info-search"> + <div class="lbl-info lbl-info-vote lbl-info-actions pull-left hidden col-xs-9 no-padding margin-bottom-10"> + <i class="fa fa-chevron-down"></i> + <i class="fa fa-info-circle"></i> + <b>Seuls les résultats auxquels vous avez accès sont affichés</b> <br> + (issus de vos <span class="text-green"><b>organisations</b></span>, + vos <span class="text-purple"><b>projets</b></span> ou votre <span class="text-red"><b>conseil citoyen</b></span>) + </div> + <div class="lbl-info lbl-info-organizations lbl-info-projects lbl-info-persons pull-left hidden col-xs-9 no-padding margin-bottom-10"> + <i class="fa fa-chevron-down"></i> + <i class="fa fa-info-circle"></i> + <b>Résultats triés en fonction de l'activité la plus récente des éléments recherchés</b> + </div> + <div class="lbl-info lbl-info-cities pull-left hidden col-xs-9 no-padding margin-bottom-10"> + <i class="fa fa-info-circle"></i> Indiquez le nom d'une commune, ou un code postal, pour lancer la recherche + </div> + <button class="btn btn-default pull-right text-azure" onclick="showMap(true)" style="margin-bottom: -15px;margin-top: -10px;"> + <i class="fa fa-map-marker"></i> + <span class="hidden-xs"> Afficher <span class="hidden-sm hidden-xs">sur</span> la carte</span> + </button> + </div> + <div style="" class="row no-padding" id="dropdown_search"></div> + </div> + +<?php //$this->renderPartial(@$path."first_step_directory"); ?> +<?php $city = (@$_GET['lockCityKey'] ? City::getByUnikey($_GET['lockCityKey']) : null); + + if($city == null && @$_GET['insee']) + $city = City::getCityByInsee($_GET['insee']); + + $cityName = (($city!=null) ? $city["name"]. (@$city["cp"]? ", ".$city["cp"] : "") : ""); +?> + +<script type="text/javascript"> + +var headerParams = { + "persons" : { color: "yellow", icon: "user", name: "citoyens" }, + "organizations" : { color: "green", icon: "group", name: "organisations" }, + "NGO" : { color: "green", icon: "group", name: "associations" }, + "LocalBusiness" : { color: "azure", icon: "industry", name: "entreprises" }, + "Group" : { color: "black", icon: "circle-o", name: "Groupes" }, + "projects" : { color: "purple", icon: "lightbulb-o", name: "projets" }, + "events" : { color: "orange", icon: "calendar", name: "événements" }, + "vote" : { color: "azure", icon: "gavel", name: "Propositions, Questions, Votes" }, + "actions" : { color: "lightblue2", icon: "cogs", name: "actions" }, + "cities" : { color: "red", icon: "university", name: "communes" }, + "poi" : { color: "black", icon: "map-marker", name: "points d'intérêts" }, + "products" : { color: "orange", icon: "gift", name: "product" }, +} +function setHeaderDirectory(type){ + + var params = new Array(); + if(typeof headerParams[type] == "undefined") return; + params = headerParams[type]; + $(".subtitle-search").html('<span class="text-'+params.color+' homestead">'+ + '<i class="fa fa-angle-down"></i> <i class="fa fa-'+params.icon+'"></i> '+ + params.name+ + '</span>'); + + $(".lbl-info-search .lbl-info").addClass("hidden"); + $(".lbl-info-search .lbl-info.lbl-info-"+type).removeClass("hidden"); + + $("#dropdown_search").html(""); + + if(type == "cities") { + $("#searchBarText").attr("placeholder", "rechercher une ville, un code postal..."); + $("#scopeListContainer, #btn-slidup-scopetags").hide(200); + }else{ + $("#searchBarText").attr("placeholder", "rechercher par #tag ou mots clés..."); + $("#scopeListContainer, #btn-slidup-scopetags").show(200); + } + + $(".menu-left-container #menu-extend .menu-button-left").removeClass("selected"); + $(".menu-left-container #menu-extend #menu-btn-"+type).addClass("selected"); + + $(".my-main-container").scrollTop(0); + + Sig.clearMap(); + +} + +var searchType = [ "persons" ]; +var allSearchType = [ "persons", "organizations", "projects", "events", "vote", "cities" ]; + +var personCOLLECTION = "<?php echo Person::COLLECTION ?>"; +var userId = '<?php echo isset( Yii::app()->session["userId"] ) ? Yii::app() -> session["userId"] : null; ?>'; +var lockCityKey = <?php echo (@$_GET['lockCityKey']) ? "'".$_GET['lockCityKey']."'" : "null" ?>; +var cityNameLocked = "<?php echo $cityName; ?>"; +var typeSelected = <?php echo (@$_GET['type']) ? "'".$_GET['type']."'" : "null" ?>; + +jQuery(document).ready(function() { + + currentTypeSearchSend = "search"; + + $("#searchBarText").val($(".input-global-search").val()); + + $("#btn-slidup-scopetags").click(function(){ + slidupScopetagsMin(); + }); + + + searchType = (typeSelected == null) ? [ "persons" ] : [ typeSelected ]; + allSearchType = [ "persons", "organizations", "projects", "events", "events", "vote", "cities","poi" ]; + topMenuActivated = true; + hideScrollTop = true; + loadingData = false; + + checkScroll(); + var timeoutSearch = setTimeout(function(){ }, 100); + + setTimeout(function(){ $("#input-communexion").hide(300); }, 300); + + setTitle("<span id='main-title-menu'>Moteur de recherche</span>","search","Moteur de recherche"); + + $('.tooltips').tooltip(); + + setHeaderDirectory(typeSelected); + + showTagsScopesMin("#scopeListContainer"); + + if(lockCityKey != null){ + lockScopeOnCityKey(lockCityKey, cityNameLocked); + }else{ + rebuildSearchScopeInput(); + } + $('#btn-start-search').click(function(e){ + //signal que le chargement est terminé + loadingData = false; + startSearch(0, indexStepInit); + }); + + + $(".my-main-container").bind('scroll', function(){ + if(!loadingData && !scrollEnd){ + var heightContainer = $(".my-main-container")[0].scrollHeight; + var heightWindow = $(window).height(); + + if(scrollEnd == false){ + var heightContainer = $(".my-main-container")[0].scrollHeight; + var heightWindow = $(window).height(); + if( ($(this).scrollTop() + heightWindow) >= heightContainer-150){ + mylog.log("scroll MAX"); + startSearch(currentIndexMin+indexStep, currentIndexMax+indexStep); + } + } + } + }); + + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + //var index = searchType.indexOf(type); + searchType [ type ]; + // if (index > -1) removeSearchType(type); + // else addSearchType(type); + //addSearchType(type); + loadingData = false; + startSearch(0, indexStepInit); + + + }); + + + $("#stepSearch").change(function(){ mylog.log("new stepSearch : " + $("#stepSearch").val()); + indexStepInit = parseInt($("#stepSearch").val()); + }); + +/* $(".searchIcon").removeClass("fa-search").addClass("fa-file-text-o"); + $(".searchIcon").attr("title","Mode Recherche ciblé (ne concerne que cette page)");*/ + $('.tooltips').tooltip(); + searchPage = true; + + + //initBtnScopeList(); + startSearch(0, 30); +}); + +function searchCallback() { + mylog.log("searchCallback"); + startSearch(0, indexStepInit); +} + +function showResultInCalendar(mapElements){} + +</script> + + + + + + + diff --git a/views/default/directoryTable.php b/views/default/directoryTable.php new file mode 100755 index 0000000000000000000000000000000000000000..16191d732f45f04d142bb427a2e0dd173e785567 --- /dev/null +++ b/views/default/directoryTable.php @@ -0,0 +1,550 @@ +<?php +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); +echo CHtml::cssFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/css/DT_bootstrap.css'); +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/DT_bootstrap.js'); + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); +?> + +<div class="panel panel-white"> + <div class="panel-heading border-light"> + <h4 class="panel-title"><i class="fa fa-globe fa-2x text-green"></i> <a href="javascript:;" onclick="applyStateFilter('organization|NGO|Group|LocalBusiness')" class="filter<?php echo Organization::COLLECTION ?> btn btn-xs btn-default"> Organizations <span class="badge badge-warning"> <?php echo count(@$organizations) ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('person')" class="filter<?php echo Person::COLLECTION ?> btn btn-xs btn-default"> People <span class="badge badge-warning"> <?php echo count(@$people) ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('event|concert|meeting|dance')" class="filter<?php echo Event::COLLECTION ?> btn btn-xs btn-default"> Events <span class="badge badge-warning"> <?php echo count(@$events) ?></span></a> + <a href="javascript:;" onclick="applyStateFilter('project')" class="filter<?php echo Project::COLLECTION ?> btn btn-xs btn-default"> Projects <span class="badge badge-warning"> <?php echo count(@$projects) ?></span></a> + <a href="javascript:;" onclick="clearAllFilters('')" class="btn btn-xs btn-default"> All</a></h4> + </div> + <div class="panel-tools"> + <?php if( Yii::app()->session["userId"] ) { ?> + <a href="javascript:;" onclick="openSubView('Add an Organisation', '/'+moduleId+'/organization/addorganizationform',null)" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Add an Organization"><i class="fa fa-plus"></i> <i class="fa fa-group"></i> </a> + + <a href="javascript:;" onclick="openSubView('Add an Organisation', '/'+moduleId+'/events/addeventform',null)" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Add an Event"><i class="fa fa-plus"></i> <i class="fa fa-calendar"></i></a> + + <a href="javascript:;" onclick="openSubView('Add an Organisation', '/'+moduleId+'/person/inviteSomeone',null)" class="btn btn-xs btn-light-blue tooltips" data-placement="top" data-original-title="Invite Someone "><i class="fa fa-plus"></i> <i class="fa fa-user"></i></a> + <?php } ?> + + </div> + <div class="panel-body"> + <div> + <?php //var_dump($projects) ?> + <table class="table table-striped table-bordered table-hover directoryTable"> + <thead> + <tr> + <th>Type</th> + <th>Name</th> + <?php if( Yii::app()->session[ "userIsAdmin"] && Yii::app()->controller->id == "admin" ){?> + <th>Email</th> + <?php }?> + <th>Tags</th> + <th>Scope</th> + <th>Actions</th> + </tr> + </thead> + <tbody class="directoryLines"> + <?php + $memberId = Yii::app()->session["userId"]; + $memberType = Person::COLLECTION; + $tags = array(); + $scopes = array( + "codeInsee"=>array(), + "codePostal"=>array(), + "region"=>array(), + ); + + /* ************ ORGANIZATIONS ********************** */ + if(isset($organizations)) + { + foreach ($organizations as $e) + { + buildDirectoryLine($e, Organization::COLLECTION, Organization::CONTROLLER, Organization::ICON, $this->module->id,$tags,$scopes); + }; + } + + /* ********** PEOPLE ****************** */ + if(isset($people)) + { + foreach ($people as $e) + { + buildDirectoryLine($e, Person::COLLECTION, Person::CONTROLLER, Person::ICON, $this->module->id,$tags,$scopes); + } + } + + /* ************ EVENTS ************************ */ + if(isset($events)) + { + foreach ($events as $e) + { + buildDirectoryLine($e, Event::COLLECTION, Event::CONTROLLER, Event::ICON, $this->module->id,$tags,$scopes); + } + } + + /* ************ PROJECTS **************** */ + if( count($projects) ) + { + foreach ($projects as $e) + { + buildDirectoryLine($e, Project::COLLECTION, Project::CONTROLLER, Project::ICON, $this->module->id,$tags,$scopes); + } + } + + function buildDirectoryLine( $e, $collection, $type, $icon, $moduleId, &$tags, &$scopes ){ + + if(!isset( $e['_id'] ) || !isset( $e["name"]) || $e["name"] == "" ) + return; + $actions = ""; + $classes = ""; + $id = @$e['_id']; + + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ) + { + if($type == Person::CONTROLLER){ + //Activated + if( @$e["roles"]["tobeactivated"] ) + { + $classes .= "tobeactivated"; + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 validateThisBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Validate </a></li>'; + } + //Beta Test + if (@Yii::app()->params['betaTest']) { + if( @$e["roles"]["betaTester"] ) { + $classes .= "betaTester"; + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 revokeBetaTesterBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Revoke this beta tester </a></li>'; + } else { + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 addBetaTesterBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Add this beta tester </a></li>'; + } + } + //Super Admin + if( @$e["roles"]["superAdmin"] ) { + $classes .= "superAdmin"; + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 revokeSuperAdminBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Revoke this super admin </a></li>'; + } else { + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 addSuperAdminBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span> Add this super admin </a></li>'; + } + + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" class="margin-right-5 switch2UserThisBtn"><span class="fa-stack"><i class="fa fa-user fa-stack-1x"></i><i class="fa fa-eye fa-stack-1x stack-right-bottom text-danger"></i></span> Switch to this user</a> </li>'; + + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 deleteThisBtn"><i class="fa fa-times text-red"></i>Delete</a> </li>'; + //TODO + $actions .= '<li><a href="javascript:;" data-id="'.$id.'" data-type="'.$type.'" class="margin-right-5 banThisBtn"><i class="fa fa-times text-red"></i> TODO : Ban</a> </li>'; + + } else if( $type == Organization::CONTROLLER ) { + + } + } + + /* ************************************** + * TYPE + ICON + ***************************************** */ + $strHTML = '<tr id="'.$type.(string)$id.'">'. + '<td class="'.$collection.'Line '.$classes.'">'. + '<a href="'.Yii::app()->createUrl('/'.$moduleId.'/'.$type.'/dashboard/id/'.$id).'">'; + if ($e && isset($e["imagePath"])){ + $strHTML .= '<img width="50" height="50" alt="image" class="img-circle" src="'.Yii::app()->createUrl('/'.$moduleId.'/document/resized/50x50'.$e['imagePath']).'">'.((isset($e["type"])) ? $e["type"] : ""); + } else { + $strHTML .= '<i class="fa '.$icon.' fa-2x"></i> '.$type.''; + } + $strHTML .= '</a>'; + $strHTML .= '</td>'; + + /* ************************************** + * NAME + ***************************************** */ + $strHTML .= '<td><a href="'.Yii::app()->createUrl('/'.$moduleId.'/'.$type.'/dashboard/id/'.$id).'">'.((isset($e["name"]))? $e["name"]:"").'</a></td>'; + + /* ************************************** + * EMAIL for admin use only + ***************************************** */ + if( Yii::app()->session[ "userIsAdmin"] && Yii::app()->controller->id == "admin" ){ + $strHTML .= '<td><a href="'.Yii::app()->createUrl('/'.$moduleId.'/'.$type.'/dashboard/id/'.$id).'">'.((isset($e["email"]))? $e["email"]:"").'</a></td>'; + } + + /* ************************************** + * TAGS + ***************************************** */ + $strHTML .= '<td>'; + if(isset($e["tags"])){ + foreach ($e["tags"] as $key => $value) { + $strHTML .= ' <a href="#" onclick="applyTagFilter(\''.$value.'\')"><span class="label label-inverse">'.$value.'</span></a>'; + if( $tags != "" && !in_array($value, $tags) ) + array_push($tags, $value); + } + } + $strHTML .= '</td>'; + + /* ************************************** + * SCOPES + ***************************************** */ + $strHTML .= '<td>'; + if( isset($e["address"]) && isset( $e["address"]['codeInsee']) ){ + $strHTML .= ' <a href="#" onclick="applyScopeFilter('.$e["address"]['codeInsee'].')"><span class="label label-inverse">'.$e["address"]['codeInsee'].'</span></a>'; + if( !in_array($e["address"]['codeInsee'], $scopes['codeInsee']) ) + array_push($scopes['codeInsee'], $e["address"]['codeInsee'] ); + } + if( isset($e["address"]) && isset( $e["address"]['codePostal']) ){ + $strHTML .= ' <a href="#" onclick="applyScopeFilter('.$e["address"]['codePostal'].')"><span class="label label-inverse">'.$e["address"]['codePostal'].'</span></a>'; + if( !in_array($e["address"]['codePostal'], $scopes['codePostal']) ) + array_push($scopes['codePostal'], $e["address"]['codePostal'] ); + } + if( isset($e["address"]) && isset( $e["address"]['region']) ){ + $strHTML .= ' <a href="#" onclick="applyScopeFilter('.$e["address"]['region'].')"><span class="label label-inverse">'.$e["address"]['region'].'</span></a>'; + if( !in_array($e["address"]['region'], $scopes['region']) ) + array_push($scopes['region'], $e["address"]['region'] ); + } + $strHTML .= '</td>'; + + /* ************************************** + * ACTIONS + ***************************************** */ + $strHTML .= '<td class="center">'; + if( !empty($actions) && Yii::app()->session["userIsAdmin"] ) + $strHTML .= '<div class="btn-group">'. + '<a href="#" data-toggle="dropdown" class="btn btn-danger dropdown-toggle btn-sm"><i class="fa fa-cog"></i> <span class="caret"></span></a>'. + '<ul class="dropdown-menu pull-right dropdown-dark" role="menu">'. + $actions. + '</ul></div>'; + $strHTML .= '</td>'; + + $strHTML .= '</tr>'; + echo $strHTML; + } + ?> + + </tbody> + </table> + + + <div class="ps-scrollbar-x-rail" style="left: 0px; bottom: 3px; width: 0px; display: none;"><div class="ps-scrollbar-x" style="left: -10px; width: 0px;"></div></div><div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 230px; display: inherit;"><div class="ps-scrollbar-y" style="top: 0px; height: 0px;"></div></div> + <?php + /*if (isset($organizations) && count($organizations) == 0) { + ?> + <div id="infoPodOrga" class="padding-10"> + <blockquote> + Create or Connect + <br>an Organization, NGO, + <br>Local Business, Informal Group. + <br>Build links in your network, + <br>to create a connected local directory + </blockquote> + </div> + <?php + };*/ + ?> + </div> + </div> +</div> +<script type="text/javascript"> +var openingFilter = "<?php echo ( isset($_GET['type']) ) ? $_GET['type'] : '' ?>"; +var directoryTable = null; +var contextMap = { + "tags" : <?php echo json_encode($tags) ?>, + "scopes" : <?php echo json_encode($scopes) ?>, +}; + +jQuery(document).ready(function() { + setTitle("Espace administrateur : Répertoire","cog"); + bindAdminBtnEvents(); + resetDirectoryTable() ; + if(openingFilter != "") + $('.filter'+openingFilter).trigger("click"); +}); + + +function resetDirectoryTable() +{ + mylog.log("resetDirectoryTable"); + + if( !$('.directoryTable').hasClass("dataTable") ) + { + directoryTable = $('.directoryTable').dataTable({ + "aoColumnDefs" : [{ + "aTargets" : [0] + }], + "oLanguage" : { + "sLengthMenu" : "Show _MENU_ Rows", + "sSearch" : "", + "oPaginate" : { + "sPrevious" : "", + "sNext" : "" + } + }, + "aaSorting" : [[1, 'asc']], + "aLengthMenu" : [[5, 10, 15, 20, -1], [5, 10, 15, 20, "All"] // change per page values here + ], + // set the initial value + "iDisplayLength" : 10, + }); + } + else + { + if( $(".directoryLines").children('tr').length > 0 ) + { + directoryTable.dataTable().fnDestroy(); + directoryTable.dataTable().fnDraw(); + } else { + mylog.log(" directoryTable fnClearTable"); + directoryTable.dataTable().fnClearTable(); + } + } +} + +function applyStateFilter(str) +{ + mylog.log("applyStateFilter",str); + directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); +} +function clearAllFilters(str){ + directoryTable.DataTable().column( 0 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); +} +function applyTagFilter(str) +{ + mylog.log("applyTagFilter",str); + if(!str){ + str = ""; + sep = ""; + $.each($(".btn-tag.active"), function() { + mylog.log("applyTagFilter",$(this).data("id")); + str += sep+$(this).data("id"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyTagFilter",str); + directoryTable.DataTable().column( 2 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function applyScopeFilter(str) +{ + //mylog.log("applyScopeFilter",$(".btn-context-scope.active").length); + if(!str){ + str = ""; + sep = ""; + $.each( $(".btn-context-scope.active"), function() { + mylog.log("applyScopeFilter",$(this).data("val")); + str += sep+$(this).data("val"); + sep = "|"; + }); + } else + clearAllFilters(""); + mylog.log("applyScopeFilter",str); + directoryTable.DataTable().column( 3 ).search( str , true , false ).draw(); + return $('.directoryLines tr').length; +} + +function bindAdminBtnEvents(){ + mylog.log("bindAdminBtnEvents"); + + <?php + /* ************************************** + * ADMIN STUFF + ***************************************** */ + if( Yii::app()->session["userIsAdmin"] ) {?> + + $(".validateThisBtn").off().on("click",function () + { + mylog.log("validateThisBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/activateuser/user/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) + { + if ( data && data.result ) { + toastr.info("Activated User!!"); + btnClick.empty().html('<i class="fa fa-thumbs-up"></i>'); + } else { + toastr.info("something went wrong!! please try again."); + } + }); + + }); + + }); + + $(".addBetaTesterBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "addBetaTester"); + } + }); + }); + + $(".revokeBetaTesterBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "revokeBetaTester") + } + }); + }); + + $(".addSuperAdminBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "addSuperAdmin"); + } + }); + }); + + $(".revokeSuperAdminBtn").off().on("click",function () { + var btnClick = $(this); + bootbox.confirm("confirm please !!", function(result) { + if (result) { + changeRole(btnClick, "revokeSuperAdmin") + } + }); + }); + + + $(".switch2UserThisBtn").off().on("click",function () + { + mylog.log("switch2UserThisBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/switchto/uid/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) + { + if ( data && data.result ) { + toastr.info("Switched user!!"); + //window.location.href = baseUrl+"/"+moduleId; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + }); + + }); + + $(".deleteThisBtn").off().on("click",function () + { + mylog.log("deleteThisBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/admin/delete/type/"+type+"/id/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-thumbs-down"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.info("User has been deleted"); + $("#"+type+id).remove(); + //window.location.href = ""; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + }); + + }); + + <?php } ?> + $(".banThisBtn").off().on("click",function () + { + mylog.log("banThisBtn click"); + }); +} + +function changeRole(button, action) { + mylog.log(button," click"); + //$(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var urlToSend = baseUrl+"/"+moduleId+"/person/changerole/"; + var res = false; + + $.ajax({ + type: "POST", + url: urlToSend, + data: { + "id" : button.data("id"), + "action" : action + }, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.success("Change has been done !!"); + changeButtonName(button, action); + bindAdminBtnEvents(); + } else { + toastr.error("Something went wrong!! please try again. " + data.msg); + } + }); +} + +function changeButtonName(button, action) { + mylog.log(action); + var icon = '<span class="fa-stack"> <i class="fa fa-user fa-stack-1x"></i><i class="fa fa-check fa-stack-1x stack-right-bottom text-danger"></i></span>'; + if (action=="addBetaTester") { + button.removeClass("addBetaTesterBtn"); + button.addClass("revokeBetaTesterBtn"); + button.html(icon+" Revoke this beta tester"); + } else if (action=="revokeBetaTester") { + button.removeClass("revokeBetaTesterBtn"); + button.addClass("addBetaTesterBtn"); + button.html(icon+" Add this beta tester"); + } else if (action=="addSuperAdmin") { + button.removeClass("addSuperAdminBtn"); + button.addClass("revokeSuperAdminBtn"); + button.html(icon+" Revoke this super admin"); + } else if (action=="revokeSuperAdmin") { + button.removeClass("revokeSuperAdminBtn"); + button.addClass("addSuperAdminBtn"); + button.html(icon+" Add this super admin"); + } else { + mylog.warn("Unknown action !"); + } +} + +</script> \ No newline at end of file diff --git a/views/default/directoryjs.php b/views/default/directoryjs.php index 69fb59fdbda9eafdd9b03c5c134a7ada7f3b2c64..73b0973ad59b4549de8bc8c539e7e4b307c9920e 100755 --- a/views/default/directoryjs.php +++ b/views/default/directoryjs.php @@ -1,6 +1,12 @@ <?php -HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , + $cssAnsScriptFilesModule = array( + //'/js/default/directory.js', + ); + //HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , Yii::app()->theme->baseUrl. '/assets'); + ?> <style> @@ -126,6 +132,10 @@ HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , <div class="container-result-search"> <<<<<<< HEAD +<<<<<<< HEAD +======= + +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla <?php if(@$_GET['type']!="") { ?> <?php $typeSelected = $_GET['type']; ?> <?php if($typeSelected == "persons") $typeSelected = "citoyens" ; ?> @@ -145,6 +155,7 @@ HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , </h4> <?php } ?> <?php if($typeSelected == "cities"){ ?> +<<<<<<< HEAD ======= afazdazazdzada <?php if(@$_GET['type']!="") { @@ -153,6 +164,8 @@ afazdazazdzada $spec = Element::getElementSpecsByType($typeSelected); if($typeSelected == "cities"){ ?> >>>>>>> 724cb96b7b991212b32d40ca02a293c892836c48 +======= +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla <p class="text-center bold"> Recherchez une commune à laquelle vous communecter.<br> Une fois communecté, toutes vos recherches seront automatiquement filtrées en fonction de la commune choisie. </p> @@ -213,9 +226,55 @@ afazdazazdzada <?php } ?> - <?php if($typeSelected == "all"){ + <?php if($typeSelected == "all"){ ?> + + <?php if(Yii::app()->params["CO2DomainName"] != "terla"){ ?> - if( $typeSelected == "vote" ){?> + <div class="col-sm-2 col-md-2 col-xs-12 text-right margin-top-5 no-padding" id="col-btn-type-directory"> + <button class="btn text-white bg-dark btn-open-filliaire"> + <i class="fa fa-th"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Themes") ?></span> + </button><hr class="hidden-xs"> + <button class="btn text-black bg-white btn-directory-type btn-all" data-type="all"> + <i class="fa fa-search"></i> + <span class="hidden-xs"><?php echo Yii::t("common","All") ?></span> + </button><hr class="hidden-xs"> + <button class="btn text-yellow btn-directory-type" data-type="persons"> + <i class="fa fa-user"></i> + <span class="hidden-xs"><?php echo Yii::t("common","People") ?></span> + </button><hr class="hidden-xs"> + <button class="btn text-green btn-directory-type" data-type="NGO"> + <i class="fa fa-group"></i> + <span class="hidden-xs"><?php echo Yii::t("common", "NGOs") ?></span> + </button><br class="hidden-xs"> + <button class="btn text-azure btn-directory-type" data-type="LocalBusiness"> + <i class="fa fa-industry"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Compagnies") ?></span> + </button><br class="hidden-xs"> + <button class="btn text-turq btn-directory-type" data-type="Group"> + <i class="fa fa-circle-o"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Groups") ?></span> + </button><br class="hidden-xs"> + <button class="btn text-purple btn-directory-type" data-type="projects"> + <i class="fa fa-lightbulb-o"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Projects") ?></span> + </button><hr class="hidden-xs"> + <!-- <button class="btn text-red btn-directory-type" data-type="cities"> + <i class="fa fa-university"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Cities") ?></span> + </button><br class="hidden-xs"> --> + <button class="btn text-red btn-directory-type" data-type="GovernmentOrganization"> + <i class="fa fa-university"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Public structures") ?></span> + </button><hr class="hidden-xs"> + <button class="btn text-green-poi btn-directory-type" data-type="poi"> + <i class="fa fa-map-marker"></i> + <span class="hidden-xs"><?php echo Yii::t("common","Point of interest") ?></span> + </button> + <hr class="hidden-sm hidden-md hidden-lg"> + </div> + <?php } ?> + <?php } else if( $typeSelected == "vote" ){?> <div class="col-sm-2 col-md-2 col-xs-12 text-right margin-top-15 no-padding" id="col-btn-type-directory"> <button class="btn text-white bg-dark btn-open-filliaire"> @@ -265,7 +324,100 @@ afazdazazdzada </div> <?php }else if($typeSelected == "classified"){ - $service = CO2::getContextList("service"); + if(Yii::app()->params["CO2DomainName"] != "terla"){ ?> + <div class="col-lg-2 col-md-2 col-sm-3 col-xs-8 margin-top-15 text-right subsub classifiedFilters" id="sub-menu-left"> + <!-- <h4 class="text-dark padding-bottom-5"><i class="fa fa-angle-down"></i> Catégories</h4> + <hr> --> + <h4 class="margin-top-25 padding-bottom-10 letter-azure label-category" id="title-sub-menu-category"> + <i class="fa fa-search"></i> + </h4> + <hr> + <?php + $classified = CO2::getContextList("classified"); + foreach ($classified['filters'] as $key => $cat) { + ?> + <?php if(is_array($cat)) { ?> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="<?php echo $key; ?>"> + <i class="fa fa-<?php echo @$cat["icon"]; ?> hidden-xs"></i> <?php echo Yii::t("category",$key); ?> + </button><br> + <?php foreach ($cat["subcat"] as $key2 => $cat2) { ?> + <button class="btn btn-default text-azure margin-bottom-5 margin-left-15 hidden keycat keycat-<?php echo $key; ?>" data-categ="<?php echo $key; ?>" data-keycat="<?php echo $cat2; ?>"> + <i class="fa fa-angle-right"></i> <?php echo Yii::t("category",$cat2); ?> + </button><br class="hidden"> + <?php } ?> + <?php } ?> + <?php } ?> + <?php if( @Yii::app()->session["userId"] ) { ?> + <hr> + <button class="btn btn-default margin-bottom-5 btn-select-category-1" style="margin-left:-5px;" data-keycat="favorites"> + <span class="text-red"><i class="fa fa-star hidden-xs"></i> <?php echo Yii::t("common","MY FAVORITES") ?></span> + </button> + <?php } ?> + </div> + + <div class="col-lg-10 col-md-9 col-sm-9 col-xs-12 text-center subsub" id="menu-section-classified"> + <!-- <button class="btn margin-bottom-5 margin-left-5 btn-select-type-anc letter-<?php echo @$section["color"]; ?>" + data-type="classified" data-type-anc="" data-key="all"> + <i class="fa fa-circle-o"></i> + <span class="hidden-xs hidden-sm"> Tous </span> + </button> --> + <?php + $currentSection = 1; + foreach ($classified["sections"] as $key => $section) { ?> + <div class="col-md-2 col-sm-4 col-xs-6 no-padding"> + <button class="btn btn-default col-md-12 col-sm-12 padding-10 bold text-dark elipsis btn-select-type-anc" + data-type-anc="<?php echo @$section["label"]; ?>" data-key="<?php echo @$section["key"]; ?>" + data-type="classified" + style="border-radius:0px; border-color: transparent; text-transform: uppercase;"> + <i class="fa fa-<?php echo $section["icon"]; ?> fa-2x hidden-xs"></i><br><?php echo Yii::t("category",$section["labelFront"]); ?> + </button> + </div> + <?php } ?> + <hr class="col-md-12 col-sm-12 col-xs-12 no-padding" id="before-section-result"> + </div> + + <div class="col-lg-10 col-md-9 col-sm-9 col-xs-12 padding-top-10" id="section-price"> + + <div class="form-group col-md-4 col-sm-4 col-xs-6"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding" for="sectionBtn"> + <i class="fa fa-chevron-down"></i> <?php echo Yii::t("common","Min price") ?> + </label> + <input type="text" id="priceMin" name="priceMin" class="form-control" + placeholder="<?php echo Yii::t("common","Max Min") ?>"/> + </div> + + <div class="form-group col-md-4 col-sm-4 col-xs-6"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding" for="sectionBtn"> + <i class="fa fa-chevron-down"></i> <?php echo Yii::t("common","Max price") ?> + </label> + <input type="text" id="priceMax" name="priceMax" class="form-control col-md-5" + placeholder="<?php echo Yii::t("common","Max price") ?>"/> + </div> + + <div class="form-group col-md-2 col-sm-2 col-xs-12"> + <label class="col-md-12 col-sm-12 col-xs-12 text-left control-label no-padding" for="sectionBtn"> + <i class="fa fa-money"></i> <?php echo Yii::t("common","Money") ?> + </label> + <select class="form-control" name="devise" id="devise" style=""> + <?php foreach($devises as $key => $devise){ ?> + <option class="bold" value="<?php echo $key; ?>"><?php echo $devise; ?></option> + <?php } ?> + </select> + </div> + + <div class="form-group col-md-2 col-sm-2 col-xs-12 margin-top-10"> + <button class="btn btn-default col-md-12 margin-top-15 btn-directory-type" data-type="classified"> + <i class="fa fa-search"></i> <span class="hidden-xs hidden-ms"><?php echo Yii::t("common","Search") ?></span> + </button> + </div> + + <hr class="col-md-12 col-sm-12 col-xs-12 margin-top-10 no-padding" id="before-section-result"> + + </div> + <!-- </div> --> + + <?php } else{ + $service = CO2::getContextList("service"); ?> <div class="col-lg-2 col-md-3 col-sm-3 col-md-offset-1 col-sm-offset-1 col-xs-12 margin-top-25 text-left subsub no-padding shadow2" id="sub-menu-left"> <h4 class="bg-orange text-white no-margin padding-10">FILTRE</h4> @@ -335,11 +487,14 @@ afazdazazdzada <?php } ?> - <?php + <?php + if($typeSelected != "classified" && Yii::app()->params["CO2DomainName"] == "terla"){ $this->renderPartial("../default/panels/filterMenu", array("typeSelected"=>$typeSelected, )); + } ?> +<<<<<<< HEAD <<<<<<< HEAD <?php $col = ( !in_array($typeSelected, array("classified","products","services","circuits","events","vote","all","place") )) ? 10 : 8; ?> @@ -352,6 +507,8 @@ afazdazazdzada echo '<div>Ajout des services sur le circuit <span id="headerServices"></span></div>'; ?> ======= +======= +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla <?php $col = ( !in_array($typeSelected, array("classified","products","services","circuits","events","vote","all","place") )) ? 10 : 8; ?> @@ -359,8 +516,10 @@ afazdazazdzada <?php if(Yii::app()->params["CO2DomainName"] == "terla"){ $col = 8; } ?> >>>>>>> 724cb96b7b991212b32d40ca02a293c892836c48 ->>>>>>> a759dd8a283f289d0cdeb9b95603554747aee778 <div class="col-sm-<?php echo $col ?>" id="dropdown_search"></div> + <?php if(Yii::app()->params["CO2DomainName"] != "terla"){ ?> + <div id="listTags" class="col-sm-2 col-md-2 hidden-xs hidden-sm text-left"></div> + <?php } ?> <?php } ?> </div> @@ -392,7 +551,7 @@ var headerParams = { "vote" : { color: "azure", icon: "gavel", name: "Propositions, Questions, Votes" }, "actions" : { color: "lightblue2", icon: "cogs", name: "actions" }, "cities" : { color: "red", icon: "university", name: trad.municipalities }, - "poi" : { color: "black", icon: "map-marker", name: trad.pointsinterests }, + "poi" : { color: "black", icon: "map-marker", name: trad.pointsinterests }, "wikidata" : { color: "lightblue2", icon: "group", name: "Wikidata" }, "datagouv" : { color: "lightblue2", icon: "bullhorn", name: "DataGouv" }, "osm" : { color: "lightblue2", icon: "bullhorn", name: "Open Street Map" }, @@ -468,8 +627,8 @@ var typeSelected = <?php echo (@$_GET['type']) ? "'".$_GET['type']."'" : "null" var filliaireCategories = <?php echo json_encode($filliaireCategories); ?>; jQuery(document).ready(function() { - - currentTypeSearchSend = "search"; + + currentTypeSearchSend = "search"; $("#btn-slidup-scopetags").click(function(){ @@ -479,17 +638,17 @@ jQuery(document).ready(function() { searchType = (typeSelected == null) ? [ "persons" ] : [ typeSelected ]; allSearchType = [ "persons", "organizations", "projects", "events", "events", "vote", "cities","poi","place" ]; - topMenuActivated = true; - hideScrollTop = true; + topMenuActivated = true; + hideScrollTop = true; loadingData = false; - checkScroll(); + checkScroll(); var timeoutSearch = setTimeout(function(){ }, 100); setTimeout(function(){ $("#input-communexion").hide(300); }, 300); - //setTitle("<span id='main-title-menu'>Moteur de recherche</span>","search","Moteur de recherche"); - + //setTitle("<span id='main-title-menu'>Moteur de recherche</span>","search","Moteur de recherche"); + $('.tooltips').tooltip(); setHeaderDirectory(typeSelected); @@ -542,4 +701,15 @@ jQuery(document).ready(function() { startSearch(0, indexStepInit, searchCallback); <?php } ?> }); -</script> \ No newline at end of file + + + + +</script> + + + + + + + diff --git a/views/default/help.php b/views/default/help.php new file mode 100644 index 0000000000000000000000000000000000000000..366d0d76fd6d1a1222573dd12e37866ef69f2b5a --- /dev/null +++ b/views/default/help.php @@ -0,0 +1,35 @@ +<div class="container"> + + <div class="row"> + <div class="col-lg-12 text-center"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" style="margin-bottom:20px;" class="nc_map" height=50> + <h3 class="letter-red no-margin hidden-xs" style="margin-top:5px!important;"> + Help ShortCuts<br> + </h3> + <br><br><br> + </div> + </div> + + <div class="col-xs-6"> + <h1>Ouvrir</h1> + <h2 class="text-dark text-left"><span class="text-red"> F3 </span> : CARTOGRAPHIE </h2> + <h2 class="text-dark text-left"><span class="text-red"> CTRL + ALT + "B" </span>: vos Favoris </h2> + <h2 class="text-dark text-left"><span class="text-red"> CTRL + ALT + "F" </span>: Le Finder </h2> + <h2 class="text-dark text-left"><span class="text-red"> CTRL + ALT + "H" </span>: AIDE </h2> + <h2 class="text-dark text-left"><span class="text-red"> CTRL + ALT + "R" </span>: Votre Repertoire </h2> + <h2 class="text-dark text-left"><span class="text-red"> CTRL + ALT + "L" </span>: DOC ET INFOS </h2> + </div> + + <div class="col-xs-6"> + <h1>Ajouter</h1> + <h2 class="text-dark text-right"> Tout : <span class="text-red"> CTRL + ALT + "=" </span> </h2> + <h2 class="text-dark text-right"> une Personne : <span class="text-red"> CTRL + ALT + "I" </span> </h2> + <h2 class="text-dark text-right"> une Orga : <span class="text-red"> CTRL + ALT + "O" </span> </h2> + <h2 class="text-dark text-right"> un Évent : <span class="text-red"> CTRL + ALT + "E" </span> </h2> + <h2 class="text-dark text-right"> un Projet : <span class="text-red"> CTRL + ALT + "P" </span> </h2> + <h2 class="text-dark text-right"> une Annonce : <span class="text-red"> CTRL + ALT + "C" </span> </h2> + <h2 class="text-dark text-right"> une Action : <span class="text-red"> CTRL + ALT + "A" </span> </h2> + <h2 class="text-dark text-right"> Décision : <span class="text-red"> CTRL + ALT + "V" </span> </h2> + </div> + +</div> \ No newline at end of file diff --git a/views/default/index.php b/views/default/index.php index 13bab40d116c6e20defeee250d478c03754a7e0b..0903bddf2b5d96f78b485a40bce8b54a7ba265df 100755 --- a/views/default/index.php +++ b/views/default/index.php @@ -22,7 +22,10 @@ on garde les librairies specifique au module dans le module ); HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +<<<<<<< HEAD HtmlHelper::registerCssAndScriptsFilesOverwrite(); +======= +>>>>>>> parent of 724cb96... Merge branch 'terla' of https://github.com/pixelhumain/co2 into terla function random_pic() { diff --git a/views/default/links.php b/views/default/links.php new file mode 100644 index 0000000000000000000000000000000000000000..fb52297c413fc0b1f12972c8590a2a0469ee20cc --- /dev/null +++ b/views/default/links.php @@ -0,0 +1,136 @@ + + +<style type="text/css"> + + .linksmo a:hover{ + color:#E33551; + } +</style> + <div class="container linksmo"> + + <div class="row"> + <div class="col-lg-12 text-center"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" style="margin-bottom:20px;" class="nc_map" height=50> + <h3 class="letter-red no-margin hidden-xs" style="margin-top:5px!important;"> + INFORMATIONS & LIENS<br> + </h3> + <br><br><br> + </div> + </div> + + <div class="col-xs-4" > + <h1><span class="text-red">CO</span>MPRENDRE</h1> + <h2><a href="default/view/page/philosophy/dir/docs|panels" class="lbhp">PHILOSOPHIE</a></h2> + <h2><a href="default/view/page/keywords/dir/docs|panels" class="lbhp">MOTs CLEFS</a></h2> + <h2><a href="default/view/page/about/dir/docs|panels" class="lbhp">A propos</a></h2> + <h2><a href="default/view/page/history/dir/docs|panels" class="lbhp">Histoire</a></h2> + <h2><a href="default/view/page/explain/dir/docs|panels" class="lbhp"> FAQ </a></h2> + <h2><a href="default/view/page/5w/dir/docs|panels" class="lbhp"> W W W W W </a></h2> + </div> + <div class="col-xs-4"> + <h1><span class="text-red">CO</span>NSTRUIRE</h1> + <h2><a href="default/view/page/roadmap/dir/docs|panels" class="lbhp">ROADMAP</a></h2> + <h2><a href="default/view/page/openatlas/dir/docs|panels" class="lbhp ">Projets</a></h2> + <h2><a href="default/view/page/smarterre/dir/docs|comprendre" class="lbhp ">Smarterre</a></h2> + <h2><a href="#default.view.page.index.dir.docs" data-dismiss="modal" class="lbh">D<span class="text-red">OC</span>S</a></h2> + <h2><a href="default/view/page/contact/dir/docs|panels" class="lbhp "><span class="text-red">CO</span>NTACT</a></h2> + </div> + <div class="col-xs-4"> + <h1><span class="text-red">CO</span>LLABORER</h1> + <h2><a href="default/view/page/openatlas/dir/docs|panels" class="lbhp ">Asso Open Atlas</a></h2> + <h2><a href="default/view/page/mention/dir/docs|panels" class="lbhp ">mention</a></h2> + <h2><a href="default/view/page/peopleTalk/dir/docs|panels" class="lbhp ">people talk</a></h2> + <h2><a href="default/view/page/policies/dir/docs|panels" class="lbhp ">éthique</a></h2> + <h2><a href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blank">Charte | Open Système</a></h2> + <h2><a href="default/view/page/prices/dir/docs|panels" class="lbhp ">Prix</a></h2> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>DER</h1> + <h2><a href="api" target="_blank" >API</a></h2> + <h2><a href="default/view/page/openSourceWeUse/dir/docs|panels" class="lbhp ">Open Source We Use</a></h2> + <h2><a href="default/view/page/help/dir/docs|panels" class="lbhp">HELP Us Help YOU</a></h2> + <h2><a href="https://chat.lescommuns.org/channel/co_dev_open" target="_blank">Rejoindre la dev</a></h2> + <h2><a href="https://github.com/orgs/pixelhumain" target="_blank">GITHUB</a></h2> + <h2><a href="https://github.com/pixelhumain/communecter/wiki" target="_blank">WIKI DOCS</a></h2> + <h2><a href="https://github.com/pixelhumain/co2/issues" target="_blank">Déclarer des bugs</a></h2> + + </div> + + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>MMUNIQUER</h1> + <h2><a href="https://chat.lescommuns.org" target="_blank">Open CHAT</a></h2> + <h2><a href="https://twitter.com/communecter" target="_blank">Twitter</a></h2> + <h2><a href="https://mamot.fr" target="_blank">MASTODON</a></h2> + <h2><a href="https://www.facebook.com/communecter" target="_blank">FB</a></h2> + </div> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <h1><span class="text-red">CO</span>MMUNECTER</h1> + <h2><a href="javascript:;"" data-target="#modalMainMenu" data-toggle="modal">Chercher</a></h2> + <h2><a href="javascript:;"" data-target="#selectCreate" data-toggle="modal"><span class="text-red">CO</span>NTRibuer</a></h2> + <h2><a href="https://ello.co/wtf/policies/rules/" target="_blank">10 <span class="text-red">CO</span>MMANDEMENTS</a></h2> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>OPérer</h1> + <h2><a href="default/view/page/partners/dir/docs|panels?type=interoperate" class="lbhp ">Interoperation</a></h2> + </div> + + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>LLABORER</h1> + <h2><a href="default/view/page/partners/dir/docs|panels?type=partner" class="lbhp ">Partenaires</a></h2> + </div> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <div class="col-xs-4"> + <h1><span class="text-red">CO</span>MMUNS</h1> + <h2><a href="https://chat.lescommuns.org" target="_blank">Open CHAT</a></h2> + <h2><a href="https://http://wiki.lescommuns.org" target="_blank">Assemblées des communs</a></h2> + <h2><a href="www.les-communs-dabord.org" target="_blank">Actualités</a></h2> + </div> + + <div class="col-xs-4"> + <h1><span class="text-red">CO</span>MMUNAUTé</h1> + <h2><a href="default/view/page/partners/dir/docs|panels?type=dev" class="lbhp ">DEV</a></h2> + <h2><a href="default/view/page/partners/dir/docs|panels?type=builder" class="lbhp "><span class="text-red">CO</span>NTRibuteur</a></h2> + <h2><a href="default/view/page/partners/dir/docs|panels?type=crowdfunder" class="lbhp ">Crowdfunder</a></h2> + <h2><a href="default/view/page/partners/dir/docs|panels?type=thinker" class="lbhp ">Thinkers</a></h2> + <h2><a href="default/view/page/partners/dir/docs|panels?type=communector" class="lbhp "><span class="text-red">CO</span>mmunecteur Locale</a></h2> + <h2><a href="default/view/page/partners/dir/docs|panels?type=partner" class="lbhp ">E<span class="text-red">CO</span> System</a></h2> + </div> + + <div class="col-xs-4"> + <h1><span class="text-red">CO</span>MMUNES</h1> + <h2><a href="javascript:alert('link to city on CO')" class="lbhp ">Saint Louis</a></h2> + <h2><a href="javascript:alert('link to city on CO')" class="lbhp ">La Possession </a></h2> + </div> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>OL</h1> + <h2><a href="default/view/page/help" class="lbhp">Shortcuts</a></h2> + <h2><a href="https://vimeo.com/133636468" target="_blank">Video 2016</a></h2> + <h2><a href="https://vimeo.com/74212373" target="_blank">Video 2014</a></h2> + <h2><a href="default/view/page/slideshow/dir/docs|panels" class="lbhp ">SlideShow</a></h2> + <!--<h2><a href="javascript:alert('')">CO SHOP</a></h2>--> + </div> + + <div class="col-xs-6"> + <h1><span class="text-red">CO</span>NNECTé</h1> + </div> + </div> + + <div class="col-xs-12" style="margin-top:50px"> + <h1><span class="text-red">CO</span>NTRIBUER</h1> + <h2><a href="https://chat.lescommuns.org/channel/co_dev_open" target='_blanck'>Developper</a></h2> + <h2><a href="default/view/page/financement/dir/docs|comprendre" class="lbhp">CO FINANCER</a></h2> + <h2><a href="https://chat.lescommuns.org/channel/communecter_accueil" target='_blanck'>Organiser</a></h2> + </div> + + </div> \ No newline at end of file diff --git a/views/default/live.php b/views/default/live.php new file mode 100755 index 0000000000000000000000000000000000000000..894b707a38a393fd88e28d37190fc43248907812 --- /dev/null +++ b/views/default/live.php @@ -0,0 +1,357 @@ + +<?php + HtmlHelper::registerCssAndScriptsFiles(array('/assets/css/default/live.css'), Yii::app()->theme->baseUrl); + HtmlHelper::registerCssAndScriptsFiles(array('/js/default/live.js'), $this->module->assetsUrl); ?> + +<div class="row headerHome"> +<?php + $dontShowHeaderPages = array("city/detail"); + if(!@Yii::app()->session["userId"] && !in_array(Yii::app()->controller->id."/".Yii::app()->controller->action->id,$dontShowHeaderPages) ) + $this->renderPartial('../pod/headerHome'); +?> +</div> + +<div class="col-xs-12 col-md-9 col-feed" data-tpl="default.live"> + + <h3 class="text-dark homestead pull-left hidden"> + <i class="fa fa-angle-down"></i> <i class="fa fa-send"></i> Publier + </h3> + + <div class="col-xs-12 center "> + + <div id="list_filters"> + <!-- <div class="col-xs-12 margin-top-15 no-padding"> + <div id="list_tags_scopes" class="hidden-xs list_tags_scopes"></div> test test test + </div> --> + + <div class="btn-group inline-block hidden" id="menu-directory-type"> + <button class="btn btn-default btn-filter-type tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Messages" type="news"> + <i class="fa fa-check-circle-o search_news"></i> <i class="fa fa-rss"></i> <span class="hidden-xs hidden-sm">Messages</span> + </button> + <button class="btn btn-default btn-filter-type tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Organisations" type="organizations"> + <i class="fa fa-check-circle-o search_organizations"></i> <i class="fa fa-group"></i> <span class="hidden-xs hidden-sm">Organisations</span> + </button> + <button class="btn btn-default btn-filter-type tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Projets" type="projects"> + <i class="fa fa-check-circle-o search_projects"></i> <i class="fa fa-lightbulb-o"></i> <span class="hidden-xs hidden-sm">Projets</span> + </button> + <button class="btn btn-default btn-filter-type tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Évènements" type="events"> + <i class="fa fa-check-circle-o search_events"></i> <i class="fa fa-calendar"></i> <span class="hidden-xs hidden-sm">Évènements</span> + </button> + <button class="btn btn-default btn-filter-type tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Besoins" type="needs"> + <i class="fa fa-check-circle-o search_needs"></i> <i class="fa fa-cubes"></i> <span class="hidden-xs hidden-sm">Besoins</span> + </button> + </div> + + <div class="lbl-scope-list text-red hidden"></div> + + </div> + </div> + + <div class="col-xs-12 no-padding hidden"><hr></div> + + <?php //$this->renderPartial("first_step_news"); ?> + <?php //$this->renderPartial("news/index"); ?> + <div class="col-xs-12 no-padding" id="newsstream"></div> +</div> + + +<div class="col-xs-12 col-md-3 col-updated"> + + <h3 class="text-red homestead titleNowEvents"> + <div class="btn-group inline-block pull-right" id="menu-directory-type"> + <a href="javascript:toggle('.el-nowList','.el-nowList')" class="btnhidden btn btn-sm btn-default tooltips" data-toggle="tooltip" ><?php echo Yii::t("common","All") ; ?></a> + <a href="javascript:toggle('.event,.events','.el-nowList',1)" class="eventBtn el-nowListBtn btnhidden btn btn-sm btn-default tooltips" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Events") ; ?>"><i class="fa fa-calendar "></i></a> + <a href="javascript:toggle('.entry,.action,.discuss','.el-nowList',1)" class="entryBtn el-nowListBtn btnhidden btn btn-sm btn-default tooltips" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Cooperative space") ; ?>"><i class="fa fa-archive "></i></a> + <a href="javascript:toggle('.project,.projects','.el-nowList',1)" class="projectBtn el-nowListBtn btnhidden btn btn-sm btn-default tooltips" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Projects") ; ?>"><i class="fa fa-lightbulb-o "></i></a> + <a href="javascript:toggle('.organization,.organisations','.el-nowList',1)" class="organizationBtn el-nowListBtn btnhidden btn btn-sm btn-default tooltips" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Organisations") ; ?>"><i class="fa fa-users "></i></a> + <a href="javascript:enlargeNow();" class="btn btn-sm btn-default"><i class="fa fa-caret-left " id="enlargeNow"></i></a> + + </div> + <span class="pull-right"><i class="fa fa-clock-o"></i> En ce moment</span> + </h3> + + <div class="space20"></div> + <div class="col-xs-12 no-padding col-nowListC" id="nowList"></div> + +</div> + +<!-- end: PAGE CONTENT--> +<script type="text/javascript" > + +<?php $parent = Person::getById(@Yii::app()->session["userId"]); ?> + +var searchType = ["organizations", "projects", "events", "needs"]; +var allNewsType = ["news", "idea", "question", "announce", "information"]; + +var liveTypeName = { "news":"<i class='fa fa-rss'></i> Les messages", + "idea":"<i class='fa fa-info-circle'></i> Les idées", + "question":"<i class='fa fa-question-circle'></i> Les questions", + "announce":"<i class='fa fa-ticket'></i> Les annonces", + "information":"<i class='fa fa-newspaper-o'></i> Les informations" + }; + + +var liveScopeType = "global"; + +<?php if(@$type && !empty($type)){ ?> + searchType = ["<?php echo $type; ?>"]; +<?php }else{ ?> + searchType = $.merge(allNewsType, searchType); +<?php } ?> + +var loadContent = '<?php echo @$_GET["content"]; ?>'; +jQuery(document).ready(function() { + //$("#falseInput").on('load',function(){ + //}); + + var liveType = "<?php echo (@$type && !empty($type)) ? $type : ''; ?>"; + if(typeof liveTypeName[liveType] != "undefined") + liveType = " > "+liveTypeName[liveType]; + else liveType = ", la boite à outils citoyenne connectée " + liveType; + + setTitle("Communecter" + liveType, "<i class='fa fa-heartbeat '></i>"); + + //showTagsScopesMin("#list_tags_scopes"); + <?php if(@$lockCityKey){ ?> + lockScopeOnCityKey("<?php echo $lockCityKey; ?>"); + <?php }else{ ?> + rebuildSearchScopeInput(); + <?php } ?> + $("#btn-slidup-scopetags").click(function(){ + slidupScopetagsMin(); + }); + $('#btn-start-search').click(function(e){ //mylog.log("alo"); + startSearch(false); + }); + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + var index = searchType.indexOf(type); + + if(type == "all" && searchType.length > 1){ + $.each(allSearchType, function(index, value){ removeSearchType(value); }); return; + } + if(type == "all" && searchType.length == 1){ + $.each(allSearchType, function(index, value){ addSearchType(value); }); return; + } + + if (index > -1) removeSearchType(type); + else addSearchType(type); + }); + + //initSelectTypeNews(); + /*$(".searchIcon").removeClass("fa-search").addClass("fa-file-text-o"); + $(".searchIcon").attr("title","Mode Recherche ciblé (ne concerne que cette page)");*/ + $('.tooltips').tooltip(); + searchPage = true; + startNewsSearch(true); + $(".titleNowEvents .btnhidden").hide(); +}); + + +var timeout; +function startNewsSearch(isFirst){ + //Modif SBAR + //$(".my-main-container").off(); + if(liveScopeType == "global"){ + showNewsStream(isFirst); + }else{ + showNewsStream(isFirst);//loadStream(0,5); + } + loadLiveNow(); +} + + +function loadLiveNow () { + + var searchParams = { + "name":$('.input-global-search').val(), + "tpl":"/pod/nowList", + "latest" : true, + "searchType" : ["<?php echo Event::COLLECTION?>","<?php echo Project::COLLECTION?>", + "<?php echo Organization::COLLECTION?>","<?php echo ActionRoom::COLLECTION?>"], + "searchTag" : $('#searchTags').val().split(','), //is an array + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + "indexMin" : 0, + "indexMax" : 10 + }; + + + ajaxPost( "#nowList", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if($('.el-nowList').length==0) + $('.titleNowEvents').addClass("hidden"); + else + $('.titleNowEvents').removeClass("hidden"); + } , "html" ); + + /*searchParams.searchType = ["<?php echo Project::COLLECTION?>"]; + ajaxPost( "#nowListprojects", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if( !$(".titleNowDDA").length ){ + $("#nowListprojects").prepend('<h3 class="text-red homestead pull-left titleNowProject"><i class="fa fa-clock-o"></i> En ce moment : projets</h3>'); + $("#nowListprojects").append('<a href="#project.projectsv" class="lbh btn btn-sm btn-default">Vous créez localement ?</a>'); + } + } , "html" ); + + searchParams.searchType = ["<?php echo Organization::COLLECTION?>"]; + ajaxPost( "#nowListorga", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if( !$(".titleNowDDA").length ){ + $("#nowListorga").prepend('<h3 class="text-red homestead pull-left titleNowOrga"><i class="fa fa-clock-o"></i> En ce moment : organisations</h3>'); + $("#nowListorga").append('<a href="#organization.addorganizationform" class="lbh btn btn-sm btn-default">Vous agissez localement ?</a>'); + } + } , "html" ); + + searchParams.searchType = ["<?php echo ActionRoom::COLLECTION?>"]; + ajaxPost( "#nowListDDA", baseUrl+"/"+moduleId+'/search/globalautocomplete' , searchParams, function() { + bindLBHLinks(); + if( !$(".titleNowDDA").length ) + $("#nowListDDA").prepend('<h3 class="text-red homestead pull-left titleNowDDA"><i class="fa fa-clock-o"></i> En ce moment : D.D.A</h3>'); + } , "html" );*/ +} + + +function showNewsStream(isFirst){ mylog.log("showNewsStream"); + + scrollEnd = false; + + var isFirstParam = isFirst ? "?isFirst=1&tpl=co2" : "?tpl=co2"; + var tagSearch = $('#searchTags').val().split(',');; //$('#searchBarText').val(); + var levelCommunexionName = { 1 : "CITYKEY", + 2 : "CODE_POSTAL", + 3 : "DEPARTEMENT", + 4 : "REGION" + }; + + var thisType="ko"; + var urlCtrl = "" + if(liveScopeType == "global") { + thisType = "city"; + urlCtrl = "/news/index/type/city"; + } + <?php if(@Yii::app()->session["userId"]){ ?> + else if(liveScopeType == "community"){ + thisType = "citoyens"; + urlCtrl = "/news/index/type/citoyens/id/<?php echo @Yii::app()->session["userId"]; ?>/isLive/true"; + } + <?php } ?> + + var dataNewsSearch = {}; + if(liveScopeType == "global") + dataNewsSearch = { + "searchLocalityCITYKEY" : $('#searchLocalityCITYKEY').val().split(','), + "searchLocalityCODE_POSTAL" : $('#searchLocalityCODE_POSTAL').val().split(','), + "searchLocalityDEPARTEMENT" : $('#searchLocalityDEPARTEMENT').val().split(','), + "searchLocalityREGION" : $('#searchLocalityREGION').val().split(','), + + }; + + dataNewsSearch.tagSearch = tagSearch; + dataNewsSearch.searchType = searchType; + dataNewsSearch.textSearch = $('#searchBarText').val(); + + //dataNewsSearch.type = thisType; + //var myParent = <?php echo json_encode(@$parent)?>; + //dataNewsSearch.parent = { } + + var loading = "<div class='loader text-dark '>"+ + "<span style='font-size:25px;' class='homestead'>"+ + "<i class='fa fa-spin fa-circle-o-notch'></i> "+ + "<span class='text-dark'>"+trad.currentlyloading+" ...</span>" + + "</div>"; + + //loading = ""; + + if(isFirst){ //render HTML for 1st load + $("#newsstream").html(loading); + ajaxPost("#newsstream",baseUrl+"/"+moduleId+urlCtrl+"/date/0"+isFirstParam,dataNewsSearch, function(news){ + showTagsScopesMin(".list_tags_scopes"); + if(loadContent != ''){ + if(userId){ + showFormBlock(true); + if(loadContent.indexOf("%hash%")) + loadContent = loadContent.replace("%hash%", "#"); + $("#get_url").val(loadContent); + $("#get_url").trigger("input"); + } + else { + toastr.error('you must be loggued to post on communecter!'); + } + } + else + showFormBlock(false); + bindTags(); + //$("#newLiveFeedForm").hide(); + },"html"); + }else{ //data JSON for load next + dateLimit=0;currentMonth = null; + $(".newsTL").html(loading); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+urlCtrl+"/date/"+dateLimit, + dataType: "json", + data: dataNewsSearch, + success: function(data){ + //mylog.log("LOAD NEWS BY AJAX"); + //mylog.log(data.news); + $(".newsTL").html('<div class="spine"></div>'); + if(data){ + buildTimeLine (data.news, 0, 5); + bindTags(); + if(typeof(data.limitDate.created) == "object") + dateLimit=data.limitDate.created.sec; + else + dateLimit=data.limitDate.created; + } + loadingData = false; + $(".my-main-container").bind('scroll', function(){ mylog.log("in linve", loadingData, scrollEnd); + if(!loadingData && !scrollEnd){ + var heightContainer = $("#timeline").height(); mylog.log("heightContainer", heightContainer); + var heightWindow = $(window).height(); + if( ($(this).scrollTop() + heightWindow) >= heightContainer - 200){ + mylog.log("scroll in news/index MAX"); + loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + + } + } + }); + }, + error: function(){ + loadingData = false; + } + }); + } + $("#dropdown_search").hide(300); + +} + + +function addSearchType(type){ + var index = searchType.indexOf(type); + if (index == -1) { + searchType.push(type); + $(".search_"+type).removeClass("fa-circle-o"); + $(".search_"+type).addClass("fa-check-circle-o"); + } + mylog.log(searchType); +} +function removeSearchType(type){ + var index = searchType.indexOf(type); + if (index > -1) { + searchType.splice(index, 1); + $(".search_"+type).removeClass("fa-check-circle-o"); + $(".search_"+type).addClass("fa-circle-o"); + } + mylog.log(searchType); +} + + +function hideNewLiveFeedForm(){ + //$("#newLiveFeedForm").hide(200); + showFormBlock(false); +} + +</script> \ No newline at end of file diff --git a/views/default/panels/filterMenu.php b/views/default/panels/filterMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..1d7a8ddd11b975d4a6858bdc16ea4a862122680a --- /dev/null +++ b/views/default/panels/filterMenu.php @@ -0,0 +1,43 @@ +<?php if($typeSelected == "services" && Yii::app()->params["CO2DomainName"] == "terla"){ + $service = CO2::getContextList("service"); +?> + <div class="col-lg-2 col-md-3 col-sm-3 col-md-offset-1 col-sm-offset-1 col-xs-12 margin-top-25 text-left subsub no-padding shadow2" id="sub-menu-left"> + <h4 class="bg-orange text-white no-margin padding-10"><?php echo Yii::t("common", "Filters"); ?></h4> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10"><?php echo Yii::t("terla", "Any destination"); ?></h4> <span class="col-md-2 bg-orange"><i class="fa fa-angle-right"></i><span> + </div> + <hr> + <?php + foreach ($service["categories"] as $key => $cat) { + ?> + <div class="col-md-12 text-dark margin-bottom-5"> + <input type="checkbox" class="btn-select-category-services" data-keycat="<?php echo $key; ?>"> <?php echo Yii::t("category",$cat); ?> + </div><br> + <?php } ?> + <div class="col-md-12 no-padding padding-top-10 padding-bottom-10 label-category" id="title-sub-menu-category"> + <h4 class="col-md-10"><?php echo Yii::t("terla", "You travel"); ?></h4> <span class="col-md-2 bg-orange"><i class="fa fa-angle-right"></i><span> + </div> + <input type="text" id="filterNumber" value="" placeholder='<?php echo Yii::t("terla", "Number of travellers"); ?>'> + <label><?php echo Yii::t("terla", "Date of travel"); ?></label> + <span><?php echo Yii::t("common", "From"); ?></span> + <input type="date" name=""><br/> + <span><?php echo Yii::t("common", "To"); ?></span> + <input type="date" name=""> + <label>Price for search</label> + <input type="price" name=""> + + <label><?php echo Yii::t("terla", "Adapted time"); ?></label> + <div class="col-md-12 text-dark margin-bottom-5"> + <input type="checkbox" class="btn-select-category-services" data-keycat="senior"> <?php echo Yii::t("category","Senior"); ?> + </div> + <div class="col-md-12 text-dark margin-bottom-5"> + <input type="checkbox" class="btn-select-category-services" data-keycat="pmr"> <?php echo Yii::t("category","PMR"); ?> + </div> + <div class="col-md-12 text-dark margin-bottom-5"> + <input type="checkbox" class="btn-select-category-services" data-keycat="famillychild"> <?php echo Yii::t("category","Familly with children"); ?> + </div> + <div class="col-md-12 text-dark margin-bottom-5"> + <input type="checkbox" class="btn-select-category-services" data-keycat="healthfood"> <?php echo Yii::t("category","Food care"); ?> + </div> + </div> + <?php } ?> \ No newline at end of file diff --git a/views/default/panels/toolbar.php b/views/default/panels/toolbar.php new file mode 100755 index 0000000000000000000000000000000000000000..e3b9ecf543d222dfb7a6d82cca471d61ec3d4b5b --- /dev/null +++ b/views/default/panels/toolbar.php @@ -0,0 +1,65 @@ +<style type="text/css"> + .btnSpacer{ margin-right:40px; } + @media screen and (max-width: 768px) { + .btnSpacer{ margin-right:10px; } + } +</style> +<?php +if(!isset($toolbarStyle)) $toolbarStyle = "";//width:90%"; +if(!isset($toolbarFloat)) $toolbarFloat = "";//"pull-right"; + ?> +<div class="<?php echo $toolbarFloat ?> center box-ajaxTools" style="<?php echo $toolbarStyle ?>"> + <?php + + $colLeft = "<div class='col-md-7 col-sm-7 col-xs-7 text-left no-padding pull-left'>"; + $colRight = "<div class='col-md-5 col-sm-5 col-xs-5 text-right no-padding pull-right'>"; + + if(isset($this->toolbarMBZ)){ + foreach ($this->toolbarMBZ as $value) { + $position = ( isset( $value["position"] ) ) ? $value["position"] : "left"; + if($position == "left") { $colLeft .= buildToolBarEntry($value); } + else if($position == "right"){ $colRight .= buildToolBarEntry($value); } + } + } + + $colLeft .= "</div>"; + $colRight .= "</div>"; + + echo $colLeft . $colRight; + + function buildToolBarEntry($item) + { + $onclick = (isset($item["onclick"])) ? 'onclick="'.$item["onclick"].'"' : "" ; + + $href = ( isset( $item["href"] ) ) ? $item["href"] : "" ; + $iconSize = (isset($item["iconSize"])) ? 'class="'.$item["iconSize"].'"' : "";//"fa-2x"; + $icon = (isset($item["iconClass"]) && $item["iconClass"] != "fa fa-") ? '<i class="'.$item["iconClass"].' '.$iconSize.'"></i>' : ''; + $badge = ( isset( $item["badge"] ) ) ? $item["badge"] : ""; + $label = ( isset( $item["label"] ) ) ? $item["label"] : ""; + $tooltip = ( isset( $item["tooltip"] ) ) ? " data-placement='bottom' data-original-title='".$item["tooltip"]."'" : ""; + //par defaut, si un item n'a pas de position, on le met à gauche + $item["position"] = isset( $item["position"] ) ? $item["position"] : "left"; + $class = ($item["position"] == "left"|| $item["position"] == "right" || $item["label"] == "Album" || $item["label"] == "Vote") ? "hidden-sm hidden-md hidden-xs" : "hidden-xs"; + //$position = ( isset( $value["position"] ) ) ? $value["position"] : "left"; + $html = $href.$tooltip.">".$badge.$icon.' <span class="'.$class.'">'.$label.'</span></a>'; + + if( isset( $item["parent"] ) && isset( $item["parentId"] ) ) { + $html = '<'.$item["parent"].' id="'.$item["parentId"].'">'.$html.'</'.$item["parent"].'>'; + } + return $html."<span class='btnSpacer'></span>"; + } + + ?> + +</div> +<!-- <div class="space20"></div> --> +<script type="text/javascript"> +jQuery(document).ready(function() +{ + if($(".tooltips").length) { + $('.tooltips').tooltip(); + } +}); + + +</script> \ No newline at end of file diff --git a/views/default/searchTerla.php b/views/default/searchTerla.php new file mode 100644 index 0000000000000000000000000000000000000000..1dd276cb70503d56eb6ed017bcf7cbe15b21a643 --- /dev/null +++ b/views/default/searchTerla.php @@ -0,0 +1 @@ +hello search \ No newline at end of file diff --git a/views/default/version.php b/views/default/version.php new file mode 100755 index 0000000000000000000000000000000000000000..ea19cc9cfeb29cf9c1d3f9ca2ff0e66d7b3af540 --- /dev/null +++ b/views/default/version.php @@ -0,0 +1,22 @@ +<div class="infoVersion"> + <a href="javascript:urlCtrl.loadByHash('#default.view.page.index.dir.docs')" class="homestead text-red"><i class="fa fa-book fa-2x "></i> DOCUMENTATIONS</a> + + <br/> + update <?php echo $this->versionDate ?> + <br/> + <span class="homestead" style="font-size: 1.5em">version <a href="javascript:;" data-id="explainBeta" class="explainLink text-red">Béta</a></span> + <br/><span >Tests et améliorations continu</span> + <br/> + <?php + $lang = 'fr'; + $msglang = ''; + if( Yii::app()->language == 'fr' ){ + $lang = 'en'; + $msglang = '( 70% translated )'; + } + ?> + lang : <a class="homestead text-red" href="<?php echo Yii::app()->createUrl('/'.$this->module->id.'/default/switch/lang/'.$lang) ?>" title="switch to <?php echo strtoupper($lang) ?>"><?php echo strtoupper($lang) ?></a> <?php echo $msglang ?> + <?php if (isset(Yii::app() -> session["userId"])){ ?> + <br/><span class="removeExplanationCont"><input type="checkbox" class="removeExplanation" style="vertical-align: bottom" onclick="removeExplainations();"/> <?php echo Yii::t("common","Hide info panels") ?></span> + <?php } ?> +</div> \ No newline at end of file diff --git a/views/docs/affiches.php b/views/docs/affiches.php new file mode 100755 index 0000000000000000000000000000000000000000..a81ac876179520b8ab108d7db804adc5a67dea2b --- /dev/null +++ b/views/docs/affiches.php @@ -0,0 +1,34 @@ + + <div class="panel-heading center text-dark partition-white radius-10" > + <span class="tpl_shortDesc">Communecter est système d'information territorial, au double facette<br/> une interface web classique et un Système d'information géographique riche</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .tpl_content img{width:33%; border:2px solid #ccc;margin-bottom: 5px;} +</style> +<div class="col-sm-12 tpl_content"> + +<?php + if(file_exists ( "../../modules/communecter/assets/images/affiches" )) + { + $files = glob('../../modules/communecter/assets/images/affiches/*.{jpg,jpeg,png,gif}', GLOB_BRACE); + foreach ($files as $key => $value) + { + $img = str_replace("../../modules/communecter/assets", Yii::app()->controller->module->assetsUrl, $value); + echo '<a class="thumb-info" href="'.$img.'" data-lightbox="all">'; + echo "<img src='".$img."'/>"; + echo "</a>"; + } + } + ?> + +</div> + +<script type="text/javascript"> + jQuery(document).ready(function() { + setTitle("<span class='text-red'>MODULE</span> : Affiches</span>","cube","MODULE : Affiches"); + }); +</script> \ No newline at end of file diff --git a/views/docs/assets.php b/views/docs/assets.php new file mode 100755 index 0000000000000000000000000000000000000000..0b59d3168bc00dd9f5ba48dcea2bd60b73f1a346 --- /dev/null +++ b/views/docs/assets.php @@ -0,0 +1,6 @@ +<?php +$cssAnsScriptFilesModule = array('/assets/css/docs/docs.css'); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); +$cssAnsScriptFilesModule = array('/js/docs/docs.js'); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> \ No newline at end of file diff --git a/views/docs/communication.php b/views/docs/communication.php new file mode 100755 index 0000000000000000000000000000000000000000..dc6deef470822d1b080058ff6904cd1bcf7a3b53 --- /dev/null +++ b/views/docs/communication.php @@ -0,0 +1,59 @@ +<?php + $this->renderPartial("../docs/assets"); + $slide = isset($_GET["slide"]) ? $_GET["slide"] : ""; +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "bullhorn", + "title" => "Communication", + "stitle" => "un bien commun à partager sans modération", + "description" => "Merci de nous aider à faire connaître communecter au quotidien !". + "<br/> <span class='text-red text-bold'>* Pixel Humain</span> est le nom initial du projet avant de devenir Communecter ", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="<?php if($slide=='affiches' || $slide == '') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="1" class="<?php if($slide=='video') echo "active"; ?>"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item <?php if($slide=='affiches' || $slide == '') echo "active"; ?>"><?php $this->renderPartial("../docs/communication/affiches", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='video') echo "active"; ?>"><?php $this->renderPartial("../docs/communication/video", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> +<div class="space20"></div> +<!-- Left and right CHAPTER controls --> +<a href="#default.view.page.presentation.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Présentation +</a> +<!--<a href="#default.view.page.histoire.dir.docs')" class="homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + L'histoire <i class="fa fa-arrow-right"></i> +</a>--> + +<a href="#default.view.page.rd.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + R&D <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("bullhorn", "Communication"); +}); +</script> + + + diff --git a/views/docs/communication/affiches.php b/views/docs/communication/affiches.php new file mode 100755 index 0000000000000000000000000000000000000000..f4f90bc75e6ce2d2582adb30322ab4f8256f4890 --- /dev/null +++ b/views/docs/communication/affiches.php @@ -0,0 +1,34 @@ + + <div class="panel-heading center text-dark partition-white radius-10" > + <span class="tpl_shortDesc hidden">Communecter est système d'information territorial, au double facette<br/> une interface web classique et un Système d'information géographique riche</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .tpl_content img{width:33%; border:2px solid #ccc;margin-bottom: 5px;} +</style> +<div class="col-sm-12 tpl_content"> + +<?php + if(file_exists ( "../../modules/communecter/assets/images/affiches" )) + { + $files = glob('../../modules/communecter/assets/images/affiches/*.{jpg,jpeg,png,gif}', GLOB_BRACE); + foreach ($files as $key => $value) + { + $img = str_replace("../../modules/communecter/assets", Yii::app()->controller->module->assetsUrl, $value); + echo '<a class="thumb-info" href="'.$img.'" data-lightbox="all">'; + echo "<img src='".$img."'/>"; + echo "</a>"; + } + } + ?> + +</div> + +<script type="text/javascript"> + jQuery(document).ready(function() { + setTitle("<span class='text-red'>MODULE</span> : Affiches</span>","cube","MODULE : Affiches"); + }); +</script> \ No newline at end of file diff --git a/views/docs/communication/video.php b/views/docs/communication/video.php new file mode 100755 index 0000000000000000000000000000000000000000..57829bd128e12f9a81d517cf8b34e5ffc37be057 --- /dev/null +++ b/views/docs/communication/video.php @@ -0,0 +1,65 @@ + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .panel-body{border-top: 1px solid #ccc; font-weight: bolder; color:#000;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + + <div class="panel-body tpl_content"> + + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://player.vimeo.com/video/133636468?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Communecter - réseau sociétal libre + </div> + </div> + + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://player.vimeo.com/video/161594058?color=ff9933&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + et toi, t’es communecte ? + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://player.vimeo.com/video/74212373?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Le PixelHumain : réseau social citoyen libre + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://player.vimeo.com/video/147290335?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Loca’Terre - Communectez-vous ! + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://www.youtube.com/embed/f1vFrHklWso" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + Open source project and organization + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-6 center"> + <iframe src="https://www.youtube.com/embed/LVWwLZif_MY" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + Dans mon village, je suis communecté + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-6 center "> + <iframe src="https://www.youtube.com/embed/66m1hm3A2ic" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + (SAC) Service d'Aide Communecter - Fils d'actualités + </div> + </div> + + + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>DOC</span> : Vidéos</span>","video-camera","DOC : Vidéos"); +}); +</script> \ No newline at end of file diff --git a/views/docs/comprendre.php b/views/docs/comprendre.php new file mode 100755 index 0000000000000000000000000000000000000000..b36d8a30c55a3e04d07c216196d1d9a7c383e4c9 --- /dev/null +++ b/views/docs/comprendre.php @@ -0,0 +1,66 @@ +<?php + $this->renderPartial("../docs/assets"); +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "question-circle", + "title" => "Comprendre", + "stitle" => "OCDB, API, DDA, etc", + "description" => "Communecter c'est plein de concept un peu barbare qu'on va vous expliquer simplement ...", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <li data-target="#docCarousel" data-slide-to="1" class=""></li> + <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li> + <li data-target="#docCarousel" data-slide-to="5" class=""></li> + <li data-target="#docCarousel" data-slide-to="6" class=""></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/comprendre/index.png" class="img-schemas img-responsive "></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/ocdb", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/openSystem", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/import", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/dda", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/financement", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/comprendre/smarterre", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<div class="space20"></div> + +<!-- Left and right CHAPTER controls --> +<a href="#default.view.page.pourquoi.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Pour quoi faire ? +</a> +<a href="#default.view.page.modules.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Les modules <i class="fa fa-arrow-right"></i> +</a> +<div class="space20"></div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("question-circle", "comprendre"); +}); +</script> + + + diff --git a/views/docs/comprendre/dda.php b/views/docs/comprendre/dda.php new file mode 100755 index 0000000000000000000000000000000000000000..0e90e45024bc02626cc7b533564c82c0f9b442aa --- /dev/null +++ b/views/docs/comprendre/dda.php @@ -0,0 +1,178 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"> Espace coopératif</span><br> + <!-- <h3 class=" text-dark homestead">Discuter, Décider, Agir (DDA)</h3> --> + <br/> + <span class="tpl_shortDesc">Sur communecter, un espace coopératif permet d'utiliser 3 types d'espaces :<br/><br/> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces de discussions</strong><br/>pour débattre, comprendre les visions de chacuns. </span> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces de décisions</strong><br/>pour se mettre d'accord en votant des propositions. </span> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces d'actions</strong><br/>pour mettre en place les décisions prises collectivement.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/comprendre/dda.png" class="col-sm-12 img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> DISCUTER</h4> + </div> + <div class="panel-body"> + <b>Les Salles de Discussion</b> servent à construire et à partager autour d'une thématique + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Discutaire avec des commentaire </li> + <li><i class='fa fa-arrow-right'></i> surligner du texte et transformer en vote ou action</li> + <li><i class='fa fa-arrow-right'></i> Bientot : Discussion type Framapad</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> DECIDER</h4> + </div> + <div class="panel-body"> + <b>Les Salles de Décisions</b> ou Votes permettent de faire des propositions et de les partager avec une communauté pour prendre des décisions + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> C'est un votation à 5 choix : </li> + <li><i class='fa fa-arrow-right'></i> Voter "Pour" : Assez Explicite</li> + <li><i class='fa fa-arrow-right'></i> Voter "Amender" : La base est bonne mais il faut encore corriger, améliorer, la rendre meilleure.</li> + <li><i class='fa fa-arrow-right'></i> Voter "Blanc" : Je suis ni pour ni contre</li> + <li><i class='fa fa-arrow-right'></i> Voter "Incomplet" : il manque des elements pour prendre une réélle décision</li> + <li><i class='fa fa-arrow-right'></i> Voter "Contre" : Assez Explicite</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> AGIR</h4> + </div> + <div class="panel-body"> + <b>Les Salles d'Actions</b> permettent de faire des listes d'actino de choses concrète ç réaliser + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> une action peut avoir 5 états différents : </li> + <li><i class='fa fa-arrow-right'></i> "A Faire" : aucune date de début n'a été assigné</li> + <li><i class='fa fa-arrow-right'></i> "En cours" : une date de début, et une personne est assignée</li> + <li><i class='fa fa-arrow-right'></i> "En retard": la date de fin est assigné mais dépassé.</li> + <li><i class='fa fa-arrow-right'></i> "Terminer" : une tache qui a été cloturé</li> + <li><i class='fa fa-arrow-right'></i> "Non Assignée" : une tache qui n'a pas encore de responsable </li> + <li><i class='fa fa-arrow-right'></i> Plusieurs personne peuvent etre assignées à une action</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + </div> +</div> + + +<script type="text/javascript"> + +var contentData = { + classes : { + moduleLabel : "<i class='fa fa-question-circle'></i> INFORMATION", + rtpl_title : "DDA : Discuter, Décider, Agir", + tpl_shortDesc : "Les salles d'action permettent de créer 3 types d'espaces pour le moment <br/>Discuter pour orienté, comprendre les visions de chacuns puis, Décider pour se mettre d'accord, et enfin Agir pour que ca avance ", + img$src : "<?php echo $this->module->assetsUrl; ?>/images/docs/dda.png", + break : "", + html : { + type : "ul", + id : "points", + class : " col-sm-6", + icon : "<i class='fa fa-arrow-right'></i>", + list: [ + "liliililiil", + ], + }, + + html2 : { + type : "ul", + id : "points2", + class : " col-sm-6", + icon : "<i class='fa fa-arrow-right'></i>", + list: ["dododo", + + ], + }, + }, + btns: [ + { + href : "javascript:window.history.back();", + labrl : "<i class='fa fa-arrow-left'></i> Retour", + class : "bg-dark pull-left" + }, + { + href : "javascript:urlCtrl.loadByHash(\'#default.view.page.dda.dir.docs\');", + labrl : "Events <i class='fa fa-arrow-right'></i>", + class : "bg-red pull-right" + } + ] + +}; + +jQuery( document).ready(function() { + //buildTpl(); +}); + +function buildTpl () { + mylog.log("buildTpl"); + + $.each(contentData.classes,function(key,val) + { + //editing any attributes + if( key == "break" ) + $(".tpl_content").append("<div class='space20'></div>"); + if( key.indexOf("$") > 0 ){ + keyT = key.split("$"); + if( keyT[0] == "img" ){ + $(".tpl_content").append('<img class="col-sm-12 img-responsive " src="'+val+'"/>'); + } + } + else if( key.indexOf("html") >= 0 ){ + classes = (val.class) ? "class='"+val.class+"'" : "" ; + id = (val.id) ? "id='"+val.id+"'" : "" ; + if( val.type ){ + $(".tpl_content").append( "<"+val.type+" "+classes+" "+id+" ></"+val.type+">" ); + } + if(val.list){ + icon = (val.icon) ? val.icon : "" ; + $.each(val.list,function(i,li) + { + $("#"+val.id).append( "<li>"+icon+" "+li+"</li>" ); + }); + } + } + else + $("."+key).html(val); + }); + strHTML = '<br/><div class="col-sm-12 " >'; + $.each(contentData.btns,function(i,btn) + { + strHTML += '<a href="'+btn.href+'" class="text-extra-large '+btn.class+' tooltips radius-5 padding-10 homestead" style="display: block;" >'+btn.label+' </a>'; + r }); + strHTML += "</div>"; + $(".tpl_content").append(strHTML); +} + +</script> \ No newline at end of file diff --git a/views/docs/comprendre/dda2.php b/views/docs/comprendre/dda2.php new file mode 100755 index 0000000000000000000000000000000000000000..922a8dd7a5644b89041b264a8297ab0c3c4b9dcc --- /dev/null +++ b/views/docs/comprendre/dda2.php @@ -0,0 +1,185 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10 hidden"> + <span class=" text-red homestead tpl_title"> Espace coopératif</span><br><br> + <!-- <h3 class=" text-dark homestead">Discuter, Décider, Agir (DDA)</h3> --> + <br/> + <span class="tpl_shortDesc">Sur communecter, un espace coopératif permet d'utiliser 3 types d'espaces :<br/><br/> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces de discussions</strong><br/>pour débattre, comprendre les visions de chacuns. </span> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces de décisions</strong><br/>pour se mettre d'accord en votant des propositions. </span> + <span class="col-md-4"><strong><i class="fa fa-angle-down"></i> Espaces d'actions</strong><br/>pour mettre en place les décisions prises collectivement.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> + +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body tpl_content"> + + <h2 class="text-red homestead tpl_title"> Espace coopératif</h2><br> + <!-- <h3 class="center text-dark homestead no-margin">Discuter, Décider, Agir (DDA)</h3> --> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/comprendre/dda.png" class="col-sm-12 img-responsive "> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/comprendre/dda2.png" class="col-sm-12 img-responsive "> + + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> DISCUTER</h4> + </div> + <div class="panel-body"> + <b>Les Salles de Discussion</b> servent à construire et à partager autour d'une thématique + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Discuter avec des commentaire </li> + <li><i class='fa fa-arrow-right'></i> Surligner du texte et transformer en vote ou action</li> + <li><i class='fa fa-arrow-right'></i> Bientot : Discussion type Framapad</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> DECIDER</h4> + </div> + <div class="panel-body"> + <b>Les Salles de Décisions</b> ou Votes permettent de faire des propositions et de les partager avec une communauté pour prendre des décisions + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> C'est un votation à 5 choix : </li> + <li><i class='fa fa-arrow-right'></i> Voter "Pour" : Assez Explicite</li> + <li><i class='fa fa-arrow-right'></i> Voter "Amender" : La base est bonne mais il faut encore corriger, améliorer, la rendre meilleure.</li> + <li><i class='fa fa-arrow-right'></i> Voter "Blanc" : Je suis ni pour ni contre</li> + <li><i class='fa fa-arrow-right'></i> Voter "Incomplet" : il manque des elements pour prendre une réélle décision</li> + <li><i class='fa fa-arrow-right'></i> Voter "Contre" : Assez Explicite</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> AGIR</h4> + </div> + <div class="panel-body"> + <b>Les Salles d'Actions</b> permettent de faire des listes d'action de choses concrète à réaliser + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Une action peut avoir 5 états différents : </li> + <li><i class='fa fa-arrow-right'></i> "A Faire" : aucune date de début n'a été assigné</li> + <li><i class='fa fa-arrow-right'></i> "En cours" : une date de début, et une personne est assignée</li> + <li><i class='fa fa-arrow-right'></i> "En retard": la date de fin est assigné mais dépassé.</li> + <li><i class='fa fa-arrow-right'></i> "Terminer" : une tache qui a été cloturée</li> + <li><i class='fa fa-arrow-right'></i> "Non Assignée" : une tache qui n'a pas encore de responsable </li> + <li><i class='fa fa-arrow-right'></i> Plusieurs personne peuvent etre assignées à une action</li> + </ul> + </div> + </div> + </div> + + </div> + + </div> + </div> +</div> + + +<script type="text/javascript"> + +var contentData = { + classes : { + moduleLabel : "<i class='fa fa-question-circle'></i> INFORMATION", + rtpl_title : "DDA : Discuter, Décider, Agir", + tpl_shortDesc : "Les salles d'action permettent de créer 3 types d'espaces pour le moment <br/>Discuter pour orienter, comprendre les visions de chacuns puis, Décider pour se mettre d'accord, et enfin Agir pour que ca avance ", + img$src : "<?php echo $this->module->assetsUrl; ?>/images/docs/dda.png", + break : "", + html : { + type : "ul", + id : "points", + class : " col-sm-6", + icon : "<i class='fa fa-arrow-right'></i>", + list: [ + "liliililiil", + ], + }, + + html2 : { + type : "ul", + id : "points2", + class : " col-sm-6", + icon : "<i class='fa fa-arrow-right'></i>", + list: ["dododo", + + ], + }, + }, + btns: [ + { + href : "javascript:window.history.back();", + labrl : "<i class='fa fa-arrow-left'></i> Retour", + class : "bg-dark pull-left" + }, + { + href : "javascript:urlCtrl.loadByHash(\'#default.view.page.dda.dir.docs\');", + labrl : "Events <i class='fa fa-arrow-right'></i>", + class : "bg-red pull-right" + } + ] + +}; + +jQuery( document).ready(function() { + //buildTpl(); +}); + +function buildTpl () { + mylog.log("buildTpl"); + + $.each(contentData.classes,function(key,val) + { + //editing any attributes + if( key == "break" ) + $(".tpl_content").append("<div class='space20'></div>"); + if( key.indexOf("$") > 0 ){ + keyT = key.split("$"); + if( keyT[0] == "img" ){ + $(".tpl_content").append('<img class="col-sm-12 img-responsive " src="'+val+'"/>'); + } + } + else if( key.indexOf("html") >= 0 ){ + classes = (val.class) ? "class='"+val.class+"'" : "" ; + id = (val.id) ? "id='"+val.id+"'" : "" ; + if( val.type ){ + $(".tpl_content").append( "<"+val.type+" "+classes+" "+id+" ></"+val.type+">" ); + } + if(val.list){ + icon = (val.icon) ? val.icon : "" ; + $.each(val.list,function(i,li) + { + $("#"+val.id).append( "<li>"+icon+" "+li+"</li>" ); + }); + } + } + else + $("."+key).html(val); + }); + strHTML = '<br/><div class="col-sm-12 " >'; + $.each(contentData.btns,function(i,btn) + { + strHTML += '<a href="'+btn.href+'" class="text-extra-large '+btn.class+' tooltips radius-5 padding-10 homestead" style="display: block;" >'+btn.label+' </a>'; + r }); + strHTML += "</div>"; + $(".tpl_content").append(strHTML); +} + +</script> \ No newline at end of file diff --git a/views/docs/comprendre/financement.php b/views/docs/comprendre/financement.php new file mode 100755 index 0000000000000000000000000000000000000000..4e4208340d5a59f7b2f54c7c56a2009f1e4b6941 --- /dev/null +++ b/views/docs/comprendre/financement.php @@ -0,0 +1,248 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"> Financement</span> + <br/> + <span class="tpl_shortDesc">Un open système repose souvent sur divers types de contribution et créer souvent des modèles de financement hybride et alternatif.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/financement.png"" class="col-sm-12 img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-8 FinanceList"></div> + <div class="col-sm-4 Distrib" style="border-left:1px solid #ccc"> + + </div> + </div> + </div> + </div> +</div> +<script type="text/javascript"> +var financeData = { + +"2016" : { + "Janvier" : { + title : "solde du compte au 31/12/15 : 17643,94€", + lines : [ + ["19/01/16","frais bancaire","-3,90","frais","banque"], + ["19/01/16","virement : Goguet Tristan développement PH","-2000,00","développement communecter","Goguet Tristan"], + ["27/01/16","virement : jeremy Loreau développement nouvelle interface communecter","-1000,00","développement communecter","Jeremy Loreau"], + ["28/01/16","virement : Edith Pasquier graphisme nouvelle interface communecter","-217,00","graphisme communecter","Edith Pasquier"] + ] + }, + "Février" : { + title : "solde du compte au 31/01/16 : 14423,04€", + lines : [ + ["04/02/16","paiement de chéque : salaire sitti janvier","-520,80","salaire","Sitti"], + ["05/02/16","virement : Damiens Clement développement communecter","-1815,00","développement communecter","Damiens Clement"], + ["10/02/16","virement : Raphaël Riviére gratification stage","-1000,00","gratification de stage","Raphaël Riviére"], + ["19/02/16","frais bancaires","-3,90","frais","banque"] + ] + }, + "Mars" : { + title : "solde du compte au 29/03/16 : 11083,34€", + lines : [ + ["01/03/16","virement : Edith Pasquier graphisme","-217,00","graphisme communecter","Edith Pasquier"], + ["09/03/16","virement : sitti salaire février+6,10 euros = rattrappage salaire janvier","-1191,66","salaire","Sitti"], + ["17/03/16","virement : Goguet Tristan développement communecter","-2000,00","développement communecter","Goguet Tristan"], + ["21/03/16","frais bancaire","-3,90","frais","banque"], + ["23/03/16","virement : Damiens Clement développement communecter","-2000,00","développement communecter","Damiens Clement"], + ["24/03/16","remboursement ASP : emploi d'avenir","3299,90","remboursement emploi d'avenir","ASP"], + ["24/03/16","paiement de chéque","-217,00","",""], + ["30/03/16","paiement de chèque","-46,82","",""], + ] + }, + "Avril" : { + title : "solde du compte au 31/01/16 : 8706,86€", + lines : [ + ["01/04/16","paiement de chéque : cotisation médecine au travail INTERMETRA","-101,45","médcine au travail","INTERMETRA"], + ["06/04/16","virement : sitti salaire mars","-1141,61","salaire","Sitti"], + ["07/04/16","virement : cotisation retraire","-357,47","retraite complémentaire","CRC"], + ["08/04/16","virement academy des camélias","50950,00","","Academy des Camélias"], + ["11/04/16","paiment de chéque : cotisation OPCA","-67,00","formation professionnelle","Uniformation"], + ["14/04/16","virement CGSS Réunion : cotisations sociales","-1054,00","cotisations sociales","CGSS Réunion"], + ["18/04/16","paiement de chéque" ,"-50,00","adhésion association","MDA"], + ["19/04/16","cotisation : AGESSA","-417,00","cotisations sociales","AGESSA"], + ["19/04/16","frais bancaire","-3,90","frais","banque"], + ["25/04/16","virement : remboursement ASP","1319,96","remboursement emploi d'avenir","ASP"] + ] + }, + + "Mai" : { + title : "solde du compte au 30/04/16 : 57784,36€", + lines : [ + ["03/05/16","virement : Goguet Tristan développement communecter","-4000,00","développement communecter","Goguet Tristan"], + ["03/05/16","virement Raphaël Riviére gratification","-1000,00","gratification de stage","Raphaël Riviére"], + ["03/05/16","virement : Damiens Clement développement communecter","-2000,00","développement communecter","Damiens Clement"], + ["09/05/16","virement : Sitti salaire Avril","-1141,61","salaire","Sitti"], + ["09/05/16","prélévement MAIF","-115,27","assurance","MAIF"], + ["01/05/16","virement : Childéric Thoreau développement communecter","-895,00","développement communecter","Childéric Thoreau"], + ["10/05/16","virement : helloasso","680,00","dons","Helloasso"], + ["13/05/16","ingenico financial sa","20300,72","crowdfunding","Kiss Kiss Bank Bank"], + ["19/05/16","frais bancaire","-3,90","","ingenico financial sa"], + ["26/05/16","virement : remboursement ASP","1319,96","remboursement emploi d'avenir","ASP"], + ] + }, + + "Juin" : { + title : "solde du compte au 30/05/16 : 70929,26€", + lines : [ + ["02/06/16","virement OVH sas","-39,03","hébergement","OVH sas"], + ["02/06/16","virement : Sitti salaire mai","-1141,64","salaire","Sitti"], + ["20/06/16","frais bancaire","-3,90","frais","banque"], + ["22/06/16","virement Sylvain Barbot : développement communecter","-4265,00","développemnt communecter","Sylvain Barbot"], + ["22/06/16","virement :Tibor Katelbach développement communecter","-4294,00","développement communecter","Tibor Katelbach"], + ["22/06/16","remboursement ASP","1319,96","remboursement emploi d'avenir","ASP"], + ["28/06/16","Raphaël Riviére gratification","-1524,00","gratification","Raphaël Riviére"], + ] + }, + + + + "Juillet" : { + title : "solde du compte au 31/06/16 : 60981,65€", + lines : [ + ["01/07/16","Damiens Clement développement communecter","-2000,00","développement communecter","Damiens Clement "], + ["04/07/16","CGSS Réunion : cotisations sociales","-821,50","cotisations sociales","CGSS Réunion"], + ["11/07/16","virement helloasso","-22,00","don","Helloasso"], + ["13/07/16","cotisation retraite CRC","-429,00","retraite complémentaire","CRC"], + ["13/07/16","salaire juin : Sitti","-1141,64","salaire Sitti"], + ["19/07/16","frais bancaire","-3,90","frais","banque"], + ["19/07/16","cotisation AGESSA","-197,00","cotisations sociales","AGESSA"], + ["20/07/16","virement : Thomas Craipeau ","-1679,20","développement communecter","Thomas Craipeau"], + ["21/07/16","virement trésorerie de Saint-Louis","15400,00","subvention ","Mairie de Saint-Louis"], + ["22/07/16","virement : Tibor Katelbach","-2000,00","développement communecter","Tibor Katelbach"], + ["26/07/16","remboursement ASP","1319,96","remboursement emploi d'avenir","ASP"], + ] + }, + + "Août" : { + title : "solde du compte au 31/07/16 : 69452,37€", + lines : [ + ["03/08/16","virement : Goguet Tristant","-4000,00","développement communecter","Goguet Tristan"], + ["03/08/16","virement Tibor Katelbach","-4000,00","développent communecter","Tibor Katelbach"], + ["03/08/16","virement : Damien Clement","-906,00","développemnt communecter","Damiens Clement"], + ["03/08/16","virement : Raphaël Riviére","-895,90","développement communecter","Raphaël Riviére"], + ["04/08/16","salaire juillet : Sitti","-1087,28","salaire","Sitti"], + ["08/08/16","virement : Fablab Barcelona","-3832,50","","Fablab Barcelona"], + ["12/08/16","virement DRFIP Paris","2000,00","Subvention","DRFIP Paris"], + ["19/08/16","frais bancaire","-3,90","frais","banque"], + ["23/08/16","remboursement ASP","-1319,96","remboursement emploi d'avenir","ASP"], + ["24/08/16","paiement de chéque","-65,15","",""], + ["26/08/16","remise de chéque","2025,00","dons","SIDR+autre"], + ["02/09/16","virement : Raphaël Riviére ","-895,90","développement communecter","Raphaël Riviére"], + ["02/09/16","salaire août Sitti","-1141,64","salaire","Sitti"], + ["19/09/16","frais bancaire","-3,90","frais","banque"], + ["23/09/26","remboursement ASP","1319,96","remboursement emploi d'avenir","ASP"], + ] + }, + + "Octobre" : { + title : "solde du copte au 30/09/16 : 59284,12€", + lines : [ + ["04/10/16","virement : Raphaël riviére","-895,90","développement communecter","Raphaël Riviére"], + ["04/10/16","virement : Goguet Tristan","-4000,00","développemnt communecter","Goguet Tristan"], + ["04/10/16","salaire septembre : Sitti","-1141,64","salaire","Sitti"], + ["04/10/16","paiement E-dkado sarl","-737,94","acahat","E-dkado"], + ["07/10/16","remboursement : Damiens Clement","-237,90","remboursement de frais","Damiens Clement"], + ["07/10/16","virement : Damiens Clement","-895,90","développement communecter","Damiens Clement"], + ["07/10/16","virement : Tibor Katelbach","-2804,00","développement communecter+ remboursement de frais","Tibor Katelbach"], + ["13/10/16","remise de chéque","1592,83","financement formation+remboursement de frais annexes","Uniformation"], + ["13/10/16","remboursement : Stéphanie Lorente","-93,23","remboursement de frais","McLen"], + ["13/10/16","virement : Semeoz","-300,00","community management","Semeoz"], + ["13/10/16","CGSS Réunion","-1138,00","cotisations sociales","CGSS Réunion"], + ["13/10/16","cotisation retraite : CRC","-422,00","cotisation retraite","CRC"], + ["19/10/16","frais bancaire","-3,90","frais","banque"], + ["25/10/16","prélévement AGESSA","-524,00","réglement 3éme trimestre AGESSA","AGESSA"], + ["26/10/16","virementt ASP","1275,96","remboursement emploi d'avenir","ASP"], + ["27/10/16","remise de chéque","25,00","chéque adhésion "], + ] + }, + "Novembre" : { + title : "solde du compte au 30/09/16", + lines : [ + ["03/11/16","salaire octobre : Sitti","-1141,64","Salaire","Sitti"], + ["03/11/16","virement : Raphaël riviére","-895,90","développement communecter","Raphaël Riviére"], + ["04/11/16","virement : Sitti","-92,83","Remboursement de frais de transport durant formation","Sitti"], + ["07/11/16","paiement de chéque : Pixel formations","-1500,00","formation Sitti","Pixel formations"], + ["08/11/16","virement : Jerome Gontier","-500,00","Remboursement de frais de transport ","Jerome Gontier"], + ["10/11/16","virement AGESSA","-1218,00","régularisation paiement 2éme trimestre","AGESSA"], + ["10/11/16","prestation de la MEL","-3583,60","","Damiens Clement"], + ["17/11/16","virement : pairie régionale","6500,00","subvention région","La Région Réunion"], + ["19/11/16","frais bancaire","-3,90","frais","banque"], + ["23/11/16","remboursement de frais+facture","-3608,49",""], + ] + } +} +} + +jQuery(document).ready(function() { + buildFinance() + +}); +function buildFinance () { + var inCompta = {}; + var outCompta = {}; + $.each(financeData,function(y,yearObj) { + $.each(yearObj,function(k,fiObj) { + strHTML = + '<div class="panel-body">'+ + '<h2 class="homestead text-red" >'+k+' : '+fiObj.title+'</h2>'+ + '<table class="table table-hover" >'+ + '<thead>'+ + '<tr>'+ + '<th class="center">#</th>'+ + '<th class="center">Date</th>'+ + '<th>Objet</th>'+ + '<th class="hidden-xs">Montant</th>'+ + '<th>type</th>'+ + '<th class="hidden-xs">personne</th>'+ + '</tr></thead><tbody>'; + $.each(fiObj.lines,function(lini,line) { + strHTML += '<tr><td>'+(lini+1)+'</td><td>'+line[0]+'</td><td>'+line[1]+'</td><td>'+line[2]+'€</td><td>'+line[3]+'</td><td>'+line[4]+'</td></tr>'; + if( !inCompta[ line[4] ] ) + inCompta[ line[4] ] = 0; + + inCompta[ line[4] ] += parseInt(line[2]) + }); + strHTML += '</tbody>'+ + '</table></div>'; + $(".FinanceList").prepend(strHTML); + }); + }); + + + strHTML = + '<div class="panel-body">'+ + '<table class="table table-hover" >'+ + '<thead>'+ + '<tr>'+ + '<th class="center">Qui</th>'+ + '<th class="center">Combien</th>'+ + '</tr></thead><tbody>'; + var inHTML = ""; + var outHTML = ""; + $.each(inCompta,function(who,count) { + if(count > 0) + inHTML += '<tr><td>'+who+'</td><td>'+count+'€</td></tr>'; + else + outHTML += '<tr><td>'+who+'</td><td>'+count+'€</td></tr>'; + }); + $(".Distrib").append("<h2 class='homestead text-red'>Contributions</h2><br/>"+strHTML+inHTML+'</tbody></table></div>'); + $(".Distrib").append("<h2 class='homestead text-red'>Dépenses</h2><br/>"+strHTML+outHTML+'</tbody></table></div>'); +} +</script> + + + \ No newline at end of file diff --git a/views/docs/comprendre/import.php b/views/docs/comprendre/import.php new file mode 100755 index 0000000000000000000000000000000000000000..324ed7e0aee11eacce57ab1e9c1bb6ea61dfa303 --- /dev/null +++ b/views/docs/comprendre/import.php @@ -0,0 +1,74 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"> Import Export API</span> + <br/> + <span class="tpl_shortDesc">Les organisations sont un des pilliers de la société<br/>, leurs activités est aussi productif que créateur de liens et de services. C'est en voyant tout les acteurs locaux , qu'on aura un vrai territoire connecté et que la valeur </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/import.png"" class="col-sm-12 img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos organisations </li> + <li><i class='fa fa-arrow-right'></i> Celles que vous gérez ou utilisez</li> + <li><i class='fa fa-arrow-right'></i> Publiez l'activité de l'organisation</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Profitez de l'espace Coopératif </li> + <li><i class='fa fa-arrow-right'></i> Faites des propositions</li> + <li><i class='fa fa-arrow-right'></i> Partager vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos projet</li> + <li><i class='fa fa-arrow-right'></i> on peut s'incrire pour suivre</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-eye"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographies des membres </li> + <li><i class='fa fa-arrow-right'></i> Voir les acteurs d'un territoire</li> + <li><i class='fa fa-arrow-right'></i> Créer des réseau thématique (ex:#commun)</li> + </ul> + </div> + </div> + </div> + + </div> + <br> + </div> + </div> +</div> diff --git a/views/docs/comprendre/ocdb.php b/views/docs/comprendre/ocdb.php new file mode 100755 index 0000000000000000000000000000000000000000..18f0e47b3beb2eda402d23f10f78894c33782ac5 --- /dev/null +++ b/views/docs/comprendre/ocdb.php @@ -0,0 +1,72 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"> Open Common DataBase</span> + <br/> + <span class="tpl_shortDesc">Un système d'information fait pour le partage, l'opendata, contributif et représentatif des actions et des activités de la société.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/ocdb.png"" class="col-sm-12 img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-share-alt"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Un cluster d'instances libres </li> + <li><i class='fa fa-arrow-right'></i> Un système d'interopérabilité ouvert</li> + <li><i class='fa fa-arrow-right'></i> Des aggrégateurs pour réunir les sources</li> + <li><i class='fa fa-arrow-right'></i> Produire de l'opendata, c'est pouvoir l'utiliser</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-book"></i> Des standards</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Restfull Api standard pour utiliser le contenu </li> + <li><i class='fa fa-arrow-right'></i> Un moteur de traduction multi ontologies</li> + <li><i class='fa fa-arrow-right'></i> Des ontologies standards</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> Outils </h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Recherche une ou toutes les instances OCDB</li> + <li><i class='fa fa-arrow-right'></i> Couplage OCDB, Wikipedia, OSM</li> + <li><i class='fa fa-arrow-right'></i> Paysan Numérique : Curation, Récolte, Croisement</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + </div> +</div> diff --git a/views/docs/comprendre/openSystem.php b/views/docs/comprendre/openSystem.php new file mode 100755 index 0000000000000000000000000000000000000000..c9e7c57b4457de1c81bfcfff08cf6ef2dca51061 --- /dev/null +++ b/views/docs/comprendre/openSystem.php @@ -0,0 +1,212 @@ + + <div class="panel-heading center text-dark partition-white radius-10" > + <span class="tpl_shortDesc">Les organisations sont un des pilliers de la société<br/>, leurs activités est aussi productif que créateur de liens et de services. C'est en voyant tout les acteurs locaux , qu'on aura un vrai territoire connecté et que la valeur </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .codeSocial{color:black;} + .codeSocial h3, .codeSocial h2 {text-decoration: underline;font-weight: bold} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <div class="col-xs-12"> + <div class=" col-xs-12 col-md-6 center bg-red"> + <div class="text-bold text-extra-large" style="padding: 50px;"> + Revenez bientot pour la vidéo + </div> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/openSystem.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/openSystem.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos organisations </li> + <li><i class='fa fa-arrow-right'></i> Celles que vous gérez ou utilisez</li> + <li><i class='fa fa-arrow-right'></i> Publiez l'activité de l'organisation</li> + <li><i class='fa fa-arrow-right'></i> <a href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blank">Sur Github</a></li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Profitez de l'espace Coopératif </li> + <li><i class='fa fa-arrow-right'></i> Faites des propositions</li> + <li><i class='fa fa-arrow-right'></i> Partager vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos projet</li> + <li><i class='fa fa-arrow-right'></i> on peut s'incrire pour suivre</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-eye"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographies des membres </li> + <li><i class='fa fa-arrow-right'></i> Voir les acteurs d'un territoire</li> + <li><i class='fa fa-arrow-right'></i> Créer des réseau thématique (ex:#commun)</li> + </ul> + </div> + </div> + </div> + + </div> + <div class="col-md-10 col-sm-offset-1 codeSocial" > + + <h1 class="center text-red homestead">Code social d’un "OpenSystem"</h1> + <h2>“Écosystème ouvertâ€</h2> + + <h2>Contexte général</h2> + + Le monde connaît des bouleversements majeurs qui se traduisent sur les plans écologique, économique, énergétique, numérique, social,… et dont l'issue est, par essence, incertaine. Dans ce contexte, de nouvelles structures sociales émergent, basées sur une réorganisation complète des rapports sociaux et des fonctionnements structurels. A l'image d'un phénomène plus vaste que lui, l'écosystème s'inscrit dans ce mouvement, et chacun de ses membres est particulièrement lucide sur le rôle actif que nous pouvons et souhaitons jouer dans la transformation de la société. Notre réseau se veut être un des acteurs qui transforment la société en l'impactant pour qu'elle s’oriente naturellement vers un fonctionnement plus collaboratif et participatif par la mise en pratique concrète de notre intelligence collective. L'écosystème incarne ainsi un élan collectif de mise en commun et de création de communs comme nouveau modèle sociétal. + + Pour la plupart des acteurs impliqués, l’idée d’écosystème s’inscrit dans une longue histoire aux racines profondes dont on peut trouver des traces sur le net (comme dans cette vidéo ou dans ce Github). Des affinités intellectuelles et amicales de longue date, des partages joyeux et complices, et des chemins parallèles sont venus nourrir un processus de gestation d’environ deux ans, au cours duquel une convergence a été tissée et a fait émerger la volonté de mettre en synergie les aventures individuelles. + + La plupart des membres de l’écosystème se sont retrouvés en ligne échangeant sur des thématiques qu’ils avaient en commun, il en a émergé un espace de rencontre, de reliance et de co-création autour de thématiques et de projets liés à la transition. + + Le présent code social entend donc initialement brosser les grandes lignes d’un projet destiné à grandir dans le temps et à s’opérationnaliser sous diverses formes correspondant à la créativité des individus qui composent l’écosystème. Aussi, nous considérons que les règles ne sont pas inscrites au coeur du commun, mais dans le coeur de chacun, pas à pas, au contact des autres et de l'action contributive, de manière à ce qu'elles soient édictées, intériorisées, adoptées, appropriées par chacun au fur et à mesure. + + <h2>Faisceau de qualités</h2> + + <h3>Les objectifs</h3> + + L'écosystème est un laboratoire d'expérimentation de nouvelles relations sociales et entrepreneuriales fondées sur la réciprocité et la bienveillance comme fondements d'une autonomie distribuée et organisée. Il vise à (dé)montrer qu'un autre monde est possible non pas au nom d'une utopie dogmatique mais par une mise en actes permettant un constat pragmatique direct d'efficience, de robustesse et de pérennité emprunté notamment au biomimétisme. + + Pour cela, les membres de l'écosystème se proposent de relever ensemble les défis suivants : augmenter notre efficience et avoir de l'impact grâce à la mutualisation proposer une vision incarnée des possibilités émancipatrices du numérique démontrer la pertinence sociale et économique d'une forme d'entreprenariat construit autour des communs créer les conditions d’un agir ensemble, sur les projets de chacun, répondre à des appels d'offres en commun, créer de nouveaux projets ensemble. proposer des prestations autour des communs, soutenir des communs, produire des communs essentiels au développement des communs en général mettre en oeuvre concrètement une interopérabilité sociale réelle, agile par les acteurs eux-mêmes et illustrée par le présent code social. oeuvrer à l’émergence d’un monde plus juste, plus soutenable, plus durable tout en utilisant la productivité du numérique. + + L’un des objectifs de l’écosystème est de permettre une coopération forte entre les différents membres de l’écosystème. Nous concevons cet écosystème comme un espace de pleine confiance permettant à ses membres de s’ouvrir pleinement à la coopération. + + A cette fin, nous expérimentons un certain nombre d’outils dont l’objectif est de permettre à cet écosystème : + <ul> + <li>De travailler ensemble efficacement</li> + <li>D’interagir de manière fluide (Système d’information ouvert)</li> + <li>De collaborer de manière agile et décentralisée (stigmergie, LEAN, AGILE)</li> + <li>De partager nos offres et opportunités (Catalogue contributif)</li> + <li>De répartir équitablement la valeur collectivement générée (Matrices de richesses, Revenu de base)</li> + <li>De mélanger nos offres pour innover en continu</li> + <li>De dépasser la rentabilité pour aller vers le plaisir, le partage et la créativité</li> + <li>De créer un système autonome et résilient à la crise économique (de la ZAD à la ZAN : Zone Autonome Numérique)</li> + <li>De développer l’intelligence collective au service de l’innovation et des bien communs</li> + <li>De ne jamais oublier les contextes déconnectés (solutions déconnectées)</li> + <li>De garder une place importante à la chance, par tirage au sort</li> + <li>Que toutes activités et l’innovation de l’écosystème passent par le partage et des décisions démocratique (par exemple sur Loomio)</li> + <li>D’innover par notre capacité d’ouverture et de partage</li> + <li>Rejoindre l’écosystème, c’est souscrire à l’idée qu’on peut créer ensemble un système libre, infiniment duplicable, plus intelligent et efficient, valorisant diverses techniques et technologies du moment pour éliminer les contraintes, réduire l'impact, remplacer les système pyramidaux et descendants par des organismes aux fonctionnements équilibrés, fluides, inversés et libres.</li> + </ul> + L’ecosystème souhaite être une expérimentation à lui tout seul de ce que pourrait être une société 2.2.main. Les outils produits doivent l’être pour le plus grand nombre. Les règles et méthodologies doivent rester simples, intuitives, fortement éthiques et abordables à tous. On veillera donc à ce qu’elles soient souples, créatives, adaptées au contexte et établies collectivement pour faire en sorte qu’elles soient appliquées volontairement par les membres de l’écosystème, ainsi que le préconise Elinor Ostrom. + + Dans le même esprit, les membres de l’écosystème s’engagent à veiller à une interopérabilité technique et sémantique, notamment en utilisant autant que possible du vocabulaire et un langage compréhensible par tous, tant au niveau des développements informatiques que des échanges humains. Les missions + + <h3>Missions internes</h3> + + Produire un cadre, notamment à travers un code social, et créer les conditions de la collaboration entre les membres sur des logiques de mutualisation et de complémentarité ; + + Mettre en Å“uvre un fonctionnement interne bienveillant et "permaculturel" : on s’adapte constamment aux particularités locales, aux contextes, aux collaborateurs... + Créer concrètement les conditions d'une interopérabilité humaine et technologique ; + Å’uvrer à la mise en place d'un langage commun ; + Se former en pair à pair sur ce que nous faisons les uns les autres et permettre le développement de fertilisations croisées entre les acteurs et projets de l’écosystème ; + Proposer un catalogue d’offres en liens direct avec les valeurs de l’écosystème ; + Développer massivement des instances de l’ODB (Open Data Base), une base de données partagée et ouverte à la contribution. A l’image de Wikipedia, cette base de données est ouverte à la contribution et sécurisée, chacun choisit les limites d’ouverture de la donnée qu’il apporte ; + Modéliser le fonctionnement d’écosystèmes et d’organisations ouvertes ; + Créer un réseau de tiers lieux camps TIC, où n’importe qui peut découvrir un membre de l’écosystème, où l’écosystème peut * se réunir, où on peut rediffuser et partager une activité d’un autre tiers lieux. + En créant ces conditions en interne, nous posons une base éthique et efficiente pour impulser un changement de société. Nous donnerons ainsi une assise aux missions externes par auto-légitimation ("c'est parce que ça a marché pour nous que nous transmettons cette expérience"). + + <h3>Missions externes</h3> + + La mission générique de l’écosystème est de mettre en oeuvre la recherche, le développement, l’expérimentation, la documentation, et la diffusion autour de l'ingénierie des écosystèmes trans-organisationnels. Cette mission peut se décliner comme suit : + + Accompagner les acteurs publics, privés et les citoyens dans leurs transitions (énergétique, écologique, démocratique, etc...) vers les communs ; + + Offrir des opportunités aux entreprises, associations, collectivités, élus, citoyens, de s'impliquer en faveur des communs (outils, dynamique,...) et leur proposer des dispositifs de capacitation ; + Développer, distribuer, former sur les communs et les solutions libre et opensources + Partager les éléments de réussite et d'échec de l'expérience. + Faisceau de valeurs + + <h3>Imaginaire, sources d'inspiration</h3> + + Parce qu’il fait interagir une pluralité d’acteurs ayant chacun une histoire propre, l’écosystème se nourrit d’une diversité d’imaginaires, de sources d’inspiration, ce qui en fait sa richesse, sa spécificité. Parmi ses sources d’inspiration, nous pouvons notamment citer : + + les notions d’autonomie, de liberté, de fraternité et de solidarité. Les pensées et dynamiques qui se sont développées autour de la démocratie directe, de la démocratie liquide, de la souveraineté ‒ qu’elle soit individuelle ou collective ‒ de la citoyenneté, de l’opengov. + Le monde de l’open-source ainsi que celui des communs dont on peut considérer qu’ils ont et sont en train de très concrètement changer le monde en permettant le développement de projets aussi beaux et fous que le web ou wikipedia. + Le peer to peer tel que défini par Michel Bauwens, la théorie des systèmes ‒ complexes ‒ qui ont permis un nouveau regard sur le monde, à travers les notions de combinatoire, d’auto-organisation, d’émergence,.... + Le web sémantique, le W3C, le web qui ont consacré les notions de standards, d’interopérabilité, de neutralité. + Les nouvelles formes d’économie, collaboratives, circulaires, numériques, agiles, fablabs, DIY, DIWO, Hackerspaces, et celles émergentes qui, comme les DAO (Distributed Autonomous Organisations), permettent d’entrevoir des changements profonds à grande échelle quand à l’architecture du monde social. + Le vivant, qui pour beaucoup d’entre nous, constitue un objet d’intérêt, tant il est complexe, tant les milliards d’années qui ont conduit à sa physionomie et à sa dynamique actuelles sont riches d’enseignement dans tous les domaines (économie, politique, technique notamment - #biomimétisme) ; les penseurs de la complexité et des systèmes émergents, et notamment le romancier Arthur Koestler qui a proposé le concept de holon. + L’écologie et la permaculture qui à travers la profondeur de leurs questions et la pertinence de leurs réponses, nous donnent une raison de plus d’agir et d’espérer changer le monde. + Le jeu, l’élan vital, l’hédonisme, l’épicurisme, la joie, et toutes les choses de la vie qui procurent aux êtres sensibles que nous sommes, la sensation d’être vivant, heureux, insouciants, en forme, en harmonie avec soi, les autres et le monde. + La communication bienveillante, et de manière générale les bienfaits d’une meilleure connaissance de soi pour se donner la capacité de développer des relations sociales harmonieuses. + Vivre ensemble c’est faire ensemble + + Les relations humaines, que ce soit dans le cadre de l’écosystème ou vis-à -vis de l’extérieur, s’inscrivent dans une perspective de bienveillance, d’autonomie, de transparence, de réciprocité et d’ouverture à la reliance. L’écosystème souhaite offrir l’expérience d’un réel inter-être, où l’individualité de chacun est pleinement respectée. + + Un écosystème commence par travailler ensemble pour créer des alternatives, des hackathons, des visions en communs. Le produits de ces créations seront la base commune de l’écosysteme. Sans co-construction il n’y a pas d’écosystème, juste de la consommation de l’écosysteme. Ces actions communes donneront encore plus de richesse au collectif que celles déjà apportée indépendemment par chacun des acteurs. + + <h2>Faisceau de droits</h2> + + <h3>Type de structure</h3> + + Non Lucratif, associatif et coopératif. Dès que deux acteurs de l’écosystème coopèrent, l’ensemble des pairs de l’écosystème doivent avoir connaissance de l’existence de ce projet pour nourrir l’envie, la motivation et l’engagement des autres membres. Une coopération est un exemple à suivre pour motiver d’autres coopérations. + + <h3>Modalités d’entrée</h3> + + L’écosystème est une structure ouverte dans laquelle entre toute personne ou projet qui se reconnaît dans le présent code social. On entre dans un écosystème par un de ses noeud existants, c’est à dire que le résultat de l’interaction avec ce ou ces premiers noeuds permet d’interagir avec un ou plusieurs acteurs du système. Cet acte d’échange validé par un élément du système donne accés directement à la totalité de l’écosystème. + + <h3>Mode de gouvernance</h3> + + Toutes idées, propositions, doivent se faire sur un systeme de décision collaboratif et communautaire ouvert tel que Loomio, avec pour objectif l’amélioration continue. Chaque acteur peut contribuer avec des idées et challenger l’écosysteme. Il faut nourrir l’esprit créatif et concurrentiel à l’interieur de l’écosysteme pour sortir des sentiers battus et pour trouver un chemin ensemble. Les bons chemins d’hier ne le sont plus aujourd’hui et ceux d’aujourd’hui ne le seront plus pour longtemps. L’écosystème est mutant en fonction de son contexte, du temps et des pays. + + <h2>Faisceau de richesses</h2> + + <h3>Matrices de richesse</h3> + + Les membres de l’écosystème ont conscience que les richesses échangées ne se limitent pas à l’argent. Les autres formes de richesses en circulation (temps, travail, gratitude, échanges humains,...) sont reconnues et valorisées. + + <h3>Types de licences</h3> + + L’écosystème est dédié à la création de biens communs, open source, logiciel libre, open hard ware, open gouvernance… partagé par tous et transmis massivement. L’open source ne s’applique pas qu’aux solutions logicielles mais à toute création de l’esprit (matérielle et intellectuelle). + + Le fonctionnement ouvert de la communauté est une condition de réussite, pour inspirer sur son chemin d’autres initiatives oeuvrant pour les communs. C’est ce que font déjà un grand nombre de projets du Libre, ils se nourrissent les uns des autres et avancent avec trés peu de contrainte. + + On suivra la sagesse de Gandhi qui dit que tout ce qui n’est pas partagé sera perdu. Pour être efficients, élaborons en communauté de nouvelles licences à réciprocité, rétribuant tous les acteurs d’un processus, pour sortir d’un système fatigué, totalement individualiste et orienté vers la rentabilité. + + L’objectif de l’écosystème est de créé un organisme vivant , plus riche que la somme de ses parties et vers lequel chaque partie peut se tourner pour s’inspirer, se ressourcer, se rassurer, se confronter, se reposer.... + + </div> + <div class="space20"></div> + <br><br> + <div class="col-sm-12 "><a style="display: block;" class="text-extra-large bg-dark pull-left tooltips radius-5 padding-10 homestead" href="javascript:window.history.back();"><i class="fa fa-arrow-left"></i> Retour </a><a style="display: block;" class="text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead lbh " href="#default.view.page.import.dir.docs">Import Export API <i class="fa fa-arrow-right"></i> </a></div></div> + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>DOC</span> : OPEN SYSTEM</span>","book","DOCUMENTATION : OPEN SYSTEM"); +}); +</script> \ No newline at end of file diff --git a/views/docs/comprendre/smarterre.php b/views/docs/comprendre/smarterre.php new file mode 100755 index 0000000000000000000000000000000000000000..cb08c503ff466203aa63992240c919fc226ba06c --- /dev/null +++ b/views/docs/comprendre/smarterre.php @@ -0,0 +1,228 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"> SmarTerre</span> + <br/> + <span class="tpl_shortDesc">Territoire Intelligent ouvert, connecté et Experimental <br/>Territoire coopération et transitions </span> +</div> + +<?php + $cs = Yii::app()->getClientScript(); + + $cssAnsScriptFilesModule = array( + //'js/svg/tonfichier.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +?> +<style> + +.main-col-search{ + padding:0px !important; +} +.home_page h3.subtitle{ + font-weight: 300; + font-size:20px; +} +.home_page h3.information{ + /*font-weight: 500;*/ + font-size:16px; +} + +.home_page #main-logo-home{ + max-height: 290px; + margin-top:30px; +} + +.home_page .imageSectionVideo{ + width:80%; + margin-left:10%; +} +.home_page .section-video{ + margin-top: 40px; +} + +.home_page .btn-top{ + border-radius: 50px; +} + +.home_page .btn-discover{ + border-radius: 60px; + font-size: 50px; + font-weight: 200; + border: 1px solid transparent; + width: 90px; + height: 90px; +} +.home_page .btn-discover:hover{ + background-color: white !important; + border-color: #2BB0C6 !important; + color: #2BB0C6 !important; +} + +.home_page .discover-subtitle{ + font-size:13px; + margin-top: -6px; + display: block; +} + +.home_page .pastille{ + height: 100%; + width: 100%; + border-radius: 50px; + font-size: 45px; + padding: 13px 32px; +} + +.list-action{ + /*width: 100%;*/ + /*padding: 5px 10px;*/ + margin-bottom:40px; + font-size: 15px; + font-weight: 300; +} + +#img-network-for-all{ + /*max-width: 800px;*/ + padding:25px; +} +.menu-home-btn-ins{ + position: fixed; + top: 0px; + padding: 5px; + right: 2%; + z-index: 30; + border-radius: 30px 30px 30px 30px; +} + +.btn-success.communected{ + width: 50%; + margin-left: 25%; + padding: 10px; + border-radius: 20px; + background-color:#5cb85c; + color:white; +} +.contact-map { background:url(<?php echo $this->module->assetsUrl; ?>/images/people.jpg) bottom center repeat-x; background-size: 80%;background-color:#DFE7E9; } +.fa-caret-down{font-size:56px;line-height: 10px;} +</style> + +<div class="home_page"> + + <div class="imageSection center-block imageSectionVideo" style="margin-top: 50px; text-align:center; cursor:pointer; position:relative;" onclick="openVideo()" > + <div id="homeImg"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/comprendre/smarterre.png"" class="col-sm-12 img-responsive "> + </div> + + </div> + + <div id="dropdown_search" class="col-md-12"> + + </div> + + <div class="col-md-12 no-padding" id="whySection" style="max-width:100%;"> + + <div class="col-md-12 center" style="background-color:#394B59;width:100%;padding:1px 0px 1px 0%; "> + <h1 class="homestead text-white"> + <i class="fa fa-question-circle fa-2x" style="color:white;"></i> + Territoire ? <br/> Experimental ? + </h1> + + </div> + + <center> + <i class="fa fa-caret-down" style="color:#394B59;"></i><br/> + </center> + <div class="col-sm-12 no-padding"> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Comment développer une culture partagée qui gagne en visibilité, qui décloisonne et soit reconnue comme un moteur du développement local et des solidarités ?</li> + <li><i class='fa fa-arrow-right'></i> Quelles nouvelles relations entre acteurs et décideurs ?</li> + <li><i class='fa fa-arrow-right'></i> Quel rôle donner à une culture du partage et des communs ?</li> + <li><i class='fa fa-arrow-right'></i> C’est pour échanger autour de ces questions et co-construire des éléments de réponse que nous vous proposons de participer à la session Territoire coopération et transitions </li> + + </ul> + </div> + </div> + </div> + + <div class="col-md-12 no-padding" id="wwwSection" style="display: inline-block; max-width: 100%;"> + + <div class="col-md-12" style="background-color:#394B59;width:100%;padding:8px 0px 3px 0%; "> + + <h1 class="homestead text-white center"><i class="fa fa-users fa-2x"></i> + Personnes et territoires + </h1> + </div> + + <center style="background-color:#fffff;"> + <i class="fa fa-caret-down" style="color:#394B59;"></i><br/> + </center> + + <div class="col-md-12" style="background-color:#fffff;color:#293A46;padding-bottom:40px; float:left; width: 100%;"> + <div class="space20 hidden-xs"></div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Introduire un vrai reseau social citoyen sur internet </li> + <li><i class='fa fa-arrow-right'></i> Pour faciliter et creer du lien </li> + <li><i class='fa fa-arrow-right'></i> Revaloriser les dechets </li> + <li><i class='fa fa-arrow-right'></i> Economie Collaborative</li> + <li><i class='fa fa-arrow-right'></i> Open Source et Open data</li> + <li><i class='fa fa-arrow-right'></i> Simplifier le Do it yourself</li> + <li><i class='fa fa-arrow-right'></i>Transparence et acces a l'information</li> + <li><i class='fa fa-arrow-right'></i>citoyen contributeur au flux et revalorisation locale</li> + <li><i class='fa fa-arrow-right'></i> des solutions au manque de budget</li> + <li><i class='fa fa-arrow-right'></i>Creer une vraie economie locale</li> + <li><i class='fa fa-arrow-right'></i>Guide de connaissances Ultra Locales</li> + <li><i class='fa fa-arrow-right'></i>city indicateur </li> + </ul> + </div> + </div> + + + <div class="col-md-12 no-padding" id="valueSection" style="width:100%; float:left;"> + + <div class="col-md-12" style="background-color:#394B59;width:100%;padding:8px 0px 3px 0%;"> + <a href="#default.view.page.index.dir.docs" class="lbh "> + <h1 class="homestead text-white center"> + <i class="fa fa-book fa-2x"></i> Coopération et Transition + </h1> + </a> + </div> + + <center> + <i class="fa fa-caret-down" style="color:#394B59;"></i><br/> + </center> + + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Faire des ateliers, des assemblées, des conseils citoyens locaux </li> + <li><i class='fa fa-arrow-right'></i> Repéré des objectifs tangibles</li> + <li><i class='fa fa-arrow-right'></i> Créer une vraie dynamique trans thématique collaborative territoriale </li> + <li><i class='fa fa-arrow-right'></i> Pousser les acteurs locaux au partage</li> + </ul> + </div> + <div class="space20"></div> + </div> + + <div class="col-sm-12 no-padding" style="background-color:#E33551; max-width:100%; float:left;" id="teamSection"> + <div class="col-md-12" style="background-color:#E33551;width:100%;padding:8px 0px 8px 0%;"> + <h1 class="homestead center text-white"> <i class="fa fa-share-alt fa-2x"></i> Expérimentons Ensemble</h1> + </div> + </div> + + <div class="col-md-12 contact-map" style="color:#293A46;padding-bottom:75px; float:left; width:100%;" id="contactSection"> + <center> + <i class="fa fa-caret-down" style="color:#E33551"></i><br/> + <center> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Définir des objectifs ensemble </li> + <li><i class='fa fa-arrow-right'></i> Partager les taches pour accélérer </li> + </ul> + </div> + </div> +</div> + + + diff --git a/views/docs/docPattern.php b/views/docs/docPattern.php new file mode 100755 index 0000000000000000000000000000000000000000..07f4e7111651e7417110057d89efa84f82cdda84 --- /dev/null +++ b/views/docs/docPattern.php @@ -0,0 +1,61 @@ +<?php + $this->renderPartial("../docs/assets"); + Menu::docs("elements", "comprendre"); + $this->renderPartial('../default/panels/toolbar'); +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "cubes", + "title" => "Le titre", + "stitle" => "Le sous titre", + "description" => "La description ...", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <li data-target="#docCarousel" data-slide-to="1" class=""></li> + <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> + <div class="item"><?php $this->renderPartial("../docs/elements/person", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/elements/organisation", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/elements/projects", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/elements/events", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- Left and right CHAPTER controls --> +<a href="javascript:" class="homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Nom du chapitre Précédent +</a> +<a href="javascript:" class="homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Nom du chapitre Suivant <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs(); +}); +</script> + + + diff --git a/views/docs/docPattern/docHeader.php b/views/docs/docPattern/docHeader.php new file mode 100755 index 0000000000000000000000000000000000000000..062b3c3834a6fc457c4ddf307f970a6b60342242 --- /dev/null +++ b/views/docs/docPattern/docHeader.php @@ -0,0 +1,18 @@ + +<div class="panel-heading border-light text-dark partition-white no-padding pull-left col-md-12"> + <span class="tpl_shortDesc col-md-12 no-padding pull-left"> + <span class="col-md-12 no-padding homestead pull-left"> + <span class=" text-red homestead tpl_title2 pull-left"> + <a href="#default.view.page.index.dir.docs"><i class="lbh fa fa-arrow-circle-left text-dark"></i></a> + <i class="fa fa-<?php echo $icon; ?>"></i> <?php echo $title; ?> + </span> + <?php $this->renderPartial("../docs/docPattern/docIndex", array("icon"=>$icon)); ?> + </span> + <br> + <span class=" col-md-12 text-dark pull-left"> + <span class="text-dark homestead"><?php echo $stitle; ?></span><br> + <?php echo $description; ?> + </span> + + </span> +</div> \ No newline at end of file diff --git a/views/docs/docPattern/docIndex.php b/views/docs/docPattern/docIndex.php new file mode 100755 index 0000000000000000000000000000000000000000..a795277d5463f9d46748a9feaf29264d83ee169f --- /dev/null +++ b/views/docs/docPattern/docIndex.php @@ -0,0 +1,62 @@ +<style> + .dropdownDocIndex { + margin-top: 16px; + margin-left: 13px; + } + .dropdownDocIndex .active > a, .active > a > i.text-red{ + background-color:#E33551 !important; + color:white !important; + } + .dropdownDocIndex li > a{ + font-size: 20px; + } + + +</style> +<div class="dropdown dropdownDocIndex pull-left"> + <button class="dropdown-toggle menu-name-profil text-dark" data-toggle="dropdown"> + Chapitres <span class="caret"></span> + </button> + <ul class="dropdown-menu dropdown-menu-right"> + <li class="<?php if($icon=="cubes") echo "active"; ?>"> + <a href="#default.view.page.elements.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-cubes text-red"></i> les 4 éléments + </a> + </li> + <li class="hidden <?php if($icon=="cogs") echo "active"; ?>"> + <a href="#default.view.page.pourquoi.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-cogs text-red"></i> Pour quoi faire ? + </a> + </li> + <li class="hidden <?php if($icon=="question-circle") echo "active"; ?>"> + <a href="#default.view.page.comprendre.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-question-circle text-red"></i> Comprendre + </a> + </li> + <li class="<?php if($icon=="cube") echo "active"; ?>"> + <a href="#default.view.page.modules.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-cube text-red"></i> Modules + </a> + </li> + <li class="<?php if($icon=="tv") echo "active"; ?>"> + <a href="#default.view.page.presentation.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-tv text-red"></i> Présentation + </a> + </li> + <li class="<?php if($icon=="bullhorn") echo "active"; ?>"> + <a href="#default.view.page.communication.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-bullhorn text-red"></i> Communication + </a> + </li> + <li class="hidden <?php if($icon=="book") echo "active"; ?>"> + <a href="#default.view.page.histoire.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-book text-red"></i> L'histoire + </a> + </li> + <li class="<?php if($icon=="tachometer") echo "active"; ?>"> + <a href="#default.view.page.rd.dir.docs" class="lbh text-red" id="btn-menu-dropdown-my-profil"> + <i class="fa fa-tachometer text-red"></i> R&D + </a> + </li> + </ul> +</div> \ No newline at end of file diff --git a/views/docs/docPattern/player.php b/views/docs/docPattern/player.php new file mode 100755 index 0000000000000000000000000000000000000000..cf3cd170f097da4fb35efa3913b81c9153555583 --- /dev/null +++ b/views/docs/docPattern/player.php @@ -0,0 +1,62 @@ +<?php +$this->renderPartial("../docs/assets"); +?> +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <li data-target="#docCarousel" data-slide-to="1"></li> + <li data-target="#docCarousel" data-slide-to="2"></li> + <li data-target="#docCarousel" data-slide-to="3"></li> + <li data-target="#docCarousel" data-slide-to="4"></li> + <li data-target="#docCarousel" data-slide-to="5"></li> + <li data-target="#docCarousel" data-slide-to="6"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-12.png" class="col-sm-12 img-responsive "> + </div> + + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-22.png" class="col-sm-12 img-responsive "> + </div> + + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-32.png" class="col-sm-12 img-responsive "> + </div> + + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-42.png" class="col-sm-12 img-responsive "> + </div> + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-52.png" class="col-sm-12 img-responsive "> + </div> + + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-62.png" class="col-sm-12 img-responsive "> + </div> + + <div class="item"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/schemas/schema-global-72.png" class="col-sm-12 img-responsive "> + </div> + </div> + + <!-- Left and right controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Previous</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Next</span> + </a> +</div> + +<script type="text/javascript"> + +jQuery(document).ready(function() { + setTitle("DOCUMENTATION","file"); +}); +</script> \ No newline at end of file diff --git a/views/docs/elements.php b/views/docs/elements.php new file mode 100755 index 0000000000000000000000000000000000000000..a5303d990ae0367c58d5e6e47efe714eb9650a12 --- /dev/null +++ b/views/docs/elements.php @@ -0,0 +1,62 @@ +<?php +$this->renderPartial("../docs/assets"); + + $slide = isset($_GET["slide"]) ? $_GET["slide"] : ""; +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "cubes", + "title" => "Les 4 éléments", + "stitle" => + '<span class="text-yellow">Citoyens</span> + <span class="text-green">organisations</span> + <span class="text-purple">projets</span> + <span class="text-orange">événements</span>', + "description" => "Communecter s'appuie sur quatres éléments pour mettre en lumière ceux qui imaginent, organisent et mettent en place les solutions de demain ...", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="bg-red <?php if($slide=='') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="1" class="bg-yellow <?php if($slide=='person') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="2" class="bg-green <?php if($slide=='organisation') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="3" class="bg-purple <?php if($slide=='projects') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="4" class="bg-orange <?php if($slide=='events') echo "active"; ?>"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + + <div class="item <?php if($slide=='') echo "active"; ?>"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> + <div class="item <?php if($slide=='person') echo "active"; ?>"><?php $this->renderPartial("../docs/elements/person", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='organisation') echo "active"; ?>"><?php $this->renderPartial("../docs/elements/organisation", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='projects') echo "active"; ?>"><?php $this->renderPartial("../docs/elements/projects", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='events') echo "active"; ?>"><?php $this->renderPartial("../docs/elements/events", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- <a href="javascript:" class="homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Pour quoi faire ? <i class="fa fa-arrow-right"></i> +</a> --> +<a href="#default.view.page.modules.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Modules <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("cubes", "Les 4 éléments"); +}); +</script> diff --git a/views/docs/elements/events.php b/views/docs/elements/events.php new file mode 100755 index 0000000000000000000000000000000000000000..226a8d0c9b842032b773b0cf0f74eae4f2320494 --- /dev/null +++ b/views/docs/elements/events.php @@ -0,0 +1,78 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-orange homestead tpl_title"><i class="fa fa-calendar fa-2x"></i> Les évènement</span> + <br/> + <span class="tpl_shortDesc">Les évènements rythment nos vies et notre entourage.<br/> + Tout le monde participe d'une facon ou d'une autre à l'activité de son territoire. <br/> + Grace à Communecter, on peut tout transmettre simplement, et surtout tout voir rapidement et ne rien rater. </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/events.png" class="col-sm-12 img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-orange"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos évènements </li> + <li><i class='fa fa-arrow-right'></i> Rejoignez en participant</li> + <li><i class='fa fa-arrow-right'></i> Contribuez à l'activité </li> + <li><i class='fa fa-arrow-right'></i> Publiez facilement (Open Editing)</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-orange"><i class="fa fa-comments"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Déclarer un évènement </li> + <li><i class='fa fa-arrow-right'></i> Faire des programmes complexe avec des sous évènements</li> + <li><i class='fa fa-arrow-right'></i> Inviter des participants</li> + <li><i class='fa fa-arrow-right'></i> Multi organisateur</li> + <li><i class='fa fa-arrow-right'></i> Open edition : participation et contribution ouverte (wiki-like)</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-orange"><i class="fa fa-comments"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographiques des participants </li> + <li><i class='fa fa-arrow-right'></i> Voir sous forme de calendrier</li> + <li><i class='fa fa-arrow-right'></i> Une application mobile de journalisme citoyen</li> + <li><i class='fa fa-arrow-right'></i> Voir tous les évènements locaux</li> + </ul> + </div> + </div> + </div> + + </div> + + </div> + </div> +</div> diff --git a/views/docs/elements/organisation.php b/views/docs/elements/organisation.php new file mode 100755 index 0000000000000000000000000000000000000000..5b754edd3ef5df93d60cbb0de34a8d923bfbf726 --- /dev/null +++ b/views/docs/elements/organisation.php @@ -0,0 +1,124 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-green homestead tpl_title"><i class="fa fa-users fa-2x"></i> Les Organisations</span> + <span class="tpl_shortDesc"> + <div class=""> + Sur Communecter, les organisations représentent quatres types de regroupement citoyens :<br> + Les associations, les entreprises, les groupes ou collectifs informels, et les services publiques. + </div> + </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> + + <div class="col-sm-12 "> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/orga.png" class="img-schemas img-responsive "> + + <span class="tpl_shortDesc"> + <div class="col-md-10 homestead text-left text-green col-md-offset-1"> + <br><i class="fa fa-angle-down text-green"></i> + Un fil d'actualité pour chaque organisation + <br> + </div> + <div class="col-md-10 text-left col-md-offset-1"> + En partageant <strong>un fil d'actualité commun</strong>, les membres d'une organisation peuvent facilement <strong>échanger des informations, + partager leurs actualités, des photos, créer des discussions</strong>, ou encore <strong>échanger des points de vues sur les choix ou les actions à faire</strong> dans le cadre de leur organisation. + <br><br> + </div> + <div class="col-md-10 text-left col-md-offset-1"> + Bref, c'est <strong>un espace commun</strong>, dédié au suivi quotidien de toute organisation. + <br> + </div> + + + <div class="col-md-10 homestead text-left text-green col-md-offset-1"> + <br><i class="fa fa-angle-down text-green"></i> + Un espace coopératif + <br> + </div> + <div class="col-md-10 text-left col-md-offset-1"> + Chaque organisation dispose également de son propre "Espace coopératif", un espace dédié à la prises de décisions collectives, + où toutes les membres d'une même organisation peuvent débattre, faire des propositions, et voter ces propositions. + <br><br> + </div> + <div class="col-md-10 text-left col-md-offset-1"> + Rien de mieux qu'un outil transparent de démocratie participative<br> + pour prendre les décisions importantes collectivement. + <br> + </div> + + <div class="col-md-10 homestead text-left text-green col-md-offset-1"> + <br><i class="fa fa-angle-down text-green"></i> + Un agenda partagé + <br> + </div> + <div class="col-md-10 text-left col-md-offset-1"> + Lorsqu'une organisation créé un événement sur communecter, tous les membres sont automatiquement avertis.<br><br> + + </div> + <div class="col-md-10 text-left col-md-offset-1"> + Rien de mieux qu'un outil transparent de démocratie participative<br> + pour prendre les décisions importantes collectivement. + <br> + </div> + <!-- C'est en voyant tout les acteurs locaux, qu'on aura un vrai territoire connecté et que la valeur --> + </span> + + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-green"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos organisations </li> + <li><i class='fa fa-arrow-right'></i> Celles que vous gérez ou utilisez</li> + <li><i class='fa fa-arrow-right'></i> Publiez l'activité de l'organisation</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-green"><i class="fa fa-cogs"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Profitez de l'espace Coopératif </li> + <li><i class='fa fa-arrow-right'></i> Faites des propositions</li> + <li><i class='fa fa-arrow-right'></i> Partager vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos projet</li> + <li><i class='fa fa-arrow-right'></i> on peut s'incrire pour suivre</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-green"><i class="fa fa-eye"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographies des membres </li> + <li><i class='fa fa-arrow-right'></i> Voir les acteurs d'un territoire</li> + <li><i class='fa fa-arrow-right'></i> Créer des réseau thématique (ex:#commun)</li> + </ul> + </div> + </div> + </div> + + </div> + + </div> diff --git a/views/docs/elements/person.php b/views/docs/elements/person.php new file mode 100755 index 0000000000000000000000000000000000000000..699d49e14f1402ee6ccca827aee12ae0896ba51b --- /dev/null +++ b/views/docs/elements/person.php @@ -0,0 +1,89 @@ +<?php + if(!isset($renderPartial) || $renderPartial != true){ + Menu::docs(); + Menu::entry("right", 'onclick', + Yii::t( "common", 'Organisation Documentation'), + Yii::t( "common", 'Organisation'), + 'chevron-circle-right', + "urlCtrl.loadByHash('#default.view.page.organisation.dir.docs')","closeActionBtn",null); + $this->renderPartial('../default/panels/toolbar'); + } +?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"><i class="fa fa-user"></i> Les Citoyens</span> + <br/> + <span class="tpl_shortDesc"> Le citoyen est au centre de ce réseau sociétal,<br> + tout est fait pour lui, par lui, et amplifié par le nombres de citoyens participant.<br> + Le projet est concu comme un bien commun pour le bien commun </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .tpl_shortDesc{font-size:17px; font-weight: 300;} +</style> + + + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/person.png" class="img-schemas img-responsive" style="margin-bottom:15px;"> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-yellow"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><strong><i class='fa fa-arrow-right'></i> Chaque citoyen peut ajouter : </strong></li> + <li><i class='fa fa-arrow-right'></i> Ses amis ou connaissances</li> + <li><i class='fa fa-arrow-right'></i> Ses organisations</li> + <li><i class='fa fa-arrow-right'></i> Ses évenements</li> + <li><i class='fa fa-arrow-right'></i> Ses projets</li> + <li><i class='fa fa-arrow-right'></i> Le partage est le 1er acte social</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-yellow"><i class="fa fa-comments"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Mon répertoire personnel </li> + <li><i class='fa fa-arrow-right'></i> Faire des propositions</li> + <li><i class='fa fa-arrow-right'></i> Partager vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos projet</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light text-yellow"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> PARTICIPER</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir l'activité de ma commune</li> + <li><i class='fa fa-arrow-right'></i> Faire des propositions sur un territoire</li> + <li><i class='fa fa-arrow-right'></i> Découvrir les acteurs locaux</li> + <li><i class='fa fa-arrow-right'></i> Avoir une vision d'ensemble local pour mieux agir</li> + <li><i class='fa fa-arrow-right'></i> Echanger directement entre citoyen et avec la collectivité</li> + </ul> + </div> + </div> + </div> + </div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>Commune<span class='text-dark'>cter</span> : la doc</span>","connectdevelop","Communecter Documentation"); +}); +</script> \ No newline at end of file diff --git a/views/docs/elements/projects.php b/views/docs/elements/projects.php new file mode 100755 index 0000000000000000000000000000000000000000..beedf58a3f3c129dacda296a79821ba347c29d88 --- /dev/null +++ b/views/docs/elements/projects.php @@ -0,0 +1,77 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-purple homestead tpl_title"><i class="fa fa-lightbulb-o fa-2x"></i> Les Projets</span> + <br/> + <span class="tpl_shortDesc">Les projets permettent à la société d'évoluer,<br/> + à nos organisation de s'améliorer, à nos citoyens de participer et de contribuer.<br/> + Tout ce qui est partager à plus de chances de réussir, évoluer et grandir </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body tpl_content"> + + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/project.png" class="img-schemas img-responsive "> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-purple"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos projets </li> + <li><i class='fa fa-arrow-right'></i> Rejoignez en participant</li> + <li><i class='fa fa-arrow-right'></i> Contribuez à l'activité </li> + <li><i class='fa fa-arrow-right'></i> Publiez facilement (Open Editing)</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-purple"><i class="fa fa-comments"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Déclarez un évènement </li> + <li><i class='fa fa-arrow-right'></i> Faites des programmes complexe avec des sous évènements</li> + <li><i class='fa fa-arrow-right'></i> Inviter des participants</li> + <li><i class='fa fa-arrow-right'></i> multi organisateur</li> + <li><i class='fa fa-arrow-right'></i> Open editing : participation et contribution ouverte (wiki-like)</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-purple"><i class="fa fa-comments"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographies des participants </li> + <li><i class='fa fa-arrow-right'></i> Voir sous forme de calendrier</li> + <li><i class='fa fa-arrow-right'></i> Une application mobile de journalisme citoyen</li> + <li><i class='fa fa-arrow-right'></i> Voir tous les évènement locaux</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + </div> +</div> diff --git a/views/docs/histoire.php b/views/docs/histoire.php new file mode 100755 index 0000000000000000000000000000000000000000..6b284d6aa0704f8594ea85288a2d59d6b625d410 --- /dev/null +++ b/views/docs/histoire.php @@ -0,0 +1,56 @@ +<?php + $this->renderPartial("../docs/assets"); +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "book", + "title" => "L'histoire", + "stitle" => "Passé, présent et futur", + "description" => "Communecter n'est pas né d'hier.<br>Communecter prend le temps de se construire, de mûrir, pour grandir sereinement". + " et porter le plus loin possible ce projet révolutionnaire ...", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <!--<li data-target="#docCarousel" data-slide-to="1" class=""></li> + <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li>--> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/histoire/une_histoire_naturelle.png" class="img-schemas img-responsive "></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- Left and right CHAPTER controls --> +<a href="#default.view.page.communication.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Communication +</a> +<a href="#default.view.page.rd.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + R&D <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("comments", "L'histoire"); +}); +</script> + + + diff --git a/views/docs/index.php b/views/docs/index.php new file mode 100755 index 0000000000000000000000000000000000000000..f832a8c3998c90ad04887b233bfa6a2f22a9c5b0 --- /dev/null +++ b/views/docs/index.php @@ -0,0 +1,209 @@ +<?php +$this->renderPartial("../docs/assets"); +?> + + +<style type="text/css"> + .tpl_title{font-size: 38px!important;} +</style> +<div class="col-sm-12 "> + <div class="panel-heading border-light center text-dark partition-white radius-10 getDocHeader"> + <br/> + <?php if(@$_GET["network"]){ + $this->renderPartial("../docs/network/".$_GET["network"]); + } ?> + <span class="tpl_shortDesc"> Tout ce qu'il faut savoir sur le réseau Communecter ... + </span> + </div> + + <div class="panel-white"> + + <div class="col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0 no-padding"> + <?php $this->renderPartial("../docs/docPattern/player"); ?> + </div> + <div class="panel-body tpl_content"> + <?php if(!@$_GET["network"]){ ?> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-6 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh " href="#default.view.page.elements.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cubes"></i> 4 Elements</h4> + </a> + </div> + <div class="panel-body"> + <b>Communecter</b> est construit sur 4 éléments clefs, permettant de modéliser les acteurs et l'acitivté d'un territoire + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=person">Citoyen</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=organisation">Organisation</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=events">Événement</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=projects">Projet</a></li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.pourquoi.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cogs"></i> Cas d'utilisation</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Organiser, référencer son Organisation </li> + <li><i class='fa fa-arrow-right'></i> Valoriser un évènement et ces sous évènnements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos points d'intérets</li> + <li><i class='fa fa-arrow-right'></i> Trouver de l'aide pour vos projets</li> + <li><i class='fa fa-arrow-right'></i> Faire des Propositions et des votes </li> + <li><i class='fa fa-arrow-right'></i> </li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.modules.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cube"></i> Modules</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=news">Fil d'actualités</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=sig">Système d'Information Géographique (SIG)</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=annuaire">Annuaire</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=agenda">Agenda</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=dda">Espace coopératif</a></li> + </ul> + <a href="#news.index.type.pixels" class="lbh btn btn-default"><i class='fa fa-lightbulb-o'></i> Proposer une idée de module</a> + </div> + </div> + </div> + + </div> + <div class="col-sm-12"> + + + <div class="col-sm-6 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter" href="#default.view.page.comprendre.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-question-circle"></i> Comprendre </h4> + </a> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.ocdb.dir.docs">OCDB : Open Common Database</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.openSystem.dir.docs">Open System (Code Social)</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.import.dir.docs">Import Export API</a></li> + <i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.explain">Les gros mots</a> + <li class=""><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.financement.dir.docs|comprendre">Transparence Financière</a> </li> + </ul> + </div> + </div> + </div> + + </div> + <div class="col-sm-12"> + + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.presentation.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-tv"></i> Présentation</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Outils au service d'une villle intelligente et citoyenne V.0.1.pdf"> Outils au service d'une villle intelligente et citoyenne V.0.1</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation Courte de Communecter - OPEN ATLAS.pdf"> Présentation Courte</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation simplifiée de Communecter - OPEN ATLAS.pdf"> Présentation simplifiée</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Innovation Sociétale.pdf"> Innovation Sociétale</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Plaquette Offre Carrefour des communes.pdf"> Plaquette Offre Carrefour des communes</a> </li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.communication.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-bullhorn"></i> Communication </h4> + </a> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.communication.dir.docs?slide=affiches">Nos Affiches</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.communication.dir.docs?slide=video">Nos Vidéos</a> </li> + </ul> + </div> + </div> + </div> + + </div> + <!-- </div> + <div class="col-sm-12"> --> + <div class="col-sm-12"> + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.rd.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-comments"></i> Développement</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.rd.dir.docs?slide=roadmap">Roadmap</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.architecture.dir.docs?slide=roadmap">Architecture</a> </li> + <li class="hidden"><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.fin.dir.docs|slides">Wish Liste</a> </li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.histoire.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-comments"></i> L'Histoire</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Avant </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.firstPitch.dir.docs|slides">en 2012</a> </li> + <li><i class='fa fa-arrow-right'></i> L'équipe et les communecteurs</li> + <li><i class='fa fa-arrow-right'></i> La structure </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.fin.dir.docs|slides">des chiffres</a> </li> + </ul> + </div> + </div> + </div> + </div> + + <br> + <div class="col-sm-12 "> + <a style="display: block;" class="text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead lbh" href="#default.view.page.elements.dir.docs">c'est Parti <i class="fa fa-arrow-right"></i> </a> + </div> + <?php } ?> + </div> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>Commune<span class='text-dark'>cter</span> : la doc</span>","connectdevelop", "Communecter : La Doc"); + $(".moduleTitle").html('<span class=" text-red homestead tpl_title"><i class="fa fa-binoculars"></i> Documentation</span>') +}); +</script> + diff --git a/views/docs/modules.php b/views/docs/modules.php new file mode 100755 index 0000000000000000000000000000000000000000..9f832d7cce78b6847895ec641c6a1bb5fafa3357 --- /dev/null +++ b/views/docs/modules.php @@ -0,0 +1,67 @@ +<?php +$this->renderPartial("../docs/assets"); + $slide = isset($_GET["slide"]) ? $_GET["slide"] : ""; +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "cube", + "title" => "Modules", + "stitle" => "Actualités, cartographie, annuaire, agenda ...", + "description" => "Communecter c'est plein de fonctionnalités plus utiles les unes que les autres, imbriquées et interconnectées, qui font de communecter un réseau sociétal puissant.", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="<?php if($slide=='') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="1" class="<?php if($slide=='news') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="2" class="<?php if($slide=='sig') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="3" class="<?php if($slide=='agenda') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="4" class="<?php if($slide=='annuaire') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="5" class="<?php if($slide=='dda') echo "active"; ?>"></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item <?php if($slide=='') echo "active"; ?>"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/modules/index.png" class="img-schemas img-responsive "></div> + <div class="item <?php if($slide=='news') echo "active"; ?>"><?php $this->renderPartial("../docs/modules/news", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='sig') echo "active"; ?>"> <?php $this->renderPartial("../docs/modules/sig", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='agenda') echo "active"; ?>"> <?php $this->renderPartial("../docs/modules/agenda", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='annuaire') echo "active"; ?>"> <?php $this->renderPartial("../docs/modules/annuaire", array("renderPartial"=>true)); ?></div> + <div class="item <?php if($slide=='dda') echo "active"; ?>"> <?php $this->renderPartial("../docs/comprendre/dda2", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<div class="space20"></div> +<!-- Left and right CHAPTER controls --> +<!--<a href="javascript:urlCtrl.loadByHash('#default.view.page.comprendre.dir.docs')" class="homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Comprendre +</a>--> +<a href="#default.view.page.elements.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> 4 Elements +</a> + +<a href="#default.view.page.presentation.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Présentation <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("cube", "Modules"); +}); +</script> + + + diff --git a/views/docs/modules/agenda.php b/views/docs/modules/agenda.php new file mode 100755 index 0000000000000000000000000000000000000000..6114cbc5eb23db9c8f779f8cab52b26b3432084d --- /dev/null +++ b/views/docs/modules/agenda.php @@ -0,0 +1,95 @@ + +<div class="panel-heading center text-dark partition-white radius-10" > + <span class=" text-red homestead tpl_title"><i class='fa fa-calendar fa-2x'></i> agenda</span><br> + <!-- <h3 class=" text-dark homestead">Publier, </h3> --> + <br/> + <span class="tpl_shortDesc">L'activité d'un territoire c'est des évènements provenants de tous les acteurs plus ou moins locaux.<br/> + Restons informer, partageons au plus grand nombres.<br> + L'agenda, c'est l'outils incontournable des acteurs d'un territoire.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .codeSocial{color:black;} + .codeSocial h3, .codeSocial h2 {text-decoration: underline;font-weight: bold} +</style> + +<div class="col-sm-12 "> + <div class="panel-body tpl_content"> + <div class="col-xs-12"> + <div class=" col-xs-12 col-md-6 center bg-red"> + <div class="text-bold text-extra-large" style="padding: 50px;"> + Revenez bientot pour la vidéo + </div> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/agendaGlobal.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/agendaGlobal.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-bullhorn"></i> Rester Informé</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Toute l'activité d'un ou plusieurs territoires </li> + <li><i class='fa fa-arrow-right'></i> divers type d'évènements</li> + <li><i class='fa fa-arrow-right'></i> recevez des notifications de vos roganisation et de vos projets </li> + <li><i class='fa fa-arrow-right'></i> Filtrer par tag</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> Organiser</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Créer des évènements locaux</li> + <li><i class='fa fa-arrow-right'></i> partager les massivement</li> + <li><i class='fa fa-arrow-right'></i> Utiliser le réseau sociétal pour promouvoir </li> + <li><i class='fa fa-arrow-right'></i> Système d'information temporel</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-plus"></i> et plus</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Repéré les zones d'activité</li> + <li><i class='fa fa-arrow-right'></i> Créer du réseau autour de vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Vos visteurs reste en contact</li> + <li><i class='fa fa-arrow-right'></i> Citoyen journaliste d'évènements <span class="text-red">(bientot)</span></li> + </ul> + </div> + </div> + </div> + + </div> + <div class="center col-md-12"> + <button data-hash="#event.eventsv" class="btn bg-orange lbh" ><i class="fa fa-calendar-plus-o"></i> Ajouter un événement</button><br> + <label>Vous organisez un événement ? Partagez-le dans l'agenda ! </label> + </div> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>MODULE</span> : Agenda</span>","cube","MODULE : Agenda"); +}); +</script> \ No newline at end of file diff --git a/views/docs/modules/annuaire.php b/views/docs/modules/annuaire.php new file mode 100755 index 0000000000000000000000000000000000000000..8f48417e36c78e739a9e4a1dbe3865d3e59a7d90 --- /dev/null +++ b/views/docs/modules/annuaire.php @@ -0,0 +1,91 @@ + + <div class="panel-heading center text-dark partition-white radius-10" > + <span class=" text-red homestead tpl_title"><i class='fa fa-connectdevelop fa-2x'></i>Annuaire</span> + <br/> + <span class="tpl_shortDesc">Les liens qu'on tisse, nous permette de donner de la valeur (par l'usage) aux acteur plus ou moins locaux et les quantifier est un des objectifs premier de Communecter<br/> L'annuaire est un module permettant de visualiser sous différente forme le maillage que chaque élément créé dans son contexte. </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .codeSocial{color:black;} + .codeSocial h3, .codeSocial h2 {text-decoration: underline;font-weight: bold} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <div class="col-xs-12"> + <div class=" col-xs-12 col-md-6 embed-responsive embed-responsive-4by3" style="padding-bottom:35%;"> + <iframe class="embed-responsive-item" height="300" src="https://www.youtube.com/embed/AI0PbHrVHIE" frameborder="0" allowfullscreen> + </iframe> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/annuaire.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/annuaire.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-eye"></i> Libre et démocratique</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Développons du lien local </li> + <li><i class='fa fa-arrow-right'></i> Remplissage participatif </li> + <li><i class='fa fa-arrow-right'></i> Visualisation cartographique </li> + <li><i class='fa fa-arrow-right'></i> Valoriser l'activité locale par le lien</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> un Réseau, un Outil </h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Communiquer avec des communautés locales </li> + <li><i class='fa fa-arrow-right'></i> Filtrer par tag</li> + <li><i class='fa fa-arrow-right'></i> Developper les acteurs du territiore</li> + <li><i class='fa fa-arrow-right'></i> Un annuaire territiorial</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-pie"></i> Analyser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Proxicité : capacité à un territiore à créer du lien </li> + <li><i class='fa fa-arrow-right'></i> Promotion Exponentielle</li> + <li><i class='fa fa-arrow-right'></i> Statistiques <span class="text-red">(bientot)</span></li> + <li><i class='fa fa-arrow-right'></i> encore beaucoup de potentiel à découvrir</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>MODULE</span> Annuaire</span>","cube","MODULE Annuaire"); +}); +</script> \ No newline at end of file diff --git a/views/docs/modules/news.php b/views/docs/modules/news.php new file mode 100755 index 0000000000000000000000000000000000000000..ee47c523ba29e41b26ac39b78982b11e2748b596 --- /dev/null +++ b/views/docs/modules/news.php @@ -0,0 +1,93 @@ +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"><i class='fa fa-rss fa-2x'></i> Fil d'actualité</span> + <br/> + <span class="tpl_shortDesc">Les fils d'actualité permettent de retrouver d'une part l'actualité local<br> et d'autre part l'actualité de votre réseau</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + <div class="panel panel-white "> + <div class="panel-body tpl_content"> + <div class=" col-xs-12 col-md-6 embed-responsive embed-responsive-4by3" style="padding-bottom:35%;"> + <iframe class="embed-responsive-item" height="300" src="https://www.youtube.com/embed/66m1hm3A2ic" frameborder="0" allowfullscreen> + </iframe> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/news.png" data-title="Schéma explicatif des fils d'actualité" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/news.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + <div class="col-xs-12" style="margin-top:30px;margin-bottom:30px;"> + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> Journaux</h4> + </div> + <div class="panel-body"> + <br/><b>Les Journaux</b> servent à générer l'actualité d'une personne, d'une organisation, d'un projet et d'un événement. Chaque journal alimente le fil d'actualité des citoyens mais aussi celui de la ville où l'entité est connectée + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Privé : l'actu n'apparait que sur le mur des citoyens avec un lien fort (membre, contributeur, participant, admin) </li> + <li><i class='fa fa-arrow-right'></i> Réseau : l'actu apparait sur le mur des citoyens avec un lien fort et faible (abonnés au journal)</li> + <li><i class='fa fa-arrow-right'></i> Public : l'actu apparait sur le mur des citoyens avec un lien fort et faible et sur le mur de la ville</li> + </ul> + </div> + </div> + </div> + + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> Médias</h4> + </div> + <div class="panel-body"> + <br/><b>Le partage</b> de news et d'activités <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Les news (Public/Réseau/Privé):</li> + <li><i class='fa fa-arrow-right'></i> Une url d'article, de siteweb, d'image, de vidéo</li> + <li><i class='fa fa-arrow-right'></i> Une image uploadée dans la limite de 2mo par image et 20mo de stockage par entité</li> + <li><i class='fa fa-arrow-right'></i> Une pensée, une idée</li> + <li><i class='fa fa-arrow-right'></i> Bientôt un flux rss</li> + <li><i class='fa fa-arrow-right'></i> Les activités du réseau (Public):</li> + <li><i class='fa fa-arrow-right'></i> Un projet</li> + <li><i class='fa fa-arrow-right'></i> Une organisation</li> + <li><i class='fa fa-arrow-right'></i> Un événement</li> + <li><i class='fa fa-arrow-right'></i> Bientôt un besoin</li> + </ul> + </div> + </div> + </div> + + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> Actions</h4> + </div> + <div class="panel-body"> + <br/><b>Les actions sur les fils d'actualité</b> permettent de rebondir, de soutenir ou de discuter + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Partager ses connaissance </li> + <li><i class='fa fa-arrow-right'></i> Aimer un contenu</li> + <li><i class='fa fa-arrow-right'></i> Désapprouver un contenu</li> + <li><i class='fa fa-arrow-right'></i> Modérer un contenu</li> + <li><i class='fa fa-arrow-right'></i> Commenter</li> + <li><i class='fa fa-arrow-right'></i> Modifier / Supprimer</li> + <li><i class='fa fa-arrow-right'></i> Bientôt citer une personne</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + </div> +</div> +<script type="text/javascript"> + jQuery(document).ready(function(){ + setTitle("<span style='font-size:18px;'>Tout comprendre sur communecter</span>","","Tout comprendre sur communecter"); + }); +</script> \ No newline at end of file diff --git a/views/docs/modules/news2.php b/views/docs/modules/news2.php new file mode 100755 index 0000000000000000000000000000000000000000..a93a9892cbf3ddf267178e6e297fa36dd7575e28 --- /dev/null +++ b/views/docs/modules/news2.php @@ -0,0 +1,96 @@ +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"><i class='fa fa-cube'></i> Module : fil d'actualité</span> + <br/> + <span class="tpl_shortDesc">Les fils d'actualité permettent de retrouver facilement toute l'actualité qui vous intéresse,<br> + en fonction de vos liens et de votre activité sur le réseau. + <br><br>Retrouvez en quelques click toute l'actualité de votre ville, de votre réseau,<br> + vos organisations, vos projets, vos événements, selon vos envies ou vos besoins du moment.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12"> + <div class=""> + <div class="panel-body tpl_content"> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/news.png" data-title="Schéma explicatif des fils d'actualité" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/news.png" class="col-md-10 col-md-offset-1 col-xs-12 img-responsive " style="margin-bottom:30px;"> + </a> + <div class=" col-xs-12 col-md-10 col-md-offset-1 embed-responsive embed-responsive-4by3" style="padding-bottom:35%;"> + <iframe class="embed-responsive-item" height="300" src="https://www.youtube.com/embed/66m1hm3A2ic" frameborder="0" allowfullscreen> + </iframe> + </div> + <div class="col-xs-12" style="margin-top:30px;margin-bottom:30px;"> + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> Journaux</h4> + </div> + <div class="panel-body"> + <b>Les Journaux</b> servent à générer l'actualité d'une personne, d'une organisation, d'un projet et d'un événement. Chaque journal alimente le fil d'actualité des citoyens mais aussi celui de la ville où l'entité est connectée + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Privé : l'actu n'apparait que sur le mur des citoyens avec un lien fort (membre, contributeur, participant, admin) </li> + <li><i class='fa fa-arrow-right'></i> Réseau : l'actu apparait sur le mur des citoyens avec un lien fort et faible (abonnés au journal)</li> + <li><i class='fa fa-arrow-right'></i> Public : l'actu apparait sur le mur des citoyens avec un lien fort et faible et sur le mur de la ville</li> + </ul> + </div> + </div> + </div> + + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead text-dark"><i class="fa fa-comments"></i> Médias</h4> + </div> + <div class="panel-body"> + <b>Le partage</b> de news et d'activités <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Les news (Public/Réseau/Privé):</li> + <li><i class='fa fa-arrow-right'></i> Une url d'article, de siteweb, d'image, de vidéo</li> + <li><i class='fa fa-arrow-right'></i> Une image uploadée dans la limite de 2mo par image et 20mo de stockage par entité</li> + <li><i class='fa fa-arrow-right'></i> Une pensée, une idée</li> + <li><i class='fa fa-arrow-right'></i> Bientôt un flux rss</li> + <li><i class='fa fa-arrow-right'></i> Les activités du réseau (Public):</li> + <li><i class='fa fa-arrow-right'></i> Un projet</li> + <li><i class='fa fa-arrow-right'></i> Une organisation</li> + <li><i class='fa fa-arrow-right'></i> Un événement</li> + <li><i class='fa fa-arrow-right'></i> Bientôt un besoin</li> + </ul> + </div> + </div> + </div> + + <div class="col-xs-12"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> Actions</h4> + </div> + <div class="panel-body"> + <b>Les actions sur les fils d'actualité</b> permettent de rebondir, de soutenir ou de discuter + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Partager ses connaissance </li> + <li><i class='fa fa-arrow-right'></i> Aimer un contenu</li> + <li><i class='fa fa-arrow-right'></i> Désapprouver un contenu</li> + <li><i class='fa fa-arrow-right'></i> Modérer un contenu</li> + <li><i class='fa fa-arrow-right'></i> Commenter</li> + <li><i class='fa fa-arrow-right'></i> Modifier / Supprimer</li> + <li><i class='fa fa-arrow-right'></i> Bientôt citer une personne</li> + </ul> + </div> + </div> + </div> + + </div> + </div> + </div> +</div> +<script type="text/javascript"> + jQuery(document).ready(function(){ + setTitle("<span style='font-size:18px;'>Tout comprendre sur communecter</span>","","Tout comprendre sur communecter"); + }); +</script> \ No newline at end of file diff --git a/views/docs/modules/sig.php b/views/docs/modules/sig.php new file mode 100755 index 0000000000000000000000000000000000000000..671cf8e9e196a6b92e0fefe642dce316393f6184 --- /dev/null +++ b/views/docs/modules/sig.php @@ -0,0 +1,95 @@ +<div class="panel-heading center text-dark partition-white radius-10" > + <span class=" text-red homestead tpl_title"><i class='fa fa-map-marker fa-2x'></i> Système d'Information Géographique</span> + <br/> + <span class="tpl_shortDesc">Communecter est système d'information territorial, à double facette :<br/> + une interface web classique et un Système d'information géographique riche qui permet de visualiser toutes les données sur une carte.</span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .codeSocial{color:black;} + .codeSocial h3, .codeSocial h2 {text-decoration: underline;font-weight: bold} +</style> + +<div class="col-sm-12 "> + <div class="panel-body tpl_content"> + + <div class="col-xs-12"> + <div class=" col-xs-12 col-md-6 center bg-red"> + <div class="text-bold text-extra-large" style="padding: 50px;"> + Revenez bientot pour la vidéo + </div> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/sig.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/sig.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + + + + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-eye"></i> Visualiser</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Web Classique + Web Géolocalisé </li> + <li><i class='fa fa-arrow-right'></i> Représentation Géographique </li> + <li><i class='fa fa-arrow-right'></i> Tout voir et trouver sur une carte </li> + <li><i class='fa fa-arrow-right'></i> Filtrer par tag</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-12 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> Organiser</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Mieux visualiser permet de s'organiser</li> + <li><i class='fa fa-arrow-right'></i> Imaginer des solutions géographiques</li> + <li><i class='fa fa-arrow-right'></i> Devenir acteur du territiore</li> + <li><i class='fa fa-arrow-right'></i> Système d'information territiorial</li> + </ul> + </div> + </div> + </div> + <div class="col-xs-12"> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/interface.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/interface.png" class="col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-pie"></i> Analyser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Communiquer par scope géographique </li> + <li><i class='fa fa-arrow-right'></i> Filtrer par type et par tags</li> + <li><i class='fa fa-arrow-right'></i> Statistiques <span class="text-red">(bientot)</span></li> + </ul> + </div> + </div> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("MODULE : SIG","cube"); +}); +</script> + diff --git a/views/docs/network/iviatic.php b/views/docs/network/iviatic.php new file mode 100755 index 0000000000000000000000000000000000000000..6c1d56287dec823b20a730f5f53fe06fdb296be9 --- /dev/null +++ b/views/docs/network/iviatic.php @@ -0,0 +1,5 @@ +<span class="tpl_shortDesc"> + <br/><br/> + La cartographie des acteurs de la mobilité est un outil visant à soutenir le développement de projets collaboratifs dans la région des Hauts-de-France. Elle vous permet d’identifier les partenaires et compétences dont vous avez besoin pour construire et renforcer votre projet.<br/><br/> +L’équipe d’i-viaTIC se tient à votre disposition pour plus d’informations sur les structures représentées sur la carte et pour faciliter la mise en relation.<br/><br/> +</span> \ No newline at end of file diff --git a/views/docs/network/tierslieuxlille.php b/views/docs/network/tierslieuxlille.php new file mode 100755 index 0000000000000000000000000000000000000000..c494fbf231c58a80c27633843ad5916fa96808eb --- /dev/null +++ b/views/docs/network/tierslieuxlille.php @@ -0,0 +1,8 @@ +<span class="tpl_shortDesc"> + <br/><br/> + La Métropole Européenne de Lille a fait appel au commun Communecter.org et la <a href="http://hauts.tiers-lieux.org/" target="_blank">communauté des tiers-lieux</a> pour réaliser une cartographie des tiers-lieux sur son territoire.<br/><br/> + Cette réalisation permet d'avoir une vue cartographique et un annuaire des tiers-lieux (fablab, coworking, espace artistique, cafe solidaire, etc) sur l'ensemble de la métropole lilloise.<br/><br/> + Vous pouvez ajouter un tiers-lieux <a href="https://www.communecter.org/#organization.addorganizationform" target="_blank">ici</a> (n’oubliez pas d’ajouter le tag « tierslieux » pour que le projet apparaisse sur la cartograhie).<br/><br/> + Vous pouvez modifier les informations en les recherchant sur le site <a href="https://communecter.org" target="_blank">communecter.org</a> puis en modifiant les informations. Pour améliorer le filtrage, rajouter les tags aux projets correspondant aux filtres de la cartographie.<br/><br/> + Bonne navigation à vous dans l'univers des espaces partagés !!<br/><br/> +</span> \ No newline at end of file diff --git a/views/docs/notragora.php b/views/docs/notragora.php new file mode 100755 index 0000000000000000000000000000000000000000..af65cb5ca5c8eb06a9263666e6dc4b85dd32e20b --- /dev/null +++ b/views/docs/notragora.php @@ -0,0 +1,202 @@ +<?php +$this->renderPartial("../docs/assets"); +?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class=" text-red homestead tpl_title"><i class="fa fa-binoculars"></i> Documentation</span> + <br/> + <span class="tpl_shortDesc"> Tout ce qu'il faut savoir sur le réseau Communecter ... + </span> +</div> + +<style type="text/css"> + .tpl_title{font-size: 38px!important;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="col-md-10 col-md-offset-1 col-sm-12 col-sm-offset-0 no-padding"> + <?php $this->renderPartial("../docs/docPattern/player"); ?> + </div> + + <div class="panel-body tpl_content"> + + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + <div class="col-sm-6 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh " href="#default.view.page.elements.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cubes"></i> 4 Elements</h4> + </a> + </div> + <div class="panel-body"> + <b>Communecter</b> est construit sur 4 éléments clefs, permettant de modéliser les acteurs et l'acitivté d'un territoire + <br/> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=person">Citoyen</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=organisation">Organisation</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=events">Événement</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.elements.dir.docs?slide=projects">Projet</a></li> + </ul> + </div> + </div> + </div> + <div class="col-sm-6 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.pourquoi.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cogs"></i> Pour quoi faire ?</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Connaître les alternatives locales </li> + <li><i class='fa fa-arrow-right'></i> Discuter et débattre localement </li> + <li><i class='fa fa-arrow-right'></i> Participer au conseil citoyen </li> + <li><i class='fa fa-arrow-right'></i> Faire connaître ses projets, et trouver du soutient</li> + <li><i class='fa fa-arrow-right'></i> Devenir un acteur responsable de son territoire</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.modules.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-cube"></i> Modules</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=news">Fil d'actualités</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=sig">Système d'Information Géographique (SIG)</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=annuaire">Annuaire</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=agenda">Agenda</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.modules.dir.docs?slide=dda">Espace coopératif</a></li> + </ul> + <a href="#news.index.type.pixels" class="lbh btn btn-default"><i class='fa fa-lightbulb-o'></i> Proposer une idée de module</a> + </div> + </div> + </div> + + </div> + <div class="col-sm-12"> + + + <div class="col-sm-6 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter" href="#default.view.page.comprendre.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-question-circle"></i> Comprendre </h4> + </a> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.ocdb.dir.docs">OCDB : Open Common Database</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.openSystem.dir.docs">Open System (Code Social)</a></li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.import.dir.docs">Import Export API</a></li> + <i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.explain">Les gros mots</a> + <li class="hidden"><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.financement.dir.docs">Financement</a> </li> + </ul> + </div> + </div> + </div> + + </div> + <div class="col-sm-12"> + + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.presentation.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-tv"></i> Présentation</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Outils au service d'une villle intelligente et citoyenne V.0.1.pdf"> Outils au service d'une villle intelligente et citoyenne V.0.1</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation Courte de Communecter - OPEN ATLAS.pdf"> Présentation Courte</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation simplifiée de Communecter - OPEN ATLAS.pdf"> Présentation simplifiée</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Innovation Sociétale.pdf"> Innovation Sociétale</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Plaquette Offre Carrefour des communes.pdf"> Plaquette Offre Carrefour des communes</a> </li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.communication.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-bullhorn"></i> Communication </h4> + </a> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.communication.dir.docs?slide=affiches">Nos Affiches</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.communication.dir.docs?slide=video">Nos Vidéos</a> </li> + </ul> + </div> + </div> + </div> + + </div> + <!-- </div> + <div class="col-sm-12"> --> + <div class="col-sm-12"> + <div class="col-sm-6"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.rd.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-comments"></i> Développement</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.rd.dir.docs?slide=roadmap">Roadmap</a> </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.architecture.dir.docs?slide=roadmap">Architecture</a> </li> + <li class="hidden"><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.fin.dir.docs|slides">Wish Liste</a> </li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-6 hidden"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter lbh" href="#default.view.page.histoire.dir.docs"> + <h4 class="panel-title homestead text-red"><i class="fa fa-comments"></i> L'Histoire</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Avant </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.firstPitch.dir.docs|slides">en 2012</a> </li> + <li><i class='fa fa-arrow-right'></i> L'équipe et les communecteurs</li> + <li><i class='fa fa-arrow-right'></i> La structure </li> + <li><i class='fa fa-arrow-right'></i> <a class="lbh" href="#default.view.page.fin.dir.docs|slides">des chiffres</a> </li> + </ul> + </div> + </div> + </div> + </div> + + <br> + <div class="col-sm-12 "> + <a style="display: block;" class="text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead lbh" href="#default.view.page.elements.dir.docs">c'est Parti <i class="fa fa-arrow-right"></i> </a></div></div> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>Commune<span class='text-dark'>cter</span> : la doc</span>","connectdevelop", "Communecter : La Doc"); +}); +</script> + diff --git a/views/docs/openSystem.php b/views/docs/openSystem.php new file mode 100755 index 0000000000000000000000000000000000000000..b4c0564d7399dc60a4c9a7daae03ba9224912ce7 --- /dev/null +++ b/views/docs/openSystem.php @@ -0,0 +1,211 @@ + <div class="panel-heading center text-dark partition-white radius-10" > + <span class="tpl_shortDesc">Les organisations sont un des pilliers de la société<br/>, leurs activités est aussi productif que créateur de liens et de services. C'est en voyant tout les acteurs locaux , qu'on aura un vrai territoire connecté et que la valeur </span> +</div> + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .points{padding-left:10px;} + .codeSocial{color:black;} + .codeSocial h3, .codeSocial h2 {text-decoration: underline;font-weight: bold} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <div class="col-xs-12"> + <div class=" col-xs-12 col-md-6 center bg-red"> + <div class="text-bold text-extra-large" style="padding: 50px;"> + Revenez bientot pour la vidéo + </div> + </div> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/openSystem.png" data-title="Schéma notre Open System" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/openSystem.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12" style="margin-top:30px;margin-bottom:30px; " > + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-comments"></i> PARTAGER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Référencer vos organisations </li> + <li><i class='fa fa-arrow-right'></i> Celles que vous gérez ou utilisez</li> + <li><i class='fa fa-arrow-right'></i> Publiez l'activité de l'organisation</li> + <li><i class='fa fa-arrow-right'></i> <a href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blank">Sur Github</a></li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-cogs"></i> ORGANISER</h4> + </div> + <div class="panel-body"> + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Profitez de l'espace Coopératif </li> + <li><i class='fa fa-arrow-right'></i> Faites des propositions</li> + <li><i class='fa fa-arrow-right'></i> Partager vos évènements</li> + <li><i class='fa fa-arrow-right'></i> Partager vos projet</li> + <li><i class='fa fa-arrow-right'></i> on peut s'incrire pour suivre</li> + </ul> + </div> + </div> + </div> + + <div class="col-sm-4 "> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <h4 class="panel-title homestead"><i class="fa fa-eye"></i> Visualiser</h4> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i> Voir la répartition géographies des membres </li> + <li><i class='fa fa-arrow-right'></i> Voir les acteurs d'un territoire</li> + <li><i class='fa fa-arrow-right'></i> Créer des réseau thématique (ex:#commun)</li> + </ul> + </div> + </div> + </div> + + </div> + <div class="col-md-10 col-sm-offset-1 codeSocial" > + + <h1 class="center text-red homestead">Code social d’un "OpenSystem"</h1> + <h2>“Écosystème ouvertâ€</h2> + + <h2>Contexte général</h2> + + Le monde connaît des bouleversements majeurs qui se traduisent sur les plans écologique, économique, énergétique, numérique, social,… et dont l'issue est, par essence, incertaine. Dans ce contexte, de nouvelles structures sociales émergent, basées sur une réorganisation complète des rapports sociaux et des fonctionnements structurels. A l'image d'un phénomène plus vaste que lui, l'écosystème s'inscrit dans ce mouvement, et chacun de ses membres est particulièrement lucide sur le rôle actif que nous pouvons et souhaitons jouer dans la transformation de la société. Notre réseau se veut être un des acteurs qui transforment la société en l'impactant pour qu'elle s’oriente naturellement vers un fonctionnement plus collaboratif et participatif par la mise en pratique concrète de notre intelligence collective. L'écosystème incarne ainsi un élan collectif de mise en commun et de création de communs comme nouveau modèle sociétal. + + Pour la plupart des acteurs impliqués, l’idée d’écosystème s’inscrit dans une longue histoire aux racines profondes dont on peut trouver des traces sur le net (comme dans cette vidéo ou dans ce Github). Des affinités intellectuelles et amicales de longue date, des partages joyeux et complices, et des chemins parallèles sont venus nourrir un processus de gestation d’environ deux ans, au cours duquel une convergence a été tissée et a fait émerger la volonté de mettre en synergie les aventures individuelles. + + La plupart des membres de l’écosystème se sont retrouvés en ligne échangeant sur des thématiques qu’ils avaient en commun, il en a émergé un espace de rencontre, de reliance et de co-création autour de thématiques et de projets liés à la transition. + + Le présent code social entend donc initialement brosser les grandes lignes d’un projet destiné à grandir dans le temps et à s’opérationnaliser sous diverses formes correspondant à la créativité des individus qui composent l’écosystème. Aussi, nous considérons que les règles ne sont pas inscrites au coeur du commun, mais dans le coeur de chacun, pas à pas, au contact des autres et de l'action contributive, de manière à ce qu'elles soient édictées, intériorisées, adoptées, appropriées par chacun au fur et à mesure. + + <h2>Faisceau de qualités</h2> + + <h3>Les objectifs</h3> + + L'écosystème est un laboratoire d'expérimentation de nouvelles relations sociales et entrepreneuriales fondées sur la réciprocité et la bienveillance comme fondements d'une autonomie distribuée et organisée. Il vise à (dé)montrer qu'un autre monde est possible non pas au nom d'une utopie dogmatique mais par une mise en actes permettant un constat pragmatique direct d'efficience, de robustesse et de pérennité emprunté notamment au biomimétisme. + + Pour cela, les membres de l'écosystème se proposent de relever ensemble les défis suivants : augmenter notre efficience et avoir de l'impact grâce à la mutualisation proposer une vision incarnée des possibilités émancipatrices du numérique démontrer la pertinence sociale et économique d'une forme d'entreprenariat construit autour des communs créer les conditions d’un agir ensemble, sur les projets de chacun, répondre à des appels d'offres en commun, créer de nouveaux projets ensemble. proposer des prestations autour des communs, soutenir des communs, produire des communs essentiels au développement des communs en général mettre en oeuvre concrètement une interopérabilité sociale réelle, agile par les acteurs eux-mêmes et illustrée par le présent code social. oeuvrer à l’émergence d’un monde plus juste, plus soutenable, plus durable tout en utilisant la productivité du numérique. + + L’un des objectifs de l’écosystème est de permettre une coopération forte entre les différents membres de l’écosystème. Nous concevons cet écosystème comme un espace de pleine confiance permettant à ses membres de s’ouvrir pleinement à la coopération. + + A cette fin, nous expérimentons un certain nombre d’outils dont l’objectif est de permettre à cet écosystème : + <ul> + <li>De travailler ensemble efficacement</li> + <li>D’interagir de manière fluide (Système d’information ouvert)</li> + <li>De collaborer de manière agile et décentralisée (stigmergie, LEAN, AGILE)</li> + <li>De partager nos offres et opportunités (Catalogue contributif)</li> + <li>De répartir équitablement la valeur collectivement générée (Matrices de richesses, Revenu de base)</li> + <li>De mélanger nos offres pour innover en continu</li> + <li>De dépasser la rentabilité pour aller vers le plaisir, le partage et la créativité</li> + <li>De créer un système autonome et résilient à la crise économique (de la ZAD à la ZAN : Zone Autonome Numérique)</li> + <li>De développer l’intelligence collective au service de l’innovation et des bien communs</li> + <li>De ne jamais oublier les contextes déconnectés (solutions déconnectées)</li> + <li>De garder une place importante à la chance, par tirage au sort</li> + <li>Que toutes activités et l’innovation de l’écosystème passent par le partage et des décisions démocratique (par exemple sur Loomio)</li> + <li>D’innover par notre capacité d’ouverture et de partage</li> + <li>Rejoindre l’écosystème, c’est souscrire à l’idée qu’on peut créer ensemble un système libre, infiniment duplicable, plus intelligent et efficient, valorisant diverses techniques et technologies du moment pour éliminer les contraintes, réduire l'impact, remplacer les système pyramidaux et descendants par des organismes aux fonctionnements équilibrés, fluides, inversés et libres.</li> + </ul> + L’ecosystème souhaite être une expérimentation à lui tout seul de ce que pourrait être une société 2.2.main. Les outils produits doivent l’être pour le plus grand nombre. Les règles et méthodologies doivent rester simples, intuitives, fortement éthiques et abordables à tous. On veillera donc à ce qu’elles soient souples, créatives, adaptées au contexte et établies collectivement pour faire en sorte qu’elles soient appliquées volontairement par les membres de l’écosystème, ainsi que le préconise Elinor Ostrom. + + Dans le même esprit, les membres de l’écosystème s’engagent à veiller à une interopérabilité technique et sémantique, notamment en utilisant autant que possible du vocabulaire et un langage compréhensible par tous, tant au niveau des développements informatiques que des échanges humains. Les missions + + <h3>Missions internes</h3> + + Produire un cadre, notamment à travers un code social, et créer les conditions de la collaboration entre les membres sur des logiques de mutualisation et de complémentarité ; + + Mettre en Å“uvre un fonctionnement interne bienveillant et "permaculturel" : on s’adapte constamment aux particularités locales, aux contextes, aux collaborateurs... + Créer concrètement les conditions d'une interopérabilité humaine et technologique ; + Å’uvrer à la mise en place d'un langage commun ; + Se former en pair à pair sur ce que nous faisons les uns les autres et permettre le développement de fertilisations croisées entre les acteurs et projets de l’écosystème ; + Proposer un catalogue d’offres en liens direct avec les valeurs de l’écosystème ; + Développer massivement des instances de l’ODB (Open Data Base), une base de données partagée et ouverte à la contribution. A l’image de Wikipedia, cette base de données est ouverte à la contribution et sécurisée, chacun choisit les limites d’ouverture de la donnée qu’il apporte ; + Modéliser le fonctionnement d’écosystèmes et d’organisations ouvertes ; + Créer un réseau de tiers lieux camps TIC, où n’importe qui peut découvrir un membre de l’écosystème, où l’écosystème peut * se réunir, où on peut rediffuser et partager une activité d’un autre tiers lieux. + En créant ces conditions en interne, nous posons une base éthique et efficiente pour impulser un changement de société. Nous donnerons ainsi une assise aux missions externes par auto-légitimation ("c'est parce que ça a marché pour nous que nous transmettons cette expérience"). + + <h3>Missions externes</h3> + + La mission générique de l’écosystème est de mettre en oeuvre la recherche, le développement, l’expérimentation, la documentation, et la diffusion autour de l'ingénierie des écosystèmes trans-organisationnels. Cette mission peut se décliner comme suit : + + Accompagner les acteurs publics, privés et les citoyens dans leurs transitions (énergétique, écologique, démocratique, etc...) vers les communs ; + + Offrir des opportunités aux entreprises, associations, collectivités, élus, citoyens, de s'impliquer en faveur des communs (outils, dynamique,...) et leur proposer des dispositifs de capacitation ; + Développer, distribuer, former sur les communs et les solutions libre et opensources + Partager les éléments de réussite et d'échec de l'expérience. + Faisceau de valeurs + + <h3>Imaginaire, sources d'inspiration</h3> + + Parce qu’il fait interagir une pluralité d’acteurs ayant chacun une histoire propre, l’écosystème se nourrit d’une diversité d’imaginaires, de sources d’inspiration, ce qui en fait sa richesse, sa spécificité. Parmi ses sources d’inspiration, nous pouvons notamment citer : + + les notions d’autonomie, de liberté, de fraternité et de solidarité. Les pensées et dynamiques qui se sont développées autour de la démocratie directe, de la démocratie liquide, de la souveraineté ‒ qu’elle soit individuelle ou collective ‒ de la citoyenneté, de l’opengov. + Le monde de l’open-source ainsi que celui des communs dont on peut considérer qu’ils ont et sont en train de très concrètement changer le monde en permettant le développement de projets aussi beaux et fous que le web ou wikipedia. + Le peer to peer tel que défini par Michel Bauwens, la théorie des systèmes ‒ complexes ‒ qui ont permis un nouveau regard sur le monde, à travers les notions de combinatoire, d’auto-organisation, d’émergence,.... + Le web sémantique, le W3C, le web qui ont consacré les notions de standards, d’interopérabilité, de neutralité. + Les nouvelles formes d’économie, collaboratives, circulaires, numériques, agiles, fablabs, DIY, DIWO, Hackerspaces, et celles émergentes qui, comme les DAO (Distributed Autonomous Organisations), permettent d’entrevoir des changements profonds à grande échelle quand à l’architecture du monde social. + Le vivant, qui pour beaucoup d’entre nous, constitue un objet d’intérêt, tant il est complexe, tant les milliards d’années qui ont conduit à sa physionomie et à sa dynamique actuelles sont riches d’enseignement dans tous les domaines (économie, politique, technique notamment - #biomimétisme) ; les penseurs de la complexité et des systèmes émergents, et notamment le romancier Arthur Koestler qui a proposé le concept de holon. + L’écologie et la permaculture qui à travers la profondeur de leurs questions et la pertinence de leurs réponses, nous donnent une raison de plus d’agir et d’espérer changer le monde. + Le jeu, l’élan vital, l’hédonisme, l’épicurisme, la joie, et toutes les choses de la vie qui procurent aux êtres sensibles que nous sommes, la sensation d’être vivant, heureux, insouciants, en forme, en harmonie avec soi, les autres et le monde. + La communication bienveillante, et de manière générale les bienfaits d’une meilleure connaissance de soi pour se donner la capacité de développer des relations sociales harmonieuses. + Vivre ensemble c’est faire ensemble + + Les relations humaines, que ce soit dans le cadre de l’écosystème ou vis-à -vis de l’extérieur, s’inscrivent dans une perspective de bienveillance, d’autonomie, de transparence, de réciprocité et d’ouverture à la reliance. L’écosystème souhaite offrir l’expérience d’un réel inter-être, où l’individualité de chacun est pleinement respectée. + + Un écosystème commence par travailler ensemble pour créer des alternatives, des hackathons, des visions en communs. Le produits de ces créations seront la base commune de l’écosysteme. Sans co-construction il n’y a pas d’écosystème, juste de la consommation de l’écosysteme. Ces actions communes donneront encore plus de richesse au collectif que celles déjà apportée indépendemment par chacun des acteurs. + + <h2>Faisceau de droits</h2> + + <h3>Type de structure</h3> + + Non Lucratif, associatif et coopératif. Dès que deux acteurs de l’écosystème coopèrent, l’ensemble des pairs de l’écosystème doivent avoir connaissance de l’existence de ce projet pour nourrir l’envie, la motivation et l’engagement des autres membres. Une coopération est un exemple à suivre pour motiver d’autres coopérations. + + <h3>Modalités d’entrée</h3> + + L’écosystème est une structure ouverte dans laquelle entre toute personne ou projet qui se reconnaît dans le présent code social. On entre dans un écosystème par un de ses noeud existants, c’est à dire que le résultat de l’interaction avec ce ou ces premiers noeuds permet d’interagir avec un ou plusieurs acteurs du système. Cet acte d’échange validé par un élément du système donne accés directement à la totalité de l’écosystème. + + <h3>Mode de gouvernance</h3> + + Toutes idées, propositions, doivent se faire sur un systeme de décision collaboratif et communautaire ouvert tel que Loomio, avec pour objectif l’amélioration continue. Chaque acteur peut contribuer avec des idées et challenger l’écosysteme. Il faut nourrir l’esprit créatif et concurrentiel à l’interieur de l’écosysteme pour sortir des sentiers battus et pour trouver un chemin ensemble. Les bons chemins d’hier ne le sont plus aujourd’hui et ceux d’aujourd’hui ne le seront plus pour longtemps. L’écosystème est mutant en fonction de son contexte, du temps et des pays. + + <h2>Faisceau de richesses</h2> + + <h3>Matrices de richesse</h3> + + Les membres de l’écosystème ont conscience que les richesses échangées ne se limitent pas à l’argent. Les autres formes de richesses en circulation (temps, travail, gratitude, échanges humains,...) sont reconnues et valorisées. + + <h3>Types de licences</h3> + + L’écosystème est dédié à la création de biens communs, open source, logiciel libre, open hard ware, open gouvernance… partagé par tous et transmis massivement. L’open source ne s’applique pas qu’aux solutions logicielles mais à toute création de l’esprit (matérielle et intellectuelle). + + Le fonctionnement ouvert de la communauté est une condition de réussite, pour inspirer sur son chemin d’autres initiatives oeuvrant pour les communs. C’est ce que font déjà un grand nombre de projets du Libre, ils se nourrissent les uns des autres et avancent avec trés peu de contrainte. + + On suivra la sagesse de Gandhi qui dit que tout ce qui n’est pas partagé sera perdu. Pour être efficients, élaborons en communauté de nouvelles licences à réciprocité, rétribuant tous les acteurs d’un processus, pour sortir d’un système fatigué, totalement individualiste et orienté vers la rentabilité. + + L’objectif de l’écosystème est de créé un organisme vivant , plus riche que la somme de ses parties et vers lequel chaque partie peut se tourner pour s’inspirer, se ressourcer, se rassurer, se confronter, se reposer.... + + </div> + <div class="space20"></div> + <br><br> + <div class="col-sm-12 "><a style="display: block;" class="text-extra-large bg-dark pull-left tooltips radius-5 padding-10 homestead" href="javascript:window.history.back();"><i class="fa fa-arrow-left"></i> Retour </a><a style="display: block;" class="text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead lbh " href="#default.view.page.import.dir.docs">Import Export API <i class="fa fa-arrow-right"></i> </a></div></div> + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>DOC</span> : OPEN SYSTEM</span>","book","DOC : OPEN SYSTEM"); +}); +</script> \ No newline at end of file diff --git a/views/docs/panels/5w.php b/views/docs/panels/5w.php new file mode 100644 index 0000000000000000000000000000000000000000..37b5f2439487871e0427a647ed3a3ad84c936bbe --- /dev/null +++ b/views/docs/panels/5w.php @@ -0,0 +1,105 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" style="margin-bottom:20px;" class="nc_map" height=50> <i class='fa fa-question faa-pulse animated fa-3x '></i> </span> +</div> +<div class="space20"></div> + +<style type="text/css"> + .keypane{ + height: 235px; + } +</style> + +<div class="col-xs-4 keypane"> + + <h1 class="text-red homestead"><i class="fa fa-share-alt"></i> <?php echo Yii::t("common","WHAT",null,Yii::app()->controller->module->id) ?></h1> + <div> + A new way to live in society + <br/> Together to make it better + <br/> It's a societal network + <br/> Connected to your city + <br/> Building for the commons + <br/> Thinking Collectively + <br/> Collaborative Economy + <br/> Communities drive societies + <br/> + </div> +</div> + + +<div class="col-xs-4 keypane"> + <h1 class="text-red homestead"><i class="fa fa-calendar"></i> <?php echo Yii::t("common","WHEN",null,Yii::app()->controller->module->id) ?></h1> + + <div> + If it's not now + <br/> it's never + <br/> First Beta opening in january 2016 + <br/> Crowd Funding launches in December 2015 + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1 class="text-red homestead"><i class="fa fa-map-marker"></i> <?php echo Yii::t("common","WHERE",null,Yii::app()->controller->module->id) ?></h1> + <div> + Every where there are people + <br/> With ideas + <br/> Motivation to change + <br/> And anyone can start + <br/> Anywhere + <br/> Anytime + <br/> Remember you are never alone + </div> +</div> + +<div class="col-xs-4 keypane"> + + <h1 class="text-red homestead"><i class="fa fa-group"></i> <?php echo Yii::t("common","FOR WHO",null,Yii::app()->controller->module->id) ?></h1> + <div> + For the people by the people + <br/> Our children + </div> + <h1 class="text-red homestead"><i class="fa fa-group"></i> <?php echo Yii::t("common","BY WHO",null,Yii::app()->controller->module->id) ?></h1> + <div> + Builders, Architects, Thinkers, Artists, Connecters + <br/> Inventors, Travellers, Makers, Philosophers... + <br/> Dreamers, ... + <br/> You, Me, Everybody !! + </div> + +</div> + +<div class="col-xs-4 keypane"> + <h1 class="text-red homestead"><i class="fa fa-heart"></i> <?php echo Yii::t("common","WHY",null,Yii::app()->controller->module->id) ?></h1> + <div class=""> + Because We Love you, + <br/> The state of things, build the future you want to live in + <br/> The Passed is a lesson, A collaborative experiment + <br/> To Give a voice to the silent 99%, Sharing not owning + <br/> Copy Freely and enhance, Cooperate & Distribute Massively + <br/> Get Together not hide alone, Discover and not Ignore + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1 class="text-red homestead"><i class="fa fa-laptop"></i> <?php echo Yii::t("common","HOW",null,Yii::app()->controller->module->id) ?></h1> + <div> + <a href="#" onclick="showPanel('box-people')">People</a>, + <a href="#" onclick="showPanel('box-orga')">Organizations</a>, + <a href="#" onclick="showPanel('box-event')">Events</a> and + <a href="#" onclick="showPanel('box-projects')">Projects</a> + <br/> Connected Smart <a href="#" onclick="showPanel('box-projects')">Cities & Territories</a> + <br/> Computers and more people + <br/> Make a good mix + <br/> Build Great Things + <br/> Societal Innovation + <br/> Collective Imagination + <br/> Open source + </div> +</div> + + +<div class="space20"></div> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead "> <i class='text-red fa fa-search faa-pulse animated fa-3x '></i> <span style="font-size: 48px"><span class="text-red">CO</span>.R.D</span> </span> +</div> diff --git a/views/docs/panels/about.php b/views/docs/panels/about.php new file mode 100755 index 0000000000000000000000000000000000000000..7b1b57bf4a58aceaacf9f85db656f249719520cb --- /dev/null +++ b/views/docs/panels/about.php @@ -0,0 +1,86 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <i class='fa fa-child faa-pulse animated fa-3x '></i> <span style="font-size: 48px">ABOUT</span></span> +</div> +<div class="space20"></div> + +<style type="text/css"> + .videoWrapper { + position: relative; + padding-bottom: 56.25%; /* 16:9 */ + padding-top: 25px; + height: 0; + } + .videoWrapper iframe { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +</style> + +<div class="panel panel-white"> + <div class="panel-heading border-light "> + <span class="panel-title homestead"> <i class='fa fa-users fa-3x '></i> <span style="font-size: 48px; color:#E33551"> a NETWORK of NETWORKS </span></span> + </div> + <div class="panel-body" > + HUMAN PIXEL a layered organization <br/> + <ul class="list-group "> + <li class="list-group-item panel-white"> + OPEN ATLAS : a Non profit Organization + <br/> garantis fonctionnement democratique + <br/> Why An N.G.O ? + <br/> The project is non profit , aimed at building commons in a transparent and open source way + <br/> The NGO format seemed the most open structure + <br/> a chain of NGOs + </li> + <li class="list-group-item panel-white"> + a Group of companies managed by O.R.D + <br/> a decentralised company of trusted independant professionals + <br/> Why a company ? + + </li> + + <li class="list-group-item panel-white"> PIXEL HUMAIN : a community of people and organizations working, thinking and building for change</li> + <li class="list-group-item panel-white"> COMMUNECTER : a product , a modular framework, a Citizen Tool Kit</li> + <li class="list-group-item panel-white"> CITIZENS : are the heart of the system </li> + </ul> + + </div> +</div> + +<div class="panel panel-dark col-sm-6 col-lg-12 "> + <div class="panel-heading border-light"> + <span class="text-extra-small text-blue"></span><span class="text-large text-white">WE WORK</span> + </div> + <div class="panel-body no-padding text-extra-large "> + <ul class="list-group "> + <li class="list-group-item panel-dark">For All</li> + <li class="list-group-item panel-dark">For The Commons</li> + <li class="list-group-item panel-dark">For apps</li> + <li class="list-group-item panel-dark">For innovation</li> + <li class="list-group-item panel-dark">For Knowledge</li> + </ul> + </div> + </div> +</div> + +<div class="panel panel-white"> + <div class="panel-heading border-light "> + <span class="panel-title homestead"> <i class='fa fa-video-camera fa-3x '></i> <span style="font-size: 48px; color:#E33551"> PIXEL HUMAIN </span></span> + </div> + <div class="panel-body videoWrapper" > + <iframe src="https://player.vimeo.com/video/74212373" style="width:100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + </div> +</div> + +<div class="space20"></div> +<div class="panel panel-white"> + <div class="panel-heading border-light "> + <span class="panel-title homestead"> <i class='fa fa-video-camera fa-3x '></i> <span style="font-size: 48px;color:#E33551"> COMMUNECTER </span></span> + </div> + <div class="panel-body videoWrapper"> + <iframe src="https://player.vimeo.com/video/74212373" style="width:100%" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + </div> +</div> diff --git a/views/docs/panels/commandement.php b/views/docs/panels/commandement.php new file mode 100644 index 0000000000000000000000000000000000000000..0887f1147e8dae866019925969f67d844b76717d --- /dev/null +++ b/views/docs/panels/commandement.php @@ -0,0 +1,134 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-heart faa-pulse animated fa-3x '></i> <span style="font-size: 48px">PHILOSOPHY</span></span> +</div> +<div class="space20"></div> +<div class="keywordList col-xs-6 col-xs-offset-3"></div> + +<script type="text/javascript"> + +var keywords = [ + + { + "icon" : "fa-lightbulb-o", + "title":"Reseau societal", + "body":"Un reseau societal pour retrouver nos biens communs"+ + "<br>Voir la société par les communs"+ + "<br>Experimentons un autre vision du système"+ + "<br>Le système peut il fonctionner autrement" + }, + { + "icon" : "fa-lightbulb-o", + "title":"C'est pas un parti politique", + "body":"C'est pas un parti, c'est un projet"+ + "<br>qui veut 'juste' unir tous le monde." + }, + { + "icon" : "fa-lightbulb-o", + "title":"Rien ne l'arrete", + "body":"Quand l'objectif est le chagnement "+ + "<br>et que c'est pas juste un slogan "+ + "<br>rien ne l'arreter a tant qu'on ne le vivra pas "+ + "<br>on continuera a la chercher" + }, + { + "icon" : "fa-heart", + "title":"Art is the heart of our culture", + "body":"" + }, +]; + +Don’t threaten people. + +This includes threats of violence, and threats to hurt others in any way. + +Don’t post others’ personal information. + +Don’t post any personal information of any other users or third parties unless you have express permission from them to do so. + +Don’t hate. + +Slurs or hate speech, including denigrating comments involving race, sexual orientation, religious or political belief, age, or just about anything else, whether they be personal or general, besides being very uncool, are not allowed. + +Don’t promote self-harm. + +Do not post content that glorifies self-harm. Do not encourage others to harm themselves. Ello is a safe space to support recovery. + +Don’t spam. + +Don’t use fake tags or deceptive links or try to mislead others about the things you post. Don’t use malware or other evil code when you post. Don’t use Ello as a vehicle for generating revenue for affiliate marketing. No phishing. Don’t follow massive amounts of users for the sole purpose of leading them to your profile. When you follow someone, they are sent an e-mail notification, and thus following too many users is considered spam. + +Don’t automate. + +Ello is for human beings. It is against the rules to use a computer to register a lot of users on Ello, or to follow lots of users, or to automate posting. + +Don’t infringe on other people’s copyrights and trademarks. + +Don’t post content that belongs to third parties without their consent. Please make sure you have the right to post the content that you put on Ello. In other words, only post content that you own or have permission to post. + +Be legal. + +Only post content that is legal, meaning you can’t post content that violates a law, rule or regulation. + +Don’t squat on usernames. + +Don’t register a username that you are not going to use yourself. Don’t sell your username. Don’t register a username just to prevent someone else from using it. Usernames that have not been actively used for an extended period will be reclaimed. + +Don’t impersonate others. + +Be yourself, or a version of yourself. Please don’t pretend to be someone else. + +Don’t hurt young people. + +Don’t post anything inappropriate about minors, including things that are violent or sexual in nature. + +Don’t use Ello to intrude on other people’s privacy. + +There’s enough of that going on by big internet and governments around the world. + +NSFW + +If you regularly post adult content, you must respect those in our community who do not wish to see it by flagging your profile Not Safe for Work (NSFW). + +To mark your account NSFW, go to your settings page under the heading, “Post Adult-Oriented Content.†+ +If you regularly post adult content and do not mark your account NSFW, we may ask you to do so, or we may flag your account to NSFW for you. If you abuse our NSFW rules, your account may be frozen or deleted. + +If you choose not to view adult content, NSFW posts will be hidden behind a link that says “Click to show NSFW Mediaâ€, and NSFW user avatars and headers will be pixelated. + +Don’t be a nuisance regarding technology. + +Don’t try to circumvent or compromise our security or access non-public areas of the Ello website. Don’t use robots or other automated technology to access Ello. Do not scrape content from Ello. Don’t try to deceive other users or the public. If someone has blocked you, respect their decision and do not try to communicate with them through an alternative account. Don’t interfere with other users use of Ello. Don’t intentionally load test our Service or see how much traffic it can handle. Don’t overload our servers with traffic. Don’t upload or distribute viruses or malware to or through Ello. + +Ello’s rules expressly forbid posting abusive content of any kind, including content of any kind that portrays or encourages violence towards people or animals. + +If you break the rules we may contact you and ask you to fix the problem immediately. + +If you don’t, your account may be suspended or deleted, your username forfeited, and your IP address may be permanently banned from logging into Ello. We reserve the right to enforce or not to enforce these rules in whatever way we see fit, at our sole discretion. + +According to our lawyer, we should also tell you that Ello’s rules and policies do not create a duty or contractual obligation for us to act in any particular manner. And we reserve the right to change these rules at any time. So please play nice, be respectful, and have fun. + +If you notice abusive behavior, please report it immediately by emailing reportabuse@ello.co and we will look into it, and take necessary action as soon as possible. This email box is strictly for reporting abuse, and we will not respond to other requests sent here. + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> '+obj.title.toUpperCase()+'</span></span>'+ + '</div>'+ + '<div class="panel-body">'+ + '<blockquote class="space20">'+ + obj.body+ + "</blockquote>"+ + "</div>"+ + "</div>"); + }); +}); + +</script> + diff --git a/views/docs/panels/contact.php b/views/docs/panels/contact.php new file mode 100755 index 0000000000000000000000000000000000000000..b4973d77f0cc9129c228bb55e2bd5f37910cb314 --- /dev/null +++ b/views/docs/panels/contact.php @@ -0,0 +1,81 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-envelope-o faa-pulse animated fa-3x '></i> <span style="font-size: 48px">CONTACT</span></span> +</div> +<div class="space20"></div> +<div class="keywordList"></div> + +<style type="text/css"> + .keypan{ + height: 235px; + border: 1px solid #ddd + } +</style> +<script type="text/javascript"> + +var keywords = [ + + { + "icon" : "fa-envelope-o", + "title":"BY MAIL : <br/>contact @ communecter.org", + "class" : "keypan" + }, + { + "icon" : "fa-phone", + "title":"BY PHONE : <br/>00262-262343686", + "class" : "keypan" + }, + { + "icon" : "fa-paper-plane-o", + "title":"BY PAPER AIRPLANE<br/>good luck !!", + "class" : "keypan" + }, + { + "icon" : "fa-github", + "title":" <a href='https://github.com/pixelhumain' target='_blank'>ON GITHUB</a>" + }, + { + "icon" : "fa-bookmark-o", + "title":" <a href='https://groups.diigo.com/group/pixelhumain' target='_blank'>BY DIIGO</a> " + }, + { + "icon" : "fa-google-plus", + "title":" <a href='https://plus.google.com/u/0/communities/111483652487023091469' target='_blank'>BY GOOGLE+ </a> " + }, + { + "icon" : "fa-facebook-square", + "title":"<a href='https://www.facebook.com/groups/pixelhumain/' target='_blank'>BY FACEBOOK </a> " + }, + { + "icon" : "fa-twitter", + "title":"<a href='https://www.twitter.com/pixelhumain/' target='_blank'>BY TWITTER</a> " + }, + { + "icon" : "fa-twitter", + "title":"<a href='https://mamot.fr' target='_blank'>BY MASTODON</a> " + } +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + var icon = (obj.icon) ? obj.icon : "fa-tag" ; + var color = (obj.color) ? obj.color : "#E33551" ; + var body = (obj.body) ? obj.body : null ; + var classo = (obj.class) ? obj.class : "" ; + var str = '<div class="col-sm-4"><div class="'+classo+' panel panel-white ">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> <br/>'+obj.title+'</span></span>'+ + '</div>'; + if(body) + str += '<div class="panel-body">'+ + body+ + "</div></div></div>"; + $(".keywordList").append(str); + }); +}); + +</script> + diff --git a/views/docs/panels/crowdfunding.php b/views/docs/panels/crowdfunding.php new file mode 100755 index 0000000000000000000000000000000000000000..b7c8eaf5ec9ede27283b42335cbd4d88cd755e93 --- /dev/null +++ b/views/docs/panels/crowdfunding.php @@ -0,0 +1,157 @@ +<style> +.main-col-search{ padding:0px !important; } +.home_page h3.subtitle{ font-weight: 300; + font-size:20px;} +#img-header{ display:inline; + max-height: 700px;} +.fa-caret-down{font-size:56px;line-height: 10px;} +.social-list{ padding: 0;} +.social-list li{ list-style-type: none; display:inline;margin-right:10px;} +.social-list li a{ font-size:20px;} +.social-list .btn{ margin-top: 15px;} +a.btn.btn-social{ color: #FFF; background-color: #2a3945; } +a.btn.btn-social:hover{ background: none;} +a.btn.btn-facebook:hover{ color: #3b5998;} +a.btn.btn-twitter:hover{ color: #00a0d1; border-color: #00a0d1;} +a.btn.btn-google:hover{ color: #dd4b39; border-color: #dd4b39;} +a.btn.btn-github:hover{ color: #4078C0; border-color: #4078C0;} +.yellowph{color:#F6E201;} +.information{ + font-size:15px; + color:#8b91a0; +} +.contact-map { background:url(<?php echo $this->module->assetsUrl; ?>/images/people.jpg) bottom center repeat-x; background-size: 80%;background-color:#DFE7E9; } + +</style> + +<div class="home_page" style="margin-top:50px;"> + + <center> + <img id="img-header" class="img-responsive" src="<?php echo $this->module->assetsUrl; ?>/images/crowdfunding.jpg"/> + </center> + + <div class="col-md-12 no-padding" id="crowfundingSection" style="float:left;"> + <div class="col-md-12" style="background-color:#92BE1F;width:100%;padding:8px 0px 3px 0%;"> + <h1 class="homestead text-white center"><a href="http://www.kisskissbankbank.com/fr/projects/communecter-se-connecter-a-sa-commune/contributors" target="_blank" class="text-dark">ILS NOUS SOUTIENNENT DEJA<i class="fa fa-child fa-2x"></i></h1> + </div> + <div class="col-md-12" style="background-color:#394B59;width:100%;padding:0px 0px 3px 0%; "> + <h1 class="homestead text-white center"><i class="fa fa-users fa-2x"></i> CROWDFUNDING</h1> + </div> + <center> + <i class="fa fa-caret-down" style="color:#394B59;"></i><br/> + </center> + + <div class="col-md-12" style="color:#293A46;padding-bottom:40px; float:left; "> + <div class="space20 hidden-xs"></div> + <div class="col-sm-12 col-md-12"> + <div class="information" style="text-align: left; color:#3c5665"> + Encore une campagne de crowdfunding de plus ! Et oui ! Ces derniers temps, vous êtes très sollicités par des demandes d'aides ou de participation à des campagnes de <a href="javascript:;" data-id="explainFinancementParticipatif" class="explainLink">financement participatif</a>. + <br/><span class="text-red">Vous vous demandez pourquoi ?</span> L'état se désengage du financement du milieu associatif. Les mouvements citoyens s'intensifient et prennent de l'ampleur mais se heurtent au nerf de la guerre : où trouver l'argent pour aller plus loin? + <br/>Pour <span class="text-red">rester indépendant, citoyen et libre, le réseau sociétal Communecter </span>recherche un moyen de financement qui lui correspond le plus. Quoi de plus naturel alors que de se tourner vers ceux qui s'en serviront le plus. + <br/>A l'heure du numérique et du par-tout-le-temps connecté, nous croyons que la <span class="text-red">démocratie participative et la participation citoyenne</span> est conditionnée par la construction d'un outil simple et à destination de tous. + <br/>Dans le contexte actuel, difficile de demander aux collectivités de financer cet outil qui, pensent-elles, risque de leur faire perdre une partie de leur pouvoir. + <br/>C'est donc vers les citoyens (vers vous) que nous nous tournons : <span class="text-red">participez à la construction de ce projet innovant</span> en choisissant votre contrepartie ! + </div> + </div> + </div> + </div> + + <div class="col-md-12 no-padding" id="crowfundingSection" style="float:left;"> + <div class="col-md-12 no-padding" style="max-width:100%; float:left;"> + <div class="col-md-12" style="background-color:#E33551;width:100%;padding:0px 0px 3px 0%;"> + <h1 class="homestead text-white center"><i class="fa fa-share-alt fa-2x"></i> Devenez Crowdfunder Actif</h1> + </div> + </div> + <center> + <i class="fa fa-caret-down" style="color:#E33551;"></i><br/> + </center> + + <div class="col-md-12" style="color:#293A46;padding-bottom:40px; float:left; "> + <div class="space20 hidden-xs"></div> + <div class="col-sm-12"> + <div class="information" style="text-align: left; color:#3c5665"> + Vous pouvez contribuer au financement participatif mais aussi permettre de distribuer massivement la campagne autour de vous, dans vos reseaux. + <br/> Si ca vous interresse, vous etes au bon endroit. + <br/> Voici votre cocktail de Crowdfunder actif : + <ul style="list-style: none"> + <li><i class="fa fa-angle-right"></i> Voici le <a href="http://www.kisskissbankbank.com/fr/projects/communecter-se-connecter-a-sa-commune" target="_blank">lien vers la campagne</a></li> + <li><i class="fa fa-angle-right"></i> Vous trouverez toutes <b>les documentations</b> décrivant le projet <a href="javascript:;" data-id="explainCommunectorDocs" class="explainLink text-red"><i class="fa fa-upload"></i></a> </li> + <li><i class="fa fa-angle-right"></i> Rejoignez le groupe facebook <a href="http://www.kisskissbankbank.com/fr/projects/communecter-se-connecter-a-sa-commune" target="_blank">Les communecteurs</a></li> + <li><i class="fa fa-angle-right"></i> <b>parlez en</b> autour de vous</li> + <li><i class="fa fa-angle-right"></i> Tous les matins demandez vous à qui vous n'avez pas <b>transmis la campagne</b></li> + <li><i class="fa fa-angle-right"></i> <b>Tous les moyens sont bons</b> : les rencontres, le téléphone, le fax, le pigeon voyageur, les sms, le courier, les chuchottements doux a l'oreilles</li> + <li><i class="fa fa-angle-right"></i> Notez votre liste de contact, et relancer au besoin, <b>la campagne ne dure que 45j</b></li> + <li><i class="fa fa-angle-right"></i> Faite des <a href="javascript:;" data-id="explainMOAC" class="explainLink text-red">MOAC</a> : Massifs Offline ou Online Apéros Citoyens</li> + <li><i class="fa fa-angle-right"></i> <b>Relayer massivement</b> la campagne sur reseau sociaux FaceBook, Twitter, LinkedIn, Ello,...</li> + <li><i class="fa fa-angle-right"></i> Faite des <b>mailing personnaliser</b>. Pour vous aidez voici des <a href="javascript:;" data-id="explainCrowdfundingLetters" class="explainLink text-red">lettres type</a></li> + <li><i class="fa fa-angle-right"></i> Partagez votre motivation avec les membres de la pages et du groupe</li> + <li><i class="fa fa-angle-right"></i> Soyez créatif et partagez vos idées avec <a href="https://www.facebook.com/groups/1706464852909714/" target="_blank"> vos amis communecteurs</a> </li> + <li><i class="fa fa-angle-right"></i> Partagez aussi vos retours d'experiences et les avis recoltés</li> + </ul> + </div> + </div> + </div> + </div> + + <div class="col-md-12 no-padding" id="crowfundingSection" style="float:left;"> + <div class="col-md-12 no-padding" style="max-width:100%; float:left;"> + <div class="col-md-12" style="background-color:#92BE1F;width:100%;padding:0px 0px 3px 0%;"> + <h1 class="homestead text-white center"><i class="fa fa-clock-o fa-2x"></i> Les étapes de la campagne</h1> + </div> + </div> + <center> + <i class="fa fa-caret-down" style="color:#92BE1F;"></i><br/> + </center> + + <div class="col-md-12" style="color:#293A46;padding-bottom:40px; float:left; "> + <div class="space20 hidden-xs"></div> + <div class="col-sm-12"> + <div class="information" style="text-align: left; color:#3c5665"> + Une campagne, c'est un rythme soutenu de communication, de transmission... + <ul style="list-style: none"> + <li><i class="fa fa-angle-right"></i> <b>ETAPE 1 PENDANT 48 HEURES</b> + <br/>Contributeurs actifs sur le projet + Communecteurs + <br/>Famille et amis du groupe porteur de projet : on donne (on demande de ne pas relayer) + </li> + <li><i class="fa fa-angle-right"></i> <b>ETAPE 2 PENDANT 48 HEURES de plus</b> + <br/>Familles et amis des Communecteurs : on demande à sa famille et amis de donner + </li> + <li><i class="fa fa-angle-right"></i> <b>ETAPE 3 COMMUNICATION MASSIVE ET VIRALE</b> + <br/> Tous les réseaux sociaux + <br/> Mailing massif + <br/> Telephone 24/24 7/7 + <br/> SMS dans tous les sens + <br/> Tous les communecteurs solicités + <br/> Modèle de communication distribué et massif et concentré + <br/> 45 jours sans relache + </li> + </ul> + </div> + </div> + </div> + </div> + + <div class="col-md-12 contact-map" style="color:#293A46;padding-bottom:75px; float:left; width:100%;" id="contactSection"> + <center> + <i class="fa fa-caret-down" style="color:#fff"></i> + <br/> + <h1 class="homestead"><i class="fa fa-tty headerIcon"></i><br/>CONTACT PERSONNALISé</h1> + 0262 34 36 86<br><a href="#">contact@pixelhumain.com</a> + + <ul class="social-list"> + <li><a target="_blank" href="https://www.facebook.com/communecter" class="btn btn-facebook btn-social"><span class="fa fa-facebook"></span></a></li> + <li><a target="_blank" href="https://twitter.com/communecter" class="btn btn-twitter btn-social"><span class="fa fa-twitter"></span></a></li> + <li><a target="_blank" href="https://plus.google.com/communities/111483652487023091469" class="btn btn-google btn-social"><span class="fa fa-google-plus"></span> </a></li> + <li><a target="_blank" href="https://github.com/pixelhumain/communecter" class="btn btn-github btn-social"><span class="fa fa-github"></span> </a></li> + </ul> + + <a href="javascript:;" data-id="explainOpenAtlas" class="explainLink">L'association Open Atlas</a> + <center> + </div> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<?php echo Yii::t("common","Crowdfunding : Build Together") ?>",""); +}); +</script> \ No newline at end of file diff --git a/views/docs/panels/explain.php b/views/docs/panels/explain.php new file mode 100755 index 0000000000000000000000000000000000000000..d0d27a6a32a350aad120f2556dd3f7e0c0fc40d5 --- /dev/null +++ b/views/docs/panels/explain.php @@ -0,0 +1,61 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <span style="font-size: 48px">Frequently Asked Questions <i class='fa fa-question faa-pulse animated fa-3x '></i> </span></span> +</div> +<div class="space20"></div> + +<style> +.main-col-search{ padding:0px !important; } +.fa-caret-down{font-size:56px;line-height: 10px;} +.social-list{ padding: 0;} +.social-list li{ list-style-type: none; display:inline;margin-right:10px;} +.social-list li a{ font-size:20px;} +.social-list .btn{ margin-top: 15px;} +a.btn.btn-social{ color: #FFF; background-color: #2a3945; } +a.btn.btn-social:hover{ background: none;} +a.btn.btn-facebook:hover{ color: #3b5998;} +a.btn.btn-twitter:hover{ color: #00a0d1; border-color: #00a0d1;} +a.btn.btn-google:hover{ color: #dd4b39; border-color: #dd4b39;} +a.btn.btn-github:hover{ color: #4078C0; border-color: #4078C0;} +.yellowph{color:#F6E201;} +.information{font-size:15px;color:#8b91a0;} +.explainTitle{cursor:pointer; background-color: #449D44; padding: 10px; text-align: center; color: #fff;margin:0px;border-top: 1px solid #666;} +.explainTitle.blue{background-color: #32454E} +.explainTitle:hover{opacity: 0.8} +.explainDesc{ padding: 10px; background-color: white; } +.caretExplain{position: relative;top: 0px;background-color: white;color:#449D44;} +.caretExplain.blue{background-color: white; color:#32454E} +</style> + + +<div class="home_page" style="margin-top:50px"> + <?php echo $this->renderPartial('explainPanels',array("class"=>"explain2")); ?> +</div> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<?php echo Yii::t("common","Frequently Asked Questions") ?>",""); + /* + $(".explain").each(function(i,e) { + title = $(e).find(".explainTitle").text(); + //$(this).removeClass('explain'); + el = $(e); + $(".home_page").append( el[0] ); + $(".home_page .explain").last().removeClass("explain"); + //mylog.dir($(e)[0]); + }); + */ + + $(".explainDesc,.caretExplain").addClass("hide"); + + $(".home_page .explain2").removeClass("hide").click( function() + { + $(".explainDesc,.caretExplain").addClass("hide"); + if( $(this).find(".explainDesc,.caretExplain").hasClass("hide")) + $(this).find(".explainDesc,.caretExplain").removeClass("hide"); + else + $(this).find(".explainDesc,.caretExplain").addClass("hide"); + }); +}); +</script> \ No newline at end of file diff --git a/views/docs/panels/explainPanels.php b/views/docs/panels/explainPanels.php new file mode 100755 index 0000000000000000000000000000000000000000..a407a0cf92ec6871eb87784db6bd100aab63bce5 --- /dev/null +++ b/views/docs/panels/explainPanels.php @@ -0,0 +1,854 @@ + + + <div class="explainCommunectMe <?php echo $class?> col-xs-4"> + + <h1 class="homestead explainTitle blue "><i class="fa fa-home"></i> Communectez-moi</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Ce n'est pas la technologie qui changera la société mais une population bien outillée. + <br/>Se communecter c'est etre citoyen acteur locale + <br/>Me communecter me permet : + <ul> + <li><i class="fa fa-angle-right"></i> d'agir localement et pas juste m'informer</li> + <li><i class="fa fa-angle-right"></i> de voir les acteurs autour de moi</li> + <li><i class="fa fa-angle-right"></i> de référencer et valoriser les choses auxquelles je crois ici et là </li> + + <li><i class="fa fa-angle-right"></i> je participe à l'activité citoyenne locale</li> + <li><i class="fa fa-angle-right"></i> je partage pour améliorer mon territoire</li> + <li><i class="fa fa-angle-right"></i> je fais des propositions aux autres habitants (Discuter, Décider , Agir)</li> + </ul> + </div> + </div> + + <div class="explainDirectory <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle"><i class="fa fa-connectdevelop"></i> Outil de recherche</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Rechercher simplement + les <strong>personnes</strong>, + les <strong>projets</strong>, + les <strong>associations</strong>, + les <strong>entreprises</strong>, qui existent près de chez vous... ou ailleurs ! + </h3> + <ul> + <li><i class="fa fa-angle-right"></i> Retrouvez tous les acteurs locaux par code postal.</li> + <li><i class="fa fa-angle-right"></i> Recherchez par #tag ou mots-clés</li> + <li><i class="fa fa-angle-right"></i> Recherchez par zone géographique (commune, département, région)</li> + <li><i class="fa fa-angle-right"></i> Ajoutez les éléments qui vous intéressent à votre <strong>répertoire personnel</strong> pour les garder à portée de main.</li> + <!-- <li class="text-red">L'Annuaire communecté </li> --> + <!-- <li>Le partage d'information continu est un outil qui doit rester + disponible et libre, mais qui doit aussi évoluer avec la technologie.</li> --> + </ul> + + </div> + </div> + + <div class="explainMyDirectory <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Mon Répertoire </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + </div> + </div> + + <div class="explainNews <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle"><i class="fa fa-rss"></i> L'actualité Locale </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Communiquer localement est un jeu d'enfant !</h3> + <ul> + <li><i class="fa fa-angle-right"></i> Vous souhaitez être informé de ce qui se passe autour de vous ?</li> + <li><i class="fa fa-angle-right"></i> Vous avez des informations à partager avec les habitants votre ville ?</li> + <li><i class="fa fa-angle-right"></i> Vous avez une idée à proposer ?</li> + <li class="text-red"><i class="fa fa-angle-right"></i> Le fil d'actualité Communecté est là pour ça !</li> + <!-- <li>Le partage d'information continu est un outil qui doit rester + disponible et libre, mais qui doit aussi évoluer avec la technologie.</li> --> + </ul> + </div> + </div> + + <div class="explainAgenda <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle"><i class="fa fa-calendar"></i> Les événements Locaux</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Retrouvez tous les événements près de chez vous, en quelques clics</h3> + <ul> + <li><i class="fa fa-angle-right"></i> Tout autour de nous ca bouge, nous sommes la société.</li> + <li><i class="fa fa-angle-right"></i> La société est faite d'activités sociales.</li> + <li><i class="fa fa-angle-right"></i> Les événements ça se partage avec plaisir.</li> + <li class="text-red"><i class="fa fa-angle-right"></i> Grâce à l'agenda Communecté, rester informé est de plus en plus simple.</li> + <!-- <li><i class="fa fa-angle-right"></i> Créez et partagez vos événements locaux.</li> --> + </ul> + </div> + </div> + + <div class="explainOrganization <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Des organisations locales</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Quand quelque chose a du sens, nous trouvons souvent d’autres personnes intéressées, et nous construisons des communautés, ou nous rejoignons des communautés existantes.</li> + <li>Seul on va plus vite, ensemble on va plus loin.</li> + <li>Chaque territoire et toutes les villes sont pleins de projets. En nous reliant à eux</li> + <li>nous contribuons à en assurer la promotion. </li> + </ul> + </div> + </div> + + <div class="explainCommune <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Les Communes</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>On a fait un bon bout de chemin depuis la création des premiers outils</li> + <li>Les villes sont les plus grandes créations de l'homme</li> + <li>Evoluant constamment avec la technologie et les mouvements sociaux</li> + <li>Les villes sont des organismes vivants faits de nombreuses couches, tout comme une forêt.</li> + <li>Cependant les forêts ont trés peu d’impact sur la nature</li> + <li>Nous devons évoluer vers une efficience naturelle réduisant l’impact de nos vies</li> + <li>Tout en communiquant massivement et construisant intelligemment</li> + <li>Devenir une commune adhérente !! </li> + </ul> + </div> + </div> + + <div class="explainCommuneJoin <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Devenir une Commune adhérente</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>C'est choisir et comprendre l'enjeu d'un fonctionnement démocratique</li> + <li>C'est contribuer au fonctionnement et au développement d'un outil comme Communecter</li> + <li>C'est Soutenir vos administrés et le tissu associatif et economique local dans les actions et projets</li> + <li>C'est officialiser le lien entre un outil citoyen et la commune, et interagir directement</li> + <li>C'est une possibilité de collaboration et de contribution</li> + <li>C'est porter un Badge Commune Adhérente !! </li> + </ul> + </div> + </div> + + <div class="explainCommuns <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Les Biens Communs</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + D’un jardin partagé à un logiciel « libre », d’une place de village à une encyclopédie en ligne, les « communs » parlent d’une construction sociale et politique nouvelle où se fabrique à la fois de la citoyenneté, une réponse à des besoins (se nourrir, se loger, partager des connaissances, une imprimante 3D…), une nouvelle gouvernance, une pratique démocratique dialoguée avec les institutions publiques, et la possibilité pour chacun de contribuer avec ses compétences à faire société. S’immiscant entre l’état et le marché, cet état d’esprit des « Communs » s’ancre dans des pratiques locales tout en fonctionnant en réseau et en créant un maillage dans un ensemble de territoires et de pays. Ces nouveaux espaces tissent pour soi et pour autrui le désir d’être en activité, de contribuer, d’être utile, de développer des compétences, de créer de la richesse… en relation à un intérêt général. + </ul> + </div> + </div> + + <div class="explainHelpUs <?php echo $class?> col-xs-4"> + + <h1 class="homestead explainTitle"><i class="fa fa-bullhorn"></i> Pour un meilleur outil </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Aidez-nous à développer le réseau</h3> + <ul> + <li><i class="fa fa-angle-right"></i> Vous avez trouvé un bug ?</li> + <li><i class="fa fa-angle-right"></i> Vous avez une idée géniale ?</li> + <li><i class="fa fa-angle-right"></i> Vous voulez devenir Référent ?</li> + <li class="text-red"><i class="fa fa-angle-right"></i> Communecter est une communauté active et collaborative, votre aide est la bienvenue !</li> + </ul> + </div> + </div> + + + <div class="explainConnect <?php echo $class?> col-xs-4"> + + <h1 class="homestead explainTitle"><i class="fa fa-sign-in"></i> Se connecter</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Pourquoi se connecter ?</h3> + <ul> + <li><i class="fa fa-angle-right"></i> Accéder à vos <strong>données personnelles</strong></li> + <li><i class="fa fa-angle-right"></i> Gérer votre <strong>répertoire</strong></li> + <li><i class="fa fa-angle-right"></i> Participer à des <strong>événements</strong> ou des <strong>projets</strong></li> + <li><i class="fa fa-angle-right"></i> Publier des <strong>messages</strong> et des <strong>commentaires</strong></li> + <!-- <li><i class="fa fa-angle-right"></i> Les gens et les liens sont au coeur du système, des territoires et des villes que nous habitons.</li> --> + </ul> + </div> + </div> + + + <div class="explainRegister <?php echo $class?> col-xs-4"> + + <h1 class="homestead explainTitle"><i class="fa fa-plus-circle"></i> S'inscrire</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <h3 class="text-azure margin-bottom-10"><i class="fa fa-info-circle"></i> Pourquoi créer un compte ?</h3> + <ul> + <li><i class="fa fa-angle-right"></i> Parce j'ai des choses à partager localement</li> + <li><i class="fa fa-angle-right"></i> J'organise des <strong>événements</strong>, et je veux les faires connaître</li> + <li><i class="fa fa-angle-right"></i> J'ai des <strong>projets</strong> à partager</li> + <li><i class="fa fa-angle-right"></i> Je suis membre ou je gère des <strong>associations</strong>, des <strong>entreprises</strong>, des <strong>groupes locaux</strong> </li> + <li><i class="fa fa-angle-right"></i> Je veux me connecter à mon entourage</li> + <!-- <li><i class="fa fa-angle-right"></i> <a href="javascript:;" onclick='toggle(".explainLinking",".explain")'>Je veux me connecter à mon entourage</a></li> --> + <li class="text-red"><i class="fa fa-angle-right"></i> Plus on sera nombreux à nous Communecter dans nos communes, plus nos idées auront du poids !</li> + <!-- <li><i class="fa fa-angle-right"></i> <a href="">Créer un compte</a></li> --> + </ul> + </div> + </div> + + <div class="explainLinking <?php echo $class?> col-xs-4"> + + <h1 class="homestead explainTitle">Créer du lien localement</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>C'est valoriser les acteurs de mon territoire</li> + <li>C'est participer à construire un annuaire à <a href="javascript:;" onclick='toggle(".explainValueUsage",".explain")'>valeur par l'usage</a></li> + <li>C'est créer un térritoire connecté</li> + </ul> + </div> + </div> + + <div class="explainAssociatif <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Associatif</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Donner aux associations une vitrine et un outil de valorisation de leurs actions. Utiliser un outil de cartographie des compétence au sein d’un groupe... + </div> + </div> + <div class="explainEconomie <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Economie</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Référencement des entreprises et des compétences locales. La valorisation des circuits courts de distribution favorise l'économie locale... + </div> + </div> + <div class="explainTerritoire <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Territoire</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Cartographie des compétences, des ressources, des projets, des acteurs d’un territoire, d’un groupe, d’une association ou d’une entreprise... + </div> + </div> + <div class="explainTourisme <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Tourisme</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Les habitants d’une commune sont ceux qui la connaissent et la valorisent le mieux ... + </div> + </div> + <div class="explainAlimentation <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Alimentation</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Liens étroits avec les associations locales (permaculture…), créations de projets de fermes pédagogiques... + </div> + </div> + <div class="explainAgriculture <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Agriculture</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Mise en évidence des producteurs locaux, potager à la maison, création de projets de maraîchages collectifs / jardins participatifs ... + </div> + </div> + <div class="explainCulture <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Culture</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Partage d'informations sur l'animation du territoire, création d'événements, échanges de services (ex : cours de guitare contre des cours de chant) ... + </div> + </div> + <div class="explainEmploi <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Emploi</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Identification des manques d’offre de services pour favoriser des initiatives pouvant déboucher sur des d'emplois et d'entreprises ... + </div> + </div> + +<div class="explainOpendata <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Opendata</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + L'open data ou donnée ouverte est une donnée numérique d'origine publique ou privée. Elle peut être notamment produite par une collectivité, un service public (éventuellement délégué) ou une entreprise. Elle est diffusée de manière structurée selon une méthode et une licence ouverte garantissant son libre accès et sa réutilisation par tous, sans restriction technique, juridique ou financière. + <br/>L'ouverture des données (open data) représente à la fois un mouvement, une philosophie d'accès à l'information et une pratique de publication de données librement accessibles et exploitables. + <br/>Elle s'inscrit dans une tendance qui considère l'information publique comme un bien commun (tel que défini par Elinor Ostrom) dont la diffusion est d'intérêt public et général. + <br/>En Europe et dans certains pays, des directives et lois imposent aux collectivités de publier certaines données publiques sous forme numérique. + <a href="https://fr.wikipedia.org/wiki/Open_data" target="_blank" class="btn btn-default"><i class="fa-wikipedia-w fa"></i> Wikipedia</a> + </ul> + </div> + </div> + + <div class="explainCartographiedeReseau <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Cartographie de Réseau</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>La cartographie de réseau est l'étude de la connectivité physique de réseaux. La cartographie d'Internet est l'étude de la connectivité physique d'Internet. La cartographie de réseau découvre les dispositifs sur le réseau et leur connectivité. </li> + <li>Visualiser sur une carte qui fait quoi au sein d’un réseau, quels sont les liens internes qui structure une organisations, un groupe d’individus ? Voir comment est structuré un évennement , et quels liens externes s’y rattachent. </li> + <li>Au sein de Communecter, ce sont les liens entre les entités qui donnent toutes la valeur au projet, c’est aussi grâce à ces liens que l’on estime la valeur par l’usage. Les liens que l’on a avec les acteurs locaux nous permettront de dresser un vrai annuaire démocratique</li> + </ul> + </div> + </div> + + <div class="explainDemoPart <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Démocratie Participative</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + La démocratie participative désigne l'ensemble des dispositifs et des procédures qui permettent d'augmenter l'implication des citoyens dans la vie politique et d'accroître leur rôle dans les prises de décision. + </ul> + </div> + </div> + + <div class="explainCommunecter <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Communecter</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Action de se connecter à sa commune. Par extension, nom d’une plateforme internet qui fournit l’interface et les outils nécessaires à une connexion citoyenne de qualité. + </ul> + </div> + </div> + + <div class="explainOpenSource <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Opensource</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + La désignation open source, ou « code source ouvert », s'applique aux logiciels dont la licence respecte des critères précisément établis par l'Open Source Initiative, c'est-à -dire les possibilités de libre blueistribution, d'accès au code source et de création de travaux dérivés. + <br/> + « Open source » désigne un logiciel dans lequel le code source est à la disposition du grand public, et c'est généralement un effort de collaboration où les programmeurs améliorent ensemble le code source et partagent les changements au sein de la communauté ainsi que d'autres membres peuvent contribuer. (CC BY-SA Wikipedia, Linux, GPL, FSF, ...) + </ul> + </div> + </div> + + <div class="explainProxicity <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Proxicité</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Nom commun féminin qui évoque le voisinage avec la cité, c’est la capacité d’un territoire a créer du lien de proximité. Néologisme visant à illustrer le rapprochement du citoyen avec sa commune tel que proposé par Communecter. + </ul> + </div> + </div> + + <div class="explainCodeLogiciel <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Code Logiciel</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Le code logiciel ou code source est un texte qui représente les instructions de programme telles qu'elles ont été écrites par un programmeur. Le code source se matérialise souvent sous la forme d'un ensemble de fichiers textes. Le code source est généralement écrit dans un langage de programmation permettant ainsi une meilleure compréhension par des humains. Une fois le code source écrit, il permet de générer une représentation binaire d'une séquence d'instructions (CC BY-SA Wikipedia). Avec Communecter, ce code logiciel est accessible au ciroyen. + </ul> + </div> + </div> + + <div class="explainConnectedTerritory <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Territoire Connecté</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Un territoire connecté est un territoire maillé par un réseau complet de moyens de communication. Communecter apporte sa touche au maillage en proposant des outils de communication directe entre les citoyens d’une même commune. + </ul> + </div> + </div> + + <div class="explainLocalActors <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Acteurs Locaux</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Ensemble des personnes physiques et morales qui agissent dans le périmètre d’un territoire géographique donné. On parle souvent des acteurs locaux d’une commune ou d’une région. Communecter apporte des outils de partage et de communication à ces acteurs locaux. + </ul> + </div> + </div> + + <div class="explainCollabEco <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Economie collaborative</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + L’économie collaborative est une activité humaine qui vise à produire de la valeur en commun et qui repose sur de nouvelles formes d'organisation du travail. Elle s'appuie sur une organisation plus horizontale que verticale, la mutualisation des biens, des espaces et des outils (l'usage plutôt que la possession), l'organisation des citoyens en "réseau" ou en communautés et généralement l'intermédiation par des plateformes internet (à l'exception de modèles comme les réseaux d'échanges réciproques de savoirs). + <br> + L’économie collaborative est entendue dans un sens large, qui inclut la consommation collaborative (AMAP, couchsurfing, covoiturage etc.) mais également les modes de vie collaboratifs (coworking, colocation, habitat collectif), la finance collaborative (crowdfunding, prêt d'argent de pair à pair, monnaies alternatives), la production contributive (fabrication numérique, DIY, Fablabs, imprimantes 3D, maker spaces) et la culture libre. (CC BY-SA Wikipedia) + </ul> + </div> + </div> + + <div class="explainCitoyens <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Citoyens</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Est citoyen celui qui habite dans une ville et y jouit du droit de cité c'est à dire de l'aptitude juridique à jouir des droits politiques conformément aux lois du pays (CC BY-SA Wiktionnaire). Il est important de se souvenir que qui n'use pas de ses droits prend le risque de les perdre... Communecter vient proposer au citoyen d'exercer pleinement ses droits au sein de la commune. + </ul> + </div> + </div> + + <div class="explainAssociation <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Associations</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Une association est la réunion, le rapprochement de plusieurs entités, tant physiques (personnes, entreprises…) que conceptuelles (idées, couleurs). (CC BY-SA 3.0 Wikipedia). Communecter propose aux associations locales de mieux se faire connaître afin de favoriser leur vie et leur développement. La vie associative est au coeur même de la vie de la cité et de ses citoyens. + </ul> + </div> + </div> + + <div class="explainSocietyNetwork <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Réseau sociétal</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Il a fallu différencier les réseaux sociaux des réseaux sociétaux à cause de la place + des premiers dans l'esprit des gens. Les réseaux sociaux sont orientés vers la création de liens entre amis, + partager plus ou moins d'événement de son quotidien. + Les réseaux sociétaux, comme Communecter, servent aussi à créer du lien, des événements, des groupes, et des projets + mais ont surtout pour objectif d'améliorer le fonctionnement de la société. L'objectif est de trouver un bon équilibre + entre le jeu et le fonctionnement de la société pour reprendre plaisir à y participer. + Plus on sera nombreux à participer à ce genre de réseau plus nos actions auront un impact convainquant. + </ul> + </div> + </div> + + <div class="explainCTK <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Citizen Tool Kit</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Le Toolkit Citoyen est l'architecture modulaire sur laquelle repose Communecter. + Il offre un vrai squelette applicatif pour construire de nouveaux modules sociétaux. + Facile à prendre en main le CTK permet de construire rapidement et génériquement des fonctionalités. + les fonctions du CTK sont faites pour être réutilisables, entre les modules. + </ul> + </div> + </div> + + <div class="explainCodeSocial <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Code Social</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Le “code social†est un modèle de description à destination des organisations et des projets + souhaitant s'inscrire dans des logiques de transparence, d'ouverture et de collaboration. + Il est assimilable à une carte d'identité mise en mouvement. + Les objectifs du code social sont multiples : + <li>Permettre une prise en compte de la diversité des enjeux liés à la conception et au développement d'un projet ou d'une organisation.</li> + <li>Permettre une description fine et exhaustive de leurs enjeux et de leurs principes de fonctionnement.</li> + <li>Permettre aux organisations et aux projets d'être pleinement transparents.</li> + <li>Tisser la confiance en permettant à tous d'avoir accès au code source d'une organisation ou d'un projet.</li> + <li>Permettre le développement de collaborations saines et durables en évitant les imprécisions, les postures seulement rhétoriques, les non-dits, les malentendus, les surprises …</li> + <li>Outiller, encourager, favoriser les organisations et les projets qui accordent une importance particulière à la transparence et à la cohérence de leur démarche.</li> + </ul> + <ul> + Le code social comporte la raison d'être d'une organisation ou d'un projet ainsi que 7 modèles permettant de les décrire : + <li>Raison d'être : Vision, missions, valeurs</li> + <li>Modèle social et humain,</li> + <li>Modèle économique,</li> + <li>Modèle technologique</li> + <li>Modèle juridique et financier</li> + <li>Modèle écologique</li> + <li>Modèle artistique et culturel</li> + </ul> + </div> + </div> + + <div class="explainGlocal <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Glocal</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Qui met en relation les échelles locales et mondiales, notamment dans le cadre de la mondialisation. La glocalisation est un néologisme qui désigne les processus d'interactions, d'interdépendances et d'articulations entre les échelles locales et mondiales, notamment dans le cadre de la mondialisation. (CC BY-SA 3.0 Wiktionnaire). Communecter est un acteur glocal car il permet de relier les citoyens à leur commune comme au reste du monde. + </ul> + </div> + </div> + + <div class="explainCommunecteur <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Communecteur</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Je suis communecteur quand j'ai envie de : + <li> faire bouger les choses autour de moi</li> + <li> faire partie d'un projet oeuvrant pour les communs</li> + <li> transmettre massivement Communecter </li> + <li> oeuvrer au bien commun</li> + <li> transmettre les valeurs de la transparence et du partage </li> + <li> agir, participer à gérer mon territoire</li> + <li> préparer plusieurs apéro citoyen (45min) pour présenter l'outil </li> + <li> participer activement à relayer massivement la campagne de crowdfunding</li> + </ul> + <ul> + Je suis communecteur quand je crois à : + <li> un nouvel outil pour de nouveaux usages</li> + <li> la valeur par l'usage et plus à celui d'un prix</li> + <li> l'open-source et à l'open-data</li> + <li> et qu'il est temps de changer de présentatrice météo et d'actu !!</li> + </ul> + <ul> + Bref, être un Communecteur, c'est tout ça à la fois. C'est quelqu'un de vraiment actif, qui est prêt à s'engager, à relayer activement et durant toute sa durée la campagne de crowdfunding, à nous aider et qui croit à 100% à notre projet ! + </ul> + </div> + </div> + + <div class="explainOpenAtlas <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">L'association Open Atlas</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Communecter est un projet actuellement porté par l’association Open Atlas mais dont les racines se trouvent dans une quinzaine d’années d'expérimentations, d’essais, de pertes de motivation, d’espoirs retrouvés, de rencontres, d’amitiés et d'innovation permanente pour l’ensemble des acteurs qui ont rejoint peu à peu l’aventure jusqu’à aujourd’hui.</li> + + <li><b>Depuis sa création en 2008</b>, l'association Open Atlas travaille sur des projets liés aux biens communs, à la cartographie et à la démocratie participative. C’est une association locale qui oeuvre au développement territorial à La Réunion. </li> + <li>2002 - Application et Site web Open Atlas - projet open source de Service Géolocalisé réalisé par 3 développeurs à Limoges dans le cadre d’un incubateur. </li> + + <li><b>2008 - Association Open Atlas</b> - création de l’association loi 1901 à La Réunion (suite au déménagement du porteur de projet). Son objectif initial était de tester l’outil Open Atlas sur le territoire réunionnais selon un modèle pensé pour être distribué. Malgré un bon démarrage avec quelques milliers d’utilisateurs, le projet s’est essoufflé et l’association s’est tournée vers d’autres activités.</li> + + <li><b>2008 - Worldsouk</b> - projet de E-commerce d’artisanat équitable avec blueistribution du profit pour construire des puits à Madagascar. </li> + + <li><b>2012 - Pixel Humain</b> - Communauté et écosystème de concepteurs et de projets orientés vers l’innovation sociétale, amélioration continue, efficience d’un territoire. Ateliers et boite à outils citoyens</li> + + <li><b>2013 - Ateliers citoyens sur toutes l’île</b>. Expérimentation sur le terrain. Création du Tool Kit Citoyen (boite à outils pour construire des applications Citoyennes). </li> + + <li><b>2014 - FabLab.re</b> - communauté de Fablabeurs dans le sud de la Réunion dont le 1er projet est un réseau Smart Citizen sur le territoire réunionnais, en collaboration avec le FabLab de Barcelone. </li> + + <li><b>2015 - Le Forum des Communs</b> - pendant le Temps des communs, l’association a organiser une journée dédié aux rencontres et présentations d’acteurs et de projets oeuvrant pour le bien commun à la Réunion. </li> + + <li><b>2014-2016 - Communecter - Réseau Social Citoyen Libre</b> pour créer un territoire connecté d’acteurs et d’activité locale.</li> + + <li><b>2016 - Projet de SCIC</b> - Le projet Communecter s’apprête à prendre son envol dans le cadre d’une SCIC. L’objectif est de le sortir du cadre de l’association pour en faire un bien commun.</li> + </ul> + </div> + </div> + + <div class="explainDeveloper <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Developpeurs</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Communecter est autant un projet technique que sociétal. Notre équipe de développeurs s’acharne à constamment améliorer le fonctionnement de la plateforme car les bonnes idées viennent de nombreuses sources et il faut bien leur donner vie, pour continuer à aller plus loin que les idées. Une idée en amène une autre, et chaque développeur amène sa pierre a l’édifice. Donc une bonne équipe soudée et libre porte et transforme les idées d’une communauté riche et diversifiée. C’est un projet Open source, si vous êtes développeur et que vous êtes motivé, vous ne serez pas décu du voyage… on s’amuse sur tous les points : technique, philosophique, libriste… + </ul> + </div> + </div> + + + <div class="explainEditor <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Editeur</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Communecter est un médium qui permet la production et la diffusion de contenus par tous. Ces contenus restent la propriété de chacun. Certains contributeurs (individuels ou collectifs) peuvent labelliser des contenus afin de leur apporter un crédit supplémentaire. Ils agissent alors en éditeur. + </ul> + </div> + </div> + + <div class="explainDesigner <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Designeurs et Artistes</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>L’image graphique et la créativité artistique contribuent énormément à la bonne communication et à la transmission des valeurs que porte le projet. Les graphistes et Animateurs vidéo font un super travail de traduction de l’émotion que veut transmettre Communecter.</li> + <li>Nous adorons les contributions artistiques : poster, slogan, chanson, idée farfelue, tableau, sculpture… Vous serez toujours accueillit avec beaucoup d’admiration. Venez nous challenger vous ne serez pas décu, y’aura du répondant !!!</li> + </ul> + </div> + </div> + + <div class="explainContributor <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Contributeur</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Les contributions sont nombreuses dans tous les domaines mentoring, conseil, montage de dossier, créateur de liens, financier, communication, supporters, contributeur d’idée…. + N’hésitez pas si le projet vous intéresse et que vous avez de l’énergie à transmettre, elle sera utilisée pour le bien commun. Les contributions seront prises en compte à l’aide de matrices de richesses. Ce dispositif permettra de valoriser les contributions dont la communauté reconnait la valeur. + </ul> + </div> + </div> + + <div class="explainCommunectorDocs <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Boite à Outil Communecteur</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Nos outils de communication interne + <ul> + <li><i class="fa fa-angle-right"></i> <a href="https://gitter.im/pixelhumain/pixelhumain" target="_blank">Mur de discussion</a></li> + <li><i class="fa fa-angle-right"></i> <a href="https://www.loomio.org/g/vdaxhNF4/pixelhumain" target="_blank">Notre Loomio</a></li> + </ul> + Nos documentations, présentations + <ul> + <li><i class="fa fa-angle-right"></i> <a href="https://www.communecter.org/doc/Communecter - Plaquette Offre Services.pdf" target="_blank">Communecter - Plaquette Offre Services</a></li> + <li><i class="fa fa-angle-right"></i> <a href="https://www.communecter.org/doc/PreÌsentation Courte de Communecter - OPEN ATLAS.pdf" target="_blank">PreÌsentation Courte de Communecter - OPEN ATLAS</a></li> + <li><i class="fa fa-angle-right"></i> <a href="https://www.communecter.org/doc/PreÌsentation de Communecter - OPEN ATLAS.pdf" target="_blank">PreÌsentation de Communecter - OPEN ATLAS</a></li> + </ul> + Nos vidéos + <ul> + <li><i class="fa fa-angle-right"></i> <a href="https://vimeo.com/133636468" target="_blank">Communecter</a></li> + <li><i class="fa fa-angle-right"></i> <a href="https://vimeo.com/74212373" target="_blank">La philosophie Pixel Humain</a></li> + <li><i class="fa fa-angle-right"></i> <a href="https://vimeo.com/147290335" target="_blank">Loca’Terre - Communectez-vous !</a></li> + </ul> + </ul> + </div> + </div> + + <div class="explainMOAC <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">M.O.A.C<br/>Massifs Offline ou Online Apéros Citoyens</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Pourquoi ne pas mélanger le plaisir et la citoyeneté</li> + <li></li> + </ul> + </div> + </div> + + <div class="explainCrowdfundingLetters <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">CrowdFunding letter Collection</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </ul> + </div> + </div> + + <div class="explainGamification <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle"> Gamification (ou ludification) Citoyenne </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Dans Communecter on comptabilise la valeur par l'usage. Celle-ci est calculée par rapport à chaque lien de chaque individu fait avec des personnes, organisations, événements, projets. Pour résumer, la valeur calculée par les liens que vous avez avec votre environnement permet de pondérer votre activité locale. Plus tard viendront s'ajouter la qualité de vos posts, le nombre de votes et de contributions au système et donc à votre société locale. + </ul> + </div> + </div> + + <div class="explainPixelHumain <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue">Pixel Humain</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, + quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse + cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non + proident, sunt in culpa qui officia deserunt mollit anim id est laborum. + </ul> + </div> + </div> + + <div class="explainBeta <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Version Béta</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Les fonctionalités prinicipales fonctionnent</li> + <li>Si vous trouvez des bugs, transmettez les nous</li> + <li>On fait tout pour améliorer la plateforme </li> + <li>Et aprés on fait quoi ? <a href="javascript:;" data-id="explainRoadMap" class="explainLink text-red">Roadmap</a></li> + </ul> + </div> + </div> + + <div class="explainRoadMap <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle blue"> <i class="fa fa-sitemap"></i> Roadmap</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + La road map définit la liste des fonctionnalités qui vont être développées dans les futures versions. Comme dans tout projet open source, elle est mouvante et s'adapte au contexte et à la demande de la communauté. + + <div class="col-sm-6"> + version 0.14 ??? + <ul> + <li><i class="fa fa-angle-right"></i>Full mobile sur meteor</li> + <li><i class="fa fa-angle-right"></i>flux RSS et ESS</li> + <li><i class="fa fa-angle-right"></i>Interoperabilité : connecter l'instance Communecté avec Granddir</li> + <li><i class="fa fa-angle-right"></i>Scope quartier pour les communes inscrites</li> + <li><i class="fa fa-angle-right"></i>Système Module Tiers : ex CommuNacelle (Communecter épuré ou en meteor à voir)</li> + <li><i class="fa fa-angle-right"></i>Besoin et Compétence </li> + <li><i class="fa fa-angle-right"></i>Messagerie privé</li> + <li><i class="fa fa-angle-right"></i> subscribe to a tag on news</li> + <li><i class="fa fa-angle-right"></i> ouverture international </li> + <li><i class="fa fa-angle-right"></i> multi scope</li> + <li><i class="fa fa-angle-right"></i> refactor full text search </li> + </ul> + </div> + + <div class="col-sm-6"> + version 0.13 + <ul> + <li><i class="fa fa-angle-right"></i>event refactor </li> + <li><i class="fa fa-angle-right"></i> no organiser : if you just want to share an event you're not organising </li> + <li><i class="fa fa-angle-right"></i> added subevents : if an event has a program with multiple sub events</li> + <li><i class="fa fa-angle-right"></i> open edition sur event</li> + <li><i class="fa fa-angle-right"></i>refactor city chooser </li> + <li><i class="fa fa-angle-right"></i>delete and update comments</li> + </ul> + </div> + + <div class="col-sm-6"> + version 0.12 + <ul> + <li><i class="fa fa-angle-right"></i>amélioration du systeme validation </li> + <li><i class="fa fa-angle-right"></i>refactor et ajout des images sur les news</li> + <li><i class="fa fa-angle-right"></i>réintégration du module de vite et de discussion</li> + <li><i class="fa fa-angle-right"></i>module network , communecter en marque blanche </li> + <li><i class="fa fa-angle-right"></i>refactor de la structure des cities et des codepostaux</li> + <li><i class="fa fa-angle-right"></i>intégration de divers de data , makery, bretagne Telecom, commun59, service public</li> + <li><i class="fa fa-angle-right"></i>système et admin de modération</li> + <li><i class="fa fa-angle-right"></i>refonte et design de mail </li> + <li><i class="fa fa-angle-right"></i>gamification avec les actions</li> + </ul> + </div> + + <div class="col-sm-6"> + version 0.1 + <ul> + <li><i class="fa fa-angle-right"></i>Ajouter des citoyens, des organisations, des projets et des événements</li> + <li><i class="fa fa-angle-right"></i>Annuaire Personnel</li> + <li><i class="fa fa-angle-right"></i>Double Design : Web + Cartographique</li> + <li><i class="fa fa-angle-right"></i>Prototype Mobile Meteor</li> + <li><i class="fa fa-angle-right"></i>Page Ma Ville simple en mode annuaire local</li> + <li><i class="fa fa-angle-right"></i>Mur d'actualité pour toutes les entités</li> + <li><i class="fa fa-angle-right"></i>Système de notification</li> + <li><i class="fa fa-angle-right"></i>Viralité : connection avec GMail contacts, import CSV (invités, membres, contributeurs)</li> + </ul> + </div> + </div> + </div> + + <div class="explainODB <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle"> ODB : Open dataBase</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Le projet communecter est totalement open source , mais surtout un concept de base donnée partagé, multi acteur, qu’on appelle une base de donnée en commun, C’est l’O.D.B : l’Open Database a laquelle plusieurs acteurs contribue et l’utilise directement via une API libre. </li> + + <li>à terme, l’ODB suivra un modèle distribué, les résultat de requète seront construits dynamiquement et agrégés de multiples source. </li> + + <li>Un peu a l’image de Wikipedia, dans Communecter le partage est dans le contenu. Une communauté (CEDRIC, buildingCommons, Le Cosystème, Synergie Numérique,… ) d’acteurs embrasse le faire ensemble pour le bien commun, rendre intéroperable et massivement distribuées les informations d’intérêt général pour accompagner les transitions (écologique, démocratique, économique,pédagaogique….). Communecter s’inscrit depuis toujours dans cette dynamique de décloisonnement des frontière créer par certains silos du web actuel, pour construire un web ouvert , sémantique, distribué et interopérant.</li> + + <li> + L’ouverture de la base de donnée n’est pas un dogme. Communecter est conçu afin de permettre à chacun de faire ses choix en conscience. Il peut donc aussi y avoir des instances qui choisissent de ne pas utiliser l’ODB tout en utilisant les interfaces. Elle produit alors une NotODB, une instance indépendante de la donnée, régit par les règles de son choix, en mode “siloâ€, ou juste une autonomie indépendante de l’ODB.</li> + <li>Nous gardons ainsi la porte de tous les possibles grande ouverte avec une jolie structure de participation et de partage massif </li> + </ul> + </div> + </div> + + <div class="explainTransition <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Transition</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Récemment plusieurs gares ont vu plusieurs trains de la transition partir dans différentes directions.</li> + <li>Pour chacun de ces trains le chemin est plus ou moins long...</li> + <li>Le plus dur est de choisir comment on se place par rapport à tous ces trains :</li> + <li>Etre simple spectateur qui regardera les trains passer ;</li> + <li>Etre celui qui tente tout pour prendre le train en route ;</li> + <li>Rester assis dans le train et se laisser porter ;</li> + <li>Etre dans le train et courir pour atteindre le conducteur ;</li> + <li>Etre un conducteur de train ;</li> + <li>Passer d’un train à l’autre pour goûter à tout.</li> + <li>Ce qui est sûr c’est qu’il y a du mouvement dans l’air, la transition est en cours...</li> + </ul> + </div> + </div> + + <div class="explainYourData <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Vos Données</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Elles restent votre propriété. Elles ne sont utilisées en aucun pour des fins commerciales ou pour vous afficher de la publicité ciblée. Les données personnelles peuvent être configurées dans votre profil pour qu'elles ne soient pas visible de tous. A tout moment vous pouvez nous contacter pour les supprimer</li> + <li>Le réseau Communecter marche sur un critère de localité. Pour vous donner une vision de tous les acteurs locaux, autour de chez vous.</li> + <li>L'outil a donc besoin de vos coordonnées géographiques pour vous permettre d'exploiter tout son potentiel</li> + </ul> + </div> + </div> + + <div class="explainSurveys <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Sondage, Propositions</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li>Les salles d'action permettent de créer 3 types d'espaces pour le moment : </li> + <li><b>Les Salles de Discussion</b> qui servent à construire et à partager autour d'une thématique</li> + <li><b>Les Salles de Décisions</b> ou Votes qui permettent de faire des propositions et de les partager avec une communauté pour prendre des décisions + <ul> + <li>C'est un votation à 5 choix : </li> + <li>Voter "Pour" : Assez Explicite</li> + <li>Voter "Amender" : La base est bonne mais il faut encore corriger, améliorer, la rendre meilleure.</li> + <li>Voter "Blanc" : Je suis ni pour ni contre</li> + <li>Voter "Incomplet" : il manque des elements pour prendre une réélle décision</li> + <li>Voter "Contre" : Assez Explicite</li> + </ul> + </li> + <li><b>Les Salles d'Actions</b> qui permettent de faire des listes pour agir + <ul> + <li>une action peut avoir 5 états différents : </li> + <li>"A Faire" : aucune date de début n'a été assigné</li> + <li>"En cours" : une date de début, et une personne est assignée</li> + <li>"En retard": la date de fin est assigné mais dépassé.</li> + <li>"Terminer" : une tache qui a été cloturé</li> + <li>"Non Assignée" : une tache qui n'a pas encore de responsable </li> + </ul> + </li> + </ul> + </div> + </div> + + <div class="explainActions <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">Actions</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + <li><b>Les Salles d'Actions</b> qui permettent de faire des listes pour agir + <ul> + <li>une action peut avoir 5 états différents : </li> + <li>"A Faire" : aucune date de début n'a été assigné</li> + <li>"En cours" : une date de début, et une personne est assignée</li> + <li>"En retard": la date de fin est assigné mais dépassé.</li> + <li>"Terminer" : une tache qui a été cloturé</li> + <li>"Non Assignée" : une tache qui n'a pas encore de responsable </li> + </ul> + </li> + + </ul> + </div> + </div> + + <div class="qrCodeExplain <?php echo $class?> col-xs-4"> + <h1 class="homestead explainTitle">QR CODES</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <ul> + + <li>La création de lien simplifié</li> + <li>Imprimer votre QR Code pour vous connecter dans le reel </li> + <li>avec l'application <a href="https://play.google.com/store/apps/details?id=org.communevent.meteor.pixelhumain&ah=lVN3mXqHKQjIOg3qHn0YzhiUebc&hl=fr" target="_blank">communEvent</a></li> + <li><b>Pour les personnes</b> + <ul> + <li>porter sur vous un système de création de lien</li> + <li>ne perdez jamais une occasion pour créer un lien lors d'une rencontre</li> + <li>vous croisez une organisation, avec un QR, connectez vous directement pour suivre son activité</li> + </ul> + </li> + <li><b>Pour les organisations</b> + <ul> + <li>Afficher le dans vos locaux ou documents, les gens pourront alors se connecter automatiquement à vous</li> + <li>les plus facilement vous suivre</li> + <li>Rien de mieux comme communication que d'etre dans les réseaux des gens qui vous soutiennent </li> + </ul> + </li> + <li><b>Pour vos évennements</b> + <ul> + <li>transmettez sur vos documents de communication</li> + <li> les gens pourront rejoindre l'event</li> + <li>retrouver les autres participants</li> + <li>viraliser le système d'invitation</li> + <li>si nécessaire, émargé les présences lors de l'event</li> + </ul> + </li> + + + </ul> + </div> + </div> + + diff --git a/views/docs/panels/help.php b/views/docs/panels/help.php new file mode 100755 index 0000000000000000000000000000000000000000..ea6b3eca5c8e5dce5ad5fc77b0b1d54826002215 --- /dev/null +++ b/views/docs/panels/help.php @@ -0,0 +1,82 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <i class='fa fa-support fa-3x '></i> <span style="font-size: 48px">HELP</span></span> +</div> +<div class="space20"></div> +<div class="keywordList"></div> +<style type="text/css"> + .list { + list-style: none; + } + .list li{ + float:left; + padding-left: 15px; + font-weight: bold; + padding: 7px; + border: 1px solid white; + } +</style> +<script type="text/javascript"> +var keywords = [ + { + "icon" : "fa-support", + "title":"I NEED SOME HELP", + "body":"<a class='btn btn-default text-dark bold' href='' >CONTACT US ANY TIME</a>" + }, + { + "icon" : "fa-smile-o", + "title":"I WANNA HELP YOU", + "body":"<a class='btn btn-default text-dark bold' href='' >HELP US BUILD A BETTER PLACE</a>" + }, + { + "icon" : "fa-hand-o-up", + "title":"GET INVOLVED", + "body":"All sorts of tasks : <br/>"+ + "<ul class='list'><li> DEVS </li>"+ + "<li> ARTISTS : design, write a song, write for change</li>"+ + "<li> COMMUNICATION </li>"+ + "<li> COMMONERS</li>"+ + "<li> JURISTS</li>"+ + "<li> BUILDERS</li>"+ + "<li> THINKERS</li>"+ + "<li> FINANCERS</li>"+ + "<li> BUILDERS</li>"+ + "<li> ARCHITECTS</li>"+ + "<li> CONNECTORS</li>"+ + "<li> INVENTORS</li>"+ + "<li> TRAVELLERS</li>"+ + "<li> MAKERS</li>"+ + "</ul>" + }, + { + "icon" : "fa-users", + "title":"MEETUP SESSIONS", + "body":"Different sessions for different things : <br/>"+ + "We meet up on skype or Hangout <br/>"+ + "<ul><li>Scrum dev sessions : daylee</li>"+ + "<li>Sessions for all : every 15j to talk globally about the project</li>"+ + "<li>Demo session : specific sub milestones</li>"+ + "</ul>" + }, +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + var icon = (obj.icon) ? obj.icon : "fa-tag" ; + var color = (obj.color) ? obj.color : "#E33551" ; + var body = (obj.body) ? obj.body : null ; + var str = '<div class="col-md-6 col-sm-12 "><div class="panel bg-dark text-white ">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' fa-2x"></i> <span style="font-size: 35px; "><br/>'+obj.title+'</span></span>'+ + '</div>'; + if(body) + str += '<div class="panel-body ">'+body+"</div>"+ + "</div></div>"; + $(".keywordList").append(str); + }); +}); + +</script> + diff --git a/views/docs/panels/history.php b/views/docs/panels/history.php new file mode 100755 index 0000000000000000000000000000000000000000..e6b0745a03a31effc95527301585ad79231b5546 --- /dev/null +++ b/views/docs/panels/history.php @@ -0,0 +1,148 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <i class='fa fa-clock-o faa-pulse animated fa-3x '></i> <span style="font-size: 48px">WHERE WE'RE GOING</span></span> +</div> +<div class="space20"></div> +<div class="keywordList bgcity"></div> + +<script type="text/javascript"> + +var keywords = [ + { + "icon" : "fa-download", + "title":"Prod Re Design CO2", + "date" : "may - 2017" + }, + { + "icon" : "fa-calendar", + "title":"Biénale du design", + "date" : "march - 2017", + "body":"Meetup OpenFactory - La Myne" + }, + { + "icon" : "fa-calendar", + "title":"Open Gov Paris & Réunion", + "date" : "9 december - 2016" + }, + { + "icon" : "fa-calendar", + "title":"Alternatiba Péi", + "date" : "december - 2016" + }, + { + "icon" : "fa-download", + "title":"Prod Re Design by Nuit Debout Specs", + "date" : "november - 2016" + }, + { + "icon" : "fa-download", + "title":"Beta Prod Opening", + "date" : "july - 2016" + }, + { + "icon" : "fa-child", + "title":"ALPHA OPENING", + "date" : "febuary - 2016" + }, + { + "icon" : "fa-money", + "title":"OPEN DATA PLATEFORM SUBSUDY", + "date" : "july - 2015" + }, + { + "icon" : "fa-video-camera", + "title":"COMMUNECTER TRAILER", + "date" : "july - 2015" + }, + { + "icon" : "fa-truck", + "title":"FINISHED INCUBATION", + "date" : "june - 2015", + "body":"..." + }, + { + "icon" : "fa-cogs", + "title":"FULL TIME DEVELOPMENT", + "date" : "march - 2015", + "body":"..." + }, + { + "icon" : "fa-money", + "title":"REUNION REGION SUBSUDY", + "date" : "january - 2015", + "body":"..." + }, + { + "icon" : "fa-money", + "title":"FIRST PRODUCT ORDER ON PLATEFORM", + "date" : "september - 2014", + "body":"..." + }, + { + "icon" : "fa-thumbs-o-up", + "title":"PROJECT SELECTED FOR INCUBATION", + "date" : "june - 2013", + "body":"..." + }, + { + "icon" : "fa-video-camera", + "title":"PIXEL HUMAIN TRAILER", + "date" : "mars - 2014", + "body":"..." + }, + { + "icon" : "fa-cogs", + "title":"PROTOTYPING", + "date" : "feb - 2013", + "body":"..." + }, + { + "icon" : "fa-euro", + "title":"SEARCHING FUNDING", + "date" : "feb - 2013", + "body":"..." + }, + { + "icon" : "fa-users", + "title":"GETTING TOGETHER : START UP WEEK END 2012", + "date" : "oct - 2012", + "body":"..." + }, + { + "icon" : "fa-lightbulb-o", + "title":"JUST AN IDEA", + "date" : "2011", + "body":"..." + }, + { + "icon" : "fa-globe", + "title":"OPEN ATLAS", + "date" : "2006", + "body":"..." + }, + +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-sm-12"><div class="panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' faa-pulse animated-hover fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> '+obj.title.toUpperCase()+'</span></span>'+ + '<br/>'+obj.date+ + '</div>'+ + /*'<div class="panel-body">'+ + '<blockquote class="space20">'+ + obj.body+ + "</blockquote>"+ + "</div>"+*/ + "</div></div>"); + }); +}); + +</script> \ No newline at end of file diff --git a/views/docs/panels/keywords.php b/views/docs/panels/keywords.php new file mode 100755 index 0000000000000000000000000000000000000000..f17e709f83b0362be6e167bf16ee91b30c379606 --- /dev/null +++ b/views/docs/panels/keywords.php @@ -0,0 +1,129 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-cube faa-pulse animated fa-3x '></i> <span style="font-size: 48px">KEY CONCEPTS</span></span> +</div> +<div class="space20"></div> +<div class="keywordList"></div> + +<style type="text/css"> + .keypan{ + height: 300px; + border: 1px solid #ddd + } +</style> +<script type="text/javascript"> + +var keywords = [ + + { + "icon" : "fa-circle-o", + "title":"Territoire Connecté", + "body":"Terre de tradition adaptée aux échanges par les flux immatériel numériques et/ou matériels (aéroports, ports, gares, réseaux routiers) apportant à toute personne habitant ce territoire, même isolé, une capacité à établir des liens internationaux.." + }, + { + "icon" : "fa-cubes", + "title":"OpenData", + "body":"Domaine de la liberté de l’information au service du bien commun comprenant des publications ou dossiers d’intérêt général en libre accès et réutilisables par tous." + }, + { + "icon" : "fa-linux", + "title":"OpenSource", + "body":"Domaine des sources logicielles en accès libre permettant, d’une part, la libre utilisation du logiciel concerné et ses dérivés, d’autre part, les échanges amenant à l’optimisation ou le développement commun du produit utilisé avec ses concepteurs toujours mentionnés." + }, + { + "icon" : "fa-book", + "title":"Code Logiciel", + "body":"Appelé aussi Code Source, c’est une suite d’instructions sous forme de texte exploité/transformé en langage de programmation permettant l’utilisation du logiciel." + }, + { + "icon" : "fa-map-marker", + "title":"Cartographie de réseau", + "body":"Logiciel de mise en liens graphiques d’une complexité de données d’origines diverses permettant d’appréhender un ensemble par la visualisation, de faire apparaître des données cachées, mais aussi de procéder à des analyses fines, ou de compléter des statistiques." + }, + { + "icon" : "fa-share-alt-square", + "title":"Proxicité : capacité à créer du lien", + "body":"Développer des services de proximité par liens d’affinités, de compétences, de complémentarités, d’intérêts ou de valeurs communs." + }, + { + "icon" : "fa-user", + "title":"Acteurs locaux", + "body":"Institutions, organisations, entreprises, associations, citoyens dont le rôle social, économique ou politique leur confère une responsabilité pour intervenir dans la gestion du territoire." + }, + { + "icon" : "fa-group", + "title":"Vivre ensemble", + "body":"Espace virtuel/matériel de rencontre incluant un comportement éthique appelant le respect mutuel, la tolérance, l’inclusion, l’ouverture, permettant l’expression d’un lien social riche et harmonieux projetant ceux qui y adhèrent vers une construction positive." + }, + { + "icon" : "fa-sun-o", + "title":"Economie collaborative", + "body":"Activité citoyenne permettant de produire de la valeur, des produits éco-conçus, des richesses immatérielles et réalisées dans le cadre de nouvelles méthodes transversales et en réseaux avec une mutualisation des biens, espaces et outils." + }, + { + "icon" : "fa-legal", + "title":"Transition", + "body":"Période s’inscrivant dans un temps de changement accompagnée la méthode pour passer d’un système/d’un concept à un autre et permettant sa mise en Å“uvre opérationnelle." + }, + { + "icon" : "fa-smile-o", + "title":"Biens communs", + "body":"Les communs sont des ressources partagées entre une communauté d’utilisateurs qui déterminent eux-mêmes le cadre et les normes régulant la gestion et l’usage de leur ressource."+ + "« Il n’y a pas de commun sans « commoners ». (…) Il n’y a pas de commun sans agir en commun. » New to the Commons ? David Bollier." + }, + { + "icon" : "fa-users", + "title":"Citoyens", + "body":"Personne jouissant des droits civils et politiques du lieu où il vit et décidé à s’impliquer dans la vie de sa cité." + }, + { + "icon" : "fa-cubes", + "title":"Association", + "body":"Convention par laquelle deux ou plusieurs personnes mettent en commun, d'une façon permanente, leurs connaissances, talents, activités dans un but utile à un objectif louable ou à la société, et non commercial." + }, + { + "icon" : "fa-file-text-o", + "title":"La charte collaborative des partenaires", + "body":"Ensemble des règles que des partenaires de la même organisation collaborative doivent observer pour garantir la pérennité de leur projet dans un respect mutuel et au mieux de leurs intérêts communs et personnels." + }, + { + "icon" : "fa-globe", + "title":"Réseau sociétal", + "body":"Maillage de toutes les informations concernant la vie publique, cela concerne tous les participants de la vie civile du citoyen jusqu’à l’organisation de l’Etat." + }, + { + "icon" : "fa-th", + "title":"Citizen Tool Kit", + "body":"Ensemble des outils mis à la disposition des citoyens pour aider à construire/utiliser les réseaux." + }, + { + "icon" : "fa-legal", + "title":"Code Social", + "body":"Ensemble des règles à observer pour permettre une vie sociale respectant les droits civiques." + }, + { + "icon" : "fa-globe", + "title":"Glocal", + "body":"Vision globale de l’action locale / Action simultanée sur un territoire global et local." + } +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-xs-3"><div class="keypan panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' faa-pulse animated-hover fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> <br/>'+obj.title.toUpperCase()+'</span></span>'+ + '</div>'+ + '<div class="panel-body">'+obj.body+"</div>"+ + "</div></div>"); + }); +}); + +</script> + diff --git a/views/docs/panels/kickerFunding.php b/views/docs/panels/kickerFunding.php new file mode 100644 index 0000000000000000000000000000000000000000..b23c1c7580d0b9e4d471a58bee3171619ad1a54e --- /dev/null +++ b/views/docs/panels/kickerFunding.php @@ -0,0 +1,103 @@ +<div class="panel-heading border-light center text-dark partition-white radius-10 " style="margin-bottom:30px;"> + <span class="panel-title homestead text-red " style="font-size: 48px">Aidez la vie d'un communs</span> </span> +</div> + +<style type="text/css"> + .keypane{ + height: 235px; + } +</style> + +<div class="row"> + <div class="col-md-6 col-md-offset-3"> + <div class="col-xs-6 center"> + <a href="https://www.helloasso.com/associations/open-atlas/adhesions/soutenez-et-adherez-a-open-atlas/2?sessionId=dvutjo5jusdgs1cvmmkui4su&widget=False" target="_blank" class="btn btn-default text-red bold"> + <i class="fa fa-heart fa-2x"></i> <span class="text-dark"> Membre ( 1€/mois ) </span> + </a> + </div> + <div class="col-xs-6 center"> + <a href="https://www.helloasso.com/associations/open-atlas/adhesions/soutenez-et-adherez-a-open-atlas/2?sessionId=dvutjo5jusdgs1cvmmkui4su&widget=False" target="_blank" class="btn btn-default text-red bold "> + <i class="fa fa-heart fa-2x"></i> <span class="text-dark"> Sponsor ( 50€/mois ) </span> <i class="fa fa-heart fa-2x"></i> + </a> + </div> + </div> + <div class="alert col-md-6 col-md-offset-3 shadow2 margin-top-10" style=""> + <i class="fa fa-puzzle-piece faa-pulse animated fa-5x padding-10"></i> <i class="fa fa-plus fa-2x padding-10"></i> <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/piggybank.png" height=70> <i class="fa fa-plus fa-2x padding-10"></i> <i class="fa fa-group faa-pulse animated fa-5x padding-10"></i> <span class="bold" style="font-size:40px;">=</span> <i class="fa fa-heartbeat faa-pulse text-red animated fa-5x padding-10"></i> + <br/><br/><h2 style="font-weight:300; margin:-35px 0 0 0;" class="homestead padding-10"> + <span class="text-red"><?php echo Yii::t("loader","1 little coin for a great puzzle") ?></span> + <br/><a href="https://www.helloasso.com/associations/open-atlas/adhesions/soutenez-et-adherez-a-open-atlas" target="_blank" class="text-dark"><?php echo Yii::t("loader","Contribute") ?> <i class="fa fa-arrow-circle-right"></i></a> + </h2> + + <h3 class="text-dark"><?php echo Yii::t("loader","Help us to forward our work") ?>...</h3> + <a href="https://www.helloasso.com/associations/open-atlas/adhesions/soutenez-et-adherez-a-open-atlas" target="_blank" class="btnHelp btn btn-warning margin-top-10 text-dark"> + <i class="fa fa-gift"></i> <?php echo Yii::t("loader","Make a donation to the NGO") ?> + </a> + </div> +</div> + + +<div class="row" id="sitFin"> + <div class="row main-apropos padding-top-15 padding-bottom-50"> + + <div class="col-lg-3 col-md-3 col-sm-4 text-right hidden-xs" id="sub-menu-left"> + </div> + <div class="col-lg-7 col-md-8 col-sm-7 col-xs-12"> + + <h5 class="pull-left"> + <i class="fa fa-angle-down"></i> Situation financière + </h5> + + <br> + <hr> + + <h1 class="text-red homestead" id="koica"> + On reste fragile !!! + </h1> + + <h3 class="text-dark "><i class="fa fa-angle-right"></i> Please help us !</h3> + <p> + Le collectif de développeurs qui s'occupe actuellement de la plateforme a besoin de pouvoir continuer à travailler à plein temps sur ce projet pharaonique. + <br><br> + Impossible pour eux de travailler à mi-temps, et de partager leur travail avec d'autres prestations.<br> + La maintenance, l'amélioration, et le suivi de l'application nécessite une équipe de techniciens compétent qui s'en occupe quotidiennement. + <br><br> + Pour que nos développeurs puissent se consacrer entièrement au projet Communecter, ils ont besoin de votre soutient financier. + <br><br> + Le compte de l'association sont aujourd'hui au plus bas, ce qui laisse entrevoir la possibilité de l'abandon de la plateforme, faute de moyen financier suffisant pour permettre aux développeurs de vivre sans travailler "à côté". + <br><br> + Nous nous en remettons donc à vos dons. + <br><br> + Si vous souhaitez que le réseau Communecter continue à grandir, il ne tient qu'à vous d'apporter votre soutien. Si chacun d'entre vous donne quelques euros, c'est possible ! + + <h3 class="text-dark ">Un projet à long terme</h3> + L'équipe actuelle de développeurs est sur-motivée et souhaite plus que tout continuer son travail.<br> + Elle souhaite également s'agrandir si possible, en intégrant de nouveau développeurs, ou en collaborant avec d'autres équipes afin de développer des applications interropérables.<br><br> + Nous souhaitons également continuer à améliorer l'application Communecter, en rajoutant de nouvelles fonctionnalités. + + <h3 class="text-dark ">Budget annuel : (objectif 2017)</h3> + 6 développeurs à 2000€/mois, pendant 1 an : Pour développer l'application<br> + 6 * 2000 * 12 = <?php $c1 = 6 * 2000 * 12; echo $c1; ?>€ + <br><br> + 6 communecteur à 1000€/mois, pendant 1 an : Pour faire connaitre et comprendre l'application<br> + 6 * 2000 * 12 = <?php $c2 = 6 * 1000 * 12; echo $c2; ?>€ + <br><br> + Charges Technique : BDD, Hebergement<br> + 8000€ + <br><br><br> + Total : <?php echo $c1 + $c2+8000; ?>€ + + <h3 class="text-red ">Budget actuel : (depuis 2015)</h3> + 6 développeurs à 2000€/mois, pendant 1 an : Pour développer l'application<br> + 6 * 1000 * 12 = <?php $c1 = 6 * 1000 * 12; echo $c1; ?>€ + <br><br> + 2 contrats Aidés + 4 services Civiques<br> + 2 * 4000 = <?php $c2 = 2 * 4000; echo $c2; ?>€ + <br><br> + Charges Technique : BDD, Hebergement<br> + 8000€ + <br><br><br> + Total : <?php echo $c1 + $c2+8000; ?>€ + </p> + </div> + </div> +</div> \ No newline at end of file diff --git a/views/docs/panels/mention.php b/views/docs/panels/mention.php new file mode 100755 index 0000000000000000000000000000000000000000..efed58600e3a689764e2e5d471a32c611c892248 --- /dev/null +++ b/views/docs/panels/mention.php @@ -0,0 +1,129 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-gavel faa-pulse animated fa-3x '></i> <span style="font-size: 48px">Mentions Légales</span></span> +</div> +<div class="space20"></div> + +<style> +.main-col-search{ padding:0px !important; } +.fa-caret-down{font-size:56px;line-height: 10px;} +.social-list{ padding: 0;} +.social-list li{ list-style-type: none; display:inline;margin-right:10px;} +.social-list li a{ font-size:20px;} +.social-list .btn{ margin-top: 15px;} +a.btn.btn-social{ color: #FFF; background-color: #2a3945; } +a.btn.btn-social:hover{ background: none;} +a.btn.btn-facebook:hover{ color: #3b5998;} +a.btn.btn-twitter:hover{ color: #00a0d1; border-color: #00a0d1;} +a.btn.btn-google:hover{ color: #dd4b39; border-color: #dd4b39;} +a.btn.btn-github:hover{ color: #4078C0; border-color: #4078C0;} +.yellowph{color:#F6E201;} +.information{font-size:15px;color:#8b91a0;} +.explainTitle{cursor:pointer; background-color: #606060; padding: 10px; text-align: center; color: #fff;margin:0px;border-top: 1px solid #666;} +.explainTitle:hover{opacity: 0.8} +.explainDesc{ padding: 10px; background-color: white; } +.caretExplain{position: relative;top: 0px;background-color: white;color:#606060;} +</style> +<div style="margin-top:60px"> + + <div class="explainDesc"> + Merci de lire avec attentions les différentes modalités d’utilisation du présent site avant d’y parcourir ses pages. En vous connectant sur ce site, vous acceptez sans réserves les présentes modalités. Aussi, conformément de l’Article n°6 de la Loi n°2004-575 du 21 Juin 2004 pour la confiance dans l’économie numérique, les responsables du présent site internet <a href="http://www.communecter.org">www.communecter.org</a> sont : + </div> + + <h1 class="homestead explainTitle"> Editeur du Site </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Association Open Atlas + Numéro de SIRET : 513381830 + Responsable editorial : Tibor Katelbach + 102a rue pierre payet, 97421, La Réunion + Téléphone :0262343686 - Fax : 0262343686 + Email : communecter@gmail.com + Site Web : <a href="http://www.communecter.org">www.communecter.org</a> + </div> + + <h1 class="homestead explainTitle"> Hébergement </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Hébergeur : Amazon , pas pour longtemps , quand on aura le temps on bascule sur IKOULA + California, Usa + Site Web : <a href="http://www.amazon.com">www.amazon.com</a> + </div> + + <h1 class="homestead explainTitle"> Développement </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + collectif d'indépendant O.R.D + Adresse : 102a rue pierre payet, 97421, La Réunion + Site Web : <a href="http://www.oceatoon.com">www.oceatoon.com</a> + </div> + + <h1 class="homestead explainTitle"> Conditions d’utilisation </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Ce site (<a href="http://www.communecter.org">www.communecter.org</a>) est proposé en différents langages web (HTML, HTML5, Javascript, CSS, etc…) pour un meilleur confort d'utilisation et un graphisme plus agréable, nous vous recommandons de recourir à des navigateurs modernes comme Internet explorer, Safari, Firefox, Google Chrome, etc… + + <span style="color: #323333;">Association Open Atlas<b> </b></span>met en Å“uvre tous les moyens dont elle dispose, pour assurer une information fiable et une mise à jour fiable de ses sites internet. Toutefois, des erreurs ou omissions peuvent survenir. L'internaute devra donc s'assurer de l'exactitude des informations auprès de , et signaler toutes modifications du site qu'il jugerait utile. n'est en aucun cas responsable de l'utilisation faite de ces informations, et de tout préjudice direct ou indirect pouvant en découler. + + <b>Cookies</b> : Le site <a href="http://www.communecter.org">www.communecter.org</a> peut-être amené à vous demander l’acceptation des cookies pour des besoins de statistiques et d'affichage. Un cookies est une information déposée sur votre disque dure par le serveur du site que vous visitez. Il contient plusieurs données qui sont stockées sur votre ordinateur dans un simple fichier texte auquel un serveur accède pour lire et enregistrer des informations . Certaines parties de ce site ne peuvent être fonctionnelle sans l’acceptation de cookies. + + <b>Liens hypertextes :</b> Les sites internet de peuvent offrir des liens vers d’autres sites internet ou d’autres ressources disponibles sur Internet. Association Open Atlas ne dispose d'aucun moyen pour contrôler les sites en connexion avec ses sites internet. ne répond pas de la disponibilité de tels sites et sources externes, ni ne la garantit. Elle ne peut être tenue pour responsable de tout dommage, de quelque nature que ce soit, résultant du contenu de ces sites ou sources externes, et notamment des informations, produits ou services qu’ils proposent, ou de tout usage qui peut être fait de ces éléments. Les risques liés à cette utilisation incombent pleinement à l'internaute, qui doit se conformer à leurs conditions d'utilisation. + <br/><br/> + Les utilisateurs, les abonnés et les visiteurs des sites internet de ne peuvent mettre en place un hyperlien en direction de ce site sans l'autorisation expresse et préalable de Association Open Atlas. + <br/><br/> + Dans l'hypothèse où un utilisateur ou visiteur souhaiterait mettre en place un hyperlien en direction d’un des sites internet de Association Open Atlas, il lui appartiendra d'adresser un email accessible sur le site afin de formuler sa demande de mise en place d'un hyperlien. Association Open Atlas se réserve le droit d’accepter ou de refuser un hyperlien sans avoir à en justifier sa décision. + </div> + + <h1 class="homestead explainTitle"> Services fournis </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <p style="color: #323333;">L'ensemble des activités de la société ainsi que ses informations sont présentés sur notre site <a href="http://www.communecter.org">www.communecter.org</a>.</p> + <p style="color: #323333;">Association Open Atlas s’efforce de fournir sur le site www.communecter.org des informations aussi précises que possible. les renseignements figurant sur le site <a href="http://www.communecter.org">www.communecter.org</a> ne sont pas exhaustifs et les photos non contractuelles. Ils sont donnés sous réserve de modifications ayant été apportées depuis leur mise en ligne. Par ailleurs, tous les informations indiquées sur le site www.communecter.org<span style="color: #000000;"><b> </b></span>sont données à titre indicatif, et sont susceptibles de changer ou d’évoluer sans préavis. </p> + </div> + <h1 class="homestead explainTitle"> Hébergement </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <p style="color: #b51a00;"><span style="color: rgb(0, 0, 0);"><b>Limitation contractuelles sur les données : </b></span></p> + Les informations contenues sur ce site sont aussi précises que possibles et le site remis à jour à différentes périodes de l’année, mais peut toutefois contenir des inexactitudes ou des omissions. Si vous constatez une lacune, erreur ou ce qui parait être un dysfonctionnement, merci de bien vouloir le signaler par email, à l’adresse communecter@gmail.com, en décrivant le problème de la manière la plus précise possible (page posant problème, type d’ordinateur et de navigateur utilisé, …). + <br/><br/> + Tout contenu téléchargé se fait aux risques et périls de l'utilisateur et sous sa seule responsabilité. En conséquence, ne saurait être tenu responsable d'un quelconque dommage subi par l'ordinateur de l'utilisateur ou d'une quelconque perte de données consécutives au téléchargement. <span style="color: #323333;">De plus, l’utilisateur du site s’engage à accéder au site en utilisant un matériel récent, ne contenant pas de virus et avec un navigateur de dernière génération mis-à -jour</span> + <br/><br/> + Les liens hypertextes mis en place dans le cadre du présent site internet en direction d'autres ressources présentes sur le réseau Internet ne sauraient engager la responsabilité de Association Open Atlas. + </div> + + <h1 class="homestead explainTitle"> Propriété intellectuelle </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Tout le contenu du présent sur le site <a href="http://www.communecter.org">www.communecter.org</a>, incluant, de façon non limitative, les graphismes, images, textes, vidéos, animations, sons, logos, gifs et icônes ainsi que leur mise en forme sont la propriété exclusive de la société à l'exception des marques, logos ou contenus appartenant à d'autres sociétés partenaires ou auteurs. + <br/><br/> + Toute reproduction, distribution, modification, adaptation, retransmission ou publication, même partielle, de ces différents éléments est strictement interdite sans l'accord exprès par écrit de Association Open Atlas. Cette représentation ou reproduction, par quelque procédé que ce soit, constitue une contrefaçon sanctionnée par les articles L.335-2 et suivants du Code de la propriété intellectuelle. Le non-respect de cette interdiction constitue une contrefaçon pouvant engager la responsabilité civile et pénale du contrefacteur. En outre, les propriétaires des Contenus copiés pourraient intenter une action en justice à votre encontre. + </div> + + <h1 class="homestead explainTitle"> Déclaration à la CNIL </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Conformément à la loi 78-17 du 6 janvier 1978 (modifiée par la loi 2004-801 du 6 août 2004 relative à la protection des personnes physiques à l'égard des traitements de données à caractère personnel) relative à l'informatique, aux fichiers et aux libertés, ce site a fait l'objet d'une déclaration auprès de la Commission nationale de l'informatique et des libertés (<a href="http://www.cnil.fr/">www.cnil.fr</a>). + </div> + + <h1 class="homestead explainTitle"> Litiges </h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + Les présentes conditions du site <a href="http://www.communecter.org">www.communecter.org</a> sont régies par les lois françaises et toute contestation ou litiges qui pourraient naître de l'interprétation ou de l'exécution de celles-ci seront de la compétence exclusive des tribunaux dont dépend le siège social de la société. La langue de référence, pour le règlement de contentieux éventuels, est le français. + </div> + + <h1 class="homestead explainTitle"> Données personnelles</h1> + <center class="caretExplain"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + De manière générale, vous n’êtes pas tenu de nous communiquer vos données personnelles lorsque vous visitez notre site Internet <a href="http://www.communecter.org">www.communecter.org</a>. + <br/><br/> + Cependant, ce principe comporte certaines exceptions. En effet, pour certains services proposés par notre site, vous pouvez être amenés à nous communiquer certaines données telles que : votre nom, votre fonction, le nom de votre société, votre adresse électronique, et votre numéro de téléphone. Tel est le cas lorsque vous remplissez le formulaire qui vous est proposé en ligne, dans la rubrique « contact ». Dans tous les cas, vous pouvez refuser de fournir vos données personnelles. Dans ce cas, vous ne pourrez pas utiliser les services du site, notamment celui de solliciter des renseignements sur notre société, ou de recevoir les lettres d’information. + <br/><br/> + Enfin, nous pouvons collecter de manière automatique certaines informations vous concernant lors d’une simple navigation sur notre site Internet, notamment : des informations concernant l’utilisation de notre site, comme les zones que vous visitez et les services auxquels vous accédez, votre adresse IP, le type de votre navigateur, vos temps d'accès. De telles informations sont utilisées exclusivement à des fins de statistiques internes, de manière à améliorer la qualité des services qui vous sont proposés. Les bases de données sont protégées par les dispositions de la loi du 1er juillet 1998 transposant la directive 96/9 du 11 mars 1996 relative à la protection juridique des bases de données. + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<?php echo Yii::t("common","Terms of Use") ?>",""); +}); +</script> \ No newline at end of file diff --git a/views/docs/panels/menuLink.php b/views/docs/panels/menuLink.php new file mode 100644 index 0000000000000000000000000000000000000000..d1813bccbfb21ab3cd69250a8f8bbb993979136e --- /dev/null +++ b/views/docs/panels/menuLink.php @@ -0,0 +1,3 @@ +<div class="pull-left"> + <a href="<?php echo $url?>" class="text-red lbhp" ><i class='fa fa-bars fa-4x'></i></a> +</div> \ No newline at end of file diff --git a/views/docs/panels/openSourceWeUse.php b/views/docs/panels/openSourceWeUse.php new file mode 100644 index 0000000000000000000000000000000000000000..e943471a914168ab3cae476812438b5a5caa222a --- /dev/null +++ b/views/docs/panels/openSourceWeUse.php @@ -0,0 +1,59 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa text-red fa-heart faa-pulse animated fa-3x '></i> <span style="font-size: 48px">OPEN SOURCE PROJECTS WE LOVE AND USE</span></span> +</div> +<div class="space20"></div> +<div class="keywordList col-xs-12"></div> + +<script type="text/javascript"> + +var keywords = [ +{ + "project" : "Yii PHP Framework", + "url" : "http://www.yiiframework.com", + "comment" : "Yii is a high-performance PHP framework best for developing Web 2.0 applications Yii comes with rich features: MVC, DAO/ActiveRecord, I18N/L10N, caching, authentication and role-based access control, scaffolding, testing, etc. It can reduce your development time significantly.", + "image" : "https://www.javatpoint.com/yii/images/yii-framework.jpg" + }, + { + "project" : "Mongo DB", + "url" : "https://www.mongodb.com/fr", + "comment" : "Réinventons la gestion de l’information, Devenez plus rapide et évolutif grâce à MongoDB, la première base de données NoSQL", + "image" : "https://webassets.mongodb.com/_com_assets/cms/MongoDB-Logo-5c3a7405a85675366beb3a5ec4c032348c390b3f142f5e6dddf1d78e2df5cb5c.png" + }, + { + "project" : "JQuery", + "url" : "https://jquery.com/", + "comment" : "jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers. With a combination of versatility and extensibility, jQuery has changed the way that millions of people write JavaScript.", + "image" : "https://blog.netapsys.fr/wp-content/uploads/2016/07/jquery.gif" + }, + { + "project" : "Bootstrap", + "url" : "http://getbootstrap.com/", + "comment" : "Build responsive, mobile-first projects on the web with the world's most popular front-end component library.Bootstrap is an open source toolkit for developing with HTML, CSS, and JS. Quickly prototype your ideas or build your entire app with our Sass variables and mixins, responsive grid system, extensive prebuilt components, and powerful plugins built on jQuery.", + "image" : "http://getbootstrap.com/assets/img/bootstrap-stack.png" + }, + + + +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-xs-3"><div class="keypan panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title ">'+ + '<img class="img-circle" width="50" height="50" src="'+obj.image+'"/> '+ + '<a href="'+obj.url+'" target="_blank" style="font-size: 18px; "><br/>'+obj.project.toUpperCase()+'</a>'+ + '<span style="font-size: 14px; "><br/>'+obj.comment+'</span>'+ + '</span>'+ + '</div></div></div>'); + }); +}); + +</script> + diff --git a/views/docs/panels/openatlas.php b/views/docs/panels/openatlas.php new file mode 100644 index 0000000000000000000000000000000000000000..90382ba734a8aa34d0bb46ad50cd8d3d9cb50ede --- /dev/null +++ b/views/docs/panels/openatlas.php @@ -0,0 +1,182 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-users faa-pulse animated fa-3x '></i> <span style="font-size: 48px">Association <span class="text-red">Open Atlas</span></span></span> +</div> + +<div style="text-align: left;padding:15px; font-size: 20px"> + + <br><br> + L'association Open Atlas est un espace multidisciplinaire d'échanges permettant de développer des projets dans des domaines de l’intérêt général, notamment autour de l’économie de l’information et de la communication. + <br>Intérêt social et solidaire, l’association s’intéresse à tous les territoires, du local à + l’international et oeuvre, en toute diversité, dans les champs du développement humanitaire, culturel, artistique et de la communication. L’association se donne également pour objectif d’être un laboratoire et une cellule active de recherche et de développement, défendant le décloisonnement et le partage des compétences, ainsi que la liberté de penser et d’agir. + <br><br> + L'association promeut l’action, l’intelligence collective et l’initiative citoyenne. Elle milite pour + la conjugaison de l’éthique et de l’efficacité, autour de l’économie numérique dans le + principe du développement soutenable, durable et solidaire. + <br><br> + L’association agit sous la gouvernance d’un Conseil d’Administration composé de : + <br>Luc Lavielle (Président) Gilles Guillon (Secrétaire) Pierre Magnin (Trésorière) Fabien Matha , Julien Matha + <br>en 2017, s'organisera une restructuration de la gouvernance en conseil collégial. + <br><br> + Au quotidien, Open Atlas fonctionne grâce à la présence permanente des développeurs, des commoners, et des acteurs sur le terrain, le meilleur moyen de les contacter est <a href="chat.lescommuns.org" target="_blank">ici</a> . + <br>Numéro siret : 513 381 830 00019 +</div> + + +<div class="space20"></div> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead "> <i class='text-red fa fa-search faa-pulse animated fa-3x '></i> <span style="font-size: 48px"><span class="text-red">CO</span>.R.D</span> </span> +</div> +<div style="text-align: left;padding:15px;font-size: 20px"> +Le collectif informel C.O.R.D (CO & Open R&D), une future SCIC, regroupe des acteurs du numérique (web, mobile, design, objets connectés). Elle est spécialisée dans les modes de communication innovants et défend depuis toujours l’innovation et la philosophie Open Source comme vecteurs de Collaboration Massive. +<br><br> +CORD regroupe une communauté de talents et d'expertises, bénéficiant de retours d’expérience éprouvés. Son objet est d'accompagner les entreprises et associations dans leur démarche d'innovation. Un clusters dédié à la recherche et au développement sous une forme décentralisé. + <br><br> +Nous offrons une gamme de produits et services à forte valeur ajoutée : +<br>Développement de solutions numériques +<br>Création Graphique (logo, direction artistique) +<br>Développement de Hardware (Arduino, capteurs, imprimante 3D…) +<br>Barcamp / Atelier collaboratif + créatif (Brainstorming, Serious game, Hackathon…) +<br>Formations : outils collaboratifs, organisation projet, développement web, design… +<br>Hébergement (hosting cloud ou dédié) +<br>Animation Vidéo (design, motion...) +<br>E-commerce +<br>Installation et animation digitale (design intéractif) +<br>Conseil et Think Tank innovation +<br>Cartographie (SIG : Système d’information géographique) + <br><br> +CORD promeut l’intelligence collective et l’initiative citoyenne en militant pour la conjugaison de l’éthique et de l’efficacité, autour de l’économie numérique et en oeuvrant dans le principe de développement soutenable, durable et solidaire. +</div> + +<div class="space20"></div> + +<style type="text/css"> + .keypane{ + height: 325px; + text-align: left + } +</style> + + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='text-red fa fa-lightbulb-o faa-pulse animated fa-3x '></i> <span style="font-size: 48px">PROJETS</span></span> +</div> +<div class="space20"></div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-cube"></i> PIXEL HUMAIN </h1> + <div> + Un collectif d'acteurs oeuvrant pour les communs + <br>l'ancien nom de communecter + <br>Innovation au service des biens communs + <br><u><a class="text-white" href="#" onclick="toastr.error('TODO : ajax form load form')"><i class="fa fa-mail"></i> Contact Us </a> </u> + <br>Respectant un CODE SOCIAL ET LOGICIEL ouvert + <br>Open Source, Semantique et Interopérable + <br>Le Lien entre le réél et le virtuel + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" height=50> Communecter </h1> + <div> + Un Réseau Sociétale Libre et Open Source + <br>un dispositif de réseau sociétal local catalyseur d'une synergie régionale, collective et solidaire reliant tous types d’acteurs (Entreprises, Associations, Collectivités et citoyens), tous domaines et objectifs confondus. + <br>La plateforme est un service d'aide à la population pour améliorer la valorisation des acteurs locaux pour produire un térritoire connecté. + <br>Un outil de communication entre citoyens et collectivités. + <br>Un outil de production et de visualisation d'open data pour mieux analyser et décider sur un térritoire. + <br>Une boite outil citoyenne pour encourager , faciliter et dynamiser l'implication citoyenne. + <br>le CTK : Citizen Tool Kit , Un socle technique et modulaire pour construire toutes sorte d'outils citoyens et administratifs spécialisés + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-map-marker"></i> Network <br>Marque Blanche </h1> + <div> + Une Interface et Cartographie + <br>Configurable + <br>Filtrable + <br>R&D : sans base de donnée + <br>Contributive + <br><a class="btn btn-default btn-sm" href="https://www.communecter.org/?network=BretagneTelecom" target="_blank">Exemple : Bretagne Telecom</a> + <br><a class="btn btn-default btn-sm" href="https://chat.lescommuns.org/channel/marqueblanche" target="_blank">En savoir plus </a> + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-wifi"></i> Smarterre</h1> + <div> + Apporter de la croissance aux organisations locales avec une vision humaine, intégrer un projet de société locale pour les générations futures qui prend en compte l’obsolescence et la finitude des ressources + <br><a class="btn btn-default btn-sm" href="https://github.com/pixelhumain/smarterre" target="_blank">En savoir plus </a> + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-cogs"></i> FABLAB.re</h1> + <div> + Fablab de bidouilleurs réunionais qui auront bientot un bus et un tiers lieux + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-connectdevelop"></i> Open Système </h1> + <div> + Expérimentation de gouvernance totalement horizontale + <br>Opensource + <br>Conseil Collégiale + <br><a class="btn btn-default btn-sm" href="https://chat.lescommuns.org/channel/marqueblanche" target="_blank">En savoir plus </a> + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-bus"></i> CO BUS </h1> + <div> + Un bus itinérant Communecté + <br>sponsorisé par l'AFNIC + <br>rempli d'electronique + <br>autonome energiquement + <br>pour agir dans les zones prioritaires et déconnecté + <br><a class="btn btn-default btn-sm" href="https://chat.lescommuns.org/channel/co_bus" target="_blank">En savoir plus </a> + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-wifi"></i> CO PI </h1> + <div> + CO : Communecter + PI : Raperi Pi + <br>Un serveur Low Tech Communecter + <br>fonctionne offline + <br>sur un modèle distribué, interconnection entre COPI + <br>servant tout les service de CO + <br><a class="btn btn-default btn-sm" href="https://chat.lescommuns.org/channel/copi" target="_blank">En savoir plus </a> + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-cubes"></i> Tiers Lieux <br> Camp TIC</h1> + <div> + Equipement autonome et connecté pour partager l'activité d'un tiers lieux + <br>sponsorisé par l'AFNIC + <br>C'est un valise complète + <br>Connectique réseau internet + <br>Son et Video pour des visios partages + <br>des Agenda partagé entre réseau de tiers lieux + <br>partage de ressources, de besoins, de service et de compétence + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-wifi"></i> FAI Libre Reunion </h1> + <div> + Installation d'un FAI libre Réunionais + <br>sponsorisé par l'AFNIC + </div> +</div> + +<div class="col-xs-4 keypane"> + <h1><i class="text-red fa fa-book"></i> COopedia</h1> + <div> + R&D : Augmenter Wikipedia avec un référencement et une inteorpérabilité avec CO + <br> Terrapedia : wikipedia territorial ouvert et contributif + </div> +</div> \ No newline at end of file diff --git a/views/docs/panels/partners.php b/views/docs/panels/partners.php new file mode 100755 index 0000000000000000000000000000000000000000..45128a66dd716f2f9c60f500e962ee996e2dd356 --- /dev/null +++ b/views/docs/panels/partners.php @@ -0,0 +1,979 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-globe faa-pulse animated fa-3x '></i> <span style="font-size: 48px; ">A NETWORK OF NETWORKS</span></span> + <br/> + People & Organizations get together to build a common + <br/> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('dev');">Devs</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('builder');">BUILDERS</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('partner');">PARTNERS</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('financer');">FINANCERS</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('thinker');">THINKERS</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('crowdfunder');">CROWDFUNDERS</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('interoperate');">Interoperators</a> + <a class="btn btn-default" href="javascript:;" onclick="filterPartners('networkActor');">ALL</a> +</div> + + +<div class="space20"></div> +<span style="font-size: 48px;" class="typeName text-red homestead"></span> +<div class="keywordList"></div> +<style type="text/css"> + + .networkActor{ + height:230px; + border : 1px solid #ccc; + } + .networkActor img{ + height:120px; + } + .networkActor img.avatar{ + position: relative; + top: 5px; + width : 60px; + height : 60px; + } +</style> +<script type="text/javascript"> + +var keywords = [ + /* ************************************** + * + * PARTNERS + * + ***************************************** */ + { + "icon" : "fa-users", + "title": "UNISSONS", + "link" : "http://unisson.co/", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "LIVING.COOP", + "link" : "www.livincoop.fr", + "img" : "http://www.livincoop.fr/beta_1.0/image/logo/logo_LC.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "Asso. Cyberun", + "link" : "http://memoire-numerique.org/lassociation-cyberun/", + "img" : "https://mir-s3-cdn-cf.behance.net/project_modules/disp/4fa8f036958207.57305f4795677.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "Assemblée des communs", + "link" : "http://wiki.lescommuns.org", + "img":"http://storage3.static.itmages.com/i/17/0418/h_1492555108_7807243_9c1f11f280.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "BROWSERSTACK", + "link" : "http://www.browserstak.com/", + "img":"https://www.browserstack.com/images/layout/browserstack-logo-600x315.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "CHEZ NOUS.coop", + "link" : "http://www.cheznous.coop", + "img":"http://cheznous.coop/wp-content/uploads/2015/09/LOGO-CHEZ-NOUS-V1-FINAL-21.jpg", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "FABLAB BARCELONA", + "link" : "http://fablabbcn.org/", + "img" : "http://www.makertour.fr/wp-content/uploads/2016/07/Fablab-Barcelona-Logo.png", + }, + { + "icon" : "fa-users", + "title": "La Myne", + "link" : "http://www.lamyne.org", + "img" : "http://www.lamyne.org/img/lamyne-logo.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "Open Factory 42", + "link" : "www.openfactory42.org", + "img" : "http://www.openfactory42.org/wp-content/uploads/sites/17/2015/03/retina120x70.png", + "class" : "partner" + }, + { + "icon" : "fa-users", + "title": "ASSEMBLEE VIRTUELLE", + "link" : "http://www.virtual-assembly.org/", + "img" :"http://virtual-assembly.org/wp-content/uploads/2016/09/Logo_AV.png", + "class" : "partner" + }, + + /* ************************************** + * + * FINANCERS + * + ***************************************** */ + { + "icon" : "fa-users", + "title": "Assocation Hors Cadre", + "link" : "www.notragora.com", + "class" : "financer" + }, + { + "icon" : "fa-users", + "title": "Bretagne Telecom", + "link" : "www.bretagnetelecom.com", + "class" : "financer" + }, + { + "icon" : "fa-users", + "title": "Web Academie des Camelia", + "link" : "", + "class" : "financer" + }, + { + "icon" : "fa-university", + "title": "AFNIC", + "link" : "www.afnic.fr", + "class" : "financer" + }, + { + "icon" : "fa-university", + "title": "SIDR", + "link" : "www.sidr.fr", + "class" : "financer" + }, + { + "icon" : "fa-university", + "title": "Région Réunion", + "link" : "", + "class" : "financer" + }, + { + "icon" : "fa-university", + "title": "Technopole Réunion", + "link" : "", + "class" : "financer" + }, + { + "icon" : "fa-university", + "title": "GRANDDIR", + "link" : "http://www.granddir.re", + "class" : "financer" + }, + + /* ************************************** + * + * BUILDERS + * + ***************************************** */ + { + "icon" : "fa-user", + "title": "Stephanie Lorente", + "co" : "557ffeece41d757240532c57", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Jerome Gonthier", + "co" : "555c887fc12f63153b0041ab", + "class" : "builder" + }, + + { + "icon" : "fa-user", + "title": "Xavier Canal", + "co" : "56b48baadd0452c4304902db", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Sitti Harouna", + "co" : "5761377540bb4ecd65630a8c", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Edith Chlorofib", + "co" : "56a0951bdd0452bf287b23c7", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Jeremy Loreau", + "co" : "5670f25cdd0452b81e0efebf", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Coralie Josseron", + "avatar" : "https://www.communecter.org/upload/communecter/citoyens/58453a7840bb4e445df1a39d/medium/54298103562290909087399386842225737719n.jpg?_=1492716965", + "co" : "58453a7840bb4e445df1a39d", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Jahne Anders", + "co" : "5830f82640bb4e6a32e069f5", + "avatar" : "https://www.communecter.org/upload/communecter/citoyens/5830f82640bb4e6a32e069f5/medium/14480633101544773841285635255434390505615827o.jpg?_=1492717012", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Quentin Josseron", + "co" : "56f444d440bb4eed75f0072e", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Florent Bénameur", + "co" : "55b6186ee41d75d46322d3b1", + "avatar":"https://www.communecter.org/upload/communecter/citoyens/55b6186ee41d75d46322d3b1/medium/FBenameur.jpg?_=1492716922", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Julien Lecaille", + "co" : "56ad340cdd04528b3dd37405", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Maia Dereva", + "co" : "56744d4edd045264697b23d1", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Remi Bocquet", + "co" : "56a5fa00dd0452fe07d37379", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Simon Sarazin", + "co" : "55f053fbe41d75cd64558518", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Arnaud VAn de Castel", + "co" : "574497ab40bb4ee368ac138b", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Alexis", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Juanito Ligdamis", + "co" : "56d9d4b6dd0452060332dc02", + "avatar":"https://www.communecter.org/upload/communecter/citoyens/56d9d4b6dd0452060332dc02/medium/20160808122403.jpg?_=1492717317", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Priscilla Dijoux", + "co" : "56dd791fdd0452603f60cf54", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Florian Legrand", + "co" : "586793ff40bb4ee620947c30", + "avatar":"https://www.communecter.org/upload/communecter/citoyens/586793ff40bb4ee620947c30/medium/IMG20170221133431.jpg?_=1492717390", + "class" : "builder" + }, + { + "icon" : "fa-user", + "title": "Tom Baumert", + "co" : "57e5256640bb4eff07c4c9d6", + "avatar":"https://www.communecter.org/upload/communecter/citoyens/57e5256640bb4eff07c4c9d6/medium/profil.jpg?_=1496302667", + "class" : "builder" + }, + /* ************************************** + * + * Devs + * + ***************************************** */ + { + "icon" : "fa-user", + "title": "Thomas Craipeau", + "github" : "https://github.com/aboire", + "co" : "55ed9107e41d75a41a558524", + "avatar" : "https://avatars3.githubusercontent.com/u/1200525?v=3&s=460", + "class" : "dev builder", + "where" : "La Réunion" + }, + { + "icon" : "fa-user", + "title": "Clement Damiens", + "github" : "https://github.com/clement59", + "co" : "55ee8d59e41d756612558516", + "avatar" : "https://avatars1.githubusercontent.com/u/6576514?v=3&s=460", + "class" : "dev builder", + "where" : "Peru" + }, + { + "icon" : "fa-user", + "title": "Tristan Goguet", + "github" : "https://github.com/kgneo", + "co" : "5640416ae41d75bc291a5a26", + "avatar" : "https://avatars2.githubusercontent.com/u/7578166?v=3&s=460", + "class" : "dev builder", + "where" : "Nouvelle Calédonie" + }, + { + "icon" : "fa-user", + "title": "Raphael Rivière", + "github" : "https://github.com/RaphaelRIVIERE", + "co" : "55e042ffe41d754428848363", + "avatar" : "https://avatars1.githubusercontent.com/u/8775448?v=3&s=460", + "class" : "dev builder", + "where" : "La Réunion" + }, + { + "icon" : "fa-user", + "title": "Damiens Grondin", + "github" : "https://github.com/GrondinDam", + "co" : "", + "class" : "dev builder", + "where" : "La Réunion" + }, + { + "icon" : "fa-user", + "title": "Daniel Cazal", + "github" : "https://github.com/Danzal974", + "co" : "57e7da7f40bb4e385dd41c2f", + "avatar" : "https://avatars0.githubusercontent.com/u/19874163?v=3&s=460", + "class" : "dev builder", + "where" : "La Réunion" + }, + { + "icon" : "fa-user", + "title": "Tibor Katelbach", + "github" : "https://github.com/oceatoon", + "co" : "5534fd9da1aa14201b0041cb", + "avatar" : "https://avatars3.githubusercontent.com/u/192076?v=3&s=460", + "class" : "dev builder", + "where" : "La Réunion" + }, + { + "icon" : "fa-user", + "title": "Sylvain Barbot", + "github" : "https://github.com/sylvainbarbot", + "co" : "54fed0eca1aa1411180041ae", + "avatar" : "https://avatars3.githubusercontent.com/u/2662262?v=3&s=460", + "class" : "dev builder", + "where" : "La Réunion" + }, + /* ************************************** + * + * THINKERS + * + ***************************************** */ + { + "icon" : "fa-lightbuld-o", + "title": "Pierre Magnin", + "link" : "", + "class" : "thinker" + }, + { + "icon" : "fa-lightbuld-o", + "title": "Mathieu Coste", + "co" : "586793ff40bb4ee620947c30", + "class" : "thinker" + }, + { + "icon" : "fa-lightbuld-o", + "title": "Amaury Van Espen", + "co" : "586793ff40bb4ee620947c30", + "img" : "https://www.communecter.org/upload/communecter/citoyens/586793ff40bb4ee620947c30/medium/IMG20170221133431.jpg?_=1492714577", + "class" : "thinker" + }, + + /* ************************************** + * + * interoperate + * + ***************************************** */ + + { + "icon" : "fa-database", + "title": "Wikipedia", + "link" : "", + "class" : "interoperate" + }, + { + "icon" : "fa-database", + "title": "Open Street Map", + "link" : "", + "class" : "interoperate" + }, + { + "icon" : "fa-database", + "title": "Data.gouv", + "link" : "", + "class" : "interoperate" + }, + { + "icon" : "fa-database", + "title": "Open Data Soft", + "link" : "", + "class" : "interoperate" + }, + { + "icon" : "fa-database", + "title": "Open Agenda", + "link" : "https://openagenda.com", + "class" : "interoperate" + }, + { + "icon" : "fa-usb", + "title": "smart Citizen", + "link" : "https://smartcitizen.me", + "class" : "interoperate", + "img" : "http://2012.cities.io/wp-content/uploads/2014/06/SmartCitizen_logo.png", + }, + +/* ************************************** + * + * CROWDFUNDERS + * + ***************************************** */ +{"icon" : "fa-user","title": "Didier Hoareau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sylvie Bouclon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vianney Dhlln","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Carine Chateau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Béata Delcourt","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sophie Nicklaus","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Ghis Lambert","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "céline mislin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Coralie Valdebouze","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "philippe kuhn","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Isabelle Slack","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pierre Cariat","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Schaub","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laurence JURET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Céline Da Silva","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "serge GONTIER","link" : "","class" : "crowdfunder"}, + {"icon" : "fa-user","title": "mathieu rochier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sabine Legris","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bertrand Mistretta","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cécile Daunat","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie-Aude Denizot","link" : "","class" : "crowdfunder"}, + {"icon" : "fa-user","title": "Khalil PATEL","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie Plessier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Frédéric Dimey","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fifi Ro","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vetillart Maryvonne","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "chloe pothin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Solen Raimbault","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Virginie Litzler","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mel Go","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alexis BOUILLET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Violette Sarrazy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "VERONIQUE GENET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "cecile mosch-vignes","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Annick Tenchon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Claude Gourbin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Quentin DESVIGNE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne-Sophie Bonora","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Timothy Duquesne","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "William Hogge","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benjamin Demol","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sarah Tsvetoukhine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Moida Harouna","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bruno JONZO","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Véronique Ribera","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "cathy saccomano","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cécile Thiong-Ly","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Arielle SANDMEIER","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Isabelle Ochlust","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fabien Marchesini","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie Rose JUINO","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Frederic Moine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Virginie Sionkowski","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Armelle Lefebvre","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Karel HUSKA","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Francoise DONIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Didier Bourse","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie NICOLAS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "suzy olivé","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Roger CAZABON","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Michel Samacoïts","link" : "","class" : "crowdfunder"}, + {"icon" : "fa-user","title": "Emilie Ruby","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "MYRIAM KERMAGORET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Stéphane Caillaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Joan Kaminka","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mathias Vadot","link" : "","class" : "crowdfunder"}, + +{"icon" : "fa-user","title": "Erwan L'Hostis","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "FREDERIC PAYEN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Valérie Abella","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bruno Bourgeon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "carole paillart","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Arnaud Guerin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cédric Lecolier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Denis Pansu","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Félix Koch","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Herve lamoureux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Joëlle Ramaye","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Florence Balestrino","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Damien Clément","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nora Benamara","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sitti Harouna","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Adri Capenter","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Victor guillien","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Léonel Caro","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "sylvia Fredriksson","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "thibaud carpentier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Agnès Loth","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "liliane meynard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Paul Quentin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "maeva lawwan","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Stéphanie Lorente","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jérôme Aressy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "cedric dldc","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie FARES","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas N'saispo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "aurelie knafo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "La petite école qui regarde la montagne","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benjamin DUHENOIS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benjamin Coulon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mundhi Gunawan","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Didier Tranchier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Aurélie Larcy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Eglantine Herban","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Camille Paillet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Carole Buges","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "emmanuel dayde","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gaelle RIVIERE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Daniel Membrives","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Oppenot","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Romuald Schuller","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alisson Delahaye","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "odile lebon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cécile DAMBREVILLE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sophie Ishak","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alix Horsch","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": " Jean Damiens","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Hélène Houplain","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Julien Fezandelle","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cyrille Liegeois","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mey Low","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benoît Alessandroni","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sylvain Barbot","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Antoine Planquette","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Hervé Crosnier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "yves lusson","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas BOHL","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "florence hamel","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sybille Saint Girons","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sylvie Depeyre","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Paul Richard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Simon Fourthin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Céline DEROUIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Floriane Leva","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benoît CAZEAUDUMEC","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "mathieu dattee","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Barthélemy GARDEL","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "PÔPÖ popo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Claudine FOUGNET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Joanna Gabas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Guillaume THEROUDE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gilles MASBERNAT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "alain renk","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Claude Henry","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Michel ABADIE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Kulpinski","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Caroline Ludger","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Eric Tescher","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anatole Landrein","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Tristan Schmitt","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gianni ZOCCHEDDU","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Louis Gaillard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Eliane FIQUET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Florian Damour","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dominique Hebert","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Martine Ternisien","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Livin'Coop Livin'Coop","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Céline Lobjoy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alexandra Nowak","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Christophe Debaty","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Christophe Debaty","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gregory Veulemans","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benoit Véler","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Wojtek Kulpinski","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "garlann nizon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mélanie Blasco","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Enrico Campaner","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Guillaume Daoulas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Richard Marion","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "margot katelbach","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Rémi Val","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Raphaël Bodin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Zé Zette","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dan Percy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne Sophie Koudsi","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Geoffrey SERIGNAC","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marion Rousseaux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pedro Prieto MartÃn","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "hagalazlaurence barth","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Johnny Lousy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Julien Chopin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "laurence botte","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Grondin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "CHARLENE DE VARGAS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Amélie RUPPRECHT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Patrick RIVIERE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Victor Payen","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "julien debarnot","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Françoise Pipon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Luc Coulon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fabrice Alcindor","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas Gabas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vincent Bergeot","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie Tatibouet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "David Fontaine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "romain lalande","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sonia M Cazaux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Maria Maga","link" : "","class" : "crowdfunder"}, + +{"icon" : "fa-user","title": "Brieuc Le Marec","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne Fabier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "johan ducros","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gérard ZASSO","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Maxime Le Hung","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anita Montier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Coryse Boissou","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thierry Denys","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Clément Pouillaude","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Quentin Josseron","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Boris Aubligine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "denis-pierre SIMON","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thibaud Godet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Valentin Le Tellier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mamèremadi Antoine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "anne caillaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "delphine salingue","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "pierre ACQUAVIVA","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Morgan Duhaze","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "sarah frechet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "thierry richard","link" : "","class" : "crowdfunder"}, + +{"icon" : "fa-user","title": "olivier seguin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "teddy jamois","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marc SALINGUE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie Poussin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Loïc Meunier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laureline Matha","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bernard Vatrican","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "LAETITIA ALBERT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "valerie salingue","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Picart Arthur","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dj Iloun","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "remy poirel","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gaëtan Severac","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "thi thanh","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sophie Annette","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mallorie ALBERT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "pablo vioque","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "sebastien provence","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vivijer Cyril","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "estelle dotti","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Stéphanie jacqueau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benjamin ORECCHIONI","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "antoine laurence","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Michel Coudroy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "ERIC NOWAK","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alain Mouetaux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Matthieu Ramage","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "emilie neilz","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas ANDRES","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Julien Duprat","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Ken Tsisandaina","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vanessa Miranville","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Emmanuel POIRRIEZ","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marion Lamorycz","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "thibault mangeard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dominique Despert","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Frédérique Schuller","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Yannik DARGUESSE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Patrick Cannet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "steph leveque","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thierry Le Pesant","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Maud Rt","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas Wolff","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Rémi Voluer","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne Lechvien","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pascal FENET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Manon Le Chevallier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Camille Arnaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dominique Duthilleul","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sylvain Héraut","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Paula. Gallego","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cédric Leprette","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pauline Cachera","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Patte","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie-Aline Dejoux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "laurent gleyse","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean Subtil","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "stève bonin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Adrien Fabre","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gilda NOURRY","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "joan pons","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas Carrere","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Philippe Vincent","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Guillaume Libersat","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sabine Pleers","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jerome Medeville","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Matthieu Regnauld","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Rieul Techer","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "guillaume doukhan","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Christophe Triollet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Lucas Zint","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "xitobal none","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sabine LOUBIERE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anita Montier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pascal Goguet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Edith Edlinger","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "jocelyne stephen","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "luc franc","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "jerome lambilliotte","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "jacky HERBINIERE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pierre Magnin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Caroline KAPLAN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bernard STAUFFER","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Frederic Viollet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gilles Presti","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "claire crosse","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bernard Veyrat","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Etienne BOUCHE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Guillaume BENRARDIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Ambre Godin Sagi","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie Lechevallier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Yann FLANDRIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laurent Lo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bastien Karikakou","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laurent Max","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fabien MEURET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fabrice Doublet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Childéric THOREAU","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marine Damiens","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Monique Houplain","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Olivier Cortès","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "vladimir katelbach","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jérémie Contan","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Philippe Fabing","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laurent Dennemont","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Myriam Bouré","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "frédéric dussoulier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Chris Baudia","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Patrick MALOD","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Benjamin Roux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Arnaud Famchon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne-Marie Grenier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "nicolas enault","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Johnson Robert","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anna Kedzierska","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "DOMINIQUE ROUX","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Améla ALIHODZIC","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sophie Bureau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Olivier Gruié","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "xavier canal","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Ludovic NARAYANIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cécile Capo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Frédéric BOSQUE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gabriel Terrien","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Kévin TAOCHY","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean-Marc TAGLIAFERRI","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sébastien Cohéléach","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "gilles gallois","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thierry Perrau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Céline MAUFRAS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Raphaël RIVIERE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Muzette","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "juanito ligdamis","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Quentin Bonnet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Perrine Stoll","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Emiline Messeguer","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Simon CHAUVAT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Iara Le Saux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Chatterley Epaminondas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nathalie BENOIST","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "andre ganter","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "héléne Houplain","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "pierre pongerard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas BOUICHET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "OPEN ATLAS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fanny Monod","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "guillaume rouyer","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "JB Pamard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Lynda Pony","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Philippe MARSEILLE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Joseph DESCOURS-LÉAU","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Joseph Leroy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bilquis Naceur","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laetitia Saffroy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Ludovic Micaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Julien Lecaille","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Loïc Damey","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marine Martineau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Martin Vigneau","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean Avinée","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Maya Cesari","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "colette barillon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Kévin Laîné","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "GILLES SCHACHERER","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Guillaume De Vargas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "marie ardouin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Corinne Le Dû","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Audrey Maur Court","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Chloé RAYMOND","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Raphael Guille","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Caroline Hodak de L Epine","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "thibauld favre","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "sabine chapoulart","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Enguerran Colson","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laurent Favia","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "lilian ricaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Armel LE COZ","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Victor Pouillaude","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alex brun","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Richard BLOT","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sébastien Mas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Véronique Corbin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "clemence le nir","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "alix accad","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mélodine ElleSonne","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Romain Lefebvre","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Isabelle Delannoy","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Clovis Bonnemason","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "noémie grandsire","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Fabiennne Denoual","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Pilou Dix Joues","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Milène BONIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Philippe BONNIN","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Luc LAVIELLE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Aurélie Bonnin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Luc Bonnin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Daniel Pallas","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Philippe Arnaud","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Armand Daydé","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Michel Briand","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Sarah MEUNIER","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Johan Richer","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Rachid Ouchsouf","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Yannick DUTHE","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Isabelle Blaquart","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Julien CANTONI","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Anne Barbelanne","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Quitterie de Villepin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Aurelie Lecolier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Estelle BERGERARD","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Cyril Durand","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "adrien labaeye","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Vivier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Thomas Rougier","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Laetitia Sanchez","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Christopher Liénard","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Aurélien Masse","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Angie Gaudion","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "arlette barbot","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marie-Christine COULON","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Catrin Boss","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "jean sallantin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Marion BERGERET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Rémi Bocquet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Michel Bernand-Mantel","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Justine LANDAIS","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Mathieu Coste","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alain THIREL-DAILLY","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Gautier Demouveaux","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "delphine ballet","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Jean Noel Rouchon","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "emilie bonin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Salim CHAOUI ROQAI","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Bernard BRUNET","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Vincent Mak-yuen","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Dahoo Durand","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Francis Morel","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "mathias lahiani","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Hafid El Mehdaoui","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Aurélia Petragallo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Alexis Pujo","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nanoug Dan","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Simon Sarazin","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Nicolas Maréchal","link" : "","class" : "crowdfunder"}, +{"icon" : "fa-user","title": "Maïa Dereva","link" : "","class" : "crowdfunder"} +]; + +jQuery(document).ready(function() +{ + var link, endlink; + setTitle("<?php echo Yii::t("common","Project Partners") ?>",""); + $(".keywordList").html(''); + var openType = "<?php echo @$_GET["type"]?>"; + + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + where = (obj.where) ? "<br>("+obj.where+")" : "" ; + icon = (obj.avatar) ? "" : '<i class="fa '+icon+' faa-pulse animated-hover fa-2x"></i><br/>'; + if (typeof obj.link != undefined && obj.link != "") { + link = '<a href="'+obj.link+'">'; + endlink = '</a>'; + } else { + link=""; + endlink=""; + } + if( obj.class == "crowdfunder") + icon = '<span class="fa-stack fa-lg"><i class="fa fa-user fa-stack-2x"></i><i class="fa fa-euro fa-stack-1x text-danger"></i></span>'; + var body = (obj.img) ? "<br/><img class='img-responsive' src='"+obj.img+"' />" : ""; + var avatar = (obj.avatar) ? "<img class='avatar img-circle' src='"+obj.avatar+"' />" : ""; + var links = (obj.github) ? "<br/><a href='"+obj.github+"' target='_blank' ><i class='fa fa-github fa-4x'></i></a>" : ""; + if( obj.co && links == "" ) links += "<br>"; + links += (obj.co) ? "<a href='https://www.communecter.org/#element.detail.type.citoyens.id."+obj.co+"' target='_blank' ><img src='<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png' style='height:50px;'></a>" : ""; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-md-4 col-sm-12 networkActor '+obj.class+'"><div class="panel panel-white">'+ + avatar+ + '<div class="panel-heading border-light ">'+ + link+ + + '<span class="panel-title homestead"> '+icon+' <span style="font-size: 35px; color:'+color+';"> '+obj.title.toUpperCase()+'</span></span>'+ + where+ + body+ + endlink+ + links+ + '</div>'+ + /*'<div class="panel-body">'+ + '<blockquote class="space20">'+ + obj.body+ + "</blockquote>"+ + "</div>"+*/ + "</div></div>"); + }); + $(".networkActor").addClass("animated flipInX").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass("animated flipInX"); + }); + filterPartners(openType); +}); +function filterPartners(type) { + if(type){ + $('.typeName').html(type); + $('.networkActor').hide(); + $('.'+type).show().addClass("animated flipInX").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass("animated flipInX"); + }); + } +} +</script> +<style type="text/css"> + .fa-euro{margin-top: 8px; margin-left: 14px;} +</style> diff --git a/views/docs/panels/peopleTalk.php b/views/docs/panels/peopleTalk.php new file mode 100755 index 0000000000000000000000000000000000000000..ffebae5c8c570274db01f9b1d5124e2a1dac0b85 --- /dev/null +++ b/views/docs/panels/peopleTalk.php @@ -0,0 +1,228 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-comments faa-pulse animated fa-3x '></i> <span style="font-size: 48px">People Talk</span></span> +</div> + +<div class="keywordList"></div> + +<style type="text/css"> +.keywordList{ + margin-top:50px; +} +.keypan{ + height: 300px; + border: 1px solid #ddd; + margin-bottom: 50px; +} +.keypan img{ + position: relative; + top: -30px; +} +</style> +<script type="text/javascript"> +var keywords = [ + { + "name" : "Ludovic NARAYANIN ", + "project" : "DataRocks", + "url" : "http://datarocks.io", + "comment" : "Un super projet citoyen. Une super équipe. Soyons tous Communectés avec le Pixel Humain.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/ludo.PNG" + }, + { + "name" : "Mathieu Coste", + "project" : "Chez Nous", + "url" : "http://cheznous.coop", + "comment" : "Ici et là tout en étant relié, avec communecter nous pourrons participer joyeusement et concrètement à améliorer notre qualité de Vie :)", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/mathieu.PNG" + }, + { + "name" : "Jean Sallantin", + "project" : "Dialoguea", + "url" : "https://dialoguea.fr/", + "comment" : "Enfin le voilà , le connunecteur numérique d’une intelligence collective glocale qui par des débats locaux trouvera des solutions à des problèmes globaux.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/jean.PNG" + }, + { + "name" : "Clément Damiens - le ch’ti ", + "project" : "Livin'Coop et communecter", + "url" : "http://www.livincoop.fr/beta_1.0/index.php?referer", + "comment" : "La connaissance de ce qui nous entoure jetée comme des graines par les citoyens se lit comme un chant d’espoir et se dessine comme une rencontre pour une vie meilleure", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/clement.png" + }, + { + "name" : "Guillaume Douhkan", + "project" : "GD Project", + "url" : "", + "comment" : "Pour que le numérique facilite la participation à la Vie en Communs, communectons-nous dans la bonne humeur pour la construction d’un véritable projet de société", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/guillaume.png" + }, + { + "name" : "Luc Bonnin", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "Un projet innovant, pragmatique, philanthrope, humaniste, apolitique, gratuit fait par et pour les citoyens. Assistons-nous de manière active à la naissance d’une nouvelle manière de partager notre temps sur cette planète, tous “uni-vers†un monde meilleur ?", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/luc.png" + }, + { + "name" : "Jerome Gonthier", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "une plate forme innovante, collaborative, intelligente, gratuite et évolutive de participation à la vie de sa commune créé par et pour les habitants pour à la fois améliorer son quotidien tout en contribuant à la qualité de vie de tous...à décliner partout ! ", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/jerome.png" + }, + { + "name" : "Bernard Brunet", + "project" : "Assemblée des communs Toulouse", + "url" : "http://assemblee.encommuns.org/index.php?title=Toulouse", + "comment" : "Un projet génial en phase avec la nécessité de réinventer le monde autour des communs.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/bernard.png" + }, + { + "name" : "Florent Benameur", + "project" : "Livin'Coop et communecter", + "url" : "http://www.livincoop.fr/beta_1.0/index.php?referer", + "comment" : "Communecter, pour renforcer le pouvoir d’agir individuel et collectif afin de favoriser la construction collective d’une société, en réponse à des enjeux locaux et globaux.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/florent.png" + }, + { + "name" : "Romain Lalande", + "project" : "Osons", + "url" : "http://osons.cc/", + "comment" : "Pour faire grandir et relier nos Communs en s'adaptant à chaque usage . . . COMMUNEXION !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/romain.png" + }, + { + "name" : "Stéphanie Lorente", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "C'est pas un de bonne santé que de vivre dans une société malade (Krshnamurti). Le temps est venu... ", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/steph.JPG" + }, + { + "name" : "Guillaume Rouyer", + "project" : "Assemblée Virtuelle", + "url" : "http://www.virtual-assembly.org/", + "comment" : "Un réseau social citoyen, open-source, par et pour les citoyens, pour favoriser la démocratie locale, les dynamiques territoriales. Communecter est un très beau projet, basé sur une nouvelle génération de technologies web dont les propriétés ouvrent la voie au peer to peer et à la décentralisation du web !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/guillaumeR.png" + }, + { + "name" : "Guillaume Libersat", + "project" : "Brasserie Unisson", + "url" : "http://unisson.co/fr/", + "comment" : "A l'aube de la (re)construction des communs, Communecter nous offre une toile vierge et solide : saisissons l'opportunité d'être des pixels-créatifs pour esquisser un avenir plus collectif !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/guillaumeL.png" + }, + { + "name" : "Hafid El Mehdaoui", + "project" : "Nacelle 0.2", + "url" : "http://nacelles02.com/", + "comment" : "Communecter c’est l’espoir! l’espoir de voir naître une communauté tournée vers le vivre ensemble créatif et ouvert. ", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/hafid.png" + }, + { + "name" : "Francis Morel", + "project" : "Practishare", + "url" : "https://practishare.wordpress.com/", + "comment" : "Communecter utilise le numérique avec élégance, pour mieux nous relier dans la vie réelle. Les actions isolées prennent soudain place dans la mosaïque collective de notre territoire commun, elles entrent en résonnance.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/francis.png" + }, + { + "name" : "Armel Le Coz", + "project" : "Parlement et Citoyen", + "url" : "https://www.parlement-et-citoyens.fr/", + "comment" : "Seul un engagement local et massif des citoyens permettra de répondre aux défis politiques, sociaux, économiques et environnementaux que nous devons relever collectivement. Communecter est peut-être l’outil qui nous permettra de libérer les énergies citoyennes sur nos territoires et d’animer l’engagement de tous en faveur de l’intérêt général et du bien commun.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/armel.png" + }, + { + "name" : "Sylvain Barbot", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "Pixel Humain, pour connecter le virtuel et le réél. Un catalyseur d'initiatives locales !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/sylvain.PNG" + }, + { + "name" : "Tristan Goguet", + "project" : "Demosalithia & Communecter", + "url" : "https://www.communecter.org/", + "comment" : "Le monde de nos enfants dépend de nos actions quotidiennes dès aujourd’hui.<br/>C’est à nous tous, dès maintenant, de prendre soin de ce que nous allons leur laisser en héritage. A nous tous de penser notre monde d’une façon différente, plus durable, plus respectueuse, et plus saine. Sans attendre que les décisions viennent d’en haut, nous avons le pouvoir de penser et d’agir en autonomie, pour le bien de tous. <br/>Communectons-nous ! Relions-nous les uns aux autres, pour construire le monde de demain ensemble !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/tristan.PNG" + }, + { + "name" : "Simon Sarazin", + "project" : "Unisson", + "url" : "http://unisson.co/fr/", + "comment" : "Communecter est en train de mettre à disposition un espace où décrire et travailler autour de son initiative, ouvert à tous les accompagnateurs de projet, contributeurs, financeurs, usagers. Un espace où l'on peut voir ou trouver ceux qui font aussi la même. De quoi largement accélérer la production de communs !", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/simon.PNG" + }, + { + "name" : "Tibor Katelbach", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "L’innovation sociétal au service des biens communs. La société c’est pas si compliqué, ca peut meme devenir amusant.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/tibor.PNG" + }, + { + "name" : "Clemence Le Nir", + "project" : "Nacelle 0.2", + "url" : "http://nacelles02.com/", + "comment" : "Communecter c’est d’abord une rencontre, puis le partage d’une vision commune, le bonheur de se dire \"c'est possible\", le début d'une aventure humaine incroyable, le sentiment de n'être jamais seul et la force de faire partie d'un tout. Communectons-nous pour réenchanter le monde ensemble! ", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/clemence.png" + }, + { + "name" : "Rieul Techer", + "project" : "La Paillasse Saône", + "url" : "http://saone.paillas.se/", + "comment" : "Le citoyen comme sujet du réseau et le commun comme objet d’appropriation, de réplication et de démultiplication des initiatives citoyennes, Communecter a raison de se définir comme un réseau sociétal et non social.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/rieul.png" + }, + { + "name" : "Lilian ricaud", + "project" : "Les Communs", + "url" : "http://www.lilianricaud.com/", + "comment" : "Réseau social géolocalisé conçu dans l'esprit des communs, Communecter a tout le potentiel pour rendre visible, connecter et dupliquer les meilleures initiatives citoyennes.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/lilian.png" + }, + { + "name" : "Maia Dereva", + "project" : "Semeoz", + "url" : "http://semeoz.info/", + "comment" : "Communecter? C’est un projet ambitieux et porteur d’espoir. Il est mis en oeuvre en communs par des hommes et des femmes autonomes et connecté.e.s qui croient en un monde plus souriant :)", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/maia.png" + }, + { + "name" : "Christian Dupuy", + "project" : "Semeoz", + "url" : "http://semeoz.info/", + "comment" : "Communecter : action de transformer la mise en commun de nos actions en un délicieux nectar de vie.", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/christian.png" + }, + { + "name" : "Pierre Magnin", + "project" : "Communecter", + "url" : "https://www.communecter.org/", + "comment" : "Depuis son émergence, l’humanité s’est développée grâce aux échanges d’information entre les êtres humains pour apprivoiser l’environnement naturel, construire des structures sociétales et explorer l’univers. COMMUNECTER est certainement le maillon qui permettra le prochain pas en avant tant pour la création d’unité de conscience à l’échelle planétaire que pour le renforcement des liens de proximité. ", + "image" : "<?php echo $this->module->assetsUrl; ?>/images/testamonials/pierre.png" + }, +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-xs-3"><div class="keypan panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title ">'+ + '<img class="img-circle" width="50" height="50" src="'+obj.image+'"/> '+ + '<span style="font-size: 25px; "> <br/>'+obj.name.toUpperCase()+'</span>'+ + '<a href="'+obj.url+'" target="_blank" style="font-size: 18px; "><br/>'+obj.project.toUpperCase()+'</a>'+ + '<span style="font-size: 14px; "><br/>'+obj.comment+'</span>'+ + '</span>'+ + '</div></div></div>'); + }); +}); + +</script> \ No newline at end of file diff --git a/views/docs/panels/philosophy.php b/views/docs/panels/philosophy.php new file mode 100755 index 0000000000000000000000000000000000000000..c6bcee61f8c40727f5f4fffd7ffcc77c28d15281 --- /dev/null +++ b/views/docs/panels/philosophy.php @@ -0,0 +1,81 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-heart text-red faa-pulse animated fa-3x '></i> <span style="font-size: 48px">PHILOSOPHY</span></span> +</div> +<div class="space20"></div> +<div class="keywordList"></div> + +<script type="text/javascript"> + +var keywords = [ + + { + "icon" : "fa-lightbulb-o", + "title":"Reseau societal", + "body":"Un reseau societal pour retrouver nos biens communs"+ + "<br>Voir la société par les communs"+ + "<br>Experimentons un autre vision du système"+ + "<br>Le système peut il fonctionner autrement ?"+ + "<br>Une expérience collective" + }, + { + "icon" : "fa-code", + "title":"Open source", + "body":'<span class="bold">'+ + '<br>1. We believe in an open exchange. '+ + '<br>2. We believe in the power of participation. '+ + '<br>3. We believe in rapid prototyping.'+ + '<br>4. We believe in meritocracy. '+ + '<br>5. We believe in community'+ + '</span><br><br>'+ + '<br><a class="btn btn-danger" href="http://www.framablog.org/index.php/post/2011/09/28/the-open-source-way" target="_blanck">the-open-source-way</a>' + }, + { + "icon" : "fa-code", + "title":"Open Système", + "body":"Notre réseau se veut être un des acteurs qui transforment la société en l'impactant pour qu'elle s’oriente naturellement vers un fonctionnement plus collaboratif et participatif par la mise en pratique concrète de notre intelligence collective. L'écosystème incarne ainsi un élan collectif de mise en commun et de création de communs comme nouveau modèle sociétal.<br>"+ + '<br><a class="btn btn-danger" href="https://github.com/pixelhumain/buildingCommons/blob/master/codeSocialOpenSystem.md" target="_blanck">En Savoir Plus</a>' + }, + { + "icon" : "fa-lightbulb-o", + "title":"C'est pas un parti politique", + "body":"C'est pas un parti, c'est un projet"+ + "<br>qui veut 'juste' unir tous le monde." + }, + { + "icon" : "fa-lightbulb-o", + "title":"Rien ne l'arrete", + "body":"Quand l'objectif est le chagnement "+ + "<br>et que c'est pas juste un slogan "+ + "<br>rien ne l'arretera tant qu'on ne le vivra pas "+ + "<br>on continuera à chercher" + }, + { + "icon" : "fa-heart text-red", + "title":"Art is the heart of our culture", + "body":"" + }, +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-tag" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-xs-4 panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> '+obj.title.toUpperCase()+'</span></span>'+ + '</div>'+ + '<div class="panel-body">'+ + '<blockquote class="space20">'+ + obj.body+ + "</blockquote>"+ + "</div>"+ + "</div>"); + }); +}); + +</script> + diff --git a/views/docs/panels/policies.php b/views/docs/panels/policies.php new file mode 100755 index 0000000000000000000000000000000000000000..fd0aa2011d5b722d1f759b9bdb0c534993b8f8c9 --- /dev/null +++ b/views/docs/panels/policies.php @@ -0,0 +1,96 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-heart text-red faa-pulse animated fa-3x '></i> <span style="font-size: 48px">éthique </span></span> +</div> +<div class="space20"></div> +<div class="keywordList"></div> +<style type="text/css"> + .keypan{ + height: 235px; + border: 1px solid #ddd + } +</style> +<script type="text/javascript"> + +var keywords = [ + { + "title":"PART OF THE COMMON GOOD", + "body":"Anything we do belongs to the commons, by the people for the people." + }, + { + "title":"OPEN AS IN OPEN SOURCE", + "body":"Anything we do belongs to the commons, by the people for the people." + }, + { + "title":"FREE AS IN FREEDOM", + "body":"You have ." + }, + { + "title":"1st RULE is respect...", + "body":"Respect others"+ + "<br/>No insulting"+ + "<br/>No ..."+ + "<br/>..."+ + "<br/>..." + }, + { + "title":"We don't beleive in publicity", + "body":"It makes fake & capitalistic society"+ + "<br/>why would does who can pay get more than does who can't ?" + }, + { + "title":"You're not a PRODUCT", + "body":"Your data is your and only your property." + }, + { + "title":"data protected", + "body":"We will do our best to protect whatever data is on our plateform." + }, + { + "title":"linked & opendata", + "body":"we build Opendata."+ + "<br/> Data about cities"+ + "<br/>..." + }, + { + "title":"interoperable", + "body":"we build to share."+ + "<br/> so we have APIs to connect"+ + "<br/> to translate into many ontologies" + }, + { + "title":"Connected Territories", + "body":"we build Opendata."+ + "<br/> Data about cities"+ + "<br/>..." + }, + { + "title":"Collective Intelligence", + "body":"..." + }, + { + "title":"Collaborative Economy", + "body":"..." + }, +]; + +jQuery(document).ready(function() +{ + $(".keywordList").html(''); + $.each(keywords,function(i,obj) { + icon = (obj.icon) ? obj.icon : "fa-legal" ; + color = (obj.color) ? obj.color : "#E33551" ; + $(".keywordList").append( + '<div class="col-xs-4"><div class="keypan panel panel-white">'+ + '<div class="panel-heading border-light ">'+ + '<span class="panel-title homestead"> <i class="fa '+icon+' fa-2x"></i> <span style="font-size: 35px; color:'+color+';"> '+obj.title.toUpperCase()+'</span></span>'+ + '</div>'+ + '<div class="panel-body">'+ + obj.body+ + "</div>"+ + "</div></div>"); + }); +}); + +</script> \ No newline at end of file diff --git a/views/docs/panels/prices.php b/views/docs/panels/prices.php new file mode 100755 index 0000000000000000000000000000000000000000..2bb67bcfad61d6e22fb44e1c2dc547a9b4e064f2 --- /dev/null +++ b/views/docs/panels/prices.php @@ -0,0 +1,144 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> + +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <i class='fa fa-users faa-pulse animated fa-3x '></i> <span style="font-size: 48px">PRIX</span></span> +</div> +<div class="space20"></div> + +<div class="row"> + <div class="col-md-12"> + <div class="panel panel-white"> + <div class="panel-body"> + <div class="pricing-table pricing-blue"> + <div class="col-lg-3 col-md-3 col-xs-6"> + <ul class="plan plan1"> + <li class="plan-name"> + Gratos + </li> + <li class="plan-price"> + <h3> 0€</h3> + </li> + <li> + <strong>Accés </strong> à tous + </li> + <li> + <strong>Participer</strong> à votre ville + </li> + <li> + <strong>OpenData </strong> Personnalisé + </li> + <li> + <strong>Associations</strong> + </li> + <li> + <strong>Société</strong> + </li> + <li> + <strong>Périscolaire</strong> + </li> + <li> + <strong>Agenda Local</strong> + </li> + <li> + <strong>Conseil de quartier</strong> + </li> + <li class="plan-action"> + <a href="#" class="btn btn-blue btn-lg"> + Signup</a> + </li> + </ul> + </div> + <div class="col-lg-3 col-md-3 col-xs-6"> + <ul class="plan plan2 featured"> + <li class="plan-name"> + Adhésion + </li> + <li class="plan-price"> + <h3> 20€</h3> + </li> + <li> + <strong>Soutien</strong> + </li> + <li> + <strong>Participation </strong> A.G + </li> + <li> + <strong>Sticker</strong> + </li> + <li> + <strong>Panel Adhérant</strong> + </li> + <li> + <strong></strong> + </li> + <li class="plan-action"> + <a href="#" class="btn btn-blue btn-lg"> + Signup</a> + </li> + </ul> + </div> + <div class="col-lg-3 col-md-3 col-xs-6"> + <ul class="plan plan3"> + <li class="plan-name"> + Petite Commune + </li> + <li class="plan-price"> + <h3> 2500€</h3> + </li> + <li> + <strong>-50 000</strong> Habitants + </li> + <li> + <strong>Back Office</strong> + </li> + <li> + <strong>Opendata</strong> + </li> + <li> + <strong>Vizualisation</strong> + </li> + <li> + <strong>Panel Adhérant</strong> + </li> + + <li class="plan-action"> + <a href="#" class="btn btn-blue btn-lg"> + Signup</a> + </li> + </ul> + </div> + <div class="col-lg-3 col-md-3 col-xs-6"> + <ul class="plan plan4"> + <li class="plan-name"> + Grande Commune + </li> + <li class="plan-price"> + <h3> 5000€</h3> + </li> + <li> + <strong>+50 000</strong> Habitants + </li> + <li> + <strong>Back Office</strong> + </li> + <li> + <strong>Opendata</strong> + </li> + <li> + <strong>Vizualisation</strong> + </li> + <li> + <strong>Panel Adhérant</strong> + </li> + <li class="plan-action"> + <a href="#" class="btn btn-blue btn-lg"> + Signup</a> + </li> + </ul> + </div> + </div> + </div> + </div> + </div> +</div> +<!-- end: PAGE CONTENT--> diff --git a/views/docs/panels/roadmap.php b/views/docs/panels/roadmap.php new file mode 100755 index 0000000000000000000000000000000000000000..bb67f0ce08ca7ba376c6a9ea242efe364a0fa50c --- /dev/null +++ b/views/docs/panels/roadmap.php @@ -0,0 +1,128 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-compass faa-pulse animated fa-3x '></i> <span style="font-size: 48px">Road to the Futur</span></span> +</div> + +<style type="text/css"> + ul li{list-style: none;} +</style> +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body"> + La road map définit la liste des fonctionnalités qui vont être développées dans les futures versions. Comme dans tout projet open source, elle est mouvante et s'adapte au contexte et à la demande de la communauté. + + <div class="col-sm-12" style="margin-top: 20px"> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version C0.2</h2> + <ul> + <li><i class="fa fa-angle-right"></i> re-Design </li> + <li><i class="fa fa-angle-right"></i> Modularisation des Applications</li> + <li><i class="fa fa-angle-right"></i> Moteur de recherche Territorial </li> + <li><i class="fa fa-angle-right"></i> Module Petites Annonces</li> + <li><i class="fa fa-angle-right"></i> Module Lieux et ressources</li> + <li><i class="fa fa-angle-right"></i> Interopérabilité Wikipedia, OSM, DAta.gov, OpenDataSoft</li> + <li><i class="fa fa-angle-right"></i> Collection</li> + <li><i class="fa fa-angle-right"></i> Favoris</li> + <li><i class="fa fa-angle-right"></i> Directory</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.16 INTERACTION SIMPLIFIÉ</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Nouvel interface Ajout de membres d'une orga</li> + <li><i class="fa fa-angle-right"></i> Fonctionalité : Autour de moi </li> + <li><i class="fa fa-angle-right"></i> Simplification des formulaire , intégration de dynForm</li> + <li><i class="fa fa-angle-right"></i> Refactor Element : unification du code, Element devient le parent de tous nos types standards</li> + <li><i class="fa fa-angle-right"></i> Refonte du menu de gauche</li> + <li><i class="fa fa-angle-right"></i> Refonte de la recherche, et recherche par type </li> + <li><i class="fa fa-angle-right"></i> Amélioration d'architecture, utilisation des themes et SOC (separation des concerns) un ex : Notragora </li> + <li><i class="fa fa-angle-right"></i> Générateur d'iframe pour sortir une carto personnalisée</li> + <li><i class="fa fa-angle-right"></i> New Element Type : POI : point of interest</li> + <li><i class="fa fa-angle-right"></i> Moteur de Recherche sur DDA : débat et actions</li> + <li><i class="fa fa-angle-right"></i> Refactor de la localisation </li> + <li><i class="fa fa-angle-right"></i> Pouvoir ajouter plusieur Localité sur un élément</li> + <li><i class="fa fa-angle-right"></i> Ajout des QR codes pour interagir avec communEvent</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.15 INTERACT</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Refonte interface basé sur les propositions pertinentes Nuit Debout </li> + <li><i class="fa fa-angle-right"></i> Page Live</li> + <li><i class="fa fa-angle-right"></i> Section "En ce moment"</li> + <li><i class="fa fa-angle-right"></i> Multi Tag : Moteur de recherche par tags globalisé et personnalisé</li> + <li><i class="fa fa-angle-right"></i> Multi Scope : Moteur de recherche par localité géographique globalisé et personnalisé</li> + <li><i class="fa fa-angle-right"></i> Moteur de recherche : croisement multi scope et multi tags</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.14 SEE</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Refonte interface DDA</li> + <li><i class="fa fa-angle-right"></i> Documentation</li> + <li><i class="fa fa-angle-right"></i> Open Data préférence</li> + <li><i class="fa fa-angle-right"></i> Moteur de traduction, pour lire et convertir les sources externes ( ex : Open Agenda )</li> + <li><i class="fa fa-angle-right"></i> Open Edition ubiquité en préférence</li> + <li><i class="fa fa-angle-right"></i> Mentionner qlq'un dans une actu/News @someone </li> + <li><i class="fa fa-angle-right"></i> DDA : Ajouter un Framapad</li> + <li><i class="fa fa-angle-right"></i> Archiving : discussion, decision et action rooms</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.13</h2> + <ul> + <li><i class="fa fa-angle-right"></i> event refactor </li> + <li><i class="fa fa-angle-right"></i> no organiser : if you just want to share an event you're not organising </li> + <li><i class="fa fa-angle-right"></i> added subevents : if an event has a program with multiple sub events</li> + <li><i class="fa fa-angle-right"></i> open edition sur event</li> + <li><i class="fa fa-angle-right"></i> refactor city chooser </li> + <li><i class="fa fa-angle-right"></i> delete and update comments</li> + </ul> + </div> + </div> + <div class="col-sm-12" style="margin-top: 20px"> + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.12</h2> + <ul> + <li><i class="fa fa-angle-right"></i> amélioration du systeme validation </li> + <li><i class="fa fa-angle-right"></i> refactor et ajout des images sur les news</li> + <li><i class="fa fa-angle-right"></i> réintégration du module de vite et de discussion</li> + <li><i class="fa fa-angle-right"></i> module network , communecter en marque blanche </li> + <li><i class="fa fa-angle-right"></i> refactor de la structure des cities et des codepostaux</li> + <li><i class="fa fa-angle-right"></i> intégration de divers de data , makery, bretagne Telecom, commun59, service public</li> + <li><i class="fa fa-angle-right"></i> système et admin de modération</li> + <li><i class="fa fa-angle-right"></i> refonte et design de mail </li> + <li><i class="fa fa-angle-right"></i> gamification avec les actions</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.1</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Ajouter des citoyens, des organisations, des projets et des événements</li> + <li><i class="fa fa-angle-right"></i> Annuaire Personnel</li> + <li><i class="fa fa-angle-right"></i> Double Design : Web + Cartographique</li> + <li><i class="fa fa-angle-right"></i> Prototype Mobile Meteor</li> + <li><i class="fa fa-angle-right"></i> Page Ma Ville simple en mode annuaire local</li> + <li><i class="fa fa-angle-right"></i> Mur d'actualité pour toutes les entités</li> + <li><i class="fa fa-angle-right"></i> Système de notification</li> + <li><i class="fa fa-angle-right"></i> Viralité : connection avec GMail contacts, import CSV (invités, membres, contributeurs)</li> + </ul> + </div> + </div> + <?php if(!isset($renderPartial) || $renderPartial != true){ ?> + <div class="col-sm-12"> + <a href="javascript:window.history.back();" class="text-extra-large bg-dark tooltips pull-left radius-5 padding-10 homestead" style="display: block;" ><i class="fa fa-arrow-left"></i> Retour </a> + </div> + <?php } ?> + </div> + </div> +</div> + diff --git a/views/docs/panels/slideshow.php b/views/docs/panels/slideshow.php new file mode 100644 index 0000000000000000000000000000000000000000..b775683d4311013aad76aa094046508d4e6329d5 --- /dev/null +++ b/views/docs/panels/slideshow.php @@ -0,0 +1,8 @@ +<?php $this->renderPartial('../docs/panels/menuLink',array("url"=>"default/view/page/links")); ?> +<div class="panel-heading border-light center text-dark partition-white radius-10 "> + <span class="panel-title homestead"> <i class='fa fa-television fa-3x '></i> <span style="font-size: 48px">Presentation</span></span> + <br/><span style="font-size: 30px">tapez "F" pour Pleine Ecran</span> +</div> +<div class="space20"></div> + +<iframe width='770' height='515' src='https://gitpitch.com/pixelhumain/co2/master?grs=github&t=white' frameborder='0' allowfullscreen></iframe> \ No newline at end of file diff --git a/views/docs/pourquoi.php b/views/docs/pourquoi.php new file mode 100755 index 0000000000000000000000000000000000000000..85e5cf1ba87f5752ccdf19b6fb561510041561b0 --- /dev/null +++ b/views/docs/pourquoi.php @@ -0,0 +1,61 @@ +<?php +$this->renderPartial("../docs/assets"); +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "cogs", + "title" => "Pour quoi faire ?", + "stitle" => "Communecter c'est fait pour mille et une choses !", + "description" => "", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <li data-target="#docCarousel" data-slide-to="1" class=""></li> + <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li> + <li data-target="#docCarousel" data-slide-to="5" class=""></li> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/pourquoi/index.png" class="img-schemas img-responsive "></div> + <div class="item"><?php //$this->renderPartial("../docs/pourquoi/alternatives", array("renderPartial"=>true)); ?></div> + <div class="item"><?php //$this->renderPartial("../docs/pourquoi/discuter", array("renderPartial"=>true)); ?></div> + <div class="item"><?php //$this->renderPartial("../docs/pourquoi/participer", array("renderPartial"=>true)); ?></div> + <div class="item"><?php //$this->renderPartial("../docs/pourquoi/projets", array("renderPartial"=>true)); ?></div> + <div class="item"><?php //$this->renderPartial("../docs/pourquoi/acteurs", array("renderPartial"=>true)); ?></div> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- Left and right CHAPTER controls --> +<a href="#default.view.page.elements.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Les 4 éléments +</a> +<a href="#default.view.page.comprendre.dir.docs" class="lbh homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Comprendre <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("cogs", "pour quoi faire ?"); +}); +</script> + + + diff --git a/views/docs/presentation.php b/views/docs/presentation.php new file mode 100755 index 0000000000000000000000000000000000000000..4d3a1aca29a768d644c298c1bfa8eb0f06a70b64 --- /dev/null +++ b/views/docs/presentation.php @@ -0,0 +1,77 @@ +<?php +$this->renderPartial("../docs/assets"); +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "tv", + "title" => "Présentation", + "stitle" => "Ressources PDF", + "description" => "", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class="active"></li> + <!-- <li data-target="#docCarousel" data-slide-to="1" class=""></li> + <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li> --> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <div class="item active"> + <div class="panel panel-white user-list "> + <div class="panel-heading border-light"> + <a class="btn-chapter" href="javascript:urlCtrl.loadByHash('#default.view.page.presentation.dir.docs');"> + <h4 class="panel-title homestead text-red"><i class="fa fa-tv"></i> Présentation</h4> + </a> + </div> + <div class="panel-body"> + + <ul class="points"> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Outils au service d'une villle intelligente et citoyenne V.0.1.pdf"> Outils au service d'une villle intelligente et citoyenne V.0.1</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation Courte de Communecter - OPEN ATLAS.pdf"> Présentation Courte</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Présentation simplifiée de Communecter - OPEN ATLAS.pdf"> Présentation simplifiée</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Innovation Sociétale.pdf"> Innovation Sociétale</a> </li> + <li><i class='fa fa-arrow-right'></i><a target="_blank" href="https://www.communecter.org/doc/Plaquette Offre Carrefour des communes.pdf"> Plaquette Offre Carrefour des communes</a> </li> + </ul> + </div> + </div> + </div> + <!-- <div class="item"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> + <div class="item"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> + <div class="item"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> + <div class="item"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> --> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- Left and right CHAPTER controls --> +<a href="javascript:urlCtrl.loadByHash('#default.view.page.modules.dir.docs')" class="homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> Modules +</a> +<a href="javascript:urlCtrl.loadByHash('#default.view.page.communication.dir.docs')" class="homestead text-extra-large bg-red pull-right tooltips radius-5 padding-10 homestead btn-carousel-next"> + Communication <i class="fa fa-arrow-right"></i> +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("tv", "présentation"); +}); +</script> + + + diff --git a/views/docs/rd.php b/views/docs/rd.php new file mode 100755 index 0000000000000000000000000000000000000000..ed338a1a41f49122e25550cc42f79728139fe9f3 --- /dev/null +++ b/views/docs/rd.php @@ -0,0 +1,60 @@ +<?php +$this->renderPartial("../docs/assets"); + Menu::docs("elements", "comprendre"); + $this->renderPartial('../default/panels/toolbar'); + + $slide = isset($_GET["slide"]) ? $_GET["slide"] : ""; +?> +<style>.btn-nav-in-doc { display: none !important; }</style> + +<!-- header --> +<?php $this->renderPartial("../docs/docPattern/docHeader", array( + "icon" => "tachometer", + "title" => "R&D", + "stitle" => "Recherche et développement", + "description" => "", +)); ?> + +<div id="docCarousel" class="carousel slide" data-ride="carousel"> + <!-- Round button indicators --> + <ol class="carousel-indicators"> + <li data-target="#docCarousel" data-slide-to="0" class=" <?php if($slide=='roadmap' || $slide=='') echo "active"; ?>"></li> + <li data-target="#docCarousel" data-slide-to="1" class=""></li> + <!-- <li data-target="#docCarousel" data-slide-to="2" class=""></li> + <li data-target="#docCarousel" data-slide-to="3" class=""></li> + <li data-target="#docCarousel" data-slide-to="4" class=""></li> --> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner" role="listbox"> + <!-- <div class="item active"><img src="<?php echo $this->module->assetsUrl; ?>/images/docs/elements/index.png" class="img-schemas img-responsive "></div> --> + <div class="item <?php if($slide=='roadmap' || $slide=='') echo "active"; ?>"><?php $this->renderPartial("../docs/rd/roadmap", array("renderPartial"=>true)); ?></div> + <div class="item"><?php $this->renderPartial("../docs/rd/architecture", array("renderPartial"=>true)); ?></div> + <!-- <div class="item"><?php //$this->renderPartial("../docs/elements/projects", array("renderPartial"=>true)); ?></div> + <div class="item"><?php //$this->renderPartial("../docs/elements/events", array("renderPartial"=>true)); ?></div> --> + </div> + + <!-- Left and right SLIDER controls --> + <a class="left carousel-control" href="#docCarousel" role="button" data-slide="prev"> + <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> + <span class="sr-only">Précédent</span> + </a> + <a class="right carousel-control" href="#docCarousel" role="button" data-slide="next"> + <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> + <span class="sr-only">Suivant</span> + </a> +</div> + +<!-- Left and right CHAPTER controls --> +<a href="#default.view.page.histoire.dir.docs" class="lbh homestead text-extra-large bg-red pull-left tooltips radius-5 padding-10 homestead pull-left btn-carousel-previous"> + <i class="fa fa-arrow-left"></i> L'histoire +</a> + +<script type="text/javascript"> +jQuery(document).ready(function() { + initDocJs("tachometer", "rd"); +}); +</script> + + + diff --git a/views/docs/rd/architecture.php b/views/docs/rd/architecture.php new file mode 100755 index 0000000000000000000000000000000000000000..ff87dfecb3b2043a229be465d8985b04ac699622 --- /dev/null +++ b/views/docs/rd/architecture.php @@ -0,0 +1,59 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title text-red homestead"> <span style="font-size: 48px; "> Architecture</span></span> +</div> + +<style type="text/css"> + ul li{list-style: none;} +</style> +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body"> + <div class="col-xs-12"> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/MVC.png" data-title="Architecture Globale et repositories" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/MVC.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + <a class="thumb-info" href="<?php echo $this->module->assetsUrl; ?>/images/docs/archi.png" data-title="Structure des pages Communecter" data-lightbox="all"> + <img src="<?php echo $this->module->assetsUrl; ?>/images/docs/archi.png" class="col-md-6 col-xs-12 img-responsive "> + </a> + </div> + <div class="col-sm-12" style="margin-top: 20px"> + <div class="col-sm-12"> + <h2 class="text-red homestead">Communecter Stack </h2> + <ul> + <li><i class="fa fa-angle-right"></i> <a href="https://github.com/pixelhumain/communecter" target="_blank">sur GIT</a> </li> + <li><i class="fa fa-angle-right"></i> Classic Model View Controller Architecture</li> + <li><i class="fa fa-angle-right"></i> PHP5</li> + <li><i class="fa fa-angle-right"></i> mongoDB</li> + <li><i class="fa fa-angle-right"></i> A lot of Javascript</li> + <li><i class="fa fa-angle-right"></i> JQuery</li> + <li><i class="fa fa-angle-right"></i> Bootstrap</li> + <li><i class="fa fa-angle-right"></i> Font Awesome</li> + <li><i class="fa fa-angle-right"></i> API REST every where</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">CommunEvent Stack</h2> + <ul> + <li><i class="fa fa-angle-right"></i> <a href="https://github.com/pixelhumain/communEvent" target="_blank">sur GIT</a></li> + <li><i class="fa fa-angle-right"></i> Meteor (NodeJS) </li> + <li><i class="fa fa-angle-right"></i> MongoDB </li> + <li><i class="fa fa-angle-right"></i> API Communecter</li> + <li><i class="fa fa-angle-right"></i> Cordova Android</li> + <li><i class="fa fa-angle-right"></i> iOS </li> + </ul> + </div> + </div> + + <?php if(!isset($renderPartial) || $renderPartial != true){ ?> + <div class="col-sm-12"> + <a href="javascript:window.history.back();" class="text-extra-large bg-dark tooltips pull-left radius-5 padding-10 homestead" style="display: block;" ><i class="fa fa-arrow-left"></i> Retour </a> + </div> + <?php } ?> + </div> + </div> +</div> + diff --git a/views/docs/rd/roadmap.php b/views/docs/rd/roadmap.php new file mode 100755 index 0000000000000000000000000000000000000000..8587d30ee5612333a41ce3e8f68c0600af681b43 --- /dev/null +++ b/views/docs/rd/roadmap.php @@ -0,0 +1,121 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title text-red homestead"> <span style="font-size: 48px; "> Road to the Futur</span></span> +</div> + +<style type="text/css"> + ul li{list-style: none;} +</style> +<div class="col-sm-12 "> + + <div class=""> + + <div class="panel-body"> + La road map définit la liste des fonctionnalités qui vont être développées dans les futures versions. Comme dans tout projet open source, elle est mouvante et s'adapte au contexte et à la demande de la communauté. + + <div class="col-sm-12" style="margin-top: 20px"> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.2 : OBJECTIF 1.0</h2> + <ul> + <li><i class="fa fa-angle-right"></i> PPT explication des 25 use cases </li> + <li><i class="fa fa-angle-right"></i> Transparence des finances </li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.16 INTERACTION SIMPLIFIÉ</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Nouvel interface Ajout de membres d'une orga</li> + <li><i class="fa fa-angle-right"></i> Fonctionalité : Autour de moi </li> + <li><i class="fa fa-angle-right"></i> Simplification des formulaire , intégration de dynForm</li> + <li><i class="fa fa-angle-right"></i> Refactor Element : unification du code, Element devient le parent de tous nos types standards</li> + <li><i class="fa fa-angle-right"></i> Refonte du menu de gauche</li> + <li><i class="fa fa-angle-right"></i> Refonte de la recherche, et recherche par type </li> + <li><i class="fa fa-angle-right"></i> Amélioration d'architecture, utilisation des themes et SOC (separation des concerns) un ex : Notragora </li> + <li><i class="fa fa-angle-right"></i> Générateur d'iframe pour sortir une carto personnalisée</li> + <li><i class="fa fa-angle-right"></i> New Element Type : POI : point of interest</li> + <li><i class="fa fa-angle-right"></i> Moteur de Recherche sur DDA : débat et actions</li> + <li><i class="fa fa-angle-right"></i> Refactor de la localisation </li> + <li><i class="fa fa-angle-right"></i> Pouvoir ajouter plusieur Localité sur un élément</li> + <li><i class="fa fa-angle-right"></i> Ajout des QR codes pour interagir avec communEvent</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.15 INTERACT</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Refonte interface basé sur les propositions pertinentes Nuit Debout </li> + <li><i class="fa fa-angle-right"></i> Page Live</li> + <li><i class="fa fa-angle-right"></i> Section "En ce moment"</li> + <li><i class="fa fa-angle-right"></i> Multi Tag : Moteur de recherche par tags globalisé et personnalisé</li> + <li><i class="fa fa-angle-right"></i> Multi Scope : Moteur de recherche par localité géographique globalisé et personnalisé</li> + <li><i class="fa fa-angle-right"></i> Moteur de recherche : croisement multi scope et multi tags</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.14 SEE</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Refonte interface DDA</li> + <li><i class="fa fa-angle-right"></i> Documentation</li> + <li><i class="fa fa-angle-right"></i> Open Data préférence</li> + <li><i class="fa fa-angle-right"></i> Moteur de traduction, pour lire et convertir les sources externes ( ex : Open Agenda )</li> + <li><i class="fa fa-angle-right"></i> Open Edition ubiquité en préférence</li> + <li><i class="fa fa-angle-right"></i> Mentionner qlq'un dans une actu/News @someone </li> + <li><i class="fa fa-angle-right"></i> DDA : Ajouter un Framapad</li> + <li><i class="fa fa-angle-right"></i> Archiving : discussion, decision et action rooms</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.13</h2> + <ul> + <li><i class="fa fa-angle-right"></i> event refactor </li> + <li><i class="fa fa-angle-right"></i> no organiser : if you just want to share an event you're not organising </li> + <li><i class="fa fa-angle-right"></i> added subevents : if an event has a program with multiple sub events</li> + <li><i class="fa fa-angle-right"></i> open edition sur event</li> + <li><i class="fa fa-angle-right"></i> refactor city chooser </li> + <li><i class="fa fa-angle-right"></i> delete and update comments</li> + </ul> + </div> + </div> + <div class="col-sm-12" style="margin-top: 20px"> + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.12</h2> + <ul> + <li><i class="fa fa-angle-right"></i> amélioration du systeme validation </li> + <li><i class="fa fa-angle-right"></i> refactor et ajout des images sur les news</li> + <li><i class="fa fa-angle-right"></i> réintégration du module de vite et de discussion</li> + <li><i class="fa fa-angle-right"></i> module network , communecter en marque blanche </li> + <li><i class="fa fa-angle-right"></i> refactor de la structure des cities et des codepostaux</li> + <li><i class="fa fa-angle-right"></i> intégration de divers de data , makery, bretagne Telecom, commun59, service public</li> + <li><i class="fa fa-angle-right"></i> système et admin de modération</li> + <li><i class="fa fa-angle-right"></i> refonte et design de mail </li> + <li><i class="fa fa-angle-right"></i> gamification avec les actions</li> + </ul> + </div> + + <div class="col-sm-12"> + <h2 class="text-red homestead">version 0.1</h2> + <ul> + <li><i class="fa fa-angle-right"></i> Ajouter des citoyens, des organisations, des projets et des événements</li> + <li><i class="fa fa-angle-right"></i> Annuaire Personnel</li> + <li><i class="fa fa-angle-right"></i> Double Design : Web + Cartographique</li> + <li><i class="fa fa-angle-right"></i> Prototype Mobile Meteor</li> + <li><i class="fa fa-angle-right"></i> Page Ma Ville simple en mode annuaire local</li> + <li><i class="fa fa-angle-right"></i> Mur d'actualité pour toutes les entités</li> + <li><i class="fa fa-angle-right"></i> Système de notification</li> + <li><i class="fa fa-angle-right"></i> Viralité : connection avec GMail contacts, import CSV (invités, membres, contributeurs)</li> + </ul> + </div> + </div> + <?php if(!isset($renderPartial) || $renderPartial != true){ ?> + <div class="col-sm-12"> + <a href="javascript:window.history.back();" class="text-extra-large bg-dark tooltips pull-left radius-5 padding-10 homestead" style="display: block;" ><i class="fa fa-arrow-left"></i> Retour </a> + </div> + <?php } ?> + </div> + </div> +</div> + diff --git a/views/docs/slides/firstPitch.php b/views/docs/slides/firstPitch.php new file mode 100755 index 0000000000000000000000000000000000000000..0d9a7d43a42b1ab9858b17c481285824737f8676 --- /dev/null +++ b/views/docs/slides/firstPitch.php @@ -0,0 +1,42 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + + <span class="panel-title homestead"> <i class='fa fa-bullhorn faa-pulse animated fa-3x' style='margin-right:20px'></i> <span style="font-size: 48px; ">Communecter, c'est quoi ?</span></span> + <br/> + <span class="text-lextra-large">Archive présenté au Start Up Week End oct 2012 </span> + +</div> + +<style type="text/css"> + blockquote{font-size:20px} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + <div class="panel-heading border-light "> + <span class="panel-title homestead"> <i class="fa icon+' fa-2x"></i> <span style="font-size: 35px; color:#E33551">1er PITCH SUWE 2012, 1 min pour comprendre ! </span></span> + </div> + <div class="panel-body"> + + <blockquote class="space20"> + + <p class="text-lextra-large text-dark"> + Une plateforme de communication entre citoyens qui appartient aux citoyens, + <br/>avec une approche serieuse, ouverte, collaborative avec les pouvoirs publiques. + <br/>Parce qu'on aimerait participer un peu plus dans notre ville, et que tous ensemble, nous ne faisons qu'un.<br/> + <br/> + Concrètement :<br/> + Nous aimerions améliorer l'image de la ville, lui donner un visage humain<br/> + En appliquant le système des réseaux sociaux du web à la collectivité<br/> + <span class="text-bold bg-azure radius-5 padding-5" >Pour une ville aussi connectée que Facebook et aussi ouverte que Wikipedia</span><br/> + Pour une réflexion publique et une intelligence collective<br/> + <br/> + Repenser la ville via la participation citoyenne et la transparence<br/> + Offrir une Boite à idée : un Système décisionnel ouvert, participatif et démocratique <br/> + Proposer un Annuaire interactif des compétences locales pour particuliers et professionnels<br/> + </p> + <a href="#default.view.page.why.dir.docs|slides" class="lbh text-extra-large homestead bg-dark tooltips pull-right radius-5 padding-10" style="display: block;" > Hein... <i class="fa fa-arrow-right"></i> </a> + </blockquote> + </div> + </div> +</div> \ No newline at end of file diff --git a/views/docs/slides/presentFuture.php b/views/docs/slides/presentFuture.php new file mode 100755 index 0000000000000000000000000000000000000000..ba36f88302c6bbdeae5adc166823b53fb9463839 --- /dev/null +++ b/views/docs/slides/presentFuture.php @@ -0,0 +1,33 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead text-red"> <span style="font-size: 48px; "> PRESENT & FUTURE ?</span></span> +</div> + +<style type="text/css"> + li{font-size:25px} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + <div class="panel-body"> + + <ul class=" text-dark"> + <li>6 devs plein temps</li> + <li>30 communecteurs en France </li> + <li>+3000 inscrits en 1moi 1/2 de beta tests, sans etre ouvert !!</li> + <li>Campagne Crowdfunding de 22K€ en 1mois et demi </li> + <li>2 communes 974 , les 22 ou 37000 autres ?? </li> + <li><span class="text-bold bg-azure radius-5 padding-5" >Ouverture officiel en juin </span></li> + <li>Ouverture de la <b>« Sociétés coopératives d’intérêt collectif »</b> (SCIC)</li> + <li>Un mouvement collectif , cooperatif est en route </li> + <li>Communautés agissant pour le changement climatique et sociétal</li> + <li>On nous a parler d'un nb effrayant de citoyens acteurs des biens communs</li> + <li>Localement, "territoire experimental" dynamique mutli thematique </li> + <li><span class="text-bold bg-azure radius-5 padding-5" >CODE INVITATION : "smarterre" </span></li> + </ul> + <a href="#default.home" class="lbh text-extra-large homestead bg-dark tooltips pull-right radius-5 padding-10" style="display: block;" > En Film <i class="fa fa-arrow-right"></i> </a> + </div> + </div> +</div> + + \ No newline at end of file diff --git a/views/docs/slides/sit.php b/views/docs/slides/sit.php new file mode 100755 index 0000000000000000000000000000000000000000..9f34edb0474d48d802002e28e1c011a16d6d4937 --- /dev/null +++ b/views/docs/slides/sit.php @@ -0,0 +1,25 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title homestead"> <i class='fa fa-bullhorn faa-pulse animated fa-3x' style='margin-right:20px'></i> <span style="font-size: 48px; "> Concrètement ?</span></span> + <br/> + <span class="text-lextra-large">Un outil citoyen </span> +</div> + +<style type="text/css"> + blockquote{font-size:35px} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + <div class="panel-heading border-light "> + <span class="panel-title homestead"> <i class="fa icon+' fa-2x"></i> <span style="font-size: 35px; color:#E33551">S.I.T : Système d'information territorial </span></span> + </div> + <div class="panel-body"> + + <blockquote class=" text-dark">Internet et CivicTech </blockquote> + <blockquote class=" text-dark">Innovation et Evolution constante</blockquote> + <blockquote class=" text-dark text-bold">Le citoyen au centre</blockquote> + <a href="#person.detail.id.<?php echo Yii::app()->session['userId']?>" class="lbh homestead bg-red tooltips text-extra-large pull-right radius-5 padding-10" style="display: block;" >du virtuel au réél, c'est parti <i class="fa fa-arrow-right"></i> </a> + </div> + </div> +</div> \ No newline at end of file diff --git a/views/docs/slides/why.php b/views/docs/slides/why.php new file mode 100755 index 0000000000000000000000000000000000000000..55ecab7485a647724b206327fe8f1126e43b4883 --- /dev/null +++ b/views/docs/slides/why.php @@ -0,0 +1,23 @@ + +<div class="panel-heading border-light center text-dark partition-white radius-10"> + <span class="panel-title text-red homestead"> <span style="font-size: 48px; "> COMMUNECTER : c'est etre connecter à sa commune</span></span> +</div> + +<style type="text/css"> + blockquote{font-size:35px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body"> + <blockquote class=" text-dark"><b>Un Système d'information Territorial</b></blockquote> + <blockquote class=" text-dark"><b>Un réseau sociétal libre</b></blockquote> + <blockquote class=" text-dark">Acteurs, Activités et des Actions</blockquote> + <blockquote class=" text-dark">Découvrir, Comprendre et Dynamiser</blockquote> + <blockquote class=" text-dark">Créer du lien</blockquote> + <blockquote class=" text-dark"><b>Libre</b> : L'Opensource porte les valeurs du bien communs</blockquote> + <a href="#person.detail.id.<?php echo Yii::app()->session['userId']?>" class="lbh text-extra-large bg-dark tooltips pull-right radius-5 padding-10 homestead" style="display: block;" > Concrètement <i class="fa fa-arrow-right"></i> </a> + </div> + </div> +</div> \ No newline at end of file diff --git a/views/docs/video.php b/views/docs/video.php new file mode 100755 index 0000000000000000000000000000000000000000..958080871700a770c0f557a0ce0fb9484254caad --- /dev/null +++ b/views/docs/video.php @@ -0,0 +1,65 @@ + +<style type="text/css"> + ul li {list-style: none} + .tpl_title{font-size: 48px;} + .panel-title {font-size:25px;} + .panel-body{border-top: 1px solid #ccc; font-weight: bolder; color:#000;} + .points{padding-left:10px;} +</style> +<div class="col-sm-12 "> + + <div class="panel panel-white "> + + <div class="panel-body tpl_content"> + + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://player.vimeo.com/video/133636468?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Communecter - réseau sociétal libre + </div> + </div> + + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://player.vimeo.com/video/161594058?color=ff9933&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + et toi, t’es communecteÌ ? + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://player.vimeo.com/video/74212373?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Le Pixel Humain : réseau social citoyen libre (court) + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://player.vimeo.com/video/147290335?color=c9ff23&byline=0&portrait=0" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> + <div class="panel-body" > + Loca’Terre - Communectez-vous ! + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://www.youtube.com/embed/66m1hm3A2ic" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + (SAC) Service d'Aide Communecter - Fils d'actualités + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-4 center "> + <iframe src="https://www.youtube.com/embed/f1vFrHklWso" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + Open source project and organization + </div> + </div> + <div class="panel panel-white col-sm-12 col-md-4 center"> + <iframe src="https://www.youtube.com/embed/LVWwLZif_MY" frameborder="0" allowfullscreen></iframe> + <div class="panel-body" > + Dans mon village, je suis communecté + </div> + </div> + + </div> +</div> +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("<span class='text-red'>DOC</span> : Vidéos</span>","video-camera","DOC : Vidéos"); +}); +</script> \ No newline at end of file diff --git a/views/element/about.php b/views/element/about.php new file mode 100644 index 0000000000000000000000000000000000000000..1ebe246b129b3c62fdddc80749d708b53f9d146a --- /dev/null +++ b/views/element/about.php @@ -0,0 +1,640 @@ +<?php + $cssAnsScriptFilesModule = array( + //Data helper + '/js/dataHelpers.js', + '/js/default/editInPlace.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +?> +<style type="text/css"> + .valueAbout{ + border-left: 1px solid #dbdbdb; + } + #shortDescriptionAbout{ + white-space: pre-line; + } + + /*#descriptionAbout{ + padding-left : 10px; + }*/ + + .contentInformation{ + border-bottom: 1px solid #dbdbdb; + } + #ficheInfo{ + border:inherit !important; + } + .labelAbout span{ + width: 20px; + padding-right: 5px; + text-align: -moz-center; + text-align: center; + text-align: -webkit-center; + float: left; + } + .labelAbout span i{ + font-size: 14px; + } + .panel-title{ + line-height:35px; + } + + .md-preview{ + text-align:left; + padding: 0px 10px; + } + + .md-editor > textarea { + padding: 10px; + } + + .descriptiontextarea label{ + margin-left:10px; + } + + + @media (min-width: 1200px) { + .no-ing{ + padding-left: 15px !important; + } + } +</style> + +<div class='col-md-12 margin-bottom-15'> + <i class="fa fa-info-circle fa-2x"></i><span class='Montserrat' id='name-lbl-title'> <?php echo Yii::t("common","About") ?></span> +</div> + +<div id="ficheInfo" class="panel panel-white col-lg-12 col-md-12 col-sm-12 no-padding shadow2"> + + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-file-text-o"></i> <?php echo Yii::t("common","Descriptions") ?> + </h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-descriptions btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update description") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> + </div> + <div class="panel-body no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-3 col-sm-3 col-xs-3 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-quote-left"></i></span> <?php echo Yii::t("common", "Short description") ?> + </div> + <div id="shortDescriptionAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs col-xs-12 no-padding"><i class="fa fa-quote-left"></i> <?php echo Yii::t("common", "Short description") ?>: </span><?php echo (@$element["shortDescription"]) ? $element["shortDescription"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + <span id="shortDescriptionAboutEdit" name="shortDescriptionAboutEdit" class="hidden" ><?php echo (!empty($element["shortDescription"])) ? $element["shortDescription"] : ""; ?></span> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-3 col-sm-3 col-xs-3 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-paragraph"></i></span> <?php echo Yii::t("common", "Description") ?> + </div> + <div class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10" + style="word-wrap: break-word; overflow:hidden;"> + <span class="visible-xs col-xs-12 no-padding"> + <i class="fa fa-paragraph"></i> <?php echo Yii::t("common", "Description") ?>: + </span> + <div id="descriptionAbout"><?php echo (@$element["description"]) ? $element["description"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + </div> + </div> +</div> +<div id="ficheInfo" class="panel panel-white col-lg-8 col-md-12 col-sm-12 no-padding shadow2"> + + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-address-card-o"></i> <?php echo Yii::t("common","General information") ?> + </h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-info btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update general information") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> + </div> + <div class="panel-body no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-pencil"></i></span> <?php echo Yii::t("common", "Name") ?> + </div> + <div id="nameAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Name") ?> :</span> <?php echo $element["name"]; ?> + </div> + </div> + <?php if($type==Project::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-line-chart"></i></span> <?php echo Yii::t("project","Project maturity"); ?> + </div> + <div id="avancementAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-line-chart"></i> <?php echo Yii::t("project","Project maturity"); ?> :</span><?php echo (@$element["properties"]["avancement"]) ? Yii::t("project",$element["properties"]["avancement"]) : '<i>'.Yii::t("common","Not specified").'</i>' ?> + </div> + </div> + <?php } ?> + + <?php if($type==Person::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-user-secret"></i></span> <?php echo Yii::t("common","Username"); ?> + </div> + <div id="usernameAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-user-secret"></i><?php echo Yii::t("common","Username"); ?> :</span><?php echo (@$element["username"]) ? $element["username"] : '<i>'.Yii::t("common","Not specified").'</i>' ?> + </div> + </div> + <?php if(Preference::showPreference($element, $type, "birthDate", Yii::app()->session["userId"])){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-birthday-cake"></i></span> <?php echo Yii::t("person","Birth date"); ?> + </div> + <div id="birthDateAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-birthday-cake"></i> <?php echo Yii::t("person","Birth date"); ?> :</span><?php echo (@$element["birthDate"]) ? date("d/m/Y", strtotime($element["birthDate"])) : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + <?php } + } + + + if($type==Organization::COLLECTION || $type==Event::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-angle-right"></i></span><?php echo Yii::t("common", "Type"); ?> + </div> + <div id="typeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-angle-right"></i> <?php echo Yii::t("common", "Type"); ?> :</span> + + <?php + if(@$typesList && @$element["type"]) + $showType=Yii::t( "category",$typesList[$element["type"]]); + else if (@$element["type"]) + $showType=Yii::t( "category",$element["type"]); + else + $showType='<i>'.Yii::t("common","Not specified").'</i>'; + echo $showType; ?> + </div> + </div> + <?php } + + if( ( $type==Person::COLLECTION && + Preference::showPreference($element, $type, "email", Yii::app()->session["userId"]) ) || + $type == Organization::COLLECTION ) { ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-envelope"></i></span> <?php echo Yii::t("common","E-mail"); ?> + </div> + <div id="emailAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-envelope"></i> <?php echo Yii::t("common","E-mail"); ?> :</span><?php echo (@$element["email"]) ? $element["email"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + <?php } ?> + + + + <?php if($type != Person::COLLECTION && $type != Organization::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-link"></i></span> <?php echo Yii::t("common","Carried by"); ?> + </div> + <div id="parentAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Carried by"); ?> :</span> + <?php + if(!empty($element["parent"])){ ?> + <a href="#page.type.<?php echo $element['parentType']; ?>.id.<?php echo $element['parentId']; ?>" class="lbh"> + <i class="fa fa-<?php echo Element::getFaIcon($element['parentType']); ; ?>"></i> + <?php echo $element['parent']['name']; ?></a><br/> + <?php }else + echo '<i>'.Yii::t("common","Not specified").'</i>';?> + </div> + </div> + <?php } ?> + + <?php if($type == Event::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-link"></i></span> <?php echo Yii::t("common","Organized by"); ?> + </div> + <div id="organizerAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Organized by"); ?> :</span> + <?php + if(!empty($element["organizer"])){ ?> + <a href="#page.type.<?php echo $element['organizerType']; ?>.id.<?php echo $element['organizerId']; ?>" class="lbh"> + <i class="fa fa-<?php echo Element::getFaIcon($element['organizerType']); ; ?>"></i> + <?php echo $element['organizer']['name']; ?></a><br/> + <?php }else + echo '<i>'.Yii::t("common","Not specified").'</i>';?> + </div> + </div> + <?php } ?> + + + + + + <?php if($type!=Poi::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-desktop"></i></span> <?php echo Yii::t("common","Website URL"); ?> + </div> + <div id="webAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Website URL"); ?> :</span> + <?php + if(@$element["url"]){ + //If there is no http:// in the url + $scheme = ( (!preg_match("~^(?:f|ht)tps?://~i", $element["url"]) ) ? 'http://' : "" ) ; + echo '<a href="'.$scheme.$element['url'].'" target="_blank" id="urlWebAbout" style="cursor:pointer;">'.$element["url"].'</a>'; + }else + echo '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + <?php } ?> + <?php if($type==Organization::COLLECTION || $type==Person::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-phone"></i></span> <?php echo Yii::t("common","Phone"); ?> + </div> + <div id="fixeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-phone"></i> <?php echo Yii::t("common","Phone"); ?> :</span><?php + $fixe = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["fixe"])) + $fixe = ArrayHelper::arrayToString($element["telephone"]["fixe"]); + + echo $fixe; + ?> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-mobile"></i></span> <?php echo Yii::t("common","Mobile"); ?> + </div> + <div id="mobileAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"> + <i class="fa fa-mobile"></i> <?php echo Yii::t("common","Mobile"); ?> : + </span> + <?php + $mobile = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["mobile"])) + $mobile = ArrayHelper::arrayToString($element["telephone"]["mobile"]); + echo $mobile; + ?> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-fax"></i></span> <?php echo Yii::t("common","Fax"); ?> + </div> + <div id="faxAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"> + <i class="fa fa-fax"></i> <?php echo Yii::t("common","Fax"); ?> : + </span> + <?php + $fax = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["fax"]) ) + $fax = ArrayHelper::arrayToString($element["telephone"]["fax"]); + echo $fax; + ?> + </div> + </div> + <?php } ?> + + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-hashtag"></i></span> <?php echo Yii::t("common","Tags"); ?> + </div> + <div id="tagsAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"> + <i class="fa fa-hashtag"></i> <?php echo Yii::t("common","Tags"); ?> : + </span> + <?php if(!empty($element["tags"])){ + foreach ($element["tags"] as $key => $tag) { + echo '<span class="badge letter-red bg-white">'.$tag.'</span>'; + } + }else{ + echo '<i>'.Yii::t("common","Not specified").'</i>'; + } ?> + </div> + </div> + </div> + +</div> + +<div class="no-ing col-lg-4 col-md-12 col-sm-12 col-xs-12 no-padding"> +<?php if($type==Event::COLLECTION || $type==Project::COLLECTION){ ?> + <div id="socialAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2"> + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <a id="dateTimezone" href="javascript:;" class="tooltips text-dark" data-original-title="" data-toggle="tooltip" data-placement="right"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-clock-o"></i> <?php echo Yii::t("common","When"); ?> + </h4> + </a> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-when btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update date") ?>"> + <b><i class="fa fa-pencil"></i></b> + </button> + <?php } ?> + </div> + <div class="panel-body no-padding"> + <?php if($type==Event::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10"> + <span><?php echo Yii::t("common","All day")?> : </span> + <span id="allDayAbout" class="" > + <?php echo (isset($element["allDay"]) ? Yii::t("common","Yes") : Yii::t("common","No") ); ?> + </span> + </div> + <?php } ?> + + <div id="divStartDate" class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10"> + <span><?php echo Yii::t("event","From") ?> </span><span id="startDateAbout" class="" ><?php echo (isset($element["startDate"]) ? $element["startDate"] : "" ); ?></span> + </div> + <div id="divEndDate" class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10"> + <span><?php echo Yii::t("common","To") ?></span> <span id="endDateAbout" class=""><?php echo (isset($element["endDate"]) ? $element["endDate"] : "" ); ?></span> + </div> + <div id="divNoDate" class="col-md-12 col-sm-12 col-xs-12 contentInformation padding-10"> + <span>Pas de date</span> + </div> + + </div> + </div> + <?php } ?> + + <div id="adressesAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2"> + <div class="panel-heading border-light padding-15" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark"> + <i class="fa fa-map-marker"></i> <?php echo Yii::t("common","Localitie(s)"); ?> + </h4> + </div> + <div class="panel-body no-padding"> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 labelAbout padding-10"> + <span><i class="fa fa-home"></i></span> <?php echo Yii::t("common", "Main locality") ?> + <?php if (!empty($element["address"]["codeInsee"]) && ( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) ) { + echo '<a href="javascript:;" id="btn-remove-geopos" class="pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Remove Locality").'"> + <i class="fa text-red fa-trash-o"></i> + </a> + <a href="javascript:;" class="btn-update-geopos pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Update Locality").'" > + <i class="fa text-red fa-map-marker"></i> + </a> '; + } ?> + </div> + <div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important"> + <?php + if( ($type == Person::COLLECTION && Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])) || $type!=Person::COLLECTION) { + $address = ""; + $address .= '<span id="detailAddress"> '. + (( @$element["address"]["streetAddress"]) ? + $element["address"]["streetAddress"]."<br/>": + ((@$element["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality"))); + $address .= (( @$element["address"]["postalCode"]) ? + $element["address"]["postalCode"].", " : + "") + ." ".(( @$element["address"]["addressLocality"]) ? + $element["address"]["addressLocality"] : "") ; + $address .= (( @$element["address"]["addressCountry"]) ? + ", ".OpenData::$phCountries[ $element["address"]["addressCountry"] ] + : ""). + '</span>'; + echo $address; + if( empty($element["address"]["codeInsee"]) && Yii::app()->session["userId"] == (String) $element["_id"]) { ?> + <br><a href="javascript:;" class="cobtn btn btn-danger btn-sm" style="margin: 10px 0px;"> + <?php echo Yii::t("common", "Connect to your city") ?></a> + <a href="javascript:;" class="whycobtn btn btn-default btn-sm explainLink" style="margin: 10px 0px;" onclick="showDefinition('explainCommunectMe',true)"> + <?php echo Yii::t("common", "Why ?") ?></a> + <?php } + }else + echo '<i>'.Yii::t("common","Not specified").'</i>'; + ?> + </div> + </div> + <?php if( !empty($element["addresses"]) ){ ?> + <div class="col-md-12 col-xs-12 labelAbout padding-10"> + <span><i class="fa fa-map"></i></span> <?php echo Yii::t("common", "Others localities") ?> + </div> + <div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important"> + <?php foreach ($element["addresses"] as $ix => $p) { ?> + <span id="addresses_<?php echo $ix ; ?>"> + <span> + <?php + $address = '<span id="detailAddress_'.$ix.'"> '. + (( @$p["address"]["streetAddress"]) ? + $p["address"]["streetAddress"]."<br/>": + ((@$p["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality"))); + $address .= (( @$p["address"]["postalCode"]) ? + $p["address"]["postalCode"].", " : + "") + ." ".(( @$p["address"]["addressLocality"]) ? + $p["address"]["addressLocality"] : "") ; + $address .= (( @$p["address"]["addressCountry"]) ? + ", ".OpenData::$phCountries[ $p["address"]["addressCountry"] ] + : ""). + '</span>'; + echo $address; + ?> + + <?php if( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) { ?> + <a href='javascript:removeAddresses("<?php echo $ix ; ?>");' class="addresses pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Remove Locality");?>"><i class="fa text-red fa-trash-o"></i></a> + <a href='javascript:updateLocalityEntities("<?php echo $ix ; ?>", <?php echo json_encode($p);?>);' class=" pull-right pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Locality");?>"><i class="fa text-red fa-map-marker addresses"></i></a></span> + <?php } ?> + </span> + <hr/> + <?php } ?> + </div> + <?php } ?> + <div class="text-right padding-10"> + <?php if(empty($element["address"]) && $type!=Person::COLLECTION && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )){ ?> + <b><a href="javascript:;" class="btn btn-default letter-blue margin-top-5 addresses btn-update-geopos"> + <i class="fa fa-map-marker"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add a primary address") ; ?></span> + </a></b> + <?php } + if($type!=Person::COLLECTION && !empty($element["address"]) && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )) { ?> + <b><a href='javascript:updateLocalityEntities("<?php echo count(@$element["addresses"]) ; ?>");' id="btn-add-geopos" class="btn btn-default letter-blue margin-top-5 addresses" style="margin: 10px 0px;"> + <i class="fa fa-plus" style="margin:0px !important;"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add an address"); ?></span> + </a></b> + <?php } ?> + </div> + </div> + + <?php + + if($type!=Poi::COLLECTION){ + $skype = (!empty($element["socialNetwork"]["skype"])? $element["socialNetwork"]["skype"]:"javascript:;") ; + $telegram = (!empty($element["socialNetwork"]["telegram"])? "https://web.telegram.org/#/im?p=@".$element["socialNetwork"]["telegram"]:"javascript:;") ; + $facebook = (!empty($element["socialNetwork"]["facebook"])? $element["socialNetwork"]["facebook"]:"javascript:;") ; + $twitter = (!empty($element["socialNetwork"]["twitter"])? $element["socialNetwork"]["twitter"]:"javascript:;") ; + $googleplus = (!empty($element["socialNetwork"]["googleplus"])? $element["socialNetwork"]["googleplus"]:"javascript:;") ; + $github = (!empty($element["socialNetwork"]["github"])? $element["socialNetwork"]["github"]:"javascript:;") ; + $instagram = (!empty($element["socialNetwork"]["instagram"])? $element["socialNetwork"]["instagram"]:"javascript:;") ; + ?> + <div id="socialAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding shadow2"> + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-connectdevelop"></i> <?php echo Yii::t("common","Socials"); ?> + </h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) {?> + <button class="btn-update-network btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update network") ?>"> + <b><i class="fa fa-pencil"></i></b> + </button> + <?php } ?> + </div> + <div class="panel-body no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Facebook"> + <span><i class="fa fa-facebook"></i></span> + <?php if ($facebook != "javascript:;"){ ?> + <a href="<?php echo $facebook ; ?>" target="_blank" id="facebookAbout" class="socialIcon "><?php echo $facebook ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Twitter"> + <span><i class="fa fa-twitter"></i></span> + <?php if ($twitter != "javascript:;"){ ?> + <a href="<?php echo $twitter ; ?>" target="_blank" id="twitterAbout" class="socialIcon" ><?php echo $twitter ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Instagram"> + <span><i class="fa fa-instagram"></i></span> + <?php if ($instagram != "javascript:;"){ ?> + <a href="<?php echo $instagram ; ?>" target="_blank" id="instagramAbout" class="socialIcon" ><?php echo $instagram ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Skype" > + <span><i class="fa fa-skype"></i></span> + <?php if ($skype != "javascript:;"){ ?> + <a href="<?php echo $skype ; ?>" target="_blank" id="skypeAbout" class="socialIcon" ><?php echo $skype ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Google Plus"> + <span><i class="fa fa-google-plus"></i></span> + <?php if ($googleplus != "javascript:;"){ ?> + <a href="<?php echo $googleplus ; ?>" target="_blank" id="gpplusAbout" class="socialIcon" ><?php echo $googleplus ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="GitHub"> + <span><i class="fa fa-github"></i></span> + <?php if ($github != "javascript:;"){ ?> + <a href="<?php echo $github ; ?>" target="_blank" id="githubAbout" class="socialIcon" ><?php echo $github ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <?php if($type==Person::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation social padding-10 tooltips" data-toggle="tooltip" data-placement="left" title="Telegram"> + <span><i class="fa fa-telegram"></i></span> + <?php if ($telegram != "javascript:;"){ ?> + <a href="<?php echo $telegram ; ?>" target="_blank" id="telegramAbout" class="socialIcon" ><?php echo $telegram ; ?></a> + <?php } else { + echo '<i>'.Yii::t("common","Not specified").'</i>' ; + } ?> + </div> + <?php } ?> + </div> + </div> + <?php } ?> +</div> + +<?php $this->renderPartial('../pod/whycommunexion',array()); ?> + +<script type="text/javascript"> + + var formatDateView = "DD MMMM YYYY à HH:mm" ; + var formatDatedynForm = "DD/MM/YYYY HH:mm" ; + /*if( (typeof contextData.allDay != "undefined" && contextData.allDay == true) || contextData.type == "<?php //echo Project::COLLECTION; ?>" ) { + formatDateView = "DD MMMM YYYY" ; + formatDatedynForm = "DD/MM/YYYY" ; + }*/ + + jQuery(document).ready(function() { + bindDynFormEditable(); + initDate(); + inintDescs(); + //changeHiddenFields(); + bindAboutPodElement(); + bindExplainLinks(); + + $("#small_profil").html($("#menu-name").html()); + $("#menu-name").html(""); + + $(".cobtn").click(function () { + communecterUser(); + }); + + $(".btn-update-geopos").click(function(){ + updateLocalityEntities(); + }); + + $("#btn-add-geopos").click(function(){ + updateLocalityEntities(); + }); + + $("#btn-update-organizer").click(function(){ + updateOrganizer(); + }); + $("#btn-add-organizer").click(function(){ + updateOrganizer(); + }); + + $("#btn-remove-geopos").click(function(){ + removeAddress(); + }); + + $("#btn-update-geopos-admin").click(function(){ + findGeoPosByAddress(); + }); + + //console.log("contextDatacontextData", contextData, contextData.type,contextData.id); + //buildQRCode(contextData.type,contextData.id.$id); + + }); + + function initDate() {//DD/mm/YYYY hh:mm + //moment.locale('fr'); + if( (typeof contextData.allDay != "undefined" && contextData.allDay == true) || contextData.type == "<?php echo Project::COLLECTION; ?>" ) { + formatDateView = "DD MMMM YYYY" ; + formatDatedynForm = "DD/MM/YYYY" ; + }else{ + formatDateView = "DD MMMM YYYY à HH:mm" ; + formatDatedynForm = "DD/MM/YYYY HH:mm" ; + } + + if( typeof contextData.startDate != "undefined" && contextData.startDate != "" ){ + $("#divStartDate").removeClass("hidden"); + $("#divNoDate").addClass("hidden"); + } + else{ + $("#divStartDate").addClass("hidden"); + $("#divNoDate").removeClass("hidden"); + } + + if( typeof contextData.endDate != "undefined" && contextData.endDate != "" ) + $("#divEndDate").removeClass("hidden"); + else + $("#divEndDate").addClass("hidden"); + mylog.log("formatDateView", formatDateView); + if($("#startDateAbout").html() != "") + $("#startDateAbout").html(moment(contextData.startDateDB).local().locale(mainLanguage).format(formatDateView)); + if($("#endDateAbout").html() != "") + $("#endDateAbout").html(moment( contextData.endDateDB).local().locale(mainLanguage).format(formatDateView)); + + if($("#birthDate").html() != "") + $("#birthDate").html(moment($("#birthDate").html()).local().locale(mainLanguage).format("DD/MM/YYYY")); + $('#dateTimezone').attr('data-original-title', "Fuseau horaire : GMT " + moment().local().format("Z")); + } + + + + + +</script> \ No newline at end of file diff --git a/views/element/addMembersFromMyContacts.php b/views/element/addMembersFromMyContacts.php new file mode 100644 index 0000000000000000000000000000000000000000..7c8916f5136d43254e80f9bd2cc01b49e7104551 --- /dev/null +++ b/views/element/addMembersFromMyContacts.php @@ -0,0 +1,1538 @@ +<style> + + /* MODAL */ + + @media screen and (min-width: 768px) { + #modalDirectoryForm #modal-scope .modal-dialog{ + width:760px + } + } + #modalDirectoryForm .modal-header, + #modalDirectoryForm .modal-footer{ + background-color: #EAEAEA !important; + color: #2D6569 !important; + display: block !important; + } + + #modalDirectoryForm .modal-header button.close{ + color: 2D6569 !important; + opacity: 0.6 !important; + } + #modalDirectoryForm #list-scroll-type{ + max-height:400px; + min-height:250px; + overflow-y:auto; + overflow-x:hidden; + padding-top:15px; + border-left: 1px solid rgba(128, 128, 128, 0.26); + } + #modalDirectoryForm #list-scroll-type .panel-default, + #modalDirectoryForm #list-scroll-type .panel-heading, + #modalDirectoryForm #list-scroll-type .panel-body{ + margin-bottom: 0px; + } + + #modalDirectoryForm #list-scroll-type .input-group{ + margin-bottom:10px; + } + #modalDirectoryForm #list-scroll-type input.form-control{ + border-radius: 0px 4px 4px 0px !important; + text-align: left!important; + } + + #modalDirectoryForm .modal .panel-heading{ + padding: 0px; + min-height: auto; + background-color: transparent; + border: none; + } + + #modalDirectoryForm .form-control{ + /*width:unset;*/ + padding: 0px 5px; + } + #modalDirectoryForm .modal input#search-contact{ + width: 66.66666667%; + margin-top: -8px; + margin-right: 0px; + padding-left: 10px; + padding-right: 10px; + /*height: 52px;*/ + border-radius: 0px; + text-align:left; + background-color: rgba(255, 255, 255, 0.54); + } + + #modalDirectoryForm .modal .panel-heading h4{ + margin:0px; + font-size: 18px !important; + background-color: rgba(114, 114, 114, 0.1); + padding: 10px; + border-radius: 0px; + } + #modalDirectoryForm .modal-body{ + padding: 0px 15px; + } + + #modalDirectoryForm .panel-body{ + background-color: transparent !important; + } + #modalDirectoryForm .modal .panel{ + padding: 0px; + background-color: transparent; + border: none; + box-shadow: none; + } + #modalDirectoryForm .modal ul{ + list-style: none !important; + padding-left: 0px; + margin-bottom:20px; + } + + #modalDirectoryForm .modal .list-group{ + margin-bottom:0px !important; + } + #modalDirectoryForm .modal #list-scroll-type ul{ + margin-bottom:0px !important; + } + #modalDirectoryForm .modal #menu-type ul li{ + font-size:16px; + } + #modalDirectoryForm .modal #menu-type ul li i{ + width:20px; + text-align: center; + } + #modalDirectoryForm .modal #menu-type ul li a:hover{ + color:inherit !important; + text-decoration: underline; + } + #modalDirectoryForm .modal .btn-scroll-type{ + border:none!important; + padding: 3px; + text-align: left; + /*width: 100%;*/ + } + #modalDirectoryForm .modal .btn-select-contact{ + min-width:70% !important; + } + + #modalDirectoryForm .modal #menu-type .btn-scroll-type{ + border:none!important; + padding: 2px; + text-align: left; + width: 92%; + margin-left: 4%; + padding: 6px 4px 4px 8px; + margin-bottom: 3px; + background:transparent !important; + } + #modalDirectoryForm .modal #menu-type .btn-scroll-type:hover{ + background-color:rgba(0, 0, 0, 0.04) !important; + } + #modalDirectoryForm .modal #scope-postal-code{ + width: 99%; + display: none; + margin-left: -1% !important; + } + #modalDirectoryForm .modal .info-contact{ + display: inline-block !important; + vertical-align: middle; + } + #modalDirectoryForm .modal .scope-city-contact{ + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + max-width: 160px; + display: inline-block; + height: 15px; + } + #modalDirectoryForm .modal .scope-name-contact{ + display: inline-block; + vertical-align: middle; + text-align: left; + max-width: 200px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + font-size: 12px; + } + #modalDirectoryForm .modal .thumb-send-to { + width: 35px; + height: 35px; + background-color: #DADADA; + border-radius: 4px; + margin:5px; + } + #modalDirectoryForm .modal .text-light{ + font-weight:500; + color:#8C8C8C !important; + } + + #modalDirectoryForm .modal h4 { + font-size : 14px; + } + + #modalDirectoryForm .modal #menu-type h4 { + background-color: rgba(35, 83, 96, 0.15); + color: #2D6569; + width: 100%; + float: left; + padding: 10px 10px 10px 20px; + margin: 0; + margin-bottom: 10px; + } + .btn-is-admin{ + text-decoration: line-through; + display:none; + } + .divRoles{ + margin:5px; + display:none; + } + .btn-is-admin.selected{ + display:inline; + } + .divRoles.selected{ + display:block; + } + .btn-is-admin.selected.isAdmin { + text-decoration: none; + } + .btn-is-admin.selected.isAdmin a{ + color:#5cb85c!important; + } + + .dropdown-menu-invite{ + top:31px; + } + + + #listEmailGrid .item_map_list{ + padding:10px 10px 10px 0px !important; + margin-top:0px; + text-decoration:none; + background-color:white; + border: 1px solid rgba(0, 0, 0, 0.08); /*rgba(93, 93, 93, 0.15);*/ + /*text-align: center;*/ + } + #listEmailGrid .item_map_list_blue{ + background-color:rgba(0, 0, 0, 0.08); + padding:10px 10px 10px 0px !important; + margin-top:0px; + text-decoration:none; + border: 1px solid rgba(0, 0, 0, 0.08); /*rgba(93, 93, 93, 0.15);*/ + /*text-align: center;*/ + } + #listEmailGrid .item_map_list .left-col .thumbnail-profil{ + width: 75px; + height: 75px; + } + + +</style> + +<div id="addMembers"> + <input type="hidden" id="parentOrganisation" name="parentOrganisation" value="<?php echo $parentId; ?>"/> +</div> + +<div id="formSendMailInvite" class="hidden"> + <div class="text-red"><i class="fa fa-ban"></i> <?php echo Yii::t("common","No results match in your search"); ?></div> + <hr> + <h3 class='text-dark'><i class="fa fa-angle-down"></i> <?php echo Yii::t("common","Invite by mail"); ?></h3> + <div id="addMembers" style="line-height:40px; padding:0px;" autocomplete="off" submit='false'> + <input type="hidden" id="parentOrganisation" name="parentOrganisation" value="<?php echo (string)$parentId; ?>"/> + <input type="hidden" id="memberId" name="memberId" value=""/> + <div class="form-group" id="addMemberSection"> + + <input type="radio" value="citoyens" name="memberType" data-fa="user" checked> <i class="fa fa-user"></i> <?php echo Yii::t("common","a citizen"); ?> + <?php if($type != "events" || Authorisation::isElementAdmin($parentId, $type, @Yii::app()->session["userId"])){ ?> + <input type="radio" value="organizations" name="memberType" data-fa="group" style="margin-left:25px;"> <i class="fa fa-group"></i> <?php echo Yii::t("common","an organization"); ?> + <?php } ?> + <div class="input-group"> + <span class="input-group-addon" id="basic-addon1"> + <i class="fa fa-user text-dark searchIcon tooltips" id="fa-type-contact-mail"></i> + </span> + <input class="form-control" placeholder="Son nom" id="memberName" name="memberName" value=""/> + </div> + <div class="input-group"> + <span class="input-group-addon" id="basic-addon1"> + <i class="fa fa-envelope-o text-dark searchIcon tooltips"></i> + </span> + <input class="member-email form-control text-left" placeholder="Son address@email.xxx" + autocomplete="off" id="memberEmail" name="memberEmail" value=""/> + </div> + <div class="input-group organization-type"> + <span class="input-group-addon" id="basic-addon1"> + <i class="fa fa-users text-dark searchIcon tooltips"></i> + </span> + <select class="member-organization-type form-control text-left" autocomplete="off" id="organizationType" name="organizationType" value=""/> + </div> + <div class="col-md-12 no-padding"> + <span id='isAdminDiv' ><input type="checkbox" id="memberIsAdmin" value="true"> <i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Add as admin"); ?></span> + <button class="btn btn-primary pull-right" onclick="sendInvitationMailAddMember()"> + <i class="fa fa-send"></i> <?php echo Yii::t("common","Send invitation"); ?> + </button> + </div> + <div class="col-md-12 padding-15 text-right" id="loader-send-mail-invite" style="margin-bottom:10px;"> + </div> + </div> + </div> +</div> + + +<script type="text/javascript"> +var elementType = "<?php echo $type; ?>"; +var elementId = "<?php echo $parentId; ?>" +var myContactsMembers = $.extend( true, {}, myContacts ); +var listContact = new Array(); +var newMemberInCommunity = false; +var isElementAdmin= "<?php echo Authorisation::isElementAdmin($parentId, $type, @Yii::app()->session["userId"]) ?>"; +var contactTypes = [{ name : "people", color: "yellow", icon:"user", label:"People" }]; +var listMails = {}; +var rolesList=[ tradCategory.financier, tradCategory.partner, tradCategory.sponsor, tradCategory.organizor, tradCategory.president, tradCategory.director, tradCategory.speaker, tradCategory.intervener]; +if(elementType != "<?php echo Event::COLLECTION ?>" || isElementAdmin) + contactTypes.push({ name : "organizations", color: "green", icon:"group", label:"Organizations" }); + + +var members = <?php echo json_encode(@$members) ?>; + +var addLinkDynForm = { + inputType : "scope", + title1 : trad["Add members ..."], + title2 : trad["Among my contacts ..."], + title3 : trad["Others ..."], + btnCancelTitle : trad["Close"], + btnSaveTitle : trad["Add this contacts"], + btnResetTitle : trad["Cancel all"], + values : myContactsMembers, + mainTitle : trad["Invite your contacts"], + labelBtnOpenModal : "<span class='text-dark'><i class='fa fa-group'></i> "+trad["Select among my contacts"]+"</span>", + contactTypes : contactTypes +}; + +var addLinkDynFormInvite = { + inputType : "scope", + title1 : trad["Invite your contacts"], + title2 : trad["Among my contacts ..."], + title3 : trad["Others ..."], + btnCancelTitle : trad["Close"], + btnSaveTitle : trad["Add this contacts"], + btnResetTitle : trad["Cancel all"], + values : myContactsMembers, + mainTitle : trad["Invite your contacts"], + labelBtnOpenModal : "<span class='text-dark'><i class='fa fa-group'></i> "+trad["Select among my contacts"]+"</span>", + contactTypes : contactTypes +}; + +var addLinkSearchMode = "contacts"; +jQuery(document).ready(function() { + + mylog.log("here"); + if(elementType != "citoyens") + buildModal(addLinkDynForm, "modalDirectoryForm"); + else + buildModalInvite(addLinkDynFormInvite, "modalDirectoryForm"); + + $("#select-type-search-contacts, #a-select-type-search-contacts").click(function(){ + switchContact(); + }); + + $("#select-type-search-all, #a-select-type-search-all").click(function(){ + $("#select-type-search-all").prop("checked", true); + $("#btn-save").removeClass("hidden"); + $("#list-scroll-type").html('<i class="fa fa-search fa-4x padding-15 center-block text-grey"></i>'); + $("#search-contact").attr("placeholder", trad["Research a name or e-mail address..."]); + addLinkSearchMode = "all"; + filterContact($("#search-contact").val()); + }); + + $.each(organizationTypes, function(k, v) { + $(".member-organization-type").append($("<option />").val(k).text(tradCategory[k])); + }); + bindInvite(); +}); + +function excludeMembers(contacts, members){ + mylog.log("excludeMembers",contacts, members, notEmpty(contacts), notNull(contacts)); + + //delete mes contacts qui sont déjà membre + if(members != null && notNull(contacts) && contacts.length > 0){ + $.each(members, function(idUser, value){ + if(typeof value != "undefined"){ + var type = notEmpty(value["typeSig"]) ? value["typeSig"] : notEmpty(value["type"]) ? value["type"] : null; + if(type != null){ + var found = false; var parentFound = false; + if(notEmpty(contacts[type])) + $.each(contacts[type], function(key, contact){ + if(notEmpty(contact)){ + var contactId = notEmpty(contact["_id"]) ? contact["_id"]["$id"] : notEmpty(contact["id"]) ? contact["id"] : null; + if(idUser == contactId){ + found = key; + } + } + }); + if(notEmpty(contacts[type])){ //console.log("typeof", typeof contacts[type]); + if(typeof contacts[type] == "array"){ + if(found!==false) contacts[type].splice(found,1); + }else if(typeof contacts[type] == "object"){ + if(found!==false) delete contacts[type][found]; + } + } + } + } + }); + } + //delete le parent qui se trouve aussi dans la liste des contact du floop + if(elementType != "<?php echo Event::COLLECTION ?>" && elementType != "<?php echo Project::COLLECTION ?>"){ + typeElt = elementType ; + if(elementType == "citoyens") typeElt = "people" ; + if(notNull(contacts) && notEmpty(contacts[typeElt])){ + $.each(contacts[typeElt], function(key, contact){ + if(typeof contact != "undefined"){ + if(notEmpty(contact)){ + var contactId = notEmpty(contact["_id"]) ? contact["_id"]["$id"] : notEmpty(contact["id"]) ? contact["id"] : null; + if(contactId == elementId){ + delete contacts[typeElt][key]; + return; + } + } + } + }); + } + } +} + +function switchContact(){ + mylog.log("switchContact"); + $("#select-type-search-contacts").prop("checked", true); + $("#btn-save").removeClass("hidden"); + $("#search-contact").attr("placeholder", trad.searchamongcontact+"..."); + showMyContactInModalAddMembers(addLinkDynForm, "#list-scroll-type"); + addLinkSearchMode = "contacts"; + filterContact($("#search-contact").val()); +} + + + +function setInviteInput(num){ + mylog.log("setInviteInput", num); + var person = tabObject[num]; + var personId = person["id"]; + mylog.log(person, personId); + + $('#div-invite-search-all #inviteName').val(person["name"]); + $('#div-invite-search-all #inviteId').val(personId); + $("#div-invite-search-all #ficheUser-ficheName").text(person["name"]); + $("#div-invite-search-all #ficheUser-btnProfil").attr("href", "#page.type.citoyens.id."+person["id"]); + + + + if (person.address != null) { + //Address : CP + Locality + $("#div-invite-search-all #ficheUser-address").text(((typeof person.address.postalCode == "undefined")?trad["UnknownLocality"]:person.address.postalCode+" ")+person.address.addressLocality); + } + + if (person.email != null) { + //Email + $("#div-invite-search-all #ficheUser-email").text(person.email); + } + //Tags + var tagsStr = ""; + if( "object" == typeof person.tags && person.tags ) { + $.each( person.tags , function(i,tag){ + tagsStr += "<span class='label label-inverse'>"+tag+"</span> "; + }); + } else { + tagsStr += "<span class='label label-inverse'>No Tag</span> "; + } + //$("#div-invite-search-all #ficheUser-tags").html('<div class="pull-left"><i class="fa fa-tags"></i> '+tagsStr+'</div>'); + $(".photoInvited").empty(); + if (person["profilMediumImageUrl"] != "") { + $(".photoInvited").html("<img class='img-responsive' src='"+baseUrl+person["profilMediumImageUrl"]+"' />"); + } else { + $(".photoInvited").html("<span><i class='fa fa-user_circled fa-3x'></i></span>"); + } + + //Pending + if (person.pending == true) { + $(".pending").show(); + } else { + $(".pending").hide(); + } + + //Already in the network of the current user + ; + //if (listFollowsId.indexOf(personId) != -1) { + if (inMyContacts("people",personId) == true) { + $('.disconnectBtn').show(); + $('.connectBtn').hide(); + } else { + $('.disconnectBtn').hide(); + $('.connectBtn').show(); + } + + //Show / Hide steps + $("#div-invite-search-all #dropdown_searchInvite").css({"display" : "none" }); + $("#div-invite-search-all #step3").addClass("hidden"); + $("#div-invite-search-all #ficheUser").removeClass("hidden"); + +} + +function newInvitation(){ + $("#div-invite-search-all #dropdown_searchInvite").css({"display" : "none" }); + $("#div-invite-search-all #ficheUser").addClass("hidden"); + $("#div-invite-search-all #step3").removeClass("hidden"); + + $('#div-invite-search-all #inviteId').val(""); + var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; + if(emailReg.test( $("#div-invite-search-all #inviteSearch").val() )){ + $('#div-invite-search-all #inviteEmail').val( $("#div-invite-search-all #inviteSearch").val()); + $("#div-invite-search-all #inviteName").val(""); + }else{ + $("#div-invite-search-all #inviteName").val($("#div-invite-search-all #inviteSearch").val()); + $("#div-invite-search-all #inviteEmail").val(""); + } + + $("#inviteText").val("<?php echo Yii::t("person","Hello, \\nCome and meet me on that website!\\nAn email, your town and you are connected to your city!\\nYou can see everything that happens in your city and act for the commons."); ?>"); + //runinviteFormValidation(); +} + +function bindEventScopeModal(){ + mylog.log("bindEventScopeModal"); + /* initialisation des fonctionnalités de la modale SCOPE */ + //parcourt tous les types de contacts + $.each(contactTypes, function(key, type){ //mylog.log("BINDEVENT CONTACTTYPES : " + type.name); + //initialise le scoll automatique de la liste de contact + $("#btn-scroll-type-"+type.name).click(function(){ + + //console.log("click btn scroll type : "+type.name+ " " + $("#scroll-type-"+type.name).position().top); + if($("#select-type-search-contacts").prop("checked")==false){ + $("#select-type-search-contacts").prop("checked", true); + switchContact(); + console.log("end reload"); + } + //mylog.log("click btn scroll type : "+type.name+ " " + $("#scroll-type-"+type.name).position().top); + $('#list-scroll-type').animate({ + scrollTop: $('#list-scroll-type').scrollTop() + $("#scroll-type-"+type.name).position().top + }, 400); + }); + //initialisation des boutons pour selectionner toutes les checkbox d'un type de contact + $("#chk-all-type"+type.name).click(function(){ + $(".chk-scope-"+type.name).prop("checked", $(this).prop('checked')); + }); + }); + + $("#search-contact").keyup(function(){ + filterContact($(this).val()); + }); + + $("#btn-cancel").click(function(){ + if(newMemberInCommunity && (currentView=="detail" || currentView=="directory")) { + urlCtrl.loadByHash(location.hash); + } + }); + $("#btn-save").click(function(){ + sendInvitation(); + }); + $("#btn-reset-scope").click(function(){ + $.each($('.modal input:checkbox'), function(){ + $(this).prop("checked", false); + }); + $("#scope-postal-code").val(""); + }); + + // $("#a-select-type-search-contacts").click(function(){ + // $("#select-type-search-contacts").prop("checked", true); + // }); + + // $("#a-select-type-search-all").click(function(){ + // $("#select-type-search-all").prop("checked", true); + // }); + + +} + + +function bindEventScopeContactsModal(){ + //initialise la selection d'une checkbox contact au click sur le bouton qui lui correspond + mylog.log("bindEventScopeContactsModal"); + // QUESTION BOUBOULE : IS THAT USED BECAUSE NEXT ONE DO THE SAME ???????? @tango @rapha + $(".btn-chk-contact").click(function(){ + var id = $(this).attr("idcontact"); + var type = $(this).attr("typecontact"); + //console.log(".btn-chk-contact click", type); + + var check = !$("#chk-scope-"+id).prop('checked'); + $("#chk-scope-"+id).prop("checked", check); + if(check){ + if(type != "organizations") + $("[data-id='"+id+"'].btn-is-admin").addClass("selected"); + $("[data-id='"+id+"'].divRoles").addClass("selected"); + }else + $("[data-id='"+id+"'].btn-is-admin, [data-id='"+id+"'].divRoles").removeClass("selected"); + }); + + $(".chk-contact").click(function(){ + var id = $(this).attr("idcontact"); + var type = $(this).attr("typecontact"); + //console.log(".btn-chk-contact click", id); + + var check = $(this).prop('checked'); + //$("#chk-scope-"+id).prop("checked", check); + + if(check){ + if(type != "organizations") + $("[data-id='"+id+"'].btn-is-admin").addClass("selected"); + $("[data-id='"+id+"'].divRoles").addClass("selected"); + }else + $("[data-id='"+id+"'].btn-is-admin, [data-id='"+id+"'].divRoles").removeClass("selected"); + }); + + $(".btn-is-admin").click(function(){ + if($(this).hasClass("isAdmin")) + $(this).removeClass("isAdmin"); + else + $(this).addClass("isAdmin"); + }); + $('.tagsRoles').select2({tags:rolesList}); +} + +function buildModal(fieldObj, idUi){ + mylog.log("buildModal", fieldObj, idUi); + //var fieldClass = " select2TagsInput select2ScopeInput"; + var fieldHTML = ""; + fieldHTML += '<div class="modal fade" id="modal-scope" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">'+ + '<div class="modal-dialog">'+ + '<div class="modal-content">'+ + '<div class="modal-header">'+ + //'<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>'+ + '<input type="text" id="search-contact" class="form-control pull-right" placeholder="'+trad.searchamongcontact+'...">' + + '<h4 class="modal-title" id="myModalLabel"><i class="fa fa-search"></i> '+fieldObj.title1+'</h4>'+ + '</div>'+ + '<div class="modal-body">'+ + '<div class="row no-padding bg-light">'+ + '<div class="col-md-4 col-sm-4 no-padding">'+ + '<div class="panel panel-default"> '+ + '<div class="panel-body no-padding">'+ + '<div class="list-group" id="menu-type">'+ + '<ul class="col-xs-12 col-sm-12 col-md-12 no-padding">'; + fieldHTML += '<h4 class="text-dark"> '+ + '<input type="radio" name="select-type-search" id="select-type-search-contacts" value="contacts" checked> '+ + '<a href="javascript:" id="a-select-type-search-contacts" class="text-dark">'+fieldObj.title2+'</a>'+ + '</h4>'; + $.each(fieldObj.contactTypes, function(key, type){ + fieldHTML += '<li>'+ + '<div id="btn-scroll-type-'+type.name+'" class="btn btn-default btn-scroll-type text-'+type.color+'">' + + //'<input type="checkbox" name="chk-all-type'+type.name+'" id="chk-all-type'+type.name+'" value="'+type.name+'"> '+ + '<span style="font-size:16px;"><i class="fa fa-'+type.icon+'"></i> ' + trad[type.label] + "</span>" + + '</div>'+ + '</li>'; + }); + fieldHTML += '</ul>'; + fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + '<h4 class="text-dark"> '+ + '<input type="radio" name="select-type-search" id="select-type-search-all" value="contacts"> '+ + '<a href="javascript:" id="a-select-type-search-all" class="text-dark">'+fieldObj.title3+'</a>'+ + '</h4>'; + /* $.each(fieldObj.contactTypes, function(key, type){ + fieldHTML += '<li>'+ + '<div id="btn-scroll-type-'+type.name+'" class="btn btn-default btn-scroll-type text-'+type.color+'">' + + '<input type="checkbox" name="chk-all-type'+type.name+'" id="chk-all-type'+type.name+'" value="'+type.name+'"> '+ + '<span style="font-size:16px;"><i class="fa fa-'+type.icon+'"></i> ' + type.label + "</span>" + + '</div>'+ + '</li>'; + }); */ + fieldHTML += '</ul>' + + '</div>'+ + '</div>'+ + '</div>' + + '</div>'+ + '<div class="no-padding pull-right col-md-8 col-sm-8 col-xs-12 bg-white" id="list-scroll-type">'; + fieldHTML += '</div>' + + '</div>'+ + '</div>'+ + '<div class="modal-footer">'+ + '<button id="btn-reset-scope" type="button" class="btn btn-default btn-sm pull-left"><i class="fa fa-repeat"></i> '+fieldObj.btnResetTitle+'</button>'+ + '<button id="btn-cancel" type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="fa fa-times"></i> '+fieldObj.btnCancelTitle+'</button>'+ + '<button id="btn-save" type="button" class="btn btn-success btn-sm" data-dismiss="modal"><i class="fa fa-check"></i> '+fieldObj.btnSaveTitle+'</button>'+ + '</div>'+ + '</div><!-- /.modal-content -->'+ + '</div><!-- /.modal-dialog -->'; + + if($("body #"+idUi).length > 0) $("body #"+idUi).html(fieldHTML); + else $('body').prepend("<div id='"+idUi+"'>"+fieldHTML+"</div>"); + + showMyContactInModalAddMembers(fieldObj, "#list-scroll-type"); + bindEventScopeModal(); +} + +function showMyContactInModalAddMembers(fieldObj, jqElement){ + mylog.log("showMyContactInModalAddMembers1", fieldObj, jqElement); + + var contacts = (notNull(fieldObj.values) ? fieldObj.values : new Array() ); + excludeMembers(contacts, members); + fieldObj.values = contacts; + + var fieldHTML = ""; + + $.each(fieldObj.contactTypes, function(key, type){ + mylog.log("fieldObj.contactTypes", key, type, typeof type); + fieldHTML += '<div class="panel panel-default" id="scroll-type-'+type.name+'"> '+ + '<div class="panel-heading">'+ + '<h4 class="text-'+type.color+'"><i class="fa fa-'+type.icon+'"></i> '+trad[type.label]+'</h4>'+ + '</div>'+ + '<div class="panel-body no-padding">'+ + '<div class="list-group padding-5">'+ + '<ul>'; + if(typeof fieldObj.values[type.name] != "undefined") + $.each(fieldObj.values[type.name], function(key2, value){ + if(typeof value != "undefined"){ + var cp = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.postalCode != "undefined") ? value.address.postalCode : typeof value.cp != "undefined" ? value.cp : ""; + var city = (typeof value.address != "undefined" && notNull(value.address) && typeof value.address.addressLocality != "undefined") ? value.address.addressLocality : ""; + var profilThumbImageUrl = (typeof value.profilThumbImageUrl != "undefined" && value.profilThumbImageUrl != "") ? baseUrl+'/'+ value.profilThumbImageUrl : assetPath + "/images/news/profile_default_l.png"; + var name = typeof value.name != "undefined" ? value.name : + typeof value.username != "undefined" ? value.username : ""; + //mylog.log("data contact +++++++++++ "); mylog.dir(value); + var thisKey = key+''+key2; + //var thisValue = notEmpty(value["_id"]['$id']) ? value["_id"]['$id'] : ""; + var thisValue = getObjectId(value); + if(name != "") { + fieldHTML += '<li>'; + if (type.name == "people") { + fieldHTML += '<small id="isAdmin'+getObjectId(value)+'" class="btn-is-admin pull-right text-grey margin-top-10" data-id="'+thisKey+'">'+ + '<a href="javascript:">admin <i class="fa fa-user-secret"></i></a>'+ + '</small>'; + } + fieldHTML += '<div class="btn btn-default btn-scroll-type btn-select-contact" id="contact'+thisKey+'">' + + '<div class="col-md-1 no-padding"><input type="checkbox" name="scope-'+type.name+'" class="chk-scope-'+type.name+' chk-contact" id="chk-scope-'+thisKey+'" idcontact="'+thisKey+'" value="'+thisValue+'" data-type="'+type.name+'"></div> '+ + '<div class="btn-chk-contact col-md-11 no-padding" idcontact="'+thisKey+'" typecontact="'+type.name+'">' + + '<img src="'+ profilThumbImageUrl+'" class="thumb-send-to" height="35" width="35">'+ + '<span class="info-contact">' + + '<span class="scope-name-contact text-dark text-bold" idcontact="'+thisKey+'">' + value.name + '</span>'+ + '<br/>'+ + '<span class="scope-cp-contact text-light" idcontact="'+thisKey+'">' + cp + ' </span>'+ + '<span class="scope-city-contact text-light" idcontact="'+thisKey+'">' + city + '</span>'+ + '</span>' + + '</div>' + + '</div>'; + if(isElementAdmin){ + fieldHTML += '<div class="divRoles col-md-12 col-sm-12 col-xs-12" data-id="'+thisKey+'"">'+ + '<input id="tagsRoles'+getObjectId(value)+'" class="tagsRoles" type="" data-type="select2" name="roles" placeholder="<?php echo Yii::t("common","Add a role") ?>" value="" style="width:100%;">'+ + '</div>'; + } + fieldHTML += '</li>'; + } + } + }); + fieldHTML += '</ul>' + + '</div>'+ + '</div>'+ + '</div>'; + }); + $(jqElement).html(fieldHTML); + bindEventScopeContactsModal(); +} + + +function filterContact(searchVal){ + mylog.log("filterContact", searchVal, "==", addLinkSearchMode); + + if(addLinkSearchMode == "contacts"){ + $("#btn-save").removeClass("hidden"); + //masque/affiche tous les contacts présents dans la liste + if(searchVal != "") $(".btn-select-contact").hide(); + else $(".btn-select-contact").show(); + //recherche la valeur recherché dans les 3 champs "name", "cp", et "city" + $.each($(".scope-name-contact"), function() { checkSearch($(this), searchVal); }); + $.each($(".scope-cp-contact"), function() { checkSearch($(this), searchVal); }); + $.each($(".scope-city-contact"), function() { checkSearch($(this), searchVal); }); + }else if(addLinkSearchMode == "all"){ + if(searchVal.length>2){ + clearTimeout(timeout); + timeout = setTimeout(function(){ + $("#iconeChargement").css("visibility", "visible"); + autoCompleteEmailAddMember(searchVal); + }, 500); + + }else{ + //$("#addMembers #dropdown_search").css({"display" : "none" }); + //$("#iconeChargement").css("visibility", "hidden") + } + } +} + +function autoCompleteEmailAddMember(searchValue){ + mylog.log("autoCompleteEmailAddMember"); + $("#btn-save").removeClass("hidden"); + var data = { + "search" : searchValue, + "elementId" : elementId + }; + if (elementType == "<?php echo Event::COLLECTION ?>" && !isElementAdmin) + data.searchMode = "personOnly"; + + $("#list-scroll-type").html("<div class='padding-10'><i class='fa fa-spin fa-refresh'></i> "+trad.currentlyresearching+"</div>"); + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/search/searchmemberautocomplete', + data: data, + dataType: "json", + success: function(data){ + if(!data){ + toastr.error(data.content); + }else{ + if(!notEmpty(data.citoyens) && !notEmpty(data.organizations)){ + $("#list-scroll-type").html(""); + var formInvite = $("#formSendMailInvite").html(); + formInvite = "<div class='padding-10'>"+formInvite+"</div>"; + $("#list-scroll-type").html(formInvite); + $("#memberName").val($("#search-contact").val()); + $("#btn-save").addClass("hidden"); + $(".organization-type").hide(); + $("input[name='memberType']").click(function(){ + $("#fa-type-contact-mail").removeClass("fa-user").removeClass("fa-group").addClass("fa-"+$(this).data("fa")); + if ($(this).data('fa') == 'group') { + $("#isAdminDiv").hide(); + $(".organization-type").show(); + } else { + $("#isAdminDiv").show(); + $(".organization-type").hide(); + } + }); + + }else{ + listContact = {"people" : data.citoyens, "organizations" : data.organizations}; + var addLinkDynForm = { + "values" : listContact, + "contactTypes" : contactTypes + }; + showMyContactInModalAddMembers(addLinkDynForm, "#list-scroll-type"); + } + } + } + }) +} + +//si l'élément contient la searchVal, on l'affiche +function checkSearch(thisElement, searchVal, type){ + var content = thisElement.html(); + var found = content.search(new RegExp(searchVal, "i")); + if(found >= 0){ + var id = thisElement.attr("idcontact"); + $("#contact"+id).show(); + } +} + +function sendInvitation(){ + var connectType = "member"; + //if ($("#addMembers #memberIsAdmin").val() == true) connectType = "admin"; + var params = { + "childs" : new Array(), + //"organizationType" : $("#addMembers #organizationType").val(), + "parentType" : elementType, + "parentId" : $("#addMembers #parentOrganisation").val(), + "connectType" : connectType + }; + + $.each($("#list-scroll-type input:checkbox"), function(key, val){ + if($(this).prop("checked") == true){ + var id = $(this).val(); + var type = $(this).data("type");// == "people" ? "citoyens" : $(this).data("type"); + var name = ""; + var contactPublicFound = new Array(); + var connectType = ""; + var roles = ""; + if (typeof $("#tagsRoles"+id).val() != "undefined" && $("#tagsRoles"+id).val() != ""){ + roles = $("#tagsRoles"+id).val().split(","); + } + if(addLinkSearchMode == "all") { contactPublicFound = listContact; + }else if(addLinkSearchMode=="contacts"){ contactPublicFound = myContactsMembers; } + + $.each(contactPublicFound[type], function(k, contact){ + if (typeof contact != undefined && contact != null) { + var idObj = getObjectId(contact);mylog.log("azioueaoziueiazue : ", idObj, id); + if(idObj == id){mylog.log("azioueaoziueiazue XXX : ", idObj); + name = notEmpty(contact['name']) ? contact['name'] : ""; + email = notEmpty(contact['email']) ? contact['email'] : ""; + } + } + }); + + if ($("#isAdmin"+id).hasClass("isAdmin")) { + connectType = "admin"; + } + /*if ($("#tagsRoles"+id).val() != ""){ + roles = $("#tagsRoles"+id).val().split(","); + }*/ + + mylog.log("add this element ?", email, type, id, name); + if(type != "" && id != "" && name != "") + pushChild={ + "childId" : id, + "childName" : name, + "childEmail" : email, + "childType" : type, + "connectType" : connectType + } + if(typeof roles != "undefined" && roles != "") + pushChild.roles=roles; + params["childs"].push(pushChild) + } + }); + mylog.log("params constructed"); + mylog.dir(params); + //mylog.dir(myContacts); + //return; + + + //mylog.log(params); + mylog.log("send ajax invite"); + /*$.blockUI({ + message : "<h4 style='font-weight:300' class='text-dark padding-10'><i class='fa fa-spin fa-circle-o-notch'></i><br>Processing<br><blockquote><p>la Liberté est la reconnaissance de la nécessité.</p><cite title='Hegel'>Hegel</cite></blockquote></h4>" + });*/ + processingBlockUi(); + + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/link/multiconnect', + data: params, + dataType: "json", + success: function(data){ + if(!data.result){ + toastr.error(data.msg); + $.unblockUI(); + //checkIsLoggued(); + } + else { + toastr.success(data.msg); + mylog.log(data); + /*$.each(data.newMembers, function(k, newMember){ + mylog.log("neewsMens >>>>"); + mylog.log(newMember); + mapType = newMember.childType; + if(newMember.childType=="<?php echo Person::COLLECTION ?>") + mapType="people"; + mapElements.push(newMember); + });*/ + /*if(typeof(mapUrl) != "undefined"){ + if(typeof(mapUrl.detail.load) != "undefined" && mapUrl.detail.load) + mapUrl.detail.load = false; + if(typeof(mapUrl.directory.load) != "undefined" && mapUrl.directory.load) + mapUrl.directory.load = false; + }*/ + if(data.onlyOrganization) + loadDataDirectory("members", "users"); + else + loadDataDirectory("guests", "send"); + //urlCtrl.loadByHash(location.hash); + + $.unblockUI(); + } + mylog.log(data.result); + }, + error:function (xhr, ajaxOptions, thrownError){ + toastr.error( thrownError ); + $.unblockUI(); + } + }); +} + +function sendInvitationMailAddMember(){ mylog.log("sendInvitationMailAddMember"); + $("#loader-send-mail-invite").html('<i class="fa fa-spinner fa-spin fa-refresh"></i> Envoi en cours...'); + var connectType = "member"; + if ($("#addMembers #memberIsAdmin").is(':checked')) connectType = "admin"; + var params = { + "childId" : $("#addMembers #memberId").val(), + "childName" : $("#addMembers #memberName").val(), + "childEmail" : $("#addMembers #memberEmail").val(), + "childType" : $("#addMembers [name='memberType']:checked").val(), + "organizationType" : $("#addMembers #organizationType").val(), + "parentType" : "<?php echo $type;?>", + "parentId" : $("#addMembers #parentOrganisation").val(), + "connectType" : connectType + }; + + //mylog.log(params); + if($("#addMembers #memberName").val() == "") { $("#loader-send-mail-invite").html('Merci d\'indiquer une nom'); return; } + if($("#addMembers #memberEmail").val() == "") { $("#loader-send-mail-invite").html('Merci d\'indiquer une addresse e-mail'); return; } + + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/link/connect', + data: params, + dataType: "json", + success: function(data){ + if(!data.result){ + toastr.error(data.msg); + $("#loader-send-mail-invite").html(''); + //checkIsLoggued(); + } + else { + toastr.success(data.msg); + mylog.log(data); + //if(typeof updateOrganisation != "undefined" && typeof updateOrganisation == "function") + // updateOrganisation( data.member, $("#addMembers #memberType").val()); + //setValidationTable(data.newElement,data.newElementType, false); + mapType = data.newElementType; + if(data.newElementType=="<?php echo Person::COLLECTION ?>") + mapType="people"; + mapElements.push(data.newElement); + //Minus 1 on number of invit + if ($("#addMembers #memberId").val().length==0){ + var count = parseInt($("#numberOfInvit").data("count")) - 1; + $("#numberOfInvit").html(count + ' invitation(s)'); + $("#numberOfInvit").data("count", count); + } + + $("#search-contact").val(""); + $("#addMembers #memberId").val(""); + $("#addMembers #memberType").val(""); + $("#addMembers #memberName").val(""); + $("#addMembers #memberEmail").val(""); + $("#addMembers #memberIsAdmin").val(""); + $('#addMembers #organizationType').val(""); + $("#addMembers #memberIsAdmin").val("false"); + $('#addMembers #memberEmail').parents().eq(1).show(); + //$("[name='my-checkbox']").bootstrapSwitch('state', false); + $("#loader-send-mail-invite").html(''); + //showSearch(); + if(typeof(mapUrl) != "undefined"){ + if(typeof(mapUrl.detail.load) != "undefined" && mapUrl.detail.load) + mapUrl.detail.load = false; + if(typeof(mapUrl.directory.load) != "undefined" && mapUrl.directory.load) + mapUrl.directory.load = false; + } + newMemberInCommunity = true; + } + mylog.log(data.result); + }, + error:function (xhr, ajaxOptions, thrownError){ + toastr.error( thrownError ); + $("#loader-send-mail-invite").html(''); + } + }); +} +/*function runinviteFormValidation(el) { + var forminvite = $('.form-invite'); + var errorHandler2 = $('.errorHandler', forminvite); + var successHandler2 = $('.successHandler', forminvite); + alert("runInvinte"); + forminvite.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + inviteName : { + minlength : 2, + required : true + }, + inviteEmail : { + required : true + } + }, + messages : { + inviteName : "* Please specify a name", + inviteSearch : "* Please specify a email" + }, + invalidHandler : function(invite, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + mylog.log("submit handler"); + successHandler2.show(); + errorHandler2.hide(); + var parentId = $(".form-invite .invite-parentId").val(); + var invitedUserName = $("#inviteName").val(); + var invitedUserEmail = $("#inviteEmail").val(); + $.blockUI({ + message : '<span class="homestead"><i class="fa fa-spin fa-circle-o-noch"></i> Merci de patienter ...</span>' + }); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: { + parentId : parentId, + invitedUserName : invitedUserName, + invitedUserEmail : invitedUserEmail, + msgEmail : $("#inviteText").val() + }, + type:"POST", + }) + .done(function (data) { + $.unblockUI(); + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + addFloopEntity(data.invitedUser.id, "<?php echo Person::COLLECTION ?>", data.invitedUser); + $('#inviteSearch').val(""); + //Minus 1 on number of invit + var count = parseInt($("#numberOfInvit").data("count")) - 1; + $("#numberOfInvit").html(count + ' invitation(s)'); + $("#numberOfInvit").data("count", count); + backToSearch(); + } else { + $.unblockUI(); + toastr.error(data.msg); + } + }); + } + }); +};*/ +// ***************** Invite ********************* +function bindInvite(){ + + $("#btn-save-invite").off().on('click', function() + { + $(this).prop("disabled",true); + $(this).find("i").removeClass("fa-send").addClass("fa-spinner fa-spin"); + if(listMails.length == 0) + toastr.error("Veuillez sélectionner une adresse mail."); + else if($("#inviteEmail").val()=="" || $("#inviteName").val()==""){ + if($("#inviteEmail").val()=="" && $("#inviteEmail").parent().find(".error-block-invite").length <=0) + $("#step3 #inviteEmail").parent().append("<span class='text-red error-block-invite'><i>* Veuillez ajouter un email</i></span>"); + if($("#inviteName").val()=="" && $("#inviteName").parent().find(".error-block-invite").length <=0) + $("#step3 #inviteName").parent().append("<span class='text-red error-block-invite'><i>* Veuillez ajouter un nom</i></span>"); + $(this).prop("disabled",false); + $(this).find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + } + else{ + if($(".error-block-invite").length>=0) + $(".error-block-invite").remove(); + mylog.log("listMails", listMails); + if(Object.keys(listMails).length==0){ + dataInvite={msgEmail : $("#inviteText").val(), + invitedUserName : $("#inviteName").val(), + invitedUserEmail : $("#inviteEmail").val(), + listMails:{} + }; + } else{ + dataInvite={ + msgEmail : $("#inviteText").val(), + listMails:listMails + } + } + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: dataInvite, + type:"POST", + success: function(data){ + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + mylog.log(data); + if(typeof data.data !="undefined"){ + $.each(data.data, function(key, elt) { + addFloopEntity(elt.invitedUser.id, "<?php echo Person::COLLECTION ?>", elt.invitedUser); + }); + }else + addFloopEntity(data.invitedUser.id, "<?php echo Person::COLLECTION ?>", data.invitedUser); + $('#inviteSearch').val(""); + $("#div-invite-search-all #step3 #inviteName").val(""); + $("#div-invite-search-all #step3 #inviteEmail").val(""); + $("#div-invite-search-all #step3").addClass("hidden"); + //backToSearch(); + $("#div-invite-search-all #step3 #btn-save-invite").prop("disabled",false); + $("#div-invite-search-all #step3 #btn-save-invite").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + } else { + $.unblockUI(); + toastr.error(data.msg); + $("#div-invite-search-all #step3 #btn-save-invite").prop("disabled",false); + $("#div-invite-search-all #step3 #btn-save-invite").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + } + } + }) + .done(function (data){ + $.unblockUI(); + + }); + } + }); + + $(".invite-search").click(function(){ + var section = $(this).data("section"); + mylog.log("section", section); + var listSections = [ "all", "gmail", "gplus", "file", "saisir"]; + $.each(listSections, function(key, type){ + if(type != section) + $("#div-invite-search-"+type).addClass("hidden"); + }); + $("#div-invite-search-"+section).removeClass("hidden"); + $("#listEmailGrid").html(""); + $("#countContacts").addClass("hidden"); + }); + + $('#inviteSearch').keyup(function(e){ + var search = $('#inviteSearch').val(); + if(search.length>2){ + clearTimeout(timeout); + timeout = setTimeout('autoCompleteInviteSearch2("'+encodeURI(search)+'")', 500); + }else{ + $("#div-invite-search-all #dropdown_searchInvite").css({"display" : "none" }); + } + }); + + $(".connectBtn").off().on("click", function() { + var thiselement = this; + follow(typeObj.person.col, $('#div-invite-search-all #inviteId').val(), userId, typeObj.person.col, function(){ + mylog.log('callback connectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-link"); + $('.disconnectBtn').show(); + $('.connectBtn').hide(); + //TODO add in myContacts + //listFollowsId.push($("#newInvite #inviteId").val()); + + $('#inviteSearch').val(""); + + }); + }); + + $(".disconnectBtn").off().on("click", function() { + var thiselement = this; + var idToDisconnect = $('#div-invite-search-all #inviteId').val(); + var typeToDisconnect = "<?php echo Person::COLLECTION ?>"; + disconnectTo(typeObj.person.col,idToDisconnect,userId,typeObj.person.col,'followers',function() { + mylog.log('callback disconnectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + //// Find and remove item from an array + //TODO Remove in myContacts + // var i = listFollowsId.indexOf(idToDisconnect); + // if(i != -1) { + // listFollowsId.splice(i, 1); + // }textmail + // mylog.log(listFollowsId); + $('.disconnectBtn').hide(); + $('.connectBtn').show(); + $('#inviteSearch').val(""); + + + }); + }); + + $("#submitAfficher").off().on("click", function() { + var mails = $("#textareaMails").val().split(/[\s\n;]+/); + checkAndGetMails(mails); + }); + + + $(".form-importFile #fileEmail").change(function(e) { + $("#list-contact").html(""); + $("#listEmailGrid").html(""); + var ext = $(".form-importFile input#fileEmail").val().split(".").pop().toLowerCase(); + if($.inArray(ext, ["csv"]) == -1) { + alert('Upload CSV'); + return false; + } + + if (e.target.files != undefined) { + var reader = new FileReader(); + mylog.log("reader", reader); + + reader.onload = function(e) { + var csvval = e.target.result.split("\n"); + checkAndGetMails(csvval); + }; + reader.readAsText(e.target.files.item(0)); + }else{ + toastr.error("Nous n'avons pas réussie à lire votre fichier.") + } + return false; + }); +} + +function checkAndGetMails(mails){ + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/person/getcontactsbymails', + data: { mailsList : mails }, + dataType: "json", + success: function(data){ + mylog.log("getcontactsbymails data", data, data.length); + var nbContact = 0 ; + var text2 = "" ; + var idMail = "" + $.each(mails, function(keyMails, valueMails){ + mylog.log("valueMails", valueMails, typeof data[valueMails]); + nbContact++; + idMail = "contact"+nbContact ; + if(typeof data[valueMails] != "string" ){ + text2 += '<li id="'+idMail+'" class="item_map_list col-xs-12" style="display: inline-block;">'+ + '<div class="col-xs-1"><input id="checkbox'+idMail+'" class="checkboxList" data-id="'+idMail+'" data-mail="'+valueMails+'" data-name="" type="checkbox"></div>'+ + '<label class="col-xs-11" for="checkbox'+idMail+'">'+ + '<a href="javascript:;" onclick="checkedMail(\''+idMail+'\', \''+valueMails+'\', \'\');">'; + if(typeof data[valueMails] != "undefined" && data[valueMails] != null && typeof data[valueMails].profilThumbImageUrl != "undefined"){ + text2 += '<div class="">'+ + '<img src="'+baseUrl+data[valueMails].profilThumbImageUrl+'" alt="image" width="40" height="40" />'+ + ' <span class="text-xss" > '+data[valueMails].name+' : '+ valueMails.trim() + '</span>'+ + '</div>'; + }else{ + text2 += '<div class="">'+ + '<span class="text-xss" > '+ valueMails.trim() + '</span><br/>'+ + '</div>'; + } + text2 += '</a></label></li>'; + }else{ + text2 += '<li id="'+idMail+'" class="item_map_list col-xs-12" style="display: inline-block;">'+ + '<div class="col-xs-1"></div>'+ + '<div class="col-xs-11">'+ + '<span class="text-xss" > '+ valueMails.trim() +" : "+ data[valueMails] + '</span><br/>'+ + '</div></li>'; + } + + }); + $("#listEmailGrid").html(text2); + $("#nbContacts").html(0); + $("#allContacts").html(nbContact); + $("#countContacts").removeClass("hidden"); + bind2(); + } + }); +} + +function bind2() { + $(".checkboxList").change(function() { + checkedMail($(this).data("id"), $(this).data("mail"), $(this).data("name")); + }); +}; + +function checkedMail(id, mail, name) { + mylog.log("checkedMail", id, mail, name, typeof listMails[mail]); + if( typeof listMails[mail] != "undefined" ){ + $( "#"+id ).removeClass("item_map_list_blue"); + $( "#"+id ).addClass("item_map_list"); + $("#checkbox"+id).prop("checked", false); + delete(listMails[mail]); + }else{ + $( "#"+id ).removeClass("item_map_list"); + $( "#"+id ).addClass("item_map_list_blue"); + $("#checkbox"+id).prop("checked", true); + listMails[mail] = name ; + } + $("#nbContacts").html(Object.keys(listMails).length); +}; + + +function autoCompleteInviteSearch2(search){ + if (search.length < 3) { return } + tabObject = []; + + var data = { + "search" : search, + "searchMode" : "personOnly" + }; + + ajaxPost("", '<?php echo Yii::app()->getRequest()->getBaseUrl(true).'/'.$this->module->id?>/search/searchmemberautocomplete', data, + function (data){ + var str = "<li class='li-dropdown-scope'><a href='javascript:;' onclick='newInvitation()'>Pas trouvé ? Lancer une invitation à rejoindre votre réseau !</li>"; + var compt = 0; + var city, postalCode = ""; + $.each(data["citoyens"], function(k, v) { + city = ""; + mylog.log(v); + postalCode = ""; + var htmlIco ="<i class='fa fa-user fa-2x'></i>" + if(v.id != userId) { + tabObject.push(v); + console.log(v); + if(v.profilThumbImageUrl != ""){ + var htmlIco= "<img width='25' height='25' alt='image' class='img-circle' src='"+baseUrl+v.profilThumbImageUrl+"'/>" + } + if (v.address != null) { + city = v.address.addressLocality; + postalCode = v.address.postalCode; + } + str += "<li class='li-dropdown-scope'>" + + "<a href='javascript:;' onclick='setInviteInput("+compt+");'>"+htmlIco+" "+v.name ; + + if(typeof postalCode != "undefined") + str += "<br/>"+postalCode+" "+city; + //str += "<span class='city-search'> "+postalCode+" "+city+"</span>" ; + str += "</a></li>"; + + compt++; + } + }); + + $("#div-invite-search-all #dropdown_searchInvite").html(str); + $("#div-invite-search-all #dropdown_searchInvite").css({"display" : "inline" }); + } + ); +} + + +function buildModalInvite(fieldObj, idUi){ + mylog.log("buildModalInvite", fieldObj, idUi); + //var fieldClass = " select2TagsInput select2ScopeInput"; + var fieldHTML = ""; + fieldHTML += '<div class="modal fade" id="modal-scope" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">'+ + '<div class="modal-dialog">'+ + '<div class="modal-content">'+ + '<div class="modal-header">'+ + '<div class="col-xs-6" ><h4 class="modal-title" id="myModalLabel"><i class="fa fa-search"></i> '+fieldObj.title1+'</h4></div>'+ + '<div class="col-xs-6 hidden" id="countContacts" ><h4 class="modal-title pull-right"><span id="nbContacts"></span> / <span id="allContacts"></span> contacts selectionnées</h4></div>'+ + '</div>'+ + '<div class="modal-body">'+ + '<div class="row no-padding bg-light">'+ + '<div class="col-md-4 col-sm-4 no-padding">'+ + '<div class="panel panel-default"> '+ + '<div class="panel-body no-padding">'+ + '<div class="list-group" id="menu-type">'; + fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + '<h4 class="text-dark"> '+ + '<input type="radio" id="invite-search-all" name="select-type-search" class="invite-search" data-section="all" value="contacts" checked="checked"> '+ + '<label for="invite-search-all" class="text-dark">Recherche</label>'+ + '</h4>'+ + '</ul>'; + // fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + // '<h4 class="text-dark"> '+ + // '<input type="radio" id="invite-search-gmail" name="select-type-search" class="invite-search" data-section="gmail" value="contacts"> '+ + // '<label for="invite-search-gmail" class="text-dark">Gmail</label>'+ + // '</h4>'+ + // '</ul>' ; + // fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + // '<h4 class="text-dark"> '+ + // '<input type="radio" id="invite-search-gplus" name="select-type-search" class="invite-search" data-section="gplus" value="contacts"> '+ + // '<label for="invite-search-gplus" class="text-dark">Google +</label>'+ + // '</h4>'+ + // '</ul>' ; + fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + '<h4 class="text-dark"> '+ + '<input type="radio" id="invite-search-file" name="select-type-search" class="invite-search" data-section="file" value="contacts"> '+ + '<label for="invite-search-file" class="text-dark">Import de fichier</label>'+ + '</h4>'+ + '</ul>' ; + fieldHTML += '<ul class="col-xs-6 col-sm-12 col-md-12 no-margin no-padding select-population">' + + '<h4 class="text-dark"> '+ + '<input type="radio" id="invite-search-saisir" name="select-type-search" class="invite-search" data-section="saisir" value="contacts"> '+ + '<label for="invite-search-saisir" class="text-dark">Saisir</label>'+ + '</h4>'+ + '</ul>' + + '</div>'+ + '</div>'+ + '</div>' + + '</div>'+ + '<div class="no-padding pull-right col-md-8 col-sm-8 col-xs-12 bg-white" id="list-scroll-type">'+ + '<div id="div-invite-search-all" class="">'+ + '<input class="invite-searchInput form-control text-left" placeholder="Un nom, un e-mail ..." autocomplete = "off" id="inviteSearch" name="inviteSearch" value="">' + + '<ul class="dropdown-menu dropdown-menu-invite" id="dropdown_searchInvite" style="">' + + '<li class="li-dropdown-scope">-</li>' + + '</ul>' + + '</input>' + + '<hr>'+ + '<div class="form-group hidden" id="ficheUser">'+ + '<div class="col-md-12 text-center">'+ + '<div class="photoInvited text-center">'+ + '</div>'+ + '<a class="pending btn btn-xs btn-red tooltips" data-toggle="tooltip" data-placement="bottom" title="Cette personne a déjà été invité, mais na pas encore rejoint le réseau">Cette personne a déjà été invité, mais n\'a pas encore rejoint le réseau</a>'+ + + '<a href="javascript:;" class="connectBtn btn btn-lg tooltips " data-placement="top" data-original-title="Suivre cette personne" ><i class=" connectBtnIcon fa fa-link "></i> Suivre cette personne</a>'+ + '<a href="javascript:;" class="disconnectBtn btn btn-lg tooltips " data-placement="top" data-original-title="Ne plus suivre cette personne" ><i class=" disconnectBtnIcon fa fa-unlink "></i> Ne plus suivre cette personne</a>'+ + '<hr>'+ + '<h4 id="ficheUser-ficheName" name="ficheUser-ficheName"></h4>'+ + '<a href="" data-toggle="modal" data-target="#modal-scope" class="btn btn-default lbh" id="ficheUser-btnProfil">Aller sur sa page</a><br>'+ + '<input id="inviteId" name="inviteId" type="hidden" value="">'+ + '<span id="ficheUser-email" name="ficheUser-email" ></span><br><br>'+ + '<span id="ficheUser-address" name="ficheUser-address" ></span><br><br>'+ + '<span id="ficheUser-tags" name="ficheUser-tags" ></span><br>'+ + '<br>'+ + '</div>'+ + '</div>'+ + '<div class="row hidden" id="step3">'+ + '<div class="row margin-bottom-10">'+ + '<div class="col-md-1 col-md-offset-1" id="iconUser">'+ + '<i class="fa fa-user fa-2x"></i>'+ + '</div>'+ + ' <div class="col-md-9">'+ + '<input class="invite-name form-control" placeholder="Name" id="inviteName" name="inviteName" value="" />'+ + '</div>'+ + '</div>'+ + '<div class="row margin-bottom-10">'+ + '<div class="col-md-1 col-md-offset-1">'+ + '<i class="fa fa-envelope-o fa-2x"></i>'+ + '</div>'+ + '<div class="col-md-9">'+ + '<input class="invite-email form-control" placeholder="Email" id="inviteEmail" name="inviteEmail" value="" />'+ + '</div>'+ + '</div>'+ + '<div class="row margin-bottom-10">'+ + '<div class="col-md-1 col-md-offset-1"> '+ + '<i class="fa fa-align-justify fa-2x"></i>'+ + '</div>'+ + '<div class="col-md-9">'+ + '<textarea class="invite-text form-control" id="inviteText" name="inviteText" rows="4" />'+ + '</div>'+ + '</div>'+ + '<div class="row margin-bottom-10">'+ + '<div class="col-md-11">'+ + '<div class="form-group">'+ + '<button class="btn bg-dark pull-right" id="btn-save-invite" ><i class="fa fa-send"></i> <?php echo Yii::t("common","Send invitation"); ?></button> '+ + '<button class="btn btn-danger pull-right btnCancel" style="margin-right:10px;" id="btnCancelStep3" >Annuler</button>'+ + '</div>'+ + '</div>'+ + ' </div>'+ + '</div>'+ + '</div>' + + '<div id="div-invite-search-gmail" class="hidden">'+ + 'Inviter vos contacts Gmail' + + '</div>' + + '<div id="div-invite-search-gplus" class="hidden">'+ + 'Publier sur Google +, pour inviter vos amis a rejoindre Communecter' + + '</div>' + + '<div id="div-invite-search-file" class="hidden">'+ + '<form class="form-importFile">'+ + '<div class="col-xs-12">'+ + 'Fichier (CSV) : <input type="file" id="fileEmail" name="fileEmail" accept=".csv">'+ + '</div>'+ + '</form><br/><hr/><br/>' + + '</div>' + + '<div id="div-invite-search-saisir" class="hidden">'+ + '<form class="form-writeMails">'+ + '<div class="col-xs-12">'+ + '<textarea id="textareaMails" class="form-control col-xs-12" rows="5"></textarea>'+ + '<a href="javascript:" class="btn btn-succes col-xs-12" id="submitAfficher">Vérification</a>'+ + '</div>'+ + '</form>'+ + '</div>'+ + '<div id="listEmailGrid" class="margin-bottom-10"></div>'+ + '</div>' + + '</div>'+ + '</div>'+ + '<div class="modal-footer">'+ + '<button id="btn-cancel-invite" type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="fa fa-times"></i> '+fieldObj.btnCancelTitle+'</button>'+ + '<button id="btn-save-invite" type="button" class="btn btn-success btn-sm" data-dismiss="modal"><i class="fa fa-check"></i> '+fieldObj.btnSaveTitle+'</button>'+ + '</div>'+ + '</div><!-- /.modal-content -->'+ + '</div><!-- /.modal-dialog -->'; + + if($("body #"+idUi).length > 0) $("body #"+idUi).html(fieldHTML); + else $('body').prepend("<div id='"+idUi+"'>"+fieldHTML+"</div>"); + bindEventScopeModal(); +} +</script> \ No newline at end of file diff --git a/views/element/banner.php b/views/element/banner.php new file mode 100644 index 0000000000000000000000000000000000000000..fa1c51f4fb0f28fb3f69ec9b0c43fd755afdc6fb --- /dev/null +++ b/views/element/banner.php @@ -0,0 +1,420 @@ +<style> + #uploadScropResizeAndSaveImage i{ + position: inherit !important; + } + #uploadScropResizeAndSaveImage .close-modal .lr, + #uploadScropResizeAndSaveImage .close-modal .lr .rl{ + z-index: 1051; + height: 75px; + width: 1px; + background-color: #2C3E50; + } + #uploadScropResizeAndSaveImage .close-modal .lr{ + margin-left: 35px; + transform: rotate(45deg); + -ms-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + } + #uploadScropResizeAndSaveImage .close-modal .rl{ + transform: rotate(90deg); + -ms-transform: rotate(90deg); + -webkit-transform: rotate(90deg); + } + #uploadScropResizeAndSaveImage .close-modal { + position: absolute; + width: 75px; + height: 75px; + background-color: transparent; + top: 25px; + right: 25px; + cursor: pointer; + } + .blockUI, .blockPage, .blockMsg{ + padding-top: 0px !important; + } + + #banner_element:hover{ + color: #0095FF; + background-color: white; + border:1px solid #0095FF; + border-radius: 3px; + margin-right: 2px; + } + #banner_element{ + background-color: #0095FF; + color: white; + border-radius: 3px; + margin-right: 2px; + display:none; + } + .header-address{ + font-size: 14px; + padding-left: 5px; + } + #contentBanner img{ + min-height:280px; + } +</style> + +<?php + $thumbAuthor = @$element['profilImageUrl'] ? + Yii::app()->createUrl('/'.@$element['profilImageUrl']) : ""; +?> + +<div class="col-xs-12 col-md-12 col-sm-12 col-lg-12 text-left no-padding" id="col-banner"> + + + <form method="post" id="banner_photoAdd" enctype="multipart/form-data"> + <?php + if(@Yii::app()->session["userId"] && ((@$edit && $edit) || (@$openEdition && $openEdition))){ + if (@$element["profilBannereUrl"] && !empty($element["profilBannereUrl"])) $editBtn=true; + else $editBtn=false; + ?> + <div class="user-image-buttons padding-10" style="position: absolute;z-index: 100;"> + <a class="btn btn-blue btn-file btn-upload fileupload-new btn-sm" id="banner_element" > + <span class="fileupload-new"> + <i class="fa fa-<?php if($editBtn) echo "pencil"; else echo "plus"?>"></i> + <span class="hidden-xs"> + <?php if($editBtn) echo Yii::t("common","Edit banner"); else echo Yii::t("common","Add a banner") ?> + </span> + </span> + <input type="file" accept=".gif, .jpg, .png" name="banner" id="banner_change" class="hide"> + <input class="banner_isSubmit hidden" value="true"/> + </a> + </div> + <?php }; ?> + </form> + + <div id="contentBanner" class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <?php if (@$element["profilBannerUrl"] && !empty($element["profilBannerUrl"])){ + $imgHtml='<img class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive" + src="'.Yii::app()->createUrl('/'.$element["profilBannerUrl"]).'">'; + if (@$element["profilRealBannerUrl"] && !empty($element["profilRealBannerUrl"])){ + $imgHtml='<a href="'.Yii::app()->createUrl('/'.$element["profilRealBannerUrl"]).'" + class="thumb-info" + data-title="'.Yii::t("common","Cover image of")." ".$element["name"].'" + data-lightbox="all">'. + $imgHtml. + '</a>'; + } + echo $imgHtml; + } ?> + </div> + + <?php if(!empty($element["preferences"]["isOpenEdition"]) || !empty($element["preferences"]["isOpenData"]) ){ ?> + <div class="section-badges pull-right"> + <div class="no-padding"> + <?php if(!empty($element["preferences"]["isOpenData"])){?> + <?php //if( Badge::checkBadgeInListBadges("opendata", $element["badges"]) ){?> + <div class="badgePH pull-left" data-title="OPENDATA"> + <span class="pull-left tooltips" data-toggle="tooltip" data-placement="left" + title="<?php echo Yii::t("common","Keep data open and usable by all") ?>" style="font-size: 13px; line-height: 30px;"> + <span class="fa-stack opendata" style="width:17px"> + <i class="fa fa-database main fa-stack-1x" style="font-size: 20px;"></i> + <i class="fa fa-share-alt mainTop fa-stack-1x text-white" + style="text-shadow: 0px 0px 2px rgb(15,15,15);"></i> + </span> + <?php echo Yii::t("common","Open data") ?> + </span> + </div> + <?php //} + } ?> + + <?php if (!empty($element["preferences"]["isOpenEdition"])) { ?> + <div class="badgePH pull-left margin-left-15" data-title="OPENEDITION"> + <a href="javascript:;" class="btn-show-activity"> + <span class="pull-right tooltips" data-toggle="tooltip" data-placement="left" + title="<?php echo Yii::t("common","All users can participate and modify informations") ?>" + style="font-size: 13px; line-height: 30px;"> + <i class="fa fa-creative-commons" style="font-size: 17px;"></i> + <?php echo Yii::t("common","Open edition") ?> + </span> + </a> + </div> + <?php } ?> + </div> + </div> + <?php } ?> + + + <div class="col-xs-12 col-sm-12 col-md-12 contentHeaderInformation <?php if(@$element["profilBannerUrl"] && !empty($element["profilBannerUrl"])) echo "backgroundHeaderInformation" ?>"> + + <div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 text-white pull-right"> + <?php if (@$element["status"] == "deletePending") { ?> + <h4 class="text-left padding-left-15 pull-left no-margin letter-red"><?php echo Yii::t("common","Being suppressed") ?></h4><br> + <?php } ?> + <h4 class="text-left padding-left-15 pull-left no-margin"> + <span id="nameHeader"> + <div class="pastille-type-element bg-<?php echo $iconColor; ?> pull-left"> + + </div> + <i class="fa fa-<?php echo $icon; ?> pull-left margin-top-5"></i> + <div class="name-header pull-left"><?php echo @$element["name"]; ?></div> + </span> + <?php if(($type==Organization::COLLECTION || $type==Event::COLLECTION) && @$element["type"]){ + if($type==Organization::COLLECTION) + $typesList=Organization::$types; + else + $typesList=Event::$types; + ?> + <span id="typeHeader" class="margin-left-10 pull-left"> + <i class="fa fa-x fa-angle-right pull-left"></i> + <div class="type-header pull-left"> + <?php echo Yii::t("category", $typesList[$element["type"]]) ?> + </div> + </span> + <?php } ?> + </h4> + </div> + + <?php + $classAddress = ( (@$element["address"]["postalCode"] || @$element["address"]["addressLocality"] || @$element["tags"]) ? "" : "hidden" ); + //if(@$element["address"]["postalCode"] || @$element["address"]["addressLocality"] || @$element["tags"]){ ?> + <div class="header-address-tags col-xs-12 col-sm-9 col-md-9 col-lg-10 pull-right margin-bottom-5 <?php echo $classAddress ; ?>"> + <?php if(!empty($element["address"]["addressLocality"])){ ?> + <div class="header-address badge letter-white bg-red margin-left-5 pull-left"> + <?php + echo !empty($element["address"]["streetAddress"]) ? "<i class='fa fa-map-marker'></i> ".$element["address"]["streetAddress"].", " : ""; + echo !empty($element["address"]["postalCode"]) ? + $element["address"]["postalCode"].", " : ""; + echo $element["address"]["addressLocality"]; + ?> + </div> + <?php $classCircleO = (!empty($element["tags"]) ? "" : "hidden" ); ?> + <span id="separateurTag" class="margin-right-10 margin-left-10 text-white pull-left <?php echo $classCircleO ; ?>" style="font-size: 10px;line-height: 20px;"> + <i class="fa fa-circle-o"></i> + </span> + + <?php } ?> + <div class="header-tags pull-left"> + <?php + if(@$element["tags"]){ + foreach ($element["tags"] as $key => $tag) { ?> + <span class="badge letter-red bg-white" style="vertical-align: top;">#<?php echo $tag; ?></span> + <?php } + } ?> + </div> + </div> + + <div class="col-xs-12 col-sm-9 col-md-9 col-lg-10 pull-right"> + <span class="pull-left text-white" id="shortDescriptionHeader"><?php echo ucfirst(substr(trim(@$element["shortDescription"]), 0, 180)); ?> + </span> + </div> + + <?php if($type==Event::COLLECTION && false){ ?> + <div class="section-date pull-right"> + + <div style="font-size: 14px;font-weight: none;"> + <?php if(@$element['parent']){ ?> + <?php echo Yii::t("common","Planned on") ?> : + <a href="#page.type.<?php echo $element['parentType']; ?>.id.<?php echo $element['parentId']; ?>" + class="lbh"> + <i class="fa fa-calendar"></i> <?php echo $element['parent']['name']; ?> + </a><br/> + <?php } ?> + <?php if(@$element['organizerType'] && @$element['organizerId']){ ?> + <?php echo Yii::t("common","Organized by"); ?> : + <a href="#page.type.<?php echo $element['organizerType']; ?>.id.<?php echo $element['organizerId']; ?>" + class="lbh"> + <i class="fa text-<?php echo Element::getColorIcon($element['organizerType']); ?> fa-<?php echo Element::getFaIcon($element['organizerType']); ?>"></i> + <?php echo $element['organizer']['name']; ?> + </a> + <?php } ?> + </div> + </div> + <?php } ?> + <?php if($type==Event::COLLECTION || $type==Poi::COLLECTION || $type==Project::COLLECTION){ ?> + <div class="section-date pull-right"> + <?php if($type==Event::COLLECTION){ ?> + <div class="header-banner" style="font-size: 14px;font-weight: none;"></div> + <?php } ?> + <div style="font-size: 14px;font-weight: none;"> + + <div id="parentHeader" > + <?php if(@$element['parent']){ + + if($type==Event::COLLECTION){ + $msg = Yii::t("common","Planned on") ; + }else{ + $msg = Yii::t("common","Carried by") ; + } + + $icon = Element::getFaIcon($element['parentType']); + + echo $msg ?> : <a href="#page.type.<?php echo $element['parentType']; ?>.id.<?php echo $element['parentId']; ?>" class="lbh"> <i class="fa fa-<?php echo $icon ; ?>"></i> <?php echo $element['parent']['name']; ?></a><br/> + <?php } ?> + </div> + <div id="organizerHeader" > + <?php if( @$element['organizerType'] && @$element['organizerId'] && + $element["organizerId"] != "dontKnow" && $element["organizerType"] != "dontKnow"){ ?> + <?php echo Yii::t("common","Organized by"); ?> : + <a href="#page.type.<?php echo $element['organizerType']; ?>.id.<?php echo $element['organizerId']; ?>" + class="lbh"> + <i class="fa text-<?php echo Element::getColorIcon($element['organizerType']); ?> fa-<?php echo Element::getFaIcon($element['organizerType']); ?>"></i> + <?php echo $element['organizer']['name']; ?> + </a> + <?php } ?> + </div> + </div> + </div> + <?php } ?> + </div> + + <div class="pull-right col-sm-3 col-md-3" style=""></div> +</div> + +<div id="uploadScropResizeAndSaveImage" style="display:none;padding:0px 60px;"> + <div class="close-modal" data-dismiss="modal"><div class="lr"><div class="rl"></div></div></div> + <div class="col-lg-12"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" + class="inline margin-top-25 margin-bottom-5" height="50"> + <br> + </div> + <div class="modal-header text-dark"> + <h3 class="modal-title text-center" id="ajax-modal-modal-title"> + <i class="fa fa-crop"></i> <?php echo Yii::t("common","Resize and crop your image to render a beautiful banner") ?> + </h3> + </div> + <div class="panel-body"> + <div class='col-md-offset-1' id='cropContainer'> + <img src='' id='cropImage' class='' style=''/> + <div class='col-md-12'> + <button class='btn btn-success text-white imageCrop saveBanner'><i class="fa fa-send"></i> <?php echo Yii::t("common","Save") ?></button> + </div> + </div> + </div> +</div> + +<script> +jQuery(document).ready(function() { + $("#col-banner").mouseenter(function(){ + $("#banner_element").show(); + }).mouseleave(function(){ + $("#banner_element").hide(); + }); + //IMAGE CHANGE// + $("#uploadScropResizeAndSaveImage .close-modal").click(function(){ + $.unblockUI(); + }); + + + $("#banner_element").click(function(event){ + if (!$(event.target).is('input')) { + $(this).find("input[name='banner']").trigger('click'); + } + //$('#'+contentId+'_avatar').trigger("click"); + }); + + $('#banner_change').off().on('change.bs.fileinput', function () { + setTimeout(function(){ + var files = document.getElementById("banner_change").files; + if (files[0].size > 2097152) + toastr.warning("Please reduce your image before to 2Mo"); + else { + for (var i = 0; i < files.length; i++) { + var file = files[i]; + var imageType = /image.*/; + if (!file.type.match(imageType)) { + continue; + } + var img=document.getElementById("cropImage"); + img.file = file; + var reader = new FileReader(); + reader.onload = (function(aImg) { + var image = new Image(); + image.src = reader.result; + img.src = reader.result; + image.onload = function() { + // access image size here + var imgWidth=this.width; + var imgHeight=this.height; + if(imgWidth>=400 && imgHeight>=150){ + $.blockUI({ + message: $('div#uploadScropResizeAndSaveImage'), + css: {cursor:null,padding: '0px !important'} + }); + $("#uploadScropResizeAndSaveImage").parent().css("padding-top", "0px !important"); + //$("#uploadScropResizeAndSaveImage").html(html); + + setTimeout(function(){ + var setImage={"width":1600,"height":400}; + var parentWidth=$("#cropContainer").width(); + //var parentHeight=setImage.height*(parentWidth/setImage.width); + var crop = $('#cropImage').cropbox({ + width: parentWidth, + height: 300, + zoomIn:true, + zoomOut:true}, function() { + cropResult=this.result; + console.log(cropResult); + }).on('cropbox', function(e, crop) { + cropResult=crop; + console.log('crop window: ', crop); + + }); + $(".saveBanner").click(function(){ + //console.log(cropResult); + //var cropResult=cropResult; + $(this).prop("disabled",true); + $(this).find("i").removeClass("fa-send").addClass("fa-spin fa-spinner"); + $("#banner_photoAdd").submit(); + }); + $("#banner_photoAdd").off().on('submit',(function(e) { + //alert(moduleId); + if(debug)mylog.log("id2", contextData.id); + $(".banner_isSubmit").val("true"); + e.preventDefault(); + console.log(cropResult); + var fd = new FormData(document.getElementById("banner_photoAdd")); + fd.append("parentId", contextData.id); + fd.append("parentType", contextData.type); + fd.append("formOrigin", "banner"); + fd.append("contentKey", "banner"); + fd.append("cropW", cropResult.cropW); + fd.append("cropH", cropResult.cropH); + fd.append("cropX", cropResult.cropX); + fd.append("cropY", cropResult.cropY); + //var formData = new FormData(this); + //console.log("formdata",formData); + /*formData.files= document.getElementById("banniere_change").files; + formData.crop= cropResult; + formData.parentId= contextData.id; + formData.parentType= contextData.type; + formData.formOrigin= "banniere";*/ + //console.log(formData); + // Attach file + //formData.append('image', $('input[type=banniere]')[0].files[0]); + $.ajax({ + url : baseUrl+"/"+moduleId+"/document/uploadSave/dir/communecter/folder/"+contextData.type+"/ownerId/"+contextData.id+"/input/banner", + type: "POST", + data: fd, + contentType: false, + cache: false, + processData: false, + dataType: "json", + success: function(data){ + if(data.result){ + $(".saveBanner").prop("disabled",false); + $(".saveBanner").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + newBanner='<img class="col-md-12 col-sm-12 col-xs-12 no-padding img-responsive" src="'+baseUrl+data.src.profilBannerUrl+'" style="">'; + $("#contentBanner").html(newBanner); + $(".contentHeaderInformation").addClass("backgroundHeaderInformation"); + $.unblockUI(); + //$("#uploadScropResizeAndSaveImage").hide(); + } + } + }); + })); + }, 300); + } + else + toastr.warning(trad["minsizebanner"]); + }; + }); + reader.readAsDataURL(file); + } + } + }, 400); + }); +}); +</script> \ No newline at end of file diff --git a/views/element/confirmDeleteModal.php b/views/element/confirmDeleteModal.php new file mode 100644 index 0000000000000000000000000000000000000000..4f8ac14714db49d0b003423c9d1c2477a6bc5060 --- /dev/null +++ b/views/element/confirmDeleteModal.php @@ -0,0 +1,56 @@ +<!-- Modal --> +<div id="modal-delete-element" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h4 class="modal-title text-dark"><?php echo Yii::t("common","Delete")?></h4> + </div> + <div class="modal-body text-dark"> + <p> + <?php echo Yii::t('common',"Are you sure you want to delete this element ? </br> The element will be deleted : it will not be referenced in all their projects or events. But these last ones will not be deleted. <span class=\"text-red\">Warning:</span> this action can be cancelled only by an administrator") ;?> + </p> + <br> + <?php echo Yii::t('common','You can add bellow the reason why you want to delete this element :') ;?> + <textarea id="reason" class="" rows="2" style="width: 100%" placeholder="Laisser une raison... (optionnel)"></textarea> + </div> + <div class="modal-footer"> + <button id="confirmDeleteElement" type="button" class="btn btn-warning"><?php echo Yii::t('common','I confim the delete !');?></button> + <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo Yii::t('common','No');?></button> + </div> + </div> + + </div> +</div> + +<script> + $("#confirmDeleteElement").off().on("click", function(){ + var url = baseUrl+"/"+moduleId+"/element/delete/id/"+contextData.id+"/type/"+contextData.type; + mylog.log("deleteElement", url); + var param = new Object; + param.reason = $("#reason").val(); + $.ajax({ + type: "POST", + url: url, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + console.log("Retour de delete : "+data.status); + if (data.status == "deleted") + urlCtrl.loadByHash("#search"); + else + urlCtrl.loadByHash("#page.type."+contextData.type+".id."+contextData.id); + }else{ + toastr.error(data.msg); + } + }, + error: function(data){ + toastr.error("Something went really bad ! Please contact the administrator."); + } + }); + }); +</script> \ No newline at end of file diff --git a/views/element/confirmDeletePendingModal.php b/views/element/confirmDeletePendingModal.php new file mode 100644 index 0000000000000000000000000000000000000000..02b93f09156c7c6272b00fc154de365db9d9ef75 --- /dev/null +++ b/views/element/confirmDeletePendingModal.php @@ -0,0 +1,65 @@ +<!-- Modal --> +<div id="modal-confirm-delete-pending" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h4 class="modal-title text-dark"><?php echo Yii::t("common","Delete Pending")?></h4> + </div> + <div class="modal-body text-dark"> + <p> + <?php + + echo Yii::t('common',"This element is in status 'delete pending'. It will be deleted in {nbDaysBeforeDelete} days.", array("{nbDaysBeforeDelete}"=>Element::NB_DAY_BEFORE_DELETE)) ;?> + </p> + <br> + <?php + $who = Person::getById($element["userAskingToDelete"]); + $when = date("d/m/Y H:i:s", $element["statusDate"]->sec); + echo Yii::t('common',"<b>{who}</b> ask to delete this element on {when}.", array("{who}" => $who["name"], "{when}" => $when));?> + <br> + <?php if (!empty($element["reasonDelete"])) + echo Yii::t('common',"For the following reason : <i>{why}</i>", array("{why}" => $element["reasonDelete"]));?> + <br> + <br> + <?php echo Yii::t('common',"As an admin of this element, if you think it's a mistake you can stop the process.") ;?> + <br> + <?php echo Yii::t('common',"Do you want to stop the delete process of this element ?") ;?> + </div> + <div class="modal-footer"> + <button id="stopDelete" type="button" class="btn btn-warning"><?php echo Yii::t('common','Stop the delete !');?></button> + <button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo Yii::t('common','No : this element will be deleted');?></button> + </div> + </div> + + </div> +</div> + +<script> + $("#stopDelete").off().on("click", function(){ + var url = baseUrl+"/"+moduleId+"/element/stopDelete/id/"+contextData.id+"/type/"+contextData.type; + mylog.log("stopDelete", url); + var param = new Object; + $.ajax({ + type: "POST", + url: url, + data: param, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash(location.hash); + }else{ + toastr.error(data.msg); + } + }, + error: function(data){ + toastr.error("<?php echo Yii::t('common',"Something went really bad ! Please contact the administrator.") ;?>"); + } + }); + }); + + $("#modal-confirm-delete-pending").modal("show"); +</script> \ No newline at end of file diff --git a/views/element/invite.php b/views/element/invite.php new file mode 100644 index 0000000000000000000000000000000000000000..052b43f1a669b3c40bd7bd0d12dcb069ffef3e14 --- /dev/null +++ b/views/element/invite.php @@ -0,0 +1,765 @@ +<style> + +#invite-modal-element .dropdown-menu{ + top:65%; + left : 15px; + +} + +#invite-modal-element .nav-tabs > li > a { + border: 0 none; + border-radius: 5px; + color: #8E9AA2; + min-width: 70px; + padding: 5px !important; + margin-bottom:10px; +} +#invite-modal-element .nav-tabs > li > a { + background-color: transparent !important; +} +#invite-modal-element .nav-tabs > li > a > div:hover { + background-color: #3C5665; + color:white !important; +} +#invite-modal-element .nav-tabs > li > a > div:focus { + background-color: #3C5665; + color:white !important; +} + +#invite-modal-element #listEmailGrid{ + max-height:400px; + min-height:250px; + overflow-y:auto; + overflow-x:hidden; + padding-top:15px; + border-left: 1px solid rgba(128, 128, 128, 0.26); +} + +</style> +<div class="portfolio-modal modal fade" id="invite-modal-element" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-content padding-top-15"> + <div class="close-modal" data-dismiss="modal"> + <div class="lr"> + <div class="rl"> + </div> + </div> + </div> + <div class="container"> + <div class="row"> + <div class="col-lg-12"> + <h3 class="letter-red no-margin hidden-xs"> + <i class="fa fa-plus-circle"></i> Inviter ou Rechercher une personne<br> + </h3> + </div> + </div> + + <div class="row"> + <div class="col-md-12 margin-top-15 text-dark menuInvite"> + <ul class="nav nav-tabs"> + <li role="presentation"> + <a href="javascript:" class="" id="menuInviteSomeone"> + <div id="titleInviteSomeone" class='radius-10 padding-10 text-yellow text-dark'> + <i class="fa fa-search fa-2x"></i> Rechercher ... + </div> + </a> + </li> + <!--<li role="presentation"> + <a href="#" class="" id="menuGmail"> + <div id="titleGmail" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-envelope fa-2x"></i> + Gmail + </div> + </a> + </li> + <li role="presentation"> + <a href="javascript:" class="" id="menuGooglePlus"> + <div id="titleGooglePlus" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-google-plus-square fa-2x"></i> + Google+ + </div> + </a> + </li> --> + <li role="presentation"> + <a href="javascript:" class="" id="menuImportFile"> + <div id="titleImportFile" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-upload fa-2x"></i> + Importer un fichier + </div> + </a> + </li> + <li role="presentation"> + <a href="javascript:" class="" id="menuWriteMails"> + <div id="titleWriteMails" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-pencil-square-o fa-2x"></i> + Saisir + </div> + </a> + </li> + </ul> + <hr> + </div> + </div> + <div class="row links-create-element"> + <div class="col-lg-12"> + + <div id="" class="modal-body"> + + + <form class="form-invite" id="divInviteSomeone" autocomplete="off"> + <input class="invite-parentId hide" id="inviteParentId" name="inviteParentId" type="text"/> + <input class="invite-id hide" id = "inviteId" name="inviteId" type="text"/> + <div class="col-xs-12" id="step1"> + <div class="col-md-1 text-right" style="margin-top:5px;"> + <i class="fa fa-search fa-2x"></i> + </div> + <div class="col-md-10"> + <div class="form-group"> + <input class="invite-search form-control text-left" placeholder="Un nom, un e-mail ..." autocomplete = "off" id="inviteSearch" name="inviteSearch" value=""> + <ul class="dropdown-menu col-md-10" id="dropdown_searchInvite" style=""> + <li class="li-dropdown-scope">-</li> + </ul> + </input> + </div> + </div> + </div> + <div class="col-xs-12 hidden" id="step2"> + <div class="form-group" id="ficheUser"> + <div class="col-md-12 text-center"> + <div class="photoInvited text-center col-md-4"> + </div> + <a class="pending btn btn-xs btn-red tooltips" data-toggle="tooltip" data-placement="bottom" title="Cette personne a déjà été invité, mais na pas encore rejoint le réseau">Cette personne a déjà été invité, mais n\'a pas encore rejoint le réseau</a> + + <a href="javascript:;" class="connectBtn btn btn-lg tooltips " data-placement="top" data-original-title="Suivre cette personne" ><i class=" connectBtnIcon fa fa-link "></i> <?php echo Yii::t("common","Follow this person") ?></a> + <a href="javascript:;" class="disconnectBtn btn btn-lg tooltips " data-placement="top" data-original-title="Ne plus suivre cette personne" ><i class=" disconnectBtnIcon fa fa-unlink "></i> <?php echo Yii::t("common","Unfollow this person")?></a> + <hr> + <h4 id="ficheUser-ficheName" name="ficheUser-ficheName"></h4> + <a href="" class="btn btn-default lbh" id="ficheUser-btnProfil">Aller sur sa page</a><br> + <input id="inviteId" name="inviteId" type="hidden" value=""> + <span id="ficheUser-email" name="ficheUser-email" ></span><br><br> + <span id="ficheUser-address" name="ficheUser-address" ></span><br><br> + <span id="ficheUser-tags" name="ficheUser-tags" ></span><br> + <br> + </div> + </div> + </div> + <div class="col-xs-12 hidden" id="step3"> + <div class="modal-body text-center"> + <h2 class="text-green"> + <i class="fa fa-plus-circle padding-bottom-10"></i> + <span class="font-light"> Inviter quelqu'un</span> + </h2> + + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1" id="iconUser"> + <i class="fa fa-user fa-2x"></i> + </div> + <div class="col-md-9"> + <input class="invite-name form-control" placeholder="<?php echo Yii::t("common", "Name");?>" id="inviteName" name="inviteName" value="" /> + </div> + </div> + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1"> + <i class="fa fa-envelope-o fa-2x"></i> + </div> + <div class="col-md-9"> + <input class="invite-email form-control" placeholder="<?php echo Yii::t("common", "Email");?>" id="inviteEmail" name="inviteEmail" value="" /> + </div> + </div> + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1"> + <i class="fa fa-align-justify fa-2x"></i> + </div> + <div class="col-md-9"> + <textarea class="invite-text form-control" id="inviteText" name="inviteText" rows="4">Bonjour, J'ai découvert un réseau sociétal citoyen appelé "Communecter - être connecté à sa commune". +Tu peux agir concrétement autour de chez toi et découvrir ce qui s'y passe. Viens rejoindre le réseau sur communecter.org.</textarea> + </div> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 text-center"> + <hr> + <a href="javascript:;" style="font-size: 13px;" class="btn btn-danger btnCancel" type="button" data-dismiss="modal"><i class="fa fa-times"></i> Retour</a> + <button class="btn btn-primary" id="btnInviteNew" ><i class="fa fa-send"></i> Inviter</button> + </div> + </div> + + </form> + + <div id="divImportFile" class="hidden"> + <div class="col-xs-12"> + <label for="fileEmail" > Fichier (CSV) : <input type="file" id="fileEmail" name="fileEmail" accept=".csv"> </label> + </div><br/><hr/><br/> + </div> + <div id="divWriteMails" class="hidden"> + <div class="col-xs-12"> + <textarea id="textareaMails" class="form-control col-xs-12" rows="5"></textarea> + <a href="javascript:;" class="btn btn-success col-xs-12" id="submitAfficherInvite">Vérification</a> + </div> + </div> + <div class="col-xs-12 hidden" id="countContacts" ><h4 class="modal-title pull-right"><span id="nbContacts"></span> / <span id="allContacts"></span> contacts selectionnées</h4></div> + <div id="listEmailGrid" class="margin-bottom-10 hidden"></div> + </div> + <div class="modal-footer hidden"> + <button id="btn-cancel-invite" type="button" class="btn btn-danger btn-sm" data-dismiss="modal"><i class="fa fa-times"></i> Quitter </button> + <button id="btn-save-invite" type="button" class="btn btn-success btn-sm" data-dismiss="modal"><i class="fa fa-check"></i> Inviter</button> + </div> + </div> + </div> + </div> + </div> +</div> + + +<script type="text/javascript"> + +jQuery(document).ready(function() { + bindInviteModal(); + runinviteFormValidation(); +}); + +function bindInviteModal(){ + mylog.log("bindInviteModal"); + + $("#invite-modal-element #btn-cancel").click(function(){ + if(newMemberInCommunity && (currentView=="detail" || currentView=="directory")) { + urlCtrl.loadByHash(location.hash); + } + }); + + $("#invite-modal-element #btn-save-invite").off().on('click', function(){ + mylog.log("btn-save-invite"); + $(this).prop("disabled",true); + $(this).find("i").removeClass("fa-send").addClass("fa-spinner fa-spin"); + if(listMails.length == 0) + toastr.error("Veuillez sélectionner une adresse mail."); + else{ + if($(".error-block-invite").length>=0) + $(".error-block-invite").remove(); + mylog.log("listMails", listMails); + if(Object.keys(listMails).length==0){ + dataInvite={msgEmail : $("#invite-modal-element #inviteText").val(), + invitedUserName : $("#invite-modal-element #inviteName").val(), + invitedUserEmail : $("#invite-modal-element #inviteEmail").val(), + listMails:{} + }; + } else{ + dataInvite={ + msgEmail : $("#invite-modal-element #inviteText").val(), + listMails:listMails + } + } + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: dataInvite, + type:"POST", + success: function(data){ + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + mylog.log(data); + + if(typeof data.data !="undefined"){ + $.each(data.data, function(key, elt) { + addFloopEntity(elt.invitedUser.id, "<?php echo Person::COLLECTION ?>", elt.invitedUser); + }); + }else + addFloopEntity(data.invitedUser.id, "<?php echo Person::COLLECTION ?>", data.invitedUser); + urlCtrl.loadByHash(location.hash); + + } else { + $.unblockUI(); + toastr.error(data.msg); + $("#invite-modal-element #step3 #btn-save-invite").prop("disabled",false); + $("#invite-modal-element #step3 #btn-save-invite").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + } + } + }) + .done(function (data){ + $.unblockUI(); + + }); + } + }); + + $('#invite-modal-element #inviteSearch').keyup(function(e){ + var search = $('#invite-modal-element #inviteSearch').val(); + if(search.length>2){ + clearTimeout(timeout); + timeout = setTimeout('autoCompleteInviteSearch("'+encodeURI(search)+'")', 500); + }else{ + $("#invite-modal-element #dropdown_searchInvite").css({"display" : "none" }); + } + }); + + $("#menuInviteSomeone").click(function() { + fadeInView("divInviteSomeone"); + $("#shareForm").hide(); + }); + + $("#menuGmail").click(function() { + fadeInView("divGmail"); + $("#shareForm").hide(); + }); + + $("#menuGooglePlus").click(function() { + fadeInView("divGooglePlus"); + $("#shareForm").hide(); + }); + + $("#menuImportFile").click(function() { + fadeInView("divImportFile"); + $("#shareForm").hide(); + }); + + $("#menuWriteMails").click(function() { + fadeInView("divWriteMails"); + $("#shareForm").hide(); + }); + + $("#divImportFile #fileEmail").change(function(e) { + mylog.log("fileEmail"); + $.blockUI({ + message : '<span class="homestead"><i class="fa fa-spin fa-circle-o-noch"></i> Merci de patienter ...</span>' + }); + $("#listEmailGrid").html(""); + var ext = $("#divImportFile input#fileEmail").val().split(".").pop().toLowerCase(); + mylog.log("ext", ext); + if($.inArray(ext, ["csv"]) == -1) { + toastr.error("Vous devez utiliser un format CSV"); + return false; + } + + if (e.target.files != undefined) { + var reader = new FileReader(); + mylog.log("reader", reader); + + reader.onload = function(e) { + var csvval = e.target.result.split("\n"); + checkAndGetMailsInvite(csvval); + }; + reader.readAsText(e.target.files.item(0)); + }else{ + toastr.error("Nous n'avons pas réussie à lire votre fichier."); + } + return false; + }); + + $("#invite-modal-element .connectBtn").off().on("click", function() { + var thiselement = this; + follow(typeObj.person.col, $('#invite-modal-element #inviteId').val(), userId, typeObj.person.col, function(){ + mylog.log('callback connectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-link"); + $('#invite-modal-element .disconnectBtn').show(); + $('#invite-modal-element .connectBtn').hide(); + //TODO add in myContacts + //listFollowsId.push($("#newInvite #inviteId").val()); + + $('#invite-modal-element #inviteSearch').val(""); + + }); + }); + + $("#invite-modal-element .disconnectBtn").off().on("click", function() { + var thiselement = this; + var idToDisconnect = $('#invite-modal-element #inviteId').val(); + var typeToDisconnect = "<?php echo Person::COLLECTION ?>"; + disconnectTo(typeObj.person.col,idToDisconnect,userId,typeObj.person.col,'followers',function() { + mylog.log('callback disconnectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + //// Find and remove item from an array + //TODO Remove in myContacts + // var i = listFollowsId.indexOf(idToDisconnect); + // if(i != -1) { + // listFollowsId.splice(i, 1); + // }textmail + // mylog.log(listFollowsId); + $('#invite-modal-element .disconnectBtn').hide(); + $('#invite-modal-element .connectBtn').show(); + $('#invite-modal-element #inviteSearch').val(""); + + + }); + }); + + $("#invite-modal-element #submitAfficherInvite").off().on("click", function() { + mylog.log("submitAfficherInvite"); + var mails = $("#invite-modal-element #textareaMails").val().split(/[\s\n;]+/); + checkAndGetMailsInvite(mails); + }); +} + +function runinviteFormValidation(el) { + + var forminvite = $('.form-invite'); + var errorHandler2 = $('.errorHandler', forminvite); + var successHandler2 = $('.successHandler', forminvite); + + forminvite.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + inviteName : { + required : true, + minlength : 2 + + }, + inviteEmail : { + required : true + } + }, + messages : { + inviteName : "* <?php echo Yii::t("common","Please specify the name") ?>",//+trad["Please specify a name"], + inviteEmail : "* <?php echo Yii::t("common","Please enter an email") ?>"//+trad["Please specify a email"] + }, + invalidHandler : function(invite, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + mylog.log("submit handler"); + successHandler2.show(); + errorHandler2.hide(); + $("#invite-modal-element #btnInviteNew").prop("disabled",true); + $("#invite-modal-element #btnInviteNew").find("i").removeClass("fa-send").addClass("fa-spin fa-spinner"); + var parentId = $(".form-invite .invite-parentId").val(); + var invitedUserName = $("#invite-modal-element #inviteName").val(); + var invitedUserEmail = $("#invite-modal-element #inviteEmail").val(); + $.blockUI({ + message : '<span class="homestead"><i class="fa fa-spin fa-circle-o-noch"></i> Merci de patienter ...</span>' + }); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: { + parentId : parentId, + invitedUserName : invitedUserName, + invitedUserEmail : invitedUserEmail, + msgEmail : $("#invite-modal-element #inviteText").val() + } + }) + .done(function (data) { + $.unblockUI(); + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + addFloopEntity(data.invitedUser.id, "<?php echo Person::COLLECTION ?>", data.invitedUser); + $("#invite-modal-element #step3").addClass("hidden"); + $("#invite-modal-element #inviteName").val(""); + $("#invite-modal-element #inviteEmail").val(""); + $("#invite-modal-element #inviteText").val('Bonjour, J\'ai découvert un réseau sociétal citoyen appelé "Communecter - être connecté à sa commune".\nTu peux agir concrétement autour de chez toi et découvrir ce qui s\'y passe. Viens rejoindre le réseau sur communecter.org."'); + $('#invite-modal-element #invite-modal').modal('hide'); + $('#invite-modal-element #inviteSearch').val(""); + $("#invite-modal-element #btnInviteNew").prop("disabled",false); + $("#invite-modal-element #btnInviteNew").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + } else { + $.unblockUI(); + $("#invite-modal-element #btnInviteNew").prop("disabled",false); + $("#invite-modal-element #btnInviteNew").find("i").removeClass("fa-spin fa-spinner").addClass("fa-send"); + toastr.error(data.msg); + } + }); + } + }); +}; + + +function autoCompleteInviteSearch(search){ + mylog.log("autoCompleteInviteSearch", search); + if (search.length < 3) { return } + tabObject = []; + + var data = { + "search" : search, + "searchMode" : "personOnly" + }; + + ajaxPost("", '<?php echo Yii::app()->getRequest()->getBaseUrl(true).'/'.$this->module->id?>/search/searchmemberautocomplete', data, + function (data){ + var str = "<li class='li-dropdown-scope'><a href='javascript:;' onclick='newInvitation()'>Pas trouvé ? Lancer une invitation à rejoindre votre réseau !</li>"; + var compt = 0; + var city, postalCode = ""; + $.each(data["citoyens"], function(k, v) { + city = ""; + mylog.log(v); + postalCode = ""; + var htmlIco ="<i class='fa fa-user fa-2x'></i>" + if(v.id != userId) { + tabObject.push(v); + console.log(v); + if(v.profilThumbImageUrl != ""){ + var htmlIco= "<img width='25' height='25' alt='image' class='img-circle' src='"+baseUrl+v.profilThumbImageUrl+"'/>" + } + if (v.address != null) { + city = v.address.addressLocality; + postalCode = v.address.postalCode; + } + str += "<li class='li-dropdown-scope'>" + + "<a href='javascript:;' onclick='setInviteInput("+compt+");'>"+htmlIco+" "+v.name ; + + if(typeof postalCode != "undefined") + str += "<br/>"+postalCode+" "+city; + //str += "<span class='city-search'> "+postalCode+" "+city+"</span>" ; + str += "</a></li>"; + + compt++; + } + }); + + $("#invite-modal-element #dropdown_searchInvite").html(str); + $("#invite-modal-element #dropdown_searchInvite").css({"display" : "inline" }); + } + ); +} + +function setInviteInput(num){ + mylog.log("setInviteInput", num); + var person = tabObject[num]; + var personId = person["id"]; + mylog.log(person, personId); + + $('#invite-modal-element #inviteName').val(person["name"]); + $('#invite-modal-element #inviteId').val(personId); + $("#invite-modal-element #ficheUser-ficheName").text(person["name"]); + $("#invite-modal-element #ficheUser-btnProfil").attr("href", "#page.type.citoyens.id."+person["id"]); + + + + if (person.address != null) { + //Address : CP + Locality + $("#invite-modal-element #ficheUser-address").text(((typeof person.address.postalCode == "undefined")?trad["UnknownLocality"]:person.address.postalCode+" ")+person.address.addressLocality); + } + + if (person.email != null) { + //Email + $("#invite-modal-element #ficheUser-email").text(person.email); + } + //Tags + var tagsStr = ""; + if( "object" == typeof person.tags && person.tags ) { + $.each( person.tags , function(i,tag){ + tagsStr += "<span class='label label-inverse'>"+tag+"</span> "; + }); + } else { + tagsStr += "<span class='label label-inverse'>No Tag</span> "; + } + //$("#invite-modal-element #ficheUser-tags").html('<div class="pull-left"><i class="fa fa-tags"></i> '+tagsStr+'</div>'); + $(".photoInvited").empty(); + if (person["profilMediumImageUrl"] != "") { + $(".photoInvited").html("<img class='img-responsive' src='"+baseUrl+person["profilMediumImageUrl"]+"' />"); + } else { + $(".photoInvited").html("<span><i class='fa fa-user_circled fa-3x'></i></span>"); + } + + //Pending + if (person.pending == true) { + $(".pending").show(); + } else { + $(".pending").hide(); + } + + //Already in the network of the current user + ; + //if (listFollowsId.indexOf(personId) != -1) { + if (inMyContacts("people",personId) == true) { + $('#invite-modal-element .disconnectBtn').show(); + $('#invite-modal-element .connectBtn').hide(); + } else { + $('#invite-modal-element .disconnectBtn').hide(); + $('#invite-modal-element .connectBtn').show(); + } + + //Show / Hide steps + $("#invite-modal-element #dropdown_searchInvite").css({"display" : "none" }); + $("#invite-modal-element #step3").addClass("hidden"); + $("#invite-modal-element #step2").removeClass("hidden"); + +} + +function newInvitation(){ + $("#invite-modal-element #dropdown_searchInvite").css({"display" : "none" }); + $("#invite-modal-element #step2").addClass("hidden"); + $("#invite-modal-element #step3").removeClass("hidden"); + + $('#invite-modal-element #inviteId').val(""); + var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; + if(emailReg.test( $("#invite-modal-element #inviteSearch").val() )){ + $('#invite-modal-element #inviteEmail').val( $("#invite-modal-element #inviteSearch").val()); + $("#invite-modal-element #inviteName").val(""); + }else{ + $("#invite-modal-element #inviteName").val($("#invite-modal-element #inviteSearch").val()); + $("#invite-modal-element #inviteEmail").val(""); + } + + $("#invite-modal-element #inviteText").val("<?php echo Yii::t("person","Hello, \\nCome and meet me on that website!\\nAn email, your town and you are connected to your city!\\nYou can see everything that happens in your city and act for the commons."); ?>"); +} + +function fadeInView(inView){ + mylog.log("fadeInView", inView); + $("#invite-modal-element .modal-footer").addClass("hidden"); + $("#invite-modal-element #listEmailGrid").html(""); + if(inView == "divGmail") + { + $("#divGmail").removeClass("hidden"); + $("#divInviteSomeone").addClass("hidden"); + $("#divGooglePlus").addClass("hidden"); + $("#divImportFile").addClass("hidden"); + $("#divWriteMails").addClass("hidden"); + $("#divCheckMail").addClass("hidden"); + //changeFocus("titleGmail"); + auth(); + } + else if(inView == "divInviteSomeone") + { + $("#divInviteSomeone").removeClass("hidden"); + $("#divGmail").addClass("hidden"); + $("#divGooglePlus").addClass("hidden"); + $("#divImportFile").addClass("hidden"); + $("#divWriteMails").addClass("hidden"); + $("#divCheckMail").addClass("hidden"); + //changeFocus("titleInviteSomeone"); + + } + else if(inView == "divGooglePlus") + { + $("#divGooglePlus").removeClass("hidden"); + $("#divInviteSomeone").addClass("hidden"); + $("#divGmail").addClass("hidden"); + $("#divImportFile").addClass("hidden"); + $("#divWriteMails").addClass("hidden"); + $("#divCheckMail").addClass("hidden"); + //changeFocus("titleGooglePlus"); + } + else if(inView == "divImportFile") + { + $("#divImportFile").removeClass("hidden"); + $("#divInviteSomeone").addClass("hidden"); + $("#divGmail").addClass("hidden"); + $("#divGooglePlus").addClass("hidden"); + $("#divWriteMails").addClass("hidden"); + $("#divCheckMail").addClass("hidden"); + //changeFocus("titleImportFile"); + } + else if(inView == "divWriteMails") + { + $("#divWriteMails").removeClass("hidden"); + $("#divInviteSomeone").addClass("hidden"); + $("#divGmail").addClass("hidden"); + $("#divGooglePlus").addClass("hidden"); + $("#divImportFile").addClass("hidden"); + $("#divCheckMail").addClass("hidden"); + //changeFocus("titleWriteMails"); + } + +} + +function checkAndGetMailsInvite(mails){ + mylog.log("checkAndGetMailsInvite", mails); + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/person/getcontactsbymails', + data: { mailsList : mails }, + dataType: "json", + success: function(data){ + mylog.log("getcontactsbymails data", data, data.length); + var nbContact = 0 ; + var text2 = "" ; + var idMail = "" + $.each(mails, function(keyMails, valueMails){ + mylog.log("valueMails", valueMails, typeof data[valueMails]); + nbContact++; + idMail = "contact"+nbContact ; + if(typeof data[valueMails] != "string" ){ + text2 += '<li id="'+idMail+'" class="item_map_list col-xs-12" style="display: inline-block;">'+ + '<div class="col-xs-1"><input id="checkbox'+idMail+'" class="checkboxList" data-id="'+idMail+'" data-mail="'+valueMails+'" data-name="" type="checkbox"></div>'+ + '<label class="col-xs-11" for="checkbox'+idMail+'">'+ + '<a href="javascript:;" onclick="checkedMailInvite(\''+idMail+'\', \''+valueMails+'\', \'\');">'; + if(typeof data[valueMails] != "undefined" && data[valueMails] != null && typeof data[valueMails].profilThumbImageUrl != "undefined"){ + text2 += '<div class="">'+ + '<img src="'+baseUrl+data[valueMails].profilThumbImageUrl+'" alt="image" width="40" height="40" />'+ + ' <span class="text-xss" > '+data[valueMails].name+' : '+ valueMails.trim() + '</span>'+ + '</div>'; + }else{ + text2 += '<div class="">'+ + '<span class="text-xss" > '+ valueMails.trim() + '</span><br/>'+ + '</div>'; + } + text2 += '</a></label></li>'; + }else{ + text2 += '<li id="'+idMail+'" class="item_map_list col-xs-12" style="display: inline-block;">'+ + '<div class="col-xs-1"></div>'+ + '<div class="col-xs-11">'+ + '<span class="text-xss" > '+ valueMails.trim() + ((data[valueMails] != null) ? ' : '+ data[valueMails] : "" ) + '</span><br/>'+ + '</div></li>'; + } + + }); + $("#invite-modal-element #listEmailGrid").html(text2); + $("#invite-modal-element .modal-footer").removeClass("hidden"); + $("#invite-modal-element #nbContacts").html(0); + $("#invite-modal-element #allContacts").html(nbContact); + $("#invite-modal-element #countContacts").removeClass("hidden"); + $("#invite-modal-element #listEmailGrid").removeClass("hidden"); + bindCheckboxInvite(); + $.unblockUI(); + } + }); +} + +function bindCheckboxInvite() { + $("#invite-modal-element .checkboxList").change(function() { + checkedMailInvite($(this).data("id"), $(this).data("mail"), $(this).data("name")); + }); +}; + +function checkedMailInvite(id, mail, name) { + mylog.log("checkedMailInvite", id, mail, name, typeof listMails[mail]); + if( typeof listMails[mail] != "undefined" ){ + $( "#invite-modal-element #"+id ).removeClass("item_map_list_blue"); + $( "#invite-modal-element #"+id ).addClass("item_map_list"); + $("#invite-modal-element #checkbox"+id).prop("checked", false); + delete(listMails[mail]); + }else{ + $( "#invite-modal-element #"+id ).removeClass("item_map_list"); + $( "#invite-modal-element #"+id ).addClass("item_map_list_blue"); + $("#invite-modal-element #checkbox"+id).prop("checked", true); + listMails[mail] = name ; + } + $("#invite-modal-element #nbContacts").html(Object.keys(listMails).length); +}; + +function initList() { + $("#invite-modal-element #listEmailGrid").addHidden("hidden"); + $("#invite-modal-element .modal-footer").addHidden("hidden"); + $("#invite-modal-element #countContacts").addHidden("hidden"); +}; + + + +</script> \ No newline at end of file diff --git a/views/element/linksMenu.php b/views/element/linksMenu.php new file mode 100644 index 0000000000000000000000000000000000000000..5ba90ba0655abc62278d373d81421d7a2a273086 --- /dev/null +++ b/views/element/linksMenu.php @@ -0,0 +1,236 @@ +<style> +.menu-linksBtn{ + text-shadow: 1px 1px 1px rgb(0,0,0); + padding: 5px 10px !important; + font-size: 14px !important; + text-transform: none !important; + border:none !important; + margin:0px !important; + border-radius: 0px !important; + float: left; +} +.menu-linksBtn i{ + margin:0px !important; +} +.menu-linksBtn .fa-chevron-down{ + font-size: 10px !important; +} +.menu-linksBtn li{ + font-size:12px !important; +} +.blockUsername .dropdown-menu li{ + text-shadow: none !important; + color: #333; +} +.blockUsername .dropdown-menu a{ + padding:0px 5px !important; +} +.blockUsername .dropdown-menu{ + /*position:absolute!important;*/ + border: 1px solid #ccc !important; + border-radius: 0px !important; +} +.blockUsername .noHover{ + background-color: white !important; + font-size: 12px !important; + font-style: italic; + padding:0px 5px !important; +} +.littleActions{ + padding-top: 10px !important; + padding-bottom: 20px !important; +} +.no-border-right{ + border-right: inherit; +} +.blockUsername{ + position: absolute; + bottom: 3px; + left: 3px; + right: 3px; + background-color: rgba(0, 0, 0, 0.5); +} +</style> +<?php + $visibleXsLinks=""; + if(@$linksBtn["followBtn"]){ + if(@$linksBtn["isFollowing"]){ + $statusXsMenu=Yii::t("common","You are following {which}",array("{which}"=>Yii::t("common","this ".Element::getControlerByCollection($elementType)))); + $visibleXsLinks.='<li class="text-left visible-xs">'. + '<a href="javascript:;" class="bg-white text-red" '. + 'onclick="disconnectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\'followers\')">'. + '<i class="fa fa-sign-out"></i> '.Yii::t("common", "Don't follow this page"). + '</a>'. + '</li>'; + ?> + <?php if(!@$xsView){ ?> + <ul class="nav navbar-nav hidden-xs"> + <li class="dropdown"> + <a href="javascript:;" class="btn-o menu-btn-follow menu-linksBtn hidden-xs" data-toggle="dropdown"> + <i class="fa fa-rss"></i> <?php echo Yii::t("common","Following") ?> <i class="fa fa-chevron-down"></i> + </a> + <ul class="dropdown-menu"> + <li class="text-left"> + <a href="javascript:;" class="bg-white text-red" onclick="disconnectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','followers')"> + <i class="fa fa-sign-out"></i><?php echo Yii::t("common", "Don't follow this page"); ?> + </a> + </li> + </ul> + </li> + </ul> + <?php } ?> +<?php + }else{ + $visibleXsLinks.='<li class="text-left visible-xs">'. + '<a href="javascript:;" class="bg-white" '. + 'onclick="follow(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\')">'. + '<i class="fa fa-rss"></i> '.Yii::t("common", "Follow this page"). + '</a>'. + '</li>'; + ?> + <?php if(!@$xsView){ ?> + <a href="javascript:;" class="btn-o menu-linksBtn hidden-xs" onclick="follow('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>')"> <i class="fa fa-rss"></i> <?php echo Yii::t("common","Follow") ?> </a> + <?php } ?> +<?php + } + } + if (@$linksBtn["communityBn"]){ + if($linksBtn["isMember"]==false){ + $visibleXsLinks.='<li class="text-left visible-xs">'. + '<a href="javascript:;" class="bg-white" '. + 'onclick="connectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\''.$linksBtn["connectAs"].'\')">'. + '<i class="fa fa-link"></i> '.Yii::t("common","Be {what}", array("{what}"=> Yii::t("common",$linksBtn["connectAs"]))). + '</a>'. + '</li>'; +?> + <?php if(!@$xsView){ ?> + <a href="javascript:;" class="btn-o menu-linksBtn hidden-xs" onclick="connectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','<?php echo $linksBtn["connectAs"] ?>','<?php echo addslashes($elementName)?>')"> + <i class="fa fa-link"></i> <?php echo Yii::t("common","Be {what}", array("{what}"=> Yii::t("common",$linksBtn["connectAs"]))); ?> + </a> + <?php } ?> +<?php + } else if(@$linksBtn[Link::IS_INVITING]){ + $statusXsMenu=Yii::t("common","Your are inviting to join {what}", array("{what}"=>Yii::t("common","the ".Element::getControlerByCollection($elementType)))); + ?> + <?php if(!@$xsView){ ?> + <a href="javascript:;" class="btn-o menu-linksBtn hidden-xs"> + <i class="fa fa-send"></i> <?php echo Yii::t("common","Inviting")."..."; ?> + </a> + <?php } ?> + <?php } else { + $labelBtn=Yii::t("common","Already {what}", array("{what}"=>Yii::t("common",$linksBtn["connectAs"]))); + $statusXsMenu=Yii::t("common","You are {what} of {which}", array("{what}"=>Yii::t("common",$linksBtn["connectAs"]),"{which}"=>Yii::t("common","this ".Element::getControlerByCollection($elementType)))); + if(@$linksBtn[Link::TO_BE_VALIDATED]){ + $labelBtn=Yii::t("common","Waiting"); + $indicateStatus=Yii::t("common","Waiting an answer to become {what}", array("{what}"=>Yii::t("common",$linksBtn["connectAs"]))); + if(@$linksBtn[Link::IS_ADMIN_PENDING]) + $indicateStatus=Yii::t("common","Waiting an answer to become administrator"); + $statusXsMenu=$indicateStatus; + } + else if(@$linksBtn["isAdmin"] && $linksBtn["isAdmin"] && !@$linksBtn[Link::IS_ADMIN_PENDING]){ + $labelBtn=Yii::t("common","Already admin"); + $statusXsMenu=Yii::t("common","You are {what} of {which}", array("{what}"=>Yii::t("common","admin"),"{which}"=>Yii::t("common","this ".Element::getControlerByCollection($elementType)))); + } + if(@$linksBtn[Link::IS_ADMIN_PENDING]){ + $indicateStatus=Yii::t("common","Waiting an answer to administrate"); + $statusXsMenu=$indicateStatus; + } +?> + <ul class="nav navbar-nav <?php if(@$xsView) echo "hidden"; ?>"> + <li class="dropdown"> + <a href="javascript:;" class="btn-o menu-btn-link menu-linksBtn hidden-xs" data-toggle="dropdown"> + <i class="fa fa-link"></i> <?php echo $labelBtn; ?> <i class="fa fa-caret-down"></i> + </a> + <ul class="dropdown-menu"> + <?php if(@$indicateStatus){ ?> + <li class="text-left italic noHover"> + <?php echo $indicateStatus; ?> + <!-- <a href="jascript:;" + class="lbh bg-white"> + </a>--> + </li> + <?php } ?> + <?php if (!@$linksBtn["isAdmin"]){ + $visibleXsLinks.='<li class="text-left visible-xs">'. + '<a href="javascript:;" class="bg-white" '. + 'onclick="connectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\'admin\',\''.addslashes($elementName).'\')">'. + '<i class="fa fa-user-plus"></i> '.Yii::t("common", "Become administrator"). + '</a>'. + '</li>'; + ?> + <?php if(!@$xsView){ ?> + <li class="text-left hidden-xs"> + <a href="javascript:;" class="bg-white" onclick="connectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','admin','<?php echo addslashes($elementName)?>')"> + <i class="fa fa-user-plus"></i><?php echo Yii::t("common", "Become administrator"); ?> + </a> + </li> + <?php } ?> + <?php } + $visibleXsLinks.='<li class="text-left visible-xs">'. + '<a href="javascript:;" class="bg-white text-red" '. + 'onclick="disconnectTo(\''.$elementType.'\',\''.$elementId.'\',\''.Yii::app()->session["userId"].'\',\''.Person ::COLLECTION.'\',\''.$linksBtn["connectType"].'\')">'. + '<i class="fa fa-sign-out"></i> '.Yii::t("common", "Leave this page"). + '</a>'. + '</li>'; + ?> + <?php if(!@$xsView){ ?> + <li class="text-left hidden-xs"> + <a href="javascript:;" class="bg-white text-red hidden-xs" onclick="disconnectTo('<?php echo $elementType ?>','<?php echo $elementId ?>','<?php echo Yii::app()->session["userId"] ?>','<?php echo Person ::COLLECTION ?>','<?php echo $linksBtn["connectType"] ?>')"> + <i class="fa fa-sign-out"></i><?php echo Yii::t("common", "Leave this page"); ?> + </a> + </li> + <?php } ?> + </ul> + </li> + </ul> +<?php + } + } +?> + +<?php if ($elementType!= Person::COLLECTION && $elementId!=Yii::app()->session["userId"]){ ?> + <a href="javascript:collection.add2fav('<?php echo $elementType ?>','<?php echo $elementId ?>')" + class="btn-o menu-linksBtn no-border-right <?php if(@$xsView) echo "hidden"; ?> star_<?php echo $elementType.'_'.$elementId; ?>"><i class="fa fa-star-o"></i> <?php echo Yii::t("common","Favorites"); ?></a> +<?php } ?> +<!-- View in menu params // visible only on xs --> +<?php if(@$xsView){ ?> + <li role="separator" class="divider visible-xs"></li> + <?php if(@$statusXsMenu){ ?> + <li class="text-left noHover visible-xs"> + <span style="font-size: 10px; font-style: italic; padding:3px 20px;"><?php echo $statusXsMenu; ?></span> + </li> + <?php } ?> + <?php echo $visibleXsLinks;?> + <li role="separator" class="divider visible-xs"></li> +<?php } ?> +<!-- End of xs generated --> +<script type="text/javascript"> + var elementType='<?php echo $elementType ?>'; + var elementId='<?php echo $elementId ?>'; + jQuery(document).ready(function() { + $('ul.nav li.dropdown').hover(function() { + $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeIn(500); + }, function() { + $(this).find('.dropdown-menu').stop(true, true).delay(200).fadeOut(500); + }); + if(typeof userConnected !="undefined" && userConnected!=null + && typeof userConnected.collections !="undefined" + && typeof userConnected.collections.favorites !="undefined" + && typeof userConnected.collections.favorites[elementType] !="undefined" + && typeof userConnected.collections.favorites[elementType][elementId] !="undefined" + && $(".star_"+elementType+"_"+elementId).length){ + $(".star_"+elementType+"_"+elementId ).addClass("text-yellow"); + $(".star_"+elementType+"_"+elementId ).children("i").removeClass("fa-star-o").addClass("fa-star"); + } + + /*$(".menu-btn-follow").click(function(){ + $("#dropdown-followBtn").addClass("open"); + }); + $(".menu-btn-link").click(function(){ + $("#dropdown-link").addClass("open"); + }); + $(".username .arrow_box").mouseleave(function(){ //alert("dropdown-user mouseleave"); + $(this).prev().trigger("click").blur(); + });*/ + }); +</script> \ No newline at end of file diff --git a/views/element/notifications.php b/views/element/notifications.php new file mode 100644 index 0000000000000000000000000000000000000000..307f49ba8db2173e363dc3158e4da70fd7367825 --- /dev/null +++ b/views/element/notifications.php @@ -0,0 +1,136 @@ +<?php + $cssAnsScriptFilesModule = array( + '/js/default/notifications.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $cssAnsScriptFiles = array( + '/assets/css/default/notifications.css' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); +?> + +<style type="text/css"> + +</style> + +<div id="notificationsPad" class=""> + <?php if(@$confirmations){ ?> + <div class="notificationsElement"> + <div class="pageslide-title pull-left"> + <i class="fa fa-angle-down"></i> <span class="hidden-xs"><?php echo Yii::t("notification","Waiting for answer"); ?></span> + </div> + <ul class="pageslide-list col-md-12 col-sm-12 col-xs-12 padding-10"> + <?php if(@$confirmations["asAdmin"]){ + foreach($confirmations["asAdmin"] as $key => $data){ ?> + <li class='notifLi'> + <a href='#page.type.<?php echo Person::COLLECTION ?>.id.<?php echo $key ?>' class='notif lbh pull-left' style="line-height: 30px;"> + <span class='label bg-dark'> + <i class="fa fa-cog"></i> + </span> + + <span class="message"> + <?php echo $data["name"]." ".Yii::t("notification", "asks to become admin of")." ".Yii::t("common", "the ". Element::GetControlerByCollection($elementType)) ?> + </span> + </a> + <a href='javascript:;' class='label refuseBtn pull-right' + onclick='var $this=$(this); disconnectTo("<?php echo $elementType ?>", + "<?php echo (string)$parent["_id"] ?>", + "<?php echo $key ?>", + "<?php echo Person::COLLECTION ?>", + "<?php echo $confirmations["connectType"] ?>", + function() { + toastr.success("<?php echo Yii::t("common", "Answer well registered") ?>!!"); + $this.parent().remove(); + }, + "<?php echo Link::IS_ADMIN_PENDING ?>");' + style='margin-right: 5px;'> + <i class="fa fa-remove"></i> <?php echo Yii::t("common","Refuse"); ?> + </a> + <a href='javascript:;' + class='label acceptBtn pull-right' + onclick='var $this=$(this); validateConnection("<?php echo $elementType ?>", + "<?php echo (string)$parent["_id"] ?>", + "<?php echo $key ?>", + "<?php echo Person::COLLECTION ?>", + "<?php echo Link::IS_ADMIN_PENDING; ?>", + function() { + toastr.success("<?php echo Yii::t("common", "New admin well register") ?>!!"); + $this.parent().remove(); + });' + style='margin-right: 5px;'> + <i class="fa fa-check"></i> <?php echo Yii::t("common", "Accept") ?> + </a> + </li> + <?php } + } ?> + <?php if(@$confirmations["asMember"]){ + foreach($confirmations["asMember"] as $key => $data){ ?> + <li class='notifLi'> + <a href='#page.type.<?php echo Person::COLLECTION ?>.id.<?php echo $key ?>' class='notif lbh pull-left' style="line-height: 30px;"> + <span class='label bg-dark'> + <i class="fa fa-group"></i> + </span> + <span class="message"> + <?php echo $data["name"]." ".Yii::t("notification","asks to become ".substr($confirmations["connectType"],0,-1)." of")." ".Yii::t("common", "the ".Element::GetControlerByCollection($elementType)) ?> + </span> + </a> + <a href='javascript:;' class='label refuseBtn pull-right' + onclick='var $this=$(this); disconnectTo("<?php echo $elementType ?>", + "<?php echo (string)$parent["_id"] ?>", + "<?php echo $key ?>", + "<?php echo Person::COLLECTION ?>", + "<?php echo $confirmations["connectType"] ?>", + function() { + $this.parent().remove(); + });' + style='margin-right: 5px;'> + <i class="fa fa-remove"></i> + </a> + <a href='javascript:;' + class='label acceptBtn pull-right' + onclick='var $this=$(this); validateConnection("<?php echo $elementType ?>", + "<?php echo (string)$parent["_id"] ?>", + "<?php echo $key ?>", + "<?php echo Person::COLLECTION ?>", + "<?php echo Link::TO_BE_VALIDATED; ?>", + function() { + toastr.success("<?php echo Yii::t("notification", "New ".$confirmations["connectType"]." well registered") ?>!!"); + $this.parent().remove(); + });' + style='margin-right: 5px;'> + <i class="fa fa-check"></i> + </a> + </li> + <?php } + } ?> + </ul> + </div> + <?php } ?> + <div class="notificationsElement"> + <div class="pageslide-title pull-left"> + <i class="fa fa-angle-down"></i> <i class="fa fa-bell"></i> <span class="hidden-xs">Notifications</span> + </div> + <a href="javascript:;" onclick='markAllAsRead()' class="btn-notification-action pull-right" style="font-size:12px;"> + <?php echo Yii::t("common","All marked all as read") ?> <i class="fa fa-check-square-o"></i> + </a> + <ul class="pageslide-list notifListElement col-md-12 col-sm-12 col-xs-12 padding-10"> + </ul> + </div> +</div> +<!-- end: PAGESLIDE RIGHT --> +<script type="text/javascript"> + +//var notifications = null; +//var maxNotifTimstamp = 0; +elementId="<?php echo $elementId ?>"; +elementType="<?php echo $elementType ?>"; +jQuery(document).ready(function() +{ + //initNotifications(); + //bindLBHLinks(); + bindNotifEvents("Element"); + refreshNotifications(elementId,elementType,"Element"); +}); + +</script> \ No newline at end of file diff --git a/views/element/onepage.php b/views/element/onepage.php new file mode 100755 index 0000000000000000000000000000000000000000..17a9463cd0ee4dd073d92fecc502c652c7b80cd4 --- /dev/null +++ b/views/element/onepage.php @@ -0,0 +1,553 @@ + +<?php + HtmlHelper::registerCssAndScriptsFiles( + array( '/css/onepage.css', + '/vendor/colorpicker/js/colorpicker.js', + '/vendor/colorpicker/css/colorpicker.css', + '/css/news/index.css', + '/css/timeline2.css', + ) , + Yii::app()->theme->baseUrl. '/assets'); + + $imgDefault = $this->module->assetsUrl.'/images/news/profile_default_l.png'; + + //récupération du type de l'element + $typeItem = (@$element["typeSig"] && $element["typeSig"] != "") ? $element["typeSig"] : ""; + if($typeItem == "") $typeItem = @$element["type"] ? $element["type"] : "item"; + if($typeItem == "people") $typeItem = "citoyens"; + + $typeItemHead = $typeItem; + if($typeItem == "organizations" && @$element["type"]) $typeItemHead = $element["type"]; + + //icon et couleur de l'element + $icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : ""; + $iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : ""; + + $useBorderElement = false; +?> +<style> + #btn-onepage-main-menu{ + position: fixed; + top:85px; + left:20px; + border-radius: 1px; + letter-spacing: 2px; + } + + .dropdown .dropdown-onepage-main-menu{ + display:none; + } + .dropdown.open .dropdown-onepage-main-menu{ + display:block; + } + + .dropdown-onepage-main-menu{ + position: fixed; + top:130px; + left:20px; + max-height:400px; + /*width:200px;*/ + background-color:transparent; + z-index:5; + } + + .dropdown-onepage-main-menu .dropdown-menu{ + margin:0px; + border:none; + display: inline; + -webkit-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3) ; + -moz-box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3) ; + box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.3); + } + + .dropdown-onepage-main-menu .dropdown-menu li a { + text-transform: uppercase; + } + + .arrow_box:after, .arrow_box:before { + left: 19px; + } +</style> + + <div class="dropdown"> + <button class="btn bg-red text-white btn font-blackoutM dropdown-toggle" data-toggle="dropdown" id="btn-onepage-main-menu"> + <i class="fa fa-bars"></i> Menu + </button> + <div class="dropdown-onepage-main-menu font-montserrat" aria-labelledby="btn-onepage-main-menu"> + <ul class="dropdown-menu arrow_box"> + <li><a href="javascript:" data-target="#description"><i class="fa fa-angle-right"></i> Présentation</a></li> + <li><a href="javascript:" data-target="#events"><i class="fa fa-angle-right"></i> Événements</a></li> + <li><a href="javascript:" data-target="#projects"><i class="fa fa-angle-right"></i> Nos projets</a></li> + <li><a href="javascript:" data-target="#directory"><i class="fa fa-angle-right"></i> Communauté</a></li> + <li><a href="javascript:" data-target="#projects-values"><i class="fa fa-angle-right"></i> Nos valeurs</a></li> + <li><a href="javascript:" data-target="#freep"><i class="fa fa-angle-right"></i> Free</a></li> + <li role="separator" class="divider"></li> + <li><a href="javascript:" data-target="#footer"><i class="fa fa-angle-right"></i> Infos</a></li> + </ul> + </div> + </div> + <div id="onepage"> + <!-- Header --> + <section class="header" id="header"> + <button class="btn btn-default btn-sm pull-right margin-right-15 hidden-xs btn-edit-section margin-top-70" data-id="#header"> + <i class="fa fa-cog"></i> + </button> + <div class="container"> + <div class="row"> + <div class="col-md-12"> + + <?php //var_dump($element["address"]); ?> + + <div class="col-md-12 col-sm-12"> + <div class="col-md-3 col-sm-4 hidden-xs text-right btn-tools"> + <?php if(@$edit == true){ ?> + <button class="btn btn-default">Editer les informations <i class="fa fa-pencil"></i></button><br> + <button class="btn btn-default"> Paramétrer la page <i class="fa fa-cog"></i></button> + <?php } ?> + </div> + <div class="col-md-6 col-sm-4 col-xs-12 text-center" style="margin-top:-20px;"> + <?php if(@$element['profilMediumImageUrl'] && @$element['profilMediumImageUrl'] != "") { ?> + <?php if(@$typeItem){ ?> + <span class="col-md-12 col-sm-12 bold"> + <?php if (@$element["typeSig"]!="people" && @$element["typeSig"]!="organizations") { + echo ucfirst(Yii::t("common", @$typeItem)); + } + if (@$element["typeSig"]=="organizations") + echo Yii::t("common", $element["type"]); + ?> + </span><br> + <?php } ?> + + <img class="img-responsive thumbnail + <?php if(@$useBorderElement==true){ ?>thumb-type-color-<?php echo $iconColor; ?><?php } ?>" + src="<?php echo @$element['profilMediumImageUrl'] ? Yii::app()->createUrl('/'.@$element['profilMediumImageUrl']) : $imgDefault; ?>" + alt=""> + + <?php if(@$useBorderElement==true && $icon != "" && $iconColor != ""){ ?> + <div class="col-md-12 col-sm-12 no-padding text-center i-item"> + <i class="fa fa-<?php echo $icon; ?> i-type-color-<?php echo $iconColor; ?>"></i> + </div> + <?php } ?> + <?php } ?> + </div> + <div class="col-md-3 col-sm-4 col-xs-12 text-left btn-tools pull-right"> + + <button class="btn btn-default"><i class="fa fa-link"></i> <span class="hidden-xs">Suivre cette page</span></button><br> + <?php if($type == Organization::COLLECTION ){ ?> + <button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Devenir membre</span></button><br> + <?php } ?> + + <?php if($type == Project::COLLECTION ){ ?> + <button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Devenir contributeur</span></button><br> + <?php } ?> + + <?php if($type == Event::COLLECTION ){ ?> + <button class="btn btn-default"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">Je participe</span></button><br> + <?php } ?> + + <button class="btn btn-default"><i class="fa fa-star"></i> <span class="hidden-xs">Favoris</span></button> + </div> + <div class="col-md-12 col-sm-12 intro-text"> + <?php if(!@$element['profilMediumImageUrl'] || @$element['profilMediumImageUrl'] == "") { ?> + <?php if(@$typeItem){ ?> + <span class="col-md-12 col-sm-12 bold"> + <?php if (@$element["typeSig"]!="people" && @$element["typeSig"]!="organizations") { + echo ucfirst(Yii::t("common", @$typeItem)); + } + if (@$element["typeSig"]=="organizations") + echo Yii::t("common", $element["type"]); + ?> + </span><br> + <?php } ?> + <?php } ?> + + <span class="name"><?php echo @$element["name"]; ?></span><br> + <span class="email"><?php echo @$element["email"]; ?></span> + <hr class="bold-hr"> + <span class="skills"><?php echo @$element["shortDescription"]; ?></span> + </div> + + </div> + + <div class="col-md-12 col-sm-12"> + <div class="tags"> + <?php if(@$element["tags"]) + foreach ($element["tags"] as $key => $tag) { ?> + <span class="badge bg-red"><?php echo $tag; ?></span> + <?php } ?> + </div> + <div class="commune text-red homestead margin-top-10"> + <?php if(@$element["address"] && @$element["address"]["addressLocality"]) { + echo "<i class='fa fa-university'></i> ".$element["address"]["addressLocality"]; + if(@$element["address"]["postalCode"]) echo ", "; + } + if(@$element["address"] && @$element["address"]["postalCode"]) + echo $element["address"]["postalCode"]; + ?> + </div> + </div> + + </div> + </div> + </div> + </section> + </div> + <!-- About Section --> + <?php if(isset($element["description"])){ ?> + <!-- <section class="darkblue padding-bottom-50 shadow hidden" id="description"> + <div class="container"> + <div class="row"> + <div class="col-lg-12 text-center"> + <h2>Description</h2> + <hr class="bold-hr"> + </div> + </div> + <div class="row"> + <div class="col-lg-12 text-description"> + <p><?php echo $element["description"]; ?></p> + </div> + </div> + </div> + </section> --> + <?php } ?> + + <!-- COMMUNAUTE Section --> + + <?php + $desc = array( array("shortDescription"=>@$element["description"]), + ); + + if(@$desc && sizeOf(@$desc)>0) + $this->renderPartial('../pod/sectionElements', + array( "items" => $desc, + "sectionKey" => "description", + "sectionTitle" => "PRÉSENTATION", + "sectionShadow" => true, + "msgNoItem" => "Aucune description", + "imgShape" => "square", + "useImg" => false, + "fullWidth" => true, //only for 1 element + "useBorderElement"=>$useBorderElement, + + "styleParams" => array( "bgColor"=>"#FFF", + "textBright"=>"dark", + "fontScale"=>3), + )); + ?> + + <!-- EVENTS Section --> + + <?php if(@$events && sizeOf(@$events)>0) + $this->renderPartial('../pod/sectionElements', + array( "items" => $events, + "sectionKey" => "events", + "sectionTitle" => "ÉVÉNEMENTS À VENIR", + "sectionShadow" => true, + "msgNoItem" => "Aucun événement à afficher", + "imgShape" => "square", + "useDesc" => true, + "useBorderElement"=>$useBorderElement, + + "styleParams" => array( "bgColor"=>"#f1f2f6", + "textBright"=>"dark", + "fontScale"=>3), + )); + ?> + + <!-- PROJETS Section --> + + <?php if(@$projects && sizeOf(@$projects)>0) + $this->renderPartial('../pod/sectionElements', + array( "items" => $projects, + "sectionKey" => "projects", + "sectionTitle" => "NOS PROJETS", + "sectionShadow" => true, + "msgNoItem" => "Aucun projet à afficher", + "imgShape" => "square", + "useDesc" => false, + "useBorderElement"=>$useBorderElement, + + "styleParams" => array( "bgColor"=>"#FFF", + "textBright"=>"dark", + "fontScale"=>3), + )); + ?> + + + <!-- COMMUNAUTE Section --> + + <?php + $sectionTitle = "COMMUNAUTÉ"; + if(@$typeItem == "organizations") $sectionTitle = "NOS MEMBRES"; + if(@$typeItem == "projects") $sectionTitle = "ILS CONTRIBUENT AU PROJET"; + if(@$typeItem == "events") $sectionTitle = "LES PARTICIPANTS"; + + if(@$members && sizeOf(@$members)>0) + $this->renderPartial('../pod/sectionElements', + array( "items" => $members, + "sectionKey" => "directory", + "sectionTitle" => $sectionTitle, + "sectionShadow" => true, + "msgNoItem" => "Aucun contact à afficher", + "imgShape" => "square", + "useDesc" => false, + "useBorderElement"=>$useBorderElement, + "countStrongLinks"=>$countStrongLinks, + + "styleParams" => array( "bgColor"=>"#FFF", + "textBright"=>"dark", + "fontScale"=>3), + )); + ?> + + + + <?php if (($type==Project::COLLECTION) && !empty($element["properties"]["chart"])){ ?> + <section id="projects-values" class="portfolio shadow"> + <div class="container"> + <div class="row"> + <div class="col-lg-12 text-center"> + <h2>Les valeurs du projet<br><i class="fa fa-angle-down"></i></h2> + </div> + </div> + <div class="row"> + <div class="no-padding col-md-8 col-md-offset-2"> + <?php + + if(empty($element["properties"]["chart"])) $element["properties"]["chart"] = array(); + $this->renderPartial('../project/pod/projectChart',array( + "itemId" => (string)$element["_id"], + "itemName" => $element["name"], + "properties" => $element["properties"]["chart"], + "admin" =>$edit, + "isDetailView" => 1, + "openEdition" => $openEdition, + "chartAlone" => true)); + ?> + </div> + </div> + </div> + </section> + <?php } ?> + + <!-- FREE Section --> + + <?php + /*$items = array( array("name"=>"", "shortDescription"=>" Le 8 septembre dernier, LA MAISON DES CITOYENS est née pour permettre à tous les Français qui ne comptent pas de compter tous ensemble, et être en capacité de défendre trois valeurs essentielles : nos territoires et ceux qui agissent, la démocratie citoyenne, la diversité et la fraternité."), + // array("name"=>"Utiliser les POI ?", "shortDescription"=>"Pour construire les block libres ?<br>Textes<br>Images<br>Video<br>GeoPos<br>Url<br>etc"), + // array("name"=>"Lorem ratione", "shortDescription"=>"Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet"), + ); + + $this->renderPartial('../pod/sectionElements', + array( "items" => $items, + "sectionKey" => "freep", + "sectionTitle" => "Le manifeste", + "sectionShadow" => true, + "msgNoItem" => "Aucun projet à afficher", + "imgShape" => "circle", + "useImg" => false, + "fullWidth" => true, //only for 1 element + + "styleParams" => array( "bgColor"=>"#f1f2f6", + "textBright"=>"dark", + "fontScale"=>3), + )); + */ + ?> + + <section id="timeline" class="bg-white inline-block col-md-12"> + <div class="col-lg-8 col-lg-offset-2 col-md-8 col-md-offset-2 col-sm-10 col-sm-offset-1"> + <ul class="timeline inline-block" id="timeline-page"> + </ul> + </section> + + <!-- Contact Section --> + <section id="contact" class="hidden"> + <div class="container "> + <div class="row"> + <div class="col-lg-12 text-center"> + <h2>Contact Me</h2> + <hr class="star-primary"> + </div> + </div> + <div class="row"> + <div class="col-lg-8 col-lg-offset-2"> + <!-- To configure the contact form email address, go to mail/contact_me.php and update the email address in the PHP file on line 19. --> + <!-- The form should work on most web servers, but if the form is not working you may need to configure your web server differently. --> + <form name="sentMessage" id="contactForm" novalidate> + <div class="row control-group"> + <div class="form-group col-xs-12 floating-label-form-group controls"> + <label>Name</label> + <input type="text" class="form-control" placeholder="Name" id="name" required data-validation-required-message="Please enter your name."> + <p class="help-block text-danger"></p> + </div> + </div> + <div class="row control-group"> + <div class="form-group col-xs-12 floating-label-form-group controls"> + <label>Email Address</label> + <input type="email" class="form-control" placeholder="Email Address" id="email" required data-validation-required-message="Please enter your email address."> + <p class="help-block text-danger"></p> + </div> + </div> + <div class="row control-group"> + <div class="form-group col-xs-12 floating-label-form-group controls"> + <label>Phone Number</label> + <input type="tel" class="form-control" placeholder="Phone Number" id="phone" required data-validation-required-message="Please enter your phone number."> + <p class="help-block text-danger"></p> + </div> + </div> + <div class="row control-group"> + <div class="form-group col-xs-12 floating-label-form-group controls"> + <label>Message</label> + <textarea rows="5" class="form-control" placeholder="Message" id="message" required data-validation-required-message="Please enter a message."></textarea> + <p class="help-block text-danger"></p> + </div> + </div> + <br> + <div id="success"></div> + <div class="row"> + <div class="form-group col-xs-12"> + <button type="submit" class="btn btn-success btn-lg">Send</button> + </div> + </div> + </form> + </div> + </div> + </div> + </section> + + <!-- Footer --> + <section class="text-center footer bg-section-dark2 light" id="footer"> + <button class="btn btn-default btn-sm pull-right margin-right-15 hidden-xs btn-edit-section margin-top-10" data-id="#footer"> + <i class="fa fa-cog"></i> + </button> + <div class="footer-above"> + <div class="container"> + <div class="row"> + <div class="footer-col col-md-4"> + <h3>Addresse</h3> + <p> + <?php if(@$element["address"] && @$element["address"]["streetAddress"]) + echo $element["address"]["streetAddress"]."<br>"; + + if(@$element["address"] && @$element["address"]["addressLocality"]) { + echo "<i class='fa fa-map-marker'></i> ".$element["address"]["addressLocality"]; + if(@$element["address"]["postalCode"]) echo ", "; + } + if(@$element["address"] && @$element["address"]["postalCode"]) + echo $element["address"]["postalCode"]; + + if(@$element["address"] && @$element["address"]["addressCountry"]) + echo "<br>".$element["address"]["addressCountry"]; + + if(!@$element["address"]){ echo "Addresse non renseignée"; } + ?> + </p> + </div> + <div class="footer-col col-md-4"> + <h3>Sur le web</h3> + <ul class="list-inline"> + <?php if(@$element["socialNetwork"]){ ?> + <?php if(@$element["socialNetwork"]["facebook"] && @$element["socialNetwork"]["facebook"] != ""){ ?> + <li> + <a href="<?php echo @$element["socialNetwork"]["facebook"]; ?>" class="btn-social btn-outline"><i class="fa fa-fw fa-facebook"></i></a> + </li> + <?php } ?> + <?php if(@$element["socialNetwork"]["googleplus"] && @$element["socialNetwork"]["googleplus"] != ""){ ?> + <li> + <a href="<?php echo @$element["socialNetwork"]["googleplus"]; ?>" class="btn-social btn-outline"><i class="fa fa-fw fa-google-plus"></i></a> + </li> + <?php } ?> + <?php if(@$element["socialNetwork"]["twitter"] && @$element["socialNetwork"]["twitter"] != ""){ ?> + <li> + <a href="<?php echo @$element["socialNetwork"]["twitter"]; ?>" class="btn-social btn-outline"><i class="fa fa-fw fa-twitter"></i></a> + </li> + <?php } ?> + <?php if(@$element["socialNetwork"]["github"] && @$element["socialNetwork"]["github"] != ""){ ?> + <li> + <a href="<?php echo @$element["socialNetwork"]["github"]; ?>" class="btn-social btn-outline"><i class="fa fa-fw fa-github"></i></a> + </li> + <?php } ?> + <?php } ?> + </ul> + </div> + <div class="footer-col col-md-4"> + <h3>A propos de nous</h3> + <p><?php echo @$element["shortDescription"]; ?></p> + </div> + </div> + </div> + </div> + <div class="footer-below"> + <div class="container padding-15"> + <div class="row"> + <div class="col-md-12"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/kgougle_social.png" height=50><br><br> + <span class="font-blackoutT text-yellow-PH" style="font-size:20px;">by</span> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/LOGO_PIXEL_HUMAIN.png" height=70> + </div> + </div> + </div> + </div> + </section> + <?php + $mapData = array(); + $mapData = array_merge($members, $mapData); + $mapData = array_merge($projects, $mapData); + $mapData = array_merge($events, $mapData); + + $controler = Element::getControlerByCollection($typeItem) ; + ?> + + <script type="text/javascript" > + + var elementName = "<?php echo @$element["name"]; ?>"; + var mapData = <?php echo json_encode(@$mapData) ?>; + + + var currentIdSection = ""; + jQuery(document).ready(function() { + + + //$(".dropdown-onepage-main-menu").hide(); + $("#main-page-name, title").html(elementName); + + $(".dropdown-onepage-main-menu li a").click(function(e){ + e.stopPropagation(); + var target = $(this).data("target"); + console.log(target); + KScrollTo(target); + }); + + $("#btn-onepage-main-menu").trigger("click"); + + + $(".btn-full-desc").click(function(){ + var sectionKey = $(this).data("sectionkey"); + if($("section#"+sectionKey+" .item-desc").hasClass("fullheight")){ + $("section#"+sectionKey+" .item-desc").removeClass("fullheight"); + $(this).html("<i class='fa fa-plus-circle'></i>"); + }else{ + $("section#"+sectionKey+" .item-desc").addClass("fullheight"); + $(this).html("<i class='fa fa-minus-circle'></i>"); + } + }); + + Sig.showMapElements(Sig.map, mapData); + + //showElementPad('news'); + var url = "news/index/type/citoyens/id/<?php echo (string)$element["_id"] ?>?isFirst=1&"; + console.log("URL", url); + ajaxPost('#timeline-page', baseUrl+'/'+moduleId+'/'+url+"renderPartial=true&tpl=co2&nbCol=2", + null, + function(){ + + },"html"); + }); + + + + + </script> + + <?php $this->renderPartial('sectionEditTools');?> diff --git a/views/element/profilSocial.php b/views/element/profilSocial.php new file mode 100755 index 0000000000000000000000000000000000000000..0db756a80cf9215cc551252321ec36fcea1925a5 --- /dev/null +++ b/views/element/profilSocial.php @@ -0,0 +1,842 @@ +<?php + HtmlHelper::registerCssAndScriptsFiles( + array( '/css/onepage.css', + '/vendor/colorpicker/js/colorpicker.js', + '/vendor/colorpicker/css/colorpicker.css', + '/css/news/index.css', + '/css/timeline2.css', + //'/css/circle.css', + '/css/default/directory.css', + '/js/comments.js', + '/css/profilSocial.css', + '/css/calendar.css', + ) , + Yii::app()->theme->baseUrl. '/assets'); + + $cssAnsScriptFilesModule = array( + '/js/default/calendar.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $cssAnsScriptFilesTheme = array( + "/plugins/jquery-cropbox/jquery.cropbox.css", + "/plugins/jquery-cropbox/jquery.cropbox.js", + // SHOWDOWN + '/plugins/showdown/showdown.min.js', + //MARKDOWN + '/plugins/to-markdown/to-markdown.js', + '/plugins/jquery.qrcode/jquery-qrcode.min.js', + '/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + '/plugins/fullcalendar/fullcalendar/locale/'.Yii::app()->language.'.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + + $id = $_GET['id']; + $imgDefault = $this->module->assetsUrl.'/images/thumbnail-default.jpg'; + + + //récupération du type de l'element + $typeItem = (@$element["typeSig"] && $element["typeSig"] != "") ? $element["typeSig"] : ""; + if($typeItem == "") $typeItem = @$element["type"] ? $element["type"] : "item"; + if($typeItem == "people") $typeItem = "citoyens"; + + $typeItemHead = $typeItem; + if($typeItem == "organizations" && @$element["type"]) $typeItemHead = $element["type"]; + + if(strpos($typeItem, "place.")!==false){ + $typeItem = "place"; + } + + //icon et couleur de l'element + $icon = Element::getFaIcon($typeItemHead) ? Element::getFaIcon($typeItemHead) : ""; + $iconColor = Element::getColorIcon($typeItemHead) ? Element::getColorIcon($typeItemHead) : ""; + + $useBorderElement = false; + if(@Yii::app()->params["front"]) $front = Yii::app()->params["front"]; +?> +<style> + + hr.angle-down::after { + display: none; + } + hr.angle-down{ + border-top: 0px solid #ccc; + margin-bottom:10px!important; + } + +<?php if($typeItem != "citoyens"){ ?> + .section-create-page{ + display: none; + } +<?php } ?> + +<?php if($typeItem == "events"){ ?> + .hide-event{ + display: none; + } +<?php } ?> + + +#ajax-modal .modal-content, +#formContact .modal-content{ + background-color: rgba(0,0,0,0.6); +} +#ajax-modal .container, +#formContact .container{ + background-color: white; + border-radius: 4px; +} +#ajax-modal.portfolio-modal, +#formContact.portfolio-modal { + background-color: transparent; +} +#ajax-modal .close-modal .lr, +#ajax-modal .close-modal .rl, +#formContact .close-modal .lr, +#formContact .close-modal .rl{ + background-color: #ea4335; +} + +#btn-show-activity-onmap{ + width:100%; +} +</style> + +<?php + $auth = Authorisation::canParticipate(Yii::app()->session['userId'], $type, (string)$element["_id"]); + + if (Authorisation::canDeleteElement((String)$element["_id"], $type, Yii::app()->session["userId"]) && !@$deletePending) + $this->renderPartial('../element/confirmDeleteModal'); ?> +<?php + if (@$element["status"] == "deletePending" && Authorisation::isElementAdmin((String)$element["_id"], $type, Yii::app()->session["userId"])) $this->renderPartial('../element/confirmDeletePendingModal', array( "element"=>$element)); ?> + + <!-- <section class="col-md-12 col-sm-12 col-xs-12 header" id="header"></section> --> +<div class="col-lg-offset-1 col-lg-10 col-md-12 col-sm-12 col-xs-12 no-padding"> + <!-- Header --> + <section class="col-md-12 col-sm-12 col-xs-12" id="social-header" + <?php if (!@$element["profilBannereUrl"] || (@$element["profilBannereUrl"] && empty($element["profilBannereUrl"]))){ ?> + style="background-color: rgba(0,0,0,0.5);" + <?php } ?>> + <div id="topPosKScroll"></div> + <?php if(@$edit==true && false) { ?> + <button class="btn btn-default btn-sm pull-right margin-right-15 margin-top-70 hidden-xs btn-edit-section" + data-id="#header"> + <i class="fa fa-cog"></i> + </button> + <?php } ?> + + <?php + $this->renderPartial('../element/banner', + array( "iconColor"=>$iconColor, + "icon"=>$icon, + "type"=>$type, + "element"=>$element, + "linksBtn"=>$linksBtn, + "elementId"=>(string)$element["_id"], + "elementType"=>$type, + "elementName"=> $element["name"], + "edit" => @$edit, + "openEdition" => @$openEdition) + ); + ?> + + + + + <div class="col-lg-2 col-md-3 col-sm-3 hidden-xs no-padding" style="bottom:-31px; position: absolute;"> + <?php if(@$element["profilMediumImageUrl"] && !empty($element["profilMediumImageUrl"])) + $images=array( + "medium"=>$element["profilMediumImageUrl"], + "large"=>$element["profilImageUrl"] + ); + else $images=""; + + $this->renderPartial('../pod/fileupload', + array("itemId" => (string) $element["_id"], + "itemName" => $element["name"], + "type" => $type, + "resize" => false, + "contentId" => Document::IMG_PROFIL, + "show" => true, + "editMode" => $edit, + "image" => $images, + "openEdition" => $openEdition) ); + ?> + + <?php if(@Yii::app()->session["userId"]){ ?> + <div class="blockUsername"> + <?php $this->renderPartial('../element/linksMenu', + array("linksBtn"=>$linksBtn, + "elementId"=>(string)$element["_id"], + "elementType"=>$type, + "elementName"=> $element["name"], + "openEdition" => $openEdition) + ); + ?> + </div> + <?php } ?> + </div> + </section> + + <div class="col-md-9 col-sm-9 col-lg-10 col-xs-12 pull-right sub-menu-social no-padding"> + + <div class="btn-group inline"> + + <?php + $imgDefault = $this->module->assetsUrl.'/images/thumbnail-default.jpg'; + $thumbAuthor = @$element['profilThumbImageUrl'] ? + Yii::app()->createUrl('/'.@$element['profilThumbImageUrl']) + : $this->module->assetsUrl.'/images/thumbnail-default.jpg'; + ?> + <button type="button" class="btn btn-default bold menu-left-min visible-xs" onclick="menuLeftShow();"> + <i class="fa fa-bars"></i> + </button> + <img class="pull-left visible-xs" src="<?php echo $thumbAuthor; ?>" height=45> + <div class="identity-min"> + <img class="pull-left hidden-xs" src="<?php echo $thumbAuthor; ?>" height=45> + <div class="pastille-type-element bg-<?php echo $iconColor; ?> pull-left"></div> + <div class="col-lg-1 col-md-2 col-sm-2 pull-left no-padding"> + <div class="text-left padding-left-15" id="second-name-element"> + <span id="nameHeader"> + <h5 class="elipsis"><?php echo @$element["name"]; ?></h5> + </span> + </div> + </div> + </div> + <?php if(@Yii::app()->session["userId"] && + $type==Person::COLLECTION && + (string)$element["_id"]==Yii::app()->session["userId"]){ + + $iconNewsPaper="user-circle"; + ?> + <button type="button" class="btn btn-default bold hidden-xs btn-start-newsstream"> + <i class="fa fa-rss"></i> <?php echo Yii::t("common","News stream<span class='hidden-sm'></span>") ?> + </button> + + <?php } else { + $iconNewsPaper="rss"; + } + ?> + + <button type="button" class="btn btn-default bold hidden-xs btn-start-mystream"> + <i class="fa fa-<?php echo $iconNewsPaper ?>"></i> <?php echo Yii::t("common","Newspaper"); ?> + </button> + + <?php if((@Yii::app()->session["userId"] && $isLinked==true) || @Yii::app()->session["userId"] == $element["_id"]){ ?> + <button type="button" class="btn btn-default bold hidden-xs btn-start-notifications hidden"> + <i class="fa fa-bell"></i> + <span class="hidden-xs hidden-sm"> + <?php if (@Yii::app()->session["userId"] == $element["_id"]) echo Yii::t("common","My notif<span class='hidden-md'>ication</span>s"); else echo Yii::t("common","Notif<span class='hidden-md'>ication</span>s"); ?> + </span> + <span class="badge notifications-countElement <?php if(!@$countNotifElement || (@$countNotifElement && $countNotifElement=="0")) echo 'badge-transparent hide'; else echo 'badge-success'; ?>"> + <?php echo @$countNotifElement ?> + </span> + </button> + <?php } ?> + + <script type="text/javascript"> + + /*alert( "x<?php echo (@$edit && $edit) || (@$openEdition && $openEdition) ?>"+ + "x<?php echo Authorisation::canEditItem(Yii::app()->session['userId'], $type, $id); ?>"+ + "x<?php echo Link::isLinked((string)$element["_id"], $type, Yii::app()->session["userId"]); ?>"); + */ + </script> + + <?php if(@Yii::app()->session["userId"] && Yii::app()->params['rocketchatEnabled'] ) + if( ($type!=Person::COLLECTION && ((@$edit && $edit) || (@$openEdition && $openEdition)) ) || + ($type==Person::COLLECTION) || + //admins can create rooms + ( Authorisation::canEditItem(Yii::app()->session['userId'], $type, $id) ) || + //simple members can join only when admins had created + ( @$element["hasRC"] && Link::isLinked((string)$element["_id"],$type,Yii::app()->session["userId"])) ) + { + if(@$element["slug"]) + //todo : elements members of + $loadChat = $element["slug"]; + else + $createSlugBeforeChat=true; + //todo : elements members of + $loadChat = $element["name"]; + //people have pregenerated rooms so allways available + $hasRC = (@$element["hasRC"] || $type == Person::COLLECTION ) ? "true" : "false"; + $canEdit = ( @$openEdition && $openEdition ) ? "true" : "false"; + //Authorisation::canEditItem(Yii::app()->session['userId'], $type, $id) ); + if($type == Person::COLLECTION) + { + $loadChat = (string)$element["username"]; + if( (string)$element["_id"]==@Yii::app()->session["userId"] ) + $loadChat = ""; + } + $chatColor = (@$element["hasRC"] || $type == Person::COLLECTION ) ? "text-red" : ""; + ?> + + <?php /*if(@$createSlugBeforeChat){ ?> + <button type="button" onclick="javascript:createSlugBeforeChat('<?php echo $type?>',<?php echo $canEdit;?>,<?php echo $hasRC;?> )" class="btn btn-default bold hidden-xs <?php echo $chatColor;?>" + id="open-rocketChat" style="border-right:0px!important;"> + <i class="fa fa-comments elChatNotifs"></i> Messagerie + </button> + <?php } else{ */?> + <button type="button" onclick="javascript:rcObj.loadChat('<?php echo $loadChat;?>','<?php echo $type?>',<?php echo $canEdit;?>,<?php echo $hasRC;?> )" class="btn btn-default bold hidden-xs <?php echo $chatColor;?>" + id="open-rocketChat" style="border-right:0px!important;"> + <i class="fa fa-comments elChatNotifs"></i> Messagerie + </button> + <?php //} ?> + + <?php } ?> + + + <?php if(@Yii::app()->session["userId"]) + if( $type == Organization::COLLECTION || $type == Project::COLLECTION ){ ?> + <button type="button" class="btn btn-default bold hidden-xs letter-turq" data-toggle="modal" data-target="#modalCoop" + id="open-co-space" style="border-right:0px!important;"> + <i class="fa fa-connectdevelop"></i> <?php echo Yii::t("cooperation", "CO-space"); ?> + </button> + <?php } ?> + + + <?php if(@Yii::app()->session["userId"]) + if( ($type!=Person::COLLECTION && ((@$edit && $edit) || (@$openEdition && $openEdition))) || + ($type==Person::COLLECTION && (string)$element["_id"]==@Yii::app()->session["userId"])){ ?> + <button type="button" class="btn btn-default bold letter-green hidden-xs" + id="open-select-create" style="border-right:0px!important;"> + <i class="fa fa-plus-circle fa-2x"></i> <?php //echo Yii::t("common", "Créer") ?> + </button> + + <?php } ?> + + <?php /* Links in new TAB + if(@Yii::app()->session["userId"]) + if( ($type!=Person::COLLECTION && ((@$edit && $edit) || (@$openEdition && $openEdition))) || + ($type==Person::COLLECTION) || + (Link::isLinked((string)$element["_id"],$type,Yii::app()->session["userId"]))) + { + //todo : elements members of + $loadChat = '/'.$this->module->id.'/rocketchat/chat/name/'.$element["name"].'/type/'.$type; + if($type == Person::COLLECTION) + { + $loadChat = '/'.$this->module->id.'/rocketchat/chat/name/'.$element["username"].'/type/'.$type; + if( (string)$element["_id"]==@Yii::app()->session["userId"] ) + $loadChat = '/'.$this->module->id.'/rocketchat'; + } + ?> + <a href="<?php echo $loadChat;?>" target="_blanck" class="btn btn-default bold letter-red hidden-xs" style="border-right:0px!important;"> + <i class="fa fa-comments fa-2x"></i> + </a> + <?php } */?> + </div> + + <div class="btn-group pull-right"> + + <?php + $role = Role::getRolesUserId(@Yii::app()->session["userId"]) ; + + if($element["_id"] == Yii::app()->session["userId"] && + (Role::isSuperAdmin($role) || Role::isSourceAdmin($role) )) { ?> + <!--<button type="button" class="btn btn-default bold lbh" data-hash="#admin"> + <i class="fa fa-user-secret"></i> <span class="hidden-xs hidden-sm hidden-md">Admin</span> + </button>--> + + <button type="button" class="btn btn-default bold tooltips" data-placement="left" + data-original-title="super admin" id="btn-superadmin"> + <i class="fa fa-grav letter-red"></i> <span class="hidden-xs hidden-sm hidden-md"></span> + </button> + <?php } ?> + + </div> + + <div class="btn-group pull-right" id="paramsMenu"> + <ul class="nav navbar-nav"> + <li class="dropdown"> + <button type="button" class="btn btn-default bold"> + <?php if(@Yii::app()->session["userId"] && $edit==true){ ?> + <i class="fa fa-cogs"></i> <span class="hidden-xs hidden-sm"><?php echo Yii::t("common", "Settings"); ?> + <?php }else{ ?> + <i class="fa fa-chevron-down"></i> + <?php } ?> + </span> + </button> + <!--<button type="button" class="btn btn-default bold"> + <i class="fa fa-chevron-down"></i> + </button>--> + <ul class="dropdown-menu arrow_box menu-params"> + <?php $this->renderPartial('../element/linksMenu', + array("linksBtn"=>$linksBtn, + "elementId"=>(string)$element["_id"], + "elementType"=>$type, + "elementName"=> $element["name"], + "openEdition" => $openEdition, + "xsView"=>true) + ); + ?> + <?php if(@Yii::app()->session["userId"] && $edit==true){ ?> + <li class="text-left"> + <a href="javascript:;" id="editConfidentialityBtn" class="bg-white"> + <i class="fa fa-cogs"></i> <?php echo Yii::t("common", "Confidentiality params"); ?> + </a> + </li> + <?php } ?> + <?php if(@Yii::app()->session["userId"] && $edit==true){ ?> + <li class="text-left"> + <a href="javascript:;" onclick="updateSlug();" id="" class="bg-white"> + <i class="fa fa-id-badge"></i> <?php echo Yii::t("common", "Edit slug"); ?> + </a> + </li> + <?php } ?> + + <li> + <a href="javascript:;" onclick="showDefinition('qrCodeContainerCl',true)"> + <i class="fa fa-qrcode"></i> <?php echo Yii::t("common","QR Code") ?> + </a> + </li> + + <?php if($type !=Person::COLLECTION){ ?> + + <?php if($openEdition==true){ ?> + <li class="text-left"> + <a href="javascript:;" class="btn-show-activity"> + <i class="fa fa-history"></i> <?php echo Yii::t("common","History")?> + </a> + </li> + <?php } ?> + + <?php if (Authorisation::canDeleteElement((String)$element["_id"], $type, Yii::app()->session["userId"]) && !@$deletePending) { ?> + <li class="text-left"> + <a href="javascript:;" id="btn-delete-element" class="bg-white text-red" data-toggle="modal"> + <i class="fa fa-trash"></i> + <?php echo Yii::t("common", "Delete {what}", + array("{what}"=> + Yii::t("common","this ".Element::getControlerByCollection($type)))); + ?> + </a> + </li> + <?php } ?> + <?php } else { ?> + <?php if(@Yii::app()->session["userId"] && $edit==true){ ?> + + <li class="text-left"> + <a href='javascript:;' onclick='rcObj.settings();' > + <i class='fa fa-comments'></i> <?php echo Yii::t("common","Chat Settings"); ?> + </a> + </li> + + <li class="text-left"> + <a href='javascript:' id="downloadProfil"> + <i class='fa fa-download'></i> <?php echo Yii::t("common", "Download your profil") ?> + </a> + </li> + + <li class="text-left"> + <a href='javascript:;' id="btn-update-password" class='text-red'> + <i class='fa fa-key'></i> <?php echo Yii::t("common","Change password"); ?> + </a> + </li> + + <?php } ?> + <?php } ?> + </ul> + </li> + </ul> + </div> + + <?php if(isset(Yii::app()->session["userId"]) && $typeItem!=Person::COLLECTION){ ?> + <div class="btn-group pull-right"> + <button class='btn btn-default bold btn-share pull-right letter-green' style="border:0px!important;" + data-ownerlink='share' data-id='<?php echo $element["_id"]; ?>' data-type='<?php echo $typeItem; ?>' + data-isShared='false'> + <i class='fa fa-share'></i> <span class="hidden-xs"><?php echo Yii::t("common","Share") ?></span> + </button> + </div> + <?php } ?> + </div> + + + <!-- <div id="div-reopen-menu-left-container" class="col-xs-12 col-sm-3 col-md-3 col-lg-2 hidden"> --> + <!-- <button id="reopen-menu-left-container" class="btn btn-default"> + <i class="fa fa-arrow-left"></i> <span class="hidden-sm hidden-xs"> Retour au </span>menu principal + </button> --> + <!-- <button id="refresh-coop-rooms" class="btn btn-default pull-right"> + <i class="fa fa-refresh"></i> + </button> --> + <!-- <hr> + <h4 class="letter-turq"><i class="fa fa-connectdevelop"></i> Espaces co<span class="hidden-sm">opératifs</span></h4> + --> + + + + <?php //render of modal for coop spaces + $params = array( "element" => @$element, + "type" => @$type, + "edit" => @$edit, + "thumbAuthor"=>@$thumbAuthor, + "openEdition" => $openEdition, + "iconColor" => $iconColor + ); + + $this->renderPartial('../cooperation/pod/modals', $params ); + ?> + + <div id="menu-left-container" class="col-xs-12 col-sm-3 col-md-3 col-lg-2 profilSocial hidden-xs" + style="margin-top:40px;"> + <?php $params = array( "element" => @$element, + "type" => @$type, + "edit" => @$edit, + "isLinked" => @$isLinked, + "countNotifElement"=>@$countNotifElement, + "invitedMe" => @$invitedMe, + "openEdition" => $openEdition, + ); + + $this->renderPartial('../pod/menuLeftElement', $params ); + ?> + </div> + + <div class="col-xs-12 col-md-9 col-sm-9 col-lg-9 padding-50 margin-top-50 links-main-menu hidden" + id="div-select-create"> + <div class="col-md-12 col-sm-12 col-xs-12 padding-15 shadow2 bg-white "> + + <h4 class="text-center margin-top-15" style=""> + <img class="img-circle" src="<?php echo $thumbAuthor; ?>" height=30 width=30 style="margin-top:-10px;"> + <a class="btn btn-link pull-right text-dark" id="btn-close-select-create" style="margin-top:-10px;"> + <i class="fa fa-times-circle fa-2x"></i> + </a> + <span class="name-header"><?php echo @$element["name"]; ?></span> + <br> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("form","Create content link to this page") ?> + <br> + <small><?php echo Yii::t("form","What kind of content will you create ?") ?></small> + </h4> + + <div class="col-md-12 col-sm-12 col-xs-12"><hr></div> + + <button data-form-type="event" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-orange"> + <h6><i class="fa fa-calendar fa-2x bg-orange"></i><br> <?php echo Yii::t("common", "Event") ?></h6> + <small><?php echo Yii::t("form", "Diffuse an event<br>Invite attendees<br>Communicate to your network") ?></small> + </button> + <button data-form-type="classified" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-azure hide-event"> + <h6><i class="fa fa-bullhorn fa-2x bg-azure"></i><br> <?php echo Yii::t("common", "Classified") ?></h6> + <small><?php echo Yii::t("form","Create a classified ad<br>To share To give To sell To rent<br>Material Property Job") ?></small> + </button> + + <button data-form-type="poi" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-green-poi"> + <h6><i class="fa fa-map-marker fa-2x bg-green-poi"></i><br> <?php echo Yii::t("common", "Point of interest") ?></h6> + <small><?php echo Yii::t("form","Make visible an interesting place<br>Contribute to the collaborative map<br>Highlight your territory") ?></small> + </button> + + + <!--<button data-form-type="url" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-url"> + <h6><i class="fa fa-link fa-2x bg-url"></i><br> <?php echo Yii::t("common", "URL") ?></h6> + <small><?php echo Yii::t("form","Share a link<br>Your favorites websites<br>Important news...") ?></small> + </button>--> + + + <button data-form-type="project" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-purple hide-event"> + <h6><i class="fa fa-lightbulb-o fa-2x bg-purple"></i><br> <?php echo Yii::t("common", "Project") ?></h6> + <small><?php echo Yii::t("form", "Make visible a project<br>Find support<br>Build a community") ?></small> + </button> + + <button data-form-type="contactPoint" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-blue hide-citoyens"> + <h6><i class="fa fa-envelope fa-2x bg-blue"></i><br> <?php echo Yii::t("common","Contact") ?></h6> + <small><?php echo Yii::t("form", "Define roles of everyone<br>Communicate easily<br>Internal and external") ?></small> + </button> + + <div class="section-create-page"> + + <button data-form-type="organization" data-form-subtype="<?php echo Organization::TYPE_GROUP; ?>" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 letter-turq"> + <h6><i class="fa fa-circle-o fa-2x bg-turq"></i><br> <?php echo Yii::t("common", "Group") ?></h6> + <small><?php echo Yii::t("form","Create a group<br>Share your interest<br>Speak Diffuse Have fun") ?></small> + </button> + + <button data-form-type="organization" data-form-subtype="<?php echo Organization::TYPE_NGO; ?>" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-green"> + <h6><i class="fa fa-group fa-2x bg-green"></i><br> <?php echo Yii::t("common", "NGO") ?></h6> + <small><?php echo Yii::t("form","Make visible your NGO<br>Manage the community<br>Share your news") ?></small> + </button> + + + <button data-form-type="organization" data-form-subtype="<?php echo Organization::TYPE_BUSINESS; ?>" data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-azure"> + <h6><i class="fa fa-industry fa-2x bg-azure"></i><br> <?php echo Yii::t("common", "Local Business") ?></h6> + <small><?php echo Yii::t("form","Make visible your company<br>Find new customer<br>Manage your contacts") ?></small> + </button> + + <button data-form-type="organization" data-form-subtype="<?php echo Organization::TYPE_GOV; ?>" + data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-6 col-md-4 col-lg-4 text-red"> + <h6><i class="fa fa-university fa-2x bg-red"></i><br> <?php echo Yii::t("common", "Government Organization") ?></h6> + <small><?php echo Yii::t("form","Town hall, schools, etc...<br>Share your news<br>Share events") ?></small> + </button> + + </div> + </div> + </div> + + + <section class="col-xs-12 col-md-9 col-sm-9 col-lg-10 no-padding central-section pull-right"> + + <?php + $marginCentral=""; + $classDescH="hidden"; + $classBtnDescH="<i class='fa fa-angle-down'></i> ".Yii::t("common","show description"); + + if(Yii::app()->params["CO2DomainName"] == "kgougle") $classDescH = ""; + + if($typeItem != Person::COLLECTION){ + ?> + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 hidden-xs" style="margin-top:20px;"> + <span id="desc-event" class="margin-top-10 <?php echo $classDescH; ?>"> + <b><i class="fa fa-angle-down"></i> + <i class="fa fa-info-circle"></i> <?php echo Yii::t("common","Main description") ?></b> + <hr> + <span id="descProfilsocial"> + <?php echo @$element["description"] && @$element["description"]!="" ? + @$element["description"] : + "<span class='label label-info'> ".Yii::t("common","No description registred")."</span>"; ?> + </span> + </span> + </div> + <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 hidden-xs"> + <button class="btn btn-link btn-xs pull-right" id="btn-hide-desc"> + <?php echo $classBtnDescH; ?> + </button> + <br> + <hr> + </div> + <?php }else{ $marginCentral="50"; } ?> + + <!-- Permet de faire le convertion en HTML --> + <span id="descriptionMarkdown" name="descriptionMarkdown" class="hidden" ><?php echo (!empty($element["description"])) ? $element["description"] : ""; ?></span> + + <div class="col-xs-12 col-sm-12 col-md-9 col-lg-9 margin-top-<?php echo $marginCentral; ?>" id="central-container"> + </div> + + <?php $this->renderPartial('../pod/qrcode',array( "type" => @$type, + "name" => @$element['name'], + "address" => @$address, + "address2" => @$address2, + "email" => @$element['email'], + "url" => @$element["url"], + "tel" => @$tel, + "img"=>@$element['profilThumbImageUrl'])); + ?> + + <div class="col-md-3 col-lg-3 hidden-sm hidden-xs margin-top-<?php echo $marginCentral; ?>" + id="notif-column"> + </div> + </section> + + <!-- <section class="col-xs-12 col-md-9 col-sm-9 col-lg-9 no-padding form-contact-mail pull-right"> --> + <?php + if(Yii::app()->params["CO2DomainName"] != "kgougle"){ + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial($layoutPath.'forms.'.Yii::app()->params["CO2DomainName"].'.formContact', + array("element"=>@$element)); + } + ?> + <!-- </section> --> +</div> + +<?php + $this->renderPartial('../pod/confidentiality', + array( "element" => @$element, + "type" => @$type, + "edit" => @$edit, + "controller" => $controller, + "openEdition" => $openEdition, + ) ); + + //if( $type != Person::COLLECTION) + $this->renderPartial('../element/addMembersFromMyContacts', + array( "type"=>$type, + "parentId" => (string)$element['_id'], + "members" => @$members)); + + $this->renderPartial('../element/invite', + array( "type"=>$type, + "parentId" => (string)$element['_id'], + "members" => @$members)); + +?> + +<?php $cssAnsScriptFilesModule = array( + '/js/default/profilSocial.js', + '/js/cooperation/uiCoop.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> + +<script type="text/javascript"> + var contextData = <?php echo json_encode( Element::getElementForJS(@$element, @$type) ); ?>; + initMetaPage(contextData.name,contextData.shortDescription,contextData.profilImageUrl); + mylog.log("init contextData", contextData); + var params = <?php echo json_encode(@$params); ?>; + var edit = ( ( '<?php echo (@$edit == true); ?>' == "1") ? true : false ); + var openEdition = ( ( '<?php echo (@$openEdition == true); ?>' == "1") ? true : false ); + var dateLimit = 0; + var typeItem = "<?php echo $typeItem; ?>"; + var liveScopeType = ""; + var subView="<?php echo @$_GET['view']; ?>"; + var navInSlug=false; + + if(typeof contextData.slug != "undefined") + navInSlug=true; + + var hashUrlPage= ( (typeof contextData.slug != "undefined") ? "#"+contextData.slug : "#page.type."+contextData.type+".id."+contextData.id); + + if(location.hash.indexOf("#page")>=0){ + strHash=""; + if(location.hash.indexOf(".view")>0){ + hashPage=location.hash.split(".view"); + strHash=".view"+hashPage[1]; + } + replaceSlug=true; + history.replaceState("#page.type."+contextData.type+".id."+contextData.id, "", hashUrlPage+strHash); + //location.hash=; + } + + var cropResult; + var idObjectShared = new Array(); + + var personCOLLECTION = "<?php echo Person::COLLECTION; ?>"; + var dirHash="<?php echo @$_GET['dir']; ?>"; + var roomId = "<?php echo @$_GET['room']; ?>"; + var proposalId = "<?php echo @$_GET['proposal']; ?>"; + var resolutionId = "<?php echo @$_GET['resolution']; ?>"; + var actionId = "<?php echo @$_GET['action']; ?>"; + + + jQuery(document).ready(function() { + bindButtonMenu(); + inintDescs(); + if(typeof contextData.name !="undefined") + setTitle("", "", contextData.name); + + if( contextData.type == "events") + $(".createProjectBtn").hide() + else + $(".createProjectBtn").show() + + $(".hide-"+contextData.type).hide(); + getProfilSubview(subView,dirHash); + + //loadActionRoom(); + + KScrollTo("#topPosKScroll"); + initDateHeaderPage(contextData); + getContextDataLinks(); + if(typeof contextData.links != "undefined" && rolesList != "undefined") + pushListRoles(contextData.links); + + //Sig.showMapElements(Sig.map, mapElements); + var elemSpec = dyFInputs.get("<?php echo $type?>"); + buildQRCode( elemSpec.ctrl ,"<?php echo (string)$element["_id"]?>"); + }); + function initMetaPage(title, description, image){ + if(title != ""){ + $("meta[name='title']").attr("content",title); + $("meta[property='og:title']").attr("content",title); + } + if(description != ""){ + $("meta[name='description']").attr("content",description); + $("meta[property='og:description']").attr("content",description); + } + if(image != ""){ + $("meta[name='image']").attr("content",baseUrl+image); + $("meta[property='og:image']").attr("content",baseUrl+image); + } + } + function getProfilSubview(sub, dir){ console.log("getProfilSubview", sub, dir); + if(sub!=""){ + if(sub=="gallery") + loadGallery(); + if(sub=="library") + loadLibrary(); + else if(sub=="notifications") + loadNotifications(); + else if(sub.indexOf("chart") >= 0){ + loadChart(); + } + else if(sub=="mystream") + loadNewsStream(false); + else if(sub=="history") + loadHistoryActivity(); + else if(sub=="directory") + loadDataDirectory(dir,null,edit); + else if(sub=="editChart") + loadEditChart(); + else if(sub=="detail") + loadDetail(); + else if(sub=="urls") + loadUrls(); + else if(sub=="chat" && userId) + rcObj.loadChat("","citoyens", true, true); + else if(sub=="contacts") + loadContacts(); + else if(sub=="settings") + loadSettings(); + else if(sub=="coop"){ + loadCoop(roomId, proposalId, resolutionId, actionId); + } + } else + loadNewsStream(true); + } + + + +function loadCoop(roomId, proposalId, resolutionId, actionId){ + /*console.log("loadCoop", userId); + if(userId == "") { + toastr.info("Vous devez êtres connecté pour accéder à cet espace coopératif"); + loadNewsStream(); + return; + }*/ + + roomId = (roomId != "") ? roomId : null; + proposalId = (proposalId != "") ? proposalId : null; + resolutionId = (resolutionId != "") ? resolutionId : null; + actionId = (actionId != "") ? actionId : null; + + toastr.info(trad["processing"]); + + uiCoop.startUI(false); + + setTimeout(function(){ + uiCoop.getCoopData(contextData.type, contextData.id, "room", null, roomId, function(){ + toastr.success(trad["processing ok"]); + $("#modalCoop").modal("show"); + + var type = null; + var id = null; + + if(proposalId != null){ + type = "proposal"; id = proposalId; + } + + if(actionId != null){ + type = "action"; id = actionId; + } + + if(resolutionId != null){ + type = "resolution"; id = resolutionId; + } + + console.log("getCoopData??", contextData.type, contextData.id, type, null, id); + + if(type != null) + uiCoop.getCoopData(contextData.type, contextData.id, type, null, id); + + setTimeout(function(){ + loadNewsStream(true); + }, 5000); + }); + }, 1500); +} + +</script> diff --git a/views/element/sectionEditTools.php b/views/element/sectionEditTools.php new file mode 100755 index 0000000000000000000000000000000000000000..75fa76a660196fa3d340acc4d8fedaff08f1e3f4 --- /dev/null +++ b/views/element/sectionEditTools.php @@ -0,0 +1,419 @@ + + + <style> + #onepage-edition-tools input{ + /*display: none;*/ + } + #onepage-edition-tools hr{ + float: left; + width: 100%; + } + + #onepage-edition-tools #static-head-tools{ + position: fixed; + top:0px; + margin-left:-15px; + margin-right: -15px; + margin-bottom: 10px; + padding:80px 15px 10px 15px !important; + width:39%; + z-index:5; + background-color: white; + -webkit-box-shadow: -2px 0px 5px -1px rgba(0,0,0,0.5); + -moz-box-shadow: -2px 0px 5px -1px rgba(0,0,0,0.5); + box-shadow: -2px 0px 5px -1px rgba(0,0,0,0.5); + } + .edit-section-title{ + margin-top: 55px !important; + } + + .btn-edit-section{ + margin-top:-30px; + } + #onepage-edition-tools{ + width:40%; + position: fixed; + top:0px; + right: 0px; + height:100%; + max-height: 100%; + overflow-y: auto; + background-color:white; + z-index:3; + padding:85px 15px 10px 15px; + display:none; + } + + #btn-bgcolor-section, + #btn-bgcolor-section, + #btn-txtcolor-section{ + width:50px; + height:50px; + border: 1px solid lightgrey!important; + } + .btn-bgcolor-section.bg-white, + .btn-bgimg-section.bg-white, + .btn-txtcolor-section.bg-white{ + border: 3px solid lightgrey; + } + .btn-bgcolor-section, + .btn-bgimg-section, + .btn-txtcolor-section{ + height:40px; + border-radius:0px; + border: 3px solid transparent; + } + .btn-bgimg-section{ + height:100px; + overflow: hidden; + border:3px solid white; + } + .btn-bgcolor-section.active, + .btn-bgimg-section.active, + .btn-txtcolor-section.active{ + border: 3px solid black; + } + </style> + + <?php + $colors = array( + "ed5564", "d9434e", + "ed5f55", "d94c43", + "f87f52", "e7663f", + "fab153", "f49a42", + + "fcce54", "f5ba42", + "c2d468", "b0c151", + "98d367", "82c250", + "42cb6f", "3bb85d", + + "47cec0", "3bbeb0", + "4ec2e7", "3bb1d9", + "5c9ded", "4a8bdb", + "9398ec", "7277d5", + + "cb93ec", "b377d9", + "ec87bf", "d870ad", + "f1f2f6", "e2e3e7", + "c7cbd4", "a5adb8", + ); + + ?> + + <div class="hidden-xs shadow-left" id="onepage-edition-tools"> + + <div class="col-md-12 col-sm-12 no-padding" id="static-head-tools"> + <h5 class="pull-left"><i class="fa fa-angle-down"></i> <i class="fa fa-cogs"></i> Editer la section</h5> + <button class="btn btn-danger pull-right margin-left-5 btn-close-edition-tools"><i class="fa fa-times"></i></button> + <button class="btn btn-success pull-right btn-save-edition-tools"><i class="fa fa-save"></i> Enregistrer</button> + </div> + + <div class="col-md-12 col-sm-12 no-padding margin-bottom-10"> + <h3 class="margin-top-5 edit-section-title"></h3> + <hr class="margin-bottom-5 margin-top-5"> + </div> + + <div class="col-md-12 col-sm-12 no-padding"> + <div class="col-md-12 col-sm-12 no-padding"> + <button class="btn btn-default padding-20 pull-left" id="btn-txtcolor-section"></button> + <h4 class="pull-left margin-left-10"><i class="fa fa-angle-down"></i> Couleur du text</h4> + <div class="col-md-12 col-sm-12 no-padding margin-top-15"> + <button class="btn btn-default padding-20 btn-txtcolor-section bg-white col-md-6 col-sm-6 bg-white" data-type="light"></button> + <button class="btn btn-default padding-20 btn-txtcolor-section bg-dark col-md-6 col-sm-6" data-type="dark"></button> + + <input type="text" id="text-color" class="pull-right margin-top-10"> + </div> + </div> + <br><hr> + </div> + + <div class="col-md-12 col-sm-12 no-padding margin-top-15"> + <div class="col-md-12 col-sm-12 no-padding"> + <button class="btn btn-default padding-20 pull-left" id="btn-bgcolor-section"></button> + <h4 class="pull-left margin-left-10"><i class="fa fa-angle-down"></i> Couleur de fond</h4> + <button class="btn btn-default padding-20 btn-bgcolor-section bg-white pull-right bg-white" data-hex="FFF"></button> + <button class="btn btn-default padding-20 btn-bgcolor-section bg-dark pull-right" data-hex="333"></button> + </div> + <div class="col-md-12 col-sm-12 no-padding margin-top-10"> + <?php $class="left"; + foreach ($colors as $i => $hex) { + ?> + <?php if($i%2!=1 && $i>0) echo "</div>"; ?> + <?php if($i%2!=1) echo "<div class='col-md-3 col-sm-3 no-padding'>"; ?> + <button class="btn btn-default padding-20 btn-bgcolor-section col-md-6 col-sm-6 no-padding" + data-hex="<?php echo $hex; ?>" + style="background-color:#<?php echo $hex; ?>;"> + </button> + + <?php } ?> + + <input type="text" id="background-color" class="pull-right margin-top-10"> + </div> + + <br><hr> + </div> + + <?php + $imgSections = array(array("title"=>"Minimal", + "folder"=>"white", + "repeat"=>false), + + array("title"=>"Abstraits", + "folder"=>"abstract", + "repeat"=>false), + + array("title"=>"Texture", + "folder"=>"pattern", + "repeat"=>true), + ); + ?> + + <div class="col-md-12 col-sm-12 no-padding margin-top-15"> + <div class="col-md-12 col-sm-12 no-padding"> + <h4 class="pull-left margin-left-10"><i class="fa fa-angle-down"></i> Image de fond</h4> + </div> + <?php foreach ($imgSections as $i => $sec) { ?> + <div class="col-md-12 col-sm-12 no-padding margin-top-10"> + <h5><?php echo $sec["title"]; ?></h5> + <?php + $path = Yii::app()->theme->baseUrl. '/assets/img/background-onepage/'.$sec["folder"]."/"; + $path = ".".substr($path, 3); + if(file_exists ( $path )){ + $files = glob($path.'*.{jpg,jpeg,png}', GLOB_BRACE); + } ; + ?> + <?php + if(isset($files)) + foreach ($files as $i => $img) { ?> + <button class="btn btn-default col-md-4 col-sm-4 btn-bgimg-section padding-5" + data-repeat="<?php echo $sec["repeat"] ? "true" : "false"; ?>" + data-url="<?php echo $img; ?>" + style="background-image:url('<?php echo $img; ?>'); + <?php if($sec["repeat"]) echo "background-repeat:repeat;"; + else echo "background-size: cover;"; + ?>" + > + </button> + <?php } ?> + </div> + <?php } ?> + <input type="text" id="background-color" class="pull-right margin-top-10"> + <br><hr> + </div> + + + </div> + +<div class="scroll-top page-scroll"> + <a class="btn btn-primary" href="#page-top"> + <i class="fa fa-chevron-up"></i> + </a> +</div> + + <script type="text/javascript" > + + var currentIdSection = ""; + jQuery(document).ready(function() { + $("#main-page-name, title").html(elementName); + $(".btn-save-edition-tools").click(function(){ + hideEditionTools(false); + }); + $(".btn-close-edition-tools").click(function(){ + hideEditionTools(true); + }); + $(".btn-edit-section").click(function(){ console.log("ahlo koi"); + var key = $(this).data("id"); + showEditionTools(key); + }); + + + /* COLOR PICKER */ + + /* BGCOLOR PICKER */ + $('#onepage-edition-tools .btn-bgcolor-section').click(function(){ + $('#onepage-edition-tools .btn-bgcolor-section').removeClass("active"); + $(this).addClass("active"); + var hex = $(this).data("hex"); + $("input#background-color").val("#"+hex); + $("#onepage-edition-tools #btn-bgcolor-section").css("backgroundColor", "#"+hex); + + $("section"+currentIdSection).css("backgroundImage", 'url()'); + $("section"+currentIdSection).css("backgroundColor", "#"+hex); + }); + + $('#onepage-edition-tools #btn-bgcolor-section').off().ColorPicker({ + onSubmit: function(hsb, hex, rgb, el) { + $(el).val(hex); + $(el).ColorPickerHide(); + console.log("onSubmit colorpicker"); + }, + onChange: function(hsb, hex, rgb, el) { + $("input#background-color").val("#"+hex); + $("#onepage-edition-tools #btn-bgcolor-section").css("backgroundColor", "#"+hex); + $("section"+currentIdSection).css("backgroundColor", "#"+hex); + $('#onepage-edition-tools .btn-bgcolor-section').removeClass("active"); + }, + onBeforeShow: function () { + var rgb = $(this).css("backgroundColor"); + var color = rgbToHex(rgb) + $(this).ColorPickerSetColor(color); + $("section"+currentIdSection).css("background", 'url("")!important'); + + } + }) + .bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + console.log("keyup colorpicker"); + }); + /* BGCOLOR PICKER */ + + + /* TXTCOLOR PICKER */ + $('#onepage-edition-tools .btn-txtcolor-section').click(function(){ + $('#onepage-edition-tools .btn-txtcolor-section').removeClass("active"); + $(this).addClass("active"); + var type = $(this).data("type"); + $("input#text-color").val(type); + $("section"+currentIdSection).removeClass('dark').removeClass('light').addClass(type); + unsetTxtColorSection(); + + $("#onepage-edition-tools #btn-txtcolor-section").css("backgroundColor", $(this).css("backgroundColor")); + }); + + $('#onepage-edition-tools #btn-txtcolor-section').off().ColorPicker({ + onSubmit: function(hsb, hex, rgb, el) { + //$(el).val(hex); + //$(el).ColorPickerHide(); + //console.log("onSubmit colorpicker"); + }, + onChange: function(hsb, hex, rgb, el) { + $("input#text-color").val("#"+hex); + $("#onepage-edition-tools #btn-txtcolor-section").css("backgroundColor", "#"+hex); + + setTxtColorSection(hex); + + $('#onepage-edition-tools .btn-txtcolor-section').removeClass("active"); + }, + onBeforeShow: function () { + var rgb = $(this).css("backgroundColor"); + var color = rgbToHex(rgb); + $(this).ColorPickerSetColor(color); + console.log("onBeforeShow colorpicker", color); + } + }) + .bind('keyup', function(){ + $(this).ColorPickerSetColor(this.value); + console.log("keyup colorpicker"); + }); + /* TXTCOLOR PICKER */ + + /* BGIMG PICKER */ + $('#onepage-edition-tools .btn-bgimg-section').click(function(){ + $('#onepage-edition-tools .btn-bgimg-section').removeClass("active"); + $(this).addClass("active"); + var type = $(this).data("type"); + $("input#text-color").val(type); + + var url = $(this).data("url"); + var repeat = $(this).data("repeat"); + + console.log("repeat", repeat); + + $("section"+currentIdSection).css('backgroundImage', "url('"+url+"')"); + + if(repeat==true){ + $("section"+currentIdSection).css('backgroundRepeat', "repeat"); + $("section"+currentIdSection).css('backgroundSize', "unset"); + } + else { + $("section"+currentIdSection).css('backgroundRepeat', "no-repeat"); + $("section"+currentIdSection).css('backgroundSize', "cover"); + } + }); + /* BGIMG PICKER */ + + + + }); + + function setTxtColorSection(hex){ + $( "section"+currentIdSection+ " .item-name, "+ + "section"+currentIdSection+ " .item-desc, "+ + "section"+currentIdSection+ " .section-title, "+ + "section"+currentIdSection + ).css("color", "#"+hex); + } + function unsetTxtColorSection(){ + $( "section"+currentIdSection+ " .item-name, "+ + "section"+currentIdSection+ " .item-desc, "+ + "section"+currentIdSection+ " .section-title, "+ + "section"+currentIdSection + ).css("color", ""); + } + + + + var initBgColor = ""; + var initTxtColor = ""; + var initType = ""; + function showEditionTools(idSection){ + currentIdSection = idSection; + $("#onepage-edition-tools").show(300); + var title = $(idSection+" .section-title .sec-title").html(); + if(currentIdSection == "#header") title = "EN-TÊTE"; + $("#onepage-edition-tools .edit-section-title").html(title); + KScrollTo("section"+idSection); + + var rgb = $("section"+currentIdSection).css("backgroundColor"); + initBgColor = rgbToHex(rgb); + $("#onepage-edition-tools #btn-bgcolor-section").css("backgroundColor", "#"+initBgColor); + + var rgb = $("section"+currentIdSection+ " .item-name").css("color"); + initTxtColor = rgbToHex(rgb); + $("#onepage-edition-tools #btn-txtcolor-section").css("backgroundColor", "#"+initTxtColor); + console.log("showEditionTools colorpicker", initTxtColor); + + initType = $("section"+currentIdSection).hasClass("light") ? "light" : ""; + if(initType == "") initType = $("section"+currentIdSection).hasClass("dark") ? "dark" : ""; + //$('#onepage-edition-tools input#background-color').val("#000"); + + + console.log("show section edit ", idSection); + } + + function hideEditionTools(cancel){ + $("#onepage-edition-tools").hide(300); + + if(cancel){ + $( "section"+currentIdSection+ " .item-name, "+ + "section"+currentIdSection+ " .item-desc, "+ + "section"+currentIdSection+ " .section-title" + ).css("color", "#"+initTxtColor); + + $("section"+currentIdSection).css("backgroundColor", "#"+initBgColor); + + $("section"+currentIdSection).removeClass('dark').removeClass('light').addClass(initType); + } + } + + + function componentFromStr(numStr, percent) { + var num = Math.max(0, parseInt(numStr, 10)); + return percent ? + Math.floor(255 * Math.min(100, num) / 100) : Math.min(255, num); + } + + function rgbToHex(rgb) { + var rgbRegex = /^rgb\(\s*(-?\d+)(%?)\s*,\s*(-?\d+)(%?)\s*,\s*(-?\d+)(%?)\s*\)$/; + var result, r, g, b, hex = ""; + if ( (result = rgbRegex.exec(rgb)) ) { + r = componentFromStr(result[1], result[2]); + g = componentFromStr(result[3], result[4]); + b = componentFromStr(result[5], result[6]); + + hex = (0x1000000 + (r << 16) + (g << 8) + b).toString(16).slice(1); + } + return hex; + } + + </script> \ No newline at end of file diff --git a/views/element/standalone.php b/views/element/standalone.php new file mode 100644 index 0000000000000000000000000000000000000000..d5f762c3c10458f03ef39b3be1077196a20d047f --- /dev/null +++ b/views/element/standalone.php @@ -0,0 +1,287 @@ +<?php +HtmlHelper::registerCssAndScriptsFiles( + array( + '/js/comments.js', + ) , + Yii::app()->theme->baseUrl. '/assets'); +$cssAnsScriptFilesTheme = array( + '/plugins/jquery-bar-rating/jquery.barrating.js', + '/plugins/font-awesome/css/font-awesome.min.css', + '/plugins/jquery-bar-rating/fontawesome-stars.css', + '/plugins/jquery-bar-rating/fontawesome-stars-o.css' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + +?> +<style type="text/css"> + .modal-content .headerTitleStanalone{ + left:-25px; + right:-25px; + top:0px !important; + } + .modal-content .contentOnePage{ + margin-top: 55px !important; + min-height: 500px; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + margin-top:20px; + } + /*.carousel-media > ol > li.active{ + margin:1px; + border-top: 5px solid #EF5B34 !important; + } + .carousel-media > ol > li{ + width: 60px !important; + background-color: inherit; + border: inherit !important; + height: 65px !important; + border-radius: inherit; + border-top: 5px solid lightgray !important; + } + + .carousel-media > ol > li > img{ + float:left; + width:60px; + height:60px; + } + .carousel-media > ol{ + bottom: -85px + } + .carousel-media{ + margin-bottom: 100px; + }*/ + .informations .btn-social{ + padding: 0px; + height: inherit; + width: 45px; + height:45px; + border-radius: 8px; + } + .informations .btn-social > span{ + /*position: absolute;*/ + font-size: 20px; + } + + .carousel-media .carousel-inner { + max-width: 900px; + max-height: 900px; + margin-left: auto; + margin-right: auto; + } + + .btn-linkedin{ + background-color: #517dae; + color:white; + } + .btn-facebook{ + background-color: #506eae; + color:white; + } + .btn-twitter{ + background-color: #6fbee9; + color:white; + } + .btn-google{ + background-color: #e24d47; + color:white; + } + + .associated{ + padding: 0px 50px 50px 50px; + } + + .associated .entity{ + margin-bottom:50px; + } + +</style> + +<header style="position: fixed;width: 100%;left: 0;height: 70px;z-index: 3;"> +<div class="container" style="padding:0px"> + <div class="headerTitle" style=""> <?php echo ucfirst($element["name"]) ?></div> +</div> +</header> + +<div class="col-xs-12 col-md-10 col-md-offset-1 contentOnePage margin-bottom-50"> + <div class="col-md-12 title letter-lightgray text-left"><h2><?php echo ucfirst($element["name"]) ?></h2></div> + <?php + $images=Document::getListDocumentsWhere(array("id"=>(string)$element["_id"],"type"=>$type,"doctype"=>Document::DOC_TYPE_IMAGE),Document::DOC_TYPE_IMAGE); + $this->renderPartial('../pod/sliderMedia', + array( + "medias"=>@$element["medias"], + "images" => @$images, + ) ); + ?> + + + + <div class="col-md-12 margin-bottom-20"> + <hr> + </div> + + <div class="informations col-md-12 margin-bottom-20"> + <div class="header-info col-md-12 no-padding text-left"> + <div class="letter-lightgray col-md-6 no-margin text-left"><h5><?php echo Yii::t("terla", "PROJECT DESCRIPTION"); ?> + <span class="evalutation"> + <?php if(@$element["averageRating"]){ ?> + <div class="br-wrapper br-theme-fontawesome-stars-o pull-left margin-left-10"> + <select id="ratingElement" class="ratingComments"> + <option value="1">1</option> + <option value="2">2</option> + <option value="3">3</option> + <option value="4">4</option> + <option value="5">5</option> + </select> + </div> + <span><?php echo $element["averageRating"] ?></span> + <?php }else{ ?> + <small class="letter-lightgray"><?php echo Yii::t("terla", "No evaluation"); ?></small> + <?php } ?> + </span></h5> + </div> + + <div class="col-md-6"> + <a target="_blank" href="" class="btn btn-linkedin btn-social pull-right"> + <span class="fa fa-linkedin"></span> + </a> + <a target="_blank" href="" class="btn btn-google btn-social pull-right"> + <span class="fa fa-google-plus"></span> + </a> + <a target="_blank" href="" class="btn btn-twitter btn-social pull-right"> + <span class="fa fa-twitter"></span> + </a> + <a target="_blank" href="" class="btn btn-facebook btn-social pull-right"> + <span class="fa fa-facebook"></span> + </a> + + <h4 class="pull-right letter-lightgray margin-15" style=""><?php echo Yii::t("terla", "SHARE"); ?></h4> + </div> + <div class="col-md-8 description text-left margin-top-20"> + <span class="letter-lightgray"> + <?php echo nl2br(@$element["description"]); ?> + <!-- Vestibulum eu lobortis orci. Donec aliquet finibus augue, at tempus dui rutrum in. Proin pellentesque felis ligula, ac congue ante hendrerit tempor. Duis lobortis, quam at porta tincidunt, enim felis tincidunt nisi, sed ornare dui neque non nunc. Quisque pellentesque at ex a volutpat. + <br><br> + Suspendisse feugiat dui magna, vel molestie mauris porttitor quis. Vivamus et pulvinar mi, vel dictum mauris. Donec sapien sem, gravida eu arcu sit amet, ullamcorper faucibus tellus. Duis non odio non nisi laoreet egestas vel sed tortor. Nullam lectus orci, hendrerit eget malesuada fermentum, blandit quis nunc. Quisque laoreet aliquam nisi eget aliquam. Nulla sapien enim, gravida in ex eu, ultricies commodo ipsum. Donec orci libero, dictum vel enim ut, auctor interdum mauris. --> + </span> + </div> + <?php if(@Yii::app()->session["userIsAdmin"]){ ?> + <div class="col-md-3 pull-right padding-20 margin-top-20 btn-admin-add-circuit"> + </div> + <?php } ?> + <!-- SYSTEM OF PRODUCT AND SERVICE FOR TRAVEL RESERVATION WITHOUT CIRCUIT --> + <!-- <div class="col-md-3 pull-right padding-20 margin-top-20"> + <?php if($type==Service::COLLECTION){ ?> + <a href="javascript:;" class="col-md-12 btn bg-orange ssmla btn-available-calendar pull-right" + data-toggle="modal" + data-target="#modal-available"> + Book it + </a> + <?php } else { ?> + <a href="javascript:;" class="btn bg-orange" onclick="addToShoppingCart('<?php echo (string)$element["_id"] ?>','<?php echo $type ?>');">Buy it</a> + <?php } ?> + </div>--> + <!-- END BUTTON PROPOSAL FOR TRAVELLER FREE OF ACTION --> + </div> + <div id="commentElement" class="col-xs-12 margin-top-20"> + </div> + </div> + + <?php + if($type==Service::COLLECTION) + $this->renderPartial('../pod/availableCalendar', + array( "type"=>$type, + "parentId" => (string)$element['_id'], + "element" => @$element)); + ?> + +</div> + + + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial('../element/terla/associated', array()); + $this->renderPartial($layoutPath.'footer', array("subdomain"=>"page")); +?> + +<script type="text/javascript"> + + var element=<?php echo json_encode($element); ?>; + element.imgProfil = "<i class='fa fa-image fa-3x'></i>"; + if("undefined" != typeof element.profilMediumImageUrl && element.profilMediumImageUrl != "") + element.imgProfil= "<img class='img-responsive' src='"+baseUrl+element.profilMediumImageUrl+"'/>"; + var type="<?php echo $type; ?>"; + jQuery(document).ready(function() { + var nav = directory.findNextPrev("#page.type."+type+".id."+element['_id']['$id']); + str = "<div class='col-md-6 no-padding'>"+ + nav.prev+ + "<span>"+element.name+"</span>"+ + nav.next+ + "</div>"; + $(".modal-content .headerTitleStanalone").html(str); + initBtnLink(); + ajaxPost("#commentElement",baseUrl+"/"+moduleId+"/comment/index/type/"+type+"/id/"+element['_id']['$id'], + {"filters": ["rating"]}, + function(){ //$(".commentCount").html( $(".nbComments").html() ); + $(".container-txtarea").hide(); + + $(".btn-select-arg-comment").click(function(){ + var argval = $(this).data("argval"); + $(".container-txtarea").hide(); + }); + + },"html"); + element["id"] = element['_id']['$id']; + if(typeof element.averageRating != "undefined"){ + $("#ratingElement").barrating({ + theme: 'fontawesome-stars-o', + 'readonly': true, + initialRating: element.averageRating + }); + } + if($(".btn-admin-add-circuit").length > 0) + initBtnAddToCircuit(); + $(".btn-available-calendar").off().on("click",function(){ + setTimeout(function(){ + $('#calendar').fullCalendar('gotoDate', new Date()); + setCategoryColor(); + }, 300); + $('#calendar').fullCalendar('gotoDate', new Date()); + }); + + }); + function initBtnAddToCircuit(){ + if(circuit.obj.frequency=="unique"){ + btn='<a href="javascript:;" class="col-md-12 btn bg-orange ssmla btn-available-calendar pull-right" '+ + 'data-toggle="modal" '+ + 'data-target="#modal-available">'+ + 'Add to circuit'+ + '</a>'; + }else if(circuit.obj.frequency=="weekly"){ + btn='<a href="javascript:;" class="col-md-12 btn bg-orange ssmla btn-add-circuit pull-right" '+ + 'data-toggle="modal" '+ + 'data-target="#modal-available">'+ + 'Add to circuit'+ + '</a>'; + }else if(circuit.obj.frequency=="twoweekly"){ + btn='<a href="javascript:;" class="col-md-12 btn bg-orange ssmla btn-add-circuit pull-right" '+ + 'data-toggle="modal" '+ + 'data-target="#modal-available">'+ + 'Add to circuit'+ + '</a>'; + } + else if(circuit.obj.frequency=="monthly"){ + btn='<a href="javascript:;" class="col-md-12 btn bg-orange ssmla btn-add-circuit pull-right" '+ + 'data-toggle="modal" '+ + 'data-target="#modal-available">'+ + 'Add to circuit'+ + '</a>'; + } + $(".btn-admin-add-circuit").append(btn); + } + + +</script> \ No newline at end of file diff --git a/views/element/terla/about.php b/views/element/terla/about.php new file mode 100644 index 0000000000000000000000000000000000000000..82cc909d4793d01f857e0f5970d85f8355e6cf37 --- /dev/null +++ b/views/element/terla/about.php @@ -0,0 +1,509 @@ +<?php + $cssAnsScriptFilesModule = array( + //Data helper + '/js/dataHelpers.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + $cssAnsScriptFilesTheme = array( + // SHOWDOWN + '/plugins/showdown/showdown.min.js', + //MARKDOWN + '/plugins/to-markdown/to-markdown.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> +<style type="text/css"> + .valueAbout{ + border-left: inherit; + } + #shortDescriptionAbout{ + white-space: pre-line; + } + + /*#descriptionAbout{ + padding-left : 10px; + }*/ + + .contentInformation{ + border-bottom: 1px solid #dbdbdb; + } + #ficheInfo{ + border:inherit !important; + } + .labelAbout span{ + width: 20px; + padding-right: 5px; + text-align: -moz-center; + text-align: center; + text-align: -webkit-center; + float: left; + } + .labelAbout span i{ + font-size: 14px; + } + .panel-title{ + line-height:35px; + } + + .md-preview{ + text-align:left; + padding: 0px 10px; + } + + .md-editor > textarea { + padding: 10px; + } + + .descriptiontextarea label{ + margin-left:10px; + } + + + @media (min-width: 1200px) { + .no-ing{ + padding-left: 15px !important; + } + } +</style> + +<div class='col-md-12 col-sm-12 margin-bottom-15 panel-heading'> + <h4 class='panel-title text-dark pull-left' id='name-lbl-title'><i class="fa fa-info-circle fa-2x"></i> <?php echo Yii::t("common","My informations") ?></h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-info btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update general information") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> +</div> +<div id="ficheInfo" class="panel panel-white col-lg-7 col-md-7 col-sm-7 no-padding"> + <div class="panel-body no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-pencil"></i></span> <?php echo Yii::t("common", "Name") ?> + </div> + <div id="nameAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Name") ?> :</span> <?php echo $element["name"]; ?> + </div> + </div> + + + <?php if( ( $type==Person::COLLECTION && + Preference::showPreference($element, $type, "email", Yii::app()->session["userId"]) ) || + $type == Organization::COLLECTION ) { ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-envelope"></i></span> <?php echo Yii::t("common","E-mail"); ?> + </div> + <div id="emailAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-envelope"></i> <?php echo Yii::t("common","E-mail"); ?> :</span><?php echo (@$element["email"]) ? $element["email"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + <?php } ?> + + <?php if( $type==Service::COLLECTION ) { ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-envelope"></i></span> <?php echo Yii::t("common","Price"); ?> + </div> + <div id="priceAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-envelope"></i> <?php echo Yii::t("common","Price"); ?> :</span><?php echo (@$element["price"]) ? $element["price"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + + + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-envelope"></i></span> <?php echo Yii::t("common","Open"); ?> + </div> + <div id="priceAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-envelope"></i> <?php echo Yii::t("common","Price"); ?> :</span> + + <span id="openingHours"></span> + </div> + </div> + + + <?php } ?> + + + <?php if($type==Person::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-desktop"></i></span> <?php echo Yii::t("common","Website URL"); ?> + </div> + <div id="webAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-desktop"></i> <?php echo Yii::t("common","Website URL"); ?> :</span> + <?php + if(@$element["url"]){ + //If there is no http:// in the url + $scheme = ( (!preg_match("~^(?:f|ht)tps?://~i", $element["url"]) ) ? 'http://' : "" ) ; + echo '<a href="'.$scheme.$element['url'].'" target="_blank" id="urlWebAbout" style="cursor:pointer;">'.$element["url"].'</a>'; + }else + echo '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + <?php } ?> + + <?php if($type==Person::COLLECTION){ ?> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-phone"></i></span> <?php echo Yii::t("common","Phone"); ?> + </div> + <div id="fixeAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"><i class="fa fa-phone"></i> <?php echo Yii::t("common","Phone"); ?> :</span><?php + $fixe = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["fixe"])) + $fixe = ArrayHelper::arrayToString($element["telephone"]["fixe"]); + + echo $fixe; + ?> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-mobile"></i></span> <?php echo Yii::t("common","Mobile"); ?> + </div> + <div id="mobileAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"> + <i class="fa fa-mobile"></i> <?php echo Yii::t("common","Mobile"); ?> : + </span> + <?php + $mobile = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["mobile"])) + $mobile = ArrayHelper::arrayToString($element["telephone"]["mobile"]); + echo $mobile; + ?> + </div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-4 col-sm-4 col-xs-4 hidden-xs labelAbout padding-10"> + <span><i class="fa fa-fax"></i></span> <?php echo Yii::t("common","Fax"); ?> + </div> + <div id="faxAbout" class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10"> + <span class="visible-xs pull-left margin-right-5"> + <i class="fa fa-fax"></i> <?php echo Yii::t("common","Fax"); ?> : + </span> + <?php + $fax = '<i>'.Yii::t("common","Not specified").'</i>'; + if( !empty($element["telephone"]["fax"]) ) + $fax = ArrayHelper::arrayToString($element["telephone"]["fax"]); + echo $fax; + ?> + </div> + </div> + <?php } ?> + </div> + +</div> +<div class="col-sm-5 col-md-5 center margin-top-20"> +<?php if(@$element["profilMediumImageUrl"] && !empty($element["profilMediumImageUrl"])) + $images=array( + "medium"=>$element["profilMediumImageUrl"], + "large"=>$element["profilImageUrl"] + ); + else $images=""; + + $this->renderPartial('../pod/fileupload', + array("itemId" => (string) $element["_id"], + "itemName" => $element["name"], + "type" => $type, + "resize" => false, + "contentId" => Document::IMG_PROFIL, + "show" => true, + "editMode" => $edit, + "image" => $images, + "openEdition" => false) ); + ?> +</div> +<?php if($type!=Person::COLLECTION){ ?> +<div id="mediaAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding contentInformation"> + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-image"></i> <?php echo Yii::t("common","Medias") ?> + </h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-medias btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update medias") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> + </div> + <?php $images=Document::getListDocumentsWhere(array("id"=>(string)$element["_id"],"type"=>$type,"doctype"=>Document::DOC_TYPE_IMAGE),Document::DOC_TYPE_IMAGE); + $this->renderPartial('../pod/sliderMedia', + array( + "medias"=>@$element["medias"], + "images" => @$images, + "onlyItem"=>true + ) ); + ?> + +</div> +<?php } ?> +<div id="adressesAbout" class="panel panel-white col-lg-12 col-md-12 col-sm-12 col-xs-12 no-padding contentInformation"> + <div class="panel-heading border-light padding-15" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark"> + <i class="fa fa-map-marker"></i> <?php echo Yii::t("common","Localitie(s)"); ?> + </h4> + </div> + <div class="panel-body no-padding"> + + <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 labelAbout padding-10"> + <span><i class="fa fa-home"></i></span> <?php echo Yii::t("common", "Main locality") ?> + <?php if (!empty($element["address"]["codeInsee"]) && ( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) ) { + echo '<a href="javascript:;" id="btn-remove-geopos" class="pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Remove Locality").'"> + <i class="fa text-red fa-trash-o"></i> + </a> + <a href="javascript:;" class="btn-update-geopos pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Update Locality").'" > + <i class="fa text-red fa-map-marker"></i> + </a> '; + } ?> + </div> + <div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important"> + <?php + if( ($type == Person::COLLECTION && Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])) || $type!=Person::COLLECTION) { + $address = ""; + $address .= '<span id="detailAddress"> '. + (( @$element["address"]["streetAddress"]) ? + $element["address"]["streetAddress"]."<br/>": + ((@$element["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality"))); + $address .= (( @$element["address"]["postalCode"]) ? + $element["address"]["postalCode"].", " : + "") + ." ".(( @$element["address"]["addressLocality"]) ? + $element["address"]["addressLocality"] : "") ; + $address .= (( @$element["address"]["addressCountry"]) ? + ", ".OpenData::$phCountries[ $element["address"]["addressCountry"] ] + : ""). + '</span>'; + echo $address; + if( empty($element["address"]["codeInsee"]) && Yii::app()->session["userId"] == (String) $element["_id"]) { + echo '<br><a href="javascript:;" class="cobtn btn btn-danger btn-sm" style="margin: 10px 0px;">'. + Yii::t("common", "Connect to your city").'</a> <a href="javascript:;" class="whycobtn btn btn-default btn-sm explainLink" style="margin: 10px 0px;" data-id="explainCommunectMe">'. + Yii::t("common", "Why ?").'</a>'; + } + }else + echo '<i>'.Yii::t("common","Not specified").'</i>'; + ?> + </div> + </div> + <?php if( !empty($element["addresses"]) ){ ?> + <div class="col-md-12 col-xs-12 labelAbout padding-10"> + <span><i class="fa fa-map"></i></span> <?php echo Yii::t("common", "Others localities") ?> + </div> + <div class="col-md-12 col-xs-12 valueAbout no-padding" style="padding-left: 25px !important"> + <?php foreach ($element["addresses"] as $ix => $p) { ?> + <span id="addresses_<?php echo $ix ; ?>"> + <span> + <?php + $address = '<span id="detailAddress_'.$ix.'"> '. + (( @$p["address"]["streetAddress"]) ? + $p["address"]["streetAddress"]."<br/>": + ((@$p["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality"))); + $address .= (( @$p["address"]["postalCode"]) ? + $p["address"]["postalCode"].", " : + "") + ." ".(( @$p["address"]["addressLocality"]) ? + $p["address"]["addressLocality"] : "") ; + $address .= (( @$p["address"]["addressCountry"]) ? + ", ".OpenData::$phCountries[ $p["address"]["addressCountry"] ] + : ""). + '</span>'; + echo $address; + ?> + + <?php if( $edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ) { ?> + <a href='javascript:removeAddresses("<?php echo $ix ; ?>");' class="addresses pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Remove Locality");?>"><i class="fa text-red fa-trash-o"></i></a> + <a href='javascript:updateLocalityEntities("<?php echo $ix ; ?>", <?php echo json_encode($p);?>);' class=" pull-right pull-right tooltips margin-right-15" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Locality");?>"><i class="fa text-red fa-map-marker addresses"></i></a></span> + <?php } ?> + </span> + <hr/> + <?php } ?> + </div> + <?php } ?> + <div class="text-right padding-10"> + <?php if(empty($element["address"]) && $type!=Person::COLLECTION && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )){ ?> + <b><a href="javascript:;" class="btn btn-default letter-blue margin-top-5 addresses btn-update-geopos"> + <i class="fa fa-map-marker"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add a primary address") ; ?></span> + </a></b> + <?php } + if($type!=Person::COLLECTION && !empty($element["address"]) && ($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) )) { ?> + <b><a href='javascript:updateLocalityEntities("<?php echo count(@$element["addresses"]) ; ?>");' id="btn-add-geopos" class="btn btn-default letter-blue margin-top-5 addresses" style="margin: 10px 0px;"> + <i class="fa fa-plus" style="margin:0px !important;"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add an address"); ?></span> + </a></b> + <?php } ?> + </div> + </div> +<div id="ficheInfo" class="panel panel-white col-lg-12 col-md-12 col-sm-12 no-padding contentInformation"> + + <div class="panel-heading border-light col-lg-12 col-md-12 col-sm-12 col-xs-12" style="background-color: #dee2e680;"> + <h4 class="panel-title text-dark pull-left"> + <i class="fa fa-paraph"></i> <?php echo Yii::t("common","Description") ?> + </h4> + <?php if($edit==true || ( $openEdition==true && Yii::app()->session["userId"] != null ) ){?> + <button class="btn-update-descriptions btn btn-default letter-blue pull-right tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("common","Update description") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> + </div> + <div class="panel-body no-padding"> + <div class="col-md-12 col-sm-12 col-xs-12 contentInformation no-padding"> + <div class="col-md-8 col-sm-8 col-xs-12 valueAbout padding-10" + style="word-wrap: break-word; overflow:hidden;"> + <span id="descriptionMarkdown" name="descriptionMarkdown" class="hidden" ><?php echo (!empty($element["description"])) ? $element["description"] : ""; ?></span> + <div id="descriptionAbout"><?php echo (@$element["description"]) ? $element["description"] : '<i>'.Yii::t("common","Not specified").'</i>'; ?> + </div> + </div> + </div> + </div> +</div> + +</div> +<?php $cssAnsScriptFilesModule = array( + '/js/default/profilSocial.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> + +<script type="text/javascript"> + + var formatDateView = "DD MMMM YYYY à HH:mm" ; + var formatDatedynForm = "DD/MM/YYYY HH:mm" ; + + jQuery(document).ready(function() { + bindDynFormEditableTerla(); + initDate(); + initDescs(); + initOpeningHours(); + //changeHiddenFields(); + //bindAboutPodElement(); + + $("#small_profil").html($("#menu-name").html()); + $("#menu-name").html(""); + + $(".cobtn").click(function () { + communecterUser(); + }); + + $(".btn-update-geopos").click(function(){ + updateLocalityEntities(); + }); + + $("#btn-add-geopos").click(function(){ + updateLocalityEntities(); + }); + + $("#btn-update-organizer").click(function(){ + updateOrganizer(); + }); + $("#btn-add-organizer").click(function(){ + updateOrganizer(); + }); + + $("#btn-remove-geopos").click(function(){ + removeAddress(); + }); + + $("#btn-update-geopos-admin").click(function(){ + findGeoPosByAddress(); + }); + + //console.log("contextDatacontextData", contextData, contextData.type,contextData.id); + //buildQRCode(contextData.type,contextData.id.$id); + + }); + + function initDate() {//DD/mm/YYYY hh:mm + //moment.locale('fr'); + if( (typeof contextData.allDay != "undefined" && contextData.allDay == true) || contextData.type == "<?php //echo Project::COLLECTION; ?>" ) { + formatDateView = "DD MMMM YYYY" ; + formatDatedynForm = "DD/MM/YYYY" ; + }else{ + formatDateView = "DD MMMM YYYY à HH:mm" ; + formatDatedynForm = "DD/MM/YYYY HH:mm" ; + } + + if( typeof contextData.startDate != "undefined" && contextData.startDate != "" ){ + $("#divStartDate").removeClass("hidden"); + $("#divNoDate").addClass("hidden"); + } + else{ + $("#divStartDate").addClass("hidden"); + $("#divNoDate").removeClass("hidden"); + } + + if( typeof contextData.endDate != "undefined" && contextData.endDate != "" ) + $("#divEndDate").removeClass("hidden"); + else + $("#divEndDate").addClass("hidden"); + mylog.log("formatDateView", formatDateView); + if($("#startDateAbout").html() != "") + $("#startDateAbout").html(moment(contextData.startDateDB).local().locale(mainLanguage).format(formatDateView)); + if($("#endDateAbout").html() != "") + $("#endDateAbout").html(moment( contextData.endDateDB).local().locale(mainLanguage).format(formatDateView)); + + if($("#birthDate").html() != "") + $("#birthDate").html(moment($("#birthDate").html()).local().locale(mainLanguage).format("DD/MM/YYYY")); + $('#dateTimezone').attr('data-original-title', "Fuseau horaire : GMT " + moment().local().format("Z")); + } + + + function initDescs() { + mylog.log("initDescs"); + if(edit == true || openEdition== true) + descHtmlToMarkdown(); + mylog.log("after"); + mylog.log("initDescs", $("#descriptionMarkdown").html()); + var descHtml = "<i>"+trad.notSpecified+"</i>"; + if($("#descriptionMarkdown").html().length > 0){ + descHtml = dataHelper.markdownToHtml($("#descriptionMarkdown").html()) ; + } + + $("#descriptionAbout").html(descHtml); + $("#descProfilsocial").html(descHtml); + mylog.log("descHtml", descHtml); + } + + function initOpeningHours() { + mylog.log("initOpeningHours"); + var html = "" ; + mylog.log("initOpeningHours contextData.openingHours", contextData.openingHours); + if(notNull(contextData.openingHours) ){ + + $.each(contextData.openingHours, function(i,data){ + mylog.log("initOpeningHours data", data, data.allDay, notNull(data)); + mylog.log("initOpeningHours notNull data", notNull(data), typeof data, data.length); + if( (typeof data == "object" && notNull(data) ) || (typeof data == "string" && data.length > 0) ) { + var day = "" ; + if(data.allDay == "true"){ + day = moment().day(i).local().locale(mainLanguage).format("dddd")+" : "+trad.allDay+"<br/>"; + }else { + mylog.log("initOpeningHours data.hours", data.hours); + day = moment().day(i).local().locale(mainLanguage).format("dddd")+" : <br/>"; + day += "<ul>"; + $.each(data.hours, function(i,hours){ + mylog.log("initOpeningHours hours", hours); + day += "<li>"+hours.opens+" : "+hours.closes+"</li>"; + }); + day += "</ul>"; + } + + if( moment().format("dd") == data.dayOfWeek ) + html += "<b>"+day+"</b>"; + else + html += day; + } + + }); + + } else + html = '<i>'+trad.notSpecified+'</i>'; + + $("#openingHours").html(html); + } + + + +</script> \ No newline at end of file diff --git a/views/element/terla/associated.php b/views/element/terla/associated.php new file mode 100644 index 0000000000000000000000000000000000000000..fd3e85e0f5d4be8db969726688094be5e33e8190 --- /dev/null +++ b/views/element/terla/associated.php @@ -0,0 +1,66 @@ +<div class="col-xs-12 associated margin-bottom-15"> + + <div class="col-xs-4 col-sm-3 text-right letter-lightgray"><h5>Associated product</h5></div> + <div class="col-xs-4 col-sm-7"><hr></div> + <div class="col-xs-4 col-sm-2 text-left"> + <button class="btn btn-link letter-lightgray bg-lightgray"><i class="fa fa-chevron-left"></i></button> + <button class="btn btn-link letter-lightgray bg-lightgray"><i class="fa fa-chevron-right"></i></button> + </div> + + <div class="col-xs-12 margin-top-25"> + <div class="col-sm-6 col-md-3 text-center"> + <div class="col-xs-12 no-padding entity shadow2"> + <a href="#" class="col-md-12 no-padding margin-bottom-10"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" + alt="Generic placeholder thumbnail" class="img-responsive"> + </a> + <div class="col-md-12 content-desc"> + <h4 class="letter-lightgray">Title</h4> + <p>Ut dictum elit a magna tincidunt ornare. Praesent volutpat amet diam non iaculis. Vestibulum id velit pulvinar, aliquam fermentum neque.</p> + <a href="#" class="btn bg-orange btn-sm bold letter-white">See +</a> + </div> + </div> + </div> + + <div class="col-sm-6 col-md-3 text-center"> + <div class="col-xs-12 no-padding entity shadow2"> + <a href="#" class="col-md-12 no-padding margin-bottom-10"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" + alt="Generic placeholder thumbnail" class="img-responsive"> + </a> + <div class="col-md-12 content-desc"> + <h4 class="letter-lightgray">Title</h4> + <p>Ut dictum elit a magna tincidunt ornare. Praesent volutpat amet diam non iaculis. Vestibulum id velit pulvinar, aliquam fermentum neque.</p> + <a href="#" class="btn bg-orange btn-sm bold letter-white">See +</a> + </div> + </div> + </div> + <div class="col-sm-6 col-md-3 text-center"> + <div class="col-xs-12 no-padding entity shadow2"> + <a href="#" class="col-md-12 no-padding margin-bottom-10"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" + alt="Generic placeholder thumbnail" class="img-responsive"> + </a> + <div class="col-md-12 content-desc"> + <h4 class="letter-lightgray">Title</h4> + <p>Ut dictum elit a magna tincidunt ornare. Praesent volutpat amet diam non iaculis. Vestibulum id velit pulvinar, aliquam fermentum neque.</p> + <a href="#" class="btn bg-orange btn-sm bold letter-white">See +</a> + </div> + </div> + </div> + <div class="col-sm-6 col-md-3 text-center"> + <div class="col-xs-12 no-padding entity shadow2"> + <a href="#" class="col-md-12 no-padding margin-bottom-10"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" + alt="Generic placeholder thumbnail" class="img-responsive"> + </a> + <div class="col-xs-12 content-desc"> + <h4 class="letter-lightgray">Title</h4> + <p>Ut dictum elit a magna tincidunt ornare. Praesent volutpat amet diam non iaculis. Vestibulum id velit pulvinar, aliquam fermentum neque.</p> + <a href="#" class="btn bg-orange btn-sm bold letter-white">See +</a> + </div> + </div> + </div> + </div> + +</div> \ No newline at end of file diff --git a/views/element/terla/dashboard.php b/views/element/terla/dashboard.php new file mode 100644 index 0000000000000000000000000000000000000000..a5e3e24f41cdd9d1381d3eef9f946133648e6521 --- /dev/null +++ b/views/element/terla/dashboard.php @@ -0,0 +1,251 @@ +<?php +HtmlHelper::registerCssAndScriptsFiles( + array( + '/js/comments.js', + ) , + Yii::app()->theme->baseUrl. '/assets'); +$cssAnsScriptFilesTheme = array( + '/plugins/jquery-bar-rating/jquery.barrating.js', + '/plugins/font-awesome/css/font-awesome.min.css', + '/plugins/jquery-bar-rating/fontawesome-stars.css', + '/plugins/jquery-bar-rating/fontawesome-stars-o.css' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> +<style type="text/css"> + .headerTitleStanalone{ + padding-top: 20px; + padding-right: 50px; + left:-25px; + right:-25px; + top:99px; + } + .headerTitleStanalone span{ + padding-top: 5px; + } + .contentOnePage{ + margin-top: 135px; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + } + .podDash{ + margin-top: 40px; + } + .podDash .nav{ + display: inline-block; + display: -webkit-inline-box; + height: 50px; + display: inline-block; + display: -webkit-inline-box; + /*position: absolute;*/ + } + .podDash .nav-item{ + text-transform: uppercase; + font-size: 18px; + font-weight: 600; + border-top: 5px solid lightgray; + margin-right: 5px; + position: relative; + } + .podDash .nav-item.active{ + border-top: 5px solid #EF5B34; + box-shadow: 0 9px 0px 0px white, + 0 9px 0px 0px white, + 0px 0px 10px -1px rgba(0,0,0,0.5), + 0px 0px 10px -1px rgba(0,0,0,0.5); + z-index: 1; + height: 55px; + margin-top: -5px; + padding-top: 5px; + background-color: white; + } + .podDash .content-view-dashboard{ + min-height: 300px; + -webkit-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + -moz-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + /*position: absolute; + top: 50px;*/ + + } + .emptySpan{ + height:400px; + } + .emptySpan span{ + font-size: 32px; + color: lightgrey; + font-weight: bolder; + font-family: monospace; + padding-top: 100px; + font-style: italic; + font-variant: small-caps; + } + .br-theme-fontawesome-stars-o .br-widget a{ + font-size: 35px; + } + #guestBookComment .footer-comments{ + background-color: inherit; + } + #guestBookComment .footer-comments .item-comment{ + width: 50%; + } + + #guestBookComment .footer-comments .item-comment img{ + height: 50px !important; + } +</style> +<div class="headerTitleStanalone"> + <span class="pull-left">Dashboard of your <?php echo $type ?> : <?php echo $element["name"] ?></span> + <!-- BUTTON FOR PROFESSIONAL USER USING + <a href="#page.type.<?php echo Person::COLLECTION ?>.id.<?php echo Yii::app()->session["userId"] ?>.view.prolist" class="lbh btn bg-white margin-left-10 pull-right"> + <i class="fa fa-sign-out"></i> Back to my account</a>--> + + <!-- BUTTON FOR ADMIN MANAGAGE --> + <?php if(@Yii::app()->session["userIsAdmin"]){ ?> + <a href="#admin.view.services" class="lbh btn bg-white margin-left-10 pull-right"> + <i class="fa fa-sign-out"></i> Back to service list</a> + <?php } ?> + <a href="#page.type.<?php echo $type ?>.id.<?php echo (string)$element["_id"] ?>.view.show" class="lbhp btn bg-dark margin-left-10 pull-right" data-modalshow="<?php echo (string)$element["_id"] ?>"> + <i class="fa fa-eye"></i> Preview</a> +</div> + +<div class="col-md-10 col-md-offset-1 contentOnePage"> + <?php if(@$element["toBeValidated"]){ ?> + <div class="col-md-12 no-padding margin-bottom-10 margin-top-10"> + <div class="col-md-12 alert alert-warning text-center"> + <p class="no-margin"> + This product is waiting for validation of our team ! + </p> + </div> + </div> + <?php } ?> + <div class="podDash col-md-12 col-sm-12 col-xs-12"> + <ul class="nav pull-left"> + <li class="nav-item active"> + <a class="nav-link" href="javascript:;" id="btn-detail"><?php echo Yii::t("common","Infos") ?></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="javascript:;" id="btn-message"><?php echo Yii::t("common","Manage buy") ?></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="javascript:;" id="btn-history"><?php echo Yii::t("common","Historic") ?></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="javascript:;" id="btn-backup"><?php echo Yii::t("common","Record") ?></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="javascript:;" id="btn-guestbook"><?php echo Yii::t("common","Guestbook") ?></a> + </li> + </ul> + <div class="content-view-dashboard col-md-12 col-sm-12 col-xs-12 margin-bottom-20 padding-10 bg-white"> + </div> + + </div> + +</div> +<script type="text/javascript"> + var contextData = <?php echo json_encode( Element::getElementForJS(@$element, @$type) ); ?>; + var edit=true; + var subView="<?php echo @$_GET['view']; ?>"; + var hashUrlPage = "#page.type."+contextData.type+".id."+contextData.id; + jQuery(document).ready(function() { + bindButtonMenu(); + getProfilSubview(subView); + KScrollTo("#topPosKScroll"); + }); + function getProfilSubview(sub, dir){ console.log("getProfilSubview", sub, dir); + if(sub!=""){ + if(sub=="message") + loadMessage(); + else if(sub=="history") + loadHistory(); + else if(sub=="record") + loadBackup(); + else if(sub=="guestbook") + loadGuestbook(); + } else + loadDetail(true); + } + function bindButtonMenu(){ + $("#btn-detail").click(function(){ + location.hash=hashUrlPage; + loadDetail(); + }); + $("#btn-guestbook").click(function(){ + location.hash=hashUrlPage+".view.guestbook"; + loadGuestbook(); + }); + } + function loadDetail(){ + initBtnDash("#btn-detail"); + var url = "element/about/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url+'?tpl=ficheInfoElement', null, function(){},"html"); + } + function loadGuestbook(){ + initBtnDash("#btn-guestbook"); + showLoader('.content-view-dashboard'); + str=getPanelGuestbook(); + $(".content-view-dashboard").html(str); + if(typeof contextData.averageRating != "undefined"){ + ajaxPost("#guestBookComment",baseUrl+"/"+moduleId+"/comment/index/type/"+contextData.type+"/id/"+contextData.id, + {"filters": ["rating"]}, + function(){ + $(".container-txtarea").hide(); + },"html"); + + $("#ratingElement").barrating({ + theme: 'fontawesome-stars-o', + 'readonly': true, + initialRating: contextData.averageRating + }); + } + } + function showLoader(id){ + $(id).html("<center><i class='fa fa-spin fa-refresh margin-top-50 fa-2x'></i></center>"); + } + function inintDescs() { + return true; + } + function initBtnDash(dom){ + $(".podDash .nav .nav-item").removeClass("active"); + $(dom).parent().addClass("active"); + } + function descHtmlToMarkdown() { + mylog.log("htmlToMarkdown"); + } + function getPanelGuestbook() { + html="<div class='col-md-12 col-sm-12 text-center'>"; + if(typeof contextData.averageRating != "undefined"){ + html+= "<div class='col-md-6 col-sm-6 col-md-offset-3 col-sm-offset-3 text-center margin-bottom-20'>"+ + "<h4 class='letter-blue-1'>Average rating of your product</h4>"+ + "<div class='br-wrapper br-theme-fontawesome-stars-o'>"+ + "<select id='ratingElement' class='ratingComments'>"+ + '<option value="1">1</option>'+ + '<option value="2">2</option>'+ + '<option value="3">3</option>'+ + '<option value="4">4</option>'+ + '<option value="5">5</option>'+ + "</select>"+ + "</div>"+ + "<span class='letter-orange' style='font-size:30px;'>"+contextData.averageRating+"</span>"+ + "</div>"+ + "<div id='guestBookComment' class='col-md-12 col-sm-12'></div>"; + }else + html+=getEmptyView("rating"); + html+= "</div>" + return html; + } + function getEmptyView(type) { + html="<div class='col-md-6 col-sm-6 col-md-offset-3 col-sm-offset-3 emptySpan'>"+ + "<span class='pull-left'>"; + if(type=="rating") + html+= "There is <br/>No comment and rating <br/>for this product"; + html+= "</span>"+ + "</div>"; + return html; + } +</script> \ No newline at end of file diff --git a/views/element/terla/index.php b/views/element/terla/index.php new file mode 100644 index 0000000000000000000000000000000000000000..d575587e1cc39a4fee73ddc3faf6ce39d8a5bbb1 --- /dev/null +++ b/views/element/terla/index.php @@ -0,0 +1,244 @@ + +<style type="text/css"> + .headerTitleStanalone{ + left:-25px; + right:0px; + top:99px; + } + .contentOnePage{ + margin-top: 135px; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + } + .podDash .nav{ + display: inline-block; + display: -webkit-inline-box; + height: 50px; + display: inline-block; + display: -webkit-inline-box; + /*position: absolute;*/ + } + .podDash .nav-item{ + text-transform: uppercase; + font-size: 18px; + font-weight: 600; + border-top: 5px solid lightgray; + margin-right: 5px; + position: relative; + } + .podDash .nav-item.active{ + border-top: 5px solid #EF5B34; + box-shadow: 0 9px 0px 0px white, + 0 9px 0px 0px white, + 0px 0px 10px -1px rgba(0,0,0,0.5), + 0px 0px 10px -1px rgba(0,0,0,0.5); + z-index: 1; + height: 55px; + margin-top: -5px; + padding-top: 5px; + background-color: white; + } + .podDash .content-view-dashboard{ + margin-bottom:150px !important; + min-height: 300px; + -webkit-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + -moz-box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + box-shadow: 0px 0px 10px 1px rgba(0,0,0,0.5); + /*position: absolute; + top: 50px;*/ + + } +</style> +<div class="headerTitleStanalone"> + <span><?php echo Yii::t("terla", "My Dashboard"); ?></span> + <?php if(!@$element["professional"]){ ?> + <!--<button class="createPro bg-orange"><?php echo Yii::t("terla", "Create a professional account"); ?></button>--> + <?php } ?> + <?php if(!@Yii::app()->session["superAdmin"]){ ?> + <a href="#admin" class="lbh btn bg-white margin-right-20 pull-right"> + <i class="fa fa-sign-in"></i> <?php echo Yii::t("terla", "Portal administor"); ?></a> + <?php } ?> +</div> +<div class="col-md-10 col-md-offset-1 contentOnePage"> + <div class="col-md-12 margin-bottom-50 margin-top-50 blockHome1"> + <div class="col-md-12 bg-lightgray margin-top-50"> + <h2 class="block no-margin letter-lightgray">Headline</h2> + <div class="col-md-10 no-padding"> + <span> + Suspendisse feugiat dui magna, vel molestie mauris porttitor quis. Vivamus et enim felis tincidunt nisi pulvinar mi. + </span> + </div> + <div class="col-md-2"> + <a href="javascript:;" class="btn bg-orange"><b><?php echo Yii::t("terla", "VIEW MORE"); ?></b></a> + </div> + </div> + </div> + <div class="podDash col-md-12 margin-top-20"> + <ul class="nav pull-left"> + <li class="nav-item active"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-detail"> + <?php echo Yii::t("common","My infos") ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-message"> + <?php echo Yii::t("common","My messages") ?> + </a> + </li> + <li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-history"> + <?php echo Yii::t("common","My circuits") ?> + </a> + </li> + <!--<li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-backup"> + <?php echo Yii::t("common","Backup") ?> + </a> + </li>--> + <li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-invoice"> + <?php echo Yii::t("common","Invoice") ?> + </a> + </li> + <?php if(@$element["professional"]){ ?> + <!--<li class="nav-item"> + <a class="nav-link letter-lightgray" href="javascript:;" id="btn-list-pro"> + <?php echo Yii::t("common","Pro listing") ?> + </a> + </li>--> + <?php } ?> + </ul> + <div class="content-view-dashboard col-md-12 col-sm-12 col-xs-12 margin-bottom-20 padding-10 bg-white"> + </div> + </div> +</div> + +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial($layoutPath.'footer', array("subdomain"=>"page")); +?> + +<script type="text/javascript"> + var contextData = <?php echo json_encode( Element::getElementForJS(@$element, @$type) ); ?>; + var edit=true; + var hashUrlPage = "#page.type."+contextData.type+".id."+contextData.id; + var subView="<?php echo @$_GET['view']; ?>"; + jQuery(document).ready(function() { + //loadDetail(true); + $(".createPro").click(function(){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/updatefield', + data:{pk:userId,name:"professional", value:true}, + success: function(data){ + goProAccount(); + } + }); + }); + bindButtonMenu(); + getProfilSubview(subView); + KScrollTo("#topPosKScroll"); + }); + function goProAccount(){ + urlCtrl.loadByHash("#page.type.citoyens.id."+contextData.id+".view.pro"); + } + function getProfilSubview(sub, dir){ console.log("getProfilSubview", sub, dir); + if(sub!=""){ + if(sub=="message") + loadMessage(); + else if(sub=="history") + loadHistory(); + else if(sub=="backup") + loadBackup(); + else if(sub=="invoice") + loadInvoice(); + else if(sub=="prolist"){ + loadListPro(); + } + } else + loadDetail(true); + } + function bindButtonMenu(){ + /*$(".nav-link").click(function(){ + $(".podDash .nav .nav-item").removeClass("active"); + $(this).parent().addClass("active"); + });*/ + + $("#btn-detail").click(function(){ + location.hash=hashUrlPage; + loadDetail(); + }); + $("#btn-list-pro").click(function(){ + location.hash=hashUrlPage+".view.prolist"; + loadListPro(); + }); + + $("#btn-history").click(function(){ + location.hash=hashUrlPage+".view.history"; + loadHistory(); + }); + $("#btn-backup").click(function(){ + location.hash=hashUrlPage+".view.backup"; + loadBackup(); + }); + + $("#btn-invoice").click(function(){ + location.hash=hashUrlPage+".view.invoice"; + loadInvoice(); + }); + } + + function loadDetail(){ + initBtnDash("#btn-detail"); + var url = "element/about/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, null, function(){},"html"); + } + + function loadListPro(){ + initBtnDash("#btn-list-pro"); + data={category:["services","products"],actionType:"manage"}; + var url = "element/list/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function loadHistory(){ + initBtnDash("#btn-history"); + data={category:["orders"],actionType:"history"}; + var url = "element/list/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + function loadBackup(){ + initBtnDash("#btn-backup"); + data={category:["backups"],actionType:"backup"}; + var url = "element/list/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, data, function(){},"html"); + } + + function loadInvoice(){ + initBtnDash("#btn-invoice"); + var url = "element/invoice/type/"+contextData.type+"/id/"+contextData.id; + showLoader('.content-view-dashboard'); + ajaxPost('.content-view-dashboard', baseUrl+'/'+moduleId+'/'+url, null, function(){},"html"); + } + + function showLoader(id){ + $(id).html("<center><i class='fa fa-spin fa-refresh margin-top-50 fa-2x'></i></center>"); + } + + function inintDescs() { + return true; + } + function initBtnDash(dom){ + $(".podDash .nav .nav-item").removeClass("active"); + $(dom).parent().addClass("active"); + } + function descHtmlToMarkdown() { + mylog.log("htmlToMarkdown"); + } +</script> \ No newline at end of file diff --git a/views/element/terla/invoice.php b/views/element/terla/invoice.php new file mode 100644 index 0000000000000000000000000000000000000000..f880ff7b0d33885244c3327455765af6c8d31415 --- /dev/null +++ b/views/element/terla/invoice.php @@ -0,0 +1,138 @@ +<?php +$cs = Yii::app()->getClientScript(); +$cssAnsScriptFilesModule = array( + //'/plugins/JSzip/jszip.min.js', + '/plugins/FileSaver.js/FileSaver.min.js', + //'/assets/js/sig/geoloc.js', + /*'/assets/js/dataHelpers.js', + '/assets/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css', + '/assets/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js'*/ +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); +?> +<style type="text/css"> + .contentListItem:nth-child(2n+1){ + background-color: white; + } + .contentListItem:nth-child(2n){ + background-color: lightgray; + } + .contentListItem:nth-child(2n) .contentImg{ + background-color: white; + color:lightgray; + } + .contentListItem:nth-child(2n+1) .contentImg{ + background-color: lightgray; + color:white; + } + .contentListItem .contentImg{ + min-height: 100px; + line-height: 100px; + } + .contentListItem .contentImg > i { + vertical-align: middle; + } + .contentListItem .contentImg > img { + height:100px; + } + .contentListItem .linkBtnList{ + position: absolute; + right: 30px; + bottom: 10px; + min-width: 170px; + border-radius: 2px; + padding: 5px; + } + .headerList h4{ + font-size: 20px; + } + + .headerList p{ + font-size: 18px; + } + .contentRatingComment textarea{ + min-height: 100px; + } + #columnList{ + bottom: 0px; + list-style: none; + border-right: 1px solid rgba(0,0,0,0.1); + min-height: 300px + } + #columnList li:hover{ + cursor:pointer; + background-color:rgba(0,0,0,0.1); + border-left: 4px solid #FF9E85; + } + #columnList li{ + border-left: 4px solid white; + } + /*#orderList li.active:hover{ + background-color: yellow; + }*/ + .columnSection .title{ + font-size: 18px; + font-weight: 100; + text-transform: inherit; + } + #columnList li.active{ + border-left: 4px solid #EF5B34; + /*font-weight: bold; + font-size: 20px;*/ + } +</style> + + +<div class="headerList col-md-12 col-sm-12 no-padding margin-bottom-20 margin-top-20"> + <div class="col-md-12 col-sm-12 text-center"> + <h4 class="col-md-12 letter-orange">List of invoices</h2> + </div> + <ul id="columnList" class="col-md-3 col-sm-3 col-xs-3 no-padding"> + <?php + foreach ($invoices as $key => $value){ ?> + <li class="columnSection padding-10" data-id="<?php echo $key ?>"> + <h4 class="title no-margin"> + <a href='<?php echo Yii::app()->createUrl("/".$this->module->id."/pdf/create/id/".$key) ; ?>' target="_TARGET" > + <i class='fa fa-file-pdf-o'></i> <?php echo $value["name"] ?> + </a> + </h4> + </li> + <?php + } ?> + </ul> + <div id="pdfInvoice" class="col-md-9 col-sm-9 col-xs-9 pull-right"> + + </div> +</div> + +<script type="text/javascript"> + +var orders = <?php echo json_encode(@$orders); ?>; + +jQuery(document).ready(function() { + +}); + + +function pdf(id){ + var params = { + order : orders[id], + person : contextData + }; + + $.ajax({ + type: 'POST', + data: params, + url: baseUrl+'/'+moduleId+'/pdf/create', + dataType : 'json', + async : false, + success: function(data){ + mylog.log("stepTwo data",data); + saveAs(data, "StandardForCommunecter.pdf"); + } + }); + + //ajaxPost('#pdfInvoice', baseUrl+'/'+moduleId+'/pdf/create', params, function(){},"html"); +} + +</script> \ No newline at end of file diff --git a/views/element/terla/list.php b/views/element/terla/list.php new file mode 100644 index 0000000000000000000000000000000000000000..0203aa3ee33646f1ef2ee0ce5eee678aab7ff11d --- /dev/null +++ b/views/element/terla/list.php @@ -0,0 +1,357 @@ +<?php + +HtmlHelper::registerCssAndScriptsFiles( + array( + '/js/comments.js', + ) , + Yii::app()->theme->baseUrl. '/assets'); +$cssAnsScriptFilesTheme = array( + '/plugins/jquery-bar-rating/jquery.barrating.js', + '/plugins/font-awesome/css/font-awesome.min.css', + '/plugins/jquery-bar-rating/fontawesome-stars.css' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> +<style type="text/css"> + .contentListItem:nth-child(2n+1){ + background-color: white; + } + .contentListItem:nth-child(2n){ + background-color: lightgray; + } + .contentListItem:nth-child(2n) .contentImg{ + background-color: white; + color:lightgray; + } + .contentListItem:nth-child(2n+1) .contentImg{ + background-color: lightgray; + color:white; + } + .contentListItem .contentImg{ + min-height: 100px; + line-height: 100px; + } + .contentListItem .contentImg > i { + vertical-align: middle; + } + .contentListItem .contentImg > img { + height:100px; + } + .contentListItem .linkBtnList{ + position: absolute; + right: 0px; + bottom: 10px; + min-width: 170px; + border-radius: 2px; + padding: 5px; + } + .headerList h4{ + font-size: 20px; + } + + .headerList p{ + font-size: 18px; + } + .contentRatingComment textarea{ + min-height: 100px; + } + #columnList{ + bottom: 0px; + list-style: none; + border-right: 1px solid rgba(0,0,0,0.1); + min-height: 300px + } + #columnList li:hover{ + cursor:pointer; + background-color:rgba(0,0,0,0.1); + border-left: 4px solid #FF9E85; + } + #columnList li{ + border-left: 4px solid white; + } + /*#orderList li.active:hover{ + background-color: yellow; + }*/ + .columnSection .title{ + font-size: 18px; + font-weight: 100; + text-transform: inherit; + } + #columnList li.active{ + border-left: 4px solid #EF5B34; + /*font-weight: bold; + font-size: 20px;*/ + } +</style> +<?php if($actionType=="manage"){ ?> +<div class="headerList col-md-12 col-sm-12 no-padding margin-bottom-20 margin-top-20"> + <div class="col-md-12 col-sm-12 text-center"> + <h4 class="col-md-12 letter-orange">Add products and services you want to offered</h4> + <p> + These products and services will be validated by the team of terla + </p> + <button data-form-type="product" + data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-4 col-md-4 col-sm-offset-2 col-md-offset-2 col-lg-4 text-orange"> + <h5><i class="fa fa-shopping-basket fa-2x"></i><br> <?php echo Yii::t("common", "Product") ?></h5> + <small><?php echo Yii::t("form","Food, hand-made, jewelery...<br>Sell your product here") ?></small> + </button> + <button data-form-type="service" data-form-subtype="" + data-dismiss="modal" + class="btn btn-link btn-open-form col-xs-6 col-sm-4 col-md-4 col-lg-4 text-green"> + <h5><i class="fa fa-sun-o fa-2x"></i><br> <?php echo Yii::t("common", "Services") ?></h5> + <small><?php echo Yii::t("form","Hostel, funny activity, food, guide...<br>Purpose your services here !") ?></small> + </button> + </div> +</div> +<?php } ?> +<?php if(($actionType=="history" || $actionType=="backup" || $actionType=="admin")){ + if(empty($parentList)){ ?> + <div id="headerList" class="col-md-12 col-sm-12 col-xs-12 margin-bottom-20"> + <?php echo Yii::t("common","You have nothing in this section") ?> + </div> + <?php }else{ ?> + <ul id="columnList" class="col-md-3 col-sm-3 col-xs-3 no-padding"> + + <?php $i=0; + foreach ($parentList as $key => $value){ + if($i==0){ + $nameHeader=@$value["name"]; + $priceHeader=@$value["totalPrice"]; + $currencyHeader=@$value["currency"]; + if(@$value["countOrderItem"]){ + $countHeader=$value["countOrderItem"]; + $circuitId=$value["circuit"]; + }else{ + $firstId=$key; + if(@$subType && $subType==Circuit::COLLECTION && $actionType!="backup") + $countHeader=$value["countQuantity"]; + else + $countHeader=$value["object"]["countQuantity"]; + } + } + + if(@$value["countOrderItem"]) + $count=$value["countOrderItem"]; + else if(@$subType && $subType==Circuit::COLLECTION && $actionType!="backup") + $count=$value["countQuantity"]; + else + $count=$value["object"]["countQuantity"]; + ?> + <li class="columnSection <?php if($i==0) echo "active" ?> columnSection<?php echo $key ?> padding-10" data-id="<?php echo $key ?>"> + <h4 class="title no-margin"><?php if($actionType == "backup" && $subType == Circuit::COLLECTION) echo $value["object"]["name"]; else echo $value["name"]; ?></h4> + <span><i><?php echo $count; ?> purchase<?php if ($count >1) echo "s" ?></i></span> + </li> + <?php $i++; + } ?> + </ul> + <?php if(!@$subType || $subType!=Circuit::COLLECTION){ ?> + <div id="headerList" class="col-md-9 col-sm-9 col-xs-9 margin-bottom-20"> + <h4 class="col-md-12 col-sm-12 title no-padding letter-orange"><?php echo $nameHeader ?></h4> + <?php if($actionType=="history"){ ?> + <br/> + <a href='#circuit.index.id.<?php echo $circuitId ?>.tpl.show' data-modalshow="$circuitId" + class="lbhp btn bg-orange pull-right" id="programView"> + <?php echo Yii::t("common", "Show programmation") ?> + </a> + <?php } ?> + + <span> + <?php echo Yii::t("common", "Price of this command") ?> : + <span class="price"><?php echo $priceHeader ?> <?php echo $currencyHeader ?></span> + </span> + + <a href="<?php echo Yii::app()->createUrl('/co2/pdf/create/id/'.$key) ;?>" target="_blank"> + <i class='fa fa-file-pdf-o'></i> + </a><br/> + + <span class="purchases"> + <i><?php echo $countHeader; ?> <?php echo Yii::t("common", "purchase") ?> + <?php if ($countHeader >1) echo "s" ?> + </i> + </span> + + <?php if($actionType=="backup") { ?> + <div class="pull-right"> + <a href="javascript:;" id="goBackToThisCart" class="btn btn-success" data-id="<?php echo $key ?>"> + <?php echo Yii::t("common", "Continue this cart") ?> + </a> + <a href="javascript:;" id="deleteBackup" class="btn btn-danger" data-id="<?php echo $key ?>"> + <?php echo Yii::t("common", "Delete") ?> + </a> + </div> + <?php } ?> + </div> + <?php } ?> + <div id="listList" class="col-md-9 col-sm-9 col-xs-9 pull-right"> + + </div> +<?php } + } else { ?> + <div id="listList" class="col-md-12 col-sm-12"> + + </div> +<?php }?> + <script type="text/javascript"> + var type = "<?php echo $type; ?>"; + var id = "<?php echo $id; ?>"; + var view = "<?php echo @$view; ?>"; + var indexStepGS = 20; + var actionType="<?php echo $actionType ?>"; + var subType="<?php echo @$subType ?>"; + var parentList= <?php echo json_encode( @$parentList ); ?>; + console.log("parentlist",parentList); + if(notEmpty(parentList) && (actionType=="backup" || subType=="circuits")){ + if(actionType=="backup") + var listComponents = parentList["<?php echo @$firstId ?>"].object; + else if (subType=="circuits") + var listComponents = parentList["<?php echo @$firstId ?>"]; + }else + var listComponents = <?php echo json_encode( $list ); ?>; + jQuery(document).ready(function() { + if(notEmpty(listComponents)){ + if(subType=="circuits") + getViewCircuit(listComponents, "<?php echo @$firstId ?>"); + else + list.initList(listComponents, actionType); + } + bindListEvent(); + + }); + function bindListEvent(){ + $(".btn-open-form").click(function(){ + dyFObj.openForm($(this).data("form-type"),"sub"); + }); + bindLBHLinks(); + if(actionType=="history" || actionType=="backup" || subType=="circuits") + initOrderEvent(); + if(actionType=="backup") + initBackupEvent(); + } + function initOrderEvent(){ + $(".columnSection").off().on("click",function(){ + showLoader('#listList'); + $(".columnSection").removeClass("active"); + $(this).addClass("active"); + parentId=$(this).data("id"); + if(subType!="circuits"){ + $("#headerList .title").text(parentList[parentId].name); + $("#headerList .price").text(parentList[parentId].totalPrice+" "+parentList[parentId].currency); + s=(parentList[parentId].countOrderItem > 1) ? "s": ""; + $("#headerList .purchases").text(parentList[parentId].countOrderItem+" purchase"+s); + if(actionType=="history") + $("#headerList #programView").attr("href", "#circuit.index.id."+parentList[parentId].circuit); + } + if(actionType=="history"){ + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/order/get/id/"+parentId, + success: function(data){ + if(data.result) { + listElement = data.list; + list.initList(data.list, actionType); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + }else{ + if(subType=="circuits"){ + if(actionType=="backup") + obj=parentList[parentId].object; + else + obj=parentList[parentId]; + getViewCircuit(obj, parentId); + } + else + list.initList(parentList[parentId].object, actionType); + $("#goBackToThisCart").data("id",parentId); + $("#deleteBackup").data("id",parentId); + } + }); + } + function getViewCircuit(object, id){ + data={object:object, viewRender:true, manage: actionType}; + if(actionType=="backup"); + data.backup=id; + ajaxPost('#listList', baseUrl+'/'+moduleId+'/circuit/index', data, function(){ + bindListEvent(); + },"html"); + } + function initBackupEvent(){ + $("#deleteBackup").click(function(){ + var idBackup=$(this).data("id"); + bootbox.dialog({ + onEscape: function() { + //$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + }, + message: '<div class="row"> ' + + '<div class="col-md-12"> ' + + '<span>Are you sure to delete this backup ?</span> ' + + '</div></div>', + buttons: { + success: { + label: "Ok", + className: "btn-primary", + callback: function () { + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/backup/delete/id/"+idBackup, + //data : formData, + dataType: "json", + success: function(data){ + if ( data && data.result ) { + urlCtrl.loadByHash(location.hash); + toastr.success("The backup has been deleted with success"); + } else { + toastr.error("Something went wrong"); + } + } + }); + } + }, + cancel: { + label: trad.cancel, + className: "btn-secondary", + callback: function() { + //$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + } + } + } + }); + }); + $("#goBackToThisCart").click(function(){ + var idBackup=$(this).data("id"); + bootbox.dialog({ + onEscape: function() { + //$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + }, + message: '<div class="row"> ' + + '<div class="col-md-12"> ' + + '<span>If you have a current cart, it will be destroyed... Are you sure to continue ?</span> ' + + '</div></div>', + buttons: { + success: { + label: "Ok", + className: "btn-primary", + callback: function () { + setObject=parentList[idBackup].object; + if(parentList[idBackup].type=="shoppingCart") + shopping.restartBackup(setObject, idBackup); + else if(parentList[idBackup].type=="circuits") + circuit.restartBackup(setObject, idBackup); + } + }, + cancel: { + label: trad.cancel, + className: "btn-secondary", + callback: function() { + //$(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + } + } + } + }); + }); + } +</script> \ No newline at end of file diff --git a/views/error/error.php b/views/error/error.php new file mode 100644 index 0000000000000000000000000000000000000000..68bef84b25ec5c2c6d82011e479c70ca53c740fd --- /dev/null +++ b/views/error/error.php @@ -0,0 +1,85 @@ +<?php +/* @var $this SiteController */ +/* @var $error array */ +$this->pageTitle=Yii::app()->name . ' - Error'; +$this->breadcrumbs=array( + 'Error', +); +?> + +<style> +#error{ +font-family: "Homestead"; +} +#error h1 { + position:relative; + top:50px; + left:100px; + color: #E6334C; + font-family: "Homestead"; +} +#error h2 { + position:relative; + top:70px; + left:100px; + color: #324553; +} +</style> + +<div class="container" id="accueil"> + <br/> + <!-- Main hero unit for a primary marketing message or call to action --> + <div style="text-align: center;"> + <img id="logoERror" width=300 src="<?php echo $this->module->assetsUrl."/images/main-logo-home.png"?>" alt="Logo Pixel Humain"/> + <div id="error"> + + <div style="margin:30px 0 0 50px;text-align: center;"> + + <?php if( $error["code"] ){?> + <span style="font-size:2em; color:red; font-weight: bold;"> + ERREUR <?php echo $error["code"]?> + <br/><?php + if( isset($error["message"]) ) + echo $error["message"]; + else + echo Yii::t("common","Oops! You are stuck at",null,Yii::app()->controller->module->id).$error["code"]; + ?> + </span> + <span style="font-size:2em"> + <br/><br/>ERROR, PAGE OR DEMOCRACY NOT FOUND + <br/>QUI CHERCHE FINIT PAR TROUVER + </span> + <?php }?> + + <div> + <br/><br/><br/> + <?php echo Yii::t("common","Unfortunately the page you were looking for could not be found.",null,Yii::app()->controller->module->id);?> + <br> + <?php echo Yii::t("common","It may be temporarily unavailable, moved or no longer exist.",null,Yii::app()->controller->module->id);?> + <br> + <?php echo Yii::t("common","Check the URL you entered for any mistakes and try again.",null,Yii::app()->controller->module->id);?> + <br> + <a href="<?php echo Yii::app()->createUrl('/'.$this->module->id);?>" class="btn btn-red btn-return"> + <?php echo Yii::t("common","Return home",null,Yii::app()->controller->module->id);?> + </a> + </div> + + + </div> + + + + + + </div> + <div class="clear"></div> + <div> + <?php /*if(YII_DEBUG){?> + <?php echo CHtml::encode($message); ?> + <pre><?php echo print_r(debug_backtrace(),true) ?></pre> + <?php }*/?> + </div> + + <br/><br/> + </div> +</div> diff --git a/views/event/calendarView.php b/views/event/calendarView.php new file mode 100755 index 0000000000000000000000000000000000000000..f13adcf2dc54c69a02cd3590196c2f1e461d20b1 --- /dev/null +++ b/views/event/calendarView.php @@ -0,0 +1,413 @@ +<?php + +$cssAnsScriptFilesModule = array( + //Full calendar + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + '/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/locale/fr.js' +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + +if(@$event){ + $element = $event; + $type = Event::COLLECTION; +} +else if(@$person){ + $element = $person; + $type = Person::COLLECTION; +} +else if(@$organization){ + $element = $organization; + $type = Organization::COLLECTION; +} + +if(!@$_GET["renderPartial"] ) + $this->renderPartial('../pod/headerEntity', array("entity"=>$element, "type" => $type, "openEdition" => $openEdition, "edit" => $edit, "firstView" => "calendarview")); + +?> + +<style> + + #calendar{ + + } + #lastEvent{ + width:100%; + padding: 0px; + clear: none; + } + .lastEventPadding{ + width: 100%; + } + .imgEvent{ + width: 100%; + height: 200px; + } + .imgEvent img{ + width: 100%; + height: 100%; + } + + .imgEvent i{ + margin-bottom: auto; + margin-top: auto; + } + #dropBtn{ + display: none; + } + #orgaDrop a, #orgaDrop ul{ + width: 100%; + } + + #showCalendar { + display: block; + float: none; + margin-top: 40px; + } + + .panel-transparent { + background: none; + } + + .fc-event-inner{ + padding-left: 5px; + border-radius : 5px; + } + + .fc-event .fc-event-title::before, .event-category::before{ + color: white; + } + + .fc-grid th{ + text-align: center; + color: black; + } + + #sectionNextEvent{ + clear:none; + } + + .fc-popover .fc-content{ + color:#ccc; + } + + .fc-content{ + cursor: pointer; + } + + .fc button{ + height: 3em; +} + +</style> + + + +<!-- *** SHOW CALENDAR *** --> + +<div id="calendarviewPad"> + <div id="showCalendar" class="col-md-12 "> + + <div class="row "> + <div class="panel panel-white" id="sectionNextEvent"> + <div class="panel-heading litle-border-color-green"> + <h4><?php echo Yii::t("event","UPCOMING EVENTS",null,Yii::app()->controller->module->id)?></h4> + </div> + <div class='panel-body panel-transparent boder-light' id="lastEvent"></div> + </div> + </div> + <div class="space 20"></div> + <div class="row"> + <div class="panel panel-white" id> + <div class="panel-heading litle-border-color-green"> + <h4><?php echo Yii::t("event","ALL EVENTS",null,Yii::app()->controller->module->id)?></h4> + </div> + <div class="panel-body boder-light"> + <div id="calendar"></div> + </div> + </div> + </div> + </div> +</div> +<?php if(!isset($_GET["renderPartial"])){ ?> +</div> +<?php } ?> + + +<script type="text/javascript"> + + var templateColor = ["#93be3d", "#eb4124", "#0073b0", "#ed553b", "#df01a5", "#b45f04", "#2e2e2e"]; + var events = <?php echo json_encode($events) ?>; + var dateToShow, calendar, $eventDetail, eventClass, eventCategory; + var oTable, contributors; + var subViewElement, subViewContent, subViewIndex; + var tabOrganiser = []; + + jQuery(document).ready(function() { + <?php if(@$event){ ?> + setTitle("<?php echo Yii::t("event","EVENT",null,Yii::app()->controller->module->id)?> : <?php echo $event['name'] ?>","calendar"); + <?php } ?> + showCalendar(); + initLastsEvents(); + activeMenuElement("calendar"); + $(window).on('resize', function(){ + $('#calendar').fullCalendar('destroy'); + showCalendar(); + initLastsEvents(); + }); + $(".fc-button").on("click", function(e){ + setCategoryColor(tabOrganiser); + }) + + }) + +//creates fullCalendar +function buildCalObj(eventObj) +{ + //mylog.log("addTasks2CAlendar","task",taskId,eventObj); + //entries for the calendar + var taskCal = null; + var prioClass = 'event-job'; + switch( eventObj.priority ){ + case "urgent" : prioClass = 'event-todo'; break; + case "high" : prioClass = 'event-offsite'; break; + case "normal" : prioClass = ''; break; + case "low" : prioClass = 'event-generic'; break; + default : prioClass = 'event-job'; + } + + if(eventObj.startDate && eventObj.startDate != "") { + var startDate = moment(eventObj.startDate).local(); + var endDate = null; + if(eventObj.endDate && eventObj.endDate != "" ) { + endDate = moment(eventObj.startDate).local(); + } + var organiser = ""; + + + if("undefined" != typeof eventObj["links"] && "undefined" != typeof eventObj.links["organizer"]){ + $.each(eventObj.links["organizer"], function(k, v){ + if($.inArray(k, tabOrganiser)==-1){ + tabOrganiser.push(k); + } + organiser = k; + }) + + } + + var organizerName = eventObj.name; + if(eventObj.organizer != ""){ + organizerName = eventObj.organizer +" : "+ eventObj.name; + } + + mylog.log(organiser); + taskCal = { + "title" : organizerName, + "id" : eventObj['_id']['$id'], + "content" : (eventObj.description && eventObj.description != "" ) ? new Date(eventObj.description) : "", + "start" : startDate, + "end" : ( endDate ) ? endDate : startDate, + "startDate" : eventObj.startDate, + "endDate" : eventObj.endDate, + "className": organiser, + "category": organiser + } + if(eventObj.allDay ) + taskCal.allDay = eventObj.allDay; + //mylog.log(taskCal); + } + return taskCal; +} + +function showCalendar() { + + mylog.info("addTasks2Calendar",events);//,taskCalendar); + + calendar = []; + if(events){ + $.each(events,function(eventId,eventObj) + { + eventCal = buildCalObj(eventObj); + if(eventCal) + calendar.push( eventCal ); + }); + } + + dateToShow = new Date(); + $('#calendar').fullCalendar({ + header : { + left : 'prev,next', + center : 'title', + right : 'today, month, agendaWeek, agendaDay' + }, + lang : 'fr', + year : dateToShow.getFullYear(), + month : dateToShow.getMonth(), + date : dateToShow.getDate(), + editable : false, + events : calendar, + eventLimit: true, + <?php if(@$defaultDate){?> + defaultDate: '<?php echo $defaultDate?>', + <?php + } + if(@$defaultView){?> + defaultView: '<?php echo $defaultView?>', + <?php } ?> + + + eventClick : function(calEvent, jsEvent, view) { + urlCtrl.loadByHash("#event.detail.id."+calEvent._id); + } + }); + + setCategoryColor(tabOrganiser); +}; + + function getLastsEvent(events){ + var today = new Date(); + var eventsSelected = []; + $.each(events, function(k,v){ + mylog.log("current event : ", v); + + var date = null; + if("undefined" != typeof v.endDate && v.endDate.split("-")[2]){ + var endSplit = v.endDate.split("-"); + date = new Date( endSplit[0], parseInt(endSplit[1])-1, endSplit[2].split(" ")[0]); + } + if(today<=date) + { + var startSplit = v.startDate.split("-"); + var date = new Date(startSplit[0], parseInt(startSplit[1])-1, startSplit[2].split(" ")[0]); + if(eventsSelected.length>=3){ + for(var i = 0; i<eventsSelected.length;i++){ + mylog.log("for", eventsSelected); + var date2 = new Date(eventsSelected[i].startDate.split("-")[0], parseInt(eventsSelected[i].startDate.split("-")[1])-1, eventsSelected[i].startDate.split("-")[2].split(" ")[0]); + //mylog.log(date, date2); + if(date2>=date){ + eventsSelected.splice(i, 0, v); + eventsSelected.pop(); + i=eventsSelected.length; + } + } + }else if(eventsSelected.length<1){ + eventsSelected.push(v); + }else if(eventsSelected.length==1){ + var date2 = new Date(eventsSelected[0].startDate.split("-")[0], parseInt(eventsSelected[0].startDate.split("-")[1])-1, eventsSelected[0].startDate.split("-")[2].split(" ")[0]); + if(date2>date){ + eventsSelected.splice(0,0, v); + }else{ + eventsSelected.push(v); + } + }else if(eventsSelected.length==2){ + + var date2 = new Date(eventsSelected[0].startDate.split("-")[0], parseInt(eventsSelected[0].startDate.split("-")[1])-1, eventsSelected[0].startDate.split("-")[2].split(" ")[0]); + var date3 = new Date(eventsSelected[1].startDate.split("-")[0], parseInt(eventsSelected[1].startDate.split("-")[1])-1, eventsSelected[1].startDate.split("-")[2].split(" ")[0]); + if(date2>date){ + eventsSelected.splice(0,0, v); + }else if(date3>date){ + eventsSelected.splice(1,0,v); + }else{ + eventsSelected.push(v); + } + } + } + }) + return eventsSelected; + } + + function initLastsEvents(){ + var DEFAULT_IMAGE_EVENT = ""; + if("undefined" != typeof events ){ + mylog.log("OK initLastsEvents"); + var tabEvents = getLastsEvent(events); + mylog.dir(tabEvents); + var htmlRes = ""; + + for(var i=0; i<tabEvents.length; i++ ){ + var currentEvent = tabEvents[i]; + var imageUrl = ""; + var period = getStringPeriodValue(currentEvent.startDate, currentEvent.endDate); + + if ("undefined" == typeof currentEvent.profilImageUrl || currentEvent.profilImageUrl == "") { + imageUrl = ""; + baliseImg = '<div class="center"></br><i class="fa fa-calendar fa-5x text-blue" ></i></div>'; + } else { + imageUrl = baseUrl+currentEvent.profilImageUrl; + baliseImg = '<img src="'+imageUrl+'"></img>'; + } + htmlRes +='<div class="col-md-4">'+ + '<div class="panel panel-white lastEventPadding">'+ + '<div class="panel-body no-padding center">'+ + '<div class="imgEvent">'+baliseImg+'</div>'+ + '<div class="nextEventInfo"><h3>'+period+'</h3><br>'+currentEvent.name+'</div>'+ + '</div>'+ + '<div class="partition">'+ + '<a class="btn btn-green btn-block radius-bottomRightLeft lbh" href="#event.detail.id.'+currentEvent["_id"]["$id"]+'">'+ + 'En savoir + >'+ + '</a>'+ + '</div>'+ + '</div>'+ + '</div>' + } + }else{ + htlmRes = "<h1>Aucun evenement à venir</h1>"; + } + $("#lastEvent").html(htmlRes); + } + + function getStringPeriodValue(d, f){ + var mapMonth = {"01":"JANV.", "02": "FEVR.", "03":"MARS", "04":"AVRIL", "05":"MAI", "06":"JUIN", "07":"JUIL.", "08":"AOUT", "09":"SEPT.", "10":"OCTO.", "11":"NOVE.", "12":"DECE."}; + var strPeriod = ""; + var dTab = []; + var fTab = []; + var dHour = d.split(" ")[1]; + var dDay = d.split(" ")[0].split("-"); + + for(var i=0; i<dDay.length; i++){ + dTab.push(dDay[i]); + } + + var fHour = f.split(" ")[1]; + var fDay = f.split(" ")[0].split("-"); + for(var i=0; i<fDay.length; i++){ + fTab.push(fDay[i]); + } + + if(dTab[0] == fTab[0]){ + if(dTab[1] == fTab[1]){ + if(dTab[2]== fTab[2]){ + strPeriod += parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[0]+"<br><h4> de "+dHour+" à "+fHour+"</h4>"; + }else{ + strPeriod += parseInt(dTab[2])+" au "+ parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[0]; + } + }else{ + strPeriod += parseInt(dTab[2])+" "+mapMonth[dTab[1]]+" au "+ parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[0]; + } + }else{ + strPeriod += parseInt(dTab[2])+" "+mapMonth[dTab[1]]+" "+dTab[0]+" au "+ parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[0]; + } + return strPeriod; + } + + + function setCategoryColor(tab){ + $(".fc-content").css("color", "white"); + $(".fc-content").css("background-color", "black"); + for(var i =0; i<tab.length; i++){ + $("."+tab[i]+" .fc-content").css("color", "white"); + $("."+tab[i]+" .fc-content").css("background-color", templateColor[i]); + + } + } + + function getRandomColor() { + var letters = '0123456789ABCDEF'.split(''); + var color = '#'; + for (var i = 0; i < 6; i++ ) { + color += letters[Math.floor(Math.random() * 16)]; + } + return color; + } +</script> \ No newline at end of file diff --git a/views/gallery/gallery.php b/views/gallery/gallery.php new file mode 100755 index 0000000000000000000000000000000000000000..06989ceebb9d73b72d69d1985386888fa307c67e --- /dev/null +++ b/views/gallery/gallery.php @@ -0,0 +1,415 @@ +<?php +$cssAnsScriptFilesModule = array( +'/plugins/mixitup/src/jquery.mixitup.js', +); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + +$cssAnsScriptFilesModule = array( +'/js/pages-gallery.js', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->theme->baseUrl."/assets"); + +$contextIcon = "photo"; + +if( isset($parent) ){ + $contextName = $parent["name"]; + $parentName=$parent["name"]; +} +?> +<!-- start: PAGE CONTENT --> +<style type="text/css"> + .gallery-img img{ + width: 200px; + height: 200px; + } + + .panel-tools{ + filter: alpha(opacity=1); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; + } + #Grid .mix, #GridAlbums .mix{ + margin: 2px !important; + } + .content_image_album{ + float:left; + width:200px; + height:200px; + position: relative; + } + .filter-albums-gallery{ + background-color: rgba(0,0,0,0.3); + top: 0px; + height: 200px; + line-height: 200px; + left: 0; + right: 0; + width: auto; + text-align:center; + text-align: -webkit-center; + position:absolute; + } + .filter-albums-gallery:hover{ + background-color: rgba(0,0,0,0); + text-decoration: none; + text-shadow: 1px 1px 1px rgb(0,0,0); + } + .portfolio-item > .tools.tools-bottom { + background-color: rgba(0,0,0,0.3); + bottom: 0px; + height: 40px; + line-height: 40px; + left: 0; + right: 0; + width: auto; + display: none; + position:absolute; + } + .portfolio-item > .tools.tools-top.active { + display:block !important; + } + .portfolio-item > .tools.tools-top { + top: 0px; + right: 0px; + width: auto; + position:absolute; + display: none; + } + .portfolio-item:hover > .tools.tools-top { + display: block; + } + + .portfolio-item:hover > .tools.tools-bottom { + display: block; + } + .filter-albums-gallery .center{ + margin: auto; + margin-top: 70px; + width: 100%; + line-height: 20px; + } + .filter-albums-gallery .titleAlbum{ + color: white !important; + text-align: center; + font-size: 20px; + text-transform: uppercase; + } + .filter-albums-gallery span{ + color: white !important; + text-align: center; + font-size: 12px; + } + .portfolio-item .tools.tools-bottom > a, .portfolio-item .tools.tools-top > a { + position: absolute; + right: 15px; + padding:inherit; + color: white !important; + } + .portfolio-item .tools.tools-bottom > span, .portfolio-item .tools.tools-top > span { + position: absolute; + left: 15px; + padding:inherit; + color: white !important; + } + .titlePhoto{ + font-size: 19px; + font-variant: small-caps; + } + +.portfolio-item-album > img +{ + -webkit-transition: all 200ms ease-in; + -webkit-transform: scale(1); + -ms-transition: all 200ms ease-in; + -ms-transform: scale(1); + -moz-transition: all 200ms ease-in; + -moz-transform: scale(1); + transition: all 200ms ease-in; + transform: scale(1); + +} +.portfolio-item-album{ + overflow:hidden; +} +.portfolio-item-album:hover{ + box-shadow: 0px 0px 5px rgba(0,0,0,0.6); +} +.portfolio-item-album:hover > img +{ + /*z-index: 2;*/ + -webkit-transition: all 200ms ease-in; + -webkit-transform: scale(1.2); + -ms-transition: all 200ms ease-in; + -ms-transform: scale(1.2); + -moz-transition: all 200ms ease-in; + -moz-transform: scale(1.2); + transition: all 200ms ease-in; + transform: scale(1.2); +} +.checkbox-info{ + font-size:20px; +} +/* END ZOOM HOVER*/ +.checkbox-content { + padding:5px; +} +.checkbox-content label:after { + content: ''; + display: table; + clear: both; +} +.checkbox-content .cr { + position: relative; + display: inline-block; + border: 1px solid #a9a9a9; + width: 1.3em; + height: 1.3em; + background-color: white; +} + + +.checkbox-content .cr .cr-icon +{ + position: absolute; + font-size: .8em; + line-height: 0; + top: 50%; + left: 20%; +} + +.checkbox-content label input[type="checkbox"] + { + display: none; +} + +.checkbox-content label input[type="checkbox"] + .cr > .cr-icon + { + transform: scale(3) rotateZ(-20deg); + opacity: 0; + transition: all .3s ease-in; +} + +.checkbox-content label input[type="checkbox"]:checked + .cr > .cr-icon + { + transform: scale(1) rotateZ(0deg); + opacity: 1; +} +.checkbox-content label input[type="checkbox"]:checked + .cr{ + background-color: #2BB0C6; + color:white; + box-shadow: 0px 0px 16px rgba(250,250,250,0.9); + border: 1px solid white; +} +.checkbox-content label input[type="checkbox"]:disabled + .cr + { + opacity: .5; +} +/*<div class="checkbox"> + <label style="font-size: 2em"> + <input type="checkbox" value="" checked> + <span class="cr"><i class="cr-icon fa fa-check"></i></span> + Big + </label>*/ +/*checkbox font-size in (label) + class .checkbox-info*/ +</style> +<!-- GRID --> +<?php if(@$albums && count($albums)>0){ //print_r($albums); ?> +<hr class="margin-top-5"/> +<ul id="GridAlbums" class="list-unstyled"> + <!-- "gap" elements fill in the gaps in justified grid --> +</ul> +<?php } ?> +<?php if(@$contentKey!=Document::IMG_SLIDER || !empty($colName)){ + if(!empty($colName)) + $titleGal=Yii::t("common","Photos of")." '".$colName."'"; + else if(@$contentKey){ + if($contentKey=="profil") + $titleGal=Yii::t("common","Profile's photos"); + else if($contentKey=="banner") + $titleGal=Yii::t("common","Cover's photos"); + } + else + $titleGal=Yii::t("common","Photos of gallery"); + ?> +<span class="col-md-12 col-sm-12 col-xs-12 no-padding margin-top-20 titlePhoto"><?php echo $titleGal ?></span> +<hr class="col-md-12 col-sm-12 col-xs-12no-padding margin-top-5"> +<ul id="Grid" class="list-unstyled"> + <!-- "gap" elements fill in the gaps in justified grid --> +</ul> +<?php } ?> +<script type="text/javascript"> +var images; +var tabButton = []; +var mapButton = {"media": "Media", "slider": "Album", "profil" : "Profil", "banner" : "Banner", "logo" : "Logo"}; +var mapContentKey= {"album": "slider", "profil" : "profil", "banner" : "banner"}; +var itemId = "<?php echo $itemId; ?>"; +var itemType = "<?php echo $itemType; ?>"; +var contentKey = "<?php echo $contentKey; ?>"; +var authorizationToEdit = <?php echo (isset($editAlbum) && $editAlbum) ? 'true': 'false'; ?>; +var images = <?php echo json_encode($images); ?>; +var albums = <?php echo json_encode($albums); ?>; +var contextName = "<?php echo addslashes(@$contextName); ?>"; +var contextIcon = "<?php echo $contextIcon; ?>"; +var selectedIds=[]; +<?php if(@$breadcrumLevel){ ?> + var breadcrumLevel=0; +<?php } ?> +jQuery(document).ready(function() { + activeMenuElement("gallery"); + initGrid(); + $(".portfolio-item").mouseenter(function(){ + $(this).find(".tools.tools-bottom").show(); + }).mouseleave(function(){ + $(this).find(".tools.tools-bottom").hide(); + }); +}); + +function initGrid(){ + mylog.log(images); + j = 0; + $.each(albums, function(k, v){ + nameCol=k; + contentKey="slider"; + contentTitle=k; + var s = (v.count>1) ? "s" : ""; + countLabel=v.count+' '+trad["image"+s]; + if(typeof v.countAlbums!="undefined"){ + var s = (v.countAlbums>1) ? "s" : ""; + if(v.countAlbums > 0) + countLabel=v.countAlbums+" "+trad["album"+s]+" "+trad.and+" "+countLabel; + } + if(breadcrumLevel==0){ + contentKey=mapContentKey[k]; + contentTitle=trad[k]; + nameCol=""; + if(contentKey=="slider"){ + countLabel=v.countAlbums+" "+trad["album"+s]; + } + } + //text-shadow: 1px 1px 1px rgb(0,0,0); + var htmlBtn = ' <a href="javascript:;" class="openFolder filter-albums-gallery" data-name="'+nameCol+'" data-key="'+contentKey+'">'+ + '<div class="center">' + + '<span class="titleAlbum">'+contentTitle+'</span><br/>'+ + '<span>'+countLabel+'</span>'+ + '</div>'+ + ' </a>'; + + var htmlAlbums = '<li class="content_image_album mix '+k+' gallery-img no-padding" data-cat="1">'+ + ' <div class="portfolio-item portfolio-item-album">'+ + //' <a class="thumb-info" href="'+v.imagePath+'" data-lightbox="all">'+ + ' <img src="'+v.imageThumb+'" class="img-responsive" alt="">'+ + //' </a>' + + //' <div class="chkbox"></div>' + + htmlBtn + + ' </div>' + + '</li>' ; + $("#GridAlbums").append(htmlAlbums); + }); + $.each(images, function(k, v){ + j++; + var k=contentKey; + //if(k=="profil" || k=="slider"){ + /*if($.inArray(k, tabButton)==-1){ + tabButton.push(k); + var liHtml = '<li class="filter" data-filter=".'+k+'">'+ + '<a href="javascript:;">' + mapButton[k] + '</a>'+ + '</li>'; + $(".nav-pills").append(liHtml); + }*/ + //$.each(v, function(docId, document) { + //for(var i = 0; i<v.length; i++){ + htmlBtn=""; + if(authorizationToEdit){ + var htmlBtn = ' <div class="tools tools-top">' + + '<div class="checkbox-content">'+ + '<label style="font-size: 1.3em">'+ + '<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+v.id+'">'+ + '<span class="cr"><i class="cr-icon fa fa-check"></i></span>'+ + '</label>'+ + '</div>'+ + //'<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+v.id+'"/>'+ + '</div>'; + } + titleDoc=""; + if(notNull(v.title)) + titleDoc=v.title; + htmlBtn += ' <div class="tools tools-bottom">'; + htmlBtn +='<span>'+titleDoc; + if(authorizationToEdit) + htmlBtn += '<small> '+v.size+'</small>'; + htmlBtn+= '</span>'; + if(authorizationToEdit){ + htmlBtn += ' <a href="javascript:;" onclick="updateDocument(\''+v.id+'\', \''+titleDoc+'\')">' + + ' <i class="fa fa-pencil"></i>'+ + ' </a>'; + } + htmlBtn+= ' </div>'; + var htmlThumbail = '<li class="content_image_album mix '+k+' gallery-img no-padding" data-cat="1" id="'+v.id+'">'+ + ' <div class="portfolio-item">'+ + ' <a class="thumb-info" href="'+v.imagePath+'" data-lightbox="all">'+ + ' <img src="'+v.imageThumbPath+'" class="img-responsive" alt="">'+ + ' </a>' + + //' <div class="chkbox"></div>' + + htmlBtn + + ' </div>' + + '</li>' ; + $("#Grid").append(htmlThumbail); + + //} + }) + if(j>0){ + $('#Grid').mixItUp(); + $('.portfolio-item .chkbox').bind('click', function () { + if ($(this).parent().hasClass('selected')) { + $(this).parent().removeClass('selected').children('a').children('img').removeClass('selected'); + } else { + $(this).parent().addClass('selected').children('a').children('img').addClass('selected'); + } + }); + }else{ + var htmlDefault = "<div class='center col-md-12 col-sm-12 col-xs-12 padding-5'>"+ + "<i class='fa fa-ban fa-4x text-dark'></i> <i class='fa fa-picture-o fa-4x text-dark'></i>"+ + " "+trad.nopicture+ + "</div>"; + $('#Grid').append(htmlDefault); + } +} + +/*function bindBtnGallery(){ + $(".portfolio-item .btnRemove").on("click", function(e){ + var imageId= $(this).data("id"); + var imageName= $(this).data("name"); + var key = $(this).data("key"); + var path=""; + if(key == "slider") + var path="album"; + else if(key=="communevent") + var path=key; +// var path = $(this).data("path"); + e.preventDefault(); + bootbox.confirm("<?php echo Yii::t('common','Are you sure you want to delete') ?> <span class='text-red'>"+ + $(this).data("name")+"</span> ?", + function(result) { + if(result){ + $.ajax({ + url: baseUrl+"/"+moduleId+"/document/delete/dir/"+moduleId+"/type/"+itemType+"/parentId/"+itemId, + type: "POST", + dataType : "json", + data: {"name": imageName, "parentId": itemId, "docId":imageId, + "parentType": itemType, "path" : path, "source":"gallery"}, + success: function(data){ + if(data.result){ + $("#"+imageId).remove(); + toastr.success(data.msg); + }else{ + toastr.error(data.error) + } + } + }); + } + }); + }); +}*/ +</script> \ No newline at end of file diff --git a/views/gallery/index.php b/views/gallery/index.php new file mode 100644 index 0000000000000000000000000000000000000000..7d9aa3f53026443aa9745229868627022997753a --- /dev/null +++ b/views/gallery/index.php @@ -0,0 +1,504 @@ +<style type="text/css"> +#breadcrumGallery{ + font-size: 20px; + /*font-variant: small-caps;*/ +} +.dropdown-menu-collection, .dropdown-menu-file{ + position: absolute !important; + left:10px; + border: 1px solid rgba(0,0,0,.15); + border-radius: 2px; + -webkit-box-shadow: 1px 6px 10px rgba(0,0,0,.6); + box-shadow: 1px 6px 10px rgba(0,0,0,0.6); +} +.dropdown-menu-collection{ + min-width: 220px; + min-height: 200px; +} +.dropdown-menu-collection:before, .dropdown-menu-file:before{ + left:13%; + margin-left: -11px; +} +.dropdown-menu-collection:before{ + left:13%; +} +.dropdown-menu-file:before{ + left:16%; +} +.dropdown-menu-file > li > a{ + text-align: left; +} +.dropdown-menu-collection:after, .dropdown-menu-file:after{ + left: -5%; + margin-left: 30px; +} +ul.dropdown-menu-collection > li .btn-success{ + color:white !important; +} +ul.dropdown-menu-collection > li .btn-success:hover{ + color: white !important; + background-color: #128f76 !important; + border-color: #11866f !important; +} +ul.dropdown-menu-collection > li.noHover:hover{ + background-color: white !important; +} +ul.dropdown-menu-collection > li.noHover > span{ + padding: 0px 20px; + font-size: 16px; + font-variant: small-caps; + font-weight: bolder; +} +ul.dropdown-menu-collection > li.noHover > span > i{ + vertical-align: middle; +} +ul.dropdown-menu-collection > li.noHover > span > a{ + float: initial; +} +ul.dropdown-menu-collection > li:hover{ + background-color: #2C3E50; +} +ul.dropdown-menu-collection > li:hover > a{ + color:white !important; +} +ul.dropdown-menu-collection > li:hover > a{ + padding-top: 5px; + padding-bottom: 5px; +} +ul.dropdown-menu-collection > li > a:hover{ + background-color: inherit !important; +} +.btn-delete-doc, .btn-move-collection{ + display: none; +} +#header-gallery.affix{ + top:113px; + margin-left: -15px; + padding-top: 5px; + -webkit-box-shadow: 0px 0px 5px -1px rgba(0,0,0,0.5); + -moz-box-shadow: 0px 0px 5px -1px rgba(0,0,0,0.5); + box-shadow: 0px 0px 2px -1px rgba(0,0,0,0.5); + z-index: 1000; + background-color: white; +} +</style> +<div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="galleryPad"> + <div class="panel panel-white"> + <div class="panel-body"> + <div id="header-gallery"> + <div id="breadcrumGallery" class="col-md-12 col-sm-12 col-xs-12 no-padding"> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"><hr style="margin-bottom:0px;"> + </div> + <?php if(@$editAlbum && $editAlbum==true){ ?> + <div class="controls col-md-12 col-sm-12 col-xs-12 margin-top-5 no-padding"> + <ul class="nav nav-pills"> + <?php if($docType=="image"){ ?> + <li> + <a class="btn" href="javascript:dyFObj.openForm('addPhoto')"> + <i class="fa fa-upload"></i> <?php echo Yii::t("common","Add Photos"); ?> + </a> + </li> + <li> + <a class="btn" href="javascript:;" onclick="crudCollectionGallery('new')"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Create an album"); ?> + </a> + </li> + <?php } else { ?> + <li class="dropdown-add-file"> + <a class="btn show-nav-add" href="javascript:;"> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("common","Add"); ?> + </a> + <ul class="dropdown-menu dropdown-menu-file arrow_box"> + <li class="text-left"> + <a class="btn show-nav-add text-left" href="javascript:dyFObj.openForm('addFile')"> + <i class="fa fa-file-text-o"></i> <?php echo Yii::t("common","Uploaod files"); ?> + </a> + </li> + <li class="text-left"> + <a class="btn show-nav-add text-left" href="javascript:dyFObj.openForm('bookmark','sub')"> + <i class="fa fa-bookmark"></i> <?php echo Yii::t("common","Add bookmark") ?> + </a> + </li> + </ul> + </li> + <li class="btn-add-folder"> + <a class="btn" href="javascript:;" onclick="crudCollectionGallery('new')"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Create a folder"); ?> + </a> + </li> + <?php } ?> + <li class="dropdown-collection btn-move-collection hidden"> + <a class="btn show-nav-col" href="javascript:;"> + <i class="fa fa-reply fa-rotate-180"></i> <?php echo Yii::t("common","Move to"); ?> + </a> + <ul class="dropdown-menu dropdown-menu-collection arrow_box"> + <li class="loadingCollection text-center"> + <i class="fa fa-spin fa-refresh"></i> + </li> + </ul> + </li> + <li class="btn-move-collection btn-delete-doc hidden"> + <a class="btn text-red" href="javascript:;" id="deleteDocuments"> + <i class="fa fa-trash"></i> <?php echo Yii::t("common","Delete"); ?> + </a> + </li> + <!--<li class="filter active" data-filter="all"> + <a href="javascript:;" class="btn btn-default"><?php echo Yii::t("common","Show All"); ?></a> + </li>--> + </ul> + </div> + <?php } ?> + </div> + <div id="gallery-container" class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <?php + if($docType=="image"){ + $params = array( + "images"=>@$images, + "albums"=>@$albums, + "itemId"=>$itemId, + "itemType"=>$itemType, + "contentKey"=>"", + "editAlbum"=>@$editAlbum, + "breadcrumLevel"=>true + ); + echo $this->renderPartial("gallery", $params, true); + }else if($docType=="file"){ + $params = array( + "files"=>@$files, + "folders"=>@$folders, + "itemId"=>$itemId, + "itemType"=>$itemType, + "contentKey"=>"", + "editAlbum"=>@$editAlbum, + "breadcrumLevel"=>true + ); + echo $this->renderPartial("library", $params, true); + } + //print_r($results); + //echo $docType; + ?> + </div> + </div> + </div> +</div> +<script type="text/javascript"> + var collectionsGallery=<?php echo json_encode($collections) ?>; + var navCollections=[]; + var historyNav=[]; + var docType="<?php echo @$docType; ?>"; + var itemId = "<?php echo $itemId; ?>"; + var itemType = "<?php echo $itemType; ?>"; + var selectedIds=[]; + var breadcrumLevel=0; + var actionCrud=false; + jQuery(document).ready(function() { + appendLevel(0, ""); + bindButtonGalleryEvent(); + $('.show-nav-col').click(function() { + $(this).parent().find('.dropdown-menu-collection').stop(true, true).delay(200).fadeIn(500); + htmlMenuCol=""; + $.each(navCollections,function(i,v){ + historyNav.push(v); + }); + openDirectory(); + }); + $('.dropdown-menu-collection').mouseleave(function() { + if(actionCrud==false){ + navCollections=[]; + $.each(historyNav,function(i,v){ + navCollections.push(v); + }); + console.log("navHistory",navCollections); + } + $(this).stop(true, true).delay(200).fadeOut(500); + }); + $('.show-nav-add').click(function() { + $(this).parent().find('.dropdown-menu-file').stop(true, true).delay(200).fadeIn(500); + }); + $('.dropdown-menu-file').mouseleave(function() { + $(this).stop(true, true).delay(200).fadeOut(500); + }); + $('#header-gallery').affix({ + offset: { + top: 500 + } + }).on('affix.bs.affix', function(){ + $(this).width($(this).parents().eq(1).width());//css('margin-top', $('#headerNavWrapper').outerHeight(true)+'px'); + }); + }); + function appendLevel(breadcrumLevel, name, contentKey, buildNew){ + if(breadcrumLevel==0){ + if(docType=="image") + nameFirst=trad.gallery; + else + nameFirst=trad.library; + $html='<i class="fa fa-home fa-1x text-black" style="padding: 0px 10px 0px 10px;" data-value="'+breadcrumLevel+'"></i><a href="javascript:;" onclick="galleryGuide('+breadcrumLevel+')" class="breadcrumAnchor bold text-dark" data-value="'+breadcrumLevel+'" data-name="'+name+'">'+nameFirst+'</a>'; + } else { + nameBread=name; + if(nameBread=="") + nameBread=trad[contentKey]; + $html= '<i class="text-red breadcrumChevron" style="padding: 0px 10px 0px 10px;" data-value="'+breadcrumLevel+'">/</i>'+'<a href="javascript:;" onclick="galleryGuide('+breadcrumLevel+',\''+name+'\',\''+contentKey+'\')" class="breadcrumAnchor bold text-dark" data-value="'+breadcrumLevel+'" data-name="'+nameBread+'">'+nameBread+'</a>'; + } + $("#breadcrumGallery").append($html); + if(breadcrumLevel!=0 && buildNew != true) + getViewGallery(breadcrumLevel,name, contentKey); + } + function openDirectory(name,back){ + collectionsDir=collectionsGallery; + nameDir=""; + htmlMenuCol=""; + noIncrement=false; + if(back) + navCollections.splice(navCollections.length-1,1); + if(navCollections.length>=1 && typeof(name)=="undefined"){ + name=navCollections[navCollections.length-1]; + noIncrement=true; + } + if(notNull(name) && name!="undefined"){ + nameDir=name; + if(back != true && noIncrement!=true) + navCollections.push(name); + backHtml=""; + if(navCollections.length>0) + backHtml="<a href='javascript:;' onclick='openDirectory(\""+addslashes(navCollections[navCollections.length-2])+"\",true)' class='margin-right-5'>"+ + "<i class='fa fa-arrow-circle-left'></i>"+ + "</a>"; + htmlMenuCol="<li class='no-padding col-md-12 col-sm-12 col-xs-12 noHover'>"+ + "<span class='text-center col-md-12 col-sm-12 col-xs-12'>"+backHtml+nameDir+"</span>"+ + "<span class='text-center col-md-12 col-sm-12 col-xs-12 margin-top-5'>"+ + '<a href="javascript:;" onclick="addToCollection(\''+addslashes(name)+'\')" class="btn btn-success">'+trad.movehere+'</a>'+ + "</span>"+ + "</li><hr class=' col-md-12 col-sm-12 no-padding'>"; + + } + if(navCollections.length>0){ + $.each(navCollections,function(i,v){ + console.log(collectionsDir); + collectionsDir=collectionsDir[v]; + }); + } + if(typeof(collectionsDir) != "undefined" && Object.keys(collectionsDir).length>0){ + inc=0; + $.each(collectionsDir,function(i,v){ + if(i !="updated"){ + inc++; + console.log(i); + console.log("slashes",addslashes(i)); + htmlMenuCol+="<li class='text-left col-md-12 col-sm-12 col-xs-12 no-padding'>"+ + '<a href="javascript:;" onclick="openDirectory(\''+addslashes(i)+'\')" class="col-md-12 col-sm-12 col-xs-12">'+i+'</a>'+ + "</li>"; + } + }); + } + if(typeof(collectionsDir) == "undefined" || Object.keys(collectionsDir).length==0 || inc==0) + htmlMenuCol+="<span class='col-md-12 col-sm-12 col-xs-12'> "+trad.noalbumregister+"</span>"; + $(".dropdown-menu-collection").html(htmlMenuCol); + } + function bindButtonGalleryEvent(){ + $(".openFolder").off().on("click",function(){ + if($(this).data("name")!=""){ + newCollection=$(this).data("name"); + }else{ + newCollection=""; + } + contentKey=$(this).data("key"); + breadcrumLevel++; + appendLevel(breadcrumLevel,newCollection,contentKey); + }); + $(".checkPhoto").click(function(){ + idSelect=$(this).data("value"); + if($(this).is(':checked')){ + $(this).parents().eq(2).addClass("active"); + selectedIds.push(idSelect); + }else{ + $(this).parents().eq(2).removeClass("active"); + selectedIds.splice(idSelect,1); + } + class2=".btn-delete-doc, .btn-move-collection"; + if(inArray(contentKey,["profil","banner","bookmarks"])) + class2=".btn-delete-doc"; + if(selectedIds.length>0) + $(class2).removeClass("hidden"); + else + $(class2).addClass(); + }); + $("#deleteDocuments").off().on("click",function(e){ + var path="communecter"; + e.preventDefault(); + if(docType=="image" || contentKey=="files") + url="/document/delete/dir/"+moduleId+"/type/"+itemType+"/id/"+itemId; + else + url="/bookmark/delete/type/"+itemType+"/id/"+itemId; + bootbox.confirm("<?php echo Yii::t('common','Are you sure you want to delete this selection') ?>?", + function(result) { + if(result){ + $.ajax({ + url: baseUrl+"/"+moduleId+url, + type: "POST", + dataType : "json", + data: {"parentId": itemId, "ids":selectedIds, + "parentType": itemType, "path" : path, "source":"gallery"}, + success: function(data){ + if(data.result){ + console.log(selectedIds); + $.each(selectedIds, function(i,v){ + $("#"+v).remove(); + selectedIds=[];//.splice($.inArray(v,selectedIds),1);; + }); + toastr.success(data.msg); + }else{ + toastr.error(data.error) + } + } + }); + } + }); + }); + $(".btn-showmoredesc").off().click(function(){ + var id = $(this).data("id"); + console.log("hasClass ?", $("#"+id+" .contentDescription span.endtext").hasClass("hidden")); + if($("#"+id+" .contentDescription span.endtext").hasClass("hidden")){ + $("#"+id+" .contentDescription span.endtext").removeClass("hidden"); + $("#"+id+" .contentDescription span.ppp").addClass("hidden"); + $(this).html("Réduire le texte").parent().prepend("<br>"); + }else{ + $("#"+id+" .contentDescription span.endtext").addClass("hidden"); + $("#"+id+" .contentDescription span.ppp").removeClass("hidden"); + $(this).html("Lire la suite").parent().find("br").remove(); + } + }); + + } + function addToCollection(name){ + action="move"; + params={}; + params.name=name; + params.ids=selectedIds; + if(selectedIds.length>0){ + ajaxPost(null,baseUrl+"/"+moduleId+"/gallery/crudfile/action/"+action ,params,function(data) { + if(data.result){ + actionCrud=true; + keyMov="slider"; + docKey=docType; + if(docType=="file"){ + keyMov="files"; + docKey=keyMov; + } + buildNewBreadcrum(docKey); + getViewGallery(breadcrumLevel,data.movedIn, keyMov,true); + toastr.success(data.msg); + } + else + toastr.error(data.msg); + }, "none"); + }else{ + toastr.error("Please select documents before added to a collection"); + } + } + function crudCollectionGallery(action){ + var params = {}; + var sure = true; + params.targetType = itemType; + params.targetId = itemId; + params.colType = "<?php echo Document::COLLECTION ?>"; + params.docType = docType; + params.subDir = navCollections; + if(typeof action == "undefined") + action = "new"; + if(action == "del"){ + params.name = name; + sure = confirm("Vous êtes sûr ?"); + } + else if(action == "new" || action == "update") + params.name = prompt(tradDynForm.collectionname+' ?',name); + if(action == "update") + params.oldname = name; + if(sure) + { + ajaxPost(null,baseUrl+"/"+moduleId+"/gallery/crudcollection/action/"+action ,params,function(data) { + if(data.result){ + toastr.success(data.msg); + if(action == "new"){ + console.log("new",data); + collectionsGallery=data.collections; + }else if(action == "update"){ + if(!collectionsGallery[params.name]) + collectionsGallery[params.name] = collectionsGallery[ params.oldname ]; + delete collectionsGallery[ params.oldname ]; + }else if(action == "del"){ + delete collectionsGallery[params.name]; + } + if(docType=="image") + keyCreate="slider"; + else + keyCreate="file"; + if(notNull(data.createdIn)) + getViewGallery(breadcrumLevel,data.createdIn, keyCreate,true); + else{ + breadcrumLevel=1; + appendLevel(breadcrumLevel,"",keyCreate); + } + + } + else + toastr.error(data.msg); + }, "none"); + } + } + function buildNewBreadcrum(docType){ + breadcrumLevel=0; + $("#breadcrumGallery").html(""); + appendLevel(0, "","",true); + if(docType=="image"){ + breadcrumLevel++; + appendLevel(breadcrumLevel,"","slider",true); + }else if(docType=="files" || docType=="bookmarks"){ + breadcrumLevel++; + appendLevel(breadcrumLevel,"",docType,true); + } + $.each(navCollections, function(i,v){ + breadcrumLevel++; + appendLevel(breadcrumLevel,v,"slider",true); + }); + } + function getViewGallery(breadcrumLevel,name,contentKey,action){ + if(docType=="image") + view="gallery"; + else + view="library"; + var url = "gallery/index/type/"+itemType+"/id/"+itemId+"/docType/"+docType; + var data = {}; + if(breadcrumLevel>1 && action!=true ) + navCollections.push(name); + data.subDir=navCollections; + data.colName=name; + data.contentKey=contentKey; + data.view=view; + if(typeof timeLimit != "undefined") + data.timeLimit=timeLimit; + showLoader('#gallery-container'); + ajaxPost('#gallery-container', baseUrl+'/'+moduleId+'/'+url, + data, + function(){bindButtonGalleryEvent();},"html"); + } + function galleryGuide(level, name,contentKey){ + breadcrumLevel=level; + $(".breadcrumChevron").each(function(){ + if($(this).data("value")>level) + $(this).remove(); + }); + $(".breadcrumAnchor").each(function(){ + if($(this).data("value")>level){ + navCollections.splice($.inArray($(this).data("name"),navCollections), 1); + $(this).remove(); + } + }); + if(level==0){ + getViewGallery(level,"",""); + } + else{ + getViewGallery(level,name,contentKey,true); + } + } +</script> \ No newline at end of file diff --git a/views/gallery/library.php b/views/gallery/library.php new file mode 100644 index 0000000000000000000000000000000000000000..9225eb34d9641c9071543797aa9a0e00d2330b2b --- /dev/null +++ b/views/gallery/library.php @@ -0,0 +1,530 @@ +<?php +$cssAnsScriptFilesModule = array( +'/plugins/mixitup/src/jquery.mixitup.js', +); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + +$cssAnsScriptFilesModule = array( +'/js/pages-gallery.js', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->theme->baseUrl."/assets"); + +$contextIcon = "photo"; + +if( isset($parent) ){ + $contextName = $parent["name"]; + $parentName=$parent["name"]; +} +?> +<!-- start: PAGE CONTENT --> +<style type="text/css"> + .gallery-img img{ + width: 200px; + height: 200px; + } + + .panel-tools{ + filter: alpha(opacity=1); + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; + } + #Grid .mix, #GridAlbums .mix{ + margin: 2px !important; + } + .content_image_album{ + float:left; + width:200px; + height:200px; + position: relative; + } + .content_folder_file{ + float:left; + position: relative; + border-bottom: 1px solid rgba(0,0,0,0.1); + padding: 5px 0px; + } + .filter-folder-gallery, .filter-albums-gallery{ + top: 0px; + left: 0; + right: 0; + width: auto; + text-align:center; + text-align: -webkit-center; + position:absolute; + } + .filter-folder-gallery{ + bottom:0px; + background-color: rgba(0,0,0,0.5); + } + .filter-albums-gallery{ + height: 200px; + line-height: 200px; + background-color: rgba(0,0,0,0.3); + } + .filter-folder-gallery:hover, .filter-albums-gallery:hover{ + text-decoration: none; + text-shadow: 1px 1px 1px rgb(0,0,0); + } + .filter-folder-gallery:hover{ + background-color: rgba(0,0,0,0.2); + } + .filter-albums-gallery:hover{ + background-color: rgba(0,0,0,0); + } + .portfolio-item > .tools.tools-bottom { + background-color: rgba(0,0,0,0.3); + bottom: 0px; + height: 40px; + line-height: 40px; + left: 0; + right: 0; + width: auto; + display: none; + position:absolute; + } + .portfolio-item > .tools.tools-top.active { + display:block !important; + } + .portfolio-item > .tools.tools-top { + top: 0px; + right: 0px; + width: auto; + position:absolute; + display: none; + } + .portfolio-item:hover > .tools.tools-top { + display: block; + } + + .portfolio-item:hover > .tools.tools-bottom { + display: block; + } + .filter-folder-gallery .center, .filter-albums-gallery .center{ + margin: auto; + margin-top: 70px; + width: 100%; + line-height: 20px; + } + .filter-folder-gallery .titleAlbum,.filter-albums-gallery .titleAlbum{ + color: white !important; + text-align: center; + font-size: 20px; + text-transform: uppercase; + } + .filter-folder-gallery span, .filter-albums-gallery span{ + color: white !important; + text-align: center; + } + .filter-albums-gallery span{ + font-size: 12px; + } + .filter-folder-gallery span{ + font-size: 16px; + } + .portfolio-item .tools.tools-bottom > a, .portfolio-item .tools.tools-top > a { + position: absolute; + right: 15px; + padding:inherit; + color: white !important; + } + .portfolio-item .tools.tools-bottom > span, .portfolio-item .tools.tools-top > span { + position: absolute; + left: 15px; + padding:inherit; + color: white !important; + } + .titlePhoto{ + font-size: 19px; + font-variant: small-caps; + } + +.portfolio-item-album > img +{ + -webkit-transition: all 200ms ease-in; + -webkit-transform: scale(1); + -ms-transition: all 200ms ease-in; + -ms-transform: scale(1); + -moz-transition: all 200ms ease-in; + -moz-transform: scale(1); + transition: all 200ms ease-in; + transform: scale(1); + +} +.portfolio-item-album{ + overflow:hidden; +} +.portfolio-item-album:hover{ + box-shadow: 0px 0px 5px rgba(0,0,0,0.6); +} +.portfolio-item-album:hover > img +{ + /*z-index: 2;*/ + -webkit-transition: all 200ms ease-in; + -webkit-transform: scale(1.2); + -ms-transition: all 200ms ease-in; + -ms-transform: scale(1.2); + -moz-transition: all 200ms ease-in; + -moz-transform: scale(1.2); + transition: all 200ms ease-in; + transform: scale(1.2); +} +.initLibrary{ + filter:grayscale(75%); +} +.portfolio-item-album:hover > .initLibrary{ + filter:grayscale(50%); +} +.checkbox-info{ + font-size:20px; +} +/* END ZOOM HOVER*/ +.checkbox-content { + padding:5px; +} +.checkbox-content label { + margin-bottom: 0px; + vertical-align: bottom; + font-size: 10px; +} +.checkbox-content .cr { + position: relative; + display: inline-block; + border: 1px solid #a9a9a9; + width: 1.3em; + height: 1.3em; + background-color: white; +} + + +.checkbox-content .cr .cr-icon +{ + position: absolute; + font-size: .8em; + line-height: 0; + top: 50%; + left: 20%; +} + +.checkbox-content label input[type="checkbox"] + { + display: none; +} + +.checkbox-content label input[type="checkbox"] + .cr > .cr-icon + { + transform: scale(3) rotateZ(-20deg); + opacity: 0; + transition: all .3s ease-in; +} + +.checkbox-content label input[type="checkbox"]:checked + .cr > .cr-icon + { + transform: scale(1) rotateZ(0deg); + opacity: 1; +} +.checkbox-content label input[type="checkbox"]:checked + .cr{ + background-color: #2BB0C6; + color:white; + box-shadow: 0px 0px 16px rgba(250,250,250,0.9); + border: 1px solid white; +} +.checkbox-content label input[type="checkbox"]:disabled + .cr + { + opacity: .5; +} +@media screen and (min-width: 768px) { +.content_folder_file, .content_folder_file{ + width:48%; +} +} +@media screen and (max-width: 768px) { + .content_folder_file{ + width:100%; + } +} +#GridAlbums .folder:hover{ + background-color: rgba(0,0,0,0.1); +} +#listTags > a { + width: 100%; + padding: 5px 5px; + text-align: right; +} +.tagsElipsis{ + max-width: 75%; + margin-right: 2px; + vertical-align: bottom; +} +.filterBookmarks .badge{ + background-color: #337ab7; + color: white; + font-size: 11px; + padding: 3px 6px; +} +.filterBookmarks.active{ + border-right: 0px solid #337ab7; + background-color: #337ab7; + color: white; + text-decoration: none; +} +.filterBookmarks:hover{ + width:initial !important; + float: right !important; + background-color: #337ab7; + color:white; + text-decoration: none; +} +.filterBookmarks:hover > .tagsElipsis{ + max-width: inherit; +} +.filterBookmarks:hover > .badge, .filterBookmarks.active > .badge{ + background-color: white; + color: #337ab7; +} +</style> +<!-- GRID --> +<?php if(@$folders && count($folders)>0){ //print_r($albums); ?> +<hr class="margin-top-5"/> +<ul id="GridAlbums" class="list-unstyled"> + <!-- "gap" elements fill in the gaps in justified grid --> +</ul> +<?php } ?> + +<ul id="Grid" class="list-unstyled <?php if($contentKey=="bookmarks") echo "col-md-10 col-sm-10" ?>"> + <!-- "gap" elements fill in the gaps in justified grid --> +</ul> +<?php if($contentKey=="bookmarks"){ ?> + <div id="listTags" class="col-sm-2 col-md-2 text-left no-padding"></div> +<?php } ?> +<script type="text/javascript"> +var fies; +var tabButton = []; +var mapButton = {"files":"Files","bookmarks":"Bookmarks"}; +var mapContentKey= {"album": "slider", "profil" : "profil", "banner" : "banner"}; +var itemId = "<?php echo $itemId; ?>"; +var itemType = "<?php echo $itemType; ?>"; +var contentKey = "<?php echo $contentKey; ?>"; +var authorizationToEdit = <?php echo (isset($editAlbum) && $editAlbum) ? 'true': 'false'; ?>; +var files = <?php echo json_encode($files); ?>; +var folders = <?php echo json_encode($folders); ?>; +if(contentKey=="bookmarks") + var tagsListFilter = <?php echo json_encode(@$tagsFilter); ?>; +var contextName = "<?php echo addslashes(@$contextName); ?>"; +var contextIcon = "<?php echo $contextIcon; ?>"; +var selectedIds=[]; +<?php if(@$breadcrumLevel){ ?> + var breadcrumLevel=0; +<?php } ?> +jQuery(document).ready(function() { + activeMenuElement("library"); + initPanelLibrary(); + $(".portfolio-item").mouseenter(function(){ + $(this).find(".tools.tools-bottom").show(); + }).mouseleave(function(){ + $(this).find(".tools.tools-bottom").hide(); + }); + if(contentKey=="bookmarks") + $(".btn-add-folder").hide(); + else + $(".btn-add-folder").show(); +}); + +function initPanelLibrary(){ + mylog.log(files); + j = 0; + if(breadcrumLevel==0){ + htmlLibInit=initMenuLibrary(); + $("#GridAlbums").append(htmlLibInit); + } + else{ + $.each(folders, function(k, v){ + nameCol=k; + contentTitle=k; + htmlFolders = '<li class="content_folder '+k+' col-sm-12 col-md-12 col-xs-12" data-cat="1">'+ + ' <div class="portfolio-item">'+ + ' <a href="javascript:;" class="openFolder" data-name="'+nameCol+'" data-key="files">'+ + '<div class="content-info col-md-8 col-sm-8 col-sx-8 padding-5">'+ + '<span><i class="fa fa-folder"></i> '+nameCol+'</span>'+ + '</div>'+ + ' </a></div>' + + '</li>' ; + $("#GridAlbums").append(htmlFolders); + }); + $.each(files, function(k, v){ + j++; + if(contentKey=="files"){ + var k=v.contentKey; + titleDoc=""; + if(notNull(v.name)) + titleDoc=v.name; + var htmlThumbail = '<li class="content_file '+k+' col-sm-12 col-md-12 col-xs-12" data-cat="1" id="'+v.id+'">'+ + ' <div class="portfolio-item">'; + if(authorizationToEdit){ + htmlThumbail += '<div class="checkbox-content pull-left">'+ + '<label>'+ + '<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+v.id+'">'+ + '<span class="cr"><i class="cr-icon fa fa-check"></i></span>'+ + '</label>'+ + '</div>'; + } + htmlThumbail+='<div class="content-info col-md-8 col-sm-8 col-sx-8 padding-5">'+ + '<span>'+documents.getIcon(k)+' '+titleDoc+' - <i>'+v.size+'</i></span>'+ + '</div>'+ + '<div class="tools tools-right pull-right padding-5">'+ + ' <a href="'+v.imagePath+'" target="_blank" class="margin-right-10">' + + ' <i class="fa fa-upload"></i>'+ + ' </a>'; + if(authorizationToEdit){ + htmlThumbail+= ' <a href="javascript:;" onclick="updateDocument(\''+v.id+'\', \''+titleDoc+'\')">' + + ' <i class="fa fa-pencil"></i>'+ + ' </a>'; + } + htmlThumbail+='</div>'+ + ' </div>' + + '</li>' ; + }else + htmlThumbail=getViewUrl(k,v); + $("#Grid").append(htmlThumbail); + + //} + }); + if(contentKey=="bookmarks"){ + tagsFilter(tagsListFilter); + } + if(j>0){ + + }else{ + var htmlDefault = "<div class='center col-md-12 col-sm-12 col-xs-12 padding-5'>"+ + "<i class='fa fa-ban fa-4x text-dark'></i> <i class='fa fa-files-o fa-3x text-dark'></i>"+ + "<br>"+trad.nofile+ + "</div>"; + $('#Grid').append(htmlDefault); + } + } + +} +function getViewUrl(id,data){ + htmlTags=""; + elTagsList=""; + description=""; + if(typeof data.tags != "undefined"){ + $.each(data.tags,function(i,v){ + htmlTags+='<span class="badge letter-red bg-white no-padding">#'+v+'</span> '; + elTagsList += slugify(v)+" "; + }); + } + if(typeof data.description != "undefined"){ + description=checkAndCutLongString(data.description,200,id,"showmoredesc",true);; + + } + var html = '<li class="content_file '+id+' col-sm-12 col-md-12 col-xs-12 no-padding '+elTagsList+'" data-cat="1" id="'+id+'">'+ + ' <div class="portfolio-item">'; + if(authorizationToEdit){ + html += '<div class="checkbox-content pull-left">'+ + '<label>'+ + '<input type="checkbox" class="checkPhoto checkbox-info" data-value="'+id+'">'+ + '<span class="cr"><i class="cr-icon fa fa-check"></i></span>'+ + '</label>'+ + '</div>'; + } + html+='<div class="content-info col-md-10 col-sm-10 col-sx-10 padding-5">'+ + '<a href="'+data.url+'" target="_blank">'+ + '<span>'+data.name+' </span>'+ + '</a>'+ + '</div>'+ + '<div class="tools tools-right pull-right padding-5">'; + if(authorizationToEdit){ + html+= ' <a href="javascript:;" onclick="updateBookmark(\''+id+'\')">' + + ' <i class="fa fa-pencil"></i>'+ + ' </a>'; + } + html+='</div>'; + html+='<div class="contentDescription col-md-12 col-sm-12 col-xs-12">'+ + '<span>'+description+'</span>'+ + '</div>'+ + '<div class="contentTags col-md-12 col-sm-12 col-xs-12">'+ + htmlTags+ + '</div>'+ + '</div>'+ + ' </div>' + + '</li>' ; + return html; +} +function initMenuLibrary(){ + htmlBtn = ' <a href="javascript:;" class="openFolder filter-folder-gallery" data-name="" data-key="bookmarks">'+ + '<div class="center">' + + '<span class="titleAlbum"><i class="fa fa-bookmark"></i> '+trad.bookmarks+'</span><br/><br/>'+ + '<span>'+trad.explainbookmark+'</span>'+ + '</div>'+ + ' </a>'; + + html = '<li class="content_folder_file mix library-img no-padding" data-cat="1">'+ + ' <div class="portfolio-item portfolio-item-album">'+ + //' <a class="thumb-info" href="'+v.imagePath+'" data-lightbox="all">'+ + ' <img src="'+moduleUrl+'/images/bookmarks.jpg" class="initLibrary img-responsive" alt="">'+ + //' </a>' + + //' <div class="chkbox"></div>' + + htmlBtn + + ' </div>' + + '</li>'; + htmlBtn = ' <a href="javascript:;" class="openFolder filter-folder-gallery" data-name="" data-key="files">'+ + '<div class="center">' + + '<span class="titleAlbum"><i class="fa fa-file-text-o"></i> '+trad.files+'</span><br/><br/>'+ + '<span>'+trad.explainfile+'</span>'+ + '</div>'+ + ' </a>'; + + html += '<li class="content_folder_file mix library-img no-padding" data-cat="1">'+ + ' <div class="portfolio-item portfolio-item-album">'+ + //' <a class="thumb-info" href="'+v.imagePath+'" data-lightbox="all">'+ + ' <img src="'+moduleUrl+'/images/files.jpg" class="initLibrary img-responsive" alt="">'+ + //' </a>' + + //' <div class="chkbox"></div>' + + htmlBtn + + ' </div>' + + '</li>'; + return html; +} +function tagsFilter(tags){ + $.each(tags,function(oTag,oT){ + if( notEmpty( oTag ) ){ + //directory.multiTagsT.push(oTag); + //mylog.log(oTag); + showTag=oTag; + /*if(oTag.length > 10) + showTag=oTag.substring(0,10)+"...";*/ + filterHtml='<a class="btn btn-xs btn-link filterBookmarks '+slugify(oTag)+'Btn pull-right" data-tag="'+slugify(oTag)+'" '+ + 'href="javascript:;" onclick="filterBookmark(\''+addslashes(oTag)+'\',this)">'+ + "<span class='elipsis tagsElipsis'>#"+showTag+"</span> "+ + "<span class='badge'>"+oT.count+"</span>"+ + "</a><br/>"; + $("#listTags").append(filterHtml); + } + }); +} +function filterBookmark(tag,$this){ + $(".filterBookmarks").removeClass("active"); + $($this).addClass("active"); + showLoader('#Grid'); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/gallery/filter/type/"+itemType+"/id/"+itemId, + data: {tag:tag}, + success: function(data){ + //if(data.result) { + $("#Grid").html(""); + $.each(data, function(i, v){ + url=getViewUrl(i,v); + $("#Grid").append(url); + }); + bindButtonGalleryEvent(); + /*} + else + toastr.error(data.msg);*/ + }, + dataType: "json" + }); +} +</script> \ No newline at end of file diff --git a/views/gantt/index.php b/views/gantt/index.php new file mode 100755 index 0000000000000000000000000000000000000000..0be397e5e77e69ff74e9de24ea342b4ea5408484 --- /dev/null +++ b/views/gantt/index.php @@ -0,0 +1,157 @@ +<?php +//Chargement du fichier en ligne +$cssAnsScriptFilesModule = array( + '/assets/css/timesheet.css/timesheet.css', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); +Yii::import('ext.timesheetphp.sources.timesheet', true); +?> + +<style> + .lightgray{ + background-color: rgba(0, 0, 0, 0.15); + } + .hoverScale div{ + font-size:small; + } +</style> +<div class="parentTimeline"> +<div class="panel panel-white"> + <div class="panel-heading border-light bg-azure"> + <h4 class="panel-title"><span><i class="fa fa-tasks"></i> <?php echo $podtitle ?></span></h4> + </div> + <div class="panel-tools"> + <?php if ($edit) { + $tasksSerialize = base64_encode(serialize($tasks)); + $tasksSerialize = str_replace('"','/"',$tasksSerialize); + $urlArray = '&tasks={'.$tasksSerialize.'}'; + ?> + <a class="edit-timesheet btn btn-xs btn-light-blue tooltips" data-toggle="tooltip" data-placement="top" title="<?php echo Yii::t("gantt","Edit timeline",null,Yii::app()->controller->module->id) ?>" alt="" onclick="showElementPad('addtimesheet')"> + <i class="fa fa-pencil"></i> Ajouter / modifier des tâches + </a> + <?php } ?> + </div> + <?php if(isset($tasks) && !empty($tasks)){ ?> + <div class="panel-body no-padding partition-dark"> + <ul id="timesheetTab" class="nav nav-tabs no-margin"> + + <?php if($period == "yearly"){ ?> + <li class="active"> + <a href="#users_tab_attending" data-toggle="tab"> + <span> + <?php echo Yii::t("gantt","Yearly",null,Yii::app()->controller->module->id) ?> + </span> + </a> + </li> + <?php } else { ?> + <li class="back"> + <a href="#users_tab_attending" data-toggle="tab"> + <span> + <?php echo Yii::t("common","Back") ?> + </span> + </a> + </li> + <li class="active"> + <a href="#users_tab_attending" data-toggle="tab"> + <span> + <?php echo $period; ?> + </span> + </a> + </li> + <?php } ?> + </ul> + <?php + //***** GENERATE TIMESHEET MODULE *****// + $alpha =array(); + $data=array(); + $firstYear=""; + $endYear=""; + $nbYear=0; + foreach ($tasks as $val){ + if ($period == "yearly"){ + if (!empty($firstYear)){ + if ($firstYear > date('Y',strtotime($val["startDate"]))) + $firstYear = date('Y',strtotime($val["startDate"])); + }else{ + $firstYear = date('Y',strtotime($val["startDate"])); + } + if ($endYear < date('Y',strtotime($val["endDate"]))) + $endYear = date('Y',strtotime($val["endDate"])); + } + if($period != "yearly"){ + $startDate=date("m-d",strtotime($val["startDate"])); + $endDate=date("m-d",strtotime($val["endDate"])); + $array = array(array('color'=> $val["color"],'start' => $val["startDate"],'end' => $val["endDate"],'key'=>$val["key"])); + }else + $array = array(array('color'=> $val["color"],'start' => $val["startDate"],'end' => $val["endDate"],'key'=>$val["key"])); + $data[$val["name"]]=$array ; + } + /**MAKE THE SCALE OF TIMESHEET**/ + if ($period == "yearly"){ + for ($date = $firstYear; $date <= $endYear;$date++) { + array_push($alpha,$date); + $nbYear++; + } + $alpha_first=$firstYear; + $omega_base=12; + $date_format='d M Y'; + $timesheet_format='Y-m-d'; + } + else{ + $alpha = array('Janv', 'Fev', 'Mar', 'Avr', 'Mai', 'Jun', 'Juil', 'Août', 'Sept', 'Oct', 'Nov', 'Dec'); + $alpha_first=1; + $omega_base=31; + $date_format='d M'; + $timesheet_format='m-d'; + } + $args = array( + 'id' => 'year', /* CSS #ID of the timesheet */ + 'theme' =>'white', /* Theme white (or null for dark) */ + 'alpha_first' => $alpha_first, /* The number of the first month is one (Janv) */ + 'omega_base' => $omega_base, /* 31 days in 1 month (for simplify) */ + /*'line' => date('m-d'), */ /* Today in format 'm-d' */ + /*'line_text' => "Aujourd'hui", */ /* Text to display for the line */ + 'format'=> array( + "segment_des" => 'du %s au %s', + "timesheet_format" => $timesheet_format, + "date_format" => $date_format, + ) + ); + $timeline = new timesheet($alpha, $args, $data); + $timeline -> display();?> + </div> + <?php } else {?> + + <div id="infoPodOrga" class="padding-10"> + <blockquote> + <?php echo Yii::t("gantt","Create Gantt with<br/>Tasks<br/>Deadlines<br/>Priorities<br/>To think, develop, build and shows next steps of the project to everyone",null,Yii::app()->controller->module->id) ?></blockquote> + </div> + <?php } ?> +</div> +</div> +<script type="text/javascript"> +var booleanYearMonth= "<?php echo $period; ?>"; +var edit = "<?php echo $edit; ?>"; +jQuery(document).ready(function() { + if (booleanYearMonth == "yearly"){ + $('.scale section').mouseover(function(){ + $(this).addClass("lightgray"); + }).mouseout(function(){ + $(this).removeClass("lightgray"); + }); + $('.scale section div').click(function(){ + $("#year").fadeOut("slow"); + year=$(this).html(); + getAjax(".timesheetphp",baseUrl+"/"+moduleId+"/gantt/index/type/<?php echo $_GET["type"];?>/id/<?php echo $_GET["id"];?>/year/"+year+"/isAdmin/"+edit,null,"html"); + }); + } + + $("#year").fadeIn("slow"); + + $(".back").click(function(){ + $("#year").fadeOut("slow"); + getAjax(".timesheetphp",baseUrl+"/"+moduleId+"/gantt/index/type/<?php echo $_GET["type"];?>/id/<?php echo $_GET["id"];?>/isAdmin/"+edit,null,"html"); + }); + +}); +</script> \ No newline at end of file diff --git a/views/interoperability/co-osm.php b/views/interoperability/co-osm.php new file mode 100644 index 0000000000000000000000000000000000000000..f6531ed34e985b21f9faf376e33e08e622c4d4b2 --- /dev/null +++ b/views/interoperability/co-osm.php @@ -0,0 +1,405 @@ +<?php +$cssAnsScriptFilesModule = array( + '/js/default/directory.js', + '/js/interoperability/interoperability.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , + Yii::app()->theme->baseUrl. '/assets'); + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath, + "page" => "interoperability") ); +?> + +<?php $this->renderPartial($layoutPath.'breadcrum_communexion', array("type"=>@$type)); ?> + +<style type="text/css"> + +.detail_one_element { + + text-align: center; + margin-top: 20px; + margin-bottom: 20px; + border: 2px solid black; + border-radius: 20px; + /*padding: 10px;*/ + padding-top: 20px; + padding-bottom: 20px; + +} + +</style> + +<div style='text-align:center;'> + <button style="margin-top: 15px;" class="btn btn-default" id="start-search-osm"> + <i class="fa fa-search"></i> Lancer la recherche + </button> +</div> + +<div style="" id="detail_one_element" class="col-xs-offset-3 col-xs-6"> + +</div> + +<div id="all_osm_elements" class="bg-white col-xs-12"> + +</div> + +<script type="text/javascript"> + +$("#start-search-osm").click(function(){ + $('#detail_one_element').html(""); + initSearchOSM(); +}); + +$("#testDynForm").click(function(){ + OpenDynForm(); +}); + +jQuery(document).ready(function() { + initKInterface({"affixTop":320}); +}); + +function displayOSMdetail(eltID, typedef) { + + $('#detail_one_element').html( + "<h3>Détails de l'élémént OSM N° "+eltID+"</h3><br/>" + ); + + $.ajax({ + type: "GET", + url : "http://api.openstreetmap.org/api/0.6/node/"+eltID, + dataType: "xml", + error: function (data){ + mylog.log("ERROR NODE DETAIL", data); + }, + success: function(data){ + + data_node = xmlToJson(data); + mylog.log('LE DETAIL DU NOEUD', data_node); + + $("#detail_one_element").append( + "<table class='table table-striped col-xs-12'>"+ + "<thead>"+ + "<tr>"+ + "<th>Nom du tag</th>"+ + "<th>Valeur du tag</th>"+ + "</tr>"+ + "</thead>"+ + "<tbody id='one_element_table'>"+ + "</tbody>"+ + "</table>" + ); + + list_tags_osm = []; + + if (Array.isArray(data_node.osm.node.tag)) { + + $.each(data_node.osm.node.tag, function(index, value) { + $("#one_element_table").append( + "<tr><td>" + value.attributes.k + " </td><td> " + value.attributes.v + "</td></tr>" + ); + list_tags_osm.push(value.attributes.k); + }); + } else if (typeof data_node.osm.node.tag == "object") { + $("#detail_one_element").append( + "<br>" + data_node.osm.node.tag.attributes.k + " : " + data_node.osm.node.tag.attributes.v + "<br/>" + ); + } + + $("#detail_one_element").append("<br/><button style='margin-top20px;' class='btn btn-default' id='modif_tag_btn' data-id="+data_node.osm.node.attributes.id+">Ajouter/Modifier un tag</button>"); + + $("#add_tag_btn").click(function(){ + KScrollTo("#detail_one_element"); + + mylog.log("ON OUVRE LE DYNFORM POUR AJOUTER UN TAG OSM : "); + + var dynFormMapping = { + nodeID : $(this).data("id"), + tagname : $( "input:checked" ).val(), + }; + + OpenDynForm(dynFormMapping, $( "input:checked" ).val(), eltID, null); + }); + + $("#modif_tag_btn").click(function(){ + KScrollTo("#detail_one_element"); + + var type_action_modif = true; + + mylog.log("ON OUVRE LE DYNFORM POUR MODIFIER UN TAG OSM : "); + + var dynFormMapping = { + nodeID : $(this).data("id"), + // tagname : $( "input:checked" ).val(), + }; + + OpenDynForm(dynFormMapping, null, eltID, list_tags_osm); + }); + } + }); +} + +function OpenDynForm(mapping = null, tagname = null, eltID = null, list_tags_osm = null) { + + list_options = {}; + list_all_tag_osm = []; + + var list_tags_amenity = getAllValueForTagAmenityOSM(); + var list_tags_place = getAllValueForTagPlaceOSM(); + var list_tags_office = getAllValueForTagOfficeOSM(); + var list_tags_leisure = getAllValueForTagLeisureOSM(); + var list_tags_shop = getAllValueForTagShopOSM(); + + $.each(list_tags_amenity, function(index, value) { + $.each(value, function(index, value) { + list_all_tag_osm.push(value); + }) + }); + + $.each(list_tags_place, function(index, value) { + $.each(value, function(index, value) { + list_all_tag_osm.push(value); + }) + }); + + $.each(list_tags_office, function(index, value) { + $.each(value, function(index, value) { + list_all_tag_osm.push(value); + }) + }); + + $.each(list_tags_leisure, function(index, value) { + $.each(value, function(index, value) { + list_all_tag_osm.push(value); + }) + }); + + $.each(list_tags_shop, function(index, value) { + $.each(value, function(index, value) { + list_all_tag_osm.push(value); + }) + }); + + list_options["Tag à modifier"] = {}; + list_options["Tag à modifier"].label = "Tag à modifier"; + list_options["Tag à modifier"].options = {}; + $.each(list_tags_osm, function(index, value) { + list_options["Tag à modifier"].options[value] = value; + }); + + list_type_element = {}; + list_type_element["Type de l'élément"] = {}; + list_type_element["Type de l'élément"].label = "Type de l'élément"; + list_type_element["Type de l'élément"].options = {}; + list_type_element["Type de l'élément"].options.amenity = "Amenity"; + list_type_element["Type de l'élément"].options.place = "Lieu"; + list_type_element["Type de l'élément"].options.office = "Bâtiment administratif", + list_type_element["Type de l'élément"].options.leisure = "Loisir", + list_type_element["Type de l'élément"].options.shop = "Boutique", + + mylog.log('LA LISTE DE TOUTES LES OPTIONS DU SELECT EST : ' , list_options); + mylog.log('LISTE TAG OSM', list_tags_osm); + + var form = { + saveUrl : baseUrl+"/"+moduleId+"/interoperability/co-osm-push-tag", + icon : "group", + type : "object", + dynForm : { + jsonSchema : { + title : "Ajouter un tag dans l'élément OSM : N° "+eltID, + icon : "fa-group", + afterSave : function(data){ + mylog.log("ON LANCE L'AFTER SAVE", data); + dyFObj.closeForm(); + }, + properties : { + // type : dyFInputs.inputSelect("Type d'élément", "Type d'élément", elementTypes, { required : true }), + // name : "Nom de l'élément Wikipédia", + user : dyFInputs.email("Votre email OSM"), + pwd : dyFInputs.password("Votre mot de passe OSM"), + nodeID : dyFInputs.inputHidden(), + // tagsvalue : dyFInputs.inputSelect("Type d'élément", "Type de l'élément", test_array, { required : true }), + // tagname : dyFInputs.inputSelect("Nom du tag", "Nom du tag", tagname_list, { required : true }), + tagname : { + label : "Tag à modifier", + inputType : "select", + class : "", + groupOptions : list_options, + }, + tagvalue : dyFInputs.inputText("Nouvelle valeur du tag","Nouvelle valeur du tag"), + tagnewname : { + label : "Type à ajouter (modifier si déjà présent)", + inputType : "select", + class : "", + groupOptions : list_type_element, + }, + tagnewvalue : { + inputType : "tags", + placeholder : "Ex : coffee", + values : list_all_tag_osm, + label : "Valeur du type de l'élément", + }, + + } + } + } + }; + + dyFObj.openForm(form, null, mapping); + $(".modal-header").addClass("bg-dark"); +} + +// Changes XML to JSON +function xmlToJson(xml) { + + // Create the return object + var obj = {}; + + if (xml.nodeType == 1) { // element + // do attributes + if (xml.attributes.length > 0) { + obj["attributes"] = {}; + for (var j = 0; j < xml.attributes.length; j++) { + var attribute = xml.attributes.item(j); + obj["attributes"][attribute.nodeName] = attribute.nodeValue; + } + } + } else if (xml.nodeType == 3) { // text + obj = xml.nodeValue; + } + + // do children + if (xml.hasChildNodes()) { + for(var i = 0; i < xml.childNodes.length; i++) { + var item = xml.childNodes.item(i); + var nodeName = item.nodeName; + if (typeof(obj[nodeName]) == "undefined") { + obj[nodeName] = xmlToJson(item); + } else { + if (typeof(obj[nodeName].push) == "undefined") { + var old = obj[nodeName]; + obj[nodeName] = []; + obj[nodeName].push(old); + } + obj[nodeName].push(xmlToJson(item)); + } + } + } + return obj; +}; + +function initSearchOSM() { + + var amenity_filter = ""; + + if (communexion.state == true) { + var geoShape = getGeoShapeForOsm(communexion.values.geoShape); + var geofilter = getGeofilterPolygon(communexion.values.geoShape); + var city_wikidataID = communexion.values.wikidataID; + var city_insee = communexion.values.inseeCode; + } else { + scope_value = getScopeValue(); + getCityDataByInsee(scope_value); + + var geoShape = getGeoShapeForOsm(city_data.geoShape); + var geofilter = getGeofilterPolygon(city_data.geoShape); + var city_wikidataID = city_data.wikidataID; + var city_insee = city_data.insee; + } + + var url_osm = 'http://overpass-api.de/api/interpreter?data=[out:json];node["name"](poly:"'+geoShape+'");out 100;'; + + var pos = url_osm.indexOf("="); + var url_head = url_osm.substr(0, pos+1); + var url_param = url_osm.substr(pos +1); + var url_osm_final = url_head + encodeURI(url_param); + + mylog.log("URL OSM" , url_osm_final); + + $.ajax({ + type: "GET", + url : url_osm_final, + dataType: "json", + error: function (data){ + mylog.log("ERROR OSM SEARCH"); mylog.dir(data); + }, + success: function(data){ mylog.log("SUCCES OSM SEARCH", data); //mylog.dir(data); + + all_elements = data; + + var typedef = ""; + + $("#all_osm_elements").html(' '); + + $("#all_osm_elements").append( + "<table class='table table-striped'>"+ + "<thead>"+ + "<true>"+ + "<th>Noeuds</th>"+ + "<th>Tags associés</th>"+ + "<th>Lien vers la page OSM</th>"+ + "</tr>"+ + "</thead>"+ + "<tbody id='body_table_osm'>"+ + "</tbody>"+ + "</table>" + ); + + var icon_type = ""; + var tr_class = ""; + + $.each(data.elements, function(index,value) { + + if (typeof value.tags.amenity !== "undefined") { + icon_type = '<i class="fa fa-exclamation"></i>'; + } else if (typeof value.tags.shop !== "undefined") { + icon_type = '<i class="fa fa-shopping-cart"></i>'; + } else if (typeof value.tags.place !== "undefined") { + icon_type = '<i class="fa fa-map-marker"></i>'; + } else if (typeof value.tags.office !== "undefined") { + icon_type = '<i class="fa fa-industry"></i>'; + } else if (typeof value.tags.leisure !== "undefined") { + icon_type = '<i class="fa fa-thumb-o-up"></i>'; + } else { + icon_type = '<i class="fa fa-warning"></i>'; + } + + if (typeof value.tags.amenity !== 'undefined' || typeof value.tags.shop !== "undefined" || typeof value.tags.place !== "undefined" || typeof value.tags.office != "undefined" || typeof value.tags.leisure !== "undefined") { + + type_def = true; + $("#body_table_osm").append( + "<tr class='info'>"+ + "<td>"+value.tags.name+"</td>"+ + "<td>"+icon_type+" Type défini. "+Object.keys(value.tags).length+" tag(s) en tout <button class='btn btn-default btn_elt_detail' data-id="+value.id+" data-typedef="+type_def+">Voir tous les tags</button></td>"+ + "<td><a target='_blank' class='btn btn-default' href='http://www.openstreetmap.org/node/"+value.id+"'>Lien vers la page OSM de l'élément</a></td>"+ + "</tr>" + ); + } else { + + type_def = false; + + $("#body_table_osm").append( + "<tr class='warning'>"+ + "<td>"+value.tags.name+"</td>"+ + "<td>"+icon_type+"Type non défini ... mais "+Object.keys(value.tags).length+" autre(s) tag(s) défini(s)" + + "<button class='btn btn-default btn_elt_detail' data-id="+value.id+" data-typedef="+type_def+">Voir tous les tags</button></td>"+ + "<td><a target='_blank' class='btn btn-default' href='http://www.openstreetmap.org/node/"+value.id+"'>Lien vers la page OSM de l'élément<a/></td>"+ + "</tr>" + ); + } + }); + + $(".btn_elt_detail").click(function(){ + KScrollTo("#detail_one_element"); + displayOSMdetail($(this).data("id")); + $("#detail_one_element").addClass("detail_one_element"); + }); + } + }); +} + +</script> \ No newline at end of file diff --git a/views/interoperability/copedia.php b/views/interoperability/copedia.php new file mode 100644 index 0000000000000000000000000000000000000000..81b5bb644d660be3b9b90d8712abc2774ce5e394 --- /dev/null +++ b/views/interoperability/copedia.php @@ -0,0 +1,1474 @@ +<?php + +$cssAnsScriptFilesModule = array( + '/js/default/directory.js', + '/js/interoperability/interoperability.js', + '/js/interoperability/timeline-chart.js', +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +$d3jsscript = array( + '/plugins/d3/d3.v3.min.js', +); + +HtmlHelper::registerCssAndScriptsFiles($d3jsscript, Yii::app()->request->baseUrl); + +HtmlHelper::registerCssAndScriptsFiles( array('/css/default/directory.css', ) , + Yii::app()->theme->baseUrl. '/assets'); + +$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu +$this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath, + "page" => "interoperability") ); +?> + +<div id="container-scope-filter" class="col-md-10 col-sm-10 col-xs-12 padding-5"> + <?php $this->renderPartial($layoutPath.'breadcrum_communexion', array("type"=>@$type)); ?> +</div> + +<style> + +#all_wikilinks { + text-align: center; +} + +.wikipedia_elt { + text-align: center; + /*border: 2px solid black;*/ + margin: 10px; +} + +.wikipedia_elt { + position: relative; + height: 350px; + border-radius: 50px; + /*display: inline-block;*/ + /*vertical-align: top;*/ + /*margin: 35px 26px;*/ + padding: 25px; +/* width: 220px; + height: 110px;*/ + background: #F6F6F6; + /*font-size: 1.6em;*/ + /*line-height: 5em;*/ + /*font-family: Georgia, Times, Serif;*/ + /*text-align: center;*/ + background-image: linear-gradient(to bottom, rgb(218, 218, 218) 11%, #F6F6F6 56%); + box-shadow: 0 0 65px #aba9a6 inset, 0 0 20px #969696 inset; +} + +.div-wikipage { + padding: 10px; + /*margin-bottom: 10px;*/ +} + +.searchWikiEntityContainer { + min-height: 150px; + /*margin: bottom: 10px;*/ +} + +.btn-wiki-wikitoco, .btn-wiki-cotowiki, .btn-wiki-copedia { + margin-top: 10px; + margin-right: 5px; +} + + + +#cityDetail .col-sm-4,#cityDetail .col-sm-8{ + padding:5px !important; +} +#cityDetail .panel{ + margin-bottom:10px !important; +} + +.panel-title{ + font-family: "Homestead"; +} +.link-to-directory{ + cursor:pointer; +} +.link-to-directory:hover{ + text-decoration: underline; +} +.btn-to-directory{ + width:100%; + margin-top: 10px; + font-weight: 500; +} + +#btn-communecter{ + width: auto; + font-size: 20px; + border-radius: 10px; + border: none; + position: absolute; + top: 10px; + right: 5%; + z-index:1; + background-color: rgba(255, 255, 255, 0.63); + padding-bottom: 5px; + box-shadow: 0px 0px 3px 3px RGBA(114, 114, 114, 0.31); +} +#btn-communecter small{ + font-size:16px; + word-break: normal; +} +#btn-communecter:hover{ + background-color: #E33551; + color:white !important; +} +h1.cityName-header{ + background-color: rgba(255, 255, 255, 0.63); + padding: 30px 10px; + margin-bottom: -3px; + font-size: 32px; + border-radius: 5px; + display: inline-block; + width: 100%; +} + +h1.you-live{ + font-size: 18px !important; + padding: 10px; + border-radius: 0px; + margin: -5px -5px 5px; + font-weight: 300 !important; + margin-bottom: 0px; +} +.why-communect{ + font-size:17px; + font-weight: 300; + margin-top:7px; +} +.margin-top-20{ + margin-top:20px !important; +} +.btn-discover-more { + font-size:17px; + white-space: unset; +} +.info-why{ + font-weight: 300; + height: 80px; +} +@media screen and (max-width: 1024px) { + #btn-communecter{ + font-size:17px; + } + h1.you-live{ + font-size:26px !important; + } + +} + +.picture_element { + + max-width: 350px; + max-height: 350px; +} + +#pod-local-actors .list-group-item { + position: relative; + padding: 10px 5px; + margin-bottom: -1px; + background-color: #FFF; + border: 1px solid #DDD; + display: inline-block; + height: 125px; + text-align: center; + font-family: "homestead"; + font-size: 17px; + border-radius: 0px; + border-right: 0px; + border-top: 0px; + margin-top: 1px; +} + +#pod-local-actors .list-group-item:hover { + z-index: 1; + text-decoration: none !important; + -moz-box-shadow: 0px 0px 5px -1px #656565; + -webkit-box-shadow: 0px 0px 5px -1px #656565; + -o-box-shadow: 0px 0px 5px -1px #656565; + box-shadow: 0px 0px 5px -1px #656565; + filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=NaN, Strength=5); +} +#pod-local-actors .list-group-item .badge { + font-size: 14px; + font-family: Helvetica; + width: 50px; + height: 20px; + border-radius: 20px; + padding-top: 5px; + top: 11px; + right: 20px; + text-align: center; +} + + +.pod-local-actors .list-group-item .badge { + font-size: 14px; + font-family: Helvetica; + width: 50px; + height: 20px; + border-radius: 20px; + padding-top: 5px; + top: 11px; + right: 20px; + text-align: center; +} + +.leaflet-popup-content .pod-local-actors .list-group-item { + position: relative; + display: block; + padding: 10px 5px; + margin-bottom: -1px; + background-color: #FFF; + width: 50%; + text-align: center; + height: 60px; + border: 1px solid #DDD; + font-weight: 500; +} +/*view randomOrga*/ + +#div-discover .btn-discover{ + border-radius: 60px; + font-size: 28px; + font-weight: 200; + border: 1px solid transparent; + width: 65px; + height: 65px; + margin-bottom: 5px; + padding-top: 12px; +} +#div-discover .btn-discover.bg-red{ + /*font-size: 43px;*/ + /*padding-top: 12px;*/ +} +#div-discover .btn-discover.bg-orange:hover{ + background-color: white !important; + border-color: #FFA200 !important; + color: #FFA200 !important; +} +#div-discover .btn-discover.bg-yellow:hover{ + background-color: white !important; + border-color: #FFC600 !important; + color: #FFC600 !important; +} +#div-discover .btn-discover.bg-purple:hover{ + background-color: white !important; + border-color: #8C5AA1 !important; + color: #8C5AA1 !important; +} +#div-discover .btn-discover.bg-green:hover{ + background-color: white !important; + border-color: #93C020 !important; + color: #93C020 !important; +} +#div-discover .btn-discover.bg-red:hover{ + background-color: white !important; + border-color: #E33551 !important; + color: #E33551 !important; +} + +#div-participate .btn-participate{ + border-radius: 60px; + font-size: 50px; + font-weight: 200; + border: 1px solid transparent; + width: 120px; + height: 120px; + padding-top:20px; +} +#div-participate .btn-participate:hover{ + background-color: white !important; + border-color: #E33551 !important; + color: #E33551 !important; +} + +.badge.nb-localactors{ + margin-left: -20px; + margin-top: -15px; + font-size: 18px; + margin-right: -10px; + border: #fff solid 3px; + border-radius: 50%; + font-weight: 300; +} + +@media screen and (max-width: 768px) { + + h1.cityName-header{ + margin-top:0px; + font-size:20px; + } + #pod-local-actors .list-group-item{ + height:90px; + font-size:13px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-weight: 300; + text-transform: capitalize; + } + #btn-communecter{ + top:10px; + } + + #div-discover .btn-discover{ + border-radius: 30px; + font-size: 24px; + font-weight: 200; + border: 1px solid transparent; + width: 60px; + height: 60px; + margin-bottom: 5px; + padding-top: 12px; + } +} + +.homestead { + font-family: "Homestead"; +} + +@media screen and (max-width: 1024px) { + + #div-discover .discover-subtitle{ + display:none; + + } + +} + +#chart { + width: 90%; + height: 150px; + background: rgb(218, 218, 218); + opacity: 0.9; + border-radius: 5px; + border: 1px solid #2b2b2b; + margin-bottom: 30px; + margin-top: 30px; +} + +#chart line { + stroke: #2b2b2b; +} + +#chart line.vertical-marker.now { + stroke: #c00; +} + +rect.interval.red-interval { + fill: red; + stroke: red; +} + +circle.red-dot { + fill: red; +} + +circle.orange-dot { + fill: orange; +} + +circle.green-dot { + fill: green; +} + +circle.yellow-dot { + fill: yellow; +} + +/* Override d3tip */ + +.d3-tip { + background: white; + color: black; +} + +/* Tiny Flex Grid */ + +[flex] { + display: flex; +} +[flex-fill] { + flex: 1; +} +[flex-full-center] { + align-items: center; + justify-content: center; +} +[flex-direction=column] { + flex-direction: column; +} +[flex-direction=row] { + flex-direction: row; +} +[flex-size="40"] { + flex: 40; +} +[flex-size="60"] { + flex: 60; +} + +/*TIMELINE CHART CSS */ + +.timeline-chart .axis path { + fill: none; + stroke: none; } + +.timeline-chart line { + stroke: black; } + +.timeline-chart .vertical-marker { + stroke-width: 1; } + +.timeline-chart rect, .timeline-chart rect.chart-bounds { + fill: transparent; } + +.timeline-chart rect.chart-bounds:hover, .timeline-chart rect.interval:hover { + cursor: -webkit-grab; + cursor: grab; } + +.timeline-chart rect.chart-bounds:active, .timeline-chart rect.interval:active { + cursor: -webkit-grabbing; + cursor: grabbing; } + +.timeline-chart .dot:hover { + cursor: pointer; } + +.timeline-chart .interval-text { + pointer-events: none; } + +.timeline-chart rect.interval { + ry: 5; + rx: 5; + fill: black; + stroke: #2b2b2b; } + +</style> + +<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.css" /> +<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" /> --> +<link rel="stylesheet" href="https://rawgithub.com/Caged/d3-tip/master/examples/example-styles.css" /> + +<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/0.0.1/prism.min.js"></script> + +<script src="https://cdnjs.cloudflare.com/ajax/libs/d3-tip/0.6.7/d3-tip.min.js"></script> + +<!-- <center><h3>Copédia : vue d'essemble de la page Wiki de : <a id="wiki_title" target="_blank"></a></h3></center> --> +<br/> + +<div id="main-container-copedia" class="col-xs-12 bg-white"> + + <div id="all_wikilinks" class="col-xs-12"></div> + <h4><p id="type_element"></p></h4> + <div id="btn_add_type"></div> + + <div id="all_properties" class="col-xs-12"> + <!-- <h4>Liste de toutes les propriétés de l'élément Wikidata</h4> + --> + </div> + + <div id="div-discover" class="col-md-12 col-sm-12 col-lg-12 col-xs-12"> + <div class="col-md-12 no-padding" style="margin:10px"> + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-event bg-orange"> + <i class="fa fa-calendar"></i> + </a> + <span class="badge nb-localactors nb-event bg-orange homestead">0</span> + <br> + <span class="text-orange discover-subtitle homestead">Evénement + </span> + </div> + + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-orga bg-green"> + <i class="fa fa-group"></i> + </a> + <span class="badge nb-localactors nb-orga bg-green homestead">0</span> + <br> + <span class="text-green discover-subtitle homestead">Organisation + </span> + </div> + + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-location bg-purple"> + <i class="fa fa-lightbulb-o"></i> + </a> + <span class="badge nb-localactors nb-location bg-purple homestead">0</span> + <br> + <span class="text-purple discover-subtitle homestead">Lieu + </span> + </div> + + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-human bg-yellow"> + <i class="fa fa-user"></i> + </a> + <span class="badge nb-localactors nb-human bg-yellow homestead">0</span> + <br> + <span class="text-yellow discover-subtitle homestead">Personne + </span> + </div> + + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-other bg-green"> + <i class="fa fa-question"></i> + </a> + <span class="badge nb-localactors nb-other bg-green homestead">0</span> + <br> + <span class="text-green discover-subtitle homestead">Autres + </span> + </div> + <div class="col-xs-2 center no-padding hidden-xs" style="margin-bottom:10px; font-size:17px; font-weight: 300;"> + <a class="btn btn-discover btn-discover-undefined bg-red"> + <i class="fa fa-close"></i> + </a> + <span class="badge nb-localactors nb-not-defined bg-red homestead">0</span> + <br> + <span class="text-red discover-subtitle homestead">Indéfini + </span> + </div> + </div> + + <center> + + <button class="btn btn-default list_all_wikidata_item" style="margin: 20px;"> + List all Wikidata elements of the city + </button> + + <button class="btn btn-default list_all_wikipedia_article" style="margin: 20px;"> + All wikipédia links in the Wiki page of the city + </button> + + <br> + + <h4 id="wiki_title"></h4> + <div id="chart"></div> + </center> + </div> + + <div style="margin-top: 20px;" id="all_wikidata_item"></div> + <div class="col-xs-offset-1" style="margin-top: 20px;" id="all_wikipedia_item"></div> + +</div> + +<?php + + $curl = curl_init(); + + $wikidataID_pos = strrpos($url_wiki, 'Q', -1); + $wikidataID = substr($url_wiki, $wikidataID_pos); + + curl_setopt($curl, CURLOPT_URL, "https://test.wikidata.org/w/api.php?action=wbgetclaims&format=json&entity=".$wikidataID); + + curl_setopt($curl, CURLOPT_POST, true); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + $list_properties = curl_exec($curl); + + curl_close($curl); +?> + +<script type="text/javascript"> + + // initVarAndFunction(); + + $("#chart").hide(); + + $(".list_all_wikidata_item").click(function(){ + wikidataID = getWikidataID(); + initVarAndFunction(); + listAllWikidataItems(wikidataID); + }); + + $(".list_all_wikipedia_article").click(function() { + wikidataID = getWikidataID(); + initVarAndFunction(); + listAllWikipediaArticle(wikidataID); + }); + + function initVarAndFunction() { + nb_person = 0; + nb_event = 0; + nb_location = 0; + nb_other = 0; + nb_undefined = 0; + nb_orga = 0; + final_all_wikilinks = {} + chronoline = [ + { + label: 'Evénement', + data: [{ + }] + }, + { + label: 'Organisations', + data: [{ + }] + }, + { + label: 'Personnes', + data: [{ + }] + }]; + + $("#wiki_title").html("Vue d'enssemble de la page Wikipédia : "); + + } + + function listAllWikidataItems(wikidataID) { + + $.ajax({ + url:"https://query.wikidata.org/sparql?format=json&query=SELECT%20DISTINCT%20%3Fitem%20%3FitemLabel%20%3FitemDescription%20%3Fcoor%20%3Frange%20%3Ftype%20%3FtypeLabel%20WHERE%20{%0A%20%3Fitem%20wdt%3AP131%20wd%3A"+wikidataID+".%0A%20%3Fitem%20%3Frange%20wd%3A"+wikidataID+".%0A%20%3Fitem%20wdt%3AP625%20%3Fcoor.%0A%20OPTIONAL{%3Fitem%20wdt%3AP31%20%3Ftype%20.}%0A%20SERVICE%20wikibase%3Alabel%20{%20bd%3AserviceParam%20wikibase%3Alanguage%20%22fr%22.%20}%0A}", + type:"GET", + dataType: "json", + success:function(data) { + mylog.log('ALL WIKIDATA ITEMS OF THIS CITY : ', data); + all_wikidata_item = data; + displayAllWikidataItem(all_wikidata_item.results.bindings); + } + }); + } + + function displayAllWikidataItem(all_wikidata_item) { + + $("#all_wikipedia_item").html(""); + $("#all_wikidata_item").html( + "<table class='table table-striped'>"+ + "<thead>"+ + "<true>"+ + "<th>NOM</th>"+ + "<th>TYPE</th>"+ + "<th>DESCRIPTION</th>"+ + "<th>Lien vers la page Wikidata</th>"+ + "</tr>"+ + "</thead>"+ + "<tbody class='col-xs-10' id='body_table_wikidata'>"+ + "</tbody>"+ + "</table>" + ); + + $.each(all_wikidata_item, function(index, value) { + + var wikiID = value.item.value.substr(value.item.value.lastIndexOf("/")+1); + + if (typeof value.itemDescription !== "undefined") { + if (typeof value.typeLabel !== "undefined") { + $("#body_table_wikidata").append( + "<tr class='info col-xs-12'>"+ + "<td>"+value.itemLabel.value+"</td>"+ + "<td>"+value.typeLabel.value+"</td>"+ + "<td>"+value.itemDescription.value+"</td>"+ + "<td><a target='_blank' class='btn btn-default' href='"+value.item.value+"'>Link to WIKIDATA</a></td>"+ + "</tr>" + ); + } else { + $("#body_table_wikidata").append( + "<tr class='info'>"+ + "<td>"+value.itemLabel.value+"</td>"+ + "<td class='danger'>Type non défini ! <button class='put_claim' data-name='"+value.itemLabel.value+"' data-id='"+wikiID+"'>Ajouter un type</button></td>"+ + "<td>"+value.itemDescription.value+"</td>"+ + "<td><a target='_blank' class='btn btn-default' href='"+value.item.value+"'>Link to WIKIDATA</a></td>"+ + "</tr>" + ); + } + } else { + if (typeof value.typeLabel !== "undefined") { + $("#body_table_wikidata").append( + "<tr class='info'>"+ + "<td>"+value.itemLabel.value+"</td>"+ + "<td>"+value.typeLabel.value+"</td>"+ + "<td class='danger'>No description <button data-name='"+value.itemLabel.value+"' data-id='"+wikiID+"' class='put_description'> Put a description </button></td>"+ + "<td><a target='_blank' class='btn btn-default' href='"+value.item.value+"'>Link to WIKIDATA</a></td>"+ + "</tr>" + ); + } else { + $("#body_table_wikidata").append( + "<tr class='info'>"+ + "<td>"+value.itemLabel.value+"</td>"+ + "<td class='danger'>Type non défini ! <button class='put_claim' data-name='"+value.itemLabel.value+"' data-name='"+value.itemLabel.value+"' data-id='"+wikiID+"'>Ajouter un type</button></td>"+ + "<td class='danger'>No description <button data-id='"+wikiID+"' class='put_description'> Put a description</button></td>"+ + "<td><a target='_blank' class='btn btn-default' href='"+value.item.value+"'>Link to WIKIDATA</a></td>"+ + "</tr>" + ); + } + } + }); + + $(".put_description").click(function(){ + OpenDynFormForPutDescriptionOnWikidataElt($(this).data('id'), $(this).data('name')); + }); + + $(".put_claim").click(function() { + OpenDynFormForPutClaimOnWikidataElt($(this).data('id'), $(this).data('name')); + }); + } + + function getWikidataID() { + + city_id = getCityId(); + city_data = getCityDataById(city_id, "city"); + var city_wikidataID = city_data.wikidataID; + + return city_wikidataID; + } + + // function getCityDataByInsee(insee) { + + // $.ajax({ + // type: "GET", + // url: baseUrl + "/co2/interoperability/get/insee/"+insee, + // async: false, + // success: function(data){ + // mylog.log("succes get CityDataByInsee", data); //mylog.dir(data); + // if ((Object.keys(data).length) <= 1) { + // $.each(data, function(index, value) { + // city_data = value; + // }); + // } + // else { + // city_data = data; + // } + // } + // }); + // return city_data; + // } + + function OpenDynFormForPutDescriptionOnWikidataElt(wikidataID, itemLabel) { + + var dynFormMapping = { + wikidataID : wikidataID, + }; + + var form = { + saveUrl : baseUrl+"/"+moduleId+"/interoperability/wikidata-put-description", + icon : "group", + type : "object", + dynForm : { + jsonSchema : { + title : "Ajouter une description pour l'élément Wikidata : "+itemLabel, + icon : "fa-group", + afterSave : function(data){ + mylog.log("ON LANCE L'AFTER SAVE", data); + location.reload(); + dyFObj.closeForm(); + }, + properties : { + wikidataID : dyFInputs.inputHidden(), + description : dyFInputs.inputText("Description de l'élément","Entrez ici une description pour l'élément"), + } + } + } + }; + + dyFObj.openForm(form, null, dynFormMapping); + $(".modal-header").addClass("bg-dark"); + } + + function OpenDynFormForPutClaimOnWikidataElt(wikidataID, itemLabel) { + + var dynFormMapping = { + wikidataID : wikidataID, + }; + + var list_type_value = {}; + list_type_value["Type de l'élément"] = {}; + list_type_value["Type de l'élément"].label = "Type de l'élément"; + list_type_value["Type de l'élément"].options = {}; + list_type_value["Type de l'élément"].options.human = "Personne"; + list_type_value["Type de l'élément"].options.location = "Lieu"; + list_type_value["Type de l'élément"].options.organization = "Organisation"; + list_type_value["Type de l'élément"].options.event = "Evènement"; + + var form = { + saveUrl : baseUrl+"/"+moduleId+"/interoperability/wikidata-put-claim", + // saveUrl : "workspace/workspace/travail/WIKIDATA/test/oauthclient-php/test_2.php", + icon : "group", + type : "object", + dynForm : { + jsonSchema : { + title : "Ajouter une description pour l'élément Wikidata : "+ itemLabel, + icon : "fa-group", + afterSave : function(data){ + // location.reload(); + dyFObj.closeForm(); + }, + properties : { + wikidataID : dyFInputs.inputHidden(), + // claimID : dyFInputs.inputHidden(), + claim_value : { + label : "Type à ajouter", + inputType : "select", + class : "", + groupOptions : list_type_value, + }, + } + } + } + }; + + dyFObj.openForm(form, null, dynFormMapping); + $(".modal-header").addClass("bg-dark"); + } + + function listAllWikipediaArticle(wikidataID) { + + mylog.log('LE WIKIDATA ID DE LA VILLE : ', wikidataID); + + $.ajax({ + url: "https://www.wikidata.org/wiki/Special:EntityData/"+wikidataID+".json", + type:"GET", + dataType: "json", + success:function(data) { + // all_wikidatapage_data = data; + var label_dbpedia = data.entities[wikidataID].sitelinks.frwiki.title; + getAllWikipediaArticleForCopedia(label_dbpedia); + + $("#wiki_title").append("<a target='_blank' href='https://fr.wikipedia.org/wiki/"+label_dbpedia+"'>"+label_dbpedia+"</a>"); + }, + }); + } + + function getWikidataIDForOneElement(label_dbpedia, description, all_data) { + + $.ajax({ + url:"https://fr.wikipedia.org/w/api.php?action=query&prop=pageprops&ppprop=wikibase_item&redirects=1&format=json&titles="+label_dbpedia, + type:"GET", + dataType: "jsonp", + complete:function(data) { + mylog.log('WIKIDATA ID OF ONE ELEMENT ', data.responseJSON.query.pages); + wikidata_elt = data.responseJSON.query.pages; + + $.each(wikidata_elt, function(index, value) { + getTypeOneWikidataElt(value.pageprops.wikibase_item, label_dbpedia, description, all_data); + }); + }, + }); + } + + function getTypeOneWikidataElt(wikidataID, label_dbpedia, description, all_data) { + + mylog.log('LE WIKIDATA ID DE LELEMENT EST : ', wikidataID); + + var elt_label_dbpedia_sans_spec = label_dbpedia; + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/"'"/g, "_QUOTE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\'/g, "_SQUOTE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/ /g, "_SPACE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\./g, "_DOT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\&/g, "_AND_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\(/g, "_PAR-OUVRANT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\)/g, "_PAR-FERMANT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\,/g, "_VIRGULE_"); + + $.ajax({ + url:"https://query.wikidata.org/sparql?format=json&query=SELECT%20DISTINCT%20%3Ftype%20%3FtypeLabel%20%3Flieu%20%3Flocation%20%3Ftime%20%3Fstarttime%20%3Fendtime%20%3Finception%20%3Fbirthdate%20WHERE%20{%20%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP31%20%3Ftype}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP131%20%3Flieu}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP625%20%3Flocation}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP585%20%3Ftime}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP580%20%3Fstarttime}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP582%20%3Fendtime}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP571%20%3Finception}.%0A%20OPTIONAL{wd%3A"+wikidataID+"%20wdt%3AP569%20%3Fbirthdate}.%0A%20SERVICE%20wikibase%3Alabel%20{%20bd%3AserviceParam%20wikibase%3Alanguage%20%27fr%27.%20}%0A%0A}", + type:"GET", + dataType: "json", + success:function(data) { + + if (typeof data.results.bindings[0] !== "undefined") { + + final_all_wikilinks[label_dbpedia] = {}; + final_all_wikilinks[label_dbpedia].typeLabel = data.results.bindings; + final_all_wikilinks[label_dbpedia].description = description; + final_all_wikilinks[label_dbpedia].wikidataID = wikidataID; + + if (typeof data.results.bindings[0].typeLabel !== "undefined") { + + if (data.results.bindings[0].typeLabel.value == "être humain") { + nb_person++; + $('.nb-human').html(nb_person); + + if (typeof data.results.bindings[0].birthdate !== "undefined") { + + mylog.log('HUMAIN TROUVE AVEC UNE BIRTHDATE , ', data); + + var new_date = {}; + var date_array = data.results.bindings[0].birthdate.value.split("-"); + date_array[2] = date_array[2].substr(0,2); + + new_date.type = TimelineChart.TYPE.POINT; + new_date.at = new Date([date_array[0], date_array[1], date_array[2]]); + new_date.customClass = "yellow-dot"; + new_date.label_dbpedia = label_dbpedia; + + chronoline[2].data.push(new_date); + } + } + + if (typeof data.results.bindings[0].time !== "undefined" || typeof data.results.bindings[0].starttime !== "undefined") { + nb_event++; + $('.nb-event').html(nb_event); + + if (typeof data.results.bindings[0].time !== "undefined") { + + mylog.log('VOICI L EVENT EN DETAIL AVEC TIME', data); + var new_date = {}; + var date_array = data.results.bindings[0].time.value.split("-"); + date_array[2] = date_array[2].substr(0,2); + + new_date.type = TimelineChart.TYPE.POINT; + new_date.label = "TEST LABEL"; + new_date.at = new Date([date_array[0], date_array[1], date_array[2]]); + new_date.customClass = "orange-dot"; + new_date.label_dbpedia = label_dbpedia; + + chronoline[0].data.push(new_date); + } else if (typeof data.results.bindings[0].starttime !== "undefined") { + + if (typeof data.results.bindings[0].endtime !== "undefined") { + mylog.log('VOICI L EVENT EN DETAIL AVEC STARTIME ET UN ENDTIME', data); + + var new_date = {}; + var date_array_start = data.results.bindings[0].starttime.value.split("-"); + var date_array_end = data.results.bindings[0].endtime.value.split("-"); + date_array_start[2] = date_array_start[2].substr(0,2); + date_array_end[2] = date_array_end[2].substr(0,2); + + new_date.type = TimelineChart.TYPE.INTERVAL; + new_date.label = label_dbpedia; + new_date.from = new Date([date_array_start[0], date_array_start[1], date_array_start[2]]); + new_date.to = new Date([date_array_end[0], date_array_end[1], date_array_end[2]]); + new_date.customClass = "red-interval"; + new_date.label_dbpedia = label_dbpedia; + + chronoline[0].data.push(new_date); + } else { + mylog.log('VOICI L EVENT EN DETAIL AVEC UNIQUEMENT UN STARTIME', data); + + var new_date = {}; + var date_array_start = data.results.bindings[0].starttime.value.split("-"); + date_array_start[2] = date_array_start[2].substr(0,2); + + new_date.type = TimelineChart.TYPE.POINT; + new_date.at = new Date([date_array_start[0], date_array_start[1], date_array_start[2]]); + new_date.customClass = "orange-dot"; + new_date.label_dbpedia = label_dbpedia; + + chronoline[0].data.push(new_date); + } + } + } + + if (typeof data.results.bindings[0].location !== "undefined" || typeof data.results.bindings[0].lieu !== "undefined") { + nb_location++; + $('.nb-location').html(nb_location); + } + + if (typeof data.results.bindings[0].inception !== "undefined") { + nb_orga++; + $('.nb-orga').html(nb_orga); + + if (typeof data.results.bindings[0].inception !== "undefined") { + + mylog.log('ORGA TROUVEE AVEC UNE DATE DE CREATION , ', data); + + var new_date = {}; + var date_array = data.results.bindings[0].inception.value.split("-"); + date_array[2] = date_array[2].substr(0,2); + + new_date.type = TimelineChart.TYPE.POINT; + new_date.at = new Date([date_array[0], date_array[1], date_array[2]]); + new_date.customClass = "green-dot"; + new_date.label_dbpedia = label_dbpedia; + + chronoline[1].data.push(new_date); + } + } + + if (data.results.bindings[0].typeLabel.value !== "être humain" && typeof data.results.bindings[0].time == "undefined" && typeof data.results.bindings[0].starttime == "undefined" && typeof data.results.bindings[0].location == "undefined" && typeof data.results.bindings[0].lieu == "undefined" && typeof data.results.bindings[0].inception == "undefined") { + nb_other++; + $('.nb-other').html(nb_other); + } + $('#'+elt_label_dbpedia_sans_spec).html('<p style=text-align:center;>'+data.results.bindings[0].typeLabel.value+'</p>'); + } else { + $('#'+elt_label_dbpedia_sans_spec).html('<button id="put_type_'+wikidataID+'" class="put_type_wikipedia_btn" data-id="'+wikidataID+'">Ajouter un type (Wikidata)</button>'); + $('#'+elt_label_dbpedia_sans_spec).addClass('danger'); + nb_undefined++; + $('.nb-not-defined').html(nb_undefined); + } + } + + $('#link_'+elt_label_dbpedia_sans_spec).append( + '<a style="margin:10px;" class="btn btn-default" target="_blank" href="https://www.wikidata.org/wiki/'+wikidataID+'"><img style="max-height:50px;" src="'+moduleUrl+'/images/logos/logo-wikidata.png"/></a>' + ); + }, + error:function(data) { + mylog.log("IL Y A EU UNE ERREUR DANS LA RECUPERATION DU WIKIDATAID DE LELEMENT", data); + $('#'+elt_label_dbpedia_sans_spec).html('<b>Erreur requête API</b>'); + }, + complete:function(data) { + putEventForPushTypeWikidata(wikidataID, label_dbpedia); + displayChronoLine(label_dbpedia); + } + }); + } + + function putEventForPushTypeWikidata(wikidataID, label_dbpedia) { + + var elt_label_dbpedia_clean = label_dbpedia.replace(/_/g, " "); + + $("#put_type_"+wikidataID).click(function(){ + mylog.log('ON OUVRE LE DYNFORM POUR AJOUTER UNE PROPRIETE A L\'ELEMENT'); + OpenDynFormForPutClaimOnWikidataElt($(this).data('id'), elt_label_dbpedia_clean); + }); + } + + function putEventOnDiscoverButton() { + + // TODO One and only one function to clean the code + + // BTN DISCOVER HUMAN + + $(".btn-discover-human").off('click').click(function() { + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].typeLabel !== "undefined" && value.typeLabel[0].typeLabel.value == "être humain") { + mylog.log('HUMAIN TROUVE !!!!!!!!', value); + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'>"+value.typeLabel[0].typeLabel.value+"</p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + } + }); + putEventForCopediaLink(); + putEventForDetailElt(); + + }); + + // BTN DISCOVER EVENT + + $(".btn-discover-event").off('click').click(function() { + mylog.log(final_all_wikilinks); + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].time !== "undefined" || typeof value.typeLabel[0].starttime !== "undefined") { + mylog.log('EVENT TROUVE !!!!!!!!'); + elt_find = true; + if (value.typeLabel[0].typeLabel !== "undefined") { + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'>"+value.typeLabel[0].typeLabel.value+"</p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + } + } + }); + putEventForCopediaLink(); + putEventForDetailElt(); + + if (elt_find == false) { + mylog.log('AUCUN ELEMENT TROUVEE'); + $("#all_wikilinks").html('<h3>Aucune page Wikipédia trouvée</h3>') + } + + }); + + //BTN DISCOVER ORGA + + $(".btn-discover-orga").off('click').click(function() { + mylog.log(final_all_wikilinks); + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].inception !== "undefined") { + mylog.log('ORGA TROUVE !!!!!!!!'); + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'>"+value.typeLabel[0].typeLabel.value+"</p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + } + }); + putEventForCopediaLink(); + putEventForDetailElt(); + + }); + + // BTN DISCOVER LIEU + + $(".btn-discover-location").off('click').click(function() { + mylog.log(final_all_wikilinks); + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].location !== "undefined" || typeof value.typeLabel[0].lieu !== "undefined") { + mylog.log('LIEU TROUVE !!!!!!!!'); + elt_find = true; + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'>"+value.typeLabel[0].typeLabel.value+"</p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + } + }); + putEventForCopediaLink(); + putEventForDetailElt(); + + }); + + // BTN DISCOVER OTHER + + $(".btn-discover-other").off('click').click(function() { + mylog.log(final_all_wikilinks); + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].typeLabel !== "undefined" && typeof value.typeLabel[0].location == "undefined" && typeof value.typeLabel[0].lieu == "undefined" && typeof value.typeLabel[0].time == "undefined" && typeof value.typeLabel[0].starttime == "undefined" && value.typeLabel[0].typeLabel.value !== "être humain" && typeof value.typeLabel[0].inception == "undefined") { + mylog.log('AUTRE TROUVE !!!!!!!!'); + elt_find = true; + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'>"+value.typeLabel[0].typeLabel.value+"</p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + } + }); + + putEventForCopediaLink(); + putEventForDetailElt(); + + + }); + + // BTN DISCOVER UNDEFINED + + $(".btn-discover-undefined").off('click').click(function() { + mylog.log(final_all_wikilinks); + $('#all_wikipedia_item').html(''); + $.each(final_all_wikilinks, function(index, value) { + mylog.log('LELEMENT EST : ', index); + if (typeof value.typeLabel[0].typeLabel == "undefined") { + mylog.log('UNDEFINED TROUVE !!!!!!!!'); + elt_find = true; + var elt_label_dbpedia_clean = index.replace(/_/g, " "); + + $("#all_wikipedia_item").append( + "<div id='div_"+index+"' class='col-xs-5 wikipedia_elt'>"+ + + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+index+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+index+"'><button id='put_type_"+value.wikidataID+"' class='put_type_wikipedia_btn' data-id='"+value.wikidataID+"'>Ajouter un type (Wikidata)</button></p><br>"+ + "<p id='link_"+index+"'>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.dbpedia.org/ressource/"+index+"'><img style='max-height:50px;' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://fr.wikipedia.org/wiki/"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='margin:10px;' target='_blank' class='btn btn-default' href='https://www.wikidata.org/wiki/"+value.wikidataID+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+index+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + + putEventForPushTypeWikidata(value.wikidataID, elt_label_dbpedia_clean); + } + + putEventForCopediaLink(); + putEventForDetailElt(); + + }); + }); + } + + function putEventForCopediaLink() { + + elt_find = true; + + $(".copedia_link").off('click').click(function(){ + mylog.log('On appuie sur le lien COPEDIA'); + initVarAndFunction(); + getAllWikipediaArticleForCopedia($(this).data('id')); + $("#wiki_title").append( + "<a target='_blank' href='https://fr.wikipedia.org/wiki/"+$(this).data('id')+"'>"+$(this).data('id')+ + "</a>" + ); + }); + } + + function putEventForDetailElt() { + + $(".detail_elt").off('click').click(function(){ + mylog.log('On appuie sur le bouton détail element'); + displayDetailModal($(this).data('id')); + }); + } + + function getAllWikipediaArticleForCopedia(label_dbpedia) { + + if (typeof label_dbpedia == "number") { + mylog.log('CECI EST UNE DATE'); + label_dbpedia = label_dbpedia.toString(); + } + + mylog.log("LE LABEL DBPEDIA EST : ", label_dbpedia); + + label_dbpedia = label_dbpedia.replace(/_/g, " "); + + $("#all_wikidata_item").html(""); + + query_url = 'http://fr.dbpedia.org/sparql?default-graph-uri=&query=+++prefix+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0Aprefix+dbr%3A+%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fresource%2F%3E%0D%0APREFIX+wikidb%3A+%3Chttp%3A%2F%2Fwikidata.dbpedia.org%2Fresource%2F%3E%0D%0APREFIX+dbp%3A+%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fproperty%2F%3E%0D%0Aprefix+wiki-fr%3A+%3Chttp%3A%2F%2Ffr.wikipedia.org%2Fwiki%2F%3E%0D%0A%0D%0A+SELECT+DISTINCT+*+where+%7B%0D%0A%0D%0A++%3Fitem+rdfs%3Alabel+%22'+label_dbpedia+'%22%40fr+.%0D%0A++%3Fitem+dbo%3AwikiPageWikiLink+%3Fwikipage.%0D%0A++%3Fwikipage+dbo%3Aabstract+%3Fdescription.%0D%0A++%3Fwikipage+foaf%3AisPrimaryTopicOf+%3Fpagewiki.%0D%0A++%3Fwikipage+rdfs%3Alabel+%3FpagewikiLabel+.%0D%0A++OPTIONAL+%7B%3Fwikipage+rdfs%3Acomment+%3FshortDescription%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbp%3Alatitude+%3Flatitude%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbp%3Alongitude+%3Flongitude%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbo%3AbirthDate+%3FbirthDate%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbo%3AfoundedBy+%3FfoundedBy%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbo%3AcreationYear+%3FcreationYear%7D.%0D%0A++OPTIONAL+%7B%3Fwikipage+dbp%3AsiteWeb+%3FsiteWeb%7D+.%0D%0A%0D%0A++FILTER%28lang%28%3Fdescription%29%3D%22fr%22%29.+%0D%0A++FILTER%28lang%28%3FpagewikiLabel%29%3D%22fr%22%29.%0D%0A++FILTER%28lang%28%3FshortDescription%29%3D%22fr%22%29.%0D%0A%0D%0A%7D&format=application%2Fsparql-results%2Bjson&timeout=0&debug=on'; + + mylog.log("QUERY URL : ", query_url); + + $.ajax({ + url:query_url, + type:"GET", + dataType: "json", + success:function(data) { + mylog.log('ALL HYPERTEXT LINKS IN PAGE : ', data); + all_wikilinks = data; + displayAllWikipediaArticle(all_wikilinks.results.bindings); + }, + error:function(data) { + mylog.log('ERREUR DANS L\'OPTENTION DES HYPERTEXT'); + $("#all_wikipedia_item").html('<h2>Erreur dans la récupération des liens de la page Wikipédia</h2>'); + } + }); + } + + function displayAllWikipediaArticle(all_wikilinks) { + + $("#all_wikipedia_item").html(''); + + $.each(all_wikilinks, function(index, value) { + + var elt_label_dbpedia = value.pagewiki.value.substr(value.pagewiki.value.lastIndexOf("/")+1); + var elt_label_dbpedia_clean = elt_label_dbpedia.replace(/_/g, " "); + + elt_label_dbpedia_sans_spec = elt_label_dbpedia; + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/"'"/g, "_QUOTE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\'/g, "_SQUOTE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/ /g, "_SPACE_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\./g, "_DOT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\&/g, "_AND_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\(/g, "_PAR-OUVRANT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\)/g, "_PAR-FERMANT_"); + elt_label_dbpedia_sans_spec = elt_label_dbpedia_sans_spec.replace(/\,/g, "_VIRGULE_"); + + $("#all_wikipedia_item").append( + + "<div id='div_"+elt_label_dbpedia_sans_spec+"' class='col-xs-5 wikipedia_elt'>"+ + + "<a style='cursor:pointer; font-size:30px;' class='detail_elt' data-id="+elt_label_dbpedia+">"+elt_label_dbpedia_clean+"</a><br>"+ + "<p id='"+elt_label_dbpedia_sans_spec+"'>chargement ...</p><br>"+ + "<p id='link_"+elt_label_dbpedia_sans_spec+"'>"+ + "<a style='margin:10px;' class='btn btn-default' target='_blank' href='"+value.wikipage.value+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='margin:10px;' class='btn btn-default' target='_blank' href='"+value.pagewiki.value+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "</p>"+ + "<button class='copedia_link' data-id='"+elt_label_dbpedia+"'><img style='max-height:50px;'' src='"+moduleUrl+"/images/logos/logo-copedia.png'/></button>"+ + "</div>" + ); + + getWikidataIDForOneElement(elt_label_dbpedia, value.description.value, value); + + $(".wikitoco_"+elt_label_dbpedia_sans_spec).click(function() { + OpenDynFormForWikiToCo(); + }); + + }); + + putEventForCopediaLink(); + putEventOnDiscoverButton(); + putEventForDetailElt(); + } + + function displayChronoLine(label_dbpedia) { + + $(".n").remove(); + + mylog.log('ON ENTRE DANS LA FONCTION CHRONOLINE' , label_dbpedia); + + $("#chart").show(); + + $("#chart").html(''); + + 'use strict'; + const element = document.getElementById('chart'); + + const timeline = new TimelineChart(element, chronoline, { + enableLiveTimer: true, + tip: function(d) { + return d.label_dbpedia || `${d.from}<br>${d.to}`; + } + }, label_dbpedia).onVizChange(e => console.log(e)); + } + + function displayDetailModal(label_dbpedia, wikidataID=null) { + + var clean_label_dbpedia = label_dbpedia.replace(/\_/g, " "); + + mylog.log('LE LABEL PAS CLEAN EST ', label_dbpedia); + mylog.log('LE LABEL CLEAN EST : ', clean_label_dbpedia); + + $("#ajax-modal-modal-title").html(clean_label_dbpedia); + + $.ajax({ + url:"https://fr.wikipedia.org/w/api.php?action=query&prop=pageprops&ppprop=wikibase_item&redirects=1&format=json&titles="+label_dbpedia, + type:"GET", + dataType: "jsonp", + complete:function(data) { + mylog.log('WIKIDATA ID OF ONE ELEMENT ', data.responseJSON.query.pages); + wikidata_elt = data.responseJSON.query.pages; + + $.each(wikidata_elt, function(index, value) { + wikidataID = value.pageprops.wikibase_item; + }); + + $.ajax({ + url:"http://fr.dbpedia.org/sparql/?default-graph-uri=&query=prefix+dbo%3A+%3Chttp%3A%2F%2Fdbpedia.org%2Fontology%2F%3E%0D%0Aprefix+dbr%3A+%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fresource%2F%3E%0D%0APREFIX+wikidb%3A+%3Chttp%3A%2F%2Fwikidata.dbpedia.org%2Fresource%2F%3E%0D%0APREFIX+dbp%3A+%3Chttp%3A%2F%2Ffr.dbpedia.org%2Fproperty%2F%3E%0D%0Aprefix+wiki-fr%3A+%3Chttp%3A%2F%2Ffr.wikipedia.org%2Fwiki%2F%3E%0D%0A%0D%0A+SELECT+DISTINCT+*+where+%7B%0D%0A%0D%0A++%3Fitem+rdfs%3Alabel+%22"+clean_label_dbpedia+"%22%40fr+.%0D%0A++OPTIONAL%7B%3Fitem+dbo%3Aabstract+%3Fabstract%7D.%0D%0A++OPTIONAL+%7B%3Fitem+foaf%3Adepiction+%3Fdepiction+%7D.%0D%0A++FILTER%28LANG%28%3Fabstract%29+%3D+%22fr%22%29+%0D%0A%7D&format=application%2Fsparql-results%2Bjson&timeout=0&debug=on", + type:"GET", + dataType: "json", + success:function(data) { + mylog.log("Détail d'un élément DBPédia", data); + + $("#ajax-modal-modal-body").html(''); + + if (typeof data.results.bindings[0].depiction !== "undefined") { + + $("#ajax-modal-modal-body").append( + "<img class='picture_element' src="+data.results.bindings[0].depiction.value+" alt='Element picture' title='Cliquez pour agrandir'/></br></br>" + ); + } + + $("#ajax-modal-modal-body").append("<h3>Résumé</h3>"); + $("#ajax-modal-modal-body").append("<p>"+data.results.bindings[0].abstract.value+"</p>"); + $("#ajax-modal-modal-body").append( + + "<h3>Liens de l'élément</h3><br>"+ + "<p>"+ + "<a style='font-size:25px; margin:30px;' target='_blank' href='https://fr.wikipedia.org/wiki/"+label_dbpedia+"'><img style='max-height:100px;'' src='"+moduleUrl+"/images/logos/Wikipedia-logo-en-big.png'/></a>"+ + "<a style='font-size:25px; margin:30px;' target='_blank' href='http://fr.dbpedia.org/page/"+label_dbpedia+"'><img style='max-height:100px;'' src='"+moduleUrl+"/images/logos/logo-dbpedia.png'/></a>"+ + "<a style='font-size:25px; margin:30px;' target='_blank' href='https://www.wikidata.org/wiki/"+wikidataID+"'><img style='max-height:100px;'' src='"+moduleUrl+"/images/logos/logo-wikidata.png'/></a>"+ + "</p>" + ); + } + }); + + $('.modal-header').addClass("bg-dark"); + $('#ajax-modal').modal("show"); + $('#ajax-modal').show(); + } + }); + } + + function getCopediaLink(url_copedia) { + + var copedia_link = "<a target='_blank' href='"+url_copedia+"' class='btn btn-default btn-wiki-copedia'>COPEDIA</a><br/>"; + + return copedia_link; + } + + function putWikiToCoButtonAndEvent(type=null, value, label) { + $("#link_"+label+"").append( + "<button class='btn btn-default btn-wiki-wikitoco wikitoco_"+label+"'>WIKI TO CO</button>"+ + "<button class='btn btn-default btn-wiki-cotowiki'>CO TO WIKI</button>" + ); + putEventOnCotoWikiButton(type, value, label); + } + + function putEventOnCotoWikiButton(type=null, data=null, label=null) { + + $(".wikitoco_"+label+"").click(function(){ + + mylog.log("ON OUVRE LE DYNFORM POUR CES DONNEES : ", data); + + var dynFormMapping = { + name : data.pagewikiLabel.value, + }; + + if (typeof data.description !== "undefined") + dynFormMapping.description = data.description.value; + + if(typeof data.shortDescription !== "undefined") + dynFormMapping.shortDescription = data.shortDescription.value; + + if (typeof data.siteWeb !== "undefined") { + dynFormMapping.url = data.siteWeb.value; + } + + if (typeof data.latitude !== "undefined") { + dynFormMapping.latitude = data.latitude.value; + dynFormMapping.longitude = data.longitude.value; + } + + OpenDynForm(dynFormMapping); + }); + } + + function OpenDynForm(mapping) { + + var form = { + saveUrl : "ph/co2/interoperability/wikitoco", + dynForm : { + jsonSchema : { + title : trad["Change password"], + icon : "fa-group", + properties : { + type : dyFInputs.inputSelect("Type d'élément", "Type d'élément", elementTypes, { required : true }), + name : "Nom de l'élément Wikipédia", + description : "Description longue", + url : dyFInputs.inputText("Site Web de l'élément Wikipédia", "Site Web"), + shortDescription : dyFInputs.textarea("Description courte", "...",{ maxlength: 300 }), + block : dyFInputs.inputHidden(), + typeElement : dyFInputs.inputHidden(), + isUpdate : dyFInputs.inputHidden(true) + } + } + } + }; + + dyFObj.openForm(form, null, mapping); + } + +</script> \ No newline at end of file diff --git a/views/log/monitoring.php b/views/log/monitoring.php new file mode 100755 index 0000000000000000000000000000000000000000..7e2c1b46eb7e313484ad428918e35a0b91f4d41f --- /dev/null +++ b/views/log/monitoring.php @@ -0,0 +1,106 @@ +<!-- <script src='//code.jquery.com/jquery-1.12.0.min.js'></script> +<script src='https://cdn.datatables.net/1.10.11/js/jquery.dataTables.min.js'></script> +<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.11/css/jquery.dataTables.min.css">--> +<?php +// $cs = Yii::app()->getClientScript(); +echo CHtml::scriptFile(Yii::app()->request->baseUrl. '/plugins/DataTables/media/js/jquery.dataTables.min.1.10.4.js'); + +date_default_timezone_set('UTC'); +$displayResult[] = 'false'; +$displayResult[null] = 'false'; +$displayResult[1] = 'true'; +?> +<div class="panel panel-white"> + <div id="config"> + <div class="panel-heading border-light"> + <h4 class="panel-title">Logs</h4> + </div> + <div class="panel-body"> + <table id="summary" class="display" cellspacing="0" width="100%"> + <thead> + <tr> + <th>Adresse IP</th> + <th>Action</th> + <th>Nombre de fois</th> + <th>Première action</th> + <th>Dernière action</th> + <th>Resultat</th> + <th>Message</th> + </tr> + </thead> + <tbody> + <?php + foreach ($summary['result'] as $key => $value) { + $value["minDate"] = date('Y-m-d H:i:s', @$value["minDate"]->sec); + $value["maxDate"] = date('Y-m-d H:i:s', @$value["maxDate"]->sec); + echo "<tr>"; + echo "<td>".@$value['_id']['ip']."</td>"; + echo "<td>".@$value['_id']['action']."</td>"; + echo "<td>".@$value['count']."</td>"; + echo "<td>".@$value['minDate']."</td>"; + echo "<td>".@$value['maxDate']."</td>"; + if(!@$actionsToLog[@$value['_id']['action']]['waitForResult']){ + echo "<td> - </td>"; + echo "<td> - </td>"; + } + else{ + echo "<td>".@$displayResult[$value['_id']['result']]."</td>"; + echo "<td>".@$value['_id']['msg']."</td>"; + } + echo "</tr>"; + // print_r(@$value['count']); + } + ?> + </tbody> + </table> + </div> + </div> +</div> + +<script type="text/javascript"> + + $(document).ready(function() { + setTitle("<span id='main-title-menu'>Espace administrateur</span>","cog","Espace administrateur"); + $('#summary').DataTable({ + "paging": false, + "language": { + "lengthMenu": "Afficher _MENU_ lignes par page", + "zeroRecords": "Pas de résultat", + "info": "Ligne(s) affiché(s) : _TOTAL_", + "infoEmpty": "Pas de ligne", + "sSearch": "Recherche:", + "infoFiltered": " / _MAX_", + "oPaginate": { + "sFirst": "première", + "sLast": "dernier", + "sNext": "suivant", + "sPrevious": "précédent" + } + } + // ,initComplete: function () { + // this.api().columns().every( function () { + // var column = this; + // // if($(column.header()).html() != " nom entete"){ + // var select = $('<select><option value="">'+($(column.header()).html())+'</option></select>') + // .appendTo( $(column.header()).empty() ) + // .on( 'change', function () { + // var val = $.fn.dataTable.util.escapeRegex( + // $(this).val() + // ); + + // column + // .search( val ? '^'+val+'$' : '', true, false ) + // .draw(); + // } ); + + // column.data().unique().sort().each( function ( d, j ) { + // select.append( '<option value="'+d+'">'+d+'</option>' ) + // } ); + // // } + // } ); + // } + + }); + } ); + +</script> diff --git a/views/network/simplyDirectory.php b/views/network/simplyDirectory.php new file mode 100644 index 0000000000000000000000000000000000000000..7976d87be8e7250f939a61b43740c52270fb6f3e --- /dev/null +++ b/views/network/simplyDirectory.php @@ -0,0 +1,1141 @@ +<style> + .dropdown_searchListNW{ + min-height: 100%; + } +</style> + +<div class="col-md-12 no-padding" id="repertory" > + <div id="dropdown_search_result" class="col-md-12 col-sm-12 col-xs-12"></div> + <div id="dropdown_search" class="col-md-12 container list-group-item dropdown_searchListNW"></div> +</div> +<div class="col-md-12 col-sm-12 col-xs-12 no-padding" id="ficheInfoDetail"></div> + +<script type="text/javascript"> +var contextMapNetwork = []; +var indexStepInit = 100; +var searchPrefTag = null ; +var indexStep = indexStepInit; +var scrollEnd = false; + +var tagsActived = {}; +var disableActived = false; +var citiesActived = [] ; +var typesActived = [] ; +var rolesActived = [] ; +var searchValNetwork = ""; + +var loadingData = false; +var mapElements = new Array(); +var tagsFilter = new Array(); + +var nwVar = { + mainTag : [], + sourceKey : [], + searchTag : [], + searchCategory : [], + searchLocalityNAME : [], + searchLocalityCODE_POSTAL_INSEE : [], + searchLocalityDEPARTEMENT : [], + searchLocalityINSEE : [], + searchLocalityREGION : [], + searchType : [], +} + +jQuery(document).ready(function() { + + initVar(); + bindLBHLinks(); + addTooltips(); + bindNetwork(); + + if(location.hash == "" || location.hash == "#network.simplydirectory") + showMapNetwork(true); + else + showMapNetwork(false); + + $("#right_tool_map").removeClass("hidden-sm").hide( 700 ); + + hideScrollTop = true; + checkScroll(); + var timeoutSearch = setTimeout(function(){ }, 100); + setTimeout(function(){ $("#input-communexion").hide(300); }, 300); + mylog.log("indexStepInit", indexStepInit); + startSearchSimply(0, indexStepInit); +}); + +function initVar(){ + searchPrefTag = ( typeof networkJson.request.searchPrefTag != "undefined" ? networkJson.request.searchPrefTag : null ) ; + + if( typeof networkJson.request.pagination != "undefined" && networkJson.request.pagination > 0) + indexStepInit = networkJson.request.pagination ; + + citiesActived = ( ((typeof networkJson.request.searchLocalityNAME == "undefined") || networkJson == null) ? [] : networkJson.request.searchLocalityNAME); + + if( notEmpty(citiesActived) ){ + var cA = []; + $.each(citiesActived,function(k,v){ + cA.push(v.toUpperCase()); + }); + citiesActived = cA ; + } + + indexStep = indexStepInit; + var allSearchParams = ["mainTag", "sourceKey", "searchType", "searchTag","searchCategory","searchLocalityNAME","searchLocalityCODE_POSTAL_INSEE","searchLocalityDEPARTEMENT","searchLocalityINSEE","searchLocalityREGION"]; + $.each(allSearchParams,function(k,v){ + nwVar[v] = ( ( typeof networkJson.request[v] != "undefined" && $.isArray(networkJson.request[v]) ) ? networkJson.request[v] : [] ); + }); + + var btnSearch = '<div class="btn-group btn-group-lg tooltips" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="'+trad.searchbyname+'">'+ + '<button type="button" class="btn btn-map " id="btn-search">'+ + '<i class="fa fa-chevron-left"></i></button>'+ + '</div>'; + $("#btn-back").parent().replaceWith(btnSearch); + $("#mapLegende").addClass("hidden"); +} + +function addTooltips(){ + mylog.log("addTooltips"); + if(typeof networkJson.skin != "undefined" && typeof networkJson.skin.tooltips != "undefined"){ + $.each(networkJson.skin.tooltips,function(k,v){ + mylog.log("addTooltips", k,v); + $( k ).addClass("tooltips"); + $( k ).data( "toggle", "tooltip" ); + $( k ).data( "placement", "bottom" ); + $( k ).attr( "title", v ); + }); + } +} + +function bindNetwork(){ + mylog.log("bindNetwork"); + $('#btn-toogle-map').click(function(e){ showMapNetwork(); }); + + $('.reset').on('click', function() { + mylog.log(".reset"); + $('.tagFilter').removeClass('active'); + $(".tagFilter").removeAttr("checked"); + $('.villeFilter').removeClass('active'); + $('.villeFilter').removeAttr("checked"); + $('.categoryFilter').removeClass('active'); + $('.categoryFilter').removeAttr("checked"); + $('#input_name_filter').val(''); + tagsActived = {}; + disableActived = false; + citiesActived = ( ((typeof networkJson.request.searchLocalityNAME == "undefined") || networkJson == null) ? [] : networkJson.request.searchLocalityNAME); + if( notEmpty(citiesActived) ){ + var cA = []; + $.each(citiesActived,function(k,v){ + cA.push(v.toUpperCase()); + }); + citiesActived = cA ; + } + typesActived = [] ; + rolesActived = [] ; + searchValNetwork = ""; + chargement(); + }); + + $("#btn-search").click(function(){ + mylog.log("#btn-search", $("#right_tool_map").is(":visible")); + if(!$("#right_tool_map").is(":visible")){ + $("#right_tool_map").show( 700 ); + $("#btn-search").find("i").removeClass("fa-chevron-left").addClass("fa-chevron-right"); + }else { + $("#right_tool_map").hide( 700 ); + $("#btn-search").find("i").removeClass("fa-chevron-right").addClass("fa-chevron-left"); + } + + }); + + $('#btn-menu-launch').click(function(){ + mylog.log("#btn-menu-launch", $(this).hasClass("active")); + if(!$(this).hasClass("active")){ + $(this).addClass("active"); + $(".main-menu-left").show(); + $(this).find("span").show(); + $(this).find(".firstIcon").removeClass("fa-filter").addClass("fa-angle-left"); + }else{ + $(this).removeClass("active"); + $(this).find("span").hide(); + $(".main-menu-left").hide(); + $(this).find(".firstIcon").removeClass("fa-angle-left").addClass("fa-filter"); + } + }); + + $(".showHideMoreTitleMap").click(function(){ + mylog.log(".showHideMoreTitleMap"); + if($(this).find("i").hasClass("fa-angle-down")){ + $(".contentShortInformationMap").show("slow"); + $(".contentTitleMap").addClass("active"); + $(this).addClass("active"); + $(this).find("i").removeClass("fa-angle-down").addClass("fa-angle-up"); + }else{ + $(this).removeClass("active"); + $(this).find("i").removeClass("fa-angle-up").addClass("fa-angle-down"); + $(".contentShortInformationMap").hide("slow"); + $(".contentTitleMap").removeClass("active"); + } + + }); + + if( typeof networkJson.mode == "undefined" || networkJson.mode != "client"){ + $('#searchBarText').keyup(function(e){ + clearTimeout(timeoutSearch); + timeoutSearch = setTimeout(function(){ startSearchSimply(0, indexStepInit); }, 800); + }); + } +} + +function showMapNetwork(show){ + mylog.log("showMapNetwork", show, isMapEnd); + mylog.log("typeof SIG : ", typeof Sig); + + if(typeof Sig == "undefined") show = false; + + if( typeof show == "undefined") + show = !isMapEnd; + mylog.log("show", show); + if(show){ + isMapEnd =true; + showNotif(false); + $("#mapLegende").html(""); + $("#mapLegende").hide(); + showMenuNetwork(true); + if(Sig.currentMarkerPopupOpen != null){ + Sig.currentMarkerPopupOpen.fire('click'); + } + $(".btn-group-map").show( 700 ); + $(".main-bottom-menu").show( 700 ); + $(".btn-menu5, .btn-menu-add").hide(); + $("#btn-toogle-map").css("display","inline !important"); + $("#btn-toogle-map").show(); + $(".my-main-container").animate({ + top: -1000, + opacity:0, + }, 'slow' ); + setTitle(networkJson.name , "", networkJson.name+ " : "+networkJson.skin.title, networkJson.name,networkJson.skin.shortDescription); + setTimeout(function(){ + $(".my-main-container").hide(); + }, 1000); + var timer = setTimeout("Sig.constructUI()", 1000); + + }else{ + isMapEnd =false; + hideMapLegende(); + $(".btn-group-map").hide( 700 ); + $(".main-bottom-menu").hide( 700 ); + showMenuNetwork(false); + $(".btn-menu5, .btn-menu-add").show(); + $(".panel_map").hide(1); + $(".main-col-search").animate({ top: 0, opacity:1 }, 800 ); + $(".my-main-container").animate({ + top: 50, + opacity:1 + }, 'slow' ); + setTitle(networkJson.name , "", networkJson.name+ " : "+networkJson.skin.title, networkJson.name,networkJson.skin.shortDescription); + setTimeout(function(){ + $(".my-main-container").show(); + if( !$('.main-menu-left').is(":visible") && location.hash.indexOf("#page") == -1 ) + $(".main-menu-left").show( 700 ); + }, 100); + + if(typeof Sig != "undefined" && Sig.currentMarkerPopupOpen != null){ + Sig.currentMarkerPopupOpen.closePopup(); + } + + if($(".box-add").css("display") == "none" && <?php echo isset(Yii::app()->session['userId']) ? "true" : "false"; ?>) + $("#ajaxSV").show( 700 ); + + checkScroll(); + } +} + +function showMenuNetwork(show){ + mylog.log("showMenuNetwork", show); + if(typeof show == "undefined") + show = $("#main-top-menu").css("opacity") == 1; + + if(show){ + $("#titleMapTop").show( 700 ); + $("#btn-menu-launch").show( 700 ); + $("#btn-toogle-map").html("<i class='fa fa-list'></i>"); + $("#btn-toogle-map").attr("title", trad.list); + $("#btn-toogle-map").attr("data-original-title", trad.list); + $("#btn-toogle-map").removeClass("resizer"); + $(".main-menu-left").hide( 700 ); + $("#menuTopList").hide( 700 ); + $(".main-top-menu").removeClass("bg-white"); + } + else{ + $("#titleMapTop").hide( 700 ); + $("#btn-menu-launch").hide( 700 ); + $("#btn-toogle-map").html("<i class='fa fa-map-marker'></i>"); + $("#btn-toogle-map").attr("data-original-title", trad.map); + $("#btn-toogle-map").addClass("resizer"); + $("#menuTopList").show( 700 ); + $(".main-top-menu").addClass("bg-white"); + if($("#btn-menu-launch").hasClass("active")) + $("#btn-menu-launch").trigger("click"); + if($(".contentTitleMap").hasClass("active")) + $(".showHideMoreTitleMap").trigger("click"); + if($("#right_tool_map").is(":visible")) + $("#btn-search").trigger("click"); + } +} + +function startSearchSimply(indexMin, indexMax){ + mylog.log("startSearchSimply", indexMin, indexMax, indexStep); + $("#listTagClientFilter").html('spiner'); + if(loadingData) return; + loadingData = true; + + // console.log("loadingData true"); + indexStep = indexStepInit; + var name = $('#searchBarText').val(); + if(typeof indexMin == "undefined") indexMin = 0; + if(typeof indexMax == "undefined") indexMax = indexStep; + // currentIndexMin = indexMin; + // currentIndexMax = indexMax; + if(indexMin == 0 && indexMax == indexStep) { + //totalData = 0; + mapElements = new Array(); + } + // if(name.length>=3 || name.length == 0){ + var locality = ""; + autoCompleteSearchSimply(name, locality, indexMin, indexMax); +} + +function autoCompleteSearchSimply(name, locality, indexMin, indexMax){ + mylog.log("autoCompleteSearchSimply", name, locality, indexMin, indexMax); + var levelCommunexionName = { + 1 : "INSEE", + 2 : "CODE_POSTAL_INSEE", + 3 : "DEPARTEMENT", + 4 : "REGION" + }; + //var searchBy = levelCommunexionName[levelCommunexion]; + + + //To merge Category and tags which are finally all tags + var searchTagGlobal = []; + if (undefined !== nwVar.searchTag && nwVar.searchTag.length) $.merge(searchTagGlobal,nwVar.searchTag) ; + if (undefined !== nwVar.searchCategory && nwVar.searchCategory.length) $.unique($.merge(searchTagGlobal,nwVar.searchCategory)) ; + mylog.log("searchTagGlobal : "+searchTagGlobal); + + var searchTagsSimply = {} ; + if(typeof networkJson.filter != "undefined" && typeof networkJson.filter.linksTag != "undefined"){ + $.each(searchTagGlobal, function(i, o) { + $.each(networkJson.filter.linksTag, function(keyNet, valueNet){ + + if(typeof valueNet.tags[o] != "undefined"){ + if(typeof searchTagsSimply[keyNet] == "undefined") + searchTagsSimply[keyNet] = []; + + if(typeof valueNet.tags[o] == "string") + searchTagsSimply[keyNet].push(valueNet.tags[o]); + else{ + $.each(valueNet.tags[o], function(keyTags, valueTags){ + searchTagsSimply[keyNet].push(valueTags); + }); + } + } + }); + }); + } + + mylog.log("searchTagsSimply", searchTagsSimply); + + var data = { + "name" : name, + "locality" : "xxxx", + "searchType" : nwVar.searchType, + "searchTag" : searchTagGlobal, + "filtreTag" : searchTagsSimply, + "searchLocalityNAME" : nwVar.searchLocalityNAME, + "searchLocalityCODE_POSTAL_INSEE" : nwVar.searchLocalityCODE_POSTAL_INSEE, + "searchLocalityDEPARTEMENT" : nwVar.searchLocalityDEPARTEMENT, + "searchLocalityINSEE" : nwVar.searchLocalityINSEE, + "searchLocalityREGION" : nwVar.searchLocalityREGION, + //"searchBy" : searchBy, + "indexMin" : indexMin, + "indexMax" : indexMax, + //"sourceKey" : sourceKey, + "mainTag" : nwVar.mainTag, + "searchPrefTag" : searchPrefTag, + }; + + if(typeof networkJson.request.sourceKey != "undefined") + data.sourceKey = networkJson.request.sourceKey; + + if(typeof networkJson.filter != "undefined" && typeof networkJson.filter.paramsFiltre != "undefined") + data.paramsFiltre = networkJson.filter.paramsFiltre; + + if(userConnected != null && typeof userConnected.roles.superAdmin != "undefined" && userConnected.roles.superAdmin == true) + data.disabled = true; + + if(typeof seeDisable != "undefined" && seeDisable == true) + data.seeDisable = true; + + //console.log("loadingData true"); + loadingData = true; + + str = "<i class='fa fa-circle-o-notch fa-spin'></i>"; + $(".btn-start-search").html(str); + $(".btn-start-search").addClass("bg-azure"); + $(".btn-start-search").removeClass("bg-dark"); + //$("#dropdown_search").css({"display" : "inline" }); + //if(indexMin > 0) + //$("#btnShowMoreResult").html("<i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ..."); + //else + //$("#dropdown_search").html("<center><span class='search-loaderr text-dark' style='font-size:20px;'><i class='fa fa-spin fa-circle-o-notch'></i> "+trad.currentlyresearching+" ...</span></center>"); + if(isMapEnd){ + $.blockUI({ + message : "<div class='col-xs-12 text-center'><div class='col-md-offset-2 col-md-8 bg-white'><h1 class='homestead text-red'><span class='text-dark'>Welcome on</span><br/><span>"+networkJson.skin.title+"</span><br/></h1><i class='fa fa-spin fa-circle-o-notch'></i><span class='text-dark'> Initialization of map</span></div></div>", + }); + } + + + if( notNull(networkJson.dataSrc) ) { + mylog.log("networkJson.dataSrc"); + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/element/getdatabyurl", + data: { url : networkJson.dataSrc , json : false}, + dataType: "json", + error: function (data){ + mylog.log("error"); + mylog.dir(data); + }, + success: function (data) { + mylog.log("data", data); + dataSuccess(data, indexMin, indexMax); + } + }); + } else { + $.ajax({ + type: "POST", + url: baseUrl+"/" + moduleId + "/search/simplyautocomplete", + data: data, + dataType: "json", + error: function (data){ + mylog.log("error"); + mylog.dir(data); + }, + success: function(data){ + dataSuccess(data, indexMin, indexMax); + } + }); + } +} + +function dataSuccess(data, indexMin, indexMax){ + mylog.log("dataSuccess", data, !data.res, indexMin, indexMax); + if(!data.res) { + toastr.error(data.content); + } else { + if(data.res.length){ + var countData = 0; + $.each(data.res, function(i, v) { if(v.length!=0){ countData++; } }); + + if(typeof networkJson.request.oneElement != "undefined" && networkJson.request.oneElement == true){ + filterTags(data.filters.tags); + filterType(data.filters.types); + $("#divRolesMenu").removeClass("hidden"); + } else { + $("#divRolesMenu").addClass("hidden"); + } + + bindAutocomplete(); + str = ""; + var city, postalCode = ""; + var mapElements = new Array(); + var htmlCO2 = ""; + htmlCO2 = directory.showResultsDirectoryHtml(data.res); + //parcours la liste des résultats de la recherche + countResult=Object.keys(data.res).length; + mylog.log("data.res ", data.res); + $.each(data.res, function(i, o) { + mylog.log("Search ", o); + mylog.log("Tags element", o.tags); + mapElements.push(o); + contextMapNetwork.push(o); + }); //end each + + if(str == "") { + $(".btn-start-search").html("<i class='fa fa-search'></i>"); + if(indexMin == 0){ + //ajout du footer + var msg = trad.noresult; + if(name == "" && locality == "") + msg = "<h3 class='text-dark'><i class='fa fa-3x fa-keyboard-o'></i><br> Préciser votre recherche pour plus de résultats ...</h3>"; + str += '<div class="center" id="footerDropdown">'; + str += "<hr style='float:left; width:100%;'/><label style='margin-bottom:10px; margin-left:15px;' class='text-white'>"+msg+"</label><br/>"; + str += "</div>"; + $("#dropdown_search").html(str); + $("#searchBarText").focus(); + } + } + else { + //ajout du footer + str += '</div><div class="center col-md-12" id="footerDropdown">'; + str += "<hr style='float:left; width:100%;'/><label id='countResult' class='text-white'></label><br/>"; + + if( typeof networkJson.mode != "undefined" && networkJson.mode != "client" ){ + str += '<button class="btn btn-default" id="btnShowMoreResult"><i class="fa fa-angle-down"></i> Afficher plus de résultat</div></center>'; + str += "</div>"; + } + + //si on n'est pas sur une première recherche (chargement de la suite des résultat) + if(indexMin > 0){ + //on supprime l'ancien bouton "afficher plus de résultat" + $("#btnShowMoreResult").remove(); + //on supprimer le footer (avec nb résultats) + $("#footerDropdown").remove(); + //on calcul la valeur du nouveau scrollTop + var heightContainer = $(".my-main-container")[0].scrollHeight - 180; + //on affiche le résultat à l'écran + $("#dropdown_search").append(str); + //si on est sur une première recherche + }else{ + //on affiche le résultat à l'écran + $("#dropdown_search").html(str); + } + + $("#dropdown_search").html(htmlCO2); + refreshResultHeader(countResult); + + //On met à jour les filtres + loadFilters(); + initBtnLink(); + //on affiche par liste par défaut + $('#list').click(); + //remet l'icon "loupe" du bouton search + $(".btn-start-search").html("<i class='fa fa-search'></i>"); + + //active le chargement de la suite des résultat au survol du bouton "afficher plus de résultats" + //(au cas où le scroll n'ait pas lancé le chargement comme prévu) + $("#btnShowMoreResult").mouseenter(function(){ + if(!loadingData){ + startSearchSimply(indexMin+indexStep, indexMax+indexStep); + $("#btnShowMoreResult").mouseenter(function(){}); + } + }); + } //end else (str=="") + + //signal que le chargement est terminé + mylog.log("test"); + loadingData = false; + //quand la recherche est terminé, on remet la couleur normal du bouton search + $(".btn-start-search").removeClass("bg-azure"); + } + + } + // console.log("scrollEnd ? ", scrollEnd, indexMax, countData , indexMin); + + //si le nombre de résultat obtenu est inférieur au indexStep => tous les éléments ont été chargé et affiché + if(indexMax - countData > indexMin){ + $("#btnShowMoreResult").remove(); + scrollEnd = true; + }else{ + scrollEnd = false; + } + //affiche les éléments sur la carte + Sig.restartMap(); + Sig.showMapElements(Sig.map, mapElements); + //on affiche le nombre de résultat en bas + var s = ""; + var length = ($( "div.searchEntity" ).length); + if(length > 1) s = "s"; + $("#countResult").html(length+" résultat"+s); + $.unblockUI(); +} + +function tagActivedUpdate(checked, tag, parent){ + mylog.log("tagActivedUpdate", checked, tag, parent,tagsActived, typeof tagsActived[parent], (typeof tagsActived[parent] == "undefined")); + if(checked== false){ + tagsActived[parent].splice($.inArray(tag, tagsActived[parent]),1); + } + else{ + if(typeof tagsActived[parent] == "undefined"){ + tagsActived[parent] = []; + } + tagsActived[parent].push(tag); + } +} +function refreshResultHeader(count){ + if(count=="loading"){ + str='<h4 style="font-weight:300" class=" text-dark padding-10">'+ + '<i class="fa fa-spin fa-circle-o-notch"></i><br>'+trad.currentlyloading+'...'+ + '</h4>'; + } + else{ + if(count == 0) totalDataGSMSG = "<i class='fa fa-ban'></i> "+trad.noresult; + else if(count == 1) totalDataGSMSG = count + " "+trad.result; + else if(count > 1) totalDataGSMSG = count + " "+trad.results; + str='<h4 style="font-weight:300" class=" text-dark padding-10">'+ + totalDataGSMSG+ + '</h4>'; + } + $("#dropdown_search_result").html(str); +} +function chargement(){ + mylog.log("chargement"); + $(".searchEntityContainer").hide(700); + refreshResultHeader("loading"); + setTimeout(function(){ updateMap(); }, 1000); +} + +function bindAutocomplete(){ + $(".tagFilterAuto").off().click(function(e){ + mylog.log(".tagFilter", $(this)); + var checked = $(this).is( ':checked' ); + var val = $(this).attr("value"); + tagActivedUpdate(checked, val, "tags"); + chargement(); + }); + + $(".typeFilterAuto").off().click(function(e){ + var checked = $(this).is( ':checked' ); + var ville = $(this).attr("value"); + typeActivedUpdate(checked, ville); + chargement(); + }); + + $(".rolesFilterAuto").off().click(function(e){ + var checked = $(this).is( ':checked' ); + var role = $(this).attr("value"); + mylog.log(".rolesFilterAuto", checked, role); + rolesActivedUpdate(checked, role); + chargement(); + }); +} + + + +function loadFilters(){ + mylog.log("loadFilters"); + var displayLimit = 10; + var classToHide = ""; + var i = 0; + var breadcum = ""; + //All desacactivate + $('.villeFilter').prop("checked", false ); + $('.tagFilter').prop("checked", false ); + $('.categoryFilter').prop("checked", false ); + + $.each(nwVar.searchLocalityNAME, function(index, value){ + //Display + $('.villeFilter[value="'+value+'"]').prop("checked", true ); + //Open menu + manageCollapse(value,true); + }); + + //One by One Category + $.each(nwVar.searchCategory, function(index, value){ + $('.categoryFilter[value="'+value+'"]').prop( "checked", true ); + breadcum = breadcum+"<span class='label label-danger categoryFilter' value='"+value+"'>"+value+"</span> "; + }); + + $(".tagFilter").click(function(e){ + mylog.log(".tagFilter", $(this)); + mylog.log("label :", $(this).hasClass( "active" )); + + var checked = false; + if($(this).hasClass( "active" ) == false){ + $(this).addClass("active"); + checked = true; + + }else{ + $(this).removeClass("active"); + } + + var filtre = $(this).data("filtre"); + var parent = $(this).data("parent"); + mylog.log("parent",parent); + mylog.log("filtre",filtre); + if(typeof networkJson.filter != "undefined" && typeof networkJson.filter.linksTag != "undefined"){ + $.each(networkJson.filter.linksTag, function(keyNet, valueNet){ + if(typeof valueNet.tags[filtre] != "undefined"){ + + if(typeof valueNet.tags[filtre] == "string"){ + tagActivedUpdate(checked, valueNet.tags[filtre], parent); + } + else{ + $.each(valueNet.tags[filtre], function(keyTags, valueTags){ + tagActivedUpdate(checked, valueTags, parent); + }); + } + } + }); + } + + chargement(); + }); + + $(".villeFilter").off().click(function(e){ + mylog.log(".villeFilter", $(this)); + var checked = false; + if($(this).hasClass( "active" ) == false){ + $(this).addClass("active"); + checked = true; + }else{ + $(this).removeClass("active"); + } + + var ville = $(this).data("value"); + cityActivedUpdate(checked, ville); + chargement(); + }); + + $(".categoryFilter").off().click(function(e){ + var category = $(this).attr("value"); + if($(this).is(':checked') == false){ + removeSearchCategory(category); + } + else{ + addSearchCategory(category); + } + startSearchSimply(0, indexStepInit); + }); + + $(".disableCheckbox").off().click(function(e){ + disableActived = ( (disableActived == false) ? true : false ); + chargement(); + }); +} + +function breadcrumGuide(level, url){ + newLevel=$(".breadcrumAnchor").length; + mylog.log("breadcrumGuide", newLevel, level, url); + if(level==0){ + reverseToRepertory(); + } + else{ + if(level < newLevel){ + newLevel=false; + $(".breadcrumAnchor").each(function(){ + value=$(this).data("value"); + if(value > level){ + $(this).remove(); + $(".breadcrumChevron[data-value='"+value+"']").remove(); + } + }); + } + + if(newLevel == 5){ + $(".breadcrumChevron[data-value='4']").remove(); + $(".breadcrumAnchor[data-value='4']").remove(); + newLevel=4; + } + getAjaxFiche(url, newLevel); + } +} + +function getAjaxFiche(url, breadcrumLevel){ + mylog.log("getAjaxFiche Network", url, breadcrumLevel); + $("#ficheInfoDetail").empty(); + if(location.hash == ""){ + history.pushState(null, "New Title", '?src='+networkParams+url); + } + + if(isMapEnd){ + pathTitle= trad.cartography; + pathIcon = "map-marker"; + showMapNetwork(); + }else{ + pathTitle= trad.list; + pathIcon = "list"; + } + allReadyLoad = true; + urlHash=url; + pageView=false; + if(urlHash.indexOf("page") >= 0){ + url= "/app/"+urlHash.replace( "#","" ).replace( /\./g,"/" ); + mylog.log("url", url); + $("#repertory").hide( 700 ); + $(".main-menu-left").hide( 700 ); + $("#ficheInfoDetail").show( 700 ); + $(".main-col-search").removeClass("col-md-10 col-md-offset-2 col-sm-9 col-sm-offset-3").addClass("col-md-12 col-sm-12"); + + $.blockUI({ + message : "<h4 style='font-weight:300' class='text-dark padding-10'><i class='fa fa-spin fa-circle-o-notch'></i><br>"+trad.currentlyloading+" ...</span></h4>" + }); + mylog.log("networkParams", networkParams); + + getAjax('#ficheInfoDetail', baseUrl+'/'+moduleId+url+'?src='+networkParams, function(){ + $.unblockUI(); + mylog.log(contextData); + //Construct breadcrumb + if(breadcrumLevel != false){ + $html= '<i class="fa fa-chevron-right fa-1x text-red breadcrumChevron" style="padding: 0px 10px 0px 10px;" data-value="'+breadcrumLevel+'"></i>'+'<a href="javascript:;" onclick="breadcrumGuide('+breadcrumLevel+',\''+urlHash+'\')" class="breadcrumAnchor text-dark" data-value="'+breadcrumLevel+'">'+contextData.name+'</a>'; + $("#breadcrum").append($html); + } + },"html"); + } + else if( urlHash.indexOf("default.view") < 0 && + urlHash.indexOf("news") < 0 && + urlHash.indexOf("network") < 0 && + urlHash.indexOf("invite") < 0 ){ + pageView=true; + var urlSplit=urlHash.replace( "#","" ).split("."); + if(typeof urlSplit == "string") + slug=urlSplit; + else + slug=urlSplit[0]; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/slug/getinfo/key/"+slug, + dataType: "json", + success: function(data){ + if(data.result){ + var urlHash="#page.type."+data.contextType+".id."+data.contextId; + } + url= "/app/"+urlHash.replace( "#","" ).replace( /\./g,"/" ); + mylog.log("url", url); + $("#repertory").hide( 700 ); + $(".main-menu-left").hide( 700 ); + $("#ficheInfoDetail").show( 700 ); + $(".main-col-search").removeClass("col-md-10 col-md-offset-2 col-sm-9 col-sm-offset-3").addClass("col-md-12 col-sm-12"); + + $.blockUI({ + message : "<h4 style='font-weight:300' class='text-dark padding-10'><i class='fa fa-spin fa-circle-o-notch'></i><br>"+trad.currentlyloading+" ...</span></h4>" + }); + mylog.log("networkParams", networkParams); + + getAjax('#ficheInfoDetail', baseUrl+'/'+moduleId+url+'?src='+networkParams, function(){ + $.unblockUI(); + mylog.log(contextData); + //Construct breadcrumb + if(breadcrumLevel != false){ + $html= '<i class="fa fa-chevron-right fa-1x text-red breadcrumChevron" style="padding: 0px 10px 0px 10px;" data-value="'+breadcrumLevel+'"></i>'+'<a href="javascript:;" onclick="breadcrumGuide('+breadcrumLevel+',\''+urlHash+'\')" class="breadcrumAnchor text-dark" data-value="'+breadcrumLevel+'">'+contextData.name+'</a>'; + $("#breadcrum").append($html); + } + },"html"); + } + }); + } +} + + +function reverseToRepertory(){ + mylog.log("reverseToRepertory", isMapEnd); + if(isMapEnd) + showMapNetwork(); + updateMap(); + $("#ficheInfoDetail").hide( 700 ); + $(".main-col-search").removeClass("col-md-12 col-sm-12").addClass("col-md-10 col-md-offset-2 col-sm-9 col-sm-offset-3"); + //$("#dropdown_search").show(); + $("#repertory").show(); + $(".main-menu-left").show( 700 ); + $html = '<a href="javascript:;" onclick="breadcrumGuide(0)" class="breadcrumAnchor text-dark" style="font-size:20px;">'+trad.list+'</a>'; + $("#breadcrum").html($html); + history.replaceState(null, '', window.location.href.split('#')[0]); +} + +//if all tags exist returns true +//console.log( and( [], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +//console.log( and( ["atelier"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +//console.log( and( ["atelier","coco"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +//console.log( and( ["atelier","commun"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +//console.log( and( ["coco","atelier"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +//console.log( and( ["coco","atelier",'commun'], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +function and(tags,tagList) { + var res = true ; + $.each(tags,function(i,t){ + reg = new RegExp("^"+t+"$","i"); + if( inArrayRegex(tagList,reg) == false ){ + res = false; + return false; + } + }); + return res; +} + +//if just one or many tags exist returns true +/*console.log( or( [], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +console.log( or( ["atelier"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +console.log( or( ["atelier","coco"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +console.log( or( ["atelier","commun"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +console.log( or( ["coco","atelier"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] )); +console.log( or( ["coco","n"], [ "mobilité", "atelier", "commun", "tiers-lieux" ] ));*/ +function or(tags,tagList) { + res = (!tags.length) ? true :false; + $.each(tags,function(i,t){ + reg = new RegExp("^"+t+"$","i"); + if( inArrayRegex(tagList,reg) !== false ){ + res = true; + return false; + } + }); + return res; +} + +function inArrayRegex(tab,regex){ + res = false; + $.each(tab,function(i,t){ + if(t.match(regex)){ + res = true; + return false + } + }); + return res; +} + +function cityActivedUpdate(checked, city){ + mylog.log("cityActivedUpdate", checked, city); + if(checked== false){ + citiesActived.splice($.inArray(city.toUpperCase(), citiesActived),1); + } else { + citiesActived.push(city.toUpperCase()); + } +} + +function typeActivedUpdate(checked, type){ + mylog.log("typeActivedUpdate", checked, type); + if(checked== false){ + typesActived.splice($.inArray(type, typesActived),1); + } else { + typesActived.push(type); + } +} + +function rolesActivedUpdate(checked, role){ + mylog.log("rolesActivedUpdate", checked, role); + if(checked== false){ + rolesActived.splice($.inArray(role, rolesActived),1); + } else { + rolesActived.push(role); + } +} + +function addTab(tab, tab2){ + mylog.log("addTab", tab, tab2); + var res = []; + $.each(tab2, function(key2, value2){ + $.each(tab, function(key1, value1){ + var t = value1.slice(); + t.push(value2); + res.push(t); + }); + }); + mylog.log("addTab res", res); + return res ; +} + +function orAndAnd(allFiltres){ + mylog.log("orAndAnd", allFiltres); + var res = []; + $.each(allFiltres, function(keyF, valueFiltre){ + if(valueFiltre.length > 0){ + if(Object.keys(tagsActived)[0] == keyF){ + $.each(valueFiltre, function(key, value){ + res.push([value]); + }); + }else + res = addTab(res, valueFiltre); + } + }); + mylog.log("orAndAnd Res", res); + return res ; +} + +function getAllTags(allFiltres){ + mylog.log("getAllTags", allFiltres); + var res = []; + $.each(allFiltres, function(keyF, valueFiltre){ + if(valueFiltre.length > 0){ + $.each(valueFiltre, function(key, value){ + res.push(value); + }); + } + }); + mylog.log("getAllTags Res", [res]); + return [res] ; +} + +function andAndOr(allFiltres){ + mylog.log("andAndOr", allFiltres); + var res = []; + $.each(allFiltres, function(keyF, valueFiltre){ + if(valueFiltre.length > 0){ + res.push(valueFiltre); + } + }); + mylog.log("andAndOr Res", res); + return res ; +} + +function updateMap(){ + mylog.log("updateMap", tagsActived, disableActived); + $(".searchEntityContainer").hide(); + var params = ((typeof networkJson.filter == "undefined" && typeof networkJson.filter.paramsFiltre == "undefined") ? null : networkJson.filter.paramsFiltre); + var test = []; + var verb = "and"; + var elementNetwork = []; + if(typeof networkJson.request.oneElement != "undefined" && typeof networkJson.request.sourceKey != "undefined" && networkJson.request.oneElement == true){ + + elementNetwork = networkJson.request.sourceKey[0].split("@"); + mylog.log("elementNetwork", elementNetwork); + } + + if ( params != null && ( (params.conditionBlock == "and" || typeof params.conditionBlock == "undefined" ) && params.conditionTagsInBlock == "and" ) ) + test = getAllTags(tagsActived); + else if ( params != null && ( (params.conditionTagsInBlock == "or" || typeof params.conditionTagsInBlock == "undefined" ) && params.conditionBlock == "or" ) ) { + test = getAllTags(tagsActived); + verb = "or"; + } else if ( params != null && ( (params.conditionBlock == "or" || typeof params.conditionBlock == "undefined" ) && + (params.conditionTagsInBlock == "and" || typeof params.conditionTagsInBlock == "undefined") ) ) { + test = andAndOr(tagsActived); + } else + test = orAndAnd(tagsActived); + + mylog.log("testNetwork", test); + + mylog.log("searchValNetwork", searchValNetwork); + var filteredList = []; + var add = false; + if(test.length > 0){ + $.each(test,function(keyTags,tags){ + $.each(contextMapNetwork,function(k,v){ + if(typeof v.tags != "undefined" && v.tags != null) + add = ( (verb == "and") ? and( tags, v.tags ) : or( tags, v.tags ) ); + else + add= false; + mylog.log("configFiltre", add, disableActived, v.disabled, v.address.addressLocality, citiesActived, typesActived, rolesActived); + if( add && + ( disableActived == false || + (disableActived == true && typeof v.disabled != "undefined" && v.disabled == true) ) && + ( citiesActived.length == 0 || + ( typeof v.address != "undefined" && + typeof v.address.addressLocality != "undefined" && + $.inArray( v.address.addressLocality.toUpperCase(), citiesActived ) >= 0 ) ) && + ( typesActived.length == 0 || + ( typeof v.typeSig != "undefined" && + $.inArray( v.typeSig, typesActived ) >= 0 ) ) && + ( rolesActived.length == 0 || + (isLinks(v, elementNetwork[0]) ) ) && + + ( searchValNetwork.length == 0 || + ( v.name.search( new RegExp( searchValNetwork, "i" ) ) >= 0 ) ) ) { + mylog.log("v.tags", v.tags); + filteredList = addTabMap(v, filteredList); + $(".container_"+v.type+"_"+v.id).show(); + } + }); + }); + }else{ + if( disableActived == true || citiesActived.length > 0 || + typesActived.length > 0 || rolesActived.length > 0 || + searchValNetwork.length > 0) { + $.each(contextMapNetwork,function(k,v){ + if( ( disableActived == false || + (disableActived == true && typeof v.disabled != "undefined" && v.disabled == true) ) && + ( citiesActived.length == 0 || + ( typeof v.address != "undefined" && + typeof v.address.addressLocality != "undefined" && + $.inArray( v.address.addressLocality.toUpperCase(), citiesActived ) >= 0 ) ) && + ( typesActived.length == 0 || + ( typeof v.typeSig != "undefined" && + $.inArray( v.typeSig, typesActived ) >= 0 ) ) && + ( rolesActived.length == 0 || + (isLinks(v, elementNetwork[0]) ) ) && + + ( searchValNetwork.length == 0 || + ( v.name.search( new RegExp( searchValNetwork, "i" ) ) >= 0 ) ) ) { + filteredList = addTabMap(v, filteredList); + } + }); + }else{ + filteredList = contextMapNetwork; + } + } + $.each(filteredList, function(e,v){ + $(".contain_"+v.type+"_"+v.id).show(700); + }); + + countResult=filteredList.length; + refreshResultHeader(countResult); + mylog.log("filteredList", filteredList); + Sig.restartMap(); + Sig.showMapElements(Sig.map,filteredList); + $.unblockUI(); +} + +function addTabMap(element, tab){ + if( "undefined" != typeof element.geo && element.geo != null ) + tab.push(element); + return tab; +} + +function isLinks(element, id){ + mylog.log("isLinks", element, id); + var res = false ; + mylog.log("rolesActived", rolesActived); + if(rolesActived.length){ + $.each(rolesActived,function(k,v){ + mylog.log(v, element); + if(v == "creator" && element.creator == id){ + res = true ; + return true; + }else if( v == "admin" && + element.links != null && + typeof element.links["members"] != "undefined" && + typeof element.links["members"][id] != "undefined" && + typeof element.links["members"][id].isAdmin != "undefined" && + element.links["members"][id].isAdmin == true){ + res = true ; + return true; + }else if( element.links != null && + typeof element.links != "undefined" && + typeof element.links[ v ] != "undefined" && + typeof element.links[ v ][id] != "undefined" ){ + res = true ; + return true; + } + }); + } + return res ; +} + +function filterTags(tags){ + mylog.log("filterTags", tags); + if(typeof tags != "undefined" ){ + str = '<div class="panel-heading">'+ + '<h4 class="panel-title" onclick="manageCollapse(\'tags\', \'false\')">'+ + '<a data-toggle="collapse" href="#tags" style="color:#719FAB" data-label="tags">'+trad.alltags+ + '<i class="fa fa-chevron-right right" aria-hidden="true" id="fa_tags"></i>'+ + '</a>'+ + '</h4>'+ + '</div>'+ + '<div id="list_tags" class="panel-collapse collapse">'+ + '<ul class="list-group no-margin">'; + $.each(tags,function(k,v){ + str += '<li class="list-group-item"><input type="checkbox" class="checkbox tagFilterAuto" value="'+k+'" data-parent="tags" data-label="'+k+'"/>'+k+' (' +v+ ')</li>' + }); + str += '</ul> </div>'; + $("#divTagsMenu").append(str); + } +} + + +function filterType(types){ + mylog.log("filterType", types); + if(typeof tags != "undefined" ){ + str = '<div class="panel-heading">'+ + '<h4 class="panel-title" onclick="manageCollapse(\'types\', \'false\')">'+ + '<a data-toggle="collapse" href="#types" style="color:#719FAB" data-label="types">'+trad.alltypes+ + '<i class="fa fa-chevron-right right" aria-hidden="true" id="fa_tags"></i>'+ + '</a>'+ + '</h4>'+ + '</div>'+ + '<div id="list_types" class="panel-collapse collapse">'+ + '<ul class="list-group no-margin">'; + $.each(types,function(k,v){ + str += '<li class="list-group-item"><input type="checkbox" class="checkbox typeFilterAuto" value="'+k+'" data-parent="types" data-label="'+k+'"/>'+trad[k]+' (' +v+ ')</li>' + }); + str += '</ul> </div>'; + $("#divTypesMenu").append(str); + } +} + +</script> diff --git a/views/news/formCreateNewsCO2.php b/views/news/formCreateNewsCO2.php new file mode 100755 index 0000000000000000000000000000000000000000..29b29e966f8ac3873b2dd930e9cb967930515fc6 --- /dev/null +++ b/views/news/formCreateNewsCO2.php @@ -0,0 +1,464 @@ + +<style> + .tools_bar{ + border-bottom: 1px solid #E6E8E8; + } + .tools_bar .btn{ + border-right: 1px solid #E6E8E8; + } + .mosaicflow__column { + float:left; + } +.mosaicflow__item img { + display:block; + width:100%; + height:auto; +} +.grayscale{ + filter: grayscale(0.7) blur(1px); + -webkit-filter: grayscale(0.7) blur(1px); + -moz-filter: grayscale(0.7) blur(1px); + -o-filter: grayscale(0.7) blur(1px); + -ms-filter: grayscale(0.7) blur(1px); +} +.newImageAlbum, .updateImageNews{ + width: 75px; + height: 75px; + margin: 5px; + text-align: -webkit-center; + position: relative; + background-color: white; + display: inline-block; +} +.updateImageNews > img { + position: absolute; + top:0px; + left:0px; +} +.deleteDoc { + position: absolute; + top:0px; + right: 0px; +} +.deleteDoc:hover > i { + text-shadow: 0px 0px 2px rgba(0,0,0,0.5); + font-size: 16px; +} +.spinner-add-image{ + position: absolute; + z-index: 10; + left: 20px; + top: 20px; +} +.removeImage{ + position: absolute; + z-index: 10; + right: 0px; + top: 0px; + text-shadow: 0px 0px 2px black; +} +.thumb_sel .prev_thumb { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -50px 0px; + background-color: rgba(250,250,250,0.5); + float: left; + width: 26px; + height: 22px; + cursor: hand; + cursor: pointer; +} +.thumb_sel .prev_thumb:hover { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat 0px 0px; +} +.thumb_sel .next_thumb { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -76px 0px; + background-color: rgba(250,250,250,0.5); + float: left; + width: 24px; + height: 22px; + cursor: hand; + cursor: pointer; +} +.thumb_sel .next_thumb:hover { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -26px 0px; +} +#dropdown_search{ + display:none; + border: 1px solid #eee; + max-height: 160px; + overflow-y: auto; + position: relative; +} +#dropdown_search .li-dropdown-scope{ + text-align: left; + width:100%; +} +#dropdown_search .li-dropdown-scope a{ + font-size:12px; + line-height: 25px; +} +/*.results{ + margin-top: 10px; +}*/ + +.timeline_element .timeline_text{ + font-size:14px !important; +} +.timeline_element .img-responsive{ + max-height:300px !important; +} + +#form-news{ + display: inline-block; + width: 100%; + padding-bottom: 10px; +} +#btn-submit-form { + /*right: 30px; + position: absolute; + bottom: 10px;*/ + position:relative; + float: right; +} +.timeline_shared_picture{ + margin-top:5px; +} +.timeline_element .tag_item_map_list { + color: #F00; + font-weight: 200 !important; + font-size: 12px !important; + cursor: pointer; +} +.main-col-search{ + min-height:1100px !important; +} +.timeline_element .label-danger { + margin-bottom: 3px; + display: inline-block; +} +#footerDropdown{ + position:relative; + background-color: transparent !important; +} +.tag.bold{ + font-weight:600 !important; +} +.timeline_element{ + padding-bottom: 0px; +} +.bar_tools_post { + font-size: 15px; +} + +#form-news hr , .list-select-scopes hr{ + border-top: 1px solid #d8d8d8; +} +#form-news hr.submit { + margin: 0 0 10px 0 !important; + display: block; +} + +.extract_url textarea#get_url{ + box-shadow: none!important; +} +#form-news input#falseInput{ + border: none!important; +} +.mentions-input-box .mentions{ + font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif !important; + /*left: 5px !important; + top: 1px !important;*/ + padding:0 !important; +} +.updateMention .mentions-input-box .mentions{ + padding:10px !important; +} +</style> +<?php + $isLive = isset($_GET["isLive"]) ? true : false; + $contextName = ""; + $contextIcon = "bookmark fa-rotate-270"; + $contextTitle = ""; + $imgProfil = $this->module->assetsUrl . "/images/news/profile_default_l.png"; + $textForm = Yii::t("common","Write a public message visible on the wall of selected places"); + if( isset($type) && $type == Organization::COLLECTION && isset($parent) ){ + $contextName = $parent["name"]; + $contextIcon = "users"; + $contextTitle = Yii::t("common","Participants"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $titleRestricted = "Restreint"; + $private = Yii::t("common","Visible only to the members"); + $titlePrivate = "Privé"; + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $public = true; + $iconBegin= "connectdevelop"; + $headerName= "Journal de l'organisation";//.$contextName; + $topTitle= "Journal de l'organisation";//.$contextName; + if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or to this community"); + else + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + } + else if((isset($type) && $type == Person::COLLECTION) || (isset($parent) && !@$type)){ + if((@$isLive && $isLive==true) || !@Yii::app()->session["userId"] || (Yii::app()->session["userId"] !=$contextParentId)){ + //Visible de tous sur + //Menu::person($parent); + + $contextName =$parent["name"]; + $contextIcon = "<i class='fa fa-circle text-yellow'></i> <i class='fa fa-user text-dark'></i> "; + $contextTitle = Yii::t("common", "DIRECTORY of")." ".$contextName; + if(@Yii::app()->session["userId"] && $contextParentId==Yii::app()->session["userId"]){ + $restricted = Yii::t("common","Visible to all"); + $private = Yii::t("common","Visible only to me"); + $textForm = Yii::t("common","Write a public message visible on the wall of selected places"); + } + if(Yii::app()->session["userId"] ==$contextParentId){ + $headerName= "Mon journal"; + $topTitle = $headerName; + }else{ + $headerName= "Journal de : ".$contextName; + $topTitle = $headerName; + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + } + } + else{ + $shortName=explode(" ", $parent["name"]); + //$headerName= "Bonjour <span class='text-red'>".addslashes($shortName[0])."</span>, l'actu de votre réseau"; + $headerName= "L'actu de votre réseau"; + $restricted = Yii::t("common","Visible to all on my wall and published on my network"); + $private = Yii::t("common","Visible only to me"); + $textForm = Yii::t("common","Published a message in your wall for your network"); + } + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $iconBegin= "connectdevelop"; + } + else if( isset($type) && $type == Project::COLLECTION && isset($parent) ){ + $contextName = $parent["name"]; + $contextIcon = "lightbulb-o"; + $contextTitle = Yii::t("common", "Contributors of project"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $private = Yii::t("common","Visible only to the project's contributors"); + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $iconBegin= "connectdevelop"; + $public = true; + $headerName= "Journal du projet";//.$contextName; + $topTitle = "Journal du projet";//.$contextName; + if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or to this community"); + else + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + }else if( isset($type) && $type == Event::COLLECTION && isset($parent) ){ + $contextName = $parent["name"]; + $contextIcon = "calendar"; + $contextTitle = Yii::t("common", "Contributors of event"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $iconBegin= "connectdevelop"; + $headerName= "Journal de l'événement";//.$contextName; + $topTitle = "Journal de l'événement";//.$contextName; + $public = true; + //if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or to this community"); + //else + //$textForm = Yii::t("common","Write a private message to")." ".$contextName; + + } + + else if( isset($type) && $type == City::COLLECTION && isset($city) ){ + $contextName = Yii::t("common","City")." : ".$city["name"]; + $contextIcon = "university"; + $contextTitle = Yii::t("common", "DIRECTORY Local network of")." ".$city["name"]; + $scopeBegin= "Public"; + $iconBegin= "globe"; + $headerName= "Actualités de ".$city["name"]; + $topTitle = ""; //$headerName; + $textForm = Yii::t("common","Write a idea, a message in the city wall of")." ".$contextName; + + } + else if( isset($type) && $type == "pixels"){ + //$contextName = "<i class='fa fa-rss'></i> Signaler un bug"; + //$contextTitle = Yii::t("common", "Contributors of project"); + $headerName= " La foire aux bugs"; + $topTitle = " La foire aux bugs"; + $textForm = Yii::t("common","Write a bug or an idea to improve the development of communecter"); + } + + $imgProfil = ""; + if($contextParentType != "city"){ + Menu::news($type); + //$this->renderPartial('../default/panels/toolbar'); + } +?> +<!-- <div id="newLiveFeedForm" class="col-xs-12 no-padding margin-bottom-10"></div> --> +<div id="formCreateNewsTemp" style="float: none;" class="center-block hidden"> + <div class='no-padding form-create-news-container col-sm-12'> + + <div class='padding-10 partition-light no-margin text-left header-form-create-news' style="margin-bottom:-40px !important;"> + <i class='fa fa-angle-down'></i> <i class="fa fa-file-text-o"></i> <span id="info-write-msg"><?php echo $textForm; ?></span> + <a class="btn btn-xs pull-right" style="margin-top: -4px;" onclick="javasctipt:showFormBlock(false);"> + <i class="fa fa-times"></i> + </a> + </div> + + <div class="tools_bar bg-white"> + <?php if((@$canManageNews && $canManageNews==true) || (@$isLive && $isLive == true)){ ?> + <div class="user-image-buttons"> + <form method="post" id="photoAddNews" enctype="multipart/form-data"> + <span class="btn btn-white btn-file fileupload-new btn-sm uploadImageNews" <?php //if (!$authorizedToStock){ echo 'onclick="addMoreSpace();"'; } ?>> + <span class="fileupload-new"><i class="fa fa-picture-o fa-x"></i> </span> + <?php //if ($authorizedToStock){ ?> + <input type="file" accept=".gif, .jpg, .png" name="newsImage" id="addImage" onchange="showMyImage(this);"> + <?php //} ?> + </span> + </form> + </div> + <?php } ?> + </div> + + <form id='form-news' class="col-sm-12 no-padding"> + + <input type="hidden" id="parentId" name="parentId" value="<?php if($contextParentType != "city") echo $contextParentId; else echo Yii::app()->session["userId"]; ?>"/> + <input type="hidden" id="parentType" name="parentType" value="<?php if($contextParentType != "city") echo $contextParentType; else echo Person::COLLECTION; ?>"/> + + <input type="hidden" id="typeNews" name="type" value="news"/> + + <input type="text" id="falseInput" onclick="javascript:showFormBlock(true);" + class="col-xs-12 col-md-12" placeholder="<?php echo Yii::t("common","Express yourself ...") ?>" style="padding:15px;"/> + + <div class="extract_url" style="display:none;"> + <div class="padding-10 bg-white"> + <img class="loading_indicator" src="<?php echo $this->module->assetsUrl ?>/images/news/ajax-loader.gif"> + <textarea id="get_url" placeholder="<?php echo Yii::t("common","Express yourself ...") ?>" class="get_url_input form-control textarea mention" style="border:none;background:transparent !important" name="getUrl" spellcheck="false" ></textarea> + <ul class="dropdown-menu" id="dropdown_search" style=""> + </ul> + + <div id="results" class="bg-white results col-sm-12 padding-10"></div> + </div> + </div> + <div class="form-group tagstags col-sm-12 no-padding"> + <input id="tags" type="" data-type="select2" name="tags" placeholder="#Tags" value="" style="width:100%;"> + </div> + <div class="form-actions no-padding" style="display: block;"> + + <div id="scopeListContainerForm" class="list_tags_scopes col-md-12 no-padding margin-bottom-10"></div> + + <div class="col-md-12 col-sm-12 col-xs-12 no-padding"> + <hr class="submit"> + + <button id="btn-submit-form" type="submit" class="btn btn-success pull-right"><?php echo Yii::t("common","Submit") ?> <i class="fa fa-arrow-circle-right"></i></button> + + + <?php if((@$canManageNews && $canManageNews==true) + || (@Yii::app()->session["userId"] + && $contextParentType==Person::COLLECTION + && Yii::app()->session["userId"]==$contextParentId)){ ?> + + <!--<div id="tagScopeListContainer" class="list_tags_scopes col-xs-12 no-padding"></div> + <input type="hidden" name="scope" value="public"/>--> + + <div class="dropdown col-md-6 no-padding"> + <a data-toggle="dropdown" class="btn btn-default" id="btn-toogle-dropdown-scope" href="#"><i class="fa fa-<?php echo $iconBegin ?>"></i> <?php echo $scopeBegin ?> <i class="fa fa-caret-down" style="font-size:inherit;"></i></a> + <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> + <?php if (@$private && ($contextParentType==Project::COLLECTION || $contextParentType==Organization::COLLECTION)){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="private"><h4 class="list-group-item-heading"><i class="fa fa-lock"></i> <?php echo ucfirst(Yii::t("common", "private")) ?></h4> + <p class="list-group-item-text small"><?php echo $private ?></p> + </a> + </li> + <?php } ?> + <?php if(@$restricted){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="restricted"><h4 class="list-group-item-heading"><i class="fa fa-connectdevelop"></i> <?php echo ucfirst(Yii::t("common", "my network")) ?></h4> + <p class="list-group-item-text small"><?php echo $restricted ?></p> + </a> + </li> + <?php } ?> + <?php if(@$public){ ?> + <li> + <a href="javascript:;" id="scope-my-wall" class="scopeShare" data-value="public"><h4 class="list-group-item-heading"><i class="fa fa-globe"></i> <?php echo ucfirst(Yii::t("common", "public")) ?></h4> + <!--<div class="small" style="padding-left:12px;">--> + <p class="list-group-item-text small"><?php echo Yii::t("common","Visible to all and posted on cities' live")?></p> + </a> + </li> + <?php } ?> + <?php if (@$private && $contextParentType==Person::COLLECTION){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="private"><h4 class="list-group-item-heading"><i class="fa fa-lock"></i> <?php echo ucfirst(Yii::t("common", "private")) ?></h4> + <p class="list-group-item-text small"><?php echo $private ?></p> + </a> + </li> + <?php } ?> + <!--<li> + <a href="#" id="scope-select" data-toggle="modal" data-target="#modal-scope"><i class="fa fa-plus"></i> Selectionner</a> + </li>--> + </ul> + </div> + + + <?php if($contextParentType == Organization::COLLECTION || $contextParentType == Project::COLLECTION || $contextParentType == Event::COLLECTION){ ?> + <div class="dropdown no-padding pull-right"> + <a data-toggle="dropdown" class="btn btn-default" id="btn-toogle-dropdown-targetIsAuthor" href="#"> + <?php if(@$parent["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'> + <?php } else{ ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_'.$contextParentType.'.png' ?>'> + <?php } ?> + <i class="fa fa-caret-down" style="font-size:inherit;"></i> + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> + <li> + <a href="javascript:;" class="targetIsAuthor" data-value="1"> + <h4 class="list-group-item-heading"> + <?php if(@$parent["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'> + <?php } else { ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_'.$contextParentType.'.png' ?>'> + <?php } ?> + <?php echo $contextName ?></h4> + <p class="list-group-item-text small"><?php echo Yii::t("form", "Show {who} as author",array("{who}"=>$contextName)) ?></p> + </a> + </li> + <li> + <a href="javascript:;" class="targetIsAuthor" data-value="0"><h4 class="list-group-item-heading"> + <?php if(@Yii::app()->session["user"]["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).Yii::app()->session["user"]["profilThumbImageUrl"]; ?>'> + <?php } else { ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_citoyens.png' ?>'> + <?php } ?> + <?php echo ucfirst(Yii::t("common", "Me")) ?></h4> + <p class="list-group-item-text small"><?php echo Yii::t("form","I am the author") ?></p> + </a> + </li> + </ul> + <input type="hidden" id="authorIsTarget" value="1"/> + </div> + <?php } ?> + <?php } ?> + + + + <?php if($type=="city"){ ?> + <input type="hidden" name="scope" value="public"/> + <?php } ?> + <?php if((@$canManageNews && $canManageNews=="true") || ( + @Yii::app()->session["userId"] && + $contextParentType==Person::COLLECTION && Yii::app()->session["userId"]==$contextParentId)){ ?> + <?php if(in_array($contextParentType,array(Event::COLLECTION,Person::COLLECTION,Project::COLLECTION,Organization::COLLECTION))){ ?> + <input type="hidden" name="scope" value="restricted"/> + <?php } else { ?> + <input type="hidden" name="scope" value="public"/> + <?php } ?> + + <?php }else{ if($contextParentType==Event::COLLECTION){?> + + <input type="hidden" name="scope" value="restricted"/> + + <?php } else { ?> + + <input type="hidden" name="scope" value="private"/> + + <?php } } ?> + </div> + </div> + </form> + </div> +</div> diff --git a/views/news/index.php b/views/news/index.php new file mode 100755 index 0000000000000000000000000000000000000000..3cd7596840144d7767ce4990b6f6b78f2b1d96b9 --- /dev/null +++ b/views/news/index.php @@ -0,0 +1,760 @@ +<?php +$cssAnsScriptFilesModule = array( + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css', + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/wysiwyg-color.css', + '/plugins/bootstrap-datetimepicker/css/datetimepicker.css', + '/plugins/x-editable/css/bootstrap-editable.css', + '/plugins/select2/select2.css', + //X-editable... + '/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js' , + '/plugins/x-editable/js/bootstrap-editable.js' , + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/wysihtml5-0.3.0.min.js' , + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.js' , + '/plugins/wysihtml5/wysihtml5.js', + '/plugins/jquery.scrollTo/jquery.scrollTo.min.js', + '/plugins/ScrollToFixed/jquery-scrolltofixed-min.js', + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js', + '/plugins/jquery.appear/jquery.appear.js', + '/plugins/jquery.elastic/elastic.js', + '/plugins/underscore-master/underscore.js', + '/plugins/jquery-mentions-input-master/jquery.mentionsInput.js', + '/plugins/jquery-mentions-input-master/jquery.mentionsInput.css', + '/plugins/jquery-mentions-input-master/lib/jquery.events.input.js', + +); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + +$cssAnsScriptFilesModule = array( + //'/css/news/index.css', + '/css/news/newsSV.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->theme->baseUrl."/assets"); + +$cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/newsHtml.js', + '/js/dataHelpers.js' + //'/js/news/autosize.js', +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); +?> + <!-- start: PAGE CONTENT --> + +<?php + if($type != City::CONTROLLER && $type != "pixels" && !@$_GET["renderPartial"]) + $this->renderPartial('../pod/headerEntity', + array("entity"=>$parent, "type" => $type, "viewer" => @$viewer, + "firstView" => @$firstView, "openEdition" => @$openEdition, "edit" => $edit)); +?> + +<?php + //$isLive = isset($_GET["isLive"]) ? true : false; + $contextName = ""; + $contextIcon = "bookmark fa-rotate-270"; + $contextTitle = ""; + $imgProfil = $this->module->assetsUrl . "/images/news/profile_default_l.png"; + $textForm = Yii::t("common","Write a public message visible on the wall of selected places"); + if( isset($type) && $type == Organization::COLLECTION && isset($parent) ){ + Menu::organization( $parent ); + //$thisOrga = Organization::getById($parent["_id"]); + $contextName = addslashes($parent["name"]); + $contextIcon = "users"; + $contextTitle = Yii::t("common","Participants"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $titleRestricted = "Restreint"; + $private = Yii::t("common","Visible only to the members"); + $titlePrivate = "Privé"; + $scopeBegin= ucfirst(Yii::t("common", "private")); + $public = true; + $iconBegin= "lock"; + $headerName= "Journal de l'organisation";//.$contextName; + $topTitle= "Journal de l'organisation";//.$contextName; + if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or this community"); + else + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + } + else if((isset($type) && $type == Person::COLLECTION) || (isset($parent) && !@$type)){ + if((@$isLive && $isLive==true) || !@Yii::app()->session["userId"] || (Yii::app()->session["userId"] !=$contextParentId)){ + //Visible de tous sur + //Menu::person($parent); + + $contextName =addslashes($parent["name"]); + $contextIcon = "<i class='fa fa-circle text-yellow'></i> <i class='fa fa-user text-dark'></i> "; + $contextTitle = Yii::t("common", "DIRECTORY of")." ".$contextName; + if(@Yii::app()->session["userId"] && $contextParentId==Yii::app()->session["userId"]){ + $restricted = Yii::t("common","Visible to all"); + $private = Yii::t("common","Visible only to me"); + $textForm = Yii::t("common","Write a public message visible on the wall of selected places"); + } + if(Yii::app()->session["userId"] ==$contextParentId){ + $headerName= "Mon journal"; + $topTitle = $headerName; + }else{ + $headerName= "Journal de : ".$contextName; + $topTitle = $headerName; + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + } + } + else{ + $shortName=explode(" ", $parent["name"]); + //$headerName= "Bonjour <span class='text-red'>".addslashes($shortName[0])."</span>, l'actu de votre réseau"; + $headerName= "L'actu de votre réseau"; + $restricted = Yii::t("common","Visible to all on my wall and published on my network"); + $private = Yii::t("common","Visible only to me"); + $textForm = Yii::t("common","Published a message in your wall for your network"); + } + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $iconBegin= "connectdevelop"; + } + else if( isset($type) && $type == Project::COLLECTION && isset($parent) ){ + //Menu::project( $parent ); + $contextName = addslashes($parent["name"]); + $contextIcon = "lightbulb-o"; + $contextTitle = Yii::t("common", "Contributors of project"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $private = Yii::t("common","Visible only to the project's contributors"); + $scopeBegin= ucfirst(Yii::t("common", "private")); + $iconBegin= "lock"; + $public = true; + $headerName= "Journal du projet";//.$contextName; + $topTitle = "Journal du projet";//.$contextName; + if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or to this community"); + else + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + }else if( isset($type) && $type == Event::COLLECTION && isset($parent) ){ + // Menu::event( $parent ); + $contextName = addslashes($parent["name"]); + $contextIcon = "calendar"; + $contextTitle = Yii::t("common", "Contributors of event"); + $restricted = Yii::t("common","Visible to all on this wall and published on community's network"); + $scopeBegin= ucfirst(Yii::t("common", "my network")); + $iconBegin= "connectdevelop"; + $headerName= "Journal de l'événement";//.$contextName; + $topTitle = "Journal de l'événement";//.$contextName; + if(@$canManageNews && $canManageNews==true) + $textForm = Yii::t("common","Post a message in the wall of")." ".$contextName.", ".Yii::t("common","publicly shared or to this community"); + else + $textForm = Yii::t("common","Write a private message to")." ".$contextName; + + } + + else if( isset($type) && $type == City::COLLECTION && isset($city) ){ + $contextName = Yii::t("common","City")." : ".$city["name"]; + $contextIcon = "university"; + $contextTitle = Yii::t("common", "DIRECTORY Local network of")." ".$city["name"]; + $scopeBegin= "Public"; + $iconBegin= "globe"; + $headerName= "Actualités de ".$city["name"]; + $topTitle = ""; //$headerName; + $textForm = Yii::t("common","Write a idea, a message in the city wall of")." ".$contextName; + + } + else if( isset($type) && $type == "pixels"){ + //$contextName = "<i class='fa fa-rss'></i> Signaler un bug"; + //$contextTitle = Yii::t("common", "Contributors of project"); + $headerName= " La foire aux bugs"; + $topTitle = " La foire aux bugs"; + $textForm = Yii::t("common","Write a bug or an idea to improve the development of communecter"); + } + + $imgProfil = ""; + if($contextParentType != "city"){ + Menu::news($type); + //$this->renderPartial('../default/panels/toolbar'); + } +?> +<style> + .tools_bar{ + border-bottom: 1px solid #E6E8E8; + } + .tools_bar .btn{ + border-right: 1px solid #E6E8E8; + } + .mosaicflow__column { + float:left; + } +.mosaicflow__item img { + display:block; + width:100%; + height:auto; +} +.grayscale{ + filter: grayscale(0.7) blur(1px); + -webkit-filter: grayscale(0.7) blur(1px); + -moz-filter: grayscale(0.7) blur(1px); + -o-filter: grayscale(0.7) blur(1px); + -ms-filter: grayscale(0.7) blur(1px); +} +.newImageAlbum{ + width: 75px; + height: 75px; + margin: 5px; + text-align: -webkit-center; + position: relative; + background-color: white; + display: inline-block; +} +.spinner-add-image{ + position: absolute; + z-index: 10; + left: 20px; + top: 20px; +} +.removeImage{ + position: absolute; + z-index: 10; + right: 0px; + top: 0px; + text-shadow: 0px 0px 2px black; +} +.thumb_sel .prev_thumb { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -50px 0px; + background-color: rgba(250,250,250,0.5); + float: left; + width: 26px; + height: 22px; + cursor: hand; + cursor: pointer; +} +.thumb_sel .prev_thumb:hover { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat 0px 0px; +} +.thumb_sel .next_thumb { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -76px 0px; + background-color: rgba(250,250,250,0.5); + float: left; + width: 24px; + height: 22px; + cursor: hand; + cursor: pointer; +} +.thumb_sel .next_thumb:hover { + background: url(<?php echo $this->module->assetsUrl ?>/images/news/thumb_selection.gif) no-repeat -26px 0px; +} +#dropdown_search{ + display:none; + border: 1px solid #eee; + max-height: 160px; + overflow-y: auto; + position: relative; +} +#dropdown_search .li-dropdown-scope{ + text-align: left; + width:100%; +} +#dropdown_search .li-dropdown-scope a{ + font-size:12px; + line-height: 25px; +} +/*.results{ + margin-top: 10px; +}*/ + +.timeline_element .timeline_text{ + font-size:14px !important; +} +.timeline_element .img-responsive{ + max-height:300px !important; +} + +#form-news{ + display: inline-block; + width: 100%; + padding-bottom: 10px; +} +#btn-submit-form { + /*right: 30px; + position: absolute; + bottom: 10px;*/ + position:relative; + float: right; +} +.timeline_shared_picture{ + margin-top:5px; +} +.timeline_element .tag_item_map_list { + color: #F00; + font-weight: 200 !important; + font-size: 12px !important; + cursor: pointer; +} +.main-col-search{ + min-height:1100px !important; +} +.timeline_element .label-danger { + margin-bottom: 3px; + display: inline-block; +} +#footerDropdown{ + position:relative; + background-color: transparent !important; +} +.tag.bold{ + font-weight:600 !important; +} +.timeline_element{ + padding-bottom: 0px; +} +.bar_tools_post { + font-size: 15px; +} + +#form-news hr , .list-select-scopes hr{ + border-top: 1px solid #d8d8d8; +} +#form-news hr.submit { + margin: 0 0 10px 0 !important; + display: block; +} + +</style> +<!--<textarea class="mention"></textarea>--> + + +<?php + if($isLive) + $this->renderPartial('../news/podBtnTypeNews', array("type"=>$type, "filterTypeNews"=>@$filterTypeNews)); +?> + +<!-- <div id="newLiveFeedForm" class="col-xs-12 no-padding margin-bottom-10"></div> --> +<div id="formCreateNewsTemp" style="float: none;display:none;" class="center-block"> + <div class='no-padding form-create-news-container col-sm-12'> + + <?php if(false) { ?> + <div class="col-xs-12" style="margin-top: 10px; margin-bottom: 10px; margin-left: 0px;padding: 0px 10px;" id="list_type_news"> + + <div class="btn-group btn-group-sm inline-block" id="menu-type-news"> + <button class="btn btn-default btn-type-news tooltips text-dark active" + data-toggle="tooltip" data-placement="top" title="Messages" data-type="news"> + <i class="fa fa-check-circle-o search_news hidden"></i> <i class="fa fa-rss"></i> + <span class="hidden-xs hidden-sm hidden-md">Message</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Idée" data-type="idea"> + <i class="fa fa-circle-o search_organizations hidden"></i> <i class="fa fa-info-circle"></i> + <span class="hidden-xs hidden-sm hidden-md">Idée</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Question" data-type="question"> + <i class="fa fa-circle-o search_projects hidden"></i> <i class="fa fa-question-circle"></i> + <span class="hidden-xs hidden-sm hidden-md">Question</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Annonce" data-type="announce"> + <i class="fa fa-circle-o search_events hidden"></i> <i class="fa fa-ticket"></i> + <span class="hidden-xs hidden-sm hidden-md">Annonce</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Information" data-type="information"> + <i class="fa fa-circle-o search_needs hidden"></i> <i class="fa fa-newspaper-o"></i> + <span class="hidden-xs hidden-sm hidden-md">Information</span> + </button> + </div> + + </div> + <?php } ?> + + <h5 class='padding-10 partition-light no-margin text-left header-form-create-news' style="margin-bottom:-40px !important;"><i class='fa fa-angle-down'></i> <i class="fa fa-file-text-o"></i> <span id="info-write-msg"><?php echo $textForm; ?></span> + <a class="btn btn-xs pull-right" style="margin-top: -4px;" onclick="javasctipt:showFormBlock(false);"> + <i class="fa fa-times"></i> + </a> + </h5> + + <div class="tools_bar bg-white"> + <?php if((@$canManageNews && $canManageNews==true) || (@$isLive && $isLive == true)){ ?> + <div class="user-image-buttons"> + <form method="post" id="photoAddNews" enctype="multipart/form-data"> + <span class="btn btn-white btn-file fileupload-new btn-sm" <?php if (!$authorizedToStock){ ?> onclick="addMoreSpace();" <?php } ?>><span class="fileupload-new"><i class="fa fa-picture-o fa-x"></i> </span> + <?php if ($authorizedToStock){ ?> + <input type="file" accept=".gif, .jpg, .png" name="newsImage" id="addImage" onchange="showMyImage(this);"> + <?php } ?> + + </span> + </form> + </div> + <?php } ?> + </div> + + <form id='form-news' class="col-sm-12 no-padding"> + + <input type="hidden" id="parentId" name="parentId" value="<?php if($contextParentType != "city") echo $contextParentId; else echo Yii::app()->session["userId"]; ?>"/> + <input type="hidden" id="parentType" name="parentType" value="<?php if($contextParentType != "city") echo $contextParentType; else echo Person::COLLECTION; ?>"/> + + <input type="hidden" id="typeNews" name="type" value="news"/> + + <input type="text" id="falseInput" onclick="javascript:showFormBlock(true);" + class="col-xs-12 col-md-12" placeholder="Exprimez-vous ..." style="padding:15px;"/> + + <div class="extract_url"> + <div class="padding-10 bg-white"> + <img class="loading_indicator" src="<?php echo $this->module->assetsUrl ?>/images/news/ajax-loader.gif"> + <textarea id="get_url" placeholder="Exprimez-vous ..." class=" get_url_input form-control textarea mention" style="border:none;background:transparent !important" name="getUrl" spellcheck="false" ></textarea> + <ul class="dropdown-menu" id="dropdown_search" style=""> + </ul> + + <div id="results" class="bg-white results col-sm-12"></div> + </div> + </div> + <div class="form-group tagstags col-sm-12 no-padding"> + <input id="tags" type="" data-type="select2" name="tags" placeholder="#Tags" value="" style="width:100%;"> + </div> + <div class="form-actions no-padding" style="display: block;"> + + <div id="scopeListContainer" class="list_tags_scopes col-md-12 no-padding margin-bottom-10"></div> + + <div class="col-md-12 no-padding"> + <hr class="submit"> + + <button id="btn-submit-form" type="submit" class="btn btn-green pull-right">Envoyer <i class="fa fa-arrow-circle-right"></i></button> + + + <?php if((@$canManageNews && $canManageNews==true) + || (@Yii::app()->session["userId"] + && $contextParentType==Person::COLLECTION + && Yii::app()->session["userId"]==$contextParentId)){ ?> + + <!--<div id="tagScopeListContainer" class="list_tags_scopes col-xs-12 no-padding"></div> + <input type="hidden" name="scope" value="public"/>--> + + <div class="dropdown col-md-6 no-padding"> + <a data-toggle="dropdown" class="btn btn-default" id="btn-toogle-dropdown-scope" href="#"><i class="fa fa-<?php echo $iconBegin ?>"></i> <?php echo $scopeBegin ?> <i class="fa fa-caret-down" style="font-size:inherit;"></i></a> + <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> + <?php if (@$private && ($contextParentType==Project::COLLECTION || $contextParentType==Organization::COLLECTION)){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="private"><h4 class="list-group-item-heading"><i class="fa fa-lock"></i> <?php echo ucfirst(Yii::t("common", "private")) ?></h4> + <p class="list-group-item-text small"><?php echo $private ?></p> + </a> + </li> + <?php } ?> + <?php if(@$restricted){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="restricted"><h4 class="list-group-item-heading"><i class="fa fa-connectdevelop"></i> <?php echo ucfirst(Yii::t("common", "my network")) ?></h4> + <p class="list-group-item-text small"><?php echo $restricted ?></p> + </a> + </li> + <?php } ?> + <?php if(@$public){ ?> + <li> + <a href="javascript:;" id="scope-my-wall" class="scopeShare" data-value="public"><h4 class="list-group-item-heading"><i class="fa fa-globe"></i> <?php echo ucfirst(Yii::t("common", "public")) ?></h4> + <!--<div class="small" style="padding-left:12px;">--> + <p class="list-group-item-text small"><?php echo Yii::t("common","Visible to all and posted on cities' live")?></p> + </a> + </li> + <?php } ?> + <?php if (@$private && $contextParentType==Person::COLLECTION){ ?> + <li> + <a href="javascript:;" id="scope-my-network" class="scopeShare" data-value="private"><h4 class="list-group-item-heading"><i class="fa fa-lock"></i> <?php echo ucfirst(Yii::t("common", "private")) ?></h4> + <p class="list-group-item-text small"><?php echo $private ?></p> + </a> + </li> + <?php } ?> + <!--<li> + <a href="#" id="scope-select" data-toggle="modal" data-target="#modal-scope"><i class="fa fa-plus"></i> Selectionner</a> + </li>--> + </ul> + </div> + + + <?php if($contextParentType == Organization::COLLECTION || $contextParentType == Project::COLLECTION){ ?> + <div class="dropdown no-padding pull-right"> + <a data-toggle="dropdown" class="btn btn-default" id="btn-toogle-dropdown-targetIsAuthor" href="#"> + <?php if(@$parent["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'> + <?php } else{ ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_'.$contextParentType.'.png' ?>'> + <?php } ?> + <i class="fa fa-caret-down" style="font-size:inherit;"></i> + </a> + <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> + <li> + <a href="javascript:;" class="targetIsAuthor" data-value="1"> + <h4 class="list-group-item-heading"> + <?php if(@$parent["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).$parent["profilThumbImageUrl"] ?>'> + <?php } else { ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_'.$contextParentType.'.png' ?>'> + <?php } ?> + <?php echo $contextName ?></h4> + <p class="list-group-item-text small">Afficher <?php echo $contextName ?> comme auteur</p> + </a> + </li> + <li> + <a href="javascript:;" class="targetIsAuthor" data-value="0"><h4 class="list-group-item-heading"> + <?php if(@ Yii::app()->session["user"]["profilThumbImageUrl"]){ ?> + <img height=20 width=20 src='<?php echo Yii::app()->getRequest()->getBaseUrl(true).Yii::app()->session["user"]["profilThumbImageUrl"]; ?>'> + <?php } else { ?> + <img height=20 width=20 src='<?php echo $this->module->assetsUrl.'/images/thumb/default_citoyens.png' ?>'> + <?php } ?> + <?php echo ucfirst(Yii::t("common", "Moi")) ?></h4> + <p class="list-group-item-text small"><?php echo "Je suis l'auteur" ?></p> + </a> + </li> + </ul> + <input type="hidden" id="authorIsTarget" value="1"/> + </div> + <?php } ?> + <?php } ?> + + + + <?php if($type=="city"){ ?> + <?php /* ?> + <input type="hidden" name="cityInsee" value=""/> + <input type="hidden" id="cityPostalCode" name="cityPostalCode" value=""/> + <p class="text-xs hidden-xs" style="position:absolute;bottom:20px;"><?php echo Yii::t("news","News sent to") ?>:</p> + <div class="badge cityBadge" style="position:absolute;bottom:10px;"> + </div><?php */ ?> + <input type="hidden" name="scope" value="public"/> + <?php } ?> + + + <?php if((@$canManageNews && $canManageNews=="true") || ( + @Yii::app()->session["userId"] && + $contextParentType==Person::COLLECTION && Yii::app()->session["userId"]==$contextParentId)){ ?> + + <?php if($contextParentType==Organization::COLLECTION || $contextParentType==Project::COLLECTION){ ?> + <input type="hidden" name="scope" value="private"/> + <?php } else if($contextParentType==Event::COLLECTION || $contextParentType==Person::COLLECTION){ ?> + <input type="hidden" name="scope" value="restricted"/> + <?php } else { ?> + <input type="hidden" name="scope" value="public"/> + <?php } ?> + + <?php }else{ if($contextParentType==Event::COLLECTION){?> + + <input type="hidden" name="scope" value="restricted"/> + + <?php } else { ?> + + <input type="hidden" name="scope" value="private"/> + + <?php } } ?> + </div> + </div> + </form> + </div> +</div> + + +<?php if( !isset( Yii::app()->session['userId'] ) ) { ?> +<div class="alert col-md-12 col-xs-12 center" style="margin-bottom: 0px; margin-top: 0px; "> + <div class="col-md-12 margin-bottom-10"><i class="fa fa-info-circle"></i> Vous devez être connecté pour publier du contenu.</div> + <!-- <button class="btn-top btn btn-success" onclick="showPanel('box-register');"><i class="fa fa-plus-circle"></i> <span class="hidden-xs">S'inscrire</span></button> + <button class="btn-top btn bg-red" style="margin-right:10px;" onclick="showPanel('box-login');"><i class="fa fa-sign-in"></i> <span class="hidden-xs">Se connecter</span></button> --> +</div> +<?php } ?> +<div id="newsPad"> + <div id="newsHistory" class="padding-10"> + <!--<div class="margin-top-10"> + <button class="btn text-red btn-default" id="btn-filter-tag-news" onclick="toggleFilters('#tagFilters');"># Rechercher par tag</button> + <button class="btn text-red btn-default" id="btn-filter-scope-news" onclick="toggleFilters('#scopeFilters');"><i class="fa fa-circle-o"></i> Rechercher par lieu</button> + <button class="btn btn-sm btn-default bg-red" onclick="showAllNews();"><i class="fa fa-times"></i> Annuler</button> + </div>--> + <div class="col-md-11 no-padding main-col-live"> + <!-- start: TIMELINE PANEL --> + <div class="no-padding panel" style="padding-top:10px;box-shadow:inherit;"> + <div id="top" class="no-padding panel-body"> + <div id="tagFilters" class="optionFilter pull-left center col-md-10" style="display:none;" ></div> + <div id="scopeFilters" class="optionFilter pull-left center col-md-10" style="display:none;" ></div> + + <div id="timeline" class="col-md-12"> + <div class="timeline col-md-12 no-padding"> + <div class="newsTL"> + <div class="spine"></div> + </div> + </div> + </div> + <ul class="timeline-scrubber inner-element newsTLmonthsList col-md-2"></ul> + </div> + <div class="stream-processing center"> + <span class="search-loader-news text-dark" style="font-size:20px;"><i class="fa fa-circle-o-notch fa-spin"></i></span> + </div> + </div> + <!-- end: TIMELINE PANEL --> + </div> + </div> +</div> +<?php if(!@$_GET["renderPartial"] && ($contextParentType==Project::COLLECTION || $contextParentType==Event::COLLECTION || $contextParentType==Organization::COLLECTION || ($contextParentType==Person::COLLECTION && (!@Yii::app()->session["userId"] || (@Yii::app()->session["userId"] && Yii::app()->session["userId"]!= $contextParentId) && (@$isLive && $isLive != true))))){ + // End div .pad-element-container if newspaper of orga, project, event and person + // Present in pod/headerEntity.php +?> +</div> +<?php } ?> +<div id="modal_scope_extern" class="form-create-news-container hide"></div> + + +<?php +foreach($news as $key => $oneNews){ + if(@$news[$key]["type"] && $news[$key]["type"] != "activityStream") + $news[$key]["typeSig"] = $news[$key]["type"]; + //else + //$news[$key]["typeSig"] = "news"; +} +?> + +<!-- end: PAGE CONTENT--> +<script type="text/javascript"> +/* + Global Variables to initiate timeline + - offset => represents measure of last newsFeed (element for each stream) to know when launch loadStrean + - lastOffset => avoid repetition of scrolling event (unstable behavior) + - dateLimit => date to know until when get new news +*/ +<?php if(@$isLive){ ?> + isLive="<?php echo $isLive ?>"; +<?php } else{ ?> + isLive=""; +<?php } ?> + +<?php if (@$news && !empty($news)){ ?> +var news = <?php echo json_encode(@$news)?>; +console.log("NEWSSS", news); +<?php }else { ?> +var news = ""; +<?php } ?> +var parent = <?php echo json_encode(@$parent)?>; + +var newsReferror={ + "news":{ + "offset":"", + "dateLimit":0, + "lastOffset":"" + }, + "activity":{ + "offset":"", + "dateLimit":0, + "lastOffset":"" + }, + }; +var mode = "view"; +var canPostNews = <?php echo json_encode(@$canPostNews) ?>; +var canManageNews = <?php echo json_encode(@$canManageNews) ?>; +var idSession = "<?php echo Yii::app()->session["userId"] ?>"; +var contextParentType = <?php echo json_encode(@$contextParentType) ?>; +var contextParentId = <?php echo json_encode(@$contextParentId) ?>; +var countEntries = 0; +var offset=""; +var dateLimit = 0; +var lastOffset=""; +var streamType="news"; +var months = ["<?php echo Yii::t('common','january') ?>", "<?php echo Yii::t('common','febuary') ?>", "<?php echo Yii::t('common','march') ?>", "<?php echo Yii::t('common','april') ?>", "<?php echo Yii::t('common','may') ?>", "<?php echo Yii::t('common','june') ?>", "<?php echo Yii::t('common','july') ?>", "<?php echo Yii::t('common','august') ?>", "<?php echo Yii::t('common','september') ?>", "<?php echo Yii::t('common','october') ?>", "<?php echo Yii::t('common','november') ?>", "<?php echo Yii::t('common','december') ?>"]; +var formCreateNews; +var indexStep = 5; +var currentIndexMin = 0; +var currentIndexMax = indexStep; +var currentMonth = null; +var scrollEnd = false; +var totalEntries = 0; +var timeout = null; +var tagsFilterListHTML = ""; +var scopesFilterListHTML = ""; +var loadingData = false; +var initLimitDate = <?php echo json_encode(@$limitDate) ?>; +var docType="<?php echo Document::DOC_TYPE_IMAGE; ?>"; +var contentKey = "<?php echo Document::IMG_SLIDER; ?>"; +var uploadUrl = "<?php echo Yii::app()->params['uploadUrl'] ?>"; +var locality = "<?php echo @$locality ?>"; +var searchBy = "<?php echo @$searchBy ?>"; +var tagSearch = "<?php //echo @$tagSearch ?>"; +var peopleReference=false; +var element = null; + +jQuery(document).ready(function() +{ + + currentTypeSearchSend = "search"; + if(typeof globalTheme =="undefined") + multiTagScopeLbl(currentTypeSearchSend); + activeMenuElement("news"); + if(!isLiveGlobal() && typeof globalTheme =="undefined") + selectAllTags(false); + if(location.hash.indexOf("#default.live") == 0){//contextParentType=="city"){ + //$("#cityInsee").val(inseeCommunexion); + //$("#cityPostalCode").val(cpCommunexion); + $(".cityBadge").html("<i class=\"fa fa-university\"></i> "+cpCommunexion); + }else{ + $(".list_tags_scopes").addClass("tagOnly"); + } + //canManageNews=""; + //Modif SBAR + //$(".my-main-container").off(); + if(contextParentType=="pixels"){ + tagsNews=["bug","idea"]; + } + else { + tagsNews = <?php echo json_encode($tags); ?> + } + /////// A réintégrer pour la version last + var $scrollElement = $(".my-main-container"); + + + $('#tags').select2({tags:tagsNews}); + $("#tags").select2('val', ""); + if(contextParentType != "city") + + smoothScroll('0px'); + <?php if(@$topTitle != ""){ ?> + if(contextParentType=="pixels") + icon="bullhorn"; + else + icon="rss"; + setTitle("<?php echo @$headerName; ?>",icon, "<?php echo @$topTitle; ?>"); + <?php } ?> + // SetTimeout => Problem of sequence in js script reader + setTimeout(function(){ + //loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + mylog.log(news, news); + buildTimeLine (news, 0, indexStep); + bindTags(); + //mylog.log(news); + if(typeof(initLimitDate.created) == "object") + dateLimit=initLimitDate.created.sec; + else + dateLimit=initLimitDate.created; + + $(".my-main-container").bind("scroll",function(){ //mylog.log(loadingData, scrollEnd); + if(!loadingData && !scrollEnd){ + var heightContainer = $(".my-main-container")[0].scrollHeight; + if(isLiveGlobal()){ + heightContainer = $("#timeline").height(); mylog.log("heightContainer", heightContainer); + } + var heightWindow = $(window).height(); + console.log($(this).scrollTop()); + console.log(heightContainer - 200); + console.log($(this).scrollTop() + "///" + heightContainer - 200) + if( ($(this).scrollTop() + heightWindow) >= heightContainer - 200){ + mylog.log("scroll in news/index MAX"); + loadStream(currentIndexMin+indexStep, currentIndexMax+indexStep); + } + } + }); + $('.tooltips').tooltip(); + },100); + getMediaFromUrlContent(".get_url_input",".results",1); + + setTimeout(function(){ + $("#btn-submit-form").on("click",function(){ + saveNews(); + }); + },500); + + //Sig.restartMap(); + //Sig.showMapElements(Sig.map, news); + initFormImages(); + mentionsInit.get("textarea.mention"); + + + $('#modal-scope').appendTo("#modal_scope_extern") ; + if(isLiveGlobal()) + showTagsScopesMin(".list_tags_scopes"); + + showFormBlock(false); +}); +function isInArray(value, array) { + return array.indexOf(value) > -1; +} + + +</script> diff --git a/views/news/indexCO2.php b/views/news/indexCO2.php new file mode 100755 index 0000000000000000000000000000000000000000..3be0dd533c3c8ca1f460c73a8f6d5fdea2f81032 --- /dev/null +++ b/views/news/indexCO2.php @@ -0,0 +1,202 @@ +<?php +$cssAnsScriptFilesModule = array( + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5-0.0.2.css', + '/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/wysiwyg-color.css', + '/plugins/bootstrap-datetimepicker/css/datetimepicker.css', + //'/plugins/x-editable/css/bootstrap-editable.css', + '/plugins/select2/select2.css', + //X-editable... + '/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js' , +// '/plugins/x-editable/js/bootstrap-editable.js' , + //'/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/wysihtml5-0.3.0.min.js' , + //'/plugins/wysihtml5/bootstrap-wysihtml5-0.0.2/bootstrap-wysihtml5.js' , + //'/plugins/wysihtml5/wysihtml5.js', + '/plugins/jquery.scrollTo/jquery.scrollTo.min.js', + '/plugins/ScrollToFixed/jquery-scrolltofixed-min.js', + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js', + '/plugins/jquery.appear/jquery.appear.js', + '/plugins/jquery.elastic/elastic.js', + '/plugins/underscore-master/underscore.js', + '/plugins/jquery-mentions-input-master/jquery.mentionsInput.js', + '/plugins/jquery-mentions-input-master/jquery.mentionsInput.css', + '/plugins/jquery-mentions-input-master/lib/jquery.events.input.js', + +); +//error_log("BasURL : ".Yii::app()->request->baseUrl); +HtmlHelper::registerCssAndScriptsFiles( $cssAnsScriptFilesModule ,Yii::app()->request->baseUrl); + + + $cssAnsScriptFilesModule = array( + '/js/news/autosize.js', + '/js/news/newsHtml.js', + '/js/menus/multi_tags_scopes.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $cssAnsScriptFilesModule = array( + '/css/news/newsSV.css', + '/js/comments.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->theme->baseUrl."/assets"); + + $timezone = 'Pacific/Noumea'; + $pair = false; + $nbCol = @$nbCol ? $nbCol : 2; + + $imgDefault = $this->module->assetsUrl.'/images/news/profile_default_l.png'; + +?> + + +<style> + .timeline-heading h5{ + height: 55px; + } + .timeline-panel{ + background-color: white; + } + + <?php if($nbCol == 1){ ?> + .timeline > li{ + width:100%; + } + .timeline::before { + left:0; + } + <?php } ?> + + .btn-green{ + background-color: #5CB85C; + } + + #get_url{ + min-height:100px!important; + padding:0px; + } + .get_url_input { + font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif; + } + + input#addImage{ + display: none; + } + +#formCreateNewsTemp .form-create-news-container, #formActivity{ + /*max-width: 700px;*/ +} +.newsContent{ + white-space: pre-line; + word-wrap: break-word; +} +</style> +<script type="text/javascript" > +var updateNews= new Object; +</script> +<div class="col-md-12 col-sm-12 col-xs-12 no-padding margin-bottom-15" style="<?php if(!@isLive){ ?>padding-left:25px!important;<?php } ?>"> + <?php //var_dump($params); + $params = array( + "type" => $type, + "contextParentId" => $contextParentId, + "parent" => $parent, + "contextParentType" => $contextParentType, + "canManageNews" => @$canManageNews, + "isLive" => @$isLive, + "authorizedToStock" => @$authorizedToStock + ); + $this->renderPartial('formCreateNewsCO2', $params); + ?> + </div> + +<ul class="timeline inline-block" id="news-list"> + + <?php $this->renderPartial('newsPartialCO2', array("news"=>$news, + "pair"=>$pair, + "nbCol"=>$nbCol, + "timezone"=>$timezone, + "imgDefault" => $imgDefault, + "contextParentId" => $contextParentId, + "contextParentType" => $contextParentType, + "canManageNews" => @$canManageNews, + "isLive" => @$isLive, + "isFirst"=>true)); ?> +</ul> + +<script type="text/javascript" > + var news = <?php echo json_encode($news); ?>; + var loadingData = false; + //var scrollEnd = false; + var currentIndexMin = 0; + var currentIndexMax = 10; + var isLive = <?php echo json_encode(@$isLive) ?>; + + var indexStep = currentIndexMax; + var dateLimit = 0; + + var initLimitDate = <?php echo json_encode(@$limitDate) ?>; + + var contextParentType = <?php echo json_encode(@$contextParentType) ?>; + var contextParentId = <?php echo json_encode(@$contextParentId) ?>; + + var totalEntries = 0; + + var canPostNews = <?php echo json_encode(@$canPostNews) ?>; + var canManageNews = <?php echo json_encode(@$canManageNews) ?>; + var idSession = "<?php echo Yii::app()->session["userId"] ?>"; + + var uploadUrl = "<?php echo Yii::app()->params['uploadUrl'] ?>"; + var docType="<?php echo Document::DOC_TYPE_IMAGE; ?>"; + var contentKey = "<?php echo Document::IMG_SLIDER; ?>"; + var tagsNews = <?php echo json_encode($tags); ?>; + +console.log("NEWS", news); +jQuery(document).ready(function() { + $(".uploadImageNews").click(function(event){ + if (!$(event.target).is('input')) { + $(this).find("input").trigger('click'); + } + //$("#addImage").click(); + }); + + showFormBlock(false); + $("#formCreateNewsTemp").removeClass('hidden'); + + initForm(); + bindEventNews(); + if(typeof(initLimitDate.created) == "object") + dateLimit=initLimitDate.created.sec; + else + dateLimit=initLimitDate.created; + +}); + +function initForm(){ console.log("initForm initForm"); + getMediaFromUrlContent(".get_url_input",".results",1); + + setTimeout(function(){ + $("#btn-submit-form").on("click",function(){ + saveNews(); + }); + },500); + + initTags(); + initFormImages(); + mentionsInit.get("textarea.mention"); +} + +function initTags(){ + /*if(contextParentType=="pixels"){ + tagsNews=["bug","idea"]; + } + else { + tagsNews = <?php echo json_encode($tags); ?>; + }*/ + /////// A réintégrer pour la version last + var $scrollElement = $(".my-main-container"); + + + $('#tags').select2({tags:tagsNews}); + $("#tags").select2('val', ""); +} +/* COMMENTS vvv */ +</script> \ No newline at end of file diff --git a/views/news/modalCreateAnc.php b/views/news/modalCreateAnc.php new file mode 100755 index 0000000000000000000000000000000000000000..242cf4defe28a62196cb2bd62b6274b46d6491f7 --- /dev/null +++ b/views/news/modalCreateAnc.php @@ -0,0 +1,169 @@ +<div class="portfolio-modal modal fade" id="modal-create-anc" tabindex="-1" role="dialog" aria-hidden="true"> + <div class="modal-content padding-top-15"> + <div class="close-modal" data-dismiss="modal"> + <div class="lr"> + <div class="rl"> + </div> + </div> + </div> + <div class="container"> + <div class="row"> + <div class="col-lg-12"> + + <?php if(Yii::app()->params["CO2DomainName"] == "CO2"){ ?> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/CO2r.png" height="100" class="inline margin-bottom-15"><br> + <?php }else if(Yii::app()->params["CO2DomainName"] == "kgougle"){ ?> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/KGOUGLE-logo.png" height="50" class="inline margin-top-25 margin-bottom-5"><br> + <?php } ?> + + <h3 class="letter-red no-margin hidden"> + <small class="text-dark">Un espace de <span class="letter-red">communication local</span>, au service du <span class="letter-red">bien commun</span></small> + </h3><br> + <h3 class="letter-red no-margin hidden-xs"> + <i class="fa fa-plus-circle"></i> Publier une annonce<br> + </h3><br> + <!-- <button class="btn btn-default margin-bottom-5 margin-left-5 btn-select-type-anc" style="width:40%; margin-left:30%;" + data-type-anc="cassifieds"> + <i class="fa fa-credit-card hidden-xs"></i> Annonce sponsorisée + </button> --> + </div> + </div> + <div class="row links-create-element"> + <div class="col-lg-12"> + <div class="modal-header text-dark "> + + </div> + + <div id="" class="modal-body text-center"> + + <div class="col-md-12 col-sm-12" id="sub-menu-left"> + <h4 class="text-dark no-margin hidden-xs"> + <i class="fa fa-angle-down"></i> Sélectionnez un type d'annonce<br><br> + </h4> + <div class="col-md-2 padding-5"></div> + <div class="col-md-2 text-center padding-5"> + <?php + $freedomTags = CO2::getContextList("classified"); + $currentSection = 1; + $align="right"; + foreach ($freedomTags["sections"] as $key => $tag) { ?> + <?php if($currentSection > 1){ ?> + <?php if($tag["section"] > $currentSection){ + $currentSection++; + $align = "center"; //$align=="left"?"left":"left"; + ?> + </div> + <div class="col-md-2 text-<?php echo $align; ?> padding-5"> + <?php } ?> + <button class="btn btn-default margin-bottom-5 margin-left-5 btn-select-type-anc btn-anc-color-<?php echo @$tag["color"]; ?>" style="width:100%;" + data-type-anc="<?php echo @$tag["key"]; ?>"> + <i class="fa fa-<?php echo @$tag["icon"]; ?> hidden-xs"></i> <?php echo @$tag["label"]; ?> + </button><br> + + <?php }else{ $currentSection++; } ?> + <?php } ?> + </div> + + <br> + <div class="col-md-12 col-sm-12 "> + <hr> + </div> + </div> + + <div class="col-md-12 col-sm-12 subsub text-center" id="sub-menu-left"> + <h4 class="text-dark no-margin hidden-xs"> + <i class="fa fa-angle-down"></i> Sélectionnez une catégorie<br><br> + </h4> + <div class="col-md-2 text-<?php $align="left"; echo $align; ?> padding-5 hidden"> + <?php $classified = CO2::getContextList("classified"); + foreach ($classified['filters'] as $key => $cat) { + ?> + <?php if(is_array($cat)) { ?> + </div> + <div class="col-md-2 text-<?php echo $align; ?> padding-5"> + <button class="btn btn-default text-dark margin-bottom-5 btn-select-category-1 uppercase" style="width:100%;" + data-keycat="<?php echo $key; ?>"> + <i class="fa fa-chevron-circle-down hidden-xs"></i> <?php echo $key; ?> + </button> + <?php } ?> + + <?php } ?> + </div> + + <div class="col-md-12 col-sm-12 text-center"> + <hr style="margin:10px;"> + <?php //$categories = CO2::getAnnounceCategories(); + foreach ($categories as $key => $cat) { + ?> + <?php if(is_array($cat)) { ?> + <?php foreach ($cat as $key2 => $cat2) { ?> + <button class="btn btn-default text-dark margin-bottom-5 hidden text-center keycat keycat-<?php echo $key; ?>"> + <?php echo $cat2; ?> + </button><br class="hidden"> + <?php } ?> + <?php } ?> + + <?php } ?> + <div class="col-md-12 col-sm-12 text-center margin-top-25"> + <h4 class="text-dark no-margin hidden-xs"> + <i class="fa fa-money"></i> Prix<br><br> + </h4> + <input class="input-control" placeholder="prix"> + </div> + <hr> + </div> + </div> + + + </div> + <div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 margin-top-25"> + + </div> + + <div class="col-md-8 col-md-offset-2 col-sm-8 col-sm-offset-2 col-xs-12 margin-top-25"> + <h4 class="text-dark no-margin hidden-xs"> + <i class="fa fa-pencil"></i> Rédiger votre annonce<br><br> + </h4> + <div id="formCreateNews"></div> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 text-center"> + <hr> + <h5 class="text-center letter-red"> + <button class="btn btn-default main-btn-scopes text-white tooltips margin-bottom-5" + data-target="#modalScopes" data-toggle="modal" + data-toggle="tooltip" data-placement="top" + title="Sélectionner des lieux de recherche"> + <!-- <i class="fa fa-bullseye" style="font-size:18px;"></i> --> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/cible3.png" height=42> + </button><br> + Cibler votre annonce + </h5> + + <div class="scope-min-header list_tags_scopes hidden-xs hidden-sm"></div> + <hr> + <button class="btn btn-success"><i class="fa fa-check-circle"></i> Publier votre annonce</button> + </div> + <div class="col-md-12 col-sm-12 col-xs-12 text-center"> + <hr> + <a href="javascript:" style="font-size: 13px;" type="button" class="" data-dismiss="modal"><i class="fa fa-times"></i> Retour</a> + </div> + + </div> + </div> + </div> + </div> + </div> +</div> +<style> + #modal-create-anc #sub-menu-left.subsub .btn, + #modal-create-anc .btn-select-category-1{ + width:16%; + border-radius:40px; + border:1px solid lightgrey; + text-align: center; + } + + .portfolio-modal .modal-content img{ + margin-bottom: unset; + } +</style> \ No newline at end of file diff --git a/views/news/modalShare.php b/views/news/modalShare.php new file mode 100644 index 0000000000000000000000000000000000000000..385f7049d34325c3a2c9187489622618b8f04ea2 --- /dev/null +++ b/views/news/modalShare.php @@ -0,0 +1,110 @@ +<style> + #modal-share .close-modal{ + float: right; + margin-right: 0px; + width: 60px; + height: 30px; + } + #modal-share .close-modal .lr .rl { + height: 30px; + width: 1px; + background-color: #2C3E50; + transform: rotate(90deg); + -ms-transform: rotate(90deg); + -webkit-transform: rotate(90deg); + z-index: 1052; + } + #modal-share .close-modal .lr { + height: 30px; + width: 1px; + margin-left: 35px; + background-color: #2C3E50; + transform: rotate(45deg); + -ms-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + z-index: 1051; + } + + #modal-share .modal-content{ + top: 150px; + padding-bottom:10px!important; + } + #modal-share{ + background-color: rgba(0,0,0,0.6); + } + #modal-share #htmlElementToShare .timeline-footer{ + display: none; + } + #modal-share #htmlElementToShare .btn.settingsNews{ + display: none; + } + #modal-share #htmlElementToShare .btn-share, + #modal-share #htmlElementToShare .btn-add-to-directory{ + display: none; + } + + #modal-share #htmlElementToShare .entityDescription{ + max-height: 38px; + overflow: hidden; + } + + #modal-share #htmlElementToShare .searchEntityContainer{ + width:100%!important; + padding: 0px; + margin: 0px !important; + /*min-height: 370px !important;*/ + max-height: 420px !important; + } + + #modal-share #htmlElementToShare .container-img-profil{ + /*min-height: 250px !important;*/ + max-height: 250px !important; + } +</style> + +<div class="modal fade portfolio-modal" id="modal-share" + tabindex="-1" role="dialog" aria-hidden="true"> + <div class="col-md-6 col-md-offset-3 col-xs-10 col-xs-offset-1"> + <div class="modal-content row shadow2"> + <a class="close-modal" data-dismiss="modal"> + <div class="lr"> + <div class="rl"> + </div> + </div> + </a> + <div class="col-sm-12 container text-left"> + <?php + $me = Element::getByTypeAndId(Person::COLLECTION, Yii::app()->session['userId']); + $profilThumbImageUrl = Element::getImgProfil($me, "profilThumbImageUrl", $this->module->assetsUrl); + ?> + <img src="<?php echo $profilThumbImageUrl; ?>" class="img-circle margin-right-10 pull-left" width="40" height="40"> + + <h4 class="pull-left"> + <small> + <i class="fa fa-share"></i> <?php echo Yii::t("common","Share content <small class='text-dark'>with your network<br><small>This content will be shared to your followers</small></small>") ?> + </small> + </h4> + <div class="form-group"> + <textarea class="form-control" rows="2" id="msg-share" placeholder="<?php echo Yii::t("common","Express yourself ...") ?>"></textarea> + </div> + <div class="col-md-12 shadow2 no-padding" id="htmlElementToShare"></div> + </div> + <div class="col-xs-12"> + <hr> + <button class="btn btn-success pull-right margin-left-5" id="btn-share-it" data-dismiss="modal" + data-ownerlink='share' data-id='' data-type=''> + <i class="fa fa-share"></i> <?php echo Yii::t("common","Share") ?> + </button> + <button class="btn btn-default pull-right" data-dismiss="modal"> + <i class="fa fa-times"></i> <?php echo Yii::t("common","Cancel") ?> + </button> + </div> + </div> + </div> +</div> + + +<script type="text/javascript"> + + +</script> \ No newline at end of file diff --git a/views/news/newsPartialCO2.php b/views/news/newsPartialCO2.php new file mode 100755 index 0000000000000000000000000000000000000000..293bddc8843da06a0c53e7cbd02336787a2da83c --- /dev/null +++ b/views/news/newsPartialCO2.php @@ -0,0 +1,216 @@ +<style> + +.timeline-panel .searchEntityContainer{ + width: 100% !important; + margin-top:20px; + max-height: 450px !important; + margin-bottom: 15px !important; + min-height: unset !important; +} +.timeline-body .btn-share{ + display: none; +} +.timeline-panel .container-img-profil{ + max-height: 250px; +} +</style> + +<?php +$timezone = ""; +$pair = @$pair ? $pair : false; +$nbCol = @$nbCol ? $nbCol : 2; + +foreach($news as $key => $media){ + $class = $pair || ($nbCol == 1) ? "timeline-inverted" : ""; + $pair = !$pair; + // Author name and thumb + if(@$media["targetIsAuthor"] || $media["type"]=="activityStream"){ + if(@$media["target"]["profilThumbImageUrl"] && $media["target"]["profilThumbImageUrl"] != "") + $thumbAuthor = Yii::app()->createUrl('/'.$media["target"]["profilThumbImageUrl"]); + else + $thumbAuthor = $this->module->assetsUrl."/images/thumb/default_".$media["target"]["type"].".png"; + $nameAuthor=$media["target"]["name"]; + $authorType=$media["target"]["type"]; + $authorId=$media["target"]["id"]; + } else{ + $thumbAuthor = @$media['author']['profilThumbImageUrl'] ? + Yii::app()->createUrl('/'.@$media['author']['profilThumbImageUrl']) + : $this->module->assetsUrl."/images/news/profile_default_l.png"; + $nameAuthor=@$media["author"]["name"]; + $authorType=Person::COLLECTION; + $authorId=@$media["author"]["id"]; + } + $srcMainImg = ""; + if(@$media["media"]["images"] && $media["media"]["type"] != "gallery_images") + $srcMainImg = Yii::app()->createUrl("upload/". + Yii::app()->controller->module->id."/". + $media["media"]["images"][0]["folder"].'/'. + $media["media"]["images"][0]["name"]); + + if(@$media["imageBackground"]) + $srcMainImg = Yii::app()->createUrl($media["imageBackground"]); +?> + <li class="<?php echo $class; ?> list-news" + id="<?php echo @$media["type"]; ?><?php echo $key; ?>"> + <div class="timeline-badge primary"> + <a><i class="glyphicon glyphicon-record" rel="tooltip"></i></a> + </div> + <div class="timeline-panel"> + <?php + $this->renderPartial('../news/timeline-panel', + array( "key"=>$key, + "media"=>$media, + "authorType"=>$authorType, + "nameAuthor"=>@$nameAuthor, + "authorId"=>$authorId, + "contextId"=>@$contextParentId, + "timezone"=>$timezone, + "thumbAuthor"=>@$thumbAuthor, + "canManageNews"=> @$canManageNews + ) + ); + ?> + <?php if(isset(Yii::app()->session["userId"])) { ?> + <div class="timeline-footer pull-left col-md-12 col-sm-12 col-xs-12 padding-top-5"> + <div class="col-md-12 pull-left padding-5" id="footer-media-<?php echo @$media["_id"]; ?>"></div> + <div class="col-md-12 col-sm-12 col-xs-12 no-padding pull-left margin-top-10" id="commentContent<?php echo @$media["_id"]; ?>"></div> + </div> + <?php } ?> + </div> + </li> +<?php } ?> + +<?php if(@$isFirst == true && sizeof($news)==0){ ?> + <li id='noMoreNews' class='text-left padding-15'> + <i class='fa fa-ban'></i> + <?php echo Yii::t("common", "No news in this timeline") ?> + </li> +<?php }else if(sizeof($news)==0 && @$actionController != "save"){ + echo "<li id='noMoreNews' class='text-left'><i class='fa fa-ban'></i> ".Yii::t("common", "No more news")."</li>"; +} ?> +<script type="text/javascript"> + var news=<?php echo json_encode($news) ?>; + var canPostNews = <?php echo json_encode(@$canPostNews) ?>; + var canManageNews = <?php echo json_encode(@$canManageNews) ?>; + var actionController = <?php echo json_encode(@$actionController) ?>; + var idSession = "<?php echo Yii::app()->session["userId"] ?>"; + var uploadUrl = "<?php echo Yii::app()->params['uploadUrl'] ?>"; + var docType="<?php echo Document::DOC_TYPE_IMAGE; ?>"; + var months = ["<?php echo Yii::t('common','january') ?>", "<?php echo Yii::t('common','febuary') ?>", "<?php echo Yii::t('common','march') ?>", "<?php echo Yii::t('common','april') ?>", "<?php echo Yii::t('common','may') ?>", "<?php echo Yii::t('common','june') ?>", "<?php echo Yii::t('common','july') ?>", "<?php echo Yii::t('common','august') ?>", "<?php echo Yii::t('common','september') ?>", "<?php echo Yii::t('common','october') ?>", "<?php echo Yii::t('common','november') ?>", "<?php echo Yii::t('common','december') ?>"]; + var contentKey = "<?php echo Document::IMG_SLIDER; ?>"; + var scrollEnd=false; + var nbCol = "<?php echo $nbCol; ?>"; + + jQuery(document).ready(function() { + if($("#noMoreNews").length) + scrollEnd=true; + + <?php if(isset(Yii::app()->session["userId"])) { ?> + initCommentsTools(news); + <?php } ?> + + $.each(news, function(e,v){ + updateNews[e]= v; + if(typeof v._id.$id != "undefined") + if($(".newsActivityStream"+v._id.$id).length>0) + $("#news"+v._id.$id).remove(); + + if(typeof v.object != "undefined"){ + if($(".newsActivityStream"+v.object.id).length>0) + $("#news"+v.object.id).remove(); + + $(".newsActivityStream"+v.object.id).each(function(b, ob){ + if(b>0) { + var parent = $(ob).parent().parent().parent(); + parent.remove(); + } + }); + + if(v.object.type != "news"){ + var html = directory.showResultsDirectoryHtml(new Array(v.object), v.object.type); + $(".newsActivityStream"+v.object.id).html(html); + } + } + + }); + + $.each(news, function(e,v){ + tags = "", + scopes = "", + tagsClass = "", + scopeClass = ""; + + // CSS DESIGN NEWS ORGANIZATION + var currentOffset=$("#"+v.type+e).offset(); + var prevOffset=$("#"+v.type+e).prevAll(".list-news").offset(); + if(typeof prevOffset != "undefined"){ + if(currentOffset.top>=(prevOffset.top-20) && currentOffset.top<=(prevOffset.top+20)) + $("#"+v.type+e).addClass("addMargin"); + } + if(actionController=="save") + initCommentsTools(new Array(v)); + if("undefined" != typeof v.text){ + textHtml=""; + textNews=v.text; + if(v.text.length > 0) + textNews=checkAndCutLongString(v.text,500,v._id.$id,"showmorenews",true); + //Check if @mentions return text with link + if(typeof(v.mentions) != "undefined") + textNews = mentionsInit.addMentionInText(textNews,v.mentions); + textHtml='<span class="timeline_text no-padding text-black" >'+linkify(textNews)+'</span>'; + $("#newsContent"+e).html(textHtml); + + $(".btn-showmorenews").off().click(function(){ + var newsid = $(this).data("id"); + if($("#newsContent"+newsid+" .timeline_text span.endtext").hasClass("hidden")){ + $("#newsContent"+newsid+" .timeline_text span.endtext").removeClass("hidden"); + $("#newsContent"+newsid+" .timeline_text span.ppp").addClass("hidden"); + $(this).html("Réduire le texte").parent().prepend("<br>"); + }else{ + $("#newsContent"+newsid+" .timeline_text span.endtext").addClass("hidden"); + $("#newsContent"+newsid+" .timeline_text span.ppp").removeClass("hidden"); + $(this).html("Lire la suite").parent().find("br").remove(); + } + }); + } + if("undefined" != typeof v.media){ + if(typeof(v.media.type)=="undefined" || v.media.type=="url_content") + media=getMediaCommonHtml(v.media,"show",e); + else if (v.media.type=="gallery_images") + media=getMediaImages(v.media,e,v.author.id,v.target.name); + else if (v.media.type=="gallery_files") + media=getMediaFiles(v.media,e); + else if (v.media.type=="activityStream") + media=directory.showResultsDirectoryHtml(new Array(v.media.object),v.media.object.type); + $("#result"+e).html(media); + $(".videoSignal").off().on("click",function(){ + videoLink = $(this).find(".videoLink").val(); + iframe='<div class="embed-responsive embed-responsive-16by9 margin-bottom-5" style="background-color:black;">'+ + '<iframe src="'+videoLink+'" width="100%" height="" class="embed-responsive-item"></iframe></div>'; + $(this).parent().next().removeClass("col-xs-8").addClass("col-xs-12").before(iframe); + //$(this).parent().next(); + $(this).parent().remove(); + + }); + } + bindLBHLinks(); + }); + + <?php if(!(@$isFirst == true) && @$limitDate && @$limitDate["created"]){ ?> + <?php if(!(@$isFirst == true) && @$limitDate && @$limitDate["created"]){ ?> + var limitDate = <?php echo json_encode($limitDate["created"]); ?>; + if(typeof(limitDate) == "object") + dateLimit=limitDate.sec; + else + dateLimit=limitDate; + <?php } ?> + <?php } ?> + + + <?php if(sizeof($news)==0){ ?> + scrollEnd = true; + <?php } ?> + + initBtnLink(); + }); +</script> diff --git a/views/news/podBtnTypeNews.php b/views/news/podBtnTypeNews.php new file mode 100755 index 0000000000000000000000000000000000000000..d95b6a0679e96875bda04a534e431981377a0c18 --- /dev/null +++ b/views/news/podBtnTypeNews.php @@ -0,0 +1,344 @@ +<style> +.btn-type-news, .btn-scope-type{ + background-color: rgb(255, 255, 255); + border-color: #C9C9C9; + padding: 5px 10px !important; + font-size: 15px !important; +} +.btn-type-news.active{ + background-color: #3C5665; + border-color: #3C5665; + color:white !important; +} +.btn-scope-type.active{ + background-color: #2BB0C6; + border-color: #2BB0C6; + color:white !important; +} +#list_type_news .btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; + width:50px; + border-radius:0 5px 5px 0 !important; + border-color: #C9C9C9; + padding: 10px !important; + font-size: 15px !important; +} +button.btn-start-search{ + font-size:12px!important; + height:30px!important; + width:40px!important; +} +button.btn-start-search:hover{ + border-radius:0 4px 4px 0!important; +} +#searchBarText{ + font-size:14px!important; + height:30px!important; + padding: 0px 10px !important; +} + + +div.timeline .date_separator{ + display: none; +} +div.timeline #backToTop.date_separator{ + display: inherit; +} + +input.form-control.input-search{ + border-radius:4px 0 0 4px !important; +} +</style> + +<!-- <span class='text-dark'><i class='fa fa-angle-down'></i> Filtrer par type</span> +<hr style='margin-top:0px;margin-bottom:0px;border:0!important;'> --> + +<div class="col-xs-12 no-padding " + style="margin-top: 0px; margin-bottom: 10px; margin-left: 0px;padding: 0px 10px;" + id="list_type_news"> + + <div class="btn-group btn-group-sm inline-block margin-top-10 hidden" id="menu-type-news"> + <button class="btn btn-default btn-type-news tooltips text-dark active" + data-toggle="tooltip" data-placement="top" title="Toute l'actu" data-type="all"> + <i class="fa fa-heartbeat"></i> + <span class="hidden-xs hidden-sm hidden-md"></span> + </button> + <button class="btn btn-default btn-type-news disabled tooltips text-dark hidden" + data-toggle="tooltip" data-placement="top" title="Messages"> + <i class="fa fa-angle-down"></i> <i class="fa fa-filter"></i> + <span class="hidden-xs hidden-sm hidden-md"></span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Messages" data-type="news"> + <i class="fa fa-check-circle-o search_news hidden"></i> <i class="fa fa-rss"></i> + <span class="hidden-xs hidden-sm hidden-md">Message</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Idée" data-type="idea"> + <i class="fa fa-circle-o search_organizations hidden"></i> <i class="fa fa-info-circle"></i> + <span class="hidden-xs hidden-sm hidden-md">Idée</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Question" data-type="question"> + <i class="fa fa-circle-o search_projects hidden"></i> <i class="fa fa-question-circle"></i> + <span class="hidden-xs hidden-sm hidden-md">Question</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Annonce" data-type="announce"> + <i class="fa fa-circle-o search_events hidden"></i> <i class="fa fa-ticket"></i> + <span class="hidden-xs hidden-sm hidden-md">Annonce</span> + </button> + <button class="btn btn-default btn-type-news tooltips text-dark" + data-toggle="tooltip" data-placement="top" title="Information" data-type="information"> + <i class="fa fa-circle-o search_needs hidden"></i> <i class="fa fa-newspaper-o"></i> + <span class="hidden-xs hidden-sm hidden-md">Information</span> + </button> + + + <!-- <button class="btn btn-success tooltips" id="btn-start-search" + data-toggle="tooltip" data-placement="right" title="Actualiser les résultats"> + <i class="fa fa-refresh"></i> + </button> --> + </div> + +<div class="hidden"> + <button class="btn btn-default tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Point d'interet" data-type="poi" onclick="dyFObj.openForm ( 'poi' );" > + <i class="fa fa-map-marker search_needs hidden"></i> <i class="fa fa-map-marker"></i> + <span class="hidden-xs hidden-sm hidden-md">POI</span> + </button> + <button class="btn btn-default tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Organisation" data-type="organization" onclick="dyFObj.openForm ( 'organization' );" > + <i class="fa fa-map-marker search_needs hidden"></i> <i class="fa fa-group"></i> + <span class="hidden-xs hidden-sm hidden-md">Organisation</span> + </button> + + <button class="btn btn-default tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Évènement" data-type="event" onclick="dyFObj.openForm ( 'event' );" > + <i class="fa fa-map-marker search_needs hidden"></i> <i class="fa fa-calendar"></i> + <span class="hidden-xs hidden-sm hidden-md">Evenement</span> + </button> + + <button class="btn btn-default tooltips text-dark" data-toggle="tooltip" data-placement="top" title="Projet" data-type="project" onclick="dyFObj.openForm ( 'project' );" > + <i class="fa fa-map-marker search_needs hidden"></i> <i class="fa fa-lightbulb-o"></i> + <span class="hidden-xs hidden-sm hidden-md">Projet</span> + </button> +</div> + + + <?php if(@$type=="city" && @Yii::app()->session["userId"]){ ?> + <div class="pull-left margin-top-10"> + + <div class="btn-group btn-group-sm inline-block scope-global-community"> + <button class="btn btn-sm btn-default tooltips btn-scope-type text-dark active" data-scope-type="global" + data-msg-info="Live public : retrouvez tous les messages publics selon vos lieux favoris" + data-write-info="Envoyez un message public en sélectionnant des lieux" + data-toggle="tooltip" data-placement="bottom" title="Afficher les messages publics"> + <i class="fa fa-globe"></i> Public + </button> + <button style="margin-right:10px;" + class="btn btn-sm btn-default btn-scope-type tooltips text-dark" data-scope-type="community" + data-msg-info="Live communauté : retrouvez tous les messages de vos contacts" + data-write-info="Envoyez un message à vos contacts" + data-toggle="tooltip" data-placement="bottom" title="Afficher les messages de ma communauté"> + <i class="fa fa-users"></i> Ma communauté + </button> + <span class="inline-block text-dark" style="padding:10px 0px;"> + <i class="fa fa-angle-down" style="margin-left:5px;"></i> <i class="fa fa-info-circle"></i> + <span id='msg_live_type'>Live public : retrouvez tous les messages publics selon vos lieux favoris</span> + </span> + </div> + <!-- + <a href="#organization.addorganizationform" class="lbh btn btn-sm btn-default tooltips" style="margin-left:5px;" + data-toggle="tooltip" data-placement="bottom" title="Créer une organisation"> + <i class="fa fa-plus hidden-xs hidden-sm hidden-md"></i> + <span class="hidden-xs hidden-sm hidden">Organisation</span> + </a> + <a href="#organization.addorganizationform" class="lbh btn btn-sm bg-green tooltips" style="margin-left:5px;" + data-toggle="tooltip" data-placement="bottom" title="Créer une organisation"> + <i class="fa fa-plus hidden-xs hidden-sm hidden-md"></i> <i class="fa fa-group"></i> + <span class="hidden-xs hidden-sm hidden">Organisation</span> + </a> + <a href="#project.projectsv" class="lbh btn btn-sm bg-purple tooltips" style="margin-left:5px;" + data-toggle="tooltip" data-placement="bottom" title="Créer un projet"> + <i class="fa fa-plus hidden-xs hidden-sm hidden-md"></i> <i class="fa fa-lightbulb-o"></i> + <span class="hidden-xs hidden-sm hidden">Projet</span> + </a> + <a href="#event.eventsv" class="lbh btn btn-sm bg-orange tooltips" style="margin-left:5px;" + data-toggle="tooltip" data-placement="bottom" title="Créer un événement"> + <i class="fa fa-plus hidden-xs hidden-sm hidden-md"></i> <i class="fa fa-calendar"></i> + <span class="hidden-xs hidden-sm hidden">Événement</span> + </a>--> + </div> + <?php } ?> + +</div> + +<div id="newLiveFeedForm" class="col-xs-12 no-padding margin-bottom-15"></div> + +<div id="toogle_filters"> + <div class="space-20"></div> + <div class='text-dark col-xs-12 no-padding pull-left margin-top-15 hidden'> + <i class='fa fa-angle-down'></i> Filtrer par tags et lieux<br> + <hr style='margin-top:5px;margin-bottom:5px; width:100%;'> + </div> + + <div id="scopeListContainer" class="list_tags_scopes col-xs-12 no-padding"></div> + + <?php if(@$filterTypeNews!="" && false) { ?> + <?php $spec = Element::getElementSpecsByType($filterTypeNews); ?> + <div class='text-dark col-xs-12 no-padding pull-left margin-bottom-15'> + <hr style='margin-top:5px;margin-bottom:0px; width:100%;'> + <h3 class="text-<?php echo $spec["text-color"]; ?> homestead text-center"> + <i class="fa fa-angle-down"></i> <i class="fa fa-<?php echo $spec["icon"]; ?>"></i> Actus <?php echo Yii::t("common",$filterTypeNews)."s"; ?> + </h3> + </div> + <?php } ?> + + + + <div class="col-sm-offset-3 col-md-offset-3 col-lg-offset-4 col-sm-6 col-md-6 col-lg-4 col-xs-12" style="margin-top:15px!important;"> + <div class="input-group col-xs-12 pull-left"> + <input id="searchBarText" data-searchPage="true" type="text" placeholder="rechercher ..." class="input-search form-control"> + <span class="input-group-btn"> + <button class="btn bg-azure btn-start-search tooltips" id="btn-start-search" + data-toggle="tooltip" data-placement="bottom" title="Actualiser les résultats"> + <i class="fa fa-refresh"></i> + </button> + </span> + + </div> + <!-- <button class="btn btn-sm tooltips hidden-xs pull-left hidden" id="btn-slidup-scopetags" + style="margin-left:15px;margin-top:5px;" + data-toggle="tooltip" data-placement="bottom" title="Afficher/Masquer les filtres"> + <i class="fa fa-minus"></i> + </button> + <button data-id="explainNews" class="explainLink btn btn-sm tooltips hidden-xs hidden pull-left" + style="margin-left:7px;margin-top:5px;" + data-toggle="tooltip" data-placement="bottom" title="Comment ça marche ?"> + <i class="fa fa-question-circle"></i> + </button> --> + </div> +</div> +<script type="text/javascript"> + +var currentType = "<?php echo @$type ? $type : ""; ?>"; + +jQuery(document).ready(function() +{ + initSelectTypeNews(); + showTagsScopesMin("#scopeListContainer"); + + $('#btn-start-search').click(function(e){ + scrollEnd = false; + if(location.hash.indexOf("#default.live")==0) + startSearch(false); + else{ + dateLimit = 0; + loadStream(0, 5); + } + }); + + $(".btn-filter-type").click(function(e){ + var type = $(this).attr("type"); + var index = searchType.indexOf(type); + + if(type == "all" && searchType.length > 1){ + $.each(allSearchType, function(index, value){ removeSearchType(value); }); return; + } + if(type == "all" && searchType.length == 1){ + $.each(allSearchType, function(index, value){ addSearchType(value); }); return; + } + + if (index > -1) removeSearchType(type); + else addSearchType(type); + }); + + + if(currentType == "city"){ + $(".btn-scope-type").click(function(){ + + var scopeType = $(this).data("scope-type"); + if(scopeType == "global" || scopeType == "community") + liveScopeType = scopeType; + + if(scopeType == "community") { + parent = "<?php echo @Yii::app()->session["userId"]; ?>"; + parentType = "citoyens"; + contextParentType = "citoyens"; + contextParentId = "<?php echo @Yii::app()->session["userId"]; ?>"; + $("input[name='scope']").val("restricted"); + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").addClass("tagOnly"); + }else{ + parent = null; + parentType = "city"; + contextParentType = "city"; + contextParentId = ""; + $("input[name='scope']").val("public"); + showTagsScopesMin("#scopeListContainer"); + $(".list_tags_scopes").removeClass("tagOnly"); + } + $(".btn-scope-type").removeClass("active"); + $(this).addClass("active"); + + mylog.log("liveScopeType", liveScopeType); + //scrollEnd = false; + showNewsStream(false); + }); + } + +}); + +var allNewsType = ["news", "idea", "question", "announce", "information"]; + +function initSelectTypeNews(){ + + var msgTypesNews = { + "all" : "<i class='fa fa-file-text-o'></i> Rédiger un message", + "news" : "<i class='fa fa-file-text-o'></i> Rédiger un message", + "idea" : "<i class='fa fa-info-circle'></i> Partager, expliquer, détailler une idée", + "question" : "<i class='fa fa-question-circle'></i> Poser une question", + "announce" : "<i class='fa fa-ticket'></i> Rédiger une annonce, dans ses moindre détails", + "information" : "<i class='fa fa-newspaper-o'></i> Partager une information" + }; + + $(".btn-type-news").click(function(e){ + var type = $(this).data("type"); + + //searchType = []; + $(".btn-type-news").removeClass("active"); + $(this).addClass("active"); + + var newsType = type != "all" ? type : "news"; + $("input[name='type']").val(newsType); + + var msg = typeof msgTypesNews[type] != "undefined" ? msgTypesNews[type] : ""; + // msg+='<button class="btn pull-right" onclick="hideNewLiveFeedForm()" style="margin-top: -10px;margin-right: -10px;">'+ + // '<i class="fa fa-times"></i>'+ + // '</button>'; + $(".header-form-create-news").html("<i class='fa fa-angle-down'></i> "+msg); + + + if(type != "all") + searchType = [type]; + else + searchType = $.merge( ["organizations", "projects", "events", "needs"], allNewsType); + + if(location.hash.indexOf("#default.live")==0) + startSearch(false); + else{ + dateLimit = 0; + loadStream(0, 5); + } + + //showFormBlock(true); + }); + + $(".btn-scope-type").click(function(){ + $("#msg_live_type").html($(this).data("msg-info")); + $("#info-write-msg").html($(this).data("write-info")); + + }); +} + +</script> \ No newline at end of file diff --git a/views/news/standalone.php b/views/news/standalone.php new file mode 100644 index 0000000000000000000000000000000000000000..fd9c6c2251d665e0301cf238ea3b1bce00349ad9 --- /dev/null +++ b/views/news/standalone.php @@ -0,0 +1,81 @@ +<?php + $cssAnsScriptFilesModule = array( + '/js/news/index.js', + '/js/news/newsHtml.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $cssAnsScriptFilesModule = array( + // '/css/news/newsSV.css', + '/js/comments.js', + '/css/news/index.css', + '/css/default/directory.css', + '/css/timeline2.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->theme->baseUrl."/assets"); + +?> +<style> + .timeline > li{ + width:100%; + } + .timeline::before { + left:0; + } + #noMoreNews{ + display: none; + } +</style> + +<div class="row bg-white"> + + <div class="col-xs-12 margin-top-70"> + <h3 class="text-center"><i class="fa fa-newspaper-o"></i> Message</h3><hr> + </div> + +<div class="container"> + <ul class="timeline inline-block" id="news-list"> + <?php if(!empty($element)){ + $this->renderPartial('../news/newsPartialCO2', + array("news"=>array($element), + "nbCol"=> 1) ); + }else{ ?> + <p class="col-md-12 col-sm-12 col-xs-12"> + <?php echo Yii::t("news","This link points to a dead news")?>.<br> + <?php echo Yii::t("news","The author has probably deleted the news") ?> !!<br> + <?php if (@Yii::app()->session["userId"]){ ?> + <a href="#page.type.<?php echo Person::COLLECTION ?>.id.<?php echo Yii::app()->session["userId"] ?>" class="btn btn-warning lbh"><i class="fa fa-sign-in"></i> <?php echo Yii::t("news","Back to my page") ?></a> + <?php } else { ?> + <a href="#" class="btn btn-warning lbh"><i class="fa fa-sign-in"></i> <?php echo Yii::t("news","Back to home") ?></a> + <?php } ?> + </p> + <?php } + ?> + </ul> +</div> +</div> +<script type="text/javascript"> + + var news=<?php echo json_encode($element); ?>; + jQuery(document).ready(function() { + if(news){ + if(typeof news.text != "undefined"){ + var text = news.text.substr(0,30); + if(news.text.length>30) text+="..."; + setTitle("", "", text); + + if(typeof news.mentions != "undefined") + text = mentionsInit.addMentionInText(news.text,news.mentions); + else text = news.text; + } + + <?php if(isset(Yii::app()->session["userId"])) { ?> + initCommentsTools(new Array(news)); + <?php } ?> + + $(".timeline_text").html(text); + //showCommentsTools(news["_id"]['$id']); + } + }); + +</script> \ No newline at end of file diff --git a/views/news/timeline-panel.php b/views/news/timeline-panel.php new file mode 100644 index 0000000000000000000000000000000000000000..c2f5a7396c48a639a85fefb683c2d43ed11ecc0b --- /dev/null +++ b/views/news/timeline-panel.php @@ -0,0 +1,311 @@ +<?php $shareLabel=array( + "verb-create" => "created", + "verb-share" => "shared", + "verb-share-pluriel" => "have shared", + "displayShared-news" => "a news", + "displayShared-projects" => "a project", + "displayShared-organizations" => "an organization", + "displayShared-events" => "an event", + "displayShared-classified" => "an announce", + "displayShared-proposals" => "a proposal", + "displayShared-actions" => "an action", + "displayShared-resolutions" => "a resolution", + "displayShared-rooms" => "a cooperative space", +); ?> + + <div id="newsTagsScope<?php echo $key ?>" class="col-md-12 col-sm-12 col-xs-12"> + + <?php $count = 0; $allScope = ""; + if(@$media["scope"]) { + $scopeSpan=""; + if($media["type"]=="news"){ + foreach (array(/*"cities", "departements", "regions"*/ "localities") as $s) { + if(@$media["scope"][$s]) + foreach ($media["scope"][$s] as $keyy => $scopes) { + foreach ($scopes as $k => $v) { + foreach (array("postalCode", "addressLocality", "name") as $kk => $s) { + + + if(@$k == $s && $v != "" && !is_array($v) ) { + if($count<3){ + $scopeSpan.="<span class='label label-danger pull-right margin-left-5 margin-top-10'> + <i class='fa fa-bullseye'></i> ".$v."</span>"; + }else{ $allScope .= " ".$v; } $count++; + } + } + } + } + } + }else{ + if (@$media["scope"]["address"]) { + $postalCode=(@$media["scope"]["address"]["postalCode"])?$media["scope"]["address"]["postalCode"].", " : ""; + $city=$media["scope"]["address"]["addressLocality"]; + $scopeSpan="<span class='label label-danger pull-right margin-left-5 margin-top-10'><i class='fa fa-bullseye'></i> ".$postalCode.$city."</span>"; + } + } + if($count >3){ ?> + <span class='label text-red pull-right margin-left-5 margin-top-10 tooltips' + data-title="<?php echo $allScope; ?>" data-toogle="tooltip"> + <i class='fa fa-plus'></i> <?php echo $count-3;?> autres + </span> + <?php } + echo $scopeSpan; + } + ?> + </div> + + <?php $classHeading=""; + if(@$srcMainImg != "" && $media["type"] == "activityStream"){ $classHeading="activity-heading"; ?> + <a class="inline-block bg-black activity-image" target="_blank" href="<?php echo @$media["href"]; ?>"> + <img class="img-responsive" src="<?php echo $srcMainImg; ?>" /> + </a> + <?php } ?> + + <div class="timeline-heading text-center <?php echo $classHeading; ?>"> + <h5 class="text-left srcMedia"> + <small> + <?php + if(@$media["verb"]!="share"){ + $pluriel = ""; + + + /* if(empty(@$media["sharedBy"]) || !@$media["lastAuthorShare"] || + (($media["sharedBy"][0]["id"] == @$media["lastAuthorShare"]["id"] && + count(@$media["sharedBy"])<=1) && + ($media["sharedBy"][0]["id"] == @$authorId)) + ){ + $pluriel = ""; + }else{ $pluriel = "-pluriel"; }*/ ?> + + <img class="pull-left img-circle" + src="<?php echo @$thumbAuthor; ?>" + height=40> + + <div class="pull-left padding-5 col-md-7 col-sm-7 text-left" style="line-height: 15px;"> + <?php //if(@$media["lastAuthorShare"]["name"]!=@$nameAuthor){ ?> + <a href="#page.type.<?php echo $authorType ?>.id.<?php echo $authorId ?>" class="lbh"> + <?php echo @$nameAuthor; ?> + </a> + <?php /*}*/ }?> + + <?php //var_dump(@$media["sharedBy"]); + if(@$media["sharedBy"] && @$media["verb"]=="share"){ + $countSharedBy=count($media["sharedBy"]); + + if($countSharedBy==1){ + if(@$media["lastAuthorShare"] && @$media["lastAuthorShare"]["profilThumbImageUrl"]=="") + $media["lastAuthorShare"]["profilThumbImageUrl"] = + $this->module->assetsUrl."/images/thumb/default_".$media["lastAuthorShare"]["type"].".png"; + else if(@$media["lastAuthorShare"]["profilThumbImageUrl"]!="") + $media["lastAuthorShare"]["profilThumbImageUrl"] = + Yii::app()->createUrl($media["lastAuthorShare"]["profilThumbImageUrl"]) ; + $pluriel = ""; ?> + <img class="pull-left img-circle" + src="<?php echo @$media["lastAuthorShare"]["profilThumbImageUrl"]; ?>" + height="40"/> + <?php } ?> + <div class="pull-left padding-5 col-md-7 col-sm-7" style="line-height: 15px;"> + <?php if(@$media["lastAuthorShare"] ){ ?> + <a href="#page.type.<?php echo $media["lastAuthorShare"]["type"] ?>.id.<?php echo $media["lastAuthorShare"]["id"] ?>" class="lbh"> + <?php echo @$media["lastAuthorShare"]["name"]; ?> + </a> + <?php } + if($countSharedBy >1){ + $pluriel = "-pluriel"; + $i=0; + foreach ($media["sharedBy"] as $keyS => $share) { + if($countSharedBy == 1){ $pluriel = ""; } + if($media["lastAuthorShare"]["name"]!=@$share["name"]){ + if($i < 2){ + if($i==0 && $countSharedBy > 2) echo ","; + else if($countSharedBy > 1) echo Yii::t("common", "and"); ?> + <a href="#page.type.<?php echo @$share["type"]; ?>.id.<?php echo @$share["id"] ?>" + class="lbh"> + <?php echo @$share["name"]; ?> + </a> + <?php }else if($i == 2){ ?> + <?php echo Yii::t("common", "and"); ?> + <?php echo $countSharedBy - 2; ?> + <?php $s = $countSharedBy - 2 > 1 ? "s" : ""; ?> + autre<?php echo $s; ?> personne<?php echo $s; ?> + <?php } + $i++; + } + } + } + }?> + <br> + + <span class="margin-top-5"> + <?php if(@$media["type"]=="news") { + $where=""; + if(@$media["target"]["id"] != @$authorId && @$media["verb"] != "create") { + if(@$media["target"]["id"] != @$contextId){ + $where=Yii::t("news","in the newspaper of {who}", + array("{who}"=>'<a href="#page.type.'.@$media["target"]["type"].'.id.'.@$media["target"]["id"].'" class="lbh">'.@$media["target"]["name"].' </a>')); + }else if(@$media["target"]["id"] == @$contextId && @$contextId == Yii::app()->session["userId"] ){ + $where=Yii::t("news","in your newspaper"); + }else if(@$media["target"]["id"] == @$contextId && @$contextId != Yii::app()->session["userId"] ){ + $where=Yii::t("news","in this newspaper"); + } + } ?> + + <i class="fa fa-pencil-square"></i> <?php echo Yii::t("news", "published {what} {where}", array("{what}"=>'<a href="#page.type.'.@$media["type"].'.id.'.@$media["_id"].'" class="lbh">'.Yii::t("news","a message").'</a>',"{where}"=>$where)) ?> + <?php } ?> + + + <?php if(@$media["type"]=="activityStream") { ?> + <?php $iconColor = @Element::getColorIcon($media["object"]["type"]); ?> + <i class="fa fa-plus-circle"></i> <?php echo Yii::t("news",$shareLabel["verb-".$media["verb"].$pluriel]); ?> + <span class="text-<?php echo @$iconColor; ?>"> + <a href="#page.type.<?php echo @$media["object"]["type"]; ?>.id.<?php echo @$media["object"]["id"]; ?>" + class="lbh"> + <?php echo Yii::t("common", $shareLabel["displayShared-".@$media["object"]["type"]]); ?> + </a> + </span> + <?php if(@$media["object"]["type"] == "news"){ ?> + de <a href="#page.type.<?php echo @$media["object"]["authorType"]; ?>.id.<?php echo @$media["object"]["authorId"]; ?>" + class="lbh text-<?php echo @$iconColor; ?>"> + <?php echo @$media["object"]["authorName"]; ?> + </a> + <?php } ?> + <?php if(@$media["target"]["id"] != @$authorId && + @$media["verb"] != "create") { ?> + <?php if(@$media["target"]["id"] != @$contextId){ ?> + dans le journal de + <a href="#page.type.<?php echo @$media["target"]["type"]; ?>.id.<?php echo @$media["target"]["id"]; ?>" + class="lbh"> + <?php echo @$media["target"]["name"]; ?> + </a> + <?php }else if(@$media["target"]["id"] == @$contextId && @$contextId == Yii::app()->session["userId"] ){ ?> + dans votre journal + <?php }else if(@$media["target"]["id"] == @$contextId && @$contextId != Yii::app()->session["userId"] ){ ?> + dans ce journal + <?php } ?> + <?php } ?> + + <?php } ?> + + + <?php if(@$media["scope"] && @$media["scope"]["type"]){ + if($media["scope"]["type"]=="public"){ + $scopeIcon="globe"; + $scopeTooltip =Yii::t("common","Visible to all and posted on the city's wall"); + } + else if ($media["scope"]["type"]=="restricted"){ + $scopeIcon="connectdevelop"; + $scopeTooltip= Yii::t("common","Visible to all on this wall and published on this network"); + }else{ + $scopeIcon="lock"; + $scopeTooltip= Yii::t("common","Private view"); + } ?> + <strong> • </strong> <i class='fa fa-<?php echo $scopeIcon ?> tooltips margin-right-5' data-toggle='tooltip' data-placement='bottom' data-original-title='<?php echo $scopeTooltip ?>'></i> + <?php } ?> + </span> + </div> + </small> + <?php if (@Yii::app()->session["userId"]){ ?> + <div class="btn dropdown pull-right no-padding settingsNews"> + <strong> • </strong> + <a class="dropdown-toggle" type="button" data-toggle="dropdown" style="color:#8b91a0;"> + <i class="fa fa-cog"></i> <i class="fa fa-angle-down"></i> + </a> + <ul class="dropdown-menu"> + <?php if ((@$media["author"]["id"]==Yii::app()->session["userId"] && @$media["verb"] != "share") + || (@$media["sharedBy"] && in_array(Yii::app()->session["userId"],array_column($media["sharedBy"],"id"))) + || (@$canManageNews && $canManageNews)){ ?> + <li> + <a href="javascript:;" class="deleteNews" onclick="deleteNews('<?php echo $key ?>', '<?php echo $media["type"] ?>', $(this))" data-id="'<?php echo $key ?>"><small><i class="fa fa-times"></i> <?php echo Yii::t("common", "Delete")?></small></a></li> + <?php if (@$media["type"] != "activityStream" /*&& @$media["author"]["id"]==Yii::app()->session["userId"]*/){ ?> + <li><a href="javascript:" class="modifyNews" onclick="modifyNews('<?php echo $key ?>','<?php echo $media["type"] ?>')" data-id="<?php echo $key ?>"><small><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Update publication")?></small></a></li> + <?php } + } ?> + <?php if (!@$media["reportAbuse"] || (@$media["reportAbuse"] && !@$media["reportAbuse"][@Yii::app()->session["userId"]])) { ?> + <li><a href="javascript:;" class="newsReport" onclick="newsReportAbuse(this,'<?php echo $key ?>')" data-id="<?php echo $key ?>"><small><i class="fa fa-flag"></i> <?php echo Yii::t("common", "Report an abuse")?></small></a></li> + <?php } ?> + </ul> + </div> + <?php } ?> + <span class="margin-top-10 margin-bottom-10 hidden-xs pull-right"> + <small> + <i class="fa fa-clock-o"></i> + <?php //var_dump(@$media["updated"]); + // if(@$media["type"] == "activityStream" && @$media["verb"] == ActStr::TYPE_ACTIVITY_SHARE) + echo Translate::pastTime(date(@$media["updated"]->sec), "timestamp", $timezone); + //else + //echo Translate::pastTime(date(@$media["created"]->sec), "timestamp", $timezone); + ?> + </small> + + </span> + </h5> + </div> + + <div class="timeline-body col-md-12 text-left margin-bottom-10"> + <?php if(!empty(@$media["comment"])){ ?> + <span class=""><?php echo $media["comment"]; ?> + </span> + <?php } ?> + + <?php if(!empty(@$media["text"])){ ?> + <div id="newsContent<?php echo $key ?>" data-pk="<?php echo $key ?>" + class="newsContent no-padding"><?php echo $media["text"]; ?> + </div> + <?php } ?> + + <?php if(@$media["tags"] && @$media["type"] != "activityStream") + foreach ($media["tags"] as $keyy => $tag) { + if($tag != "") { ?> + <a href="javascript:;" class="filter btn no-padding" data-filter=".'+tag+'"> + <span class="text-red">#<?php echo $tag; ?></span> + </a> + <?php }} ?> + + <?php + if(@$media["type"]=="activityStream" && + //@$media["verb"]==ActStr::TYPE_ACTIVITY_SHARE && + @$media["object"]["type"]){ + ?> + + <!-- <h4><a target="_blank" href="<?php echo @$media["href"]; ?>"><?php echo @$media["title"]; ?></a></h4> --> + + <?php if(!empty(@$media["object"])){ ?> + <div id="" data-pk="<?php echo $key ?>" + class="col-md-12 no-padding margin-bottom-10 newsActivityStream<?php echo $media["object"]["id"]; ?>" + <?php if(@$media["object"]["type"] == "news"){ ?>style="border:1px solid #E3E3E3;"<?php } ?>> + <?php + if(@$media["object"]["type"] == "news") + $this->renderPartial('../news/timeline-panel', + array( "key"=>$media["object"]["id"], + "media"=>$media["object"], + "nameAuthor"=>@$media["object"]["authorName"] ? $media["object"]["authorName"] : "", + "authorType"=>@$media["object"]["authorType"] ? $media["object"]["authorType"] : "citoyens", + "authorId"=>@$media["object"]["authorId"], + "timezone"=>$timezone, + "thumbAuthor"=>@$media["object"]["author"]["profilThumbImageUrl"] ? + $media["object"]["author"]["profilThumbImageUrl"] : "", + ) + ); + ?> + </div> + + <?php } ?> + <?php } ?> + </div> + + <?php if(@$srcMainImg != "" && $media["type"] != "activityStream"){ ?> + <a class="inline-block bg-black" target="_blank" href="<?php echo @$media["href"]; ?>"> + <img class="img-responsive" src="<?php echo $srcMainImg; ?>" /> + </a> + <?php } ?> + + + <?php if(@$media["contentType"] == "youtube"){ ?> + <iframe width="100%" height="315" src="https://www.youtube.com/embed/<?php echo $media["idYoutube"]; ?>" + frameborder="0" allowfullscreen></iframe> + <?php } ?> + <?php if(@$media["media"]){ ?> + <div id="result<?php echo $key ?>" class="bg-white results padding-15 col-md-12 col-sm-12 col-xs-12"></div> + <?php } ?> + + diff --git a/views/pay/MangoPaySdkStorage.tmp.php b/views/pay/MangoPaySdkStorage.tmp.php new file mode 100644 index 0000000000000000000000000000000000000000..822b035a27b2a2e8f90baa250e8b6574b14b0edc --- /dev/null +++ b/views/pay/MangoPaySdkStorage.tmp.php @@ -0,0 +1 @@ +<?php exit(); ?>O:29:"MangoPay\Libraries\OAuthToken":5:{s:11:"create_time";i:1508849286;s:12:"access_token";s:32:"f05e1e1e559e4938a440efd4d73c21f0";s:10:"token_type";s:6:"bearer";s:10:"expires_in";i:1199;s:17:"autentication_key";s:32:"5836d7ecc1acd6048993fb6992492474";} \ No newline at end of file diff --git a/views/pay/index.php b/views/pay/index.php new file mode 100644 index 0000000000000000000000000000000000000000..b99368db92a469d909439bd5369175642f53bf3e --- /dev/null +++ b/views/pay/index.php @@ -0,0 +1,9 @@ +<?php +if (isset($_GET['mode'])){ + if ($_GET['mode'] == 'nonJS') { + include "non_js.php"; + } elseif($_GET['mode'] == 'JS') { + include "with_js.php"; + } +} +?> diff --git a/views/pay/js/script.js b/views/pay/js/script.js new file mode 100644 index 0000000000000000000000000000000000000000..cae035e8ad2c7b108b7e2c17fd28e536cf739d60 --- /dev/null +++ b/views/pay/js/script.js @@ -0,0 +1,100 @@ +$(document).ready(function(){ + + // Initialize mangoPay.cardRegistration object + mangoPay.cardRegistration.init({ + cardRegistrationURL : cardRegistrationURL, + preregistrationData : preregistrationData, + accessKey : accessKey, + Id : cardRegistrationId + }); + + // Action for button "Pay with Ajax" + $("#payAjax").click(function() { + + // Disable button to prevent double click while waiting + $("#payAjax").attr("disabled", true).val("Please wait..."); + + runCardRegAjax(); + + }); + + // Action for button "Pay with Ajax or Redirect" + $("#payAjaxOrRedirect").click(function(){ + + // Disable button to prevent double click while waiting + $("#payAjaxOrRedirect").attr("disabled", true).val("Please wait..."); + + if(mangoPay.browser.corsSupport()) { + runCardRegAjax(); + return; + } + + runCardRegReturnUrl(); + + }); + + // Action for button "Pay with Redirect" + $("#payRedirect").click(function() { + + runCardRegReturnUrl(); + + }); +}); + + +function runCardRegAjax() { + // Collect sensitive card data from the form + var cardData = getCardData(); + + // Process data + mangoPay.cardRegistration.registerCard(cardData, + function(res) { + var message = 'Card has been succesfully registered under the Card Id ' + res.CardId + '.<br />'; + message += 'Card is now ready to use e.g. in a «Direct PayIn» Object.'; + $("#divForm").html(message); + }, + function(res){ + alert("Error occured while registering the card: " + "ResultCode: " + res.ResultCode + ", ResultMessage: " + res.ResultMessage); + } + ); +} + +function runCardRegReturnUrl() { + + var cardData = getCardData(); + + // Build the form and append to the document + var form = document.createElement('form'); + form.setAttribute('action', cardRegistrationURL); + form.setAttribute('method', 'post'); + form.setAttribute('style', 'display: none'); + document.getElementsByTagName('body')[0].appendChild(form); + + // Add card registration data to the form + form.appendChild(getInputElement('data', preregistrationData)); + form.appendChild(getInputElement('accessKeyRef', accessKey)); + form.appendChild(getInputElement('cardNumber', cardData.cardNumber)); + form.appendChild(getInputElement('cardExpirationDate', cardData.cardExpirationDate)); + form.appendChild(getInputElement('cardCvx', cardData.cardCvx)); + form.appendChild(getInputElement('returnURL', redirectUrl)); + + // Submit the form + form.submit(); +} + +function getCardData() { + return { + cardNumber : $("#paymentForm").find("input[name$='cardNumber']").val(), + cardExpirationDate : $("#paymentForm").find("input[name$='cardExpirationDate']").val(), + cardCvx : $("#paymentForm").find("input[name$='cardCvx']").val(), + cardType : cardType + }; +} + +function getInputElement(name, value) { + var input = document.createElement('input'); + input.setAttribute('type', 'hidden'); + input.setAttribute('name', name); + input.setAttribute('value', value); + return input; +} \ No newline at end of file diff --git a/views/pay/non_js.php b/views/pay/non_js.php new file mode 100644 index 0000000000000000000000000000000000000000..15295be3619061c5cd0152db90d046ed28b5014c --- /dev/null +++ b/views/pay/non_js.php @@ -0,0 +1,78 @@ +<?php + +// include MangoPay SDK +require_once '../../vendor/autoload.php'; +require_once 'config.php'; + +// sample payment data +$_SESSION['amount'] = 3300; +$_SESSION['currency'] = 'EUR'; +$_SESSION['cardType'] = 'CB_VISA_MASTERCARD';//or alternatively MAESTRO or DINERS etc + +// create instance of MangoPayApi SDK +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = MangoPayDemo_ClientId; +$mangoPayApi->Config->ClientPassword = MangoPayDemo_ClientPassword; +$mangoPayApi->Config->TemporaryFolder = MangoPayDemo_TemporaryFolder; + +// create user for payment +$user = new MangoPay\UserNatural(); +$user->FirstName = 'John'; +$user->LastName = 'Smith'; +$user->Email = 'email@domain.com'; +$user->Birthday = time(); +$user->Nationality = 'FR'; +$user->CountryOfResidence = 'FR'; +$user->Occupation = "programmer"; +$user->IncomeRange = 3; +$createdUser = $mangoPayApi->Users->Create($user); + +// register card +$cardRegister = new \MangoPay\CardRegistration(); +$cardRegister->UserId = $createdUser->Id; +$cardRegister->Currency = $_SESSION['currency']; +$cardRegister->CardType = $_SESSION['cardType']; +$createdCardRegister = $mangoPayApi->CardRegistrations->Create($cardRegister); +$_SESSION['cardRegisterId'] = $createdCardRegister->Id; + +// build the return URL to capture token response +$returnUrl = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST']; +$returnUrl .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], '/') + 1); +$returnUrl .= 'payment.php'; + +?> + +<p> + <i> + Shows how to register the card without using JavaScript <br /> + and process payments with page reload. + </i> +</p> + +<label>Full Name</label> +<label><?php print $createdUser->FirstName . ' ' . $createdUser->LastName; ?></label> +<div class="clear"></div> + +<label>Amount</label> +<label><?php print $_SESSION['amount'] . ' ' . $_SESSION['currency']; ?></label> +<div class="clear"></div> + +<form action="<?php print $createdCardRegister->CardRegistrationURL; ?>" method="post"> + <input type="hidden" name="data" value="<?php print $createdCardRegister->PreregistrationData; ?>" /> + <input type="hidden" name="accessKeyRef" value="<?php print $createdCardRegister->AccessKey; ?>" /> + <input type="hidden" name="returnURL" value="<?php print $returnUrl; ?>" /> + + <label for="cardNumber">Card Number</label> + <input type="text" name="cardNumber" value="" /> + <div class="clear"></div> + + <label for="cardExpirationDate">Expiration Date</label> + <input type="text" name="cardExpirationDate" value="" /> + <div class="clear"></div> + + <label for="cardCvx">CVV</label> + <input type="text" name="cardCvx" value="" /> + <div class="clear"></div> + + <input type="submit" value="Pay" /> +</form> diff --git a/views/pay/payment.php b/views/pay/payment.php new file mode 100644 index 0000000000000000000000000000000000000000..85a97fc1b67585ec7716318825d28b953ed5a86c --- /dev/null +++ b/views/pay/payment.php @@ -0,0 +1,85 @@ +<?php +// include MangoPay SDK +//require_once '../../vendor/autoload.php'; +require_once 'config.php'; + +// check if payment has been initialized +if (!isset($_SESSION['amount'])) { + die('<div style="color:red;">No payment has been started<div>'); +} + +// create instance of MangoPayApi +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"];//MangoPayDemo_ClientId; +$mangoPayApi->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"];//MangoPayDemo_ClientPassword; +$mangoPayApi->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + +try { + // update register card with registration data from Payline service + $cardRegister = $mangoPayApi->CardRegistrations->Get($_SESSION['cardRegisterId']); + $cardRegister->RegistrationData = isset($_GET['data']) ? 'data=' . $_GET['data'] : 'errorCode=' . $_GET['errorCode']; + $updatedCardRegister = $mangoPayApi->CardRegistrations->Update($cardRegister); + + if ($updatedCardRegister->Status != \MangoPay\CardRegistrationStatus::Validated || !isset($updatedCardRegister->CardId)) + die('<div style="color:red;">Cannot create card. Payment has not been created.<div>'); + + // get created virtual card object + $card = $mangoPayApi->Cards->Get($updatedCardRegister->CardId); + + // create temporary wallet for user + $wallet = new \MangoPay\Wallet(); + $wallet->Owners = array( $updatedCardRegister->UserId ); + $wallet->Currency = $_SESSION['currency']; + $wallet->Description = 'Temporary wallet for payment demo'; + $createdWallet = $mangoPayApi->Wallets->Create($wallet); + + // create pay-in CARD DIRECT + $payIn = new \MangoPay\PayIn(); + $payIn->CreditedWalletId = $createdWallet->Id; + $payIn->AuthorId = $updatedCardRegister->UserId; + $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds->Amount = $_SESSION['amount']; + $payIn->DebitedFunds->Currency = $_SESSION['currency']; + $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees->Amount = 0; + $payIn->Fees->Currency = $_SESSION['currency']; + + // payment type as CARD + $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); + $payIn->PaymentDetails->CardType = $card->CardType; + $payIn->PaymentDetails->CardId = $card->Id; + + // execution type as DIRECT + $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); + $payIn->ExecutionDetails->SecureModeReturnURL = 'http://test.com'; + + // create Pay-In + $createdPayIn = $mangoPayApi->PayIns->Create($payIn); + + // if created Pay-in object has status SUCCEEDED it's mean that all is fine + if ($createdPayIn->Status == \MangoPay\PayInStatus::Succeeded) { + print '<div style="color:green;">'. + 'Pay-In has been created successfully. ' + .'Pay-In Id = ' . $createdPayIn->Id + . ', Wallet Id = ' . $createdWallet->Id + . '</div>'; + } + else { + // if created Pay-in object has status different than SUCCEEDED + // that occurred error and display error message + print '<div style="color:red;">'. + 'Pay-In has been created with status: ' + . $createdPayIn->Status . ' (result code: ' + . $createdPayIn->ResultCode . ')' + .'</div>'; + } + +} catch (\MangoPay\Libraries\ResponseException $e) { + + print '<div style="color: red;">' + .'\MangoPay\ResponseException: Code: ' + . $e->getCode() . '<br/>Message: ' . $e->getMessage() + .'<br/><br/>Details: '; print_r($e->GetErrorDetails()) + .'</div>'; +} + diff --git a/views/pay/with_js.php b/views/pay/with_js.php new file mode 100644 index 0000000000000000000000000000000000000000..c4398ff0744ed4270289c39ebd1b338e743cb6ce --- /dev/null +++ b/views/pay/with_js.php @@ -0,0 +1,193 @@ +<?php + +// build the return URL to capture token response if browser does not support cross-domain Ajax requests +$returnUrl = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST']; +$returnUrl .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], '/') + 1); +$returnUrl .= 'pay/done'; + +?> + +<script> + var cardRegistrationURL = "<?php echo $createdCardRegister->CardRegistrationURL; ?>"; + var preregistrationData = "<?php echo $createdCardRegister->PreregistrationData; ?>"; + var cardRegistrationId = "<?php echo $createdCardRegister->Id; ?>"; + var cardType = "<?php echo $createdCardRegister->CardType; ?>"; + var accessKey = "<?php echo $createdCardRegister->AccessKey; ?>"; + var ajaxUrl = "<?php echo $returnUrl; ?>"; + var redirectUrl = "<?php echo $returnUrl; ?>"; + + console.log({ + cardRegistrationURL : "<?php echo $createdCardRegister->CardRegistrationURL; ?>", + preregistrationData : "<?php echo $createdCardRegister->PreregistrationData; ?>", + cardRegistrationId : "<?php echo $createdCardRegister->Id; ?>", + cardType : "<?php echo $createdCardRegister->CardType; ?>", + accessKey : "<?php echo $createdCardRegister->AccessKey; ?>", + ajaxUrl : "<?php echo $returnUrl; ?>", + redirectUrl : "<?php echo $returnUrl; ?>" + }); + + mangoPay.cardRegistration.baseURL = "<?php echo $api->Config->BaseUrl; ?>"; + mangoPay.cardRegistration.clientId = "<?php echo $api->Config->ClientId; ?>"; +</script> + + +<div id ="divForm"> + <label>Full Name</label> + <label><?php print $createdUser->FirstName . ' ' . $createdUser->LastName; ?></label> + <br/>createdCardRegister -> Id : <?php print $createdCardRegister->Id; ?> + <br/>createdUser -> Id : <?php print $createdUser->Id; ?> + + <hr> + + <label>Amount</label> + <label><?php print $amount . ' ' . $currency; ?></label> + + <hr> + + <form id="paymentForm"> + <label for="cardNumber" class="col-xs-12 col-md-3 col-sm-4 text-right">Card Number</label> + <input type="text" name="cardNumber" value="4706750000000009" class="col-xs-12 col-md-7"/><br> + <div class="col-xs-12 margin-top-5"></div> + + <label for="cardExpirationDate" class="col-xs-12 col-md-3 col-sm-4 text-right">Expiration Date</label> + <input type="text" name="cardExpirationDate" value="0118" class="col-xs-12 col-md-7"/><br> + <div class="col-xs-12 margin-top-5"></div> + + <label for="cardCvx" class="col-xs-12 col-md-3 col-sm-4 text-right">CVV</label> + <input type="text" name="cardCvx" value="123" class="col-xs-12 col-md-7"/><br> + + + <br><br><hr> + + <input type="button" class="pull-right" + value="Register with Ajax (will fail for non supporting CORS browsers)" id="payAjax" /> + + + <?php /* + <input type="button" value="Register with Ajax or redirect if no CORS support" id="payAjaxOrRedirect" /> + <div class="clear"></div> + <br> + + <input type="button" value="Register with redirect and then pay" id="payRedirect" /> + <div class="clear"></div> + */?> + </form> + +</div> + +<script type="text/javascript"> + +$(document).ready(function(){ + + // Initialize mangoPay.cardRegistration object + mangoPay.cardRegistration.init({ + cardRegistrationURL : cardRegistrationURL, + preregistrationData : preregistrationData, + accessKey : accessKey, + Id : cardRegistrationId + }); + + // Action for button "Pay with Ajax" + $("#payAjax").click(function() { + + // Disable button to prevent double click while waiting + $("#payAjax").attr("disabled", true).val("Please wait..."); + + runCardRegAjax(); + + }); + + // Action for button "Pay with Ajax or Redirect" + $("#payAjaxOrRedirect").click(function(){ + + // Disable button to prevent double click while waiting + $("#payAjaxOrRedirect").attr("disabled", true).val("Please wait..."); + + if(mangoPay.browser.corsSupport()) { + runCardRegAjax(); + return; + } + + runCardRegReturnUrl(); + + }); + + // Action for button "Pay with Redirect" + $("#payRedirect").click(function() { + + runCardRegReturnUrl(); + + }); +}); + + +function runCardRegAjax() { + // Collect sensitive card data from the form + var cardData = getCardData(); + + // Process data + mangoPay.cardRegistration.registerCard(cardData, + function(res) { + var message = 'Card has been succesfully registered under the Card Id ' + res.CardId + '.<br />'; + message += 'Card is now ready to use e.g. in a «Direct PayIn» Object.<br/>'; + message += '<a class="btn btn-success" href="javascript:payin(' + res.CardId + ')">«PayIn» Object</a>.'; + ; + $("#divForm").html(message); + }, + function(res){ + alert("Error occured while registering the card: " + "ResultCode: " + res.ResultCode + ", ResultMessage: " + res.ResultMessage); + } + ); +} +function payin (cardId) { + var params = { + cardId : cardId, + obj : shopping.checkoutObj, + currency : "EUR" + }; + ajaxPost( "#checkoutCart", baseUrl+"/"+moduleId+'/pay/in' , params, function() { + alert("return from payin"); + } , "html" ); + +} + +function runCardRegReturnUrl() { + + var cardData = getCardData(); + + // Build the form and append to the document + var form = document.createElement('form'); + form.setAttribute('action', cardRegistrationURL); + form.setAttribute('method', 'post'); + form.setAttribute('style', 'display: none'); + document.getElementsByTagName('body')[0].appendChild(form); + + // Add card registration data to the form + form.appendChild(getInputElement('data', preregistrationData)); + form.appendChild(getInputElement('accessKeyRef', accessKey)); + form.appendChild(getInputElement('cardNumber', cardData.cardNumber)); + form.appendChild(getInputElement('cardExpirationDate', cardData.cardExpirationDate)); + form.appendChild(getInputElement('cardCvx', cardData.cardCvx)); + form.appendChild(getInputElement('returnURL', redirectUrl)); + + // Submit the form + form.submit(); +} + +function getCardData() { + return { + cardNumber : $("#paymentForm").find("input[name$='cardNumber']").val(), + cardExpirationDate : $("#paymentForm").find("input[name$='cardExpirationDate']").val(), + cardCvx : $("#paymentForm").find("input[name$='cardCvx']").val(), + cardType : cardType + }; +} + +function getInputElement(name, value) { + var input = document.createElement('input'); + input.setAttribute('type', 'hidden'); + input.setAttribute('name', name); + input.setAttribute('value', value); + return input; +} +</script> diff --git a/views/person/dashboard.php b/views/person/dashboard.php new file mode 100644 index 0000000000000000000000000000000000000000..3bb10a3e281fdfad75c6e8573e398de93f182be5 --- /dev/null +++ b/views/person/dashboard.php @@ -0,0 +1 @@ +<?php echo "ouiiiiiiiiiiiiii" ?> \ No newline at end of file diff --git a/views/person/invite.php b/views/person/invite.php new file mode 100644 index 0000000000000000000000000000000000000000..70d9da0412adc17480c4baf051206e22749c1986 --- /dev/null +++ b/views/person/invite.php @@ -0,0 +1,1225 @@ +<style> + +#newInvite .dropdown-menu{ + width: 100%; +} +#step2, #step3{ + display:none; +} + +.margin-bottom-10 { + margin-bottom: 10px; +} + +.city-search { + font-size: 0.95rem; + font-weight: 300; + line-height: 0.8125rem; + +} + +#newInvite{ + float: left; + padding: 10px; + background-color: rgba(242, 242, 242, 0.6); + width: 100%; + -moz-box-shadow: 0px 0px 3px -1px #747474; + -webkit-box-shadow: 0px 0px 3px -1px #747474; + -o-box-shadow: 0px 0px 3px -1px #747474; + box-shadow: 0px 0px 3px -1px #747474; + filter:progid:DXImageTransform.Microsoft.Shadow(color=#cfcfcf, Direction=134, Strength=5); +} + + +/* design alpha tango*/ +.main-col-search{ + background-image: url("<?php echo $this->module->assetsUrl; ?>/images/bg/tango-circle-bg-yellow.png"); + background-size:100%; + background-repeat: no-repeat; + background-color: #ffffb5 !important; +} + +.noteWrap .panel-white{ + background-color: rgba(0, 0, 0, 0); + color: white; + font-size: 15px; + font-weight: 300; +} +.noteWrap .control-label{ + font-size:15px; + font-weight:600; +} + +.main-top-menu{ + /*background-color: rgba(255, 255, 255, 0.82) !important;*/ +} +.select2-container .select2-choice .select2-arrow b::before{ + /*content:"";*/ +} + +.btn-select-type-orga { + font-size: 14px; +} + +.noteWrap input { + text-align:left !important; +} +.noteWrap #description{ + word-wrap: break-word; + resize: horizontal; + max-height: 460px; + overflow: scroll; + max-width: 100%; + width: 924px; + min-height: 250px !important; +} +.input-icon > input { + padding-left: 25px; + padding-right: 6px; +} +input.form-control{ + text-align: left !important; +} + + +#newInvite .nav-tabs > li > a { + border: 0 none; + border-radius: 5px; + color: #8E9AA2; + min-width: 70px; + padding: 5px !important; + margin-bottom:10px; +} +#newInvite .nav-tabs > li > a { + background-color: transparent !important; +} +#newInvite .nav-tabs > li > a > div:hover { + background-color: #3C5665; + color:white !important; +} +#newInvite .nav-tabs > li > a > div:focus { + background-color: #3C5665; + color:white !important; +} + +#listEmailGrid{ + margin-top: 20px; + background-color: transparent; + padding: 15px; + border-radius: 4px; + /*border-right: 1px solid #474747;*/ + padding: 0px; + width:100%; +} +#listEmailGrid .mix{ + margin-bottom: -1px !important; +} +#listEmailGrid .item_map_list{ + padding:10px 10px 10px 0px !important; + margin-top:0px; + text-decoration:none; + background-color:white; + border: 1px solid rgba(0, 0, 0, 0.08); /*rgba(93, 93, 93, 0.15);*/ + text-align: center; +} +#listEmailGrid .item_map_list_blue{ + background-color:rgba(0, 0, 0, 0.08); + padding:10px 10px 10px 0px !important; + margin-top:0px; + text-decoration:none; + border: 1px solid rgba(0, 0, 0, 0.08); /*rgba(93, 93, 93, 0.15);*/ + text-align: center; +} +#listEmailGrid .item_map_list .left-col .thumbnail-profil{ + width: 75px; + height: 75px; +} +#listEmailGrid .ico-type-account i.fa{ + margin-left:11px !important; +} +#listEmailGrid .thumbnail-profil{ + margin-left:10px; +} +#listEmailGrid .detailDiv a.text-xss{ + font-size: 12px; + font-weight: 300; +} + +.panelLabel{ + margin-bottom:10px; + margin-left:25px; + color:#58879B; + font-size:25px + } + +</style> +<?php + //HtmlHelper::registerCssAndScriptsFiles( array('', ) , Yii::app()->theme->baseUrl. '/assets'); + //$cssAnsScriptFilesModule = array(''); + //HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "page") ); +?> + + +<div class="col-md-12 col-sm-12 col-xs-12 no-padding social-main-container"> + <div class="padding-top-15" id="onepage"> + <div id="newInvite"> + <?php + if (@Yii::app()->params['betaTest']) { + $nbOfInvit = empty($currentUser["numberOfInvit"]) ? 0 : $currentUser["numberOfInvit"]; + ?> + <div id="numberOfInvit" class="badge badge-danger pull-right tooltips" style="margin-top:5px; margin-right:5px;" data-count="<?php echo $nbOfInvit ?>" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("login","Number of invitations left"); ?>"><?php echo $nbOfInvit ?> invitation(s)</div> + <?php + } + ?> + <ul class="nav nav-tabs"> + <li role="presentation"> + <a href="javascript:" class="" id="menuInviteSomeone"> + <div id="titleInviteSomeone" class='radius-10 padding-10 text-yellow text-dark'> + <i class="fa fa-search fa-2x"></i> Rechercher ... + </div> + </a> + </li> + <li role="presentation"> + <a href="#" class="" id="menuGmail"> + <div id="titleGmail" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-envelope fa-2x"></i> + Gmail + </div> + </a> + </li> + <li role="presentation"> + <a href="javascript:" class="" id="menuGooglePlus"> + <div id="titleGooglePlus" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-google-plus-square fa-2x"></i> + Google+ + </div> + </a> + </li> + <li role="presentation"> + <a href="javascript:" class="" id="menuImportFile"> + <div id="titleImportFile" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-upload fa-2x"></i> + Importer un fichier + </div> + </a> + </li> + <li role="presentation"> + <a href="javascript:" class="" id="menuWriteMails"> + <div id="titleWriteMails" class='radius-10 padding-10 text-grey text-dark'> + <i class="fa fa-pencil-square-o fa-2x"></i> + Saisir + </div> + </a> + </li> + </ul> + <?php + $size = "col-md-12"; + ?> + <div class="<?php echo $size ?>" style="margin-top:20px;"> + <!-- Partie "Invite Someone" --> + <div class="panel panel-white" id="divInviteSomeone"> + <div class="panel-heading border-light"> + <h3 class="text-dark"> <?php echo Yii::t("person","Find people you know by name or email") ?>. </h3> + </div> + + <div class="panel-body"> + + <form class="form-invite" autocomplete="off"> + <input class="invite-parentId hide" id="inviteParentId" name="inviteParentId" type="text"/> + <input class="invite-id hide" id = "inviteId" name="inviteId" type="text"/> + <div class="row" id="step1"> + <div class="col-md-1 text-right" style="margin-top:5px;"> + <i class="fa fa-search fa-2x"></i> + </div> + <div class="col-md-10"> + <div class="form-group"> + <input class="invite-search form-control text-left" placeholder="Un nom, un e-mail ..." autocomplete = "off" id="inviteSearch" name="inviteSearch" value=""> + <ul class="dropdown-menu" id="dropdown_searchInvite" style=""> + <li class="li-dropdown-scope">-</li> + </ul> + </input> + </div> + </div> + </div> + <div class="row" id="step2"> + <div class="form-group" id="ficheUser"> + <div class="col-md-5 text-center"> + <div class='photoInvited text-center'> + </div> + <a class='pending btn btn-xs btn-red tooltips' data-toggle="tooltip" data-placement="bottom" title="This user has been already invited but has not connected yet.">Pending User</a> + </div> + <div class="col-md-7"> + <a href="javascript:;" class="connectBtn btn btn-lg btn-light-blue tooltips " data-placement="top" data-original-title="<?php echo Yii::t("common","Follow this person") ?>" ><i class=" connectBtnIcon fa fa-link "></i> <?php echo Yii::t("common","Follow this person") ?></a> + <a href="javascript:;" class="disconnectBtn btn btn-lg btn-light-blue tooltips " data-placement="top" data-original-title="<?php echo Yii::t("common","Unfollow this person")?>" ><i class=" disconnectBtnIcon fa fa-unlink "></i> <?php echo Yii::t("common","Unfollow this person") ?></a> + <hr> + <h2 id="ficheName" name="ficheName"></h2> + <span id="email" name="email" ></span><br><br> + <span id="address" name="address" ></span><br><br> + <span id="tags" name="tags" ></span><br> + </div> + </div> + <div class ="row"> + <div class="col-md-10 col-md-offset-1"> + <h4><a href="javascript:backToSearch()"><i class="fa fa-search"></i> Rechercher</a></h4> + </div> + </div> + </div> + <div class="row" id="step3"> + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1" id="iconUser"> + <i class="fa fa-user fa-2x"></i> + </div> + <div class="col-md-9"> + <input class="invite-name form-control" placeholder="Name" id="inviteName" name="inviteName" value="" /> + </div> + </div> + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1"> + <i class="fa fa-envelope-o fa-2x"></i> + </div> + <div class="col-md-9"> + <input class="invite-email form-control" placeholder="Email" id="inviteEmail" name="inviteEmail" value="" /> + </div> + </div> + <div class="row margin-bottom-10"> + <div class="col-md-1 col-md-offset-1"> + <i class="fa fa-align-justify fa-2x"></i> + </div> + <div class="col-md-9"> + <textarea class="invite-text form-control" id="inviteText" name="inviteText" rows="4" /> + </div> + </div> + <div class="row margin-bottom-10"> + <div class="col-md-11"> + <div class="form-group"> + <button class="btn bg-dark pull-right" id="btnInviteNew" >Inviter</button> + <button class="btn btn-danger pull-right btnCancel" style="margin-right:10px;" id="btnCancelStep3" >Annuler</button> + </div> + </div> + </div> + </div> + </form> + </div> + </div> + <div class="panel panel-white" id="divGmail"> + <div class="panel-heading border-light"> + Inviter vos contacts Gmail + </div> + </div> + <div class="panel panel-white" id="divGooglePlus"> + <div class="panel-heading border-light"> + Publier sur Google +, pour inviter vos amis a rejoindre Communecter + </div> + <div class="panel-body"> + <form class="form-googlePlus" autocomplete="off"> + <div class="col-xs-12"> + <!-- Placez cette balise où vous souhaitez faire apparaître le gadget bouton "Partager". --> + <div class="g-plus" data-action="share" data-height="24" data-href="https://www.communecter.org"></div> + <!--<a href="#" + class="g-interactivepost btn btn-primary col-md-3" + data-clientid="<?php //echo Yii::app()->params['google']['client_id'] ; ?>" + data-contenturl="www.communecter.org" + data-calltoactionlabel="INVITE" + data-calltoactionurl="www.communecter.org" + data-cookiepolicy="single_host_origin" + data-prefilltext="Bonjour, J'ai découvert un réseau sociétal citoyen appelé Communecter - être connecté à sa commune. Tu peux agir concrétement autour de chez toi et découvrir ce qui s'y passe. Viens rejoindre le réseau sur communecter.org."> + Partagez Communecter sur Google+ + </a> --> + </div> + </form> + </div> + </div> + + <div class="panel panel-white" id="divImportFile"> + <div class="panel-heading border-light"> + Selectionner un ficher csv qui contient les mails de vos contacts + </div> + <div class="panel-body"> + <form class="form-importFile" autocomplete="off"> + <div class="col-xs-12"> + Fichier (CSV) : <input type="file" id="fileEmail" name="fileEmail" accept=".csv"> + </div> + </form> + </div> + </div> + <div class="panel panel-white" id="divWriteMails"> + <div class="panel-heading border-light"> + Copier vos emails, séparés par des points-virgules. + </div> + <div class="panel-body"> + <form class="form-writeMails" autocomplete="off"> + <div class="col-xs-12"> + <div class="col-sm-5 col-xs-12"> + <textarea id="textareaMails" class="form-control col-sm-5" rows="5"></textarea> + </div> + <a href="#" class="btn bg-dark col-sm-2" id="submitAfficher">Afficher</a> + </div> + </form> + </div> + </div> + <div class="panel panel-white" id="divCheckMail"> + <div class="panel-body"> + <div id="checkMail" class="col-xs-12"> + <div class="homestead panelLabel pull-left"> + <i class="fa fa-edit"></i> + <label for="textmail" class="control-label">Message</label> + </div> + <div id="Messages" class="col-xs-12"> + <textarea id="textmail" class="form-control" rows="3">Bonjour, J'ai découvert un réseau sociétal citoyen appelé "Communecter - être connecté à sa commune". + Tu peux agir concrétement autour de chez toi et découvrir ce qui s'y passe. Viens rejoindre le réseau sur communecter.org.</textarea> + <div class="col-sm-12"> </div> + </div> + + <div class="homestead panelLabel pull-left"> + <i class="fa fa-users"></i> + Liste des contacts + </div> + + <div class="col-xs-12"> + <div id="nbContact" class="homestead pull-left"> + </div> + <select id="selectContact" class="col-sm-offset-2"> + <option value="all">Tous les contacts</option> + <option value="2015-01-01">Depuis 2015</option> + <option value="2014-01-01">Depuis 2014</option> + <option value="2013-01-01">Depuis 2013</option> + <option value="2012-01-01">Depuis 2012</option> + <option value="2011-01-01">Depuis 2011</option> + <option value="2010-01-01">Depuis 2010</option> + <option value="2009-01-01">Depuis 2009</option> + <option value="2008-01-01">Depuis 2008</option> + <option value="2007-01-01">Depuis 2007</option> + <option value="2006-01-01">Depuis 2006</option> + <option value="2005-01-01">Depuis 2005</option> + <option value="2004-01-01">Depuis 2004</option> + <option value="2003-01-01">Depuis 2003</option> + <option value="2002-01-01">Depuis 2002</option> + <option value="2001-01-01">Depuis 2001</option> + <option value="2000-01-01">Depuis 2000</option> + </select> + </div> + <br/> + <div class="panel-scroll row-fluid height-300"> + <ul id="listEmailGrid" class="pull-left list-unstyled"> + </ul> + </div> + <br/> + <div class="col-xs-12 pull-center"> + <a href="#" class="btn bg-dark col-sm-2 " id="submitInviter">Inviter</a> + </div> + </div> + </div> + </div> + </div> + + </div> +</div> +<?php + + +?> +<!-- Function utiliser pour faire des appels aux API de google --> + +<!-- Placez cette balise dans l'en-tête ou juste avant la balise de fermeture du corps de texte. --> +<script src="https://apis.google.com/js/platform.js" async defer> + {lang: 'fr'} +</script> + + +<!--<script type="text/javascript"> +(function(){ + var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; + po.src = 'https://apis.google.com/js/client:plusone.js'; + var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); + })(); +</script> --> +<script src="https://apis.google.com/js/client.js"></script> +<script type="text/javascript"> + +//var userId = "<?php echo Yii::app()->session["userId"]; ?>"; +var googleID = "<?php echo Yii::app()->params['google']['client_id']; ?>"; +var keyApp = "<?php echo Yii::app()->params['google']['keyAPP']; ?>"; +//var tags; + +var listMails = []; +var totalMails = 0; +var subViewElement, subViewContent; +var timeout; +var tabObject = []; + +var listFollows = <?php echo json_encode(@$follows) ?>; +var listFollowsId = <?php echo json_encode(@$listFollowsId) ?>; +mylog.log("listFollows", listFollows); + + +jQuery(document).ready(function() { + initSubView(); + bindInviteSubViewInvites(); + runinviteFormValidation(); + setTitle("Inviter quelqu'un","<i class='fa fa-plus'></i> <i class='fa fa-user'></i>"); +}); + +function bindInviteSubViewInvites() { + $("#menuInviteSomeone").click(function() { + fadeInView("divInviteSomeone"); + $("#shareForm").hide(); + }); + + $("#menuGmail").click(function() { + fadeInView("divGmail"); + $("#shareForm").hide(); + }); + + $("#menuGooglePlus").click(function() { + fadeInView("divGooglePlus"); + $("#shareForm").hide(); + }); + + $("#menuImportFile").click(function() { + fadeInView("divImportFile"); + $("#shareForm").hide(); + }); + $("#menuWriteMails").click(function() { + fadeInView("divWriteMails"); + $("#shareForm").hide(); + }); + + $("#selectContact").change(function() { + var nbc = 0 ; + if($("#selectContact").val() == "all"){ + for (i = 1; i < totalMails; i++) { + $("#contact"+i).show(); + nbc++; + } + + setNbContact(nbc); + }else{ + + var date1 = new Date($("#selectContact").val()).getTime() ; + for (i = 1; i < totalMails; i++) { + var date2 = new Date($("#contact"+i+"_update").val()).getTime(); + if(date2 >= date1) + { + $("#contact"+i).show(); + nbc++; + } + else + $("#contact"+i).hide(); + } + setNbContact(nbc); + } + + }); + + + /*$('#allchecked').change(function() { + mylog.log("allchecked"); + var cases = $("#list-contact").find('[name=mailPersonInvite]'); // on cherche les checkbox qui dépendent de la liste 'list-contact' + if(this.checked) + { // si 'allchecked' est coché + cases.attr('checked', true); // on coche les cases + $('#textallchecked').html('Tout décocher'); // mise à jour du texte de cocheText + }else + { // si on décoche 'allchecked' + cases.attr('checked', false);// on coche les cases + $('#textallchecked').html('Tout cocher');// mise à jour du texte de cocheText + } + + });*/ + $(".btnCancel").off().on('click', function(){ + backToSearch(); + }); + + /*$("#buttonContactsGmail").off().on('click', function(){ + mylog.log("buttonContactsGmail"); + auth(); + + });*/ + + $(".form-writeMails #submitAfficher").off().on('click', function(){ + var listemail = $('.form-writeMails #textareaMails').val().replace(/\s/g,""); + arraymail = listemail.split(';'); + //$("#list-contact").html(""); + $("#listEmailGrid").html(""); + var text2 = "" ; + var nbContact = 0 ; + $.each(arraymail, function(keyMails, valueMails){ + + if(jQuery.inArray(valueMails, listFollows) == -1 ){ + nbContact++; + idMail = "contact"+nbContact ; + text2 += '<li id="'+idMail+'" class="item_map_list col-lg-3 col-md-4 col-sm-6 col-xs-6" data-cat="1" style="display: inline-block;">'+ + '<a href="javascript:;" onclick="checkedMail(\''+idMail+'\', \''+valueMails.trim()+'\');">'+ + '<div style="position:relative;">'+ + '<div class="portfolio-item">'+ + '<div class="detailDiv">'+ + '<span class="thumb-info item_map_list_panel"></span><br/>'+ + '<span class="text-xss" >'+ valueMails.trim() + '</span><br/>'+ + '<div class=" scopes5694ea2a94ef47ad1c8b456dperson features"></div>'+ + '<br/><div></div></div></div></div></a></li>'; + } + + }); + $("#listEmailGrid").append(text2); + totalMails = nbContact ; + setNbContact() ; + $("#divCheckMail").show(); + }); + + $(".form-importFile #fileEmail").change(function(e) { + $("#list-contact").html(""); + $("#listEmailGrid").html(""); + var ext = $(".form-importFile input#fileEmail").val().split(".").pop().toLowerCase(); + if($.inArray(ext, ["csv"]) == -1) { + alert('Upload CSV'); + return false; + } + + var nbContact = 0 ; + if (e.target.files != undefined) { + var reader = new FileReader(); + reader.onload = function(e) { + var csvval=e.target.result.split("\n"); + var text = "" ; + var text2 = "" ; + listMails = []; + $.each(csvval, function(keyMails, valueMails){ + //mylog.log("valueMails",valueMails); + if(valueMails.trim() != ""){ + if(jQuery.inArray(valueMails.trim(), listFollows) == -1 ){ + nbContact++; + //text += '<span class="list-group-item"><input name="mailPersonInvite" type="checkbox" aria-label="'+valueMails.trim()+'" value="'+valueMails.trim()+'">'+valueMails.trim()+'</span>'; + idMail = "contact"+nbContact ; + + text2 += '<li id="'+idMail+'" class="item_map_list col-lg-3 col-md-4 col-sm-6 col-xs-6" data-cat="1" style="display: inline-block;">'+ + '<a href="javascript:;" onclick="checkedMail(\''+idMail+'\', \''+valueMails.trim()+'\');">'+ + '<div style="position:relative;">'+ + '<div class="portfolio-item">'+ + '<div class="detailDiv">'+ + '<span class="thumb-info item_map_list_panel"></span><br/>'+ + '<span class="text-xss" >'+ valueMails.trim() + '</span><br/>'+ + '<div class=" scopes5694ea2a94ef47ad1c8b456dperson features"></div>'+ + '<br/><div></div></div></div></div></a></li>'; + } + } + }); + //$("#totalContact").html(nbContact); + totalMails = nbContact; + setNbContact(); + $("#listEmailGrid").append(text2); + //$("#list-contact").append(text); + }; + reader.readAsText(e.target.files.item(0)); + $("#divCheckMail").show(); + }else{ + toastr.error("Nous n'avons pas réussie à lire votre fichier.") + } + + return false; + }); + + $(".connectBtn").off().on("click", function() { + var thiselement = this; + follow("<?php echo Person::COLLECTION ?>", $('#newInvite #inviteId').val(), userId, "<?php echo Person::COLLECTION ?>", function(){ + mylog.log('callback connectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-link"); + $('.disconnectBtn').show(); + $('.connectBtn').hide(); + listFollowsId.push($("#newInvite #inviteId").val()); + //$(thiselement).html("<i class='connectBtnIcon fa fa-link'></i><?php echo Yii::t("common","Follow this person") ?>"); + //$(thiselement).attr("data-original-title", "<?php echo Yii::t("common","Unfollow this person") ?>"); + $('#inviteSearch').val(""); + backToSearch(); + //loadByHash( "#person.directory" ); + }); + }); + $(".disconnectBtn").off().on("click", function() { + var thiselement = this; + var idToDisconnect = $('#newInvite #inviteId').val(); + var typeToDisconnect = "<?php echo Person::COLLECTION ?>"; + var nameToDisconnect = $("#newInvite #ficheName").text(); + disconnectTo("<?php echo Person::COLLECTION ?>",idToDisconnect,userId,"<?php echo Person::COLLECTION ?>",'followers',function() { + mylog.log('callback disconnectPerson'); + $(thiselement).children().removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + //// Find and remove item from an array + var i = listFollowsId.indexOf(idToDisconnect); + if(i != -1) { + listFollowsId.splice(i, 1); + } + $('.disconnectBtn').hide(); + $('.connectBtn').show(); + $('#inviteSearch').val(""); + mylog.log(listFollowsId); + backToSearch(); + //loadByHash( "#person.directory" ); + }); + }); + + $('#inviteSearch').keyup(function(e){ + var search = $('#inviteSearch').val(); + if(search.length>2){ + clearTimeout(timeout); + timeout = setTimeout('autoCompleteInviteSearch("'+encodeURI(search)+'")', 500); + }else{ + $("#newInvite #dropdown_searchInvite").css({"display" : "none" }); + } + }); + + + $("#divCheckMail #submitInviter").off().on('click', function() + { + /*var mails = []; + $('input:checked[name=mailPersonInvite]').each(function() { + mails.push($(this).val()); + });*/ + if(listMails.length == 0) + toastr.error("Veuillez sélectionner une adresse mail."); + else{ + var nameUtil = "" ; + mylog.log("listMails", listMails); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: { + parentId : $("#parentId").val(), + listMails : listMails, + msgEmail : $("#textmail").val(), + gmail : true + }, + type:"POST", + }) + .done(function (data){ + $.unblockUI(); + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + mylog.log(data); + $.each(data.data, function(key, elt) { + addFloopEntity(elt.invitedUser.id, <?php echo Person::COLLECTION ?>, elt.invitedUser); + }); + + $('#inviteSearch').val(""); + //Minus 1 on number of invit + /*var count = parseInt($("#numberOfInvit").data("count")) - 1; + $("#numberOfInvit").html(count + ' invitation(s)'); + $("#numberOfInvit").data("count", count);*/ + backToSearch(); + } else { + $.unblockUI(); + toastr.error(data.msg); + } + }); + /*$.each(listMails, function(key, value) { + mylog.log("value", value) + if(value.mail != ""){ + if(typeof value.name != "undefined" && value.name != "") + nameUtil = value.name; + else + { + var name = value.mail.split("@"); + nameUtil = name[0]; + } + mylog.log("nameUtil", nameUtil); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: { + parentId : $("#parentId").val(), + invitedUserName : nameUtil, + invitedUserEmail : value.mail, + msgEmail : $("#textmail").val() + }, + type:"POST", + }) + .done(function (data){ + $.unblockUI(); + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + mylog.log(data); + addFloopEntity(formData.invitedUser._id.$id, <?php echo Person::COLLECTION ?>, data.invitedUser); + $('#inviteSearch').val(""); + //Minus 1 on number of invit + var count = parseInt($("#numberOfInvit").data("count")) - 1; + $("#numberOfInvit").html(count + ' invitation(s)'); + $("#numberOfInvit").data("count", count); + backToSearch(); + } else { + $.unblockUI(); + toastr.error(data.msg); + } + }); + } + });*/ + } + }); +}; + + + +//validate new invite form +function runinviteFormValidation(el) { + var forminvite = $('.form-invite'); + var errorHandler2 = $('.errorHandler', forminvite); + var successHandler2 = $('.successHandler', forminvite); + + forminvite.validate({ + errorElement : "span", // contain the error msg in a span tag + errorClass : 'help-block', + errorPlacement : function(error, element) {// render error placement for each input type + if (element.attr("type") == "radio" || element.attr("type") == "checkbox") {// for chosen elements, need to insert the error after the chosen container + error.insertAfter($(element).closest('.form-group').children('div').children().last()); + } else if (element.parent().hasClass("input-icon")) { + + error.insertAfter($(element).parent()); + } else { + error.insertAfter(element); + // for other inputs, just perform default behavior + } + }, + ignore : "", + rules : { + inviteName : { + minlength : 2, + required : true + }, + inviteEmail : { + required : true + } + }, + messages : { + inviteName : "* Please specify a name", + inviteSearch : "* Please specify a email" + }, + invalidHandler : function(invite, validator) {//display error alert on form submit + successHandler2.hide(); + errorHandler2.show(); + }, + highlight : function(element) { + $(element).closest('.help-block').removeClass('valid'); + // display OK icon + $(element).closest('.form-group').removeClass('has-success').addClass('has-error').find('.symbol').removeClass('ok').addClass('required'); + // add the Bootstrap error class to the control group + }, + unhighlight : function(element) {// revert the change done by hightlight + $(element).closest('.form-group').removeClass('has-error'); + // set error class to the control group + }, + success : function(label, element) { + label.addClass('help-block valid'); + // mark the current input as valid and display OK icon + $(element).closest('.form-group').removeClass('has-error').addClass('has-success').find('.symbol').removeClass('required').addClass('ok'); + }, + submitHandler : function(form) { + mylog.log("submit handler"); + successHandler2.show(); + errorHandler2.hide(); + var parentId = $(".form-invite .invite-parentId").val(); + var invitedUserName = $("#inviteName").val(); + var invitedUserEmail = $("#inviteEmail").val(); + $.blockUI({ + message : '<span class="homestead"><i class="fa fa-spin fa-circle-o-noch"></i> Merci de patienter ...</span>' + }); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+'/person/follows', + dataType : "json", + data: { + parentId : parentId, + invitedUserName : invitedUserName, + invitedUserEmail : invitedUserEmail, + msgEmail : $("#inviteText").val() + }, + type:"POST", + }) + .done(function (data) { + $.unblockUI(); + if (data && data.result) { + toastr.success('L\'invitation a été envoyée avec succès!'); + addFloopEntity(data.invitedUser.id, "<?php echo Person::COLLECTION ?>", data.invitedUser); + $('#inviteSearch').val(""); + //Minus 1 on number of invit + var count = parseInt($("#numberOfInvit").data("count")) - 1; + $("#numberOfInvit").html(count + ' invitation(s)'); + $("#numberOfInvit").data("count", count); + backToSearch(); + } else { + $.unblockUI(); + toastr.error(data.msg); + } + }); + } + }); +}; + +// init subview +function initSubView() { + $(".form-invite .invite-parentId").val("<?php echo Yii::app()->session['userId']; ?>"); + $(".form-invite .invite-id").val(""); + $(".form-invite .invite-name").val(""); + $(".form-invite .invite-search").val(""); + $("#divGmail").hide(); + $("#divGooglePlus").hide(); + $("#divCheckMail").hide(); + $("#divImportFile").hide(); + $("#divImportFile").hide(); + $("#divWriteMails").hide(); +}; + + +function autoCompleteInviteSearch(search){ + if (search.length < 3) { return } + tabObject = []; + + var data = { + "search" : search, + "searchMode" : "personOnly" + }; + + + ajaxPost("", '<?php echo Yii::app()->getRequest()->getBaseUrl(true).'/'.$this->module->id?>/search/searchmemberautocomplete', data, + function (data){ + var str = "<li class='li-dropdown-scope'><a href='#' onclick='newInvitation()'>Pas trouvé ? Lancer une invitation à rejoindre votre réseau !</li>"; + var compt = 0; + var city, postalCode = ""; + $.each(data["citoyens"], function(k, v) { + city = ""; + mylog.log(v); + postalCode = ""; + var htmlIco ="<i class='fa fa-user fa-2x'></i>" + if(v.id != userId) { + tabObject.push(v); + if(v.profilImageUrl != ""){ + var htmlIco= "<img width='50' height='50' alt='image' class='img-circle' src='"+baseUrl+v.profilImageUrl+"'/>" + } + if (v.address != null) { + city = v.address.addressLocality; + postalCode = v.address.postalCode; + } + str += "<li class='li-dropdown-scope'>" + + "<a href='#' onclick='setInviteInput("+compt+");'>"+htmlIco+" "+v.name ; + + if(typeof postalCode != "undefined") + str += "<br/>"+postalCode+" "+city; + //str += "<span class='city-search'> "+postalCode+" "+city+"</span>" ; + str += "</a></li>"; + + compt++; + } + }); + + $("#newInvite #dropdown_searchInvite").html(str); + $("#newInvite #dropdown_searchInvite").css({"display" : "inline" }); + } + ); +} + +function setInviteInput(num){ + mylog.log("setInviteInput", num); + var person = tabObject[num]; + var personId = person["id"]; + mylog.log(person, personId); + + $('#newInvite #inviteName').val(person["name"]); + $('#newInvite #inviteId').val(personId); + $("#newInvite #ficheName").text(person["name"]); + + if (person.address != null) { + //Address : CP + Locality + $("#newInvite #address").text(((typeof person.address.postalCode == "undefined")?"":person.address.postalCode+" ")+person.address.addressLocality); + } + + if (person.email != null) { + //Email + $("#newInvite #email").text(person.email); + } + //Tags + var tagsStr = ""; + if( "object" == typeof person.tags && person.tags ) { + $.each( person.tags , function(i,tag){ + tagsStr += "<span class='label label-inverse'>"+tag+"</span> "; + }); + } else { + tagsStr += "<span class='label label-inverse'>No Tag</span> "; + } + $("#newInvite #tags").html('<div class="pull-left"><i class="fa fa-tags"></i> '+tagsStr+'</div>'); + $(".photoInvited").empty(); + if (person["profilImageUrl"] != "") { + $(".photoInvited").html("<img class='img-responsive' src='"+baseUrl+person["profilImageUrl"]+"' />"); + } else { + $(".photoInvited").html("<span><i class='fa fa-user_circled' style='font-size: 10em;'></i></span>"); + } + + //Pending + if (person.pending == true) { + $(".pending").show(); + } else { + $(".pending").hide(); + } + + //Already in the network of the current user + if (listFollowsId.indexOf(personId) != -1) { + $('.disconnectBtn').show(); + $('.connectBtn').hide(); + } else { + $('.disconnectBtn').hide(); + $('.connectBtn').show(); + } + + //Show / Hide steps + $("#newInvite #step1").css({"display" : "none"}); + $("#newInvite #dropdown_searchInvite").css({"display" : "none" }); + $("#newInvite #step2").css({"display" : "block"}); +} + +function newInvitation(){ + $("#newInvite #step1").css({"display" : "none"}); + $("#newInvite #step3").css({"display" : "block"}); + + $('#newInvite #inviteId').val(""); + var emailReg = /^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/; + if(emailReg.test( $("#newInvite #inviteSearch").val() )){ + $('#newInvite #inviteEmail').val( $("#newInvite #inviteSearch").val()); + $("#newInvite #inviteName").val(""); + }else{ + $("#newInvite #inviteName").val($("#newInvite #inviteSearch").val()); + $("#newInvite #inviteEmail").val(""); + } + + $("#inviteText").val("<?php echo Yii::t("person","Hello, \\nCome and meet me on that website!\\nAn email, your town and you are connected to your city!\\nYou can see everything that happens in your city and act for the commons."); ?>"); +} + +function backToSearch(){ + $("#newInvite #step1").css({"display" : "block"}); + $("#newInvite #dropdown_searchInvite").css({"display" : "none" }); + $("#newInvite #step2").css({"display" : "none"}); + $("#newInvite #step3").css({"display" : "none"}); + autoCompleteInviteSearch($('#inviteSearch').val()); +} + + +function fadeInView(inView){ + + if(inView == "divGmail") + { + $("#divGmail").fadeIn("slow", function() {}); + $("#divInviteSomeone").hide(); + $("#divGooglePlus").hide(); + $("#divImportFile").hide(); + $("#divWriteMails").hide(); + $("#divCheckMail").hide(); + //changeFocus("titleGmail"); + auth(); + } + else if(inView == "divInviteSomeone") + { + $("#divInviteSomeone").fadeIn("slow", function() {}); + $("#divGmail").hide(); + $("#divGooglePlus").hide(); + $("#divImportFile").hide(); + $("#divWriteMails").hide(); + $("#divCheckMail").hide(); + //changeFocus("titleInviteSomeone"); + + } + else if(inView == "divGooglePlus") + { + $("#divGooglePlus").fadeIn("slow", function() {}); + $("#divInviteSomeone").hide(); + $("#divGmail").hide(); + $("#divImportFile").hide(); + $("#divWriteMails").hide(); + $("#divCheckMail").hide(); + //changeFocus("titleGooglePlus"); + } + else if(inView == "divImportFile") + { + $("#divImportFile").fadeIn("slow", function() {}); + $("#divInviteSomeone").hide(); + $("#divGmail").hide(); + $("#divGooglePlus").hide(); + $("#divWriteMails").hide(); + $("#divCheckMail").hide(); + //changeFocus("titleImportFile"); + } + else if(inView == "divWriteMails") + { + $("#divWriteMails").fadeIn("slow", function() {}); + $("#divInviteSomeone").hide(); + $("#divGmail").hide(); + $("#divGooglePlus").hide(); + $("#divImportFile").hide(); + $("#divCheckMail").hide(); + //changeFocus("titleWriteMails"); + } + +} + + + +/*function changeFocus(newFocus){ + mylog.log("changeFocus", newFocus); + var nameId = $(".titleInviteSV").attr('id'); + mylog.log("nameId", nameId); + + $( "#"+nameId ).removeClass("titleInviteSV"); + $( "#"+nameId ).removeClass("text-yellow"); + + $( "#"+newFocus ).removeClass("text-grey"); + $( "#"+newFocus ).addClass("titleInviteSV"); + $( "#"+newFocus ).addClass("text-yellow"); + + +}*/ + +function auth() { + var config = { + 'client_id': googleID, + 'scope': 'https://www.google.com/m8/feeds' + }; + gapi.auth.authorize(config, function() { + getToken(); + }); +} + +function getToken(stop) { + var token = gapi.auth.getToken(); + if(typeof token != "undefined"){ + fetch(token); + } + else { + if(stop == false) + getToken(true) ; + else + toastr.error("Veuillez réessayer plus taSrd."); + } +} + +function fetch(token){ + mylog.log("fetch", token); + rand = Math.floor((Math.random() * 8) + 1); + $.blockUI({message : '<div class="title-processing homestead"><i class="fa fa-spinner fa-spin"></i> Processing... </div>' + +'<a class="thumb-info" href="'+proverbs[rand]+'" data-title="Proverbs, Culture, Art, Thoughts" data-lightbox="all">' + + '<img src="'+proverbs[rand]+'" style="border:0px solid #666; border-radius:3px;"/></a><br/><br/>' + }); + var urlGmail = "https://www.google.com/m8/feeds/contacts/default/thin?access_token=" + token.access_token + "&alt=json&max-results=10000&showdeleted=false"; + + if($("#selectContact").val() != "all") + urlGmail += "&updated-min="+$("#selectContact").val(); + + $.ajax({ + url: urlGmail, + dataType: "jsonp", + success:function(data){ + mylog.log("dataFetch", data); + $("#list-contact").html(""); + var nbContact = 0 ; + $.each(data.feed.entry, function(key, value){ + var text = ""; + var text2 = ""; + if(value.gd$email){ + $.each(value.gd$email, function( keyMails, valueMails ){ + if(jQuery.inArray(valueMails.address, listFollows) == -1 ){ + nbContact++; + idMail = "contact"+nbContact ; + text2 += '<li id="'+idMail+'" class="item_map_list col-lg-3 col-md-4 col-sm-6 col-xs-6" data-cat="1" style="display: inline-block;">'+ + '<a href="javascript:;" onclick="checkedMail(\''+idMail+'\', \''+valueMails.address+'\', \''+value.title.$t+'\');">'+ + '<div style="position:relative;">'+ + '<div class="portfolio-item">'+ + '<div class="detailDiv">'+ + '<span class="thumb-info item_map_list_panel">'+ value.title.$t + '</span><br/>'+ + '<span class="text-xss" >'+ valueMails.address + '</span><br/>'+ + '<input type="hidden" name="'+idMail+'_update" id="'+idMail+'_update" value="'+value.updated.$t+'"/>'+ + '<div class=" scopes5694ea2a94ef47ad1c8b456dperson features"></div>'+ + '<br/><div></div></div></div></div></a></li>'; + } + }); + $("#list-contact").append(text); + $("#listEmailGrid").append(text2); + } + }); + totalMails = nbContact; + setNbContact(); + $("#divCheckMail").show(); + $.unblockUI(); + }, + error:function(data){ + mylog.log("error",data) + } + }); + bindInviteSubViewInvites(); +} + + +function validMail() { + //checklinkmailwithuser + var res = [] ; + $.ajax({ + type: "POST", + url: baseUrl+'/communecter/person/checklinkmailwithuser/', + dataType : "json", + async : false , + success:function(data){ + mylog.log("data", data) + + $.each(data.follows, function(key, val) { + if(typeof val.email != "undefined" && val.email != ""){ + res.push(val.email); + } + }); + }, + error:function(data){ + mylog.log("error",data) + } + }); + + mylog.log("mails", res); + return res ; +} + + +function checkedMail(id, mail, name) { + var contact = {} ; + contact["mail"] = mail ; + contact["name"] = name ; + + var newArray = [] ; + + var find = false ; + $.each(listMails, function(key, val) { + if(mail == val.mail){ + find = true ; + }else{ + newArray.push(val); + } + }); + + listMails = newArray ; + if(find == true){ + $( "#"+id ).removeClass("item_map_list_blue"); + $( "#"+id ).addClass("item_map_list"); + + }else{ + $( "#"+id ).removeClass("item_map_list"); + $( "#"+id ).addClass("item_map_list_blue"); + listMails.push(contact); + } + + setNbContact() + bindInviteSubViewInvites(); +}; + + +function setNbContact(total) { + if(typeof total == "undefined") + $("#nbContact").html(listMails.length + " / " + totalMails + " contacts sélectionné(s)"); + else + $("#nbContact").html(listMails.length + " / " + total + " contacts sélectionné(s)"); +} +</script> \ No newline at end of file diff --git a/views/person/settings.php b/views/person/settings.php new file mode 100644 index 0000000000000000000000000000000000000000..0c2c1e830cb1ff4a3385bc4d1e8d86af7ca90cac --- /dev/null +++ b/views/person/settings.php @@ -0,0 +1,311 @@ +<?php +$cssAnsScriptFilesTheme = array( + //SELECT2 + '/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css', + '/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js' , + +); +//if ($type == Project::COLLECTION) +// array_push($cssAnsScriptFilesTheme, "/assets/plugins/Chart.js/Chart.min.js"); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> +<style> + td{padding:5px;} + .panel-lines { + padding:10px; + + } + td, tr{ + text-align: center; + text-align: -moz-center; + text-align: -webkit-center; + } + .labelNotifications{ + + } +</style> +<!--<div class="row"> + <div class="col-md-4 col-lg-4 col-sm-4"> + + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">Actions on news (new one, comment, like, dislike)</span> + </div> + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">Comments (answer, like, dislike)</span> + </div> + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">New element (orga, project, event, poi)</span> + </div> + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">Needs published</span> + </div> + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">Discuss, survey, action (new room, new comment)</span> + </div> + <div class="panel-lines col-md-12 col-sm-12 col-xs-12"> + <span class="labelNotifications">Votes (new vote, alert before the end of votes, vote's result)</span> + </div> + </div>--> +<div class="col-md-12"> +<h1>Notifications settings</h1> +<span> Activate or desactivate notifications and mails you want to received. You have a basic settings with three level personal, your network (including admin and members link) and public (your points of communexion)</span> +</div> +<table> + <th> + <tr> + <td></td><td colspan="2">Personal notifcations</td><td colspan="2">Network notifications</td><td colspan="2">Communected notifications</td> + </tr> + <tr> + <td></td><td>Notifs</td><td>Mail</td><td>Notifs</td><td>Mail</td><td>Notifs</td><td>Mail</td> + </tr> + <tr id="news"> + <th class="labelNotifications">Actions on news (new one, comment, like, dislike)</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + </tr> + <tr id="comments"> + <th class="labelNotifications">Comments (answer, like, dislike)</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + </tr> + <tr id="elements"> + <th class="labelNotifications">New element (orga, project, event, poi)</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + </tr> + <tr id="needs"> + <th class="labelNotifications">Needs published</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + </tr> + <tr id="room"> + <th class="labelNotifications">Discuss, survey, action (new room, new comment)</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + </tr> + <tr id="survey"> + <th class="labelNotifications">Votes (new vote, alert before the end of votes, vote's result)</th> + <td> + <input class="hide input-settings" name="notification" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="personal"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1" disabled> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="network"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="notification" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + <td> + <input class="hide input-settings" name="mail" data-type="public"> + <input type="checkbox" name="my-checkbox" data-type="notification" data-size="mini" data-label-width="1" data-handle-width="1"> + </td> + </tr> + </th> +</table> +<script type="text/javascript"> +defaultNotificationsSettings={ + "notification":{ + "personal":{ + "comments":true, + "news":true + }, + "network":{ + "news":true, + "elements":true, + "needs":true, + "room":true, + "survey":true + }, + "admin":{ + "follow":true, + "invite":true, + "ask":true, + "confirm":true + }, + "city":{ + "needs":true, + "room":true, + "survey":true + } + }, + "mail":{ + "personal":{ + "comments":true, + "news":true + }, + "network":{ + "news":true, + "elements":true, + "needs":true, + "room":true, + "survey":true + }, + "admin":{ + "follow":true, + "invite":true, + "ask":true, + "confirm":true + }, + "city":{ + "needs":false, + "room":false, + "survey":false + } + } +} +notificationSettings=defaultNotificationsSettings; +jQuery(document).ready(function() { + $("[name='my-checkbox']").bootstrapSwitch(); + $("[name='my-checkbox']").on("switchChange.bootstrapSwitch", function (event, state) { + mylog.log("state = "+state ); + if (state == true) { + $(this).prev().val(1); + } else { + $(this).prev().val(0); + } + }); + initNotificationSettings(notificationSettings); +}); + +function initNotificationSettings(settings){ + $.each(settings.notification, function(key,data){ + $.each(data,function(e,v){ + if(v==true){ + $("#"+e).find("input[name='notification'][data-type='"+key+"']").val(1); + $("#"+e).find("input[name='notification'][data-type='"+key+"']").next().find("[name='my-checkbox']").bootstrapSwitch('state', true, true); + } + }); + }); + $.each(settings.mail, function(key,data){ + $.each(data,function(e,v){ + if(v==true){ + $("#"+e).find("input[name='mail'][data-type='"+key+"']").val(1); + $("#"+e).find("input[name='mail'][data-type='"+key+"']").next().find("[name='my-checkbox']").bootstrapSwitch('state', true, true); + } + }); + }); +} +function onSaveNotificationSettings(){ + +} +</script> \ No newline at end of file diff --git a/views/person/shoppingCart.php b/views/person/shoppingCart.php new file mode 100644 index 0000000000000000000000000000000000000000..56023e93f30f60c66d4558f5a36ab531462e6479 --- /dev/null +++ b/views/person/shoppingCart.php @@ -0,0 +1,170 @@ + +<style type="text/css"> + #shoppingCart .headerTitleStanalone{ + left:-25px; + right:-25px; + top:0px !important; + } + #shoppingCart .contentOnePage{ + /*min-height:700px;*/ + margin-top: 45px !important; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + } + .contentCart{ + margin-top: 40px; + background-color: white; + } + .headerCategory .mainTitle, .headerCategory .subTitleCart{ + text-transform: inherit; + } + .headerCategory .mainTitle{ + font-size: 22px !important; + font-weight: 800; + } + .headerCategory .subTitleCart{ + font-size: 14px; + font-weight: 600; + } + .btn-cart .close-modal{ + height:inherit !important; + width:25% !important; + position: inherit; + top:inherit !important; + } + .contentProduct{ + border-bottom: 2px solid rgba(0,0,0,0.1); + margin-bottom: 10px; + padding-bottom: 10px; + } + .contentProduct h4, .totalPrice{ + text-transform: inherit; + } + .contentProduct .dateHoursDetail{ + display:none; + } + .contentProduct .showDetail{ + cursor: pointer; + } + .contentProduct .showDetail > i.rotate{ + transform: rotate(180deg); + -ms-transform: rotate(180deg); + -webkit-transform: rotate(180deg); + } + .dateHeader{ + /*border-bottom: 1px solid rgba(0,0,0,0.1);*/ + padding: 15px 0px; + } + .contentHoursSession{ + border-top: 1px solid rgba(0,0,0,0.1); + } + .contentHoursSession h4{ + line-height: 21px; + font-size: 16px; + } + + #shoppingCart .description{ + max-height: 60px; + overflow: hidden; + color:grey; + } + + #openModal .container, + #openModal .modal-content{ + padding:0px!important; + } + + .modal-open-footer{ + display: none; + } + + footer{ + margin-top:50px; + } + + .associated{ + margin-top: 100px; + } + +</style> +<div id="shoppingCart"> + <div class="headerTitleStanalone"> + <div class='col-md-6 no-padding'> + <span><?php echo Yii::t("common","Shopping cart") ?></span> + </div> + </div> + <div class="col-md-10 col-md-offset-1 contentOnePage"> + <div class="contentCart shadow2 col-md-12 padding-15 text-center"> + </div> + </div> +</div> + +<script src="https://rawgit.com/Mangopay/cardregistration-js-kit/master/kit/mangopay-kit.min.js"></script> +<div id="checkoutCart" class="hide" > + + <div class="headerTitleStanalone"> + <div class='col-md-6 no-padding'> + <span><?php echo Yii::t("common","Checkout") ?></span> + </div> + </div> + + <div class="col-md-10 col-md-offset-1 contentOnePage" style="margin-top:100px"> + <div class="contentCheckout shadow2 col-xs-12 no-padding text-center"></div> + <div class="contentCB shadow2 col-xs-12 padding-15 text-left margin-top-25"></div> + <div class='col-md-12 pull-right btn-cart margin-top-20 no-padding'> + <button onclick='shopping.buyCart();' + class='btn btn-link bg-orange text-white pull-right'> + Validate + </a> + <button class='btn btn-link letter-orange pull-right text-white margin-right-5' data-toggle="modal">Continue</a> + </div> + </div> + +</div> +<?php + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $this->renderPartial('../element/terla/associated', array()); + //$this->renderPartial($layoutPath.'footer', array("subdomain"=>"page")); +?> +<script type="text/javascript"> + var totalCart=0; + var openDetails=[]; + jQuery(document).ready(function() { + //if(typeof params.name != "undefined" && params.name != "") + + initBtnLink(); + htmlCart = "", htmlCheckout = ''; + if(shopping.cart.countQuantity > 0 ){ + cartview = shopping.generateCartView(); + htmlCart = cartview.cart; + htmlCheckout = cartview.checkout; + } else { + htmlCart=shopping.generateEmptyCartView(); + htmlCheckout = ""; + } + + $(".contentCart").html(htmlCart); + $(".contentCheckout").html(htmlCheckout); + + bindCartEvent(); + }); + + function bindCartEvent(){ + $(".showDetail").off().on("click",function(){ + if($(this).find("i").hasClass("rotate")){ + i = openDetails.indexOf($(this).data("value")); + openDetails.splice(i, 1); + $(this).find("i").removeClass("rotate"); + $(this).parents().eq(1).find(".dateHoursDetail").fadeOut("slow"); + }else{ + if(openDetails.indexOf($(this).data("value")) < 0) + openDetails.push($(this).data("value")); + $(this).find("i").addClass("rotate"); + $(this).parents().eq(1).find(".dateHoursDetail").fadeIn("slow"); + } + }); + } +</script> \ No newline at end of file diff --git a/views/pod/POIList.php b/views/pod/POIList.php new file mode 100755 index 0000000000000000000000000000000000000000..dea4b358daa3001feebb21f9788fc2073b15794f --- /dev/null +++ b/views/pod/POIList.php @@ -0,0 +1,155 @@ + + <div class="panel panel-white user-list"> + <!--<div class="panel-heading border-light bg-azure"> + <h4 class="panel-title"><i class="fa fa-map-marker"></i> Points d'intérêt</h4> + </div> + <div class="panel-tools"> + <a href="javascript:;" onclick="dyFObj.openForm('poi','subPoi')" + class="btn btn-xs btn-default tooltips" data-placement="bottom" + data-original-title="<?php echo Yii::t("common","Add") ?>" > + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Add") ?> + </a> + </div>--> + <div class="panel-scroll height-230 ps-container"> + <div class="padding-10"> + + <?php + if(empty($pois)){ ?> + <div class="padding-10"> + <blockquote class="no-margin"> + <?php echo Yii::t("common","Add points of interest to {what}", array("{what}"=>Yii::t("common","this ".Element::getControlerByCollection($parentType)))); ?> + </blockquote> + </div> + <?php } + else{ + foreach ($pois as $p) { + ?> + <div style="border-bottom:1px solid #ccc" id="<?php echo "poi".(string)$p["_id"] ?>"> + <?php if(@$p["type"]){ ?> + <img style="width:40px;margin:5px" class="pull-left " src="<?php echo $this->module->assetsUrl ?>/images/thumb/default_<?php echo $p['type'] ?>.png" /> + <?php } + + echo '<span class="text-bold text-large"><a href="javascript:toggle(\'.poi'.InflectorHelper::slugify($p["name"]).'\', \'.poiPanel\')">'.$p["name"].'</a></span>'; + + if(@$p["geo"]) + {?> + <a href="javascript:showMap(true);"><i class="fa fa-map-marker"></i></a> + <?php }?> + + <a href="javascript:collection.add2fav('poi','<?php echo (string)$p["_id"] ?>')" data-id="<?php echo (string)$p["_id"] ?>" class="pull-right poiStar star_poi_<?php echo (string)$p["_id"] ?>"><i class="fa star fa-star-o"></i></a> + + <?php + $countImages = PHDB::count(Document::COLLECTION, array("type"=>"poi","id" => (string)$p['_id'] )); + if(@$countImages > 0){?> + <a href="javascript:album.show('<?php echo (string)$p["_id"] ?>','poi')" data-id="<?php echo (string)$p["_id"] ?>" class="pull-right"><i class="fa fa-photo"></i></a> + <?php }?> + + <br/> + + <?php + if( @$p["type"] ){ ?> + <span class="text-bold text-large"><?php echo Yii::t("poi", $p["type"], null, Yii::app()->controller->module->id) ?></span><br/> + <?php }?> + + + + + <div class="padding-10 poiPanel poi<?php echo InflectorHelper::slugify($p["name"])?> hide" style="padding-bottom: 30px !important;"> + + <?php + if(@$p["description"]){ ?> + <div class=""> + <?php + echo $p["description"]; + ?> + </div> + <?php }?> + + <?php + if(@$p["medias"]){ + echo '<div class="space10"></div>'; + foreach ($p["medias"] as $m) { ?> + <div class="col-xs-12"> + <div class="col-xs-4 col-md-12"> + <?php if(@$m["content"]["image"]){?> + <img src="<?php echo @$m["content"]["image"] ?>" class="img-responsive"> + <?php } ?> + </div> + <div class="col-xs-8 col-md-12"> + <a class="text-bold" href="<?php echo @$m["content"]["url"] ?>" target="_blank"><?php echo @$m["name"] ?></a><br/> + <?php echo @$m["description"] ?> + </div> + </div> + <?php } }?> + + <?php + if(@$p["tags"]){ + echo '<div class="space10"></div>'; + foreach ($p["tags"] as $t) { ?> + <a href="<?php echo $t?>" class="label label-inverse"><?php echo $t?></a> + <?php } } ?> + <div class="space5"></div> + <?php if(@$p["creator"] == Yii::app()->session["userId"] || @$p["author"] == Yii::app()->session["userId"] ){?> + <a href="javascript:;" class="btn btn-xs btn-default text-red deleteThisBtn pull-right" data-type="poi" data-id="<?php echo (string)$p["_id"] ?>" ><i class="fa fa-trash"></i></a> + <a href="javascript:;" class="btn btn-xs btn-default text-green editThisBtn pull-right" data-type="poi" data-id="<?php echo (string)$p["_id"] ?>" ><i class="fa fa-pencil-square-o"></i></a> + <div class="space1"></div> + <?php }?> + </div> + + </div> + <div class="space5"></div> + <?php + } + }?> + </div> + </div> + </div> + + <script type="text/javascript"> + + $(".poiStar").each(function(i,el){ + collection.applyColor("poi",$(el).data('id')); + }) + $(".deleteThisBtn").off().on("click",function () + { + mylog.log("deleteThisBtn click"); + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + var urlToSend = baseUrl+"/"+moduleId+"/element/delete/type/"+type+"/id/"+id; + + bootbox.confirm("confirm please !!", + function(result) + { + if (!result) { + btnClick.empty().html('<i class="fa fa-trash"></i>'); + return; + } else { + $.ajax({ + type: "POST", + url: urlToSend, + dataType : "json" + }) + .done(function (data) { + if ( data && data.result ) { + toastr.info("élément effacé"); + $("#"+type+id).remove(); + //window.location.href = ""; + } else { + toastr.error("something went wrong!! please try again."); + } + }); + } + }); + + }); + $(".editThisBtn").off().on("click",function () + { + $(this).empty().html('<i class="fa fa-spinner fa-spin"></i>'); + var btnClick = $(this); + var id = $(this).data("id"); + var type = $(this).data("type"); + dyFObj.editElement(type,id); + }); + </script> \ No newline at end of file diff --git a/views/pod/activityList.php b/views/pod/activityList.php new file mode 100755 index 0000000000000000000000000000000000000000..277ea1bed0567e726d22ba150ddb48419c49d5b5 --- /dev/null +++ b/views/pod/activityList.php @@ -0,0 +1,160 @@ +<?php +/* Author @Bouboule (CDA) +* ActivityList is a view to show each activity realized on an entity by someone +* Modification in x-editable, or creation of the entity, added an image +* Improvement: permits a versioning of each modification +*/ +$arrayLabel=array( + "name" => Yii::t("common","the name"), + "description" => Yii::t("common","the description"), + "tags" => Yii::t("common","the tags"), + "slug" => Yii::t("common","the slug"), + "type" => Yii::t("common","the type"), + "address" => Yii::t("common","the main locality"), + "addresses" => Yii::t("common","a second locality"), + "address.streetAddress" => Yii::t("common","the street"), + "address.addressCountry" => Yii::t("common","the country"), + "geo" => Yii::t("common","the position"), + "geoPosition" => Yii::t("common","the position"), + "allDay" => Yii::t("common", "the duration of the event to all day"), + "startDate" => Yii::t("common", "the start"), + "endDate" => Yii::t("common", "the end"), + "event" => Yii::t("common", "the event"), + "organization" => Yii::t("common", "the organization"), + "project" => Yii::t("common", "the project"), + "shortDescription" => Yii::t("common", "the short description"), + "telephone.fax" => Yii::t("common", "the fax"), + "telephone.mobile" => Yii::t("common", "the mobile"), + "telephone.fixe" => Yii::t("common", "the fixe"), + "email" => Yii::t("common", "the email"), + "url" => Yii::t("common", "the website"), + "licence" => Yii::t("common", "the licence"), + "properties.avancement" => Yii::t("common", "the maturity"), + "isOpenData" => Yii::t("common", "open data"), + "isOpenEdition" => Yii::t("common", "open edition"), + "state" => Yii::t("common", "state"), + "organizer" => Yii::t("common", "organizer"), + "contacts" => Yii::t("common", "un contact"), + "descriptionHTML" => Yii::t("common", "the descripton"), + "parent" => Yii::t("common", "the holder"), +); +if ($contextType == Organization::COLLECTION) + $contextTypeLabel=Yii::t("common","of the organization"); +else if ($contextType == Event::COLLECTION) + $contextTypeLabel=Yii::t("common","of the event"); +else + $contextTypeLabel=Yii::t("common","of the project"); +$countries= OpenData::getCountriesList(); +?> +<div class="col-xs-12"> + <?php + if(count($activities)==0){ ?> + <div id="infoPodOrga" class="padding-10 info-no-need"> + <blockquote> + <?php echo Yii::t("activityList","There is no activity for the moment.<br/>Edit...<br/>To improve the commons informations<br/>To give a better overview of territories' actors and activities<br/>And to liberate your knowledge"); ?> + </blockquote> + </div> + <?php } else{ + foreach($activities as $key => $value){ + if(@$value["object"]["displayName"] && $value["object"]["displayName"] != "descriptionHTML"){ + if($value["verb"]==ActStr::VERB_UPDATE) + $action = Yii::t("common", "has updated"); + else if($value["verb"]==ActStr::VERB_ADD ) + $action = Yii::t("common", "has added"); + else if($value["verb"]==ActStr::VERB_CREATE){ + $action = Yii::t("common", "has created"); + $contextTypeLabel=""; + } + else if($value["verb"]==ActStr::VERB_DELETE) + $action = Yii::t("common", "has deleted"); + + ?> + <div class='col-xs-12 padding-10' style="border-bottom: 1px solid lightgrey;"> + <?php echo "<i class='fa fa-clock-o'></i> ".date("d/m/y H:i",$value["created"]->sec)."<br/>"; + echo Yii::t("common","{who} ".$action." {what} {where}", + array("{who}"=>"<a href='#page.type.".Person::COLLECTION.".id.".$value["author"]["id"]."' class='lbh'>".$value["author"]["name"]."</a>", + "{what}"=>"<span style='font-weight:bold;'>".$arrayLabel[$value["object"]["displayName"]]."</span>", + "{where}"=>@$contextTypeLabel)); + echo ": <span style='color: #21b384;'>"; + if($value["object"]["displayName"]=="address" || $value["object"]["displayName"]=="addresses"){ + if(@$value["object"]["displayValue"]){ + if (@$value["object"]["displayValue"]["address"]){ + $address = $value["object"]["displayValue"]["address"]; + $geo = @$value["object"]["displayValue"]["geo"]; + if(!empty($address["streetAddress"])) + echo $address["streetAddress"].", " ; + if(!empty($address["postalCode"])) + echo $address["postalCode"].", " ; + echo $address["addressLocality"] ; + echo ", ".OpenData::$phCountries[$address["addressCountry"]] ; + echo " <i class='fa fa-globe fa_addressCountry'></i> ( ".@$geo["latitude"]."/".@$geo["longitude"].") "; + } + } + } + //echo $value["object"]["displayValue"]; + //echo $value["object"]["displayValue"]["postalCode"]." ".$value["object"]["displayValue"]["addressLocality"]; + else if($value["object"]["displayName"]=="address.addressCountry"){ + foreach($countries as $country){ + if($country["value"]==$value["object"]["displayValue"]) + echo $country["text"]; + } + }else if($value["object"]["displayName"]=="telephone.fax" + || $value["object"]["displayName"]=="telephone.mobile" + || $value["object"]["displayName"]=="telephone.fixe" + || $value["object"]["displayName"]=="tags"){ + if(@$value["object"]["displayValue"]){ + foreach ($value["object"]["displayValue"] as $key => $tel) { + if($key > 0) + echo ", "; + echo $tel; + } + } else + echo "champs vidés"; + } else if (@$value["object"]["displayName"] == "organizer") { + $organizer = ""; + if (@$value["object"]["displayValue"] && $value["object"]["displayValue"]["organizerType"] != "dontKnow") + $organizer = Element::getInfos(@$value["object"]["displayValue"]["organizerType"], @$value["object"]["displayValue"]["organizerId"]); + echo empty($organizer["name"]) ? "Inconnu" : @$value["object"]["displayValue"]["organizerType"]." / ".$organizer["name"]; + } else if (@$value["object"]["displayName"] == "contacts") { + if (empty($value["object"]["displayValue"]) || $value["object"]["displayValue"] == "dontKnow") { + $contacts = ""; + } else { + $contacts = $value["object"]["displayValue"]; + } + if(isset($contacts["name"])) + echo " ".Yii::t("common", "Name")." : ".$contacts["name"]; + + if(isset($contacts["role"])) + echo " ".Yii::t("common", "Role")." : ".$contacts["role"]; + if(isset($contacts["url"])) + echo " ".Yii::t("common", "Url")." : ".$contacts["url"]; + if(isset($contacts["tel"])) + echo " ".Yii::t("common", "Phone")." : ".$contacts["tel"]; + + } else if (@$value["object"]["displayName"] == "parent" && !empty($value["object"]["displayValue"])) { + $parent=Element::getSimpleByTypeAndId($value["object"]["displayValue"]["parentType"], $value["object"]["displayValue"]["parentId"],array("name"=>1)); + if(!empty($parent)) + echo "<a href='#page.type.".$value["object"]["displayValue"]["parentType"].".id.".$value["object"]["displayValue"]["parentId"]."' class='lbh letter-green'>".@$parent["name"]."</a>"; + } + else if(@$value["object"]["displayValue"] && !empty($value["object"]["displayValue"]) ) + echo Yii::t("common",$value["object"]["displayValue"]); + else if($value["object"]["displayName"] == "descriptionHTML") + echo Yii::t("common","change description in markdown format"); + else + echo Yii::t("common","deleted"); + + + echo "</span>"; + ?> + </div> + <?php + } } + + } + ?> +</div> +<script type="text/javascript"> + jQuery(document).ready(function() { + bindLBHLinks(); + }); +</script> diff --git a/views/pod/activityList2.php b/views/pod/activityList2.php new file mode 100755 index 0000000000000000000000000000000000000000..1a27eb946f559d7ef620a01a0d4ee79ebb03f0ea --- /dev/null +++ b/views/pod/activityList2.php @@ -0,0 +1,166 @@ +<?php +/* Author @oceatoon +* ActivityList2 is a pod to any updates of different kind +* Improvement: +* - make template per types +*/ + ?> +<style> + .thumb-profil-parent-dda{ + + } + .toolbar-DDA{ + position:absolute; + top:115px; + left:50px; + } + + .toolbar-DDA .dropdown{ + display: inline-block; + } + + #accordion .panel{ + margin-top:15px; + } + .panel-group .panel-heading + .panel-collapse > .panel-body { + font-size: 17px; + padding:10px; + } + +/* + #accordion .panel-title a{ + font-weight:200; + color:white; + }*/ + + #accordion .panel-title a:hover{ + font-weight:400; + } + .text-light{ + font-weight: 300; + } +} +.datepicker{z-index:12000 !important;} + +a h1.text-azure:hover{ + color:#3C5665 !important; +} +</style> + +<div class="panel-group" id="accordion"> + <?php + createAccordionMenu($list, 1, $title, "Liste Vide"); + ?> +</div> + +<!--<div id="endOfRoom"> + <a href='javascript:urlCtrl.loadByHash("#rooms.index.type.<?php echo (String) $parentType; ?>.id.<?php echo (String) $parentId; ?>")'> + <i class='fa fa-sign-in'></i> Entrer dans l'espace coopératif + </a> +</div>--> +<?php + function createAccordionMenu($elements, $index, $title, $emptyMsg){ + + $in = $index == 1 ? "in" : ""; + + echo '<div class="panel panel-default">'; + + /*echo '<div class="panel-heading bg-dark"> + <div class="panel-title"> + <a data-toggle="collapse" data-parent="#accordion" href="#collapse'.$index.'" class="show-menu-co"> + <i class="fa fa-angle-down hide-on-reduce-menu"></i> <span class="hide-on-reduce-menu">'.$title.'</span> + <span class="badge pull-right hide-on-reduce-menu">'.count($elements).'</span> + </a> + </div> + + </div>';*/ + + echo '<div id="collapse'.$index.'" class="panel-collapse collapse '.$in.'">'; + + foreach ($elements as $key => $value) { + $created = ( @$value["created"] ) ? date("d/m/y h:i",$value["created"]) : ""; + $updated = (@$value["updated"]) ? "<span class='text-extra-small fromNowDDA'>(".DateHelper::fromNow($value["updated"]).")</span>" : ""; + $col = Survey::COLLECTION; + $attr = 'survey'; + if( @$value["type"] == ActionRoom::TYPE_ACTIONS ){ + $col = ActionRoom::TYPE_ACTIONS; + $attr = 'room'; + } + $elemObj = Element::getElementSpecsByType (@$value["type"]); + + $onclick = (@$elemObj["hash"]) ? 'urlCtrl.loadByHash(\'#'.$elemObj["hash"].(string)$value["_id"].'\')' : "toastr.success('no hash available');"; + $icon = (@$elemObj["icon"]) ? $elemObj["icon"] : "question-circle"; + $pod = ($count = PHDB::count($col,array($attr =>(string)$value["_id"]))) ? "<span class='badge badge-success pull-right'>".PHDB::count($col,array($attr =>(string)$value["_id"]))."</span>" : ""; + echo '<div class="panel-body hide-on-reduce-menu">'. + '<a href="javascript:'.$onclick.'" class="text-dark">'. + '<i class="fa fa-'.$icon.'"></i> '.$value["name"]." ".$updated." ".$pod. + '</a>'. + '</div>'; + } + + if(empty($elements)) + echo '<div class="panel-body hide-on-reduce-menu"><i class="fa fa-times"></i> '.$emptyMsg.'</div>'; + + echo '</div>'; + + echo '</div>'; +} + +if(!isset($_GET["renderPartial"]) && !isset($renderPartial)){ + echo "</div>"; // ferme le id="room-container" +} +?> + +<script type="text/javascript"> +jQuery(document).ready(function() { + //setTitle("Espaces Coopératifs","connectdevelop"); + $(".main-col-search").addClass("assemblyHeadSection"); + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); +}); + +<?php if(isset($renderPartial)){ ?> +function loadRoom(type, id){ + + var mapUrl = { "all": + { "url" : "rooms/index/type/<?php echo $parentType; ?>", + "hash" : "rooms.index.type.<?php echo $parentType; ?>" + } , + "discuss": + { "url" : "comment/index/type/actionRooms", + "hash" : "comment.index.type.actionRooms" + } , + "vote": + { "url" : "survey/entries", + "hash" : "survey.entries" + } , + "entry" : + { "url" : "survey/entry", + "hash" : "survey.entry", + }, + "actions": + { "url" : "rooms/actions", + "hash" : "rooms.actions" + } , + "action": + { + "url" : "rooms/action", + "hash" : "rooms.action", + } + } + + var thiHash = "#"+mapUrl[type]["hash"]+".id."+id; + urlCtrl.loadByHash(thiHash); +} +<?php } ?> +</script> + +<style> +@media screen and (min-width: 1400px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 48%; + } +} +</style> \ No newline at end of file diff --git a/views/pod/availableCalendar.php b/views/pod/availableCalendar.php new file mode 100644 index 0000000000000000000000000000000000000000..8ada3f79a7d622c8828ff6336b65d1046ec74c62 --- /dev/null +++ b/views/pod/availableCalendar.php @@ -0,0 +1,364 @@ +<?php + $cssAnsScriptFilesTheme = array( + //Full calendar + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + '/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/locale/fr.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> + +<style> + #showCalendar { display: block; float: none; } + #calendar{width:100%; } + #lastEvent{ width:100%; padding: 0px; clear: none; } + .lastEventPadding{ width: 100%; } + .imgEvent{ width: 100%; height: 200px; } + .imgEvent img{ width: 100%; height: 100%; } + .imgEvent i{ margin-bottom: auto; margin-top: auto; } + #dropBtn{ display: none; } + #orgaDrop a, #orgaDrop ul{ width: 100%; } + .panel-transparent { background: none; } + .fc-event-inner{ padding-left: 5px; border-radius : 5px; } + .fc-event .fc-event-title::before, .event-category::before{ color: white; } + .fc-grid th{ text-align: center; color: black; } + #sectionNextEvent{ clear:none; } + .fc-popover .fc-content{ color:white; } + .fc-content{ cursor: pointer; } + .fc button{ height: 3em;} + .fc-event, #event-categories .event-category { + background: #ccc none repeat scroll 0 0 !important; + border: 1px solid #e8e9ec !important; + color: #000 !important; + } + #modal-available{ + background-color: rgba(0,0,0,0.5); + } + #modal-available .modal-dialog{ + width: 80%; + margin-left: 10%; + } + .spec-available-fc{ + background-color: #EF5B34; + width: 87%; + float: left; + margin: 10px 2% !important; + border-radius: 5px; + text-align: center; + color: white; + font-size: 15px !important; + text-transform: uppercase; + padding: 0px 5px; + } + .fc-past { + background: #d0d0d0; + } + .fc-event{ + background-color: transparent !important; + border-color: transparent !important; + color:#2C3E50 !important; + } + .fc-content{ + background-color: transparent !important; + border-color: transparent !important; + color:#2C3E50 !important; + } + .fc-content > button{ + width: 90%; + height: inherit; + } +</style> +<!-- *** SHOW CALENDAR *** --> +<div class="modal fade" id="modal-available" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content col-md-12 col-sm-12 col-xs-12" style="margin-top: 75px;"> + <div class="modal-body no-padding"> + <div class="row no-padding bg-light"> + <div id="showCalendar" class="col-md-12 col-sm-12 col-xs-12"> + <div class="row"> + <div class="panel panel-white"> + <div class="panel-body boder-light"> + <div id="calendar"></div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> +</div> +<script type="text/javascript"> + var element=<?php echo json_encode($element); ?>; + var itemType="<?php echo $type; ?>"; + var itemId=element._id.$id; + var subType=null; + if(typeof element.type !="undefined") + subType=element.type; + var templateColor = ["#93be3d", "#eb4124", "#0073b0", "#ed553b", "#df01a5", "#b45f04", "#2e2e2e"]; + var dateToShow, $eventDetail, eventClass, eventCategory; + var widgetNotes = $('#notes .e-slider'), sliderNotes = $('#readNote .e-slider'), $note; + var oTable, contributors; + var subViewElement, subViewContent, subViewIndex; + var tabOrganiser = []; + var openingHours=element.openingHours; + var monthLoad=[]; + var allBookings=[]; + var availableCal = []; + jQuery(document).ready(function() { + showCalendar(); + + $(window).on('resize', function(){ + $('#calendar').fullCalendar('destroy'); + showCalendar(); + }); + $(".fc-button").on("click", function(e){ + setCategoryColor(tabOrganiser); + }); + //if(!inArray(month,monthLoad)){ + //alert("getAjaxMonth"); + //monthLoad.push(month); + //data={"id":itemId,"type":itemType,"start":start,"end":end} + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/orderitem/get", + data:{"id":itemId,"type":itemType,"start": new Date()}, + success: function(data){ + if(data.result) { + if(Object.keys(data.items).length > 0){ + $.each(data.items,function(e,v){ + $.each(v.reservations,function(i,resa){ + allBookings.push(resa); + }); + }); + } + console.log(data.items); + } + else + toastr.error(data.msg); + }, + dataType: "json" + }); + //} + }); +//creates fullCalendar +function buildCalObj(eventObj) { + //entries for the calendar + /*var taskCal = null; + + if(eventObj.startDate && eventObj.startDate != "") { + var startDate = moment(eventObj.startDate).local(); + var endDate = null; + if(eventObj.endDate && eventObj.endDate != "" ) { + endDate = moment(eventObj.endDate).local(); + } + mylog.log("Start Date = "+startDate+" // End Date = "+endDate); + + var organiser = ""; + if("undefined" != typeof eventObj["links"] && "undefined" != typeof eventObj.links["organizer"]){ + $.each(eventObj.links["organizer"], function(k, v){ + if($.inArray(k, tabOrganiser)==-1){ + tabOrganiser.push(k); + } + organiser = k; + }) + } + + var organizerName = eventObj.name; + if(eventObj.organizer != ""){ + organizerName = eventObj.organizer +" : "+ eventObj.name; + } + + mylog.log(organiser); + taskCal = { + "title" : organizerName, + "id" : eventObj['_id']['$id'], + "content" : (eventObj.description && eventObj.description != "" ) ? eventObj.description : "", + "start" : startDate.format(), + "end" : ( endDate ) ? endDate.format() : startDate.format(), + "startDate" : eventObj.startDate, + "endDate" : eventObj.endDate, + "className": organiser, + "category": organiser + } + if(eventObj.allDay ) + taskCal.allDay = eventObj.allDay; + mylog.log(taskCal); + } + return taskCal;*/ +} + +function showCalendar() { + //mylog.info("addTasks2Calendar",events);//,taskCalendar); + hiddenDays=[]; + + //$.ajax({}); + $.each(openingHours, function(e,v){ + if(v!=""){ + if(typeof v.hours !="undefined"){ + $.each(v.hours,function(i,value){ + startTime=value.opens; + endTime=value.closes; + if(value.closes=="00:00") + value.closes="24:00"; + availableCal.push({ + //title:"My repeating event", + capacity:element.capacity, + start: value.opens, // a start time (10am in this example) + end: value.closes, + startTime:startTime, + endTime:endTime, + quantity:0, + // an end time (2pm in this example) + dow: [ e ] // Repeat monday and thursday + }); + }); + }else{ + availableCal.push({ + //title:"My repeating event", + allDay:true, + capacity:element.capacity, + quantity:0, + dow: [ e ] // Repeat monday and thursday + }); + } + } + }); + + /*if(events){ + $.each(events,function(eventId,eventObj) + { + eventCal = buildCalObj(eventObj); + if(eventCal) + calendar.push( eventCal ); + }); + }*/ + mylog.log(availableCal); + if(typeof specificDays != "undefined"){} + else + dateToShow = new Date(); + console.log(dateToShow); + //alert(dateToShow.getFullYear()); + //alert(dateToShow.getMonth()); + //alert(dateToShow.getDate()); + $('#calendar').fullCalendar({ + header : { + left : 'prev,next', + center : 'title', + right : 'today, month, agendaWeek, agendaDay' + }, + lang : mainLanguage, + year : dateToShow.getFullYear(), + month : dateToShow.getMonth(), + date : dateToShow.getDate(), + editable : false, + events : availableCal, + eventColor: '#EF5B34', + eventBackgroundColor: '#EF5B34', + textColor: '#fff', + //eventOrder:["start","end"], + hiddenDays:hiddenDays, + eventLimit: true, + timezone : 'local', + //allDaySlot : false, + defaultDate:dateToShow, + eventLimitText:"sessions", + dayRender: function(date, cell){ + if (date > dateToShow){ + $(cell).addClass('disabled'); + } + }, + //defaultView: 'month', + viewRender: function(view, element) { + console.log(view.start,view.end, view.intervalStart, view.intervalEnd); + /*month=view.start.format('MM'); + start=view.start.format('YYYY-MM-DD'); + end=view.end.format('YYYY-MM-DD'); + + alert($('#calendar').fullCalendar('getDate'));*/ + }, + eventRender: function(event, element) { + if(event.start < Date.now()) { return false; } + element.find(".fc-event-title").remove(); + element.find(".fc-event-time").remove(); + hoursRender="All day<br/>"; + if(typeof event.start !="undefined" && !event.allDay){ + hoursRender=moment(event.start).format("HH:mm") + ' - ' + + moment(event.end).format("HH:mm") + '<br/>'; + } + + + if(circuit.obj.show){ + currentInCircuit=circuit.getDayFilter(event); + hideRemove=""; + hideAdd=""; + if(currentInCircuit) + hideAdd="hide"; + else + hideRemove="hide"; + var new_description=hoursRender+'<a href="javascript:;" class="btn bg-red remove-session '+hideRemove+'"><i class="fa fa-minus"></i></a>'; + new_description+='<a href="javascript:;" class="btn btn-success add-session '+hideAdd+'"><i class="fa fa-plus"></i></a>'; + }else{ + currentCartFilter=shopping.getDayFilter(event); + if(typeof event.filtered == "undefined"){ + event.capacity=event.capacity-currentCartFilter.quantity-currentCartFilter.myQuantity; + event.filtered=true; + } + event.quantity=currentCartFilter.myQuantity; + classQuantity=""; + if(event.quantity==0) + classQuantity="hide"; + var new_description = + hoursRender + + 'Disponible: <span class="inc-capacity">' + event.capacity + '</span><br/>' + +'<a href="javascript:;" class="letter-orange remove-session hide"><i class="fa fa-minus"></i></a>' + +'<span class="eventCountItem margin-left-5 margin-right-5">' + +'<i class="fa fa-shopping-cart"></i>' + +'<span class="inc-session '+classQuantity+' topbar-badge badge animated bounceIn badge-transparent badge-success">'+event.quantity+'</span>' + +'</span>' + +'<a href="javascript:;" class="letter-orange add-session"><i class="fa fa-plus"></i></a>'; + } + element.find(".fc-content").html(new_description); + + element.find(".remove-session").on('click', function (e) { + if(circuit.obj.show){ + circuit.removeEvent(element, event); + }else{ + shopping.removeEvent(element, event); + } + + }); + element.find(".add-session").on('click', function (e) { + if(circuit.obj.show){ + circuit.addEvent(element, event); + }else{ + shopping.addEvent(element, event); + } + + }); + } + }); + + setCategoryColor(); +}; +function setCategoryColor(tab){ + $(".fc-content").css("color", "white"); + $(".fc-content").addClass("text-center"); + $(".fc-more").addClass("spec-available-fc"); + $(".fc-more").find(".fc-content").addClass("text-center"); + //$(".fc-content").css("background-color", "#EF5B34"); + //for(var i =0; i<tab.length; i++){ + // $("."+tab[i]+" .fc-content").css("color", "white"); + // $("."+tab[i]+" .fc-content").css("background-color", templateColor[i]); + //} +} + +function getRandomColor() { + var letters = '0123456789ABCDEF'.split(''); + var color = '#'; + for (var i = 0; i < 6; i++ ) { + color += letters[Math.floor(Math.random() * 16)]; + } + return color; +} +</script> \ No newline at end of file diff --git a/views/pod/calendarPod.php b/views/pod/calendarPod.php new file mode 100755 index 0000000000000000000000000000000000000000..816adde8d2e5cddd87adc4b137dbf80e6e087ef9 --- /dev/null +++ b/views/pod/calendarPod.php @@ -0,0 +1,199 @@ +<?php + + $cssAnsScriptFilesModule = array( + + //Full calendar + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + '/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/locale/fr.js' + ); + + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + +?> + +<style> +#showCalendar { display: block; float: none; } +#calendar{width:100%; } +#lastEvent{ width:100%; padding: 0px; clear: none; } +.lastEventPadding{ width: 100%; } +.imgEvent{ width: 100%; height: 200px; } +.imgEvent img{ width: 100%; height: 100%; } +.imgEvent i{ margin-bottom: auto; margin-top: auto; } +#dropBtn{ display: none; } +#orgaDrop a, #orgaDrop ul{ width: 100%; } +.panel-transparent { background: none; } +.fc-event-inner{ padding-left: 5px; border-radius : 5px; } +.fc-event .fc-event-title::before, .event-category::before{ color: white; } +.fc-grid th{ text-align: center; color: black; } +#sectionNextEvent{ clear:none; } +.fc-popover .fc-content{ color:white; } +.fc-content{ cursor: pointer; } +.fc button{ height: 3em;} +.fc-event, #event-categories .event-category { + background: #ccc none repeat scroll 0 0 !important; + border: 1px solid #e8e9ec !important; + color: #000 !important; + } +</style> + + +<!-- *** SHOW CALENDAR *** --> +<div id="showCalendar" class="col-md-12"> + <div class="row"> + + <?php + if(isset($canEdit) && $canEdit){ + + ?> + <div class="panel-tools"> + <a href="#newEvent" class="init-event btn btn-xs btn-light-blue tooltips" data-toggle="tooltip" data-placement="top" title="Add an Event" alt="<?php echo Yii::t("sliderAgenda","Add an event",null,Yii::app()->controller->module->id) ?>"><i class="fa fa-plus"></i></a> + </div> + <?php } ?> + <div class="panel panel-white"> + <div class="panel-body boder-light"> + <div id="calendar"></div> + </div> + </div> + </div> +</div> + + + +<script type="text/javascript"> + + var templateColor = ["#93be3d", "#eb4124", "#0073b0", "#ed553b", "#df01a5", "#b45f04", "#2e2e2e"]; + var events = <?php echo json_encode($events) ?>; + var dateToShow, calendar, $eventDetail, eventClass, eventCategory; + var widgetNotes = $('#notes .e-slider'), sliderNotes = $('#readNote .e-slider'), $note; + var oTable, contributors; + var subViewElement, subViewContent, subViewIndex; + var tabOrganiser = []; + + jQuery(document).ready(function() { + showCalendar(); + + $(window).on('resize', function(){ + $('#calendar').fullCalendar('destroy'); + showCalendar(); + }); + $(".fc-button").on("click", function(e){ + setCategoryColor(tabOrganiser); + }) + + }) + +//creates fullCalendar +function buildCalObj(eventObj) { + //entries for the calendar + var taskCal = null; + + if(eventObj.startDate && eventObj.startDate != "") { + var startDate = moment(eventObj.startDate).local(); + var endDate = null; + if(eventObj.endDate && eventObj.endDate != "" ) { + endDate = moment(eventObj.endDate).local(); + } + mylog.log("Start Date = "+startDate+" // End Date = "+endDate); + + var organiser = ""; + if("undefined" != typeof eventObj["links"] && "undefined" != typeof eventObj.links["organizer"]){ + $.each(eventObj.links["organizer"], function(k, v){ + if($.inArray(k, tabOrganiser)==-1){ + tabOrganiser.push(k); + } + organiser = k; + }) + } + + var organizerName = eventObj.name; + if(eventObj.organizer != ""){ + organizerName = eventObj.organizer +" : "+ eventObj.name; + } + + mylog.log(organiser); + taskCal = { + "title" : organizerName, + "id" : eventObj['_id']['$id'], + "content" : (eventObj.description && eventObj.description != "" ) ? eventObj.description : "", + "start" : startDate.format(), + "end" : ( endDate ) ? endDate.format() : startDate.format(), + "startDate" : eventObj.startDate, + "endDate" : eventObj.endDate, + "className": organiser, + "category": organiser + } + if(eventObj.allDay ) + taskCal.allDay = eventObj.allDay; + mylog.log(taskCal); + } + return taskCal; +} + +function showCalendar() { + + mylog.info("addTasks2Calendar",events);//,taskCalendar); + + calendar = []; + if(events){ + $.each(events,function(eventId,eventObj) + { + eventCal = buildCalObj(eventObj); + if(eventCal) + calendar.push( eventCal ); + }); + } + mylog.log(calendar); + dateToShow = new Date(); + $('#calendar').fullCalendar({ + header : { + left : 'prev,next', + center : 'title', + right : 'today, month, agendaWeek, agendaDay' + }, + lang : 'fr', + year : dateToShow.getFullYear(), + month : dateToShow.getMonth(), + date : dateToShow.getDate(), + editable : false, + events : calendar, + eventLimit: true, + timezone : 'local', + //allDaySlot : false, + <?php if(@$defaultDate){?> + defaultDate: '<?php echo $defaultDate?>', + <?php + } + if(@$defaultView){?> + defaultView: '<?php echo $defaultView?>', + <?php } ?> + + eventClick : function(calEvent, jsEvent, view) { + //show event in subview + dateToShow = calEvent.start; + urlCtrl.loadByHash("#event.detail.id."+calEvent._id); + } + }); + + setCategoryColor(tabOrganiser); + dateToShow = new Date(); +}; + + function setCategoryColor(tab){ + $(".fc-content").css("color", "white"); + $(".fc-content").css("background-color", "black"); + for(var i =0; i<tab.length; i++){ + $("."+tab[i]+" .fc-content").css("color", "white"); + $("."+tab[i]+" .fc-content").css("background-color", templateColor[i]); + } + } + + function getRandomColor() { + var letters = '0123456789ABCDEF'.split(''); + var color = '#'; + for (var i = 0; i < 6; i++ ) { + color += letters[Math.floor(Math.random() * 16)]; + } + return color; + } +</script> \ No newline at end of file diff --git a/views/pod/circuit.php b/views/pod/circuit.php new file mode 100644 index 0000000000000000000000000000000000000000..5219ecd974264984cb0db8dbd02384bee17fab22 --- /dev/null +++ b/views/pod/circuit.php @@ -0,0 +1,280 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( + array('/css/calendar.css',) ,Yii::app()->theme->baseUrl. '/assets'); + + HtmlHelper::registerCssAndScriptsFiles( + array('/js/default/calendar.js',), $this->module->assetsUrl); + + $cssAnsScriptFilesTheme = array( + '/plugins/fullcalendar/fullcalendar/fullcalendar.min.js', + '/plugins/fullcalendar/fullcalendar/fullcalendar.css', + '/plugins/fullcalendar/fullcalendar/locale/'.Yii::app()->language.'.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> +<style type="text/css"> + #circuit .headerTitleStanalone{ + left:-25px; + right:-25px; + top:0px !important; + } + #circuit .contentOnePage{ + /*min-height:700px;*/ + margin-top: 80px !important; + } + .contentOnePage .title > h2{ + padding: 15px 0px; + text-transform: inherit; + font-size: 20px; + } + .contentCircuit{ + margin-top: 40px; + background-color: white; + } + .headerCategory .mainTitle, .headerCategory .subTitleCart{ + text-transform: inherit; + } + .headerCategory .mainTitle{ + font-size: 22px !important; + font-weight: 800; + } + .headerCategory .subTitleCart{ + font-size: 14px; + font-weight: 600; + } + .btn-cart .close-modal{ + height:inherit !important; + width:25% !important; + position: inherit; + top:inherit !important; + } + .contentProduct{ + border-bottom: 2px solid rgba(0,0,0,0.1); + margin-bottom: 10px; + padding-bottom: 10px; + } + .contentProduct h4, .totalPrice{ + text-transform: inherit; + } + .contentProduct .dateHoursDetail{ + /*display:none;*/ + } + .contentProduct .showDetail{ + cursor: pointer; + } + .contentProduct .showDetail > i.rotate{ + transform: rotate(180deg); + -ms-transform: rotate(180deg); + -webkit-transform: rotate(180deg); + } + .dateHeader{ + /*border-bottom: 1px solid rgba(0,0,0,0.1);*/ + padding: 15px; + } + .contentHoursSession{ + border-top: 1px solid rgba(0,0,0,0.1); + } + .contentHoursSession h4{ + line-height: 21px; + font-size: 16px; + } + + #circuit .description{ + max-height: 60px; + overflow: hidden; + color:grey; + } + + #openModal .container, + #openModal .modal-content{ + padding:0px!important; + } + + .modal-open-footer{ + display: none; + } + + footer{ + margin-top:50px; + } + + .associated{ + margin-top: 100px; + } + + .fc-center h2{ + margin-top: 10px !important; + font-size: 20px !important; + color: #EF5B34; + + } + +</style> +<div id="circuit"> + <?php if(!@$viewRender){ ?> + <div class="headerTitleStanalone"> + <div class='col-md-6 no-padding'> + <span id="circuitNameHeader" name="circuitNameHeader"></span> + </div> + </div> + <div class="col-md-10 col-md-offset-1 col-sm-10 col-sm-offset-1 col-xs-12 contentOnePage"> + <?php } ?> + <div class="circuitsInfo shadow2 col-md-12 col-sm-12 col-xs-12 padding-20 text-left margin-top-50"> + <h2 id="name" class="letter-orange"></h2> + <hr> + <span id="description" class="text-dark"></span> + <hr> + <span id="capacity"><?php echo Yii::t("common","Capacity") ?> : <span class="capacityValue"></span></span> + <br/> + <span id="frequency"><?php echo Yii::t("common","Frequency") ?> : <span class="frequencyValue"></span></span> + <hr> + <h4 id="total"><?php echo Yii::t("common","Total of circuit per person") ?> : <span class="totalValue"></span> €</h4> + + <div class='col-md-12 col-sm-12 col-xs-12 btn-cart margin-top-20 margin-bottom-20 no-padding text-left'> + <?php if(!@$manage){ ?> + + <a href='#activities' class='btn btn-link letter-blue lbh padding-top-5'> + <i class='fa fa-chevron-right'></i> <?php echo Yii::t("common","Continue cart") ?> + </a> + <a href='javascript:;' onclick='circuit.backup();' + class='btn bg-orange col-md-4 col-sm-4 col-xs-12 margin-right-5 margin-bottom-5'> + <i class='fa fa-floppy-o'></i> <?php echo Yii::t("common","Backup") ?> + </a> + <a href='javascript:;' onclick='circuit.save();' + class='btn btn-success col-md-4 col-sm-4 col-xs-12 margin-right-5'> + <i class='fa fa-check'></i> <?php echo Yii::t("common","Save")?> + </a> + + <?php }else if($manage=="backup"){ ?> + <a href="javascript:;" id="goBackToThisCart" + class="btn btn-success col-md-4 col-sm-4 col-md-offset-2 col-sm-offset-2 col-xs-10 col-xs-offset-1" + data-id="<?php echo @$backup ?>"> + <i class="fa fa-ravelry"></i> <?php echo Yii::t("common","Continue this cart") ?> + </a> + <a href="javascript:;" id="deleteBackup" class="btn btn-danger col-md-4 col-sm-4 col-xs-10 col-xs-offset-1" + data-id="<?php echo @$backup ?>"> + <i class="fa fa-trash"></i> <?php echo Yii::t("common","Delete") ?> + </a> + + <?php }else if($manage=="admin"){ ?> + <a href="javascript:alert('pourtoi rapha, edit information circuits')" class="btn btn-default" + data-id="<?php echo @$backup ?>"><i class="fa fa-pencil"></i> <?php echo Yii::t("common","Edit infos") ?> + </a> + <a href="javascript:alert('go to circuit.obj to continue building cart si pas de résa')" + class="btn btn-default" data-id="<?php echo @$backup ?>"> + <i class="fa fa-ravelry"></i> <?php echo Yii::t("common","Update circuit") ?> + </a> + <a href="javascript:alert('delete this circuit if no résa');" class="btn btn-danger"> + <i class="fa fa-trash"></i> <?php echo Yii::t("common","Delete") ?> + </a> + + <?php }else if($manage=="buy"){ ?> + <hr> + <span class="text-dark"><?php echo Yii::t("common","Choose the quantity") ?></span><br/> + <div class="col-md-6 col-sm-6 col-xs-12 no-padding margin-bottom-20"> + <input type="number" name="quantity" value="1" min="1" max="<?php echo $object["capacity"] ?>" + id='bookingFor' class="form-control"/> + </div> + <div class='col-md-6 col-sm-6 col-xs-12'> + <a href='javascript:;' class='btn bg-orange convertToShoppingCart'> + <i class='fa fa-shopping-cart'></i> <?php echo Yii::t("terla","Buy this circuit") ?> + </a> + </div> + <?php } ?> + </div> + </div> + <div class="contentCircuit shadow2 col-md-12 col-sm-12 col-xs-12 no-padding text-center"> + </div> + + <div class="col-md-12 col-sm-12 col-xs-12 no-padding margin-top-50 margin-bottom-50"> + <button class="btn btn-link bg-orange" id="btn-show-calendar"> + <i class="fa fa-calendar"></i> Afficher le calendrier + </button> + </div> + + <div class="contentCalendarCircuit shadow2 col-md-12 col-sm-12 col-xs-12 no-padding text-center"> + </div> + <?php if(!@$viewRender){ ?> + </div> + <?php } ?> +</div> + +<?php + if(!@$viewRender){ + //$layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //$this->renderPartial($layoutPath.'footer', array("subdomain"=>"page")); + } +?> +<script type="text/javascript"> + var totalCircuit=0; + + <?php if(@$object){ ?> + var circuitObj=<?php echo json_encode($object) ?>; + <?php }else{ ?> + var circuitObj=circuit.obj; + <?php } ?> + + var openDetails=[]; + var eventsCircuit=[]; + + jQuery(document).ready(function() { + //if(typeof params.name != "undefined" && params.name != "") + initBtnLink(); + //circuit.obj.total=0; + $(".convertToShoppingCart").click(function(){ + bookingFor=$("#bookingFor").val(); + circuit.goToShoppingCart(circuitObj,bookingFor); + }); + + + htmlCart = ""; + if(circuitObj.countQuantity > 0 ){ + circuitView = circuit.generateCircuitView(circuitObj); + htmlCircuit = circuitView.circuit; + } else { + htmlCircuit=circuit.generateEmptyCircuitView(); + } + + circuit.initHeaderCircuit(circuitObj); + $(".contentCircuit").html(htmlCircuit); + if(notEmpty(eventsCircuit)){ + startCal=null; + //if(typeof circuit.obj.start != "undefined") + //startCal=circuit.obj.start; + calendar.showCalendar(".contentCalendarCircuit", eventsCircuit, "agendaWeek",startCal); + if(typeof circuitObj.start != "undefined"){ + $(".contentCalendarCircuit").fullCalendar("gotoDate", moment(circuitObj.start)); + } + $(window).on('resize', function(){ + $(".contentCalendarCircuit").fullCalendar('destroy'); + calendar.showCalendar(".contentCalendarCircuit", eventsCircuit, "agendaWeek",startCal); + if(typeof circuitObj.start != "undefined") + $(".contentCalendarCircuit").fullCalendar("gotoDate", moment(circuitObj.start)); + }); + } + + + $(".contentCalendarCircuit").hide(); + $("#btn-show-calendar").click(function(){ + $(".contentCalendarCircuit").toggle(); + }); +// bindCartEvent(); + }); + + function bindCartEvent(){ + /*$(".showDetail").off().on("click",function(){ + if($(this).find("i").hasClass("rotate")){ + i = openDetails.indexOf($(this).data("value")); + openDetails.splice(i, 1); + $(this).find("i").removeClass("rotate"); + $(this).parents().eq(1).find(".dateHoursDetail").fadeOut("slow"); + }else{ + if(openDetails.indexOf($(this).data("value")) < 0) + openDetails.push($(this).data("value")); + $(this).find("i").addClass("rotate"); + $(this).parents().eq(1).find(".dateHoursDetail").fadeIn("slow"); + } + });*/ + } +</script> \ No newline at end of file diff --git a/views/pod/collections.php b/views/pod/collections.php new file mode 100755 index 0000000000000000000000000000000000000000..8e212ee371f4815e18b62ad685cff51d9f7d1b3a --- /dev/null +++ b/views/pod/collections.php @@ -0,0 +1,32 @@ + + <div class="panel panel-white user-list"> + <div class="panel-heading border-light bg-light"> + <h4 class="panel-title"><i class="fa fa-map-marker"></i> Collection</h4> + </div> + <div class="panel-tools"> + <a href="javascript:collection.crud();" onclick="collection.new(contextData.type,contextData.id)" + class="btn btn-xs btn-default tooltips" data-placement="bottom" + data-original-title="<?php echo Yii::t("common","Add") ?>" > + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Add") ?> + </a> + </div> + <div class="panel-scroll height-230 ps-container"> + <div class=""> + + <?php + if(empty($collections)){ ?> + <div class="padding-10"> + <blockquote class="no-margin"> + <?php echo Yii::t("common","Ajouter des collections"); ?> + </blockquote> + </div> + <?php } + else{ + foreach ($collections as $nom => $list) { ?> + <div style="border-bottom:1px solid #ccc"> + <a class="btn-open-collection" href="javascript:smallMenu.openAjax(baseUrl+'/'+moduleId+'/collections/list/col/<?php echo $nom?>','<?php echo $nom?>','fa-folder-open','yellow')"><i class="fa fa-folder-open text-yellow"></i> <?php echo $nom?> </a> + </div> + <?php }} ?> + </div> + </div> + </div> diff --git a/views/pod/confidentiality.php b/views/pod/confidentiality.php new file mode 100644 index 0000000000000000000000000000000000000000..eb3a7893764687940d4054d25c1f4e5d3d3d63c4 --- /dev/null +++ b/views/pod/confidentiality.php @@ -0,0 +1,168 @@ +<div class="modal fade" role="dialog" id="modal-confidentiality"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <?php if($type==Person::COLLECTION) + $titleParams=Yii::t("common","Confidentiality of your personal informations"); + else + $titleParams=Yii::t("common","Settings {what}", array("{what}"=>Yii::t("common","of the ".Element::getControlerByCollection($type)))); + ?> + <h4 class="modal-title"><i class="fa fa-cog"></i> <?php echo $titleParams ?></h4> + </div> + <div class="modal-body"> + <div class="row"> + <div class="pull-left text-left padding-10" style="border: 1px solid rgba(128, 128, 128, 0.3); margin-left: 10px; margin-bottom: 20px;"> + <?php if ($type==Person::COLLECTION){ ?> + <strong><i class="fa fa-group"></i> <?php echo Yii::t("common","Public"); ?></strong> : <?php echo Yii::t("common","Visible for everyone."); ?><br/> + <strong><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private"); ?></strong> : <?php echo Yii::t("common","Visible for my contacts."); ?><br/> + <strong><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></strong> : <?php echo Yii::t("common","Not visible."); ?><br/> + <?php } ?> + <strong><i class="fa fa-group"></i> <?php echo Yii::t("common","Open Data"); ?></strong> : <?php echo Yii::t("common","You propose your data in free access, to contribut for commons."); ?><br/> + <?php if ($type!=Person::COLLECTION){ ?> + <strong><i class="fa fa-group"></i> <?php echo Yii::t("common","Open Edition") ;?></strong> : <?php echo Yii::t("common","All users can participed / modified the informations."); ?><br/> + <?php } ?> + </div> + </div> + <div class="row text-dark panel-btn-confidentiality"> + <?php if ($type==Person::COLLECTION){ ?> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("person","Birth date"); ?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-birthDate inline-block"> + <button class="btn btn-default confidentialitySettings" type="birthDate" value="public"><i class="fa fa-group"></i> <?php echo Yii::t("common","Public"); ?></button> + <button class="btn btn-default confidentialitySettings" type="birthDate" value="private"><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private"); ?></button> + <button class="btn btn-default confidentialitySettings" type="birthDate" value="hide"><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></button> + </div> + </div> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","My mail"); ?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-email inline-block"> + <button class="btn btn-default confidentialitySettings" type="email" value="public"><i class="fa fa-group"></i> <?php echo Yii::t("common","Public"); ?></button> + <button class="btn btn-default confidentialitySettings" type="email" value="private"><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private"); ?></button> + <button class="btn btn-default confidentialitySettings" type="email" value="hide"><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></button> + </div> + </div> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Locality") ;?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-locality inline-block"> + <button class="btn btn-default confidentialitySettings" type="locality" value="public" selected><i class="fa fa-group"></i> <?php echo Yii::t("common","Public") ;?></button> + <button class="btn btn-default confidentialitySettings" type="locality" value="private"><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private"); ?></button> + <button class="btn btn-default confidentialitySettings" type="locality" value="hide"><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></button> + </div> + </div> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","My phone"); ?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-phone inline-block"> + <button class="btn btn-default confidentialitySettings" type="phone" value="public"><i class="fa fa-group"></i> <?php echo Yii::t("common","Public") ;?></button> + <button class="btn btn-default confidentialitySettings" type="phone" value="private"><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private") ;?></button> + <button class="btn btn-default confidentialitySettings" type="phone" value="hide"><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></button> + </div> + </div> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","My directory"); ?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-directory inline-block"> + <button class="btn btn-default confidentialitySettings" type="directory" value="public"><i class="fa fa-group"></i> <?php echo Yii::t("common","Public") ;?></button> + <button class="btn btn-default confidentialitySettings" type="directory" value="private"><i class="fa fa-user-secret"></i> <?php echo Yii::t("common","Private") ;?></button> + <button class="btn btn-default confidentialitySettings" type="directory" value="hide"><i class="fa fa-ban"></i> <?php echo Yii::t("common","Mask"); ?></button> + </div> + </div> + <?php } ?> + + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Open Data") ;?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-isOpenData inline-block"> + <button class="btn btn-default confidentialitySettings" type="isOpenData" value="true"> + <i class="fa fa-group"></i> <?php echo Yii::t("common","Yes"); ?> + </button> + <button class="btn btn-default confidentialitySettings" type="isOpenData" value="false"> + <i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?> + </button> + <?php + $url = Yii::app()->baseUrl.'/api/'; + if($type == Person::COLLECTION) + $url .= Person::CONTROLLER; + else if($type == Organization::COLLECTION) + $url .= Organization::CONTROLLER; + else if($type == Event::COLLECTION) + $url .= Event::CONTROLLER; + else if($type == Project::COLLECTION) + $url .= Project::CONTROLLER; + ?> + <a href="<?php echo $url.'/get/id/'.$element['_id'] ;?>" data-toggle="tooltip" title='Visualiser la données' id="urlOpenData" class="urlOpenData" target="_blank"><i class="fa fa-eye"></i></a> + </div> + </div> + <?php if($type != Person::COLLECTION){ ?> + <div class="col-sm-4 text-right padding-10 margin-top-10"> + <i class="fa fa-message"></i> <strong><?php echo Yii::t("common","Open Edition") ;?> :</strong> + </div> + <div class="col-sm-8 text-left padding-10"> + <div class="btn-group btn-group-isOpenEdition inline-block"> + <button class="btn btn-default confidentialitySettings" type="isOpenEdition" value="true"> + <i class="fa fa-group"></i> <?php echo Yii::t("common","Yes"); ?></button> + <button class="btn btn-default confidentialitySettings" type="isOpenEdition" value="false"> + <i class="fa fa-user-secret"></i> <?php echo Yii::t("common","No"); ?></button> + </div> + </div> + <?php } ?> + </div> + </div> + + <div class="modal-footer"> + <button type="button" class="lbh btn btn-success btn-confidentialitySettings" data-dismiss="modal" aria-label="Close" data-hash="#page.type.<?php echo $type ?>.id.<?php echo $element['_id'] ;?>">OK</button> + </div> + </div> + </div> +</div> + +<script type="text/javascript"> +var seePreferences = '<?php echo (@$element["seePreferences"] == true) ? "true" : "false"; ?>'; + +jQuery(document).ready(function() { + bindButtonConfidentiality(); +}); + + +function bindButtonConfidentiality(){ + + <?php + //Params Checked + $typePreferences = array("privateFields", "publicFields"); + $nameFields = array("email", "locality", "phone", "directory", "birthDate"); + foreach ($nameFields as $key => $value) { + $fieldPreferences[$value] = true; + } + $typePreferencesBool = array("isOpenData", "isOpenEdition"); + //To checked private or public + foreach($typePreferences as $typePref){ + foreach ($fieldPreferences as $field => $hidden) { + if(isset($element["preferences"][$typePref]) && in_array($field, $element["preferences"][$typePref])){ + echo "$('.btn-group-$field > button[value=\'".str_replace("Fields", "", $typePref)."\']').addClass('active');"; + $fieldPreferences[$field] = false; + } + } + } + //To checked if there are hidden + foreach ($fieldPreferences as $field => $hidden) { + if($hidden) echo "$('.btn-group-$field > button[value=\'hide\']').addClass('active');"; + } + foreach ($typePreferencesBool as $field => $typePrefB) { + if(isset($element["preferences"][$typePrefB]) && $element["preferences"][$typePrefB] == true) + echo "$('.btn-group-$typePrefB > button[value=\'true\']').addClass('active');"; + else + echo "$('.btn-group-$typePrefB > button[value=\'false\']').addClass('active');"; + } + ?> +} +</script> \ No newline at end of file diff --git a/views/pod/contactsList.php b/views/pod/contactsList.php new file mode 100755 index 0000000000000000000000000000000000000000..38267c933965ae07f025270afd323b45ee420a44 --- /dev/null +++ b/views/pod/contactsList.php @@ -0,0 +1,170 @@ +<?php + +$cssAnsScriptFilesTheme = array( + +'/plugins/perfect-scrollbar/src/perfect-scrollbar.css' +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme,Yii::app()->request->baseUrl); +?> +<div class="panel panel-white"> + <div class="panel-heading border-light bg-blue"> + <h4 class="panel-title"><i class="fa fa-user-circle"></i> <?php echo Yii::t("common","Contact",null,Yii::app()->controller->module->id); ?></h4> + </div> + <div class="panel-tools"> + <?php if(( @$authorised || @$openEdition) && !isset($noAddLink) && isset(Yii::app()->session["userId"]) ) { ?> + <a class="tooltips btn btn-xs btn-light-blue " data-placement="top" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Add",null,Yii::app()->controller->module->id) ?>" href="javascript:;" onclick="dyFObj.openForm ( 'contactPoint','sub')"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Add") ?> + </a> + <?php } ?> + </div> + + <div class="panel-body no-padding"> + <div class="panel-scroll height-230 ps-container"> + <?php + if(isset($contacts) && count($contacts)>0 ) { ?> + <table class="table table-striped table-hover" id="contacts"> + <tbody> + <?php + foreach ($contacts as $keyContact => $contact) { + ?> + <tr class="" style="" id="<?php echo $keyContact;?>"> + <td class="center hidden-sm hidden-xs" style="padding-left: 18px; "> + <?php + + if(!empty($contact["id"])){ + $url = '#person.detail.id.'.$contact["id"]; + $id = $contact["id"]; + $o = Element::getInfos(Person::COLLECTION, $id); + + $icon='<img height="35" width="35" class="tooltips" data-placement="right" src="'.$this->module->assetsUrl.'/images/news/profile_default_l.png" data-placement="right" data-original-title="'.$o['name'].'">'; + $refIcon="fa-user"; + $redirect="person"; + + ?> + <a href="#<?php echo $redirect; ?>.detail.id.<?php echo (string)$o['id'];?>" class="lbh" title="<?php echo $o['name'] ?>" class="btn no-padding "> + + <?php if(@$o["profilThumbImageUrl"]) { ?> + <img width="50" height="50" alt="image" class="tooltips" data-placement='right' src="<?php echo Yii::app()->createUrl('/'.$o['profilThumbImageUrl']) ?>" data-original-title="<?php echo $o['name'] ?>"> + <?php }else{ + echo $icon; + } ?> + </a> + <?php } + else + { ?> + <span class="lbh text-dark"> + <?php + $icon='<img height="35" width="35" class="tooltips" data-placement="right" src="'.$this->module->assetsUrl.'/images/news/profile_default_l.png" data-placement="right">'; + echo $icon; + ?> + + </span> + <?php } ?> + </td> + <td> + <?php if(!empty($contact["id"])){ ?> + <a href="<?php echo $url?>" class="lbh text-dark"> + <?php }else{ ?> + <span class="lbh text-dark"> + <?php } ?> + <?php + if(!empty($contact["name"])) echo $contact["name"]; + if(!empty($contact["role"])){ + ?> + <br/><span class="text-extra-small"><?php echo @$contact["role"];?></span> + <?php } + if(!empty($contact["email"])){ ?> + <br/><span class="text-extra-small"><?php echo @$contact["email"];?></span> + <?php } + if(!empty($contact["telephone"])){ ?> + <br/><span class="text-extra-small"> + <?php + foreach ($contact["telephone"] as $keyTel => $tel) { + if($keyTel > 0) echo " / "; + echo $tel; + } ?> + </span> + <?php } + if(!empty($contact["id"])){ ?> + </a> + <?php }else{ ?> + </span> + <?php } ?> + + </td> + <td> + <?php $json = json_encode($contact); ?> + <a class="tooltips btn btn-xs btn-light-blue " data-placement="bottom" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Update",null,Yii::app()->controller->module->id) ?>" href="javascript:;" onclick='updateContact("<?php echo $keyContact; ?>");'> + <i class="fa fa-pencil"></i> + </a> + <a class="tooltips btn btn-xs btn-light-blue " data-placement="bottom" data-toggle="tooltip" data-original-title="<?php echo Yii::t("common","Remove",null,Yii::app()->controller->module->id) ?>" href="javascript:;" onclick='removeContact("<?php echo $keyContact; ?>")'> + <i class="fa fa-trash"></i> + </a> + + </td> + </tr> + <?php + } + } + if(isset($contacts) && count($contacts)>0 ) { ?> + </tbody> + </table> + <?php } ?> + </div> + </div> +</div> + +<script type="text/javascript"> + var contacts = <?php echo json_encode($contacts);?>; + jQuery(document).ready(function() { + + }); + + function updateContact(ind) { + contact = contacts[ind] ; + dataUpdate = { index : ind } ; + + if(typeof contact.name !="undefined") + dataUpdate.name = contact.name; + if(typeof contact.email !="undefined") + dataUpdate.email = contact.email; + if(typeof contact.role !="undefined") + dataUpdate.role = contact.role; + if(typeof contact.telephone !="undefined"){ + var string = ""; + + $.each(contact.telephone, function (i,num) { + if(i > 0) + string += ", "; + string += num; + }); + dataUpdate.phone = string; + } + + console.dir(dataUpdate); + dyFObj.openForm ('contactPoint','contact', dataUpdate); + } + + function removeContact(ind) { + param = new Object; + param.name = "contacts"; + param.value = {index : ind}; + param.pk = contextData.id; + param.type = contextData.type; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextType, + data: param, + dataType: "json", + success: function(data){ + mylog.log("data", data); + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash("#"+contextData.controller+".detail.id."+contextData.id); + } + } + }); + } + +</script> \ No newline at end of file diff --git a/views/pod/eventsList.php b/views/pod/eventsList.php new file mode 100755 index 0000000000000000000000000000000000000000..445f8e5bd9390bb9a9138466b4479883b39b6bd9 --- /dev/null +++ b/views/pod/eventsList.php @@ -0,0 +1,182 @@ +<?php + +$cssAnsScriptFilesTheme = array( + +'/plugins/perfect-scrollbar/src/perfect-scrollbar.css' +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme,Yii::app()->request->baseUrl); +?> +<div class="panel panel-white"> + <div class="panel-heading border-light bg-orange"> + <h4 class="panel-title"><i class="fa fa-calendar"></i> <?php echo Yii::t("event","Events",null,Yii::app()->controller->module->id); ?></h4> + </div> + <div class="panel-tools"> + <?php if(( @$authorised || @$openEdition) && !isset($noAddLink) && isset(Yii::app()->session["userId"]) ) { ?> + <a class="tooltips btn btn-xs btn-light-blue " data-placement="top" data-toggle="tooltip" data-original-title="<?php echo Yii::t("event","Add new event",null,Yii::app()->controller->module->id) ?>" href="javascript:;" onclick="dyFObj.openForm ( 'event','sub' )"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Add") ?> + </a> + <a id="showHideOldEvent" class="tooltips btn btn-xs btn-light-blue" href="javascript:;" data-placement="top" data-toggle="tooltip" data-original-title="<?php echo Yii::t("event","Display/Hide old events",null,Yii::app()->controller->module->id) ?>" onclick="toogleOldEvent()"> + <i class="fa fa-history"></i> <?php echo Yii::t("event","Old events",null,Yii::app()->controller->module->id) ?> + </a> + <?php } ?> + </div> + + <div class="panel-body no-padding"> + <div class="panel-scroll height-230 ps-container" style="overflow-y: scroll;"> + <?php + + $nbOldEvents = 0; + $nbEventVisible = 0; + if(isset($events) && count($events)>0 ) { ?> + <table class="table table-striped table-hover" id="events"> + <tbody> + <?php + foreach ($events as $e) { + + /*if (empty($e["endDate"]) || (!empty($e["endDate"]) && isset($e["endDate"]->sec) && $e["endDate"]->sec > time())) {*/ + if (empty($e["endDate"]) || (!empty($e["endDate"]) && isset($e["endDateSec"]) && $e["endDateSec"] > time())) { + $eventStyle = ""; + $eventClass = ""; + $nbEventVisible++; + } else { + $eventStyle = "display:none;"; + $eventClass = "oldEvent"; + $nbOldEvents++; + } + + ?> + <tr class="<?php echo $eventClass ?>" style="<?php echo $eventStyle ?>" id="<?php echo Event::COLLECTION.(string)$e["_id"];?>"> + <td class="center hidden-sm hidden-xs" style="padding-left: 18px; "> + <?php + + //$url = '#element.detail.type.'.Event::COLLECTION.'.id.'.$e["_id"]; + + $url = '#event.detail.id.'.$e["_id"]; + + if(@$organiserImgs && @$e["links"]["organizer"]){ + + $id = array_keys($e["links"]["organizer"])[0]; + $o = Element::getInfos( @$e["links"]["organizer"][$id]['type'], $id); + if ( $o["type"]==Person::COLLECTION ){ + $icon='<img height="35" width="35" class="tooltips" data-placement="right" src="'.$this->module->assetsUrl.'/images/news/profile_default_l.png" data-placement="right" data-original-title="'.$o['name'].'">'; + $refIcon="fa-user"; + $redirect="person"; + } + else{ + $icon="<div class='thumbnail-profil'><i class='fa fa-2x fa-group tooltips ' data-placement='right' data-original-title='".$o['name']."'></i></div>"; + $redirect="organization"; + $refIcon="fa-group"; + } + ?> + <a href="#<?php echo $redirect; ?>.detail.id.<?php echo (string)$o['id'];?>" class="lbh" title="<?php echo $o['name'] ?>" class="btn no-padding "> + + <?php if(@$o["profilThumbImageUrl"]) { + // Utiliser profilThumbImageUrl && createUrl(/.$profilThumbUrl.) + ?> + <img width="50" height="50" alt="image" class="tooltips" data-placement='right' src="<?php echo Yii::app()->createUrl('/'.$o['profilThumbImageUrl']) ?>" data-placement="top" data-original-title="<?php echo $o['name'] ?>"> + <?php }else{ + echo $icon; + } ?> + </a> + <?php } + else + { ?> + <a href="<?php echo $url?>" class="lbh text-dark"> + <?php if (@$o["profilThumbImageUrl"]){ ?> + <img width="50" height="50" alt="image" class="img-circle" src="<?php echo Yii::app()->createUrl('/'.$o["profilThumbImageUrl"]) ?>"> + <?php } else { ?> + <i class="fa fa-calendar fa-2x text-orange"></i> + <?php } ?> + </a> + <?php } ?> + </td> + <td> + <a href="<?php echo $url?>" class="lbh text-dark"> + <?php + if(@$e["name"]) echo $e["name"]; + if(@$e["links"]["subEvents"]) echo "(".count($e["links"]["subEvents"]).")"; + $startDate = (@$e["startDate"]) ? date(DateTime::ISO8601,(isset($e["startDate"]->sec)) ? $e["startDate"]->sec : strtotime($e["startDate"]) ) : ""; + $endDate = (@$e["endDate"]) ? date(DateTime::ISO8601,(isset($e["endDate"]->sec)) ? $e["endDate"]->sec : strtotime($e["endDate"]) ) : ""; + $allDay = (@$e["allDay"]) ? "true" : "false"; + $dates = $startDate."<br/>".$endDate; + ?> + <br/><span class="text-extra-small date2format" data-startDate="<?php echo $startDate;?>" data-endDate="<?php echo $endDate;?>" data-allDay="<?php echo $allDay;?>"></span> + </a> + </td> + <td><?php if(isset($e["type"])) echo Yii::t("event",$e["type"],null,Yii::app()->controller->module->id);?></td> + <?php /*?> + <td class="center"> + <div class="visible-lg"> + <?php if(isset(Yii::app()->session["userId"]) && Authorisation::isEventAdmin((string)$e["_id"], Yii::app()->session["userId"])) { ?> + <a href="javascript:;" class="disconnectBtn btn btn-xs btn-grey tooltips hidden-sm hidden-xs" data-type="<?php echo PHType::TYPE_EVENTS ?>" data-id="<?php echo (string)$e["_id"];?>" data-name="<?php echo (string)$e["name"];?>" data-placement="left" data-original-title="<?php echo Yii::t("event","Unlink event",null,Yii::app()->controller->module->id) ?>" ><i class=" disconnectBtnIcon fa fa-unlink"></i></a> + <?php }; ?> + </div> + </td> + */?> + </tr> + <?php + } + } + if(isset($events) && count($events)>0 ) { ?> + </tbody> + </table> + <?php } ?> + <?php if( $nbEventVisible == 0 && $nbOldEvents== 0) { ?> + <div id="infoEventPod" class="padding-10" > + <blockquote> + <?php + if($contextType==Event::CONTROLLER) + $explain="Create sub-events to show the event's program.<br/>And Organize the event's sequence"; + else + $explain="Publiez les événements que vous organisez"; + echo Yii::t("event",$explain); + ?> + </blockquote> + </div> + <?php } ?> + <?php if(isset($events) && count($events) > 0 && count($events)==$nbOldEvents ) {?> + <div id="infoLastButNotNew" class="padding-10"> + <blockquote> + <?php echo Yii::t("event","Create your next events <br>To show your next meet-up<br>And where people can go",null,Yii::app()->controller->module->id) ?> + </blockquote> + </div> + <?php } ?> + + </div> + </div> +</div> + +<script type="text/javascript"> + var nbOldEvents = <?php echo (String) @$nbOldEvents;?>; + jQuery(document).ready(function() { + if (nbOldEvents == 0) $("#showHideOldEvent").hide(); + manageTimestampOnDate(); + + var itemId = '<?php echo @$contextId;?>'; + $('.init-event').off().on("click", function(){ + $("#ajaxSV").html("<div class='cblock'><div class='centered'><i class='fa fa-cog fa-spin fa-2x icon-big text-center'></i> Loading</div></div>"); + $.subview({ + content : "#ajaxSV", + onShow : function() { + var url = ""; + url = baseUrl+"/"+moduleId+"/event/eventsv/id/"+itemId+"/type/<?php echo @$contextType ?>"; + getAjax("#ajaxSV", url, function(){bindEventSubViewEvents(); $(".new-event").trigger("click");}, "html"); + }, + onSave : function() { + $('.form-event').submit(); + }, + onHide : function() { + //$.hideSubview(); + } + }); + + }) + }) + + function toogleOldEvent() { + $(".oldEvent").toggle("slow"); + $("#infoLastButNotNew").toggle("slow"); + } + +</script> \ No newline at end of file diff --git a/views/pod/ficheInfoElementCO2.php b/views/pod/ficheInfoElementCO2.php new file mode 100755 index 0000000000000000000000000000000000000000..f94039e593007e96ddf0914c6aa6263a8d8ed762 --- /dev/null +++ b/views/pod/ficheInfoElementCO2.php @@ -0,0 +1,1107 @@ +<?php + $cssAnsScriptFilesTheme = array( + //X-editable + //'/plugins/x-editable/css/bootstrap-editable.css', + //'/plugins/x-editable/js/bootstrap-editable.js' , + + //DatePicker + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js' , + '/plugins/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js' , + '/plugins/bootstrap-datepicker/css/datepicker.css', + + //DateTime Picker + '/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js' , + '/plugins/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.fr.js' , + '/plugins/bootstrap-datetimepicker/css/datetimepicker.css', + //Wysihtml5 + '/plugins/wysihtml5/bootstrap3-wysihtml5/bootstrap3-wysihtml5.css', + '/plugins/wysihtml5/bootstrap3-wysihtml5/bootstrap3-wysihtml5-editor.css', + '/plugins/wysihtml5/bootstrap3-wysihtml5/wysihtml5x-toolbar.min.js', + '/plugins/wysihtml5/bootstrap3-wysihtml5/bootstrap3-wysihtml5.min.js', + '/plugins/wysihtml5/wysihtml5.js', + + //SELECT2 + '/plugins/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css', + '/plugins/bootstrap-switch/dist/js/bootstrap-switch.min.js' , + + // SHOWDOWN + '/plugins/showdown/showdown.min.js', + //MARKDOWN + '/plugins/to-markdown/to-markdown.js', + + ); + //if ($type == Project::COLLECTION) + // array_push($cssAnsScriptFilesTheme, "/assets/plugins/Chart.js/Chart.min.js"); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + $cssAnsScriptFilesModule = array( + //Data helper + '/js/dataHelpers.js', + '/js/postalCode.js', + '/js/activityHistory.js', + '/js/news/index.js', + '/js/default/editInPlace.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $imgDefault = $this->module->assetsUrl.'/images/thumbnail-default.jpg'; + $thumbAuthor = @$element['profilThumbImageUrl'] ? + Yii::app()->createUrl('/'.@$element['profilThumbImageUrl']) + : ""; +?> +<style> + .img-thumb{ + height: 50px; + width: 50px; + } + + .podInside .panel-heading, + .podInside .panel-tools{ + display:none; + } + .podInside .panel, + .podInside .table{ + margin-bottom: 0px; + border: 0px; + } + + .podInside.collections a{ + font-size: 15px; + font-weight: 700; + padding:10px; + display: inline-block; + } + + .podchart .panel-heading{ + background-color: white !important; + } + + .favElBtn{ + /*color: #FC4D4D !important;*/ + /*padding: 6px; + margin-bottom: 4px;*/ + } + + .editBtn{ + float: right; + } + +</style> +<div id="menu-name" class="hidden"> + <img src="<?php echo $thumbAuthor; ?>" height="45" class="img-circle"> + <span class="font-montserrat hidden-sm hidden-xs"><?php echo @$element["name"]; ?></span> +</div> + +<ul id="accordion" class="accordion shadow2"> + <li> + <div class="iamgurdeep-pic"> + <?php if(@$element["profilMediumImageUrl"] && !empty($element["profilMediumImageUrl"])) + $images=$element["profilMediumImageUrl"]; + else + $images=""; + $this->renderPartial('../pod/fileupload', array( "itemId" => (string) $element["_id"], + "type" => $type, + "resize" => false, + "contentId" => Document::IMG_PROFIL, + "show" => true, + "editMode" => $edit, + "image" => $images, + "openEdition" => $openEdition) ); + ?> + <!--<img class="img-responsive" alt="" + src="<?php echo @$element['profilMediumImageUrl'] ? + Yii::app()->createUrl('/'.@$element['profilMediumImageUrl']) : $imgDefault; ?>">--> + <div class="edit-pic"> + <a href="https://web.facebook.com/" target="_blank" class="fa fa-facebook"></a> + <a href="https://www.instagram.com/gurdeeposahan/" target="_blank" class="fa fa-instagram"></a> + <a href="https://twitter.com/gurdeeposahan1" target="_blank" class="fa fa-twitter"></a> + <a href="https://plus.google.com/u/0/105032594920038016998" target="_blank" class="fa fa-google"></a> + </div> + <?php if(@Yii::app()->session["userId"]){ ?> + <div class="blockUsername"> + <!--<h2 class="text-left"> + <?php //echo @$element["name"]; ?><!-- <br> + <small> + <?php if(@$element["address"] && @$element["address"]["addressLocality"]) { + echo "<i class='fa fa-university'></i> ".$element["address"]["addressLocality"]; + if(@$element["address"]["postalCode"]) echo ", "; + } + if(@$element["address"] && @$element["address"]["postalCode"]) + echo $element["address"]["postalCode"]; + ?> + </small> + </h2>--> + <?php $this->renderPartial('../element/linksMenu', + array("linksBtn"=>$linksBtn, + "elementId"=>(string)$element["_id"], + "elementType"=>$type, + "elementName"=> $element["name"]) + ); + ?> + <!-- <p><i class="fa fa-briefcase"></i> Web Design and Development.</p> --> + </div> + <?php } ?> + + </div> + + </li> + <li> + <div class="link"> + <i class="fa fa-globe"></i><?php echo Yii::t("common","About"); ?><i class="fa fa-chevron-down"></i> + <?php if($edit==true || $openEdition==true ){?> + <a href="javascript:;" class="tooltips btn-update-info" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Contact information");?>"><i class="fa text-red fa-pencil"></i></a> + <?php } ?> + </div> + <ul class="submenu"> + <!-- + <?php //if(@$edit==true){ ?> + <li class="tooltips " data-edit-id="name"> + <i class="fa fa-user-circle-o"></i> <?php //echo Yii::t("common","Name"); ?> : + <span id="name" class=""><?php //if(isset($element["name"])) echo $element["name"]; else echo ""; ?></span> + </li> + <?php //} ?> + --> + <?php if($type==Person::COLLECTION){ ?> + <li class="tooltips hidden username" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","Username"); ?>"> + <i class="fa fa-user-secret"></i> + <span id="usernameMenuLeft" class=""><?php if(isset($element["username"])) echo $element["username"]; else echo ""; ?></span> + </li> + <?php } ?> + + <?php if($type==Person::COLLECTION){ + if(Preference::showPreference($element, $type, "birthDate", Yii::app()->session["userId"])){ ?> + <li class="hidden birthDate" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("person","Birth date"); ?>"> + <i class="fa fa-birthday-cake"></i><?php echo Yii::t("person","Birth date"); ?> : + <span id="birthDateMenuLeft" class=""><?php echo (isset($element["birthDate"])) ? date("d/m/Y", strtotime($element["birthDate"])) : null; ?></span> + </li> + <?php } + } ?> + + <?php if($type==Project::COLLECTION && isset($element["properties"]["avancement"]) ){ ?> + <li class="tooltips hidden avancement" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("project","Project maturity",null,Yii::app()->controller->module->id); ?>"> + <span id="avancementMenuLeft"> <?php echo Yii::t("project","Project maturity",null,Yii::app()->controller->module->id)." : ".Yii::t("project",$element["properties"]["avancement"],null,Yii::app()->controller->module->id); ?></span> + </li> + <?php } ?> + + <?php if( ( $type==Person::COLLECTION && + Preference::showPreference($element, $type, "email", Yii::app()->session["userId"]) ) || + ( $type!=Person::COLLECTION && $type!=Event::COLLECTION ) ){ ?> + <li class="tooltips hidden email" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","E-mail"); ?>"> + <i class="fa fa-envelope"></i> + <span id="emailMenuLeft" class=""><?php echo (isset($element["email"])) ? $element["email"] : ""; ?></span> + </li> + <?php } ?> + + <?php //If there is no http:// in the url + $scheme = ""; + if(isset($element["url"])){ + if (!preg_match("~^(?:f|ht)tps?://~i", $element["url"])) $scheme = 'http://'; + + }?> + + <li class="tooltips url hidden" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","Website URL") ?>"> + <i class="fa fa-desktop"></i> + <span> + <a href="<?php echo (isset($element["url"])) ? $scheme.$element['url'] : 'javascript:;'; ?>" target="_blank" id="urlMenuLeft" style="cursor:pointer;"> + <?php echo (isset($element["url"])) ? $element["url"] : ""; ?> + </a> + </span> + </li> + + + <?php if($type==Organization::COLLECTION || $type==Person::COLLECTION){ ?> + <li class="tooltips fixe hidden" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","Phone") ?>"> + <i class="fa fa-phone"></i> + <span id="fixe"> + <?php + if( !empty($element["telephone"]["fixe"])){ + $fixe = ""; + foreach ($element["telephone"]["fixe"] as $key => $num) { + $fixe .= ($fixe != "") ? ", ".trim($num) : trim($num); + } + echo $fixe; + } + ?> + </span> + </li> + <li class="tooltips mobile hidden" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","Mobile") ?>"> + <i class="fa fa-mobile"></i> + <span id="mobile"> + <?php + if( !empty($element["telephone"]["mobile"])){ + $mobile = ""; + foreach ($element["telephone"]["mobile"] as $key => $num) { + $mobile .= ($mobile != "") ? ", ".trim($num) : trim($num); + } + echo $mobile; + } + ?> + </span> + </li> + <li class="tooltips fax hidden" data-toggle="tooltip" data-placement="right" title="<?php echo Yii::t("common","Fax") ?>"> + <i class="fa fa-fax"></i> + <span id="fax"> + <?php + if( !empty($element["telephone"]["fax"])){ + $fax = ""; + foreach ($element["telephone"]["fax"] as $key => $num) { + $fax .= ($fax != "") ? ", ".trim($num) : trim($num); + } + echo $fax; + } + ?> + </span> + </li> + <?php } ?> + </ul> + </li> + + <?php + $skype = (!empty($element["socialNetwork"]["skype"])? $element["socialNetwork"]["skype"]:"javascript:;") ; + $telegram = (!empty($element["socialNetwork"]["telegram"])? "https://web.telegram.org/#/im?p=@".$element["socialNetwork"]["telegram"]:"javascript:;") ; + $facebook = (!empty($element["socialNetwork"]["facebook"])? $element["socialNetwork"]["facebook"]:"javascript:;") ; + $twitter = (!empty($element["socialNetwork"]["twitter"])? $element["socialNetwork"]["twitter"]:"javascript:;") ; + $googleplus = (!empty($element["socialNetwork"]["googleplus"])? $element["socialNetwork"]["googleplus"]:"javascript:;") ; + $gitHub = (!empty($element["socialNetwork"]["github"])? $element["socialNetwork"]["github"]:"javascript:;") ; + ?> + + + <li class="blockSocial"> + <div class="link"> + <i class="fa fa-map-marker"></i>Social<i class="fa fa-chevron-down"></i> + <?php if($edit==true || $openEdition==true ){?> + <a href="javascript:;" class="tooltips btn-update-network" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Contact information");?>"><i class="fa text-red fa-pencil"></i></a> + <?php } ?> + </div> + <ul class="submenu"> + <li class="tooltips telegram hidden" data-toggle="tooltip" data-placement="right" title="Telegram"> + <span class="titleField text-dark"><i class="fa fa-telegram fa-lg"></i></i> + <a href="<?php echo $telegram ; ?>" id="telegramMenuLeft" class="socialIcon"><?php echo ($telegram != "javascript:;") ? $telegram : "" ; ?></a> + </span> + </li> + <li class="tooltips skype hidden" data-toggle="tooltip" data-placement="right" title="Skype"> + <span class="titleField text-dark"><i class="fa fa-skype fa-lg"></i> + <a href="<?php echo $skype ; ?>" id="skypeMenuLeft" class="socialIcon"><?php echo ($skype != "javascript:;") ? $skype : "" ; ?></a> + </span> + </li> + <li class="tooltips facebook hidden" data-toggle="tooltip" data-placement="right" title="Facebook"> + <span class="titleField text-dark"><i class="fa fa-facebook fa-lg"></i> + <a href="<?php echo $facebook ; ?>" target="_blank" id="facebookMenuLeft" class="socialIcon"><?php echo ($facebook != "javascript:;") ? $facebook : "" ; ?></a> + </span> + </li> + <li class="tooltips twitter hidden" data-toggle="tooltip" data-placement="right" title="Twitter"> + <span class="titleField text-dark"><i class="fa fa-twitter fa-lg"></i> + <a href="<?php echo $twitter ;?>" target="_blank" id="twitterMenuLeft" class="socialIcon tooltips" data-toggle="tooltip" data-placement="bottom" title="Twitter"><?php echo ($twitter != "javascript:;") ? $twitter : "" ; ?></a> + </span> + </li> + <li class="tooltips gpplus hidden" data-toggle="tooltip" data-placement="right" title="Google Plus"> + <span class="titleField text-dark"><i class="fa fa-google-plus fa-lg"></i> + <a href="<?php echo $googleplus ;?>" target="_blank" id="gpplusMenuLeft" class="socialIcon"><?php echo ($googleplus != "javascript:;") ? $googleplus : "" ; ?></a> + </span> + </li> + <li class="tooltips gitHub hidden" data-toggle="tooltip" data-placement="right" title="Git Hub"> + <span class="titleField text-dark"><i class="fa fa-github fa-lg"></i> + <a href="<?php echo $gitHub ;?>" target="_blank" id="gitHubMenuLeft" class="socialIcon"><?php echo ($gitHub != "javascript:;") ? $gitHub : "" ; ?></a> + </span> + </li> + </ul> + </li> + <li> + <div class="link"><i class="fa fa-map-marker"></i>Description<i class="fa fa-chevron-down"></i> + <?php if($edit==true || $openEdition==true ){?> + <a href='javascript:;' class="tooltips btn-update-desc" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Description");?>"><i class="fa text-red fa-pencil"></i></a> <?php } ?> + </div> + <ul class="submenu"> + <li> + <span id="description" class=""><?php echo (!empty($element["description"])) ? $element["description"] : ""; ?></span> + <input type="hidden" id="descriptionMarkdown" name="descriptionMarkdown" value="<?php echo (!empty($element['description'])) ? $element['description'] : ''; ?>"> + <div class="text-right padding-10"> + <button class="btn btn-default letter-blue open-description margin-top-5"> + <b><i class="fa fa-connectdevelop"></i> En lire plus <i class="fa fa-chevron-right"></i></b> + </button> + </div> + </li> + </ul> + </li> + <li> + <div class="link"> + <i class="fa fa-map-marker"></i><?php echo Yii::t("common","Localitie(s)"); ?><i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <li> + <?php + if( ($type == Person::COLLECTION && Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])) || $type!=Person::COLLECTION) { + ?> + <span> + <?php + if(! empty($element["address"])) + echo '<i class="fa fa-home"></i>' ; + $address = ""; + $address .= '<span id="detailStreetAddress"> '. + (( @$element["address"]["streetAddress"]) ? + $element["address"]["streetAddress"]."<br/>": + ((@$element["address"]["codeInsee"])?"":Yii::t("common","Unknown Locality"))). + '</span>'; + $address .= '<span id="detailCity">'. + (( @$element["address"]["postalCode"]) ? + $element["address"]["postalCode"].", " : + "") + ." ".(( @$element["address"]["addressLocality"]) ? + $element["address"]["addressLocality"] : "") + .'</span>'; + $address .= '<span id="detailCountry">'. + (( @$element["address"]["addressCountry"]) ? + ", ".OpenData::$phCountries[ $element["address"]["addressCountry"] ] + : ""). + '</span>'; + echo $address; + + + if(empty($element["address"]["codeInsee"]) && $type==Person::COLLECTION && + ($edit==true || $openEdition==true )) { + echo '<br/><a href="javascript:;" class="cobtn btn btn-danger btn-sm" style="margin: 10px 0px;">'.Yii::t("common", "Connect to your city")./*'</a> <a href="javascript:;" class="whycobtn btn btn-default btn-sm explainLink" style="margin: 10px 0px;" data-id="explainCommunectMe" >'. Yii::t("common", "Why ?").*/'</a>'; + }else{ + echo '<a href="javascript:;" id="btn-remove-geopos" class="pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Remove Locality").'"> + <i class="fa text-red fa-trash-o"></i> + </a> + <a href="javascript:;" id="btn-update-geopos" class="pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="'.Yii::t("common","Update Locality").'" > + <i class="fa text-red fa-map-marker"></i> + </a> '; + } + ?> + </span> + <?php } ?> + </li> + + + + <?php + if( !empty($element["addresses"]) ){ + foreach ($element["addresses"] as $ix => $p) { ?> + + <li id="addresses_<?php echo $ix ; ?>"> + <span> + <?php + $address = '<i class="fa fa-circle"></i> <span id="detailStreetAddress_'.$ix.'">'.(( @$p["address"]["streetAddress"]) ? $p["address"]["streetAddress"]."<br/>" : "").'</span>'; + $address .= '<span id="detailCity">'.(( @$p["address"]["postalCode"]) ? $p["address"]["postalCode"] : "")." ".(( @$p["address"]["addressLocality"]) ? $p["address"]["addressLocality"] : "").'</span>'; + $address .= '<span id="detailCountry_'.$ix.'">'.(( @$p["address"]["addressCountry"]) ? " ".OpenData::$phCountries[ $p["address"]["addressCountry"] ] : "").'</span>'; + echo $address; + ?> + + <a href='javascript:removeAddresses("<?php echo $ix ; ?>");' class="addresses pull-right hidden tooltips" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Remove Locality");?>"><i class="fa text-red fa-trash-o"></i></a> + <a href='javascript:updateLocalityEntities("<?php echo $ix ; ?>", <?php echo json_encode($p);?>);' class=" pull-right tooltips" data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common","Update Locality");?>"><i class="fa text-red fa-map-marker hidden addresses"></i></a></span> + </li> + <?php } + } ?> + + <div class="text-right padding-10"> + <?php if(empty($element["address"]) && $type!=Person::COLLECTION && ($edit==true || $openEdition==true )){ ?> + <b><a href="javascript:;" class="btn btn-default letter-blue margin-top-5 addresses" id="btn-update-geopos"> + <i class="fa fa-map-marker"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add a primary address") ; ?></span> + </a></b> + <?php } + + if($type!=Person::COLLECTION && !empty($element["address"]) && ($edit==true || $openEdition==true )) { ?> + <li> + <b> + <a href='javascript:updateLocalityEntities("<?php echo count(@$element["addresses"]) ; ?>");' id="btn-add-geopos" class="btn btn-default letter-blue margin-top-5 addresses" style="margin: 10px 0px;"> + <i class="fa fa-plus" style="margin:0px !important;"></i> + <span class="hidden-sm"><?php echo Yii::t("common","Add a secondary address"); ?></span> + </a> + </b> + </li> + <?php } ?> + </div> + </ul> + </li> + <?php if ($type==Project::COLLECTION || $type==Organization::COLLECTION){ ?> + <li class="podInside"> + <?php $countCharts=0; + if(@$element["properties"] && @$element["properties"]["chart"]) + $countCharts=count($element["properties"]["chart"]) + ?> + <div class="link"><i class="fa fa-puzzle-piece"></i><?php echo Yii::t("chart", "Values and Cultures") ?> + <?php if($countCharts > 0) echo "(".$countCharts.")"; ?> + <i class="fa fa-chevron-down"></i> + </div> + + <ul class="submenu"> + <div class="panel panel-white"> + <?php if($countCharts==0){ ?> + <div id="infoPodChart" class="padding-10 <?php if(!empty($properties)) echo "hide" ?>"> + <blockquote> + <?php echo Yii::t("chart","Create Chart<br/>Opening<br/>Values<br/>Governance<br/>To explain the aim and draw project conduct") ?> + </blockquote> + </div> + <?php }else{ + foreach($element["properties"]["chart"] as $key => $data){ + if($key=="commons") $title=Yii::t("chart","Chart of commons"); + else $title=Yii::t("chart","Open chart"); + ?> + <li> + <div class="subLink btn-start-chart" data-value="<?php echo $key ?>"> + <?php echo $title; ?> + <i class="fa fa-chevron-right pull-right letter-blue"></i> + </div> + </li> + <?php } + } ?> + </div> + <div class="text-right padding-10"> + <?php if (($edit || $openEdition) && @Yii::app()->session["userId"]){ ?> + <button class="edit-chart btn btn-default letter-blue margin-top-5 tooltips" + data-toggle="tooltip" data-placement="top" title="" alt="" data-original-title="<?php echo Yii::t("chart","Edit properties") ?>"> + <b><i class="fa fa-pencil"></i> <?php echo Yii::t("common", "Edit") ?></b> + </button> + <?php } ?> + </div> + </ul> + <?php + /*if(empty($element["properties"]["chart"])) $element["properties"]["chart"] = array(); + $this->renderPartial('../chart/index',array( + "itemId" => (string)$element["_id"], + "itemName" => $element["name"], + "parentType" => $type, + "properties" => $element["properties"]["chart"], + "admin" =>$edit, + "isDetailView" => 1, + "openEdition" => $openEdition));*/ + ?> + </ul> + </li> + <?php } ?> + </ul> + + <ul id="accordion4" class="accordion shadow2 margin-top-20"> + + <!-- COMMUNAUTÉ --> + <?php //if($type != Person::COLLECTION){ ?> + <li class="podInside community"> + <div class="link"> + <i class="fa fa-connectdevelop"></i> Communauté + <small>(<?php echo @$members ? count($members) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php $this->renderPartial('../pod/usersList', array( $controller => $element, + "users" => @$members, + "userCategory" => Yii::t("common","Community"), + "contentType" => $type, + "countStrongLinks" => $countStrongLinks, + "countLowLinks" => $countLowLinks, + "countInvitations" => $countInvitations, + "admin" => $edit, + "invitedMe" => @$invitedMe, + "openEdition" => $openEdition)); ?> + <div class="text-right padding-10"> + + <?php if(@$edit==true && $type!=Person::COLLECTION) { ?> + <button data-toggle="modal" data-target="#modal-scope" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Ajouter un membre</b> + </button> + <?php } ?> + + <button class="btn btn-default letter-blue open-directory margin-top-5"> + <b><i class="fa fa-connectdevelop"></i> Afficher la communauté <i class="fa fa-chevron-right"></i></b> + </button> + + </div> + </ul> + </li> + <?php //} ?> + </ul> + + <button id="exportCSV" class="btn btn-default letter-blue margin-top-5"> + Exporter en format CSV + </button> + + <ul id="accordion2" class="accordion shadow2 margin-top-20"> + + <!-- CONTACTS --> + <?php if (($type==Project::COLLECTION || $type==Organization::COLLECTION || $type==Event::COLLECTION)){ ?> + <li class="podInside"> + <div class="link"> + <i class="fa fa-user-circle"></i> Nous contacter + <small>(<?php echo @$element["contacts"] ? count($element["contacts"]) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php + $contacts = ( empty($element["contacts"]) ? array() : $element["contacts"] ) ; + $this->renderPartial('../pod/contactsList',array( "contacts" => @$contacts, + "contextId" => (String) $element["_id"], + "contextType" => $controller, + "authorised" => $edit, + "openEdition" => $openEdition + )); + ?> + <div class="text-right padding-10"> + <?php if(@$edit==true) { ?> + <button onclick="elementLib.openForm ( 'contactPoint','contact')" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Ajouter un contact </b> + </button> + <?php } ?> + </div> + </ul> + </li> + <?php } ?> + + <!-- COLLECTION --> + <?php if ($type==Person::COLLECTION){ ?> + <li class="podInside collections"> + <div class="link"> + <i class="fa fa-star"></i> Collections + <small>(<?php echo @$element["collections"] ? count($element["collections"]) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php $this->renderPartial('../pod/collections',array( "collections" => @$element["collections"] )); ?> + <?php if(@$edit==true) { ?> + <div class="text-right padding-10"> + <button onclick="collection.crud()" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Créer une collection </b> + </button> + </div> + <?php } ?> + </ul> + </li> + <?php } ?> + + <!-- BESOINS --> + <?php if( $type!=Event::COLLECTION && ( !@$front || (@$front && $front["need"]==true))){ ?> + <li class="podInside needs"> + <div class="link"> + <i class="fa fa-cubes"></i> <?php if( $type!=Person::COLLECTION){ ?>Nos<?php }else{ ?>Mes<?php } ?> besoins + <small>(<?php echo @$needs ? count($needs) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php $this->renderPartial('../pod/needsList',array("needs" => @$needs, + "parentId" => (String) $element["_id"], + "parentType" => $type, + "isAdmin" => @$edit, + "parentName" => $element["name"], + "openEdition" => $openEdition + )); ?> + <div class="text-right padding-10"> + <?php if(@$edit==true) { ?> + <button onclick="" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Créer un besoin </b> + </button> + <?php } ?> + </div> + </ul> + </li> + <?php } ?> + + </ul> + + + <ul id="accordion3" class="accordion shadow2 margin-top-20"> + + <!-- PROJETS --> + <?php if ($type==Organization::COLLECTION){ + if(!@$front || (@$front && $front["project"])){ + ?> + <li class="podInside events"> + <div class="link"> + <i class="fa fa-lightbulb-o"></i> Projets + <small>(<?php echo @$projects ? count($projects) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php $this->renderPartial('../pod/projectsList',array( "projects" => @$projects, + "contextId" => (String) $element["_id"], + "contextType" => $type, + "authorised" => $edit, + "openEdition" => $openEdition + )); ?> + <div class="text-right padding-10"> + <?php if(@$edit==true || ($openEdition==true && @Yii::app()->session["userId"])) { ?> + <button onclick="elementLib.openForm('project','sub')" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Nouveau projet</b> + </button> + <?php } ?> + <button class="btn btn-default letter-blue open-directory margin-top-5"> + <i class="fa fa-chevron-right"></i> + </button> + + </div> + </ul> + </li> + <?php }} ?> + + + <!-- ÉVÉNEMENTS --> + <?php if (($type==Project::COLLECTION || $type==Organization::COLLECTION || $type==Event::COLLECTION)){ ?> + <?php if(!@$front || (@$front && $front["event"]==true)){ ?> + <?php + $organizerImg=false; + if($type==Event::COLLECTION){ + $organizerImg=true; + if(empty($subEvents)) $subEvents = array(); + $events=$subEvents; + } + if(!isset($eventTypes)) $eventTypes = array(); + if(empty($subEvents)) $subEvents = array(); + ?> + <li class="podInside events"> + + <div class="link"> + <i class="fa fa-calendar"></i> Événements + <small>(<?php echo @$events ? count($events) : "0"; ?>)</small> + <i class="fa fa-chevron-down"></i> + </div> + <ul class="submenu"> + <?php $this->renderPartial('../pod/eventsList',array( "events" => @$events, + "contextId" => (String) $element["_id"], + "contextType" => $controller, + "list" => $eventTypes, + "authorised" => $edit, + "organiserImgs"=> $organizerImg, + "openEdition" => $openEdition + )); + ?> + <div class="text-right padding-10"> + <?php if(@$edit==true || ($openEdition==true && @Yii::app()->session["userId"])) { ?> + <button onclick="elementLib.openForm('event','subEvent')" + class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Nouvel événement</b> + </button> + <?php } ?> + <button class="btn btn-default letter-blue open-directory margin-top-5" + data-toggle="tooltip" data-placement="right" title="Afficher tout"> + <i class="fa fa-chevron-right"></i> + </button> + + </div> + </ul> + </li> + <?php } ?> + <?php } ?> + + + <?php /*$this->renderPartial('../pod/ficheInfoPodThumb', array("list"=>@$events, + "title"=>"Événements", + "icon"=>"calendar", + "thumbOnly"=>true) );*/ ?> + + + <?php /*$this->renderPartial('../pod/ficheInfoPodThumb', array("list"=>@$needs, + "title"=>"Besoins", + "icon"=>"cubes") ); */?> + + </ul> + + +<?php + //$element["type"] = $type; + //$element["id"] = (string)$element["_id"]; + $emptyAddress = (empty($element["address"]["codeInsee"])?true:false); + $showOdesc = true ; + if(Person::COLLECTION == $type){ + $showLocality = (Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])?true:false); + $showOdesc = ((Preference::isOpenData($element["preferences"]) && Preference::isPublic($element, "locality"))?true:false); + } + $odesc = "" ; + if($showOdesc == true){ + $controller = Element::getControlerByCollection($type) ; + if($type == Person::COLLECTION) + $odesc = $controller." : ".addslashes( strip_tags(json_encode(@$element["shortDescription"]))).",".addslashes(json_encode(@$element["address"]["streetAddress"])).",".@$element["address"]["postalCode"].",".@$element["address"]["addressLocality"].",".@$element["address"]["addressCountry"] ; + else if($type == Organization::COLLECTION) + $odesc = $controller." : ".@$element["type"].", ".addslashes( strip_tags(json_encode(@$element["shortDescription"]))).",".addslashes(json_encode(@$element["address"]["streetAddress"])).",".@$element["address"]["postalCode"].",".@$element["address"]["addressLocality"].",".@$element["address"]["addressCountry"]; + else if($type == Event::COLLECTION) + $odesc = $controller." : ".@$element["startDate"].",".@$element["endDate"].",".addslashes(json_encode(@$element["address"]["streetAddress"])).",".@$element["address"]["postalCode"].",". @$element["address"]["addressLocality"].",".@$element["address"]["addressCountry"].",".addslashes(strip_tags(json_encode(@$element["shortDescription"]))); + else if($type == Project::COLLECTION) + $odesc = $controller." : ".addslashes( strip_tags(json_encode(@$element["shortDescription"]))).",".addslashes(json_encode(@$element["address"]["streetAddress"])).",".@$element["address"]["postalCode"].",".@$element["address"]["addressLocality"].",".@$element["address"]["addressCountry"]; + } +?> +<script type="text/javascript"> + + //var elementName = "<?php //echo @$element["name"]; ?>"; + var contextType = "<?php //echo @$type; ?>"; + var contextId = "<?php //echo @$element["id"]; ?>"; + //var contextData = <?php //echo json_encode($element)?>; + var edit = '<?php echo (@$edit == true) ? "true" : "false"; ?>'; + var openEdition = '<?php echo (@$openEdition == true) ? "true" : "false"; ?>'; + + var showLocality = (( "<?php echo @$showLocality; ?>" == "<?php echo false; ?>")?false:true); + var contextData = { + name : "<?php echo addslashes($element["name"]) ?>", + id : "<?php echo (string)$element["_id"] ?>", + type : "<?php echo $type ?>", + controller : <?php echo json_encode(Element::getControlerByCollection($type))?>, + otags : "<?php echo addslashes($element["name"]).",".$type.",communecter,".@$element["type"].",".addslashes(@implode(",", $element["tags"])) ?>", + odesc : <?php echo json_encode($odesc) ?>, + <?php + if( @$element["startDate"] ) + echo "'startDate':'".$element["startDate"]."',"; + if( @$element["endDate"] ) + echo "'endDate':'".$element["endDate"]."'"; ?> + }; + + if( ( showLocality == true && "<?php echo Person::COLLECTION; ?>" == contextData.type ) + || "<?php echo Person::COLLECTION; ?>" != contextData.type) { + contextData.geo = <?php echo json_encode(@$element["geo"]) ?>; + contextData.geoPosition = <?php echo json_encode(@$element["geoPosition"]) ?>; + contextData.address = <?php echo json_encode(@$element["address"]) ?>; + contextData.addresses = <?php echo json_encode(@$element["addresses"]) ?>; + } + + if( edit == "true" || openEdition == "true") { + contextData.email = '<?php if(isset($element["email"])) echo $element["email"]; else echo ""; ?>'; + contextData.url = '<?php if(isset($element["url"])) echo $element["url"]; else echo ""; ?>'; + contextData.fixe =parsePhone(<?php echo json_encode((isset($element["telephone"]["fixe"]) ? $element["telephone"]["fixe"] : array())); ?>); + contextData.mobile = parsePhone(<?php echo json_encode((isset($element["telephone"]["mobile"]) ? $element["telephone"]["mobile"] : array())); ?>); + contextData.fax = parsePhone(<?php echo json_encode((isset($element["telephone"]["fax"]) ? $element["telephone"]["fax"] : array())); ?>); + contextData.tags = <?php echo json_encode((isset($element["tags"]) ? $element["tags"] : array())); ?>; + + if(contextData.type == "<?php echo Person::COLLECTION; ?>" ){ + contextData.username = '<?php if(isset($element["username"])) echo $element["username"]; else echo ""; ?>'; + contextData.birthDate = '<?php if(isset($element["birthDate"])) echo $element["birthDate"]; else echo ""; ?>'; + contextData.twitter = '<?php if(isset($element["socialNetwork"]["twitter"])) echo $element["socialNetwork"]["twitter"]; else echo ""; ?>'; + contextData.gpplus = '<?php if(isset($element["socialNetwork"]["googleplus"])) echo $element["socialNetwork"]["googleplus"]; else echo ""; ?>'; + contextData.gitHub = '<?php if(isset($element["socialNetwork"]["github"])) echo $element["socialNetwork"]["github"]; else echo ""; ?>'; + contextData.skype = '<?php if(isset($element["socialNetwork"]["skype"])) echo $element["socialNetwork"]["skype"]; else echo ""; ?>'; + contextData.telegram = '<?php if(isset($element["socialNetwork"]["telegram"])) echo $element["socialNetwork"]["telegram"]; else echo ""; ?>'; + contextData.facebook = '<?php if(isset($element["socialNetwork"]["facebook"])) echo $element["socialNetwork"]["facebook"]; else echo ""; ?>'; + } + } + + + if(contextData.type == "<?php echo Organization::COLLECTION; ?>" ){ + contextData.typeOrga = '<?php if(isset($element["type"])) echo $element["type"]; else echo ""; ?>'; + } + contextData.descriptionHTML = '<?php if(isset($element["descriptionHTML"])) echo $element["descriptionHTML"]; else echo ""; ?>'; + + + if(contextData.type == "<?php echo Event::COLLECTION; ?>"){ + contextData.allDay = '<?php echo (@$element["allDay"] == true) ? "true" : "false"; ?>'; + } + + if(contextData.type == "<?php echo Event::COLLECTION; ?>" || contextData.type == "<?php echo Project::COLLECTION; ?>" ){ + contextData.startDate = '<?php if(isset($element["startDate"])) echo $element["startDate"]; else echo ""; ?>'; + contextData.endDate = '<?php if(isset($element["endDate"])) echo $element["endDate"]; else echo "" ?>'; + } + + if(contextData.type == "<?php echo Project::COLLECTION; ?>" ) + contextData.avancement = '<?php if(isset($element["properties"]["avancement"])) echo $element["properties"]["avancement"]; else echo "" ?>' ; + + var formatDateView = "DD MMMM YYYY à HH:mm" ; + var formatDatedynForm = "DD/MM/YYYY HH:mm" ; + if(typeof contextData.allDay != "undefined" && contextData.allDay == "true"){ + formatDateView = "DD MMMM YYYY" ; + formatDatedynForm = "DD/MM/YYYY" ; + } + + var emptyAddress = (( "<?php echo @$emptyAddress; ?>" == "<?php echo false; ?>")?false:true); + + var mode = "view"; + var types = <?php echo json_encode(@$elementTypes) ?>; + var countries = <?php echo json_encode($countries) ?>; + //var startDate = '<?php //if(isset($element["startDate"])) echo $element["startDate"]; else echo ""; ?>'; + //var endDate = '<?php //if(isset($element["endDate"])) echo $element["endDate"]; else echo "" ?>'; + //var allDay = '<?php //echo (@$element["allDay"] == true) ? "true" : "false"; ?>'; + //var edit = '<?php //echo (@$edit == true) ? "true" : "false"; ?>'; + var modeEdit = '<?php echo (@$modeEdit == true) ? "true" : "false"; ?>'; + //var birthDate = '<?php echo (isset($person["birthDate"])) ? $person["birthDate"] : null; ?>'; + var NGOCategoriesList = <?php echo json_encode(@$NGOCategories) ?>; + var localBusinessCategoriesList = <?php echo json_encode(@$localBusinessCategories) ?>; + //var seePreferences = '<?php echo (@$element["seePreferences"] == true) ? "true" : "false"; ?>'; + var color = '<?php echo Element::getColorIcon($type); ?>'; + var icon = '<?php echo Element::getFaIcon($type); ?>'; + //var speudoTelegram = '<?php echo @$element["socialNetwork"]["telegram"]; ?>'; + var organizer = <?php echo json_encode(@$organizer) ?>; + var tags = <?php echo json_encode($tags)?>; + + //var tags2 = <?php //echo (isset($element["tags"])) ? json_encode(implode(",", $element["tags"])) : "''"; ?>; + + //var mobile = <?php //echo (isset($element["telephone"]["mobile"])) ? json_encode(implode(",", $element["telephone"]["mobile"])) : "''"; ?>; + //var fax = <?php //echo (isset($element["telephone"]["fax"])) ? json_encode(implode(",", $element["telephone"]["fax"])) : "''"; ?>; + //var fixe = <?php //echo (isset($element["telephone"]["fixe"])) ? json_encode(implode(",", $element["telephone"]["fixe"])) : "''"; ?>; + var category = <?php echo (isset($element["category"])) ? json_encode(implode(",", $element["category"])) : "''"; ?>; + var description = <?php echo (isset($element["description"])) ? json_encode($element["description"]) : "''"; ?>; + + var TYPE_NGO = "<?php echo Organization::TYPE_NGO ?>"; + var TYPE_BUSINESS = "<?php echo Organization::TYPE_BUSINESS ?>"; + var EVENT_COLLECTION = "<?php echo Event::COLLECTION ?>"; + + + + //var contentKeyBase = "<?php //echo isset($contentKeyBase) ? $contentKeyBase : ""; ?>"; + //By default : view mode + //var images = <?php //echo json_encode(@$images) ?>; + + //var publics = <?php //echo json_encode(@$publics) ?>; + var isEditing = false; + + jQuery(document).ready(function() { + bindDynFormEditable(); + initDate(); + inintDescs(); + changeHiddenFields(); + bindAboutPodElement(); + bindLBHLinks(); + + $("#small_profil").html($("#menu-name").html()); + $("#menu-name").html(""); + + + $("#btn-update-geopos").off().on( "click", function(){ + updateLocalityEntities(); + }); + + $("#btn-add-geopos").off().on( "click", function(){ + updateLocalityEntities(); + }); + + $("#btn-update-organizer").off().on( "click", function(){ + updateOrganizer(); + }); + $("#btn-add-organizer").off().on( "click", function(){ + updateOrganizer(); + }); + + $("#btn-remove-geopos").off().on( "click", function(){ + var msg = "<?php echo Yii::t('common','Are you sure you want to delete the locality') ;?>" ; + if(contextData.type == "<?php echo Person::COLLECTION; ?>") + msg = "<?php echo Yii::t('common',"Are you sure you want to delete the locality ? You can't vote anymore in the citizen council of your city."); ?> "; + + bootbox.confirm({ + message: msg + "<span class='text-red'></span>", + buttons: { + confirm: { + label: "<?php echo Yii::t('common','Yes');?>", + className: 'btn-success' + }, + cancel: { + label: "<?php echo Yii::t('common','No');?>", + className: 'btn-danger' + } + }, + callback: function (result) { + if (!result) { + return; + } else { + param = new Object; + param.name = "locality"; + param.value = ""; + param.pk = contextData.id; + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/updatefields/type/"+contextDate.type, + data: param, + dataType: "json", + success: function(data){ + // + if(data.result){ + if(contextData.type == "<?php echo Person::COLLECTION ;?>"){ + //Menu Left + $("#btn-geoloc-auto-menu").attr("href", "javascript:"); + $('#btn-geoloc-auto-menu > span.lbl-btn-menu').html("Communectez-vous"); + $("#btn-geoloc-auto-menu").attr("onclick", "communecterUser()"); + $("#btn-geoloc-auto-menu").off().removeClass("lbh"); + //Dashbord + $("#btn-menuSmall-mycity").attr("href", "javascript:"); + $("#btn-menuSmall-citizenCouncil").attr("href", "javascript:"); + //Multiscope + $(".msg-scope-co").html("<i class='fa fa-cogs'></i> Paramétrer mon code postal</a>"); + //MenuSmall + $(".hide-communected").show(); + $(".visible-communected").hide(); + } + toastr.success(data.msg); + url.loadByHash("#"+contextData.controller+".detail.id."+contextData.id); + } + } + }); + } + } + }); + + }); + + $("#btn-update-geopos-admin").click(function(){ + findGeoPosByAddress(); + }); + + //console.log("contextDatacontextData", contextData, contextData.type,contextData.id); + //buildQRCode(contextData.type,contextData.id.$id); + + $(".toggle-tag-dropdown").click(function(){ mylog.log("toogle"); + if(!$("#dropdown-content-multi-tag").hasClass('open')) + setTimeout(function(){ $("#dropdown-content-multi-tag").addClass('open'); }, 300); + $("#dropdown-content-multi-tag").addClass('open'); + }); + $(".toggle-scope-dropdown").click(function(){ mylog.log("toogle"); + if(!$("#dropdown-content-multi-scope").hasClass('open')) + setTimeout(function(){ $("#dropdown-content-multi-scope").addClass('open'); }, 300); + }); + + smallMenu.inBlockUI = false; + smallMenu.destination = "#central-container"; + directory.elemClass = smallMenu.destination+' .searchEntityContainer '; + + mylog.log("tagg1 smallMenu.destination", smallMenu.destination); + + $(".open-directory").click(function(){ + toogleNotif(false); + smallMenu.openAjax(baseUrl+'/'+moduleId+'/element/directory/type/'+contextData.type+'/id/'+contextData.id+ + '?tpl=json','Communauté','fa-connectdevelop','dark'); + bindLBHLinks(); + }); + $("#exportCSV").click(function(){ + // alert("Clic sur le bouton d'export CSV"); + + var id = contextData.id; + var type = contextData.type; + + // alert(id); + // alert(type); + + $.ajax({ + type: "GET", + url : baseUrl+'/'+moduleId+'/export', + data: 'id='+id+'&type='+type, + success: function(data){ + + res = JSON.parse(data); + head = ""; + ligne_type = ""; + ligne_isAdmin = ""; + + $.each(res, function( key, value ) { + + head += '";"'+key; + ligne_type += '";"'+value.type; + ligne_isAdmin += '";"'+value.isAdmin; + + }); + + // alert(head.length); + // alert(ligne_type.length); + // alert(ligne_isAdmin.length); + + head = head.substring(2, (head.length)); + ligne_type = ligne_type.substring(2, (ligne_type.length)); + ligne_isAdmin = ligne_isAdmin.substring(2, (ligne_isAdmin.length)); + + csv = head+'"'; + csv += "\n"; + csv +=ligne_type+'"'; + csv += "\n"; + csv +=ligne_isAdmin+'"'; + + // alert(csv); + + $("<a />", { + "download": "Element.csv", + "href" : "data:application/csv," + encodeURIComponent(csv) + }).appendTo("body") + .click(function() { + $(this).remove() + })[0].click() ; + + // head = '";"'; + // ligne_type = '";"'; + // ligne_isAdmin = '";"'; + + + } + }); + }); + $(".edit-chart").click(function(){ + toogleNotif(false); + var url = "chart/addchartsv/type/"+contextType+"/id/"+contextId; + $('#central-container').html("<i class='fa fa-spin fa-refresh'></i>"); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url, + null, + function(){},"html"); + }); + $(".btn-open-collection").click(function(){ + toogleNotif(false); + }); + + $("#btn-start-detail").click(function(){ + loadDetail(); + }); + + }); + + function loadDetail(){ + toogleNotif(false); + var url = "element/detail/type/"+contextData.type+"/id/"+contextData.id; + + $('#central-container').html("<i class='fa fa-spin fa-refresh'></i>"); + ajaxPost('#central-container', baseUrl+'/'+moduleId+'/'+url+'?tpl=ficheInfoElement', null, function(){},"html"); + } + + function parsePhone(arrayPhones){ + var str = ""; + $.each(arrayPhones, function(i,num) { + if(str != "") + str += ", "; + str += num.trim(); + }); + return str ; + } + + function initDate() {//DD/mm/YYYY hh:mm + if($("#contentGeneralInfos #startDate").html() != "") + $("#contentGeneralInfos #startDate").html(moment($("#contentGeneralInfos #startDate").html()).local().format(formatDateView)); + if($("#contentGeneralInfos #endDate").html() != "") + $("#contentGeneralInfos #endDate").html(moment($("#contentGeneralInfos #endDate").html()).local().format(formatDateView)); + $('#dateTimezone').attr('data-original-title', "Fuseau horaire : GMT " + moment().local().format("Z")); + } + + function descHtmlToMarkdown() { + mylog.log("htmlToMarkdown"); + if(typeof contextData.descriptionHTML != "undefined" && contextData.descriptionHTML == "1"){ + if($("#contentGeneralInfos #description").html() != ""){ + var descToMarkdown = toMarkdown($("#contentGeneralInfos #descriptionMarkdown").val()) ; + mylog.log("descToMarkdown", descToMarkdown); + $("#contentGeneralInfos #descriptionMarkdown").html(descToMarkdown); + var param = new Object; + param.name = "description"; + param.value = descToMarkdown; + param.id = contextData.id; + param.typeElement = contextType; + param.block = "toMarkdown"; + $.ajax({ + type: "POST", + url : baseUrl+"/"+moduleId+"/element/updateblock/type/"+contextType, + data: param, + dataType: "json", + success: function(data){ + mylog.log("here"); + toastr.success(data.msg); + } + }); + mylog.log("param", param); + } + } + } + + function inintDescs() { + mylog.log("inintDescs"); + descHtmlToMarkdown(); + mylog.log("after"); + $("#description").html(markdownToHtml($("#descriptionMarkdown").val())); + //$("#shortDescriptionHeader").html(markdownToHtml($("#shortDescriptionMarkdown").val())); + } + + function toCSV(data){ + + console.dir(data); + + alert(data.id); + alert(data.type); + + } + +</script> diff --git a/views/pod/fileupload.php b/views/pod/fileupload.php new file mode 100755 index 0000000000000000000000000000000000000000..9cbbbd86c424704493ed48e60ca4688dc3c23155 --- /dev/null +++ b/views/pod/fileupload.php @@ -0,0 +1,323 @@ +<?php + + HtmlHelper::registerCssAndScriptsFiles( + array( '/css/default/upload_img.css', + ) , + Yii::app()->theme->baseUrl. '/assets'); +?> + + <div class="center" id="fileuploadContainer"> + <form method="post" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_photoAdd" enctype="multipart/form-data"> + <div class="fileupload fileupload-new" data-provides="fileupload" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_fileUpload"> + <div class="user-image"> + <div class="fileupload-new thumbnail container-fluid" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_imgPreview"> + </div> + <div class="fileupload-preview fileupload-exists thumbnail container-fluid" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_imgNewPreview"></div> + <?php + if(@Yii::app()->session["userId"] && ((@$editMode && $editMode) || + (@$openEdition && $openEdition))){ + + if($image!="") $editBtn=true; else $editBtn=false; + ?> + <div class="user-image-buttons"> + <a class="btn btn-blue btn-file btn-upload fileupload-new btn-sm" id="profil_photoAddBtn" ><span class="fileupload-new"> + <i class="fa fa-<?php if($editBtn) echo "pencil"; else echo "plus"?>"></i> <span class="hidden-xs"><?php if($editBtn) echo Yii::t("common","Edit photo"); else echo Yii::t("common","Add a photo") ?></span></span> + <input type="file" accept=".gif, .jpg, .png" name="avatar" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_avatar" class="hide"> + <input class="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_isSubmit hidden" value="true"/> + </a> + <a href="#" class="btn btn-upload fileupload-exists btn-red btn-sm" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_photoRemove" data-dismiss="fileupload"> + <i class="fa fa-times"></i> + </a> + </div> + <div class="photoUploading" id="<?php if(isset($podId)) echo $podId.'_'.$contentId; else echo $contentId ?>_photoUploading"> + <!---<div class="center" style="text-align: center;"> + <i class="fa fa-spinner fa-spin fa-5x"></i> + </div>--> + </div> + <?php } ?> + </div> + </div> + </form> + </div> + + +<script type="text/javascript"> + + jQuery(document).ready(function() { + + var id = "<?php echo $itemId ?>"; + var editFile = <?php echo ($editMode) ? 'true':'false'; ?>; + var type = "<?php echo $type ?>"; + var contentId = "<?php echo Document::IMG_PROFIL ?>"; + var contentIdtoSend = "<?php echo $contentId ?>"; + var resize = <?php echo (@$resize) ? 'true':'false'; ?>; + var imageName= ""; + var imageId= ""; + var imagesPath = []; + var image = <?php echo json_encode($image) ?>; + var itemName="<?php echo addslashes($itemName) ?>"; + if("undefined" != typeof(contentKeyBase)) + var contentKey = contentKeyBase/*+"."+contentIdtoSend*/; + else + contentKey = contentIdtoSend; + + + //if("undefined" != typeof(image[contentId])){ + //setTimeout(function(){ + initProfilImageUpload(); + //}, 1000); + //}else{ + // setTimeout(function(){ + //initFileUpload(); + // }, 1000); + //} + mylog.log(baseUrl+"/imageTableu:"); + mylog.log(image[contentId.toLowerCase()]); + $("#"+contentId+"_photoAddBtn").click(function(event){ + if (!$(event.target).is('input')) { + $(this).find("input[name='avatar']").trigger('click'); + } + //$('#'+contentId+'_avatar').trigger("click"); + }); + $('#'+contentId+'_avatar').off().on('change.bs.fileinput', function () { + if($("."+contentId+"_isSubmit").val()== "true" ){ + setTimeout(function(){ + if(resize){ + $(".fileupload-preview img").css("height", parseInt($("#"+contentId+"_fileUpload").css("width"))*45/100+"px"); + $(".fileupload-preview img").css("width", "auto"); + } + var file = document.getElementById(contentId+'_avatar').files[0]; + if(file && file.size < 2097152){ + $("#"+contentId+"_photoAdd").submit(); + }else{ + if(file && file.size > 2097152){ + toastr.error("<?php echo Yii::t('fileUpload','Size maximum 2Mo',null,Yii::app()->controller->module->id) ?>"); + } + /*$("#"+contentId+"_fileUpload").css("opacity", "1"); + $("#"+contentId+"_photoUploading").css("display", "none"); + $(".btn-upload").removeClass("disabled");*/ + updateBtnUpload(false); + $("#"+contentId+"_fileUpload").fileupload("clear"); + } + }, 200); + + + }else{ + setTimeout(function(){ + if(resize){ + $(".fileupload-preview img").css("height", parseInt($("#"+contentId+"_fileUpload").css("width"))*45/100+"px"); + $(".fileupload-preview img").css("width", "auto"); + } + }, 200); + + $("."+contentId+"_isSubmit").val("true"); + } + + }); + + + $("#"+contentId+"_photoAdd").off().on('submit',(function(e) { + if(debug)mylog.log("id2", id); + $("."+contentId+"_isSubmit").val("true"); + e.preventDefault(); + /*$("#"+contentId+"_fileUpload").css("opacity", "0.4"); + $("#"+contentId+"_photoUploading").css("display", "block"); + $(".btn-upload").addClass("disabled");*/ + updateBtnUpload(true); + $("#"+contentId+"_imgPreview").addClass("hidden"); + $.ajax({ + //url: baseUrl+"/"+moduleId+"/api/saveUserImages/type/"+type+"/id/"+id+"/contentKey/"+contentKey+"/user/<?php echo Yii::app()->session["userId"]?>", + url : baseUrl+"/"+moduleId+"/document/<?php echo Yii::app()->params['uploadUrl'] ?>dir/communecter/folder/"+type+"/ownerId/"+id+"/input/avatar", + type: "POST", + data: new FormData(this), + contentType: false, + cache: false, + processData: false, + dataType: "json", + success: function(data){ + if(debug)mylog.log(data); + if(data.success){ + imageName = data.name; + var doc = { + "id":id, + "type":type, + "folder":type+"/"+id, + "moduleId":"communecter", + "author" : "<?php echo (isset(Yii::app()->session['userId'])) ? Yii::app()->session['userId'] : 'unknown'?>" , + "name" : data.name , + "date" : new Date() , + "size" : data.size , + "doctype" : "<?php echo Document::DOC_TYPE_IMAGE; ?>", + "contentKey" : contentKey + }; + + if(typeof contextData != "undefined" && contextData != null && typeof contextData.parentType != "undefined" && contextData.parentType != null){ + doc["parentType"] = contextData.parentType ; + doc["parentId"] = contextData.parentId ; + } + + saveImage(doc, "/"+data.dir+data.name); + } + else + toastr.error(data.msg); + }, + }); + })); + + + + + $("#"+contentId+"_photoRemove").off().on("click", function(e){ + + $("."+contentId+"_isSubmit").val("false"); + e.preventDefault(); + + /*$("#"+contentId+"_fileUpload").css("opacity", "0.4"); + $("#"+contentId+"_photoUploading").css("display", "block"); + $(".btn-upload").addClass("disabled");*/ + updateBtnUpload(true); + $("#"+contentId+"_imgPreview").removeClass("hidden"); + $.ajax({ + url: baseUrl+"/"+moduleId+"/document/delete/dir/"+moduleId+"/type/"+type+"/id/"+id, + type: "POST", + dataType : "json", + data: {"name": imageName, "parentId": id, "parentType": type, "path" : "communecter", "ids" : [imageId]}, + success: function(data){ + if(data.result){ + + setTimeout(function(){ + + /*$("#"+contentId+"_fileUpload").css("opacity", "1"); + $("#"+contentId+"_photoUploading").css("display", "none"); + $(".btn-upload").removeClass("disabled");*/ + updateBtnUpload(false); + toastr.success(data.msg); + /*if("undefined" != typeof updateShiftSlider && "function" == typeof updateShiftSlider && (contentId.indexOf(sliderKey) > -1)){ + updateShiftSlider(); + }*/ + }, 2000); + + }else{ + updateBtnUpload(false); + toastr.error(data.error) + } + } + }); + }); + + + function initProfilImageUpload(){ + var j = 0; + //console.log("profilImage",image); + if(image!=""){ + //imageUrl = baseUrl+image[contentId.toLowerCase()][0]; + j++; + imageHtml='<a href="'+baseUrl+image.large+'" '+ + 'class="thumb-info" '+ + 'data-title="<?php echo Yii::t("common","Profil image of") ?> '+itemName+'" '+ + 'data-lightbox="all">'+ + '<img class="img-responsive" src="'+baseUrl+image.medium+'" />'+ + '</a>'; + $("#profil_imgPreview").html(imageHtml); + }else{ + imageUrl = '<img class="img-responsive thumbnail" src="<?php echo $this->module->assetsUrl ?>/images/thumbnail-default.jpg"/>'; + j++; + $("#profil_imgPreview").html(imageUrl); + + } + //if(debug)mylog.log("initFileUpload", images, imagesPath); + if(j == 0 || resize ){ + if(editFile){ + var textBlock = "<br><?php echo Yii::t('fileUpload','Click on',null,Yii::app()->controller->module->id) ?> <i class='fa fa-plus text-green'></i> <?php echo Yii::t('fileUpload','for share your pictures',null,Yii::app()->controller->module->id) ?>"; + + var defautText = "<li>" + + "<div class='center'>"+ + "<i class='fa fa-picture-o fa-5x text-green'></i>"+ + textBlock+ + "</div>"+ + "</li>"; + $("#"+contentId+"_imgPreview").html(defautText); + }else{ + $("#"+contentId+"_fileUpload").css("visibility", "hidden"); + } + } + } + function saveImage(doc, path){ + mylog.log("----------------saveImage------------------"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/document/save", + data: doc, + dataType: "json" + }).done( function(data){ + if(data.result){ + imagesPath.push(baseUrl+path); + //$(".fileupload-preview img").css("max-height", "190px"); + imageId = data.id["$id"]; + setTimeout(function(){ + /*$("#"+contentId+"_fileUpload").css("opacity", "1"); + $("#"+contentId+"_photoUploading").css("display", "none"); + $(".btn").removeClass("disabled");*/ + updateBtnUpload(false); + mylog.log(typeof(updateSlider)); + if(typeof(updateSlider) != "undefined" && typeof (updateSlider) == "function"){ + updateSlider(path, data.id["$id"]); + } + if(typeof(updateSliderImage) !="undefined" && typeof(updateSliderImage) == "function" && "undefined" != typeof events[id]){ + updateSliderImage(id, path); + } + }, 2000) + toastr.success(data.msg); + //met à jour l'image de myMarker (marker sur MA position) + Sig.initHomeBtn(); + //met à jour l'image de profil dans le menu principal + updateMenuThumbProfil(); + + } else{ + updateBtnUpload(false); + toastr.error(data.msg); + } + + }); + } + //met à jour l'image de profil dans le menu principal + function updateMenuThumbProfil(){ + mylog.log("loading new profil"); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/element/getthumbpath/type/"+type+"/id/"+id, + dataType: "json" + }).done( function(data){ + console.log(data); + if(typeof data.profilThumbImageUrl != "undefined"){ + + profilThumbImageUrl = baseUrl + data.profilThumbImageUrl; + //alert(profilThumbImageUrl); + if(type=="citoyens") + $(".menu-name-profil img").attr("src", profilThumbImageUrl); + //$("#menu-left-thumb-profil").attr("src", profilThumbImageUrl); + //$("#menu-small-thumb-profil").attr("src", profilThumbImageUrl); + $(".identity-min img").attr("src", profilThumbImageUrl); + $("#floopItem-"+type+"-"+id+" a img").attr("src", profilThumbImageUrl); + $("#popup"+id+" img").attr("src", profilThumbImageUrl); + $(".item_map_list_"+id+" .left-col .thumbnail-profil img").attr("src", profilThumbImageUrl); + } + + }); + } + + function updateBtnUpload(addDisable){ + if(addDisable == true){ + $("#"+contentId+"_fileUpload").css("opacity", "0.4"); + $("#"+contentId+"_photoUploading").css("display", "block"); + $(".btn-upload").addClass("disabled"); + }else if(addDisable == false){ + $("#"+contentId+"_fileUpload").css("opacity", "1"); + $("#"+contentId+"_photoUploading").css("display", "none"); + $(".btn").removeClass("disabled"); + } + } + + }); + +</script> \ No newline at end of file diff --git a/views/pod/menuLeftElement.php b/views/pod/menuLeftElement.php new file mode 100755 index 0000000000000000000000000000000000000000..6003f89fd288af154459da0f9fdcec76fac88c23 --- /dev/null +++ b/views/pod/menuLeftElement.php @@ -0,0 +1,391 @@ +<?php + $cssAnsScriptFilesModule = array( + //Data helper + '/js/dataHelpers.js', + '/js/activityHistory.js', + '/js/news/index.js', + '/js/default/editInPlace.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $imgDefault = $this->module->assetsUrl.'/images/thumbnail-default.jpg'; + $thumbAuthor = @$element['profilThumbImageUrl'] ? + Yii::app()->createUrl('/'.@$element['profilThumbImageUrl']) + : ""; +?> +<style> + .img-thumb{ + height: 50px; + width: 50px; + } + + .podInside .panel-heading, + .podInside .panel-tools{ + display:none; + } + .podInside .panel, + .podInside .table{ + margin-bottom: 0px; + border: 0px; + } + + .podInside.collections a{ + font-size: 15px; + font-weight: 700; + padding:10px; + display: inline-block; + } + + .podchart .panel-heading{ + background-color: white !important; + } + + .favElBtn{ + /*color: #FC4D4D !important;*/ + /*padding: 6px; + margin-bottom: 4px;*/ + } + + .editBtn{ + float: right; + } + + + .btn-update-info, + .btn-update-network, + .btn-update-desc{ + + } + + a.letter-grey{ + color:#425B5F; + } + + + + #subsubMenuLeft hr{ + margin-top: 7px; + margin-bottom: 7px; + border-top: 2px solid #ededed; + } + + #subsubMenuLeft a{ + color:#5B5B5C; + font-size: 16px; + padding: 6px; + padding-left: 10px; + display: block; + text-align: left; + font-weight: bold; + border-left: 3px solid transparent; + } + + #subsubMenuLeft a:hover{ + color:#0095FF; + background-color: #edecec; + border-left: 3px solid #0095FF; + } + + #subsubMenuLeft a:active, + #subsubMenuLeft a.active{ + background-color: #edecec; + border-left: 3px solid #0095FF; + color:#0095FF; + } + + #subsubMenuLeft i.fa{ + width: 25px; + text-align: center; + } + .containInvitation .btn-accept{ + border-radius:3px !important; + color: white; + background-color: #71CE4E; + padding: 5px 10px; + margin-top: 5px; + } + .containInvitation .btn-accept:hover{ + color: #71CE4E !important; + background-color: white; + border: 1px solid #71CE4E; + } + .containInvitation .btn-accept i{ + font-size:12px; + } + .containInvitation .btn-refuse{ + border-radius:3px !important; + color: white; + background-color: #E33551; + padding: 5px 10px; + margin-top: 5px; + } + .containInvitation .btn-refuse:hover{ + color: #E33551 !important; + background-color: white; + border: 1px solid #E33551; + } + .containInvitation .btn-refuse i{ + font-size:12px; + } +</style> +<?php + if(@$invitedMe && !empty($invitedMe)){ + $inviteRefuse="Refuse"; + $inviteAccept="Accept"; + $verb="Join"; + $labelAdmin=""; + $option=null; + $linkValid=Link::IS_INVITING; + if(@$invitedMe["isAdminInviting"]){ + $verb="Administrate"; + $option="isAdminInviting"; + $labelAdmin=" to administrate"; + $linkValid=Link::IS_ADMIN_INVITING; + } + $labelInvitation=Yii::t("common", "{who} invited you".$labelAdmin, array("{who}"=>"<a href='#page.type.".Person::COLLECTION.".id.".$invitedMe["invitorId"]."' class='lbh'>".$invitedMe["invitorName"]."</a>")); + $tooltipAccept=$verb." this ".Element::getControlerByCollection($type); + if ($type == Event::COLLECTION){ + $inviteRefuse="Not interested"; + $inviteAccept="I go"; + } + echo "<div class='no-padding containInvitation' style='border-bottom: 1px solid lightgray;margin-bottom:10px !important;'>". + "<div class='padding-5'>". + $labelInvitation.": <br/>". + '<a class="btn btn-xs tooltips btn-accept" href="javascript:;" onclick="validateConnection(\''.$type.'\',\''.(string)$element["_id"].'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.$linkValid.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'. + '<i class="fa fa-check "></i> '.Yii::t("common",$inviteAccept). + '</a>'. + '<a class="btn btn-xs tooltips btn-refuse margin-left-5" href="javascript:;" onclick="disconnectTo(\''.$type.'\',\''.(string)$element["_id"].'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Element::$connectTypes[$type].'\',null,\''.$option.'\')" data-placement="bottom" data-original-title="'.Yii::t("common","Not interested by the invitation").'">'. + '<i class="fa fa-remove"></i> '.Yii::t("common",$inviteRefuse). + '</a>'. + "</div>". + "</div>"; + } + ?> + +<ul id="subsubMenuLeft"> + +<?php if (($edit==true || $openEdition==true) && @Yii::app()->session["userId"]){ ?> + <li class="visible-xs"> + <a href="javascript:" class="letter-green ssmla open-create-form-modal"> + <i class="fa fa-plus-circle fa-2x"></i> <?php echo Yii::t("common", "Create") ?> + </a> + </li> + <?php //if($type != Person::COLLECTION){ + $modalTarget = "#modal-scope"; + if ($type == Event::COLLECTION ){ + $inviteLink = "people"; + $inviteText = Yii::t("common","Invite people") ; + }else if ($type == Organization::COLLECTION) { + $inviteLink = "members"; + $inviteText = Yii::t("common",'Invite members') ; + }else if ($type == Project::COLLECTION ){ + $inviteLink = "contributors"; + $inviteText = Yii::t("common",'Invite contributors') ; + }else if ($type == Person::COLLECTION) { + $inviteLink = "people"; + $inviteText = Yii::t("common",'Invite people') ; + $modalTarget = "#invite-modal-element"; + } + $whereConnect=""; + if($type!=Person::COLLECTION) + $whereConnect='to the '.Element::getControlerByCollection($type); + if( @$inviteLink && @$inviteText ){?> + <li class=""> + <a href="javascript:;" class="tooltips ssmla text-red" + data-placement="bottom" + data-original-title="<?php echo Yii::t("common","Invite {what} {where}",array("{what}"=> Yii::t("common",$inviteLink),"{where}"=>Yii::t("common", $whereConnect))); ?>" + data-toggle="modal" + data-target="<?php echo $modalTarget ?>"> + <i class="fa fa-user-plus "></i> <?php echo $inviteText ?> + </a> + </li> + <li><hr></li> + <?php } + } ?> + <?php if(@Yii::app()->session["userId"] && + $type==Person::COLLECTION && + (string)$element["_id"]==Yii::app()->session["userId"]){ + + $iconNewsPaper="user-circle"; + ?> + <li class="visible-xs"> + <a href="javascript:" class="ssmla btn-start-newsstream"> + <i class="fa fa-rss"></i> Fil d'actualités + </a> + </li> + + <?php } else { + $iconNewsPaper="rss"; + } + ?> + <li class="visible-xs"> + <a href="javascript:" class="ssmla btn-start-mystream"> + <i class="fa fa-<?php echo $iconNewsPaper ?>"></i> <?php echo Yii::t("common","Newspaper"); ?> + </a> + </li> + <?php if((@Yii::app()->session["userId"] && $isLinked==true) || @Yii::app()->session["userId"] == $element["_id"]){ ?> + <li class="visible-xs"> + <a href="javascript:" class="ssmla btn-start-notifications"> + <i class="fa fa-bell"></i><?php if (@Yii::app()->session["userId"] == $element["_id"]) echo "Mes n"; else echo "N"; ?>otifications + <span class="badge notifications-countElement <?php if(!@$countNotifElement || (@$countNotifElement && $countNotifElement=="0")) echo 'badge-transparent hide'; else echo 'badge-success'; ?>"> + <?php echo @$countNotifElement ?> + </span> + </a> + </li> + <?php } ?> + <li class=""> + <a href="javascript:" class="ssmla" id="btn-start-detail"> + <i class="fa fa-info-circle"></i> <?php echo Yii::t("common","About"); ?> + </a> + </li> + + <?php if ($type==Project::COLLECTION || $type==Organization::COLLECTION){ + if(@$element["properties"] && @$element["properties"]["chart"]) + $countChart=count($element["properties"]["chart"]); + if(@$countChart || $edit || $openEdition){ ?> + <li class=""> + <a href="javascript:" class="ssmla <?php if(@$countChart) echo "btn-start-chart"; else echo "edit-chart"; ?>"> + <i class="fa fa-heartbeat"></i> <?php echo Yii::t("chart", "Our values"); if(@$countChart) echo " (".$countChart.")" ?> + </a> + </li> + <?php } } ?> + + <?php if ($type==Project::COLLECTION || $type==Organization::COLLECTION || $type==Event::COLLECTION){ ?> + <li class=""> + <a href="javascript:" data-toggle="modal" data-target="#selectCreate" + id="btn-start-contacts" class="ssmla"> + <i class="fa fa-envelope"></i> <?php echo Yii::t("common","Contact us"); ?> + </a> + </li> + <?php } ?> + + + <li class=""> + <a href="javascript:" class="ssmla" id="btn-start-gallery"> + <i class="fa fa-camera"></i> <?php echo Yii::t("common","Gallery"); ?> + </a> + </li> + <li class=""> + <a href="javascript:" class="ssmla" id="btn-start-library"> + <i class="fa fa-book"></i> <?php echo Yii::t("common","Library"); ?> + </a> + </li> + + + <!--<li class=""> + <a href="javascript:" class="ssmla" id="btn-start-urls"> + <i class="fa fa-external-link"></i> <?php echo Yii::t("common","Urls"); ?> + </a> + </li> + --> + <li><hr></li> + <?php if( $type != Poi::COLLECTION + && ( $type != Person::COLLECTION || + Preference::showPreference( $element, $type, "directory", Yii::app()->session["userId"]) ) ) { ?> + + <?php if($type == Person::COLLECTION ) { ?> + <li class=""> + <a href="javascript:" class="ssmla capitalize load-data-directory" + data-type-dir="<?php echo @Element::$connectAs[$type]; ?>" data-icon="link"> + <i class="fa fa-link"></i> <?php echo Yii::t("common",@Element::$connectAs[$type]); ?> + </a> + </li> + <?php } ?> + + <li class=""> + <a href="javascript:" class="ssmla capitalize load-data-directory" + data-type-dir="<?php echo @Element::$connectTypes[$type]; ?>" data-icon="users"> + <i class="fa fa-users"></i> <?php echo Yii::t("common",@Element::$connectTypes[$type]); ?> + </a> + </li> + + <?php if($type != Person::COLLECTION && $type != Event::COLLECTION) { ?> + <li class=""> + <a href="javascript:" class="ssmla capitalize load-data-directory" + data-type-dir="followers" data-icon="link"> + <i class="fa fa-link"></i> <?php echo Yii::t("common","followers"); ?> + </a> + </li> + <?php } ?> + <?php if($type != Person::COLLECTION) { ?> + <li class=""> + <a href="javascript:" class="ssmla capitalize load-data-directory" + data-type-dir="guests" data-icon="send"> + <i class="fa fa-send"></i> <?php echo Yii::t("common","Guests"); ?> + </a> + </li> + <?php } ?> + + + <?php if ($type==Person::COLLECTION){ ?> + <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="collections" data-icon="star"> + <i class="fa fa-star"></i> <?php echo Yii::t("common","Collections"); ?> + </a> + </li> + + <li><hr></li> + <?php } ?> + + <?php if(!@$front || (@$front && $front["event"]==true)){ + if($type==Event::COLLECTION) + $label=Yii::t("common","Program"); + else + $label=Yii::t("common","Agenda"); + ?> + <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="events" data-icon="calendar"> + <i class="fa fa-calendar"></i> <?php echo $label; ?> + </a> + </li> + <?php if ($type==Person::COLLECTION){ ?> + <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="organizations" data-icon="group"> + <i class="fa fa-group"></i> <?php echo Yii::t("common","Organizations"); ?> + </a> + </li> + <?php } ?> + <?php if ($type==Person::COLLECTION || $type==Project::COLLECTION || $type==Organization::COLLECTION){ ?> + <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="projects" data-icon="lightbulb-o"> + <i class="fa fa-lightbulb-o"></i> <?php echo Yii::t("common","Projects"); ?> + </a> + </li> + <li><hr></li> + <?php } ?> + <?php } ?> + + <?php if ($type==Project::COLLECTION || $type==Organization::COLLECTION || + $type==Event::COLLECTION || $type==Person::COLLECTION){ + if(!@$front || (@$front && $front["poi"])){ + ?> + <li> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="poi" data-icon="map-marker"> + <i class="fa fa-map-marker"></i> <?php echo Yii::t("common","Points of interest"); ?> + </a> + </li> + <?php } + } ?> + + <?php if( $type!=Event::COLLECTION && ( !@$front || (@$front && $front["need"]==true))){ ?> + <li><hr></li> + <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="classified" data-icon="bullhorn"> + <i class="fa fa-bullhorn"></i> <?php echo Yii::t("common","Classifieds"); ?> + </a> + </li> + <?php } ?> + <li><hr></li> + + <?php } ?> + + <!-- <li class=""> + <a href="javascript:" class="ssmla load-data-directory" data-type-dir="dda" data-icon="gavel"> + <i class="fa fa-gavel"></i> <?php echo Yii::t("common","Cooperative space"); ?> + </a> + </li> + + <li><hr></li> --> +</ul> + + diff --git a/views/pod/needsList.php b/views/pod/needsList.php new file mode 100755 index 0000000000000000000000000000000000000000..5005e2bd0b85353c27b12be2767d87c81f52ecf0 --- /dev/null +++ b/views/pod/needsList.php @@ -0,0 +1,102 @@ +<?php + +$cssAnsScriptFilesTheme = array( + +'/plugins/perfect-scrollbar/src/perfect-scrollbar.css' +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme,Yii::app()->request->baseUrl); +?> + +<div class="panel panel-white"> + <div class="panel-heading border-light bg-dark"> + <h4 class="panel-title text-left"><i class="fa fa-cubes"></i> <?php echo Yii::t("need","Needs",null,Yii::app()->controller->module->id); ?></h4> + </div> + <?php if( ($isAdmin || $openEdition) && isset(Yii::app()->session["userId"]) ) { ?> + <div class="panel-tools"> + <a class="tooltips btn btn-xs btn-light-blue lbh" data-placement="top" data-toggle="tooltip" data-original-title="<?php echo Yii::t("need","Add need to find energies to help you") ?>" onclick="showElementPad('addneed')"> + + <i class="fa fa-plus"></i> Ajouter un besoin + </a> + + <button onclick="dyFObj.openForm('ressource','sub')" class="btn btn-default letter-blue margin-top-5"> + <b><i class="fa fa-plus"></i> Ajouter une ressource </b> + </button> + </div> + <?php } ?> + <div class="panel-body no-padding"> + <div class="panel-scroll height-230 ps-container"> + <table class="table table-striped table-hover <?php if (empty($needs)) echo " hide"; ?>"> + <tbody> + <?php + if (isset($needs) && !empty($needs)){ + foreach ($needs as $key => $data) { + if(!empty($data["name"])){ + if ($data["type"]=="materials") + $icon="fa-bullhorn"; + else + $icon="fa-gears"; ?> + <tr> + <td class="center"> + <i class="fa <?php echo $icon; ?> fa-2 text-blue"></i> + </td> + <td class="text-left"> + <span class="text-large"><?php echo $data["name"]; ?></span> + <a href="javascript:;" class="btn" onclick="showElementPad('need', '<?php echo $data['_id'] ?>')"><i class="fa fa-chevron-circle-right"></i></a> + </td> + </tr> + <?php } + } + } ?> + </tbody> + </table> + <?php if(isset($needs) && !empty($needs)){ ?> + <div class="ps-scrollbar-y-rail" style="top: 17px; right: 3px; height: 230px; display: inherit;"> + <div class="ps-scrollbar-y" style="top: 11px; height: 200px;"></div> + </div> + <?php } ?> + <?php if (empty($needs)){ ?> + <div id="infoPodOrga" class="padding-10 info-no-need"> + <blockquote> + Faites connaître vos besoins pour développer votre activité : matériels, savoirs, compétences... + <?php //echo Yii::t("need","Create needs<br/>Materials<br/>Knowledge<br/>Skills<br/>To call ressources that you need",null,Yii::app()->controller->module->id); ?> + </blockquote> + </div> + <?php } ?> + </div> + </div> +</div> + +<script type="text/javascript" > +jQuery(document).ready(function() { + +}); +function updateNeed(data){ + if($(".table-need").hasClass("hide")==true){ + $(".table-need").removeClass("hide"); + $(".info-no-need").addClass("hide"); + } + dataNeed=data["newNeed"]; + if (dataNeed.type=="materials") + iconNeed="fa-bullhorn"; + else + iconNeed="fa-gears"; + trNeed = '<tr id="need">'+ + '<td class="organizationLine">'+ + '<i class="fa '+iconNeed+' fa-2x text-blue"></i>'+dataNeed.type+ + '</td>'+ + '<td ><a href="#showNeed" class="showNeed">'+dataNeed.name+'</a></td>'+ + '<td>'+ + dataNeed.quantity+ + '</td>'+ + '<td>'+ + dataNeed.benefits+ + '</td>'+ + '<td>'+ + '<a href="'+data.url+'" class="btn showNeed"><i class="fa fa-chevron-circle-right"></i></a>'+ + '</td>'+ + '</tr>'; + $(".tableNeedLines").append(trNeed); +} + +</script> diff --git a/views/pod/nowList.php b/views/pod/nowList.php new file mode 100755 index 0000000000000000000000000000000000000000..6c3d732eed078b9e8e547c5cd6cb90692de98303 --- /dev/null +++ b/views/pod/nowList.php @@ -0,0 +1,209 @@ +<?php + /*if(Yii::app()->session["userId"] != $element["_id"] && + !Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"])) + echo "pouetttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt"; + // return; + + echo Preference::showPreference($element, $type, "locality", Yii::app()->session["userId"]) ? "yes" : "no";*/ + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + $CO2DomainName = isset(Yii::app()->params["CO2DomainName"]) ? Yii::app()->params["CO2DomainName"] : "CO2"; +?> + +<style> + hr.angle-down::after { + background-color: #e6344d; + } + hr.angle-down{ + border-color: #e6344d; + } + .el-nowList{ + cursor: pointer; + } +</style> + +<?php if(empty($result) && !@Yii::app()->session["userId"]){ ?> + <h4 class="text-dark text-center"> + Aucune donnée relative à votre communexion n'a été trouvée + </h4> +<?php } ?> + +<div class="col-xs-12 no-padding col-nowList" data-tpl="pod.nowList"> + <?php + if( (!@$scope || @$scope=="") && $open == true){ + if($type=="citoyens" && $id==@Yii::app()->session["userId"]){ + $this->renderPartial($layoutPath.'pod.'.Yii::app()->params["CO2DomainName"].".notCommunected"); + } + ?> + <?php } else { ?> + <h6 class="no-margin header-nowList" style="font-size:13px"> + <i class="fa fa-cog letter-red hidden"></i> <i class="fa fa-bell"></i> + <?php echo Yii::t("common","Territorial activity") ?> + + <br> + + <?php + if($CO2DomainName == "kgougle"){ ?> + <button class="btn btn-link letter-red btn-xs pull-left no-padding btn-change-loc" + data-toggle="modal" data-target="#modalLocalization"> + <i class="fa fa-map-marker"></i> <?php echo $scope["name"]; ?> + </button> + <br> + <?php }else{ ?> + <small class="text-red"><i class="fa fa-map-marker"></i> <?php echo $scope["name"]; ?></small> + <?php } ?> + </h6> + + + + <hr class="angle-down"> + <center> + <button class="btn btn-default btn-sm btn-show-onmap block" id="btn-show-activity-onmap"> + <i class="fa fa-map-marker"></i> <?php echo Yii::t("common","Show on the map") ?> + </button> + </center> + <br> + <!-- <hr class="margin-5 margin-bottom-10"> --> + <?php + foreach ($result as $key => $v) { + + $specs = Element::getElementSpecsByType(@$v["type"]); + + $type = null; + if(@$specs) $type = @$v["type"]; + else if(@$v["typeSig"]) $type = $v["typeSig"]; + + $class = ""; + $img = Element::getImgProfil($v, "profilThumbImageUrl", $this->module->assetsUrl); + if(!@$v["profilMediumImageUrl"] || $v["profilThumbImageUrl"] == "") + $class = "no-img"; + //echo "class:".$class; + ?> + <!-- <a href="#page.type.<?php echo @$v["type"] ?>.id.<?php echo (@$v["_id"]?$v["_id"]:@$v["id"]); ?>" --> + + <div class="shadow2 border-left-<?php echo @$specs["text-color"]?> margin-bottom-5 col-xs-12 no-padding el-nowList <?php echo $type?> <?php echo $class; ?>" data-type="<?php echo @$v["type"] ?>" data-id="<?php echo (@$v["_id"]?$v["_id"]:@$v["id"]); ?>"> + <div class="pull-left no-padding cnt-img"> + <div class="add2fav elemt_img"> + <img src="<?php echo $img ?>" class="pull-left hidden-xs"> + </div> + </div> + <div class="pull-left elemt_name elipsis"> + <i class="fa fa-<?php echo $specs["icon"]?> text-<?php echo @$specs["text-color"]?>"></i> + <span class=""><?php echo $v["name"]; ?></span> + <?php + $id = null; + if(@$v["_id"]) + $id = (string)@$v["_id"]; + else if(@$v["id"]) + $id = $v["id"]; + //echo ($type) ? Element::getLink(@$type."s",$id) : "no type"; //echo @$type;?> + </div><br> + <div class="elemt_date pull-left text-left elipsis"> + <span class="dateTZ"> + <?php echo @$v["updatedLbl"];?> + <?php if(@$v["price"]) echo " | <span class='text-azure'>" .@$v["price"].' '.@$v["devise"].'</span>';?> + </span> + <?php if(@$v["address"]["addressLocality"]) { ?> + <span class="address text-red"> + <i class="fa fa-map-marker margin-left-5"></i> <?php echo @$v["address"]["addressLocality"]; ?> + </span> + <?php } ?> + + <?php //DDA : if( @$v["organizerType"] && @$v["organizerId"] ) echo "-".Element::getLink( @$v["organizerType"],@$v["organizerId"] )?> + <?php //DDA : if( @$v["parentType"] && @$v["parentId"] ) echo ">".Element::getLink( @$v["parentType"],@$v["parentId"] )?> + + <?php //if( @$v["creator"] ) echo ">".Element::getLink( Person::COLLECTION,@$v["creator"] )?> + </div> + </div> + <div class="previewLocalActivity hidden" id='localActivity<?php echo @$v["type"] ?><?php echo (@$v["_id"]?$v["_id"]:@$v["id"]); ?>'> + </div> + <?php } ?> + + <?php } ?> +</div> + +<?php if($CO2DomainName == "kgougle"){ + $this->renderPartial($layoutPath.'modals/'.Yii::app()->params["CO2DomainName"]."/citiesNC"); + } +?> + +<script type="text/javascript" > + +var localActivity = <?php echo json_encode($result); ?>; + +jQuery(document).ready(function() { + mylog.log("LIVENOW", localActivity); + $.each(localActivity, function(key, data){ + if(typeof data.geo != "undefined" && data.geo.latitude == "") + mylog.log("LIVENOW geo", data.geo, data); + }); + // $(".elemt_date").each(function() { + // var elementTime = $(this).children(".dateTZ").attr("data-time"); + // var elementDate = new Date(elementTime * 1000); + // $(this).children(".dateTZ").text(elementDate.toLocaleDateString() + " " + elementDate.toLocaleTimeString()); + // }); + + $("#btn-show-activity-onmap").click(function(){ + Sig.showMapElements(Sig.map, localActivity, "clock-o", "Activité territoriale"); + showMap(true); + }); + //$('#mapLegende').html("<i class='fa fa-clock-o'></i> Activité territoriale"); + //$('#mapLegende').show(); + + $(".el-nowList").click(function(){ + var id = $(this).data("id"); + var type = $(this).data("type"); + mylog.log("try open", id, type); + var data = ""; + $.each(localActivity, function(key, value){ + if(key==id) data = Object.assign({}, value); + }); + mylog.log("try open data", data); + + $(".el-nowList").removeClass("hidden"); + $(this).addClass("hidden"); + $(".previewLocalActivity").addClass("hidden"); + $(".previewLocalActivity").html(""); + + if(data!=""){ + var html = directory.showResultsDirectoryHtml(new Array(data), type); + mylog.log("try open html", html); + $("#localActivity"+type+id).html(html); + $("#localActivity"+type+id).removeClass("hidden"); + $("#localActivity"+type+id).off().mouseleave(function(){ + $(this).addClass("hidden").html(""); + $(".el-nowList").removeClass("hidden"); + }); + bindLBHLinks(); + initBtnShare(); + } + + }); + + $(".btn-communecter").click(function(){ + communecterUser(); + }); + + if(typeof contextData != "undefined" && notNull(contextData) && typeof contextData.address != "undefined" && typeof contextData.address.addressLocality != "undefined") + $(".btn-change-loc").append(" - " + contextData.address.addressLocality); +}); + +function enlargeNow() { + if(!$(".col-feed.closed").length){ + $(".titleNowEvents .btnhidden").show(); + $("#enlargeNow").attr("class","fa fa-caret-right"); + $(".col-feed").attr("class","hidden col-feed closed"); + $(".col-updated").attr("class","col-xs-12 col-updated"); + $("#nowList").attr("class","col-xs-12 no-padding"); + $(".el-nowList").removeClass("col-xs-12").addClass('col-xs-3'); + + } else { + $(".titleNowEvents .btnhidden").hide(); + $("#enlargeNow").attr("class","fa fa-caret-left"); + $(".col-feed").attr("class","col-xs-12 col-md-9 col-feed"); + $(".col-updated").attr("class","col-xs-12 col-md-3 col-updated"); + $("#nowList").attr("class","col-xs-12 no-padding"); + $(".el-nowList").removeClass('col-xs-3').addClass("col-xs-12"); + } +} + +</script> \ No newline at end of file diff --git a/views/pod/projectsList.php b/views/pod/projectsList.php new file mode 100755 index 0000000000000000000000000000000000000000..2f5adf64d98c23ab4103b432de028db2adb9bfed --- /dev/null +++ b/views/pod/projectsList.php @@ -0,0 +1,153 @@ +<?php +$cssAnsScriptFilesTheme = array( +//Select2 + + //autosize + //Select2 + '/plugins/select2/select2.css', + '/plugins/select2/select2.min.js', + //autosize + '/plugins/autosize/jquery.autosize.min.js', + + '/plugins/jQuery-Knob/js/jquery.knob.js', + '/plugins/perfect-scrollbar/src/perfect-scrollbar.css', +); + +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme,Yii::app()->request->baseUrl); +?> +<div class="panel panel-white"> + <div class="panel-heading border-ligh bg-purple"> + <h4 class="panel-title"><i class="fa <?php echo Project::ICON ?> "></i> <?php echo Yii::t("project","Projects",null,Yii::app()->controller->module->id) ?></h4> + </div> + <div class="panel-tools"> + <?php if( @$authorised || $openEdition && isset(Yii::app()->session["userId"]) ) { ?> + <a href="javascript:dyFObj.openForm('project','sub')" class="btn btn-xs btn-light-blue tooltips" data-toggle="tooltip" data-placement="top" title="Add a project" alt="Add a project"><i class="fa fa-plus"></i> Créer un nouveau projet</a> + <?php } ?> + <a id="showHideOldProject" class="tooltips btn btn-xs btn-light-blue" href="javascript:;" data-placement="top" data-toggle="tooltip" data-original-title="<?php echo Yii::t("project","Display/Hide old projects",null,Yii::app()->controller->module->id) ?>" onclick="toogleOldProject()"> + + <i class="fa fa-history"></i> <?php echo Yii::t("project","Old projects",null,Yii::app()->controller->module->id) ?> + </a> + </div> + <div class="panel-body no-padding"> + <div class="panel-scroll height-230 ps-container" style="overflow-y: scroll;"> + <?php + $nbOldProjects = 0; + $nbProjectsVisible = 0; + if(isset($projects) && count($projects)>0){ ?> + <table class="table table-striped table-hover" id="projects"> + <tbody> + <?php + foreach ($projects as $e) { + if (!empty($e["endDate"])) { + $endDate = strtotime($e["endDate"]); + } + + if (empty($e["endDate"]) || $endDate > time()) { + $projectStyle = ""; + $projectClass = ""; + $nbProjectsVisible++; + } else { + $projectStyle = "display:none;"; + $projectClass = "oldProject"; + $nbOldProjects++; + } + ?> + <tr class="<?php echo $projectClass ?>" style="<?php echo $projectStyle ?>" id="project<?php echo (string)$e["_id"];?>" style="padding:5px 0px;"> + <td class="center" style="padding-left: 15px;"> + <?php $url = '#page.type.'.Project::COLLECTION.'.id.'.$e["_id"];?> + <a href="<?php echo $url?>" class="lbh text-dark"> + <?php if ($e && isset($e["imagePath"])){ ?> + <img width="50" height="50" alt="image" class="img-circle" src="<?php echo $e["imagePath"]; ?>"> + <?php } else { ?> + <i class="fa fa-lightbulb-o fa-2x text-purple"></i> + <?php } ?> + </a> + </td> + <td> + <a href="<?php echo $url?>" class="lbh text-dark"> + <?php if(isset($e["name"]))echo $e["name"]?> + </a> + </td> + <td class="center"> + <div class="visible-md visible-lg visible-lg" > + <?php if( @$authorised ) { ?> + <a href="#" class="removeProjectbtn btn btn-xs btn-grey tooltips delBtn" data-id="<?php echo (string)$e["_id"];?>" data-name="<?php echo (string)$e["name"];?>" data-placement="top" data-original-title="Remove"><i class="fa fa-times fa fa-white"></i></a> + <?php }; ?> + </div> + </td> + </tr> + <?php } ?> + </tbody> + </table> + <?php } ?> + <?php if(isset($projects) && count($projects) > 0 ){ ?> + <div class="ps-scrollbar-y-rail" style="top: 0px; right: 3px; height: 230px; display: inherit;"><div class="ps-scrollbar-y" style="top: 11px; height: 200px;"></div></div> + <?php } ?> + <?php if($nbOldProjects==0 && $nbProjectsVisible==0) {?> + <div id="info" class="padding-10"> + <blockquote> + <!--Créez des projets ...--> + <?php echo Yii::t("project","Create or Contribute <br>Build Things<br>Find Help<br>Organize<br>Local or distant<br>Projects") ?> + </blockquote> + </div> + <?php } ?> + <?php if($nbProjectsVisible==0 && $nbOldProjects > 0) {?> + <div id="infoLastButNotNew" class="padding-10"> + <blockquote> + <?php echo Yii::t("project","Create new projects <br>To show your current activity<br>And what's happened around people") ?> + </blockquote> + </div> + <?php } ?> + </div> + </div> +</div> +<script type="text/javascript"> + var nbOldProjects = <?php echo (String) @$nbOldProjects;?>; + jQuery(document).ready(function() { + if (nbOldProjects == 0) $("#showHideOldProject").hide(); + bindBtnRemoveProject(); + }); + + function bindBtnRemoveProject() { + $(".removeProjectbtn").off().on("click",function () { + $(".disconnectBtnIcon").removeClass("fa-unlink").addClass("fa-spinner fa-spin"); + + var idProject = $(this).data("id"); + bootbox.confirm("Are you sure you want to delete <span class='text-grey'>"+$(this).data("name")+"</span> project ?", + function(result) { + if (!result) { + $(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + return; + } + + mylog.log(idProject); + $.ajax({ + type: "POST", + url: baseUrl+"/"+moduleId+"/project/removeproject/projectId/"+idProject+"", + dataType: "json", + success: function(data){ + if ( data && data.result ) { + toastr.info("PROJECT REMOVED SUCCESFULLY!!"); + $("#project"+idProject).remove(); + if ($("#projects tr").length == 0) { + $("#info").show(); + } + } else { + toastr.error(data.msg); + } + }, + error: function(data) { + toastr.error("Something went wrong!! Contact your administrator"); + } + }); + }); + + $(".disconnectBtnIcon").removeClass("fa-spinner fa-spin").addClass("fa-unlink"); + }); + } + + function toogleOldProject() { + $(".oldProject").toggle("slow"); + $("#infoLastButNotNew").toggle("slow"); + } +</script> \ No newline at end of file diff --git a/views/pod/qrcode.php b/views/pod/qrcode.php new file mode 100755 index 0000000000000000000000000000000000000000..b4af3d567492d6f3cc83fea9a0734161c38e2b34 --- /dev/null +++ b/views/pod/qrcode.php @@ -0,0 +1,58 @@ +<!-- <div class="space20"></div> --> + +<div class="<?php echo (@$class) ? $class : 'row' ?> hidden margin-5 qrCodeContainerCl center" id="qrCodeContainer"> + + <h1 class="homestead text-red"><?php echo Yii::t("common","Printable content") ?></h1> + + <div class="col-xs-12 col-sm-5 col-sm-offset-1" > + <h3 class="pull-left homestead text-red"><?php echo Yii::t("common", "Calling card") ?></h3> + <div class="col-xs-12 center"> + <div style="border:1px dashed #666; width:400px;min-height:160px;padding:5px;margin:5px;"> + + <img class=" col-xs-5 img-responsive" src="<?php echo $img ?>"> + + <ul class="col-xs-7" style="list-style: none;margin-top:10px;"> + <?php echo (@$type && @OpenData::$elementTypes[$type]) ? + "<li class='btn btn-sm'>".OpenData::$elementTypes[$type]."</li>" : '' ?> + <?php echo (@$name) ? "<li class='bold'>".$name."</li>" : '' ?> + <?php echo (@$address) ? "<li>".$address."</li>" : '' ?> + <?php echo (@$address2) ? "<li>".$address2."</li>" : '' ?> + <?php echo (@$email) ? "<li>".$email."</li>" : '' ?> + <?php echo (@$url) ? "<li>".$url."</li>" : '' ?> + <?php echo (@$tel) ? "<li>".$tel."</li>" : '' ?>m + </ul> + </div> + </div> + </div> + + <div class="col-xs-12 col-sm-5 " > + <h3 class="pull-left homestead text-red"><?php echo Yii::t("common", "Connected calling card") ?></h3> + <div class="col-xs-12 center"> + <div style="border:1px dashed #666; width:400px;min-height:160px;padding:5px;margin:5px;"> + + <div class="col-xs-5 qrCode"> </div> + + <ul class="col-xs-7" style="list-style: none;margin-top:10px;"> + <?php echo (@$type && @OpenData::$elementTypes[$type]) ? + "<li class='btn btn-sm'>".OpenData::$elementTypes[$type]."</li>" : '' ?> + <?php echo (@$name) ? "<li class='bold'>".$name."</li>" : '' ?> + <?php echo (@$address) ? "<li>".$address."</li>" : '' ?> + <?php echo (@$address2) ? "<li>".$address2."</li>" : '' ?> + <?php echo (@$email) ? "<li>".$email."</li>" : '' ?> + <?php echo (@$url) ? "<li>".$url."</li>" : '' ?> + <?php echo (@$tel) ? "<li>".$tel."</li>" : '' ?>m + </ul> + </div> + </div> + + <div class="col-xs-12"> + <span class="text-red"><i class="fa fa-warning "></i> <?php echo Yii::t("common","This QR Code becomes iteractive with the app") ?> <a href="https://play.google.com/store/apps/details?id=org.communevent.meteor.pixelhumain&ah=lVN3mXqHKQjIOg3qHn0YzhiUebc&hl=fr" target="_blank">COMOBI</a></span> + </div> + <br/> + <a class="explainLink btn btn-default btn-sm" data-id="qrCodeExplain" href=""><?php echo Yii::t("common","Know more") ?> <i class="fa fa-question-circle"></i></a> + </div> + + + + +</div> \ No newline at end of file diff --git a/views/pod/sliderAgenda.php b/views/pod/sliderAgenda.php new file mode 100755 index 0000000000000000000000000000000000000000..1e7e3b8461849f5ddeb2a962de809774bc73dc23 --- /dev/null +++ b/views/pod/sliderAgenda.php @@ -0,0 +1,289 @@ +<style type="text/css"> + #sliderAgenda .flexslider{ + margin : 0px 0px 0px; + } + #sliderAgenda .flex-control-nav{ + opacity: 0; + } + #sliderAgenda{ + min-height: 230px; + max-height: 350px; + overflow: none; + } + .banniereSlider{ + position: relative; + overflow: hidden; + } + .addImgButton{ + position: absolute; + right: 0; + top: 0; + } + + #agendaNewPicture{ + display: none; + height: 260px; + } + #infoSlider{ + padding-top: 50px; + position: relative; + } + + .banniereSlider img, .banniereSlider .defaultImage { + left: 0; + position: absolute; + vertical-align: middle; + width: 100%; + + } + +</style> + + +<div id="sliderAgenda"> + <div class="panel panel-white"> + + <div class="panel-heading border-light"> + <h4 class="panel-title slidesAgendaTitle text-center"> <i class='fa fa-cog fa-spin fa-2x icon-big text-center'></i> <?php echo Yii::t("sliderAgenda","Loading Shared Calendar Section",null,Yii::app()->controller->module->id) ?>/h4> + </div> + + <div class="panel-tools"> + + <?php if(isset($canEdit) && $canEdit){ ?> + <a href="#newEvent" class="init-event btn btn-xs btn-light-blue tooltips" data-toggle="tooltip" data-placement="top" title="Add an Event" alt="<?php echo Yii::t("sliderAgenda","Add an event",null,Yii::app()->controller->module->id) ?>"><i class="fa fa-plus"></i></a> + <?php } ?> + </div> + + <div class="panel-body panel-portfolio radius-bottomRightLeft no-padding"> + + <!-- Slider --> + <div class="flexslider" id="flexsliderAgenda"> + <ul class="slides" id="slidesAgenda"></ul> + </div> + + <!--FileUploader --> + <!--<div id="agendaNewPicture"> + <div class="agendaNewPicture" ></div> + <div class="row center"> + <a href="#" class="btn btn-light-blue validateSliderAgenda">Terminer </a> + </div> + </div> --> + + </div> + </div> +</div> + +<script type="text/javascript"> + + /* PHP Variable + events : list of the context users events + contentID : type of the picture + */ + + var canEditAgenda = "<?php if(isset($canEdit)){ echo $canEdit;}else{ echo false;} ?>"; + var editAgenda = "<?php if(isset($canEdit)) echo $canEdit; else echo false; ?>" + var eventTest = <?php echo (isset($eventTest)) ? json_encode($eventTest) : "{}" ?>; + var controllerId = "<?php echo Yii::app()->controller->id; ?>" + + var eventsAgenda = <?php echo (isset($eventsAgenda)) ? json_encode($eventsAgenda) : "{}" ?>; + var tabSlide = []; + jQuery(document).ready(function() { + initSlides(); + initDashboardAgenda(tabSlide); + + $('.init-event').off().on("click", function(){ + $.subview({ + content : "#ajaxSV", + onShow : function() { + var url = ""; + if("undefined" != typeof organization){ + url = baseUrl+"/"+moduleId+"/event/eventsv/id/<?php echo $_GET["id"]?>/type/<?php echo Organization::COLLECTION ?>"; + }else{ + url = baseUrl+"/"+moduleId+"/event/eventsv/id/<?php echo $_GET["id"]?>/type/<?php echo Person::COLLECTION ?>"; + } + getAjax("#ajaxSV", url, function(){bindEventSubViewEvents(); $(".new-event").trigger("click");}, "html"); + }, + onSave : function() { + $('.form-event').submit(); + }, + onHide : function() { + //$.hideSubview(); + } + }); + }) + }); + + + function bindBtnSliderAgenda(){ + // Close fileupload div anc clear slider + $(".validateSliderAgenda").off().on("click", function() { + clearFileUploadAgenda(); + }) + + $(".owl-prev").off().on("click", function(){ + $('#flexsliderAgenda').flexslider("prev"); + }) + + $(".owl-next").off().on("click", function(){ + $('#flexsliderAgenda').flexslider("next"); + }) + + $(window).on('resize', function(){ + resizeSliderAgenda(); + }); + } + + function initSlides(){ + var today = new Date(); + + // if false init slider with empty message + var emptySlide = true; + + // dynamic width and height for the slides images + + $.each(eventsAgenda, function(k, v){ + emptySlide = false; + var endDate = v.endDate; + var startDate = v.startDate; + mylog.log(startDate,endDate); + if('undefined' != typeof startDate && 'undefined' != typeof endDate){ + mylog.log("evenAgenda", v.imageUrl); + mylog.log("date", startDate, endDate); + var period = formatPeriodValue(startDate, endDate); + var date = new Date(endDate.split("-")[2].split(" ")[0], parseInt(endDate.split("-")[1])-1, endDate.split("-")[0]); + notEmptySlide = true; + var imageUrl = "<div class='defaultImage' ></br><i class='fa fa-calendar fa-5x text-red'></i><br> <?php echo Yii::t('sliderAgenda','No picture for this event',null,Yii::app()->controller->module->id) ?> </div>"; + if ('undefined' != typeof v.imageUrl && v.imageUrl != ""){ + imageUrl = "<img src='"+baseUrl +"/" + moduleId +"/document/resized/750x338"+ v.imageUrl+"'></img>"; + } + var htmlRes = "<li>"+ + "<div class='center' >"+ + "<div class='banniereSlider col-md-12'>"+ + imageUrl+ + "</div>"+ + "</div>"+ + "<div class='center' >"+ + "<div class=' globLeftPartWhiteBlockAgendaPartage'>"+ + "<span class='jourAgenda' class='text-right'>"+period[0]+"</span><br/>"+ + "<span class='moisAgenda' class='text-right'>"+period[1]+"</span>"+ + "</div><br>"+ + "<div class='radius-bottomLeftRight_Mobile pull-bottom globRightPartWhiteBlockAgendaPartage'>"+ + "<div class='globTitlePostAgenda'>"+ + "<span class='titlePostAgenda font_Helvetica'>"+v.name+"</span>"+ + "</div>"+ + "<a class='identButton btn btn-green btn-block text-left radius-bottomRight addItalic' href='"+baseUrl + "/" + moduleId + "/event/dashboard/id/"+v["_id"]["$id"]+"'>"+ + "En savoir + <i class='fa fa-chevron-right'></i>" + "</a>"+ + "</div>"+ + "</div>"+ + "</li>"; + + tabSlide.push(htmlRes); + } + }) + + if(emptySlide){ + var message ="<br><?php echo Yii::t('sliderAgenda','No upcoming events',null,Yii::app()->controller->module->id) ?>" + if(canEditAgenda) + message+= "<br><?php echo Yii::t('fileUpload','Click on',null,Yii::app()->controller->module->id) ?> <i class='fa fa-plus'></i> <?php echo Yii::t('sliderAgenda','to add a new event',null,Yii::app()->controller->module->id) ?>"; + var htmlRes = "<li>"+ + "<div class='banniereSlider center' >"+ + " </br><i class='fa fa-calendar fa-5x text-red'></i>"+message+ + "</div>"+ + "</li>"; + tabSlide.push(htmlRes); + //$("#slidesAgenda").append(htmlRes); + } + } + /* + Init the flexSlider with the next events or with default empty message + */ + + function initDashboardAgenda(tab){ + + var width = parseInt($("#sliderAgenda .panel-body").css("width")); + var height = parseInt($("#sliderAgenda").css("min-height"))*80/100; + + for(var i=0; i<tab.length; i++){ + $("#slidesAgenda").append(tab[i]); + } + // reload Slider + $("#flexsliderAgenda").flexslider({ + animationLoop: true, + animation : "slide", + slideshow: true, + }); + + $(".slidesAgendaTitle").html("<?php echo Yii::t('sliderAgenda','SHARED CALENDAR',null,Yii::app()->controller->module->id) ?>"); + $(".banniereSlider").css("height", height); + $(".defaultImage").css("height", height); + + bindBtnSliderAgenda(); + //showCalendarDashBoard(data); + } + + //Return true if the date d < date f + function compareDate(d, f){ + var res = false; + mylog.log(d, f, d<= f) + if(d <= f){ + res= true; + } + return res; + } + + //convert a period to a string + function formatPeriodValue(d, f){ + mylog.log("getStringPeriodValue : ",d,f); + var mapMonth = {"01":"JANV.", "02": "FEVR.", "03":"MARS", "04":"AVRIL", "05":"MAI", "06":"JUIN", "07":"JUIL.", "08":"AOUT", "09":"SEPT.", "10":"OCTO.", "11":"NOVE.", "12":"DECE."}; + var strPeriod = []; + var dTab = []; + var fTab = []; + + var dHour = d.split(" ")[1]; + var dDay = d.split(" ")[0].split("-"); + for(var i=0; i<dDay.length; i++){ + dTab.push(dDay[i]); + } + + var fHour = f.split(" ")[1]; + var fDay = f.split(" ")[0].split("-"); + for(var i=0; i<fDay.length; i++){ + fTab.push(fDay[i]); + } + + if(dTab[0] == fTab[0]){ + if(dTab[1] == fTab[1]){ + if(dTab[2]== fTab[2]){ + strPeriod[0] = parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[1]; + strPeriod[1] = " de "+dHour+" à "+fHour; + }else{ + strPeriod[0] = parseInt(dTab[2])+" au "+ parseInt(fTab[2]); + strPeriod[1] = mapMonth[fTab[1]]+" "+fTab[0]; + } + }else{ + strPeriod[0] = parseInt(dTab[2])+" "+mapMonth[dTab[1]]; + strPeriod[1] = " au "+ parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[0]; + } + }else{ + strPeriod[0] = parseInt(dTab[2])+" "+mapMonth[dTab[1]]+" "+dTab[0]+" au "; + strPeriod[1] = parseInt(fTab[2])+" "+mapMonth[fTab[1]]+" "+fTab[2]; + } +// mylog.table(strPeriod); + return strPeriod; + } + + + function resizeSliderAgenda(){ + $('#flexsliderAgenda').removeData("flexslider") + $('#flexsliderAgenda').empty(); + $('#flexsliderAgenda').append('<ul class="slides" id="slidesAgenda">'); + /*$('#flexsliderAgenda').append('<div class="navigator padding-0" id="globWhiteBlockAgendaPartage">'+ + '<a href="javascript:;" class="circle-50 partition-grey owl-prev"><i class="fa fa-chevron-left text-extra-large"></i></a>'+ + '<a href="javascript:;" class="circle-50 partition-grey owl-next"><i class="fa fa-chevron-right text-extra-large"></i></a>'+ + '</div>'); + */ + initDashboardAgenda(tabSlide); + } + + </script> \ No newline at end of file diff --git a/views/pod/sliderMedia.php b/views/pod/sliderMedia.php new file mode 100644 index 0000000000000000000000000000000000000000..1504e8c5de82fc6fc5a6545341799d652ac23315 --- /dev/null +++ b/views/pod/sliderMedia.php @@ -0,0 +1,143 @@ +<style type="text/css"> + .carousel-media > ol > li.active{ + margin:1px; + border-top: 5px solid #EF5B34 !important; + } + .carousel-media > ol > li{ + width: 60px !important; + background-color: inherit; + border: inherit !important; + height: 65px !important; + border-radius: inherit; + border-top: 5px solid lightgray !important; + text-indent: inherit; + } + + .carousel-media > ol > li > img{ + float:left; + width:60px; + height:60px; + } + .carousel-media > ol > li > span{ + position: relative; + float:left; + top: -60px; + line-height: 60px; + width:60px; + } + .carousel-media > ol > li > span > i{ + vertical-align: middle; + } + .carousel-media > ol{ + bottom: -85px + } + .carousel-media .carousel-indicators{ + left:30%; + width: 100%; + } + .carousel-media{ + margin-bottom: 100px; + } + .carousel-media .carousel-inner{ + max-height: 550px; + } + + .carousel-media .carousel-inner .item > img{ + width: 100%; + } + #mediaAbout .carousel-media > ol > li{ + border-top: inherit !important; + } + #mediaAbout .carousel-media > ol{ + text-align: left; + left:31%; + z-index: 1; + } +</style> + +<?php if(@$onlyItem){ ?> +<div class="col-md-12 no-padding carousel-media"> + <!-- Indicators --> + <ol class="carousel-indicators"> +<?php + $i=0; + if(!empty($medias)){ + foreach ($medias as $data){ ?> + <li><img src="<?php echo $data["content"]["image"] ?>" alt=""><span class="text-white text-center"><i class="fa fa-2x fa-play-circle-o"></i></span></li> + + <?php $i++; + } } ?> + <?php + if(!empty($images)){ + foreach ($images as $data){ ?> + <li><img src="<?php echo $data["imageThumbPath"] ?>" alt=""></li> + + <?php $i++; + } } ?> + <!--<li data-target="#myCarousel" data-slide-to="0" class="active"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion4.jpg" alt="Reunion 1"></li> + <li data-target="#myCarousel" data-slide-to="1"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" alt="Reunion 1"></li>--> + </ol> +</div> +<?php }else{ ?> +<div id="myCarousel" class="col-md-12 no-padding carousel carousel-media slide" data-ride="carousel"> + <!-- Indicators --> + <ol class="carousel-indicators"> + <?php + $i=0; + if(!empty($medias)){ + foreach ($medias as $data){ ?> + <li data-target="#myCarousel" data-slide-to="<?php echo $i; ?>" class="<?php if($i==0) echo "active"; ?>"><img src="<?php echo $data["content"]["image"] ?>" alt=""><span class="text-white text-center"><i class="fa fa-2x fa-play-circle-o"></i></span></li> + + <?php $i++; + } } ?> + <?php + if(!empty($images)){ + foreach ($images as $data){ ?> + <li data-target="#myCarousel" data-slide-to="<?php echo $i; ?>" class="<?php if($i==0) echo "active"; ?>"><img src="<?php echo $data["imageThumbPath"] ?>" alt=""></li> + + <?php $i++; + } } ?> + <!--<li data-target="#myCarousel" data-slide-to="0" class="active"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion4.jpg" alt="Reunion 1"></li> + <li data-target="#myCarousel" data-slide-to="1"><img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" alt="Reunion 1"></li>--> + </ol> + + <!-- Wrapper for slides --> + <div class="carousel-inner"> + <?php + $i=0; + if(!empty($medias)){ + foreach ($medias as $data){ ?> + <div class="item <?php if($i==0) echo "active"; ?>"> + <iframe width="100%" height="400" src="<?php echo $data["content"]["videoLink"] ?>" frameborder="0" allowfullscreen></iframe> + </div> + <?php $i++; + } } ?> + <?php + if(!empty($images)){ + foreach ($images as $data){ ?> + <div class="item <?php if($i==0) echo "active"; ?>"> + <img src="<?php echo $data["imagePath"] ?>" alt="Reunion 1"> + </div> + <?php $i++; + } } ?> + <!--<div class="item active"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion4.jpg" alt="Reunion 1"> + <div class="carousel-caption"> + <h3>Bienvenu chez l'habitant</h3> + <p>L’objectif de ce projet est de promouvoir la culture réunionnaise en passant par des habitant, ou des prestataire à taille humaine, qui ont une légitimité pour la représenter. Des acteurs qui vont garantir la véracité et l’authenticité de notre culture et favoriser son développement. + </p> + </div> + </div> + + <div class="item"> + <img src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/img/reunion/reunion5.jpg" alt="Reunion 1"> + <div class="carousel-caption"> + <h3>Bienvenu chez l'habitant</h3> + <p>L’objectif de ce projet est de promouvoir la culture réunionnaise en passant par des habitant, ou des prestataire à taille humaine, qui ont une légitimité pour la représenter. Des acteurs qui vont garantir la véracité et l’authenticité de notre culture et favoriser son développement. + </p> + </div> + </div>--> + + </div> +</div> +<?php } ?> \ No newline at end of file diff --git a/views/pod/usersList.php b/views/pod/usersList.php new file mode 100755 index 0000000000000000000000000000000000000000..30aaddc5955f67569104cfbbb33df807b26a7188 --- /dev/null +++ b/views/pod/usersList.php @@ -0,0 +1,302 @@ +<style> +.avatarOrgaList{ + font-size: 46.5px; + background-color: lightgray; + height: 50px; + color: whitesmoke; +} +.user-list.ico-type-account { + background-image: url("flag.png"); + text-align: center; + height: 20px; + width: 40px; + font-size: 13px; + padding: 0px; + float: left; + margin-left: -24px; + border-radius: 3px 0px 0px 3px; + margin-top: 0px; + margin-right: 37px; +} +.adminFlag{ + position: relative; + top: -50px; + left: 0px; + background-color: red; + width: 15px; + border-radius: 0 0 5px 0px; +} +.cogFlag{ + position: absolute; + top: 0px; + width: 15px; + border-radius: 0 0 5px 0px; +} + +.contentImg{ + margin-top:3px; + height:50px; + width:50px; +} +.count{ + margin-left: 1px; + margin-top: 4px; + font-size: large; + background-color: #e25555 !important; + color: white!important; + border-radius: inherit; +} +.grayscale{ + filter:grayscale(100%); + -webkit-filter:grayscale(100%); +} +</style> + +<?php + $parentId=""; + $inviteRefuse="Refuse"; + $inviteAccept="Accept"; + $tooltipAccept="Join this ".Element::getControlerByCollection($contentType); + if ($contentType == Project::COLLECTION){ + $tooltips = "La communauté du projet"; + } + else if ($contentType == Organization::COLLECTION){ + $tooltips = "La communauté de l'organisation"; + } + else if ($contentType == Event::COLLECTION){ + $parentRedirect = "event"; + $inviteRefuse="Not interested"; + $inviteAccept="I go"; + $tooltipAccept="Go to the event"; + $parentId = (string)$event["_id"]; + $tooltips = "La communauté de l'évènement"; + } + else if ($contentType == Person::COLLECTION){ + $tooltips = "La communauté de cette personne"; + } + else if ($contentType == Place::COLLECTION){ + $tooltips = "La communauté de ce lieu"; + } + + + $addLink = (empty($users[Yii::app()->session["userId"]])?false:true); +?> + <div class="panel panel-white user-list"> + <div class="panel-heading border-light bg-azure "> + <h4 class="panel-title"><i class="fa fa-connectdevelop"></i> <?php echo $userCategory ?></h4> + </div> + + <div class="panel-tools"> + <?php if ( @$admin && $contentType != ActionRoom::COLLECTION_ACTIONS ) { ?> + <a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="showElementPad('directory');" data-placement="bottom" data-original-title="<?php echo $tooltips ?>"> + <i class="fa fa-cog "></i> <?php echo Yii::t("common","Manage"); ?> + </a> + <?php } else if ($contentType != ActionRoom::COLLECTION_ACTIONS){ ?> + <a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="showElementPad('directory');" data-placement="bottom" data-original-title="<?php echo $tooltips ?>"> + <i class="fa fa-eye"></i> <?php echo Yii::t("common","Visualize"); ?> + </a> + + <?php } + if ($contentType == Event::COLLECTION && $admin == true){ ?> + <a href="javascript:" class=" btn btn-xs btn-default tooltips" data-placement="bottom" data-original-title="<?php echo Yii::t("event","Invite attendees to the event") ?>" + data-toggle="modal" data-target="#modal-scope"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common","Send invitations") ; ?> + </a> + <?php } + + if ($contentType == Organization::COLLECTION && $admin == true){ ?> + <a href="javascript:" class="btn btn-xs btn-default tooltips" data-placement="bottom" data-original-title="<?php echo Yii::t('common','Add a member to this organization'); ?>" + data-toggle="modal" data-target="#modal-scope"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common",'Add member') ; ?> + </a> + <?php } + + if ($contentType == Project::COLLECTION && $admin == true){ ?> + <a href="javascript:" class="btn btn-xs btn-default tooltips" data-placement="bottom" data-original-title="<?php echo Yii::t('common','Add a contributor to this project'); ?>" data-toggle="modal" data-target="#modal-scope"> + <i class="fa fa-plus"></i> <?php echo Yii::t("common",'Add contributor') ; ?> + </a> + <?php } ?> + + </div> + <?php + if(@$invitedMe && !empty($invitedMe)){ + echo "<div class='no-padding' style='border-bottom: 1px solid lightgray;margin-bottom:10px !important;'>". + "<div class='padding-5'>". + "<a href='#element.detail.type.".Person::COLLECTION.".id.".$invitedMe["invitorId"]."' class='lbh'>".$invitedMe["invitorName"]."</a><span class='text-dark'> vous a invité: <br/>". + '<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="validateConnection(\''.$contentType.'\',\''.$parentId.'\', \''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\''.Link::IS_INVITING.'\')" data-placement="bottom" data-original-title="'.Yii::t("common",$tooltipAccept).'">'. + '<i class="fa fa-check "></i> '.Yii::t("common",$inviteAccept). + '</a>'. + '<a class="btn btn-xs btn-default tooltips" href="javascript:;" onclick="disconnectTo(\''.$contentType.'\',\''.$parentId.'\',\''.Yii::app()->session["userId"].'\',\''.Person::COLLECTION.'\',\'attendees\')" data-placement="bottom" data-original-title="Not interested by the invitation">'. + '<i class="fa fa-remove"></i> '.Yii::t("common",$inviteRefuse). + '</a>'. + "</div>". + "</div>"; + } + ?> + <div class="padding-10"> + <?php if(empty($users) || @$attendeeNumber===0){ ?> + <div class="padding-10"> + <blockquote class="no-margin"> + <?php if ($contentType==Event::COLLECTION) + echo Yii::t("common","No attendee for this event"); + else if ($contentType==Project::COLLECTION) + echo Yii::t("common","No contributor for this project"); + else if ($contentType==Organization::COLLECTION) + echo Yii::t("common","No member for this organization"); + else if ($contentType==Person::COLLECTION) + echo Yii::t("common","No member for this person"); ?> + </blockquote> + </div> + <?php } + else{ + + foreach ($users as $e) { + if(!@$e["invitorId"]){ + $grayscale = "grayscale"; + $addCogFlag=true; + $addCogFlag=15; + //print_r($e); + $name = $e["name"]; + if (@$e["isAdmin"]){ + $adminFlag='<div class="adminFlag"><i class="fa fa-bookmark-o fa-white"></i></div>'; + if (@$e["isAdminPending"]) + $name.= " (".Yii::t("common","waiting for validation").")"; + else if (@$e["tobeactivated"]) + $name.= " (".Yii::t("common","not activated").")"; + else if (@$e["pending"]) + $name.= " (".Yii::t("common","unregistred").")"; + else { + $name.= " (admin)"; + $grayscale = ""; + $addCogFlag=false; + } + } + else { + $adminFlag=""; + $addCogFlag=1; + if (@$e["toBeValidated"]) + $name.= " (".Yii::t("common","waiting for validation").")"; + else if (@$e["tobeactivated"]) + $name.= " (".Yii::t("common","not activated").")"; + else if (@$e["pending"]) + $name.= " (".Yii::t("common","unregistred").")"; + else{ + $grayscale = ""; + $addCogFlag=false; + } + } + if($addCogFlag != false) + $adminFlag.='<div class="cogFlag bg-dark" style="left:'.($addCogFlag--).'px;"><i class="fa fa-cog fa-white"></i></div>'; + if ($e["type"]==Person::COLLECTION){ + $icon='<img height="50" width="50" class="img-circle tooltips" src="'.$this->module->assetsUrl.'/images/news/profile_default_l.png" data-placement="top" data-original-title="'.$name.'">'; + $refIcon="fa-user"; + $redirect="person"; + } + else{ + $icon="<div class='thumbnail-profil'><i class='fa fa-group tooltips avatarOrgaList' data-placement='top' data-original-title='".$name."'></i></div>"; + $redirect="organization"; + $refIcon="fa-group"; + } + $anId = isset($e["id"]) ? $e["id"] : ""; + ?> + <a href="#element.detail.type.<?php echo $e["type"] ?>.id.<?php echo $anId; ?>" title="<?php echo $name ?>" class=" lbh btn no-padding contentImg <?php echo $grayscale ?>"> + + <?php if($e && !empty($e["profilThumbImageUrl"])) { + // Utiliser profilThumbImageUrl && createUrl(/.$profilThumbUrl.) + ?> + <img width="50" height="50" alt="image" class="img-circle tooltips" src="<?php echo Yii::app()->createUrl('/'.$e['profilThumbImageUrl']) ?>" data-placement="top" data-original-title="<?php echo $name ?>"> + <?php }else{ + echo $icon; + } ?> + <?php echo $adminFlag; ?> + </a> + + <?php + } + } + if(!empty(@$countLowLinks) || @$countInvitations > 0 || @$countStrongLinks > 11){ + $nbCommunity=$countLowLinks; + $fontSize=""; + if($countStrongLinks>11) + $nbCommunity+=($countStrongLinks-11); + if($countInvitations) + $nbCommunity+=$countInvitations; + if($nbCommunity >= 1000){ + $nbCommunity=$nbCommunity/1000; + $nbCommunity=number_format($nbCommunity, 1, ',',"")."K"; + $fontSize="font-size:14px;"; + } + ?> + <a href="javascript:;" onclick="showElementPad('directory');" title="<?php echo Yii::t("common","See all") ?>" data-placement="top" data-original-title="<?php echo Yii::t("common","See all") ?>" class="btn no-padding contentImg count tooltips"> + <span style="line-height:50px;<?php echo $fontSize ?>">+ <?php echo $nbCommunity ?></span> + </a> + <?php } + } ?> + </div> + <?php + // If event, see number of invitations and attendees + if((@$countStrongLinks && $countStrongLinks != 0) || (@$countLowLinks && $countLowLinks != 0)){ + $text=""; + + /*if(!empty($followers)){ + $text .= " ".Yii::t("common","and")." "; + $text .= $followers." ".Yii::t("common","follower"); + if ($followers > 1) + $text .="s"; + + }*/ + echo "<div class='no-padding' style='border-top: 1px solid lightgray;margin-top:10px !important;'>"; + if (@$countStrongLinks && !empty($countStrongLinks)){ + if($contentType==Organization::COLLECTION) + $strongLinksLabel=Yii::t("common","member"); + else if ($contentType==Project::COLLECTION || $contentType == ActionRoom::COLLECTION_ACTIONS) + $strongLinksLabel=Yii::t("common","contributor"); + else if ($contentType==Event::COLLECTION) + $strongLinksLabel=Yii::t("event","attendee"); + if($countStrongLinks>1) + $strongLinksLabel .= "s"; + + echo "<div class='col-md-4 inline' style='float:inherit;'>". + "<span class='text-dark' style='font-size:16px;font-weight:bold'>".$countStrongLinks."</span> ". + "<span class='text-dark'>".ucfirst(@$strongLinksLabel)."</span>". + "</div>"; + }if (@$countInvitations && $countInvitations != 0){ + $style=""; + $invitationsLabel = Yii::t("event","guest"); + if($countInvitations > 1) + $invitationsLabel .= "s"; + if($countStrongLinks != 0) + $style="padding-left:15px;"; + echo "<div class='col-md-4 inline' style='float:inherit;".$style."'>". + "<span class='text-dark' style='font-size:16px;font-weight:bold'>".$countInvitations."</span> ". + + "<span class='text-dark'>".ucfirst($invitationsLabel)."</span>". + "</div>"; + } + if (@$countLowLinks && $countLowLinks != 0){ + $style=""; + $lowLinksLabel = Yii::t("common","follower"); + if($countLowLinks > 1) + $lowLinksLabel .= "s"; + if($countStrongLinks != 0 || $countInvitations != 0) + $style="padding-left:15px;"; + echo "<div class='col-md-4 inline' style='float:inherit;".$style."'>". + "<span class='text-dark' style='font-size:16px;font-weight:bold'>".$countLowLinks."</span> ". + "<span class='text-dark'>".ucfirst($lowLinksLabel)."</span>". + "</div>"; + } + echo "</div>"; + } + ?> + + + </div> + + <script type="text/javascript"> + + jQuery(document).ready(function() { + var usersLinks = <?php echo isset($users) ? json_encode($users) : "''"; ?>; + }); + + +</script> diff --git a/views/pod/whycommunexion.php b/views/pod/whycommunexion.php new file mode 100644 index 0000000000000000000000000000000000000000..0fd2acf7a121ec87e1a1ba0c6d5a23316012f23c --- /dev/null +++ b/views/pod/whycommunexion.php @@ -0,0 +1,20 @@ +<!-- <div class="space20"></div> --> +<div class="explainCommunectMe hidden <?php echo (@$class) ? $class : 'row' ?> col-xs-4" id="whycommunexion"> + + <h1 class="homestead explainTitle blue "><i class="fa fa-home"></i> Communectez-moi</h1> + <center class="caretExplain blue"><i class="fa fa-caret-down"></i><br/></center> + <div class="explainDesc"> + <?php echo Yii::t("docs" , "Technology won't change society but a well-equipped population will.") ; ?> + <br/><?php echo Yii::t("docs" , "Being connected to one's city means being a citizen, a local actor.") ; ?> + <br/><?php echo Yii::t("docs" , "Being connected give me opportunity :") ; ?> + <ul> + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "to act localy and not only being informed") ; ?></li> + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "to see all the actors around me") ; ?></li> + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "to list and add value to the things in which I believe") ; ?></li> + + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "I get involve into local citizen activity") ; ?></li> + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "I share in order to inhance my territory") ; ?></li> + <li><i class="fa fa-angle-right"></i> <?php echo Yii::t("docs" , "I can suggest ideas to my neighborhood ( Discuss, Decide, Act)") ; ?></li> + </ul> + </div> +</div> \ No newline at end of file diff --git a/views/poi/standalone.php b/views/poi/standalone.php new file mode 100644 index 0000000000000000000000000000000000000000..692fca406c4e754f7ff4de1ebc4ed7482141116a --- /dev/null +++ b/views/poi/standalone.php @@ -0,0 +1,31 @@ + +<div class="row bg-white"> + <div class="margin-top-70 margin-bottom-50 col-md-12"> + <div class="col-xs-12"> + <h3 class="text-center"><i class="fa fa-map-marker"></i> Point d'intéret</h3><hr> + </div> + <div id="poi"></div> + </div> +</div> + +<script type="text/javascript"> + + var poiAlone=<?php echo json_encode($element); ?>; + + jQuery(document).ready(function() { + setTitle("", "", poiAlone.name); + + poiAlone["typePoi"] = poiAlone.type; + poiAlone["type"] = "poi"; + poiAlone["typeSig"] = "poi"; + + poiAlone["id"] = poiAlone['_id']['$id']; + var html = directory.preview(poiAlone); + $("#poi").html(html); + + //poi["sections"] = <?php echo json_encode(CO2::getContextList("poi")); ?> + + Sig.showMapElements(Sig.map, new Array(poiAlone)); + }); + +</script> \ No newline at end of file diff --git a/views/rocketchat/iframe.php b/views/rocketchat/iframe.php new file mode 100644 index 0000000000000000000000000000000000000000..15ad2979b3d354171cb1602ab066a4c9d21ab474 --- /dev/null +++ b/views/rocketchat/iframe.php @@ -0,0 +1,125 @@ +<?php if ( !@$iframeOnly ){ ?> +<!DOCTYPE html> +<html> + <body> +<?php } ?> + +<?php +if ( @Yii::app()->session["userId"] ){ +$embedPath = (@$embed) ? $path."?layout=embedded" : "" ; +?> + + +<script type="text/javascript"> + window.addEventListener('message', function(e) { + //mylog.info(">>>>>>>>>> ifroame ", e.data.eventName); // event name + //mylog.log(e.data.data); // event data + // alert(" embedPath : <?php echo @$embed; ?> :: " +e.data.eventName); + if(e.data.eventName=="startup" && e.data.data== true){ + + //toastr.info("startup Rocket Chat"); + //alert(" embedPath : <?php echo $embedPath; ?> :: " +e.data.eventName); + rcObjToken = '<?php echo Yii::app()->session["loginToken"]; ?>'; + + document.querySelector('iframe').contentWindow.postMessage({ + externalCommand: 'login-with-token', + token: '<?php echo Yii::app()->session["loginToken"]; ?>' }, '*'); + + <?php if ( @$path ) { ?> + rcObjPath = '<?php echo $path ?>'; + document.querySelector('iframe').contentWindow.postMessage({ + externalCommand: 'go', + path: '<?php echo $path ?>?layout=embedded'}, '*'); + <?php } ?> + } + + //fired on direct conversation or when pinged in a channel + if(e.data.eventName=="notification" ){ + mylog.info("xxxxxxxxxxxxxx NOTIFICATION ", e.data.eventName,e.data.data); + //alert("notification received"); + } + + if(e.data.eventName=="new-message" ){ + mylog.info("xxxxxxxxxxxxxx NEW MSG ", e.data.eventName,e.data.data); + //alert("new-message"); + } + + if(e.data.eventName=="room-opened" ){ + mylog.info("xxxxxxxxxxxxxx Open Room ", e.data.eventName,e.data.data); + //alert("room-opened"); + } + + + if(e.data.eventName=="unread-changed" ){ + mylog.info("xxxxxxxxxxxxxx UNREAD ","<?php echo Yii::app()->session["loginToken"]; ?>", e.data.eventName,e.data.data); + //toastr.info("unread-changed :: "+e.data.data); + + $(".chatNotifs").html(e.data.data); + /*else { + //can be when messages arrives, like notifiactions + //or disconnect so forcing reconnect + //alert("unread-changed :: relogin"); + setTimeout(function(){ + document.querySelector('iframe').contentWindow.postMessage({ + externalCommand: 'login-with-token', + token: '<?php echo Yii::app()->session["loginToken"]; ?>' }, '*'); + rcObj.token = '<?php echo Yii::app()->session["loginToken"]; ?>'; + }, 500); + }*/ + + } + + if( typeof e.data.eventName == "relogin" ){ + //toastr.info(">>>>>>>>>>> relogin"); + document.querySelector('iframe').contentWindow.postMessage({ + externalCommand: 'login-with-token', + token: '<?php echo Yii::app()->session["loginToken"]; ?>' }, '*'); + rcObj.token = '<?php echo Yii::app()->session["loginToken"]; ?>'; + } + + //away + //online + if(e.data.eventName=="status-changed"){ + mylog.info("xxxxxxxxxxxxxx STATUS CHANGED ", e.data.eventName,e.data.data); + //toastr.error("status changed : "+e.data.data); + } + + if(e.data.eventName=="unread-changed-by-subscription" && ( contextData && ( e.data.data.name == contextData.type+"_"+slugify(contextData.name) || e.data.data.name == contextData.username ) ) ){ + + if(e.data.data && e.data.data.unread && e.data.data.unread > 0){ + console.info("xxxxxxxxxxxxxx unread-changed-by-subscription "); + mylog.log(e.data.data); + } + //alert("unread-changed-by-subscription",e.data.data.unread); + $(".elChatNotifs").html( (e.data.data.unread > 0) ? e.data.data.unread : "" ); + } + + }); +</script> +<style> + .iframe-rocketchat{ + overflow:hidden; + overflow-x:hidden; + overflow-y:hidden; + height:100%; + width:100%; + position:absolute; + top:0px; + left:0px; + right:0px; + bottom:0px; + } +</style> + +<iframe id="rc" src="https://chat.communecter.org<?php //echo $embedPath ?>" + frameborder="0" class="iframe-rocketchat"> +</iframe> + +<?php +} else + echo Yii::t('common',"Access denied") ?> + +<?php if ( !@$iframeOnly ){ ?> + </body> +</html> +<?php } ?> \ No newline at end of file diff --git a/views/rocketchat/rocket.php b/views/rocketchat/rocket.php new file mode 100644 index 0000000000000000000000000000000000000000..45f5fa4bef847ee29a33f01bb0aeb4eda22069a0 --- /dev/null +++ b/views/rocketchat/rocket.php @@ -0,0 +1,29 @@ +<!DOCTYPE html> +<html> + <head> + <meta http-equiv="content-type" content="text/html; charset=utf-8" /> + <meta name="keywords" content="" /> + <meta name="description" content="" /> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function(event) { + + // set token in parent window for use by RocketChat as part of login sequence + window.parent.postMessage({ + event: 'login-with-token', + loginToken: '<?php echo Yii::app()->session["loginToken"]; ?>' + }, "https://chat.communecter.org"); + + }); + </script> + </head> + + + <body> + <div style="width:100%;text-align:center;padding-top:64px;"> + <h1 style="color:white">Checking Login</h1> + <?php /* ?> + <h4><?php echo $msg; ?></h4> + */ ?> + </div> + </body> +</html> \ No newline at end of file diff --git a/views/rooms/actionList.php b/views/rooms/actionList.php new file mode 100755 index 0000000000000000000000000000000000000000..f763bc35e98c90c56590c51279fe263562344168 --- /dev/null +++ b/views/rooms/actionList.php @@ -0,0 +1,810 @@ +<?php +$cs = Yii::app()->getClientScript(); + +$cssAnsScriptFilesModule = array( + //'/survey/css/mixitup/reset.css', + '/survey/css/mixitup/style.css', + '/survey/js/jquery.mixitup.min.js' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + +$cssAnsScriptFilesModule = array( + //'/plugins/share-button/ShareButton.min.js' , + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->request->baseUrl); + +$commentActive = true; + + + +?> + +<style type="text/css"> +.connect{border-radius: 8px; opacity: 0.9;background-color: #182129; margin-bottom: 10px;border:1px solid #3399FF;width: 100%;padding: 10px } +/*button.filter,button.sort{color:#000;}*/ +/*a.btn{margin:3px;}*/ +.mix{border-radius: 8px;} +.home{margin-top: 0px;} + +/*.infolink{border-top:1px solid #fff}*/ + +.leftlinks a.btn{background-color: yellow;border: 1px solid yellow;} +/*.rightlinks a.btn{background-color: beige;border: 1px solid beige;}*/ +a.btn.alertlink{background-color:red;color:white;border: 1px solid red;} +a.btn.golink{background-color:green;color:white;border: 1px solid green;} +a.btn.voteUp{background-color: #93C22C;border: 1px solid green;} +a.btn.voteUnclear{background-color: yellow;border: 1px solid yellow;} +a.btn.voteMoreInfo{background-color: #C1ABD4 !important;border: 1px solid #789289;} +a.btn.voteAbstain{color: black;background-color: white;border: 1px solid white;} +a.btn.voteDown{background-color: #db254e;border: 1px solid #db254e;} +.step{ background-color: #182129; opacity: 0.9;} +.taglist{width: 255px;display: inline;background-color:#3490EC;color:#000;padding: 3px 5px;height: 28px; } + +.progress-bar-green{background-color: #93C22C;} +.progress-bar-yellow{background-color: yellow; color:black !important;} +.progress-bar-white{background-color: #C9C9C9; color:black !important;} +.progress-bar-purple{background-color: #C1ABD4;} +.progress-bar-red{background-color: #db254e;} + +.btnvote{ + color: white !important; + padding: 8px!important; + font-weight: 500; + border-radius: 30px!important; + display: inline-block !important; +} + +.color-btnvote-green{ background-color: #93C22C!important;} +.color-btnvote-yellow{ background-color: yellow!important; color:black !important;} +.color-btnvote-white{ background-color: #FFF!important; color:black !important; border: 1px solid #939393;} +.color-btnvote-purple{ background-color: #C1ABD4!important;} +.color-btnvote-red{ background-color: #db254e!important;} +.controls{ + background: transparent; + border-bottom: 1px solid #BDBDBD; + border-top: 1px solid #fff; +} + +.mixcontainer .mix{ + border-radius:0px; + border-color: #CCC; + height:270px; + margin:1% 1% !important; + float:left; + moz-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + -webkit-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + -o-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + filter: progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=180, Strength=4); +} + +.mixcontainer .mix a.active, .mixcontainer .mix span.active{ + background-color: transparent; + color: #717E87; + font-size: 13px; + margin: 0px; + float: left; + border: 0px; +} +.mixcontainer .mix a.titleMix{ + margin-top: 4px !important; + float: left; + width: 100%; + overflow-y:hidden; + height:50px; + font-size: 17px; +} +.mixcontainer .mix a.titleMix:hover{ + text-decoration: underline !important; +} + +.leftlinks { + text-align: left; + float: left; + /*width: 100%;*/ +} + +.leftlinks a.btn{ + border: 1px solid rgba(0, 0, 0, 0.25) !important; + border-radius: 20px; + font-size: 18px; + width:35px; + height:35px; +} + +.leftlinks a.btn:hover{ + color:#3C5665; +} + +.mixcontainer .mix span { + margin: 0px; +} + +.mixcontainer .mix,.mixcontainer .mix a, .mixcontainer .mix span{ + background-color: white; + border-color: #ccc; +} +.mixcontainer .switch,.mixcontainer .switch a, .mixcontainer .switch span{ + background-color: #eee; +} +.mixcontainer .mix span.message-propostal{ + height: 120px; + overflow-y: hidden; +} + +.message-propostal{ + font-size: 13px !important; + font-weight: 300 !important; + margin-top: 20px !important; + line-height: 1.3; + width:100%; +} + +.lbl-info-survey{ + font-size: 12px !important; + font-weight: 500 !important; + margin-top:3px; + /*padding:4px;*/ +} + +.progress{ + margin-bottom:5px; + margin-top:5px; +} + +.stepContainer hr { + margin-top: 5px; + margin-bottom: 5px; + border: 0; + border-top: 1px solid #e6e6e6; + width: 100%; + float: left; +} + +.bar-btn-filters .btn{ + margin-bottom: 6px; +} + + +.home .controls { +border: 0px solid #E4E4E4; +} + + +@media screen and (min-width: 1400px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 31%; + } +} +@media screen and (max-width: 1399px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 48%; + } + .assemblyHeadSection { + background-position: 0px 50px; + } +} + +@media screen and (max-width: 767px) { + .assemblyHeadSection { + background-position: 0px 0px; + } +} + +@media screen and (max-width: 680px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 98%; + } +} +.byInfo{ + float: right; + position: relative; + bottom: 0px; + font-size:13px; +} +.byInfo i{ + margin-left:5px; +} +</style> + + +<div id="surveyDetails"></div> + +<section class="mt80 stepContainer"> + <div class="home"> +<script type="text/javascript"> +var contextDataDDA = { + name : "<?php echo addslashes(@$room["name"]) ?>", + id : "<?php echo (string)@$room["_id"] ?>", + type : "room", + controller : "survey", + controller : "<?php echo Survey::CONTROLLER;?>", + otags : "<?php echo addslashes(@$room["name"]).",débat, proposition, question, vote, communecter,".addslashes(@implode(",", @$room["tags"])) ?>", + odesc : <?php echo json_encode( 'Propositions : '.addslashes(@$room["name"])); ?>, + parentType : "<?php echo @$room["parentType"] ?>", + parentId : "<?php echo (string)@$room["parentId"] ?>" +}; + +</script> + + <?php + $logguedAndValid = Person::logguedAndValid(); + $alltags = array(); + $blocks = ""; + $tagBlock = ""; + $cpBlock = ""; + $cps = array(); + $switchcount = 1; + + /* ************************************** + * go through the list of entries for the survey and build filters + ***************************************** */ + function buildEntryBlock( $entry,$uniqueVoters,$alltags,$parentType,$parentId,$switchcount ){ + $logguedAndValid = Person::logguedAndValid(); + $tagBlock = "";//<i class='fa fa-info-circle'></i> Aucun tag"; + $cpBlock = ""; + $name = $entry["name"]; + $message = substr(@$entry["message"],0,280); + $email = (isset($entry["email"])) ? $entry["email"] : ""; + $cpList = (isset($entry["cp"])) ? $entry["cp"] : ""; + if( !isset($_GET["cp"]) && $entry["type"] == Survey::TYPE_SURVEY ) + { + if(isset($entry["cp"])) + { + if(is_array($entry["cp"])) + { + $cpList = ""; + foreach ($entry["cp"] as $cp) { + if(!in_array($cp, $cps)){ + $cpBlock .= ' <button class="filter " data-filter=".'.$cp.'">'.$cp.'</button>'; + array_push($cps, $cp); + } + $cpList .= $cp." "; + } + } + else if(!in_array($entry["cp"], $cps)) + { + $cpBlock .= ' <button class="filter " data-filter=".'.$entry["cp"].'">'.$entry["cp"].'</button>'; + array_push($cps, $entry["cp"]); + } + } + } + + $tags = ""; + if(isset($entry["tags"])) + { + foreach ($entry["tags"] as $t) + { + if(!empty($t) && !in_array($t, $alltags)) + { + array_push($alltags, $t); + $tagBlock .= ' <button class="filter bg-red btn btn-xs" data-filter=".'.$t.'"><i class="fa fa-tag"></i> '.$t.'</button>'; + } + $tags .= $t.' '; + } + } + + /* ************************************** + //check if I wrote this law + *************************************** */ + $myentries = "";//( $logguedAndValid && Yii::app()->session["userEmail"] && $entry['email'] == Yii::app()->session["userEmail"] ) ? "myentries" : ""; + + if( @$entry["links"]["contributors"] && @$entry["links"]["contributors"][Yii::app()->session["userId"]] ) + $myentries = "myentries"; + //checks if the user is a follower of the entry + $followingEntry = ( $logguedAndValid && Action::isUserFollowing($entry,Action::ACTION_FOLLOW) ) ? "myentries":""; + + $message = "<div class='text-dark no-border message-propostal'>".@$message."</div>"; + + /* ************************************** + Rendering Each block + ****************************************/ + $hrefComment = "#commentsForm"; + $commentCount = 0; + $content = ($entry["type"]==ActionRoom::TYPE_ACTION) ? "".@$entry["message"]:""; + + + $moderatelink = ( @$entry["applications"][Yii::app()->controller->module->id]["cleared"] && + $isModerator && $entry["applications"][Yii::app()->controller->module->id]["cleared"] == false ) ? + "<a class='btn golink' href='javascript:moderateEntry(\"".$entry["_id"]."\",1)'>". + "<i class='fa fa-plus ' ></i>". + "</a>". + "<a class='btn alertlink' href='javascript:moderateEntry(\"".$entry["_id"]."\",0)'>". + "<i class='fa fa-minus ' ></i>". + "</a>" : + ""; + + $rightLinks = ( @$entry["applications"][Yii::app()->controller->module->id]["cleared"] == false ) ? $moderatelink : $infoslink ; + $rightLinks = ( $entry["type"] == ActionRoom::TYPE_ACTION ) ? "<div class='rightlinks'>".$rightLinks."</div>" : ""; + $created = ( @$entry["created"] ) ? date("d/m/y h:i",$entry["created"]) : ""; + $startDate = ( @$entry["startDate"] ) ? date("d/m/y h:i",$entry["startDate"]) : ""; + $endDate = ( @$entry["dateEnd"] ) ? date("d/m/y",$entry["dateEnd"]) : ""; + $views = ( @$entry["viewCount"] ) ? + "<div class='no-border pull-right text-dark' style='font-size:13px;'>". + "<i class='fa fa-eye'></i> ".$entry["viewCount"]. + "</div>" : ""; + + $byInfo = ( @$entry["links"]["contributors"] && count($entry["links"]["contributors"]) > 0 ) ? + " <i class='fa fa-users'></i> ".count($entry["links"]["contributors"]) : + "<i class='fa fa-users text-red'></i> 0"; + + //$infoslink bring visual detail about the entry + $infoslink = ( @$entry["urls"] && count($entry["urls"]) > 0 ) ? " <i class='fa fa-link'></i> ".count($entry["urls"]) : ""; + + $commentBtn = ""; + $commentBtn = (isset($entry["commentCount"]) && $entry["commentCount"] > 0) ? + " <i class='fa fa-comment'></i>".@$entry["commentCount"] : ""; + + //title + Link + if ( $entry["type"] == ActionRoom::TYPE_ACTION ) + $name = '<a class="titleMix text-dark " onclick="loadRoom(\'action\', \''.(string)$entry["_id"].'\')" href="javascript:;">'. + "<i class='fa fa-cogs'></i> ".substr($name, 0, 70). + '</a>' ; + + $btnRead = ""; + $leftLinks = ""; + + $createdInfo = "<div class='text-azure lbl-info-survey '>". + "<i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $createdInfo .= (!empty( $startDate )) ? + Yii::t("rooms", "Start Date") . + " : ".$startDate + : "Non défini"; + $createdInfo .= "</div>"; + + $ends = ""; + if($entry["type"]==ActionRoom::TYPE_ACTION && (!isset($entry["dateEnd"]) || $entry["dateEnd"] > time() ) ){ + $ends = "<div class='text-green lbl-info-survey pull-left' style='color: rgb(228, 108, 108);'>". + "<i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $ends .= (!empty( $endDate )) ? + Yii::t("rooms", "end") . + " : ".$endDate + : "Non défini"; + $ends .= "</div>"; + } else { + $ends = "<div class='text-red lbl-info-survey pull-left' style='color: rgb(228, 108, 108);'>". + "<i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $ends .= (!empty( $endDate )) ? + Yii::t("rooms", "ended") . + " : ".$endDate + : "Non définit"; + $ends .= "</div>"; + } + + $statusClass = ActionRoom::ACTION_TODO; + $statusLbl = Yii::t("rooms", "Todo"); + $statusColor = "default"; + if( ( isset($action["startDate"]) && $action["startDate"] < time() ) || ( !@$action["startDate"] && @$action["dateEnd"] ) ){ + $statusClass = ActionRoom::ACTION_INPROGRESS; + $statusLbl = Yii::t("rooms", "Progressing"); + $statusColor = "success"; + if( @$entry["dateEnd"] < time() ){ + $statusClass = ActionRoom::ACTION_LATE; + $statusLbl = Yii::t("rooms", "Late"); + $statusColor = "warning"; + } + } + if ( @$entry["status"] == ActionRoom::ACTION_CLOSED ) { + $statusClass = ActionRoom::ACTION_CLOSED; + $statusLbl = Yii::t("rooms", "Closed"); + $statusColor = "danger"; + } + $status = "<div class='badge badge-".$statusColor." pull-right'>".$statusLbl."</div>"; + + $unassignedClass = ( @$entry["links"]["contributors"] && count($entry["links"]["contributors"]) > 0 ) ? "" : "unassigned"; + + $boxColor = ($entry["type"]==ActionRoom::TYPE_ACTION ) ? "" : "" ; + $switchClass = ( $switchcount < 0 ) ? "" : "switch" ; + + $block = ' <div class="mix '.$boxColor.' '.$switchClass.' '.$statusClass.' '.$unassignedClass.' '. + $myentries.' '. + $followingEntry.' '. + $tags.'"'. + 'data-vote="" data-time="'.$created.'" style="display:inline-blocks"">'. + '<div class="actionDetail" >'. + $status. + $createdInfo. + $ends. + "<hr>". + '</div>'. + $leftLinks.$btnRead. + $name. + '<br/>'. + $message. + '<br/>'. + '<div class="byInfo text-dark" >'. + $views.$commentBtn.$infoslink.$byInfo. + '</div>'. + '</div>'; + + return array( + "block"=>$block, + "alltags" => $alltags, + "tagBlock" => $tagBlock, + "cpBlock" => $cpBlock + ); + } + + //TODO seperate logic from view + foreach ($list as $key => $entry) + { + $switchcount = -$switchcount; + $entryMap = buildEntryBlock( $entry, $uniqueVoters, $alltags, $room['parentType'], $room['parentId'], $switchcount ); + $blocks .= $entryMap["block"]; + $alltags = $entryMap["alltags"]; + $tagBlock .= $entryMap["tagBlock"]; + $cpBlock .= $entryMap["cpBlock"]; + } + ?> + + <?php + $extraBtn = ( Authorisation::canParticipate(Yii::app()->session['userId'],$room['parentType'],$room['parentId']) ) ? '<i class="fa fa-caret-right"></i> <a class="filter btn btn-xs btn-primary Helvetica lbh" href="#rooms.editAction.room.'.(string)$room["_id"].'"> <i class="fa fa-plus"></i> '.Yii::t( "survey", 'Add an Action').'</a>' : ''; + + if(!isset($_GET["renderPartial"])){ + $this->renderPartial('../rooms/header',array( + "parent" => $parent, + "parentId" => $room['parentId'], + "parentType" => $room['parentType'], + "fromView" => "rooms.actions", + "faTitle" => "cogs", + "colorTitle" => "azure", + "textTitle" => "<a class='text-dark btn' href='#rooms.index.type.".$room['parentType'].".id.".$room['parentId'].".tab.3'><i class='fa fa-cogs'></i> ".Yii::t("rooms","Actions")."</a>". + " / ". + "<a class='text-dark btn' href='#rooms.actions.id.".$room["_id"]."'><i class='fa fa-cogs'></i> ".$room["name"]."</a>".$extraBtn + + )); + echo '<div class="col-md-12 panel-white padding-15" id="room-container">'; + } + ?> + + <div class="panel-white" style="display:inline-block; width:100%;"> + + <h1 class="text-dark" style="font-size: 25px;margin-top: 20px;"> + <i class="fa fa-caret-down"></i> <i class="fa fa-cogs"></i> <span class="homestead">Espace d'action : </span> <?php echo $room["name"]; ?> + </h1> + + <?php + Menu::actions( $room ); + $this->renderPartial('../default/panels/toolbar'); + ?> + + <div class="panel-white margin-top-15" style="display:inline-block; width:100%;"> + <div class="col-md-4 col-sm-4 margin-bottom-15 bg-white" style="min-height: 200px;"> + <?php + $img = (@$room['profilImageUrl']) ? "<img class='img-responsive' src='".Yii::app()->createUrl('/'.@$room['profilImageUrl'])."'/>" : ""; + echo $img; + ?> + </div> + + <?php if ( count(@$list) > 0 ) { ?> + + <div class="controls col-md-7 col-sm-7 pull-right bar-btn-filters no-border no-padding"> + <button class="filter btn btn-default fr" data-filter="all"><i class="fa fa-eye"></i> Afficher tout</button> + <button id="ChangeLayout" class="btn btn-default" style="margin-bottom: 6px;"><i class="fa fa-reorder"></i></button> + <button id="reduceInfo" class="btn btn-default" onclick="reduceInfo();"><i class="fa fa-minus-square"></i></button> + </div> + + <div class="controls col-md-7 col-sm-7 pull-right bar-btn-filters no-border no-padding"> + <?php if( count($alltags) && false ){?> + <button class="btn bg-red fr" onclick="toogleTags();"><i class="fa fa-filter"></i> Tags</button> + <?php } ?> + <?php if( $logguedAndValid ){?> + <a class="filter btn bg-dark" data-filter=".myentries" id="myentriesBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'My Todo'); ?></a> + <a class="filter btn bg-dark" data-filter=".todo" id="todoBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'Todo'); ?></a> + <a class="filter btn bg-dark" data-filter=".inprogress" id="inprogressBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'In Progress'); ?></a> + <a class="filter btn bg-dark" data-filter=".late" id="lateBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'Late'); ?></a> + <a class="filter btn bg-dark" data-filter=".closed" id="closedBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'Closed'); ?></a> + <a class="filter btn bg-dark" data-filter=".unassigned" id="unassignedBtn"><i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'Unassigned'); ?></a> + <?php } ?> + </div> + + <div class="col-md-7 col-sm-7 pull-right no-padding"> + <?php if( $logguedAndValid ) { ?> + <button class="sort btn btn-default" data-sort="vote:asc"><i class="fa fa-caret-up"></i></button> + <button class="sort btn btn-default" data-sort="vote:desc"><i class="fa fa-caret-down"></i></button> + <label class="margin-right-15">- Participation</label> + <?php } ?> + <button class="sort btn btn-default" data-sort="time:asc"><i class="fa fa-caret-up"></i></button> + <button class="sort btn btn-default" data-sort="time:desc"><i class="fa fa-caret-down"></i></button> + <label class="margin-right-15">- Chronologie</label> + </div> + + <?php } ?> + + <?php if ( count(@$list) == 0 && false ) { ?> + <div class="col-md-8 col-sm-8"> + <blockquote> + <span class=""><i class="fa fa-angle-right"></i> + <?php if(isset(Yii::app()->session["userId"])) + echo Yii::t('rooms', 'JOIN TO PARTICIPATE'); + else + echo Yii::t('rooms', 'LOGIN TO PARTICIPATE'); + ?> + </span> + </blockquote> + </div> + <?php } ?> + + <?php if (Authorisation::canParticipate(Yii::app()->session['userId'],$room["parentType"],$room["parentId"])) { ?> + <div id="infoPodOrga" class="col-md-8 col-sm-8 padding-10"> + <?php if (count(@$list) == 0) { ?> + <blockquote class="padding-10"> + <span class="text-extra-large text-green "><i class="fa fa-check"></i> Espace ouvert</span><br> + <small>Un espace d'action peut contenir plusieurs actions.</small> + <br>Référencez et partagez <b>une par une</b>, + <br>les tâches qui concernent cet espace + <br><br> + <button class="btn btn-success" onclick='dyFObj.openForm("action","sub"); $(".datepicker").css("zIndex","12000");'> + <i class="fa fa-plus"></i> Ajouter une action + </button> + </blockquote> + <?php }; ?> + </div> + <?php } ?> + + </div> + + <?php if ( count(@$list) > 0 ) { ?> + <div class="col-md-12"> + <div id="tags-container" class="col-md-12 margin-bottom-15"> + <?php echo $tagBlock; ?> + </div> + </div> + <?php } ?> + + <div id="mixcontainer" class="mixcontainer col-md-12"> + <?php echo (count($list) > 0) ? $blocks : "" ?> + </div> + </div> + + </div> <!--home--> + + </section> + + + +<div class="space20"></div> + +<script type="text/javascript"> + +/* ************************************** +* +* Initialisation +* +***************************************** */ + + var contextData = { + name : "<?php echo addslashes(@$room["name"]) ?>", + id : "<?php echo (string)@$room["_id"] ?>", + type : "action", + controller : "room", + otags : "<?php echo addslashes(@$room["name"]).",débat, proposition, question, vote, communecter,".addslashes(@implode(",", @$room["tags"])) ?>", + odesc : <?php echo json_encode( 'Propositions : '.addslashes(@$room["name"])); ?>, + parentType : "<?php echo @$room["parentType"] ?>", + parentId : "<?php echo (string)@$room["parentId"] ?>" + }; + +var layout = 'grid', // Store the current layout as a variable +$container = $('#mixcontainer'), // Cache the MixItUp container +$changeLayout = $('#ChangeLayout'); // Cache the changeLayout button +clickedVoteObject = null; + +var nbSurveyTotal = <?php echo count($list); ?>; + +jQuery(document).ready(function() { + + //setTitle("Actions Réactions","cogs text-red"); + $(".main-col-search").addClass("assemblyHeadSection"); + $('.tooltips').tooltip(); + + if(nbSurveyTotal > 0) + $container.mixItUp({ + load: {sort: 'vote:desc'}, + animation: { + animateChangeLayout: true, // Animate the positions of targets as the layout changes + animateResizeTargets: true, // Animate the width/height of targets as the layout changes + effects: 'fade rotateX(-40deg) translateZ(-100px)' + }, + layout: { + containerClass: 'grid' // Add the class 'list' to the container on load + } + }); + + if(!$(".myentries").length) + $("#myentriesBtn").hide(); + if(!$(".todo").length) + $("#todoBtn").hide(); + if(!$(".inprogress").length) + $("#inprogressBtn").hide(); + if(!$(".late").length) + $("#lateBtn").hide(); + if(!$(".closed").length) + $("#closedBtn").hide(); + if(!$(".unassigned").length) + $("#unassignedBtn").hide(); + + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); + + +}); + + +function toogleTags(){ + el = "#tags-container"; + if($(el).hasClass("hidden")){ + $(el).removeClass("hidden"); + }else{ + $(el).addClass("hidden"); + } +} + +function reduceInfo(){ + el = ".actionDetail"; + all = el+",.byInfo" + if($(el).hasClass("hidden")){ + $('#reduceInfo i').removeClass("fa-plus-square").addClass("fa-minus-square"); + $(all).removeClass("hidden"); + $('.mixcontainer .mix').css("height","250px"); + }else{ + $('#reduceInfo i').removeClass("fa-minus-square").addClass("fa-plus-square"); + $(all).addClass("hidden"); + $('.mixcontainer .mix').css("height","190px"); + } + +} + +/* ************************************** +* +* Mixit Up pluggin stuff +* +***************************************** */ + + + $changeLayout.on('click', function() + { + // If the current layout is a list, change to grid: + if(layout == 'list'){ + layout = 'grid'; + $changeLayout.html('<i class="fa fa-reorder"></i>'); // Update the button text + $container.mixItUp('changeLayout', { + containerClass: layout // change the container class to "grid" + }); + // Else if the current layout is a grid, change to list: + } else { + layout = 'list'; + $changeLayout.html('<i class="fa fa-th"></i>'); // Update the button text + $container.mixItUp('changeLayout', { + containerClass: layout // Change the container class to 'list' + }); + } + }); + + /* ************************************** + * + * REad or Edit an Entry + * + ***************************************** */ + function entryDetail(url,type){ + mylog.warn("--------------- entryDetail ---------------------",url); + getAjax( "surveyDetails" , url , function(data){ + //$("#surveyDetails").html(data); + mylog.dir(data); + + mylog.log("type", type); + if(type == "edit") + urlCtrl.loadByHash(url); + else + readEntrySV (data,type); + + } ); + } + + function moderateEntry(id,action) + { + mylog.warn("--------------- moderateEntry ---------------------"); + + params = { + "survey" : id , + "action" : action , + "app" : "<?php echo Yii::app()->controller->module->id?>"}; + + ajaxPost("moderateEntryResult", + '<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/survey/moderateentry")?>', + params,function(){ + window.location.reload(); + }); + } + + /* ************************************** + * + * Design stuff + * + ***************************************** */ + function AutoGrowTextArea(textField) + { + /*if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = textField.scrollHeight + "px"; + if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = + (textField.scrollHeight * 2 - textField.clientHeight) + "px"; + } + }*/ + } + activeView = ".home"; + function hideShow(ids,parent) + { + $(activeView).addClass("hidden"); + $(ids).removeClass("hidden"); + activeView = ids; + } + function copytoPopin(){ + txt = $('#message1').val(); + //AutoGrowTextArea(this); + $('#message').val(txt); + $('#nameaddEntry').val(txt.substring(0,20)); + } + +function readEntrySV(data,type) { + mylog.warn("--------------- readEntrySV ---------------------"); + mylog.dir(data); + $("#readEntryContainer").html("<div class='col-sm-10 col-sm-offset-1 '>"+ + '<h1 class="homestead text-red center citizenAssembly-header">'+ + '<i class="fa fa-pie-chart "></i>'+ + '<br>'+ + '<small class="homestead text-dark center"> Resultats du moment </small>'+ + ' </h1>'+ + "<a href='javascript:toggleGraph()' class='pull-left' style='top: 92px; float: right !important; margin-top: -120px; margin-right: 5px;'>"+ + "<i class='fa fa-times-circle-o text-dark fa-2x'></i>"+ + "</a>"+ + "<div class='space20 center' id='entryContent'></div>"+ + "</div>"); + + $("#entryContent").html(data.content); + $("#entryTitle").html(data.title); + if(type=="graph") + setUpGraph(); + toggleGraph() +} + +function toggleGraph(){ + if( $("#readEntryContainer").hasClass('hide') ){ + $("#readEntryContainer").removeClass('hide'); + $(".stepContainer").addClass('hide'); + } else { + $(".stepContainer").removeClass('hide'); + $("#readEntryContainer").addClass('hide'); + } +} + +function archive(collection,id){ + mylog.warn("--------------- archive ---------------------",collection,id); + + bootbox.confirm("Vous êtes sûr ? ", + function(result) { + if (result) { + params = { + "id" : id , + "type":collection, + "name":"status", + "value":"<?php echo ( @$room["status"] != ActionRoom::STATE_ARCHIVED ) ? ActionRoom::STATE_ARCHIVED : "" ?>", + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/element/updatefield")?>',params,function(data){ + urlCtrl.loadByHash(window.location.hash); + }); + } else { + $("."+clickedVoteObject).removeClass("faa-bounce animated"); + } + }); +} +</script> +<div class="hide" id="readEntryContainer"></div> + + + + diff --git a/views/rooms/actionStandalone.php b/views/rooms/actionStandalone.php new file mode 100755 index 0000000000000000000000000000000000000000..5619c86bcb570450db8752762c40a2a85533748d --- /dev/null +++ b/views/rooms/actionStandalone.php @@ -0,0 +1,374 @@ +<?php + $cs = Yii::app()->getClientScript(); + $cssAnsScriptFilesModule = array( + '/js/dataHelpers.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $logguedAndValid = Person::logguedAndValid(); + $voteLinksAndInfos = Action::voteLinksAndInfos($logguedAndValid,$action); +?> + +<style type="text/css"> + + #commentHistory .panel-scroll{ + max-height:unset !important; + } + .info-survey{ + font-weight: 500; + font-size: 13px; + border-top: 1px solid rgb(210, 210, 210); + padding-top: 15px; + margin-top: 0px; + } + .datepicker{z-index:12000 !important;} + + + .footer-comments{ + margin-top: 15px !important; + /*float:left;*/ + padding: 30px; + } + .ctnr-txtarea { + position: absolute; + right: 30px!important; + left: 70px!important; + } +</style> +<?php + //ca sert a quoi ce doublon ? + $parentType = $room["parentType"]; + $parentId = $room["parentId"]; + $nameParentTitle = ""; + if($parentType == Organization::COLLECTION && isset($parentId)){ + $orga = Organization::getById($parentId); + $nameParentTitle = $orga["name"]; + } +?> + +<?php + $extraBtn = ( Authorisation::canParticipate(Yii::app()->session['userId'],$parentSpace['parentType'],$parentSpace['parentId']) ) ? + '<i class="fa fa-angle-right"></i> '. + '<a class="filter btn btn-xs btn-primary Helvetica lbh" href="#rooms.editAction.room.'.$parentSpace["_id"].'">'. + '<i class="fa fa-plus"></i> '.Yii::t( "survey", "Add an Action"). + '</a>' + : ''; + + if(!isset($_GET["renderPartial"])){ + $this->renderPartial('../rooms/header',array( + "parent" => $parent, + "parentId" => $parentSpace['parentId'], + "parentType" => $parentSpace['parentType'], + "fromView" => "rooms.actions", + "faTitle" => "cogs", + "colorTitle" => "azure", + "textTitle" => "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#rooms.index.type.".$room['parentType'].".id.".$room['parentId'].".tab.3\")'><i class='fa fa-cogs'></i> ".Yii::t("rooms","Actions")."</a>". + " / ". + "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#rooms.actions.id.".$parentSpace["_id"]."\")'><i class='fa fa-cogs'></i> ".$parentSpace["name"]."</a>".$extraBtn + + )); + echo '<div class="col-md-12 panel-white padding-15" id="room-container">'; + } +?> + +<div class="row vote-row contentProposal" > + + <div class="col-md-12"> + <!-- start: REGISTER BOX --> + <div class="box-vote box-pod"> + <h1 class="text-dark" style="font-size: 17px;margin-top: 20px;"> + <i class="fa fa-angle-down"></i> + <span class="homestead"><i class="fa fa-archive"></i><?php echo Yii::t("common","Action room"); ?> :</span> + <a href="javascript:showRoom('actions', '<?php echo $parentSpace["_id"]; ?>')"> + <?php echo $parentSpace["name"];?> + </a> + <hr> + </h1> + + <div class="col-md-12 voteinfoSection"> + + + + <div class="col-md-6 no-padding margin-bottom-15"> + <?php if( @($organizer) ){ ?> + <span class="text-red" style="font-size:13px; font-weight:500;"> + <i class="fa fa-angle-right"></i> + <?php echo Yii::t("rooms","Made by ") ?> + <a style="font-size:14px;" href="javascript:<?php echo @$organizer['link'] ?>" class="text-dark"> + <?php echo @$organizer['name'] ?> + </a> + </span><br/> + <?php } ?> + <span class="text-extra-large text-bold text-dark col-md-12" style="font-size:25px !important;"> + <i class="fa fa-file-text"></i> <?php echo $action["name"] ?> + </span> + </div> + <div class="col-md-6"> + <div class="box-ajaxTools"> + <?php if ( isset(Yii::app()->session["userId"]) && $action["organizerId"] == Yii::app()->session["userId"] ) { ?> + <a class="tooltips btn btn-default " href="javascript:dyFObj.editElement('actions','<?php echo $action["_id"] ?>');" + data-placement="bottom" data-original-title="Editer cette action"> + <i class="fa fa-pencil "></i> <span class="hidden-sm hidden-md hidden-xs">Éditer</span> + </a> + <a class="tooltips btn btn-default" href="javascript:;" onclick="$('#modal-select-room5').modal('show')" + data-placement="bottom" data-original-title="Déplacer cette action dans un autre espace"> + <i class="fa fa-share-alt text-grey "></i> <span class="hidden-sm hidden-md hidden-xs">Déplacer</span> + </a> + <a class="tooltips btn btn-default " href="javascript:;" onclick="closeAction('<?php echo $action["_id"]; ?>')" + data-placement="bottom" data-original-title="Supprimer cette action"> + <i class="fa fa-times text-red "></i> <span class="hidden-sm hidden-md hidden-xs">Fermer</span> + </a> + <?php } ?> + <a href="javascript:;" data-id="explainActions" class="tooltips btn btn-default explainLink" + data-placement="bottom" data-original-title="Comprendre les listes d'actions"> + <i class="fa fa-question-circle "></i> <span class="hidden-sm hidden-md hidden-xs"></span> + </a> + </div> + </div> + </div> + + <div class="col-md-4 no-padding" style="padding-right: 15px !important;"> + <?php + $img = (@$action['profilImageUrl']) ? "<img class='img-responsive' src='".Yii::app()->createUrl('/'.@$action['profilImageUrl'])."'/>" : ""; + echo $img; + ?> + <div class="col-md-12 padding-10"> + <?php if( @$action["tags"] ){ ?> + <span class="text-red" style="font-size:13px; font-weight:500;"> + <i class="fa fa-tags"></i> + <?php + foreach ( $action["tags"] as $value) { + echo '<span class="badge bg-red text-xss">#'.$value.'</span> '; + } + ?> + </span> + <?php } ?> + </div> + </div> + + <div class="col-md-8 col-tool-vote text-dark" style="margin-bottom: 10px; margin-top: 10px; font-size:15px;"> + <?php + //if no assignee , no startDate no end Date + $statusLbl = Yii::t("rooms", "Todo"); + $statusColor = "badge-info"; + //if startDate passed, or no startDate but has end Date + if( ( isset($action["startDate"]) && $action["startDate"] < time() ) || ( !@$action["startDate"] && @$action["dateEnd"] ) ) + { + $statusLbl = Yii::t("rooms", "Progressing"); + $statusColor = "badge-success"; + if( @$action["dateEnd"] < time() ){ + $statusLbl = Yii::t("rooms", "Late"); + $statusColor = "badge-error"; + } + } + if ( @$action["status"] == ActionRoom::ACTION_CLOSED ) { + $statusLbl = Yii::t("rooms", "Closed"); + $statusColor = "bg-red"; + } + ?> + + <span class="pull-right text-bold badge <?php echo $statusColor?>"> + <i class="fa fa-clock-o"></i> <?php echo $statusLbl; ?> + </span> + <span class="text-azure"> + <i class="fa fa-calendar"></i> + <?php echo Yii::t("rooms","Start Date"); ?> : + <?php echo @$action["startDate"] ? date("d/m/y",$action["startDate"]) : "Indéfini" ?> + </span> + <br> + <?php if( @$action["dateEnd"] ){ ?> + <span class="text-red"> + <i class="fa fa-calendar"></i> + <?php echo Yii::t("rooms","End Date"); ?> : + <?php echo @$action["dateEnd"] ? date("d/m/y",$action["dateEnd"]) : "Indéfini" ?> + </span> + <br><hr> + <span> + <i class="fa fa-user"></i> + <?php echo Yii::t("rooms","VISITORS"); ?> : + <?php echo (isset($action["viewCount"])) ? $action["viewCount"] : "0" ?> + </span> + <br><hr> + <?php } ?> + <div class="text-bold text-dark"> + <?php + $canParticipate = Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId); + if( $canParticipate && $voteLinksAndInfos["hasVoted"] ) + echo $voteLinksAndInfos["links"]; + ?> + </div> + + </div> + + <div class="col-md-12 text-dark" style="font-size:15px"> + <hr style="margin-top:0px"> + <?php echo @$action["message"]; ?> + <hr> + </div> + <div class="col-md-7 text-dark" style="font-size:15px"> + <?php + if( @$action["urls"] ) { ?> + <h3 class="label label-info"> + <i class="fa fa-angle-down"></i> + Informations complémentaires : + <?php //echo Yii::t("rooms", "Links and Info Bullet points", null, Yii::app()->controller->module->id)?> + </h3><br><br> + <?php foreach ( $action["urls"] as $value) { + if( strpos($value, "http://")!==false || strpos($value, "https://")!==false ) + echo '<a href="'.$value.'" class="text-large padding-10" target="_blank"><i class="fa fa-link"></i> '.$value.'</a><br/> '; + else + echo '<span class="text-large padding-5"><i class="fa fa-dot-circle-o"></i> '.$value.'</span><br/> '; + }?> + <hr> + <?php } ?> + </div> + + <div class="col-md-5 leftInfoSection " > + <?php if( @$action["links"]["contributors"] ) { + $this->renderPartial('../pod/usersList', array( + "project"=> $action, + "users" => $contributors, + "countStrongLinks" => $countStrongLinks, + "userCategory" => Yii::t("common","COMMUNITY"), + "contentType" => ActionRoom::COLLECTION_ACTIONS, + "admin" => true )); + } + ?> + <?php if( Authorisation::canParticipate(Yii::app()->session['userId'],$room["parentType"],$room["parentId"]) && + !@$action["links"]["contributors"][Yii::app()->session['userId']] ){ ?> + <a href="javascript:;" class="pull-right text-large btn btn-dark-blue " + onclick="assignMe('<?php echo (string)$action["_id"]?>');" > + <i class="fa fa-link"></i> + Participer à cette tâche + <?php //echo Yii::t("rooms","Assign Me This Task",null,Yii::app()->controller->module->id) ?> + </a> + <?php } ?> + </div> + </div> + </div> + + <div class="col-md-12 commentSection leftInfoSection" > + <h2 class='text-dark homestead' style="margin: -20px 0px 15px;"><i class="fa fa-angle-down"></i><br>Discussion</h2> + <div class="box-vote box-pod margin-10 commentPod"></div> + </div> + +</div> + +<?php + if(!isset($_GET["renderPartial"])){ + echo "</div>"; // ferme le id="room-container" + } + ?> + +<style type="text/css"> + .footerBtn{font-size: 2em; color:white; font-weight: bolder;} +</style> + +<script type="text/javascript"> +clickedVoteObject = null; +var contextDataDDA = { + name : "<?php echo addslashes(@$action["name"]) ?>", + id : "<?php echo (string)@$action["_id"] ?>", + room : "<?php echo (string)@$room["_id"] ?>", + type : "action", + controller : "room", + otags : "<?php echo addslashes(@$action["name"]).",débat, proposition, question, vote, communecter,".addslashes(@implode(",", @$action["tags"])) ?>", + odesc : <?php echo json_encode( 'Propositions : '.addslashes(@$action["name"])); ?>, + parentType : "<?php echo @$room["parentType"] ?>", + parentId : "<?php echo (string)@$room["parentId"] ?>" +}; + +jQuery(document).ready(function() { + + $(".main-col-search").addClass("assemblyHeadSection"); + setTitle("Espace d'actions","cogs"); + $('.box-vote').show() + + $('#form-edit-action #btn-submit-form').addClass("hidden"); + /*.addClass("animated flipInX").on('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { + $(this).removeClass("animated flipInX"); + });*/ + + getAjax(".commentPod",baseUrl+"/"+moduleId+"/comment/index/type/actions/id/<?php echo $action['_id'] ?>?renderPartial=true", + function(){ $(".commentCount").html( $(".nbComments").html() ); + },"html"); + + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); +}); + +function closeAction(id) +{ + mylog.warn("--------------- closeEntry ---------------------"); + + bootbox.confirm("<strong>Êtes-vous sûr de vouloir fermer cette action ?</strong>", + function(result) { + if (result) { + params = { "id" : id }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/rooms/closeaction")?>',params,function(data){ + if(data.result) + urlCtrl.loadByHash(location.hash); + else + toastr.error(data.msg); + }); + } + }); +} + +function assignMe(id) +{ + bootbox.confirm("<strong>Êtes-vous sûr de vouloir participer à cette action ?</strong>" + + "Vous serez inscrit dans la liste des participants.", + + function(result) { + if (result) { + params = { "id" : id }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/rooms/assignme")?>',params,function(data){ + if(data.result) + urlCtrl.loadByHash(location.hash); + else + toastr.error(data.msg); + }); + } + }); + } + +function move( type,destId ){ + bootbox.hideAll(); + mylog.warn("--------------- move ---------------------",type,destId); + bootbox.confirm("<strong>Êtes-vous sûr de vouloir déplacer cette action ?</strong>", + function(result) { + if (result) { + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/rooms/move', + data: { + "type" : type, + "id" : "<?php echo $_GET["id"]?>", + "destId":destId + }, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash(data.url); + } else { + toastr.error(data.msg); + if(data.action == "login") + showPanel( "box-login" ); + } + + $.unblockUI(); + }, + error: function(data) { + $.unblockUI(); + toastr.error("Something went really bad : "+data.msg); + } + }); + } + }); +} +</script> \ No newline at end of file diff --git a/views/rooms/header.php b/views/rooms/header.php new file mode 100755 index 0000000000000000000000000000000000000000..36e636b9d26afdcc768e60acc7e6a10689b5ad09 --- /dev/null +++ b/views/rooms/header.php @@ -0,0 +1,423 @@ +<?php +$cs = Yii::app()->getClientScript(); + +$cssAnsScriptFilesModule = array( + //'/assets/css/rooms/header.css' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); ?> + <style> + +.assemblyHeadSection { + <?php $bg = (@$archived) ? "assemblyParisDayArchived" : "assemblyParisDay";?> + /*background-image:url(<?php echo $this->module->assetsUrl; ?>/images/city/<?php echo $bg; ?>.jpg); */ + background-image:url(<?php echo $this->module->assetsUrl; ?>/images/city/dda-connexion-lines.jpg); + + background-repeat: no-repeat !important; + background-size: 100% 400px !important; + background-position: 0px 0px !important; + } + .bgDDA .modal .modal-header{ + background-image:url(<?php echo $this->module->assetsUrl; ?>/images/city/dda-connexion-lines.jpg); + background-repeat: no-repeat !important; + background-size: auto; +} +.contentProposal{ + background-color: white; +} +.header-parent-space{ + margin: -15px 10px; + padding: 15px 8px 8px; + border-radius: 7px 7px 0px 0px; + background-color: rgba(255, 255, 255, 0); +} + +#room-container{ + min-height:300px; +} +.btn-select-room{ + margin-top: 5px; + border: none; + font-size: 20px; + font-weight: 200; + width: 100%; + text-align: center; + border-radius:100px; +} +.btn-select-room.bg-dark:hover{ + background-color:#58829B !important; +} + +.modal .room-item{ + width:100%; + padding:15px; + font-size:16px; + border-bottom:1px solid #DBDBDB; + border-top:1px solid rgba(230, 230, 230, 0); + float:left; +} +.modal .room-item:hover{ + background-color: rgb(230, 230, 230) !important; + border-top:1px solid rgb(192, 192, 192); +} + +.title-conseil-citoyen { + background-color: rgba(255, 255, 255, 0); + margin: 0px; + padding: 10px; + border-radius: 12px; + -moz-box-shadow: 0px 3px 10px 1px #656565; + -webkit-box-shadow: 0px 3px 10px 1px #656565; + -o-box-shadow: 0px 3px 10px 1px #656565; + box-shadow: 0px 3px 10px 1px rgb(101, 101, 101); + margin-bottom: 10px; +} +.link-tools a:hover{ + text-decoration: underline; +} + +.fileupload-new.thumbnail{ + width:unset; +} +h1.citizenAssembly-header { + font-size: 30px; +} + +.img-room-modal img{ + max-width: 35px; + margin-top: -5px; + margin-right: 10px; + border-radius: 4px; +} +#room-container .badge-danger { + margin-bottom: 2px; + margin-left: 2px; +} +</style> + + <?php if(false){ ?> + <h1 class="text-dark citizenAssembly-header"> + <?php + $urlPhotoProfil = ""; + if(!@$parent){ + if($parentType == Project::COLLECTION) { $parent = Project::getById($parentId); } + if($parentType == Organization::COLLECTION) { $parent = Organization::getById($parentId); } + if($parentType == Person::COLLECTION) { $parent = Person::getById($parentId); } + if($parentType == City::COLLECTION) { $parent = City::getByUnikey($parentId); } + } + + if(isset($parent['profilImageUrl']) && $parent['profilImageUrl'] != ""){ + $urlPhotoProfil = Yii::app()->getRequest()->getBaseUrl(true).$parent['profilImageUrl']; + } + // else{ + // if($parentType == Person::COLLECTION) + // $urlPhotoProfil = $this->module->assetsUrl.'/images/thumb/project-default-image.png'; + // if($parentType == Organization::COLLECTION) + // $urlPhotoProfil = $this->module->assetsUrl.'/images/thumb/orga-default-image.png'; + // if($parentType == Project::COLLECTION) + // $urlPhotoProfil = $this->module->assetsUrl.'/images/thumb/default.png'; + // } + + $icon = "comments"; + $colorName = "dark"; + if($parentType == Project::COLLECTION) { $icon = "lightbulb-o"; $colorName = "purple"; } + if($parentType == Organization::COLLECTION) { $icon = "group"; $colorName = "green"; } + if($parentType == Person::COLLECTION) { $icon = "user"; $colorName = "dark"; } + if($parentType == City::COLLECTION) { $icon = "university"; $colorName = "red"; } + ?> + + <?php //création de l'url sur le nom du parent + $urlParent = Element::getControlerByCollection($parentType).".detail.id.".$parentId; + if($parentType == City::COLLECTION) + $urlParent = Element::getControlerByCollection($parentType).".detail.insee.".$parent["insee"].".postalCode.".$parent["cp"]; + ?> + + <div class="row header-parent-space"> + + <?php if($parentType != City::COLLECTION && $urlPhotoProfil != ""){ ?> + <div class="col-md-3 col-sm-3 col-xs-12 center"> + <img class="thumbnail img-responsive" id="thumb-profil-parent" src="<?php echo $urlPhotoProfil; ?>" alt="image" > + </div> + <?php }else if($parentType == City::COLLECTION){ ?> + <div class="col-md-3 col-sm-3 col-xs-12 center"> + <h1 class="homestead title-conseil-citoyen center text-red"><i class="fa fa-group"></i><br>Conseil Citoyen</h1> + </div> + <?php } ?> + + <?php if($parentType == City::COLLECTION || $urlPhotoProfil != "") + $colSize="9"; else $colSize="12"; + ?> + + <div class="col-md-<?php echo $colSize; ?> col-sm-<?php echo $colSize; ?>"> + <div class="col-md-12 no-padding margin-bottom-15"> + <a href="javascript:urlCtrl.loadByHash('#<?php echo $urlParent; ?>');" class="text-<?php echo $colorName; ?> homestead"> + <i class="fa fa-<?php echo $icon; ?>"></i> + <?php + if($parentType == City::COLLECTION) echo "Commune de "; + echo $parent['name']; + ?> + </a> + </div> + + <?php + if(!@$mainPage){ + $rooms = ActionRoom::getAllRoomsByTypeId($parentType, $parentId); + $discussions = $rooms["discussions"]; + $votes = $rooms["votes"]; + $actions = $rooms["actions"]; + $history = $rooms["history"]; + } + ?> + <div class="col-md-4 no-padding"> + <button type="button" class="btn btn-default bg-dark btn-select-room" data-toggle="modal" data-target="#modal-select-room1"> + <i class="fa fa-comments"></i> Discuter <span class="badge"><?php if(@$discussions) echo count($discussions); else echo "0"; ?></span> + </button><br> + </div> + <div class="col-md-4"> + <button type="button" class="btn btn-default bg-dark btn-select-room" data-toggle="modal" data-target="#modal-select-room2"> + <i class="fa fa-archive"></i> Décider <span class="badge"><?php if(@$votes) echo count($votes); else echo "0"; ?></span> + </button><br> + </div> + <div class="col-md-4 no-padding"> + <button type="button" class="btn btn-default bg-dark btn-select-room" data-toggle="modal" data-target="#modal-select-room3"> + <i class="fa fa-cogs"></i> Agir <span class="badge"><?php if(@$actions) echo count($actions); else echo "0"; ?></span> + </button> + </div> + <div class="col-md-12 margin-top-15 link-tools"> + <a href="javascript:showRoom('all', '<?php echo $parentId; ?>')" class="pull-left text-dark" style="font-size:15px;"><i class="fa fa-list"></i> Afficher tout</a> + <?php if(@$_GET["archived"] == null){ ?> + <a href="javascript:urlCtrl.loadByHash(location.hash+'.archived.1')" class="pull-left text-red" style="font-size:15px;margin-left:30px;"><i class="fa fa-times"></i> Archives</a> + <?php } ?> + <?php //if(@$history && !empty($history)){ ?> + <a href="javascript:" class="pull-right text-dark" style="font-size:15px;" data-toggle="modal" data-target="#modal-select-room4"> + <i class="fa fa-clock-o"></i> Mon historique + </a> + <?php //} ?> + </div> + + <div class="col-md-12 no-padding" style="margin: 15px 0 15px 0 !important;"> + <?php + $btnLbl = "<i class='fa fa-sign-in'></i> ".Yii::t("rooms","JOIN TO PARTICIPATE", null, Yii::app()->controller->module->id); + $ctrl = Element::getControlerByCollection($parentType); + $btnUrl = "urlCtrl.loadByHash('#".$ctrl.".detail.id.".$parentId."')"; + if( $parentType == City::COLLECTION || + ($parentType != Person::COLLECTION && + Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId) )) + { + $btnLbl = "<i class='fa fa-plus'></i> ".Yii::t("rooms","Add an Action Room", null, Yii::app()->controller->module->id); + $btnUrl = "urlCtrl.loadByHash('#rooms.editroom.type.".$parentType.".id.".$parentId."')"; + } + if(!isset(Yii::app()->session['userId'])){ + $btnLbl = "<i class='fa fa-sign-in'></i> ".Yii::t("rooms","LOGIN TO PARTICIPATE", null, Yii::app()->controller->module->id); + $btnUrl = "showPanel('box-login');"; + } + + $addBtn = ( $parentType != Person::COLLECTION ) ? ' <i class="fa fa-angle-right"></i> <a class="filter btn btn-xs btn-primary Helvetica" href="javascript:;" onclick="'.$btnUrl.'">'.$btnLbl.'</a>' : ""; + ?> + <!-- <span class="breadscrum"> + <a class='text-dark' href='javascript:urlCtrl.loadByHash("#rooms.index.type.<?php //echo $parentType ?>.id.<?php //echo $parentId ?>.tab.1")'> + <i class="fa fa-connectdevelop"></i> <?php //echo Yii::t("rooms","Action Rooms", null, Yii::app()->controller->module->id) ?> + </a> + <?php + //if( $parentType != Person::COLLECTION ){ + // echo (@$textTitle) ? "/ ".$textTitle : + // ' <i class="fa fa-angle-right"></i> <a class="filter btn btn-default Helvetica" href="javascript:;" onclick="'.$btnUrl.'">'.$btnLbl.'</a>'; + //} + ?> + </span> --> + </div> + </div> + + </h1> + <?php } ?> + + +<?php +/*createModalRoom($discussions,$parentType, $parentId, 1, "Sélectionnez un espace de discussion", "comments", "discuss", "Aucun espace de discussion"); +createModalRoom($votes,$parentType, $parentId, 2, "Sélectionnez un espace de décision", "archive", "vote", "Aucun espace de décision"); +createModalRoom($actions,$parentType, $parentId, 3, "Sélectionnez un espace d'action", "cogs", "actions", "Aucun espace d'action"); +createModalRoom($history,$parentType, $parentId, 4, "Historique de votre activité", "clock-o", "history", "Aucune activité"); + +//$where = Yii::app()->controller->id.'.'.Yii::app()->controller->action->id; +//if( in_array($where, array("rooms.action","survey.entry"))){ + createModalRoom( array_merge($votes,$actions) ,$parentType, $parentId, 5, + "Choisir un nouvel espace", "share-alt", "move", "Aucun espace","move",$faTitle); +*/ +//} + +function createModalRoom($elements, $parentType, $parentId, $index, $title, + $icon, $typeNew, $endLbl,$action=null,$context=null){ + + + $iconType = array("discuss"=>"comments", "entry" => "archive", "actions" => "cogs"); + + echo '<div class="panel panel-default no-margin" style="border:0px;">'; + + echo '<div class="modal fade" id="modal-select-room'.$index.'" tabindex="-1" role="dialog"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header text-dark"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> + <h2 class="modal-title text-left"> + <i class="fa fa-angle-down"></i> <i class="fa fa-'.$icon.'"></i> + <span class="">'.$title.' <span class="badge">'.count($elements).'</span> + </h2> + </div> + <div class="modal-body no-padding"> + <div class="panel-body no-padding">'; + + if(!empty($elements)) + foreach ($elements as $key => $value) { if(isset($value["_id"])) { + $created = ( @$value["created"] ) ? date("d/m/y h:i",$value["created"]) : ""; + //if($typeNew == "history") var_dump($value); error_log($value["type"]); + if($typeNew == "history" && @$value["type"]){ //error_log($value["type"]); + $type = $value["type"]; + if(@$iconType[$type]) $icon = $iconType[$type]; + } + $col = Survey::COLLECTION; + $attr = 'survey'; + if( @$value["type"] == ActionRoom::TYPE_ACTIONS ){ + $col = ActionRoom::TYPE_ACTIONS; + $attr = 'room'; + } + + $onclick = 'showRoom(\''.$typeNew.'\', \''.(string)$value["_id"].'\')'; + $skip = false; + if( $action == "move"){ + $icon = ($value["type"] == ActionRoom::TYPE_ACTIONS) ? "cogs" : "archive"; + $type = ($context == "cogs") ? "action" : "survey"; + $onclick = 'move(\''.$type.'\', \''.(string)$value["_id"].'\')'; + //remove the current context room destination + //if((string)$value["_id"] == ) //we are missing the current room object in header + } + + $imgIcon = ''; + if(isset($value['profilImageUrl']) && $value['profilImageUrl'] != ""){ + $urlPhotoProfil = Yii::app()->getRequest()->getBaseUrl(true).$value['profilImageUrl']; + $imgIcon = '<img src="'.$urlPhotoProfil.'">'; + } + + $count = 0; + if( @$value["type"] == ActionRoom::TYPE_VOTE ) + $count = PHDB::count(Survey::COLLECTION,array("survey"=>(string)$value["_id"])); + else if( @$value["type"] == ActionRoom::TYPE_ACTIONS ) + $count = PHDB::count(Survey::COLLECTION,array("room"=>(string)$value["_id"])); + else if( @$value["type"] == ActionRoom::TYPE_DISCUSS ) + $count = (empty($value["commentCount"])?0:$value["commentCount"]); + if(!$skip){ + echo '<a href="javascript:" onclick="'.$onclick.'" class="text-dark room-item" data-dismiss="modal">'. + '<i class="fa fa-angle-right"></i> <i class="fa fa-'.$icon.'"></i> '.$value["name"]. + " <span class='badge badge-success pull-right'>". + $count. + //PHDB::count($col,array($attr=>(string)$value["_id"])). + "</span>". + " <span class='pull-right img-room-modal'>". + $imgIcon. + "</span>". + '</a>'; + } + } } + + if(empty($elements)) + echo '<div class="panel-body "><i class="fa fa-times"></i> '.$endLbl.'</div>'; + + echo '</div>'; + echo '</div>'; + + echo '<div class="modal-footer">'; + + if($typeNew != "history" && $typeNew != "move" && Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId) ) + echo '<button type="button" class="btn btn-default pull-left" onclick="javascript:selectRoomType(\''.$typeNew.'\')" + data-dismiss="modal" data-toggle="modal" data-target="#modal-create-room">'. + '<i class="fa fa-plus"></i> <i class="fa fa-'.$icon.'"></i> Créer un nouvel espace'. + '</button>'; + echo '<button type="button" class="btn btn-default" data-dismiss="modal">Annuler</button>'; + + echo '</div>'; + + echo '</div>'; + echo '</div>'; + + echo '</div>'; + + echo '</div>'; +} + +?> + + + +<script type="text/javascript"> + + +jQuery(document).ready(function() { + $('#form-create-room #btn-submit-form').addClass("hidden"); +}); + +function saveNewRoom(){ + $('#form-create-room #btn-submit-form').click(); +} + +function selectRoomType(type){ + mylog.log("selectRoomType",type); + $("#roomType").val(type); + + var msg = "Nouvel espace"; + if(type=="discuss") msg = "<i class='fa fa-comments'></i> " + msg + " de discussion"; + if(type=="framapad") msg = "<i class='fa fa-file-text-o'></i> " + msg + " framapad"; + if(type=="vote") msg = "<i class='fa fa-gavel'></i> " + msg + " de décision"; + if(type=="actions") msg = "<i class='fa fa-cogs'></i> Nouvelle Liste d'actions"; + $("#proposerloiFormLabel").html(msg); + $("#proposerloiFormLabel").addClass("text-dark"); + // $("#btn-submit-form").html('<?php echo Yii::t("common", "Submit"); ?> <i class="fa fa-arrow-circle-right"></i>'); + + //$("#first-step-create-space").hide(400); + $(".roomTypeselect").addClass("hidden"); +} + +function showRoom(type, id){ + + var mapUrl = { "all": + { "url" : "rooms/index/type/<?php echo $parentType; ?>", + "hash" : "rooms.index.type.<?php echo $parentType; ?>" + } , + "discuss": + { "url" : "comment/index/type/actionRooms", + "hash" : "comment.index.type.actionRooms" + } , + "vote": + { "url" : "survey/entries", + "hash" : "survey.entries" + } , + "entry" : + { "url" : "survey/entry", + "hash" : "survey.entry", + }, + "actions": + { "url" : "rooms/actions", + "hash" : "rooms.actions" + } , + "action": + { + "url" : "rooms/action", + "hash" : "rooms.action", + } + } + + var url = mapUrl[type]["url"]+"/id/"+id; + var hash = mapUrl[type]["hash"]+".id."+id; + + $("#room-container").hide(200); + $.blockUI({ + message : "<h4 style='font-weight:300' class='text-dark padding-10'><i class='fa fa-spin fa-circle-o-notch'></i><br>"+trad.currentlyloading+" ...</span></h4>" + }); + + getAjax('#room-container',baseUrl+'/'+moduleId+'/'+url+"/id/"+id+"?renderPartial=true", + function(){ + history.pushState(null, "New Title", "communecter#" + hash); + $("#room-container").show(200); + $.unblockUI(); + },"html"); +} + +</script> + diff --git a/views/rooms/indexDDA.php b/views/rooms/indexDDA.php new file mode 100755 index 0000000000000000000000000000000000000000..5412ade208b456220c135805f2476198cfd034c0 --- /dev/null +++ b/views/rooms/indexDDA.php @@ -0,0 +1,213 @@ +<style> + .thumb-profil-parent-dda{ + + } + .toolbar-DDA{ + position:absolute; + top:115px; + left:50px; + } + + .toolbar-DDA .dropdown{ + display: inline-block; + } + + #accordion .panel{ + margin-top:15px; + } + .panel-group .panel-heading + .panel-collapse > .panel-body { + font-size: 17px; + padding:10px; + } + + + /*#accordion .panel-title a{ + font-weight:200; + color:white; + font-size:18px; + }*/ + + #accordion .panel-title a:hover{ + font-weight:400; + } + .text-light{ + font-weight: 300; + } +} +.datepicker{z-index:12000 !important;} + +a h1.text-azure:hover{ + color:#3C5665 !important; +} +.pr10{margin-right: 10px;} +</style> + +<?php + + //Menu::rooms($_GET["id"],$_GET["type"]); + //$this->renderPartial('../default/panels/toolbar'); + + $urlPhotoProfil = ""; + if(!@$parent){ + if($parentType == Project::COLLECTION) { $parent = Project::getById($parentId); } + if($parentType == Organization::COLLECTION) { $parent = Organization::getById($parentId); } + if($parentType == Person::COLLECTION) { $parent = Person::getById($parentId); } + if($parentType == City::COLLECTION) { $parent = City::getByUnikey($parentId); } + } + + if(isset($parent['profilImageUrl']) && $parent['profilImageUrl'] != "") + $urlPhotoProfil = Yii::app()->getRequest()->getBaseUrl(true).$parent['profilImageUrl']; + else + $urlPhotoProfil = $this->module->assetsUrl.'/images/news/profile_default_l.png'; + + $icon = "comments"; + $colorName = "dark"; + if($parentType == Project::COLLECTION) { $icon = "lightbulb-o"; $colorName = "purple"; } + if($parentType == Organization::COLLECTION) { $icon = "group"; $colorName = "green"; } + if($parentType == Person::COLLECTION) { $icon = "user"; $colorName = "dark"; } + if($parentType == City::COLLECTION) { $icon = "group"; $colorName = "red"; } + + $urlParent = Element::getControlerByCollection($parentType).".detail.id.".$parentId; + if($parentType == City::COLLECTION) + $urlParent = Element::getControlerByCollection($parentType).".detail.insee.".$parent["insee"].".postalCode.".$parent["cp"]; + + if(!isset($_GET["renderPartial"]) && !isset($renderPartial)){ + $this->renderPartial('../rooms/header',array( + "parent" => $parent, + "parentId" => $parentId, + "parentType" => $parentType, + "fromView" => "rooms.index", + "faTitle" => "connectdevelop", + "colorTitle" => "azure", + "textTitle" => "", + "discussions" => $discussions, + "votes" => $votes, + "actions" => $actions, + "history" => $history, + "mainPage" => true + )); + //echo '<div class="col-md-4 panel-white padding-15" id="room-container">'; + } +?> +<!-- +<div class="labelTitleDir"> + <i class="fa fa-inbox fa-2x margin-right-10"></i> <i class="fa fa-angle-down"></i> <b>Espaces de décisions</b> + <hr> +</div> --> + + +<h4 class="margin-top-50"><i class="fa fa-angle-down"></i> Espace coopératif</h4> +<hr> + +<div class="col-md-12 col-sm-12 col-xs-12 panel-white no-padding margin-bottom-50" id="room-container"> + +<div class="panel-group" id="accordion"> + <?php + $auth = ((Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId) /*&& (@$fromView != "entity.detail") */)?true:false); + + if($auth==true) { + /*echo '<button onclick="selectRoomType(\''.$typeNew.'\')" data-toggle="modal" + data-target="#modal-create-room" class="btn btn-link letter-green col-md-12 no-padding" style="text-align:left;">'. + '<b><i class="fa fa-plus"></i> créer un nouvel espace</b>'. + '</button>';*/ + echo '<button onclick="dyFObj.openForm(\'room\',\'sub\')" class="btn btn-link letter-green col-md-12 no-padding" style="text-align:left;">'. + '<b><i class="fa fa-plus"></i> créer un nouvel espace</b>'. + '</button>'; + } + + createAccordionMenu($discussions, 1, "Discussions", "comments", "discuss", "Aucun espace de discussion", $auth, @$fromView); + createAccordionMenu($votes, 2, "Décisions", "gavel", "vote", "Aucun espace de décision", $auth, @$fromView); + createAccordionMenu($actions, 3, "Actions", "cogs", "actions", "Aucun espace d'action", $auth, @$fromView); + ?> +</div> + +<!-- <div id="endOfRoom"> + <a href='javascript:urlCtrl.loadByHash("#rooms.index.type.organizations.id.<?php echo (String) $parentId; ?>")'> + <i class='fa fa-sign-in'></i> Entrer dans l'espace coopératif + </a> +</div> --> + +<?php + function createAccordionMenu($elements, $index, $title, $icon, $typeNew, $emptyMsg, $auth, $fromView){ + + $in = "";//$index == 1 ? "in" : ""; + + echo '<div class="col-md-12 no-padding">'; + echo '<div class="panel panel-default">'; + + echo '<div class="panel-heading text-dark no-padding"> + <div class="panel-title"> + <a data-toggle="collapse" data-parent="#accordion" href="#collapse'.$index.'" class="show-menu-co"> + <i class="fa fa-'.$icon.'"></i> <span class="hide-on-reduce-menu bold">'.$title.'</span> + <span class="badge pull-right hide-on-reduce-menu">'.count($elements).'</span> + </a> + </div> + + </div>'; + + echo '<div id="collapse'.$index.'" class="panel-collapse collapse '.$in.'">'; + + foreach ($elements as $key => $value) { + $created = ( @$value["created"] ) ? date("d/m/y h:i",$value["created"]) : ""; + $col = Survey::COLLECTION; + $attr = 'survey'; + if( @$value["type"] == ActionRoom::TYPE_ACTIONS ){ + $col = ActionRoom::TYPE_ACTIONS; + $attr = 'room'; + } + $onclick = 'loadRoom(\''.$typeNew.'\', \''.(string)$value["_id"].'\')'; + if(@$value["type"] == "entry") $onclick = 'urlCtrl.loadByHash(\'#survey.entry.id.'.(string)$value["_id"].'\')'; + if(@$value["type"] == "action") $onclick = 'urlCtrl.loadByHash(\'#room.action.id.'.(string)$value["_id"].'\')'; + if(@$fromView == "entity.detail") $onclick = 'loadRoom(\''.$typeNew.'\', \''.(string)$value["_id"].'\')'; + + $updated = (@$value["updated"]) ? "<span class='text-extra-small fromNowDDA'>(".DateHelper::fromNow($value["updated"]).")</span>" : ""; + $parentContext = ( @$_GET['type'] == Person::COLLECTION && @$value["parentType"] && @$value["parentId"] ) ? "<div class='pr10 btn btn-default pull-right'>".Element::getLink( $value["parentType"], $value["parentId"])."</div>" : ""; + $count = 0; + if( @$value["type"] == ActionRoom::TYPE_VOTE ) + $count = PHDB::count(Survey::COLLECTION,array("survey"=>(string)$value["_id"])); + else if( @$value["type"] == ActionRoom::TYPE_ACTIONS ) + $count = PHDB::count(Survey::COLLECTION,array("room"=>(string)$value["_id"])); + else if( @$value["type"] == ActionRoom::TYPE_DISCUSS ) + $count = (empty($value["commentCount"])?0:$value["commentCount"]); + echo '<div class="panel-body no-padding hide-on-reduce-menu">'. + '<a href="javascript:'.$onclick.'" class="text-dark padding-top-15 padding-bottom-15">'. + '<small><i class="fa fa-angle-right"></i> '.$value["name"]./*" ".$updated.*/" <div class='badge badge-success pull-right'>".$count."</div> "./*$parentContext.*/"</small>". + '</a>'. + '</div>'; + } + + if(empty($elements)) + echo '<div class="panel-body hide-on-reduce-menu"><small><i class="fa fa-times"></i> '.$emptyMsg.'</small></div>'; + + + + echo '</div>'; + + echo '</div>'; + echo '</div>'; +} + +if(!isset($_GET["renderPartial"]) && !isset($renderPartial)){ + echo "</div>"; // ferme le id="room-container" +} +?> + +<script type="text/javascript"> +jQuery(document).ready(function() { + setTitle("Espaces Coopératifs","connectdevelop"); + $(".main-col-search").addClass("assemblyHeadSection"); + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); +}); + +</script> + +<style> +@media screen and (min-width: 1400px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 48%; + } +} +</style> \ No newline at end of file diff --git a/views/rooms/kill_editAction.php b/views/rooms/kill_editAction.php new file mode 100755 index 0000000000000000000000000000000000000000..e59f38f9de44d9ff0fd2243ef44ddddb1393d6f4 --- /dev/null +++ b/views/rooms/kill_editAction.php @@ -0,0 +1,268 @@ + <?php + + +$cssAnsScriptFiles = array( + '/plugins/bootstrap-datepicker/css/datepicker.css', + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js', + '/plugins/summernote/dist/summernote.css', + '/plugins/summernote/dist/summernote.min.js' +); +HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles,Yii::app()->request->baseUrl); + +//$cssAnsScriptFilesTheme = array('js/form-elements.js'); +//HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + +// if(isset($action)) +// Menu::action( $action ); +// else +// Menu::back() ; +// $this->renderPartial('../default/panels/toolbar'); +// $parent = null; +// if(@$_GET['room']) $parent = ActionRoom::getById($_GET['room']); +// if(@$room) $parent = $room; +// if(@$parentRoom) $parent = $parentRoom; + +// //echo "parent"; var_dump($parent); return; +// if($parent == null) return; + +?> +<div id="editActionContainer"></div> +<style type="text/css"> + .addPropBtn{ + width:100%; + /*background-color: #BBBB77;*/ + } + .removePropLineBtn { + background-color: #E33551; + line-height: 32px; + width: 100%; + } +</style> +<script type="text/javascript"> +var organizerList = {}; +var currentUser = <?php echo json_encode(Yii::app()->session["user"])?>; +var rawOrganizerList = <?php echo json_encode(Authorisation::listUserOrganizationAdmin(Yii::app() ->session["userId"])) ?>; + +var actionFormDefinition = { + "jsonSchema" : { + "title" : "", + "type" : "object", + "properties" : { + "id" :{ + "inputType" : "hidden", + "value" : "<?php echo (isset($action['_id'])) ? $action['_id'] : '' ?>" + }, + "type" :{ + "inputType" : "hidden", + "value" : "<?php echo ActionRoom::TYPE_ACTION?>" + }, + "organizer" : { + "inputType" : "hidden", + "value" : "currentUser" + }, + "name" :{ + "inputType" : "text", + "placeholder" : "<?php echo Yii::t("rooms","Title of the action",null,Yii::app()->controller->module->id) ?>", + "rules" : { + "required" : true + }, + "value" : "<?php echo ( @$action["name"] ) ? $action["name"] : '' ?>", + }, + /*"assignees" : { + "inputType" : "selectMultiple", + "placeholder" : "<?php Yii::t("rooms","Assignees",null,Yii::app()->controller->module->id) ?>", + "value" : "currentUser", + "options" : organizerList + },*/ + "message" :{ + "inputType" : "wysiwyg", + "placeholder" : "<?php echo Yii::t("rooms","Description of the action",null,Yii::app()->controller->module->id) ?>", + "rules" : { + "required" : true + }, + "value" : <?php echo ( @$action["message"] ) ? json_encode($action["message"]) : '""' ?>, + }, + "startDate" :{ + "inputType" : "date", + "placeholder" : "<?php echo Yii::t("rooms","Estimated Start Date",null,Yii::app()->controller->module->id) ?>", + "value":"<?php echo ( @$action['startDate'] ) ? $action['startDate'] : null ?>" + }, + "dateEnd" :{ + "inputType" : "date", + "placeholder" : "<?php echo Yii::t("rooms","Estimated End Date",null,Yii::app()->controller->module->id) ?>", + "value":"<?php echo ( @$action['dateEnd'] ) ? $action['dateEnd'] : null ?>" + }, + "urls" : { + "inputType" : "array", + "placeholder" : "<?php echo Yii::t("rooms","Add urls or Bullet points",null,Yii::app()->controller->module->id) ?>", + "value" : <?php echo ( @$action['urls']) ? json_encode($action['urls']) : "[]" ?>, + }, + "tags" :{ + "inputType" : "tags", + "placeholder" : "Tags", + "value" : "<?php echo ( @$action['tags']) ? implode(',', $action['tags']) : '' ?>", + "values" : <?php echo json_encode(Tags::getActiveTags()) ?> + } + } + } +}; + +var dataBind = { + "#editActionContainer #message" : "message", + "#editActionContainer #name" : "name", + "#editActionContainer #tags" : "tags", + "#editActionContainer #id" : "typeId", + "#editActionContainer #type" : "type", + "#editActionContainer #dateEnd" : "dateEnd" +}; + + +function saveNewAction(){ + toastr.success("saveNewAction"); + $('#form-create-action #btn-submit-form').off().click(); +} + +var proposalObj = <?php echo (isset($action)) ? json_encode($action) : "{}" ?>; + +jQuery(document).ready(function() { + setTitle("<?php echo Yii::t("rooms","Add an Action", null, Yii::app()->controller->module->id); ?>","cogs"); + //add current user as the default value + organizerList["currentUser"] = currentUser.name + " (You)"; + + $.each(rawOrganizerList, function(optKey, optVal) { + organizerList[optKey] = optVal.name; + }); + + editEntrySV (); + $('#form-create-action #btn-submit-form').addClass("hidden"); + + /*! + Non-Sucking Autogrow 1.1.1 + license: MIT + author: Roman Pushkin + https://github.com/ro31337/jquery.ns-autogrow +*/ +(function(){var e;!function(t,l){return t.fn.autogrow=function(i){return null==i&&(i={}),null==i.horizontal&&(i.horizontal=!0),null==i.vertical&&(i.vertical=!0),null==i.debugx&&(i.debugx=-1e4),null==i.debugy&&(i.debugy=-1e4),null==i.debugcolor&&(i.debugcolor="yellow"),null==i.flickering&&(i.flickering=!0),null==i.postGrowCallback&&(i.postGrowCallback=function(){}),null==i.verticalScrollbarWidth&&(i.verticalScrollbarWidth=e()),i.horizontal!==!1||i.vertical!==!1?this.filter("textarea").each(function(){var e,n,r,o,a,c,d;return e=t(this),e.data("autogrow-enabled")?void 0:(e.data("autogrow-enabled"),a=e.height(),c=e.width(),o=1*e.css("lineHeight")||0,e.hasVerticalScrollBar=function(){return e[0].clientHeight<e[0].scrollHeight},n=t('<div class="autogrow-shadow"></div>').css({position:"absolute",display:"inline-block","background-color":i.debugcolor,top:i.debugy,left:i.debugx,"max-width":e.css("max-width"),padding:e.css("padding"),fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),lineHeight:e.css("lineHeight"),resize:"none","word-wrap":"break-word"}).appendTo(document.body),i.horizontal===!1?n.css({width:e.width()}):(r=e.css("font-size"),n.css("padding-right","+="+r),n.normalPaddingRight=n.css("padding-right")),d=function(t){return function(l){var r,d,s;return d=t.value.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\n /g,"<br/> ").replace(/"/g,""").replace(/'/g,"'").replace(/\n$/,"<br/> ").replace(/\n/g,"<br/>").replace(/ {2,}/g,function(e){return Array(e.length-1).join(" ")+" "}),/(\n|\r)/.test(t.value)&&(d+="<br />",i.flickering===!1&&(d+="<br />")),n.html(d),i.vertical===!0&&(r=Math.max(n.height()+o,a),e.height(r)),i.horizontal===!0&&(n.css("padding-right",n.normalPaddingRight),i.vertical===!1&&e.hasVerticalScrollBar()&&n.css("padding-right","+="+i.verticalScrollbarWidth+"px"),s=Math.max(n.outerWidth(),c),e.width(s)),i.postGrowCallback(e)}}(this),e.change(d).keyup(d).keydown(d),t(l).resize(d),d())}):void 0}}(window.jQuery,window),e=function(){var e,t,l,i;return e=document.createElement("p"),e.style.width="100%",e.style.height="200px",t=document.createElement("div"),t.style.position="absolute",t.style.top="0px",t.style.left="0px",t.style.visibility="hidden",t.style.width="200px",t.style.height="150px",t.style.overflow="hidden",t.appendChild(e),document.body.appendChild(t),l=e.offsetWidth,t.style.overflow="scroll",i=e.offsetWidth,l===i&&(i=t.clientWidth),document.body.removeChild(t),l-i}}).call(this); + + $("#editActionContainer #message").autogrow({vertical: true, horizontal: false}); + +}); + +function editEntrySV () { + + mylog.warn("--------------- editEntrySV ---------------------",proposalObj); + $("#editActionContainer").html("<div class='row bg-white'><div class='col-sm-10 col-sm-offset-1'>"+ + "<div class='space20'></div>"+ + //"<h1 id='proposerloiFormLabel' ><?php echo Yii::t("rooms","Add an Action", null, Yii::app()->controller->module->id); ?></h1>"+ + "<form id='ajaxFormAction'></form>"+ + "<div class='space20'></div>"+ + "</div></div>"); + + var formAction = $.dynForm({ + formId : "#editActionContainer #ajaxFormAction", + formObj : actionFormDefinition, + onLoad : function() { + mylog.log("onLoad",proposalObj); + if( proposalObj ) + { + if(proposalObj.startDate) + { + date = new Date(proposalObj.startDate*1000); + var day = date.getDate().toString(); + var month = (date.getMonth()+1).toString(); + var year = date.getFullYear().toString(); + $("#editActionContainer #startDate").val( day+"/"+month+"/"+year ); + } + if(proposalObj.dateEnd) + { + date = new Date(proposalObj.dateEnd*1000); + var day = date.getDate().toString(); + var month = (date.getMonth()+1).toString(); + var year = date.getFullYear().toString(); + $("#editActionContainer #dateEnd").val( day+"/"+month+"/"+year ); + } + activateSummernote("#ajaxFormAction #message"); + $("#editActionContainer #message").code(proposalObj.message); + + } + }, + onSave : function(){ + mylog.log("saving Action !!"); + mylog.log($("#editActionContainer #name").val()); + //one = getRandomInt(0,10); + //two = getRandomInt(0,10); + if( $("#editActionContainer #name").val())// && prompt("combien font "+one+"+"+two+" ?") == one+two ) + { + processingBlockUi(); + var params = { + "room" : "<?php echo (isset($roomId)) ? $roomId : '' ?>", + "email" : "<?php echo Yii::app()->session['userEmail']?>" , + "name" : $("#editActionContainer #name").val() , + "organizer" : $("#editActionContainer #organizer").val(), + "message" : $("#editActionContainer #message").code() , + "type" : "<?php echo ActionRoom::TYPE_ACTION ?>" + }; + mylog.log("processingBlockUiprocessingBlockUiprocessingBlockUiprocessingBlockUiprocessingBlockUi"); + mylog.dir(params); + urls = getUrls(); + if( urls != null ) + params.urls = urls; + if( $("#editActionContainer #id").val() != "" ) + params.id = $("#editActionContainer #id").val(); + if( $("#editActionContainer #tags").val() ) + params.tags = $("#editActionContainer #tags").val().split(","); + if( $("#editActionContainer #startDate").val() ) + params.startDate = $("#editActionContainer #startDate").val(); + if( $("#editActionContainer #dateEnd").val() ) + params.dateEnd = $("#editActionContainer #dateEnd").val(); + + mylog.dir(params); + $.ajax({ + type: "POST", + url: '<?php echo Yii::app()->createUrl($this->module->id."/rooms/saveaction")?>', + data: params, + success: function(data){ + if(data.result){ + if( $("#editActionContainer #id").val() != "" ) + urlCtrl.loadByHash( "#rooms.action.id."+$("#editActionContainer #id").val() ); + else + urlCtrl.loadByHash( "#rooms.actions.id."+data.parentId ) + } + else { + toastr.error(data.msg); + } + $.unblockUI(); + $('#modal-create-action').modal("toogle"); + }, + error: function(data) { + $.unblockUI(); + toastr.error("Something went really bad : "+data.msg); + }, + dataType: "json" + }); + } else + alert("mauvaise réponse, etes vous humain ?"); + return false; + } + }); + mylog.dir(formAction); + +} + +function getUrls() +{ + var urls = []; + $.each($('#editActionContainer .addmultifield'), function() { + if( $(this).val() != "" ) + urls.push( $( this ).val() ); + }); + mylog.log("urls",urls); + return ( urls.length ) ? urls : null; +}; + +function getRandomInt (min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + +</script> + diff --git a/views/rooms/kill_editRoomSV.php b/views/rooms/kill_editRoomSV.php new file mode 100755 index 0000000000000000000000000000000000000000..e1bb429c15ab461aa8ac1f96a5d882ba143df1a1 --- /dev/null +++ b/views/rooms/kill_editRoomSV.php @@ -0,0 +1,21 @@ + +<?php $moduleId = Yii::app()->controller->module->id; ?> + +<script type="text/javascript"> +var listRoomTypes = <?php echo json_encode($listRoomTypes)?>; + + +function getUrls(){ + var urls = []; + $.each($('.addmultifield'), function() { + urls.push( $(this).val() ); + }); + return urls; +} + +function getRandomInt (min, max) { + return Math.floor(Math.random() * (max - min + 1)) + min; +} + + +</script> diff --git a/views/search/searchTerla.php b/views/search/searchTerla.php new file mode 100644 index 0000000000000000000000000000000000000000..ca1543b6601f00bc239d4716d1083398fe66f2b1 --- /dev/null +++ b/views/search/searchTerla.php @@ -0,0 +1,176 @@ +<?php + + $cssAnsScriptFilesModule = array( + '/assets/css/default/search.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + '/js/default/search.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $params = CO2::getThemeParams(); + + $maxImg = 5; + + $page = "search"; + $type = "services"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => $page, + "type" => @$type) ); +?> + +<style> + + .pageContent{ + position: absolute; + top: 180px; + padding: 20px; + } + + .menuSearchTerla{ + border-right: 1px solid #e4e4e4; + } + + .menuSearchTerla button.btn-filter{ + width:100%; + text-align: left; + border-bottom: 1px solid #e4e4e4; + } + + + .menuSearchTerla button.btn-filter:hover{ + text-decoration: none; + border-right: 3px solid #EF5B34; + } + + input#new-search-bar{ + border-radius: 0px; + border: 1px solid lightgray; + height: 34px; + } + + button#btn-start-new-search{ + border-radius: 0px; + border: 0px; + height: 34px; + } + + .name-res-search, + .desc-res-search{ + color:grey; + } + .desc-res-search{ + font-size:13px; + } +</style> + +<div class="col-md-12 col-sm-12 col-xs-12 pageContent bg-white" id="content-social"> + + <div class="col-md-3 col-sm-3 col-xs-3 no-padding menuSearchTerla"> + + <input class="col-md-10 col-sm-10 col-xs-10" id="new-search-bar" placeholder="nouvelle recherche" /> + + <button class="col-md-2 col-sm-2 col-xs-2 btn btn-link bg-orange pull-right" id="btn-start-new-search"> + <i class="fa fa-search"></i> + </button> + + <br><br> + + <h5 class="bg-orange text-white padding-15"><?php echo Yii::t("common", "Filters"); ?></h5> + + + <?php $filters = array("man", "woman", "fashion"); ?> + <?php foreach($filters as $filter){ ?> + <button class="btn btn-link btn-filter text-dark" data-value="<?php echo $filter; ?>"> + <i class="fa fa-caret-right letter-yellow"></i> <?php echo $filter; ?> + </button> + <?php } ?> + + </div> + + <div class="col-md-9 col-sm-9 col-xs-9" style="padding: 25px 100px;"> + <?php echo count($result); ?> résultats<br><hr><br> + <?php foreach ($result as $key => $value) { ?> + <a href="#page.type.<?php echo @$value["type"]; ?>.<?php echo @$value["_id"]; ?>" class="lbh"> + <h4 class="name-res-search"><?php echo $value["name"]; ?></h4> + </a> + + <?php if(@$value["description"]){ ?> + <span class="desc-res-search"><?php echo @$value["description"]; ?></span><br><br> + <?php } ?> + + <a href="#page.type.<?php echo @$value["type"]; ?>.<?php echo @$value["_id"]; ?>" + class="btn btn-link bg-orange pull-left"><i class="fa fa-link"></i> + </a> + + <h5 class="name-res-search pull-left margin-left-15"> + <small>www.bch.org#page.type.<?php echo @$value["type"]; ?>.<?php echo @$value["_id"]; ?></small> + </h5> + + <a href="#page.type.<?php echo @$value["type"]; ?>.<?php echo @$value["_id"]; ?>" + class="lbh btn btn-link bg-orange pull-right"> + VIEW DETAILS + </a> + + <br><br><hr> + + <?php //var_dump($value); ?> + <?php } ?> + </div> + +</div> + +<script type="text/javascript" > + +var type = "<?php echo @$type ? $type : 'all'; ?>"; +var typeInit = "<?php echo @$type ? $type : 'all'; ?>"; +var page = "<?php echo @$page; ?>"; +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + +//var TPL = "kgougle"; + +//allSearchType = ["persons", "NGO", "LocalBusiness", "projects", "Group"]; + +var currentKFormType = ""; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + + $(".headerTitle").html(tradTerla.resultFor" <b>\"" + memorySearch + "\"</b>"); + + initKInterface({"affixTop":320}); + + initSearchInterface(); //themes/co2/assets/js/default/search.js + + $("#new-search-bar").keyup(function(e){ + if(e.keyCode == 13){ console.log("new-search-bar keyup"); + initTypeSearch("services"); + startSearchTerla(0, indexStepInit); + //$(".btn-directory-type").removeClass("active"); + //KScrollTo("#content-social"); + } + }); + + $("#btn-start-new-search").click(function(){ + initTypeSearch("services"); + startSearchTerla(0, indexStepInit); + }); + + $(".btn-filter").click(function(){ + var search = $(this).data("value"); + $("#new-search-bar").val(search); + startSearchTerla(0, indexStepInit); + }); + +}); + +</script> \ No newline at end of file diff --git a/views/sig/generic/mapCss.php b/views/sig/generic/mapCss.php new file mode 100755 index 0000000000000000000000000000000000000000..b58d84fd54a87c747d23eb427821e8763ff0ceda --- /dev/null +++ b/views/sig/generic/mapCss.php @@ -0,0 +1,233 @@ + + +<?php + $moduleName = "sigModule".$sigParams['sigKey']; + + $mapHeight = ( isset( $sigParams["mapHeight"])) ? $sigParams["mapHeight"] : 400; + $mapColor = ( isset( $sigParams["mapColor"])) ? $sigParams["mapColor"] : ''; + $mapTop = ( isset( $sigParams["mapTop"] )) ? $sigParams["mapTop"] : 0; + + $mapBtnBgColor = ( isset( $sigParams["mapBtnBgColor"])) ? $sigParams["mapBtnBgColor"] : '#384C5D'; + $mapBtnColor = ( isset( $sigParams["mapBtnColor"])) ? $sigParams["mapBtnColor"] : '#fff'; + $mapBtnBgColor_hover = ( isset( $sigParams["mapBtnBgColor_hover"])) ? $sigParams["mapBtnBgColor_hover"] : '#5896AB'; + + $panelTop = 20; +?> +<style> + + <?php $mapWidth = "100%"; + //if($sigParams['useRightList']) $mapWidth = "75%"; + ?> + + .<?php echo $moduleName; ?> + .mapCanvas{ + height:<?php echo $mapHeight; ?>px; + width:<?php echo $mapWidth ?> !important; + /*background-color:<?php echo $mapColor; ?>;*/ + /*background:url("<?php echo $this->module->assetsUrl; ?>/images/fabric_plaid.png") repeat;*/ + } + + .<?php echo $moduleName; ?> + .btn-open-panel_map{ + position:absolute !important; + top:<?php echo $panelTop; ?>px; + left:<?php echo $panelTop; ?>px; + } + + .<?php echo $moduleName; ?> + .panel_map{ + max-width:300px !important; + width:300px !important; + background:#7093A7; + border-radius: 0px; + /*position:absolute !important;*/ + /*height:<?php echo $mapHeight; ?>px;*/ + /*top:<?php echo $mapTop; ?>px;*/ + } + + .<?php echo $moduleName; ?> + #right_tool_map{ + height:<?php echo (int)$mapHeight - 60; ?>px; + top:<?php echo (int)$mapTop + 30; ?>px!important; + } + .<?php echo $moduleName; ?> .right_tool_map_header, + .<?php echo $moduleName; ?> .panel_map, + .<?php echo $moduleName; ?> .btn-panel{ + background-color:<?php echo $mapBtnBgColor." !important"; ?>; /*#E6D414*/ + } + + + + #right_locality_map{ + height:<?php echo (int)$mapHeight - 60; ?>px; + top:<?php echo (int)$mapTop + 30; ?>px!important; + width: 30%; + right: 0px!important; + min-width: 400px; + left: unset !important; + box-shadow: -5px -5px 10px -3px rgba(0, 0, 0, 0.4); + } + + + + + + + .<?php echo $moduleName; ?> + #pagination > li.active a{ + background-color:<?php echo $mapBtnBgColor." !important"; ?>; /*#E6D414*/ + border-color:<?php echo $mapBtnBgColor." !important"; ?>; /*#E6D414*/ + } + + .<?php echo $moduleName; ?> + #lbl-chk-scope{ + /*background-color:white;*/ + } + + .<?php echo $moduleName; ?> + #liste_map_element{ + background-color:white; + height:<?php echo $mapHeight-100; ?>px; + } + + <?php $right = "0px"; + if($sigParams['useRightList']) $right = "30%"; + ?> + + .<?php echo $moduleName; ?> + .btn-group-map{ + position:absolute !important; + /*right:<?php echo $right; ?>;*/ + left:20px; + top:<?php echo (int)$mapTop+30; ?>px; + } + .<?php echo $moduleName; ?> + .input-search-place{ + left:30%!important; + bottom:25px; + top:unset!important; + } + + + .<?php echo $moduleName; ?> + .btn-map{ + background-color:<?php echo $mapBtnBgColor." !important"; ?>; /*#E6D414*/ + color:<?php echo $mapBtnColor." !important"; ?>; /*#213042 */ + } + .<?php echo $moduleName; ?> + .btn-map:hover{ + background-color:<?php echo $mapBtnBgColor_hover." !important"; ?>; /*#E6D414#5896AB !important;*/ + } + + .<?php echo $moduleName; ?> + .btn-group-charts { + top:<?php echo $mapTop + 70; ?>px;px; + right:<?php echo $right ?> !important; + position:absolute; + margin-right: 10px; + } + .<?php echo $moduleName; ?> + .btn-group-charts .btn-map { + background-color:rgba(255, 255, 255, 0.72) !important; + font-size:13px !important; + max-width:200px; + text-align: left; + } + .<?php echo $moduleName; ?> + .btn-group-charts .btn-map:hover{ + background-color:#FFF !important; /*#E6D414#5896AB !important;*/ + } + + .<?php echo $moduleName; ?> + .leaflet-tile-container{ + + } + + .<?php echo $moduleName; ?> + #modalItemNotLocated .modal-body .btn-more{ + display: none !important; + } + + .<?php echo $moduleName; ?> + .bg-main-menu{ + background-color: rgba(237, 237, 237, 0.88); + position: fixed; + top: 0px; + left: 0px; + width: 47px; + height: 100%; + -moz-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + -webkit-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + -o-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + box-shadow: 0px 0px 5px 1px rgba(44, 44, 44, 0.87); + filter: progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=180, Strength=5); + } + + + .<?php echo $moduleName; ?> + #mapLegende{ + -moz-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + -webkit-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + -o-box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + box-shadow: 0px 0px 5px -2px rgba(153, 153, 153, 0.73); + filter: progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=180, Strength=5); + display: none; + position: fixed; + top: 70px; + left: 70px; + max-width: 50%; + min-width: 200px; + max-height: 100px; + background-color: rgba(26, 33, 38, 0.93); + border-radius: 4px; + color: white; + padding: 14px; + font-size: 12px; + font-weight: 300; + min-height: 45px; + overflow: hidden; + } + + .<?php echo $moduleName; ?> + .filterMenuMap{ + position:absolute; + top: 90px; + left: 30px; + width:250px; + } + + .<?php echo $moduleName; ?> + .filterMenuMap #sub-menu-left.subsub{ + background-color: rgba(255, 255, 255, 0.9); + min-width:250px; + width:250px; + margin: 0px !important; + } + + .<?php echo $moduleName; ?> + .filterMenuMap #title-sub-menu-category > h4{ + font-size: 17px; + } + + .<?php echo $moduleName; ?> + #mapLegende{ + display: none !important; + } + + /* XS */ + @media screen and (max-width: 768px) { + + .<?php echo $moduleName; ?> + .mapCanvas{ + width:100%; + } + + <?php if(!isset($sigParams['centerBtnTools']) || @$sigParams['centerBtnTools'] != true){ ?> + .<?php echo $moduleName; ?> + .btn-group-map{ + right:0% !important; + left:unset!important; + }<?php } ?> + } + +</style> diff --git a/views/sig/generic/mapLibs.php b/views/sig/generic/mapLibs.php new file mode 100755 index 0000000000000000000000000000000000000000..637713ed35c7423c43a2ae9d714bb2f98e22ffdc --- /dev/null +++ b/views/sig/generic/mapLibs.php @@ -0,0 +1,61 @@ +<?php + $cssAnsScriptFilesModule = array( + + '/assets/css/sig/leaflet/leaflet.css', + '/assets/css/sig/leaflet/leaflet.draw.css', + '/assets/css/sig/leaflet/leaflet.draw.ie.css', + '/assets/css/sig/leaflet/MarkerCluster.css', + '/assets/css/sig/leaflet/MarkerCluster.Default.css', + '/assets/css/sig/leaflet/leaflet.awesome-markers.css', + '/assets/css/sig/sig.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + if(Yii::app()->params["forceMapboxActive"]==false && + Yii::app()->params["mapboxActive"]==false) + $leaflet = array('/js/sig/leaflet/leaflet.js'); + + $cssAndScriptFiles = array( + //'/js/sig/leaflet/leaflet.js', + '/js/sig/leaflet/leaflet.draw-src.js', + '/js/sig/leaflet/leaflet.draw.js', + '/js/sig/leaflet/leaflet.markercluster-src.js', + '/js/sig/leaflet/leaflet.awesome-markers.min.js', + '/js/sig/leaflet/leaflet.bouncemarker.js', + + '/js/sig/map.js' , + '/js/sig/map_initializer.js' , + '/js/sig/map_panel.js' , + '/js/sig/map_popupContent.js' , + '/js/sig/map_rightList.js' , + '/js/sig/map_findPlace.js' , + '/js/sig/map_findPlace.js' , + '/js/sig/map_charts.js', + '/js/smartconso/smartSig.js', + ); + + if(@$leaflet) $cssAndScriptFiles = array_merge($leaflet, $cssAndScriptFiles); + + if(isset($sigParams) && isset($sigParams["useChartsMarkers"])){ + if($sigParams["useChartsMarkers"] == true){ + + $cssAndScriptFilesCharts = array( + '/css/sig/dvf.css', + '/js/sig/dvf/leaflet.dvf.chartmarkers.js', + '/js/sig/dvf/leaflet.dvf.controls.js', + '/js/sig/dvf/leaflet.dvf.datalayer.js', + '/js/sig/dvf/leaflet.dvf.linearfunctions.js', + '/js/sig/dvf/leaflet.dvf.lines.js', + '/js/sig/dvf/leaflet.dvf.markers.js', + '/js/sig/dvf/leaflet.dvf.palettes.js', + '/js/sig/dvf/leaflet.dvf.regularpolygon.js', + '/js/sig/dvf/leaflet.dvf.utils.js' + ); + + $cssAndScriptFiles = array_merge($cssAndScriptFiles, $cssAndScriptFilesCharts); + } + } + + HtmlHelper::registerCssAndScriptsFiles($cssAndScriptFiles, $this->module->assetsUrl); +?> + diff --git a/views/sig/generic/mapView.php b/views/sig/generic/mapView.php new file mode 100755 index 0000000000000000000000000000000000000000..bf417eef8edc69a19e15b923648f008fc07e78d0 --- /dev/null +++ b/views/sig/generic/mapView.php @@ -0,0 +1,328 @@ +<?php + //securise tous les paramètres utilisés dans mapView.php + $elements = array('usePanel', 'useRightList', 'useResearchTools', 'useZoomButton', + 'useHomeButton', 'useFullScreen', 'useHelpCoordinates', 'useChartsMarkers'); + + foreach($elements as $element){ + $sigParams[$element] = isset($sigParams[$element]) ? $sigParams[$element] : false; + } + +?> +<div class="sigModule<?php echo $sigParams['sigKey']; ?>"> + <div class="mapCanvas" id="mapCanvas<?php echo $sigParams['sigKey']; ?>"> + <!-- <center><img class="world_pix" style="margin-top:50px;" src="<?php echo $this->module->assetsUrl; ?>/images/shattered.png"></center> --> + </div> + + <!-- <div id="form-in-map"> + <div id="form-in-map-title"> + + </div> + <div id="form-in-map-content"> + + </div> + </div> --> + + <?php if(isset($sigParams['useHorizontalAroundMe']) && + @$sigParams['useHorizontalAroundMe'] == true ){ ?> + <div class="btn-group btn-groupe-around-me-km btn-groupe-around-me-km-hz" + role="group" aria-label="..."> + <button class="btn btn-map" data-km="2000">2 km</button> + <button class="btn btn-map" data-km="5000">5 km</button> + <button class="btn btn-map" data-km="10000">10 km</button> + <button class="btn btn-map" data-km="25000">25 km</button> + <button class="btn btn-map" data-km="50000">50 km</button> + <button class="btn btn-map" id="loader-aroundme"></button> + + </div> + <?php } ?> + + <div class="bg-main-menu bgpixeltree_sig"></div> + + <?php if($sigParams['useRightList']){ ?> + + + + <div id="right_tool_map" class="hidden-xs hidden-sm min"> + <div id="right_tool_map_search"> + <!-- HEADER --> + <div class="right_tool_map_header"> + + <?php if($sigParams['usePanel']){ ?> + <div class="btn-group btn-group-lg dropdown pull-right" id="btn-tags"> + <button type="button" class="btn btn-map dropdown-toggle" id="btn-panel" data-toggle="dropdown"> + <i class="fa fa-tags"></i> + </button> + <ul class="dropdown-menu panel_map pull-right" id="panel_map" role="menu" aria-labelledby="panel_map"> + <h3 class="title_panel_map"><i class="fa fa-angle-down"></i> <?php echo Yii::t("common", "Filter results by tags"); ?></h3> + <button class='item_panel_map' id='item_panel_map_all'> + <i class='fa fa-star'></i> <?php echo Yii::t("common", "All"); ?> + </button> + </ul> + </div> + <?php } ?> + <?php if($sigParams['useFilterType']){ ?> + <div class="btn-group btn-group-lg dropdown pull-right" id="btn-filter"> + <button type="button" class="btn btn-map dropdown-toggle" id="btn-filters" data-toggle="dropdown"> + <i class="fa fa-filter"></i> + </button> + <ul class="dropdown-menu panel_map" id="panel_filter" role="menu" aria-labelledby="panel_filter"> + <h3 class="title_panel_map"><i class="fa fa-angle-down"></i> <?php echo Yii::t("common", "Filter results by types"); ?></h3> + <button class='item_panel_map' id='item_panel_filter_all'> + <i class='fa fa-star'></i> <?php echo Yii::t("common", "All"); ?> + </button> + </ul> + </div> + <?php } ?> + <span class="right_tool_map_header_title"><?php echo Yii::t("common", "Results"); ?></span> + <span class="right_tool_map_header_info"> / </span> + + <button class="btn btn-link bg-orange btn-open-right-list"> + <i class="fa fa-angle-left"></i> + </button> + + </div> + + <!-- PSEUDO SEARCH --> + <div id="map_pseudo_filters"> + <input class="form-control date-range active" type="text" id="input_name_filter" placeholder="<?php echo Yii::t("common", "Filter by names"); ?> ..."> + </div> + <!-- PSEUDO SEARCH --> + + <!-- LIST ELEMENT --> + <div id="liste_map_element"></div> + + <label id="lbl-chk-scope"> + <nav> + <ul class="pagination pagination-sm" id="pagination"></ul> + </nav> + </label> + + <!-- <label id="lbl-chk-scope" class="hidden"> + <input style="" value="" style="margin-left:0px;" type="checkbox" id="chk-scope"> Filtrer dans la zone visible + </label> --> + </div> + + <div id="right_tool_map_locality" class="hidden" style="background-color: white; overflow-y: scroll; overflow-x: hidden; height: 100%; " > + <!-- HEADER --> + <div class="right_tool_map_header"> + <!-- <span class="right_tool_map_header_title">Ajouter une adresse</span> --> + <h3 class='margin-top-5 padding-10'> + <i class='fa fa-home'></i><span id="title-formInMap"><?php echo Yii::t("common", "Address") ; ?></span> + </h3> + </div> + <!-- LIST ELEMENT --> + <div class='form-group inline-block padding-15 form-in-map'> + <div class='text-dark margin-top-5 hidden-xs'> + <i class='fa fa-circle'></i> <?php echo Yii::t("common", "Enter an address for automatic placement") ; ?> + </div> + <div class='text-dark margin-top-5 hidden-xs'> + <i class='fa fa-circle'></i> <?php echo Yii::t("common", "Move the icon with the mouse for a more precise placement") ; ?> + </div> + <hr class='col-md-12'> + <select class='form-group col-xs-12' name='newElement_country' id='newElement_country'> + <?php + /*echo "<option value=''>".Yii::t("common", "Choose a country")."</option>"; + // $asort = OpenData::$phCountries; + // asort($asort); + $asort = Zone::getListCountry(); + foreach ( $asort as $key => $value) { + echo "<option value='".$value["countryCode"]."'>".$value["name"]."</option>"; + }*/ + ?> + <?php + echo "<option value=''>".Yii::t("common", "Choose a country")."</option>"; + // $asort = OpenData::$phCountries; + // asort($asort); + $asort = array(array("countryCode"=>"NC", + "name"=>"Nouvelle-Calédonie")); + //Zone::getListCountry(); + + foreach ( $asort as $key => $value) { + echo "<option value='".$value["countryCode"]."'>".$value["name"]."</option>"; + error_log($value["countryCode"]." - ".$value["name"]); + } + ?> + </select> + <div id='divCity' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> + <div class='alert alert-warning' role='alert'><i class="fa fa-exclamation-triangle"></i> <?php echo Yii::t("docs","If a city doesn't exist on communecter, you have to write the full name to find the city") ?></div> + <input class='form-group col-md-12 col-xs-12' type='text' name='newElement_city' placeholder='<?php echo Yii::t("common", "Search a city, a town or a postal code") ; ?>'> + <ul class='dropdown-menu col-md-12 col-xs-12' id='dropdown-newElement_locality-found' style="margin-top: -15px; background-color : #ea9d13; max-height : 300px ; overflow-y: auto"> + <li><a href='javascript:' class='disabled'><?php echo Yii::t("common", "Search a city, a town or a postal code") ; ?></a></li> + </ul> + </div> + <div id='divCP' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> + <input class='form-group col-md-12 col-xs-12' type='text' name='newElement_cp' placeholder='<?php echo Yii::t("common", "Add a postal code") ; ?>'> + </div> + <div id='divStreetAddress' class='hidden dropdown pull-left col-md-12 col-xs-12 no-padding'> + <input class='form-group col-md-9 col-xs-9' type='text' style='margin-right:-3px;' name='newElement_street' placeholder='<?php echo Yii::t("common", "streetFormInMap"); ?>'> + <button class='col-md-3 col-xs-3 btn btn-default' style='padding:3px;border-radius:0 4px 4px 0;' type='text' id='newElement_btnSearchAddress'><i class='fa fa-search'></i></button> + </div> + <div class='dropdown pull-left col-xs-12 no-padding'> + <ul class='dropdown-menu' id='dropdown-newElement_streetAddress-found' style="margin-top: -15px; background-color : #ea9d13; max-height : 300px ; overflow-y: auto"> + <li><a href='javascript:' class='disabled'><?php echo Yii::t("common", "Currently researching") ; ?></a></li> + </ul> + </div> + <div id="alertGeo" class="alert alert-warning col-xs-12 hidden" style='margin-bottom: 0px;'> + <strong><?php echo Yii::t("common", "Warning"); ?>!</strong> <?php echo Yii::t("common", "Do not forget to geolocate your address.") ; ?> + </div> + <div id='sumery' class='text-dark col-xs-12 no-padding'> + <h4><?php echo Yii::t("common", "Address Summary"); ?> : </h4> + <div id='street_sumery' class='col-xs-12'> + <span><?php echo Yii::t("common", "streetFormInMap"); ?> :</span> + <span id='street_sumery_value'></span> + </div> + <div id='cp_sumery' class='col-xs-12'> + <span><?php echo Yii::t("common", "Postal code"); ?> :</span> + <span id='cp_sumery_value'></span> + </div> + <div id='city_sumery' class='col-xs-12'> + <span><?php echo Yii::t("common", "City"); ?> :</span> + <span id='city_sumery_value'></span> + </div> + <div id='country_sumery' class='col-xs-12'> + <span><?php echo Yii::t("common", "Country"); ?> :</span> + <span id='country_sumery_value'></span> + </div> + + <input type='hidden' name='newElement_insee'> + <input type='hidden' name='newElement_lat'> + <input type='hidden' name='newElement_lng'> + <input type='hidden' name='newElement_dep'> + <input type='hidden' name='newElement_region'> + <hr class='col-md-12'> + <button class='col-md-8 btn btn-success pull-right' type='text' id='newElement_btnValidateAddress' disabled='disabled'><i class='fa fa-check'></i> <?php echo Yii::t("common", "ValideFormInMap"); ?></button> + <button class='col-md-3 btn btn-danger pull-right' type='text' id='newElement_btnCancelAddress' style='margin-right:5px;'><i class='fa fa-times'></i> <?php echo Yii::t("common", "Cancel"); ?></button> + </div> + </div> + <!-- <label id="lbl-chk-scope"> --> + + <!-- </label> --> + </div> + + </div> + + <div id="modalItemNotLocated" class="modal fade" role="dialog"> + <div class="modal-dialog"> + + <!-- Modal content--> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal">×</button> + <h4 class="modal-title text-dark"><i class="fa fa-map-marker"></i></i> <?php echo Yii::t("common", "This data is not geolocated"); ?></h4> + </div> + <div class="modal-body"></div> + <div class="modal-footer"> + <button type="button" id="btn-open-details" class="btn btn-default btn-sm btn-success" data-dismiss="modal"><i class="fa fa-plus"></i> <?php echo Yii::t("common", "Show the details"); ?></button> + <button type="button" class="btn btn-default btn-sm btn-danger" data-dismiss="modal"><i class="fa fa-times"></i> <?php echo Yii::t("common", "Close"); ?></button> + </div> + </div> + + </div> + </div> + <?php } ?> + + + <div class="btn-group btn-group-lg btn-group-map input-search-place"> + <?php if(false /*désactivé*/ && $sigParams['useResearchTools']){ ?> + <input type="text" class="pull-left input-search-place-in-map txt-find-place" id="txt-find-place" + placeholder="rechercher un lieu, une addresse" style="margin-top:2px;"> + <!-- <button type="button" class="btn btn-map pull-right" id="btn-find-more"><i class="fa fa-ellipsis-h"></i></button> --> + <button type="button" class="btn btn-map pull-right hidden" id="btn-search"><i class="fa fa-map-marker"></i></button> + + <div class="" class="pull-right"> + <div class="hidden" id="full-research"> + <input type="text" class="input-search-place-in-map input-2s" id="txt-num-place" placeholder="n°" style="margin-top:2px;"> + <input type="text" class="input-search-place-in-map input-2s" id="txt-street-place" placeholder="rue" style="margin-top:2px;"><br/> + <input type="text" class="input-search-place-in-map input-3s txt-find-place" id="txt-city-place" placeholder="ville"> + <input type="text" class="input-search-place-in-map input-3s txt-find-place" id="txt-cp-place" placeholder="code postal"><br/> + <input type="text" class="input-search-place-in-map input-4s txt-find-place" id="txt-state-place" placeholder="pays"><br/> + </div> + <div class="dropdown pull-left" id="dropdown-find-place"> + <a href="#" id="btn-dropdown-find-place" data-toggle="dropdown" class="dropdown-toggle"></a> + <ul id="list-dropdown-find-place" class="dropdown-menu" style=" width:100%;" role="menu" aria-labelledby="dropdown-find-place"> + <li style="width:100%;"><a href="#" class="btn-find-place"><i class="fa fa-magic"></i> <?php echo Yii::t("common", "Launch search"); ?> ...</a></li> + </ul> + </div> + </div> + <?php } ?> + <i class="fa fa-refresh fa-spin fa-2x" id="ico_reload"></i> + </div> + + <?php if($sigParams['useChartsMarkers']){ ?> + <div class="btn-group-vertical btn-group-lg btn-group-charts" id="btn-group-charts-map"> + + </div> + <?php } ?> + + <div class="btn-group-map tools-btn"> + + <?php if(!isset($sigParams['useBtnCloseMap']) || @$sigParams['useBtnCloseMap'] == true ){ ?> + <div class="btn-group btn-group-lg tooltips" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Change the map"); ?>"> + <button type="button" class="btn btn-map " id="btn-back" > + <i class="fa fa-chevron-up"></i></button> + </div> + + <?php } ?> + <?php if(@$sigParams['useSatelliteTiles']){ ?> + <div class="btn-group btn-group-lg hidden-xs tooltips" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Change the map"); ?>"> + <button type="button" class="btn btn-map " id="btn-satellite" > + <i class="fa fa-magic"></i></button> + </div> + <?php } ?> + <?php if($sigParams['useZoomButton']){ ?> + <div class="btn-group btn-group-lg"> + <button type="button" class="btn btn-map tooltips" id="btn-zoom-out" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Zoom"); ?> -"> + <i class="fa fa-search-minus"></i></button> + <button type="button" class="btn btn-map tooltips" id="btn-zoom-in" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Zoom"); ?> +"> + <i class="fa fa-search-plus"></i></button> + </div> + <?php } ?> + <?php if($sigParams['useHomeButton']){ ?> + <div class="btn-group btn-group-lg tooltips" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Around me"); ?>"> + <button type="button" class="btn btn-map " id="btn-home"> + <i class="fa fa-bullseye"></i></button> + </div> + <?php } ?> + + </div> + + <div class="filterMenuMap"> + <?php $this->renderPartial("../default/panels/filterMenu", + array("typeSelected"=>"services")); + ?> + </div> + + <?php if(!isset($sigParams['useHorizontalAroundMe']) || + @$sigParams['useHorizontalAroundMe'] != true ){ ?> + <div class="btn-group-vertical btn-groupe-around-me-km" role="group" aria-label="..."> + <button class="btn btn-map" data-km="2000">2 km</button> + <button class="btn btn-map" data-km="5000">5 km</button> + <button class="btn btn-map" data-km="10000">10 km</button> + <button class="btn btn-map" data-km="25000">25 km</button> + <button class="btn btn-map" data-km="50000">50 km</button> + <button class="btn btn-map bg-azure tooltips" id="btn-share-aroundme" onclick="javascript:Sig.showIframeSig()" + data-toggle="tooltip" data-placement="bottom" title="<?php echo Yii::t("common", "Around me"); ?>"> + <i class="fa fa-share-square-o"></i> + </button> + <button class="btn btn-map" id="loader-aroundme"> + </button> + </div> + <?php } ?> + + <div id="mapLegende" class="text-azure hidden-xs">Legende</div> + + <?php if($sigParams['useFullScreen']){ ?> + <!--<div class="btn-group btn-group-lg btn-group-map btn-full-screen"> + <button type="button" class="btn btn-map " id="btn-full-screen"><i class="fa fa-expand"></i></button> + </div>--> + <?php } ?> + + <?php if($sigParams['useHelpCoordinates']){ ?> + <div id="help-coordinates">0,000</div> + <?php } ?> +</div> diff --git a/views/smartconso/alertecde.php b/views/smartconso/alertecde.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/views/smartconso/conseau.php b/views/smartconso/conseau.php new file mode 100644 index 0000000000000000000000000000000000000000..323b7e711e14f4bc94cd62d8cfa5d6d9c06f310f --- /dev/null +++ b/views/smartconso/conseau.php @@ -0,0 +1,73 @@ +<?php + + $cssAnsScriptFilesModule = array( + //'/assets/css/default/search.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + '/js/smartconso/smartconso.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "smartconso"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => $page, + "type" => @$type) ); +?> + + +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 bg-white pageContent margin-top-50 padding-bottom-50"> + <div class="col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10 col-sm-12 col-xs-12 no-padding"> + + <?php $this->renderPartial('../smartconso/smartheader', + array( "title"=>"Cons'eau'" , + "subtitle"=>"Consommation d'eau provenant quotidiennement de la télérelève") ); + ?> + + <div class="col-xs-12 col-sm-6 col-md-3" id=""> + <canvas id="smartPie1"/> + </div> + + <div class="col-xs-12 col-sm-6 col-md-3" id=""> + <canvas id="smartPie2"/> + </div> + + <div class="col-xs-12 col-sm-6 col-md-3" id=""> + <canvas id="smartPie3"/> + </div> + + <div class="col-xs-12 col-sm-6 col-md-3" id=""> + <canvas id="smartPie4"/> + </div> + + </div> +</div> + + + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array()); ?> + +<script type="text/javascript" > + +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + initKInterface({"affixTop":320}); + + smartChartInit("smartPie1", chartValues, "pie"); + smartChartInit("smartPie2", chartValues, "line"); + smartChartInit("smartPie3", chartValues, "bar"); + smartChartInit("smartPie4", chartValues, "radar"); +}); + +</script> \ No newline at end of file diff --git a/views/smartconso/consoelec.php b/views/smartconso/consoelec.php new file mode 100644 index 0000000000000000000000000000000000000000..0c30874627ab8c8f3aef812dbbfaa27fabaa5063 --- /dev/null +++ b/views/smartconso/consoelec.php @@ -0,0 +1,48 @@ +<?php + + $cssAnsScriptFilesModule = array( + '/assets/css/default/search.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + //'/js/default/search.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "smartconso"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => $page, + "type" => @$type) ); +?> + + +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 bg-white pageContent margin-top-50 padding-bottom-50"> + <div class="col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10 col-sm-12 col-xs-12 no-padding"> + Hello Conso Elec + </div> +</div> + + + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array()); ?> + +<script type="text/javascript" > + +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + initKInterface({"affixTop":320}); + +}); + +</script> \ No newline at end of file diff --git a/views/smartconso/consointernet.php b/views/smartconso/consointernet.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/views/smartconso/home.php b/views/smartconso/home.php new file mode 100644 index 0000000000000000000000000000000000000000..942952a4c0694e3e7c14a0719292f1796996fce6 --- /dev/null +++ b/views/smartconso/home.php @@ -0,0 +1,144 @@ +<?php + + $cssAnsScriptFilesModule = array( + '/assets/css/default/search.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->theme->baseUrl); + + $cssAnsScriptFilesModule = array( + //'/js/default/search.js', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + + $page = "smartconso"; + + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => $page, + "type" => @$type) ); +?> + +<style> + .smartcat .description{ + max-height: 150px; + min-height: 150px; + display: inline-block; + overflow:hidden; + } + + .smartcat .bg-light{ + background: #ece9e9; + } +</style> + +<?php + $ecocat = array(array("title"=>"Cons' Eau", + "defit"=>"Energie - défit n°2", + "hash" => "#smartconso.p.conseau", + "icon" => "tint", + "description" => "Proposer une application mobile ou web permettant de présenter + les données de consommation d'eau provenant quotidiennement de la télérelève."), + + array("title"=>"Alerte CDE", + "defit"=>"Energie - défit n°3", + "hash" => "#smartconso.p.alertecde", + "icon" => "tint", + "description" => "Proposer une application smartphone permettant d’alerter la CDE : + en cas de constat de fuite sur le réseau d’eau potable ou d’assainissement, + qui se rependrait dans l’environnement (sur la chaussée, sur le bas côté…) ; + en cas de constat d’une sécheresse sur une ressource en eau ; a + vec géolocalisation précise et prise de photos."), + + array("title"=>"Pollution de l'eau", + "defit"=>"Environnement - défit n°1", + "hash" => "#smartconso.p.pollutioneau", + "icon" => "tint", + "description" => "Créer une solution numérique qui permette de déclencher + des plans d’action en cas de pollution de l’eau. / + Croiser les données de pluviométrie (de Meteo France + CDE à l’Anse Vata) + avec les données de débordement d'ouvrage d'assainissement de la CDE et si possible + les données bactériologiques des plages de Nouméa + (à fournir par la DRS de la ville de Nouméa). + L’analyse de ces données en temps réel peut déclencher différents plans d’actions."), + + array("title"=>"Conso électrique", + "defit"=>"Energie - défit n°4", + "hash" => "#smartconso.p.consoelec", + "icon" => "plug", + "description" => "Proposer une application permettant de connaître sa consommation électrique en temps réel."), + + + array("title"=>"Conso internet", + "defit"=>"Energie - défit n°5", + "hash" => "#smartconso.p.consointernet", + "icon" => "podcast", + "description" => "Nautile propose plusieurs défis liés à la consommation internet : + Alertes de consommation selon une limite définie par l’utilisateur / Profils de consommation + (selon l’heure, le jour, le type de trafic, résidentiel, entreprises, etc.) + à corréler avec d’autres sources de données. / + Statistiques globales d’utilisations par type de trafic / + Corréler les données de consommation avec la météo (ex : cyclone). "), + + + array("title"=>"Qualité de l'air", + "defit"=>"Environnement - défit n°3", + "hash" => "#smartconso.p.qualiteaire", + "icon" => "flag", + "description" => "Développer une application smartphone pour connaître la qualité de l'air"), + + + + + + ); +?> + + +<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 bg-white pageContent margin-top-50 padding-bottom-50"> + <div class="col-lg-offset-1 col-md-offset-1 col-lg-10 col-md-10 col-sm-12 col-xs-12 no-padding"> + <?php foreach ($ecocat as $key => $category) { ?> + <div class="col-xs-6 col-sm-4 col-md-4 col-lg-4 padding-15 smartcat"> + <div class="col-xs-12 padding-15 shadow2 bg-light"> + <h4> + <a href="<?php echo $category["hash"]; ?>" class="lbh letter-blue"> + <i class="fa fa-hashtag"></i> <?php echo $category["title"]; ?> + </a> + <br> + <small> + <i class="fa fa-<?php echo $category["icon"]; ?>"></i> + <?php echo $category["defit"]; ?> + </small> + </h4> + <small class="description"><?php echo $category["description"]; ?></small> + <br> + <a href="<?php echo $category["hash"]; ?>" + class="btn btn-link bg-green-k lbh pull-right"> + <i class="fa fa-rocket"></i> Accéder à l'application <i class="fa fa-angle-right"></i> + </a> + </div> + </div> + <?php } ?> + </div> +</div> + + + + +<?php $this->renderPartial($layoutPath.'footer.'.Yii::app()->params["CO2DomainName"], array()); ?> + +<script type="text/javascript" > + +var titlePage = "<?php echo Yii::t("common",@$params["pages"]["#".$page]["subdomainName"]); ?>"; + +jQuery(document).ready(function() { + + setTitle("", "", titlePage); + initKInterface({"affixTop":320}); + +}); + +</script> \ No newline at end of file diff --git a/views/smartconso/pollutioneau.php b/views/smartconso/pollutioneau.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/views/smartconso/qualiteaire.php b/views/smartconso/qualiteaire.php new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/views/smartconso/smartheader.php b/views/smartconso/smartheader.php new file mode 100644 index 0000000000000000000000000000000000000000..15f86a43aef496935bed504b0f7ca755e9d7ae18 --- /dev/null +++ b/views/smartconso/smartheader.php @@ -0,0 +1,12 @@ +<?php + $cssAnsScriptFilesTheme = array( + "/plugins/Chart-2.6.0/Chart.min.js" + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); +?> + +<h4> + <?php echo @$title; ?><br> + <small><?php echo @$subtitle; ?></small> +</h4> +<hr> \ No newline at end of file diff --git a/views/smartconso/telereleve.php b/views/smartconso/telereleve.php new file mode 100644 index 0000000000000000000000000000000000000000..9b939dac73cb24138dd0e06701c62970b25ab2a0 --- /dev/null +++ b/views/smartconso/telereleve.php @@ -0,0 +1 @@ +hello telereleve ! \ No newline at end of file diff --git a/views/stat/chartGlobal.php b/views/stat/chartGlobal.php new file mode 100755 index 0000000000000000000000000000000000000000..3c588ec042a7cc9ed9bd004a7451f545f8c303b1 --- /dev/null +++ b/views/stat/chartGlobal.php @@ -0,0 +1,311 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); + Menu::statistics(); + $this->renderPartial('../default/panels/toolbar'); +?> + +<?php + $cs = Yii::app()->getClientScript(); + // if(!Yii::app()->request->isAjaxRequest) + // { + $cssAnsScriptFilesModule = array( + '/plugins/d3/d3.v3.min.js', + '/plugins/d3/c3.min.js', + '/plugins/d3/c3.min.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + // } + +?> + +<!-- ***** CITOYENS ***** --> +<h4>Evolution du nombre de communecté</h4> +<div id="chartCitoyens"></div> +<script type="text/javascript" > + +var chartCitoyens = c3.generate({ + bindto: '#chartCitoyens', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'line', + names: {'citoyens' : 'Citoyens'} + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + + +</script> + +<!-- LINKS --> +<h4>Evolution du nombre de liens entre entités</h4> +<div id="chartLinks"></div> +<script type="text/javascript" > + +var chartLinks = c3.generate({ + bindto: '#chartLinks', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'bar', + groups: [ + <?php echo json_encode(array_keys($groups['linkTypes'])); ?> + ], + names: <?php echo json_encode($groups['linkTypes']); ?> + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + + +</script> + +<!-- ORGANIZATIONS --> +<h4>Evolution du nombre d'organisations</h4> +<div id="chartOrganizations"></div> +<script type="text/javascript" > + +var chartOrganizations = c3.generate({ + bindto: '#chartOrganizations', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'bar', + groups: [ + <?php echo json_encode(array_keys($groups['organisationTypes'])); ?> + ], + names: <?php echo json_encode($groups['organisationTypes']); ?> + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + + +</script> + +<!-- EVENTS --> +<h4>Evolution du nombre d'événements</h4> +<div id="chartEvents"></div> +<script type="text/javascript" > + +var chartEvents = c3.generate({ + bindto: '#chartEvents', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'bar', + groups: [ + <?php echo json_encode(array_keys($groups['eventTypes'])); ?> + ], + names: <?php echo json_encode($groups['eventTypes']); ?> + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + +</script> + +<!-- PROJECTS --> +<h4>Evolution du nombre de projets</h4> +<div id="chartProjects"></div> +<script type="text/javascript" > + +var chartProjects = c3.generate({ + bindto: '#chartProjects', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'line', + groups: [ + [] + ], + names: {'projects' : 'Projets'} + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + +</script> + +<!-- ACTIONSROOMS --> +<h4>Evolution du nombre de salles de vote</h4> +<div id="chartActionRooms"></div> +<script type="text/javascript" > + +var chartActionRooms = c3.generate({ + bindto: '#chartActionRooms', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'bar', + groups: [ + <?php echo json_encode(array_keys($groups['listRoomTypes'])); ?> + ], + names: <?php echo json_encode($groups['listRoomTypes']); ?> + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); +</script> + +<!-- MODULES --> +<h4>Evolution du nombre de modules par organisation</h4> +<div id="chartModulesOrga"></div> +<script type="text/javascript" > + +var chartModulesOrga = c3.generate({ + bindto: '#chartModulesOrga', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'bar', + groups: [ + <?php echo json_encode(array_keys($groups['moduleTypes'])); ?> + ], + names: <?php echo json_encode($groups['moduleTypes']); ?> + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + +</script> + +<!-- ***** SALLE DE VOTE ***** --> +<h4>Evolution du nombre de salle de vote</h4> +<div id="chartSurveys"></div> +<script type="text/javascript" > + +var chartSurveys = c3.generate({ + bindto: '#chartSurveys', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'line', + names: {'survey' : 'Salle de vote'} + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); + + +</script> + +<script type="text/javascript" > + //Title + jQuery(document).ready(function() { + setTitle("Espace administrateur : Statistiques","cog"); + chartCitoyens.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/citoyens/chart/global", + mimeType: 'json' + }); + + chartLinks.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/links/chart/global", + mimeType: 'json' + }); + + chartOrganizations.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/organizations/chart/global", + mimeType: 'json' + }); + + + chartEvents.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/events/chart/global", + mimeType: 'json' + }); + + chartProjects.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/projects/chart/global", + mimeType: 'json' + }); + + + chartActionRooms.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/actionRooms/chart/global", + mimeType: 'json' + }); + + + chartModulesOrga.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/modules/chart/global", + mimeType: 'json' + }); + + + chartSurveys.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/survey/chart/global", + mimeType: 'json' + }); + + }); + +</script> \ No newline at end of file diff --git a/views/stat/chartLogs.php b/views/stat/chartLogs.php new file mode 100755 index 0000000000000000000000000000000000000000..ee3f1fcbb92e87a7bbc5074862e10d8d509a06b2 --- /dev/null +++ b/views/stat/chartLogs.php @@ -0,0 +1,108 @@ +<?php + $cs = Yii::app()->getClientScript(); + $layoutPath = 'webroot.themes.'.Yii::app()->theme->name.'.views.layouts.'; + //header + menu + $this->renderPartial($layoutPath.'header', + array( "layoutPath"=>$layoutPath , + "page" => "admin") ); + Menu::statistics(); + $this->renderPartial('../default/panels/toolbar'); +?> + +<?php + $cs = Yii::app()->getClientScript(); + // if(!Yii::app()->request->isAjaxRequest) + // { + $cssAnsScriptFilesModule = array( + '/plugins/d3/d3.v3.min.js', + '/plugins/d3/c3.min.js', + '/plugins/d3/c3.min.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule,Yii::app()->request->baseUrl); + // } + +?> + +<!-- ***** CITOYENS ***** --> +<h4>Evolution du nombre de log</h4> +<div id="chartLogs"></div> +<script type="text/javascript" > + +var chartLogs = c3.generate({ + bindto: '#chartLogs', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'line', + names: {'logs' : 'Logs'} + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } +}); +</script> + +<?php foreach ($actionsLog as $key => $value) { ?> + <?php $actionWellNamed = str_replace("/", "_", $key) ; ?> + + <h4>Evolution des logs pour <?php echo $key;?> </h4> + <div id="chart_<?php echo $actionWellNamed; ?>"></div> + <script type="text/javascript" > + + var chart_<?php echo $actionWellNamed; ?> = c3.generate({ + bindto: '#chart_<?php echo $actionWellNamed; ?>', + data: { + x : 'x', + xFormat: '%d/%m/%Y', + columns: [], + type: 'line', + <?php if($value['waitForResult']) { ?> + groups: [ + <?php echo json_encode(array_keys($groups['resultTypes'])); ?> + ], + names: <?php echo json_encode($groups['resultTypes']); ?> + <?php } else { ?> + names: {'logs' : 'Logs'} + <?php } ?> + + }, + axis: { + x: { + type: 'timeseries', // this needed to load string x value + tick: { + format: '%d/%m/%Y' + } + } + } + }); + + + chart_<?php echo $actionWellNamed; ?>.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/logs/chart/action/action/<?php echo $actionWellNamed; ?>", + mimeType: 'json' + }); + </script> + +<?php } ?> + + + +<script type="text/javascript" > + //Title + jQuery(document).ready(function() { + + setTitle("Espace administrateur : Statistiques","cog"); + chartLogs.load({ + url: baseUrl+"/"+moduleId+"/stat/getstatjson/sector/logs/chart/global", + mimeType: 'json' + }); + + }); + +</script> \ No newline at end of file diff --git a/views/survey/entryStandalone.php b/views/survey/entryStandalone.php new file mode 100755 index 0000000000000000000000000000000000000000..1ba2ea2cea5e4490d4cb6e28d3ac2c4cefdc10b4 --- /dev/null +++ b/views/survey/entryStandalone.php @@ -0,0 +1,612 @@ +<?php + $cs = Yii::app()->getClientScript(); + $cssAnsScriptFilesModule = array( + //'/survey/js/highcharts.js', + '/js/dataHelpers.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + + + $cssAnsScriptFilesBase = array( + //X-editable + '/plugins/x-editable/css/bootstrap-editable.css', + '/plugins/x-editable/js/bootstrap-editable.js', + //DatePicker + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js' , + '/plugins/bootstrap-datepicker/js/locales/bootstrap-datepicker.fr.js' , + '/plugins/bootstrap-datepicker/css/datepicker.css', + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesBase, Yii::app()->request->baseUrl); + + $logguedAndValid = Person::logguedAndValid(); + $voteLinksAndInfos = Action::voteLinksAndInfos($logguedAndValid,$survey); +?> +<style type="text/css"> + + #commentHistory .panel-scroll{ + max-height:unset !important; + } + .info-survey{ + font-weight: 500; + font-size: 13px; + border-top: 1px solid rgb(210, 210, 210); + padding-top: 15px; + margin-top: 0px; + } + + #profil_fileUpload{ + min-height: 180px; + } + .datepicker{z-index:12000 !important;} + + +.footer-comments{ + /*margin-top: 15px !important;*/ + /*float:left;*/ + padding: 30px; +} +.ctnr-txtarea { + position: absolute; + right: 30px!important; + left: 70px!important; +} + +.textarea-new-comment { + max-width: 99% !important; + min-width: 99% !important; + float: right; +} + +</style> + +<?php + //ca sert a quoi ce doublon ? + if(@$survey["survey"]){ + $survey = Survey::getById($survey["_id"]); + $room = ActionRoom::getById($survey["survey"]); + $parentType = $room["parentType"]; + $parentId = $room["parentId"]; + }else{ + $parentType = $survey["organizerType"]; + $parentId = $survey["organizerId"]; + $room = Element::getByTypeAndId($parentType, $parentId); + } + + $nameParentTitle = ""; + if($parentType == Organization::COLLECTION && isset($parentId)){ + $orga = Organization::getById($parentId); + $nameParentTitle = htmlentities($orga["name"]); + } + + + $nameList = (strlen($room["name"])>20) ? substr($room["name"],0,20)."..." : $room["name"]; + $extraBtn = ( Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId) ) ? + ' <i class="fa fa-caret-right"></i> '. + '<a class="filter btn btn-xs btn-primary Helvetica lbh" href="#survey.editEntry.survey.'.(string)$room["_id"].'">'. + '<i class="fa fa-plus"></i> '.Yii::t( "survey", 'Add a proposal', null, Yii::app()->controller->module->id). + '</a>' + : ''; + + if(!isset($_GET["renderPartial"])){ + /*$this->renderPartial('../rooms/header',array( + "archived"=> (@$room["status"] == ActionRoom::STATE_ARCHIVED) , + "parent" => @$parent, + "parentId" => @$parentId, + "parentType" => @$parentType, + "parentSpace" => @$parentSpace, + "fromView" => "survey.entry", + "faTitle" => "gavel", + "colorTitle" => "azure", + "textTitle" => "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#rooms.index.type.$parentType.id.$parentId.tab.2\")'><i class='fa fa-gavel'></i> ".Yii::t("rooms","Decide", null, Yii::app()->controller->module->id)."</a>". + " / ". + "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#survey.entries.id.".$survey["survey"]."\")'><i class='fa fa-th'></i> ".$nameList."</a>".$extraBtn + + )); + echo '<div class="col-md-12 panel-white padding-15" id="room-container">';*/ + } +?> + +<div class="padding-25 row vote-row contentProposal bg-white" > + + <div class="col-md-12"> + <!-- start: REGISTER BOX --> + <div class="box-vote box-pod"> + <h1 class="text-dark" style="font-size: 17px;margin-top: 20px;"> + <i class="fa fa-angle-down"></i> + <span class="homestead"><i class="fa fa-archive"></i> Espace de décision :</span> + <a href="javascript:loadRoom('vote', '<?php echo @$survey["survey"]; ?>')"> + <?php echo $room["name"]; ?> + </a> + <hr> + </h1> + + <div class="col-md-12 voteinfoSection"> + <?php + $voteDownCount = (isset($survey[Action::ACTION_VOTE_DOWN."Count"])) ? $survey[Action::ACTION_VOTE_DOWN."Count"] : 0; + $voteAbstainCount = (isset($survey[Action::ACTION_VOTE_ABSTAIN."Count"])) ? $survey[Action::ACTION_VOTE_ABSTAIN."Count"] : 0; + $voteUnclearCount = (isset($survey[Action::ACTION_VOTE_UNCLEAR."Count"])) ? $survey[Action::ACTION_VOTE_UNCLEAR."Count"] : 0; + $voteMoreInfoCount = (isset($survey[Action::ACTION_VOTE_MOREINFO."Count"])) ? $survey[Action::ACTION_VOTE_MOREINFO."Count"] : 0; + $voteUpCount = (isset($survey[Action::ACTION_VOTE_UP."Count"])) ? $survey[Action::ACTION_VOTE_UP."Count"] : 0; + $totalVotes = $voteDownCount+$voteAbstainCount+$voteUpCount+$voteUnclearCount+$voteMoreInfoCount; + $oneVote = ($totalVotes!=0) ? 100/$totalVotes:1; + $voteDownCount = $voteDownCount * $oneVote ; + $voteAbstainCount = $voteAbstainCount * $oneVote; + $voteUpCount = $voteUpCount * $oneVote; + $voteUnclearCount = $voteUnclearCount * $oneVote; + $voteMoreInfoCount = $voteMoreInfoCount * $oneVote; + ?> + + <div class="col-md-6 no-padding margin-bottom-15"> + <?php if( @($organizer) ){ ?> + <span class="text-red" style="font-size:13px; font-weight:500;"> + <i class="fa fa-angle-right"></i> + <?php echo Yii::t("rooms","Made by ") ?> + <a style="font-size:14px;" href="<?php echo @$organizer['link'] ?>" + class="lbh text-dark"> + <?php echo @$organizer['name'] ?> + </a> + </span><br/> + <?php } ?> + <span class="text-extra-large text-bold text-dark col-md-12" style="font-size:25px !important;"> + <i class="fa fa-file-text"></i> <?php echo $survey["name"] ?> + </span> + </div> + <div class="col-md-6"> + <div class="box-ajaxTools"> + <?php if ( isset(Yii::app()->session["userId"]) && $survey["organizerId"] == Yii::app()->session["userId"] ) + { + $hasVote = (@$survey["voteUpCount"] || @$survey["voteAbstainCount"] || @$survey["voteUnclearCount"] || @$survey["voteMoreInfoCount"] || @$survey["voteDownCount"] ) ? true : false; + if( !$hasVote && $voteLinksAndInfos["avoter"] != "closed" ) + { ?> + <a class="tooltips btn btn-default " href="javascript:dyFObj.editElement('surveys','<?php echo $survey["_id"] ?>');" > + <i class="fa fa-pencil "></i> <span class="hidden-sm hidden-md hidden-xs">Éditer</span> + </a> + <?php } ?> + <a class="tooltips btn btn-default" href="javascript:;" onclick="$('#modal-select-room5').modal('show')" + data-placement="bottom" data-original-title="Déplacer cette proposition dans un autre espace"> + <i class="fa fa-share-alt text-grey "></i> <span class="hidden-sm hidden-md hidden-xs">Déplacer</span> + </a> + <?php + if( !( ( @$survey["dateEnd"] && $survey["dateEnd"] < time()) ) ) + { ?> + <a class="tooltips btn btn-default " href="javascript:;" onclick="closeEntry('<?php echo $survey["_id"]; ?>')" + data-placement="bottom" data-original-title="Supprimer cette proposition"> + <i class="fa fa-times text-red "></i> <span class="hidden-sm hidden-md hidden-xs">Fermer</span> + </a> + <?php } + } ?> + <a href="javascript:;" data-id="explainSurveys" class="tooltips btn btn-default explainLink" + data-placement="bottom" data-original-title="Comprendre les propositions"> + <i class="fa fa-question-circle "></i> <span class="hidden-sm hidden-md hidden-xs"></span> + </a> + </div> + </div> + </div> + + <div class="col-md-4 col-sm-4 col-xs-12 no-padding" style="padding-right: 15px !important;"> + + <?php + $img = (@$survey['profilImageUrl']) ? "<img class='img-responsive' src='".Yii::app()->createUrl('/'.@$survey['profilImageUrl'])."'/>" : ""; + echo $img; + + if(isset( Yii::app()->session["userId"]) && false) + { + if(Yii::app()->session["userEmail"] != $survey["email"]) + { + if(!(isset($survey[Action::ACTION_FOLLOW]) + && is_array($survey[Action::ACTION_FOLLOW]) + && in_array(Yii::app()->session["userId"], $survey[Action::ACTION_FOLLOW]))) + {} + else { + + echo '<div class="space10"></div>'. + Yii::t("rooms","You are Following this vote.",null,Yii::app()->controller->module->id). + "<i class='fa fa-rss' ></i>"; + } + } else { + + echo '<div class="space10"></div>'. + Yii::t("rooms","You created this vote.",null,Yii::app()->controller->module->id); + + if( Yii::app()->request->isAjaxRequest){ ?> + <a class="btn btn-xs btn-default" onclick="dyFObj.editElement('surveys','<?php echo $survey["_id"] ?>');" href="javascript:;"> + <i class='fa fa-pencil' ></i> + <?php echo Yii::t("rooms","Edit this Entry",null,Yii::app()->controller->module->id) ?> + </a> + <?php } ?> + <?php } ?> + + <?php } ?> + <div class="col-md-12 padding-10"> + <?php if( @( $survey["tags"] ) ){ ?> + <span class="text-red" style="font-size:13px; font-weight:500;"><i class="fa fa-tags"></i> + <?php foreach ( $survey["tags"] as $value) { + echo '<span class="badge badge-danger text-xss">#'.$value.'</span> '; + }?> + </span><br> + <?php } ?> + </div> + </div> + + <div class="col-md-8 col-sm-8 col-xs-12 col-tool-vote text-dark" style="margin-bottom: 10px; margin-top: 10px; font-size:15px;"> + + <span class="text-azure"> + <i class="fa fa-calendar"></i> + <?php echo Yii::t("rooms","Since",null,Yii::app()->controller->module->id) ?> : + <?php echo date("d/m/Y",$survey["created"]) ?> + + </span> + <br> + <?php if( @$survey["dateEnd"] ){ ?> + <span class="text-red"> + <i class="fa fa-calendar"></i> + <?php echo Yii::t("rooms","Ends",null,Yii::app()->controller->module->id) ?> : + <a href="javascript:" id="endDate" data-type="date" data-title="Date de fin" data-emptytext="Date de cloture de la proposition" class="editable editable-click" > + </a> + </span> + <span> + <?php + $canEditEndDate = ( $voteLinksAndInfos["avoter"] != "closed" && isset(Yii::app()->session["userId"]) && $survey["organizerId"] == Yii::app()->session["userId"]) ? true : false; + ?> + </span> + <br><hr> + <span> + <i class="fa fa-user"></i> + <?php echo Yii::t("rooms","VISITORS",null,Yii::app()->controller->module->id) ?> : + <?php echo (isset($survey["viewCount"])) ? $survey["viewCount"] : "0" ?> + </span> + <br> + <span> + <i class="fa fa-user"></i> + <?php echo Yii::t("rooms","VOTERS",null,Yii::app()->controller->module->id) ?> : + <?php echo ( @$voteLinksAndInfos["totalVote"] ) ? $voteLinksAndInfos["totalVote"] : "0"; ?> + </span> + <br><hr> + <?php } ?> + <div class="text-bold text-dark"> + <?php + $canParticipate = Authorisation::canParticipate(Yii::app()->session['userId'],$parentType,$parentId); + if( $canParticipate && $voteLinksAndInfos["hasVoted"] && $voteLinksAndInfos["avoter"] != "closed" ) + echo $voteLinksAndInfos["links"]; + else if( $canParticipate && $voteLinksAndInfos["avoter"] == "closed" ) + echo '<i class="fa fa-angle-right"></i><span class="text-red"> Cette proposition est cloturé depuis le '.date("d/m/y",@$survey["dateEnd"]).'</span>'; + else if( $canParticipate && !$voteLinksAndInfos["hasVoted"] ) + echo '<i class="fa fa-angle-right"></i> Vous n\'avez pas voté'; + else if( !$canParticipate && isset(Yii::app()->session['userId']) && $parentType == "cities") + echo '<i class="fa fa-angle-right"></i> Vous devez habiter cette commune pour voter ici'; + else if( !$canParticipate && isset(Yii::app()->session['userId']) ) + echo '<i class="fa fa-angle-right"></i> Devenez membre pour voter ici'; + else if( !$canParticipate && !isset(Yii::app()->session['userId']) ) + echo '<i class="fa fa-angle-right"></i> Connectez-vous pour voter'; + ?> + </div> + + </div> + + <div class="col-xs-12 no-padding"> + + <div class="col-xs-12 text-dark" style="font-size:15px"> + <hr style="margin-top:0px"> + <?php echo nl2br(@$survey["message"]); ?> + <hr> + <h2 class="text-center homestead text-dark margin-bottom-25"><i class="fa fa-angle-down"></i> Espace de vote</h2> + </div> + + <div class="col-xs-12"> + <?php echo Survey::getChartCircle($survey, $voteLinksAndInfos, $parentType,$parentId); ?> + <div class="col-md-12 col-sm-12 no-padding margin-top-10"><hr></div> + </div> + + <?php if( @( $survey["urls"] ) ){ ?> + <div class="col-md-12 col-xs-12 col-sm-12 center"> + + <h2 class="text-dark"><br><i class="fa fa-link"></i> Informations complémentaires</h2> + <?php foreach ( $survey["urls"] as $value) { + if( strpos($value, "http://")!==false || strpos($value, "https://")!==false ) + echo '<a href="'.$value.'" class="text-large" style="word-wrap: break-word;" target="_blank">'. + ''.$value. + '</a><br/> '; + else + echo '<span class="text-large"><i class="fa fa-angle-right"></i> '.$value.'</span><br/> '; + }?> + </div> + <?php } ?> + </div> + + <?php if( $totalVotes > 0 && false){ ?> + <div class="col-md-5 radius-10" style="border:1px solid #666; background-color:#ddd;"> + <div class="leftInfoSection chartResults" > + <?php //echo getChartBarResult($survey); ?> + <div id="container2"></div> + </div> + </div> + <?php } ?> + </div> + </div> + + <div class="col-md-12 col-sm-12 commentSection leftInfoSection" > + <h2 class='text-dark homestead text-center' style="margin: 10px 0px 15px;"> + <i class="fa fa-angle-down"></i> Discussion + </h2> + <div class="box-vote box-pod margin-10 commentPod"></div> + </div> + +</div> + +<?php + if(!isset($_GET["renderPartial"])){ + echo "</div>"; // ferme le id="room-container" + } +?> + +<style type="text/css"> + .footerBtn{font-size: 2em; color:white; font-weight: bolder;} +</style> + +<script type="text/javascript"> + +/* ************************************** +* +* Initialisation +* +***************************************** */ + + var contextDataDDA = { + name : "<?php echo addslashes(@$survey["name"]) ?>", + id : "<?php echo (string)@$survey["_id"] ?>", + room : "<?php echo (string)@$survey["survey"] ?>", + type : "entry", + controller : "survey", + controller : "<?php echo Survey::CONTROLLER;?>", + otags : "<?php echo addslashes(@$survey["name"]).",débat, proposition, question, vote, communecter,".addslashes(@implode(",", @$survey["tags"])) ?>", + odesc : <?php echo json_encode( 'Propositions : '.addslashes(@$survey["name"])); ?>, + parentType : "<?php echo @$survey["parentType"] ?>", + parentId : "<?php echo (string)@$survey["parentId"] ?>" + }; + +clickedVoteObject = null; +var images = <?php echo json_encode(@$images) ?>; +var mode = "view"; +var itemId = "<?php echo $survey["_id"] ?>"; +var endDate = "<?php echo date("d/m/Y",@$survey["dateEnd"]) ?>"; + +jQuery(document).ready(function() { + $.fn.editable.defaults.container='body'; + $(".main-col-search").addClass("assemblyHeadSection"); + //setTitle("Propositions, débats, votes","gavel"); + $('.box-vote').show(); + + $(".tooltips").tooltip(); + + $('#form-edit-entry #btn-submit-form').addClass("hidden"); + + $(".commentPod").html("<i class='fa fa-spin fa-refresh'></i> Chargement des commentaires"); + getAjax(".commentPod",baseUrl+"/"+moduleId+"/comment/index/type/surveys/id/<?php echo $survey['_id'] ?>", + function(){ $(".commentCount").html( $(".nbComments").html() ); + },"html"); + + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); + + editEndDate(); + +}); + +//activate Xedit on endDate (#1177) +function editEndDate() { +<?php + if( $canEditEndDate ) { +?> + mylog.log("Init XEdit end date"); + $('#endDate').editable({ + pk: itemId, + url: baseUrl+"/"+moduleId+"/element/updatefields/type/<?php echo Survey::COLLECTION?>", + mode: 'popup', + placement: "right", + format: 'yyyy-mm-dd', + viewformat: 'dd/mm/yyyy', + datepicker: { + weekStart: 1, + }, + //toggle:'mouseenter', + showbuttons: true, + success : function(data) { + if(data.result) { + toastr.success(data.msg); + loadActivity=true; + }else + return data.msg; + } + }); + + //formatDate = "YYYY-MM-DD HH:mm"; + mylog.log("End Date : "+moment(endDate, "DD/MM/YYYY").format("YYYY-MM-DD")); + $('#endDate').editable('setValue', moment(endDate, "DD/MM/YYYY").format("YYYY-MM-DD"), true); + +<?php } ?> +} + +function saveEditEntry(){ + $('#form-edit-entry #btn-submit-form').click(); +} + +function addaction(id,action) +{ + mylog.warn("--------------- addaction ---------------------"); + if( checkIsLoggued( "<?php echo Yii::app()->session['userId']?>" )) + { + var message = "<span class='text-dark'>Vous avez choisi de voter <strong>" + trad[action] + "</strong></span><br>"; + var input = "<span class='text-red'><i class='fa fa-warning'></i> Vous ne pourrez pas changer votre vote</span>"+ + "<span id='modalComment'>"+ + '<textarea class="newComment wysiwygInput" rows="2" style="width: 100%" placeholder="Laisser un commentaire... (optionnel)"></textarea>'+ + "</span><br>"+ + '<script type="text/javascript" >'+ + '$(".wysiwygInput").off().on("focus", function(){ activateSummernote(".newComment");})'+ + '<\/script>'; + + var boxNews = bootbox.dialog({ + title: message, + message: input, + buttons: { + annuler: { + label: "Annuler", + className: "btn-default", + callback: function() { + $("."+clickedVoteObject).removeClass("faa-bounce animated"); + } + }, + success: { + label: "Confirmer", + className: "btn-info", + callback: function() { + var voteComment = $("#modalComment .newComment").val(); + params = { + "userId" : '<?php echo Yii::app()->session["userId"]?>' , + "id" : id , + "collection":"surveys", + "action" : action + }; + console.log("voteComment", voteComment); + if(voteComment != ""){ + params.comment = trad[action]+' : '+voteComment; + saveComment(params.comment); + } + ajaxPost(null,'<?php echo Yii::app()->createUrl($this->module->id."/survey/addaction")?>',params,function(data){ + urlCtrl.loadByHash(location.hash); + }); + } + } + } + }); + + } + } + +var activePanel = "vote-row"; +function showHidePanels (panel) +{ + $('.'+activePanel).slideUp(); + $('.'+panel).slideDown(); + activePanel = panel; +} + +function buildResults () { + + + mylog.log("buildResults"); + + var getColor = { + 'Pou': '#93C22C', + 'Con': '#db254e', + 'Abs': 'white', + 'Pac': 'yellow', + 'Plu': '#789289' + }; + + mylog.log("setUpGraph"); + $('#container2').highcharts({ + chart: { + plotBackgroundColor: null, + plotBorderWidth: null, + plotShadow: false, + //marginTop: -20, + backgroundColor: "#ddd" + }, + title: { + text: "Resultats" + }, + tooltip: { + pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>' + }, + plotOptions: { + pie: { + allowPointSelect: true, + cursor: 'pointer', + //size: 200, + dataLabels: { + enabled: true, + color: '#000000', + connectorColor: '#000000', + format: '<b>{point.name}</b>: {point.percentage:.1f} %' + } + } + }, + exporting: { + enabled: false + }, + + series: [{ + type: 'pie', + name: 'Vote', + data: [ + { name: 'Vote Pour',y: <?php echo $voteUpCount?>,color: getColor['Pou'] }, + { name: 'Vote Contre',y: <?php echo $voteDownCount?>,color: getColor['Con'] }, + { name: 'Abstention',y: <?php echo $voteAbstainCount?>,color: getColor['Abs'] }, + { name: 'Pas Clair',y: <?php echo $voteUnclearCount?>,color: getColor['Pac'] }, + { name: "Plus d'infos",y: <?php echo $voteMoreInfoCount?>,color: getColor['Plu'] } + ] + }] + }); +} + + +function closeEntry(id) +{ + mylog.warn("--------------- closeEntry ---------------------"); + + bootbox.confirm("<strong>Êtes-vous sûr de vouloir fermer cette proposition ?</strong> (fermeture définitive) ", + function(result) { + if (result) { + params = { + "id" : id + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/survey/close")?>',params,function(data){ + if(data.result) + window.location.reload(); + else + toastr.error(data.msg); + }); + } + }); + } + +function move( type,destId ){ + bootbox.hideAll(); + mylog.warn("--------------- move ---------------------",type,destId); + bootbox.confirm("<strong>Êtes-vous sûr de vouloir déplacer cette proposition ?</strong>", + function(result) { + if (result) { + $.ajax({ + type: "POST", + url: baseUrl+'/'+moduleId+'/rooms/move', + data: { + "type" : type, + "id" : "<?php echo $_GET["id"]?>", + "destId":destId + }, + dataType: "json", + success: function(data){ + if(data.result){ + toastr.success(data.msg); + urlCtrl.loadByHash(data.url); + } else { + toastr.error(data.msg); + if(data.action == "login") + showPanel( "box-login" ); + } + + $.unblockUI(); + }, + error: function(data) { + $.unblockUI(); + toastr.error("Something went really bad : "+data.msg); + } + }); + } + }); +} + +</script> \ No newline at end of file diff --git a/views/survey/index.php b/views/survey/index.php new file mode 100755 index 0000000000000000000000000000000000000000..350958798e1b5334089dac00007d5c8617e208cb --- /dev/null +++ b/views/survey/index.php @@ -0,0 +1,956 @@ +<?php + $cs = Yii::app()->getClientScript(); + + $cssAnsScriptFilesModule = array( + // '/survey/css/mixitup/reset.css', + '/survey/css/mixitup/style.css', + '/survey/js/jquery.mixitup.min.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, $this->module->assetsUrl); + + $cssAnsScriptFilesModule = array( + //'/plugins/share-button/ShareButton.min.js' , + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->request->baseUrl); + + $commentActive = true; +?> + +<?php + $nameList = (strlen($where["survey"]["name"])>20) ? substr($where["survey"]["name"],0,20)."..." : $where["survey"]["name"]; + $extraBtn = ( Authorisation::canParticipate( Yii::app()->session['userId'], $parentType, $parentId ) ) + ? ' <i class="fa fa-caret-right"></i> <a class="filter btn btn-xs btn-primary Helvetica lbh" href="#survey.editEntry.survey.'.(string)$where["survey"]["_id"].'"><i class="fa fa-plus"></i> '.Yii::t( "rooms", 'Add a proposal').'</a>' + : ''; + + if(!isset($_GET["renderPartial"])){ + $this->renderPartial('../rooms/header',array( + "archived"=> (@$where["survey"]["status"] == ActionRoom::STATE_ARCHIVED) , + "parent" => $parent, + "parentId" => $parentId, + "parentType" => $parentType, + "fromView" => "survey.entries", + "faTitle" => "gavel", + "colorTitle" => "azure", + "textTitle" => + "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#rooms.index.type.$parentType.id.$parentId.tab.2\")'><i class='fa fa-gavel'></i> ".Yii::t("rooms","Decide")."</a>"." / ". + "<a class='text-dark btn' href='javascript:urlCtrl.loadByHash(\"#survey.entries.id.".(string)$where["survey"]["_id"]."\")'><i class='fa fa-th'></i> ".$nameList."</a>".$extraBtn + )); + echo '<div class="col-md-12 panel-white padding-15" id="room-container">'; + } +?> + +<h1 class="text-dark" style="font-size: 25px;margin-top: 20px;"> + <?php $icon = (@$where["survey"]["status"] == ActionRoom::STATE_ARCHIVED) ? "download" : "archive"; + $archived = (@$where["survey"]["status"] == ActionRoom::STATE_ARCHIVED) ? "<span class='text-small text-red helvetica'>(ARCHIVED)</span>" : "";?> + <i class="fa fa-angle-down"></i> + <span class="homestead"><i class="fa fa-<?php echo $icon;?>"></i> Espace de décision :</span> + <?php echo $where["survey"]["name"].$archived;?> +</h1> + +<?php + Menu::survey( $where["survey"] ); + $this->renderPartial('../default/panels/toolbar'); +?> + +<style type="text/css"> + + + .assemblyHeadSection { + /*background-image:url(<?php echo $this->module->assetsUrl; ?>/images/city/assemblyHead.png); */ + /*background-image:url(<?php echo $this->module->assetsUrl; ?>/images/bg/noise_lines.png); */ + } + + .connect{border-radius: 8px; opacity: 0.9;background-color: #182129; margin-bottom: 10px;border:1px solid #3399FF;width: 100%;padding: 10px } + button.filter,button.sort{color:#000;} + /*a.btn{margin:3px;}*/ + .mix{border-radius: 8px;} + .home{margin-top: 50px;} + + /*.infolink{border-top:1px solid #fff}*/ + + .leftlinks a.btn{background-color: yellow;border: 1px solid yellow;} + /*.rightlinks a.btn{background-color: beige;border: 1px solid beige;}*/ + a.btn.alertlink{background-color:red;color:white;border: 1px solid red;} + a.btn.golink{background-color:green;color:white;border: 1px solid green;} + a.btn.voteUp{background-color: #93C22C;border: 1px solid green;} + a.btn.voteUnclear{background-color: yellow;border: 1px solid yellow;} + a.btn.voteMoreInfo{background-color: #C1ABD4 !important;border: 1px solid #789289;} + a.btn.voteAbstain{color: black;background-color: white;border: 1px solid white;} + a.btn.voteDown{background-color: #db254e;border: 1px solid #db254e;} + .step{ background-color: #182129; opacity: 0.9;} + .taglist{width: 255px;display: inline;background-color:#3490EC;color:#000;padding: 3px 5px;height: 28px; } + + .progress-bar-green{background-color: #93C22C;} + .progress-bar-yellow{background-color: yellow; color:black !important;} + .progress-bar-white{background-color: #C9C9C9; color:black !important;} + .progress-bar-purple{background-color: #C1ABD4;} + .progress-bar-red{background-color: #db254e;} + + .btnvote{ + color: white !important; + padding: 8px!important; + font-weight: 500; + border-radius: 30px!important; + display: inline-block !important; + } + + .color-btnvote-green{ background-color: #93C22C!important;} + .color-btnvote-yellow{ background-color: yellow!important; color:black !important;} + .color-btnvote-white{ background-color: #FFF!important; color:black !important; border: 1px solid #939393;} + .color-btnvote-purple{ background-color: #C1ABD4!important;} + .color-btnvote-red{ background-color: #db254e!important;} + .controls{ + background: transparent; + border-bottom: 1px solid #BDBDBD; + border-top: 1px solid #fff; + } + + .mixcontainer .mix{ + border-radius:0px; + border-color: #CCC; + height:375px; + margin:1% 1% !important; + float:left; + moz-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + -webkit-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + -o-box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + box-shadow: 0px 2px 4px -3px rgba(101, 101, 101, 0.61); + filter: progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=180, Strength=4); + } + + .mixcontainer .mix a.active, .mixcontainer .mix span.active{ + background-color: transparent; + color: #717E87; + font-size: 13px; + margin: 0px; + float: left; + border: 0px; + } + .mixcontainer .mix a.titleMix{ + margin-top: 4px !important; + float: left; + width: 100%; + overflow-y:hidden; + height:50px; + font-size: 17px; + } + .mixcontainer .mix a.titleMix:hover{ + text-decoration: underline !important; + } + + .leftlinks { + text-align: left; + float: left; + /*width: 100%;*/ + } + + .leftlinks a.btn{ + border: 1px solid rgba(0, 0, 0, 0.25) !important; + border-radius: 20px; + font-size: 18px; + width:35px; + height:35px; + } + + .leftlinks a.btn:hover{ + color:#3C5665; + } + + .mixcontainer .mix span { + margin: 0px; + } + + .mixcontainer .mix,.mixcontainer .mix a, .mixcontainer .mix span{ + background-color: white; + border-color: #ccc; + } + .mixcontainer .switch,.mixcontainer .switch a, .mixcontainer .switch span{ + background-color: #eee; + } + .mixcontainer .mix span.message-propostal{ + height: 135px; + overflow-y: hidden; + } + + .home .controls { + border: 0px solid #E4E4E4; + } + + .message-propostal{ + font-size: 13px !important; + font-weight: 300 !important; + margin-top: 0px !important; + min-height: 105px; + max-height: 105px; + line-height: 1.3; + width:100%; + } + + .lbl-info-survey{ + font-size: 12px !important; + font-weight: 500 !important; + margin-top:3px; + /*padding:4px;*/ + } + + .progress{ + margin-bottom:5px; + margin-top:5px; + width:100%; + } + + + .stepContainer hr { + margin-top: 5px; + margin-bottom: 5px; + border: 0; + border-top: 1px solid #e6e6e6; + width: 100%; + float: left; + } + + .filter.btn{ + margin-bottom: 6px; + } + + .h5voteres{ + font-size: 10px; + } + + @media screen and (max-width: 1399px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 48%; + } + .assemblyHeadSection { + background-position: 0px 50px; + } + } + @media screen and (min-width: 1400px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 31%; + } + } + + @media screen and (max-width: 1000px) { + .message-propostal{ + min-height: 155px; + max-height: 155px; + } + .mixcontainer .mix { + height: 400px; + } + } + + @media screen and (max-width: 767px) { + .assemblyHeadSection { + background-position: 0px 0px; + } + .message-propostal{ + min-height: 165px; + max-height: 165px; + } + .mixcontainer .mix { + height: 410px; + } + } + + @media screen and (max-width: 680px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 98%; + } + .message-propostal{ + min-height: 155px; + max-height: 155px; + } + .mixcontainer .mix { + height: 415px; + } + } + @media screen and (max-width: 480px) { + .mixcontainer .mix, .mixcontainer .gap{ + width: 98%; + } + .message-propostal{ + min-height: 195px; + max-height: 195px; + } + .mixcontainer .mix { + height: 455px; + } + } + .datepicker{z-index:12000 !important;} +</style> + + +<div id="surveyDetails"></div> + +<section class="mt80 stepContainer"> + <div class=" home "> + + <?php + $logguedAndValid = Person::logguedAndValid(); + $alltags = array(); + $blocks = ""; + $tagBlock = ""; + $cpBlock = ""; + $cps = array(); + $count = 0; + $switchcount = 1; + + + + /* ************************************** + * go through the list of entries for the survey and build filters + ***************************************** */ + function buildEntryBlock( $entry,$uniqueVoters,$alltags,$parentType,$parentId,$switchcount,$canParticipate, $isArchived){ + $logguedAndValid = Person::logguedAndValid(); + $tagBlock = ""; + $cpBlock = ""; + $name = $entry["name"]; + $message = substr(@$entry["message"],0,280); + $email = (isset($entry["email"])) ? $entry["email"] : ""; + $cpList = (isset($entry["cp"])) ? $entry["cp"] : ""; + if( !isset($_GET["cp"]) && $entry["type"] == Survey::TYPE_SURVEY ) + { + if(isset($entry["cp"])) + { + if(is_array($entry["cp"])) + { + $cpList = ""; + foreach ($entry["cp"] as $cp) { + if(!in_array($cp, $cps)){ + $cpBlock .= ' <button class="filter " data-filter=".'.$cp.'">'.$cp.'</button>'; + array_push($cps, $cp); + } + $cpList .= $cp." "; + } + } + else if(!in_array($entry["cp"], $cps)) + { + $cpBlock .= ' <button class="filter " data-filter=".'.$entry["cp"].'">'.$entry["cp"].'</button>'; + array_push($cps, $entry["cp"]); + } + } + } + + $tags = ""; + if(isset($entry["tags"])) + { + foreach ($entry["tags"] as $t) + { + if(!empty($t) && !in_array($t, $alltags)) + { + array_push($alltags, $t); + $tagBlock .= ' <button class="filter bg-red btn btn-xs" data-filter=".'.$t.'"><i class="fa fa-tag"></i> '.$t.'</button>'; + } + $tags .= $t.' '; + } + } + + $count = PHDB::count ( Survey::COLLECTION, array( "type" => Survey::TYPE_ENTRY, + "survey" => (string)$entry["_id"] ) ); + + /* ************************************** + //check if I wrote this law + *************************************** */ + $meslois = ( $logguedAndValid && Yii::app()->session["userEmail"] && $entry['email'] == Yii::app()->session["userEmail"] ) ? "myentries" : ""; + + //checks if the user is a follower of the entry + $followingEntry = ( $logguedAndValid && Action::isUserFollowing($entry,Action::ACTION_FOLLOW) ) ? "myentries":""; + + $message = "<div class='text-dark no-border message-propostal col-md-12 no-padding pull-left'>".$message."</div>"; + + //$infoslink bring visual detail about the entry + $infoslink = ""; + $infoslink .= (!empty($followingEntry)) ? "<a class='btn voteAbstain filter' data-filter='.myentries' ><i class='fa fa-rss infolink' ></i></a>" :""; + + /* ************************************** + Rendering Each block + ****************************************/ + $voteLinksAndInfos = Action::voteLinksAndInfos($logguedAndValid,$entry); + $avoter = ( @$entry['status'] == ActionRoom::STATE_ARCHIVED || $isArchived ) ? "archived" :$voteLinksAndInfos["avoter"]; + $hrefComment = "#commentsForm"; + $commentCount = 0; + //$linkComment = ($logguedAndValid && $commentActive) ? "<a class='btn ".$entry["_id"].Action::ACTION_COMMENT."' role='button' data-toggle='modal' href=\"".$hrefComment."\" title='".$commentCount." Commentaire'><i class='fa fa-comments '></i></a>" : ""; + $totalVote = $voteLinksAndInfos["totalVote"]; + //$info = ($totalVote) ? '<span class="info">'.$totalVote.' sur <span class="info voterTotal">'.$uniqueVoters.'</span> vote(s)</span><br/>':'<span class="info"></span>'; + + $surveyIsClosed = (isset($entry["dateEnd"]) && $entry["dateEnd"] < time() ) ; + $surveyHasVoted = (isset($voteLinksAndInfos["hasVoted"]) && $voteLinksAndInfos["hasVoted"] == true) ? true : false; + + $content = ($entry["type"]==Survey::TYPE_ENTRY) ? "".@$entry["message"]:""; + + + $moderatelink = ( @$where["type"]==Survey::TYPE_ENTRY && $isModerator && isset( $entry["applications"][Yii::app()->controller->module->id]["cleared"] ) && $entry["applications"][Yii::app()->controller->module->id]["cleared"] == false ) ? "<a class='btn golink' href='javascript:moderateEntry(\"".$entry["_id"]."\",1)'><i class='fa fa-plus ' ></i></a><a class='btn alertlink' href='javascript:moderateEntry(\"".$entry["_id"]."\",0)'><i class='fa fa-minus ' ></i></a>" :""; + $rightLinks = ( @$entry["applications"][Yii::app()->controller->module->id]["cleared"] == false ) ? $moderatelink : $infoslink ; + $rightLinks = ( $entry["type"] == Survey::TYPE_ENTRY ) ? "<div class='rightlinks'>".$rightLinks."</div>" : ""; + $ordre = $voteLinksAndInfos["ordre"]; + $created = ( @$entry["created"] ) ? date("d/m/y h:i",$entry["created"]) : ""; + + $commentBtn = ""; + if(isset($entry["commentCount"]) && $entry["commentCount"] > 0) + $commentBtn = "<br><i class='fa fa-comment'></i> ".@$entry["commentCount"]; + + $views = ( @$entry["viewCount"] ) ? + "<span class='no-border pull-right text-dark' style='font-size:13px;'> + <i class='fa fa-eye'></i> ".$entry["viewCount"]. + $commentBtn."</span>" + : ""; + + + $byInfo = ""; + if ( isset($entry["parentType"]) && isset($entry["parentId"]) ) + { + if($entry["parentType"] == Organization::COLLECTION){ + $parentCtrler = Organization::CONTROLLER; + $parentIcon = "group"; + $parentColor = "green"; + } + else if($entry["parentType"] == Person::COLLECTION){ + $parentCtrler = Person::CONTROLLER; + $parentIcon = "user"; + $parentColor = "yellow"; + }else if($entry["parentType"] == Project::COLLECTION){ + $parentCtrler = Project::CONTROLLER; + $parentIcon = "lightbulb-o"; + $parentColor = "purple"; + }else if($entry["parentType"] == City::COLLECTION){ + $parentCtrler = City::CONTROLLER; + $parentIcon = "university"; + $parentColor = "red"; + } + //$parentTitle = '<a href="'.Yii::app()->createUrl("/communecter/".$parentCtrler."/dashboard/id/".$id).'">'.$parent["name"]."</a>'s "; + $byInfo = "by <a href='javascript:urlCtrl.loadByHash(\"#".$parentCtrler.".detail.id.".$entry["parentId"]."\")'><i class='fa fa-".$parentIcon."'></i></a>"; + } + + $contextType = ( $entry["type"] == Survey::TYPE_ENTRY ) ? Survey::COLLECTION : Survey::PARENT_COLLECTION; + + + $closeBtn = ""; + $isClosed = ""; + $stateLbl = "<i class='fa fa-gavel'></i> ".Yii::t('rooms', "VOTE"); + $mainClick = 'urlCtrl.loadByHash("#survey.entry.id.'.(string)$entry["_id"].'")'; + $titleIcon = 'gavel'; + if( Yii::app()->session["userEmail"] == $entry["email"] && (!isset($entry["dateEnd"]) || $entry["dateEnd"] > time() ) && $entry["type"] == Survey::TYPE_ENTRY ) + $closeBtn = "<a class='btn btn-xs pull-right' href='javascript:;' style='margin-right:5px;'". + " onclick='closeEntry(\"".$entry["_id"]."\")'>". + "<i class='fa fa-times'></i> ".Yii::t('rooms', 'Close'). + "</a>"; + else if($surveyIsClosed){ + $isClosed = " closed"; + $stateLbl = "<i class='fa fa-times text-red'></i> ".Yii::t('rooms', 'Closed'); + $titleIcon = "times text-red"; + }else{ + $stateLbl = "<i class='fa fa-sign-in text-red'></i> ".Yii::t('rooms', 'Login to vote'); + $mainClick = 'showPanel("box-login")'; + } + + // if($entry["hasVoted"]){ + // $stateLbl = "<i class='fa fa-sign-in text-red'></i> ".Yii::t('rooms', 'Login to vote', null, Yii::app()->controller->module->id); + // $mainClick = 'showPanel("box-login")'; + // } + + //title + Link + $link = $name; + if ( $entry["type"] == Survey::TYPE_SURVEY ) + $link = '<a class="titleMix text-dark '.$meslois.'" onclick="loadRoom(\'entry\', \''.(string)$entry["_id"].'\')" href="javascript:">'."<i class='fa fa-".$titleIcon."'></i> ".$name.' ('.$count.')</a>' ; + else if ( $entry["type"] == "entry" ) + $link = '<a class="titleMix text-dark '.$meslois.'" onclick="loadRoom(\'entry\', \''.(string)$entry["_id"].'\')" href="javascript:;">'."<i class='fa fa-".$titleIcon."'></i> ".substr($name, 0, 70).'</a>' ; + + //$leftLinks = "<button onclick='".$mainClick."' class='btn btn-default homestead col-md-12' style='font-size:20px;'> ".$stateLbl."</button>"; //$voteLinksAndInfos["links"]; + + + $btnRead = ""; + $leftLinks = ""; + $btnLbl = "<i class='fa fa-sign-in'></i> ".Yii::t("survey","JOIN TO VOTE"); + $ctrl = Element::getControlerByCollection($parentType); + //$btnUrl = "#$ctrl.detail.id.$parentId"; + $btnUrl = '#survey.entry.id.'.(string)$entry["_id"]; + + if( @$canParticipate && !$isArchived){ + $btnLbl = "<i class='fa fa-gavel'></i> ".Yii::t("survey","VOTE"); + $btnUrl = '#survey.entry.id.'.(string)$entry["_id"]; + } + + if( !$surveyIsClosed && !$surveyHasVoted && !$isArchived ) + $leftLinks = '<button onclick="loadRoom(\'entry\', \''.(string)$entry["_id"].'\')"'." class='col-xs-12 btn btn-default homestead text-red pull-left' style='font-size:20px;'> ".$btnLbl."</button>"; + else{ + $btnRead = '<button onclick="loadRoom(\'entry\', \''.(string)$entry["_id"].'\')"'." class='btn btn-lg btn-default homestead pull-right text-bold tooltips' ". + ' data-toggle="tooltip" data-placement="left" title="Afficher les détails"'. + " style='margin-top: -2px;margin-right: -5px;margin-bottom: -1px;'><i class='fa fa-angle-right'></i></button>"; //$voteLinksAndInfos["links"]; + } + //ajouter les bouton dans le panels + if($surveyHasVoted || $surveyIsClosed ){ + $leftLinks = $voteLinksAndInfos["links"]; //$voteLinksAndInfos["links"]; + } + + // if( $surveyHasVoted || $surveyIsClosed) + // $btnRead = "<button onclick=".'"urlCtrl.loadByHash(\'#survey.entry.id.'.(string)$entry["_id"].'\')"'." class='btn btn-lg btn-default homestead pull-right text-bold tooltips' ". + // ' data-toggle="tooltip" data-placement="left" title="Afficher les détails"'. + // " style='margin-top: -2px;margin-right: -5px;margin-bottom: -1px;'><i class='fa fa-angle-right'></i></button>"; //$voteLinksAndInfos["links"]; + + $cpList = ( ( @$where["type"]==Survey::TYPE_SURVEY) ? $cpList : ""); + + $createdInfo = "<div class='text-azure lbl-info-survey '><i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $createdInfo .= (!empty( $created )) ? " ".Yii::t("rooms", "created") . " : ".$created : ""; + $createdInfo .= "</div>"; + + $ends = ""; + //if( Yii::app()->session["userEmail"] == $entry["email"] ){ + if($entry["type"]==Survey::TYPE_ENTRY && (!isset($entry["dateEnd"]) || $entry["dateEnd"] > time() ) ){ + $ends = "<div class='text-green lbl-info-survey pull-left' style='color: rgb(228, 108, 108);'><i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $ends .= "".(!empty( $entry["dateEnd"] )) ? " ".Yii::t("rooms", "end") . " : ".date("d/m/y",$entry["dateEnd"]) : ""; + $ends .= "</div>"; + }else{ + $ends = "<div class='text-red lbl-info-survey pull-left' style='color: rgb(228, 108, 108);'><i class='fa fa-clock-o' style='padding:0px 5px 0px 2px;'></i> "; + $ends .= "".(!empty( $entry["dateEnd"] )) ? " ".Yii::t("rooms", "ended") . " : ".date("d/m/y",$entry["dateEnd"]) : ""; + $ends .= "</div>"; + } + //} + + $chartBarResult = Survey::getChartBarResult($entry); + + $boxColor = ($entry["type"]==Survey::TYPE_ENTRY ) ? "" : "bg-azure" ; + $switchClass = ( $switchcount < 0 ) ? "" : "switch" ; + $block = ' <div class="mix '.$boxColor.' '.$avoter.' '.$switchClass.' '. + $meslois.' '. + $followingEntry.' '. + $tags.' '. + $cpList.$isClosed.'"'. + + 'data-vote="'.$ordre.'" data-time="'. + $created.'" style="display:inline-blocks"">'. + $views. + $createdInfo. + $ends. + "<hr>". + $leftLinks.$btnRead. + "<hr>". + $link.'<br/>'. + $message.//'<br/>'. + //$info. + //$tags. + //$content. + '<br/>'. + '<div class="space1"></div>'. + '<div class="pull-right" >'. + $infoslink. + $byInfo. + '</div>'. + + "<hr>". + $chartBarResult. + + '</div>'; + + return array( + "block"=>$block, + "alltags" => $alltags, + "tagBlock" => $tagBlock, + "cpBlock" => $cpBlock + ); + } + + //TODO seperate logic from view + foreach ($list as $key => $entry) + { + $switchcount = -$switchcount; + $isArchived = ( @$where["survey"]["status"] == ActionRoom::STATE_ARCHIVED ) ? true : false; + $entryMap = buildEntryBlock($entry,$uniqueVoters,$alltags,$parentType,$parentId,$switchcount, $canParticipate, $isArchived ); + $blocks .= $entryMap["block"]; + $alltags = $entryMap["alltags"]; + $tagBlock .= $entryMap["tagBlock"]; + $cpBlock .= $entryMap["cpBlock"]; + } + + ?> + + + <div class="panel-white" style="display:inline-block; width:100%;"> + + <div class="col-md-4 col-sm-4 margin-bottom-15 bg-white" style="min-height: 200px;"> + <?php + $img = (@$where["survey"]['profilImageUrl']) ? "<img class='img-responsive' src='".Yii::app()->createUrl('/'.@$where["survey"]['profilImageUrl'])."'/>" : ""; + echo $img; + ?> + </div> + + <?php if (count(@$list) > 0) { ?> + <div class="controls col-md-7 col-sm-7 pull-right bar-btn-filters no-border no-padding" style="border-radius:0px;"> + <div class="pull-left"> + <button class="filter btn btn-default fr" data-filter="all"> + <i class="fa fa-eye"></i> <?php echo Yii::t("rooms", "Show all"); ?> + </button> + + <button id="ChangeLayout" class="btn btn-default" style="margin-bottom: 6px;"> + <i class="fa fa-reorder"></i> + </button> + </div> + </div> + + + <div class="col-md-7 col-sm-7 pull-right no-padding"> + <a class="filter btn bg-dark" data-filter=".closed"> + <i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'Closed')?> + </a> + <?php if( $logguedAndValid && $where["type"]==Survey::TYPE_ENTRY){?> + <a class="filter btn bg-dark" data-filter=".avoter"> + <i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'To vote')?> + </a> + <?php } ?> + <a class="filter btn bg-dark" data-filter=".mesvotes"> + <i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'My votes')?> + </a> + <a class="filter btn bg-dark" data-filter=".myentries"> + <i class="fa fa-filter"></i> <?php echo Yii::t('rooms', 'My proposals')?> + </a> + </div> + + <div class="col-md-7 col-sm-7 pull-right no-padding" style="display:inline-block;"> + <?php if( $logguedAndValid && $where["type"]==Survey::TYPE_ENTRY ) { ?> + <button class="sort btn btn-default" data-sort="vote:asc"><i class="fa fa-caret-up"></i></button> + <button class="sort btn btn-default" data-sort="vote:desc"><i class="fa fa-caret-down"></i></button> + <label class="margin-right-15">- Participation</label> + <?php } ?> + <button class="sort btn btn-default" data-sort="time:asc"><i class="fa fa-caret-up"></i></button> + <button class="sort btn btn-default" data-sort="time:desc"><i class="fa fa-caret-down"></i></button> + <label class="margin-right-15">- Chronologie</label> + <!-- <label>Affichage :</label> --> + <br/> + + <?php if(!isset($_GET["cp"]) && $where["type"]==Survey::TYPE_SURVEY){?> + <label>Géographique : </label> + <?php echo $cpBlock; + }?> + <br/> + </div> + + <div class="col-md-12 col-sm-12"> + <div id="tags-container" class="margin-bottom-15"> + <?php echo $tagBlock?> + </div> + </div> + <?php } ?> + + <div class="col-md-8 col-sm-12"> + <?php if (@$canParticipate) { ?> + <div id="infoPodOrga" class="padding-10"> + <?php if (count(@$list) == 0) { ?> + <blockquote class="padding-10"> + <span class="text-extra-large text-green "><i class="fa fa-check"></i> Espace ouvert</span><br> + <small>Un espace de décision peut contenir plusieurs propositions.</small> + <br>Référencez et partagez <b>une par une</b>, + <br>les propositions qui concernent cet espace + <br><br> + <button class="btn btn-success" onclick='dyFObj.openForm("entry","sub")''> + <i class="fa fa-plus"></i> Ajouter une proposition + </button> + </blockquote> + <?php } ?> + </div> + <?php }else{ ?> + <blockquote> + <span class=""><i class="fa fa-angle-right"></i> + <?php + if(isset(Yii::app()->session["userId"])){ + if( $where["survey"]["parentType"] == City::COLLECTION ) + echo Yii::t('rooms', 'Participation open to city residents only'); + else + echo Yii::t('rooms', 'JOIN TO PARTICIPATE'); + } + else + echo Yii::t('rooms', 'LOGIN TO PARTICIPATE'); + ?> + </span> + </blockquote> + <?php } ?> + </div> + + <div id="mixcontainer" class="mixcontainer col-md-12"> + <?php echo (count($list) > 0) ? $blocks : "" ?> + </div> + </div> + + </div> + + </section> + + +<div class="space20"></div> + + +<script type="text/javascript"> + +/* ************************************** +* +* Initialisation +* +***************************************** */ + + var contextDataDDA = { + name : "<?php echo addslashes(@$where["survey"]["name"]) ?>", + id : "<?php echo (string)@$where["survey"]["_id"] ?>", + room : "<?php echo (string)@$where["survey"]["_id"] ?>", + type : "room", + controller : "survey", + controller : "<?php echo Survey::CONTROLLER;?>", + otags : "<?php echo addslashes(@$where["survey"]["name"]).",débat, proposition, question, vote, communecter,".addslashes(@implode(",", @$where["survey"]["tags"])) ?>", + odesc : <?php echo json_encode( 'Proposal Room : '.addslashes(@$where["survey"]["name"])); ?>, + parentType : "<?php echo @$where["survey"]["parentType"] ?>", + parentId : "<?php echo (string)@$where["survey"]["parentId"] ?>" + }; + +var layout = 'grid', // Store the current layout as a variable +$container = $('#mixcontainer'), // Cache the MixItUp container +$changeLayout = $('#ChangeLayout'); // Cache the changeLayout button +clickedVoteObject = null; + +var nbSurveyTotal = <?php echo count($list); ?>; + +jQuery(document).ready(function() { + //setTitle("Décider ensemble","gavel text-red"); + $(".main-col-search").addClass("assemblyHeadSection"); + $('.tooltips').tooltip(); + + if(nbSurveyTotal > 0) + $container.mixItUp({ + load: {sort: 'vote:desc'}, + animation: { + animateChangeLayout: true, // Animate the positions of targets as the layout changes + animateResizeTargets: true, // Animate the width/height of targets as the layout changes + effects: 'fade rotateX(-40deg) translateZ(-100px)' + }, + layout: { + containerClass: 'grid' // Add the class 'list' to the container on load + } + }); + + moduleWording(); + $('.voteIcon').off().on("click",function() { + $(this).addClass("faa-bounce animated"); + clickedVoteObject = $(this).data("vote"); + mylog.log(clickedVoteObject); + }); + + $('#form-create-proposal #btn-submit-form').addClass("hidden"); + $(".explainLink").click(function() { + showDefinition( $(this).data("id") ); + return false; + }); +}); + + +function saveNewProposal(){ + $('#form-create-proposal #btn-submit-form').off().click(); +} + +function toogleTags(){ + if($("#tags-container").hasClass("hidden")){ + $("#tags-container").removeClass("hidden"); + }else{ + $("#tags-container").addClass("hidden"); + } + +} + + +/* ************************************** +* +* Mixit Up pluggin stuff +* +***************************************** */ + + + $changeLayout.on('click', function() + { + // If the current layout is a list, change to grid: + if(layout == 'list'){ + layout = 'grid'; + $changeLayout.html('<i class="fa fa-reorder"></i>'); // Update the button text + $container.mixItUp('changeLayout', { + containerClass: layout // change the container class to "grid" + }); + // Else if the current layout is a grid, change to list: + } else { + layout = 'list'; + $changeLayout.html('<i class="fa fa-th"></i>'); // Update the button text + $container.mixItUp('changeLayout', { + containerClass: layout // Change the container class to 'list' + }); + } + }); + + /* ************************************** + * + * REad or Edit an Entry + * + ***************************************** */ + function entryDetail(url,type){ + mylog.warn("--------------- entryDetail ---------------------",url); + getAjax( "surveyDetails" , url , function(data){ + //$("#surveyDetails").html(data); + mylog.dir(data); + + mylog.log("type", type); + if(type == "edit") + urlCtrl.loadByHash(url); + else + readEntrySV (data,type); + + } ); + } + + /* ************************************** + * + * voting and moderation + * + ***************************************** */ +function addaction(id,action) +{ + mylog.warn("--------------- addaction ---------------------"); + + bootbox.confirm("Vous êtes sûr ? Vous ne pourrez pas changer votre vote", + function(result) { + if (result) { + params = { + "userId" : '<?php echo Yii::app()->session["userId"]?>' , + "id" : id , + "collection":"surveys", + "action" : action + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/survey/addaction")?>',params,function(data){ + window.location.reload(); + }); + } else { + $("."+clickedVoteObject).removeClass("faa-bounce animated"); + } + }); + } + + + function dejaVote(){ + alert("Vous ne pouvez pas votez 2 fois, ni changer de vote."); + } + + function moderateEntry(id,action) + { + mylog.warn("--------------- moderateEntry ---------------------"); + params = { + "survey" : id , + "action" : action , + "app" : "<?php echo Yii::app()->controller->module->id?>"}; + ajaxPost("moderateEntryResult",'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/survey/moderateentry")?>',params,function(){ + window.location.reload(); + }); + } + + /* ************************************** + * + * Design stuff + * + ***************************************** */ + function AutoGrowTextArea(textField) + { + /*if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = textField.scrollHeight + "px"; + if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = + (textField.scrollHeight * 2 - textField.clientHeight) + "px"; + } + }*/ + } + activeView = ".home"; + function hideShow(ids,parent) + { + $(activeView).addClass("hidden"); + $(ids).removeClass("hidden"); + activeView = ids; + } + function copytoPopin(){ + txt = $('#message1').val(); + //AutoGrowTextArea(this); + $('#message').val(txt); + $('#nameaddEntry').val(txt.substring(0,20)); + } + function moduleWording(){ + $(".loginFormToptxt").html( "Inscrivez vous avec votre email pour donner vos consignes de votes et faire des propositions."+ + "<br/>Si vous êtes déja inscrit , connectez vous avec votre email d'inscription."); + $(".loginFormToptxt2").html("Si vous n'avez pas de compte ce même formulaire vous créera un compte, sinon vous logguera."); + } + +function readEntrySV(data,type) { + mylog.warn("--------------- readEntrySV ---------------------"); + mylog.dir(data); + $("#readEntryContainer").html("<div class='col-sm-10 col-sm-offset-1 '>"+ + '<h1 class="homestead text-red center citizenAssembly-header">'+ + '<i class="fa fa-pie-chart "></i>'+ + '<br>'+ + '<small class="homestead text-dark center"> Resultats du moment </small>'+ + ' </h1>'+ + "<a href='javascript:toggleGraph()' class='pull-left' style='top: 92px; float: right !important; margin-top: -120px; margin-right: 5px;'>"+ + "<i class='fa fa-times-circle-o text-dark fa-2x'></i>"+ + "</a>"+ + // "<h1 id='entryTitle' ></h1>"+ + //"<div class='space20'></div>"+ + "<div class='space20 center' id='entryContent'></div>"+ + "</div>"); + + $("#entryContent").html(data.content); + $("#entryTitle").html(data.title); + if(type=="graph") + setUpGraph(); + toggleGraph() +} + +function toggleGraph(){ + if( $("#readEntryContainer").hasClass('hide') ){ + $("#readEntryContainer").removeClass('hide'); + $(".stepContainer").addClass('hide'); + } else { + $(".stepContainer").removeClass('hide'); + $("#readEntryContainer").addClass('hide'); + } +} + +function archive(collection,id){ + mylog.warn("--------------- archive ---------------------",collection,id); + + bootbox.confirm("Vous êtes sûr de vouloir archiver cet espace ?", + function(result) { + if (result) { + params = { + "id" : id , + "type":collection, + "name":"status", + "value":"<?php echo ( @$where["survey"]["status"] != ActionRoom::STATE_ARCHIVED ) ? ActionRoom::STATE_ARCHIVED : "" ?>", + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl(Yii::app()->controller->module->id."/element/updatefield")?>',params,function(data){ + urlCtrl.loadByHash(window.location.hash); + }); + } else { + $("."+clickedVoteObject).removeClass("faa-bounce animated"); + } + }); +} + +</script> +<div class="hide" id="readEntryContainer"></div> + +<?php +if($where["type"]==Survey::TYPE_ENTRY){ + Yii::app()->controller->renderPartial(Yii::app()->params["modulePath"].Yii::app()->controller->module->id.'.views.survey.modals.voterloiDesc'); + Yii::app()->controller->renderPartial(Yii::app()->params["modulePath"].Yii::app()->controller->module->id.'.views.survey.modals.cgu'); + if($commentActive){ + Yii::app()->controller->renderPartial(Yii::app()->params["modulePath"].Yii::app()->controller->module->id.'.views.survey.modals.comments'); + } +} + + if(!isset($_GET["renderPartial"])){ + echo "</div>"; // ferme le id="room-container" + } +?> + + diff --git a/views/survey/indexPod.php b/views/survey/indexPod.php new file mode 100755 index 0000000000000000000000000000000000000000..178db64c90a48c8dd2af5edb77a1be67bfaf0abe --- /dev/null +++ b/views/survey/indexPod.php @@ -0,0 +1,360 @@ +<?php +$cs = Yii::app()->getClientScript(); +$cs->registerCssFile($this->module->assetsUrl. '/survey/css/mixitup/reset.css'); +$cs->registerCssFile($this->module->assetsUrl. '/survey/css/mixitup/style.css'); +$cs->registerScriptFile($this->module->assetsUrl. '/survey/js/highcharts.js' , CClientScript::POS_END); +$cs->registerScriptFile($this->module->assetsUrl. '/survey/js/exporting.js' , CClientScript::POS_END); +$cs->registerScriptFile($this->module->assetsUrl. '/survey/js/jquery.mixitup.min.js' , CClientScript::POS_END); + +$commentActive = true; + + $logguedAndValid = Person::logguedAndValid(); + $alltags = array(); + $blocks = ""; + $tagBlock = ""; + $cpBlock = ""; + $cps = array(); + $count = 0; + + /* ************************************** + * go through the list of entries for the survey and build filters + ***************************************** */ + foreach ($list as $key => $value) + { + $name = $value["name"]; + $email = (isset($value["email"])) ? $value["email"] : ""; + $cpList = (isset($value["cp"])) ? $value["cp"] : ""; + if( !isset($_GET["cp"]) && $value["type"] == Survey::TYPE_SURVEY ) + { + if(isset($value["cp"])) + { + if(is_array($value["cp"])) + { + $cpList = ""; + foreach ($value["cp"] as $cp) { + if(!in_array($cp, $cps)){ + $cpBlock .= ' <button class="filter " data-filter=".'.$cp.'">'.$cp.'</button>'; + array_push($cps, $cp); + } + $cpList .= $cp." "; + } + } + else if(!in_array($value["cp"], $cps)) + { + $cpBlock .= ' <button class="filter " data-filter=".'.$value["cp"].'">'.$value["cp"].'</button>'; + array_push($cps, $value["cp"]); + } + } + } + + $tags = ""; + if(isset($value["tags"])) + { + foreach ($value["tags"] as $t) + { + if(!empty($t) && !in_array($t, $alltags)) + { + array_push($alltags, $t); + $tagBlock .= ' <button class="filter " data-filter=".'.$t.'">'.$t.'</button>'; + } + $tags .= $t.' '; + } + } + + $count = PHDB::count ( Survey::COLLECTION, array( "type"=>Survey::TYPE_ENTRY, + "survey"=>(string)$value["_id"] ) ); + $link = $name; + + /* ************************************** + //check if I wrote this law + *************************************** */ + $meslois = ($logguedAndValid && Yii::app()->session["userEmail"] && $value['email'] == Yii::app()->session["userEmail"]) ? "myentries" : ""; + + //checks if the user is a follower of the entry + $followingEntry = ($logguedAndValid + && isset($value[Action::ACTION_FOLLOW]) + && is_array($value[Action::ACTION_FOLLOW]) + && in_array(Yii::app()->session["userId"], $value[Action::ACTION_FOLLOW])) ? "myentries":""; + + if ( $value["type"] == Survey::TYPE_SURVEY ) + $link = '<a class="titleMix '.$meslois.'" href="'.Yii::app()->createUrl("/".$this->module->id."/survey/entries/id/".(string)$value["_id"]).'">'.$name.' ('.$count.')</a>' ; + else if ( $value["type"] == "entry" ) + $link = '<a class="titleMix '.$meslois.'" onclick="entryDetail(\''.Yii::app()->createUrl("/".$this->module->id."/survey/entry/id/".(string)$value["_id"]).'\')" href="javascript:;">'.$name.'</a>' ; + + //$infoslink bring visual detail about the entry + $infoslink = ""; + $infoslink .= (!empty($followingEntry)) ? "<i class='fa fa-rss infolink' ></i>" :""; + $infoslink .= (!empty($meslois)) ? "<i class='fa fa-user infolink' ></i>" :""; + + + //has loged user voted on this entry + //vote UPS + $voteUpActive = ( $logguedAndValid + && isset($value[Action::ACTION_VOTE_UP]) + && is_array($value[Action::ACTION_VOTE_UP]) + && in_array( Yii::app()->session["userId"] , $value[Action::ACTION_VOTE_UP] )) ? "active":""; + $voteUpCount = (isset($value[Action::ACTION_VOTE_UP."Count"])) ? $value[Action::ACTION_VOTE_UP."Count"] : 0 ; + $hrefUp = ($logguedAndValid && empty($voteUpActive)) ? "javascript:addaction('".$value["_id"]."','".Action::ACTION_VOTE_UP."')" : ""; + $classUp = $voteUpActive." ".Action::ACTION_VOTE_UP." ".$value["_id"].Action::ACTION_VOTE_UP; + $iconUp = 'fa-thumbs-up'; + + //vote ABSTAIN + $voteAbstainActive = ($logguedAndValid + && isset($value[Action::ACTION_VOTE_ABSTAIN]) + && is_array($value[Action::ACTION_VOTE_ABSTAIN]) + && in_array(Yii::app()->session["userId"], $value[Action::ACTION_VOTE_ABSTAIN])) ? "active":""; + $voteAbstainCount = (isset($value[Action::ACTION_VOTE_ABSTAIN."Count"])) ? $value[Action::ACTION_VOTE_ABSTAIN."Count"] : 0 ; + $hrefAbstain = ($logguedAndValid && empty($voteAbstainActive)) ? "javascript:addaction('".(string)$value["_id"]."','".Action::ACTION_VOTE_ABSTAIN."')" : ""; + $classAbstain = $voteAbstainActive." ".Action::ACTION_VOTE_ABSTAIN." ".$value["_id"].Action::ACTION_VOTE_ABSTAIN; + $iconAbstain = 'fa-circle'; + + //vote UNCLEAR + $voteUnclearActive = ( $logguedAndValid + && isset($value[Action::ACTION_VOTE_UNCLEAR]) + && is_array($value[Action::ACTION_VOTE_UNCLEAR]) + && in_array( Yii::app()->session["userId"] , $value[Action::ACTION_VOTE_UNCLEAR] )) ? "active":""; + $voteUnclearCount = (isset($value[Action::ACTION_VOTE_UNCLEAR."Count"])) ? $value[Action::ACTION_VOTE_UNCLEAR."Count"] : 0 ; + $hrefUnclear = ($logguedAndValid && empty($voteUnclearCount)) ? "javascript:addaction('".$value["_id"]."','".Action::ACTION_VOTE_UNCLEAR."')" : ""; + $classUnclear = $voteUnclearActive." ".Action::ACTION_VOTE_UNCLEAR." ".$value["_id"].Action::ACTION_VOTE_UNCLEAR; + $iconUnclear = "fa-pencil"; + + //vote MORE INFO + $voteMoreInfoActive = ( $logguedAndValid + && isset($value[Action::ACTION_VOTE_MOREINFO]) + && is_array($value[Action::ACTION_VOTE_MOREINFO]) + && in_array( Yii::app()->session["userId"] , $value[Action::ACTION_VOTE_MOREINFO] )) ? "active":""; + $voteMoreInfoCount = (isset($value[Action::ACTION_VOTE_MOREINFO."Count"])) ? $value[Action::ACTION_VOTE_MOREINFO."Count"] : 0 ; + $hrefMoreInfo = ($logguedAndValid && empty($voteMoreInfoCount)) ? "javascript:addaction('".$value["_id"]."','".Action::ACTION_VOTE_MOREINFO."')" : ""; + $classMoreInfo = $voteMoreInfoActive." ".Action::ACTION_VOTE_MOREINFO." ".$value["_id"].Action::ACTION_VOTE_MOREINFO; + $iconMoreInfo = "fa-question-circle"; + + //vote DOWN + $voteDownActive = ($logguedAndValid + && isset($value[Action::ACTION_VOTE_DOWN]) + && is_array($value[Action::ACTION_VOTE_DOWN]) + && in_array(Yii::app()->session["userId"], $value[Action::ACTION_VOTE_DOWN])) ? "active":""; + $voteDownCount = (isset($value[Action::ACTION_VOTE_DOWN."Count"])) ? $value[Action::ACTION_VOTE_DOWN."Count"] : 0 ; + $hrefDown = ($logguedAndValid && empty($voteDownActive)) ? "javascript:addaction('".(string)$value["_id"]."','".Action::ACTION_VOTE_DOWN."')" : ""; + $classDown = $voteDownActive." ".Action::ACTION_VOTE_DOWN." ".$value["_id"].Action::ACTION_VOTE_DOWN; + $iconDown = "fa-thumbs-down"; + + //votes cannot be changed, link become spans + $avoter = "mesvotes"; + if( !empty($voteUpActive) || !empty($voteAbstainActive) || !empty($voteDownActive) || !empty($voteUnclearActive) || !empty($voteMoreInfoActive)){ + $linkVoteUp = ($logguedAndValid && !empty($voteUpActive) ) ? "<span class='".$classUp."' ><i class='fa $iconUp' ></i></span>" : ""; + $linkVoteAbstain = ($logguedAndValid && !empty($voteAbstainActive)) ? "<span class='".$classAbstain."'><i class='fa $iconAbstain'></i></span>" : ""; + $linkVoteUnclear = ($logguedAndValid && !empty($voteUnclearActive)) ? "<span class='".$classUnclear."'><i class='fa $iconUnclear'></i></span>" : ""; + $linkVoteMoreInfo = ($logguedAndValid && !empty($voteMoreInfoActive)) ? "<span class='".$classMoreInfo."'><i class='fa $iconMoreInfo'></i></span>" : ""; + $linkVoteDown = ($logguedAndValid && !empty($voteDownActive)) ? "<span class='".$classDown."' ><i class='fa $iconDown'></i></span>" : ""; + }else{ + $avoter = "avoter"; + $linkVoteUp = ($logguedAndValid ) ? "<a class='btn ".$classUp."' href=\" ".$hrefUp." \" title='".$voteUpCount." Pour'><i class='fa $iconUp' ></i></a>" : ""; + $linkVoteAbstain = ($logguedAndValid ) ? "<a class='btn ".$classAbstain."' href=\"".$hrefAbstain."\" title=' ".$voteAbstainCount." Blanc'><i class='fa $iconAbstain'></i></a>" : ""; + $linkVoteUnclear = ($logguedAndValid ) ? "<a class='btn ".$classUnclear."' href=\"".$hrefUnclear."\" title=' ".$voteUnclearCount." Amender'><i class='fa $iconUnclear'></i></a>" : ""; + $linkVoteMoreInfo = ($logguedAndValid ) ? "<a class='btn ".$classMoreInfo."' href=\"".$hrefMoreInfo."\" title=' ".$voteMoreInfoCount." Plus d'informations.'><i class='fa $iconMoreInfo'></i></a>" : ""; + $linkVoteDown = ($logguedAndValid) ? "<a class='btn ".$classDown."' href=\"".$hrefDown."\" title='".$voteDownCount." Contre'><i class='fa $iconDown'></i></a>" : ""; + } + $hrefComment = "#commentsForm"; + $commentCount = 0; + $linkComment = ($logguedAndValid && $commentActive) ? "<a class='btn ".$value["_id"].Action::ACTION_COMMENT."' role='button' data-toggle='modal' href=\"".$hrefComment."\" title='".$commentCount." Commentaire'><i class='fa fa-comments '></i></a>" : ""; + $totalVote = $voteUpCount+$voteAbstainCount+$voteDownCount+$voteUnclearCount+$voteMoreInfoCount; + $info = ($totalVote) ? '<span class="info">'.$totalVote.' sur <span class="info voterTotal">'.$uniqueVoters.'</span> voteur(s)</span><br/>':'<span class="info"></span><br/>'; + + $content = ($value["type"]==Survey::TYPE_ENTRY) ? "".$value["message"]:""; + + /* ************************************** + Rendering Each block + ****************************************/ + $leftLinks = ($value["type"]==Survey::TYPE_ENTRY) ? "<div class='leftlinks'>".$linkVoteUp." ".$linkVoteUnclear." ".$linkVoteAbstain." ".$linkVoteMoreInfo." ".$linkVoteDown."</div>" : ""; + $graphLink = ($totalVote) ?' <a class="btn btn-orange" onclick="entryDetail(\''.Yii::app()->createUrl("/".$this->module->id."/survey/graph/id/".(string)$value["_id"]).'\',\'graph\')" href="javascript:;"><i class="fa fa-th-large"></i></a> ' : ''; + $moderatelink = ( $where["type"]==Survey::TYPE_ENTRY && $isModerator && isset( $value["applications"][$this->module->id]["cleared"] ) && $value["applications"][$this->module->id]["cleared"] == false ) ? "<a class='btn golink' href='javascript:moderateEntry(\"".$value["_id"]."\",1)'><i class='fa fa-plus ' ></i></a><a class='btn alertlink' href='javascript:moderateEntry(\"".$value["_id"]."\",0)'><i class='fa fa-minus ' ></i></a>" :""; + $rightLinks = ( isset( $value["applications"][$this->module->id]["cleared"] ) && $value["applications"][$this->module->id]["cleared"] == false ) ? $moderatelink : $graphLink.$infoslink ; + $rightLinks = ($value["type"]==Survey::TYPE_ENTRY) ? "<div class='rightlinks'>".$rightLinks."</div>" : ""; + $ordre = $voteUpCount+$voteDownCount; + $created = (isset($value["created"])) ? date("d/m/Y h:i",$value["created"]) : ""; + $byInfo = ""; + if ( isset($value["parentType"]) && isset($value["parentId"]) ) + { + if($value["parentType"] == Organization::COLLECTION){ + $parentCtrler = Organization::CONTROLLER; + $parentIcon = "group"; + } + else if($value["parentType"] == Person::COLLECTION){ + $parentCtrler = Person::CONTROLLER; + $parentIcon = "user"; + }else if($value["parentType"] == City::COLLECTION){ + $parentCtrler = City::CONTROLLER; + $parentIcon = "university"; + } + //$parentTitle = '<a href="'.Yii::app()->createUrl("/communecter/".$parentCtrler."/dashboard/id/".$id).'">'.$parent["name"]."</a>'s "; + $byInfo = "by <a href='".Yii::app()->createUrl($this->module->id."/".$parentCtrler."/dashboard/id/".$value["parentId"])."'><i class='fa fa-".$parentIcon."'></i></a>"; + } + + $createdInfo = (!empty( $created )) ? "<br/>created : ".$created : ""; + $blocks .= ' <tr class="mix '.$avoter.' '. + $meslois.' '. + $followingEntry.' '. + $tags.'" >'. + '<td>'.$link.'</td>'. + ( ( $value["type"] == Survey::TYPE_ENTRY ) ? '<td>'.$info.'</td>' : ''). + ( ( $value["type"] == Survey::TYPE_ENTRY ) ?'<td>'.$byInfo.'</td>' : ''). + '<td>'.$createdInfo.'</td>'. + ( ( $value["type"] == Survey::TYPE_ENTRY ) ? '<td>'.$leftLinks.'</td>' : ''). + ( ( $value["type"] == Survey::TYPE_ENTRY ) ? '<td>'.$rightLinks.'</td>' : ''). + '</tr>'; + } + ?> + + +<div class="panel panel-white"> + <div class="panel-heading border-light"> + <div class="pull-right"> + <a href="<?php echo Yii::app()->createUrl( $this->module->id."/survey/index/type/".$type."/id/".$id) ?>" class="btn btn-xs btn-orange">All Surveys <i class="fa fa-legal"></i></a> + </div> + <h4 class="panel-title"> Vote en cours</h4> + </div> + + <div class="panel-body"> + + + <div> + <table class="table table-striped table-bordered table-hover surveyTable"> + <thead> + <tr> + <th>Title</th> + <?php if( $where["type"] == Survey::TYPE_ENTRY ){ ?> + <th>Info</th> + <th>by</th> + <?php } ?> + <th>Date</th> + <?php if( $where["type"] == Survey::TYPE_ENTRY ){ ?> + <th>action</th> + <th></th> + <?php } ?> + </tr> + </thead> + <tbody class="directoryLines"> + <?php echo $blocks; ?> + </tbody> + </table> + </div> + </div> +</div> + +</div> + +</section> + +<script type="text/javascript"> + +/* ************************************** +* +* Initialisation +* +***************************************** */ +jQuery(document).ready(function() { + +}); + + + + /* ************************************** + * + * REad or Edit an Entry + * + ***************************************** */ + function entryDetail(url,type){ + mylog.warn("--------------- entryDetail ---------------------",url); + getAjax( null , url , function(data){ + if(type == "edit") + editEntrySV (data); + else + readEntrySV (data,type); + } ); + } + + /* ************************************** + * + * voting and moderation + * + ***************************************** */ + function addaction(id,action){ + mylog.warn("--------------- addaction ---------------------"); + if(confirm("Vous êtes sûr ? Vous ne pourrez pas changer votre vote")){ + params = { + "userId" : '<?php echo Yii::app()->session["userId"]?>' , + "id" : id , + "collection":"surveys", + "action" : action + }; + ajaxPost(null,'<?php echo Yii::app()->createUrl($this->module->id."/survey/addaction")?>',params,function(data){ + window.location.reload(); + }); + } + } + + function dejaVote(){ + alert("Vous ne pouvez pas votez 2 fois, ni changer de vote."); + } + + function moderateEntry(id,action) + { + mylog.warn("--------------- moderateEntry ---------------------"); + params = { + "survey" : id , + "action" : action , + "app" : "<?php echo $this->module->id?>"}; + ajaxPost("moderateEntryResult",'<?php echo Yii::app()->createUrl($this->module->id."/survey/moderateentry")?>',params,function(){ + window.location.reload(); + }); + } + + /* ************************************** + * + * Design stuff + * + ***************************************** */ + function AutoGrowTextArea(textField) + { + if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = textField.scrollHeight + "px"; + if (textField.clientHeight < textField.scrollHeight) + { + textField.style.height = + (textField.scrollHeight * 2 - textField.clientHeight) + "px"; + } + } + } + activeView = ".home"; + function hideShow(ids,parent) + { + $(activeView).addClass("hidden"); + $(ids).removeClass("hidden"); + activeView = ids; + } + function copytoPopin(){ + txt = $('#message1').val(); + AutoGrowTextArea(this);$('#message').val(txt); + $('#nameaddEntry').val(txt.substring(0,20)); + } + function moduleWording(){ + $(".loginFormToptxt").html( "Inscrivez vous avec votre email pour donner vos consignes de votes et faire des propositions."+ + "<br/>Si vous êtes déja inscrit , connectez vous avec votre email d'inscription."); + $(".loginFormToptxt2").html("Si vous n'avez pas de compte ce même formulaire vous créera un compte, sinon vous logguera."); + } + + + +</script> +<?php +if($where["type"]==Survey::TYPE_ENTRY){ + $this->renderPartial('editEntrySV',array("survey"=>$where[Survey::TYPE_SURVEY])); + $this->renderPartial(Yii::app()->params["modulePath"].$this->module->id.'.views.survey.modals.voterloiDesc'); + $this->renderPartial(Yii::app()->params["modulePath"].$this->module->id.'.views.survey.modals.cgu'); + if($commentActive) + $this->renderPartial(Yii::app()->params["modulePath"].$this->module->id.'.views.survey.modals.comments'); +} +?> + + diff --git a/views/survey/kill_editEntrySV.php b/views/survey/kill_editEntrySV.php new file mode 100755 index 0000000000000000000000000000000000000000..b76fbd082fd7aac14abeef7fbd57e2638700d86a --- /dev/null +++ b/views/survey/kill_editEntrySV.php @@ -0,0 +1,36 @@ +<?php + + $cssAnsScriptFiles = array( + '/plugins/bootstrap-datepicker/css/datepicker.css', + '/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js', + '/plugins/summernote/dist/summernote.css', + '/plugins/summernote/dist/summernote.min.js' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles,Yii::app()->request->baseUrl); + + $cssAnsScriptFiles = array( + '/assets/css/rooms/header.css' + ); + HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFiles, Yii::app()->theme->baseUrl); + + //$cssAnsScriptFilesTheme = array('js/form-elements.js'); + //HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesTheme, Yii::app()->request->baseUrl); + + $parent = ActionRoom::getById($roomId); + $nameList = (strlen($parent["name"])>20) ? substr($parent["name"],0,20)."..." : $parent["name"]; + +?> +<div id="editEntryContainer"></div> +<style type="text/css"> + .addPropBtn{ + width:100%; + /*background-color: #BBBB77;*/ + } + .removePropLineBtn { + background-color: #E33551; + line-height: 32px; + width: 100%; + } +</style> + + diff --git a/views/survey/modals/cgu.php b/views/survey/modals/cgu.php new file mode 100755 index 0000000000000000000000000000000000000000..2276bfc755294d87dc0367146c2d7869594a33ba --- /dev/null +++ b/views/survey/modals/cgu.php @@ -0,0 +1,45 @@ +<div class="modal fade" id="cguForm" tabindex="-1" role="dialog" aria-labelledby="cguFormLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="cguFormLabel" >Mentions légales</h3> + </div> + <div class="modal-body"> + <p> +Pour toutes démarches relatives à ce site vous pouvez contacter Pierre MAGNIN candidat du Parti Pirate à l'élection législative partielle de Saint-Pierre et Miquelon du 29 juin et 6 juillet 2014 : +<br/>Contact@partipirate.pm +<br/>05 08 55 73 95 +<br/> +<br/> +<br/>Information : +<br/>Ce site est la première version public d'un module de sondage et de décisions développé par PIXELHUMAIN.com + <br/> +<br/>Il a été mis en oeuvre et financé par Pierre MAGNIN candidat du Parti Pirate à l'élection législative partielle de Saint-Pierre et Miquelon en juin 2014. +<br/> +<br/>Conditions Générales d'Utilisation +<br/>Ce site est en phase d'expérimentation pratique à l'échelle de la circonscription de Saint-Pierre et Miquelon. +<br/> +<br/>Merci de votre compréhension et de votre retour d'expérience en cas de difficultés d'utilisation ou de pistes d'améliorations. +<br/> +<br/>Clause de Confidentialité +<br/>Nous sommes particulièrement vigilant au respect de la vie privée et à la protection de toute information que vous nous confiez. +<br/> +<br/>Vos données personnelles ne sont pas communiquées à d'autres organismes en particulier commerciaux. +<br/> +<br/>Vous disposez d'un droit d'accès et de modifications de vos données personnelles. +<br/> +<br/>Vous êtes susceptibles de recevoir des informations complémentaires de notre part pour en lien avec le site vote.partipirate.pm. Si vous ne le souhaitez pas, merci de nous le signaler par mail à contact@partipirate.pm +<br/> +<br/>Ethique Open source +<br/>Conformément à nos valeurs, le code source de cet outils est libre d'utilisation, d'accès, d'amélioration et de diffusion. + </p> + + <div style="clear:both"></div> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + </div> + </div> +</div> +</div> diff --git a/views/survey/modals/comments.php b/views/survey/modals/comments.php new file mode 100755 index 0000000000000000000000000000000000000000..cb3ec04385ead993caf4f8a6196e869d7212f352 --- /dev/null +++ b/views/survey/modals/comments.php @@ -0,0 +1,29 @@ + +<div class="modal fade" id="commentsForm" tabindex="-1" role="dialog" aria-labelledby="commentsFormLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="commentsFormLabel" >Commentaire :</h3> + </div> + <div class="modal-body"> + <p> Use #HashTags in text and @tags for people + These will be automatically converted</p> + <div>Comment1, + VoteUp & Down</div> + <div>Comment2, + VoteUp & Down</div> + <div>Comment3, + VoteUp & Down</div> + <div>Comment4, + VoteUp & Down</div> + title + <br/> + <input type="text" name="nameaddEntry" id="nameaddEntry" value="test1" /> + <br/><br/> + message + <textarea id="message" style="width:100%;height:30px;vertical-align: middle" onkeyup="AutoGrowTextArea(this);$('#message1').val($('#message').val())"></textarea> + <div style="clear:both"></div> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + </div> + </div> +</div> +</div> \ No newline at end of file diff --git a/views/survey/modals/voterloiDesc.php b/views/survey/modals/voterloiDesc.php new file mode 100755 index 0000000000000000000000000000000000000000..288f0812ae09b197998c6d4eb70f2130b450b644 --- /dev/null +++ b/views/survey/modals/voterloiDesc.php @@ -0,0 +1,46 @@ + +<div class="modal fade" id="voterloiDescForm" tabindex="-1" role="dialog" aria-labelledby="voterloiDescFormLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h3 id="voterloiDescFormLabel" >Voter les propositions </h3> + </div> + <div class="modal-body"> + <p> + +<style type="text/css"> +a.btn.voteUp{background-color: #93C22C;border: 1px solid green; color:black;} +a.btn.voteUnclear{background-color: yellow;border: 1px solid yellow; color:black;} +a.btn.voteMoreInfo{background-color: #789289;border: 1px solid #789289; color:black;} +a.btn.voteAbstain{background-color: white;border: 1px solid white; color:black;} +a.btn.voteDown{background-color: #db254e;border: 1px solid #db254e; color:black;} +</style> + +Pour chaque proposition, vous disposez d'un vote unique et définitif.<br/> +<br/> +Vous pouvez soit:<br/> +<a class="btn voteUp" href="javascript:;"><i class='fa fa-thumbs-up'></i></a> Pour : +Si vous êtes d'accord avec la proposition.<br/> +<br/> +<a class="btn voteUnclear" href="javascript:;"><i class='fa fa-pencil'></i></a> Amender : +Si vous souhaiter amender la proposition ou la reformuler pour l'améliorer.<br/> +<br/> +<a class="btn voteAbstain" href="javascript:;"><i class='fa fa-circle'></i></a> Blanc : +Si vous souhaitez vous souhaitez voter blanc. Votre votre est comptabilisé dans les résultat.<br/> +<br/> +<a class="btn voteMoreInfo" href="javascript:;"><i class='fa fa-question-circle'></i></a> Plus d'informations : +S'il vous faut plus d'informations sur la proposition pour décider.<br/> +<br/> +<a class="btn voteDown" href="javascript:;"><i class='fa fa-thumbs-down'></i></a> Contre : +Si vous êtes en désaccord avec la proposition.<br/> + </p> + + <div style="clear:both"></div> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> + </div> + </div> +</div> +</div> diff --git a/views/test/api/config.php b/views/test/api/config.php new file mode 100644 index 0000000000000000000000000000000000000000..34f3174ac56a81daa0f030d28433befdf4d161c5 --- /dev/null +++ b/views/test/api/config.php @@ -0,0 +1,13 @@ +<?php + +/** + * Setting for client: client Id, client password + */ +define('MangoPayDemo_BaseUrl', 'https://api.sandbox.mangopay.com'); +define('MangoPayDemo_ClientId', 'sdk-unit-tests'); +define('MangoPayDemo_ClientPassword', 'cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju'); + +/** + * Path to folder to store temporary files (with permissions to write) + */ +define('MangoPayDemo_TemporaryFolder', __dir__); \ No newline at end of file diff --git a/views/test/api/demo.css b/views/test/api/demo.css new file mode 100644 index 0000000000000000000000000000000000000000..0019372d11c6061da5279f1ecc9f25c67fb9f7c1 --- /dev/null +++ b/views/test/api/demo.css @@ -0,0 +1,25 @@ +body { + font-size: 12px; +} + +#menu { + min-width: 250px; +} + +#menu h3 { + font-weight: bold; + font-size: 100%; +} +#menu ul{ + padding: 8px 8px 8px 14px; +} +#menu ul li{ + padding: 3px 0px; +} +input[type=text] { + width: 250px; +} + +select { + width: 256px; +} \ No newline at end of file diff --git a/views/test/api/demo.js b/views/test/api/demo.js new file mode 100644 index 0000000000000000000000000000000000000000..71fd79227f4505f323321c6a2e932b132377064b --- /dev/null +++ b/views/test/api/demo.js @@ -0,0 +1,5 @@ +$(document).ready(function(){ + + $("#menu").accordion( { active: selectedModuleIndex >= 0 ? selectedModuleIndex : false, collapsible : true, heightStyle: "content" } ); + +}); \ No newline at end of file diff --git a/views/test/api/form.php b/views/test/api/form.php new file mode 100644 index 0000000000000000000000000000000000000000..4bc76fa5e10fd957eed7553021d3a61fc40bcd1c --- /dev/null +++ b/views/test/api/form.php @@ -0,0 +1,213 @@ +<?php +namespace MangoPay\Demo; +//require_once '../../vendor/autoload.php'; +require_once 'htmlHelper.php'; +require_once 'config.php'; + +$module = @$_GET['module']; +if (!isset($module)) + return; + +HtmlHelper::getHeader($module); + +$details = explode('_', $module); +$entityName = @$details[0]; +$subApiName = @$details[1]; +$operation = @$details[2]; +$subEntityName = @$details[3]; +$filterName = @$details[4]; +$subSubEntityName = @$details[5]; +$entityId = @$_POST['Id']; +$subEntityId = @$_POST['IdSubEntity']; + +if (isset($_POST['_postback']) && $_POST['_postback'] == '1') { + + try { + $api = new \MangoPay\MangoPayApi(); + $api->Config->BaseUrl = MangoPayDemo_BaseUrl; + $api->Config->ClientId = MangoPayDemo_ClientId; + $api->Config->ClientPassword = MangoPayDemo_ClientPassword; + $api->Config->TemporaryFolder = TemporaryFolder; + + $module = @$_GET['module']; + if (isset($module) && strpos($module, '$Sort') !== false) { + if (isset($_POST["_sort_"]) && !empty($_POST["_sort_"])){ + $sortFieldName = $_POST["_sort_"]; + $sortDirection = $_POST["_sort_direction_"]; + if (!isset($sortDirection)) { + $sortDirection = \MangoPay\SortDirection::ASC; + } + + $sorting = new \MangoPay\Sorting(); + $sorting->AddField($sortFieldName, $sortDirection); + } + } + + // normal cases + switch ($operation) { + case '|NoParams|': + $methodName = $subEntityName; + $apiResult = $api->$subApiName->$methodName(); + break; + case '|GetWalletTransactions|': + $pagination = HtmlHelper::getEntity('Pagination'); + $filter = null; + if (isset($filterName) && $filterName != ""){ + $filter = HtmlHelper::getEntity($filterName); + } + $apiResult = $api->$subApiName->GetWalletTransactions(null, null, $pagination, $filter); + + print '<pre>';print_r($pagination);print '</pre>'; + + break; + case '|EnumParams|': + $methodName = $subEntityName; + $enums = explode('$', $subSubEntityName); + if (count($enums) == 1){ + $apiResult = $api->$subApiName->$methodName($_POST[$enums[0]]); + } else if (count($enums) == 2) { + $apiResult = $api->$subApiName->$methodName($_POST[$enums[0]], $_POST[$enums[1]]); + } + break; + case '|EnumParamsList|': + $pagination = HtmlHelper::getEntity('Pagination'); + $filter = null; + if (isset($filterName) && $filterName != ""){ + $filter = HtmlHelper::getEntity($filterName); + } + $methodName = $subEntityName; + $enums = explode('$', $subSubEntityName); + if (count($enums) == 1){ + $apiResult = $api->$subApiName->$methodName($_POST[$enums[0]], $pagination, $filter); + } else if (count($enums) == 2) { + $apiResult = $api->$subApiName->$methodName($_POST[$enums[0]], $_POST[$enums[1]], $pagination, $filter); + } + break; + case 'Create': + $entity = HtmlHelper::getEntity($entityName); + $apiResult = $api->$subApiName->Create($entity); + break; + case 'Get': + $apiResult = $api->$subApiName->Get($entityId); + break; + case 'Save': + $entity = HtmlHelper::getEntity($entityName, $entityId); + $apiResult = $api->$subApiName->Update($entity); + break; + case 'SaveNoId': + $entity = HtmlHelper::getEntity($entityName); + $apiResult = $api->$subApiName->Update($entity); + break; + case 'All': + $pagination = HtmlHelper::getEntity('Pagination'); + $filter = null; + if (isset($filterName) && $filterName != "") + $filter = HtmlHelper::getEntity($filterName); + + if (isset($filter) && !isset($sorting)) + $apiResult = $api->$subApiName->GetAll($pagination, $filter); + else if (!isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->GetAll($pagination, $sorting); + else if (isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->GetAll($pagination, $filter, $sorting); + else + $apiResult = $api->$subApiName->GetAll($pagination); + + print '<pre>';print_r($pagination);print '</pre>'; + if (isset($sorting)) { + print '<pre>Sort: ';print_r($sorting);print '</pre>'; + } + break; + case 'CreateSubEntity': + $entity = HtmlHelper::getEntity($subEntityName); + $methodName = 'Create'. $subEntityName; + $apiResult = $api->$subApiName->$methodName($entityId, $entity); + break; + case 'CreateSubSubEntity': + $entity = HtmlHelper::getEntity($subEntityName); + $methodName = 'Create' . $subEntityName; + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $entity); + break; + case 'GetSubEntity': + $methodName = 'Get' . $subEntityName; + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId); + break; + case 'SaveSubEntity': + $entity = HtmlHelper::getEntity($subEntityName); + $methodName = 'Update' . $subEntityName; + $apiResult = $api->$subApiName->$methodName($subEntityId, $entity); + break; + case 'ListSubEntity': + case 'ListSubSubEntity': + $pagination = HtmlHelper::getEntity('Pagination'); + $methodName = $subEntityName; + $filter = null; + if (isset($filterName) && $filterName != "") + $filter = HtmlHelper::getEntity($filterName); + + if ($operation == 'ListSubSubEntity') { + if (isset($filter) && !isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $pagination, $filter); + else if (!isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $pagination, null, $sorting); + else if (isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $pagination, $filter, $sorting); + else + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $pagination); + }else{ + if (isset($filter) && !isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $pagination, $filter); + else if (!isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $pagination, null, $sorting); + else if (isset($filter) && isset($sorting)) + $apiResult = $api->$subApiName->$methodName($entityId, $pagination, $filter, $sorting); + else + $apiResult = $api->$subApiName->$methodName($entityId, $pagination); + } + + print '<pre>';print_r($pagination);print '</pre>'; + if (isset($sorting)) + print '<pre>Sort: ';print_r($_POST["_sort_"]);print '</pre>'; + + break; + case 'CreatePageByFile': + $methodName = 'Create' . $subEntityName . 'FromFile'; + $apiResult = $api->$subApiName->$methodName($entityId, $subEntityId, $_FILES['page_file']); + break; + case 'ContestDispute': + $entity = HtmlHelper::getEntity($subEntityName); + $apiResult = $api->$subApiName->$operation($entityId, $entity); + break; + case 'CloseDispute': + $apiResult = $api->$subApiName->$operation($entityId); + break; + case 'Upload': + $entity = HtmlHelper::getEntity($subEntityName); + $apiResult = $api->$subApiName->$subSubEntityName($entity); + break; + case 'UploadFromFile': + $apiResult = $api->$subApiName->$subSubEntityName($_FILES['page_file']); + break; + } + + print '<pre>';print_r($apiResult);print '</pre>'; + + } catch (\MangoPay\Libraries\ResponseException $e) { + + echo '<div style="color: red;">\MangoPay\ResponseException: Code: ' . $e->getCode(); + echo '<br/>Message: ' . $e->getMessage(); + + $details = $e->GetErrorDetails(); + if (!is_null($details)) + echo '<br/><br/>Details: '; print_r($details); + echo '</div>'; + + } catch (\MangoPay\Libraries\Exception $e) { + + echo '<div style="color: red;">\MangoPay\Exception: ' . $e->getMessage() . '</div>'; + + } + +} else { + HtmlHelper::renderForm($entityName, $operation, array($subEntityName, $subSubEntityName), $filterName); +} \ No newline at end of file diff --git a/views/test/api/htmlHelper.php b/views/test/api/htmlHelper.php new file mode 100644 index 0000000000000000000000000000000000000000..dc7c2125db8c87061e1cb5667e0beb143831a571 --- /dev/null +++ b/views/test/api/htmlHelper.php @@ -0,0 +1,333 @@ +<?php +namespace MangoPay\Demo; + +class HtmlHelper { + + public static function getHeader($module) { + foreach ($GLOBALS['MangoPay_Demo_Menu'] as $moduleText => $subMenu) { + $key = array_search($module, $subMenu); + if ($key) { + echo '<h2 style="margin: 0 0 20px 0;">' . $key . '</h2>'; + return; + } + } + } + + public static function renderForm($entityName, $operation, $subEntityName, $filterName) { + + echo '<form name="input" action="" method="post" enctype="multipart/form-data">'; + echo '<table>'; + + switch ($operation) { + case '|EnumParams|': + case '|EnumParamsList|': + $enums = explode('$', $subEntityName[1]); + foreach ($enums as $enum) { + echo '<tr><td>'; + echo $enum; + echo '</td>'; + echo '<td>'; + self::renderEnum('\MangoPay\\' . $enum, $enum, ""); + echo '</td></tr>'; + } + if ($operation == '|EnumParams|'){ + break; + } + case 'All': + case '|GetWalletTransactions|': + if (isset($filterName) && $filterName != "") { + self::renderFormRow('<i>Optional filters:</i>'); + self::renderEntity($filterName); + } + + self::renderFormRow('<i>Pagination:</i>'); + self::renderEntity('Pagination'); + break; + case 'Create': + self::renderEntity($entityName); + break; + case 'Get': + case 'CloseDispute': + case 'Cancel': + self::renderId($entityName); + break; + case 'Save': + self::renderId($entityName); + self::renderEntity($entityName); + break; + case 'SaveNoId': + self::renderEntity($entityName); + break; + case 'CreateSubEntity': + self::renderId($entityName); + self::renderEntity($subEntityName[0]); + break; + case 'CreateSubSubEntity': + self::renderId($entityName); + self::renderId($subEntityName[1], 'IdSubEntity'); + self::renderEntity($subEntityName[0]); + break; + case 'GetSubEntity': + self::renderId($entityName); + self::renderId($subEntityName[0], 'IdSubEntity'); + break; + case 'SaveSubEntity': + self::renderId($entityName, 'IdSubEntity'); + self::renderId($subEntityName[0]); + self::renderEntity($subEntityName[0]); + break; + case 'ListSubEntity': + self::renderId($entityName); + if (isset($filterName) && $filterName != "") { + self::renderFormRow('<i>Optional filters:</i>'); + self::renderEntity($filterName); + } + + self::renderFormRow('<i>Pagination:</i>'); + self::renderEntity('Pagination'); + break; + case 'ListSubSubEntity': + self::renderId($entityName); + self::renderId($subEntityName[1], 'IdSubEntity'); + if (isset($filterName) && $filterName != "") { + self::renderFormRow('<i>Optional filters:</i>'); + self::renderEntity($filterName); + } + + self::renderFormRow('<i>Pagination:</i>'); + self::renderEntity('Pagination'); + break; + case 'CreatePageByFile': + self::renderId($entityName); + self::renderId($subEntityName[1], 'IdSubEntity'); + self::renderFormRow('<tr><td></td><td><input type="file" name="page_file" /></td></tr>'); + break; + case 'ContestDispute': + self::renderId($entityName, 'IdSubEntity'); + self::renderEntity($subEntityName[0]); + break; + case 'Upload': + self::renderEntity($subEntityName[0]); + break; + case 'UploadFromFile': + self::renderFormRow('<tr><td></td><td><input type="file" name="page_file" /></td></tr>'); + break; + } + + $module = @$_GET['module']; + if (isset($module) && strpos($module, '$Sort')) { + self::renderSort(); + } + + $buttonText = $operation; + if ($operation == "|NoParams|" || $operation == "|EnumParams|"){ + $buttonText = $subEntityName[0]; + } else if ($operation == "SaveNoId"){ + $buttonText = "Save"; + } + + echo '<tr><td></td><td><input type="submit" value="' . $buttonText . '" /></td></tr>'; + echo '</table>'; + echo '<input type="hidden" name="_postback" value="1"/>'; + echo '</form>'; + } + + public static function renderEntity($entityName, $prefix = '') { + + $className = '\\MangoPay\\' . $entityName; + $entity = new $className(); + $blackList = $entity->GetReadOnlyProperties(); + $entityObject = new \ReflectionObject($entity); + + $module = @$_GET['module']; + $subObjects = $entity->GetSubObjects(); + $dependsObjects = $entity->GetDependsObjects(); + $depTypesInModule = explode(':', $module); + + $properties = $entityObject->getProperties(); + foreach ($properties as $property) { + + $name = $property->getName(); + + if (in_array($name, $blackList)) + continue; + + // is sub object? + $cls = @$subObjects[$name]; + if ($cls) { + self::renderEntity(str_replace('\\MangoPay\\', '', $cls), "$name:"); + continue; + } + + // is dependent object? + $handled = false; + foreach ($dependsObjects as $dep) { + if ($dep['_property_name'] == $name) { + foreach ($depTypesInModule as $dt) { + $cls = @$dep[$dt]; + if ($cls) { + self::renderEntity(str_replace('\\MangoPay\\', '', $cls), "$name:"); + $handled = true; + break; + } + } + break; + } + } + if ($handled) continue; + + // special fields + if ($entityName == 'Pagination' && in_array($name, array('Links', 'TotalPages', 'TotalItems'))) + continue; + + // normal fields + $value = ''; + if (isset($entity->$name)) + $value = $entity->$name; + + echo '<tr><td>'; + echo $prefix . $name . ':</td><td>'; + if ($className == "\\MangoPay\\Hook" && $name == "EventType"){ + self::renderEnum("\\MangoPay\\EventType", $name, $prefix); + } elseif ($className == "\\MangoPay\\FilterEvents" && $name == "EventType"){ + self::renderEnum("\\MangoPay\\EventType", $name, $prefix); + } elseif ($className == "\\MangoPay\\KycDocument" && $name == "Type") { + self::renderEnum("\\MangoPay\\KycDocumentType", $name, $prefix); + } elseif ($className == "\\MangoPay\\KycDocument" && $name == "Status") { + self::renderEnum("\\MangoPay\\KycDocumentStatus", $name, $prefix); + } elseif ($className == "\\MangoPay\\Card" && $name == "Validity") { + self::renderEnum("\\MangoPay\\CardValidity", $name, $prefix); + } elseif ($className == "\\MangoPay\\DisputeDocument" && $name == "Type") { + self::renderEnum("\\MangoPay\\DisputeDocumentType", $name, $prefix); + } elseif ($className == "\\MangoPay\\DisputeDocument" && $name == "Status") { + self::renderEnum("\\MangoPay\\DisputeDocumentStatus", $name, $prefix); + } elseif ($className == "\\MangoPay\\ReportRequest" && $name == "ReportType") { + self::renderEnum("\\MangoPay\\ReportType", $name, $prefix); + } elseif ($className == "\\MangoPay\\Client" && $name == "PlatformType") { + self::renderEnum("\\MangoPay\\PlatformType", $name, $prefix); + } + else + echo '<input type="text" name="' . $prefix . $name . '" value="' . $value . '"/>'; + echo '</td></tr>'; + } + } + + public static function renderEnum($enumClassName, $name, $prefix) { + + $enum = new $enumClassName(); + $enumObject = new \ReflectionObject($enum); + $constants = $enumObject->getConstants(); + + echo '<select name="' . $prefix . $name . '">'; + foreach ($constants as $constant) { + echo '<option value="' . $constant . '">' . $constant . '</option>'; + } + echo '</select>'; + } + + public static function renderFormRow($label = null, $field = null) { + + echo '<tr><td>'; + echo $label ? $label : ' '; + echo '</td><td>'; + echo $field ? $field : ' '; + echo '</td></tr>'; + } + + public static function renderId($entityName, $fieldName = 'Id') { + + $value = ''; + if (isset($_POST[$fieldName])) + $value = $_POST[$fieldName]; + + echo '<tr><td>'; + echo $entityName . ' Id:</td><td>'; + echo '<input type="text" name="' . $fieldName . '" value="' . $value . '"/></td></tr>'; + } + + public static function renderSort(){ + + $value = ''; + if (isset($_POST["_sort_"])) + $value = $_POST["_sort_"]; + + echo '<tr><td>'; + echo 'Sort:</td><td>'; + echo '<input type="text" name="_sort_" value="' . $value . '" style="width:176px;"/>'; + + echo ' <select name="_sort_direction_" style="width:70px;">'; + echo '<option value="' . \MangoPay\SortDirection::ASC . '">' . strtoupper(\MangoPay\SortDirection::ASC) . '</option>'; + echo '<option value="' . \MangoPay\SortDirection::DESC . '">' . strtoupper(\MangoPay\SortDirection::DESC) . '</option>'; + echo '</select></td></tr>'; + } + + public static function getEntity($entityName, $entityId = 0, $returnNullIfNoPropertyTouched = false, $prefix = '') { + $touchedAnyProp = false; + + $className = '\\MangoPay\\' . $entityName; + $entity = new $className($entityId); + + $entityObject = new \ReflectionObject($entity); + $properties = $entityObject->getProperties(); + + $module = @$_GET['module']; + $subObjects = $entity->GetSubObjects(); + $dependsObjects = $entity->GetDependsObjects(); + $depTypesInModule = explode(':', $module); + + foreach ($properties as $property) { + if (!$property->isPublic()) + continue; + + $name = $property->getName(); + + $frmName = $prefix . $name; + if (isset($_POST[$frmName]) && strlen($_POST[$frmName]) > 0) { + + // special fields for Owners property + if ($entityName == 'Wallet' && $name == 'Owners' + || $entityName == 'Client' && $name == 'TechEmails' + || $entityName == 'Client' && $name == 'AdminEmails' + || $entityName == 'Client' && $name == 'FraudEmails' + || $entityName == 'Client' && $name == 'BillingEmails'){ + + $entity->$name = explode(';', $_POST[$frmName]); + } + // special cast to int for Birthday property in UserNatural + // and UserLegal class + elseif (($entityName == 'UserNatural' && $name == 'Birthday') + || ($entityName == 'UserLegal' && $name == 'LegalRepresentativeBirthday')) + { + $entity->$name = (float)$_POST[$frmName]; + } + // normal fields + else + $entity->$name = $_POST[$frmName]; + + $touchedAnyProp = true; + } + } + + // sub objects + foreach ($subObjects as $name => $cls) { + $entity->$name = self::getEntity(str_replace('\\MangoPay\\', '', $cls), 0, true, "$name:"); + } + + // dependent objects + foreach ($dependsObjects as $dep) { + $name = $dep['_property_name']; + foreach ($depTypesInModule as $dt) { + $cls = @$dep[$dt]; + if ($cls) { + $entity->$name = self::getEntity(str_replace('\\MangoPay\\', '', $cls), 0, false, "$name:"); + break; + } + } + } + + if ($returnNullIfNoPropertyTouched && !$touchedAnyProp) + return null; + + return $entity; + } +} \ No newline at end of file diff --git a/views/test/api/index.php b/views/test/api/index.php new file mode 100644 index 0000000000000000000000000000000000000000..b1237ab343167f201c6389083689c967836a3b63 --- /dev/null +++ b/views/test/api/index.php @@ -0,0 +1,21 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <title>MangoPay API - demo</title> + <link rel="stylesheet" href="demo.css" /> + <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> + <script src="http://code.jquery.com/jquery-1.9.1.js"></script> + <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> + <script src="demo.js"></script> + </head> + <body> + <table border="0" width="870"> + <tr> + <td style="width: 250px" valign="top"><?php require_once 'menu.php'; ?></td> + <td style="width: 20px"></td> + <td style="width: 600px; padding: 0px;" valign="top"><?php require_once 'form.php'; ?></td> + </tr> + </table> + </body> +</html> diff --git a/views/test/api/menu.php b/views/test/api/menu.php new file mode 100644 index 0000000000000000000000000000000000000000..68ef5e78a6efde25d127955651303928fcd61a8c --- /dev/null +++ b/views/test/api/menu.php @@ -0,0 +1,160 @@ +<?php + +$GLOBALS['MangoPay_Demo_Menu'] = array( + + 'Users' => array( + 'Create natural user' => 'UserNatural_Users_Create', + 'Create legal user' => 'UserLegal_Users_Create', + 'Get user' => 'User_Users_Get', + 'Get all users' => 'User_Users_All___$Sort', + 'Save natural user' => 'UserNatural_Users_Save', + 'Save legal user' => 'UserLegal_Users_Save', + 'Save legal user' => 'UserLegal_Users_Save', + ), + 'Bank accounts' => array( + 'Create IBAN account' => 'User_Users_CreateSubEntity_BankAccount_:IBAN', + 'Create GB account' => 'User_Users_CreateSubEntity_BankAccount_:GB', + 'Create US account' => 'User_Users_CreateSubEntity_BankAccount_:US', + 'Create CA account' => 'User_Users_CreateSubEntity_BankAccount_:CA', + 'Create OTHER account' => 'User_Users_CreateSubEntity_BankAccount_:OTHER', + 'Get bank account for user' => 'User_Users_GetSubEntity_BankAccount', + 'List bank accounts for user' => 'User_Users_ListSubEntity_GetBankAccounts__$Sort', + ), + 'Wallets' => array( + 'Create wallet' => 'Wallet_Wallets_Create', + 'Get wallet' => 'Wallet_Wallets_Get', + 'Save wallet' => 'Wallet_Wallets_Save', + 'List wallets for user' => 'User_Users_ListSubEntity_GetWallets__$Sort', + ), + 'Transactions' => array( + 'List transactions for user' => 'User_Users_ListSubEntity_GetTransactions_FilterTransactions__$Sort', + 'List transactions for wallet' => 'Wallet_Wallets_ListSubEntity_GetTransactions_FilterTransactions__$Sort', + ), + 'Transfers' => array( + 'Create transfer' => 'Transfer_Transfers_Create', + 'Get transfer' => 'Transfer_Transfers_Get', + ), + 'Pay-ins' => array( + 'Create pay-in web card' => 'PayIn_PayIns_Create_:CARD:WEB', + 'Create pay-in direct card' => 'PayIn_PayIns_Create_:CARD:DIRECT', + 'Create pay-in direct pre-authorized' => 'PayIn_PayIns_Create_:PREAUTHORIZED:DIRECT', + 'Create pay-in direct bank wire' => 'PayIn_PayIns_Create_:BANK_WIRE:DIRECT', + 'Create pay-in direct debit web' => 'PayIn_PayIns_Create_:DIRECT_DEBIT:WEB', + 'Create pay-in direct debit direct' => 'PayIn_PayIns_Create_:DIRECT_DEBIT:DIRECT', + 'Create pay-in PayPal' => 'PayIn_PayIns_Create_:PAYPAL:WEB', + 'Get pay-in' => 'PayIn_PayIns_Get', + ), + 'Pay-outs' => array( + 'Create pay-out bank wire' => 'PayOut_PayOuts_Create_:BANK_WIRE', + 'Get pay-out bank wire' => 'PayOut_PayOuts_Get_:BANK_WIRE', + ), + 'Refunds' => array( + 'Create refund for transfer' => 'Transfer_Transfers_CreateSubEntity_Refund', + 'Create refund for pay-in' => 'PayIn_PayIns_CreateSubEntity_Refund', + 'Get refund' => 'Refund_Refunds_Get', + ), + 'Card registration' => array( + 'Create card registration' => 'CardRegistration_CardRegistrations_Create', + 'Get card registration' => 'CardRegistration_CardRegistrations_Get', + 'Update card registration' => 'CardRegistration_CardRegistrations_Save', + ), + 'Card pre-authorization' => array( + 'Create pre-authorization' => 'CardPreAuthorization_CardPreAuthorizations_Create', + 'Get pre-authorization' => 'CardPreAuthorization_CardPreAuthorizations_Get', + 'Update pre-authorization' => 'CardPreAuthorization_CardPreAuthorizations_Save', + ), + 'Card' => array( + 'Get card' => 'Card_Cards_Get', + 'Save card' => 'Card_Cards_Save', + 'List cards for user' => 'User_Users_ListSubEntity_GetCards__$Sort', + ), + 'Event' => array( + 'List events' => 'Event_Events_All__FilterEvents__$Sort', + ), + 'Hooks' => array( + 'Create hook' => 'Hook_Hooks_Create', + 'Get hook' => 'Hook_Hooks_Get', + 'Save hook' => 'Hook_Hooks_Save', + 'List of hooks' => 'Hook_Hooks_All', + ), + 'KYC' => array( + 'Create KYC document' => 'User_Users_CreateSubEntity_KycDocument', + 'Get KYC document' => 'User_Users_GetSubEntity_KycDocument', + 'Save KYC document' => 'User_Users_SaveSubEntity_KycDocument', + 'Create page for KYC from base64' => 'User_Users_CreateSubSubEntity_KycPage__KycDocument', + 'Create page for KYC from file' => 'User_Users_CreatePageByFile_KycPage__KycDocument', + 'List KYC documents for user' => 'User_Users_ListSubEntity_GetKycDocuments__$Sort', + 'List all KYC documents' => 'KycDocument_KycDocuments_All___$Sort', + ), + 'Disputes' => array( + 'Get dispute' => 'Dispute_Disputes_Get', + 'Get all disputes' => 'Dispute_Disputes_All___$Sort', + 'Save tag disputes' => 'Dispute_Disputes_Save', + 'Save contest dispute' => 'Dispute_Disputes_ContestDispute_Money', + 'Close dispute' => 'Dispute_Disputes_CloseDispute', + 'Get transactions' => 'Dispute_Disputes_ListSubEntity_GetTransactions__$Sort', + 'Get disputes for wallet' => 'Wallet_Disputes_ListSubEntity_GetDisputesForWallet__$Sort', + 'Get disputes for user' => 'User_Disputes_ListSubEntity_GetDisputesForUser__$Sort', + ), + 'Dispute documents' => array( + 'Create dispute document' => 'Dispute_Disputes_CreateSubEntity_DisputeDocument', + 'Get dispute document' => 'DisputeDocument_DisputeDocuments_Get', + 'Save dispute document' => 'Dispute_Disputes_SaveSubEntity_DisputeDocument', + 'Create page for dispute document from base64' => 'Dispute_Disputes_CreateSubSubEntity_DisputeDocumentPage__DisputeDocument', + 'Create page for dispute document from file' => 'Dispute_Disputes_CreatePageByFile_DisputeDocumentPage__DisputeDocument', + 'List all dispute documents' => 'DisputeDocument_DisputeDocuments_All___$Sort', + 'List dispute documents for dispute' => 'Dispute_Disputes_ListSubEntity_GetDocumentsForDispute__$Sort', + ), + 'Mandates' => array( + 'Create mandate' => 'Mandate_Mandates_Create', + 'Get mandate' => 'Mandate_Mandates_Get', + 'Cancel mandate' => 'Mandate_Mandates_Cancel', + 'List of mandates' => 'Mandate_Mandates_All__FilterTransactions___$Sort', + 'List mandate for user' => 'User_Users_ListSubEntity_GetMandates_FilterTransactions_$Sort', + 'List mandate for user and for bank account' => 'User_Users_ListSubSubEntity_GetMandatesForBankAccount_FilterTransactions_BankAccount___$Sort', + ), + 'Client' => array( + 'Get client information' => 'Client_Clients_|NoParams|_Get', + 'Update client' => 'Client_Clients_SaveNoId', + 'Upload logo from base64' => 'Client_Clients_Upload_ClientLogoUpload__UploadLogo', + 'Upload logo from file' => 'Client_Clients_UploadFromFile___UploadLogoFromFile', + 'View your client wallets' => 'Wallet_Clients_|NoParams|_GetWallets', + 'View your fees/credit wallets for each currency' => 'Wallet_Clients_|EnumParams|_GetWallets__FundsType', + 'View one wallets (fees or credit) with a particular currency' => 'Wallet_Clients_|EnumParams|_GetWallet__FundsType$CurrencyIso', + 'View the transactions linked to your client wallets (fees and credit)' => 'Wallet_Clients_|GetWalletTransactions|', + 'View the transactions linked to one of your client wallets (fees or credit) with a particular currency' => 'Wallet_Clients_|EnumParamsList|_GetWalletTransactions_FilterTransactions_FundsType$CurrencyIso', + ), + 'Reports' => array( + 'Create report request' => 'ReportRequest_Reports_Create', + 'Get report request' => 'ReportRequest_Reports_Get', + 'List all report request' => 'ReportRequest_Reports_All__FilterReports__$Sort', + //'List transactions for wallet' => 'Wallet_Wallets_ListSubEntity_GetTransactions_FilterTransactions__$Sort', + ), + 'Responses' => array( + 'Get responses' => 'Response_Responses_Get' + ), +); + +?> + +<div id="menu"> +<?php + +$moduleIndex = 0; +$selectedModuleIndex = -1; + +foreach ($GLOBALS['MangoPay_Demo_Menu'] as $moduleText => $subMenu) { + + echo '<h3>' . $moduleText . '</h3><ul>'; + foreach ($subMenu as $menuText => $file) { + echo '<li><a href="index.php?module=' . $file . '" >' . $menuText . '</a></li>'; + if( @$_GET['module'] == $file ) $selectedModuleIndex = $moduleIndex; + } + echo '</ul>'; + + $moduleIndex ++; +} + +?> +</div> +<script type="text/javascript">var selectedModuleIndex = <?php echo $selectedModuleIndex ?>; </script> \ No newline at end of file diff --git a/views/test/doc/inc/config.php b/views/test/doc/inc/config.php new file mode 100644 index 0000000000000000000000000000000000000000..d220dc94bf4549e71c71c4555d321ab3bb733e73 --- /dev/null +++ b/views/test/doc/inc/config.php @@ -0,0 +1,12 @@ +<?php +//require_once '../../pixelhumain/ph/vendor/autoload.php'; +require_once '../../modules/co2/views/test/doc/inc/mockStorage.php'; + +define("MangoPayAPIClientId", empty(Yii::app()->params["mangoPay"]["ClientId"]) ? "demo" : Yii::app()->params["mangoPay"]["ClientId"]); +define("MangoPayAPIPassword", empty(Yii::app()->params["mangoPay"]["ClientPassword"]) ? "SRbaqf9kwpjOxAYtE9tVFVBWAh2waeF7TX4TEcZ4jVFKbm1uaD" : Yii::app()->params["mangoPay"]["ClientPassword"]); + +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = MangoPayAPIClientId; +$mangoPayApi->Config->ClientPassword = MangoPayAPIPassword; +//$mangoPayApi->Config->TemporaryFolder = __dir__; +$mangoPayApi->OAuthTokenManager->RegisterCustomStorageStrategy(new \MangoPay\DemoWorkflow\MockStorageStrategy()); \ No newline at end of file diff --git a/views/test/doc/inc/mockStorage.php b/views/test/doc/inc/mockStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..6e29114ad3cd11b3b390127dd09cde913b306101 --- /dev/null +++ b/views/test/doc/inc/mockStorage.php @@ -0,0 +1,24 @@ +<?php +namespace MangoPay\DemoWorkflow; +/** + * Same as storage strategy implementation for tests + */ +class MockStorageStrategy implements \MangoPay\Libraries\IStorageStrategy { + + private static $_oAuthToken = null; + + /** + * Gets the current authorization token. + * @return \MangoPay\Libraries\OAuthToken Currently stored token instance or null. + */ + public function Get() { + return self::$_oAuthToken; + } + /** + * Stores authorization token passed as an argument. + * @param \MangoPay\Libraries\OAuthToken $token Token instance to be stored. + */ + public function Store($token) { + self::$_oAuthToken = $token; + } +} \ No newline at end of file diff --git a/views/test/doc/logo.png b/views/test/doc/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..dfc364b59b0661f6cf8cf7076ea2478d15530d5d Binary files /dev/null and b/views/test/doc/logo.png differ diff --git a/views/test/doc/mango.php b/views/test/doc/mango.php new file mode 100644 index 0000000000000000000000000000000000000000..05e099c77d6d226a997d8a2c590b1792b30df6cd --- /dev/null +++ b/views/test/doc/mango.php @@ -0,0 +1,159 @@ +<?php +if (!isset($_SESSION["MangoPayDemo"])) $_SESSION["MangoPayDemo"] = array(); +if (!isset($_SESSION["MangoPayDemoConfig"])) $_SESSION["MangoPayDemoConfig"] = array(); +require_once("inc/config.php"); + +$stepId = isset($_GET["stepId"]) ? (int) $_GET["stepId"] : 0; +$steps = array(); +$steps[] = array("step"=>"Welcome", "file"=>"intro.php", "docsLink"=>""); +$steps[] = array("step"=>"Setup Client credentials", "file"=>"client.php", "docsLink"=>"sandbox-credentials/"); +$steps[] = array("step"=>"Create Natural User", "file"=>"user-create-natural.php", "docsLink"=>"users/natural-users/"); +$steps[] = array("step"=>"Create Wallet for Natural User", "file"=>"wallet-create.php", "docsLink"=>"wallets/"); +$steps[] = array("step"=>"Create Legal User", "file"=>"user-create-legal.php", "docsLink"=>"users/legal-users/"); +$steps[] = array("step"=>"Create Wallet for Legal User", "file"=>"wallet-create2.php", "docsLink"=>"wallets/"); +$steps[] = array("step"=>"Create PayIn Card Web", "file"=>"payin-card-web.php", "docsLink"=>"payins/payins-card-web/"); +$steps[] = array("step"=>"Review PayIn Card Web", "file"=>"payin-card-web-review.php", "checkResult"=>true, "docsLink"=>"payins/"); +$steps[] = array("step"=>"Create Card Registration", "file"=>"card-reg.php", "docsLink"=>"card-registration/"); +$steps[] = array("step"=>"Finish Card Registration", "file"=>"card-reg-put.php", "checkResult"=>true, "docsLink"=>"card-registration/"); +$steps[] = array("step"=>"Do PayIn Card Direct", "file"=>"payin-card-direct.php", "checkResult"=>true, "docsLink"=>"payins/payindirectcard/"); +$steps[] = array("step"=>"Setup a PreAuth", "file"=>"preauth.php", "checkResult"=>true, "docsLink"=>"card/pre-authorization/"); +$steps[] = array("step"=>"Do a PayIn PreAuth", "file"=>"payin-card-preauth.php", "checkResult"=>true, "docsLink"=>"payins/preauthorized-payin/"); +$steps[] = array("step"=>"Do a PayIn Refund", "file"=>"refund-payin.php", "checkResult"=>true, "docsLink"=>"refund/%e2%80%a2-refund-a-pay-in/"); +$steps[] = array("step"=>"Do a Transfer", "file"=>"transfer.php", "checkResult"=>true, "docsLink"=>"transfers/"); +$steps[] = array("step"=>"Create a Bank Account (of IBAN type)", "file"=>"bankaccount.php", "docsLink"=>"bank-accounts/"); +$steps[] = array("step"=>"Do a PayOut", "file"=>"payout.php", "docsLink"=>"pay-out-bank-wire/"); +$steps[] = array("step"=>"Submit a KYC Document", "file"=>"kyc.php", "docsLink"=>"kyc/"); +$steps[] = array("step"=>"Do a Transfer Refund", "file"=>"refund-transfer.php", "checkResult"=>true, "docsLink"=>"refund/%e2%80%a2-refund-a-transfer/"); +$steps[] = array("step"=>"Finished", "file"=>"end.php", "docsLink"=>""); + +$totalStepsIndex = count($steps)-1; + +if (isset($_POST["SetUpClientCreds"])) { + Yii::app()->params["mangoPay"]["ClientId"] = $_POST["ClientId"]; + Yii::app()->params["mangoPay"]["ClientPassword"] = $_POST["Password"]; + header("Location: index.php?stepId=".($stepId+1)); + die(); +} + +function pre_dump($r) { + echo "<pre>"; + var_dump($r); + echo "</pre>"; +} + +function getDemoScript($stepId) { + global $steps; + $script = explode("//Display",file_get_contents("../../modules/co2/views/test/doc/scripts/".$steps[$stepId]["file"])); + //return htmlentities(trim(str_replace("<?php","",$script[0]))); + return trim(str_replace("<?php","",$script[0])); +} +?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <title>MANGOPAY Demo workflow</title> + <link href="//fonts.googleapis.com/css?family=PT+Sans:400,700" rel="stylesheet" type="text/css"> + <link href="style.css" rel="stylesheet" type="text/css"> + <link href="syntaxhighlighter/shThemeDefault.css" rel="stylesheet" type="text/css" /> + <style> + .flyer span { + width:<?php echo ceil(100*$stepId/$totalStepsIndex); $startFrom = ceil(100*$stepId/($totalStepsIndex+1)); ?>%; + } + @-webkit-keyframes progressBar { + from { width: <?php echo $startFrom; ?>%; } + } + @keyframes progressBar { + from { width: <?php echo $startFrom; ?>%; } + } + @-moz-keyframes progressBar { + from { width: <?php echo $startFrom; ?>%; } + } + </style> + <script type="text/javascript" src="syntaxhighlighter/shCore.js"></script> + <script type="text/javascript" src="syntaxhighlighter/shBrushPhp.js"></script> + <script>SyntaxHighlighter.defaults['toolbar'] = false;SyntaxHighlighter.defaults['auto-links'] = false;SyntaxHighlighter.defaults['gutter'] = false;SyntaxHighlighter.all();</script> + </head> + <body> + <div id="loading"><div></div></div> + <div id="main"> + <div class="header"></div> + <div class="container"> +<?php +if (empty($_SESSION["MangoPayDemo"]) && $stepId>2) { + echo "<br><div class='notice'>The demo has either been finished or has timed out - please <a href='index.php'>start again</a></div><br>"; + +}elseif (in_array($stepId, array_keys($steps))) { + ?> + <div class="flyer"><span></span></div> + + <a href="https://docs.mangopay.com/api-references/<?php echo $steps[$stepId]["docsLink"]; ?>" class="next docs" target="_blank"><?php echo $steps[$stepId]["docsLink"] ? "View docs for this method" : "View full docs"; ?></a> + + <h1><?php echo $steps[$stepId]["step"]; ?></h1> + + <div class="containerInner"> + <?php + $apiError = false; + try { + if ($stepId>1 && $stepId<$totalStepsIndex) { + echo "<h2>Code example</h2>"; + //echo "<pre class='script'>".getDemoScript($stepId)."</pre>"; + echo "<script type='syntaxhighlighter' class='brush:php'><![CDATA[".getDemoScript($stepId)."]]></script>"; + echo "<br>"; + echo "<h2>Returned object</h2>"; + } + include("scripts/".$steps[$stepId]["file"]); + + } catch (MangoPay\Libraries\ResponseException $e) { + $apiError = true; + MangoPay\Libraries\Logs::Debug('MangoPay\ResponseException Code', $e->GetCode()); + MangoPay\Libraries\Logs::Debug('Message', $e->GetMessage()); + MangoPay\Libraries\Logs::Debug('Details', $e->GetErrorDetails()); + + } catch (MangoPay\Libraries\Exception $e) { + $apiError = true; + MangoPay\Libraries\Logs::Debug('MangoPay\Exception Message', $e->GetMessage()); + } + ?> + + <?php + if ($apiError) { + echo "<div class='notice'>The API call failed :-(</div>"; + }else{ + if (isset($extraInfo)) { + echo "<div class='notice helper'>$extraInfo</div>"; + } + if (isset($nextButton)) { + if (isset($nextButton["url"])) echo "<a href='".$nextButton["url"]."' class='next customButton' onclick='addActive(this)'>".$nextButton["text"]."</a>"; + }elseif (isset($steps[$stepId]["checkResult"]) && !in_array($result->Status, array("VALIDATED", "SUCCEEDED"))) { + echo "<div class='notice'>The previous call is <i>".$result->Status."</i> beacuse of <i>".$result->ResultMessage."</i> so you can not carry on with the demo</div>"; + }elseif ($stepId<$totalStepsIndex) { + echo "<a href='index.php?stepId=".($stepId+1)."' class='next' onclick='addActive(this)'>Next: ".$steps[$stepId+1]["step"]."</a>"; + } + } + ?> + <div class="clear"></div> + </div> + <?php +}else{ + echo "Unknown step requested"; +} + +?> +</div> +</div> +<script> + function addActive(what) { + what.className = what.className + " clicked"; + var d = document.getElementById("loading"); + d.className = d.className + " active"; + var m = document.getElementById("main"); + m.className = m.className + " clicked"; + } + function toggle(id) { + var what = document.getElementById(id); + what.style.display = what.style.display === 'none' ? '' : 'none'; + } +</script> +</body> +</html> \ No newline at end of file diff --git a/views/test/doc/mango_.php b/views/test/doc/mango_.php new file mode 100644 index 0000000000000000000000000000000000000000..4cb422b35d64dc5ed0bcce455a92615a59648cfa --- /dev/null +++ b/views/test/doc/mango_.php @@ -0,0 +1,7 @@ +<script type="text/javascript" src="mangopay-kit.js"></script> + +<br/> +"ClientId" => <?php echo $ClientId ?> + +<br/> +Imagine a world in which every single person on the planet has free access to the sum of all human knowledge. diff --git a/views/test/doc/scripts/bankaccount.php b/views/test/doc/scripts/bankaccount.php new file mode 100644 index 0000000000000000000000000000000000000000..27c2c57ff9fa9bebcf5d9e63c87f47e13aa613e9 --- /dev/null +++ b/views/test/doc/scripts/bankaccount.php @@ -0,0 +1,21 @@ +<?php +$UserId = $_SESSION["MangoPayDemo"]["UserLegal"]; +$BankAccount = new \MangoPay\BankAccount(); +$BankAccount->Type = "IBAN"; +$BankAccount->Details = new MangoPay\BankAccountDetailsIBAN(); +$BankAccount->Details->IBAN = "FR7618829754160173622224154"; +$BankAccount->Details->BIC = "CMBRFR2BCME"; +$BankAccount->OwnerName = "Joe Bloggs"; +$BankAccount->OwnerAddress = new \MangoPay\Address(); +$BankAccount->OwnerAddress->AddressLine1 = 'Address line 1'; +$BankAccount->OwnerAddress->AddressLine2 = 'Address line 2'; +$BankAccount->OwnerAddress->City = 'City'; +$BankAccount->OwnerAddress->Country = 'FR'; +$BankAccount->OwnerAddress->PostalCode = '11222'; +$BankAccount->OwnerAddress->Region = 'Region'; +$result = $mangoPayApi->Users->CreateBankAccount($UserId, $BankAccount); + +//Display result +pre_dump($result); + +$_SESSION["MangoPayDemo"]["BankAccount"] = $result->Id; diff --git a/views/test/doc/scripts/card-reg-put.php b/views/test/doc/scripts/card-reg-put.php new file mode 100644 index 0000000000000000000000000000000000000000..909387fd9c6274638fe9bc49582d779b96b8b3b3 --- /dev/null +++ b/views/test/doc/scripts/card-reg-put.php @@ -0,0 +1,10 @@ +<?php +$cardRegisterPut = $mangoPayApi->CardRegistrations->Get($_SESSION["MangoPayDemo"]["CardReg"]); +$cardRegisterPut->RegistrationData = isset($_GET['data']) ? 'data=' . $_GET['data'] : 'errorCode=' . $_GET['errorCode']; +$result = $mangoPayApi->CardRegistrations->Update($cardRegisterPut); + +//Display result +pre_dump($result); + +$extraInfo = "Remember that you have 30 minutes to either do a PayIn Direct or setup a PreAuth with this card, otherwise it will become unsuable"; +$_SESSION["MangoPayDemo"]["Card"] = $result->CardId; \ No newline at end of file diff --git a/views/test/doc/scripts/card-reg.php b/views/test/doc/scripts/card-reg.php new file mode 100644 index 0000000000000000000000000000000000000000..7187fbff49208deff6b3f4d7e2f7b808beab55c8 --- /dev/null +++ b/views/test/doc/scripts/card-reg.php @@ -0,0 +1,34 @@ +<?php +$cardRegister = new \MangoPay\CardRegistration(); +$cardRegister->UserId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$cardRegister->Currency = "EUR"; +$result = $mangoPayApi->CardRegistrations->Create($cardRegister); + +//Display result +pre_dump($result); + ?> + <br> + <form action="<?php echo $result->CardRegistrationURL; ?>" method="post"> + <input type="hidden" name="data" value="<?php echo $result->PreregistrationData; ?>" /> + <input type="hidden" name="accessKeyRef" value="<?php echo $result->AccessKey; ?>" /> + <input type="hidden" name="returnURL" value="<?php echo "http".(isset($_SERVER['HTTPS']) ? "s" : null)."://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]."?stepId=".($stepId+1); ?>" /> + <table> + <tr> + <th>Card number:</th> + <td><input type="text" name="cardNumber" size="20" maxlength="30" value="4970100000000154"></td> + </tr> + <tr> + <th>Expiry date:</th> + <td><input type="text" name="cardExpirationDate" maxlength="4" size="4" placeholder="MMYY" value="1217"></td> + </tr> + <tr> + <th>CVV:</th> + <td><input type="text" name="cardCvx" size="3" maxlength="5" value="123"></td> + </tr> + </table> + <input type="submit" value="Next: <?php echo $steps[$stepId+1]["step"]; ?>" class="next" onclick="addActive(this)"> + </form> + +<?php + $_SESSION["MangoPayDemo"]["CardReg"] = $result->Id; + $nextButton=array(); \ No newline at end of file diff --git a/views/test/doc/scripts/client.php b/views/test/doc/scripts/client.php new file mode 100644 index 0000000000000000000000000000000000000000..22b64ca4e32ef2c8cde184a7c37bf72daed7be87 --- /dev/null +++ b/views/test/doc/scripts/client.php @@ -0,0 +1,17 @@ +To run these examples, we need a ClientId and Password. You can either provide your own below (that you created for the Sandbox environment or <a href="https://docs.mangopay.com/api-references/sandbox-credentials/" target="_blank">get one here</a>), or you can just use the demo ones below if you prefer.<br><br> + +<form method="post"> + <input type="hidden" name="SetUpClientCreds" /> + <table> + <tr> + <th>ClientId</th> + <td><input type="text" name="ClientId" value="<?php echo MangoPayAPIClientId; ?>" /></td> + </tr> + <tr> + <th>Password</th> + <td><input type="text" name="Password" value="<?php echo MangoPayAPIPassword; ?>" /></td> + </tr> + </table> + <input type="submit" value="Next: <?php echo $steps[$stepId+1]["step"]; ?>" class="next" onclick="addActive(this)"> +</form> +<?php $nextButton=array(); ?> \ No newline at end of file diff --git a/views/test/doc/scripts/end.php b/views/test/doc/scripts/end.php new file mode 100644 index 0000000000000000000000000000000000000000..dd2332bf0a06a76bdfecf369e9ab5c3363f1c83d --- /dev/null +++ b/views/test/doc/scripts/end.php @@ -0,0 +1,31 @@ +All done :-)<br> +Why don't you check out this activity on the <a href="https://dashboard.sandbox.mangopay.com" target="_blank">Mangopay Dashboard</a> - you can use the following info: +<table> + <tr> + <th>ClientId:</th> + <td><?php echo MangoPayAPIClientId; ?></td> + </tr> + <tr> + <th>Email:</th> + <td><?php echo MangoPayAPIClientId=="demo" ? "support@mangopay.com" : "(the one you used when creating your client)"; ?></td> + </tr> + <tr> + <th>Password:</th> + <td><?php echo MangoPayAPIClientId=="demo" ? "Mangopay1*" : "(the one you created when using the Dashboard for the first time)"; ?></td> + </tr> +</table> +<br><br> + +For your reference, here are the IDs you generated:<br><br> +<table> +<?php +foreach($_SESSION["MangoPayDemo"] as $k=>$v) { + echo "<tr>"; + echo "<th>".$k.":</th>"; + echo "<td>".$v."</td>"; + echo "</tr>"; +} +unset($_SESSION["MangoPayDemo"]); ?> +</table> +<br><br> +<a href="index.php" class="next back">Want another go?</a> diff --git a/views/test/doc/scripts/intro.php b/views/test/doc/scripts/intro.php new file mode 100644 index 0000000000000000000000000000000000000000..450a93f661d5613daccbcbbd819b50819d6d68cb --- /dev/null +++ b/views/test/doc/scripts/intro.php @@ -0,0 +1,26 @@ +This demo will take you through a "typical" workflow of creating Users, doing PayIns, transfering from one Wallet to another and then doing a PayOut. You are of course free to design any workflow you like though! Some very basic examples of the SDK are shown for each example. This is the full program:<br> +<ul> +<?php + foreach($steps as $i=>$s) { + $showingScript = $i>1 && $i<$totalStepsIndex; + if ($i>0) { + echo "<li>"; + echo $showingScript ? "<a href=\"javascript:toggle('step_script_$i')\" title=\"View demo script\">".$s["step"]."</a>" : $s["step"]; + if ($showingScript) echo "<div id='step_script_$i' style='display:none'><script type='syntaxhighlighter' class='brush:php'><![CDATA[".getDemoScript($i)."]]></script></div>"; + echo "</li>"; + } + } +?> +</ul> +<br> +For each example given in this demo, you'll also need to include the PHP SDK, and initiate the API call: +<script type='syntaxhighlighter' class='brush:php'><![CDATA[ +require_once '../../vendor/autoload.php'; +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = YourMangoPayAPIClientId; +$mangoPayApi->Config->ClientPassword = YourMangoPayAPIPassword; +$mangoPayApi->Config->TemporaryFolder = /a/writable/folder/somewhere/ideally-out-of-reach-of-your-root/; +]]> +</script> +<br> +Do not use the "Back" button in your browser, or "Refresh" at any point, otherwise you risk breaking this very basic demo :-) diff --git a/views/test/doc/scripts/kyc.php b/views/test/doc/scripts/kyc.php new file mode 100644 index 0000000000000000000000000000000000000000..74e6d863bcac42f7dd79976f12452456bd3586cd --- /dev/null +++ b/views/test/doc/scripts/kyc.php @@ -0,0 +1,21 @@ +<?php +//create the doc +$KycDocument = new \MangoPay\KycDocument(); +$KycDocument->Type = "IDENTITY_PROOF"; +$result = $mangoPayApi->Users->CreateKycDocument($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocument); +$KycDocumentId = $result->Id; + +//add a page to this doc +$result2 = $mangoPayApi->Users->CreateKycPageFromFile($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocumentId, "logo.png"); + +//submit the doc for validation +$KycDocument = new MangoPay\KycDocument(); +$KycDocument->Id = $KycDocumentId; +$KycDocument->Status = \MangoPay\KycDocumentStatus::ValidationAsked; +$result3 = $mangoPayApi->Users->UpdateKycDocument($_SESSION["MangoPayDemo"]["UserNatural"], $KycDocument); + + +//Display result +pre_dump($result3); + +$_SESSION["MangoPayDemo"]["KYC"] = $KycDocumentId; diff --git a/views/test/doc/scripts/payin-card-direct.php b/views/test/doc/scripts/payin-card-direct.php new file mode 100644 index 0000000000000000000000000000000000000000..08c304666c0e8ea7842e5c314ef18ca846fc6797 --- /dev/null +++ b/views/test/doc/scripts/payin-card-direct.php @@ -0,0 +1,24 @@ +<?php +$PayIn = new \MangoPay\PayIn(); +$PayIn->CreditedWalletId = $_SESSION["MangoPayDemo"]["WalletForNaturalUser"]; +$PayIn->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$PayIn->PaymentType = \MangoPay\PayInPaymentType::Card; +$PayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); +$PayIn->DebitedFunds = new \MangoPay\Money(); +$PayIn->DebitedFunds->Currency = "EUR"; +$PayIn->DebitedFunds->Amount = 599; +$PayIn->Fees = new \MangoPay\Money(); +$PayIn->Fees->Currency = "EUR"; +$PayIn->Fees->Amount = 0; +$PayIn->ExecutionType = \MangoPay\PayInExecutionType::Direct; +$PayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); +$PayIn->ExecutionDetails->SecureModeReturnURL = "http".(isset($_SERVER['HTTPS']) ? "s" : null)."://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]."?stepId=".($stepId+1); +$PayIn->ExecutionDetails->CardId = $_SESSION["MangoPayDemo"]["Card"]; +$result = $mangoPayApi->PayIns->Create($PayIn); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["PayInCardDirect"] = $result->Id; +if ($result->ExecutionDetails->SecureModeNeeded && $result->Status!=\MangoPay\PayInStatus::Failed) { + $nextButton = array("url"=>$result->ExecutionDetails->SecureModeRedirectURL, "text"=>"Go to 3DS payment page"); +} diff --git a/views/test/doc/scripts/payin-card-preauth.php b/views/test/doc/scripts/payin-card-preauth.php new file mode 100644 index 0000000000000000000000000000000000000000..7511857e366b9719e27444b000b0832003a77828 --- /dev/null +++ b/views/test/doc/scripts/payin-card-preauth.php @@ -0,0 +1,20 @@ +<?php +$PayIn = new \MangoPay\PayIn(); +$PayIn->CreditedWalletId = $_SESSION["MangoPayDemo"]["WalletForNaturalUser"]; +$PayIn->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$PayIn->PaymentType = \MangoPay\PayInPaymentType::Card; +$PayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsPreAuthorized(); +$PayIn->PaymentDetails->PreauthorizationId = $_SESSION["MangoPayDemo"]["PreAuth"]; +$PayIn->DebitedFunds = new \MangoPay\Money(); +$PayIn->DebitedFunds->Currency = "EUR"; +$PayIn->DebitedFunds->Amount = 950; +$PayIn->Fees = new \MangoPay\Money(); +$PayIn->Fees->Currency = "EUR"; +$PayIn->Fees->Amount = 550; +$PayIn->ExecutionType = \MangoPay\PayInExecutionType::Direct; +$PayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); +$result = $mangoPayApi->PayIns->Create($PayIn); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["PayInCardPreAuth"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/payin-card-web-review.php b/views/test/doc/scripts/payin-card-web-review.php new file mode 100644 index 0000000000000000000000000000000000000000..3a9ebb6b3d10d87dd21f0026f352835d3fa5d36d --- /dev/null +++ b/views/test/doc/scripts/payin-card-web-review.php @@ -0,0 +1,5 @@ +<?php +$result = $mangoPayApi->PayIns->Get($_SESSION["MangoPayDemo"]["PayInCardWeb"]); + +//Display result +pre_dump($result); \ No newline at end of file diff --git a/views/test/doc/scripts/payin-card-web.php b/views/test/doc/scripts/payin-card-web.php new file mode 100644 index 0000000000000000000000000000000000000000..9564954dbfd07cac7dd4f008575c6afe837c59fb --- /dev/null +++ b/views/test/doc/scripts/payin-card-web.php @@ -0,0 +1,25 @@ +<?php +$PayIn = new \MangoPay\PayIn(); +$PayIn->CreditedWalletId = $_SESSION["MangoPayDemo"]["WalletForNaturalUser"]; +$PayIn->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$PayIn->PaymentType = \MangoPay\PayInPaymentType::Card; +$PayIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); +$PayIn->PaymentDetails->CardType = "CB_VISA_MASTERCARD"; +$PayIn->DebitedFunds = new \MangoPay\Money(); +$PayIn->DebitedFunds->Currency = "EUR"; +$PayIn->DebitedFunds->Amount = 2500; +$PayIn->Fees = new \MangoPay\Money(); +$PayIn->Fees->Currency = "EUR"; +$PayIn->Fees->Amount = 150; +$PayIn->ExecutionType = \MangoPay\PayInExecutionType::Web; +$PayIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsWeb(); +$PayIn->ExecutionDetails->ReturnURL = "http".(isset($_SERVER['HTTPS']) ? "s" : null)."://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]."?stepId=".($stepId+1); +$PayIn->ExecutionDetails->Culture = "EN"; +$result = $mangoPayApi->PayIns->Create($PayIn); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["PayInCardWeb"] = $result->Id; + +$extraInfo = "You can use the test card 4970101122334414 with any expiry date in the future and a CVV of 123 (or any of <a href='http://docs.mangopay.com/api-references/test-payment/' target='_blank'>these other cards</a>)"; +$nextButton = array("url"=>$result->ExecutionDetails->RedirectURL, "text"=>"Go to Payment page"); \ No newline at end of file diff --git a/views/test/doc/scripts/payout.php b/views/test/doc/scripts/payout.php new file mode 100644 index 0000000000000000000000000000000000000000..8c3c0df02179e2c01eff54f5a5222eebc4d7ca03 --- /dev/null +++ b/views/test/doc/scripts/payout.php @@ -0,0 +1,19 @@ +<?php +$PayOut = new \MangoPay\PayOut(); +$PayOut->AuthorId = $_SESSION["MangoPayDemo"]["UserLegal"]; +$PayOut->DebitedWalletId = $_SESSION["MangoPayDemo"]["WalletForLegalUser"]; +$PayOut->DebitedFunds = new \MangoPay\Money(); +$PayOut->DebitedFunds->Currency = "EUR"; +$PayOut->DebitedFunds->Amount = 610; +$PayOut->Fees = new \MangoPay\Money(); +$PayOut->Fees->Currency = "EUR"; +$PayOut->Fees->Amount = 125; +$PayOut->PaymentType = \MangoPay\PayOutPaymentType::BankWire; +$PayOut->MeanOfPaymentDetails = new \MangoPay\PayOutPaymentDetailsBankWire(); +$PayOut->MeanOfPaymentDetails->BankAccountId = $_SESSION["MangoPayDemo"]["BankAccount"]; +$result = $mangoPayApi->PayOuts->Create($PayOut); + +//Display result +pre_dump($result); + +$_SESSION["MangoPayDemo"]["PayOut"] = $result->Id; diff --git a/views/test/doc/scripts/preauth.php b/views/test/doc/scripts/preauth.php new file mode 100644 index 0000000000000000000000000000000000000000..3c978590c0a032c30b60d05300634aa164f437bc --- /dev/null +++ b/views/test/doc/scripts/preauth.php @@ -0,0 +1,18 @@ +<?php +$CardPreAuthorization = new \MangoPay\CardPreAuthorization(); +$CardPreAuthorization->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$CardPreAuthorization->DebitedFunds = new \MangoPay\Money(); +$CardPreAuthorization->DebitedFunds->Currency = "EUR"; +$CardPreAuthorization->DebitedFunds->Amount = 1500; +$CardPreAuthorization->SecureMode = "DEFAULT"; +$CardPreAuthorization->CardId = $_SESSION["MangoPayDemo"]["Card"]; +$CardPreAuthorization->SecureModeReturnURL = "http".(isset($_SERVER['HTTPS']) ? "s" : null)."://".$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]."?stepId=".($stepId+1); +$result = $mangoPayApi->CardPreAuthorizations->Create($CardPreAuthorization); + + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["PreAuth"] = $result->Id; +if ($result->SecureModeNeeded && $result->Status!=\MangoPay\CardPreAuthorizationStatus::Failed) { + $nextButton = array("url"=>$result->SecureModeRedirectURL, "text"=>"Go to 3DS payment page"); +} diff --git a/views/test/doc/scripts/refund-payin.php b/views/test/doc/scripts/refund-payin.php new file mode 100644 index 0000000000000000000000000000000000000000..fbbc695958bce50581999a1ad402fe484ae5b8d3 --- /dev/null +++ b/views/test/doc/scripts/refund-payin.php @@ -0,0 +1,16 @@ +<?php +$PayInId = $_SESSION["MangoPayDemo"]["PayInCardWeb"]; +$Refund = new \MangoPay\Refund(); +$Refund->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$Refund->DebitedFunds = new \MangoPay\Money(); +$Refund->DebitedFunds->Currency = "EUR"; +$Refund->DebitedFunds->Amount = 650; +$Refund->Fees = new \MangoPay\Money(); +$Refund->Fees->Currency = "EUR"; +$Refund->Fees->Amount = -50; +$result = $mangoPayApi->PayIns->CreateRefund($PayInId, $Refund); + +//Display result +pre_dump($result); + +$_SESSION["MangoPayDemo"]["Refund"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/refund-transfer.php b/views/test/doc/scripts/refund-transfer.php new file mode 100644 index 0000000000000000000000000000000000000000..fedf9b3e05fec0d5c4a68678c1f109bdeb7adc69 --- /dev/null +++ b/views/test/doc/scripts/refund-transfer.php @@ -0,0 +1,16 @@ +<?php +$TransferId = $_SESSION["MangoPayDemo"]["Transfer"]; +$Refund = new \MangoPay\Refund(); +$Refund->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$Refund->DebitedFunds = new \MangoPay\Money(); +$Refund->DebitedFunds->Currency = "EUR"; +$Refund->DebitedFunds->Amount = 760;//Note that partial Refunds for Transfers are not possible +$Refund->Fees = new \MangoPay\Money(); +$Refund->Fees->Currency = "EUR"; +$Refund->Fees->Amount = -150; +$result = $mangoPayApi->Transfers->CreateRefund($TransferId, $Refund); + +//Display result +pre_dump($result); + +$_SESSION["MangoPayDemo"]["RefundTransfer"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/transfer.php b/views/test/doc/scripts/transfer.php new file mode 100644 index 0000000000000000000000000000000000000000..7f007d057642bd64943b631cad8dd697e7b60d11 --- /dev/null +++ b/views/test/doc/scripts/transfer.php @@ -0,0 +1,17 @@ +<?php +$Transfer = new \MangoPay\Transfer(); +$Transfer->AuthorId = $_SESSION["MangoPayDemo"]["UserNatural"]; +$Transfer->DebitedFunds = new \MangoPay\Money(); +$Transfer->DebitedFunds->Currency = "EUR"; +$Transfer->DebitedFunds->Amount = 760; +$Transfer->Fees = new \MangoPay\Money(); +$Transfer->Fees->Currency = "EUR"; +$Transfer->Fees->Amount = 150; +$Transfer->DebitedWalletID = $_SESSION["MangoPayDemo"]["WalletForNaturalUser"]; +$Transfer->CreditedWalletId = $_SESSION["MangoPayDemo"]["WalletForLegalUser"]; +$result = $mangoPayApi->Transfers->Create($Transfer); + +//Display result +pre_dump($result); + +$_SESSION["MangoPayDemo"]["Transfer"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/user-create-legal.php b/views/test/doc/scripts/user-create-legal.php new file mode 100644 index 0000000000000000000000000000000000000000..28e96211257871ef17f87fb68006d85b910cea77 --- /dev/null +++ b/views/test/doc/scripts/user-create-legal.php @@ -0,0 +1,15 @@ +<?php +$User = new MangoPay\UserLegal(); +$User->Name = "Name Legal Test"; +$User->LegalPersonType = \MangoPay\LegalPersonType::Business; +$User->Email = "legal@testmangopay.com"; +$User->LegalRepresentativeFirstName = "Bob"; +$User->LegalRepresentativeLastName = "Briant"; +$User->LegalRepresentativeBirthday = 121271; +$User->LegalRepresentativeNationality = "FR"; +$User->LegalRepresentativeCountryOfResidence = "ZA"; +$result = $mangoPayApi->Users->Create($User); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["UserLegal"] = $result->Id; diff --git a/views/test/doc/scripts/user-create-natural.php b/views/test/doc/scripts/user-create-natural.php new file mode 100644 index 0000000000000000000000000000000000000000..c99a0bc420004caa36ade0abf4a38b7893e5940d --- /dev/null +++ b/views/test/doc/scripts/user-create-natural.php @@ -0,0 +1,13 @@ +<?php +$User = new MangoPay\UserNatural(); +$User->Email = "test_natural@testmangopay.com"; +$User->FirstName = "Bob"; +$User->LastName = "Briant"; +$User->Birthday = 121271; +$User->Nationality = "FR"; +$User->CountryOfResidence = "ZA"; +$result = $mangoPayApi->Users->Create($User); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["UserNatural"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/wallet-create.php b/views/test/doc/scripts/wallet-create.php new file mode 100644 index 0000000000000000000000000000000000000000..7726cfb67240b5804ecce5c8b00be4e3ce357178 --- /dev/null +++ b/views/test/doc/scripts/wallet-create.php @@ -0,0 +1,10 @@ +<?php +$Wallet = new \MangoPay\Wallet(); +$Wallet->Owners = array($_SESSION["MangoPayDemo"]["UserNatural"]); +$Wallet->Description = "Demo wallet for User 1"; +$Wallet->Currency = "EUR"; +$result = $mangoPayApi->Wallets->Create($Wallet); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["WalletForNaturalUser"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/scripts/wallet-create2.php b/views/test/doc/scripts/wallet-create2.php new file mode 100644 index 0000000000000000000000000000000000000000..a5dfa49e0d8dd9aa40d7d20f30c4a06d97e742a5 --- /dev/null +++ b/views/test/doc/scripts/wallet-create2.php @@ -0,0 +1,11 @@ +<?php +//Note that there is no difference between a Wallet for a Natural User and a Legal User +$Wallet = new \MangoPay\Wallet(); +$Wallet->Owners = array($_SESSION["MangoPayDemo"]["UserLegal"]); +$Wallet->Description = "Demo wallet for User 2"; +$Wallet->Currency = "EUR"; +$result = $mangoPayApi->Wallets->Create($Wallet); + +//Display result +pre_dump($result); +$_SESSION["MangoPayDemo"]["WalletForLegalUser"] = $result->Id; \ No newline at end of file diff --git a/views/test/doc/style.css b/views/test/doc/style.css new file mode 100644 index 0000000000000000000000000000000000000000..669ea19c384593e2417474bb1bc7b42326ce36a6 --- /dev/null +++ b/views/test/doc/style.css @@ -0,0 +1,212 @@ +body { + margin:0; + padding: 0; + background-color: #fafafa; + color: #555; +} +body, input { + font-size: 16px; + font-family: 'PT Sans', sans-serif; + font-weight: 400; + line-height: 1.2em; +} +input[type="text"] { + padding: 2px 5px; +} +a:link, a:visited { + color:#428bca; +} +#main { + padding: 25px 0; +} +#main > .container { + background-color: #fff; + box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.25); + margin: 0 auto; + max-width: 100%; + width: 660px; +} +.containerInner { + padding:20px; +} +pre, .syntaxhighlighter { + overflow-x: auto; + font-size: 12px; + line-height: 1.3; + padding: 4px 6px; + background: rgb(245, 245, 245); + box-shadow: inset 0 1px 4px 0 rgba(0, 0, 0, 0.25); + margin:12px 0; +} +.syntaxhighlighter table .container > div { + white-space:nowrap; +} +ul li pre { + margin-top: 4px; +} +ul li { + margin-bottom:2px; +} +h1 { + border-bottom: 1px dotted #b7b7b2; + display: block; + font-size: 24px; + line-height: 1.2em; + padding: 24px 20px; + margin: 0; + font-weight:normal; + color: #428bca; +} +h2 { + font-weight: normal; + color: #f78153; + margin: 0; +} +a.next, .next { + margin-top: 30px; + text-decoration: none !important; + outline: none !important; + color: #fff; + background: #f78153; + display: inline-block; + font-weight: normal; + text-align: center; + vertical-align: middle; + cursor: pointer; + border: 1px solid #eea236; + white-space: nowrap; + padding: 6px 12px; + border-radius: 3px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + float:right; +} +.next.customButton { + background: #51d466; + border: 1px solid #4cae4c; +} +.next:hover { + background: #eb6c3a; +} +.next.customButton:hover { + background: #42c557;; +} +.next.clicked, #main.clicked { + opacity:0.3; + cursor:wait; +} +.next.back { + float:none; +} +.next.docs { + margin-top: 27px; + margin-right: 22px; + padding: 4px 6px; + font-size: 14px; +} +.next.docs, .next.back { + background: #428bca; + border: 1px solid #357ebd; +} +.next.back:hover, .next.docs:hover { + background: #528fe2; +} +.clear { + clear:both; +} +.notice { + border-radius: 5px; + background-color: #f2dede; + border: 1px solid #ebccd1; + color: #a94442; + padding: 10px 15px; +} +.notice.helper { + background-color: #d9edf7; + border-color: #bce8f1; + color: #31708f; +} +.container > .notice { + margin:0 20px; +} +.flyer { + background: #609cec; +} +.flyer span { + -webkit-animation: progressBar 1s ease forwards; + -moz-animation: progressBar 1s ease forwards; + animation: progressBar 1s ease forwards; + display:block; + background: #51d466; + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; +} +.flyer, .flyer span { + height:7px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); +} +table { + width: 100%; +} +table th { + text-align:right; + width:50%; + padding-right:10px; +} + .header { + background: url('logo.png') no-repeat center center; + height: 45px; + margin-bottom: 20px; +} +#loading { + z-index: 10; + position: fixed; + top:0; + display:none; + height:5px; + width:0; +} +#loading div { + height:6px; + width: 100%; + background: #f78153; + background-image: -webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent); + background-size: 40px 40px; + -webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); + box-shadow: inset 0 -1px 0 rgba(0,0,0,0.15); + -webkit-animation: progress-bar-stripes 1s linear infinite; + animation: progress-bar-stripes 1s linear infinite; +} +#loading.active { + display:block; + -webkit-animation: loading-bar 2s ease forwards; + animation: loading-bar 2s ease forwards; +} +@-webkit-keyframes loading-bar { + to { + width: 100%; + } +} +@keyframes loading-bar { + to { + width: 100%; + } +} +@-moz-keyframes loading-bar { + to { + width: 100%; + } +} +@-webkit-keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} + +@keyframes progress-bar-stripes { + from { background-position: 40px 0; } + to { background-position: 0 0; } +} \ No newline at end of file diff --git a/views/test/doc/syntaxhighlighter/shBrushPhp.js b/views/test/doc/syntaxhighlighter/shBrushPhp.js new file mode 100644 index 0000000000000000000000000000000000000000..95e6e4325bb44aa6caf4c40d914810f25616db88 --- /dev/null +++ b/views/test/doc/syntaxhighlighter/shBrushPhp.js @@ -0,0 +1,88 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +;(function() +{ + // CommonJS + typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; + + function Brush() + { + var funcs = 'abs acos acosh addcslashes addslashes ' + + 'array_change_key_case array_chunk array_combine array_count_values array_diff '+ + 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+ + 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+ + 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+ + 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+ + 'array_push array_rand array_reduce array_reverse array_search array_shift '+ + 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+ + 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+ + 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+ + 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+ + 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+ + 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+ + 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+ + 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+ + 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+ + 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+ + 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+ + 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+ + 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+ + 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+ + 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+ + 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+ + 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+ + 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+ + 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+ + 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+ + 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+ + 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+ + 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+ + 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+ + 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+ + 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+ + 'strtoupper strtr strval substr substr_compare'; + + var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' + + 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' + + 'function include include_once global goto if implements interface instanceof namespace new ' + + 'old_function or private protected public return require require_once static switch ' + + 'throw try use var while xor '; + + var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__'; + + this.regexList = [ + { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments + { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments + { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings + { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings + { regex: /\$\w+/g, css: 'variable' }, // variables + { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions + { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants + { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword + ]; + + this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags); + }; + + Brush.prototype = new SyntaxHighlighter.Highlighter(); + Brush.aliases = ['php']; + + SyntaxHighlighter.brushes.Php = Brush; + + // CommonJS + typeof(exports) != 'undefined' ? exports.Brush = Brush : null; +})(); diff --git a/views/test/doc/syntaxhighlighter/shCore.js b/views/test/doc/syntaxhighlighter/shCore.js new file mode 100644 index 0000000000000000000000000000000000000000..b47b6454721504abf3ebe05dad4c903142f843f7 --- /dev/null +++ b/views/test/doc/syntaxhighlighter/shCore.js @@ -0,0 +1,17 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ +eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('K M;I(M)1S 2U("2a\'t 4k M 4K 2g 3l 4G 4H");(6(){6 r(f,e){I(!M.1R(f))1S 3m("3s 15 4R");K a=f.1w;f=M(f.1m,t(f)+(e||""));I(a)f.1w={1m:a.1m,19:a.19?a.19.1a(0):N};H f}6 t(f){H(f.1J?"g":"")+(f.4s?"i":"")+(f.4p?"m":"")+(f.4v?"x":"")+(f.3n?"y":"")}6 B(f,e,a,b){K c=u.L,d,h,g;v=R;5K{O(;c--;){g=u[c];I(a&g.3r&&(!g.2p||g.2p.W(b))){g.2q.12=e;I((h=g.2q.X(f))&&h.P===e){d={3k:g.2b.W(b,h,a),1C:h};1N}}}}5v(i){1S i}5q{v=11}H d}6 p(f,e,a){I(3b.Z.1i)H f.1i(e,a);O(a=a||0;a<f.L;a++)I(f[a]===e)H a;H-1}M=6(f,e){K a=[],b=M.1B,c=0,d,h;I(M.1R(f)){I(e!==1d)1S 3m("2a\'t 5r 5I 5F 5B 5C 15 5E 5p");H r(f)}I(v)1S 2U("2a\'t W 3l M 59 5m 5g 5x 5i");e=e||"";O(d={2N:11,19:[],2K:6(g){H e.1i(g)>-1},3d:6(g){e+=g}};c<f.L;)I(h=B(f,c,b,d)){a.U(h.3k);c+=h.1C[0].L||1}Y I(h=n.X.W(z[b],f.1a(c))){a.U(h[0]);c+=h[0].L}Y{h=f.3a(c);I(h==="[")b=M.2I;Y I(h==="]")b=M.1B;a.U(h);c++}a=15(a.1K(""),n.Q.W(e,w,""));a.1w={1m:f,19:d.2N?d.19:N};H a};M.3v="1.5.0";M.2I=1;M.1B=2;K C=/\\$(?:(\\d\\d?|[$&`\'])|{([$\\w]+)})/g,w=/[^5h]+|([\\s\\S])(?=[\\s\\S]*\\1)/g,A=/^(?:[?*+]|{\\d+(?:,\\d*)?})\\??/,v=11,u=[],n={X:15.Z.X,1A:15.Z.1A,1C:1r.Z.1C,Q:1r.Z.Q,1e:1r.Z.1e},x=n.X.W(/()??/,"")[1]===1d,D=6(){K f=/^/g;n.1A.W(f,"");H!f.12}(),y=6(){K f=/x/g;n.Q.W("x",f,"");H!f.12}(),E=15.Z.3n!==1d,z={};z[M.2I]=/^(?:\\\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S]))/;z[M.1B]=/^(?:\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\\d*|x[\\29-26-f]{2}|u[\\29-26-f]{4}|c[A-3o-z]|[\\s\\S])|\\(\\?[:=!]|[?*+]\\?|{\\d+(?:,\\d*)?}\\??)/;M.1h=6(f,e,a,b){u.U({2q:r(f,"g"+(E?"y":"")),2b:e,3r:a||M.1B,2p:b||N})};M.2n=6(f,e){K a=f+"/"+(e||"");H M.2n[a]||(M.2n[a]=M(f,e))};M.3c=6(f){H r(f,"g")};M.5l=6(f){H f.Q(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g,"\\\\$&")};M.5e=6(f,e,a,b){e=r(e,"g"+(b&&E?"y":""));e.12=a=a||0;f=e.X(f);H b?f&&f.P===a?f:N:f};M.3q=6(){M.1h=6(){1S 2U("2a\'t 55 1h 54 3q")}};M.1R=6(f){H 53.Z.1q.W(f)==="[2m 15]"};M.3p=6(f,e,a,b){O(K c=r(e,"g"),d=-1,h;h=c.X(f);){a.W(b,h,++d,f,c);c.12===h.P&&c.12++}I(e.1J)e.12=0};M.57=6(f,e){H 6 a(b,c){K d=e[c].1I?e[c]:{1I:e[c]},h=r(d.1I,"g"),g=[],i;O(i=0;i<b.L;i++)M.3p(b[i],h,6(k){g.U(d.3j?k[d.3j]||"":k[0])});H c===e.L-1||!g.L?g:a(g,c+1)}([f],0)};15.Z.1p=6(f,e){H J.X(e[0])};15.Z.W=6(f,e){H J.X(e)};15.Z.X=6(f){K e=n.X.1p(J,14),a;I(e){I(!x&&e.L>1&&p(e,"")>-1){a=15(J.1m,n.Q.W(t(J),"g",""));n.Q.W(f.1a(e.P),a,6(){O(K c=1;c<14.L-2;c++)I(14[c]===1d)e[c]=1d})}I(J.1w&&J.1w.19)O(K b=1;b<e.L;b++)I(a=J.1w.19[b-1])e[a]=e[b];!D&&J.1J&&!e[0].L&&J.12>e.P&&J.12--}H e};I(!D)15.Z.1A=6(f){(f=n.X.W(J,f))&&J.1J&&!f[0].L&&J.12>f.P&&J.12--;H!!f};1r.Z.1C=6(f){M.1R(f)||(f=15(f));I(f.1J){K e=n.1C.1p(J,14);f.12=0;H e}H f.X(J)};1r.Z.Q=6(f,e){K a=M.1R(f),b,c;I(a&&1j e.58()==="3f"&&e.1i("${")===-1&&y)H n.Q.1p(J,14);I(a){I(f.1w)b=f.1w.19}Y f+="";I(1j e==="6")c=n.Q.W(J,f,6(){I(b){14[0]=1f 1r(14[0]);O(K d=0;d<b.L;d++)I(b[d])14[0][b[d]]=14[d+1]}I(a&&f.1J)f.12=14[14.L-2]+14[0].L;H e.1p(N,14)});Y{c=J+"";c=n.Q.W(c,f,6(){K d=14;H n.Q.W(e,C,6(h,g,i){I(g)5b(g){24"$":H"$";24"&":H d[0];24"`":H d[d.L-1].1a(0,d[d.L-2]);24"\'":H d[d.L-1].1a(d[d.L-2]+d[0].L);5a:i="";g=+g;I(!g)H h;O(;g>d.L-3;){i=1r.Z.1a.W(g,-1)+i;g=1Q.3i(g/10)}H(g?d[g]||"":"$")+i}Y{g=+i;I(g<=d.L-3)H d[g];g=b?p(b,i):-1;H g>-1?d[g+1]:h}})})}I(a&&f.1J)f.12=0;H c};1r.Z.1e=6(f,e){I(!M.1R(f))H n.1e.1p(J,14);K a=J+"",b=[],c=0,d,h;I(e===1d||+e<0)e=5D;Y{e=1Q.3i(+e);I(!e)H[]}O(f=M.3c(f);d=f.X(a);){I(f.12>c){b.U(a.1a(c,d.P));d.L>1&&d.P<a.L&&3b.Z.U.1p(b,d.1a(1));h=d[0].L;c=f.12;I(b.L>=e)1N}f.12===d.P&&f.12++}I(c===a.L){I(!n.1A.W(f,"")||h)b.U("")}Y b.U(a.1a(c));H b.L>e?b.1a(0,e):b};M.1h(/\\(\\?#[^)]*\\)/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"});M.1h(/\\((?!\\?)/,6(){J.19.U(N);H"("});M.1h(/\\(\\?<([$\\w]+)>/,6(f){J.19.U(f[1]);J.2N=R;H"("});M.1h(/\\\\k<([\\w$]+)>/,6(f){K e=p(J.19,f[1]);H e>-1?"\\\\"+(e+1)+(3R(f.2S.3a(f.P+f[0].L))?"":"(?:)"):f[0]});M.1h(/\\[\\^?]/,6(f){H f[0]==="[]"?"\\\\b\\\\B":"[\\\\s\\\\S]"});M.1h(/^\\(\\?([5A]+)\\)/,6(f){J.3d(f[1]);H""});M.1h(/(?:\\s+|#.*)+/,6(f){H n.1A.W(A,f.2S.1a(f.P+f[0].L))?"":"(?:)"},M.1B,6(){H J.2K("x")});M.1h(/\\./,6(){H"[\\\\s\\\\S]"},M.1B,6(){H J.2K("s")})})();1j 2e!="1d"&&(2e.M=M);K 1v=6(){6 r(a,b){a.1l.1i(b)!=-1||(a.1l+=" "+b)}6 t(a){H a.1i("3e")==0?a:"3e"+a}6 B(a){H e.1Y.2A[t(a)]}6 p(a,b,c){I(a==N)H N;K d=c!=R?a.3G:[a.2G],h={"#":"1c",".":"1l"}[b.1o(0,1)]||"3h",g,i;g=h!="3h"?b.1o(1):b.5u();I((a[h]||"").1i(g)!=-1)H a;O(a=0;d&&a<d.L&&i==N;a++)i=p(d[a],b,c);H i}6 C(a,b){K c={},d;O(d 2g a)c[d]=a[d];O(d 2g b)c[d]=b[d];H c}6 w(a,b,c,d){6 h(g){g=g||1P.5y;I(!g.1F){g.1F=g.52;g.3N=6(){J.5w=11}}c.W(d||1P,g)}a.3g?a.3g("4U"+b,h):a.4y(b,h,11)}6 A(a,b){K c=e.1Y.2j,d=N;I(c==N){c={};O(K h 2g e.1U){K g=e.1U[h];d=g.4x;I(d!=N){g.1V=h.4w();O(g=0;g<d.L;g++)c[d[g]]=h}}e.1Y.2j=c}d=e.1U[c[a]];d==N&&b!=11&&1P.1X(e.13.1x.1X+(e.13.1x.3E+a));H d}6 v(a,b){O(K c=a.1e("\\n"),d=0;d<c.L;d++)c[d]=b(c[d],d);H c.1K("\\n")}6 u(a,b){I(a==N||a.L==0||a=="\\n")H a;a=a.Q(/</g,"&1y;");a=a.Q(/ {2,}/g,6(c){O(K d="",h=0;h<c.L-1;h++)d+=e.13.1W;H d+" "});I(b!=N)a=v(a,6(c){I(c.L==0)H"";K d="";c=c.Q(/^(&2s;| )+/,6(h){d=h;H""});I(c.L==0)H d;H d+\'<17 1g="\'+b+\'">\'+c+"</17>"});H a}6 n(a,b){a.1e("\\n");O(K c="",d=0;d<50;d++)c+=" ";H a=v(a,6(h){I(h.1i("\\t")==-1)H h;O(K g=0;(g=h.1i("\\t"))!=-1;)h=h.1o(0,g)+c.1o(0,b-g%b)+h.1o(g+1,h.L);H h})}6 x(a){H a.Q(/^\\s+|\\s+$/g,"")}6 D(a,b){I(a.P<b.P)H-1;Y I(a.P>b.P)H 1;Y I(a.L<b.L)H-1;Y I(a.L>b.L)H 1;H 0}6 y(a,b){6 c(k){H k[0]}O(K d=N,h=[],g=b.2D?b.2D:c;(d=b.1I.X(a))!=N;){K i=g(d,b);I(1j i=="3f")i=[1f e.2L(i,d.P,b.23)];h=h.1O(i)}H h}6 E(a){K b=/(.*)((&1G;|&1y;).*)/;H a.Q(e.3A.3M,6(c){K d="",h=N;I(h=b.X(c)){c=h[1];d=h[2]}H\'<a 2h="\'+c+\'">\'+c+"</a>"+d})}6 z(){O(K a=1E.36("1k"),b=[],c=0;c<a.L;c++)a[c].3s=="20"&&b.U(a[c]);H b}6 f(a){a=a.1F;K b=p(a,".20",R);a=p(a,".3O",R);K c=1E.4i("3t");I(!(!a||!b||p(a,"3t"))){B(b.1c);r(b,"1m");O(K d=a.3G,h=[],g=0;g<d.L;g++)h.U(d[g].4z||d[g].4A);h=h.1K("\\r");c.39(1E.4D(h));a.39(c);c.2C();c.4C();w(c,"4u",6(){c.2G.4E(c);b.1l=b.1l.Q("1m","")})}}I(1j 3F!="1d"&&1j M=="1d")M=3F("M").M;K e={2v:{"1g-27":"","2i-1s":1,"2z-1s-2t":11,1M:N,1t:N,"42-45":R,"43-22":4,1u:R,16:R,"3V-17":R,2l:11,"41-40":R,2k:11,"1z-1k":11},13:{1W:"&2s;",2M:R,46:11,44:11,34:"4n",1x:{21:"4o 1m",2P:"?",1X:"1v\\n\\n",3E:"4r\'t 4t 1D O: ",4g:"4m 4B\'t 51 O 1z-1k 4F: ",37:\'<!4T 1z 4S "-//4V//3H 4W 1.0 4Z//4Y" "1Z://2y.3L.3K/4X/3I/3H/3I-4P.4J"><1z 4I="1Z://2y.3L.3K/4L/5L"><3J><4N 1Z-4M="5G-5M" 6K="2O/1z; 6J=6I-8" /><1t>6L 1v</1t></3J><3B 1L="25-6M:6Q,6P,6O,6N-6F;6y-2f:#6x;2f:#6w;25-22:6v;2O-3D:3C;"><T 1L="2O-3D:3C;3w-32:1.6z;"><T 1L="25-22:6A-6E;">1v</T><T 1L="25-22:.6C;3w-6B:6R;"><T>3v 3.0.76 (72 73 3x)</T><T><a 2h="1Z://3u.2w/1v" 1F="38" 1L="2f:#3y">1Z://3u.2w/1v</a></T><T>70 17 6U 71.</T><T>6T 6X-3x 6Y 6D.</T></T><T>6t 61 60 J 1k, 5Z <a 2h="6u://2y.62.2w/63-66/65?64=5X-5W&5P=5O" 1L="2f:#3y">5R</a> 5V <2R/>5U 5T 5S!</T></T></3B></1z>\'}},1Y:{2j:N,2A:{}},1U:{},3A:{6n:/\\/\\*[\\s\\S]*?\\*\\//2c,6m:/\\/\\/.*$/2c,6l:/#.*$/2c,6k:/"([^\\\\"\\n]|\\\\.)*"/g,6o:/\'([^\\\\\'\\n]|\\\\.)*\'/g,6p:1f M(\'"([^\\\\\\\\"]|\\\\\\\\.)*"\',"3z"),6s:1f M("\'([^\\\\\\\\\']|\\\\\\\\.)*\'","3z"),6q:/(&1y;|<)!--[\\s\\S]*?--(&1G;|>)/2c,3M:/\\w+:\\/\\/[\\w-.\\/?%&=:@;]*/g,6a:{18:/(&1y;|<)\\?=?/g,1b:/\\?(&1G;|>)/g},69:{18:/(&1y;|<)%=?/g,1b:/%(&1G;|>)/g},6d:{18:/(&1y;|<)\\s*1k.*?(&1G;|>)/2T,1b:/(&1y;|<)\\/\\s*1k\\s*(&1G;|>)/2T}},16:{1H:6(a){6 b(i,k){H e.16.2o(i,k,e.13.1x[k])}O(K c=\'<T 1g="16">\',d=e.16.2x,h=d.2X,g=0;g<h.L;g++)c+=(d[h[g]].1H||b)(a,h[g]);c+="</T>";H c},2o:6(a,b,c){H\'<2W><a 2h="#" 1g="6e 6h\'+b+" "+b+\'">\'+c+"</a></2W>"},2b:6(a){K b=a.1F,c=b.1l||"";b=B(p(b,".20",R).1c);K d=6(h){H(h=15(h+"6f(\\\\w+)").X(c))?h[1]:N}("6g");b&&d&&e.16.2x[d].2B(b);a.3N()},2x:{2X:["21","2P"],21:{1H:6(a){I(a.V("2l")!=R)H"";K b=a.V("1t");H e.16.2o(a,"21",b?b:e.13.1x.21)},2B:6(a){a=1E.6j(t(a.1c));a.1l=a.1l.Q("47","")}},2P:{2B:6(){K a="68=0";a+=", 18="+(31.30-33)/2+", 32="+(31.2Z-2Y)/2+", 30=33, 2Z=2Y";a=a.Q(/^,/,"");a=1P.6Z("","38",a);a.2C();K b=a.1E;b.6W(e.13.1x.37);b.6V();a.2C()}}}},35:6(a,b){K c;I(b)c=[b];Y{c=1E.36(e.13.34);O(K d=[],h=0;h<c.L;h++)d.U(c[h]);c=d}c=c;d=[];I(e.13.2M)c=c.1O(z());I(c.L===0)H d;O(h=0;h<c.L;h++){O(K g=c[h],i=a,k=c[h].1l,j=3W 0,l={},m=1f M("^\\\\[(?<2V>(.*?))\\\\]$"),s=1f M("(?<27>[\\\\w-]+)\\\\s*:\\\\s*(?<1T>[\\\\w-%#]+|\\\\[.*?\\\\]|\\".*?\\"|\'.*?\')\\\\s*;?","g");(j=s.X(k))!=N;){K o=j.1T.Q(/^[\'"]|[\'"]$/g,"");I(o!=N&&m.1A(o)){o=m.X(o);o=o.2V.L>0?o.2V.1e(/\\s*,\\s*/):[]}l[j.27]=o}g={1F:g,1n:C(i,l)};g.1n.1D!=N&&d.U(g)}H d},1M:6(a,b){K c=J.35(a,b),d=N,h=e.13;I(c.L!==0)O(K g=0;g<c.L;g++){b=c[g];K i=b.1F,k=b.1n,j=k.1D,l;I(j!=N){I(k["1z-1k"]=="R"||e.2v["1z-1k"]==R){d=1f e.4l(j);j="4O"}Y I(d=A(j))d=1f d;Y 6H;l=i.3X;I(h.2M){l=l;K m=x(l),s=11;I(m.1i("<![6G[")==0){m=m.4h(9);s=R}K o=m.L;I(m.1i("]]\\>")==o-3){m=m.4h(0,o-3);s=R}l=s?m:l}I((i.1t||"")!="")k.1t=i.1t;k.1D=j;d.2Q(k);b=d.2F(l);I((i.1c||"")!="")b.1c=i.1c;i.2G.74(b,i)}}},2E:6(a){w(1P,"4k",6(){e.1M(a)})}};e.2E=e.2E;e.1M=e.1M;e.2L=6(a,b,c){J.1T=a;J.P=b;J.L=a.L;J.23=c;J.1V=N};e.2L.Z.1q=6(){H J.1T};e.4l=6(a){6 b(j,l){O(K m=0;m<j.L;m++)j[m].P+=l}K c=A(a),d,h=1f e.1U.5Y,g=J,i="2F 1H 2Q".1e(" ");I(c!=N){d=1f c;O(K k=0;k<i.L;k++)(6(){K j=i[k];g[j]=6(){H h[j].1p(h,14)}})();d.28==N?1P.1X(e.13.1x.1X+(e.13.1x.4g+a)):h.2J.U({1I:d.28.17,2D:6(j){O(K l=j.17,m=[],s=d.2J,o=j.P+j.18.L,F=d.28,q,G=0;G<s.L;G++){q=y(l,s[G]);b(q,o);m=m.1O(q)}I(F.18!=N&&j.18!=N){q=y(j.18,F.18);b(q,j.P);m=m.1O(q)}I(F.1b!=N&&j.1b!=N){q=y(j.1b,F.1b);b(q,j.P+j[0].5Q(j.1b));m=m.1O(q)}O(j=0;j<m.L;j++)m[j].1V=c.1V;H m}})}};e.4j=6(){};e.4j.Z={V:6(a,b){K c=J.1n[a];c=c==N?b:c;K d={"R":R,"11":11}[c];H d==N?c:d},3Y:6(a){H 1E.4i(a)},4c:6(a,b){K c=[];I(a!=N)O(K d=0;d<a.L;d++)I(1j a[d]=="2m")c=c.1O(y(b,a[d]));H J.4e(c.6b(D))},4e:6(a){O(K b=0;b<a.L;b++)I(a[b]!==N)O(K c=a[b],d=c.P+c.L,h=b+1;h<a.L&&a[b]!==N;h++){K g=a[h];I(g!==N)I(g.P>d)1N;Y I(g.P==c.P&&g.L>c.L)a[b]=N;Y I(g.P>=c.P&&g.P<d)a[h]=N}H a},4d:6(a){K b=[],c=2u(J.V("2i-1s"));v(a,6(d,h){b.U(h+c)});H b},3U:6(a){K b=J.V("1M",[]);I(1j b!="2m"&&b.U==N)b=[b];a:{a=a.1q();K c=3W 0;O(c=c=1Q.6c(c||0,0);c<b.L;c++)I(b[c]==a){b=c;1N a}b=-1}H b!=-1},2r:6(a,b,c){a=["1s","6i"+b,"P"+a,"6r"+(b%2==0?1:2).1q()];J.3U(b)&&a.U("67");b==0&&a.U("1N");H\'<T 1g="\'+a.1K(" ")+\'">\'+c+"</T>"},3Q:6(a,b){K c="",d=a.1e("\\n").L,h=2u(J.V("2i-1s")),g=J.V("2z-1s-2t");I(g==R)g=(h+d-1).1q().L;Y I(3R(g)==R)g=0;O(K i=0;i<d;i++){K k=b?b[i]:h+i,j;I(k==0)j=e.13.1W;Y{j=g;O(K l=k.1q();l.L<j;)l="0"+l;j=l}a=j;c+=J.2r(i,k,a)}H c},49:6(a,b){a=x(a);K c=a.1e("\\n");J.V("2z-1s-2t");K d=2u(J.V("2i-1s"));a="";O(K h=J.V("1D"),g=0;g<c.L;g++){K i=c[g],k=/^(&2s;|\\s)+/.X(i),j=N,l=b?b[g]:d+g;I(k!=N){j=k[0].1q();i=i.1o(j.L);j=j.Q(" ",e.13.1W)}i=x(i);I(i.L==0)i=e.13.1W;a+=J.2r(g,l,(j!=N?\'<17 1g="\'+h+\' 5N">\'+j+"</17>":"")+i)}H a},4f:6(a){H a?"<4a>"+a+"</4a>":""},4b:6(a,b){6 c(l){H(l=l?l.1V||g:g)?l+" ":""}O(K d=0,h="",g=J.V("1D",""),i=0;i<b.L;i++){K k=b[i],j;I(!(k===N||k.L===0)){j=c(k);h+=u(a.1o(d,k.P-d),j+"48")+u(k.1T,j+k.23);d=k.P+k.L+(k.75||0)}}h+=u(a.1o(d),c()+"48");H h},1H:6(a){K b="",c=["20"],d;I(J.V("2k")==R)J.1n.16=J.1n.1u=11;1l="20";J.V("2l")==R&&c.U("47");I((1u=J.V("1u"))==11)c.U("6S");c.U(J.V("1g-27"));c.U(J.V("1D"));a=a.Q(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"").Q(/\\r/g," ");b=J.V("43-22");I(J.V("42-45")==R)a=n(a,b);Y{O(K h="",g=0;g<b;g++)h+=" ";a=a.Q(/\\t/g,h)}a=a;a:{b=a=a;h=/<2R\\s*\\/?>|&1y;2R\\s*\\/?&1G;/2T;I(e.13.46==R)b=b.Q(h,"\\n");I(e.13.44==R)b=b.Q(h,"");b=b.1e("\\n");h=/^\\s*/;g=4Q;O(K i=0;i<b.L&&g>0;i++){K k=b[i];I(x(k).L!=0){k=h.X(k);I(k==N){a=a;1N a}g=1Q.4q(k[0].L,g)}}I(g>0)O(i=0;i<b.L;i++)b[i]=b[i].1o(g);a=b.1K("\\n")}I(1u)d=J.4d(a);b=J.4c(J.2J,a);b=J.4b(a,b);b=J.49(b,d);I(J.V("41-40"))b=E(b);1j 2H!="1d"&&2H.3S&&2H.3S.1C(/5s/)&&c.U("5t");H b=\'<T 1c="\'+t(J.1c)+\'" 1g="\'+c.1K(" ")+\'">\'+(J.V("16")?e.16.1H(J):"")+\'<3Z 5z="0" 5H="0" 5J="0">\'+J.4f(J.V("1t"))+"<3T><3P>"+(1u?\'<2d 1g="1u">\'+J.3Q(a)+"</2d>":"")+\'<2d 1g="17"><T 1g="3O">\'+b+"</T></2d></3P></3T></3Z></T>"},2F:6(a){I(a===N)a="";J.17=a;K b=J.3Y("T");b.3X=J.1H(a);J.V("16")&&w(p(b,".16"),"5c",e.16.2b);J.V("3V-17")&&w(p(b,".17"),"56",f);H b},2Q:6(a){J.1c=""+1Q.5d(1Q.5n()*5k).1q();e.1Y.2A[t(J.1c)]=J;J.1n=C(e.2v,a||{});I(J.V("2k")==R)J.1n.16=J.1n.1u=11},5j:6(a){a=a.Q(/^\\s+|\\s+$/g,"").Q(/\\s+/g,"|");H"\\\\b(?:"+a+")\\\\b"},5f:6(a){J.28={18:{1I:a.18,23:"1k"},1b:{1I:a.1b,23:"1k"},17:1f M("(?<18>"+a.18.1m+")(?<17>.*?)(?<1b>"+a.1b.1m+")","5o")}}};H e}();1j 2e!="1d"&&(2e.1v=1v);',62,441,'||||||function|||||||||||||||||||||||||||||||||||||return|if|this|var|length|XRegExp|null|for|index|replace|true||div|push|getParam|call|exec|else|prototype||false|lastIndex|config|arguments|RegExp|toolbar|code|left|captureNames|slice|right|id|undefined|split|new|class|addToken|indexOf|typeof|script|className|source|params|substr|apply|toString|String|line|title|gutter|SyntaxHighlighter|_xregexp|strings|lt|html|test|OUTSIDE_CLASS|match|brush|document|target|gt|getHtml|regex|global|join|style|highlight|break|concat|window|Math|isRegExp|throw|value|brushes|brushName|space|alert|vars|http|syntaxhighlighter|expandSource|size|css|case|font|Fa|name|htmlScript|dA|can|handler|gm|td|exports|color|in|href|first|discoveredBrushes|light|collapse|object|cache|getButtonHtml|trigger|pattern|getLineHtml|nbsp|numbers|parseInt|defaults|com|items|www|pad|highlighters|execute|focus|func|all|getDiv|parentNode|navigator|INSIDE_CLASS|regexList|hasFlag|Match|useScriptTags|hasNamedCapture|text|help|init|br|input|gi|Error|values|span|list|250|height|width|screen|top|500|tagName|findElements|getElementsByTagName|aboutDialog|_blank|appendChild|charAt|Array|copyAsGlobal|setFlag|highlighter_|string|attachEvent|nodeName|floor|backref|output|the|TypeError|sticky|Za|iterate|freezeTokens|scope|type|textarea|alexgorbatchev|version|margin|2010|005896|gs|regexLib|body|center|align|noBrush|require|childNodes|DTD|xhtml1|head|org|w3|url|preventDefault|container|tr|getLineNumbersHtml|isNaN|userAgent|tbody|isLineHighlighted|quick|void|innerHTML|create|table|links|auto|smart|tab|stripBrs|tabs|bloggerMode|collapsed|plain|getCodeLinesHtml|caption|getMatchesHtml|findMatches|figureOutLineNumbers|removeNestedMatches|getTitleHtml|brushNotHtmlScript|substring|createElement|Highlighter|load|HtmlScript|Brush|pre|expand|multiline|min|Can|ignoreCase|find|blur|extended|toLowerCase|aliases|addEventListener|innerText|textContent|wasn|select|createTextNode|removeChild|option|same|frame|xmlns|dtd|twice|1999|equiv|meta|htmlscript|transitional|1E3|expected|PUBLIC|DOCTYPE|on|W3C|XHTML|TR|EN|Transitional||configured|srcElement|Object|after|run|dblclick|matchChain|valueOf|constructor|default|switch|click|round|execAt|forHtmlScript|token|gimy|functions|getKeywords|1E6|escape|within|random|sgi|another|finally|supply|MSIE|ie|toUpperCase|catch|returnValue|definition|event|border|imsx|constructing|one|Infinity|from|when|Content|cellpadding|flags|cellspacing|try|xhtml|Type|spaces|2930402|hosted_button_id|lastIndexOf|donate|active|development|keep|to|xclick|_s|Xml|please|like|you|paypal|cgi|cmd|webscr|bin|highlighted|scrollbars|aspScriptTags|phpScriptTags|sort|max|scriptScriptTags|toolbar_item|_|command|command_|number|getElementById|doubleQuotedString|singleLinePerlComments|singleLineCComments|multiLineCComments|singleQuotedString|multiLineDoubleQuotedString|xmlComments|alt|multiLineSingleQuotedString|If|https|1em|000|fff|background|5em|xx|bottom|75em|Gorbatchev|large|serif|CDATA|continue|utf|charset|content|About|family|sans|Helvetica|Arial|Geneva|3em|nogutter|Copyright|syntax|close|write|2004|Alex|open|JavaScript|highlighter|July|02|replaceChild|offset|83'.split('|'),0,{})) diff --git a/views/test/doc/syntaxhighlighter/shThemeDefault.css b/views/test/doc/syntaxhighlighter/shThemeDefault.css new file mode 100644 index 0000000000000000000000000000000000000000..22ca0b0a14e320e7ab278cea4ca329765f325057 --- /dev/null +++ b/views/test/doc/syntaxhighlighter/shThemeDefault.css @@ -0,0 +1,109 @@ +/** + * SyntaxHighlighter + * http://alexgorbatchev.com/SyntaxHighlighter + * + * SyntaxHighlighter is donationware. If you are using it, please donate. + * http://alexgorbatchev.com/SyntaxHighlighter/donate.html + * + * @version + * 3.0.83 (July 02 2010) + * + * @copyright + * Copyright (C) 2004-2010 Alex Gorbatchev. + * + * @license + * Dual licensed under the MIT and GPL licenses. + */ + +.syntaxhighlighter .line.highlighted.alt1, .syntaxhighlighter .line.highlighted.alt2 { + background-color: #e0e0e0 !important; +} +.syntaxhighlighter .line.highlighted.number { + color: black !important; +} +.syntaxhighlighter table caption { + color: black !important; +} +.syntaxhighlighter .gutter { + color: #afafaf !important; +} +.syntaxhighlighter .gutter .line { + border-right: 3px solid #6ce26c !important; +} +.syntaxhighlighter .gutter .line.highlighted { + background-color: #6ce26c !important; + color: white !important; +} +.syntaxhighlighter.printing .line .content { + border: none !important; +} +.syntaxhighlighter.collapsed { + overflow: visible !important; +} +.syntaxhighlighter.collapsed .toolbar { + color: blue !important; + background: white !important; + border: 1px solid #6ce26c !important; +} +.syntaxhighlighter.collapsed .toolbar a { + color: blue !important; +} +.syntaxhighlighter.collapsed .toolbar a:hover { + color: red !important; +} +.syntaxhighlighter .toolbar { + color: white !important; + background: #6ce26c !important; + border: none !important; +} +.syntaxhighlighter .toolbar a { + color: white !important; +} +.syntaxhighlighter .toolbar a:hover { + color: black !important; +} +.syntaxhighlighter .plain, .syntaxhighlighter .plain a { + color: black !important; +} +.syntaxhighlighter .comments, .syntaxhighlighter .comments a { + color: #008200 !important; +} +.syntaxhighlighter .string, .syntaxhighlighter .string a { + color: blue !important; +} +.syntaxhighlighter .keyword { + color: #006699 !important; +} +.syntaxhighlighter .preprocessor { + color: gray !important; +} +.syntaxhighlighter .variable { + color: #aa7700 !important; +} +.syntaxhighlighter .value { + color: #009900 !important; +} +.syntaxhighlighter .functions { + color: #ff1493 !important; +} +.syntaxhighlighter .constants { + color: #0066cc !important; +} +.syntaxhighlighter .script { + font-weight: bold !important; + color: #006699 !important; + background-color: none !important; +} +.syntaxhighlighter .color1, .syntaxhighlighter .color1 a { + color: gray !important; +} +.syntaxhighlighter .color2, .syntaxhighlighter .color2 a { + color: #ff1493 !important; +} +.syntaxhighlighter .color3, .syntaxhighlighter .color3 a { + color: red !important; +} + +.syntaxhighlighter .keyword { + font-weight: bold !important; +} diff --git a/views/test/paymentDirect/MangoPaySdkStorage.tmp.php b/views/test/paymentDirect/MangoPaySdkStorage.tmp.php new file mode 100644 index 0000000000000000000000000000000000000000..822b035a27b2a2e8f90baa250e8b6574b14b0edc --- /dev/null +++ b/views/test/paymentDirect/MangoPaySdkStorage.tmp.php @@ -0,0 +1 @@ +<?php exit(); ?>O:29:"MangoPay\Libraries\OAuthToken":5:{s:11:"create_time";i:1508849286;s:12:"access_token";s:32:"f05e1e1e559e4938a440efd4d73c21f0";s:10:"token_type";s:6:"bearer";s:10:"expires_in";i:1199;s:17:"autentication_key";s:32:"5836d7ecc1acd6048993fb6992492474";} \ No newline at end of file diff --git a/views/test/paymentDirect/config.php b/views/test/paymentDirect/config.php new file mode 100644 index 0000000000000000000000000000000000000000..03414c8b28eae3ce7cc697f2a78c20bc53ded93e --- /dev/null +++ b/views/test/paymentDirect/config.php @@ -0,0 +1,12 @@ +<?php + +/** + * Setting for client: client Id, client password + */ +define('MangoPayDemo_ClientId', 'sdk-unit-tests'); +define('MangoPayDemo_ClientPassword', 'cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju'); + +/** + * Path to folder to store temporary files (with permissions to write) + */ +define('MangoPayDemo_TemporaryFolder', __dir__); \ No newline at end of file diff --git a/views/test/paymentDirect/index.php b/views/test/paymentDirect/index.php new file mode 100644 index 0000000000000000000000000000000000000000..a99f4227e0760af4237fa598fcf2de6e08c4099c --- /dev/null +++ b/views/test/paymentDirect/index.php @@ -0,0 +1,40 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> + <title>Payment Direct - demo</title> + <style> + label { + display: block; + width: 130px; + float: left; + } + div.clear { + clear: both; + height: 10px; + } + input[type=submit], input[type=button] { + /*width: 200px; + margin-left: 85px;*/ + } + </style> + + </head> + <body style="margin: 10px;"> + <a href="?mode=JS">Using JavaScript Kit</a> + <a href="?mode=nonJS">Without JavaScript</a> + <br /> + + <?php + if (isset($_GET['mode'])){ + if ($_GET['mode'] == 'nonJS') { + print '<h1>Without JavaSctipt</h1>'; + include "non_js.php"; + } elseif($_GET['mode'] == 'JS') { + print '<h1>Using JavaSctipt Kit</h1>'; + include "with_js.php"; + } + } + ?> + </body> +</html> diff --git a/views/test/paymentDirect/js/script.js b/views/test/paymentDirect/js/script.js new file mode 100644 index 0000000000000000000000000000000000000000..cae035e8ad2c7b108b7e2c17fd28e536cf739d60 --- /dev/null +++ b/views/test/paymentDirect/js/script.js @@ -0,0 +1,100 @@ +$(document).ready(function(){ + + // Initialize mangoPay.cardRegistration object + mangoPay.cardRegistration.init({ + cardRegistrationURL : cardRegistrationURL, + preregistrationData : preregistrationData, + accessKey : accessKey, + Id : cardRegistrationId + }); + + // Action for button "Pay with Ajax" + $("#payAjax").click(function() { + + // Disable button to prevent double click while waiting + $("#payAjax").attr("disabled", true).val("Please wait..."); + + runCardRegAjax(); + + }); + + // Action for button "Pay with Ajax or Redirect" + $("#payAjaxOrRedirect").click(function(){ + + // Disable button to prevent double click while waiting + $("#payAjaxOrRedirect").attr("disabled", true).val("Please wait..."); + + if(mangoPay.browser.corsSupport()) { + runCardRegAjax(); + return; + } + + runCardRegReturnUrl(); + + }); + + // Action for button "Pay with Redirect" + $("#payRedirect").click(function() { + + runCardRegReturnUrl(); + + }); +}); + + +function runCardRegAjax() { + // Collect sensitive card data from the form + var cardData = getCardData(); + + // Process data + mangoPay.cardRegistration.registerCard(cardData, + function(res) { + var message = 'Card has been succesfully registered under the Card Id ' + res.CardId + '.<br />'; + message += 'Card is now ready to use e.g. in a «Direct PayIn» Object.'; + $("#divForm").html(message); + }, + function(res){ + alert("Error occured while registering the card: " + "ResultCode: " + res.ResultCode + ", ResultMessage: " + res.ResultMessage); + } + ); +} + +function runCardRegReturnUrl() { + + var cardData = getCardData(); + + // Build the form and append to the document + var form = document.createElement('form'); + form.setAttribute('action', cardRegistrationURL); + form.setAttribute('method', 'post'); + form.setAttribute('style', 'display: none'); + document.getElementsByTagName('body')[0].appendChild(form); + + // Add card registration data to the form + form.appendChild(getInputElement('data', preregistrationData)); + form.appendChild(getInputElement('accessKeyRef', accessKey)); + form.appendChild(getInputElement('cardNumber', cardData.cardNumber)); + form.appendChild(getInputElement('cardExpirationDate', cardData.cardExpirationDate)); + form.appendChild(getInputElement('cardCvx', cardData.cardCvx)); + form.appendChild(getInputElement('returnURL', redirectUrl)); + + // Submit the form + form.submit(); +} + +function getCardData() { + return { + cardNumber : $("#paymentForm").find("input[name$='cardNumber']").val(), + cardExpirationDate : $("#paymentForm").find("input[name$='cardExpirationDate']").val(), + cardCvx : $("#paymentForm").find("input[name$='cardCvx']").val(), + cardType : cardType + }; +} + +function getInputElement(name, value) { + var input = document.createElement('input'); + input.setAttribute('type', 'hidden'); + input.setAttribute('name', name); + input.setAttribute('value', value); + return input; +} \ No newline at end of file diff --git a/views/test/paymentDirect/non_js.php b/views/test/paymentDirect/non_js.php new file mode 100644 index 0000000000000000000000000000000000000000..15295be3619061c5cd0152db90d046ed28b5014c --- /dev/null +++ b/views/test/paymentDirect/non_js.php @@ -0,0 +1,78 @@ +<?php + +// include MangoPay SDK +require_once '../../vendor/autoload.php'; +require_once 'config.php'; + +// sample payment data +$_SESSION['amount'] = 3300; +$_SESSION['currency'] = 'EUR'; +$_SESSION['cardType'] = 'CB_VISA_MASTERCARD';//or alternatively MAESTRO or DINERS etc + +// create instance of MangoPayApi SDK +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = MangoPayDemo_ClientId; +$mangoPayApi->Config->ClientPassword = MangoPayDemo_ClientPassword; +$mangoPayApi->Config->TemporaryFolder = MangoPayDemo_TemporaryFolder; + +// create user for payment +$user = new MangoPay\UserNatural(); +$user->FirstName = 'John'; +$user->LastName = 'Smith'; +$user->Email = 'email@domain.com'; +$user->Birthday = time(); +$user->Nationality = 'FR'; +$user->CountryOfResidence = 'FR'; +$user->Occupation = "programmer"; +$user->IncomeRange = 3; +$createdUser = $mangoPayApi->Users->Create($user); + +// register card +$cardRegister = new \MangoPay\CardRegistration(); +$cardRegister->UserId = $createdUser->Id; +$cardRegister->Currency = $_SESSION['currency']; +$cardRegister->CardType = $_SESSION['cardType']; +$createdCardRegister = $mangoPayApi->CardRegistrations->Create($cardRegister); +$_SESSION['cardRegisterId'] = $createdCardRegister->Id; + +// build the return URL to capture token response +$returnUrl = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST']; +$returnUrl .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], '/') + 1); +$returnUrl .= 'payment.php'; + +?> + +<p> + <i> + Shows how to register the card without using JavaScript <br /> + and process payments with page reload. + </i> +</p> + +<label>Full Name</label> +<label><?php print $createdUser->FirstName . ' ' . $createdUser->LastName; ?></label> +<div class="clear"></div> + +<label>Amount</label> +<label><?php print $_SESSION['amount'] . ' ' . $_SESSION['currency']; ?></label> +<div class="clear"></div> + +<form action="<?php print $createdCardRegister->CardRegistrationURL; ?>" method="post"> + <input type="hidden" name="data" value="<?php print $createdCardRegister->PreregistrationData; ?>" /> + <input type="hidden" name="accessKeyRef" value="<?php print $createdCardRegister->AccessKey; ?>" /> + <input type="hidden" name="returnURL" value="<?php print $returnUrl; ?>" /> + + <label for="cardNumber">Card Number</label> + <input type="text" name="cardNumber" value="" /> + <div class="clear"></div> + + <label for="cardExpirationDate">Expiration Date</label> + <input type="text" name="cardExpirationDate" value="" /> + <div class="clear"></div> + + <label for="cardCvx">CVV</label> + <input type="text" name="cardCvx" value="" /> + <div class="clear"></div> + + <input type="submit" value="Pay" /> +</form> diff --git a/views/test/paymentDirect/payment.php b/views/test/paymentDirect/payment.php new file mode 100644 index 0000000000000000000000000000000000000000..85a97fc1b67585ec7716318825d28b953ed5a86c --- /dev/null +++ b/views/test/paymentDirect/payment.php @@ -0,0 +1,85 @@ +<?php +// include MangoPay SDK +//require_once '../../vendor/autoload.php'; +require_once 'config.php'; + +// check if payment has been initialized +if (!isset($_SESSION['amount'])) { + die('<div style="color:red;">No payment has been started<div>'); +} + +// create instance of MangoPayApi +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"];//MangoPayDemo_ClientId; +$mangoPayApi->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"];//MangoPayDemo_ClientPassword; +$mangoPayApi->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + +try { + // update register card with registration data from Payline service + $cardRegister = $mangoPayApi->CardRegistrations->Get($_SESSION['cardRegisterId']); + $cardRegister->RegistrationData = isset($_GET['data']) ? 'data=' . $_GET['data'] : 'errorCode=' . $_GET['errorCode']; + $updatedCardRegister = $mangoPayApi->CardRegistrations->Update($cardRegister); + + if ($updatedCardRegister->Status != \MangoPay\CardRegistrationStatus::Validated || !isset($updatedCardRegister->CardId)) + die('<div style="color:red;">Cannot create card. Payment has not been created.<div>'); + + // get created virtual card object + $card = $mangoPayApi->Cards->Get($updatedCardRegister->CardId); + + // create temporary wallet for user + $wallet = new \MangoPay\Wallet(); + $wallet->Owners = array( $updatedCardRegister->UserId ); + $wallet->Currency = $_SESSION['currency']; + $wallet->Description = 'Temporary wallet for payment demo'; + $createdWallet = $mangoPayApi->Wallets->Create($wallet); + + // create pay-in CARD DIRECT + $payIn = new \MangoPay\PayIn(); + $payIn->CreditedWalletId = $createdWallet->Id; + $payIn->AuthorId = $updatedCardRegister->UserId; + $payIn->DebitedFunds = new \MangoPay\Money(); + $payIn->DebitedFunds->Amount = $_SESSION['amount']; + $payIn->DebitedFunds->Currency = $_SESSION['currency']; + $payIn->Fees = new \MangoPay\Money(); + $payIn->Fees->Amount = 0; + $payIn->Fees->Currency = $_SESSION['currency']; + + // payment type as CARD + $payIn->PaymentDetails = new \MangoPay\PayInPaymentDetailsCard(); + $payIn->PaymentDetails->CardType = $card->CardType; + $payIn->PaymentDetails->CardId = $card->Id; + + // execution type as DIRECT + $payIn->ExecutionDetails = new \MangoPay\PayInExecutionDetailsDirect(); + $payIn->ExecutionDetails->SecureModeReturnURL = 'http://test.com'; + + // create Pay-In + $createdPayIn = $mangoPayApi->PayIns->Create($payIn); + + // if created Pay-in object has status SUCCEEDED it's mean that all is fine + if ($createdPayIn->Status == \MangoPay\PayInStatus::Succeeded) { + print '<div style="color:green;">'. + 'Pay-In has been created successfully. ' + .'Pay-In Id = ' . $createdPayIn->Id + . ', Wallet Id = ' . $createdWallet->Id + . '</div>'; + } + else { + // if created Pay-in object has status different than SUCCEEDED + // that occurred error and display error message + print '<div style="color:red;">'. + 'Pay-In has been created with status: ' + . $createdPayIn->Status . ' (result code: ' + . $createdPayIn->ResultCode . ')' + .'</div>'; + } + +} catch (\MangoPay\Libraries\ResponseException $e) { + + print '<div style="color: red;">' + .'\MangoPay\ResponseException: Code: ' + . $e->getCode() . '<br/>Message: ' . $e->getMessage() + .'<br/><br/>Details: '; print_r($e->GetErrorDetails()) + .'</div>'; +} + diff --git a/views/test/paymentDirect/with_js.php b/views/test/paymentDirect/with_js.php new file mode 100644 index 0000000000000000000000000000000000000000..a0409776bd5de1c98cac1b457726eca69d684802 --- /dev/null +++ b/views/test/paymentDirect/with_js.php @@ -0,0 +1,223 @@ +<?php + +// include MangoPay SDK +//require_once '../../vendor/autoload.php'; +require_once '../../pixelhumain/ph/vendor/autoload.php'; +require_once 'config.php'; + +// sample data to demo +$_SESSION['amount'] = 50; +$_SESSION['currency'] = 'EUR'; +$_SESSION['cardType'] = 'CB_VISA_MASTERCARD';//or alternatively MAESTRO or DINERS etc + +// create instance of MangoPayApi SDK +$mangoPayApi = new \MangoPay\MangoPayApi(); +$mangoPayApi->Config->ClientId = Yii::app()->params["mangoPay"]["ClientId"];//MangoPayDemo_ClientId; +$mangoPayApi->Config->ClientPassword = Yii::app()->params["mangoPay"]["ClientPassword"];//MangoPayDemo_ClientPassword; +$mangoPayApi->Config->TemporaryFolder = Yii::app()->params["mangoPay"]["TemporaryFolder"]; + +// create user for payment +$user = new MangoPay\UserNatural(); +$user->FirstName = 'COCO'; +$user->LastName = 'Jojo'; +$user->Email = 'email@domain.com'; +$user->Birthday = time(); +$user->Nationality = 'FR'; +$user->CountryOfResidence = 'FR'; +$user->Occupation = "programmer"; +$user->IncomeRange = 3; +$createdUser = $mangoPayApi->Users->Create($user); + +// register card +$cardRegister = new \MangoPay\CardRegistration(); +$cardRegister->UserId = $createdUser->Id; +$cardRegister->Currency = $_SESSION['currency']; +$cardRegister->CardType = $_SESSION['cardType']; +$createdCardRegister = $mangoPayApi->CardRegistrations->Create($cardRegister); +$_SESSION['cardRegisterId'] = $createdCardRegister->Id; + +// build the return URL to capture token response if browser does not support cross-domain Ajax requests +$returnUrl = 'http' . ( isset($_SERVER['HTTPS']) ? 's' : '' ) . '://' . $_SERVER['HTTP_HOST']; +$returnUrl .= substr($_SERVER['REQUEST_URI'], 0, strripos($_SERVER['REQUEST_URI'], '/') + 1); +$returnUrl .= 'pay'; + +?> + +<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> +<script src="https://rawgit.com/Mangopay/cardregistration-js-kit/master/kit/mangopay-kit.min.js"></script><!-- Or add the repo https://github.com/Mangopay/cardregistration-js-kit to your project +<script src="js/script.js"></script>--> + + +<script> + var cardRegistrationURL = "<?php print $createdCardRegister->CardRegistrationURL; ?>"; + var preregistrationData = "<?php print $createdCardRegister->PreregistrationData; ?>"; + var cardRegistrationId = "<?php print $createdCardRegister->Id; ?>"; + var cardType = "<?php print $createdCardRegister->CardType; ?>"; + var accessKey = "<?php print $createdCardRegister->AccessKey; ?>"; + var ajaxUrl = "<?php print $returnUrl; ?>"; + var redirectUrl = "<?php print $returnUrl; ?>"; + + console.log({ + cardRegistrationURL : "<?php print $createdCardRegister->CardRegistrationURL; ?>", + preregistrationData : "<?php print $createdCardRegister->PreregistrationData; ?>", + cardRegistrationId : "<?php print $createdCardRegister->Id; ?>", + cardType : "<?php print $createdCardRegister->CardType; ?>", + accessKey : "<?php print $createdCardRegister->AccessKey; ?>", + ajaxUrl : "<?php print $returnUrl; ?>", + redirectUrl : "<?php print $returnUrl; ?>" + }); + + mangoPay.cardRegistration.baseURL = "<?php print $mangoPayApi->Config->BaseUrl; ?>"; + mangoPay.cardRegistration.clientId = "<?php print $mangoPayApi->Config->ClientId; ?>"; +</script> + +<p> + <i> + Shows how to register the card using JavaScript Kit <br /> + and process payments asynchronously or with page reload. + </i> +</p> + +<div id ="divForm"> + <label>Full Name</label> + <label><?php print $createdUser->FirstName . ' ' . $createdUser->LastName; ?></label> + <br />createdCardRegister->Id : <?php print $createdCardRegister->Id; ?> + <br />createdUser->Id : <?php print $createdUser->Id; ?> + <div class="clear"></div> + + <label>Amount</label> + <label><?php print $_SESSION['amount'] . ' ' . $_SESSION['currency']; ?></label> + <div class="clear"></div> + + <form id="paymentForm"> + <label for="cardNumber">Card Number</label> + <input type="text" name="cardNumber" value="" /> + <div class="clear"></div> + + <label for="cardExpirationDate">Expiration Date</label> + <input type="text" name="cardExpirationDate" value="" /> + <div class="clear"></div> + + <label for="cardCvx">CVV</label> + <input type="text" name="cardCvx" value="" /> + <div class="clear"></div> + <br> + + <input type="button" value="Register with Ajax (will fail for non supporting CORS browsers)" id="payAjax" /> + <div class="clear"></div> + <br> + + <input type="button" value="Register with Ajax or redirect if no CORS support" id="payAjaxOrRedirect" /> + <div class="clear"></div> + <br> + + <input type="button" value="Register with redirect and then pay" id="payRedirect" /> + <div class="clear"></div> + + </form> + +</div> + +<script type="text/javascript"> + +$(document).ready(function(){ + + // Initialize mangoPay.cardRegistration object + mangoPay.cardRegistration.init({ + cardRegistrationURL : cardRegistrationURL, + preregistrationData : preregistrationData, + accessKey : accessKey, + Id : cardRegistrationId + }); + + // Action for button "Pay with Ajax" + $("#payAjax").click(function() { + + // Disable button to prevent double click while waiting + $("#payAjax").attr("disabled", true).val("Please wait..."); + + runCardRegAjax(); + + }); + + // Action for button "Pay with Ajax or Redirect" + $("#payAjaxOrRedirect").click(function(){ + + // Disable button to prevent double click while waiting + $("#payAjaxOrRedirect").attr("disabled", true).val("Please wait..."); + + if(mangoPay.browser.corsSupport()) { + runCardRegAjax(); + return; + } + + runCardRegReturnUrl(); + + }); + + // Action for button "Pay with Redirect" + $("#payRedirect").click(function() { + + runCardRegReturnUrl(); + + }); +}); + + +function runCardRegAjax() { + // Collect sensitive card data from the form + var cardData = getCardData(); + + // Process data + mangoPay.cardRegistration.registerCard(cardData, + function(res) { + var message = 'Card has been succesfully registered under the Card Id ' + res.CardId + '.<br />'; + message += 'Card is now ready to use e.g. in a «Direct PayIn» Object.'; + $("#divForm").html(message); + }, + function(res){ + alert("Error occured while registering the card: " + "ResultCode: " + res.ResultCode + ", ResultMessage: " + res.ResultMessage); + } + ); +} + +function runCardRegReturnUrl() { + + var cardData = getCardData(); + + // Build the form and append to the document + var form = document.createElement('form'); + form.setAttribute('action', cardRegistrationURL); + form.setAttribute('method', 'post'); + form.setAttribute('style', 'display: none'); + document.getElementsByTagName('body')[0].appendChild(form); + + // Add card registration data to the form + form.appendChild(getInputElement('data', preregistrationData)); + form.appendChild(getInputElement('accessKeyRef', accessKey)); + form.appendChild(getInputElement('cardNumber', cardData.cardNumber)); + form.appendChild(getInputElement('cardExpirationDate', cardData.cardExpirationDate)); + form.appendChild(getInputElement('cardCvx', cardData.cardCvx)); + form.appendChild(getInputElement('returnURL', redirectUrl)); + + // Submit the form + form.submit(); +} + +function getCardData() { + return { + cardNumber : $("#paymentForm").find("input[name$='cardNumber']").val(), + cardExpirationDate : $("#paymentForm").find("input[name$='cardExpirationDate']").val(), + cardCvx : $("#paymentForm").find("input[name$='cardCvx']").val(), + cardType : cardType + }; +} + +function getInputElement(name, value) { + var input = document.createElement('input'); + input.setAttribute('type', 'hidden'); + input.setAttribute('name', name); + input.setAttribute('value', value); + return input; +} +</script> diff --git a/views/translation/trad.php b/views/translation/trad.php new file mode 100755 index 0000000000000000000000000000000000000000..3123ba52f0c137e427da12d0ee568a4aaceefd08 --- /dev/null +++ b/views/translation/trad.php @@ -0,0 +1,809 @@ +<?php header("Content-type: application/json; charset=utf-8"); ?> + +var trad = { + "areyousuretodelete" : "<?php echo Yii::t("common", "Are you sure you want to delete") ?>", + "connection" : "<?php echo Yii::t("common", "connexion") ?>", + "askadminprojects" : "<?php echo Yii::t("common", "You are going to ask to become an admin of the project") ?>", + "askadminorganizations" : "<?php echo Yii::t("common", "You are going to ask to become an admin of the organization") ?>", + "confirm" : "<?php echo Yii::t("common", "Please confirm") ?>", + "edit" : "<?php echo Yii::t("common", "Edit") ?>", + "movehere" : "<?php echo Yii::t("common", "Move here") ?>", + "noalbumregister" : "<?php echo Yii::t("common", "No album found") ?>", + "removeconnection" : "<?php echo Yii::t("common","Are you sure you want to remove this connection") ?>", + "removeconnectionevents" : "<?php echo Yii::t("common","Are you sure to not participate to this event") ?>", + "removeconnectionorganizations" : "<?php echo Yii::t("common","Are you sure to remove the link with this organization") ?>", + "removeconnectionprojects" : "<?php echo Yii::t("common","Are you sure to remove the link with this project") ?>", + "removeconnectioncontributors" : "<?php echo Yii::t("common","Are you sure to remove the link with this project") ?>", + "removeconnectionattendees" : "<?php echo Yii::t("common","Are you sure to leave this event") ?>", + "removeconnectionmembers" : "<?php echo Yii::t("common","Are you sure to remove the link of member") ?>", + "removeconnectioncitoyens" : "<?php echo Yii::t("common","Are you sure to remove this follows") ?>", + "removeconnectionfollowers" : "<?php echo Yii::t("common","Are you sure to remove this follow") ?>", + "removeconnectionfollows" : "<?php echo Yii::t("common","Are you sure to remove this follow") ?>", + "asmember" : "<?php echo Yii::t("common", "as member") ?>", + "ascontributor" : "<?php echo Yii::t("common", "as contributor") ?>", + "asadmin" : "<?php echo Yii::t("common", "as admin") ?>", + "suretojoinprojects" : "<?php echo Yii::t("common", "Are you sure to join the project") ?>", + "suretojoinorganizations" : "<?php echo Yii::t("common", "Are you sure to join the organization") ?>", + "suretojoinevents" : "<?php echo Yii::t("common", "Are you sure to participate to the event") ?>", + "areyouadmin" : "<?php echo Yii::t("common", "Are you admin") ?>", + "yes" : "<?php echo Yii::t("common","Yes") ?>", + "no" : "<?php echo Yii::t("common","No") ?>", + "noone":"<?php echo Yii::t("common","No one") ?>", + "cancel" : "<?php echo Yii::t("common","Cancel") ?>", + "save":"<?php echo Yii::t("common","Save") ?>", + "commenton":"<?php echo Yii::t("common","Comment on") ?>", + "youranswer":"<?php echo Yii::t("common","Your answer") ?>", + "comment":"<?php echo Yii::t("comment","comment") ?>", + "comments":"<?php echo Yii::t("comment","comments") ?>", + "answer":"<?php echo Yii::t("common","Answer") ?>", + "declareabuse":"<?php echo Yii::t("common","Declare an abuse") ?>", + "ilike":"<?php echo Yii::t("common","I like") ?>", + "idontlike":"<?php echo Yii::t("common","I don’t like") ?>", + "chargingcomments":"<?php echo Yii::t("comment","Loading comments") ?>", + "sortbyrole":"<?php echo Yii::t("common","Sort by role") ?>", + "roleroles":"<?php echo Yii::t("common","Role(s)") ?>", + "yourcommentwellupdated":"<?php echo Yii::t("common","Your comment is well updated") ?>", + "modifyyourcomment":"<?php echo Yii::t("common","Update your comment") ?>", + "currentlyresearching":"<?php echo Yii::t("common","Currently researching") ?>", + "currentlyloading":"<?php echo Yii::t("common","Currently loading") ?>", + "noresult":"<?php echo Yii::t("common","No result") ?>", + "changelanguageprocessing":"<?php echo Yii::t("common","Changing language processing") ?>", + "removeopinionbefore" : "<?php echo Yii::t("common", "Remove your last opinion before") ?>", + "voteaddedsuccess" : "<?php echo Yii::t("common", "Your vote has been successfully added") ?>", + "voteremovedsuccess" : "<?php echo Yii::t("common","Your vote has been successfully removed") ?>", + "thanktosignalabuse" : "<?php echo Yii::t("common","Thank you ! We are dealing it as quickly as possible. If there is more than 5 report, the news will be hidden") ?>", + "infoaddcitywarning" :"<?php echo Yii::t("docs","If a city doesn't exist on communecter, you have to write the full name to find the city")?>", + "alreadyreportedabuse": "<?php echo Yii::t("common","You already reported this news as abuse") ?>" , + "askreasonreportabuse": "<?php echo Yii::t("common", "You are going to declare an abuse : please fill the reason")?>", + "delete": "<?php echo Yii::t("common", "Delete")?>", + "update": "<?php echo Yii::t("common", "Update")?>", + "share": "<?php echo Yii::t("common", "Share")?>", + "updatepublication": "<?php echo Yii::t("common", "Update publication")?>", + "reportanabuse": "<?php echo Yii::t("common", "Report an abuse")?>", + "notparticipateanymore": "<?php echo Yii::t("common","Not participate anymore") ?>", + "You are not following" : "<?php echo Yii::t("common", "You are not following")?>", + "suretodeletenews" : "<?php echo Yii::t("common","Are you sure you want to delete this news") ?>", + "suretodeletecontact" : "<?php echo Yii::t("common","Are you sure you want to delete this contact") ?>", + "suretodeletelink" : "<?php echo Yii::t("common","Are you sure you want to delete this link") ?>", + "successdeletenews":"<?php echo Yii::t("common","News has been successfully delated") ?>", + "successsavenews":"<?php echo Yii::t("common","News added successfully!") ?>", + "nomorenews":"<?php echo Yii::t("common","No more news") ?>", + "somethingwrong":"<?php echo Yii::t("common","Something went wrong!") ?>", + "tryagain":"<?php echo Yii::t("common","Please try again") ?>", + "wrongwithurl":"<?php echo Yii::t("common","Something went wrong with the url") ?>", + "leaveeventsuccess":"<?php echo Yii::t("common", "You leave successfully this event") ?>", + "validationwellregistred":"<?php echo Yii::t("common","Validation is well registered") ?>", + "visiblepublic":"<?php echo Yii::t("common","Visible to all and posted on the city's wall")?>", + "visiblerestricted": "<?php echo Yii::t("common","Visible to all on this wall and published on this network")?>", + "visibleprivate": "<?php echo Yii::t("common","Private view")?>", + "voteUp": "<?php echo Yii::t("common","voteUp")?>", + "voteAbstain": "<?php echo Yii::t("common","voteAbstain")?>", + "voteUnclear": "<?php echo Yii::t("common","voteUnclear")?>", + "voteMoreInfo": "<?php echo Yii::t("common","voteMoreInfo")?>", + "voteDown": "<?php echo Yii::t("common","voteDown")?>", + "postalCode" : "<?php echo Yii::t("common","Postal Code"); ?>", + "unknownPostalCode" : "<?php echo Yii::t("common","Unknown Postal Code"); ?>", + "city" : "<?php echo Yii::t("common","City"); ?>", + "searchamongcontact": "<?php echo Yii::t("common","Search among your contacts"); ?>", + "administrator" : "<?php echo Yii::t("common","Administrator") ?>", + "invitingToAdmin" : "<?php echo Yii::t("common","Invited to administrate") ?>", + "waitingValidation" : "<?php echo Yii::t("common","Waiting for validation") ?>", + "Member" : "<?php echo Yii::t("common","Member") ?>", + "justCitizen" : "<?php echo Yii::t("common","Just a citizen wanting to give visibility to it :)") ?>", + "showcalendar" : "<?php echo Yii::t("common","Show calendar") ?>", + "hidecalendar" : "<?php echo Yii::t("common","Hide calendar") ?>", + "addProject" : "<?php echo Yii::t("common","Add a Project") ?>", + "addproject" : "<?php echo Yii::t("common","Add a Project") ?>", + "addEvent" : "<?php echo Yii::t("common","Add an Event") ?>", + "addevent" : "<?php echo Yii::t("common","Add an Event") ?>", + "addorganization" : "<?php echo Yii::t("common","Add an Organization") ?>", + "addOrganization" : "<?php echo Yii::t("common","Add an Organization") ?>", + "addLocalBusiness" : "<?php echo Yii::t("common","Add a company") ?>", + "addGovernmentOrganization" : "<?php echo Yii::t("common","Add a Governemental Organization") ?>", + "addAssociation" : "<?php echo Yii::t("common","Add an association") ?>", + "addNGO" : "<?php echo Yii::t("common","Add an association") ?>", + "addGroup" : "<?php echo Yii::t("common","Add a group") ?>", + "addProposal" : "<?php echo Yii::t("common","Add a proposal") ?>", + "addAction" : "<?php echo Yii::t("common","Add an action") ?>", + "choose" : "<?php echo Yii::t("common","Choose") ?>", + "chooseCountry" : "<?php echo Yii::t("common","Choose a country") ?>", + "LoginFirst" : "<?php echo Yii::t("common","Please Login First") ?>", + "mustacceptCGU" : "<?php echo Yii::t("login","You must validate the CGU to sign up.") ?>", + "usernamenotunique" : "<?php echo Yii::t("login","The user name is not unique : please change it.")?>", + "somethingwentwrong" : "<?php echo Yii::t("login","Something went really bad : contact your administrator !")?>", + "suredeletelocality" : "<?php echo Yii::t("common","Are you sure you want to delete the locality ?")?>", + "suredeletepersonlocality" : "<?php echo Yii::t('common',"Are you sure you want to delete the locality ? You can't vote anymore in the citizen council of your city.")?>", + "updateParams" : "<?php echo Yii::t("common","Update Params") ?>", + "minsizebanner": "<?php echo Yii::t("common","Please choose an image with a minimun of size: 600x300 (widthxheight)") ?>", + "modifyelement": "<?php echo Yii::t("common","Edit this element")?>", + "udpateorganizer" : "<?php echo Yii::t("event","Update the organizer") ?>", + "organizations" : "<?php echo Yii::t("common","organizations") ?>", + "projects" : "<?php echo Yii::t("common","projects") ?>", + "events" : "<?php echo Yii::t("common","events") ?>", + "organization" : "<?php echo Yii::t("common","organization") ?>", + "project" : "<?php echo Yii::t("common","project") ?>", + "event" : "<?php echo Yii::t("common","event") ?>", + "createorganization":"<?php echo Yii::t("common","Create an organization") ?>", + "createproject":"<?php echo Yii::t("common","Create a project") ?>", + "createevent":"<?php echo Yii::t("common","Create an event") ?>", + "createpoi":"<?php echo Yii::t("common","Create a point of interest") ?>", + "createclassified":"<?php echo Yii::t("common","Create a classified ad") ?>", + "createcollection":"<?php echo Yii::t("common","Create a new collection") ?>", + + "organizations":"<?php echo Yii::t("common","organizations"); ?>", + "Organizations":"<?php echo Yii::t("common","Organizations"); ?>", + "projects":"<?php echo Yii::t("common","projects"); ?>", + "events":"<?php echo Yii::t("common","events"); ?>", + "people":"<?php echo Yii::t("common","people"); ?>", + "People":"<?php echo Yii::t("common","People"); ?>", + "citoyens":"<?php echo Yii::t("common","citoyens"); ?>", + "person":"<?php echo Yii::t("common","person"); ?>", + "followers":"<?php echo Yii::t("common","followers"); ?>", + "address" : "<?php echo Yii::t("common","Address") ?>", + "classified" : "<?php echo Yii::t("common","classified") ?>", + "classifieds" : "<?php echo Yii::t("common","classifieds") ?>", + "municipality" : "<?php echo Yii::t("common","municipality") ?>", + "municipalities" : "<?php echo Yii::t("common","municipalities") ?>", + "places" : "<?php echo Yii::t("common","Places") ?>", + "place" : "<?php echo Yii::t("common","Place") ?>", + "ressource" : "<?php echo Yii::t("common","Ressource") ?>", + "poi" : "<?php echo Yii::t("common","Point of interest") ?>", + "contactPoint" : "<?php echo Yii::t("common","contact") ?>", + "collection" : "<?php echo Yii::t("common","collection") ?>", + "collections" : "<?php echo Yii::t("common","collections") ?>", + "profil" : "<?php echo Yii::t("common","profile") ?>", + "banner" : "<?php echo Yii::t("common","cover") ?>", + "slider" : "<?php echo Yii::t("common","albums") ?>", + "and" : "<?php echo Yii::t("common","and") ?>", + "album" : "<?php echo Yii::t("common","album") ?>", + "albums" : "<?php echo Yii::t("common","albums") ?>", + "image" : "<?php echo Yii::t("common","image") ?>", + "images" : "<?php echo Yii::t("common","images") ?>", + "bookmarks" : "<?php echo Yii::t("common","Bookmarks") ?>", + "files" : "<?php echo Yii::t("common","Files") ?>", + "explainbookmark" : "<?php echo Yii::t("document","Collection of bookmarks<br>To classified favorite urls<br>And share it to the community") ?>", + "explainfile" : "<?php echo Yii::t("document","Collection of files<br>To download and share documents<br>With the community") ?>", + "Technologie" : "Technologie", + "Immobilier" : "Immobilier", + "Véhicules" : "Véhicules", + "Maison" : "Maison", + "Loisirs" : "Loisirs", + "Mode" : "Mode", + + "all" : "Tous", + + "products" : "<?php echo Yii::t("common","products") ?>", + "services" : "<?php echo Yii::t("common","services") ?>", + "circuits" : "<?php echo Yii::t("common","circuits") ?>", + + + "Project maturity" : "<?php echo Yii::t("project","Project maturity",null,Yii::app()->controller->module->id)?>", + "idea" : "<?php echo Yii::t("project","idea")?>", + "started" : "<?php echo Yii::t("project","started")?>", + "development" : "<?php echo Yii::t("project","development")?>", + "testing" : "<?php echo Yii::t("project","testing")?>", + "concept" : "<?php echo Yii::t("project","concept")?>", + "mature" : "<?php echo Yii::t("project","mature")?>", + "notSpecified" : "<?php echo Yii::t("common","Not specified") ?>", + "UnknownLocality" : "<?php echo Yii::t("common","Unknown Locality") ?>", + + "NGO" : "<?php echo Yii::t("common","NGO") ?>", + "NGOs" : "<?php echo Yii::t("common","NGOs") ?>", + "LocalBusiness" : "<?php echo Yii::t("common","LocalBusiness") ?>", + "Group" :"<?php echo Yii::t("common","Group") ?>", + "groups" :"<?php echo Yii::t("common","Groups") ?>", + "GovernmentOrganization" : "<?php echo Yii::t("common","GovernmentOrganization") ?>", + "GovernmentOrganizations" : "<?php echo Yii::t("common","Government organizations") ?>", + + "character(s)" : "<?php echo Yii::t("common","character(s)") ?>", + "Change password" : "<?php echo Yii::t("common","Change password") ?>", + + + 'Bold' : "<?php echo Yii::t("common","Bold") ?>", + 'Italic' : "<?php echo Yii::t("common","Italic") ?>", + 'Heading' : "<?php echo Yii::t("common","Heading") ?>", + 'URL/Link' : "<?php echo Yii::t("common","URL/Link") ?>", + 'Image' : "<?php echo Yii::t("common","Image") ?>", + 'List' : "<?php echo Yii::t("common","List") ?>", + 'Preview' : "<?php echo Yii::t("common","Preview") ?>", + 'strong text' : "<?php echo Yii::t("common","strong text") ?>", + 'emphasized text' : "<?php echo Yii::t("common","emphasized text") ?>", + 'heading text' : "<?php echo Yii::t("common","heading text") ?>", + 'enter link description here' : "<?php echo Yii::t("common","enter link description here") ?>", + 'Insert Hyperlink' : "<?php echo Yii::t("common","Insert Hyperlink") ?>", + 'enter image description here' : "<?php echo Yii::t("common","enter image description here") ?>", + 'Insert Image Hyperlink' : "<?php echo Yii::t("common","Insert Image Hyperlink") ?>", + 'enter image title here' : "<?php echo Yii::t("common","enter image title here") ?>", + 'list text here' : "<?php echo Yii::t("common","list text here") ?>", + + + "Old password" : "<?php echo Yii::t("common","Old password") ?>", + "New password" : "<?php echo Yii::t("common","New password") ?>", + "Repeat your new password" : "<?php echo Yii::t("common","Repeat your new password") ?>", + + + "Add members ..." : "<?php echo Yii::t("common","Add members ...") ?>", + "Among my contacts ..." : "<?php echo Yii::t("common","Among my contacts ...") ?>", + "Others ..." : "<?php echo Yii::t("common","Others ...") ?>", + "Close" : "<?php echo Yii::t("common","Close") ?>", + "Add this contacts" : "<?php echo Yii::t("common","Add this contacts") ?>", + "Cancel all" : "<?php echo Yii::t("common","Cancel all") ?>", + "Invite your contacts" : "<?php echo Yii::t("common","Invite your contacts") ?>", + "Select among my contacts" : "<?php echo Yii::t("common","Select among my contacts") ?>", + "Research a name or e-mail address..." : "<?php echo Yii::t("common","Research a name or e-mail address...") ?>", + "Invitation accept" : "<?php echo Yii::t("common","Invitation accept") ?>", + "Wait for confirmation" : "<?php echo Yii::t("common","Wait for confirmation") ?>", + "Add link" : "<?php echo Yii::t("common","Add link") ?>", + "Add contact" : "<?php echo Yii::t("common","Add contact") ?>", + 'Search a city, a town or a postal code' : "<?php echo Yii::t("common","Search a city, a town or a postal code") ?>", + 'Currently researching' : "<?php echo Yii::t("common","Currently researching") ?>", + 'City Informations' : "<?php echo Yii::t("common","City Informations") ?>", + + "Insee" : "<?php echo Yii::t("common","Insee") ?>", + "level3" : "<?php echo Yii::t("common","level3") ?>", + "level4" : "<?php echo Yii::t("common","level4") ?>", + "latlng" : "<?php echo Yii::t("common","latlng") ?>", + "streetFormInMap" : "<?php echo Yii::t("common","streetFormInMap") ?>", + + "Update description" : "<?php echo Yii::t("common", "Update description") ?>", + "Update network" : "<?php echo Yii::t("common", "Update network") ?>", + "Update general information" : "<?php echo Yii::t("common", "Update general information") ?>", + "Update date" : "<?php echo Yii::t("common", "Update date") ?>", + + "filtertags": "<?php echo Yii::t("common","Show tag filters") ?>", + "seeall": "<?php echo Yii::t("common","See all") ?>", + "Name" : "<?php echo Yii::t("common", "Name") ?>", + "Email" : "<?php echo Yii::t("common", "Email") ?>", + "Please specify a name" : "<?php echo Yii::t("common", "Please specify a name") ?>", + "Please specify a email" : "<?php echo Yii::t("common", "Please specify a email") ?>", + "noMoreNotifs":"<?php echo Yii::t("common","No more notifications for the moment") ?>", + "iscomposedof":"<?php echo Yii::t("common","is composed of") ?>", + "subevent":"<?php echo Yii::t("common","subevent") ?>", + "subevents":"<?php echo Yii::t("common","subevents") ?>", + "takepart":"<?php echo Yii::t("common","takes part in")?>", + "hasgot":"<?php echo Yii::t("common","has got")?>", + "ismemberof":"<?php echo Yii::t("common","is member of")?>", + "contributeto":"<?php echo Yii::t("common","contributes to")?>", + "of":"<?php echo Yii::t("common","of")?>", + "need":"<?php echo Yii::t("common","need")?>", + "pointinterest" : "<?php echo Yii::t("common","point of interest") ?>", + "pointsinterests" : "<?php echo Yii::t("common","points of interest") ?>", + "cities":"<?php echo Yii::t("common","cities") ?>", + "proposal" : "<?php echo Yii::t("common","proposal") ?>", + "createdbys": "<?php echo Yii::t("common","have been created by") ?>", + "createdby": "<?php echo Yii::t("common","created by") ?>", + "guest": "<?php echo Yii::t("common","guest") ?>", + "guests": "<?php echo Yii::t("common","guests") ?>", + "attendee": "<?php echo Yii::t("common","attendee") ?>", + "attendees": "<?php echo Yii::t("common","attendees") ?>", + "attendee-s": "<?php echo Yii::t("common","attendee(s)") ?>", + "concerned": "<?php echo Yii::t("common","concerned") ?>", + "guest-s": "<?php echo Yii::t("common","guest(s)") ?>", + "subevent-s": "<?php echo Yii::t("common","subevent(s)") ?>", + "interested":"<?php echo Yii::t("common","I am interested") ?>", + "contributor": "<?php echo Yii::t("common","contributor") ?>", + "contributors": "<?php echo Yii::t("common","contributors") ?>", + "Follow": "<?php echo Yii::t("common","Follow") ?>", + "unfollow": "<?php echo Yii::t("common","Unfollow") ?>", + "cancellink": "<?php echo Yii::t("common","Cancel this link") ?>", + "acceptasadmin": "<?php echo Yii::t("common","Accept as admin") ?>", + "acceptasmembers": "<?php echo Yii::t("common","Accept as member") ?>", + "acceptascontributors": "<?php echo Yii::t("common","Accept as contributor") ?>", + "addasadmin": "<?php echo Yii::t("common","Add as admin") ?>", + "addmodifyroles":"<?php echo Yii::t("common","Add/Update roles") ?>", + "deletemembers":"<?php echo Yii::t("common","Delete this member") ?>", + "deleteattendees":"<?php echo Yii::t("common","Delete this attendee") ?>", + "deletecontributors":"<?php echo Yii::t("common","Delete this contributor") ?>", + "follow": "<?php echo Yii::t("common","follow") ?>", + "follower": "<?php echo Yii::t("common","follower") ?>", + "followers": "<?php echo Yii::t("common","followers") ?>", + "isfollowing": "<?php echo Yii::t("common","is <b>following</b>") ?>", + "participate": "<?php echo Yii::t("common","Participate") ?>", + "member": "<?php echo Yii::t("common","member") ?>", + "members": "<?php echo Yii::t("common","members") ?>", + "nodata": "<?php echo Yii::t("common","No data") ?>", + "noelementinthiscollection": "<?php echo Yii::t("common","No element in this collection") ?>", + "on": "<?php echo Yii::t("common","on") ?>", + "to": "<?php echo Yii::t("common","to") ?>", + "todate": "<?php echo Yii::t("translate","To") ?>", + "fromdate": "<?php echo Yii::t("translate","From") ?>", + "todatemin": "<?php echo Yii::t("translate","to") ?>", + "page": "<?php echo Yii::t("common","page") ?>", + "pages": "<?php echo Yii::t("common","pages") ?>", + "toproject": "<?php echo Yii::t("common","to the project") ?>", + "toevent": "<?php echo Yii::t("common","to the event") ?>", + "hide": "<?php echo Yii::t("common","hide") ?>", + "showdescr": "<?php echo Yii::t("common","show description") ?>", + "results":"<?php echo Yii::t("common","results") ?>", + "result":"<?php echo Yii::t("common","result") ?>", + "extendedsearch":"<?php echo Yii::t("common","Extended search") ?>", + "ago":"<?php echo Yii::t("common","ago") ?>", + "rightnow":"<?php echo Yii::t("common","Right now") ?>", + "actif":"<?php echo Yii::t("common","online") ?>", + "addScopeFilters":"<?php echo Yii::t("common","Add scope filters") ?>", + "searchingon":"<?php echo Yii::t("common","searching on") ?>", + "selectscopesearch":"<?php echo Yii::t("common","Select scopes of research") ?>", + "communectyou":"<?php echo Yii::t("common","Connect to your city") ?>", + "communectwith":"<?php echo Yii::t("common","Connected with") ?>", + "sunday":"<?php echo Yii::t("translate","Sunday") ?>", + "monday":"<?php echo Yii::t("translate","Monday") ?>", + "tuesday":"<?php echo Yii::t("translate","Tuesday") ?>", + "wednesday":"<?php echo Yii::t("translate","Wednesday") ?>", + "thursday":"<?php echo Yii::t("translate","Thursday") ?>", + "friday":"<?php echo Yii::t("translate","Friday") ?>", + "saturday":"<?php echo Yii::t("translate","Saturday") ?>", + "january":"<?php echo Yii::t("translate","January") ?>", + "february":"<?php echo Yii::t("translate","February") ?>", + "march":"<?php echo Yii::t("translate","March") ?>", + "april":"<?php echo Yii::t("translate","April") ?>", + "may":"<?php echo Yii::t("translate","May") ?>", + "june":"<?php echo Yii::t("translate","June") ?>", + "july":"<?php echo Yii::t("translate","July") ?>", + "august":"<?php echo Yii::t("translate","August") ?>", + "september":"<?php echo Yii::t("translate","September") ?>", + "october":"<?php echo Yii::t("translate","October") ?>", + "november":"<?php echo Yii::t("translate","November") ?>", + "december":"<?php echo Yii::t("translate","December") ?>", + "mypeople":"<?php echo Yii::t("common","My people") ?>", + "myorganizations":"<?php echo Yii::t("common","My organizations") ?>", + "myprojects":"<?php echo Yii::t("common","My projects") ?>", + "myevents":"<?php echo Yii::t("common","My events") ?>", + "mydirectory":"<?php echo Yii::t("common","My directory") ?>", + "searchnamepostalcity":"<?php echo Yii::t("common","Search name, postal code, city ...") ?>", + "showhideoldevents":"<?php echo Yii::t("common","Show/Hide old events") ?>", + "showhideoldprojects":"<?php echo Yii::t("common","Show/Hide old projects") ?>", + "discuss":"<?php echo Yii::t("rooms","Discussion") ?>", + "vote":"<?php echo Yii::t("rooms","Decision") ?>", + "actions":"<?php echo Yii::t("rooms","Action") ?>", + "action":"<?php echo Yii::t("rooms","action") ?>", + "actionRooms":"<?php echo Yii::t("rooms","actionRooms") ?>", + "room":"<?php echo Yii::t("rooms","room") ?>", + "gallery":"<?php echo Yii::t("common","Gallery") ?>", + "library":"<?php echo Yii::t("common","Library") ?>", + "nopicture":"<?php echo Yii::t("common","No picture in this album") ?>", + "nofile":"<?php echo Yii::t("common","No file in this folder") ?>", + + "Your amendement has been save with success" : "<?php echo Yii::t("cooperation", "Your amendement has been save with success") ?>", + "Your vote has been save with success" : "<?php echo Yii::t("cooperation", "Your vote has been save with success") ?>", + "processing save" : "<?php echo Yii::t("cooperation", "processing save") ?>", + "processing delete" : "<?php echo Yii::t("cooperation", "processing delete") ?>", + "processing delete ok" : "<?php echo Yii::t("cooperation", "processing delete ok") ?>", + "processing delete KO" : "<?php echo Yii::t("cooperation", "processing delete KO") ?>", + "processing ok" : "<?php echo Yii::t("cooperation", "processing ok") ?>", + "processing" : "<?php echo Yii::t("cooperation", "processing") ?>", + + "amendable" : "<?php echo Yii::t("cooperation", "amendable") ?>", + "tovote" : "<?php echo Yii::t("cooperation", "tovote") ?>", + "todo" : "<?php echo Yii::t("cooperation", "todo") ?>", + "closed" : "<?php echo Yii::t("cooperation", "closed") ?>", + "archived" : "<?php echo Yii::t("cooperation", "archived") ?>", + "disabled" : "<?php echo Yii::t("cooperation", "disabled") ?>", + "resolved" : "<?php echo Yii::t("cooperation", "resolved") ?>", + "done" : "<?php echo Yii::t("cooperation", "done") ?>", + + "activated" : "<?php echo Yii::t("cooperation", "activated") ?>", + "ruleOfMajority" :"<?php echo Yii::t("cooperation", "Rule of majority") ?>", + "giveValueMajority" :"<?php echo Yii::t("cooperation", "give a value between 50% and 100%") ?>", + + "Agree" : "<?php echo Yii::t("cooperation", "Agree") ?>", + "Disagree" : "<?php echo Yii::t("cooperation", "Disagree") ?>", + "Abstain" : "<?php echo Yii::t("cooperation", "Abstain") ?>", + "Uncomplet" : "<?php echo Yii::t("cooperation", "Uncomplet") ?>", + + "amendementTooShort" : "<?php echo Yii::t("cooperation", "Your amendement is too short ! Minimum : 10 caracters") ?>", + + "thxForParticipation" : "<?php echo Yii::t("cooperation", "Thanks for your participation !") ?>", + + "loadingComments" : "<?php echo Yii::t("cooperation", "Loading comments") ?>", + + "thecommunityof" : "<?php echo Yii::t("common", "The community of") ?>", + "Unblock" : "<?php echo Yii::t("common", "Unblock") ?>", + "backtopage" : "<?php echo Yii::t("common", "Back to page") ?>", + "searchbyname" : "<?php echo Yii::t("common", "Search by name") ?>", + "map" : "<?php echo Yii::t("common", "Map") ?>", + "list" : "<?php echo Yii::t("common", "List") ?>", + "cartography" : "<?php echo Yii::t("common", "Cartography") ?>", + "alltags" : "<?php echo Yii::t("common", "All tags") ?>", + "alltypes" : "<?php echo Yii::t("common", "All types") ?>", + "youwillfindonlycities" : "<?php echo Yii::t("docs","You will find only cities <b>which match data</b>.<br/> If you <b>don't find</b> a city, feel free <b>to create an organization, a project, an event, on this geographical zone...</b><br/><br/><b>Then you will find this result here</b>") ?>", + "testAOtherCommunexion" : "<?php echo Yii::t("home", "Test a other communexion") ?>", + "allcitieswiththispostalcode" : "<?php echo Yii::t("common", "All cities with this postal code") ?>", + "allDay" : "<?php echo Yii::t("common", "All day") ?>", + + "Checkout" : "<?php echo Yii::t("common", "Checkout") ?>", + "Continue" : "<?php echo Yii::t("common", "Continue") ?>", + "Total of your order" : "<?php echo Yii::t("common", "Total of your order") ?>", + + "Leave your comment" : "<?php echo Yii::t("common", "Leave your comment") ?>", + "Your comment" : "<?php echo Yii::t("common", "Your comment") ?>", + +}; + +var tradDynForm = { + "appList":"<?php echo Yii::t("form","List of Applications") ?>", + "screenList":"<?php echo Yii::t("form","Screen shot View to Application") ?>", + "me":"<?php echo Yii::t("form","Me") ?>", + "dontknow":"<?php echo Yii::t("form","I don't know") ?>", + "syntaxmarkdownused":"<?php echo Yii::t("form","Markdown syntax is used for description. If you want to <a href='https://michelf.ca/projets/php-markdown/syntaxe/'' target='_blank'>know more about</a>") ?>", + "speakingas":"<?php echo Yii::t("form","speaking as") ?>", + "ispartof":"<?php echo Yii::t("form","Is part of") ?>", + "ispartofelement":"<?php echo Yii::t("form","Is part of an element") ?>", + "parentStartDate":"<?php echo Yii::t("form","parent's start date") ?>", + "parentEndDate":"<?php echo Yii::t("form","parent's end date") ?>", + "organizedby":"<?php echo Yii::t("form","Organized by") ?>", + "infocreateevent":"<?php echo Yii::t("form","If you want to create a new event to make it visible : it is the right place !!<br>You can invite people, make a program of your event, publish news during the event") ?>", + "infocreatepoi":"<?php echo Yii::t("form","Share every kind of informations<br>Locate items to make it visible for everyone<br>And take part to the co-building of your territory!")?>", + "infocreateproject":"<?php echo Yii::t("form","Make visble your project to all has never been so easy !<br>Create your project in few seconds,<br>then complete more according to your needs")?>", + "infocreateorganization":"<?php echo Yii::t("form","Create your page in few seconds,<br>then add more details,<br>according to your needs")?>", + "infocreateurl":"<?php echo Yii::t("form","Share links you like, to make them accessible to all") ?>", + "infocreateRoom":"<?php echo Yii::t("form","Rooms are spaces of decision and action for a community") ?>", + "infocreatecontact":"<?php echo Yii::t("form","Indicate contacts linked to this page to give more opportunities for people to find you") ?>", + "infocreatebookmark":"<?php echo Yii::t("form","Create a list of bookmark to find fastly your favorite url<br>And share it to other people") ?>", + "infouploadfile":"<?php echo Yii::t("form","Upload files here to share it with others<br>And organized them !") ?>", + "infoslug":"<?php echo Yii::t("form","Slug is very important.<br> It will permit to give a unique name to chat in a room,<br>A beautiful url like www.communecter.org/#communecter") ?>", + "whoorganizedevent":"<?php echo Yii::t("form","Who is organizing this event") ?>", + "whoorganize":"<?php echo Yii::t("form","Who organizes") ?>", + "ispartofevent":"<?php echo Yii::t("form","Is part of an event") ?>", + "noparent":"<?php echo Yii::t("form","No parent") ?>", + "eventparentStartDate":"<?php echo Yii::t("form","Event parent's start date") ?>", + "eventparentEndDate":"<?php echo Yii::t("form","Event parent's end date") ?>", + "shortDescription":"<?php echo Yii::t("form","Short description") ?>", + "longDescription":"<?php echo Yii::t("form","Long description") ?>", + "textproposal":"<?php echo Yii::t("form","Your proposal") ?>", + "eventTypes":"<?php echo Yii::t("form","Event type") ?>", + "organizationType":"<?php echo Yii::t("form","Organization type") ?>", + "servicesTypes":"<?php echo Yii::t("form","Service type") ?>", + "quantity":"<?php echo Yii::t("form","Quantity available") ?>", + "nameofyour":"<?php echo Yii::t("form","Name of your") ?>", + "titleofyour":"<?php echo Yii::t("form","Title of your") ?>", + "tags":"<?php echo Yii::t("form","Tags") ?>", + "roles":"<?php echo Yii::t("form","Roles") ?>", + "slug":"<?php echo Yii::t("form","Slug") ?>", + "description":"<?php echo Yii::t("form","Description") ?>", + "addtags":"<?php echo Yii::t("form","Add some tags") ?>", + "limitAccessRole":"<?php echo Yii::t("form","Limit role access") ?>", + "what":"<?php echo Yii::t("form","What") ?>", + "indicatethemoneyused":"<?php echo Yii::t("form","Indicate the currency used") ?>", + "currency":"<?php echo Yii::t("form","Currency") ?>", + + "addroles":"<?php echo Yii::t("form","Add some roles") ?>", + "wantToAddSomething":"<?php echo Yii::t("form","choose what you want to add ?") ?>", + "imageshere":"<?php echo Yii::t("form","Your pictures here") ?>", + "fileshere":"<?php echo Yii::t("form","Your files here") ?>", + "pricesymbole":"<?php echo Yii::t("form","Price") ?>", + "price":"<?php echo Yii::t("form","Price") ?>", + "mainemail":"<?php echo Yii::t("form","Main email") ?>", + "mainurl":"<?php echo Yii::t("form","Main URL") ?>", + "yes":"<?php echo Yii::t("common","Yes") ?>", + "no":"<?php echo Yii::t("common","No") ?>", + "allday":"<?php echo Yii::t("form","All the day") ?>", + "allweek":"<?php echo Yii::t("form","All the week") ?>", + "startDate":"<?php echo Yii::t("form","Start date") ?>", + "endDate":"<?php echo Yii::t("form","End date") ?>", + "theendDate":"<?php echo Yii::t("form","the start date") ?>", + "theendDate":"<?php echo Yii::t("form","the end date") ?>", + "birthdate":"<?php echo Yii::t("form","Birth date") ?>", + "urlandaddinfoandaction":"<?php echo Yii::t("form","url, more informations, to do list, etc") ?>", + "indetails":"<?php echo Yii::t("form","In details") ?>", + "optiondescrurl":"<?php echo Yii::t("form","options (desc, urls)") ?>", + "localization":"<?php echo Yii::t("form","Localization") ?>", + "submit":"<?php echo Yii::t("form","Submit") ?>", + "clear":"<?php echo Yii::t("common","Clear") ?>", + "cancel":"<?php echo Yii::t("form","Cancel") ?>", + "mainLocality":"<?php echo Yii::t("common","Main locality") ?>", + "secondLocality":"<?php echo Yii::t("common","Second locality") ?>", + "freeinfourl":"<?php echo Yii::t("form","Free informations / urls") ?>", + "addpoi":"<?php echo Yii::t("form","Create a point of interest") ?>", + "configNetwork":"<?php echo Yii::t("form","Configure your Network") ?>", + "addconfig":"<?php echo Yii::t("form","Create a config") ?>", + "addclassified":"<?php echo Yii::t("form","Create a classified") ?>", + "addphotos":"<?php echo Yii::t("form","Add photos to the gallery") ?>", + "infoaddphoto":"<?php echo Yii::t("form","Stock your photos and share them") ?>", + "addurl":"<?php echo Yii::t("form","Add an url") ?>", + "updateslug":"<?php echo Yii::t("form","Update slug") ?>", + "addbookmark":"<?php echo Yii::t("form","Add a bookmark") ?>", + "uploadfile":"<?php echo Yii::t("form","Upload files") ?>", + "addroom":"<?php echo Yii::t("form","Add a cooperation room") ?>", + "modifyoraddroles":"<?php echo Yii::t("form","Add or edit the roles of") ?>", + "addcontact":"<?php echo Yii::t("form","Add a contact") ?>", + "addimage":"<?php echo Yii::t("form","Add an image") ?>", + "addfile":"<?php echo Yii::t("form","Add a file") ?>", + "save":"<?php echo Yii::t("common","Save") ?>", + "whichkindofroom":"<?php echo Yii::t("form","Which kind of room do you want to create") ?>", + "whichkindofpoi":"<?php echo Yii::t("form","Which kind of point do you want to locate") ?>", + "whichkindofconfig":"<?php echo Yii::t("form","Which kind of config") ?>", + "whichkindofclassified":"<?php echo Yii::t("form","Which kind of classified is it") ?>", + "inwhichcategoryforclassified":"<?php echo Yii::t("form","In which category do you want to publish the classified") ?>", + "subcategory":"<?php echo Yii::t("form","Subcategory") ?>", + "contactinfo":"<?php echo Yii::t("common","Contact information") ?>", + "telemail":"<?php echo Yii::t("form","phone number, email address") ?>", + "yourrole":"<?php echo Yii::t("form","Your role") ?>", + "whichrole":"<?php echo Yii::t("form","Which is your role") ?>", + "name":"<?php echo Yii::t("common","Name") ?>", + "titleurl":"<?php echo Yii::t("form","Title of URL") ?>", + "linkUrl":"<?php echo Yii::t("form","URL of the link") ?>", + "urltype":"<?php echo Yii::t("form","URL type") ?>", + "choosetype":"<?php echo Yii::t("form","Choose a type") ?>", + "contactrole":"<?php echo Yii::t("form","Contact's role") ?>", + "contactphone":"<?php echo Yii::t("form","Contact's phone") ?>", + "mustbeconnectforcreateform":"<?php echo Yii::t("common","You must be connected to access to create forms") ?>", + "linkSkype":"<?php echo Yii::t("form","Link to Skype") ?>", + "linkGithub":"<?php echo Yii::t("form","Link to GitHub") ?>", + "linkGplus":"<?php echo Yii::t("form","Link to Google Plus") ?>", + "linkFacebook":"<?php echo Yii::t("form","Link to Facebook") ?>", + "linkTwitter":"<?php echo Yii::t("form","Link to Twitter") ?>", + "mobile":"<?php echo Yii::t("form","Mobile") ?>", + "fax":"<?php echo Yii::t("form","Fax") ?>", + "fix":"<?php echo Yii::t("form","Fix") ?>", + "enterfixnumber":"<?php echo Yii::t("form","Enter fix numbers separated by a comma") ?>", + "entermobilenumber":"<?php echo Yii::t("form","Enter phone numbers separated by a comma") ?>", + "enterfaxnumber":"<?php echo Yii::t("form","Enter fax numbers separated by a comma") ?>", + "theprojectmaturity":"<?php echo Yii::t("form","Maturity of the project") ?>", + "projectmaturity":"<?php echo Yii::t("form","Project maturity") ?>", + "textarguments" : "<?php echo Yii::t("form","Arguments") ?>", + "textargumentsandmore" : "<?php echo Yii::t("form","More informations, arguments, exemples") ?>", + "addinfotodoc":"<?php echo Yii::t("form","add informations to this document") ?>", + "infoimages":"<?php echo Yii::t("form","Add informations to the document to make it pertinent for others") ?>", + "titleimage":"<?php echo Yii::t("form","Image title") ?>", + "dropfileshere":"<?php echo Yii::t("form","Drop files here") ?>", + "sharefilesasnews":"<?php echo Yii::t("form","Do you want to share these files on this news stream") ?>", + "shareimagesasnews":"<?php echo Yii::t("form","Do you want to share these pictures on this news stream") ?>", + "public":"<?php echo Yii::t("form","Public") ?>", + "network":"<?php echo Yii::t("form","Network") ?>", + "private":"<?php echo Yii::t("form","Private") ?>", + "explainnetwork":"<?php echo Yii::t("form","Visible to all on this wall and published on community's network") ?>", + "explainpublic":"<?php echo Yii::t("form","Visible to all and posted on live") ?>", + "explainprivatecitoyens":"<?php echo Yii::t("form","Visible only to me") ?>", + "explainprivateorganizations":"<?php echo Yii::t("form","Visible only to the members") ?>", + "explainprivateprojects":"<?php echo Yii::t("form","Visible only to the project's contributors") ?>", + "newsauthor":"<?php echo Yii::t("form","Author of the news") ?>", + "asAuthor":"<?php echo Yii::t("form","as author") ?>", + "show":"<?php echo Yii::t("form","Show") ?>", + "me":"<?php echo Yii::t("form","Me") ?>", + "iamauthor":"<?php echo Yii::t("form","I am the author") ?>", + "newsvisibility":"<?php echo Yii::t("form","Visibility of the news") ?>", + "writenewshere":"<?php echo Yii::t("form","Write your news here") ?>", + "shareit":"<?php echo Yii::t("common","Share") ?>", + "wouldbecomeadmin":"<?php echo Yii::t("common","Would you like to be an administrator") ?>", + "invalidUsername":"<?php echo Yii::t("form","Invalid username : Only characters A-Z, a-z, 0-9 and '-' are acceptable.") ?>", + + "inSpace" : "<?php echo Yii::t("cooperation","in this space") ?>", + "infoProposal1" : "<?php echo Yii::t("cooperation","The final vote will be on the content of your proposal") ?>", + "infoProposal2" : "<?php echo Yii::t("cooperation","For clarity, please provide additional information about your proposal in the next section.") ?>", + + "infoProposal3" : "<?php echo Yii::t("cooperation","A proposal is used to discuss and seek community input on a given idea or question") ?>", + + "lblAmmendementEnabled" : "<?php echo Yii::t("cooperation","Enable amendments") ?>", + + "lblAmmendementDisabled" : "<?php echo Yii::t("cooperation","Votes are disabled during the amendment period") ?>", + + "proposalMustHaveMore" : "<?php echo Yii::t("cooperation","Your proposal must have more than ") ?>", + "ofvotes" : "<?php echo Yii::t("cooperation","of votes") ?>", + "favorables" : "<?php echo Yii::t("cooperation","favorables") ?>", + "tobevalidated" : "<?php echo Yii::t("cooperation","to be validated") ?>", + "nowayover100" : "<?php echo Yii::t("cooperation","Impossible to go over 100%") ?>", + "nowayunder50" : "<?php echo Yii::t("cooperation","Impossible to go under 50%") ?>", + + "changeVoteEnabled" : "<?php echo Yii::t("cooperation","changing vote enabled") ?>", + "changeVoteForbiden" : "<?php echo Yii::t("cooperation","changing vote forbiden") ?>", + "authorizeChangeVote" : "<?php echo Yii::t("cooperation","Do you want to allow voters to change them vote ?") ?>", + "allowChangeVote" : "<?php echo Yii::t("cooperation","Do you want to allow voters to change them vote ?") ?>", + + "dateEndVoteSession" : "<?php echo Yii::t("cooperation","Date end vote session") ?>", + "dateEndAmendementSessionStartVote" : "<?php echo Yii::t("cooperation","Date end amendement session (start of vote session)") ?>", + "dateEndAmendementSession" : "<?php echo Yii::t("cooperation","Date end amendement session") ?>", + + "anonymous" :"<?php echo Yii::t("cooperation", "anonymous") ?>", + "nominative" :"<?php echo Yii::t("cooperation", "nominative") ?>", + "voteAnonymous" : "<?php echo Yii::t("cooperation", "Anonymous votation") ?>", + "keepSecretIdentityVote" : "<?php echo Yii::t("cooperation", "Do you want to keep secret voters identity ?") ?>", + "changingVoteEnabled" : "<?php echo Yii::t("cooperation", "changing vote enabled") ?>", + "authorizeChangeVote" : "<?php echo Yii::t("cooperation", "Authorize changing vote ?") ?>", + "allowChangeVote" : "<?php echo Yii::t("cooperation", "Do you want to allow voters to change them vote ?") ?>", + "istooheavy": "<?php echo Yii::t("form", "is too heavy") ?>", + "limitmax": "<?php echo Yii::t("form", "Size limit") ?>", + "invalidextension": "<?php echo Yii::t("form", "invalid format") ?>", + "extensionacceptable": "<?php echo Yii::t("form", "Available extension(s)") ?>", + "collectionname": "<?php echo Yii::t("form", "Name of the collection") ?>", +}; + +var tradCategory = { + "link" : "<?php echo Yii::t("category", "Link, Url") ?>", + "tool" : "<?php echo Yii::t("category", "Tool") ?>", + "machine" : "<?php echo Yii::t("category", "Machine") ?>", + "software" : "<?php echo Yii::t("category", "Software") ?>", + "rh" : "<?php echo Yii::t("category", "Human ressource") ?>", + "materialRessource" : "<?php echo Yii::t("category", "Material ressource") ?>", + "financialRessource" : "<?php echo Yii::t("category", "Financial ressource") ?>", + "documentation" : "<?php echo Yii::t("category", "Documentation") ?>", + "geoJson" : "<?php echo Yii::t("category", "Geojson / UMap") ?>", + "compostPickup" : "<?php echo Yii::t("category", "Compost pickup") ?>", + "video" : "<?php echo Yii::t("category", "Video") ?>", + "sharedLibrary" : "<?php echo Yii::t("category", "Shared library") ?>", + "recoveryCenter": "<?php echo Yii::t("category", "Recovery center") ?>", + "trash" : "<?php echo Yii::t("category", "Trash") ?>", + "history" : "<?php echo Yii::t("category", "History") ?>", + "something2See" : "<?php echo Yii::t("category", "To see") ?>", + "funPlace" : "<?php echo Yii::t("category", "Fun place") ?>", + "place" : "<?php echo Yii::t("category", "Public place") ?>", + "artPiece" : "<?php echo Yii::t("category", "Art pieces") ?>", + "streetArt" : "<?php echo Yii::t("category", "Street art") ?>", + "openScene" : "<?php echo Yii::t("category", "Open mic") ?>", + "stand" : "<?php echo Yii::t("category", "Stand") ?>", + "parking" : "<?php echo Yii::t("category", "Parking") ?>", + "other" : "<?php echo Yii::t("category", "Other") ?>", + "contest" :"<?php echo Yii::t("category","Contest") ?>", + "festival" :"<?php echo Yii::t("category","Festival") ?>", + "market" :"<?php echo Yii::t("category","Market") ?>", + "others" :"<?php echo Yii::t("category","Other") ?>", + "concert" :"<?php echo Yii::t("category","Concert") ?>", + "exhibition" :"<?php echo Yii::t("category","Exhibition") ?>", + "getTogether" :"<?php echo Yii::t("category","Get together") ?>", + "meeting" :"<?php echo Yii::t("category","Meeting") ?>", + "competition" :"<?php echo Yii::t("category","Competition") ?>", + "course" :"<?php echo Yii::t("category","Course") ?>", + "workshop" :"<?php echo Yii::t("category","Workshop") ?>", + "conference" :"<?php echo Yii::t("category","Conference") ?>", + "debate" :"<?php echo Yii::t("category","Debate") ?>", + "film" :"<?php echo Yii::t("category","Film") ?>", + "Contest" :"<?php echo Yii::t("category","Contest") ?>", + "Festival" :"<?php echo Yii::t("category","Festival") ?>", + "Market" :"<?php echo Yii::t("category","Market") ?>", + "Other" :"<?php echo Yii::t("category","Other") ?>", + "Others" :"<?php echo Yii::t("category","Others") ?>", + "Concert" :"<?php echo Yii::t("category","Concert") ?>", + "Exhibition" :"<?php echo Yii::t("category","Exhibition") ?>", + "Get together" :"<?php echo Yii::t("category","Get together") ?>", + "Meeting" :"<?php echo Yii::t("category","Meeting") ?>", + "Competition" :"<?php echo Yii::t("category","Competition") ?>", + "Course" :"<?php echo Yii::t("category","Course") ?>", + "Workshop" :"<?php echo Yii::t("category","Workshop") ?>", + "Conference" :"<?php echo Yii::t("category","Conference") ?>", + "Debate" :"<?php echo Yii::t("category","Debate") ?>", + "Film" :"<?php echo Yii::t("category","Film") ?>", + "sharing" : "<?php echo Yii::t("category","Share") ?>", + "donation" : "<?php echo Yii::t("category","Give") ?>", + "forsale" : "<?php echo Yii::t("category","Sale") ?>", + "forrent" : "<?php echo Yii::t("category","Rent") ?>", + "lookingfor" : "<?php echo Yii::t("category","Need") ?>", + "job" : "<?php echo Yii::t("category","Jobs") ?>", + + "Share":"<?php echo Yii::t("category","Share") ?>", + "To share":"<?php echo Yii::t("category","To share") ?>", + "Give":"<?php echo Yii::t("category","Give") ?>", + "To give":"<?php echo Yii::t("category","To give") ?>", + "Sale":"<?php echo Yii::t("category","Sale") ?>", + "For sale":"<?php echo Yii::t("category","For sale") ?>", + "Rent":"<?php echo Yii::t("category","Rent") ?>", + "For rent":"<?php echo Yii::t("category","For rent") ?>", + "Need":"<?php echo Yii::t("category","Need") ?>", + "Looking for":"<?php echo Yii::t("category","Looking for") ?>", + "Jobs":"<?php echo Yii::t("category","Jobs") ?>", + + "Offers":"<?php echo Yii::t("category","Offers") ?>", + "Technology":"<?php echo Yii::t("category","Technology") ?>", + "TV / Video":"<?php echo Yii::t("category","TV / Video") ?>", + "IT":"<?php echo Yii::t("category","IT") ?>", + "Touchpads":"<?php echo Yii::t("category","Touchpads") ?>", + "Telephony":"<?php echo Yii::t("category","Telephony") ?>", + "Camera":"<?php echo Yii::t("category","Camera") ?>", + "Audio device":"<?php echo Yii::t("category","Audio device") ?>", + "Property":"<?php echo Yii::t("category","Property") ?>", + "House":"<?php echo Yii::t("category","House") ?>", + "Flat":"<?php echo Yii::t("category","Flat") ?>", + "Ground":"<?php echo Yii::t("category","Ground") ?>", + "Parking":"<?php echo Yii::t("category","Parking") ?>", + "Office":"<?php echo Yii::t("category","Office") ?>", + "Vehicles":"<?php echo Yii::t("category","Vehicles") ?>", + "Car":"<?php echo Yii::t("category","Car") ?>", + "SUV":"<?php echo Yii::t("category","SUV") ?>", + "Utility":"<?php echo Yii::t("category","Utility") ?>", + "Moto":"<?php echo Yii::t("category","Moto") ?>", + "Scooter":"<?php echo Yii::t("category","Scooter") ?>", + "Boat":"<?php echo Yii::t("category","Boat") ?>", + "Small car":"<?php echo Yii::t("category","Small car") ?>", + "Bikes":"<?php echo Yii::t("category","Bikes") ?>", + "Car equipment":"<?php echo Yii::t("category","Car equipment") ?>", + "2-wheeled equipment":"<?php echo Yii::t("category","2-wheeled equipment") ?>", + "Boat equipment":"<?php echo Yii::t("category","Boat equipment") ?>", + "Bike equipment":"<?php echo Yii::t("category","Bike equipment") ?>", + "Home":"<?php echo Yii::t("category","Home") ?>", + "Household appliances":"<?php echo Yii::t("category","Household appliances") ?>", + "Furniture":"<?php echo Yii::t("category","Furniture") ?>", + "Baby equipment":"<?php echo Yii::t("category","Baby equipment") ?>", + "Animals":"<?php echo Yii::t("category","Animals") ?>", + "Various":"<?php echo Yii::t("category","Various") ?>", + "Leisure":"<?php echo Yii::t("category","Leisure") ?>", + "Sports":"<?php echo Yii::t("category","Sports") ?>", + "Musical instrument":"<?php echo Yii::t("category","Musical instrument") ?>", + "Sound system":"<?php echo Yii::t("category","Sound system") ?>", + "CD / DVD":"<?php echo Yii::t("category","CD / DVD") ?>", + "Toy":"<?php echo Yii::t("category","Toy") ?>", + "Games":"<?php echo Yii::t("category","Games") ?>", + "Books / Comics":"<?php echo Yii::t("category","Books / Comics") ?>", + "Collections":"<?php echo Yii::t("category","Collections") ?>", + "DIY":"<?php echo Yii::t("category","DIY") ?>", + "Gardening":"<?php echo Yii::t("category","Gardening") ?>", + "Art / Deco":"<?php echo Yii::t("category","Art / Deco") ?>", + "Model making":"<?php echo Yii::t("category","Model making") ?>", + "Childcare":"<?php echo Yii::t("category","Childcare") ?>", + "Fashion":"<?php echo Yii::t("category","Fashion") ?>", + "Clothes":"<?php echo Yii::t("category","Clothes") ?>", + "Shoes":"<?php echo Yii::t("category","Shoes") ?>", + "Accessories":"<?php echo Yii::t("category","Accessories") ?>", + "Watches":"<?php echo Yii::t("category","Watches") ?>", + "Jewels":"<?php echo Yii::t("category","Jewels") ?>", + + + "Purchase-Comptability-Management":"<?php echo Yii::t("category","Purchase-Comptability-Management") ?>", + "Arts-Crafts":"<?php echo Yii::t("category","Arts-Crafts") ?>", + "Bank-Insurance":"<?php echo Yii::t("category","Bank-Insurance") ?>", + "Building-Public_works":"<?php echo Yii::t("category","Building-Public_works") ?>", + "Trade-Sales":"<?php echo Yii::t("category","Trade-Sales") ?>", + "Communication-Multimedia":"<?php echo Yii::t("category","Communication-Multimedia") ?>", + "Consultant-Market_research":"<?php echo Yii::t("category","Consultant-Market research") ?>", + "Natural_spaces":"<?php echo Yii::t("category","Natural_spaces") ?>", + "Agriculture":"<?php echo Yii::t("category","Agriculture") ?>", + "Fishing":"<?php echo Yii::t("category","Fishing") ?>", + "Animals_care":"<?php echo Yii::t("category","Animals_care") ?>", + "Hotel_business":"<?php echo Yii::t("category","Hotel_business") ?>", + "Catering":"<?php echo Yii::t("category","Catering") ?>", + "Tourism":"<?php echo Yii::t("category","Tourism") ?>", + "Animation":"<?php echo Yii::t("category","Animation") ?>", + "Health":"<?php echo Yii::t("category","Health") ?>", + "Property":"<?php echo Yii::t("category","Property") ?>", + "Industry":"<?php echo Yii::t("category","Industry") ?>", + "IT-Telecommunication":"<?php echo Yii::t("category","IT-Telecommunication") ?>", + "Installation-Maintenance":"<?php echo Yii::t("category","Installation-Maintenance") ?>", + "Marketing-Strategy":"<?php echo Yii::t("category","Marketing-Strategy") ?>", + "Human_Ressources":"<?php echo Yii::t("category","Human_Ressources") ?>", + "Secretariat-Assistantship":"<?php echo Yii::t("category","Secretariat-Assistantship") ?>", + "Home_services":"<?php echo Yii::t("category","Home_services") ?>", + "Public_services":"<?php echo Yii::t("category","Public_services") ?>", + "Spectacle":"<?php echo Yii::t("category","Spectacle") ?>", + "Sport":"<?php echo Yii::t("category","Sport") ?>", + "Transport-Logistic":"<?php echo Yii::t("category","Transport-Logistic") ?>", + "NGO":"<?php echo Yii::t("category","NGO") ?>", + "LocalBusiness":"<?php echo Yii::t("category","Local Business") ?>", + "Group":"<?php echo Yii::t("category","Group") ?>", + "Discussion":"<?php echo Yii::t("rooms","Discussion") ?>", + "Decision":"<?php echo Yii::t("rooms","Decision") ?>", + "Action":"<?php echo Yii::t("rooms","Action") ?>", + "GovernmentOrganization":"<?php echo Yii::t("category","Government Organization") ?>", + "discuss":"<?php echo Yii::t("rooms","Discussion") ?>", + "vote":"<?php echo Yii::t("rooms","Decision") ?>", + "financier":"<?php echo Yii::t("category","Financier") ?>", + "partner":"<?php echo Yii::t("category","Partner") ?>", + "organizor":"<?php echo Yii::t("category","Organizor") ?>", + "president":"<?php echo Yii::t("category","President") ?>", + "sponsor":"<?php echo Yii::t("category","Sponsor") ?>", + "director":"<?php echo Yii::t("category","Director") ?>", + "speaker":"<?php echo Yii::t("category","Speaker") ?>", + "intervener":"<?php echo Yii::t("category","Intervener") ?>", + "Planned on":"<?php echo Yii::t("common","Planned on") ?>", + "Parenthood":"<?php echo Yii::t("common","Parenthood") ?>", + "carriedby":"<?php echo Yii::t("common","Carried by") ?>", + "common":"<?php echo Yii::t("category","Commons") ?>", + "food":"<?php echo Yii::t("category","Agriculture | Food") ?>", + "health":"<?php echo Yii::t("category","Health") ?>", + "waste":"<?php echo Yii::t("category","Waste") ?>", + "building":"<?php echo Yii::t("category","Development | Transport | Construction") ?>", + "education":"<?php echo Yii::t("category","Education | Childhood") ?>", + "citizen":"<?php echo Yii::t("category","Citizenship") ?>", + "economy":"<?php echo Yii::t("category","Economy") ?>", + "energy":"<?php echo Yii::t("category","Energy | Climate") ?>", + "culture":"<?php echo Yii::t("category","Culture | Animation") ?>", + "biodiversity":"<?php echo Yii::t("category","Biodiversity") ?>", + "tic":"<?php echo Yii::t("category","ICT | Numeric | Internet") ?>", +}; +var tradCountry = { + "BE":"Belgique", + "FR":"France", + "GP":"Guadeloupe", + "GF":"Guyanne Française", + "MQ":"Martinique", + "YT":"Mayotte", + "NC":"Nouvelle-Calédonie", + "RE":"La Réunion", + "PM":"St Pierre et Miquelon", +}; \ No newline at end of file